@robuust-digital/vue-components 1.2.6 → 1.2.7
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/style.css +1 -1
- package/dist/tailwind/base/index.js +8 -7
- package/dist/tailwind/components/dropdown.js +5 -5
- package/dist/tailwind/components/input.js +100 -0
- package/dist/tailwind/components/select.js +16 -14
- package/dist/tailwind/index.js +3 -0
- package/dist/vue-components.es.js +1117 -1044
- package/dist/vue-components.umd.js +2 -2
- package/package.json +1 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { openBlock as
|
|
3
|
-
function
|
|
4
|
-
return
|
|
1
|
+
import * as nn from "vue";
|
|
2
|
+
import { openBlock as g, createElementBlock as S, createElementVNode as x, Fragment as ie, renderList as Te, renderSlot as k, createTextVNode as pe, toDisplayString as M, createVNode as D, unref as $, normalizeClass as N, createBlock as R, resolveDynamicComponent as J, withCtx as P, createCommentVNode as B, watchEffect as _, mergeProps as Y, computed as w, getCurrentInstance as Sn, useAttrs as En, withDirectives as vt, vModelDynamic as Nt, normalizeProps as He, guardReactiveProps as Tn, vModelSelect as gl, ref as E, nextTick as Oe, onMounted as z, cloneVNode as hl, h as K, defineComponent as W, inject as ee, provide as ue, onUnmounted as ce, watch as me, shallowRef as Ze, Teleport as yl, reactive as bl, withModifiers as kn, Transition as wl, useSlots as $l, getCurrentScope as xl, onScopeDispose as Sl, shallowReadonly as Ne, normalizeStyle as El } from "vue";
|
|
3
|
+
function Tl(e, t) {
|
|
4
|
+
return g(), S("svg", {
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6
6
|
viewBox: "0 0 24 24",
|
|
7
7
|
fill: "currentColor",
|
|
8
8
|
"aria-hidden": "true",
|
|
9
9
|
"data-slot": "icon"
|
|
10
10
|
}, [
|
|
11
|
-
|
|
11
|
+
x("path", {
|
|
12
12
|
"fill-rule": "evenodd",
|
|
13
13
|
d: "M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",
|
|
14
14
|
"clip-rule": "evenodd"
|
|
15
15
|
})
|
|
16
16
|
]);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function kl(e, t) {
|
|
19
|
+
return g(), S("svg", {
|
|
20
20
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21
21
|
viewBox: "0 0 24 24",
|
|
22
22
|
fill: "currentColor",
|
|
23
23
|
"aria-hidden": "true",
|
|
24
24
|
"data-slot": "icon"
|
|
25
25
|
}, [
|
|
26
|
-
|
|
26
|
+
x("path", {
|
|
27
27
|
"fill-rule": "evenodd",
|
|
28
28
|
d: "M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",
|
|
29
29
|
"clip-rule": "evenodd"
|
|
30
30
|
})
|
|
31
31
|
]);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
function pt(e, t) {
|
|
34
|
+
return g(), S("svg", {
|
|
35
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
36
36
|
viewBox: "0 0 24 24",
|
|
37
37
|
fill: "currentColor",
|
|
38
38
|
"aria-hidden": "true",
|
|
39
39
|
"data-slot": "icon"
|
|
40
40
|
}, [
|
|
41
|
-
|
|
41
|
+
x("path", {
|
|
42
42
|
"fill-rule": "evenodd",
|
|
43
43
|
d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
|
|
44
44
|
"clip-rule": "evenodd"
|
|
45
45
|
})
|
|
46
46
|
]);
|
|
47
47
|
}
|
|
48
|
-
const Ol = { class: "rvc-accordion" },
|
|
48
|
+
const Ol = { class: "rvc-accordion" }, Ll = ["open", "name"], Cl = ["innerHTML"], Da = {
|
|
49
49
|
__name: "Accordion",
|
|
50
50
|
props: {
|
|
51
51
|
items: {
|
|
@@ -67,37 +67,37 @@ const Ol = { class: "rvc-accordion" }, kl = ["open", "name"], Ll = ["innerHTML"]
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
setup(e) {
|
|
70
|
-
return (t, n) => (
|
|
71
|
-
(
|
|
70
|
+
return (t, n) => (g(), S("div", Ol, [
|
|
71
|
+
(g(!0), S(ie, null, Te(e.items, (l, r) => (g(), S("details", {
|
|
72
72
|
key: r,
|
|
73
73
|
open: e.defaultOpenIndex === r,
|
|
74
74
|
name: e.name,
|
|
75
75
|
class: "rvc-group/accordion group/accordion"
|
|
76
76
|
}, [
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
x("summary", null, [
|
|
78
|
+
k(t.$slots, "summary", {
|
|
79
79
|
item: l,
|
|
80
80
|
active: e.defaultOpenIndex === r
|
|
81
81
|
}, () => [
|
|
82
|
-
pe(
|
|
83
|
-
|
|
84
|
-
D(
|
|
82
|
+
pe(M(l.title) + " ", 1),
|
|
83
|
+
k(t.$slots, "icon", { classList: "size-5 group-open/accordion:rotate-45 transition-transform" }, () => [
|
|
84
|
+
D($(kl), { class: "rvc-size-5 group-open/accordion:rvc-rotate-45 rvc-transition-transform" })
|
|
85
85
|
])
|
|
86
86
|
])
|
|
87
87
|
]),
|
|
88
|
-
|
|
89
|
-
class:
|
|
88
|
+
x("div", {
|
|
89
|
+
class: N(["rvc-accordion-content", e.contentClass])
|
|
90
90
|
}, [
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
k(t.$slots, "content", { item: l }, () => [
|
|
92
|
+
x("div", {
|
|
93
93
|
innerHTML: l.content
|
|
94
|
-
}, null, 8,
|
|
94
|
+
}, null, 8, Cl)
|
|
95
95
|
])
|
|
96
96
|
], 2)
|
|
97
|
-
], 8,
|
|
97
|
+
], 8, Ll))), 128))
|
|
98
98
|
]));
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, Pl = { class: "rvc-alert-title" }, Ra = {
|
|
101
101
|
__name: "Alert",
|
|
102
102
|
props: {
|
|
103
103
|
as: {
|
|
@@ -124,37 +124,37 @@ const Ol = { class: "rvc-accordion" }, kl = ["open", "name"], Ll = ["innerHTML"]
|
|
|
124
124
|
},
|
|
125
125
|
emits: ["alert:close"],
|
|
126
126
|
setup(e) {
|
|
127
|
-
return (t, n) => (
|
|
128
|
-
class:
|
|
127
|
+
return (t, n) => (g(), R(J(e.as), {
|
|
128
|
+
class: N(["rvc-alert", `rvc-alert-${e.type}`])
|
|
129
129
|
}, {
|
|
130
130
|
default: P(() => [
|
|
131
|
-
|
|
132
|
-
e.icon ? (
|
|
131
|
+
k(t.$slots, "icon", {}, () => [
|
|
132
|
+
e.icon ? (g(), R(J(e.icon), {
|
|
133
133
|
key: 0,
|
|
134
134
|
class: "rvc-alert-icon"
|
|
135
|
-
})) :
|
|
135
|
+
})) : B("", !0)
|
|
136
136
|
]),
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
x("div", null, [
|
|
138
|
+
k(t.$slots, "title", {}, () => [
|
|
139
|
+
x("span", Pl, M(e.title), 1)
|
|
140
140
|
]),
|
|
141
|
-
|
|
141
|
+
k(t.$slots, "default")
|
|
142
142
|
]),
|
|
143
|
-
|
|
144
|
-
e.close ? (
|
|
143
|
+
k(t.$slots, "close", {}, () => [
|
|
144
|
+
e.close ? (g(), S("button", {
|
|
145
145
|
key: 0,
|
|
146
146
|
type: "button",
|
|
147
147
|
class: "rvc-alert-close rvc-transition-colors",
|
|
148
148
|
onClick: n[0] || (n[0] = (l) => t.$emit("alert:close"))
|
|
149
149
|
}, [
|
|
150
|
-
D(
|
|
151
|
-
])) :
|
|
150
|
+
D($(pt), { class: "rvc-size-5" })
|
|
151
|
+
])) : B("", !0)
|
|
152
152
|
])
|
|
153
153
|
]),
|
|
154
154
|
_: 3
|
|
155
155
|
}, 8, ["class"]));
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, Fa = {
|
|
158
158
|
__name: "Badge",
|
|
159
159
|
props: {
|
|
160
160
|
as: {
|
|
@@ -177,25 +177,25 @@ const Ol = { class: "rvc-accordion" }, kl = ["open", "name"], Ll = ["innerHTML"]
|
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
179
|
setup(e) {
|
|
180
|
-
return (t, n) => (
|
|
181
|
-
class:
|
|
180
|
+
return (t, n) => (g(), R(J(e.as), {
|
|
181
|
+
class: N(["rvc-badge", `rvc-badge-${e.color}`, `rvc-badge-${e.size}`])
|
|
182
182
|
}, {
|
|
183
183
|
default: P(() => [
|
|
184
|
-
|
|
185
|
-
pe(
|
|
184
|
+
k(t.$slots, "default", { label: e.label }, () => [
|
|
185
|
+
pe(M(e.label), 1)
|
|
186
186
|
])
|
|
187
187
|
]),
|
|
188
188
|
_: 3
|
|
189
189
|
}, 8, ["class"]));
|
|
190
190
|
}
|
|
191
|
-
},
|
|
191
|
+
}, Al = {
|
|
192
192
|
xmlns: "http://www.w3.org/2000/svg",
|
|
193
193
|
fill: "none",
|
|
194
194
|
viewBox: "0 0 24 24"
|
|
195
195
|
};
|
|
196
|
-
function
|
|
197
|
-
return
|
|
198
|
-
|
|
196
|
+
function Dl(e, t) {
|
|
197
|
+
return g(), S("svg", Al, t[0] || (t[0] = [
|
|
198
|
+
x("circle", {
|
|
199
199
|
cx: "12",
|
|
200
200
|
cy: "12",
|
|
201
201
|
r: "10",
|
|
@@ -203,13 +203,13 @@ function Al(e, t) {
|
|
|
203
203
|
"stroke-width": "4",
|
|
204
204
|
style: { opacity: ".25" }
|
|
205
205
|
}, null, -1),
|
|
206
|
-
|
|
206
|
+
x("path", {
|
|
207
207
|
fill: "currentColor",
|
|
208
208
|
d: "M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z"
|
|
209
209
|
}, null, -1)
|
|
210
210
|
]));
|
|
211
211
|
}
|
|
212
|
-
const On = { render:
|
|
212
|
+
const On = { render: Dl }, Rl = {
|
|
213
213
|
key: 0,
|
|
214
214
|
class: "rvc-sr-only"
|
|
215
215
|
}, Xe = {
|
|
@@ -254,47 +254,47 @@ const On = { render: Al }, Dl = {
|
|
|
254
254
|
},
|
|
255
255
|
setup(e) {
|
|
256
256
|
const t = e;
|
|
257
|
-
return
|
|
257
|
+
return _(() => {
|
|
258
258
|
t.iconOnly && !t.icon && console.warn("[ButtonBase] Using iconOnly prop without providing an icon may result in an empty button.");
|
|
259
|
-
}), (n, l) => (
|
|
259
|
+
}), (n, l) => (g(), R(J(e.as), Y(e.bindAs ? { as: e.bindAs } : {}, {
|
|
260
260
|
class: ["rvc-button", `rvc-button-${e.color}`, `rvc-button-${e.size}`, { "rvc-button-reverse": e.iconLeft }, { "rvc-button-icon-only": e.iconOnly }],
|
|
261
261
|
"aria-label": e.iconOnly ? e.label : null,
|
|
262
262
|
"aria-busy": e.spinning
|
|
263
263
|
}), {
|
|
264
264
|
default: P(() => [
|
|
265
|
-
e.iconOnly && e.label ? (
|
|
266
|
-
|
|
267
|
-
pe(
|
|
265
|
+
e.iconOnly && e.label ? (g(), S("span", Rl, [
|
|
266
|
+
k(n.$slots, "default", { label: e.label }, () => [
|
|
267
|
+
pe(M(e.label), 1)
|
|
268
268
|
])
|
|
269
|
-
])) : e.label ?
|
|
269
|
+
])) : e.label ? k(n.$slots, "default", {
|
|
270
270
|
key: 1,
|
|
271
271
|
label: e.label
|
|
272
272
|
}, () => [
|
|
273
|
-
pe(
|
|
274
|
-
]) :
|
|
275
|
-
|
|
276
|
-
e.icon && !e.spinning ? (
|
|
273
|
+
pe(M(e.label), 1)
|
|
274
|
+
]) : B("", !0),
|
|
275
|
+
k(n.$slots, "icon", { icon: e.icon }, () => [
|
|
276
|
+
e.icon && !e.spinning ? (g(), R(J(e.icon), {
|
|
277
277
|
key: 0,
|
|
278
278
|
class: "rvc-button-icon",
|
|
279
279
|
"aria-hidden": !e.iconOnly
|
|
280
|
-
}, null, 8, ["aria-hidden"])) :
|
|
280
|
+
}, null, 8, ["aria-hidden"])) : B("", !0)
|
|
281
281
|
]),
|
|
282
|
-
|
|
283
|
-
e.spinning ? (
|
|
282
|
+
k(n.$slots, "spinner", { spinning: e.spinning }, () => [
|
|
283
|
+
e.spinning ? (g(), R($(On), {
|
|
284
284
|
key: 0,
|
|
285
285
|
class: "rvc-button-icon rvc-button-icon-loading",
|
|
286
286
|
"aria-hidden": "true"
|
|
287
|
-
})) :
|
|
287
|
+
})) : B("", !0)
|
|
288
288
|
])
|
|
289
289
|
]),
|
|
290
290
|
_: 3
|
|
291
291
|
}, 16, ["class", "aria-label", "aria-busy"]));
|
|
292
292
|
}
|
|
293
|
-
},
|
|
293
|
+
}, mt = () => ({ hasModelBinding: w(() => {
|
|
294
294
|
var n;
|
|
295
|
-
const t =
|
|
295
|
+
const t = Sn();
|
|
296
296
|
return ((n = t == null ? void 0 : t.vnode) == null ? void 0 : n.props) && Object.prototype.hasOwnProperty.call(t.vnode.props, "onUpdate:modelValue");
|
|
297
|
-
}) }),
|
|
297
|
+
}) }), Fl = { class: "rvc-checkbox-input peer-focus/checkbox:rvc-focus" }, Ml = ["for"], Ma = /* @__PURE__ */ Object.assign({
|
|
298
298
|
inheritAttrs: !1
|
|
299
299
|
}, {
|
|
300
300
|
__name: "Checkbox",
|
|
@@ -321,103 +321,103 @@ const On = { render: Al }, Dl = {
|
|
|
321
321
|
const n = e, l = t, r = w({
|
|
322
322
|
get: () => n.modelValue,
|
|
323
323
|
set: (s) => l("update:modelValue", s)
|
|
324
|
-
}), { hasModelBinding: a } =
|
|
325
|
-
...
|
|
324
|
+
}), { hasModelBinding: a } = mt(), i = {
|
|
325
|
+
...En(),
|
|
326
326
|
id: n.id,
|
|
327
327
|
type: "checkbox",
|
|
328
328
|
class: "rvc-absolute rvc-opacity-0 rvc-inset-0 rvc-cursor-pointer rvc-peer/checkbox"
|
|
329
329
|
};
|
|
330
|
-
return (s, u) => (
|
|
331
|
-
class:
|
|
330
|
+
return (s, u) => (g(), S("div", {
|
|
331
|
+
class: N(["rvc-checkbox", e.rootClass])
|
|
332
332
|
}, [
|
|
333
|
-
|
|
333
|
+
$(a) ? vt((g(), S("input", Y({ key: 0 }, i, {
|
|
334
334
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c)
|
|
335
335
|
}), null, 16)), [
|
|
336
|
-
[
|
|
337
|
-
]) : (
|
|
338
|
-
|
|
339
|
-
D(
|
|
336
|
+
[Nt, r.value]
|
|
337
|
+
]) : (g(), S("input", He(Y({ key: 1 }, i)), null, 16)),
|
|
338
|
+
x("span", Fl, [
|
|
339
|
+
D($(Tl))
|
|
340
340
|
]),
|
|
341
|
-
|
|
342
|
-
s.$slots.default || e.label ?
|
|
343
|
-
|
|
344
|
-
]) :
|
|
341
|
+
x("div", null, [
|
|
342
|
+
s.$slots.default || e.label ? k(s.$slots, "default", { key: 0 }, () => [
|
|
343
|
+
x("label", { for: e.id }, M(e.label), 9, Ml)
|
|
344
|
+
]) : B("", !0)
|
|
345
345
|
])
|
|
346
346
|
], 2));
|
|
347
347
|
}
|
|
348
348
|
});
|
|
349
|
-
function
|
|
350
|
-
return
|
|
349
|
+
function Bl(e, t) {
|
|
350
|
+
return g(), S("svg", {
|
|
351
351
|
xmlns: "http://www.w3.org/2000/svg",
|
|
352
352
|
viewBox: "0 0 16 16",
|
|
353
353
|
fill: "currentColor",
|
|
354
354
|
"aria-hidden": "true",
|
|
355
355
|
"data-slot": "icon"
|
|
356
356
|
}, [
|
|
357
|
-
|
|
357
|
+
x("path", {
|
|
358
358
|
"fill-rule": "evenodd",
|
|
359
359
|
d: "M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",
|
|
360
360
|
"clip-rule": "evenodd"
|
|
361
361
|
})
|
|
362
362
|
]);
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
return
|
|
364
|
+
function Il(e, t) {
|
|
365
|
+
return g(), S("svg", {
|
|
366
366
|
xmlns: "http://www.w3.org/2000/svg",
|
|
367
367
|
viewBox: "0 0 20 20",
|
|
368
368
|
fill: "currentColor",
|
|
369
369
|
"aria-hidden": "true",
|
|
370
370
|
"data-slot": "icon"
|
|
371
371
|
}, [
|
|
372
|
-
|
|
372
|
+
x("path", {
|
|
373
373
|
"fill-rule": "evenodd",
|
|
374
374
|
d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",
|
|
375
375
|
"clip-rule": "evenodd"
|
|
376
376
|
})
|
|
377
377
|
]);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
return
|
|
379
|
+
function Nl(e, t) {
|
|
380
|
+
return g(), S("svg", {
|
|
381
381
|
xmlns: "http://www.w3.org/2000/svg",
|
|
382
382
|
viewBox: "0 0 20 20",
|
|
383
383
|
fill: "currentColor",
|
|
384
384
|
"aria-hidden": "true",
|
|
385
385
|
"data-slot": "icon"
|
|
386
386
|
}, [
|
|
387
|
-
|
|
387
|
+
x("path", {
|
|
388
388
|
"fill-rule": "evenodd",
|
|
389
389
|
d: "M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",
|
|
390
390
|
"clip-rule": "evenodd"
|
|
391
391
|
})
|
|
392
392
|
]);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
return
|
|
394
|
+
function jl(e, t) {
|
|
395
|
+
return g(), S("svg", {
|
|
396
396
|
xmlns: "http://www.w3.org/2000/svg",
|
|
397
397
|
viewBox: "0 0 20 20",
|
|
398
398
|
fill: "currentColor",
|
|
399
399
|
"aria-hidden": "true",
|
|
400
400
|
"data-slot": "icon"
|
|
401
401
|
}, [
|
|
402
|
-
|
|
402
|
+
x("path", {
|
|
403
403
|
"fill-rule": "evenodd",
|
|
404
404
|
d: "M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",
|
|
405
405
|
"clip-rule": "evenodd"
|
|
406
406
|
})
|
|
407
407
|
]);
|
|
408
408
|
}
|
|
409
|
-
function
|
|
410
|
-
return
|
|
409
|
+
function Vl(e, t) {
|
|
410
|
+
return g(), S("svg", {
|
|
411
411
|
xmlns: "http://www.w3.org/2000/svg",
|
|
412
412
|
viewBox: "0 0 20 20",
|
|
413
413
|
fill: "currentColor",
|
|
414
414
|
"aria-hidden": "true",
|
|
415
415
|
"data-slot": "icon"
|
|
416
416
|
}, [
|
|
417
|
-
|
|
417
|
+
x("path", { d: "M10 3a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM10 8.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM11.5 15.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0Z" })
|
|
418
418
|
]);
|
|
419
419
|
}
|
|
420
|
-
const
|
|
420
|
+
const Ln = /* @__PURE__ */ Object.assign({
|
|
421
421
|
inheritAttrs: !1
|
|
422
422
|
}, {
|
|
423
423
|
__name: "FormSelect",
|
|
@@ -449,40 +449,40 @@ const kn = /* @__PURE__ */ Object.assign({
|
|
|
449
449
|
const n = e, l = t, r = w({
|
|
450
450
|
get: () => n.modelValue,
|
|
451
451
|
set: (o) => l("update:modelValue", o)
|
|
452
|
-
}), { hasModelBinding: a } =
|
|
453
|
-
return (o, i) => (
|
|
454
|
-
class:
|
|
452
|
+
}), { hasModelBinding: a } = mt();
|
|
453
|
+
return (o, i) => (g(), S("div", {
|
|
454
|
+
class: N([
|
|
455
455
|
"rvc-select",
|
|
456
456
|
`rvc-select-${e.size}`,
|
|
457
457
|
e.rootClass
|
|
458
458
|
])
|
|
459
459
|
}, [
|
|
460
|
-
e.iconLeft ?
|
|
460
|
+
e.iconLeft ? k(o.$slots, "iconLeft", {
|
|
461
461
|
key: 0,
|
|
462
462
|
icon: e.iconLeft
|
|
463
463
|
}, () => [
|
|
464
|
-
(
|
|
465
|
-
]) :
|
|
466
|
-
|
|
467
|
-
|
|
464
|
+
(g(), R(J(e.iconLeft), { "aria-hidden": "true" }))
|
|
465
|
+
]) : B("", !0),
|
|
466
|
+
k(o.$slots, "select", He(Tn(o.$attrs)), () => [
|
|
467
|
+
$(a) ? vt((g(), S("select", Y({ key: 0 }, o.$attrs, {
|
|
468
468
|
"onUpdate:modelValue": i[0] || (i[0] = (s) => r.value = s)
|
|
469
469
|
}), [
|
|
470
|
-
|
|
470
|
+
k(o.$slots, "default")
|
|
471
471
|
], 16)), [
|
|
472
472
|
[gl, r.value]
|
|
473
|
-
]) : (
|
|
474
|
-
|
|
473
|
+
]) : (g(), S("select", He(Y({ key: 1 }, o.$attrs)), [
|
|
474
|
+
k(o.$slots, "default")
|
|
475
475
|
], 16))
|
|
476
476
|
]),
|
|
477
|
-
|
|
478
|
-
(
|
|
477
|
+
k(o.$slots, "icon", { icon: e.icon }, () => [
|
|
478
|
+
(g(), R(J(e.icon ?? $(Il)), { "aria-hidden": "true" }))
|
|
479
479
|
])
|
|
480
480
|
], 2));
|
|
481
481
|
}
|
|
482
|
-
}),
|
|
482
|
+
}), Hl = {
|
|
483
483
|
key: 0,
|
|
484
484
|
class: "rvc-pagination rvc-grid rvc-grid-cols-2 md:rvc-grid-cols-3 rvc-items-center rvc-justify-between"
|
|
485
|
-
},
|
|
485
|
+
}, Wl = ["value"], Ul = { class: "md:rvc-flex rvc-justify-center rvc-hidden" }, zl = { class: "rvc-pagination-info" }, ql = { class: "rvc-flex rvc-justify-end" }, Kl = { class: "rvc-flex rvc-items-center md:gap-0.5 xl:rvc-gap-1" }, Yl = ["disabled", "onClick"], Zl = { key: 2 }, Gl = { key: 3 }, Xl = {
|
|
486
486
|
__name: "Pagination",
|
|
487
487
|
props: {
|
|
488
488
|
pagination: {
|
|
@@ -508,12 +508,12 @@ const kn = /* @__PURE__ */ Object.assign({
|
|
|
508
508
|
},
|
|
509
509
|
emits: ["pagination:change", "pagination:perPage"],
|
|
510
510
|
setup(e, { emit: t }) {
|
|
511
|
-
const n = e, l = t, r =
|
|
511
|
+
const n = e, l = t, r = E(n.perPage);
|
|
512
512
|
return (a, o) => {
|
|
513
513
|
var i;
|
|
514
|
-
return (i = e.pagination) != null && i.total ? (
|
|
515
|
-
|
|
516
|
-
D(
|
|
514
|
+
return (i = e.pagination) != null && i.total ? (g(), S("div", Hl, [
|
|
515
|
+
k(a.$slots, "perPage", Y(e.pagination, { perPage: r.value }), () => [
|
|
516
|
+
D(Ln, {
|
|
517
517
|
modelValue: r.value,
|
|
518
518
|
"onUpdate:modelValue": [
|
|
519
519
|
o[0] || (o[0] = (s) => r.value = s),
|
|
@@ -523,59 +523,59 @@ const kn = /* @__PURE__ */ Object.assign({
|
|
|
523
523
|
"root-class": "rvc-w-fit"
|
|
524
524
|
}, {
|
|
525
525
|
default: P(() => [
|
|
526
|
-
(
|
|
526
|
+
(g(!0), S(ie, null, Te(e.perPageOptions, (s) => (g(), S("option", {
|
|
527
527
|
key: `pagination-items-per-page-option-${s}`,
|
|
528
528
|
value: s
|
|
529
|
-
},
|
|
529
|
+
}, M(s) + " " + M(e.perPageLabel), 9, Wl))), 128))
|
|
530
530
|
]),
|
|
531
531
|
_: 1
|
|
532
532
|
}, 8, ["modelValue"])
|
|
533
533
|
]),
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
534
|
+
k(a.$slots, "info", Y(e.pagination, { fromLabel: e.fromLabel }), () => [
|
|
535
|
+
x("div", Ul, [
|
|
536
|
+
x("div", zl, M(e.pagination.from) + " - " + M(e.pagination.to) + " " + M(e.fromLabel) + " " + M(e.pagination.total), 1)
|
|
537
537
|
])
|
|
538
538
|
]),
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
(
|
|
539
|
+
x("div", ql, [
|
|
540
|
+
x("nav", null, [
|
|
541
|
+
x("ol", Kl, [
|
|
542
|
+
(g(!0), S(ie, null, Te(e.pagination.links, (s, u) => (g(), S("li", {
|
|
543
543
|
key: `pagination-link-${s.label}-${u}`,
|
|
544
544
|
class: "rvc-hidden md:rvc-block first:rvc-block last:rvc-block"
|
|
545
545
|
}, [
|
|
546
|
-
|
|
546
|
+
x("button", {
|
|
547
547
|
type: "button",
|
|
548
548
|
disabled: s.label === "..." || !s.url,
|
|
549
|
-
class:
|
|
549
|
+
class: N([
|
|
550
550
|
"rvc-pagination-button",
|
|
551
551
|
{ "rvc-pagination-button-active": s.active }
|
|
552
552
|
]),
|
|
553
553
|
onClick: (c) => s.url && l("pagination:change", s.url)
|
|
554
554
|
}, [
|
|
555
|
-
s.url !== "..." && u === 0 ? (
|
|
555
|
+
s.url !== "..." && u === 0 ? (g(), R($(Nl), {
|
|
556
556
|
key: 0,
|
|
557
557
|
"aria-hidden": "true",
|
|
558
|
-
class:
|
|
558
|
+
class: N([
|
|
559
559
|
"rvc-size-5 rvc-text-slate-80",
|
|
560
560
|
{ "rvc-opacity-50": !s.url }
|
|
561
561
|
])
|
|
562
|
-
}, null, 8, ["class"])) : s.label !== "..." && u === e.pagination.links.length - 1 ? (
|
|
562
|
+
}, null, 8, ["class"])) : s.label !== "..." && u === e.pagination.links.length - 1 ? (g(), R($(jl), {
|
|
563
563
|
key: 1,
|
|
564
564
|
"aria-hidden": "true",
|
|
565
|
-
class:
|
|
565
|
+
class: N([
|
|
566
566
|
"rvc-size-5 rvc-text-slate-80",
|
|
567
567
|
{ "rvc-opacity-50": !s.url }
|
|
568
568
|
])
|
|
569
|
-
}, null, 8, ["class"])) : s.label === "..." ? (
|
|
570
|
-
], 10,
|
|
569
|
+
}, null, 8, ["class"])) : s.label === "..." ? (g(), S("span", Zl, " ... ")) : (g(), S("span", Gl, M(s.label), 1))
|
|
570
|
+
], 10, Yl)
|
|
571
571
|
]))), 128))
|
|
572
572
|
])
|
|
573
573
|
])
|
|
574
574
|
])
|
|
575
|
-
])) :
|
|
575
|
+
])) : B("", !0);
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
|
-
},
|
|
578
|
+
}, Ql = { class: "rvc-overflow-x-auto rvc-pb-4" }, Jl = { key: 0 }, _l = ["aria-label", "onClick"], er = ["innerHTML"], tr = { key: 1 }, nr = ["colspan"], lr = { key: 2 }, rr = ["colspan"], or = { class: "rvc-flex rvc-gap-x-2 rvc-items-center" }, Ba = {
|
|
579
579
|
__name: "DataTable",
|
|
580
580
|
props: {
|
|
581
581
|
headers: {
|
|
@@ -611,7 +611,7 @@ const kn = /* @__PURE__ */ Object.assign({
|
|
|
611
611
|
},
|
|
612
612
|
emits: ["table:sortBy", "pagination:change", "pagination:perPage"],
|
|
613
613
|
setup(e, { emit: t }) {
|
|
614
|
-
const n = e, l = t, r =
|
|
614
|
+
const n = e, l = t, r = E(null), a = (i) => n.headers.find((s) => s.key === i), o = (i) => {
|
|
615
615
|
!r.value || r.value.key !== i.key ? r.value = {
|
|
616
616
|
key: i.key,
|
|
617
617
|
direction: "asc"
|
|
@@ -620,17 +620,17 @@ const kn = /* @__PURE__ */ Object.assign({
|
|
|
620
620
|
direction: "desc"
|
|
621
621
|
} : r.value = null, l("table:sortBy", r.value);
|
|
622
622
|
};
|
|
623
|
-
return (i, s) => (
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
class:
|
|
623
|
+
return (i, s) => (g(), S("div", null, [
|
|
624
|
+
x("div", Ql, [
|
|
625
|
+
x("table", {
|
|
626
|
+
class: N([{ "rvc-table-striped": e.striped }, "rvc-w-full rvc-table"])
|
|
627
627
|
}, [
|
|
628
|
-
e.headers.length ? (
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
(
|
|
628
|
+
e.headers.length ? (g(), S("thead", Jl, [
|
|
629
|
+
x("tr", null, [
|
|
630
|
+
k(i.$slots, "headers", { headers: e.headers }, () => [
|
|
631
|
+
(g(!0), S(ie, null, Te(e.headers, (u) => {
|
|
632
632
|
var c, f;
|
|
633
|
-
return
|
|
633
|
+
return g(), S("th", Y({ ref_for: !0 }, u, {
|
|
634
634
|
key: `rvc-table-header-${u.id}`,
|
|
635
635
|
class: {
|
|
636
636
|
"rvc-text-left": u.align === "left" || !u.align,
|
|
@@ -638,11 +638,11 @@ const kn = /* @__PURE__ */ Object.assign({
|
|
|
638
638
|
"rvc-text-right": u.align === "right"
|
|
639
639
|
}
|
|
640
640
|
}), [
|
|
641
|
-
u.sortable && u.key ? (
|
|
641
|
+
u.sortable && u.key ? (g(), S("button", {
|
|
642
642
|
key: 0,
|
|
643
643
|
type: "button",
|
|
644
644
|
"aria-label": `Sort on ${u.label}`,
|
|
645
|
-
class:
|
|
645
|
+
class: N([
|
|
646
646
|
"rvc-flex rvc-w-full rvc-gap-x-1.5 hover:rvc-underline rvc-group/table",
|
|
647
647
|
{
|
|
648
648
|
"rvc-justify-center": u.align === "center",
|
|
@@ -651,14 +651,14 @@ const kn = /* @__PURE__ */ Object.assign({
|
|
|
651
651
|
]),
|
|
652
652
|
onClick: (d) => o(u)
|
|
653
653
|
}, [
|
|
654
|
-
|
|
654
|
+
k(i.$slots, "header-label", {
|
|
655
655
|
sortBy: r.value,
|
|
656
656
|
header: u
|
|
657
657
|
}, () => [
|
|
658
|
-
pe(
|
|
658
|
+
pe(M(u.label), 1)
|
|
659
659
|
]),
|
|
660
|
-
D(
|
|
661
|
-
class:
|
|
660
|
+
D($(Bl), {
|
|
661
|
+
class: N([
|
|
662
662
|
"rvc-size-4 rvc-shrink-0 rvc-transition",
|
|
663
663
|
{
|
|
664
664
|
"rvc-opacity-100": ((c = r.value) == null ? void 0 : c.key) === u.key,
|
|
@@ -667,88 +667,88 @@ const kn = /* @__PURE__ */ Object.assign({
|
|
|
667
667
|
}
|
|
668
668
|
])
|
|
669
669
|
}, null, 8, ["class"])
|
|
670
|
-
], 10,
|
|
670
|
+
], 10, _l)) : k(i.$slots, "header-label", {
|
|
671
671
|
key: 1,
|
|
672
672
|
sortBy: r.value,
|
|
673
673
|
header: u
|
|
674
674
|
}, () => [
|
|
675
|
-
pe(
|
|
675
|
+
pe(M(u.label), 1)
|
|
676
676
|
])
|
|
677
677
|
], 16);
|
|
678
678
|
}), 128))
|
|
679
679
|
])
|
|
680
680
|
])
|
|
681
|
-
])) :
|
|
682
|
-
|
|
683
|
-
e.items.length && !e.spinning ? (
|
|
681
|
+
])) : B("", !0),
|
|
682
|
+
x("tbody", null, [
|
|
683
|
+
e.items.length && !e.spinning ? (g(!0), S(ie, { key: 0 }, Te(e.items, (u, c) => (g(), S("tr", {
|
|
684
684
|
key: `rvc-table-row-${c}-${u.id}`
|
|
685
685
|
}, [
|
|
686
|
-
|
|
686
|
+
k(i.$slots, "items", {
|
|
687
687
|
item: u,
|
|
688
688
|
index: c
|
|
689
689
|
}, () => [
|
|
690
|
-
(
|
|
691
|
-
var v, p, m,
|
|
692
|
-
return
|
|
690
|
+
(g(!0), S(ie, null, Te(u, (f, d) => {
|
|
691
|
+
var v, p, m, h;
|
|
692
|
+
return g(), S("td", Y({
|
|
693
693
|
key: `rvc-table-row-${c}-column-${d}-${u.id}`,
|
|
694
694
|
ref_for: !0
|
|
695
695
|
}, u.attrs, {
|
|
696
696
|
class: {
|
|
697
697
|
"rvc-text-left": ((v = a(d)) == null ? void 0 : v.align) === "left" || !((p = a(d)) != null && p.align),
|
|
698
698
|
"rvc-text-center": ((m = a(d)) == null ? void 0 : m.align) === "center",
|
|
699
|
-
"rvc-text-right": ((
|
|
699
|
+
"rvc-text-right": ((h = a(d)) == null ? void 0 : h.align) === "right"
|
|
700
700
|
},
|
|
701
701
|
innerHTML: f
|
|
702
|
-
}), null, 16,
|
|
702
|
+
}), null, 16, er);
|
|
703
703
|
}), 128))
|
|
704
704
|
])
|
|
705
|
-
]))), 128)) : !e.items.length && !e.spinning ? (
|
|
706
|
-
|
|
705
|
+
]))), 128)) : !e.items.length && !e.spinning ? (g(), S("tr", tr, [
|
|
706
|
+
x("td", {
|
|
707
707
|
colspan: e.headers.length,
|
|
708
708
|
class: "rvc-table-state"
|
|
709
709
|
}, [
|
|
710
|
-
|
|
711
|
-
], 8,
|
|
712
|
-
])) : (
|
|
713
|
-
|
|
710
|
+
x("p", null, M(e.noResultsText), 1)
|
|
711
|
+
], 8, nr)
|
|
712
|
+
])) : (g(), S("tr", lr, [
|
|
713
|
+
x("td", {
|
|
714
714
|
colspan: e.headers.length,
|
|
715
715
|
class: "rvc-table-state"
|
|
716
716
|
}, [
|
|
717
|
-
|
|
717
|
+
k(i.$slots, "spinner", {
|
|
718
718
|
spinning: e.spinning,
|
|
719
719
|
label: e.loadingText
|
|
720
720
|
}, () => [
|
|
721
|
-
|
|
722
|
-
e.spinning ? (
|
|
721
|
+
x("div", or, [
|
|
722
|
+
e.spinning ? (g(), R($(On), {
|
|
723
723
|
key: 0,
|
|
724
724
|
"aria-hidden": "true",
|
|
725
725
|
class: "rvc-table-spinner"
|
|
726
|
-
})) :
|
|
727
|
-
pe(" " +
|
|
726
|
+
})) : B("", !0),
|
|
727
|
+
pe(" " + M(e.loadingText), 1)
|
|
728
728
|
])
|
|
729
729
|
])
|
|
730
|
-
], 8,
|
|
730
|
+
], 8, rr)
|
|
731
731
|
]))
|
|
732
732
|
])
|
|
733
733
|
], 2)
|
|
734
734
|
]),
|
|
735
|
-
e.pagination ?
|
|
736
|
-
D(
|
|
735
|
+
e.pagination ? k(i.$slots, "pagination", He(Y({ key: 0 }, e.pagination)), () => [
|
|
736
|
+
D(Xl, {
|
|
737
737
|
pagination: e.pagination,
|
|
738
738
|
"onPagination:change": s[0] || (s[0] = (u) => l("pagination:change", u)),
|
|
739
739
|
"onPagination:perPage": s[1] || (s[1] = (u) => l("pagination:perPage", u))
|
|
740
740
|
}, null, 8, ["pagination"])
|
|
741
|
-
]) :
|
|
741
|
+
]) : B("", !0)
|
|
742
742
|
]));
|
|
743
743
|
}
|
|
744
744
|
};
|
|
745
|
-
function
|
|
746
|
-
let l =
|
|
745
|
+
function ar(e, t, n) {
|
|
746
|
+
let l = E(n == null ? void 0 : n.value), r = w(() => e.value !== void 0);
|
|
747
747
|
return [w(() => r.value ? e.value : l.value), function(a) {
|
|
748
748
|
return r.value || (l.value = a), t == null ? void 0 : t(a);
|
|
749
749
|
}];
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function jt(e) {
|
|
752
752
|
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
|
|
753
753
|
throw t;
|
|
754
754
|
}));
|
|
@@ -768,7 +768,7 @@ function et() {
|
|
|
768
768
|
t.add(() => clearTimeout(l));
|
|
769
769
|
}, microTask(...n) {
|
|
770
770
|
let l = { current: !0 };
|
|
771
|
-
return
|
|
771
|
+
return jt(() => {
|
|
772
772
|
l.current && n[0]();
|
|
773
773
|
}), t.add(() => {
|
|
774
774
|
l.current = !1;
|
|
@@ -791,12 +791,12 @@ function et() {
|
|
|
791
791
|
} };
|
|
792
792
|
return t;
|
|
793
793
|
}
|
|
794
|
-
var
|
|
795
|
-
let
|
|
796
|
-
const ve = (
|
|
797
|
-
return
|
|
794
|
+
var ln;
|
|
795
|
+
let ir = Symbol("headlessui.useid"), sr = 0;
|
|
796
|
+
const ve = (ln = nn.useId) != null ? ln : function() {
|
|
797
|
+
return nn.inject(ir, () => `${++sr}`)();
|
|
798
798
|
};
|
|
799
|
-
function
|
|
799
|
+
function O(e) {
|
|
800
800
|
var t;
|
|
801
801
|
if (e == null || e.value == null) return null;
|
|
802
802
|
let n = (t = e.value.$el) != null ? t : e.value;
|
|
@@ -810,10 +810,10 @@ function ge(e, t, ...n) {
|
|
|
810
810
|
let l = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((r) => `"${r}"`).join(", ")}.`);
|
|
811
811
|
throw Error.captureStackTrace && Error.captureStackTrace(l, ge), l;
|
|
812
812
|
}
|
|
813
|
-
var
|
|
814
|
-
let
|
|
813
|
+
var ur = Object.defineProperty, cr = (e, t, n) => t in e ? ur(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, rn = (e, t, n) => (cr(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
814
|
+
let dr = class {
|
|
815
815
|
constructor() {
|
|
816
|
-
|
|
816
|
+
rn(this, "current", this.detect()), rn(this, "currentId", 0);
|
|
817
817
|
}
|
|
818
818
|
set(t) {
|
|
819
819
|
this.current !== t && (this.currentId = 0, this.current = t);
|
|
@@ -833,42 +833,42 @@ let cr = class {
|
|
|
833
833
|
detect() {
|
|
834
834
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
835
835
|
}
|
|
836
|
-
}, tt = new
|
|
836
|
+
}, tt = new dr();
|
|
837
837
|
function Ae(e) {
|
|
838
838
|
if (tt.isServer) return null;
|
|
839
839
|
if (e instanceof Node) return e.ownerDocument;
|
|
840
840
|
if (e != null && e.hasOwnProperty("value")) {
|
|
841
|
-
let t =
|
|
841
|
+
let t = O(e);
|
|
842
842
|
if (t) return t.ownerDocument;
|
|
843
843
|
}
|
|
844
844
|
return document;
|
|
845
845
|
}
|
|
846
|
-
let
|
|
847
|
-
var we = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(we || {}),
|
|
848
|
-
function
|
|
849
|
-
return e == null ? [] : Array.from(e.querySelectorAll(
|
|
846
|
+
let Lt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
847
|
+
var we = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(we || {}), Cn = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Cn || {}), fr = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(fr || {});
|
|
848
|
+
function Pn(e = document.body) {
|
|
849
|
+
return e == null ? [] : Array.from(e.querySelectorAll(Lt)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
850
850
|
}
|
|
851
|
-
var
|
|
852
|
-
function
|
|
851
|
+
var Vt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Vt || {});
|
|
852
|
+
function Ht(e, t = 0) {
|
|
853
853
|
var n;
|
|
854
854
|
return e === ((n = Ae(e)) == null ? void 0 : n.body) ? !1 : ge(t, { 0() {
|
|
855
|
-
return e.matches(
|
|
855
|
+
return e.matches(Lt);
|
|
856
856
|
}, 1() {
|
|
857
857
|
let l = e;
|
|
858
858
|
for (; l !== null; ) {
|
|
859
|
-
if (l.matches(
|
|
859
|
+
if (l.matches(Lt)) return !0;
|
|
860
860
|
l = l.parentElement;
|
|
861
861
|
}
|
|
862
862
|
return !1;
|
|
863
863
|
} });
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function An(e) {
|
|
866
866
|
let t = Ae(e);
|
|
867
|
-
|
|
868
|
-
t && !
|
|
867
|
+
Oe(() => {
|
|
868
|
+
t && !Ht(t.activeElement, 0) && Le(e);
|
|
869
869
|
});
|
|
870
870
|
}
|
|
871
|
-
var
|
|
871
|
+
var vr = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(vr || {});
|
|
872
872
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
873
873
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
874
874
|
}, !0), document.addEventListener("click", (e) => {
|
|
@@ -877,12 +877,12 @@ typeof window < "u" && typeof document < "u" && (document.addEventListener("keyd
|
|
|
877
877
|
function Le(e) {
|
|
878
878
|
e == null || e.focus({ preventScroll: !0 });
|
|
879
879
|
}
|
|
880
|
-
let
|
|
881
|
-
function
|
|
880
|
+
let pr = ["textarea", "input"].join(",");
|
|
881
|
+
function mr(e) {
|
|
882
882
|
var t, n;
|
|
883
|
-
return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e,
|
|
883
|
+
return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, pr)) != null ? n : !1;
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function Dn(e, t = (n) => n) {
|
|
886
886
|
return e.slice().sort((n, l) => {
|
|
887
887
|
let r = t(n), a = t(l);
|
|
888
888
|
if (r === null || a === null) return 0;
|
|
@@ -890,12 +890,12 @@ function An(e, t = (n) => n) {
|
|
|
890
890
|
return o & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
891
891
|
});
|
|
892
892
|
}
|
|
893
|
-
function
|
|
894
|
-
return
|
|
893
|
+
function gr(e, t) {
|
|
894
|
+
return Ge(Pn(), t, { relativeTo: e });
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function Ge(e, t, { sorted: n = !0, relativeTo: l = null, skipElements: r = [] } = {}) {
|
|
897
897
|
var a;
|
|
898
|
-
let o = (a = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? a : document, i = Array.isArray(e) ? n ?
|
|
898
|
+
let o = (a = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? a : document, i = Array.isArray(e) ? n ? Dn(e) : e : Pn(e);
|
|
899
899
|
r.length > 0 && i.length > 1 && (i = i.filter((p) => !r.includes(p))), l = l ?? o.activeElement;
|
|
900
900
|
let s = (() => {
|
|
901
901
|
if (t & 5) return 1;
|
|
@@ -918,28 +918,28 @@ function Ze(e, t, { sorted: n = !0, relativeTo: l = null, skipElements: r = [] }
|
|
|
918
918
|
}
|
|
919
919
|
v = i[p], v == null || v.focus(c), f += s;
|
|
920
920
|
} while (v !== o.activeElement);
|
|
921
|
-
return t & 6 &&
|
|
921
|
+
return t & 6 && mr(v) && v.select(), 2;
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function Rn() {
|
|
924
924
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function hr() {
|
|
927
927
|
return /Android/gi.test(window.navigator.userAgent);
|
|
928
928
|
}
|
|
929
|
-
function
|
|
930
|
-
return
|
|
929
|
+
function yr() {
|
|
930
|
+
return Rn() || hr();
|
|
931
931
|
}
|
|
932
932
|
function at(e, t, n) {
|
|
933
|
-
tt.isServer ||
|
|
933
|
+
tt.isServer || _((l) => {
|
|
934
934
|
document.addEventListener(e, t, n), l(() => document.removeEventListener(e, t, n));
|
|
935
935
|
});
|
|
936
936
|
}
|
|
937
|
-
function
|
|
938
|
-
tt.isServer ||
|
|
937
|
+
function Fn(e, t, n) {
|
|
938
|
+
tt.isServer || _((l) => {
|
|
939
939
|
window.addEventListener(e, t, n), l(() => window.removeEventListener(e, t, n));
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function Mn(e, t, n = w(() => !0)) {
|
|
943
943
|
function l(a, o) {
|
|
944
944
|
if (!n.value || a.defaultPrevented) return;
|
|
945
945
|
let i = o(a);
|
|
@@ -949,12 +949,12 @@ function Fn(e, t, n = w(() => !0)) {
|
|
|
949
949
|
}(e);
|
|
950
950
|
for (let u of s) {
|
|
951
951
|
if (u === null) continue;
|
|
952
|
-
let c = u instanceof HTMLElement ? u :
|
|
952
|
+
let c = u instanceof HTMLElement ? u : O(u);
|
|
953
953
|
if (c != null && c.contains(i) || a.composed && a.composedPath().includes(c)) return;
|
|
954
954
|
}
|
|
955
|
-
return !
|
|
955
|
+
return !Ht(i, Vt.Loose) && i.tabIndex !== -1 && a.preventDefault(), t(a, i);
|
|
956
956
|
}
|
|
957
|
-
let r =
|
|
957
|
+
let r = E(null);
|
|
958
958
|
at("pointerdown", (a) => {
|
|
959
959
|
var o, i;
|
|
960
960
|
n.value && (r.value = ((i = (o = a.composedPath) == null ? void 0 : o.call(a)) == null ? void 0 : i[0]) || a.target);
|
|
@@ -962,37 +962,37 @@ function Fn(e, t, n = w(() => !0)) {
|
|
|
962
962
|
var o, i;
|
|
963
963
|
n.value && (r.value = ((i = (o = a.composedPath) == null ? void 0 : o.call(a)) == null ? void 0 : i[0]) || a.target);
|
|
964
964
|
}, !0), at("click", (a) => {
|
|
965
|
-
|
|
966
|
-
}, !0), at("touchend", (a) => l(a, () => a.target instanceof HTMLElement ? a.target : null), !0),
|
|
965
|
+
yr() || r.value && (l(a, () => r.value), r.value = null);
|
|
966
|
+
}, !0), at("touchend", (a) => l(a, () => a.target instanceof HTMLElement ? a.target : null), !0), Fn("blur", (a) => l(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function on(e, t) {
|
|
969
969
|
if (e) return e;
|
|
970
970
|
let n = t ?? "button";
|
|
971
971
|
if (typeof n == "string" && n.toLowerCase() === "button") return "button";
|
|
972
972
|
}
|
|
973
|
-
function
|
|
974
|
-
let n =
|
|
973
|
+
function Bn(e, t) {
|
|
974
|
+
let n = E(on(e.value.type, e.value.as));
|
|
975
975
|
return z(() => {
|
|
976
|
-
n.value =
|
|
977
|
-
}),
|
|
976
|
+
n.value = on(e.value.type, e.value.as);
|
|
977
|
+
}), _(() => {
|
|
978
978
|
var l;
|
|
979
|
-
n.value ||
|
|
979
|
+
n.value || O(t) && O(t) instanceof HTMLButtonElement && !((l = O(t)) != null && l.hasAttribute("type")) && (n.value = "button");
|
|
980
980
|
}), n;
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function an(e) {
|
|
983
983
|
return [e.screenX, e.screenY];
|
|
984
984
|
}
|
|
985
|
-
function
|
|
986
|
-
let e =
|
|
985
|
+
function br() {
|
|
986
|
+
let e = E([-1, -1]);
|
|
987
987
|
return { wasMoved(t) {
|
|
988
|
-
let n =
|
|
988
|
+
let n = an(t);
|
|
989
989
|
return e.value[0] === n[0] && e.value[1] === n[1] ? !1 : (e.value = n, !0);
|
|
990
990
|
}, update(t) {
|
|
991
|
-
e.value =
|
|
991
|
+
e.value = an(t);
|
|
992
992
|
} };
|
|
993
993
|
}
|
|
994
|
-
function
|
|
995
|
-
|
|
994
|
+
function wr({ container: e, accept: t, walk: n, enabled: l }) {
|
|
995
|
+
_(() => {
|
|
996
996
|
let r = e.value;
|
|
997
997
|
if (!r || l !== void 0 && !l.value) return;
|
|
998
998
|
let a = Ae(e);
|
|
@@ -1001,37 +1001,37 @@ function br({ container: e, accept: t, walk: n, enabled: l }) {
|
|
|
1001
1001
|
for (; i.nextNode(); ) n(i.currentNode);
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
|
-
var
|
|
1004
|
+
var We = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(We || {}), ke = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(ke || {});
|
|
1005
1005
|
function q({ visible: e = !0, features: t = 0, ourProps: n, theirProps: l, ...r }) {
|
|
1006
1006
|
var a;
|
|
1007
|
-
let o =
|
|
1008
|
-
if (e || t & 2 && o.static) return
|
|
1007
|
+
let o = Nn(l, n), i = Object.assign(r, { props: o });
|
|
1008
|
+
if (e || t & 2 && o.static) return Et(i);
|
|
1009
1009
|
if (t & 1) {
|
|
1010
1010
|
let s = (a = o.unmount) == null || a ? 0 : 1;
|
|
1011
1011
|
return ge(s, { 0() {
|
|
1012
1012
|
return null;
|
|
1013
1013
|
}, 1() {
|
|
1014
|
-
return
|
|
1014
|
+
return Et({ ...r, props: { ...o, hidden: !0, style: { display: "none" } } });
|
|
1015
1015
|
} });
|
|
1016
1016
|
}
|
|
1017
|
-
return
|
|
1017
|
+
return Et(i);
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function Et({ props: e, attrs: t, slots: n, slot: l, name: r }) {
|
|
1020
1020
|
var a, o;
|
|
1021
|
-
let { as: i, ...s } =
|
|
1021
|
+
let { as: i, ...s } = Wt(e, ["unmount", "static"]), u = (a = n.default) == null ? void 0 : a.call(n, l), c = {};
|
|
1022
1022
|
if (l) {
|
|
1023
1023
|
let f = !1, d = [];
|
|
1024
1024
|
for (let [v, p] of Object.entries(l)) typeof p == "boolean" && (f = !0), p === !0 && d.push(v);
|
|
1025
1025
|
f && (c["data-headlessui-state"] = d.join(" "));
|
|
1026
1026
|
}
|
|
1027
1027
|
if (i === "template") {
|
|
1028
|
-
if (u =
|
|
1028
|
+
if (u = In(u ?? []), Object.keys(s).length > 0 || Object.keys(t).length > 0) {
|
|
1029
1029
|
let [f, ...d] = u ?? [];
|
|
1030
|
-
if (
|
|
1030
|
+
if (!xr(f) || d.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${r} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(s).concat(Object.keys(t)).map((m) => m.trim()).filter((m, h, y) => y.indexOf(m) === h).sort((m, h) => m.localeCompare(h)).map((m) => ` - ${m}`).join(`
|
|
1031
1031
|
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((m) => ` - ${m}`).join(`
|
|
1032
1032
|
`)].join(`
|
|
1033
1033
|
`));
|
|
1034
|
-
let v =
|
|
1034
|
+
let v = Nn((o = f.props) != null ? o : {}, s, c), p = hl(f, v, !0);
|
|
1035
1035
|
for (let m in v) m.startsWith("on") && (p.props || (p.props = {}), p.props[m] = v[m]);
|
|
1036
1036
|
return p;
|
|
1037
1037
|
}
|
|
@@ -1039,10 +1039,10 @@ function xt({ props: e, attrs: t, slots: n, slot: l, name: r }) {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
return K(i, Object.assign({}, s, c), { default: () => u });
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1043
|
-
return e.flatMap((t) => t.type ===
|
|
1042
|
+
function In(e) {
|
|
1043
|
+
return e.flatMap((t) => t.type === ie ? In(t.children) : [t]);
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1045
|
+
function Nn(...e) {
|
|
1046
1046
|
if (e.length === 0) return {};
|
|
1047
1047
|
if (e.length === 1) return e[0];
|
|
1048
1048
|
let t = {}, n = {};
|
|
@@ -1057,17 +1057,17 @@ function In(...e) {
|
|
|
1057
1057
|
} });
|
|
1058
1058
|
return t;
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function $r(e) {
|
|
1061
1061
|
let t = Object.assign({}, e);
|
|
1062
1062
|
for (let n in t) t[n] === void 0 && delete t[n];
|
|
1063
1063
|
return t;
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function Wt(e, t = []) {
|
|
1066
1066
|
let n = Object.assign({}, e);
|
|
1067
1067
|
for (let l of t) l in n && delete n[l];
|
|
1068
1068
|
return n;
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function xr(e) {
|
|
1071
1071
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
1072
1072
|
}
|
|
1073
1073
|
var Qe = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Qe || {});
|
|
@@ -1077,36 +1077,36 @@ let ct = W({ name: "Hidden", props: { as: { type: [Object, String], default: "di
|
|
|
1077
1077
|
let { features: r, ...a } = e, o = { "aria-hidden": (r & 2) === 2 ? !0 : (l = a["aria-hidden"]) != null ? l : void 0, hidden: (r & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
|
|
1078
1078
|
return q({ ourProps: o, theirProps: a, slot: {}, attrs: n, slots: t, name: "Hidden" });
|
|
1079
1079
|
};
|
|
1080
|
-
} }),
|
|
1081
|
-
var
|
|
1082
|
-
function
|
|
1083
|
-
return
|
|
1080
|
+
} }), jn = Symbol("Context");
|
|
1081
|
+
var G = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(G || {});
|
|
1082
|
+
function Sr() {
|
|
1083
|
+
return gt() !== null;
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return
|
|
1085
|
+
function gt() {
|
|
1086
|
+
return ee(jn, null);
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1089
|
-
ue(
|
|
1088
|
+
function Vn(e) {
|
|
1089
|
+
ue(jn, e);
|
|
1090
1090
|
}
|
|
1091
1091
|
var U = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(U || {});
|
|
1092
|
-
function
|
|
1092
|
+
function Er(e) {
|
|
1093
1093
|
function t() {
|
|
1094
1094
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
|
|
1095
1095
|
}
|
|
1096
1096
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
|
|
1097
1097
|
}
|
|
1098
1098
|
let Re = [];
|
|
1099
|
-
|
|
1099
|
+
Er(() => {
|
|
1100
1100
|
function e(t) {
|
|
1101
1101
|
t.target instanceof HTMLElement && t.target !== document.body && Re[0] !== t.target && (Re.unshift(t.target), Re = Re.filter((n) => n != null && n.isConnected), Re.splice(10));
|
|
1102
1102
|
}
|
|
1103
1103
|
window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
|
|
1104
1104
|
});
|
|
1105
|
-
function
|
|
1105
|
+
function Tr(e) {
|
|
1106
1106
|
throw new Error("Unexpected object: " + e);
|
|
1107
1107
|
}
|
|
1108
|
-
var
|
|
1109
|
-
function
|
|
1108
|
+
var ae = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(ae || {});
|
|
1109
|
+
function kr(e, t) {
|
|
1110
1110
|
let n = t.resolveItems();
|
|
1111
1111
|
if (n.length <= 0) return null;
|
|
1112
1112
|
let l = t.resolveActiveIndex(), r = l ?? -1;
|
|
@@ -1135,7 +1135,7 @@ function Tr(e, t) {
|
|
|
1135
1135
|
case 5:
|
|
1136
1136
|
return null;
|
|
1137
1137
|
default:
|
|
1138
|
-
|
|
1138
|
+
Tr(e);
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
1141
|
function Or(e) {
|
|
@@ -1149,48 +1149,48 @@ function Or(e) {
|
|
|
1149
1149
|
(n = l.requestSubmit) == null || n.call(l);
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1153
|
-
tt.isServer ||
|
|
1152
|
+
function Hn(e, t, n, l) {
|
|
1153
|
+
tt.isServer || _((r) => {
|
|
1154
1154
|
e = e ?? window, e.addEventListener(t, n, l), r(() => e.removeEventListener(t, n, l));
|
|
1155
1155
|
});
|
|
1156
1156
|
}
|
|
1157
|
-
var
|
|
1158
|
-
function
|
|
1159
|
-
let e =
|
|
1160
|
-
return
|
|
1157
|
+
var Ye = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(Ye || {});
|
|
1158
|
+
function Lr() {
|
|
1159
|
+
let e = E(0);
|
|
1160
|
+
return Fn("keydown", (t) => {
|
|
1161
1161
|
t.key === "Tab" && (e.value = t.shiftKey ? 1 : 0);
|
|
1162
1162
|
}), e;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function Wn(e) {
|
|
1165
1165
|
if (!e) return /* @__PURE__ */ new Set();
|
|
1166
1166
|
if (typeof e == "function") return new Set(e());
|
|
1167
1167
|
let t = /* @__PURE__ */ new Set();
|
|
1168
1168
|
for (let n of e.value) {
|
|
1169
|
-
let l =
|
|
1169
|
+
let l = O(n);
|
|
1170
1170
|
l instanceof HTMLElement && t.add(l);
|
|
1171
1171
|
}
|
|
1172
1172
|
return t;
|
|
1173
1173
|
}
|
|
1174
|
-
var
|
|
1175
|
-
let
|
|
1176
|
-
let r =
|
|
1174
|
+
var Un = ((e) => (e[e.None = 1] = "None", e[e.InitialFocus = 2] = "InitialFocus", e[e.TabLock = 4] = "TabLock", e[e.FocusLock = 8] = "FocusLock", e[e.RestoreFocus = 16] = "RestoreFocus", e[e.All = 30] = "All", e))(Un || {});
|
|
1175
|
+
let qe = Object.assign(W({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: [Object, Function], default: E(/* @__PURE__ */ new Set()) } }, inheritAttrs: !1, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
1176
|
+
let r = E(null);
|
|
1177
1177
|
l({ el: r, $el: r });
|
|
1178
|
-
let a = w(() => Ae(r)), o =
|
|
1179
|
-
z(() => o.value = !0), ce(() => o.value = !1),
|
|
1180
|
-
let i =
|
|
1181
|
-
|
|
1182
|
-
let s =
|
|
1178
|
+
let a = w(() => Ae(r)), o = E(!1);
|
|
1179
|
+
z(() => o.value = !0), ce(() => o.value = !1), Pr({ ownerDocument: a }, w(() => o.value && !!(e.features & 16)));
|
|
1180
|
+
let i = Ar({ ownerDocument: a, container: r, initialFocus: w(() => e.initialFocus) }, w(() => o.value && !!(e.features & 2)));
|
|
1181
|
+
Dr({ ownerDocument: a, container: r, containers: e.containers, previousActiveElement: i }, w(() => o.value && !!(e.features & 8)));
|
|
1182
|
+
let s = Lr();
|
|
1183
1183
|
function u(v) {
|
|
1184
|
-
let p =
|
|
1184
|
+
let p = O(r);
|
|
1185
1185
|
p && ((m) => m())(() => {
|
|
1186
|
-
ge(s.value, { [
|
|
1187
|
-
|
|
1188
|
-
}, [
|
|
1189
|
-
|
|
1186
|
+
ge(s.value, { [Ye.Forwards]: () => {
|
|
1187
|
+
Ge(p, we.First, { skipElements: [v.relatedTarget] });
|
|
1188
|
+
}, [Ye.Backwards]: () => {
|
|
1189
|
+
Ge(p, we.Last, { skipElements: [v.relatedTarget] });
|
|
1190
1190
|
} });
|
|
1191
1191
|
});
|
|
1192
1192
|
}
|
|
1193
|
-
let c =
|
|
1193
|
+
let c = E(!1);
|
|
1194
1194
|
function f(v) {
|
|
1195
1195
|
v.key === "Tab" && (c.value = !0, requestAnimationFrame(() => {
|
|
1196
1196
|
c.value = !1;
|
|
@@ -1198,20 +1198,20 @@ let ze = Object.assign(W({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
1198
1198
|
}
|
|
1199
1199
|
function d(v) {
|
|
1200
1200
|
if (!o.value) return;
|
|
1201
|
-
let p =
|
|
1202
|
-
|
|
1201
|
+
let p = Wn(e.containers);
|
|
1202
|
+
O(r) instanceof HTMLElement && p.add(O(r));
|
|
1203
1203
|
let m = v.relatedTarget;
|
|
1204
|
-
m instanceof HTMLElement && m.dataset.headlessuiFocusGuard !== "true" && (
|
|
1204
|
+
m instanceof HTMLElement && m.dataset.headlessuiFocusGuard !== "true" && (zn(p, m) || (c.value ? Ge(O(r), ge(s.value, { [Ye.Forwards]: () => we.Next, [Ye.Backwards]: () => we.Previous }) | we.WrapAround, { relativeTo: v.target }) : v.target instanceof HTMLElement && Le(v.target)));
|
|
1205
1205
|
}
|
|
1206
1206
|
return () => {
|
|
1207
|
-
let v = {}, p = { ref: r, onKeydown: f, onFocusout: d }, { features: m, initialFocus:
|
|
1208
|
-
return K(
|
|
1207
|
+
let v = {}, p = { ref: r, onKeydown: f, onFocusout: d }, { features: m, initialFocus: h, containers: y, ...b } = e;
|
|
1208
|
+
return K(ie, [!!(m & 4) && K(ct, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: u, features: Qe.Focusable }), q({ ourProps: p, theirProps: { ...t, ...b }, slot: v, attrs: t, slots: n, name: "FocusTrap" }), !!(m & 4) && K(ct, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: u, features: Qe.Focusable })]);
|
|
1209
1209
|
};
|
|
1210
|
-
} }), { features:
|
|
1211
|
-
function
|
|
1212
|
-
let t =
|
|
1210
|
+
} }), { features: Un });
|
|
1211
|
+
function Cr(e) {
|
|
1212
|
+
let t = E(Re.slice());
|
|
1213
1213
|
return me([e], ([n], [l]) => {
|
|
1214
|
-
l === !0 && n === !1 ?
|
|
1214
|
+
l === !0 && n === !1 ? jt(() => {
|
|
1215
1215
|
t.value.splice(0);
|
|
1216
1216
|
}) : l === !1 && n === !0 && (t.value = Re.slice());
|
|
1217
1217
|
}, { flush: "post" }), () => {
|
|
@@ -1219,10 +1219,10 @@ function Lr(e) {
|
|
|
1219
1219
|
return (n = t.value.find((l) => l != null && l.isConnected)) != null ? n : null;
|
|
1220
1220
|
};
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1223
|
-
let n =
|
|
1222
|
+
function Pr({ ownerDocument: e }, t) {
|
|
1223
|
+
let n = Cr(t);
|
|
1224
1224
|
z(() => {
|
|
1225
|
-
|
|
1225
|
+
_(() => {
|
|
1226
1226
|
var l, r;
|
|
1227
1227
|
t.value || ((l = e.value) == null ? void 0 : l.activeElement) === ((r = e.value) == null ? void 0 : r.body) && Le(n());
|
|
1228
1228
|
}, { flush: "post" });
|
|
@@ -1230,16 +1230,16 @@ function Cr({ ownerDocument: e }, t) {
|
|
|
1230
1230
|
t.value && Le(n());
|
|
1231
1231
|
});
|
|
1232
1232
|
}
|
|
1233
|
-
function
|
|
1234
|
-
let r =
|
|
1233
|
+
function Ar({ ownerDocument: e, container: t, initialFocus: n }, l) {
|
|
1234
|
+
let r = E(null), a = E(!1);
|
|
1235
1235
|
return z(() => a.value = !0), ce(() => a.value = !1), z(() => {
|
|
1236
1236
|
me([t, n, l], (o, i) => {
|
|
1237
1237
|
if (o.every((u, c) => (i == null ? void 0 : i[c]) === u) || !l.value) return;
|
|
1238
|
-
let s =
|
|
1239
|
-
s &&
|
|
1238
|
+
let s = O(t);
|
|
1239
|
+
s && jt(() => {
|
|
1240
1240
|
var u, c;
|
|
1241
1241
|
if (!a.value) return;
|
|
1242
|
-
let f =
|
|
1242
|
+
let f = O(n), d = (u = e.value) == null ? void 0 : u.activeElement;
|
|
1243
1243
|
if (f) {
|
|
1244
1244
|
if (f === d) {
|
|
1245
1245
|
r.value = d;
|
|
@@ -1249,34 +1249,34 @@ function Pr({ ownerDocument: e, container: t, initialFocus: n }, l) {
|
|
|
1249
1249
|
r.value = d;
|
|
1250
1250
|
return;
|
|
1251
1251
|
}
|
|
1252
|
-
f ? Le(f) :
|
|
1252
|
+
f ? Le(f) : Ge(s, we.First | we.NoScroll) === Cn.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), r.value = (c = e.value) == null ? void 0 : c.activeElement;
|
|
1253
1253
|
});
|
|
1254
1254
|
}, { immediate: !0, flush: "post" });
|
|
1255
1255
|
}), r;
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function Dr({ ownerDocument: e, container: t, containers: n, previousActiveElement: l }, r) {
|
|
1258
1258
|
var a;
|
|
1259
|
-
|
|
1259
|
+
Hn((a = e.value) == null ? void 0 : a.defaultView, "focus", (o) => {
|
|
1260
1260
|
if (!r.value) return;
|
|
1261
|
-
let i =
|
|
1262
|
-
|
|
1261
|
+
let i = Wn(n);
|
|
1262
|
+
O(t) instanceof HTMLElement && i.add(O(t));
|
|
1263
1263
|
let s = l.value;
|
|
1264
1264
|
if (!s) return;
|
|
1265
1265
|
let u = o.target;
|
|
1266
|
-
u && u instanceof HTMLElement ?
|
|
1266
|
+
u && u instanceof HTMLElement ? zn(i, u) ? (l.value = u, Le(u)) : (o.preventDefault(), o.stopPropagation(), Le(s)) : Le(l.value);
|
|
1267
1267
|
}, !0);
|
|
1268
1268
|
}
|
|
1269
|
-
function
|
|
1269
|
+
function zn(e, t) {
|
|
1270
1270
|
for (let n of e) if (n.contains(t)) return !0;
|
|
1271
1271
|
return !1;
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1274
|
-
let t =
|
|
1273
|
+
function Rr(e) {
|
|
1274
|
+
let t = Ze(e.getSnapshot());
|
|
1275
1275
|
return ce(e.subscribe(() => {
|
|
1276
1276
|
t.value = e.getSnapshot();
|
|
1277
1277
|
})), t;
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function Fr(e, t) {
|
|
1280
1280
|
let n = e(), l = /* @__PURE__ */ new Set();
|
|
1281
1281
|
return { getSnapshot() {
|
|
1282
1282
|
return n;
|
|
@@ -1287,7 +1287,7 @@ function Rr(e, t) {
|
|
|
1287
1287
|
o && (n = o, l.forEach((i) => i()));
|
|
1288
1288
|
} };
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function Mr() {
|
|
1291
1291
|
let e;
|
|
1292
1292
|
return { before({ doc: t }) {
|
|
1293
1293
|
var n;
|
|
@@ -1298,8 +1298,8 @@ function Fr() {
|
|
|
1298
1298
|
n.style(l, "paddingRight", `${a}px`);
|
|
1299
1299
|
} };
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1302
|
-
return
|
|
1301
|
+
function Br() {
|
|
1302
|
+
return Rn() ? { before({ doc: e, d: t, meta: n }) {
|
|
1303
1303
|
function l(r) {
|
|
1304
1304
|
return n.containers.flatMap((a) => a()).some((a) => a.contains(r));
|
|
1305
1305
|
}
|
|
@@ -1341,17 +1341,17 @@ function Mr() {
|
|
|
1341
1341
|
});
|
|
1342
1342
|
} } : {};
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function Ir() {
|
|
1345
1345
|
return { before({ doc: e, d: t }) {
|
|
1346
1346
|
t.style(e.documentElement, "overflow", "hidden");
|
|
1347
1347
|
} };
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function Nr(e) {
|
|
1350
1350
|
let t = {};
|
|
1351
1351
|
for (let n of e) Object.assign(t, n(t));
|
|
1352
1352
|
return t;
|
|
1353
1353
|
}
|
|
1354
|
-
let Fe =
|
|
1354
|
+
let Fe = Fr(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
|
|
1355
1355
|
var n;
|
|
1356
1356
|
let l = (n = this.get(e)) != null ? n : { doc: e, count: 0, d: et(), meta: /* @__PURE__ */ new Set() };
|
|
1357
1357
|
return l.count++, l.meta.add(t), this.set(e, l), this;
|
|
@@ -1359,7 +1359,7 @@ let Fe = Rr(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
|
|
|
1359
1359
|
let n = this.get(e);
|
|
1360
1360
|
return n && (n.count--, n.meta.delete(t)), this;
|
|
1361
1361
|
}, SCROLL_PREVENT({ doc: e, d: t, meta: n }) {
|
|
1362
|
-
let l = { doc: e, d: t, meta:
|
|
1362
|
+
let l = { doc: e, d: t, meta: Nr(n) }, r = [Br(), Mr(), Ir()];
|
|
1363
1363
|
r.forEach(({ before: a }) => a == null ? void 0 : a(l)), r.forEach(({ after: a }) => a == null ? void 0 : a(l));
|
|
1364
1364
|
}, SCROLL_ALLOW({ d: e }) {
|
|
1365
1365
|
e.dispose();
|
|
@@ -1374,8 +1374,8 @@ Fe.subscribe(() => {
|
|
|
1374
1374
|
(r && !l || !r && l) && Fe.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && Fe.dispatch("TEARDOWN", n);
|
|
1375
1375
|
}
|
|
1376
1376
|
});
|
|
1377
|
-
function
|
|
1378
|
-
let l =
|
|
1377
|
+
function jr(e, t, n) {
|
|
1378
|
+
let l = Rr(Fe), r = w(() => {
|
|
1379
1379
|
let a = e.value ? l.value.get(e.value) : void 0;
|
|
1380
1380
|
return a ? a.count > 0 : !1;
|
|
1381
1381
|
});
|
|
@@ -1388,33 +1388,33 @@ function Nr(e, t, n) {
|
|
|
1388
1388
|
});
|
|
1389
1389
|
}, { immediate: !0 }), r;
|
|
1390
1390
|
}
|
|
1391
|
-
let
|
|
1392
|
-
function
|
|
1393
|
-
|
|
1391
|
+
let Tt = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Map();
|
|
1392
|
+
function sn(e, t = E(!0)) {
|
|
1393
|
+
_((n) => {
|
|
1394
1394
|
var l;
|
|
1395
1395
|
if (!t.value) return;
|
|
1396
|
-
let r =
|
|
1396
|
+
let r = O(e);
|
|
1397
1397
|
if (!r) return;
|
|
1398
1398
|
n(function() {
|
|
1399
1399
|
var o;
|
|
1400
1400
|
if (!r) return;
|
|
1401
|
-
let i = (o =
|
|
1402
|
-
if (i === 1 ?
|
|
1403
|
-
let s =
|
|
1404
|
-
s && (s["aria-hidden"] === null ? r.removeAttribute("aria-hidden") : r.setAttribute("aria-hidden", s["aria-hidden"]), r.inert = s.inert,
|
|
1401
|
+
let i = (o = Ke.get(r)) != null ? o : 1;
|
|
1402
|
+
if (i === 1 ? Ke.delete(r) : Ke.set(r, i - 1), i !== 1) return;
|
|
1403
|
+
let s = Tt.get(r);
|
|
1404
|
+
s && (s["aria-hidden"] === null ? r.removeAttribute("aria-hidden") : r.setAttribute("aria-hidden", s["aria-hidden"]), r.inert = s.inert, Tt.delete(r));
|
|
1405
1405
|
});
|
|
1406
|
-
let a = (l =
|
|
1407
|
-
|
|
1406
|
+
let a = (l = Ke.get(r)) != null ? l : 0;
|
|
1407
|
+
Ke.set(r, a + 1), a === 0 && (Tt.set(r, { "aria-hidden": r.getAttribute("aria-hidden"), inert: r.inert }), r.setAttribute("aria-hidden", "true"), r.inert = !0);
|
|
1408
1408
|
});
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1411
|
-
let l =
|
|
1410
|
+
function Vr({ defaultContainers: e = [], portals: t, mainTreeNodeRef: n } = {}) {
|
|
1411
|
+
let l = E(null), r = Ae(l);
|
|
1412
1412
|
function a() {
|
|
1413
1413
|
var o, i, s;
|
|
1414
1414
|
let u = [];
|
|
1415
1415
|
for (let c of e) c !== null && (c instanceof HTMLElement ? u.push(c) : "value" in c && c.value instanceof HTMLElement && u.push(c.value));
|
|
1416
1416
|
if (t != null && t.value) for (let c of t.value) u.push(c);
|
|
1417
|
-
for (let c of (o = r == null ? void 0 : r.querySelectorAll("html > *, body > *")) != null ? o : []) c !== document.body && c !== document.head && c instanceof HTMLElement && c.id !== "headlessui-portal-root" && (c.contains(
|
|
1417
|
+
for (let c of (o = r == null ? void 0 : r.querySelectorAll("html > *, body > *")) != null ? o : []) c !== document.body && c !== document.head && c instanceof HTMLElement && c.id !== "headlessui-portal-root" && (c.contains(O(l)) || c.contains((s = (i = O(l)) == null ? void 0 : i.getRootNode()) == null ? void 0 : s.host) || u.some((f) => c.contains(f)) || u.push(c));
|
|
1418
1418
|
return u;
|
|
1419
1419
|
}
|
|
1420
1420
|
return { resolveContainers: a, contains(o) {
|
|
@@ -1423,23 +1423,23 @@ function jr({ defaultContainers: e = [], portals: t, mainTreeNodeRef: n } = {})
|
|
|
1423
1423
|
return n != null ? null : K(ct, { features: Qe.Hidden, ref: l });
|
|
1424
1424
|
} };
|
|
1425
1425
|
}
|
|
1426
|
-
let
|
|
1427
|
-
function
|
|
1428
|
-
return
|
|
1426
|
+
let qn = Symbol("ForcePortalRootContext");
|
|
1427
|
+
function Hr() {
|
|
1428
|
+
return ee(qn, !1);
|
|
1429
1429
|
}
|
|
1430
|
-
let
|
|
1431
|
-
return ue(
|
|
1430
|
+
let Ct = W({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: !1 } }, setup(e, { slots: t, attrs: n }) {
|
|
1431
|
+
return ue(qn, e.force), () => {
|
|
1432
1432
|
let { force: l, ...r } = e;
|
|
1433
1433
|
return q({ theirProps: r, ourProps: {}, slot: {}, slots: t, attrs: n, name: "ForcePortalRoot" });
|
|
1434
1434
|
};
|
|
1435
|
-
} }),
|
|
1436
|
-
var
|
|
1437
|
-
function
|
|
1438
|
-
return
|
|
1435
|
+
} }), Kn = Symbol("StackContext");
|
|
1436
|
+
var Pt = ((e) => (e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e))(Pt || {});
|
|
1437
|
+
function Wr() {
|
|
1438
|
+
return ee(Kn, () => {
|
|
1439
1439
|
});
|
|
1440
1440
|
}
|
|
1441
|
-
function
|
|
1442
|
-
let r =
|
|
1441
|
+
function Ur({ type: e, enabled: t, element: n, onUpdate: l }) {
|
|
1442
|
+
let r = Wr();
|
|
1443
1443
|
function a(...o) {
|
|
1444
1444
|
l == null || l(...o), r(...o);
|
|
1445
1445
|
}
|
|
@@ -1449,33 +1449,33 @@ function Wr({ type: e, enabled: t, element: n, onUpdate: l }) {
|
|
|
1449
1449
|
}, { immediate: !0, flush: "sync" });
|
|
1450
1450
|
}), ce(() => {
|
|
1451
1451
|
t.value && a(1, e, n);
|
|
1452
|
-
}), ue(
|
|
1452
|
+
}), ue(Kn, a);
|
|
1453
1453
|
}
|
|
1454
|
-
let
|
|
1455
|
-
function
|
|
1456
|
-
let e =
|
|
1454
|
+
let Yn = Symbol("DescriptionContext");
|
|
1455
|
+
function zr() {
|
|
1456
|
+
let e = ee(Yn, null);
|
|
1457
1457
|
if (e === null) throw new Error("Missing parent");
|
|
1458
1458
|
return e;
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1461
|
-
let l =
|
|
1460
|
+
function Zn({ slot: e = E({}), name: t = "Description", props: n = {} } = {}) {
|
|
1461
|
+
let l = E([]);
|
|
1462
1462
|
function r(a) {
|
|
1463
1463
|
return l.value.push(a), () => {
|
|
1464
1464
|
let o = l.value.indexOf(a);
|
|
1465
1465
|
o !== -1 && l.value.splice(o, 1);
|
|
1466
1466
|
};
|
|
1467
1467
|
}
|
|
1468
|
-
return ue(
|
|
1468
|
+
return ue(Yn, { register: r, slot: e, name: t, props: n }), w(() => l.value.length > 0 ? l.value.join(" ") : void 0);
|
|
1469
1469
|
}
|
|
1470
1470
|
W({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
1471
1471
|
var l;
|
|
1472
|
-
let r = (l = e.id) != null ? l : `headlessui-description-${ve()}`, a =
|
|
1472
|
+
let r = (l = e.id) != null ? l : `headlessui-description-${ve()}`, a = zr();
|
|
1473
1473
|
return z(() => ce(a.register(r))), () => {
|
|
1474
|
-
let { name: o = "Description", slot: i =
|
|
1474
|
+
let { name: o = "Description", slot: i = E({}), props: s = {} } = a, { ...u } = e, c = { ...Object.entries(s).reduce((f, [d, v]) => Object.assign(f, { [d]: $(v) }), {}), id: r };
|
|
1475
1475
|
return q({ ourProps: c, theirProps: u, slot: i.value, attrs: t, slots: n, name: o });
|
|
1476
1476
|
};
|
|
1477
1477
|
} });
|
|
1478
|
-
function
|
|
1478
|
+
function qr(e) {
|
|
1479
1479
|
let t = Ae(e);
|
|
1480
1480
|
if (!t) {
|
|
1481
1481
|
if (e === null) return null;
|
|
@@ -1486,41 +1486,41 @@ function zr(e) {
|
|
|
1486
1486
|
let l = t.createElement("div");
|
|
1487
1487
|
return l.setAttribute("id", "headlessui-portal-root"), t.body.appendChild(l);
|
|
1488
1488
|
}
|
|
1489
|
-
const
|
|
1490
|
-
function
|
|
1489
|
+
const At = /* @__PURE__ */ new WeakMap();
|
|
1490
|
+
function Kr(e) {
|
|
1491
1491
|
var t;
|
|
1492
|
-
return (t =
|
|
1492
|
+
return (t = At.get(e)) != null ? t : 0;
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1495
|
-
let n = t(
|
|
1496
|
-
return n <= 0 ?
|
|
1494
|
+
function un(e, t) {
|
|
1495
|
+
let n = t(Kr(e));
|
|
1496
|
+
return n <= 0 ? At.delete(e) : At.set(e, n), n;
|
|
1497
1497
|
}
|
|
1498
|
-
let
|
|
1499
|
-
let l =
|
|
1500
|
-
i.value &&
|
|
1501
|
-
let s =
|
|
1498
|
+
let Gn = W({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: n }) {
|
|
1499
|
+
let l = E(null), r = w(() => Ae(l)), a = Hr(), o = ee(Xn, null), i = E(a === !0 || o == null ? qr(l.value) : o.resolveTarget());
|
|
1500
|
+
i.value && un(i.value, (d) => d + 1);
|
|
1501
|
+
let s = E(!1);
|
|
1502
1502
|
z(() => {
|
|
1503
1503
|
s.value = !0;
|
|
1504
|
-
}),
|
|
1504
|
+
}), _(() => {
|
|
1505
1505
|
a || o != null && (i.value = o.resolveTarget());
|
|
1506
1506
|
});
|
|
1507
|
-
let u =
|
|
1507
|
+
let u = ee(Dt, null), c = !1, f = Sn();
|
|
1508
1508
|
return me(l, () => {
|
|
1509
1509
|
if (c || !u) return;
|
|
1510
|
-
let d =
|
|
1510
|
+
let d = O(l);
|
|
1511
1511
|
d && (ce(u.register(d), f), c = !0);
|
|
1512
1512
|
}), ce(() => {
|
|
1513
1513
|
var d, v;
|
|
1514
1514
|
let p = (d = r.value) == null ? void 0 : d.getElementById("headlessui-portal-root");
|
|
1515
|
-
!p || i.value !== p ||
|
|
1515
|
+
!p || i.value !== p || un(i.value, (m) => m - 1) || i.value.children.length > 0 || (v = i.value.parentElement) == null || v.removeChild(i.value);
|
|
1516
1516
|
}), () => {
|
|
1517
1517
|
if (!s.value || i.value === null) return null;
|
|
1518
1518
|
let d = { ref: l, "data-headlessui-portal": "" };
|
|
1519
1519
|
return K(yl, { to: i.value }, q({ ourProps: d, theirProps: e, slot: {}, attrs: n, slots: t, name: "Portal" }));
|
|
1520
1520
|
};
|
|
1521
|
-
} }),
|
|
1522
|
-
function
|
|
1523
|
-
let e =
|
|
1521
|
+
} }), Dt = Symbol("PortalParentContext");
|
|
1522
|
+
function Yr() {
|
|
1523
|
+
let e = ee(Dt, null), t = E([]);
|
|
1524
1524
|
function n(a) {
|
|
1525
1525
|
return t.value.push(a), e && e.register(a), () => l(a);
|
|
1526
1526
|
}
|
|
@@ -1530,87 +1530,87 @@ function Kr() {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
let r = { register: n, unregister: l, portals: t };
|
|
1532
1532
|
return [t, W({ name: "PortalWrapper", setup(a, { slots: o }) {
|
|
1533
|
-
return ue(
|
|
1533
|
+
return ue(Dt, r), () => {
|
|
1534
1534
|
var i;
|
|
1535
1535
|
return (i = o.default) == null ? void 0 : i.call(o);
|
|
1536
1536
|
};
|
|
1537
1537
|
} })];
|
|
1538
1538
|
}
|
|
1539
|
-
let
|
|
1539
|
+
let Xn = Symbol("PortalGroupContext"), Zr = W({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
1540
1540
|
let l = bl({ resolveTarget() {
|
|
1541
1541
|
return e.target;
|
|
1542
1542
|
} });
|
|
1543
|
-
return ue(
|
|
1543
|
+
return ue(Xn, l), () => {
|
|
1544
1544
|
let { target: r, ...a } = e;
|
|
1545
1545
|
return q({ theirProps: a, ourProps: {}, slot: {}, attrs: t, slots: n, name: "PortalGroup" });
|
|
1546
1546
|
};
|
|
1547
1547
|
} });
|
|
1548
|
-
var
|
|
1549
|
-
let
|
|
1548
|
+
var Gr = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Gr || {});
|
|
1549
|
+
let Rt = Symbol("DialogContext");
|
|
1550
1550
|
function nt(e) {
|
|
1551
|
-
let t =
|
|
1551
|
+
let t = ee(Rt, null);
|
|
1552
1552
|
if (t === null) {
|
|
1553
1553
|
let n = new Error(`<${e} /> is missing a parent <Dialog /> component.`);
|
|
1554
1554
|
throw Error.captureStackTrace && Error.captureStackTrace(n, nt), n;
|
|
1555
1555
|
}
|
|
1556
1556
|
return t;
|
|
1557
1557
|
}
|
|
1558
|
-
let it = "DC8F892D-2EBD-447C-A4C8-A03058436FF4",
|
|
1558
|
+
let it = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Qn = W({ name: "Dialog", inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, open: { type: [Boolean, String], default: it }, initialFocus: { type: Object, default: null }, id: { type: String, default: null }, role: { type: String, default: "dialog" } }, emits: { close: (e) => !0 }, setup(e, { emit: t, attrs: n, slots: l, expose: r }) {
|
|
1559
1559
|
var a, o;
|
|
1560
|
-
let i = (a = e.id) != null ? a : `headlessui-dialog-${ve()}`, s =
|
|
1560
|
+
let i = (a = e.id) != null ? a : `headlessui-dialog-${ve()}`, s = E(!1);
|
|
1561
1561
|
z(() => {
|
|
1562
1562
|
s.value = !0;
|
|
1563
1563
|
});
|
|
1564
|
-
let u = !1, c = w(() => e.role === "dialog" || e.role === "alertdialog" ? e.role : (u || (u = !0, console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog")), f =
|
|
1564
|
+
let u = !1, c = w(() => e.role === "dialog" || e.role === "alertdialog" ? e.role : (u || (u = !0, console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog")), f = E(0), d = gt(), v = w(() => e.open === it && d !== null ? (d.value & G.Open) === G.Open : e.open), p = E(null), m = w(() => Ae(p));
|
|
1565
1565
|
if (r({ el: p, $el: p }), !(e.open !== it || d !== null)) throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
|
|
1566
1566
|
if (typeof v.value != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${v.value === it ? void 0 : e.open}`);
|
|
1567
|
-
let
|
|
1568
|
-
var
|
|
1569
|
-
return (
|
|
1570
|
-
})] }), X = w(() =>
|
|
1571
|
-
var
|
|
1572
|
-
return (de = Array.from((H = (
|
|
1567
|
+
let h = w(() => s.value && v.value ? 0 : 1), y = w(() => h.value === 0), b = w(() => f.value > 1), T = ee(Rt, null) !== null, [A, C] = Yr(), { resolveContainers: I, mainTreeNodeRef: L, MainTreeNode: j } = Vr({ portals: A, defaultContainers: [w(() => {
|
|
1568
|
+
var F;
|
|
1569
|
+
return (F = be.panelRef.value) != null ? F : p.value;
|
|
1570
|
+
})] }), X = w(() => b.value ? "parent" : "leaf"), V = w(() => d !== null ? (d.value & G.Closing) === G.Closing : !1), Q = w(() => T || V.value ? !1 : y.value), te = w(() => {
|
|
1571
|
+
var F, H, de;
|
|
1572
|
+
return (de = Array.from((H = (F = m.value) == null ? void 0 : F.querySelectorAll("body > *")) != null ? H : []).find((fe) => fe.id === "headlessui-portal-root" ? !1 : fe.contains(O(L)) && fe instanceof HTMLElement)) != null ? de : null;
|
|
1573
1573
|
});
|
|
1574
|
-
|
|
1575
|
-
let
|
|
1576
|
-
var
|
|
1577
|
-
return (de = Array.from((H = (
|
|
1574
|
+
sn(te, Q);
|
|
1575
|
+
let Z = w(() => b.value ? !0 : y.value), ne = w(() => {
|
|
1576
|
+
var F, H, de;
|
|
1577
|
+
return (de = Array.from((H = (F = m.value) == null ? void 0 : F.querySelectorAll("[data-headlessui-portal]")) != null ? H : []).find((fe) => fe.contains(O(L)) && fe instanceof HTMLElement)) != null ? de : null;
|
|
1578
1578
|
});
|
|
1579
|
-
|
|
1580
|
-
if (H === "Dialog") return ge(
|
|
1579
|
+
sn(ne, Z), Ur({ type: "Dialog", enabled: w(() => h.value === 0), element: p, onUpdate: (F, H) => {
|
|
1580
|
+
if (H === "Dialog") return ge(F, { [Pt.Add]: () => f.value += 1, [Pt.Remove]: () => f.value -= 1 });
|
|
1581
1581
|
} });
|
|
1582
|
-
let
|
|
1583
|
-
|
|
1582
|
+
let le = Zn({ name: "DialogDescription", slot: w(() => ({ open: v.value })) }), re = E(null), be = { titleId: re, panelRef: E(null), dialogState: h, setTitleId(F) {
|
|
1583
|
+
re.value !== F && (re.value = F);
|
|
1584
1584
|
}, close() {
|
|
1585
1585
|
t("close", !1);
|
|
1586
1586
|
} };
|
|
1587
|
-
ue(
|
|
1588
|
-
let
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
},
|
|
1592
|
-
let
|
|
1593
|
-
|
|
1594
|
-
|
|
1587
|
+
ue(Rt, be);
|
|
1588
|
+
let _t = w(() => !(!y.value || b.value));
|
|
1589
|
+
Mn(I, (F, H) => {
|
|
1590
|
+
F.preventDefault(), be.close(), Oe(() => H == null ? void 0 : H.focus());
|
|
1591
|
+
}, _t);
|
|
1592
|
+
let en = w(() => !(b.value || h.value !== 0));
|
|
1593
|
+
Hn((o = m.value) == null ? void 0 : o.defaultView, "keydown", (F) => {
|
|
1594
|
+
en.value && (F.defaultPrevented || F.key === U.Escape && (F.preventDefault(), F.stopPropagation(), be.close()));
|
|
1595
1595
|
});
|
|
1596
|
-
let
|
|
1597
|
-
return
|
|
1596
|
+
let tn = w(() => !(V.value || h.value !== 0 || T));
|
|
1597
|
+
return jr(m, tn, (F) => {
|
|
1598
1598
|
var H;
|
|
1599
|
-
return { containers: [...(H =
|
|
1600
|
-
}),
|
|
1601
|
-
if (
|
|
1602
|
-
let H =
|
|
1599
|
+
return { containers: [...(H = F.containers) != null ? H : [], I] };
|
|
1600
|
+
}), _((F) => {
|
|
1601
|
+
if (h.value !== 0) return;
|
|
1602
|
+
let H = O(p);
|
|
1603
1603
|
if (!H) return;
|
|
1604
1604
|
let de = new ResizeObserver((fe) => {
|
|
1605
|
-
for (let
|
|
1606
|
-
let ot =
|
|
1605
|
+
for (let St of fe) {
|
|
1606
|
+
let ot = St.target.getBoundingClientRect();
|
|
1607
1607
|
ot.x === 0 && ot.y === 0 && ot.width === 0 && ot.height === 0 && be.close();
|
|
1608
1608
|
}
|
|
1609
1609
|
});
|
|
1610
|
-
de.observe(H),
|
|
1610
|
+
de.observe(H), F(() => de.disconnect());
|
|
1611
1611
|
}), () => {
|
|
1612
|
-
let { open:
|
|
1613
|
-
return K(
|
|
1612
|
+
let { open: F, initialFocus: H, ...de } = e, fe = { ...n, ref: p, id: i, role: c.value, "aria-modal": h.value === 0 ? !0 : void 0, "aria-labelledby": re.value, "aria-describedby": le.value }, St = { open: h.value === 0 };
|
|
1613
|
+
return K(Ct, { force: !0 }, () => [K(Gn, () => K(Zr, { target: p.value }, () => K(Ct, { force: !1 }, () => K(qe, { initialFocus: H, containers: I, features: y.value ? ge(X.value, { parent: qe.features.RestoreFocus, leaf: qe.features.All & ~qe.features.FocusLock }) : qe.features.None }, () => K(C, {}, () => q({ ourProps: fe, theirProps: { ...de, ...n }, slot: St, attrs: n, slots: l, visible: h.value === 0, features: We.RenderStrategy | We.Static, name: "Dialog" })))))), K(j)]);
|
|
1614
1614
|
};
|
|
1615
1615
|
} });
|
|
1616
1616
|
W({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
@@ -1626,15 +1626,15 @@ W({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div"
|
|
|
1626
1626
|
} });
|
|
1627
1627
|
W({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, inheritAttrs: !1, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
1628
1628
|
var r;
|
|
1629
|
-
let a = (r = e.id) != null ? r : `headlessui-dialog-backdrop-${ve()}`, o = nt("DialogBackdrop"), i =
|
|
1629
|
+
let a = (r = e.id) != null ? r : `headlessui-dialog-backdrop-${ve()}`, o = nt("DialogBackdrop"), i = E(null);
|
|
1630
1630
|
return l({ el: i, $el: i }), z(() => {
|
|
1631
1631
|
if (o.panelRef.value === null) throw new Error("A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.");
|
|
1632
1632
|
}), () => {
|
|
1633
1633
|
let { ...s } = e, u = { id: a, ref: i, "aria-hidden": !0 };
|
|
1634
|
-
return K(
|
|
1634
|
+
return K(Ct, { force: !0 }, () => K(Gn, () => q({ ourProps: u, theirProps: { ...t, ...s }, slot: { open: o.dialogState.value === 0 }, attrs: t, slots: n, name: "DialogBackdrop" })));
|
|
1635
1635
|
};
|
|
1636
1636
|
} });
|
|
1637
|
-
let
|
|
1637
|
+
let Jn = W({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
1638
1638
|
var r;
|
|
1639
1639
|
let a = (r = e.id) != null ? r : `headlessui-dialog-panel-${ve()}`, o = nt("DialogPanel");
|
|
1640
1640
|
l({ el: o.panelRef, $el: o.panelRef });
|
|
@@ -1645,7 +1645,7 @@ let Qn = W({ name: "DialogPanel", props: { as: { type: [Object, String], default
|
|
|
1645
1645
|
let { ...s } = e, u = { id: a, ref: o.panelRef, onClick: i };
|
|
1646
1646
|
return q({ ourProps: u, theirProps: s, slot: { open: o.dialogState.value === 0 }, attrs: t, slots: n, name: "DialogPanel" });
|
|
1647
1647
|
};
|
|
1648
|
-
} }),
|
|
1648
|
+
} }), _n = W({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
1649
1649
|
var l;
|
|
1650
1650
|
let r = (l = e.id) != null ? l : `headlessui-dialog-title-${ve()}`, a = nt("DialogTitle");
|
|
1651
1651
|
return z(() => {
|
|
@@ -1654,17 +1654,17 @@ let Qn = W({ name: "DialogPanel", props: { as: { type: [Object, String], default
|
|
|
1654
1654
|
let { ...o } = e;
|
|
1655
1655
|
return q({ ourProps: { id: r }, theirProps: o, slot: { open: a.dialogState.value === 0 }, attrs: t, slots: n, name: "DialogTitle" });
|
|
1656
1656
|
};
|
|
1657
|
-
} }),
|
|
1658
|
-
function
|
|
1657
|
+
} }), cn = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
1658
|
+
function dn(e) {
|
|
1659
1659
|
var t, n;
|
|
1660
1660
|
let l = (t = e.innerText) != null ? t : "", r = e.cloneNode(!0);
|
|
1661
1661
|
if (!(r instanceof HTMLElement)) return l;
|
|
1662
1662
|
let a = !1;
|
|
1663
1663
|
for (let i of r.querySelectorAll('[hidden],[aria-hidden],[role="img"]')) i.remove(), a = !0;
|
|
1664
1664
|
let o = a ? (n = r.innerText) != null ? n : "" : l;
|
|
1665
|
-
return
|
|
1665
|
+
return cn.test(o) && (o = o.replace(cn, "")), o;
|
|
1666
1666
|
}
|
|
1667
|
-
function
|
|
1667
|
+
function Xr(e) {
|
|
1668
1668
|
let t = e.getAttribute("aria-label");
|
|
1669
1669
|
if (typeof t == "string") return t.trim();
|
|
1670
1670
|
let n = e.getAttribute("aria-labelledby");
|
|
@@ -1673,53 +1673,53 @@ function Gr(e) {
|
|
|
1673
1673
|
let a = document.getElementById(r);
|
|
1674
1674
|
if (a) {
|
|
1675
1675
|
let o = a.getAttribute("aria-label");
|
|
1676
|
-
return typeof o == "string" ? o.trim() :
|
|
1676
|
+
return typeof o == "string" ? o.trim() : dn(a).trim();
|
|
1677
1677
|
}
|
|
1678
1678
|
return null;
|
|
1679
1679
|
}).filter(Boolean);
|
|
1680
1680
|
if (l.length > 0) return l.join(", ");
|
|
1681
1681
|
}
|
|
1682
|
-
return
|
|
1682
|
+
return dn(e).trim();
|
|
1683
1683
|
}
|
|
1684
|
-
function
|
|
1685
|
-
let t =
|
|
1684
|
+
function Qr(e) {
|
|
1685
|
+
let t = E(""), n = E("");
|
|
1686
1686
|
return () => {
|
|
1687
|
-
let l =
|
|
1687
|
+
let l = O(e);
|
|
1688
1688
|
if (!l) return "";
|
|
1689
1689
|
let r = l.innerText;
|
|
1690
1690
|
if (t.value === r) return n.value;
|
|
1691
|
-
let a =
|
|
1691
|
+
let a = Xr(l).trim().toLowerCase();
|
|
1692
1692
|
return t.value = r, n.value = a, a;
|
|
1693
1693
|
};
|
|
1694
1694
|
}
|
|
1695
|
-
var
|
|
1696
|
-
function
|
|
1695
|
+
var Jr = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Jr || {}), _r = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(_r || {});
|
|
1696
|
+
function eo(e) {
|
|
1697
1697
|
requestAnimationFrame(() => requestAnimationFrame(e));
|
|
1698
1698
|
}
|
|
1699
|
-
let
|
|
1700
|
-
function
|
|
1701
|
-
let t =
|
|
1699
|
+
let el = Symbol("MenuContext");
|
|
1700
|
+
function ht(e) {
|
|
1701
|
+
let t = ee(el, null);
|
|
1702
1702
|
if (t === null) {
|
|
1703
1703
|
let n = new Error(`<${e} /> is missing a parent <Menu /> component.`);
|
|
1704
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
1704
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, ht), n;
|
|
1705
1705
|
}
|
|
1706
1706
|
return t;
|
|
1707
1707
|
}
|
|
1708
|
-
let
|
|
1709
|
-
let l =
|
|
1708
|
+
let to = W({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: n }) {
|
|
1709
|
+
let l = E(1), r = E(null), a = E(null), o = E([]), i = E(""), s = E(null), u = E(1);
|
|
1710
1710
|
function c(d = (v) => v) {
|
|
1711
|
-
let v = s.value !== null ? o.value[s.value] : null, p =
|
|
1711
|
+
let v = s.value !== null ? o.value[s.value] : null, p = Dn(d(o.value.slice()), (h) => O(h.dataRef.domRef)), m = v ? p.indexOf(v) : null;
|
|
1712
1712
|
return m === -1 && (m = null), { items: p, activeItemIndex: m };
|
|
1713
1713
|
}
|
|
1714
1714
|
let f = { menuState: l, buttonRef: r, itemsRef: a, items: o, searchQuery: i, activeItemIndex: s, activationTrigger: u, closeMenu: () => {
|
|
1715
1715
|
l.value = 1, s.value = null;
|
|
1716
1716
|
}, openMenu: () => l.value = 0, goToItem(d, v, p) {
|
|
1717
|
-
let m = c(),
|
|
1718
|
-
i.value = "", s.value =
|
|
1717
|
+
let m = c(), h = kr(d === ae.Specific ? { focus: ae.Specific, id: v } : { focus: d }, { resolveItems: () => m.items, resolveActiveIndex: () => m.activeItemIndex, resolveId: (y) => y.id, resolveDisabled: (y) => y.dataRef.disabled });
|
|
1718
|
+
i.value = "", s.value = h, u.value = p ?? 1, o.value = m.items;
|
|
1719
1719
|
}, search(d) {
|
|
1720
1720
|
let v = i.value !== "" ? 0 : 1;
|
|
1721
1721
|
i.value += d.toLowerCase();
|
|
1722
|
-
let p = (s.value !== null ? o.value.slice(s.value + v).concat(o.value.slice(0, s.value + v)) : o.value).find((
|
|
1722
|
+
let p = (s.value !== null ? o.value.slice(s.value + v).concat(o.value.slice(0, s.value + v)) : o.value).find((h) => h.dataRef.textValue.startsWith(i.value) && !h.dataRef.disabled), m = p ? o.value.indexOf(p) : -1;
|
|
1723
1723
|
m === -1 || m === s.value || (s.value = m, u.value = 1);
|
|
1724
1724
|
}, clearSearch() {
|
|
1725
1725
|
i.value = "";
|
|
@@ -1728,36 +1728,36 @@ let eo = W({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1728
1728
|
o.value = p.items, s.value = p.activeItemIndex, u.value = 1;
|
|
1729
1729
|
}, unregisterItem(d) {
|
|
1730
1730
|
let v = c((p) => {
|
|
1731
|
-
let m = p.findIndex((
|
|
1731
|
+
let m = p.findIndex((h) => h.id === d);
|
|
1732
1732
|
return m !== -1 && p.splice(m, 1), p;
|
|
1733
1733
|
});
|
|
1734
1734
|
o.value = v.items, s.value = v.activeItemIndex, u.value = 1;
|
|
1735
1735
|
} };
|
|
1736
|
-
return
|
|
1736
|
+
return Mn([r, a], (d, v) => {
|
|
1737
1737
|
var p;
|
|
1738
|
-
f.closeMenu(),
|
|
1739
|
-
}, w(() => l.value === 0)), ue(
|
|
1738
|
+
f.closeMenu(), Ht(v, Vt.Loose) || (d.preventDefault(), (p = O(r)) == null || p.focus());
|
|
1739
|
+
}, w(() => l.value === 0)), ue(el, f), Vn(w(() => ge(l.value, { 0: G.Open, 1: G.Closed }))), () => {
|
|
1740
1740
|
let d = { open: l.value === 0, close: f.closeMenu };
|
|
1741
1741
|
return q({ ourProps: {}, theirProps: e, slot: d, slots: t, attrs: n, name: "Menu" });
|
|
1742
1742
|
};
|
|
1743
|
-
} }),
|
|
1743
|
+
} }), fn = W({ name: "MenuButton", props: { disabled: { type: Boolean, default: !1 }, as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
1744
1744
|
var r;
|
|
1745
|
-
let a = (r = e.id) != null ? r : `headlessui-menu-button-${ve()}`, o =
|
|
1745
|
+
let a = (r = e.id) != null ? r : `headlessui-menu-button-${ve()}`, o = ht("MenuButton");
|
|
1746
1746
|
l({ el: o.buttonRef, $el: o.buttonRef });
|
|
1747
1747
|
function i(f) {
|
|
1748
1748
|
switch (f.key) {
|
|
1749
1749
|
case U.Space:
|
|
1750
1750
|
case U.Enter:
|
|
1751
1751
|
case U.ArrowDown:
|
|
1752
|
-
f.preventDefault(), f.stopPropagation(), o.openMenu(),
|
|
1752
|
+
f.preventDefault(), f.stopPropagation(), o.openMenu(), Oe(() => {
|
|
1753
1753
|
var d;
|
|
1754
|
-
(d =
|
|
1754
|
+
(d = O(o.itemsRef)) == null || d.focus({ preventScroll: !0 }), o.goToItem(ae.First);
|
|
1755
1755
|
});
|
|
1756
1756
|
break;
|
|
1757
1757
|
case U.ArrowUp:
|
|
1758
|
-
f.preventDefault(), f.stopPropagation(), o.openMenu(),
|
|
1758
|
+
f.preventDefault(), f.stopPropagation(), o.openMenu(), Oe(() => {
|
|
1759
1759
|
var d;
|
|
1760
|
-
(d =
|
|
1760
|
+
(d = O(o.itemsRef)) == null || d.focus({ preventScroll: !0 }), o.goToItem(ae.Last);
|
|
1761
1761
|
});
|
|
1762
1762
|
break;
|
|
1763
1763
|
}
|
|
@@ -1770,24 +1770,24 @@ let eo = W({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1770
1770
|
}
|
|
1771
1771
|
}
|
|
1772
1772
|
function u(f) {
|
|
1773
|
-
e.disabled || (o.menuState.value === 0 ? (o.closeMenu(),
|
|
1773
|
+
e.disabled || (o.menuState.value === 0 ? (o.closeMenu(), Oe(() => {
|
|
1774
1774
|
var d;
|
|
1775
|
-
return (d =
|
|
1776
|
-
})) : (f.preventDefault(), o.openMenu(),
|
|
1775
|
+
return (d = O(o.buttonRef)) == null ? void 0 : d.focus({ preventScroll: !0 });
|
|
1776
|
+
})) : (f.preventDefault(), o.openMenu(), eo(() => {
|
|
1777
1777
|
var d;
|
|
1778
|
-
return (d =
|
|
1778
|
+
return (d = O(o.itemsRef)) == null ? void 0 : d.focus({ preventScroll: !0 });
|
|
1779
1779
|
})));
|
|
1780
1780
|
}
|
|
1781
|
-
let c =
|
|
1781
|
+
let c = Bn(w(() => ({ as: e.as, type: t.type })), o.buttonRef);
|
|
1782
1782
|
return () => {
|
|
1783
1783
|
var f;
|
|
1784
|
-
let d = { open: o.menuState.value === 0 }, { ...v } = e, p = { ref: o.buttonRef, id: a, type: c.value, "aria-haspopup": "menu", "aria-controls": (f =
|
|
1784
|
+
let d = { open: o.menuState.value === 0 }, { ...v } = e, p = { ref: o.buttonRef, id: a, type: c.value, "aria-haspopup": "menu", "aria-controls": (f = O(o.itemsRef)) == null ? void 0 : f.id, "aria-expanded": o.menuState.value === 0, onKeydown: i, onKeyup: s, onClick: u };
|
|
1785
1785
|
return q({ ourProps: p, theirProps: v, slot: d, attrs: t, slots: n, name: "MenuButton" });
|
|
1786
1786
|
};
|
|
1787
|
-
} }),
|
|
1787
|
+
} }), no = W({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
1788
1788
|
var r;
|
|
1789
|
-
let a = (r = e.id) != null ? r : `headlessui-menu-items-${ve()}`, o =
|
|
1790
|
-
l({ el: o.itemsRef, $el: o.itemsRef }),
|
|
1789
|
+
let a = (r = e.id) != null ? r : `headlessui-menu-items-${ve()}`, o = ht("MenuItems"), i = E(null);
|
|
1790
|
+
l({ el: o.itemsRef, $el: o.itemsRef }), wr({ container: w(() => O(o.itemsRef)), enabled: w(() => o.menuState.value === 0), accept(d) {
|
|
1791
1791
|
return d.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : d.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1792
1792
|
}, walk(d) {
|
|
1793
1793
|
d.setAttribute("role", "none");
|
|
@@ -1800,28 +1800,28 @@ let eo = W({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1800
1800
|
case U.Enter:
|
|
1801
1801
|
if (d.preventDefault(), d.stopPropagation(), o.activeItemIndex.value !== null) {
|
|
1802
1802
|
let p = o.items.value[o.activeItemIndex.value];
|
|
1803
|
-
(v =
|
|
1803
|
+
(v = O(p.dataRef.domRef)) == null || v.click();
|
|
1804
1804
|
}
|
|
1805
|
-
o.closeMenu(),
|
|
1805
|
+
o.closeMenu(), An(O(o.buttonRef));
|
|
1806
1806
|
break;
|
|
1807
1807
|
case U.ArrowDown:
|
|
1808
|
-
return d.preventDefault(), d.stopPropagation(), o.goToItem(
|
|
1808
|
+
return d.preventDefault(), d.stopPropagation(), o.goToItem(ae.Next);
|
|
1809
1809
|
case U.ArrowUp:
|
|
1810
|
-
return d.preventDefault(), d.stopPropagation(), o.goToItem(
|
|
1810
|
+
return d.preventDefault(), d.stopPropagation(), o.goToItem(ae.Previous);
|
|
1811
1811
|
case U.Home:
|
|
1812
1812
|
case U.PageUp:
|
|
1813
|
-
return d.preventDefault(), d.stopPropagation(), o.goToItem(
|
|
1813
|
+
return d.preventDefault(), d.stopPropagation(), o.goToItem(ae.First);
|
|
1814
1814
|
case U.End:
|
|
1815
1815
|
case U.PageDown:
|
|
1816
|
-
return d.preventDefault(), d.stopPropagation(), o.goToItem(
|
|
1816
|
+
return d.preventDefault(), d.stopPropagation(), o.goToItem(ae.Last);
|
|
1817
1817
|
case U.Escape:
|
|
1818
|
-
d.preventDefault(), d.stopPropagation(), o.closeMenu(),
|
|
1818
|
+
d.preventDefault(), d.stopPropagation(), o.closeMenu(), Oe(() => {
|
|
1819
1819
|
var p;
|
|
1820
|
-
return (p =
|
|
1820
|
+
return (p = O(o.buttonRef)) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1821
1821
|
});
|
|
1822
1822
|
break;
|
|
1823
1823
|
case U.Tab:
|
|
1824
|
-
d.preventDefault(), d.stopPropagation(), o.closeMenu(),
|
|
1824
|
+
d.preventDefault(), d.stopPropagation(), o.closeMenu(), Oe(() => gr(O(o.buttonRef), d.shiftKey ? we.Previous : we.Next));
|
|
1825
1825
|
break;
|
|
1826
1826
|
default:
|
|
1827
1827
|
d.key.length === 1 && (o.search(d.key), i.value = setTimeout(() => o.clearSearch(), 350));
|
|
@@ -1835,132 +1835,132 @@ let eo = W({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1835
1835
|
break;
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
|
-
let c =
|
|
1838
|
+
let c = gt(), f = w(() => c !== null ? (c.value & G.Open) === G.Open : o.menuState.value === 0);
|
|
1839
1839
|
return () => {
|
|
1840
1840
|
var d, v;
|
|
1841
|
-
let p = { open: o.menuState.value === 0 }, { ...m } = e,
|
|
1842
|
-
return q({ ourProps:
|
|
1841
|
+
let p = { open: o.menuState.value === 0 }, { ...m } = e, h = { "aria-activedescendant": o.activeItemIndex.value === null || (d = o.items.value[o.activeItemIndex.value]) == null ? void 0 : d.id, "aria-labelledby": (v = O(o.buttonRef)) == null ? void 0 : v.id, id: a, onKeydown: s, onKeyup: u, role: "menu", tabIndex: 0, ref: o.itemsRef };
|
|
1842
|
+
return q({ ourProps: h, theirProps: m, slot: p, attrs: t, slots: n, features: We.RenderStrategy | We.Static, visible: f.value, name: "MenuItems" });
|
|
1843
1843
|
};
|
|
1844
|
-
} }),
|
|
1844
|
+
} }), vn = W({ name: "MenuItem", inheritAttrs: !1, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: null } }, setup(e, { slots: t, attrs: n, expose: l }) {
|
|
1845
1845
|
var r;
|
|
1846
|
-
let a = (r = e.id) != null ? r : `headlessui-menu-item-${ve()}`, o =
|
|
1846
|
+
let a = (r = e.id) != null ? r : `headlessui-menu-item-${ve()}`, o = ht("MenuItem"), i = E(null);
|
|
1847
1847
|
l({ el: i, $el: i });
|
|
1848
|
-
let s = w(() => o.activeItemIndex.value !== null ? o.items.value[o.activeItemIndex.value].id === a : !1), u =
|
|
1848
|
+
let s = w(() => o.activeItemIndex.value !== null ? o.items.value[o.activeItemIndex.value].id === a : !1), u = Qr(i), c = w(() => ({ disabled: e.disabled, get textValue() {
|
|
1849
1849
|
return u();
|
|
1850
1850
|
}, domRef: i }));
|
|
1851
|
-
z(() => o.registerItem(a, c)), ce(() => o.unregisterItem(a)),
|
|
1852
|
-
o.menuState.value === 0 && s.value && o.activationTrigger.value !== 0 &&
|
|
1853
|
-
var
|
|
1854
|
-
return (
|
|
1851
|
+
z(() => o.registerItem(a, c)), ce(() => o.unregisterItem(a)), _(() => {
|
|
1852
|
+
o.menuState.value === 0 && s.value && o.activationTrigger.value !== 0 && Oe(() => {
|
|
1853
|
+
var y, b;
|
|
1854
|
+
return (b = (y = O(i)) == null ? void 0 : y.scrollIntoView) == null ? void 0 : b.call(y, { block: "nearest" });
|
|
1855
1855
|
});
|
|
1856
1856
|
});
|
|
1857
|
-
function f(
|
|
1858
|
-
if (e.disabled) return
|
|
1859
|
-
o.closeMenu(),
|
|
1857
|
+
function f(y) {
|
|
1858
|
+
if (e.disabled) return y.preventDefault();
|
|
1859
|
+
o.closeMenu(), An(O(o.buttonRef));
|
|
1860
1860
|
}
|
|
1861
1861
|
function d() {
|
|
1862
|
-
if (e.disabled) return o.goToItem(
|
|
1863
|
-
o.goToItem(
|
|
1862
|
+
if (e.disabled) return o.goToItem(ae.Nothing);
|
|
1863
|
+
o.goToItem(ae.Specific, a);
|
|
1864
1864
|
}
|
|
1865
|
-
let v =
|
|
1866
|
-
function p(
|
|
1867
|
-
v.update(
|
|
1865
|
+
let v = br();
|
|
1866
|
+
function p(y) {
|
|
1867
|
+
v.update(y);
|
|
1868
1868
|
}
|
|
1869
|
-
function m(
|
|
1870
|
-
v.wasMoved(
|
|
1869
|
+
function m(y) {
|
|
1870
|
+
v.wasMoved(y) && (e.disabled || s.value || o.goToItem(ae.Specific, a, 0));
|
|
1871
1871
|
}
|
|
1872
|
-
function
|
|
1873
|
-
v.wasMoved(
|
|
1872
|
+
function h(y) {
|
|
1873
|
+
v.wasMoved(y) && (e.disabled || s.value && o.goToItem(ae.Nothing));
|
|
1874
1874
|
}
|
|
1875
1875
|
return () => {
|
|
1876
|
-
let { disabled:
|
|
1877
|
-
return q({ ourProps: { id: a, ref: i, role: "menuitem", tabIndex:
|
|
1876
|
+
let { disabled: y, ...b } = e, T = { active: s.value, disabled: y, close: o.closeMenu };
|
|
1877
|
+
return q({ ourProps: { id: a, ref: i, role: "menuitem", tabIndex: y === !0 ? void 0 : -1, "aria-disabled": y === !0 ? !0 : void 0, onClick: f, onFocus: d, onPointerenter: p, onMouseenter: p, onPointermove: m, onMousemove: m, onPointerleave: h, onMouseleave: h }, theirProps: { ...n, ...b }, slot: T, attrs: n, slots: t, name: "MenuItem" });
|
|
1878
1878
|
};
|
|
1879
|
-
} }),
|
|
1880
|
-
function
|
|
1881
|
-
let e =
|
|
1879
|
+
} }), tl = Symbol("LabelContext");
|
|
1880
|
+
function nl() {
|
|
1881
|
+
let e = ee(tl, null);
|
|
1882
1882
|
if (e === null) {
|
|
1883
1883
|
let t = new Error("You used a <Label /> component, but it is not inside a parent.");
|
|
1884
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t,
|
|
1884
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t, nl), t;
|
|
1885
1885
|
}
|
|
1886
1886
|
return e;
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1889
|
-
let l =
|
|
1888
|
+
function lo({ slot: e = {}, name: t = "Label", props: n = {} } = {}) {
|
|
1889
|
+
let l = E([]);
|
|
1890
1890
|
function r(a) {
|
|
1891
1891
|
return l.value.push(a), () => {
|
|
1892
1892
|
let o = l.value.indexOf(a);
|
|
1893
1893
|
o !== -1 && l.value.splice(o, 1);
|
|
1894
1894
|
};
|
|
1895
1895
|
}
|
|
1896
|
-
return ue(
|
|
1896
|
+
return ue(tl, { register: r, slot: e, name: t, props: n }), w(() => l.value.length > 0 ? l.value.join(" ") : void 0);
|
|
1897
1897
|
}
|
|
1898
|
-
let
|
|
1898
|
+
let ro = W({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: !1 }, id: { type: String, default: null } }, setup(e, { slots: t, attrs: n }) {
|
|
1899
1899
|
var l;
|
|
1900
|
-
let r = (l = e.id) != null ? l : `headlessui-label-${ve()}`, a =
|
|
1900
|
+
let r = (l = e.id) != null ? l : `headlessui-label-${ve()}`, a = nl();
|
|
1901
1901
|
return z(() => ce(a.register(r))), () => {
|
|
1902
|
-
let { name: o = "Label", slot: i = {}, props: s = {} } = a, { passive: u, ...c } = e, f = { ...Object.entries(s).reduce((d, [v, p]) => Object.assign(d, { [v]:
|
|
1902
|
+
let { name: o = "Label", slot: i = {}, props: s = {} } = a, { passive: u, ...c } = e, f = { ...Object.entries(s).reduce((d, [v, p]) => Object.assign(d, { [v]: $(p) }), {}), id: r };
|
|
1903
1903
|
return u && (delete f.onClick, delete f.htmlFor, delete c.onClick), q({ ourProps: f, theirProps: c, slot: i, attrs: n, slots: t, name: o });
|
|
1904
1904
|
};
|
|
1905
|
-
} }),
|
|
1906
|
-
let l =
|
|
1905
|
+
} }), ll = Symbol("GroupContext"), oo = W({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: n }) {
|
|
1906
|
+
let l = E(null), r = lo({ name: "SwitchLabel", props: { htmlFor: w(() => {
|
|
1907
1907
|
var o;
|
|
1908
1908
|
return (o = l.value) == null ? void 0 : o.id;
|
|
1909
1909
|
}), onClick(o) {
|
|
1910
1910
|
l.value && (o.currentTarget.tagName === "LABEL" && o.preventDefault(), l.value.click(), l.value.focus({ preventScroll: !0 }));
|
|
1911
|
-
} } }), a =
|
|
1912
|
-
return ue(
|
|
1913
|
-
} }),
|
|
1911
|
+
} } }), a = Zn({ name: "SwitchDescription" });
|
|
1912
|
+
return ue(ll, { switchRef: l, labelledby: r, describedby: a }), () => q({ theirProps: e, ourProps: {}, slot: {}, slots: t, attrs: n, name: "SwitchGroup" });
|
|
1913
|
+
} }), ao = W({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: !0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, value: { type: String, optional: !0 }, id: { type: String, default: null }, disabled: { type: Boolean, default: !1 }, tabIndex: { type: Number, default: 0 } }, inheritAttrs: !1, setup(e, { emit: t, attrs: n, slots: l, expose: r }) {
|
|
1914
1914
|
var a;
|
|
1915
|
-
let o = (a = e.id) != null ? a : `headlessui-switch-${ve()}`, i =
|
|
1915
|
+
let o = (a = e.id) != null ? a : `headlessui-switch-${ve()}`, i = ee(ll, null), [s, u] = ar(w(() => e.modelValue), (b) => t("update:modelValue", b), w(() => e.defaultChecked));
|
|
1916
1916
|
function c() {
|
|
1917
1917
|
u(!s.value);
|
|
1918
1918
|
}
|
|
1919
|
-
let f =
|
|
1919
|
+
let f = E(null), d = i === null ? f : i.switchRef, v = Bn(w(() => ({ as: e.as, type: n.type })), d);
|
|
1920
1920
|
r({ el: d, $el: d });
|
|
1921
|
-
function p(
|
|
1922
|
-
|
|
1921
|
+
function p(b) {
|
|
1922
|
+
b.preventDefault(), c();
|
|
1923
1923
|
}
|
|
1924
|
-
function m(
|
|
1925
|
-
|
|
1924
|
+
function m(b) {
|
|
1925
|
+
b.key === U.Space ? (b.preventDefault(), c()) : b.key === U.Enter && Or(b.currentTarget);
|
|
1926
1926
|
}
|
|
1927
|
-
function
|
|
1928
|
-
|
|
1927
|
+
function h(b) {
|
|
1928
|
+
b.preventDefault();
|
|
1929
1929
|
}
|
|
1930
|
-
let
|
|
1931
|
-
var
|
|
1932
|
-
return (T = (
|
|
1930
|
+
let y = w(() => {
|
|
1931
|
+
var b, T;
|
|
1932
|
+
return (T = (b = O(d)) == null ? void 0 : b.closest) == null ? void 0 : T.call(b, "form");
|
|
1933
1933
|
});
|
|
1934
1934
|
return z(() => {
|
|
1935
|
-
me([
|
|
1936
|
-
if (!
|
|
1937
|
-
function
|
|
1935
|
+
me([y], () => {
|
|
1936
|
+
if (!y.value || e.defaultChecked === void 0) return;
|
|
1937
|
+
function b() {
|
|
1938
1938
|
u(e.defaultChecked);
|
|
1939
1939
|
}
|
|
1940
|
-
return
|
|
1940
|
+
return y.value.addEventListener("reset", b), () => {
|
|
1941
1941
|
var T;
|
|
1942
|
-
(T =
|
|
1942
|
+
(T = y.value) == null || T.removeEventListener("reset", b);
|
|
1943
1943
|
};
|
|
1944
1944
|
}, { immediate: !0 });
|
|
1945
1945
|
}), () => {
|
|
1946
|
-
let { name:
|
|
1947
|
-
return K(
|
|
1946
|
+
let { name: b, value: T, form: A, tabIndex: C, ...I } = e, L = { checked: s.value }, j = { id: o, ref: d, role: "switch", type: v.value, tabIndex: C === -1 ? 0 : C, "aria-checked": s.value, "aria-labelledby": i == null ? void 0 : i.labelledby.value, "aria-describedby": i == null ? void 0 : i.describedby.value, onClick: p, onKeyup: m, onKeypress: h };
|
|
1947
|
+
return K(ie, [b != null && s.value != null ? K(ct, $r({ features: Qe.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: s.value, form: A, disabled: I.disabled, name: b, value: T })) : null, q({ ourProps: j, theirProps: { ...n, ...Wt(I, ["modelValue", "defaultChecked"]) }, slot: L, attrs: n, slots: l, name: "Switch" })]);
|
|
1948
1948
|
};
|
|
1949
|
-
} }),
|
|
1950
|
-
function
|
|
1949
|
+
} }), io = ro;
|
|
1950
|
+
function so(e) {
|
|
1951
1951
|
let t = { called: !1 };
|
|
1952
1952
|
return (...n) => {
|
|
1953
1953
|
if (!t.called) return t.called = !0, e(...n);
|
|
1954
1954
|
};
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function kt(e, ...t) {
|
|
1957
1957
|
e && t.length > 0 && e.classList.add(...t);
|
|
1958
1958
|
}
|
|
1959
1959
|
function st(e, ...t) {
|
|
1960
1960
|
e && t.length > 0 && e.classList.remove(...t);
|
|
1961
1961
|
}
|
|
1962
|
-
var
|
|
1963
|
-
function
|
|
1962
|
+
var Ft = ((e) => (e.Finished = "finished", e.Cancelled = "cancelled", e))(Ft || {});
|
|
1963
|
+
function uo(e, t) {
|
|
1964
1964
|
let n = et();
|
|
1965
1965
|
if (!e) return n.dispose;
|
|
1966
1966
|
let { transitionDuration: l, transitionDelay: r } = getComputedStyle(e), [a, o] = [l, r].map((i) => {
|
|
@@ -1969,128 +1969,128 @@ function so(e, t) {
|
|
|
1969
1969
|
});
|
|
1970
1970
|
return a !== 0 ? n.setTimeout(() => t("finished"), a + o) : t("finished"), n.add(() => t("cancelled")), n.dispose;
|
|
1971
1971
|
}
|
|
1972
|
-
function
|
|
1973
|
-
let o = et(), i = a !== void 0 ?
|
|
1972
|
+
function pn(e, t, n, l, r, a) {
|
|
1973
|
+
let o = et(), i = a !== void 0 ? so(a) : () => {
|
|
1974
1974
|
};
|
|
1975
|
-
return st(e, ...r),
|
|
1976
|
-
st(e, ...n),
|
|
1975
|
+
return st(e, ...r), kt(e, ...t, ...n), o.nextFrame(() => {
|
|
1976
|
+
st(e, ...n), kt(e, ...l), o.add(uo(e, (s) => (st(e, ...l, ...t), kt(e, ...r), i(s))));
|
|
1977
1977
|
}), o.add(() => st(e, ...t, ...n, ...l, ...r)), o.add(() => i("cancelled")), o.dispose;
|
|
1978
1978
|
}
|
|
1979
1979
|
function De(e = "") {
|
|
1980
1980
|
return e.split(/\s+/).filter((t) => t.length > 1);
|
|
1981
1981
|
}
|
|
1982
|
-
let
|
|
1983
|
-
var
|
|
1984
|
-
function co() {
|
|
1985
|
-
return _(Wt, null) !== null;
|
|
1986
|
-
}
|
|
1982
|
+
let Ut = Symbol("TransitionContext");
|
|
1983
|
+
var co = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(co || {});
|
|
1987
1984
|
function fo() {
|
|
1988
|
-
|
|
1985
|
+
return ee(Ut, null) !== null;
|
|
1986
|
+
}
|
|
1987
|
+
function vo() {
|
|
1988
|
+
let e = ee(Ut, null);
|
|
1989
1989
|
if (e === null) throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1990
1990
|
return e;
|
|
1991
1991
|
}
|
|
1992
|
-
function
|
|
1993
|
-
let e =
|
|
1992
|
+
function po() {
|
|
1993
|
+
let e = ee(zt, null);
|
|
1994
1994
|
if (e === null) throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1995
1995
|
return e;
|
|
1996
1996
|
}
|
|
1997
|
-
let
|
|
1998
|
-
function
|
|
1999
|
-
return "children" in e ?
|
|
1997
|
+
let zt = Symbol("NestingContext");
|
|
1998
|
+
function yt(e) {
|
|
1999
|
+
return "children" in e ? yt(e.children) : e.value.filter(({ state: t }) => t === "visible").length > 0;
|
|
2000
2000
|
}
|
|
2001
|
-
function
|
|
2002
|
-
let t =
|
|
2001
|
+
function rl(e) {
|
|
2002
|
+
let t = E([]), n = E(!1);
|
|
2003
2003
|
z(() => n.value = !0), ce(() => n.value = !1);
|
|
2004
|
-
function l(a, o =
|
|
2004
|
+
function l(a, o = ke.Hidden) {
|
|
2005
2005
|
let i = t.value.findIndex(({ id: s }) => s === a);
|
|
2006
|
-
i !== -1 && (ge(o, { [
|
|
2006
|
+
i !== -1 && (ge(o, { [ke.Unmount]() {
|
|
2007
2007
|
t.value.splice(i, 1);
|
|
2008
|
-
}, [
|
|
2008
|
+
}, [ke.Hidden]() {
|
|
2009
2009
|
t.value[i].state = "hidden";
|
|
2010
|
-
} }), !
|
|
2010
|
+
} }), !yt(t) && n.value && (e == null || e()));
|
|
2011
2011
|
}
|
|
2012
2012
|
function r(a) {
|
|
2013
2013
|
let o = t.value.find(({ id: i }) => i === a);
|
|
2014
|
-
return o ? o.state !== "visible" && (o.state = "visible") : t.value.push({ id: a, state: "visible" }), () => l(a,
|
|
2014
|
+
return o ? o.state !== "visible" && (o.state = "visible") : t.value.push({ id: a, state: "visible" }), () => l(a, ke.Unmount);
|
|
2015
2015
|
}
|
|
2016
2016
|
return { children: t, register: r, unregister: l };
|
|
2017
2017
|
}
|
|
2018
|
-
let
|
|
2019
|
-
let a =
|
|
2018
|
+
let ol = We.RenderStrategy, Je = W({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: n, slots: l, expose: r }) {
|
|
2019
|
+
let a = E(0);
|
|
2020
2020
|
function o() {
|
|
2021
|
-
a.value |=
|
|
2021
|
+
a.value |= G.Opening, t("beforeEnter");
|
|
2022
2022
|
}
|
|
2023
2023
|
function i() {
|
|
2024
|
-
a.value &= ~
|
|
2024
|
+
a.value &= ~G.Opening, t("afterEnter");
|
|
2025
2025
|
}
|
|
2026
2026
|
function s() {
|
|
2027
|
-
a.value |=
|
|
2027
|
+
a.value |= G.Closing, t("beforeLeave");
|
|
2028
2028
|
}
|
|
2029
2029
|
function u() {
|
|
2030
|
-
a.value &= ~
|
|
2030
|
+
a.value &= ~G.Closing, t("afterLeave");
|
|
2031
2031
|
}
|
|
2032
|
-
if (!
|
|
2033
|
-
let c =
|
|
2032
|
+
if (!fo() && Sr()) return () => K(bt, { ...e, onBeforeEnter: o, onAfterEnter: i, onBeforeLeave: s, onAfterLeave: u }, l);
|
|
2033
|
+
let c = E(null), f = w(() => e.unmount ? ke.Unmount : ke.Hidden);
|
|
2034
2034
|
r({ el: c, $el: c });
|
|
2035
|
-
let { show: d, appear: v } =
|
|
2036
|
-
!T.value &&
|
|
2035
|
+
let { show: d, appear: v } = vo(), { register: p, unregister: m } = po(), h = E(d.value ? "visible" : "hidden"), y = { value: !0 }, b = ve(), T = { value: !1 }, A = rl(() => {
|
|
2036
|
+
!T.value && h.value !== "hidden" && (h.value = "hidden", m(b), u());
|
|
2037
2037
|
});
|
|
2038
2038
|
z(() => {
|
|
2039
|
-
let
|
|
2040
|
-
ce(
|
|
2041
|
-
}),
|
|
2042
|
-
if (f.value ===
|
|
2043
|
-
if (d.value &&
|
|
2044
|
-
|
|
2039
|
+
let Z = p(b);
|
|
2040
|
+
ce(Z);
|
|
2041
|
+
}), _(() => {
|
|
2042
|
+
if (f.value === ke.Hidden && b) {
|
|
2043
|
+
if (d.value && h.value !== "visible") {
|
|
2044
|
+
h.value = "visible";
|
|
2045
2045
|
return;
|
|
2046
2046
|
}
|
|
2047
|
-
ge(
|
|
2047
|
+
ge(h.value, { hidden: () => m(b), visible: () => p(b) });
|
|
2048
2048
|
}
|
|
2049
2049
|
});
|
|
2050
|
-
let C = De(e.enter),
|
|
2050
|
+
let C = De(e.enter), I = De(e.enterFrom), L = De(e.enterTo), j = De(e.entered), X = De(e.leave), V = De(e.leaveFrom), Q = De(e.leaveTo);
|
|
2051
2051
|
z(() => {
|
|
2052
|
-
|
|
2053
|
-
if (
|
|
2054
|
-
let
|
|
2055
|
-
if (
|
|
2052
|
+
_(() => {
|
|
2053
|
+
if (h.value === "visible") {
|
|
2054
|
+
let Z = O(c);
|
|
2055
|
+
if (Z instanceof Comment && Z.data === "") throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
2056
2056
|
}
|
|
2057
2057
|
});
|
|
2058
2058
|
});
|
|
2059
|
-
function
|
|
2060
|
-
let
|
|
2061
|
-
!
|
|
2062
|
-
T.value = !1,
|
|
2063
|
-
}) :
|
|
2064
|
-
T.value = !1,
|
|
2059
|
+
function te(Z) {
|
|
2060
|
+
let ne = y.value && !v.value, le = O(c);
|
|
2061
|
+
!le || !(le instanceof HTMLElement) || ne || (T.value = !0, d.value && o(), d.value || s(), Z(d.value ? pn(le, C, I, L, j, (re) => {
|
|
2062
|
+
T.value = !1, re === Ft.Finished && i();
|
|
2063
|
+
}) : pn(le, X, V, Q, j, (re) => {
|
|
2064
|
+
T.value = !1, re === Ft.Finished && (yt(A) || (h.value = "hidden", m(b), u()));
|
|
2065
2065
|
})));
|
|
2066
2066
|
}
|
|
2067
2067
|
return z(() => {
|
|
2068
|
-
me([d], (
|
|
2069
|
-
|
|
2068
|
+
me([d], (Z, ne, le) => {
|
|
2069
|
+
te(le), y.value = !1;
|
|
2070
2070
|
}, { immediate: !0 });
|
|
2071
|
-
}), ue(
|
|
2072
|
-
let { appear:
|
|
2073
|
-
return q({ theirProps: fe, ourProps: de, slot: {}, slots: l, attrs: n, features:
|
|
2071
|
+
}), ue(zt, A), Vn(w(() => ge(h.value, { visible: G.Open, hidden: G.Closed }) | a.value)), () => {
|
|
2072
|
+
let { appear: Z, show: ne, enter: le, enterFrom: re, enterTo: be, entered: _t, leave: en, leaveFrom: tn, leaveTo: F, ...H } = e, de = { ref: c }, fe = { ...H, ...v.value && d.value && tt.isServer ? { class: N([n.class, H.class, ...C, ...I]) } : {} };
|
|
2073
|
+
return q({ theirProps: fe, ourProps: de, slot: {}, slots: l, attrs: n, features: ol, visible: h.value === "visible", name: "TransitionChild" });
|
|
2074
2074
|
};
|
|
2075
|
-
} }),
|
|
2076
|
-
let r =
|
|
2077
|
-
|
|
2075
|
+
} }), mo = Je, bt = W({ inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: n, slots: l }) {
|
|
2076
|
+
let r = gt(), a = w(() => e.show === null && r !== null ? (r.value & G.Open) === G.Open : e.show);
|
|
2077
|
+
_(() => {
|
|
2078
2078
|
if (![!0, !1].includes(a.value)) throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.');
|
|
2079
2079
|
});
|
|
2080
|
-
let o =
|
|
2080
|
+
let o = E(a.value ? "visible" : "hidden"), i = rl(() => {
|
|
2081
2081
|
o.value = "hidden";
|
|
2082
|
-
}), s =
|
|
2082
|
+
}), s = E(!0), u = { show: a, appear: w(() => e.appear || !s.value) };
|
|
2083
2083
|
return z(() => {
|
|
2084
|
-
|
|
2085
|
-
s.value = !1, a.value ? o.value = "visible" :
|
|
2084
|
+
_(() => {
|
|
2085
|
+
s.value = !1, a.value ? o.value = "visible" : yt(i) || (o.value = "hidden");
|
|
2086
2086
|
});
|
|
2087
|
-
}), ue(
|
|
2088
|
-
let c =
|
|
2089
|
-
return q({ ourProps: { ...f, as: "template" }, theirProps: {}, slot: {}, slots: { ...l, default: () => [K(
|
|
2087
|
+
}), ue(zt, i), ue(Ut, u), () => {
|
|
2088
|
+
let c = Wt(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), f = { unmount: e.unmount };
|
|
2089
|
+
return q({ ourProps: { ...f, as: "template" }, theirProps: {}, slot: {}, slots: { ...l, default: () => [K(mo, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...n, ...f, ...c }, l.default)] }, attrs: {}, features: ol, visible: o.value === "visible", name: "Transition" });
|
|
2090
2090
|
};
|
|
2091
2091
|
} });
|
|
2092
|
-
function
|
|
2093
|
-
const t =
|
|
2092
|
+
function al(e) {
|
|
2093
|
+
const t = E(null), n = E(!1), l = w(() => e.as === "form"), r = w(() => `${e.id}-title`), a = w(() => `${e.id}-content`), o = w(() => {
|
|
2094
2094
|
var i;
|
|
2095
2095
|
return (i = t.value) == null ? void 0 : i.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
2096
2096
|
});
|
|
@@ -2103,13 +2103,13 @@ function ol(e) {
|
|
|
2103
2103
|
initialFocusElement: o
|
|
2104
2104
|
};
|
|
2105
2105
|
}
|
|
2106
|
-
const
|
|
2106
|
+
const go = {
|
|
2107
2107
|
class: "rvc-fixed rvc-inset-0 rvc-overflow-hidden",
|
|
2108
2108
|
role: "presentation"
|
|
2109
|
-
},
|
|
2109
|
+
}, ho = { class: "rvc-absolute rvc-inset-0 rvc-overflow-hidden" }, yo = { class: "rvc-pointer-events-none rvc-fixed rvc-inset-y-0 rvc-right-0 rvc-flex rvc-max-w-full rvc-pl-10" }, bo = { class: "rvc-flex rvc-h-full rvc-flex-col rvc-shadow-xl" }, wo = { class: "rvc-flex rvc-items-center rvc-justify-between" }, $o = {
|
|
2110
2110
|
key: 0,
|
|
2111
2111
|
class: "rvc-ml-3 rvc-flex rvc-h-7 rvc-items-center"
|
|
2112
|
-
},
|
|
2112
|
+
}, xo = ["id"], So = { class: "rvc-flex rvc-shrink-0 rvc-drawer-footer" }, Na = {
|
|
2113
2113
|
__name: "Drawer",
|
|
2114
2114
|
props: {
|
|
2115
2115
|
as: {
|
|
@@ -2158,22 +2158,22 @@ const mo = {
|
|
|
2158
2158
|
titleId: i,
|
|
2159
2159
|
descriptionId: s,
|
|
2160
2160
|
initialFocusElement: u
|
|
2161
|
-
} =
|
|
2162
|
-
return (c, f) => (
|
|
2161
|
+
} = al(l);
|
|
2162
|
+
return (c, f) => (g(), R($(bt), { as: "template" }, {
|
|
2163
2163
|
default: P(() => [
|
|
2164
|
-
D(
|
|
2164
|
+
D($(Qn), {
|
|
2165
2165
|
as: e.as,
|
|
2166
2166
|
class: "rvc-drawer",
|
|
2167
2167
|
static: "",
|
|
2168
2168
|
"aria-modal": "true",
|
|
2169
2169
|
role: "dialog",
|
|
2170
|
-
"initial-focus":
|
|
2171
|
-
"aria-labelledby":
|
|
2170
|
+
"initial-focus": $(u),
|
|
2171
|
+
"aria-labelledby": $(i),
|
|
2172
2172
|
onClose: f[5] || (f[5] = (d) => c.$emit("drawer:close")),
|
|
2173
|
-
onSubmit: f[6] || (f[6] =
|
|
2173
|
+
onSubmit: f[6] || (f[6] = kn((d) => n("drawer:save", d), ["prevent"]))
|
|
2174
2174
|
}, {
|
|
2175
2175
|
default: P(() => [
|
|
2176
|
-
D(
|
|
2176
|
+
D($(Je), {
|
|
2177
2177
|
as: "template",
|
|
2178
2178
|
enter: "rvc-ease-in-out rvc-duration-500",
|
|
2179
2179
|
"enter-from": "rvc-opacity-0",
|
|
@@ -2184,17 +2184,17 @@ const mo = {
|
|
|
2184
2184
|
onBeforeEnter: f[0] || (f[0] = (d) => n("drawer:open"))
|
|
2185
2185
|
}, {
|
|
2186
2186
|
default: P(() => f[7] || (f[7] = [
|
|
2187
|
-
|
|
2187
|
+
x("div", {
|
|
2188
2188
|
class: "rvc-fixed rvc-inset-0 rvc-transition-opacity rvc-drawer-backdrop",
|
|
2189
2189
|
"aria-hidden": "true"
|
|
2190
2190
|
}, null, -1)
|
|
2191
2191
|
])),
|
|
2192
2192
|
_: 1
|
|
2193
2193
|
}),
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
D(
|
|
2194
|
+
x("div", go, [
|
|
2195
|
+
x("div", ho, [
|
|
2196
|
+
x("div", yo, [
|
|
2197
|
+
D($(Je), {
|
|
2198
2198
|
as: "template",
|
|
2199
2199
|
enter: "rvc-transform rvc-transition rvc-ease-in-out rvc-duration-500 sm:rvc-duration-700",
|
|
2200
2200
|
"enter-from": "rvc-translate-x-full",
|
|
@@ -2206,73 +2206,73 @@ const mo = {
|
|
|
2206
2206
|
onAfterLeave: f[4] || (f[4] = (d) => (a.value = !1, n("drawer:closed")))
|
|
2207
2207
|
}, {
|
|
2208
2208
|
default: P(() => [
|
|
2209
|
-
D(
|
|
2210
|
-
class:
|
|
2209
|
+
D($(Jn), {
|
|
2210
|
+
class: N(["rvc-pointer-events-auto rvc-w-screen", e.panelClass]),
|
|
2211
2211
|
"aria-busy": e.spinning,
|
|
2212
|
-
"aria-describedby":
|
|
2212
|
+
"aria-describedby": $(s)
|
|
2213
2213
|
}, {
|
|
2214
2214
|
default: P(() => [
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
class:
|
|
2215
|
+
x("div", bo, [
|
|
2216
|
+
x("header", {
|
|
2217
|
+
class: N([{ "rvc-sticky rvc-top-0 rvc-left-0 rvc-w-full rvc-z-10": e.headerSticky }, "rvc-drawer-header"])
|
|
2218
2218
|
}, [
|
|
2219
|
-
|
|
2219
|
+
k(c.$slots, "header", {
|
|
2220
2220
|
title: e.title,
|
|
2221
2221
|
showClose: e.showClose
|
|
2222
2222
|
}, () => [
|
|
2223
|
-
|
|
2224
|
-
D(
|
|
2225
|
-
id:
|
|
2223
|
+
x("div", wo, [
|
|
2224
|
+
D($(_n), {
|
|
2225
|
+
id: $(i),
|
|
2226
2226
|
class: "rvc-drawer-title"
|
|
2227
2227
|
}, {
|
|
2228
2228
|
default: P(() => [
|
|
2229
|
-
pe(
|
|
2229
|
+
pe(M(e.title), 1)
|
|
2230
2230
|
]),
|
|
2231
2231
|
_: 1
|
|
2232
2232
|
}, 8, ["id"]),
|
|
2233
|
-
e.showClose ? (
|
|
2234
|
-
|
|
2233
|
+
e.showClose ? (g(), S("div", $o, [
|
|
2234
|
+
x("button", {
|
|
2235
2235
|
type: "button",
|
|
2236
2236
|
class: "rvc-relative rvc-drawer-close",
|
|
2237
2237
|
"aria-label": "Close panel",
|
|
2238
2238
|
onClick: f[1] || (f[1] = (d) => n("drawer:close"))
|
|
2239
2239
|
}, [
|
|
2240
|
-
D(
|
|
2240
|
+
D($(pt), {
|
|
2241
2241
|
class: "rvc-size-full",
|
|
2242
2242
|
"aria-hidden": "true"
|
|
2243
2243
|
})
|
|
2244
2244
|
])
|
|
2245
|
-
])) :
|
|
2245
|
+
])) : B("", !0)
|
|
2246
2246
|
])
|
|
2247
2247
|
])
|
|
2248
2248
|
], 2),
|
|
2249
|
-
|
|
2250
|
-
class:
|
|
2249
|
+
x("div", {
|
|
2250
|
+
class: N([e.scrolledDown ? "rvc-flex-col-reverse" : "rvc-flex-col", "rvc-flex rvc-min-h-0 rvc-flex-1 rvc-overflow-y-scroll"])
|
|
2251
2251
|
}, [
|
|
2252
|
-
|
|
2253
|
-
id:
|
|
2252
|
+
x("div", {
|
|
2253
|
+
id: $(s),
|
|
2254
2254
|
ref_key: "contentRef",
|
|
2255
2255
|
ref: r,
|
|
2256
2256
|
class: "rvc-relative rvc-flex-1 rvc-drawer-content"
|
|
2257
2257
|
}, [
|
|
2258
|
-
|
|
2259
|
-
], 8,
|
|
2258
|
+
k(c.$slots, "default", { ready: $(a) })
|
|
2259
|
+
], 8, xo)
|
|
2260
2260
|
], 2),
|
|
2261
|
-
|
|
2262
|
-
|
|
2261
|
+
x("footer", So, [
|
|
2262
|
+
k(c.$slots, "footer", { loading: e.spinning }, () => [
|
|
2263
2263
|
D(Xe, {
|
|
2264
2264
|
type: "button",
|
|
2265
2265
|
label: e.cancelLabel,
|
|
2266
2266
|
color: "light",
|
|
2267
2267
|
onClick: f[2] || (f[2] = (d) => n("drawer:close"))
|
|
2268
2268
|
}, null, 8, ["label"]),
|
|
2269
|
-
|
|
2269
|
+
$(o) ? (g(), R(Xe, {
|
|
2270
2270
|
key: 0,
|
|
2271
2271
|
type: "submit",
|
|
2272
2272
|
label: e.submitLabel,
|
|
2273
2273
|
spinning: e.spinning,
|
|
2274
2274
|
disabled: e.spinning
|
|
2275
|
-
}, null, 8, ["label", "spinning", "disabled"])) :
|
|
2275
|
+
}, null, 8, ["label", "spinning", "disabled"])) : B("", !0)
|
|
2276
2276
|
])
|
|
2277
2277
|
])
|
|
2278
2278
|
])
|
|
@@ -2292,7 +2292,7 @@ const mo = {
|
|
|
2292
2292
|
_: 3
|
|
2293
2293
|
}));
|
|
2294
2294
|
}
|
|
2295
|
-
},
|
|
2295
|
+
}, ja = /* @__PURE__ */ Object.assign({
|
|
2296
2296
|
inheritAttrs: !1
|
|
2297
2297
|
}, {
|
|
2298
2298
|
__name: "Dropdown",
|
|
@@ -2328,20 +2328,20 @@ const mo = {
|
|
|
2328
2328
|
} = r;
|
|
2329
2329
|
return c;
|
|
2330
2330
|
};
|
|
2331
|
-
return (r, a) => (
|
|
2331
|
+
return (r, a) => (g(), R($(to), {
|
|
2332
2332
|
as: "div",
|
|
2333
|
-
class:
|
|
2333
|
+
class: N(["rvc-relative rvc-inline-block rvc-w-fit", e.rootClass])
|
|
2334
2334
|
}, {
|
|
2335
2335
|
default: P(() => [
|
|
2336
|
-
|
|
2336
|
+
k(r.$slots, "button", {
|
|
2337
2337
|
label: e.label,
|
|
2338
|
-
button:
|
|
2338
|
+
button: $(fn)
|
|
2339
2339
|
}, () => [
|
|
2340
|
-
D(
|
|
2340
|
+
D($(fn), Y({
|
|
2341
2341
|
as: Xe,
|
|
2342
2342
|
label: e.label,
|
|
2343
2343
|
color: "light",
|
|
2344
|
-
icon:
|
|
2344
|
+
icon: $(Vl),
|
|
2345
2345
|
"icon-left": e.alignLeft
|
|
2346
2346
|
}, r.$attrs), null, 16, ["label", "icon", "icon-left"])
|
|
2347
2347
|
]),
|
|
@@ -2354,21 +2354,21 @@ const mo = {
|
|
|
2354
2354
|
"leave-to-class": "rvc-transform rvc-scale-95 rvc-opacity-0"
|
|
2355
2355
|
}, {
|
|
2356
2356
|
default: P(() => [
|
|
2357
|
-
D(
|
|
2358
|
-
class:
|
|
2357
|
+
D($(no), {
|
|
2358
|
+
class: N(["rvc-dropdown", e.alignLeft ? "rvc-left-0" : "rvc-right-0"])
|
|
2359
2359
|
}, {
|
|
2360
2360
|
default: P(() => [
|
|
2361
|
-
|
|
2361
|
+
k(r.$slots, "items", {
|
|
2362
2362
|
items: e.items,
|
|
2363
|
-
menuItem:
|
|
2363
|
+
menuItem: $(vn)
|
|
2364
2364
|
}, () => [
|
|
2365
|
-
(
|
|
2365
|
+
(g(!0), S(ie, null, Te(e.items, (o, i) => (g(), R($(vn), {
|
|
2366
2366
|
key: `${i}-dropdown-item`,
|
|
2367
2367
|
as: "template"
|
|
2368
2368
|
}, {
|
|
2369
2369
|
default: P(() => [
|
|
2370
|
-
|
|
2371
|
-
(
|
|
2370
|
+
k(r.$slots, "item", { item: o }, () => [
|
|
2371
|
+
(g(), R(J(o.as ? o.as : "button"), Y({
|
|
2372
2372
|
class: "rvc-dropdown-item",
|
|
2373
2373
|
ref_for: !0
|
|
2374
2374
|
}, l(o), {
|
|
@@ -2376,11 +2376,11 @@ const mo = {
|
|
|
2376
2376
|
onClick: (s) => (n("dropdown:click", o), o.event ? o.event() : null)
|
|
2377
2377
|
}), {
|
|
2378
2378
|
default: P(() => [
|
|
2379
|
-
o.icon ? (
|
|
2379
|
+
o.icon ? (g(), R(J(o.icon), {
|
|
2380
2380
|
key: 0,
|
|
2381
2381
|
class: "rvc-dropdown-item-icon"
|
|
2382
|
-
})) :
|
|
2383
|
-
pe(" " +
|
|
2382
|
+
})) : B("", !0),
|
|
2383
|
+
pe(" " + M(o.name), 1)
|
|
2384
2384
|
]),
|
|
2385
2385
|
_: 2
|
|
2386
2386
|
}, 1040, ["as", "onClick"]))
|
|
@@ -2399,10 +2399,10 @@ const mo = {
|
|
|
2399
2399
|
_: 3
|
|
2400
2400
|
}, 8, ["class"]));
|
|
2401
2401
|
}
|
|
2402
|
-
}),
|
|
2402
|
+
}), Eo = {
|
|
2403
2403
|
key: 1,
|
|
2404
2404
|
class: "rvc-empty-state-title"
|
|
2405
|
-
},
|
|
2405
|
+
}, Va = {
|
|
2406
2406
|
__name: "EmptyState",
|
|
2407
2407
|
props: {
|
|
2408
2408
|
title: {
|
|
@@ -2420,18 +2420,90 @@ const mo = {
|
|
|
2420
2420
|
}
|
|
2421
2421
|
},
|
|
2422
2422
|
setup(e) {
|
|
2423
|
-
return (t, n) => (
|
|
2424
|
-
class:
|
|
2423
|
+
return (t, n) => (g(), S("div", {
|
|
2424
|
+
class: N(["rvc-empty-state", { "rvc-empty-state-bg": e.background }])
|
|
2425
2425
|
}, [
|
|
2426
|
-
e.icon ? (
|
|
2426
|
+
e.icon ? (g(), R(J(e.icon), {
|
|
2427
2427
|
key: 0,
|
|
2428
2428
|
class: "rvc-empty-state-icon"
|
|
2429
|
-
})) :
|
|
2430
|
-
e.title ? (
|
|
2431
|
-
|
|
2429
|
+
})) : B("", !0),
|
|
2430
|
+
e.title ? (g(), S("p", Eo, M(e.title), 1)) : B("", !0),
|
|
2431
|
+
k(t.$slots, "default")
|
|
2432
|
+
], 2));
|
|
2433
|
+
}
|
|
2434
|
+
}, To = {
|
|
2435
|
+
key: 0,
|
|
2436
|
+
class: "rvc-input-prefix"
|
|
2437
|
+
}, ko = ["type"], Oo = ["type"], Ha = /* @__PURE__ */ Object.assign({
|
|
2438
|
+
inheritAttrs: !1
|
|
2439
|
+
}, {
|
|
2440
|
+
__name: "FormInput",
|
|
2441
|
+
props: {
|
|
2442
|
+
modelValue: {
|
|
2443
|
+
type: [String, Number, Object],
|
|
2444
|
+
default: null
|
|
2445
|
+
},
|
|
2446
|
+
rootClass: {
|
|
2447
|
+
type: String,
|
|
2448
|
+
default: ""
|
|
2449
|
+
},
|
|
2450
|
+
iconLeft: {
|
|
2451
|
+
type: [Object, Function],
|
|
2452
|
+
default: null
|
|
2453
|
+
},
|
|
2454
|
+
icon: {
|
|
2455
|
+
type: [Object, Function],
|
|
2456
|
+
default: null
|
|
2457
|
+
},
|
|
2458
|
+
size: {
|
|
2459
|
+
type: String,
|
|
2460
|
+
default: "base",
|
|
2461
|
+
validator: (e) => ["sm", "base"].includes(e)
|
|
2462
|
+
}
|
|
2463
|
+
},
|
|
2464
|
+
emits: ["update:modelValue"],
|
|
2465
|
+
setup(e, { emit: t }) {
|
|
2466
|
+
const n = e, l = t, { hasModelBinding: r } = mt(), a = $l(), o = w({
|
|
2467
|
+
get: () => n.modelValue,
|
|
2468
|
+
set: (i) => l("update:modelValue", i)
|
|
2469
|
+
});
|
|
2470
|
+
return (i, s) => (g(), S("div", {
|
|
2471
|
+
class: N([
|
|
2472
|
+
"rvc-input",
|
|
2473
|
+
`rvc-input-${e.size}`,
|
|
2474
|
+
e.rootClass
|
|
2475
|
+
])
|
|
2476
|
+
}, [
|
|
2477
|
+
$(a).prefix || $(a).iconLeft || e.iconLeft ? (g(), S("span", To, [
|
|
2478
|
+
k(i.$slots, "prefix", {}, () => [
|
|
2479
|
+
k(i.$slots, "iconLeft", { icon: e.iconLeft }, () => [
|
|
2480
|
+
e.iconLeft ? (g(), R(J(e.iconLeft), {
|
|
2481
|
+
key: 0,
|
|
2482
|
+
"aria-hidden": "true"
|
|
2483
|
+
})) : B("", !0)
|
|
2484
|
+
])
|
|
2485
|
+
])
|
|
2486
|
+
])) : B("", !0),
|
|
2487
|
+
k(i.$slots, "input", He(Tn(i.$attrs)), () => [
|
|
2488
|
+
$(r) ? vt((g(), S("input", Y({ key: 0 }, i.$attrs, {
|
|
2489
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => o.value = u),
|
|
2490
|
+
type: i.$attrs.type || "text"
|
|
2491
|
+
}), null, 16, ko)), [
|
|
2492
|
+
[Nt, o.value]
|
|
2493
|
+
]) : (g(), S("input", Y({
|
|
2494
|
+
key: 1,
|
|
2495
|
+
type: i.$attrs.type || "text"
|
|
2496
|
+
}, i.$attrs), null, 16, Oo))
|
|
2497
|
+
]),
|
|
2498
|
+
k(i.$slots, "icon", { icon: e.icon }, () => [
|
|
2499
|
+
e.icon ? (g(), R(J(e.icon), {
|
|
2500
|
+
key: 0,
|
|
2501
|
+
"aria-hidden": "true"
|
|
2502
|
+
})) : B("", !0)
|
|
2503
|
+
])
|
|
2432
2504
|
], 2));
|
|
2433
2505
|
}
|
|
2434
|
-
},
|
|
2506
|
+
}), Wa = /* @__PURE__ */ Object.assign({
|
|
2435
2507
|
inheritAttrs: !1
|
|
2436
2508
|
}, {
|
|
2437
2509
|
__name: "Lightswitch",
|
|
@@ -2447,40 +2519,40 @@ const mo = {
|
|
|
2447
2519
|
get: () => n.modelValue,
|
|
2448
2520
|
set: (a) => l("update:modelValue", a)
|
|
2449
2521
|
});
|
|
2450
|
-
return (a, o) => (
|
|
2522
|
+
return (a, o) => (g(), R($(oo), {
|
|
2451
2523
|
as: "div",
|
|
2452
2524
|
class: "rvc-lightswitch-group"
|
|
2453
2525
|
}, {
|
|
2454
2526
|
default: P(() => [
|
|
2455
|
-
D(
|
|
2527
|
+
D($(ao), Y({
|
|
2456
2528
|
modelValue: r.value,
|
|
2457
2529
|
"onUpdate:modelValue": o[0] || (o[0] = (i) => r.value = i),
|
|
2458
2530
|
class: [{ "rvc-lightswitch-enabled": r.value }, "rvc-lightswitch"]
|
|
2459
2531
|
}, a.$attrs), {
|
|
2460
2532
|
default: P(() => [
|
|
2461
|
-
|
|
2462
|
-
class:
|
|
2533
|
+
x("span", {
|
|
2534
|
+
class: N([{ "rvc-translate-x-6": r.value }, "rvc-lightswitch-toggle"])
|
|
2463
2535
|
}, null, 2)
|
|
2464
2536
|
]),
|
|
2465
2537
|
_: 1
|
|
2466
2538
|
}, 16, ["modelValue", "class"]),
|
|
2467
|
-
a.$slots.default ? (
|
|
2539
|
+
a.$slots.default ? (g(), R($(io), { key: 0 }, {
|
|
2468
2540
|
default: P(() => [
|
|
2469
|
-
|
|
2541
|
+
k(a.$slots, "default")
|
|
2470
2542
|
]),
|
|
2471
2543
|
_: 3
|
|
2472
|
-
})) :
|
|
2544
|
+
})) : B("", !0)
|
|
2473
2545
|
]),
|
|
2474
2546
|
_: 3
|
|
2475
2547
|
}));
|
|
2476
2548
|
}
|
|
2477
|
-
}),
|
|
2549
|
+
}), Lo = {
|
|
2478
2550
|
role: "presentation",
|
|
2479
2551
|
class: "rvc-fixed rvc-inset-0 rvc-z-10 rvc-w-screen rvc-overflow-y-auto"
|
|
2480
|
-
},
|
|
2552
|
+
}, Co = { class: "rvc-flex rvc-min-h-full rvc-justify-center rvc-p-4 rvc-items-center sm:rvc-p-0" }, Po = { class: "rvc-modal-header" }, Ao = { class: "rvc-flex rvc-items-center rvc-justify-between" }, Do = {
|
|
2481
2553
|
key: 0,
|
|
2482
2554
|
class: "rvc-ml-3 rvc-flex rvc-h-7 rvc-items-center"
|
|
2483
|
-
},
|
|
2555
|
+
}, Ro = ["id"], Fo = { class: "rvc-modal-footer" }, Ua = {
|
|
2484
2556
|
__name: "Modal",
|
|
2485
2557
|
props: {
|
|
2486
2558
|
as: {
|
|
@@ -2523,22 +2595,22 @@ const mo = {
|
|
|
2523
2595
|
titleId: i,
|
|
2524
2596
|
descriptionId: s,
|
|
2525
2597
|
initialFocusElement: u
|
|
2526
|
-
} =
|
|
2527
|
-
return (c, f) => (
|
|
2598
|
+
} = al(l);
|
|
2599
|
+
return (c, f) => (g(), R($(bt), { as: "template" }, {
|
|
2528
2600
|
default: P(() => [
|
|
2529
|
-
D(
|
|
2601
|
+
D($(Qn), {
|
|
2530
2602
|
as: e.as,
|
|
2531
2603
|
class: "rvc-modal",
|
|
2532
2604
|
static: "",
|
|
2533
2605
|
"aria-modal": "true",
|
|
2534
2606
|
role: "dialog",
|
|
2535
|
-
"initial-focus":
|
|
2536
|
-
"aria-labelledby":
|
|
2607
|
+
"initial-focus": $(u),
|
|
2608
|
+
"aria-labelledby": $(i),
|
|
2537
2609
|
onClose: f[6] || (f[6] = (d) => c.$emit("modal:close")),
|
|
2538
|
-
onSubmit: f[7] || (f[7] =
|
|
2610
|
+
onSubmit: f[7] || (f[7] = kn((d) => n("modal:save", d), ["prevent"]))
|
|
2539
2611
|
}, {
|
|
2540
2612
|
default: P(() => [
|
|
2541
|
-
D(
|
|
2613
|
+
D($(Je), {
|
|
2542
2614
|
as: "template",
|
|
2543
2615
|
enter: "rvc-ease-out rvc-duration-300",
|
|
2544
2616
|
"enter-from": "rvc-opacity-0",
|
|
@@ -2549,16 +2621,16 @@ const mo = {
|
|
|
2549
2621
|
onBeforeEnter: f[0] || (f[0] = (d) => n("modal:open"))
|
|
2550
2622
|
}, {
|
|
2551
2623
|
default: P(() => f[8] || (f[8] = [
|
|
2552
|
-
|
|
2624
|
+
x("div", {
|
|
2553
2625
|
"aria-hidden": "true",
|
|
2554
2626
|
class: "rvc-fixed rvc-inset-0 rvc-transition-opacity rvc-modal-backdrop"
|
|
2555
2627
|
}, null, -1)
|
|
2556
2628
|
])),
|
|
2557
2629
|
_: 1
|
|
2558
2630
|
}),
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
D(
|
|
2631
|
+
x("div", Lo, [
|
|
2632
|
+
x("div", Co, [
|
|
2633
|
+
D($(Je), {
|
|
2562
2634
|
as: "template",
|
|
2563
2635
|
enter: "rvc-ease-out rvc-duration-300",
|
|
2564
2636
|
"enter-from": "rvc-opacity-0 rvc-translate-y-4 sm:rvc-translate-y-0 sm:rvc-scale-95",
|
|
@@ -2570,56 +2642,56 @@ const mo = {
|
|
|
2570
2642
|
onAfterLeave: f[5] || (f[5] = (d) => (a.value = !1, n("modal:closed")))
|
|
2571
2643
|
}, {
|
|
2572
2644
|
default: P(() => [
|
|
2573
|
-
D(
|
|
2574
|
-
class:
|
|
2645
|
+
D($(Jn), {
|
|
2646
|
+
class: N(["rvc-modal-panel", e.panelClass]),
|
|
2575
2647
|
"aria-busy": e.spinning,
|
|
2576
|
-
"aria-describedby":
|
|
2648
|
+
"aria-describedby": $(s)
|
|
2577
2649
|
}, {
|
|
2578
2650
|
default: P(() => [
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
D(
|
|
2583
|
-
id:
|
|
2651
|
+
x("header", Po, [
|
|
2652
|
+
k(c.$slots, "header", { title: e.title }, () => [
|
|
2653
|
+
x("div", Ao, [
|
|
2654
|
+
D($(_n), {
|
|
2655
|
+
id: $(i),
|
|
2584
2656
|
class: "rvc-modal-title"
|
|
2585
2657
|
}, {
|
|
2586
2658
|
default: P(() => [
|
|
2587
|
-
pe(
|
|
2659
|
+
pe(M(e.title), 1)
|
|
2588
2660
|
]),
|
|
2589
2661
|
_: 1
|
|
2590
2662
|
}, 8, ["id"]),
|
|
2591
|
-
e.showClose ? (
|
|
2592
|
-
|
|
2663
|
+
e.showClose ? (g(), S("div", Do, [
|
|
2664
|
+
x("button", {
|
|
2593
2665
|
type: "button",
|
|
2594
2666
|
class: "rvc-relative rvc-modal-close",
|
|
2595
2667
|
"aria-label": "Close panel",
|
|
2596
2668
|
onClick: f[1] || (f[1] = (d) => n("modal:close"))
|
|
2597
2669
|
}, [
|
|
2598
|
-
D(
|
|
2670
|
+
D($(pt), {
|
|
2599
2671
|
class: "rvc-size-full",
|
|
2600
2672
|
"aria-hidden": "true"
|
|
2601
2673
|
})
|
|
2602
2674
|
])
|
|
2603
|
-
])) :
|
|
2675
|
+
])) : B("", !0)
|
|
2604
2676
|
])
|
|
2605
2677
|
])
|
|
2606
2678
|
]),
|
|
2607
|
-
|
|
2608
|
-
id:
|
|
2679
|
+
x("div", {
|
|
2680
|
+
id: $(s),
|
|
2609
2681
|
ref_key: "contentRef",
|
|
2610
2682
|
ref: r,
|
|
2611
2683
|
class: "rvc-modal-content"
|
|
2612
2684
|
}, [
|
|
2613
|
-
|
|
2614
|
-
], 8,
|
|
2615
|
-
|
|
2616
|
-
|
|
2685
|
+
k(c.$slots, "default", { ready: $(a) })
|
|
2686
|
+
], 8, Ro),
|
|
2687
|
+
x("footer", Fo, [
|
|
2688
|
+
k(c.$slots, "footer", { loading: e.spinning }, () => [
|
|
2617
2689
|
D(Xe, {
|
|
2618
|
-
type:
|
|
2690
|
+
type: $(o) ? "submit" : "button",
|
|
2619
2691
|
label: e.submitLabel,
|
|
2620
2692
|
spinning: e.spinning,
|
|
2621
2693
|
disabled: e.spinning,
|
|
2622
|
-
onClick: f[2] || (f[2] = (d) =>
|
|
2694
|
+
onClick: f[2] || (f[2] = (d) => !$(o) && c.$emit("modal:save"))
|
|
2623
2695
|
}, null, 8, ["type", "label", "spinning", "disabled"]),
|
|
2624
2696
|
D(Xe, {
|
|
2625
2697
|
type: "button",
|
|
@@ -2644,7 +2716,7 @@ const mo = {
|
|
|
2644
2716
|
_: 3
|
|
2645
2717
|
}));
|
|
2646
2718
|
}
|
|
2647
|
-
},
|
|
2719
|
+
}, Mo = { class: "rvc-radio" }, Bo = ["id"], Io = { key: 2 }, No = ["for"], za = /* @__PURE__ */ Object.assign({
|
|
2648
2720
|
inheritAttrs: !1
|
|
2649
2721
|
}, {
|
|
2650
2722
|
__name: "Radio",
|
|
@@ -2667,28 +2739,28 @@ const mo = {
|
|
|
2667
2739
|
const n = e, l = t, r = w({
|
|
2668
2740
|
get: () => n.modelValue,
|
|
2669
2741
|
set: (s) => l("update:modelValue", s)
|
|
2670
|
-
}), { hasModelBinding: a } =
|
|
2671
|
-
...
|
|
2742
|
+
}), { hasModelBinding: a } = mt(), i = {
|
|
2743
|
+
...En(),
|
|
2672
2744
|
id: n.id,
|
|
2673
2745
|
type: "radio",
|
|
2674
2746
|
class: "rvc-absolute rvc-opacity-0 rvc-inset-0 rvc-cursor-pointer"
|
|
2675
2747
|
};
|
|
2676
|
-
return (s, u) => (
|
|
2677
|
-
|
|
2748
|
+
return (s, u) => (g(), S("div", Mo, [
|
|
2749
|
+
$(a) ? vt((g(), S("input", Y({ key: 0 }, i, {
|
|
2678
2750
|
id: e.id,
|
|
2679
2751
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c)
|
|
2680
|
-
}), null, 16,
|
|
2681
|
-
[
|
|
2682
|
-
]) : (
|
|
2683
|
-
u[1] || (u[1] =
|
|
2684
|
-
s.$slots.default || e.label ? (
|
|
2685
|
-
|
|
2686
|
-
|
|
2752
|
+
}), null, 16, Bo)), [
|
|
2753
|
+
[Nt, r.value]
|
|
2754
|
+
]) : (g(), S("input", He(Y({ key: 1 }, i)), null, 16)),
|
|
2755
|
+
u[1] || (u[1] = x("span", { class: "rvc-radio-input" }, null, -1)),
|
|
2756
|
+
s.$slots.default || e.label ? (g(), S("span", Io, [
|
|
2757
|
+
k(s.$slots, "default", {}, () => [
|
|
2758
|
+
x("label", { for: e.id }, M(e.label), 9, No)
|
|
2687
2759
|
])
|
|
2688
|
-
])) :
|
|
2760
|
+
])) : B("", !0)
|
|
2689
2761
|
]));
|
|
2690
2762
|
}
|
|
2691
|
-
}),
|
|
2763
|
+
}), jo = { class: "rvc-tabs-nav" }, Vo = { class: "md:rvc-hidden" }, Ho = ["value", "selected"], qa = {
|
|
2692
2764
|
__name: "Tabs",
|
|
2693
2765
|
props: {
|
|
2694
2766
|
modelValue: {
|
|
@@ -2733,42 +2805,42 @@ const mo = {
|
|
|
2733
2805
|
} = s;
|
|
2734
2806
|
return p;
|
|
2735
2807
|
};
|
|
2736
|
-
return (s, u) => (
|
|
2737
|
-
|
|
2738
|
-
class:
|
|
2808
|
+
return (s, u) => (g(), S(ie, null, [
|
|
2809
|
+
x("div", {
|
|
2810
|
+
class: N(["rvc-tabs rvc-hidden md:rvc-flex", { "rvc-tabs-buttons": e.tabStyle === "buttons" }])
|
|
2739
2811
|
}, [
|
|
2740
|
-
|
|
2741
|
-
(
|
|
2812
|
+
x("nav", jo, [
|
|
2813
|
+
(g(!0), S(ie, null, Te(e.tabs, (c, f) => (g(), R(J(c.as ? c.as : "button"), Y({ ref_for: !0 }, i(c), {
|
|
2742
2814
|
key: `${f}-tab-item`,
|
|
2743
2815
|
as: c.bindAs ? c.bindAs : void 0,
|
|
2744
2816
|
class: ["rvc-tab", { "rvc-tab-active": a.value === f }],
|
|
2745
2817
|
onClick: (d) => a.value = f
|
|
2746
2818
|
}), {
|
|
2747
2819
|
default: P(() => [
|
|
2748
|
-
pe(
|
|
2820
|
+
pe(M(c.name), 1)
|
|
2749
2821
|
]),
|
|
2750
2822
|
_: 2
|
|
2751
2823
|
}, 1040, ["as", "class", "onClick"]))), 128))
|
|
2752
2824
|
])
|
|
2753
2825
|
], 2),
|
|
2754
|
-
|
|
2755
|
-
D(
|
|
2826
|
+
x("div", Vo, [
|
|
2827
|
+
D(Ln, {
|
|
2756
2828
|
value: a.value,
|
|
2757
2829
|
onChange: o
|
|
2758
2830
|
}, {
|
|
2759
2831
|
default: P(() => [
|
|
2760
|
-
(
|
|
2832
|
+
(g(!0), S(ie, null, Te(e.tabs, (c, f) => (g(), S("option", {
|
|
2761
2833
|
key: `${f}-tab-item-select-option`,
|
|
2762
2834
|
value: f,
|
|
2763
2835
|
selected: a.value === f
|
|
2764
|
-
},
|
|
2836
|
+
}, M(c.name), 9, Ho))), 128))
|
|
2765
2837
|
]),
|
|
2766
2838
|
_: 1
|
|
2767
2839
|
}, 8, ["value"])
|
|
2768
2840
|
])
|
|
2769
2841
|
], 64));
|
|
2770
2842
|
}
|
|
2771
|
-
},
|
|
2843
|
+
}, Wo = { class: "rvc-toast-title" }, Ka = {
|
|
2772
2844
|
__name: "Toast",
|
|
2773
2845
|
props: {
|
|
2774
2846
|
as: {
|
|
@@ -2817,7 +2889,7 @@ const mo = {
|
|
|
2817
2889
|
r();
|
|
2818
2890
|
}), me(() => n.open, (a) => {
|
|
2819
2891
|
a && r();
|
|
2820
|
-
}), (a, o) => (
|
|
2892
|
+
}), (a, o) => (g(), R($(bt), {
|
|
2821
2893
|
as: "template",
|
|
2822
2894
|
show: e.open,
|
|
2823
2895
|
enter: "rvc-transition-opacity rvc-duration-300",
|
|
@@ -2828,31 +2900,31 @@ const mo = {
|
|
|
2828
2900
|
"leave-to": "rvc-opacity-0"
|
|
2829
2901
|
}, {
|
|
2830
2902
|
default: P(() => [
|
|
2831
|
-
(
|
|
2832
|
-
class:
|
|
2903
|
+
(g(), R(J(e.as), {
|
|
2904
|
+
class: N(["rvc-toast rvc-transition-opacity", `rvc-toast-${e.position}`, `rvc-toast-${e.type}`, { "rvc-toast-open": e.open }])
|
|
2833
2905
|
}, {
|
|
2834
2906
|
default: P(() => [
|
|
2835
|
-
|
|
2836
|
-
e.icon ? (
|
|
2907
|
+
k(a.$slots, "icon", {}, () => [
|
|
2908
|
+
e.icon ? (g(), R(J(e.icon), {
|
|
2837
2909
|
key: 0,
|
|
2838
2910
|
class: "rvc-toast-icon"
|
|
2839
|
-
})) :
|
|
2911
|
+
})) : B("", !0)
|
|
2840
2912
|
]),
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2913
|
+
x("div", null, [
|
|
2914
|
+
k(a.$slots, "title", {}, () => [
|
|
2915
|
+
x("span", Wo, M(e.title), 1)
|
|
2844
2916
|
]),
|
|
2845
|
-
|
|
2917
|
+
k(a.$slots, "default")
|
|
2846
2918
|
]),
|
|
2847
|
-
|
|
2848
|
-
e.showClose ? (
|
|
2919
|
+
k(a.$slots, "close", {}, () => [
|
|
2920
|
+
e.showClose ? (g(), S("button", {
|
|
2849
2921
|
key: 0,
|
|
2850
2922
|
type: "button",
|
|
2851
2923
|
class: "rvc-toast-close rvc-transition-colors",
|
|
2852
2924
|
onClick: o[0] || (o[0] = (i) => a.$emit("toast:close"))
|
|
2853
2925
|
}, [
|
|
2854
|
-
D(
|
|
2855
|
-
])) :
|
|
2926
|
+
D($(pt), { class: "rvc-size-5" })
|
|
2927
|
+
])) : B("", !0)
|
|
2856
2928
|
])
|
|
2857
2929
|
]),
|
|
2858
2930
|
_: 3
|
|
@@ -2861,22 +2933,22 @@ const mo = {
|
|
|
2861
2933
|
_: 3
|
|
2862
2934
|
}, 8, ["show"]));
|
|
2863
2935
|
}
|
|
2864
|
-
},
|
|
2936
|
+
}, Uo = ["top", "right", "bottom", "left"], mn = ["start", "end"], gn = /* @__PURE__ */ Uo.reduce((e, t) => e.concat(t, t + "-" + mn[0], t + "-" + mn[1]), []), Ce = Math.min, oe = Math.max, dt = Math.round, ut = Math.floor, $e = (e) => ({
|
|
2865
2937
|
x: e,
|
|
2866
2938
|
y: e
|
|
2867
|
-
}),
|
|
2939
|
+
}), zo = {
|
|
2868
2940
|
left: "right",
|
|
2869
2941
|
right: "left",
|
|
2870
2942
|
bottom: "top",
|
|
2871
2943
|
top: "bottom"
|
|
2872
|
-
},
|
|
2944
|
+
}, qo = {
|
|
2873
2945
|
start: "end",
|
|
2874
2946
|
end: "start"
|
|
2875
2947
|
};
|
|
2876
|
-
function
|
|
2877
|
-
return
|
|
2948
|
+
function Mt(e, t, n) {
|
|
2949
|
+
return oe(e, Ce(t, n));
|
|
2878
2950
|
}
|
|
2879
|
-
function
|
|
2951
|
+
function ze(e, t) {
|
|
2880
2952
|
return typeof e == "function" ? e(t) : e;
|
|
2881
2953
|
}
|
|
2882
2954
|
function Be(e) {
|
|
@@ -2885,31 +2957,31 @@ function Be(e) {
|
|
|
2885
2957
|
function xe(e) {
|
|
2886
2958
|
return e.split("-")[1];
|
|
2887
2959
|
}
|
|
2888
|
-
function
|
|
2960
|
+
function il(e) {
|
|
2889
2961
|
return e === "x" ? "y" : "x";
|
|
2890
2962
|
}
|
|
2891
|
-
function
|
|
2963
|
+
function qt(e) {
|
|
2892
2964
|
return e === "y" ? "height" : "width";
|
|
2893
2965
|
}
|
|
2894
2966
|
function lt(e) {
|
|
2895
2967
|
return ["top", "bottom"].includes(Be(e)) ? "y" : "x";
|
|
2896
2968
|
}
|
|
2897
|
-
function
|
|
2898
|
-
return
|
|
2969
|
+
function Kt(e) {
|
|
2970
|
+
return il(lt(e));
|
|
2899
2971
|
}
|
|
2900
|
-
function
|
|
2972
|
+
function Ko(e, t, n) {
|
|
2901
2973
|
n === void 0 && (n = !1);
|
|
2902
|
-
const l = xe(e), r =
|
|
2974
|
+
const l = xe(e), r = Kt(e), a = qt(r);
|
|
2903
2975
|
let o = r === "x" ? l === (n ? "end" : "start") ? "right" : "left" : l === "start" ? "bottom" : "top";
|
|
2904
|
-
return t.reference[a] > t.floating[a] && (o =
|
|
2976
|
+
return t.reference[a] > t.floating[a] && (o = hn(o)), [o, hn(o)];
|
|
2905
2977
|
}
|
|
2906
|
-
function
|
|
2907
|
-
return e.replace(/start|end/g, (t) =>
|
|
2978
|
+
function Yo(e) {
|
|
2979
|
+
return e.replace(/start|end/g, (t) => qo[t]);
|
|
2908
2980
|
}
|
|
2909
|
-
function
|
|
2910
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
2981
|
+
function hn(e) {
|
|
2982
|
+
return e.replace(/left|right|bottom|top/g, (t) => zo[t]);
|
|
2911
2983
|
}
|
|
2912
|
-
function
|
|
2984
|
+
function Zo(e) {
|
|
2913
2985
|
return {
|
|
2914
2986
|
top: 0,
|
|
2915
2987
|
right: 0,
|
|
@@ -2918,8 +2990,8 @@ function zo(e) {
|
|
|
2918
2990
|
...e
|
|
2919
2991
|
};
|
|
2920
2992
|
}
|
|
2921
|
-
function
|
|
2922
|
-
return typeof e != "number" ?
|
|
2993
|
+
function sl(e) {
|
|
2994
|
+
return typeof e != "number" ? Zo(e) : {
|
|
2923
2995
|
top: e,
|
|
2924
2996
|
right: e,
|
|
2925
2997
|
bottom: e,
|
|
@@ -2944,12 +3016,12 @@ function ft(e) {
|
|
|
2944
3016
|
y: n
|
|
2945
3017
|
};
|
|
2946
3018
|
}
|
|
2947
|
-
function
|
|
3019
|
+
function yn(e, t, n) {
|
|
2948
3020
|
let {
|
|
2949
3021
|
reference: l,
|
|
2950
3022
|
floating: r
|
|
2951
3023
|
} = e;
|
|
2952
|
-
const a = lt(t), o =
|
|
3024
|
+
const a = lt(t), o = Kt(t), i = qt(o), s = Be(t), u = a === "y", c = l.x + l.width / 2 - r.width / 2, f = l.y + l.height / 2 - r.height / 2, d = l[i] / 2 - r[i] / 2;
|
|
2953
3025
|
let v;
|
|
2954
3026
|
switch (s) {
|
|
2955
3027
|
case "top":
|
|
@@ -2992,7 +3064,7 @@ function hn(e, t, n) {
|
|
|
2992
3064
|
}
|
|
2993
3065
|
return v;
|
|
2994
3066
|
}
|
|
2995
|
-
const
|
|
3067
|
+
const Go = async (e, t, n) => {
|
|
2996
3068
|
const {
|
|
2997
3069
|
placement: l = "bottom",
|
|
2998
3070
|
strategy: r = "absolute",
|
|
@@ -3006,17 +3078,17 @@ const qo = async (e, t, n) => {
|
|
|
3006
3078
|
}), {
|
|
3007
3079
|
x: c,
|
|
3008
3080
|
y: f
|
|
3009
|
-
} =
|
|
3081
|
+
} = yn(u, l, s), d = l, v = {}, p = 0;
|
|
3010
3082
|
for (let m = 0; m < i.length; m++) {
|
|
3011
3083
|
const {
|
|
3012
|
-
name:
|
|
3013
|
-
fn:
|
|
3084
|
+
name: h,
|
|
3085
|
+
fn: y
|
|
3014
3086
|
} = i[m], {
|
|
3015
|
-
x:
|
|
3087
|
+
x: b,
|
|
3016
3088
|
y: T,
|
|
3017
3089
|
data: A,
|
|
3018
3090
|
reset: C
|
|
3019
|
-
} = await
|
|
3091
|
+
} = await y({
|
|
3020
3092
|
x: c,
|
|
3021
3093
|
y: f,
|
|
3022
3094
|
initialPlacement: l,
|
|
@@ -3030,10 +3102,10 @@ const qo = async (e, t, n) => {
|
|
|
3030
3102
|
floating: t
|
|
3031
3103
|
}
|
|
3032
3104
|
});
|
|
3033
|
-
c =
|
|
3105
|
+
c = b ?? c, f = T ?? f, v = {
|
|
3034
3106
|
...v,
|
|
3035
|
-
[
|
|
3036
|
-
...v[
|
|
3107
|
+
[h]: {
|
|
3108
|
+
...v[h],
|
|
3037
3109
|
...A
|
|
3038
3110
|
}
|
|
3039
3111
|
}, C && p <= 50 && (p++, typeof C == "object" && (C.placement && (d = C.placement), C.rects && (u = C.rects === !0 ? await o.getElementRects({
|
|
@@ -3043,7 +3115,7 @@ const qo = async (e, t, n) => {
|
|
|
3043
3115
|
}) : C.rects), {
|
|
3044
3116
|
x: c,
|
|
3045
3117
|
y: f
|
|
3046
|
-
} =
|
|
3118
|
+
} = yn(u, d, s)), m = -1);
|
|
3047
3119
|
}
|
|
3048
3120
|
return {
|
|
3049
3121
|
x: c,
|
|
@@ -3053,7 +3125,7 @@ const qo = async (e, t, n) => {
|
|
|
3053
3125
|
middlewareData: v
|
|
3054
3126
|
};
|
|
3055
3127
|
};
|
|
3056
|
-
async function
|
|
3128
|
+
async function Yt(e, t) {
|
|
3057
3129
|
var n;
|
|
3058
3130
|
t === void 0 && (t = {});
|
|
3059
3131
|
const {
|
|
@@ -3069,12 +3141,12 @@ async function Kt(e, t) {
|
|
|
3069
3141
|
elementContext: f = "floating",
|
|
3070
3142
|
altBoundary: d = !1,
|
|
3071
3143
|
padding: v = 0
|
|
3072
|
-
} =
|
|
3073
|
-
element: (n = await (a.isElement == null ? void 0 : a.isElement(
|
|
3144
|
+
} = ze(t, e), p = sl(v), h = i[d ? f === "floating" ? "reference" : "floating" : f], y = ft(await a.getClippingRect({
|
|
3145
|
+
element: (n = await (a.isElement == null ? void 0 : a.isElement(h))) == null || n ? h : h.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(i.floating)),
|
|
3074
3146
|
boundary: u,
|
|
3075
3147
|
rootBoundary: c,
|
|
3076
3148
|
strategy: s
|
|
3077
|
-
})),
|
|
3149
|
+
})), b = f === "floating" ? {
|
|
3078
3150
|
x: l,
|
|
3079
3151
|
y: r,
|
|
3080
3152
|
width: o.floating.width,
|
|
@@ -3087,18 +3159,18 @@ async function Kt(e, t) {
|
|
|
3087
3159
|
y: 1
|
|
3088
3160
|
}, C = ft(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
3089
3161
|
elements: i,
|
|
3090
|
-
rect:
|
|
3162
|
+
rect: b,
|
|
3091
3163
|
offsetParent: T,
|
|
3092
3164
|
strategy: s
|
|
3093
|
-
}) :
|
|
3165
|
+
}) : b);
|
|
3094
3166
|
return {
|
|
3095
|
-
top: (
|
|
3096
|
-
bottom: (C.bottom -
|
|
3097
|
-
left: (
|
|
3098
|
-
right: (C.right -
|
|
3167
|
+
top: (y.top - C.top + p.top) / A.y,
|
|
3168
|
+
bottom: (C.bottom - y.bottom + p.bottom) / A.y,
|
|
3169
|
+
left: (y.left - C.left + p.left) / A.x,
|
|
3170
|
+
right: (C.right - y.right + p.right) / A.x
|
|
3099
3171
|
};
|
|
3100
3172
|
}
|
|
3101
|
-
const
|
|
3173
|
+
const Xo = (e) => ({
|
|
3102
3174
|
name: "arrow",
|
|
3103
3175
|
options: e,
|
|
3104
3176
|
async fn(t) {
|
|
@@ -3113,33 +3185,33 @@ const Ko = (e) => ({
|
|
|
3113
3185
|
} = t, {
|
|
3114
3186
|
element: u,
|
|
3115
3187
|
padding: c = 0
|
|
3116
|
-
} =
|
|
3188
|
+
} = ze(e, t) || {};
|
|
3117
3189
|
if (u == null)
|
|
3118
3190
|
return {};
|
|
3119
|
-
const f =
|
|
3191
|
+
const f = sl(c), d = {
|
|
3120
3192
|
x: n,
|
|
3121
3193
|
y: l
|
|
3122
|
-
}, v =
|
|
3123
|
-
let L =
|
|
3124
|
-
(!L || !await (o.isElement == null ? void 0 : o.isElement(
|
|
3125
|
-
const
|
|
3194
|
+
}, v = Kt(r), p = qt(v), m = await o.getDimensions(u), h = v === "y", y = h ? "top" : "left", b = h ? "bottom" : "right", T = h ? "clientHeight" : "clientWidth", A = a.reference[p] + a.reference[v] - d[v] - a.floating[p], C = d[v] - a.reference[v], I = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(u));
|
|
3195
|
+
let L = I ? I[T] : 0;
|
|
3196
|
+
(!L || !await (o.isElement == null ? void 0 : o.isElement(I))) && (L = i.floating[T] || a.floating[p]);
|
|
3197
|
+
const j = A / 2 - C / 2, X = L / 2 - m[p] / 2 - 1, V = Ce(f[y], X), Q = Ce(f[b], X), te = V, Z = L - m[p] - Q, ne = L / 2 - m[p] / 2 + j, le = Mt(te, ne, Z), re = !s.arrow && xe(r) != null && ne !== le && a.reference[p] / 2 - (ne < te ? V : Q) - m[p] / 2 < 0, be = re ? ne < te ? ne - te : ne - Z : 0;
|
|
3126
3198
|
return {
|
|
3127
3199
|
[v]: d[v] + be,
|
|
3128
3200
|
data: {
|
|
3129
|
-
[v]:
|
|
3130
|
-
centerOffset:
|
|
3131
|
-
...
|
|
3201
|
+
[v]: le,
|
|
3202
|
+
centerOffset: ne - le - be,
|
|
3203
|
+
...re && {
|
|
3132
3204
|
alignmentOffset: be
|
|
3133
3205
|
}
|
|
3134
3206
|
},
|
|
3135
|
-
reset:
|
|
3207
|
+
reset: re
|
|
3136
3208
|
};
|
|
3137
3209
|
}
|
|
3138
3210
|
});
|
|
3139
|
-
function
|
|
3140
|
-
return (e ? [...n.filter((r) => xe(r) === e), ...n.filter((r) => xe(r) !== e)] : n.filter((r) => Be(r) === r)).filter((r) => e ? xe(r) === e || (t ?
|
|
3211
|
+
function Qo(e, t, n) {
|
|
3212
|
+
return (e ? [...n.filter((r) => xe(r) === e), ...n.filter((r) => xe(r) !== e)] : n.filter((r) => Be(r) === r)).filter((r) => e ? xe(r) === e || (t ? Yo(r) !== r : !1) : !0);
|
|
3141
3213
|
}
|
|
3142
|
-
const
|
|
3214
|
+
const Jo = function(e) {
|
|
3143
3215
|
return e === void 0 && (e = {}), {
|
|
3144
3216
|
name: "autoPlacement",
|
|
3145
3217
|
options: e,
|
|
@@ -3154,38 +3226,38 @@ const Zo = function(e) {
|
|
|
3154
3226
|
} = t, {
|
|
3155
3227
|
crossAxis: c = !1,
|
|
3156
3228
|
alignment: f,
|
|
3157
|
-
allowedPlacements: d =
|
|
3229
|
+
allowedPlacements: d = gn,
|
|
3158
3230
|
autoAlignment: v = !0,
|
|
3159
3231
|
...p
|
|
3160
|
-
} =
|
|
3161
|
-
if (
|
|
3232
|
+
} = ze(e, t), m = f !== void 0 || d === gn ? Qo(f || null, v, d) : d, h = await Yt(t, p), y = ((n = o.autoPlacement) == null ? void 0 : n.index) || 0, b = m[y];
|
|
3233
|
+
if (b == null)
|
|
3162
3234
|
return {};
|
|
3163
|
-
const T =
|
|
3164
|
-
if (i !==
|
|
3235
|
+
const T = Ko(b, a, await (s.isRTL == null ? void 0 : s.isRTL(u.floating)));
|
|
3236
|
+
if (i !== b)
|
|
3165
3237
|
return {
|
|
3166
3238
|
reset: {
|
|
3167
3239
|
placement: m[0]
|
|
3168
3240
|
}
|
|
3169
3241
|
};
|
|
3170
|
-
const A = [
|
|
3171
|
-
placement:
|
|
3242
|
+
const A = [h[Be(b)], h[T[0]], h[T[1]]], C = [...((l = o.autoPlacement) == null ? void 0 : l.overflows) || [], {
|
|
3243
|
+
placement: b,
|
|
3172
3244
|
overflows: A
|
|
3173
|
-
}],
|
|
3174
|
-
if (
|
|
3245
|
+
}], I = m[y + 1];
|
|
3246
|
+
if (I)
|
|
3175
3247
|
return {
|
|
3176
3248
|
data: {
|
|
3177
|
-
index:
|
|
3249
|
+
index: y + 1,
|
|
3178
3250
|
overflows: C
|
|
3179
3251
|
},
|
|
3180
3252
|
reset: {
|
|
3181
|
-
placement:
|
|
3253
|
+
placement: I
|
|
3182
3254
|
}
|
|
3183
3255
|
};
|
|
3184
3256
|
const L = C.map((V) => {
|
|
3185
3257
|
const Q = xe(V.placement);
|
|
3186
3258
|
return [V.placement, Q && c ? (
|
|
3187
3259
|
// Check along the mainAxis and main crossAxis side.
|
|
3188
|
-
V.overflows.slice(0, 2).reduce((
|
|
3260
|
+
V.overflows.slice(0, 2).reduce((te, Z) => te + Z, 0)
|
|
3189
3261
|
) : (
|
|
3190
3262
|
// Check only the mainAxis.
|
|
3191
3263
|
V.overflows[0]
|
|
@@ -3198,7 +3270,7 @@ const Zo = function(e) {
|
|
|
3198
3270
|
).every((Q) => Q <= 0))[0]) == null ? void 0 : r[0]) || L[0][0];
|
|
3199
3271
|
return X !== i ? {
|
|
3200
3272
|
data: {
|
|
3201
|
-
index:
|
|
3273
|
+
index: y + 1,
|
|
3202
3274
|
overflows: C
|
|
3203
3275
|
},
|
|
3204
3276
|
reset: {
|
|
@@ -3208,12 +3280,12 @@ const Zo = function(e) {
|
|
|
3208
3280
|
}
|
|
3209
3281
|
};
|
|
3210
3282
|
};
|
|
3211
|
-
async function
|
|
3283
|
+
async function _o(e, t) {
|
|
3212
3284
|
const {
|
|
3213
3285
|
placement: n,
|
|
3214
3286
|
platform: l,
|
|
3215
3287
|
elements: r
|
|
3216
|
-
} = e, a = await (l.isRTL == null ? void 0 : l.isRTL(r.floating)), o = Be(n), i = xe(n), s = lt(n) === "y", u = ["left", "top"].includes(o) ? -1 : 1, c = a && s ? -1 : 1, f =
|
|
3288
|
+
} = e, a = await (l.isRTL == null ? void 0 : l.isRTL(r.floating)), o = Be(n), i = xe(n), s = lt(n) === "y", u = ["left", "top"].includes(o) ? -1 : 1, c = a && s ? -1 : 1, f = ze(t, e);
|
|
3217
3289
|
let {
|
|
3218
3290
|
mainAxis: d,
|
|
3219
3291
|
crossAxis: v,
|
|
@@ -3235,7 +3307,7 @@ async function Go(e, t) {
|
|
|
3235
3307
|
y: v * c
|
|
3236
3308
|
};
|
|
3237
3309
|
}
|
|
3238
|
-
const
|
|
3310
|
+
const ea = function(e) {
|
|
3239
3311
|
return e === void 0 && (e = 0), {
|
|
3240
3312
|
name: "offset",
|
|
3241
3313
|
options: e,
|
|
@@ -3246,7 +3318,7 @@ const Xo = function(e) {
|
|
|
3246
3318
|
y: a,
|
|
3247
3319
|
placement: o,
|
|
3248
3320
|
middlewareData: i
|
|
3249
|
-
} = t, s = await
|
|
3321
|
+
} = t, s = await _o(t, e);
|
|
3250
3322
|
return o === ((n = i.offset) == null ? void 0 : n.placement) && (l = i.arrow) != null && l.alignmentOffset ? {} : {
|
|
3251
3323
|
x: r + s.x,
|
|
3252
3324
|
y: a + s.y,
|
|
@@ -3257,7 +3329,7 @@ const Xo = function(e) {
|
|
|
3257
3329
|
};
|
|
3258
3330
|
}
|
|
3259
3331
|
};
|
|
3260
|
-
},
|
|
3332
|
+
}, ta = function(e) {
|
|
3261
3333
|
return e === void 0 && (e = {}), {
|
|
3262
3334
|
name: "shift",
|
|
3263
3335
|
options: e,
|
|
@@ -3270,30 +3342,30 @@ const Xo = function(e) {
|
|
|
3270
3342
|
mainAxis: a = !0,
|
|
3271
3343
|
crossAxis: o = !1,
|
|
3272
3344
|
limiter: i = {
|
|
3273
|
-
fn: (
|
|
3345
|
+
fn: (h) => {
|
|
3274
3346
|
let {
|
|
3275
|
-
x:
|
|
3276
|
-
y
|
|
3277
|
-
} =
|
|
3347
|
+
x: y,
|
|
3348
|
+
y: b
|
|
3349
|
+
} = h;
|
|
3278
3350
|
return {
|
|
3279
|
-
x:
|
|
3280
|
-
y
|
|
3351
|
+
x: y,
|
|
3352
|
+
y: b
|
|
3281
3353
|
};
|
|
3282
3354
|
}
|
|
3283
3355
|
},
|
|
3284
3356
|
...s
|
|
3285
|
-
} =
|
|
3357
|
+
} = ze(e, t), u = {
|
|
3286
3358
|
x: n,
|
|
3287
3359
|
y: l
|
|
3288
|
-
}, c = await
|
|
3360
|
+
}, c = await Yt(t, s), f = lt(Be(r)), d = il(f);
|
|
3289
3361
|
let v = u[d], p = u[f];
|
|
3290
3362
|
if (a) {
|
|
3291
|
-
const
|
|
3292
|
-
v =
|
|
3363
|
+
const h = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", b = v + c[h], T = v - c[y];
|
|
3364
|
+
v = Mt(b, v, T);
|
|
3293
3365
|
}
|
|
3294
3366
|
if (o) {
|
|
3295
|
-
const
|
|
3296
|
-
p =
|
|
3367
|
+
const h = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", b = p + c[h], T = p - c[y];
|
|
3368
|
+
p = Mt(b, p, T);
|
|
3297
3369
|
}
|
|
3298
3370
|
const m = i.fn({
|
|
3299
3371
|
...t,
|
|
@@ -3313,7 +3385,7 @@ const Xo = function(e) {
|
|
|
3313
3385
|
};
|
|
3314
3386
|
}
|
|
3315
3387
|
};
|
|
3316
|
-
},
|
|
3388
|
+
}, na = function(e) {
|
|
3317
3389
|
return e === void 0 && (e = {}), {
|
|
3318
3390
|
name: "size",
|
|
3319
3391
|
options: e,
|
|
@@ -3328,21 +3400,21 @@ const Xo = function(e) {
|
|
|
3328
3400
|
apply: s = () => {
|
|
3329
3401
|
},
|
|
3330
3402
|
...u
|
|
3331
|
-
} =
|
|
3403
|
+
} = ze(e, t), c = await Yt(t, u), f = Be(r), d = xe(r), v = lt(r) === "y", {
|
|
3332
3404
|
width: p,
|
|
3333
3405
|
height: m
|
|
3334
3406
|
} = a.floating;
|
|
3335
|
-
let
|
|
3336
|
-
f === "top" || f === "bottom" ? (
|
|
3337
|
-
const
|
|
3338
|
-
let L = A,
|
|
3339
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
3340
|
-
const V =
|
|
3341
|
-
v ?
|
|
3407
|
+
let h, y;
|
|
3408
|
+
f === "top" || f === "bottom" ? (h = f, y = d === (await (o.isRTL == null ? void 0 : o.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (y = f, h = d === "end" ? "top" : "bottom");
|
|
3409
|
+
const b = m - c.top - c.bottom, T = p - c.left - c.right, A = Ce(m - c[h], b), C = Ce(p - c[y], T), I = !t.middlewareData.shift;
|
|
3410
|
+
let L = A, j = C;
|
|
3411
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (j = T), (l = t.middlewareData.shift) != null && l.enabled.y && (L = b), I && !d) {
|
|
3412
|
+
const V = oe(c.left, 0), Q = oe(c.right, 0), te = oe(c.top, 0), Z = oe(c.bottom, 0);
|
|
3413
|
+
v ? j = p - 2 * (V !== 0 || Q !== 0 ? V + Q : oe(c.left, c.right)) : L = m - 2 * (te !== 0 || Z !== 0 ? te + Z : oe(c.top, c.bottom));
|
|
3342
3414
|
}
|
|
3343
3415
|
await s({
|
|
3344
3416
|
...t,
|
|
3345
|
-
availableWidth:
|
|
3417
|
+
availableWidth: j,
|
|
3346
3418
|
availableHeight: L
|
|
3347
3419
|
});
|
|
3348
3420
|
const X = await o.getDimensions(i.floating);
|
|
@@ -3354,31 +3426,31 @@ const Xo = function(e) {
|
|
|
3354
3426
|
}
|
|
3355
3427
|
};
|
|
3356
3428
|
};
|
|
3357
|
-
function
|
|
3429
|
+
function wt() {
|
|
3358
3430
|
return typeof window < "u";
|
|
3359
3431
|
}
|
|
3360
3432
|
function Ie(e) {
|
|
3361
|
-
return
|
|
3433
|
+
return Zt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
3362
3434
|
}
|
|
3363
|
-
function
|
|
3435
|
+
function se(e) {
|
|
3364
3436
|
var t;
|
|
3365
3437
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
3366
3438
|
}
|
|
3367
3439
|
function Ee(e) {
|
|
3368
3440
|
var t;
|
|
3369
|
-
return (t = (
|
|
3441
|
+
return (t = (Zt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
3370
3442
|
}
|
|
3371
|
-
function
|
|
3372
|
-
return
|
|
3443
|
+
function Zt(e) {
|
|
3444
|
+
return wt() ? e instanceof Node || e instanceof se(e).Node : !1;
|
|
3373
3445
|
}
|
|
3374
3446
|
function he(e) {
|
|
3375
|
-
return
|
|
3447
|
+
return wt() ? e instanceof Element || e instanceof se(e).Element : !1;
|
|
3376
3448
|
}
|
|
3377
3449
|
function Se(e) {
|
|
3378
|
-
return
|
|
3450
|
+
return wt() ? e instanceof HTMLElement || e instanceof se(e).HTMLElement : !1;
|
|
3379
3451
|
}
|
|
3380
|
-
function
|
|
3381
|
-
return !
|
|
3452
|
+
function bn(e) {
|
|
3453
|
+
return !wt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof se(e).ShadowRoot;
|
|
3382
3454
|
}
|
|
3383
3455
|
function rt(e) {
|
|
3384
3456
|
const {
|
|
@@ -3389,10 +3461,10 @@ function rt(e) {
|
|
|
3389
3461
|
} = ye(e);
|
|
3390
3462
|
return /auto|scroll|overlay|hidden|clip/.test(t + l + n) && !["inline", "contents"].includes(r);
|
|
3391
3463
|
}
|
|
3392
|
-
function
|
|
3464
|
+
function la(e) {
|
|
3393
3465
|
return ["table", "td", "th"].includes(Ie(e));
|
|
3394
3466
|
}
|
|
3395
|
-
function
|
|
3467
|
+
function $t(e) {
|
|
3396
3468
|
return [":popover-open", ":modal"].some((t) => {
|
|
3397
3469
|
try {
|
|
3398
3470
|
return e.matches(t);
|
|
@@ -3401,31 +3473,31 @@ function bt(e) {
|
|
|
3401
3473
|
}
|
|
3402
3474
|
});
|
|
3403
3475
|
}
|
|
3404
|
-
function
|
|
3405
|
-
const t =
|
|
3476
|
+
function Gt(e) {
|
|
3477
|
+
const t = Xt(), n = he(e) ? ye(e) : e;
|
|
3406
3478
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((l) => (n.willChange || "").includes(l)) || ["paint", "layout", "strict", "content"].some((l) => (n.contain || "").includes(l));
|
|
3407
3479
|
}
|
|
3408
|
-
function
|
|
3480
|
+
function ra(e) {
|
|
3409
3481
|
let t = Pe(e);
|
|
3410
|
-
for (; Se(t) && !
|
|
3411
|
-
if (
|
|
3482
|
+
for (; Se(t) && !Ue(t); ) {
|
|
3483
|
+
if (Gt(t))
|
|
3412
3484
|
return t;
|
|
3413
|
-
if (
|
|
3485
|
+
if ($t(t))
|
|
3414
3486
|
return null;
|
|
3415
3487
|
t = Pe(t);
|
|
3416
3488
|
}
|
|
3417
3489
|
return null;
|
|
3418
3490
|
}
|
|
3419
|
-
function
|
|
3491
|
+
function Xt() {
|
|
3420
3492
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
3421
3493
|
}
|
|
3422
|
-
function
|
|
3494
|
+
function Ue(e) {
|
|
3423
3495
|
return ["html", "body", "#document"].includes(Ie(e));
|
|
3424
3496
|
}
|
|
3425
3497
|
function ye(e) {
|
|
3426
|
-
return
|
|
3498
|
+
return se(e).getComputedStyle(e);
|
|
3427
3499
|
}
|
|
3428
|
-
function
|
|
3500
|
+
function xt(e) {
|
|
3429
3501
|
return he(e) ? {
|
|
3430
3502
|
scrollLeft: e.scrollLeft,
|
|
3431
3503
|
scrollTop: e.scrollTop
|
|
@@ -3441,29 +3513,29 @@ function Pe(e) {
|
|
|
3441
3513
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
3442
3514
|
e.assignedSlot || // DOM Element detected.
|
|
3443
3515
|
e.parentNode || // ShadowRoot detected.
|
|
3444
|
-
|
|
3516
|
+
bn(e) && e.host || // Fallback.
|
|
3445
3517
|
Ee(e)
|
|
3446
3518
|
);
|
|
3447
|
-
return
|
|
3519
|
+
return bn(t) ? t.host : t;
|
|
3448
3520
|
}
|
|
3449
|
-
function
|
|
3521
|
+
function ul(e) {
|
|
3450
3522
|
const t = Pe(e);
|
|
3451
|
-
return
|
|
3523
|
+
return Ue(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Se(t) && rt(t) ? t : ul(t);
|
|
3452
3524
|
}
|
|
3453
3525
|
function _e(e, t, n) {
|
|
3454
3526
|
var l;
|
|
3455
3527
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
3456
|
-
const r =
|
|
3528
|
+
const r = ul(e), a = r === ((l = e.ownerDocument) == null ? void 0 : l.body), o = se(r);
|
|
3457
3529
|
if (a) {
|
|
3458
|
-
const i =
|
|
3530
|
+
const i = Bt(o);
|
|
3459
3531
|
return t.concat(o, o.visualViewport || [], rt(r) ? r : [], i && n ? _e(i) : []);
|
|
3460
3532
|
}
|
|
3461
3533
|
return t.concat(r, _e(r, [], n));
|
|
3462
3534
|
}
|
|
3463
|
-
function
|
|
3535
|
+
function Bt(e) {
|
|
3464
3536
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
3465
3537
|
}
|
|
3466
|
-
function
|
|
3538
|
+
function cl(e) {
|
|
3467
3539
|
const t = ye(e);
|
|
3468
3540
|
let n = parseFloat(t.width) || 0, l = parseFloat(t.height) || 0;
|
|
3469
3541
|
const r = Se(e), a = r ? e.offsetWidth : n, o = r ? e.offsetHeight : l, i = dt(n) !== a || dt(l) !== o;
|
|
@@ -3473,48 +3545,48 @@ function ul(e) {
|
|
|
3473
3545
|
$: i
|
|
3474
3546
|
};
|
|
3475
3547
|
}
|
|
3476
|
-
function
|
|
3548
|
+
function Qt(e) {
|
|
3477
3549
|
return he(e) ? e : e.contextElement;
|
|
3478
3550
|
}
|
|
3479
3551
|
function Ve(e) {
|
|
3480
|
-
const t =
|
|
3552
|
+
const t = Qt(e);
|
|
3481
3553
|
if (!Se(t))
|
|
3482
3554
|
return $e(1);
|
|
3483
3555
|
const n = t.getBoundingClientRect(), {
|
|
3484
3556
|
width: l,
|
|
3485
3557
|
height: r,
|
|
3486
3558
|
$: a
|
|
3487
|
-
} =
|
|
3559
|
+
} = cl(t);
|
|
3488
3560
|
let o = (a ? dt(n.width) : n.width) / l, i = (a ? dt(n.height) : n.height) / r;
|
|
3489
3561
|
return (!o || !Number.isFinite(o)) && (o = 1), (!i || !Number.isFinite(i)) && (i = 1), {
|
|
3490
3562
|
x: o,
|
|
3491
3563
|
y: i
|
|
3492
3564
|
};
|
|
3493
3565
|
}
|
|
3494
|
-
const
|
|
3495
|
-
function
|
|
3496
|
-
const t =
|
|
3497
|
-
return !
|
|
3566
|
+
const oa = /* @__PURE__ */ $e(0);
|
|
3567
|
+
function dl(e) {
|
|
3568
|
+
const t = se(e);
|
|
3569
|
+
return !Xt() || !t.visualViewport ? oa : {
|
|
3498
3570
|
x: t.visualViewport.offsetLeft,
|
|
3499
3571
|
y: t.visualViewport.offsetTop
|
|
3500
3572
|
};
|
|
3501
3573
|
}
|
|
3502
|
-
function
|
|
3503
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
3574
|
+
function aa(e, t, n) {
|
|
3575
|
+
return t === void 0 && (t = !1), !n || t && n !== se(e) ? !1 : t;
|
|
3504
3576
|
}
|
|
3505
3577
|
function Me(e, t, n, l) {
|
|
3506
3578
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
3507
|
-
const r = e.getBoundingClientRect(), a =
|
|
3579
|
+
const r = e.getBoundingClientRect(), a = Qt(e);
|
|
3508
3580
|
let o = $e(1);
|
|
3509
3581
|
t && (l ? he(l) && (o = Ve(l)) : o = Ve(e));
|
|
3510
|
-
const i =
|
|
3582
|
+
const i = aa(a, n, l) ? dl(a) : $e(0);
|
|
3511
3583
|
let s = (r.left + i.x) / o.x, u = (r.top + i.y) / o.y, c = r.width / o.x, f = r.height / o.y;
|
|
3512
3584
|
if (a) {
|
|
3513
|
-
const d =
|
|
3514
|
-
let p = d, m =
|
|
3585
|
+
const d = se(a), v = l && he(l) ? se(l) : l;
|
|
3586
|
+
let p = d, m = Bt(p);
|
|
3515
3587
|
for (; m && l && v !== p; ) {
|
|
3516
|
-
const
|
|
3517
|
-
s *=
|
|
3588
|
+
const h = Ve(m), y = m.getBoundingClientRect(), b = ye(m), T = y.left + (m.clientLeft + parseFloat(b.paddingLeft)) * h.x, A = y.top + (m.clientTop + parseFloat(b.paddingTop)) * h.y;
|
|
3589
|
+
s *= h.x, u *= h.y, c *= h.x, f *= h.y, s += T, u += A, p = se(m), m = Bt(p);
|
|
3518
3590
|
}
|
|
3519
3591
|
}
|
|
3520
3592
|
return ft({
|
|
@@ -3524,29 +3596,29 @@ function Me(e, t, n, l) {
|
|
|
3524
3596
|
y: u
|
|
3525
3597
|
});
|
|
3526
3598
|
}
|
|
3527
|
-
function
|
|
3528
|
-
const n =
|
|
3599
|
+
function Jt(e, t) {
|
|
3600
|
+
const n = xt(e).scrollLeft;
|
|
3529
3601
|
return t ? t.left + n : Me(Ee(e)).left + n;
|
|
3530
3602
|
}
|
|
3531
|
-
function
|
|
3603
|
+
function fl(e, t, n) {
|
|
3532
3604
|
n === void 0 && (n = !1);
|
|
3533
3605
|
const l = e.getBoundingClientRect(), r = l.left + t.scrollLeft - (n ? 0 : (
|
|
3534
3606
|
// RTL <body> scrollbar.
|
|
3535
|
-
|
|
3607
|
+
Jt(e, l)
|
|
3536
3608
|
)), a = l.top + t.scrollTop;
|
|
3537
3609
|
return {
|
|
3538
3610
|
x: r,
|
|
3539
3611
|
y: a
|
|
3540
3612
|
};
|
|
3541
3613
|
}
|
|
3542
|
-
function
|
|
3614
|
+
function ia(e) {
|
|
3543
3615
|
let {
|
|
3544
3616
|
elements: t,
|
|
3545
3617
|
rect: n,
|
|
3546
3618
|
offsetParent: l,
|
|
3547
3619
|
strategy: r
|
|
3548
3620
|
} = e;
|
|
3549
|
-
const a = r === "fixed", o = Ee(l), i = t ?
|
|
3621
|
+
const a = r === "fixed", o = Ee(l), i = t ? $t(t.floating) : !1;
|
|
3550
3622
|
if (l === o || i && a)
|
|
3551
3623
|
return n;
|
|
3552
3624
|
let s = {
|
|
@@ -3554,11 +3626,11 @@ function la(e) {
|
|
|
3554
3626
|
scrollTop: 0
|
|
3555
3627
|
}, u = $e(1);
|
|
3556
3628
|
const c = $e(0), f = Se(l);
|
|
3557
|
-
if ((f || !f && !a) && ((Ie(l) !== "body" || rt(o)) && (s =
|
|
3629
|
+
if ((f || !f && !a) && ((Ie(l) !== "body" || rt(o)) && (s = xt(l)), Se(l))) {
|
|
3558
3630
|
const v = Me(l);
|
|
3559
3631
|
u = Ve(l), c.x = v.x + l.clientLeft, c.y = v.y + l.clientTop;
|
|
3560
3632
|
}
|
|
3561
|
-
const d = o && !f && !a ?
|
|
3633
|
+
const d = o && !f && !a ? fl(o, s, !0) : $e(0);
|
|
3562
3634
|
return {
|
|
3563
3635
|
width: n.width * u.x,
|
|
3564
3636
|
height: n.height * u.y,
|
|
@@ -3566,26 +3638,26 @@ function la(e) {
|
|
|
3566
3638
|
y: n.y * u.y - s.scrollTop * u.y + c.y + d.y
|
|
3567
3639
|
};
|
|
3568
3640
|
}
|
|
3569
|
-
function
|
|
3641
|
+
function sa(e) {
|
|
3570
3642
|
return Array.from(e.getClientRects());
|
|
3571
3643
|
}
|
|
3572
|
-
function
|
|
3573
|
-
const t = Ee(e), n =
|
|
3574
|
-
let o = -n.scrollLeft +
|
|
3644
|
+
function ua(e) {
|
|
3645
|
+
const t = Ee(e), n = xt(e), l = e.ownerDocument.body, r = oe(t.scrollWidth, t.clientWidth, l.scrollWidth, l.clientWidth), a = oe(t.scrollHeight, t.clientHeight, l.scrollHeight, l.clientHeight);
|
|
3646
|
+
let o = -n.scrollLeft + Jt(e);
|
|
3575
3647
|
const i = -n.scrollTop;
|
|
3576
|
-
return ye(l).direction === "rtl" && (o +=
|
|
3648
|
+
return ye(l).direction === "rtl" && (o += oe(t.clientWidth, l.clientWidth) - r), {
|
|
3577
3649
|
width: r,
|
|
3578
3650
|
height: a,
|
|
3579
3651
|
x: o,
|
|
3580
3652
|
y: i
|
|
3581
3653
|
};
|
|
3582
3654
|
}
|
|
3583
|
-
function
|
|
3584
|
-
const n =
|
|
3655
|
+
function ca(e, t) {
|
|
3656
|
+
const n = se(e), l = Ee(e), r = n.visualViewport;
|
|
3585
3657
|
let a = l.clientWidth, o = l.clientHeight, i = 0, s = 0;
|
|
3586
3658
|
if (r) {
|
|
3587
3659
|
a = r.width, o = r.height;
|
|
3588
|
-
const u =
|
|
3660
|
+
const u = Xt();
|
|
3589
3661
|
(!u || u && t === "fixed") && (i = r.offsetLeft, s = r.offsetTop);
|
|
3590
3662
|
}
|
|
3591
3663
|
return {
|
|
@@ -3595,7 +3667,7 @@ function aa(e, t) {
|
|
|
3595
3667
|
y: s
|
|
3596
3668
|
};
|
|
3597
3669
|
}
|
|
3598
|
-
function
|
|
3670
|
+
function da(e, t) {
|
|
3599
3671
|
const n = Me(e, !0, t === "fixed"), l = n.top + e.clientTop, r = n.left + e.clientLeft, a = Se(e) ? Ve(e) : $e(1), o = e.clientWidth * a.x, i = e.clientHeight * a.y, s = r * a.x, u = l * a.y;
|
|
3600
3672
|
return {
|
|
3601
3673
|
width: o,
|
|
@@ -3604,16 +3676,16 @@ function ia(e, t) {
|
|
|
3604
3676
|
y: u
|
|
3605
3677
|
};
|
|
3606
3678
|
}
|
|
3607
|
-
function
|
|
3679
|
+
function wn(e, t, n) {
|
|
3608
3680
|
let l;
|
|
3609
3681
|
if (t === "viewport")
|
|
3610
|
-
l =
|
|
3682
|
+
l = ca(e, n);
|
|
3611
3683
|
else if (t === "document")
|
|
3612
|
-
l =
|
|
3684
|
+
l = ua(Ee(e));
|
|
3613
3685
|
else if (he(t))
|
|
3614
|
-
l =
|
|
3686
|
+
l = da(t, n);
|
|
3615
3687
|
else {
|
|
3616
|
-
const r =
|
|
3688
|
+
const r = dl(e);
|
|
3617
3689
|
l = {
|
|
3618
3690
|
x: t.x - r.x,
|
|
3619
3691
|
y: t.y - r.y,
|
|
@@ -3623,34 +3695,34 @@ function bn(e, t, n) {
|
|
|
3623
3695
|
}
|
|
3624
3696
|
return ft(l);
|
|
3625
3697
|
}
|
|
3626
|
-
function
|
|
3698
|
+
function vl(e, t) {
|
|
3627
3699
|
const n = Pe(e);
|
|
3628
|
-
return n === t || !he(n) ||
|
|
3700
|
+
return n === t || !he(n) || Ue(n) ? !1 : ye(n).position === "fixed" || vl(n, t);
|
|
3629
3701
|
}
|
|
3630
|
-
function
|
|
3702
|
+
function fa(e, t) {
|
|
3631
3703
|
const n = t.get(e);
|
|
3632
3704
|
if (n)
|
|
3633
3705
|
return n;
|
|
3634
3706
|
let l = _e(e, [], !1).filter((i) => he(i) && Ie(i) !== "body"), r = null;
|
|
3635
3707
|
const a = ye(e).position === "fixed";
|
|
3636
3708
|
let o = a ? Pe(e) : e;
|
|
3637
|
-
for (; he(o) && !
|
|
3638
|
-
const i = ye(o), s =
|
|
3639
|
-
!s && i.position === "fixed" && (r = null), (a ? !s && !r : !s && i.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || rt(o) && !s &&
|
|
3709
|
+
for (; he(o) && !Ue(o); ) {
|
|
3710
|
+
const i = ye(o), s = Gt(o);
|
|
3711
|
+
!s && i.position === "fixed" && (r = null), (a ? !s && !r : !s && i.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || rt(o) && !s && vl(e, o)) ? l = l.filter((c) => c !== o) : r = i, o = Pe(o);
|
|
3640
3712
|
}
|
|
3641
3713
|
return t.set(e, l), l;
|
|
3642
3714
|
}
|
|
3643
|
-
function
|
|
3715
|
+
function va(e) {
|
|
3644
3716
|
let {
|
|
3645
3717
|
element: t,
|
|
3646
3718
|
boundary: n,
|
|
3647
3719
|
rootBoundary: l,
|
|
3648
3720
|
strategy: r
|
|
3649
3721
|
} = e;
|
|
3650
|
-
const o = [...n === "clippingAncestors" ?
|
|
3651
|
-
const f =
|
|
3652
|
-
return u.top =
|
|
3653
|
-
},
|
|
3722
|
+
const o = [...n === "clippingAncestors" ? $t(t) ? [] : fa(t, this._c) : [].concat(n), l], i = o[0], s = o.reduce((u, c) => {
|
|
3723
|
+
const f = wn(t, c, r);
|
|
3724
|
+
return u.top = oe(f.top, u.top), u.right = Ce(f.right, u.right), u.bottom = Ce(f.bottom, u.bottom), u.left = oe(f.left, u.left), u;
|
|
3725
|
+
}, wn(t, i, r));
|
|
3654
3726
|
return {
|
|
3655
3727
|
width: s.right - s.left,
|
|
3656
3728
|
height: s.bottom - s.top,
|
|
@@ -3658,17 +3730,17 @@ function ua(e) {
|
|
|
3658
3730
|
y: s.top
|
|
3659
3731
|
};
|
|
3660
3732
|
}
|
|
3661
|
-
function
|
|
3733
|
+
function pa(e) {
|
|
3662
3734
|
const {
|
|
3663
3735
|
width: t,
|
|
3664
3736
|
height: n
|
|
3665
|
-
} =
|
|
3737
|
+
} = cl(e);
|
|
3666
3738
|
return {
|
|
3667
3739
|
width: t,
|
|
3668
3740
|
height: n
|
|
3669
3741
|
};
|
|
3670
3742
|
}
|
|
3671
|
-
function
|
|
3743
|
+
function ma(e, t, n) {
|
|
3672
3744
|
const l = Se(t), r = Ee(t), a = n === "fixed", o = Me(e, !0, a, t);
|
|
3673
3745
|
let i = {
|
|
3674
3746
|
scrollLeft: 0,
|
|
@@ -3676,11 +3748,11 @@ function da(e, t, n) {
|
|
|
3676
3748
|
};
|
|
3677
3749
|
const s = $e(0);
|
|
3678
3750
|
if (l || !l && !a)
|
|
3679
|
-
if ((Ie(t) !== "body" || rt(r)) && (i =
|
|
3751
|
+
if ((Ie(t) !== "body" || rt(r)) && (i = xt(t)), l) {
|
|
3680
3752
|
const d = Me(t, !0, a, t);
|
|
3681
3753
|
s.x = d.x + t.clientLeft, s.y = d.y + t.clientTop;
|
|
3682
|
-
} else r && (s.x =
|
|
3683
|
-
const u = r && !l && !a ?
|
|
3754
|
+
} else r && (s.x = Jt(r));
|
|
3755
|
+
const u = r && !l && !a ? fl(r, i) : $e(0), c = o.left + i.scrollLeft - s.x - u.x, f = o.top + i.scrollTop - s.y - u.y;
|
|
3684
3756
|
return {
|
|
3685
3757
|
x: c,
|
|
3686
3758
|
y: f,
|
|
@@ -3688,10 +3760,10 @@ function da(e, t, n) {
|
|
|
3688
3760
|
height: o.height
|
|
3689
3761
|
};
|
|
3690
3762
|
}
|
|
3691
|
-
function
|
|
3763
|
+
function Ot(e) {
|
|
3692
3764
|
return ye(e).position === "static";
|
|
3693
3765
|
}
|
|
3694
|
-
function
|
|
3766
|
+
function $n(e, t) {
|
|
3695
3767
|
if (!Se(e) || ye(e).position === "fixed")
|
|
3696
3768
|
return null;
|
|
3697
3769
|
if (t)
|
|
@@ -3699,28 +3771,28 @@ function wn(e, t) {
|
|
|
3699
3771
|
let n = e.offsetParent;
|
|
3700
3772
|
return Ee(e) === n && (n = n.ownerDocument.body), n;
|
|
3701
3773
|
}
|
|
3702
|
-
function
|
|
3703
|
-
const n =
|
|
3704
|
-
if (
|
|
3774
|
+
function pl(e, t) {
|
|
3775
|
+
const n = se(e);
|
|
3776
|
+
if ($t(e))
|
|
3705
3777
|
return n;
|
|
3706
3778
|
if (!Se(e)) {
|
|
3707
3779
|
let r = Pe(e);
|
|
3708
|
-
for (; r && !
|
|
3709
|
-
if (he(r) && !
|
|
3780
|
+
for (; r && !Ue(r); ) {
|
|
3781
|
+
if (he(r) && !Ot(r))
|
|
3710
3782
|
return r;
|
|
3711
3783
|
r = Pe(r);
|
|
3712
3784
|
}
|
|
3713
3785
|
return n;
|
|
3714
3786
|
}
|
|
3715
|
-
let l =
|
|
3716
|
-
for (; l &&
|
|
3717
|
-
l =
|
|
3718
|
-
return l &&
|
|
3787
|
+
let l = $n(e, t);
|
|
3788
|
+
for (; l && la(l) && Ot(l); )
|
|
3789
|
+
l = $n(l, t);
|
|
3790
|
+
return l && Ue(l) && Ot(l) && !Gt(l) ? n : l || ra(e) || n;
|
|
3719
3791
|
}
|
|
3720
|
-
const
|
|
3721
|
-
const t = this.getOffsetParent ||
|
|
3792
|
+
const ga = async function(e) {
|
|
3793
|
+
const t = this.getOffsetParent || pl, n = this.getDimensions, l = await n(e.floating);
|
|
3722
3794
|
return {
|
|
3723
|
-
reference:
|
|
3795
|
+
reference: ma(e.reference, await t(e.floating), e.strategy),
|
|
3724
3796
|
floating: {
|
|
3725
3797
|
x: 0,
|
|
3726
3798
|
y: 0,
|
|
@@ -3729,22 +3801,22 @@ const fa = async function(e) {
|
|
|
3729
3801
|
}
|
|
3730
3802
|
};
|
|
3731
3803
|
};
|
|
3732
|
-
function
|
|
3804
|
+
function ha(e) {
|
|
3733
3805
|
return ye(e).direction === "rtl";
|
|
3734
3806
|
}
|
|
3735
|
-
const
|
|
3736
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
3807
|
+
const ya = {
|
|
3808
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ia,
|
|
3737
3809
|
getDocumentElement: Ee,
|
|
3738
|
-
getClippingRect:
|
|
3739
|
-
getOffsetParent:
|
|
3740
|
-
getElementRects:
|
|
3741
|
-
getClientRects:
|
|
3742
|
-
getDimensions:
|
|
3810
|
+
getClippingRect: va,
|
|
3811
|
+
getOffsetParent: pl,
|
|
3812
|
+
getElementRects: ga,
|
|
3813
|
+
getClientRects: sa,
|
|
3814
|
+
getDimensions: pa,
|
|
3743
3815
|
getScale: Ve,
|
|
3744
3816
|
isElement: he,
|
|
3745
|
-
isRTL:
|
|
3817
|
+
isRTL: ha
|
|
3746
3818
|
};
|
|
3747
|
-
function
|
|
3819
|
+
function ba(e, t) {
|
|
3748
3820
|
let n = null, l;
|
|
3749
3821
|
const r = Ee(e);
|
|
3750
3822
|
function a() {
|
|
@@ -3761,17 +3833,17 @@ function ma(e, t) {
|
|
|
3761
3833
|
} = e.getBoundingClientRect();
|
|
3762
3834
|
if (i || t(), !f || !d)
|
|
3763
3835
|
return;
|
|
3764
|
-
const v = ut(c), p = ut(r.clientWidth - (u + f)), m = ut(r.clientHeight - (c + d)),
|
|
3765
|
-
rootMargin: -v + "px " + -p + "px " + -m + "px " + -
|
|
3766
|
-
threshold:
|
|
3836
|
+
const v = ut(c), p = ut(r.clientWidth - (u + f)), m = ut(r.clientHeight - (c + d)), h = ut(u), b = {
|
|
3837
|
+
rootMargin: -v + "px " + -p + "px " + -m + "px " + -h + "px",
|
|
3838
|
+
threshold: oe(0, Ce(1, s)) || 1
|
|
3767
3839
|
};
|
|
3768
3840
|
let T = !0;
|
|
3769
3841
|
function A(C) {
|
|
3770
|
-
const
|
|
3771
|
-
if (
|
|
3842
|
+
const I = C[0].intersectionRatio;
|
|
3843
|
+
if (I !== s) {
|
|
3772
3844
|
if (!T)
|
|
3773
3845
|
return o();
|
|
3774
|
-
|
|
3846
|
+
I ? o(!1, I) : l = setTimeout(() => {
|
|
3775
3847
|
o(!1, 1e-7);
|
|
3776
3848
|
}, 1e3);
|
|
3777
3849
|
}
|
|
@@ -3779,18 +3851,18 @@ function ma(e, t) {
|
|
|
3779
3851
|
}
|
|
3780
3852
|
try {
|
|
3781
3853
|
n = new IntersectionObserver(A, {
|
|
3782
|
-
...
|
|
3854
|
+
...b,
|
|
3783
3855
|
// Handle <iframe>s
|
|
3784
3856
|
root: r.ownerDocument
|
|
3785
3857
|
});
|
|
3786
3858
|
} catch {
|
|
3787
|
-
n = new IntersectionObserver(A,
|
|
3859
|
+
n = new IntersectionObserver(A, b);
|
|
3788
3860
|
}
|
|
3789
3861
|
n.observe(e);
|
|
3790
3862
|
}
|
|
3791
3863
|
return o(!0), a;
|
|
3792
3864
|
}
|
|
3793
|
-
function
|
|
3865
|
+
function wa(e, t, n, l) {
|
|
3794
3866
|
l === void 0 && (l = {});
|
|
3795
3867
|
const {
|
|
3796
3868
|
ancestorScroll: r = !0,
|
|
@@ -3798,81 +3870,81 @@ function ga(e, t, n, l) {
|
|
|
3798
3870
|
elementResize: o = typeof ResizeObserver == "function",
|
|
3799
3871
|
layoutShift: i = typeof IntersectionObserver == "function",
|
|
3800
3872
|
animationFrame: s = !1
|
|
3801
|
-
} = l, u =
|
|
3802
|
-
c.forEach((
|
|
3803
|
-
r &&
|
|
3873
|
+
} = l, u = Qt(e), c = r || a ? [...u ? _e(u) : [], ..._e(t)] : [];
|
|
3874
|
+
c.forEach((y) => {
|
|
3875
|
+
r && y.addEventListener("scroll", n, {
|
|
3804
3876
|
passive: !0
|
|
3805
|
-
}), a &&
|
|
3877
|
+
}), a && y.addEventListener("resize", n);
|
|
3806
3878
|
});
|
|
3807
|
-
const f = u && i ?
|
|
3879
|
+
const f = u && i ? ba(u, n) : null;
|
|
3808
3880
|
let d = -1, v = null;
|
|
3809
|
-
o && (v = new ResizeObserver((
|
|
3810
|
-
let [
|
|
3811
|
-
|
|
3881
|
+
o && (v = new ResizeObserver((y) => {
|
|
3882
|
+
let [b] = y;
|
|
3883
|
+
b && b.target === u && v && (v.unobserve(t), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
3812
3884
|
var T;
|
|
3813
3885
|
(T = v) == null || T.observe(t);
|
|
3814
3886
|
})), n();
|
|
3815
3887
|
}), u && !s && v.observe(u), v.observe(t));
|
|
3816
3888
|
let p, m = s ? Me(e) : null;
|
|
3817
|
-
s &&
|
|
3818
|
-
function
|
|
3819
|
-
const
|
|
3820
|
-
m && (
|
|
3889
|
+
s && h();
|
|
3890
|
+
function h() {
|
|
3891
|
+
const y = Me(e);
|
|
3892
|
+
m && (y.x !== m.x || y.y !== m.y || y.width !== m.width || y.height !== m.height) && n(), m = y, p = requestAnimationFrame(h);
|
|
3821
3893
|
}
|
|
3822
3894
|
return n(), () => {
|
|
3823
|
-
var
|
|
3824
|
-
c.forEach((
|
|
3825
|
-
r &&
|
|
3826
|
-
}), f == null || f(), (
|
|
3895
|
+
var y;
|
|
3896
|
+
c.forEach((b) => {
|
|
3897
|
+
r && b.removeEventListener("scroll", n), a && b.removeEventListener("resize", n);
|
|
3898
|
+
}), f == null || f(), (y = v) == null || y.disconnect(), v = null, s && cancelAnimationFrame(p);
|
|
3827
3899
|
};
|
|
3828
3900
|
}
|
|
3829
|
-
const
|
|
3901
|
+
const $a = ea, xa = Jo, Sa = ta, Ea = na, Ta = Xo, ka = (e, t, n) => {
|
|
3830
3902
|
const l = /* @__PURE__ */ new Map(), r = {
|
|
3831
|
-
platform:
|
|
3903
|
+
platform: ya,
|
|
3832
3904
|
...n
|
|
3833
3905
|
}, a = {
|
|
3834
3906
|
...r.platform,
|
|
3835
3907
|
_c: l
|
|
3836
3908
|
};
|
|
3837
|
-
return
|
|
3909
|
+
return Go(e, t, {
|
|
3838
3910
|
...r,
|
|
3839
3911
|
platform: a
|
|
3840
3912
|
});
|
|
3841
3913
|
};
|
|
3842
|
-
function
|
|
3914
|
+
function Oa(e) {
|
|
3843
3915
|
return e != null && typeof e == "object" && "$el" in e;
|
|
3844
3916
|
}
|
|
3845
|
-
function
|
|
3846
|
-
if (
|
|
3917
|
+
function It(e) {
|
|
3918
|
+
if (Oa(e)) {
|
|
3847
3919
|
const t = e.$el;
|
|
3848
|
-
return
|
|
3920
|
+
return Zt(t) && Ie(t) === "#comment" ? null : t;
|
|
3849
3921
|
}
|
|
3850
3922
|
return e;
|
|
3851
3923
|
}
|
|
3852
3924
|
function je(e) {
|
|
3853
|
-
return typeof e == "function" ? e() :
|
|
3925
|
+
return typeof e == "function" ? e() : $(e);
|
|
3854
3926
|
}
|
|
3855
|
-
function
|
|
3927
|
+
function La(e) {
|
|
3856
3928
|
return {
|
|
3857
3929
|
name: "arrow",
|
|
3858
3930
|
options: e,
|
|
3859
3931
|
fn(t) {
|
|
3860
|
-
const n =
|
|
3861
|
-
return n == null ? {} :
|
|
3932
|
+
const n = It(je(e.element));
|
|
3933
|
+
return n == null ? {} : Ta({
|
|
3862
3934
|
element: n,
|
|
3863
3935
|
padding: e.padding
|
|
3864
3936
|
}).fn(t);
|
|
3865
3937
|
}
|
|
3866
3938
|
};
|
|
3867
3939
|
}
|
|
3868
|
-
function
|
|
3940
|
+
function ml(e) {
|
|
3869
3941
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
3870
3942
|
}
|
|
3871
|
-
function
|
|
3872
|
-
const n =
|
|
3943
|
+
function xn(e, t) {
|
|
3944
|
+
const n = ml(e);
|
|
3873
3945
|
return Math.round(t * n) / n;
|
|
3874
3946
|
}
|
|
3875
|
-
function
|
|
3947
|
+
function Ca(e, t, n) {
|
|
3876
3948
|
n === void 0 && (n = {});
|
|
3877
3949
|
const l = n.whileElementsMounted, r = w(() => {
|
|
3878
3950
|
var L;
|
|
@@ -3886,7 +3958,7 @@ function Ta(e, t, n) {
|
|
|
3886
3958
|
}), s = w(() => {
|
|
3887
3959
|
var L;
|
|
3888
3960
|
return (L = je(n.transform)) != null ? L : !0;
|
|
3889
|
-
}), u = w(() =>
|
|
3961
|
+
}), u = w(() => It(e.value)), c = w(() => It(t.value)), f = E(0), d = E(0), v = E(i.value), p = E(o.value), m = Ze({}), h = E(!1), y = w(() => {
|
|
3890
3962
|
const L = {
|
|
3891
3963
|
position: v.value,
|
|
3892
3964
|
left: "0",
|
|
@@ -3894,34 +3966,34 @@ function Ta(e, t, n) {
|
|
|
3894
3966
|
};
|
|
3895
3967
|
if (!c.value)
|
|
3896
3968
|
return L;
|
|
3897
|
-
const
|
|
3969
|
+
const j = xn(c.value, f.value), X = xn(c.value, d.value);
|
|
3898
3970
|
return s.value ? {
|
|
3899
3971
|
...L,
|
|
3900
|
-
transform: "translate(" +
|
|
3901
|
-
...
|
|
3972
|
+
transform: "translate(" + j + "px, " + X + "px)",
|
|
3973
|
+
...ml(c.value) >= 1.5 && {
|
|
3902
3974
|
willChange: "transform"
|
|
3903
3975
|
}
|
|
3904
3976
|
} : {
|
|
3905
3977
|
position: v.value,
|
|
3906
|
-
left:
|
|
3978
|
+
left: j + "px",
|
|
3907
3979
|
top: X + "px"
|
|
3908
3980
|
};
|
|
3909
3981
|
});
|
|
3910
|
-
let
|
|
3982
|
+
let b;
|
|
3911
3983
|
function T() {
|
|
3912
3984
|
if (u.value == null || c.value == null)
|
|
3913
3985
|
return;
|
|
3914
3986
|
const L = r.value;
|
|
3915
|
-
|
|
3987
|
+
ka(u.value, c.value, {
|
|
3916
3988
|
middleware: a.value,
|
|
3917
3989
|
placement: o.value,
|
|
3918
3990
|
strategy: i.value
|
|
3919
|
-
}).then((
|
|
3920
|
-
f.value =
|
|
3991
|
+
}).then((j) => {
|
|
3992
|
+
f.value = j.x, d.value = j.y, v.value = j.strategy, p.value = j.placement, m.value = j.middlewareData, h.value = L !== !1;
|
|
3921
3993
|
});
|
|
3922
3994
|
}
|
|
3923
3995
|
function A() {
|
|
3924
|
-
typeof
|
|
3996
|
+
typeof b == "function" && (b(), b = void 0);
|
|
3925
3997
|
}
|
|
3926
3998
|
function C() {
|
|
3927
3999
|
if (A(), l === void 0) {
|
|
@@ -3929,31 +4001,31 @@ function Ta(e, t, n) {
|
|
|
3929
4001
|
return;
|
|
3930
4002
|
}
|
|
3931
4003
|
if (u.value != null && c.value != null) {
|
|
3932
|
-
|
|
4004
|
+
b = l(u.value, c.value, T);
|
|
3933
4005
|
return;
|
|
3934
4006
|
}
|
|
3935
4007
|
}
|
|
3936
|
-
function
|
|
3937
|
-
r.value || (
|
|
4008
|
+
function I() {
|
|
4009
|
+
r.value || (h.value = !1);
|
|
3938
4010
|
}
|
|
3939
4011
|
return me([a, o, i, r], T, {
|
|
3940
4012
|
flush: "sync"
|
|
3941
4013
|
}), me([u, c], C, {
|
|
3942
4014
|
flush: "sync"
|
|
3943
|
-
}), me(r,
|
|
4015
|
+
}), me(r, I, {
|
|
3944
4016
|
flush: "sync"
|
|
3945
|
-
}),
|
|
4017
|
+
}), xl() && Sl(A), {
|
|
3946
4018
|
x: Ne(f),
|
|
3947
4019
|
y: Ne(d),
|
|
3948
4020
|
strategy: Ne(v),
|
|
3949
4021
|
placement: Ne(p),
|
|
3950
4022
|
middlewareData: Ne(m),
|
|
3951
|
-
isPositioned: Ne(
|
|
3952
|
-
floatingStyles:
|
|
4023
|
+
isPositioned: Ne(h),
|
|
4024
|
+
floatingStyles: y,
|
|
3953
4025
|
update: T
|
|
3954
4026
|
};
|
|
3955
4027
|
}
|
|
3956
|
-
const
|
|
4028
|
+
const Pa = ["innerHTML"], Ya = {
|
|
3957
4029
|
__name: "Tooltip",
|
|
3958
4030
|
props: {
|
|
3959
4031
|
content: {
|
|
@@ -3992,17 +4064,17 @@ const Oa = ["innerHTML"], Wa = {
|
|
|
3992
4064
|
}
|
|
3993
4065
|
},
|
|
3994
4066
|
setup(e) {
|
|
3995
|
-
const t = e, n =
|
|
4067
|
+
const t = e, n = Ze(), l = Ze(), r = Ze(), {
|
|
3996
4068
|
floatingStyles: a,
|
|
3997
4069
|
middlewareData: o,
|
|
3998
4070
|
placement: i
|
|
3999
|
-
} =
|
|
4071
|
+
} = Ca(n, l, {
|
|
4000
4072
|
middleware: [
|
|
4001
|
-
t.placement ? null :
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4073
|
+
t.placement ? null : xa(),
|
|
4074
|
+
$a(10),
|
|
4075
|
+
Sa({ crossAxis: !0, padding: 5 }),
|
|
4076
|
+
La({ element: r }),
|
|
4077
|
+
Ea({
|
|
4006
4078
|
apply({ availableWidth: c, availableHeight: f, elements: d }) {
|
|
4007
4079
|
Object.assign(d.floating.style, {
|
|
4008
4080
|
maxWidth: t.maxWidth ? `${Math.min(c, t.maxWidth) / 16}rem` : "",
|
|
@@ -4011,7 +4083,7 @@ const Oa = ["innerHTML"], Wa = {
|
|
|
4011
4083
|
}
|
|
4012
4084
|
})
|
|
4013
4085
|
],
|
|
4014
|
-
whileElementsMounted:
|
|
4086
|
+
whileElementsMounted: wa,
|
|
4015
4087
|
placement: t.placement
|
|
4016
4088
|
}), s = (c) => ({
|
|
4017
4089
|
top: 0,
|
|
@@ -4037,49 +4109,50 @@ const Oa = ["innerHTML"], Wa = {
|
|
|
4037
4109
|
}
|
|
4038
4110
|
};
|
|
4039
4111
|
};
|
|
4040
|
-
return (c, f) => (
|
|
4112
|
+
return (c, f) => (g(), S("div", {
|
|
4041
4113
|
ref_key: "wrapperRef",
|
|
4042
4114
|
ref: n,
|
|
4043
4115
|
class: "rvc-group/tooltip"
|
|
4044
4116
|
}, [
|
|
4045
|
-
|
|
4046
|
-
|
|
4117
|
+
k(c.$slots, "default"),
|
|
4118
|
+
x("div", {
|
|
4047
4119
|
ref_key: "tooltipRef",
|
|
4048
4120
|
ref: l,
|
|
4049
|
-
class:
|
|
4050
|
-
style:
|
|
4121
|
+
class: N(["group-hover/tooltip:rvc-opacity-100 group-hover/tooltip:rvc-visible rvc-invisible rvc-opacity-0 rvc-tooltip", e.tooltipClass, { "rvc-tooltip-blur": e.blur }]),
|
|
4122
|
+
style: El($(a))
|
|
4051
4123
|
}, [
|
|
4052
|
-
|
|
4053
|
-
e.content ? (
|
|
4124
|
+
k(c.$slots, "content", { content: e.content }, () => [
|
|
4125
|
+
e.content ? (g(), S("div", {
|
|
4054
4126
|
key: 0,
|
|
4055
4127
|
innerHTML: e.content
|
|
4056
|
-
}, null, 8,
|
|
4128
|
+
}, null, 8, Pa)) : B("", !0)
|
|
4057
4129
|
]),
|
|
4058
|
-
|
|
4130
|
+
x("div", Y({
|
|
4059
4131
|
ref_key: "arrowRef",
|
|
4060
4132
|
ref: r,
|
|
4061
4133
|
class: "rvc-absolute rvc-tooltip-arrow"
|
|
4062
|
-
}, u(
|
|
4134
|
+
}, u($(o))), null, 16)
|
|
4063
4135
|
], 6)
|
|
4064
4136
|
], 512));
|
|
4065
4137
|
}
|
|
4066
4138
|
};
|
|
4067
4139
|
export {
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4140
|
+
Da as Accordion,
|
|
4141
|
+
Ra as Alert,
|
|
4142
|
+
Fa as Badge,
|
|
4071
4143
|
Xe as ButtonBase,
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4144
|
+
Ma as Checkbox,
|
|
4145
|
+
Ba as DataTable,
|
|
4146
|
+
Na as Drawer,
|
|
4147
|
+
ja as Dropdown,
|
|
4148
|
+
Va as EmptyState,
|
|
4149
|
+
Ha as FormInput,
|
|
4150
|
+
Ln as FormSelect,
|
|
4151
|
+
Wa as Lightswitch,
|
|
4152
|
+
Ua as Modal,
|
|
4153
|
+
Xl as Pagination,
|
|
4154
|
+
za as Radio,
|
|
4155
|
+
qa as Tabs,
|
|
4156
|
+
Ka as Toast,
|
|
4157
|
+
Ya as Tooltip
|
|
4085
4158
|
};
|