@mtngtools/frame-vue 0.0.25-experimental.0 → 0.0.26-experimental.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/FetchCard-BM8A35iP.js +1506 -0
- package/dist/components/FetchCard/FetchCard.vue.d.ts +40 -0
- package/dist/components/FetchCard/FetchCard.vue.d.ts.map +1 -0
- package/dist/components/FetchCard/index.d.ts +3 -0
- package/dist/components/FetchCard/index.d.ts.map +1 -0
- package/dist/components/FetchCard/index.test.d.ts +2 -0
- package/dist/components/FetchCard/index.test.d.ts.map +1 -0
- package/dist/components/FetchCard/types.d.ts +36 -0
- package/dist/components/FetchCard/types.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +5 -1
- package/dist/VanillaIf-D12LoeQO.js +0 -911
|
@@ -0,0 +1,1506 @@
|
|
|
1
|
+
import { i as IconPanelRight_default, n as IconPanelFull_default, r as IconPanelBottom_default, t as IconClose_default } from "./IconClose-7R37a2Ma.js";
|
|
2
|
+
import { n as useSimpleLoggedIn } from "./useSimpleLoggedIn-DT4aMAWu.js";
|
|
3
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, getCurrentScope, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, readonly, ref, renderList, renderSlot, resolveDynamicComponent, shallowReadonly, shallowRef, toDisplayString, toRaw, toValue, unref, useSlots, vModelCheckbox, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
4
|
+
var _hoisted_1$5 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "SidePanelControlButton",
|
|
6
|
+
props: {
|
|
7
|
+
state: {},
|
|
8
|
+
active: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: !1
|
|
11
|
+
},
|
|
12
|
+
activeResolved: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
},
|
|
16
|
+
disabled: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
},
|
|
20
|
+
hideIcon: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
emits: ["click"],
|
|
26
|
+
setup(i, { emit: a }) {
|
|
27
|
+
let u = i, f = a, p = {
|
|
28
|
+
auto: "Auto",
|
|
29
|
+
right: "Right",
|
|
30
|
+
bottom: "Bottom",
|
|
31
|
+
full: "Full",
|
|
32
|
+
minimized: "Close"
|
|
33
|
+
}, m = {
|
|
34
|
+
auto: null,
|
|
35
|
+
right: IconPanelRight_default,
|
|
36
|
+
bottom: IconPanelBottom_default,
|
|
37
|
+
full: IconPanelFull_default,
|
|
38
|
+
minimized: IconClose_default
|
|
39
|
+
}, h = computed(() => p[u.state]), g = computed(() => {
|
|
40
|
+
if (u.disabled) return "cursor-not-allowed border-neutral-700 text-neutral-500";
|
|
41
|
+
{
|
|
42
|
+
let e = "cursor-pointer";
|
|
43
|
+
return u.activeResolved ? `${e} text-accent-400/80 bg-accent/20 border-accent-900/10` : `${e} text-accent-200 bg-accent/50 hover:bg-accent/90 border-accent hover:text-white hover:border-white`;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
function v() {
|
|
47
|
+
u.disabled || f("click", u.state);
|
|
48
|
+
}
|
|
49
|
+
return (e, t) => (openBlock(), createElementBlock("button", {
|
|
50
|
+
type: "button",
|
|
51
|
+
disabled: i.disabled,
|
|
52
|
+
class: normalizeClass(g.value),
|
|
53
|
+
style: {
|
|
54
|
+
display: "inline-flex",
|
|
55
|
+
alignItems: "center",
|
|
56
|
+
gap: "0.25rem",
|
|
57
|
+
borderRadius: "0.375rem",
|
|
58
|
+
borderWidth: "1px",
|
|
59
|
+
borderStyle: "solid",
|
|
60
|
+
paddingLeft: "0.375rem",
|
|
61
|
+
paddingRight: "0.375rem",
|
|
62
|
+
paddingTop: "0.125rem",
|
|
63
|
+
paddingBottom: "0.125rem",
|
|
64
|
+
fontSize: "0.70rem",
|
|
65
|
+
lineHeight: "1.2rem",
|
|
66
|
+
textTransform: "uppercase"
|
|
67
|
+
},
|
|
68
|
+
onClick: v
|
|
69
|
+
}, [renderSlot(e.$slots, "icon", { state: i.state }, () => [!i.hideIcon && m[i.state] ? (openBlock(), createBlock(resolveDynamicComponent(m[i.state]), {
|
|
70
|
+
key: 0,
|
|
71
|
+
style: {
|
|
72
|
+
width: ".85em",
|
|
73
|
+
height: ".85em"
|
|
74
|
+
}
|
|
75
|
+
})) : createCommentVNode("", !0)]), renderSlot(e.$slots, "label", { state: i.state }, () => [createTextVNode(toDisplayString(h.value), 1)])], 10, _hoisted_1$5));
|
|
76
|
+
}
|
|
77
|
+
}), _hoisted_1$4 = {
|
|
78
|
+
class: "",
|
|
79
|
+
style: {
|
|
80
|
+
display: "flex",
|
|
81
|
+
alignItems: "center",
|
|
82
|
+
gap: "0.5rem"
|
|
83
|
+
}
|
|
84
|
+
}, SidePanelButtonGroup_default = /* @__PURE__ */ defineComponent({
|
|
85
|
+
__name: "SidePanelButtonGroup",
|
|
86
|
+
props: {
|
|
87
|
+
sidePanelMode: { default: "none" },
|
|
88
|
+
sidePanelModeResolved: { default: "none" },
|
|
89
|
+
availableStates: { default: () => [] },
|
|
90
|
+
overlayOnly: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: !1
|
|
93
|
+
},
|
|
94
|
+
hideIcons: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: !1
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
emits: ["setSidePanelMode", "closeSidePanel"],
|
|
100
|
+
setup(e, { emit: t }) {
|
|
101
|
+
let n = e, r = t, i = computed(() => n.sidePanelModeResolved !== "none"), d = computed(() => n.overlayOnly && n.sidePanelModeResolved === "full" ? n.availableStates.includes("minimized") ? ["minimized"] : [] : n.availableStates);
|
|
102
|
+
function f(e) {
|
|
103
|
+
r("setSidePanelMode", e);
|
|
104
|
+
}
|
|
105
|
+
function p() {
|
|
106
|
+
r("closeSidePanel");
|
|
107
|
+
}
|
|
108
|
+
return (t, n) => i.value ? renderSlot(t.$slots, "default", {
|
|
109
|
+
key: 0,
|
|
110
|
+
sidePanelMode: e.sidePanelMode,
|
|
111
|
+
sidePanelModeResolved: e.sidePanelModeResolved,
|
|
112
|
+
availableStates: e.availableStates,
|
|
113
|
+
overlayOnly: e.overlayOnly,
|
|
114
|
+
setSidePanelMode: f,
|
|
115
|
+
closeSidePanel: p
|
|
116
|
+
}, () => [createElementVNode("div", _hoisted_1$4, [(openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (t) => (openBlock(), createBlock(SidePanelControlButton_default, {
|
|
117
|
+
key: t,
|
|
118
|
+
state: t,
|
|
119
|
+
active: t === e.sidePanelMode,
|
|
120
|
+
"active-resolved": t === e.sidePanelModeResolved,
|
|
121
|
+
"hide-icon": e.hideIcons,
|
|
122
|
+
onClick: f
|
|
123
|
+
}, null, 8, [
|
|
124
|
+
"state",
|
|
125
|
+
"active",
|
|
126
|
+
"active-resolved",
|
|
127
|
+
"hide-icon"
|
|
128
|
+
]))), 128))])]) : createCommentVNode("", !0);
|
|
129
|
+
}
|
|
130
|
+
}), _hoisted_1$3 = {
|
|
131
|
+
key: 0,
|
|
132
|
+
class: "",
|
|
133
|
+
style: {
|
|
134
|
+
display: "flex",
|
|
135
|
+
height: "100%",
|
|
136
|
+
minHeight: 0,
|
|
137
|
+
minWidth: 0,
|
|
138
|
+
alignItems: "center",
|
|
139
|
+
justifyContent: "space-between",
|
|
140
|
+
gap: "0.5rem",
|
|
141
|
+
overflow: "hidden",
|
|
142
|
+
padding: "0.5rem 0.5rem"
|
|
143
|
+
}
|
|
144
|
+
}, _hoisted_2$2 = {
|
|
145
|
+
key: 1,
|
|
146
|
+
class: "text-sm font-medium text-neutral-100",
|
|
147
|
+
style: {
|
|
148
|
+
minWidth: 0,
|
|
149
|
+
minHeight: 0,
|
|
150
|
+
margin: 0,
|
|
151
|
+
textAlign: "left"
|
|
152
|
+
}
|
|
153
|
+
}, _hoisted_3$2 = {
|
|
154
|
+
key: 0,
|
|
155
|
+
style: {
|
|
156
|
+
display: "flex",
|
|
157
|
+
alignItems: "center",
|
|
158
|
+
justifyContent: "flex-end",
|
|
159
|
+
minWidth: 0,
|
|
160
|
+
minHeight: 0,
|
|
161
|
+
marginLeft: "auto"
|
|
162
|
+
}
|
|
163
|
+
}, SidePanelHeader_default = /* @__PURE__ */ defineComponent({
|
|
164
|
+
__name: "SidePanelHeader",
|
|
165
|
+
props: {
|
|
166
|
+
title: { default: "Submit Questions" },
|
|
167
|
+
showTitleLabel: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
default: !0
|
|
170
|
+
},
|
|
171
|
+
sidePanelMode: { default: "none" },
|
|
172
|
+
sidePanelModeResolved: { default: "none" },
|
|
173
|
+
overlayOnly: {
|
|
174
|
+
type: Boolean,
|
|
175
|
+
default: !1
|
|
176
|
+
},
|
|
177
|
+
availableStates: { default: () => [] }
|
|
178
|
+
},
|
|
179
|
+
emits: ["setSidePanelMode", "closeSidePanel"],
|
|
180
|
+
setup(e, { emit: t }) {
|
|
181
|
+
let n = e, r = t, i = useSlots(), d = computed(() => n.sidePanelModeResolved !== "none"), f = computed(() => n.sidePanelModeResolved === "minimized"), p = computed(() => !!i.default), m = computed(() => !!i.controls), h = computed(() => !f.value);
|
|
182
|
+
return (t, n) => d.value ? (openBlock(), createElementBlock("header", _hoisted_1$3, [createElementVNode("div", { style: normalizeStyle({
|
|
183
|
+
display: "flex",
|
|
184
|
+
flex: f.value && !p.value ? "1 1 auto" : "0 1 auto",
|
|
185
|
+
minWidth: 0,
|
|
186
|
+
minHeight: 0,
|
|
187
|
+
alignItems: "center",
|
|
188
|
+
justifyContent: f.value && !p.value ? "center" : "flex-start",
|
|
189
|
+
overflow: "hidden"
|
|
190
|
+
}) }, [p.value ? renderSlot(t.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [f.value ? (openBlock(), createElementBlock("button", {
|
|
191
|
+
key: 0,
|
|
192
|
+
type: "button",
|
|
193
|
+
class: "text-accent-200 bg-accent/50 hover:bg-accent/90 border-accent hover:text-white hover:border-white",
|
|
194
|
+
style: {
|
|
195
|
+
display: "inline-flex",
|
|
196
|
+
alignItems: "center",
|
|
197
|
+
gap: "0.25rem",
|
|
198
|
+
borderRadius: "0.375rem 0.375rem 0 0",
|
|
199
|
+
borderWidth: "1px",
|
|
200
|
+
borderStyle: "solid",
|
|
201
|
+
paddingLeft: "0.375rem",
|
|
202
|
+
paddingRight: "0.375rem",
|
|
203
|
+
paddingTop: "0.125rem",
|
|
204
|
+
paddingBottom: "0.125rem",
|
|
205
|
+
fontSize: "0.70rem",
|
|
206
|
+
lineHeight: "1.2rem",
|
|
207
|
+
textTransform: "uppercase"
|
|
208
|
+
},
|
|
209
|
+
onClick: n[0] ||= (e) => r("setSidePanelMode", "auto")
|
|
210
|
+
}, toDisplayString(e.title), 1)) : e.showTitleLabel ? (openBlock(), createElementBlock("h2", _hoisted_2$2, toDisplayString(e.title) + ": ", 1)) : createCommentVNode("", !0)], 64))], 4), m.value || h.value ? (openBlock(), createElementBlock("div", _hoisted_3$2, [renderSlot(t.$slots, "controls", {}, () => [h.value ? (openBlock(), createBlock(SidePanelButtonGroup_default, {
|
|
211
|
+
key: 0,
|
|
212
|
+
"side-panel-mode": e.sidePanelMode,
|
|
213
|
+
"side-panel-mode-resolved": e.sidePanelModeResolved,
|
|
214
|
+
"available-states": e.availableStates,
|
|
215
|
+
"overlay-only": e.overlayOnly,
|
|
216
|
+
onSetSidePanelMode: n[1] ||= (e) => r("setSidePanelMode", e),
|
|
217
|
+
onCloseSidePanel: n[2] ||= (e) => r("closeSidePanel")
|
|
218
|
+
}, null, 8, [
|
|
219
|
+
"side-panel-mode",
|
|
220
|
+
"side-panel-mode-resolved",
|
|
221
|
+
"available-states",
|
|
222
|
+
"overlay-only"
|
|
223
|
+
])) : createCommentVNode("", !0)])])) : createCommentVNode("", !0)])) : createCommentVNode("", !0);
|
|
224
|
+
}
|
|
225
|
+
}), _hoisted_1$2 = {
|
|
226
|
+
key: 0,
|
|
227
|
+
class: "",
|
|
228
|
+
style: {
|
|
229
|
+
width: "100%",
|
|
230
|
+
height: "100%"
|
|
231
|
+
}
|
|
232
|
+
}, _hoisted_2$1 = {
|
|
233
|
+
class: "",
|
|
234
|
+
style: {
|
|
235
|
+
gridColumn: "1 / 2",
|
|
236
|
+
gridRow: "1 / 2",
|
|
237
|
+
minWidth: 0,
|
|
238
|
+
minHeight: 0,
|
|
239
|
+
overflow: "hidden"
|
|
240
|
+
}
|
|
241
|
+
}, _hoisted_3$1 = {
|
|
242
|
+
class: "",
|
|
243
|
+
style: {
|
|
244
|
+
gridColumn: "1 / 2",
|
|
245
|
+
gridRow: "2 / 3",
|
|
246
|
+
minWidth: 0,
|
|
247
|
+
minHeight: 0,
|
|
248
|
+
width: "100%",
|
|
249
|
+
height: "100%",
|
|
250
|
+
display: "grid",
|
|
251
|
+
placeContent: "stretch"
|
|
252
|
+
}
|
|
253
|
+
}, SidePanelFrame_default = /* @__PURE__ */ defineComponent({
|
|
254
|
+
__name: "SidePanelFrame",
|
|
255
|
+
props: {
|
|
256
|
+
sidePanelMode: { default: "none" },
|
|
257
|
+
sidePanelModeResolved: { default: "none" },
|
|
258
|
+
availableStates: { default: () => [] },
|
|
259
|
+
overlayOnly: {
|
|
260
|
+
type: Boolean,
|
|
261
|
+
default: !1
|
|
262
|
+
},
|
|
263
|
+
showTitleLabel: {
|
|
264
|
+
type: Boolean,
|
|
265
|
+
default: !1
|
|
266
|
+
},
|
|
267
|
+
hideIcons: {
|
|
268
|
+
type: Boolean,
|
|
269
|
+
default: !1
|
|
270
|
+
},
|
|
271
|
+
minWidth: { default: "320px" },
|
|
272
|
+
maxWidth: { default: "30vw" },
|
|
273
|
+
minHeight: { default: "200px" },
|
|
274
|
+
maxHeight: { default: "30vh" }
|
|
275
|
+
},
|
|
276
|
+
emits: ["setSidePanelMode", "closeSidePanel"],
|
|
277
|
+
setup(e, { emit: t }) {
|
|
278
|
+
let n = e, r = t, i = computed(() => n.sidePanelModeResolved !== "none"), a = computed(() => n.sidePanelModeResolved === "minimized"), s = computed(() => {
|
|
279
|
+
let e = {
|
|
280
|
+
width: "100%",
|
|
281
|
+
height: "100%",
|
|
282
|
+
display: "grid",
|
|
283
|
+
overflow: "hidden",
|
|
284
|
+
placeItems: "stretch"
|
|
285
|
+
};
|
|
286
|
+
return n.sidePanelModeResolved === "full" || n.sidePanelModeResolved === "right" || n.sidePanelModeResolved === "bottom" ? e : {
|
|
287
|
+
...e,
|
|
288
|
+
placeItems: "end center"
|
|
289
|
+
};
|
|
290
|
+
}), d = computed(() => {
|
|
291
|
+
if (n.sidePanelModeResolved === "full") return {
|
|
292
|
+
width: "100%",
|
|
293
|
+
height: "100%"
|
|
294
|
+
};
|
|
295
|
+
if (n.sidePanelModeResolved === "right") return {
|
|
296
|
+
minWidth: n.minWidth,
|
|
297
|
+
maxWidth: n.maxWidth,
|
|
298
|
+
width: "100%"
|
|
299
|
+
};
|
|
300
|
+
if (n.sidePanelModeResolved === "bottom") return {
|
|
301
|
+
minHeight: n.minHeight,
|
|
302
|
+
maxHeight: n.maxHeight,
|
|
303
|
+
height: "100%",
|
|
304
|
+
width: "100%"
|
|
305
|
+
};
|
|
306
|
+
}), p = computed(() => (n.sidePanelModeResolved === "full" && n.overlayOnly, {
|
|
307
|
+
maxWidth: "100%",
|
|
308
|
+
maxHeight: "100%",
|
|
309
|
+
minHeight: 0,
|
|
310
|
+
minWidth: 0,
|
|
311
|
+
overflow: "hidden"
|
|
312
|
+
})), m = computed(() => ({
|
|
313
|
+
display: "grid",
|
|
314
|
+
gridTemplateColumns: "1fr",
|
|
315
|
+
gridTemplateRows: a.value ? "max-content" : "max-content minmax(0, 1fr)"
|
|
316
|
+
})), h = computed(() => n.overlayOnly ? "border-neutral-700 bg-black/95" : "");
|
|
317
|
+
return (t, n) => i.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("div", { style: normalizeStyle(s.value) }, [createElementVNode("section", {
|
|
318
|
+
"data-test": "side-panel-frame-shell",
|
|
319
|
+
class: normalizeClass(h.value),
|
|
320
|
+
style: normalizeStyle([
|
|
321
|
+
p.value,
|
|
322
|
+
d.value,
|
|
323
|
+
m.value
|
|
324
|
+
])
|
|
325
|
+
}, [createElementVNode("div", _hoisted_2$1, [createVNode(SidePanelHeader_default, {
|
|
326
|
+
"show-title-label": e.showTitleLabel,
|
|
327
|
+
"side-panel-mode": e.sidePanelMode,
|
|
328
|
+
"side-panel-mode-resolved": e.sidePanelModeResolved,
|
|
329
|
+
"available-states": e.availableStates,
|
|
330
|
+
"overlay-only": e.overlayOnly,
|
|
331
|
+
"hide-icons": e.hideIcons,
|
|
332
|
+
onSetSidePanelMode: n[0] ||= (e) => r("setSidePanelMode", e),
|
|
333
|
+
onCloseSidePanel: n[1] ||= (e) => r("closeSidePanel")
|
|
334
|
+
}, null, 8, [
|
|
335
|
+
"show-title-label",
|
|
336
|
+
"side-panel-mode",
|
|
337
|
+
"side-panel-mode-resolved",
|
|
338
|
+
"available-states",
|
|
339
|
+
"overlay-only",
|
|
340
|
+
"hide-icons"
|
|
341
|
+
])]), withDirectives(createElementVNode("div", _hoisted_3$1, [renderSlot(t.$slots, "default")], 512), [[vShow, !a.value]])], 6)], 4)])) : createCommentVNode("", !0);
|
|
342
|
+
}
|
|
343
|
+
}), _hoisted_1$1 = {
|
|
344
|
+
id: "header-outer",
|
|
345
|
+
style: {
|
|
346
|
+
position: "relative",
|
|
347
|
+
width: "100%",
|
|
348
|
+
margin: 0,
|
|
349
|
+
padding: 0
|
|
350
|
+
}
|
|
351
|
+
}, LiveFrame_default = /* @__PURE__ */ ((e, t) => {
|
|
352
|
+
let n = e.__vccOpts || e;
|
|
353
|
+
for (let [e, r] of t) n[e] = r;
|
|
354
|
+
return n;
|
|
355
|
+
})(/* @__PURE__ */ defineComponent({
|
|
356
|
+
__name: "LiveFrame",
|
|
357
|
+
props: {
|
|
358
|
+
sidePanelPosition: { default: "minimized" },
|
|
359
|
+
mainContentAspectRatio: { default: "16/9" },
|
|
360
|
+
autoBottomAspectRatioBreakpoint: { default: .9 },
|
|
361
|
+
autoRightAspectRatioBreakpoint: { default: 3.2 },
|
|
362
|
+
sidePanelBreakpoint: { default: "md" },
|
|
363
|
+
controlsOverlayOnly: { default: "sm" },
|
|
364
|
+
autoHideTimeout: { default: 5e3 },
|
|
365
|
+
layoutDebounceMs: { default: 50 },
|
|
366
|
+
sidePanelMinRight: { default: "20rem" },
|
|
367
|
+
sidePanelMaxRight: { default: "30vw" },
|
|
368
|
+
sidePanelMaxRightWide: { default: "40vw" },
|
|
369
|
+
sidePanelMinBottom: { default: "12.5rem" },
|
|
370
|
+
sidePanelMaxBottom: { default: "30vh" },
|
|
371
|
+
sidePanelMaxBottomTall: { default: "60vh" },
|
|
372
|
+
headerHideWidthThreshold: { default: "50rem" },
|
|
373
|
+
headerHideHeightThreshold: { default: "40rem" },
|
|
374
|
+
displaySidePanel: {
|
|
375
|
+
type: [
|
|
376
|
+
Boolean,
|
|
377
|
+
Function,
|
|
378
|
+
Object
|
|
379
|
+
],
|
|
380
|
+
default: !0
|
|
381
|
+
},
|
|
382
|
+
displaySidePanelWindowFn: {},
|
|
383
|
+
hideSidePanelIcons: {
|
|
384
|
+
type: Boolean,
|
|
385
|
+
default: !1
|
|
386
|
+
},
|
|
387
|
+
enforceSlotSizingQuerySelector: {}
|
|
388
|
+
},
|
|
389
|
+
emits: [
|
|
390
|
+
"update:sidePanelPosition",
|
|
391
|
+
"sidePanelTransition",
|
|
392
|
+
"sidePanelAvailableStates",
|
|
393
|
+
"defaultSlotResize"
|
|
394
|
+
],
|
|
395
|
+
setup(e, { expose: t, emit: n }) {
|
|
396
|
+
let r = e, i = n, a = useSlots(), p = ref(null), m = ref(null), h = ref(null), _ = ref(0), y = ref(0), b = ref(0), x = ref(0), S = ref(0);
|
|
397
|
+
function C() {
|
|
398
|
+
let e = h.value;
|
|
399
|
+
if (!e) return;
|
|
400
|
+
let t = r.enforceSlotSizingQuerySelector ? Array.from(e.querySelectorAll(r.enforceSlotSizingQuerySelector)) : Array.from(e.children), n = `${S.value}px`;
|
|
401
|
+
t.forEach((e) => {
|
|
402
|
+
e.style.height !== n && (e.style.height = n);
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
let w = ref("none"), T = ref("none"), E = ref([]), O = ref("none"), k = ref(!0), A = ref(!1), j = {
|
|
406
|
+
sm: 640,
|
|
407
|
+
md: 768,
|
|
408
|
+
lg: 1024,
|
|
409
|
+
xl: 1280,
|
|
410
|
+
"2xl": 1536
|
|
411
|
+
}, M = computed(() => {
|
|
412
|
+
if (typeof window < "u" && r.displaySidePanelWindowFn && typeof window[r.displaySidePanelWindowFn] == "function") return !!window[r.displaySidePanelWindowFn]();
|
|
413
|
+
let e = unref(r.displaySidePanel);
|
|
414
|
+
return typeof e == "function" ? e() : !!e;
|
|
415
|
+
}), N = computed(() => !!a.sidePanelContent && M.value), P = computed(() => !!a.header), oe = computed(() => E.value.filter((e) => e !== "auto")), F = computed(() => Math.max(0, y.value - b.value)), I = computed(() => _.value < Se(r.controlsOverlayOnly)), se = computed(() => _.value === 0 ? !1 : F.value / _.value > 1.1), ce = computed(() => T.value === "right" && O.value === "wide-right" ? r.sidePanelMaxRightWide : r.sidePanelMaxRight), L = computed(() => Ce(r.mainContentAspectRatio, 16 / 9)), le = computed(() => x.value > 0 ? x.value : Math.max(1, _.value)), ue = computed(() => le.value / L.value + 20), de = computed(() => Math.max(1, _.value) / L.value), fe = computed(() => q(r.sidePanelMinBottom, _.value, y.value)), pe = computed(() => {
|
|
416
|
+
let e = de.value + fe.value;
|
|
417
|
+
return F.value >= e;
|
|
418
|
+
}), me = computed(() => Math.max(0, F.value - ue.value)), he = computed(() => {
|
|
419
|
+
if (T.value !== "bottom") return r.sidePanelMinBottom;
|
|
420
|
+
let e = q(r.sidePanelMinBottom, _.value, y.value), t = Math.min(e, R.value);
|
|
421
|
+
return `${Math.max(0, Math.floor(t))}px`;
|
|
422
|
+
}), R = computed(() => {
|
|
423
|
+
let e = q(T.value === "bottom" && O.value === "tall-bottom" ? r.sidePanelMaxBottomTall : r.sidePanelMaxBottom, _.value, y.value);
|
|
424
|
+
return Math.max(0, Math.min(e, me.value));
|
|
425
|
+
}), z = computed(() => T.value === "bottom" ? `${Math.max(0, Math.floor(R.value))}px` : r.sidePanelMaxBottom), ge = computed(() => T.value === "right" || T.value === "bottom" ? {} : T.value === "full" && !I.value ? {
|
|
426
|
+
opacity: 0,
|
|
427
|
+
pointerEvents: "none"
|
|
428
|
+
} : {}), B = computed(() => !N.value || I.value || T.value === "none" || T.value === "minimized" || T.value === "right" || T.value === "bottom" ? null : {
|
|
429
|
+
position: "absolute",
|
|
430
|
+
top: 0,
|
|
431
|
+
right: 0,
|
|
432
|
+
bottom: 0,
|
|
433
|
+
left: 0,
|
|
434
|
+
zIndex: 10,
|
|
435
|
+
pointerEvents: "none"
|
|
436
|
+
}), V = computed(() => !N.value || T.value === "none" || T.value === "full" ? { gridTemplate: "1fr / 1fr" } : T.value === "right" ? {
|
|
437
|
+
gridTemplateRows: "1fr",
|
|
438
|
+
gridTemplateColumns: `minmax(0, 1fr) max(${r.sidePanelMinRight}, ${ce.value})`
|
|
439
|
+
} : T.value === "bottom" ? {
|
|
440
|
+
gridTemplateRows: `minmax(0, 1fr) ${z.value}`,
|
|
441
|
+
gridTemplateColumns: "1fr"
|
|
442
|
+
} : T.value === "minimized" ? {
|
|
443
|
+
gridTemplateRows: "1fr max-content",
|
|
444
|
+
gridTemplateColumns: "1fr"
|
|
445
|
+
} : { gridTemplate: "1fr / 1fr" }), _e = computed(() => {
|
|
446
|
+
let e = {
|
|
447
|
+
minWidth: 0,
|
|
448
|
+
minHeight: 0,
|
|
449
|
+
width: "100%",
|
|
450
|
+
height: "100%",
|
|
451
|
+
placeSelf: "stretch",
|
|
452
|
+
zIndex: 20
|
|
453
|
+
};
|
|
454
|
+
if (N.value) {
|
|
455
|
+
if (T.value === "right") return {
|
|
456
|
+
...e,
|
|
457
|
+
gridColumn: "2 / 3",
|
|
458
|
+
gridRow: "1 / 2"
|
|
459
|
+
};
|
|
460
|
+
if (T.value === "full") return {
|
|
461
|
+
...e,
|
|
462
|
+
gridColumn: "1 / 2",
|
|
463
|
+
gridRow: "1 / 2"
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
return {
|
|
467
|
+
...e,
|
|
468
|
+
gridColumn: "1 / 2",
|
|
469
|
+
gridRow: "2 / 3"
|
|
470
|
+
};
|
|
471
|
+
}), ve = computed(() => {
|
|
472
|
+
let e = {
|
|
473
|
+
position: "fixed",
|
|
474
|
+
top: 0,
|
|
475
|
+
right: 0,
|
|
476
|
+
bottom: 0,
|
|
477
|
+
left: 0,
|
|
478
|
+
overflow: "hidden"
|
|
479
|
+
};
|
|
480
|
+
return P.value ? {
|
|
481
|
+
...e,
|
|
482
|
+
display: "grid",
|
|
483
|
+
gridTemplateRows: "auto 1fr"
|
|
484
|
+
} : {
|
|
485
|
+
...e,
|
|
486
|
+
display: "block"
|
|
487
|
+
};
|
|
488
|
+
}), ye = computed(() => P.value ? {
|
|
489
|
+
position: "relative",
|
|
490
|
+
zIndex: 0,
|
|
491
|
+
display: "grid",
|
|
492
|
+
...V.value,
|
|
493
|
+
gridRow: "2 / 3",
|
|
494
|
+
minWidth: 0,
|
|
495
|
+
minHeight: 0,
|
|
496
|
+
overflow: "hidden"
|
|
497
|
+
} : {
|
|
498
|
+
position: "absolute",
|
|
499
|
+
zIndex: 0,
|
|
500
|
+
display: "grid",
|
|
501
|
+
...V.value,
|
|
502
|
+
minWidth: 0,
|
|
503
|
+
minHeight: 0,
|
|
504
|
+
overflow: "hidden",
|
|
505
|
+
top: "0",
|
|
506
|
+
right: "0",
|
|
507
|
+
bottom: "0",
|
|
508
|
+
left: "0"
|
|
509
|
+
}), be = computed(() => !I.value || k.value), H = null, U, W, G = null, xe = "", K = !1;
|
|
510
|
+
function Se(e) {
|
|
511
|
+
let t = j[e];
|
|
512
|
+
if (t !== void 0) return t;
|
|
513
|
+
if (e.endsWith("px")) {
|
|
514
|
+
let t = Number.parseFloat(e);
|
|
515
|
+
return Number.isFinite(t) ? t : 0;
|
|
516
|
+
}
|
|
517
|
+
let n = Number.parseFloat(e);
|
|
518
|
+
return Number.isFinite(n) ? n : 0;
|
|
519
|
+
}
|
|
520
|
+
function Ce(e, t) {
|
|
521
|
+
if (typeof e == "number") return Number.isFinite(e) && e > 0 ? e : t;
|
|
522
|
+
let n = String(e).trim();
|
|
523
|
+
if (n.includes("/")) {
|
|
524
|
+
let e = n.split("/", 2), r = e[0] ?? "", i = e[1] ?? "", a = Number.parseFloat(r), o = Number.parseFloat(i);
|
|
525
|
+
return Number.isFinite(a) && Number.isFinite(o) && a > 0 && o > 0 ? a / o : t;
|
|
526
|
+
}
|
|
527
|
+
let r = Number.parseFloat(n);
|
|
528
|
+
return Number.isFinite(r) && r > 0 ? r : t;
|
|
529
|
+
}
|
|
530
|
+
function q(e, t, n) {
|
|
531
|
+
let r = e.trim();
|
|
532
|
+
if (r.endsWith("px")) {
|
|
533
|
+
let e = Number.parseFloat(r);
|
|
534
|
+
return Number.isFinite(e) ? e : 0;
|
|
535
|
+
}
|
|
536
|
+
if (r.endsWith("vh")) {
|
|
537
|
+
let e = Number.parseFloat(r);
|
|
538
|
+
return Number.isFinite(e) ? n * e / 100 : 0;
|
|
539
|
+
}
|
|
540
|
+
if (r.endsWith("vw")) {
|
|
541
|
+
let e = Number.parseFloat(r);
|
|
542
|
+
return Number.isFinite(e) ? t * e / 100 : 0;
|
|
543
|
+
}
|
|
544
|
+
let i = Number.parseFloat(r);
|
|
545
|
+
return Number.isFinite(i) ? i : 0;
|
|
546
|
+
}
|
|
547
|
+
function we() {
|
|
548
|
+
let e = Math.max(1, _.value), t = Math.max(1, F.value), n = e / t, i = e / t, a = Se(r.sidePanelBreakpoint), o = pe.value;
|
|
549
|
+
return n < r.autoBottomAspectRatioBreakpoint && o ? (O.value = "tall-bottom", {
|
|
550
|
+
states: [
|
|
551
|
+
"auto",
|
|
552
|
+
"full",
|
|
553
|
+
"bottom",
|
|
554
|
+
"minimized"
|
|
555
|
+
],
|
|
556
|
+
resolved: "bottom"
|
|
557
|
+
}) : i > r.autoRightAspectRatioBreakpoint ? (O.value = "wide-right", {
|
|
558
|
+
states: [
|
|
559
|
+
"auto",
|
|
560
|
+
"full",
|
|
561
|
+
"right",
|
|
562
|
+
"minimized"
|
|
563
|
+
],
|
|
564
|
+
resolved: "right"
|
|
565
|
+
}) : (O.value = "mixed", e >= a ? {
|
|
566
|
+
states: o ? [
|
|
567
|
+
"auto",
|
|
568
|
+
"full",
|
|
569
|
+
"bottom",
|
|
570
|
+
"right",
|
|
571
|
+
"minimized"
|
|
572
|
+
] : [
|
|
573
|
+
"auto",
|
|
574
|
+
"full",
|
|
575
|
+
"right",
|
|
576
|
+
"minimized"
|
|
577
|
+
],
|
|
578
|
+
resolved: "right"
|
|
579
|
+
} : {
|
|
580
|
+
states: [
|
|
581
|
+
"auto",
|
|
582
|
+
"full",
|
|
583
|
+
"minimized"
|
|
584
|
+
],
|
|
585
|
+
resolved: "full"
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
function Te(e, t, n) {
|
|
589
|
+
e === t || t === "none" || !N.value || i("sidePanelTransition", {
|
|
590
|
+
from: e,
|
|
591
|
+
to: t,
|
|
592
|
+
reason: n
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
function J(e = !1) {
|
|
596
|
+
let t = {
|
|
597
|
+
availableStates: N.value ? [...oe.value] : [],
|
|
598
|
+
sidePanelMode: N.value ? w.value : "none",
|
|
599
|
+
sidePanelModeResolved: N.value ? T.value : "none",
|
|
600
|
+
overlayOnly: I.value
|
|
601
|
+
};
|
|
602
|
+
if (!N.value) {
|
|
603
|
+
if (K) return;
|
|
604
|
+
K = !0, i("sidePanelAvailableStates", t);
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
K = !1;
|
|
608
|
+
let n = JSON.stringify(t);
|
|
609
|
+
!e && n === xe || (xe = n, i("sidePanelAvailableStates", t));
|
|
610
|
+
}
|
|
611
|
+
function Ee(e) {
|
|
612
|
+
let t = T.value;
|
|
613
|
+
if (!N.value) {
|
|
614
|
+
w.value = "none", T.value = "none", E.value = [], J();
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
let n = we();
|
|
618
|
+
E.value = n.states;
|
|
619
|
+
let r = w.value === "none" ? "auto" : w.value;
|
|
620
|
+
r !== "auto" && !E.value.includes(r) ? (w.value = "auto", i("update:sidePanelPosition", "auto")) : w.value = r, T.value = w.value === "auto" ? n.resolved : w.value, Te(t, T.value, e), J(A.value === !1);
|
|
621
|
+
}
|
|
622
|
+
function Y(e, t = !1) {
|
|
623
|
+
if (U &&= (clearTimeout(U), void 0), t || !A.value) {
|
|
624
|
+
Ee(e);
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
U = setTimeout(() => {
|
|
628
|
+
Ee(e);
|
|
629
|
+
}, r.layoutDebounceMs);
|
|
630
|
+
}
|
|
631
|
+
function X(e) {
|
|
632
|
+
if (!N.value) return;
|
|
633
|
+
let t = E.value.includes(e) ? e : "auto";
|
|
634
|
+
t !== w.value && (w.value = t, i("update:sidePanelPosition", t)), Y("set-side-panel-mode", !0);
|
|
635
|
+
}
|
|
636
|
+
function De() {
|
|
637
|
+
!N.value || !I.value || X("minimized");
|
|
638
|
+
}
|
|
639
|
+
function Z() {
|
|
640
|
+
W &&= (clearTimeout(W), void 0);
|
|
641
|
+
}
|
|
642
|
+
function Oe() {
|
|
643
|
+
if (Z(), !I.value || se.value || T.value === "none") {
|
|
644
|
+
k.value = !0;
|
|
645
|
+
return;
|
|
646
|
+
}
|
|
647
|
+
W = setTimeout(() => {
|
|
648
|
+
k.value = !1;
|
|
649
|
+
}, r.autoHideTimeout);
|
|
650
|
+
}
|
|
651
|
+
function Q() {
|
|
652
|
+
k.value = !0, Oe();
|
|
653
|
+
}
|
|
654
|
+
function ke() {
|
|
655
|
+
if (!p.value) return;
|
|
656
|
+
let e = [
|
|
657
|
+
"mousemove",
|
|
658
|
+
"click",
|
|
659
|
+
"scroll",
|
|
660
|
+
"keydown",
|
|
661
|
+
"touchstart"
|
|
662
|
+
], t = () => {
|
|
663
|
+
Q();
|
|
664
|
+
};
|
|
665
|
+
for (let n of e) p.value.addEventListener(n, t, { passive: !0 });
|
|
666
|
+
G = () => {
|
|
667
|
+
if (p.value) for (let n of e) p.value.removeEventListener(n, t);
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
function $() {
|
|
671
|
+
_.value = window.innerWidth, y.value = window.innerHeight, Y("viewport-resize");
|
|
672
|
+
}
|
|
673
|
+
function Ae() {
|
|
674
|
+
_.value = window.innerWidth, y.value = window.innerHeight, b.value = m.value?.offsetHeight ?? 0, x.value = h.value?.offsetWidth ?? 0, S.value = h.value?.offsetHeight ?? 0, C(), Y("manual-refresh", !0);
|
|
675
|
+
}
|
|
676
|
+
return t({ refresh: Ae }), watch(() => r.sidePanelPosition, (e) => {
|
|
677
|
+
if (!N.value) {
|
|
678
|
+
w.value = "none";
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
w.value = e, Y("prop-sync");
|
|
682
|
+
}, { immediate: !0 }), watch(N, (e) => {
|
|
683
|
+
if (!e) {
|
|
684
|
+
w.value = "none", T.value = "none", E.value = [], J();
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
w.value = r.sidePanelPosition, Y("slot-state-change", !0);
|
|
688
|
+
}, { immediate: !0 }), watch(() => [
|
|
689
|
+
I.value,
|
|
690
|
+
r.autoHideTimeout,
|
|
691
|
+
T.value
|
|
692
|
+
], () => {
|
|
693
|
+
if (T.value === "full") {
|
|
694
|
+
Oe();
|
|
695
|
+
return;
|
|
696
|
+
}
|
|
697
|
+
Q();
|
|
698
|
+
}), watch(se, (e, t) => {
|
|
699
|
+
if (e) {
|
|
700
|
+
k.value = !0, Z();
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
t && Q();
|
|
704
|
+
}), watch(() => [
|
|
705
|
+
x.value,
|
|
706
|
+
S.value,
|
|
707
|
+
T.value,
|
|
708
|
+
N.value
|
|
709
|
+
], () => {
|
|
710
|
+
!N.value || T.value === "none" || i("defaultSlotResize", {
|
|
711
|
+
width: x.value,
|
|
712
|
+
height: S.value
|
|
713
|
+
});
|
|
714
|
+
}), onMounted(async () => {
|
|
715
|
+
A.value = !0, $(), window.addEventListener("resize", $), ke(), Q(), await nextTick(), H = new ResizeObserver(() => {
|
|
716
|
+
b.value = m.value?.offsetHeight ?? 0, x.value = h.value?.offsetWidth ?? 0, S.value = h.value?.offsetHeight ?? 0, C(), Y("slot-measure");
|
|
717
|
+
}), m.value && H.observe(m.value), h.value && (H.observe(h.value), x.value = h.value.offsetWidth, S.value = h.value.offsetHeight), b.value = m.value?.offsetHeight ?? 0, Y("mounted", !0);
|
|
718
|
+
}), onBeforeUnmount(() => {
|
|
719
|
+
window.removeEventListener("resize", $), G?.(), G = null, H?.disconnect(), H = null, Z(), U &&= (clearTimeout(U), void 0);
|
|
720
|
+
}), (t, n) => (openBlock(), createElementBlock("section", {
|
|
721
|
+
ref_key: "rootRef",
|
|
722
|
+
ref: p,
|
|
723
|
+
class: "bg-black text-neutral-100",
|
|
724
|
+
style: normalizeStyle({ ...ve.value })
|
|
725
|
+
}, [P.value ? withDirectives((openBlock(), createElementBlock("header", {
|
|
726
|
+
key: 0,
|
|
727
|
+
ref_key: "headerRef",
|
|
728
|
+
ref: m,
|
|
729
|
+
class: "",
|
|
730
|
+
style: {
|
|
731
|
+
position: "relative",
|
|
732
|
+
width: "100%",
|
|
733
|
+
gridRow: "1 / 2",
|
|
734
|
+
zIndex: 40
|
|
735
|
+
}
|
|
736
|
+
}, [(openBlock(), createBlock(resolveDynamicComponent("style"), null, {
|
|
737
|
+
default: withCtx(() => [createTextVNode(" #header-outer { display: none; } @media (min-width: " + toDisplayString(r.headerHideWidthThreshold) + ") and (min-height: " + toDisplayString(r.headerHideHeightThreshold) + ") { #header-outer { display: block; } } ", 1)]),
|
|
738
|
+
_: 1
|
|
739
|
+
})), createElementVNode("div", _hoisted_1$1, [renderSlot(t.$slots, "header")])], 512)), [[vShow, be.value]]) : createCommentVNode("", !0), createElementVNode("article", {
|
|
740
|
+
class: "",
|
|
741
|
+
style: normalizeStyle({ ...ye.value })
|
|
742
|
+
}, [
|
|
743
|
+
createElementVNode("main", {
|
|
744
|
+
ref_key: "defaultRef",
|
|
745
|
+
ref: h,
|
|
746
|
+
class: "slot-content-container",
|
|
747
|
+
style: normalizeStyle({
|
|
748
|
+
position: "relative",
|
|
749
|
+
boxSizing: "border-box",
|
|
750
|
+
width: "100%",
|
|
751
|
+
height: "100%",
|
|
752
|
+
display: "grid",
|
|
753
|
+
placeItems: "stretch",
|
|
754
|
+
minHeight: 0,
|
|
755
|
+
overflow: "hidden",
|
|
756
|
+
gridColumn: "1 / 2",
|
|
757
|
+
gridRow: "1 / 2",
|
|
758
|
+
zIndex: 0,
|
|
759
|
+
...ge.value
|
|
760
|
+
})
|
|
761
|
+
}, [renderSlot(t.$slots, "default")], 4),
|
|
762
|
+
B.value ? (openBlock(), createElementBlock("div", {
|
|
763
|
+
key: 0,
|
|
764
|
+
class: "bg-black",
|
|
765
|
+
style: normalizeStyle({
|
|
766
|
+
...B.value,
|
|
767
|
+
gridColumn: "1 / 2",
|
|
768
|
+
gridRow: "1 / 2"
|
|
769
|
+
})
|
|
770
|
+
}, null, 4)) : createCommentVNode("", !0),
|
|
771
|
+
N.value && T.value !== "none" ? (openBlock(), createElementBlock("div", {
|
|
772
|
+
key: 1,
|
|
773
|
+
class: "",
|
|
774
|
+
style: normalizeStyle(_e.value)
|
|
775
|
+
}, [createVNode(SidePanelFrame_default, {
|
|
776
|
+
"side-panel-mode": w.value,
|
|
777
|
+
"side-panel-mode-resolved": T.value,
|
|
778
|
+
"available-states": oe.value,
|
|
779
|
+
"overlay-only": I.value,
|
|
780
|
+
"hide-icons": e.hideSidePanelIcons,
|
|
781
|
+
"min-width": e.sidePanelMinRight,
|
|
782
|
+
"max-width": ce.value,
|
|
783
|
+
"min-height": he.value,
|
|
784
|
+
"max-height": z.value,
|
|
785
|
+
onSetSidePanelMode: X,
|
|
786
|
+
onCloseSidePanel: De
|
|
787
|
+
}, {
|
|
788
|
+
default: withCtx(() => [renderSlot(t.$slots, "sidePanelContent")]),
|
|
789
|
+
_: 3
|
|
790
|
+
}, 8, [
|
|
791
|
+
"side-panel-mode",
|
|
792
|
+
"side-panel-mode-resolved",
|
|
793
|
+
"available-states",
|
|
794
|
+
"overlay-only",
|
|
795
|
+
"hide-icons",
|
|
796
|
+
"min-width",
|
|
797
|
+
"max-width",
|
|
798
|
+
"min-height",
|
|
799
|
+
"max-height"
|
|
800
|
+
])], 4)) : createCommentVNode("", !0)
|
|
801
|
+
], 4)], 4));
|
|
802
|
+
}
|
|
803
|
+
}), [["__scopeId", "data-v-3fd50542"]]), LoggedInOut_default = /* @__PURE__ */ defineComponent({
|
|
804
|
+
__name: "LoggedInOut",
|
|
805
|
+
props: {
|
|
806
|
+
initiallyLoggedIn: { type: Boolean },
|
|
807
|
+
addWindowAccess: {
|
|
808
|
+
type: Boolean,
|
|
809
|
+
default: !1
|
|
810
|
+
},
|
|
811
|
+
windowAccessObjectName: { default: "loggedInOut" },
|
|
812
|
+
initializeFromWindowAccessObject: {
|
|
813
|
+
type: Boolean,
|
|
814
|
+
default: !1
|
|
815
|
+
},
|
|
816
|
+
initializeWindowAccessObjectName: { default: "initialLoggedIn" },
|
|
817
|
+
waitBehavior: {
|
|
818
|
+
type: Boolean,
|
|
819
|
+
default: void 0
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
setup(e, { expose: t }) {
|
|
823
|
+
let n = e, { loggedIn: r, isInitialized: s, setToLoggedIn: u, setToLoggedOut: d, toggleLoggedIn: f, getLoggedIn: p, setLoggedIn: m, setupWindowAccess: h, cleanupWindowAccess: g } = useSimpleLoggedIn({
|
|
824
|
+
initialValue: n.initiallyLoggedIn,
|
|
825
|
+
addWindowAccess: n.addWindowAccess,
|
|
826
|
+
windowAccessObjectName: n.windowAccessObjectName,
|
|
827
|
+
initializeFromWindowAccessObject: n.initializeFromWindowAccessObject,
|
|
828
|
+
initializeWindowAccessObjectName: n.initializeWindowAccessObjectName
|
|
829
|
+
}), _ = computed(() => n.waitBehavior === void 0 ? n.initializeFromWindowAccessObject : n.waitBehavior);
|
|
830
|
+
return onMounted(() => {
|
|
831
|
+
n.addWindowAccess && h(n.windowAccessObjectName);
|
|
832
|
+
}), onUnmounted(() => {
|
|
833
|
+
g(n.windowAccessObjectName);
|
|
834
|
+
}), watch(() => n.addWindowAccess, (e) => {
|
|
835
|
+
e ? h(n.windowAccessObjectName) : g(n.windowAccessObjectName);
|
|
836
|
+
}), watch(() => n.windowAccessObjectName, (e, t) => {
|
|
837
|
+
n.addWindowAccess && (t && g(t), h(n.windowAccessObjectName));
|
|
838
|
+
}), t({
|
|
839
|
+
loggedIn: r,
|
|
840
|
+
setToLoggedIn: u,
|
|
841
|
+
setToLoggedOut: d,
|
|
842
|
+
toggleLoggedIn: f,
|
|
843
|
+
getLoggedIn: p,
|
|
844
|
+
setLoggedIn: m
|
|
845
|
+
}), (e, t) => !_.value || unref(s) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [unref(r) ? renderSlot(e.$slots, "loggedIn", { key: 0 }) : renderSlot(e.$slots, "loggedOut", { key: 1 })], 64)) : createCommentVNode("", !0);
|
|
846
|
+
}
|
|
847
|
+
}), VanillaIf_default = /* @__PURE__ */ defineComponent({
|
|
848
|
+
__name: "VanillaIf",
|
|
849
|
+
props: {
|
|
850
|
+
show: { type: [
|
|
851
|
+
Boolean,
|
|
852
|
+
Function,
|
|
853
|
+
Object
|
|
854
|
+
] },
|
|
855
|
+
showWindowFn: {}
|
|
856
|
+
},
|
|
857
|
+
setup(e) {
|
|
858
|
+
let t = e, n = ref(!1), r = ref(!1), i = null;
|
|
859
|
+
function o() {
|
|
860
|
+
i &&= (clearInterval(i), null);
|
|
861
|
+
}
|
|
862
|
+
function s() {
|
|
863
|
+
let e;
|
|
864
|
+
if (e = typeof window < "u" && t.showWindowFn ? window[t.showWindowFn] : unref(t.show), typeof e == "function") try {
|
|
865
|
+
let t = e();
|
|
866
|
+
return typeof t == "boolean" ? {
|
|
867
|
+
ready: !0,
|
|
868
|
+
value: t
|
|
869
|
+
} : {
|
|
870
|
+
ready: !1,
|
|
871
|
+
value: !1
|
|
872
|
+
};
|
|
873
|
+
} catch (e) {
|
|
874
|
+
if (e instanceof ReferenceError || e instanceof TypeError) return {
|
|
875
|
+
ready: !1,
|
|
876
|
+
value: !1
|
|
877
|
+
};
|
|
878
|
+
throw e;
|
|
879
|
+
}
|
|
880
|
+
return t.showWindowFn ? {
|
|
881
|
+
ready: !1,
|
|
882
|
+
value: !1
|
|
883
|
+
} : typeof e == "boolean" ? {
|
|
884
|
+
ready: !0,
|
|
885
|
+
value: e
|
|
886
|
+
} : e == null ? {
|
|
887
|
+
ready: !1,
|
|
888
|
+
value: !1
|
|
889
|
+
} : {
|
|
890
|
+
ready: !0,
|
|
891
|
+
value: !!e
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
function u() {
|
|
895
|
+
let { ready: e, value: t } = s();
|
|
896
|
+
e ? (r.value = t, n.value = !0, o()) : i ||= setInterval(() => {
|
|
897
|
+
let e = s();
|
|
898
|
+
e.ready && (r.value = e.value, n.value = !0, o());
|
|
899
|
+
}, 50);
|
|
900
|
+
}
|
|
901
|
+
let d = s();
|
|
902
|
+
return d.ready && (n.value = !0, r.value = d.value), watch(() => [t.show, t.showWindowFn], () => {
|
|
903
|
+
n.value = !1, o(), u();
|
|
904
|
+
}, { deep: !0 }), onMounted(() => {
|
|
905
|
+
n.value || u();
|
|
906
|
+
}), onUnmounted(() => {
|
|
907
|
+
o();
|
|
908
|
+
}), (e, t) => n.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [r.value ? renderSlot(e.$slots, "default", { key: 0 }) : renderSlot(e.$slots, "else", { key: 1 })], 64)) : createCommentVNode("", !0);
|
|
909
|
+
}
|
|
910
|
+
}), suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/, suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/, JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
|
|
911
|
+
function jsonParseTransform(e, t) {
|
|
912
|
+
if (e === "__proto__" || e === "constructor" && t && typeof t == "object" && "prototype" in t) {
|
|
913
|
+
warnKeyDropped(e);
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
return t;
|
|
917
|
+
}
|
|
918
|
+
function warnKeyDropped(e) {
|
|
919
|
+
console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`);
|
|
920
|
+
}
|
|
921
|
+
function destr(e, t = {}) {
|
|
922
|
+
if (typeof e != "string") return e;
|
|
923
|
+
if (e[0] === "\"" && e[e.length - 1] === "\"" && e.indexOf("\\") === -1) return e.slice(1, -1);
|
|
924
|
+
let n = e.trim();
|
|
925
|
+
if (n.length <= 9) switch (n.toLowerCase()) {
|
|
926
|
+
case "true": return !0;
|
|
927
|
+
case "false": return !1;
|
|
928
|
+
case "undefined": return;
|
|
929
|
+
case "null": return null;
|
|
930
|
+
case "nan": return NaN;
|
|
931
|
+
case "infinity": return Infinity;
|
|
932
|
+
case "-infinity": return -Infinity;
|
|
933
|
+
}
|
|
934
|
+
if (!JsonSigRx.test(e)) {
|
|
935
|
+
if (t.strict) throw SyntaxError("[destr] Invalid JSON");
|
|
936
|
+
return e;
|
|
937
|
+
}
|
|
938
|
+
try {
|
|
939
|
+
if (suspectProtoRx.test(e) || suspectConstructorRx.test(e)) {
|
|
940
|
+
if (t.strict) throw Error("[destr] Possible prototype pollution");
|
|
941
|
+
return JSON.parse(e, jsonParseTransform);
|
|
942
|
+
}
|
|
943
|
+
return JSON.parse(e);
|
|
944
|
+
} catch (n) {
|
|
945
|
+
if (t.strict) throw n;
|
|
946
|
+
return e;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
String.fromCharCode;
|
|
950
|
+
var HASH_RE = /#/g, AMPERSAND_RE = /&/g, SLASH_RE = /\//g, EQUAL_RE = /=/g, PLUS_RE = /\+/g, ENC_CARET_RE = /%5e/gi, ENC_BACKTICK_RE = /%60/gi, ENC_PIPE_RE = /%7c/gi, ENC_SPACE_RE = /%20/gi;
|
|
951
|
+
function encode(e) {
|
|
952
|
+
return encodeURI("" + e).replace(ENC_PIPE_RE, "|");
|
|
953
|
+
}
|
|
954
|
+
function encodeQueryValue(e) {
|
|
955
|
+
return encode(typeof e == "string" ? e : JSON.stringify(e)).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CARET_RE, "^").replace(SLASH_RE, "%2F");
|
|
956
|
+
}
|
|
957
|
+
function encodeQueryKey(e) {
|
|
958
|
+
return encodeQueryValue(e).replace(EQUAL_RE, "%3D");
|
|
959
|
+
}
|
|
960
|
+
function decode(e = "") {
|
|
961
|
+
try {
|
|
962
|
+
return decodeURIComponent("" + e);
|
|
963
|
+
} catch {
|
|
964
|
+
return "" + e;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
function decodeQueryKey(e) {
|
|
968
|
+
return decode(e.replace(PLUS_RE, " "));
|
|
969
|
+
}
|
|
970
|
+
function decodeQueryValue(e) {
|
|
971
|
+
return decode(e.replace(PLUS_RE, " "));
|
|
972
|
+
}
|
|
973
|
+
function parseQuery(e = "") {
|
|
974
|
+
let t = /* @__PURE__ */ Object.create(null);
|
|
975
|
+
e[0] === "?" && (e = e.slice(1));
|
|
976
|
+
for (let n of e.split("&")) {
|
|
977
|
+
let e = n.match(/([^=]+)=?(.*)/) || [];
|
|
978
|
+
if (e.length < 2) continue;
|
|
979
|
+
let r = decodeQueryKey(e[1]);
|
|
980
|
+
if (r === "__proto__" || r === "constructor") continue;
|
|
981
|
+
let i = decodeQueryValue(e[2] || "");
|
|
982
|
+
t[r] === void 0 ? t[r] = i : Array.isArray(t[r]) ? t[r].push(i) : t[r] = [t[r], i];
|
|
983
|
+
}
|
|
984
|
+
return t;
|
|
985
|
+
}
|
|
986
|
+
function encodeQueryItem(e, t) {
|
|
987
|
+
return (typeof t == "number" || typeof t == "boolean") && (t = String(t)), t ? Array.isArray(t) ? t.map((t) => `${encodeQueryKey(e)}=${encodeQueryValue(t)}`).join("&") : `${encodeQueryKey(e)}=${encodeQueryValue(t)}` : encodeQueryKey(e);
|
|
988
|
+
}
|
|
989
|
+
function stringifyQuery(e) {
|
|
990
|
+
return Object.keys(e).filter((t) => e[t] !== void 0).map((t) => encodeQueryItem(t, e[t])).filter(Boolean).join("&");
|
|
991
|
+
}
|
|
992
|
+
var PROTOCOL_STRICT_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/, PROTOCOL_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{2})?/, PROTOCOL_RELATIVE_REGEX = /^([/\\]\s*){2,}[^/\\]/, TRAILING_SLASH_RE = /\/$|\/\?|\/#/, JOIN_LEADING_SLASH_RE = /^\.?\//;
|
|
993
|
+
function hasProtocol(e, t = {}) {
|
|
994
|
+
return typeof t == "boolean" && (t = { acceptRelative: t }), t.strict ? PROTOCOL_STRICT_REGEX.test(e) : PROTOCOL_REGEX.test(e) || (t.acceptRelative ? PROTOCOL_RELATIVE_REGEX.test(e) : !1);
|
|
995
|
+
}
|
|
996
|
+
function hasTrailingSlash(e = "", t) {
|
|
997
|
+
return t ? TRAILING_SLASH_RE.test(e) : e.endsWith("/");
|
|
998
|
+
}
|
|
999
|
+
function withoutTrailingSlash(e = "", t) {
|
|
1000
|
+
if (!t) return (hasTrailingSlash(e) ? e.slice(0, -1) : e) || "/";
|
|
1001
|
+
if (!hasTrailingSlash(e, !0)) return e || "/";
|
|
1002
|
+
let n = e, r = "", i = e.indexOf("#");
|
|
1003
|
+
i !== -1 && (n = e.slice(0, i), r = e.slice(i));
|
|
1004
|
+
let [a, ...o] = n.split("?");
|
|
1005
|
+
return ((a.endsWith("/") ? a.slice(0, -1) : a) || "/") + (o.length > 0 ? `?${o.join("?")}` : "") + r;
|
|
1006
|
+
}
|
|
1007
|
+
function withTrailingSlash(e = "", t) {
|
|
1008
|
+
if (!t) return e.endsWith("/") ? e : e + "/";
|
|
1009
|
+
if (hasTrailingSlash(e, !0)) return e || "/";
|
|
1010
|
+
let n = e, r = "", i = e.indexOf("#");
|
|
1011
|
+
if (i !== -1 && (n = e.slice(0, i), r = e.slice(i), !n)) return r;
|
|
1012
|
+
let [a, ...o] = n.split("?");
|
|
1013
|
+
return a + "/" + (o.length > 0 ? `?${o.join("?")}` : "") + r;
|
|
1014
|
+
}
|
|
1015
|
+
function withBase(e, t) {
|
|
1016
|
+
if (isEmptyURL(t) || hasProtocol(e)) return e;
|
|
1017
|
+
let n = withoutTrailingSlash(t);
|
|
1018
|
+
if (e.startsWith(n)) {
|
|
1019
|
+
let t = e[n.length];
|
|
1020
|
+
if (!t || t === "/" || t === "?") return e;
|
|
1021
|
+
}
|
|
1022
|
+
return joinURL(n, e);
|
|
1023
|
+
}
|
|
1024
|
+
function withQuery(e, t) {
|
|
1025
|
+
let n = parseURL(e);
|
|
1026
|
+
return n.search = stringifyQuery({
|
|
1027
|
+
...parseQuery(n.search),
|
|
1028
|
+
...t
|
|
1029
|
+
}), stringifyParsedURL(n);
|
|
1030
|
+
}
|
|
1031
|
+
function isEmptyURL(e) {
|
|
1032
|
+
return !e || e === "/";
|
|
1033
|
+
}
|
|
1034
|
+
function isNonEmptyURL(e) {
|
|
1035
|
+
return e && e !== "/";
|
|
1036
|
+
}
|
|
1037
|
+
function joinURL(e, ...t) {
|
|
1038
|
+
let n = e || "";
|
|
1039
|
+
for (let e of t.filter((e) => isNonEmptyURL(e))) if (n) {
|
|
1040
|
+
let t = e.replace(JOIN_LEADING_SLASH_RE, "");
|
|
1041
|
+
n = withTrailingSlash(n) + t;
|
|
1042
|
+
} else n = e;
|
|
1043
|
+
return n;
|
|
1044
|
+
}
|
|
1045
|
+
var protocolRelative = Symbol.for("ufo:protocolRelative");
|
|
1046
|
+
function parseURL(e = "", t) {
|
|
1047
|
+
let n = e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);
|
|
1048
|
+
if (n) {
|
|
1049
|
+
let [, e, t = ""] = n;
|
|
1050
|
+
return {
|
|
1051
|
+
protocol: e.toLowerCase(),
|
|
1052
|
+
pathname: t,
|
|
1053
|
+
href: e + t,
|
|
1054
|
+
auth: "",
|
|
1055
|
+
host: "",
|
|
1056
|
+
search: "",
|
|
1057
|
+
hash: ""
|
|
1058
|
+
};
|
|
1059
|
+
}
|
|
1060
|
+
if (!hasProtocol(e, { acceptRelative: !0 })) return t ? parseURL(t + e) : parsePath(e);
|
|
1061
|
+
let [, r = "", i, a = ""] = e.replace(/\\/g, "/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/) || [], [, o = "", s = ""] = a.match(/([^#/?]*)(.*)?/) || [];
|
|
1062
|
+
r === "file:" && (s = s.replace(/\/(?=[A-Za-z]:)/, ""));
|
|
1063
|
+
let { pathname: c, search: l, hash: u } = parsePath(s);
|
|
1064
|
+
return {
|
|
1065
|
+
protocol: r.toLowerCase(),
|
|
1066
|
+
auth: i ? i.slice(0, Math.max(0, i.length - 1)) : "",
|
|
1067
|
+
host: o,
|
|
1068
|
+
pathname: c,
|
|
1069
|
+
search: l,
|
|
1070
|
+
hash: u,
|
|
1071
|
+
[protocolRelative]: !r
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
function parsePath(e = "") {
|
|
1075
|
+
let [t = "", n = "", r = ""] = (e.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
|
|
1076
|
+
return {
|
|
1077
|
+
pathname: t,
|
|
1078
|
+
search: n,
|
|
1079
|
+
hash: r
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
function stringifyParsedURL(e) {
|
|
1083
|
+
let t = e.pathname || "", n = e.search ? (e.search.startsWith("?") ? "" : "?") + e.search : "", r = e.hash || "", i = e.auth ? e.auth + "@" : "", a = e.host || "";
|
|
1084
|
+
return (e.protocol || e[protocolRelative] ? (e.protocol || "") + "//" : "") + i + a + t + n + r;
|
|
1085
|
+
}
|
|
1086
|
+
var FetchError = class extends Error {
|
|
1087
|
+
constructor(e, t) {
|
|
1088
|
+
super(e, t), this.name = "FetchError", t?.cause && !this.cause && (this.cause = t.cause);
|
|
1089
|
+
}
|
|
1090
|
+
};
|
|
1091
|
+
function createFetchError(e) {
|
|
1092
|
+
let t = e.error?.message || e.error?.toString() || "", n = e.request?.method || e.options?.method || "GET", r = e.request?.url || String(e.request) || "/", i = new FetchError(`${`[${n}] ${JSON.stringify(r)}`}: ${e.response ? `${e.response.status} ${e.response.statusText}` : "<no response>"}${t ? ` ${t}` : ""}`, e.error ? { cause: e.error } : void 0);
|
|
1093
|
+
for (let t of [
|
|
1094
|
+
"request",
|
|
1095
|
+
"options",
|
|
1096
|
+
"response"
|
|
1097
|
+
]) Object.defineProperty(i, t, { get() {
|
|
1098
|
+
return e[t];
|
|
1099
|
+
} });
|
|
1100
|
+
for (let [t, n] of [
|
|
1101
|
+
["data", "_data"],
|
|
1102
|
+
["status", "status"],
|
|
1103
|
+
["statusCode", "status"],
|
|
1104
|
+
["statusText", "statusText"],
|
|
1105
|
+
["statusMessage", "statusText"]
|
|
1106
|
+
]) Object.defineProperty(i, t, { get() {
|
|
1107
|
+
return e.response && e.response[n];
|
|
1108
|
+
} });
|
|
1109
|
+
return i;
|
|
1110
|
+
}
|
|
1111
|
+
var payloadMethods = new Set(Object.freeze([
|
|
1112
|
+
"PATCH",
|
|
1113
|
+
"POST",
|
|
1114
|
+
"PUT",
|
|
1115
|
+
"DELETE"
|
|
1116
|
+
]));
|
|
1117
|
+
function isPayloadMethod(e = "GET") {
|
|
1118
|
+
return payloadMethods.has(e.toUpperCase());
|
|
1119
|
+
}
|
|
1120
|
+
function isJSONSerializable(e) {
|
|
1121
|
+
if (e === void 0) return !1;
|
|
1122
|
+
let t = typeof e;
|
|
1123
|
+
return t === "string" || t === "number" || t === "boolean" || t === null ? !0 : t === "object" ? Array.isArray(e) ? !0 : e.buffer || e instanceof FormData || e instanceof URLSearchParams ? !1 : e.constructor && e.constructor.name === "Object" || typeof e.toJSON == "function" : !1;
|
|
1124
|
+
}
|
|
1125
|
+
var textTypes = /* @__PURE__ */ new Set([
|
|
1126
|
+
"image/svg",
|
|
1127
|
+
"application/xml",
|
|
1128
|
+
"application/xhtml",
|
|
1129
|
+
"application/html"
|
|
1130
|
+
]), JSON_RE = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
|
|
1131
|
+
function detectResponseType(e = "") {
|
|
1132
|
+
if (!e) return "json";
|
|
1133
|
+
let t = e.split(";").shift() || "";
|
|
1134
|
+
return JSON_RE.test(t) ? "json" : t === "text/event-stream" ? "stream" : textTypes.has(t) || t.startsWith("text/") ? "text" : "blob";
|
|
1135
|
+
}
|
|
1136
|
+
function resolveFetchOptions(e, t, n, r) {
|
|
1137
|
+
let i = mergeHeaders(t?.headers ?? e?.headers, n?.headers, r), a;
|
|
1138
|
+
return (n?.query || n?.params || t?.params || t?.query) && (a = {
|
|
1139
|
+
...n?.params,
|
|
1140
|
+
...n?.query,
|
|
1141
|
+
...t?.params,
|
|
1142
|
+
...t?.query
|
|
1143
|
+
}), {
|
|
1144
|
+
...n,
|
|
1145
|
+
...t,
|
|
1146
|
+
query: a,
|
|
1147
|
+
params: a,
|
|
1148
|
+
headers: i
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
function mergeHeaders(e, t, n) {
|
|
1152
|
+
if (!t) return new n(e);
|
|
1153
|
+
let r = new n(t);
|
|
1154
|
+
if (e) for (let [t, i] of Symbol.iterator in e || Array.isArray(e) ? e : new n(e)) r.set(t, i);
|
|
1155
|
+
return r;
|
|
1156
|
+
}
|
|
1157
|
+
async function callHooks(e, t) {
|
|
1158
|
+
if (t) if (Array.isArray(t)) for (let n of t) await n(e);
|
|
1159
|
+
else await t(e);
|
|
1160
|
+
}
|
|
1161
|
+
var retryStatusCodes = /* @__PURE__ */ new Set([
|
|
1162
|
+
408,
|
|
1163
|
+
409,
|
|
1164
|
+
425,
|
|
1165
|
+
429,
|
|
1166
|
+
500,
|
|
1167
|
+
502,
|
|
1168
|
+
503,
|
|
1169
|
+
504
|
|
1170
|
+
]), nullBodyResponses = /* @__PURE__ */ new Set([
|
|
1171
|
+
101,
|
|
1172
|
+
204,
|
|
1173
|
+
205,
|
|
1174
|
+
304
|
|
1175
|
+
]);
|
|
1176
|
+
function createFetch(e = {}) {
|
|
1177
|
+
let { fetch: t = globalThis.fetch, Headers: n = globalThis.Headers, AbortController: r = globalThis.AbortController } = e;
|
|
1178
|
+
async function i(e) {
|
|
1179
|
+
let t = e.error && e.error.name === "AbortError" && !e.options.timeout || !1;
|
|
1180
|
+
if (e.options.retry !== !1 && !t) {
|
|
1181
|
+
let t;
|
|
1182
|
+
t = typeof e.options.retry == "number" ? e.options.retry : isPayloadMethod(e.options.method) ? 0 : 1;
|
|
1183
|
+
let n = e.response && e.response.status || 500;
|
|
1184
|
+
if (t > 0 && (Array.isArray(e.options.retryStatusCodes) ? e.options.retryStatusCodes.includes(n) : retryStatusCodes.has(n))) {
|
|
1185
|
+
let n = typeof e.options.retryDelay == "function" ? e.options.retryDelay(e) : e.options.retryDelay || 0;
|
|
1186
|
+
return n > 0 && await new Promise((e) => setTimeout(e, n)), a(e.request, {
|
|
1187
|
+
...e.options,
|
|
1188
|
+
retry: t - 1
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
let n = createFetchError(e);
|
|
1193
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, a), n;
|
|
1194
|
+
}
|
|
1195
|
+
let a = async function(a, o = {}) {
|
|
1196
|
+
let s = {
|
|
1197
|
+
request: a,
|
|
1198
|
+
options: resolveFetchOptions(a, o, e.defaults, n),
|
|
1199
|
+
response: void 0,
|
|
1200
|
+
error: void 0
|
|
1201
|
+
};
|
|
1202
|
+
if (s.options.method && (s.options.method = s.options.method.toUpperCase()), s.options.onRequest && (await callHooks(s, s.options.onRequest), s.options.headers instanceof n || (s.options.headers = new n(s.options.headers || {}))), typeof s.request == "string" && (s.options.baseURL && (s.request = withBase(s.request, s.options.baseURL)), s.options.query && (s.request = withQuery(s.request, s.options.query), delete s.options.query), "query" in s.options && delete s.options.query, "params" in s.options && delete s.options.params), s.options.body && isPayloadMethod(s.options.method)) if (isJSONSerializable(s.options.body)) {
|
|
1203
|
+
let e = s.options.headers.get("content-type");
|
|
1204
|
+
typeof s.options.body != "string" && (s.options.body = e === "application/x-www-form-urlencoded" ? new URLSearchParams(s.options.body).toString() : JSON.stringify(s.options.body)), e || s.options.headers.set("content-type", "application/json"), s.options.headers.has("accept") || s.options.headers.set("accept", "application/json");
|
|
1205
|
+
} else ("pipeTo" in s.options.body && typeof s.options.body.pipeTo == "function" || typeof s.options.body.pipe == "function") && ("duplex" in s.options || (s.options.duplex = "half"));
|
|
1206
|
+
let c;
|
|
1207
|
+
if (!s.options.signal && s.options.timeout) {
|
|
1208
|
+
let e = new r();
|
|
1209
|
+
c = setTimeout(() => {
|
|
1210
|
+
let t = /* @__PURE__ */ Error("[TimeoutError]: The operation was aborted due to timeout");
|
|
1211
|
+
t.name = "TimeoutError", t.code = 23, e.abort(t);
|
|
1212
|
+
}, s.options.timeout), s.options.signal = e.signal;
|
|
1213
|
+
}
|
|
1214
|
+
try {
|
|
1215
|
+
s.response = await t(s.request, s.options);
|
|
1216
|
+
} catch (e) {
|
|
1217
|
+
return s.error = e, s.options.onRequestError && await callHooks(s, s.options.onRequestError), await i(s);
|
|
1218
|
+
} finally {
|
|
1219
|
+
c && clearTimeout(c);
|
|
1220
|
+
}
|
|
1221
|
+
if ((s.response.body || s.response._bodyInit) && !nullBodyResponses.has(s.response.status) && s.options.method !== "HEAD") {
|
|
1222
|
+
let e = (s.options.parseResponse ? "json" : s.options.responseType) || detectResponseType(s.response.headers.get("content-type") || "");
|
|
1223
|
+
switch (e) {
|
|
1224
|
+
case "json": {
|
|
1225
|
+
let e = await s.response.text(), t = s.options.parseResponse || destr;
|
|
1226
|
+
s.response._data = t(e);
|
|
1227
|
+
break;
|
|
1228
|
+
}
|
|
1229
|
+
case "stream":
|
|
1230
|
+
s.response._data = s.response.body || s.response._bodyInit;
|
|
1231
|
+
break;
|
|
1232
|
+
default: s.response._data = await s.response[e]();
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
return s.options.onResponse && await callHooks(s, s.options.onResponse), !s.options.ignoreResponseError && s.response.status >= 400 && s.response.status < 600 ? (s.options.onResponseError && await callHooks(s, s.options.onResponseError), await i(s)) : s.response;
|
|
1236
|
+
}, o = async function(e, t) {
|
|
1237
|
+
return (await a(e, t))._data;
|
|
1238
|
+
};
|
|
1239
|
+
return o.raw = a, o.native = (...e) => t(...e), o.create = (t = {}, n = {}) => createFetch({
|
|
1240
|
+
...e,
|
|
1241
|
+
...n,
|
|
1242
|
+
defaults: {
|
|
1243
|
+
...e.defaults,
|
|
1244
|
+
...n.defaults,
|
|
1245
|
+
...t
|
|
1246
|
+
}
|
|
1247
|
+
}), o;
|
|
1248
|
+
}
|
|
1249
|
+
var _globalThis = (function() {
|
|
1250
|
+
if (typeof globalThis < "u") return globalThis;
|
|
1251
|
+
if (typeof self < "u") return self;
|
|
1252
|
+
if (typeof window < "u") return window;
|
|
1253
|
+
if (typeof global < "u") return global;
|
|
1254
|
+
throw Error("unable to locate global object");
|
|
1255
|
+
})(), fetch = _globalThis.fetch ? (...e) => _globalThis.fetch(...e) : () => Promise.reject(/* @__PURE__ */ Error("[ofetch] global.fetch is not supported!")), Headers$1 = _globalThis.Headers, AbortController$1 = _globalThis.AbortController, ofetch = createFetch({
|
|
1256
|
+
fetch,
|
|
1257
|
+
Headers: Headers$1,
|
|
1258
|
+
AbortController: AbortController$1
|
|
1259
|
+
});
|
|
1260
|
+
function tryOnScopeDispose(e, t) {
|
|
1261
|
+
return getCurrentScope() ? (onScopeDispose(e, t), !0) : !1;
|
|
1262
|
+
}
|
|
1263
|
+
var isClient = typeof window < "u" && typeof document < "u";
|
|
1264
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1265
|
+
var toString = Object.prototype.toString, isObject = (e) => toString.call(e) === "[object Object]";
|
|
1266
|
+
function createSingletonPromise(e) {
|
|
1267
|
+
let t;
|
|
1268
|
+
function n() {
|
|
1269
|
+
return t ||= e(), t;
|
|
1270
|
+
}
|
|
1271
|
+
return n.reset = async () => {
|
|
1272
|
+
let e = t;
|
|
1273
|
+
t = void 0, e && await e;
|
|
1274
|
+
}, n;
|
|
1275
|
+
}
|
|
1276
|
+
function toArray(e) {
|
|
1277
|
+
return Array.isArray(e) ? e : [e];
|
|
1278
|
+
}
|
|
1279
|
+
function useTimeoutFn(e, t, n = {}) {
|
|
1280
|
+
let { immediate: r = !0, immediateCallback: i = !1 } = n, a = shallowRef(!1), o;
|
|
1281
|
+
function s() {
|
|
1282
|
+
o &&= (clearTimeout(o), void 0);
|
|
1283
|
+
}
|
|
1284
|
+
function c() {
|
|
1285
|
+
a.value = !1, s();
|
|
1286
|
+
}
|
|
1287
|
+
function l(...n) {
|
|
1288
|
+
i && e(), s(), a.value = !0, o = setTimeout(() => {
|
|
1289
|
+
a.value = !1, o = void 0, e(...n);
|
|
1290
|
+
}, toValue(t));
|
|
1291
|
+
}
|
|
1292
|
+
return r && (a.value = !0, isClient && l()), tryOnScopeDispose(c), {
|
|
1293
|
+
isPending: shallowReadonly(a),
|
|
1294
|
+
start: l,
|
|
1295
|
+
stop: c
|
|
1296
|
+
};
|
|
1297
|
+
}
|
|
1298
|
+
function watchImmediate(e, t, n) {
|
|
1299
|
+
return watch(e, t, {
|
|
1300
|
+
...n,
|
|
1301
|
+
immediate: !0
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
1304
|
+
var defaultWindow = isClient ? window : void 0;
|
|
1305
|
+
isClient && window.document;
|
|
1306
|
+
var defaultNavigator = isClient ? window.navigator : void 0;
|
|
1307
|
+
isClient && window.location;
|
|
1308
|
+
function unrefElement(e) {
|
|
1309
|
+
let t = toValue(e);
|
|
1310
|
+
return t?.$el ?? t;
|
|
1311
|
+
}
|
|
1312
|
+
function useEventListener(...e) {
|
|
1313
|
+
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = computed(() => {
|
|
1314
|
+
let t = toArray(toValue(e[0])).filter((e) => e != null);
|
|
1315
|
+
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
1316
|
+
});
|
|
1317
|
+
return watchImmediate(() => [
|
|
1318
|
+
n.value?.map((e) => unrefElement(e)) ?? [defaultWindow].filter((e) => e != null),
|
|
1319
|
+
toArray(toValue(n.value ? e[1] : e[0])),
|
|
1320
|
+
toArray(unref(n.value ? e[2] : e[1])),
|
|
1321
|
+
toValue(n.value ? e[3] : e[2])
|
|
1322
|
+
], ([e, n, r, i], a, o) => {
|
|
1323
|
+
if (!e?.length || !n?.length || !r?.length) return;
|
|
1324
|
+
let s = isObject(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
1325
|
+
o(() => {
|
|
1326
|
+
c.forEach((e) => e());
|
|
1327
|
+
});
|
|
1328
|
+
}, { flush: "post" });
|
|
1329
|
+
}
|
|
1330
|
+
function useMounted() {
|
|
1331
|
+
let e = shallowRef(!1), t = getCurrentInstance();
|
|
1332
|
+
return t && onMounted(() => {
|
|
1333
|
+
e.value = !0;
|
|
1334
|
+
}, t), e;
|
|
1335
|
+
}
|
|
1336
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1337
|
+
function useSupported(e) {
|
|
1338
|
+
let t = useMounted();
|
|
1339
|
+
return computed(() => (t.value, !!e()));
|
|
1340
|
+
}
|
|
1341
|
+
function usePermission(e, t = {}) {
|
|
1342
|
+
let { controls: n = !1, navigator: r = defaultNavigator } = t, i = /* @__PURE__ */ useSupported(() => r && "permissions" in r), a = shallowRef(), o = typeof e == "string" ? { name: e } : e, s = shallowRef(), c = () => {
|
|
1343
|
+
s.value = a.value?.state ?? "prompt";
|
|
1344
|
+
};
|
|
1345
|
+
useEventListener(a, "change", c, { passive: !0 });
|
|
1346
|
+
let l = createSingletonPromise(async () => {
|
|
1347
|
+
if (i.value) {
|
|
1348
|
+
if (!a.value) try {
|
|
1349
|
+
a.value = await r.permissions.query(o);
|
|
1350
|
+
} catch {
|
|
1351
|
+
a.value = void 0;
|
|
1352
|
+
} finally {
|
|
1353
|
+
c();
|
|
1354
|
+
}
|
|
1355
|
+
if (n) return toRaw(a.value);
|
|
1356
|
+
}
|
|
1357
|
+
});
|
|
1358
|
+
return l(), n ? {
|
|
1359
|
+
state: s,
|
|
1360
|
+
isSupported: i,
|
|
1361
|
+
query: l
|
|
1362
|
+
} : s;
|
|
1363
|
+
}
|
|
1364
|
+
function useClipboard(e = {}) {
|
|
1365
|
+
let { navigator: t = defaultNavigator, read: n = !1, source: r, copiedDuring: i = 1500, legacy: a = !1 } = e, s = /* @__PURE__ */ useSupported(() => t && "clipboard" in t), c = usePermission("clipboard-read"), l = usePermission("clipboard-write"), u = computed(() => s.value || a), d = shallowRef(""), f = shallowRef(!1), p = useTimeoutFn(() => f.value = !1, i, { immediate: !1 });
|
|
1366
|
+
async function m() {
|
|
1367
|
+
let e = !(s.value && v(c.value));
|
|
1368
|
+
if (!e) try {
|
|
1369
|
+
d.value = await t.clipboard.readText();
|
|
1370
|
+
} catch {
|
|
1371
|
+
e = !0;
|
|
1372
|
+
}
|
|
1373
|
+
e && (d.value = _());
|
|
1374
|
+
}
|
|
1375
|
+
u.value && n && useEventListener(["copy", "cut"], m, { passive: !0 });
|
|
1376
|
+
async function h(e = toValue(r)) {
|
|
1377
|
+
if (u.value && e != null) {
|
|
1378
|
+
let n = !(s.value && v(l.value));
|
|
1379
|
+
if (!n) try {
|
|
1380
|
+
await t.clipboard.writeText(e);
|
|
1381
|
+
} catch {
|
|
1382
|
+
n = !0;
|
|
1383
|
+
}
|
|
1384
|
+
n && g(e), d.value = e, f.value = !0, p.start();
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
function g(e) {
|
|
1388
|
+
let t = document.createElement("textarea");
|
|
1389
|
+
t.value = e, t.style.position = "absolute", t.style.opacity = "0", t.setAttribute("readonly", ""), document.body.appendChild(t), t.select(), document.execCommand("copy"), t.remove();
|
|
1390
|
+
}
|
|
1391
|
+
function _() {
|
|
1392
|
+
var e, t;
|
|
1393
|
+
return ((e = document) == null || (t = e.getSelection) == null || (t = t.call(e)) == null ? void 0 : t.toString()) ?? "";
|
|
1394
|
+
}
|
|
1395
|
+
function v(e) {
|
|
1396
|
+
return e === "granted" || e === "prompt";
|
|
1397
|
+
}
|
|
1398
|
+
return {
|
|
1399
|
+
isSupported: u,
|
|
1400
|
+
text: readonly(d),
|
|
1401
|
+
copied: readonly(f),
|
|
1402
|
+
copy: h
|
|
1403
|
+
};
|
|
1404
|
+
}
|
|
1405
|
+
var _hoisted_1 = { class: "border border-neutral-300 rounded-lg bg-white shadow-sm grid grid-rows-[min-content_auto_min-content] overflow-hidden" }, _hoisted_2 = { class: "flex items-center justify-between px-3 py-1 bg-neutral-900 border-b border-neutral-800" }, _hoisted_3 = { class: "px-2 py-0.5 bg-neutral-800 text-neutral-300 font-mono text-[10px] uppercase font-bold rounded" }, _hoisted_4 = {
|
|
1406
|
+
key: 0,
|
|
1407
|
+
class: "flex items-center gap-2"
|
|
1408
|
+
}, _hoisted_5 = { class: "flex items-center gap-4 px-4 py-3 bg-white" }, _hoisted_6 = ["disabled"], _hoisted_7 = { key: 0 }, _hoisted_8 = { key: 1 }, _hoisted_9 = { class: "grid grid-cols-[10rem_1fr] bg-neutral-900 border-t border-neutral-800 group h-auto" }, _hoisted_10 = { class: "flex flex-col w-full min-w-0 p-3 relative h-max" }, _hoisted_11 = { class: "absolute top-2 right-2 flex justify-end z-10" }, _hoisted_12 = {
|
|
1409
|
+
key: 0,
|
|
1410
|
+
class: "text-sm text-neutral-300 font-mono m-0 whitespace-pre-wrap break-words"
|
|
1411
|
+
}, _hoisted_13 = {
|
|
1412
|
+
key: 1,
|
|
1413
|
+
class: "text-sm text-neutral-300 font-mono m-0 whitespace-pre-wrap break-words"
|
|
1414
|
+
}, _hoisted_14 = {
|
|
1415
|
+
key: 2,
|
|
1416
|
+
class: "text-sm text-neutral-500 font-mono italic h-full flex items-center"
|
|
1417
|
+
}, FetchCard_default = /* @__PURE__ */ defineComponent({
|
|
1418
|
+
__name: "FetchCard",
|
|
1419
|
+
props: {
|
|
1420
|
+
requireCheckboxToEnable: {},
|
|
1421
|
+
fetchOptions: {},
|
|
1422
|
+
responseDisplayTimeout: {},
|
|
1423
|
+
fetchOnMount: {},
|
|
1424
|
+
fetchButtonText: {},
|
|
1425
|
+
fetchButtonClass: {},
|
|
1426
|
+
responseClass: {},
|
|
1427
|
+
responseMaxHeight: {},
|
|
1428
|
+
url: {},
|
|
1429
|
+
urlClass: {},
|
|
1430
|
+
urlCommonClass: {},
|
|
1431
|
+
urlParts: {},
|
|
1432
|
+
urlPartsClasses: {},
|
|
1433
|
+
urlPartsDirection: {}
|
|
1434
|
+
},
|
|
1435
|
+
emits: [
|
|
1436
|
+
"fetching",
|
|
1437
|
+
"onResult",
|
|
1438
|
+
"onSuccess",
|
|
1439
|
+
"onError"
|
|
1440
|
+
],
|
|
1441
|
+
setup(e, { emit: t }) {
|
|
1442
|
+
let n = e, r = t, i = ref(!1), s = ref(!1), d = ref(null), f = ref(null), p = ref(null), m = computed(() => toValue(n.requireCheckboxToEnable) ?? !1), h = computed(() => toValue(n.fetchOptions) ?? {}), g = computed(() => toValue(n.responseDisplayTimeout) ?? 2e4), ee = computed(() => toValue(n.fetchOnMount) ?? !1), y = computed(() => toValue(n.fetchButtonText) ?? "Fetch"), b = computed(() => toValue(n.fetchButtonClass) ?? ""), x = computed(() => toValue(n.responseClass)), te = computed(() => toValue(n.responseMaxHeight) ?? "40vh"), ne = computed(() => h.value.method || "GET"), C = computed(() => n.url === void 0 ? n.urlParts === void 0 ? "" : toValue(n.urlParts).join("") : toValue(n.url)), w = computed(() => m.value && !i.value ? !0 : s.value || !C.value), T = ref("neutral"), D = null, re = () => {
|
|
1443
|
+
D && clearTimeout(D), D = setTimeout(() => {
|
|
1444
|
+
T.value = "neutral";
|
|
1445
|
+
}, g.value);
|
|
1446
|
+
}, ie = async () => {
|
|
1447
|
+
if (!w.value) {
|
|
1448
|
+
s.value = !0, T.value = "yellow", d.value = null, p.value = null, f.value = null, m.value && (i.value = !1), r("fetching", n);
|
|
1449
|
+
try {
|
|
1450
|
+
let e = await ofetch.raw(C.value, h.value);
|
|
1451
|
+
d.value = e._data, f.value = e.status, T.value = "green", r("onResult", n, e), r("onSuccess", n, e);
|
|
1452
|
+
} catch (e) {
|
|
1453
|
+
p.value = e.data || e.message || "Unknown error", f.value = e.status || 500, T.value = "red", r("onResult", n, e), r("onError", n, e);
|
|
1454
|
+
} finally {
|
|
1455
|
+
s.value = !1, re();
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
}, ae = computed(() => {
|
|
1459
|
+
switch (T.value) {
|
|
1460
|
+
case "yellow": return "text-yellow-400 bg-yellow-900/30 border-yellow-700/50";
|
|
1461
|
+
case "green": return "text-green-400 bg-green-900/30 border-green-700/50";
|
|
1462
|
+
case "red": return "text-red-400 bg-red-900/30 border-red-700/50";
|
|
1463
|
+
default: return "text-neutral-500 bg-neutral-800/50 border-neutral-700";
|
|
1464
|
+
}
|
|
1465
|
+
}), { copy: A, copied: j, isSupported: M } = useClipboard({ legacy: !0 }), N = () => {
|
|
1466
|
+
let e = d.value || p.value;
|
|
1467
|
+
e && A(JSON.stringify(e, null, 2));
|
|
1468
|
+
};
|
|
1469
|
+
return onMounted(() => {
|
|
1470
|
+
C.value && ee.value && (!m.value || i.value) && ie();
|
|
1471
|
+
}), (e, t) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1472
|
+
createElementVNode("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(ne.value), 1), m.value ? (openBlock(), createElementBlock("div", _hoisted_4, [t[1] ||= createElementVNode("label", {
|
|
1473
|
+
for: "enable-fetch",
|
|
1474
|
+
class: "text-xs font-medium text-neutral-300 cursor-pointer select-none"
|
|
1475
|
+
}, " Enable Request ", -1), withDirectives(createElementVNode("input", {
|
|
1476
|
+
id: "enable-fetch",
|
|
1477
|
+
type: "checkbox",
|
|
1478
|
+
"onUpdate:modelValue": t[0] ||= (e) => i.value = e,
|
|
1479
|
+
class: "w-3.5 h-3.5 rounded border-neutral-600 bg-neutral-800 text-indigo-500 focus:ring-indigo-500 cursor-pointer"
|
|
1480
|
+
}, null, 512), [[vModelCheckbox, i.value]])])) : createCommentVNode("", !0)]),
|
|
1481
|
+
createElementVNode("div", _hoisted_5, [createElementVNode("div", { class: normalizeClass(["flex-1 min-w-0", toValue(n.urlCommonClass)]) }, [n.url === void 0 ? n.urlParts === void 0 ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", {
|
|
1482
|
+
key: 1,
|
|
1483
|
+
class: normalizeClass(["flex flex-wrap font-mono break-all text-neutral-800", toValue(n.urlPartsDirection) === "column" ? "flex-col items-start gap-1" : "flex-row items-baseline"])
|
|
1484
|
+
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(toValue(n.urlParts), (e, t) => (openBlock(), createElementBlock("div", {
|
|
1485
|
+
key: t,
|
|
1486
|
+
class: normalizeClass(toValue(n.urlPartsClasses)?.[t] ?? (toValue(n.urlParts).length > 2 ? t === 0 ? "hidden" : t === 1 ? "text-sm font-medium mr-1" : "text-2xl font-bold" : toValue(n.urlParts).length > 1 ? t === 0 ? "hidden" : "text-sm font-medium" : "text-sm"))
|
|
1487
|
+
}, toDisplayString(e), 3))), 128))], 2)) : (openBlock(), createElementBlock("span", {
|
|
1488
|
+
key: 0,
|
|
1489
|
+
class: normalizeClass(["font-mono text-sm break-all text-neutral-600", toValue(n.urlClass)])
|
|
1490
|
+
}, toDisplayString(C.value), 3))], 2), createElementVNode("button", {
|
|
1491
|
+
onClick: ie,
|
|
1492
|
+
disabled: w.value,
|
|
1493
|
+
class: normalizeClass(["shrink-0 px-4 py-2 text-sm font-medium rounded disabled:opacity-50 disabled:cursor-not-allowed transition-colors", b.value || "bg-indigo-600 text-white hover:bg-indigo-700"])
|
|
1494
|
+
}, [s.value ? (openBlock(), createElementBlock("span", _hoisted_7, "Fetching...")) : (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(y.value), 1))], 10, _hoisted_6)]),
|
|
1495
|
+
createElementVNode("div", _hoisted_9, [createElementVNode("div", { class: normalizeClass(["flex items-center justify-center font-mono text-2xl font-black shadow-sm transition-colors duration-300 h-16", ae.value]) }, toDisplayString(f.value || "---"), 3), createElementVNode("div", _hoisted_10, [createElementVNode("div", _hoisted_11, [(d.value || p.value) && unref(M) ? (openBlock(), createElementBlock("button", {
|
|
1496
|
+
key: 0,
|
|
1497
|
+
onClick: withModifiers(N, ["prevent"]),
|
|
1498
|
+
class: normalizeClass(["px-2.5 py-1.5 rounded-md text-xs font-bold font-mono border backdrop-blur-sm transition-all duration-200 opacity-0 transform -translate-y-1 group-hover:opacity-100 group-hover:translate-y-0 shadow shadow-neutral-900", unref(j) ? "bg-emerald-900/80 text-emerald-300 border-emerald-700/50" : "bg-neutral-800/90 text-neutral-300 border-neutral-700 hover:bg-neutral-700"])
|
|
1499
|
+
}, toDisplayString(unref(j) ? "COPIED!" : "COPY"), 3)) : createCommentVNode("", !0)]), createElementVNode("div", {
|
|
1500
|
+
class: normalizeClass(["w-full overflow-y-auto transition-all duration-300 custom-scrollbar mt-1 overflow-x-hidden pr-16", x.value ? x.value : "max-h-12 hover:max-h-[var(--hover-max-h)]"]),
|
|
1501
|
+
style: normalizeStyle({ "--hover-max-h": te.value })
|
|
1502
|
+
}, [d.value ? (openBlock(), createElementBlock("pre", _hoisted_12, toDisplayString(JSON.stringify(d.value, null, 2)), 1)) : p.value ? (openBlock(), createElementBlock("pre", _hoisted_13, toDisplayString(JSON.stringify(p.value, null, 2)), 1)) : (openBlock(), createElementBlock("div", _hoisted_14, "Awaiting request..."))], 6)])])
|
|
1503
|
+
]));
|
|
1504
|
+
}
|
|
1505
|
+
});
|
|
1506
|
+
export { SidePanelFrame_default as a, SidePanelControlButton_default as c, LiveFrame_default as i, VanillaIf_default as n, SidePanelHeader_default as o, LoggedInOut_default as r, SidePanelButtonGroup_default as s, FetchCard_default as t };
|