@robuust-digital/vue-components 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/tailwind/base/index.js +22 -0
- package/dist/tailwind/components/accordion.js +54 -0
- package/dist/tailwind/components/alert.js +102 -134
- package/dist/tailwind/components/badge.js +69 -174
- package/dist/tailwind/components/button.js +196 -314
- package/dist/tailwind/components/checkbox.js +65 -0
- package/dist/tailwind/components/drawer.js +83 -79
- package/dist/tailwind/components/lightswitch.js +73 -0
- package/dist/tailwind/components/modal.js +127 -0
- package/dist/tailwind/components/table.js +109 -0
- package/dist/tailwind/components/tooltip.js +66 -0
- package/dist/tailwind/index.js +17 -1
- package/dist/vue-components.es.js +2502 -667
- package/dist/vue-components.umd.js +2 -2
- package/package.json +5 -3
|
@@ -1,21 +1,103 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { openBlock as
|
|
3
|
-
function
|
|
4
|
-
return
|
|
1
|
+
import * as Kt from "vue";
|
|
2
|
+
import { openBlock as E, createElementBlock as k, createElementVNode as x, Fragment as Le, renderList as nt, renderSlot as C, createTextVNode as he, toDisplayString as re, createVNode as M, unref as S, normalizeClass as q, createBlock as oe, resolveDynamicComponent as Ie, withCtx as H, createCommentVNode as _, watchEffect as te, mergeProps as qe, computed as b, withDirectives as Yn, vModelCheckbox as Kn, ref as $, onMounted as V, cloneVNode as Gn, h as N, defineComponent as I, inject as Y, provide as ie, onUnmounted as ae, watch as de, shallowRef as Ve, getCurrentInstance as Xn, Teleport as Zn, reactive as Qn, nextTick as Jn, withModifiers as un, getCurrentScope as _n, onScopeDispose as el, shallowReadonly as Pe, normalizeStyle as tl } from "vue";
|
|
3
|
+
function nl(e, t) {
|
|
4
|
+
return E(), k("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
|
+
"fill-rule": "evenodd",
|
|
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
|
+
"clip-rule": "evenodd"
|
|
15
|
+
})
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
function ll(e, t) {
|
|
19
|
+
return E(), k("svg", {
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
+
viewBox: "0 0 24 24",
|
|
22
|
+
fill: "currentColor",
|
|
23
|
+
"aria-hidden": "true",
|
|
24
|
+
"data-slot": "icon"
|
|
25
|
+
}, [
|
|
26
|
+
x("path", {
|
|
27
|
+
"fill-rule": "evenodd",
|
|
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
|
+
"clip-rule": "evenodd"
|
|
30
|
+
})
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
function At(e, t) {
|
|
34
|
+
return E(), k("svg", {
|
|
35
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
36
|
+
viewBox: "0 0 24 24",
|
|
37
|
+
fill: "currentColor",
|
|
38
|
+
"aria-hidden": "true",
|
|
39
|
+
"data-slot": "icon"
|
|
40
|
+
}, [
|
|
41
|
+
x("path", {
|
|
12
42
|
"fill-rule": "evenodd",
|
|
13
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",
|
|
14
44
|
"clip-rule": "evenodd"
|
|
15
45
|
})
|
|
16
46
|
]);
|
|
17
47
|
}
|
|
18
|
-
const
|
|
48
|
+
const rl = { class: "rvc-accordion" }, ol = ["open", "name"], il = ["innerHTML"], Ro = {
|
|
49
|
+
__name: "Accordion",
|
|
50
|
+
props: {
|
|
51
|
+
items: {
|
|
52
|
+
type: Array,
|
|
53
|
+
required: !0,
|
|
54
|
+
default: () => []
|
|
55
|
+
},
|
|
56
|
+
name: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: void 0
|
|
59
|
+
},
|
|
60
|
+
defaultOpenIndex: {
|
|
61
|
+
type: Number,
|
|
62
|
+
default: 0
|
|
63
|
+
},
|
|
64
|
+
contentClass: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: ""
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
setup(e) {
|
|
70
|
+
return (t, n) => (E(), k("div", rl, [
|
|
71
|
+
(E(!0), k(Le, null, nt(e.items, (l, r) => (E(), k("details", {
|
|
72
|
+
key: r,
|
|
73
|
+
open: e.defaultOpenIndex === r,
|
|
74
|
+
name: e.name,
|
|
75
|
+
class: "rvc-group/accordion group/accordion"
|
|
76
|
+
}, [
|
|
77
|
+
x("summary", null, [
|
|
78
|
+
C(t.$slots, "summary", {
|
|
79
|
+
item: l,
|
|
80
|
+
active: e.defaultOpenIndex === r
|
|
81
|
+
}, () => [
|
|
82
|
+
he(re(l.title) + " ", 1),
|
|
83
|
+
C(t.$slots, "icon", { classList: "size-5 group-open/accordion:rotate-45 transition-transform" }, () => [
|
|
84
|
+
M(S(ll), { class: "rvc-size-5 group-open/accordion:rvc-rotate-45 rvc-transition-transform" })
|
|
85
|
+
])
|
|
86
|
+
])
|
|
87
|
+
]),
|
|
88
|
+
x("div", {
|
|
89
|
+
class: q(["rvc-accordion-content", e.contentClass])
|
|
90
|
+
}, [
|
|
91
|
+
C(t.$slots, "content", { item: l }, () => [
|
|
92
|
+
x("div", {
|
|
93
|
+
innerHTML: l.content
|
|
94
|
+
}, null, 8, il)
|
|
95
|
+
])
|
|
96
|
+
], 2)
|
|
97
|
+
], 8, ol))), 128))
|
|
98
|
+
]));
|
|
99
|
+
}
|
|
100
|
+
}, al = { class: "rvc-alert-title" }, Fo = {
|
|
19
101
|
__name: "Alert",
|
|
20
102
|
props: {
|
|
21
103
|
as: {
|
|
@@ -32,8 +114,8 @@ const Rt = { class: "alert-title" }, Zn = {
|
|
|
32
114
|
},
|
|
33
115
|
type: {
|
|
34
116
|
type: String,
|
|
35
|
-
default: "
|
|
36
|
-
validator: (e) => ["success", "warning", "danger", "
|
|
117
|
+
default: "info",
|
|
118
|
+
validator: (e) => ["success", "warning", "danger", "info"].includes(e)
|
|
37
119
|
},
|
|
38
120
|
close: {
|
|
39
121
|
type: Boolean,
|
|
@@ -42,37 +124,37 @@ const Rt = { class: "alert-title" }, Zn = {
|
|
|
42
124
|
},
|
|
43
125
|
emits: ["alert:close"],
|
|
44
126
|
setup(e) {
|
|
45
|
-
return (t, n) => (
|
|
46
|
-
class:
|
|
127
|
+
return (t, n) => (E(), oe(Ie(e.as), {
|
|
128
|
+
class: q(["rvc-alert", `rvc-alert-${e.type}`])
|
|
47
129
|
}, {
|
|
48
|
-
default:
|
|
49
|
-
|
|
50
|
-
e.icon ? (
|
|
130
|
+
default: H(() => [
|
|
131
|
+
C(t.$slots, "icon", {}, () => [
|
|
132
|
+
e.icon ? (E(), oe(Ie(e.icon), {
|
|
51
133
|
key: 0,
|
|
52
|
-
class: "alert-icon"
|
|
53
|
-
})) :
|
|
134
|
+
class: "rvc-alert-icon"
|
|
135
|
+
})) : _("", !0)
|
|
54
136
|
]),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
137
|
+
x("div", null, [
|
|
138
|
+
C(t.$slots, "title", {}, () => [
|
|
139
|
+
x("span", al, re(e.title), 1)
|
|
58
140
|
]),
|
|
59
|
-
|
|
141
|
+
C(t.$slots, "default")
|
|
60
142
|
]),
|
|
61
|
-
|
|
62
|
-
e.close ? (
|
|
143
|
+
C(t.$slots, "close", {}, () => [
|
|
144
|
+
e.close ? (E(), k("button", {
|
|
63
145
|
key: 0,
|
|
64
146
|
type: "button",
|
|
65
|
-
class: "alert-close rvc-transition-colors",
|
|
147
|
+
class: "rvc-alert-close rvc-transition-colors",
|
|
66
148
|
onClick: n[0] || (n[0] = (l) => t.$emit("alert:close"))
|
|
67
149
|
}, [
|
|
68
|
-
|
|
69
|
-
])) :
|
|
150
|
+
M(S(At), { class: "rvc-size-5" })
|
|
151
|
+
])) : _("", !0)
|
|
70
152
|
])
|
|
71
153
|
]),
|
|
72
154
|
_: 3
|
|
73
155
|
}, 8, ["class"]));
|
|
74
156
|
}
|
|
75
|
-
},
|
|
157
|
+
}, Bo = {
|
|
76
158
|
__name: "Badge",
|
|
77
159
|
props: {
|
|
78
160
|
as: {
|
|
@@ -86,34 +168,34 @@ const Rt = { class: "alert-title" }, Zn = {
|
|
|
86
168
|
size: {
|
|
87
169
|
type: String,
|
|
88
170
|
default: "base",
|
|
89
|
-
validator: (e) => ["
|
|
171
|
+
validator: (e) => ["sm", "base"].includes(e)
|
|
90
172
|
},
|
|
91
173
|
color: {
|
|
92
174
|
type: String,
|
|
93
|
-
default: "
|
|
94
|
-
validator: (e) =>
|
|
175
|
+
default: "default",
|
|
176
|
+
validator: (e) => typeof e != "string" ? !1 : /^(default|gray|red|yellow|green|blue|violet|purple|pink)?$/.test(e) || e.startsWith("custom-")
|
|
95
177
|
}
|
|
96
178
|
},
|
|
97
179
|
setup(e) {
|
|
98
|
-
return (t, n) => (
|
|
99
|
-
class:
|
|
180
|
+
return (t, n) => (E(), oe(Ie(e.as), {
|
|
181
|
+
class: q(["rvc-badge", `rvc-badge-${e.color}`, `rvc-badge-${e.size}`])
|
|
100
182
|
}, {
|
|
101
|
-
default:
|
|
102
|
-
|
|
103
|
-
|
|
183
|
+
default: H(() => [
|
|
184
|
+
C(t.$slots, "default", { label: e.label }, () => [
|
|
185
|
+
he(re(e.label), 1)
|
|
104
186
|
])
|
|
105
187
|
]),
|
|
106
188
|
_: 3
|
|
107
189
|
}, 8, ["class"]));
|
|
108
190
|
}
|
|
109
|
-
},
|
|
191
|
+
}, sl = {
|
|
110
192
|
xmlns: "http://www.w3.org/2000/svg",
|
|
111
193
|
fill: "none",
|
|
112
194
|
viewBox: "0 0 24 24"
|
|
113
195
|
};
|
|
114
|
-
function
|
|
115
|
-
return
|
|
116
|
-
|
|
196
|
+
function ul(e, t) {
|
|
197
|
+
return E(), k("svg", sl, t[0] || (t[0] = [
|
|
198
|
+
x("circle", {
|
|
117
199
|
cx: "12",
|
|
118
200
|
cy: "12",
|
|
119
201
|
r: "10",
|
|
@@ -121,16 +203,16 @@ function It(e, t) {
|
|
|
121
203
|
"stroke-width": "4",
|
|
122
204
|
style: { opacity: ".25" }
|
|
123
205
|
}, null, -1),
|
|
124
|
-
|
|
206
|
+
x("path", {
|
|
125
207
|
fill: "currentColor",
|
|
126
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"
|
|
127
209
|
}, null, -1)
|
|
128
210
|
]));
|
|
129
211
|
}
|
|
130
|
-
const
|
|
212
|
+
const cn = { render: ul }, cl = {
|
|
131
213
|
key: 0,
|
|
132
214
|
class: "rvc-sr-only"
|
|
133
|
-
},
|
|
215
|
+
}, rt = {
|
|
134
216
|
__name: "ButtonBase",
|
|
135
217
|
props: {
|
|
136
218
|
as: {
|
|
@@ -167,56 +249,270 @@ const Ut = { render: It }, Wt = {
|
|
|
167
249
|
color: {
|
|
168
250
|
type: String,
|
|
169
251
|
default: "primary",
|
|
170
|
-
validator: (e) =>
|
|
252
|
+
validator: (e) => typeof e != "string" ? !1 : /^(primary|secondary|tertiary|light|dark|green|red|yellow|blue|green-soft|red-soft|yellow-soft|blue-soft)?$/.test(e) || e.startsWith("custom-") || e === "clear"
|
|
171
253
|
}
|
|
172
254
|
},
|
|
173
255
|
setup(e) {
|
|
174
256
|
const t = e;
|
|
175
|
-
return
|
|
257
|
+
return te(() => {
|
|
176
258
|
t.iconOnly && !t.icon && console.warn("[ButtonBase] Using iconOnly prop without providing an icon may result in an empty button.");
|
|
177
|
-
}), (n, l) => (
|
|
178
|
-
class: ["button", `button-${e.color}`, `button-${e.size}`, { "button-reverse": e.iconLeft }, { "button-icon-only": e.iconOnly }],
|
|
259
|
+
}), (n, l) => (E(), oe(Ie(e.as), qe(e.bindAs ? { as: e.bindAs } : {}, {
|
|
260
|
+
class: ["rvc-button", `rvc-button-${e.color}`, `rvc-button-${e.size}`, { "rvc-button-reverse": e.iconLeft }, { "rvc-button-icon-only": e.iconOnly }],
|
|
179
261
|
"aria-label": e.iconOnly ? e.label : null,
|
|
180
262
|
"aria-busy": e.spinning
|
|
181
263
|
}), {
|
|
182
|
-
default:
|
|
183
|
-
e.iconOnly && e.label ? (
|
|
184
|
-
|
|
185
|
-
|
|
264
|
+
default: H(() => [
|
|
265
|
+
e.iconOnly && e.label ? (E(), k("span", cl, [
|
|
266
|
+
C(n.$slots, "default", { label: e.label }, () => [
|
|
267
|
+
he(re(e.label), 1)
|
|
186
268
|
])
|
|
187
|
-
])) : e.label ?
|
|
269
|
+
])) : e.label ? C(n.$slots, "default", {
|
|
188
270
|
key: 1,
|
|
189
271
|
label: e.label
|
|
190
272
|
}, () => [
|
|
191
|
-
|
|
192
|
-
]) :
|
|
193
|
-
|
|
194
|
-
e.icon && !e.spinning ? (
|
|
273
|
+
he(re(e.label), 1)
|
|
274
|
+
]) : _("", !0),
|
|
275
|
+
C(n.$slots, "icon", { icon: e.icon }, () => [
|
|
276
|
+
e.icon && !e.spinning ? (E(), oe(Ie(e.icon), {
|
|
195
277
|
key: 0,
|
|
196
|
-
class: "button-icon",
|
|
278
|
+
class: "rvc-button-icon",
|
|
197
279
|
"aria-hidden": !e.iconOnly
|
|
198
|
-
}, null, 8, ["aria-hidden"])) :
|
|
280
|
+
}, null, 8, ["aria-hidden"])) : _("", !0)
|
|
199
281
|
]),
|
|
200
|
-
|
|
201
|
-
e.spinning ? (
|
|
282
|
+
C(n.$slots, "spinner", { spinning: e.spinning }, () => [
|
|
283
|
+
e.spinning ? (E(), oe(S(cn), {
|
|
202
284
|
key: 0,
|
|
203
|
-
class: "button-icon button-icon-loading",
|
|
285
|
+
class: "rvc-button-icon rvc-button-icon-loading",
|
|
204
286
|
"aria-hidden": "true"
|
|
205
|
-
})) :
|
|
287
|
+
})) : _("", !0)
|
|
206
288
|
])
|
|
207
289
|
]),
|
|
208
290
|
_: 3
|
|
209
291
|
}, 16, ["class", "aria-label", "aria-busy"]));
|
|
210
292
|
}
|
|
293
|
+
}, dl = { class: "rvc-checkbox" }, fl = ["id"], vl = { class: "rvc-checkbox-input peer-focus/checkbox:rvc-focus" }, pl = ["for"], Mo = /* @__PURE__ */ Object.assign({
|
|
294
|
+
inheritAttrs: !1
|
|
295
|
+
}, {
|
|
296
|
+
__name: "Checkbox",
|
|
297
|
+
props: {
|
|
298
|
+
modelValue: {
|
|
299
|
+
type: [Boolean, String, Array],
|
|
300
|
+
default: null
|
|
301
|
+
},
|
|
302
|
+
id: {
|
|
303
|
+
type: String,
|
|
304
|
+
required: !0
|
|
305
|
+
},
|
|
306
|
+
label: {
|
|
307
|
+
type: String,
|
|
308
|
+
default: ""
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
emits: ["update:modelValue"],
|
|
312
|
+
setup(e, { emit: t }) {
|
|
313
|
+
const n = e, l = t, r = b({
|
|
314
|
+
get: () => n.modelValue,
|
|
315
|
+
set: (o) => l("update:modelValue", o)
|
|
316
|
+
});
|
|
317
|
+
return (o, i) => (E(), k("div", dl, [
|
|
318
|
+
Yn(x("input", qe({ id: e.id }, o.$attrs, {
|
|
319
|
+
"onUpdate:modelValue": i[0] || (i[0] = (a) => r.value = a),
|
|
320
|
+
type: "checkbox",
|
|
321
|
+
class: "rvc-absolute rvc-opacity-0 rvc-inset-0 rvc-cursor-pointer rvc-peer/checkbox"
|
|
322
|
+
}), null, 16, fl), [
|
|
323
|
+
[Kn, r.value]
|
|
324
|
+
]),
|
|
325
|
+
x("span", vl, [
|
|
326
|
+
M(S(nl))
|
|
327
|
+
]),
|
|
328
|
+
x("div", null, [
|
|
329
|
+
o.$slots.default || e.label ? C(o.$slots, "default", { key: 0 }, () => [
|
|
330
|
+
x("label", { for: e.id }, re(e.label), 9, pl)
|
|
331
|
+
]) : _("", !0)
|
|
332
|
+
])
|
|
333
|
+
]));
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
function ml(e, t) {
|
|
337
|
+
return E(), k("svg", {
|
|
338
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
339
|
+
viewBox: "0 0 16 16",
|
|
340
|
+
fill: "currentColor",
|
|
341
|
+
"aria-hidden": "true",
|
|
342
|
+
"data-slot": "icon"
|
|
343
|
+
}, [
|
|
344
|
+
x("path", {
|
|
345
|
+
"fill-rule": "evenodd",
|
|
346
|
+
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",
|
|
347
|
+
"clip-rule": "evenodd"
|
|
348
|
+
})
|
|
349
|
+
]);
|
|
350
|
+
}
|
|
351
|
+
const gl = { class: "rvc-overflow-x-auto rvc-pb-4" }, hl = { key: 0 }, yl = ["aria-label", "onClick"], bl = ["innerHTML"], wl = { key: 1 }, xl = ["colspan"], $l = { key: 2 }, Sl = ["colspan"], El = { class: "rvc-flex rvc-gap-x-2 rvc-items-center" }, No = {
|
|
352
|
+
__name: "DataTable",
|
|
353
|
+
props: {
|
|
354
|
+
headers: {
|
|
355
|
+
type: Array,
|
|
356
|
+
default: () => [],
|
|
357
|
+
validator: (e) => e.every((t) => !t.align || ["left", "center", "right"].includes(t.align))
|
|
358
|
+
},
|
|
359
|
+
items: {
|
|
360
|
+
type: Array,
|
|
361
|
+
required: !0
|
|
362
|
+
},
|
|
363
|
+
noResultsText: {
|
|
364
|
+
type: String,
|
|
365
|
+
default: "No results found."
|
|
366
|
+
},
|
|
367
|
+
loadingText: {
|
|
368
|
+
type: String,
|
|
369
|
+
default: "Loading content..."
|
|
370
|
+
},
|
|
371
|
+
striped: {
|
|
372
|
+
type: Boolean
|
|
373
|
+
},
|
|
374
|
+
spinning: {
|
|
375
|
+
type: Boolean
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
emits: ["table:sortBy"],
|
|
379
|
+
setup(e, { emit: t }) {
|
|
380
|
+
const n = e, l = t, r = $(null), o = (a) => n.headers.find((c) => c.key === a), i = (a) => {
|
|
381
|
+
!r.value || r.value.key !== a.key ? r.value = {
|
|
382
|
+
key: a.key,
|
|
383
|
+
direction: "asc"
|
|
384
|
+
} : r.value.direction === "asc" ? r.value = {
|
|
385
|
+
key: a.key,
|
|
386
|
+
direction: "desc"
|
|
387
|
+
} : r.value = null, l("table:sortBy", r.value);
|
|
388
|
+
};
|
|
389
|
+
return (a, c) => (E(), k("div", gl, [
|
|
390
|
+
x("table", {
|
|
391
|
+
class: q([{ "rvc-table-striped": e.striped }, "rvc-w-full rvc-table"])
|
|
392
|
+
}, [
|
|
393
|
+
e.headers.length ? (E(), k("thead", hl, [
|
|
394
|
+
x("tr", null, [
|
|
395
|
+
C(a.$slots, "headers", { headers: e.headers }, () => [
|
|
396
|
+
(E(!0), k(Le, null, nt(e.headers, (s) => {
|
|
397
|
+
var u, d;
|
|
398
|
+
return E(), k("th", {
|
|
399
|
+
key: `table-header-${s.id}`,
|
|
400
|
+
class: q({
|
|
401
|
+
"rvc-text-left": s.align === "left" || !s.align,
|
|
402
|
+
"rvc-text-center": s.align === "center",
|
|
403
|
+
"rvc-text-right": s.align === "right"
|
|
404
|
+
})
|
|
405
|
+
}, [
|
|
406
|
+
s.sortable ? (E(), k("button", {
|
|
407
|
+
key: 0,
|
|
408
|
+
type: "button",
|
|
409
|
+
"aria-label": `Sort on ${s.label}`,
|
|
410
|
+
class: q([
|
|
411
|
+
"rvc-flex rvc-w-full rvc-gap-x-1.5 hover:rvc-underline rvc-group/table",
|
|
412
|
+
{
|
|
413
|
+
"rvc-justify-center": s.align === "center",
|
|
414
|
+
"rvc-justify-start rvc-flex-row-reverse": s.align === "right"
|
|
415
|
+
}
|
|
416
|
+
]),
|
|
417
|
+
onClick: (f) => i(s)
|
|
418
|
+
}, [
|
|
419
|
+
C(a.$slots, "header-label", {
|
|
420
|
+
sortBy: r.value,
|
|
421
|
+
header: s
|
|
422
|
+
}, () => [
|
|
423
|
+
he(re(s.label), 1)
|
|
424
|
+
]),
|
|
425
|
+
M(S(ml), {
|
|
426
|
+
class: q([
|
|
427
|
+
"rvc-size-4 rvc-shrink-0 rvc-transition",
|
|
428
|
+
{
|
|
429
|
+
"rvc-opacity-100": ((u = r.value) == null ? void 0 : u.key) === s.key,
|
|
430
|
+
"rvc-opacity-0 group-hover/table:rvc-opacity-30": !r.value || r.value.key !== s.key,
|
|
431
|
+
"rvc-rotate-180": ((d = r.value) == null ? void 0 : d.key) === s.key && r.value.direction === "desc"
|
|
432
|
+
}
|
|
433
|
+
])
|
|
434
|
+
}, null, 8, ["class"])
|
|
435
|
+
], 10, yl)) : C(a.$slots, "header-label", {
|
|
436
|
+
key: 1,
|
|
437
|
+
sortBy: r.value,
|
|
438
|
+
header: s
|
|
439
|
+
}, () => [
|
|
440
|
+
he(re(s.label), 1)
|
|
441
|
+
])
|
|
442
|
+
], 2);
|
|
443
|
+
}), 128))
|
|
444
|
+
])
|
|
445
|
+
])
|
|
446
|
+
])) : _("", !0),
|
|
447
|
+
x("tbody", null, [
|
|
448
|
+
e.items.length && !e.spinning ? (E(!0), k(Le, { key: 0 }, nt(e.items.map(({ id: s, ...u }) => u), (s, u) => (E(), k("tr", {
|
|
449
|
+
key: `table-row-${u}-${s.id}`
|
|
450
|
+
}, [
|
|
451
|
+
C(a.$slots, "items", {
|
|
452
|
+
item: s,
|
|
453
|
+
index: u
|
|
454
|
+
}, () => [
|
|
455
|
+
(E(!0), k(Le, null, nt(s, (d, f) => {
|
|
456
|
+
var v, p, m, h;
|
|
457
|
+
return E(), k("td", qe({
|
|
458
|
+
key: `table-row-${u}-column-${f}-${s.id}`,
|
|
459
|
+
ref_for: !0
|
|
460
|
+
}, s.attrs, {
|
|
461
|
+
class: {
|
|
462
|
+
"rvc-text-left": ((v = o(f)) == null ? void 0 : v.align) === "left" || !((p = o(f)) != null && p.align),
|
|
463
|
+
"rvc-text-center": ((m = o(f)) == null ? void 0 : m.align) === "center",
|
|
464
|
+
"rvc-text-right": ((h = o(f)) == null ? void 0 : h.align) === "right"
|
|
465
|
+
},
|
|
466
|
+
innerHTML: d
|
|
467
|
+
}), null, 16, bl);
|
|
468
|
+
}), 128))
|
|
469
|
+
])
|
|
470
|
+
]))), 128)) : !e.items.length && !e.spinning ? (E(), k("tr", wl, [
|
|
471
|
+
x("td", {
|
|
472
|
+
colspan: e.headers.length,
|
|
473
|
+
class: "rvc-table-state"
|
|
474
|
+
}, [
|
|
475
|
+
x("p", null, re(e.noResultsText), 1)
|
|
476
|
+
], 8, xl)
|
|
477
|
+
])) : (E(), k("tr", $l, [
|
|
478
|
+
x("td", {
|
|
479
|
+
colspan: e.headers.length,
|
|
480
|
+
class: "rvc-table-state"
|
|
481
|
+
}, [
|
|
482
|
+
C(a.$slots, "spinner", {
|
|
483
|
+
spinning: e.spinning,
|
|
484
|
+
label: e.loadingText
|
|
485
|
+
}, () => [
|
|
486
|
+
x("div", El, [
|
|
487
|
+
e.spinning ? (E(), oe(S(cn), {
|
|
488
|
+
key: 0,
|
|
489
|
+
"aria-hidden": "true",
|
|
490
|
+
class: "rvc-table-spinner"
|
|
491
|
+
})) : _("", !0),
|
|
492
|
+
he(" " + re(e.loadingText), 1)
|
|
493
|
+
])
|
|
494
|
+
])
|
|
495
|
+
], 8, Sl)
|
|
496
|
+
]))
|
|
497
|
+
])
|
|
498
|
+
], 2)
|
|
499
|
+
]));
|
|
500
|
+
}
|
|
211
501
|
};
|
|
212
|
-
function
|
|
502
|
+
function Ol(e, t, n) {
|
|
503
|
+
let l = $(n == null ? void 0 : n.value), r = b(() => e.value !== void 0);
|
|
504
|
+
return [b(() => r.value ? e.value : l.value), function(o) {
|
|
505
|
+
return r.value || (l.value = o), t == null ? void 0 : t(o);
|
|
506
|
+
}];
|
|
507
|
+
}
|
|
508
|
+
function kt(e) {
|
|
213
509
|
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
|
|
214
510
|
throw t;
|
|
215
511
|
}));
|
|
216
512
|
}
|
|
217
|
-
function
|
|
218
|
-
let e = [], t = { addEventListener(n, l, r,
|
|
219
|
-
return n.addEventListener(l, r,
|
|
513
|
+
function Ye() {
|
|
514
|
+
let e = [], t = { addEventListener(n, l, r, o) {
|
|
515
|
+
return n.addEventListener(l, r, o), t.add(() => n.removeEventListener(l, r, o));
|
|
220
516
|
}, requestAnimationFrame(...n) {
|
|
221
517
|
let l = requestAnimationFrame(...n);
|
|
222
518
|
t.add(() => cancelAnimationFrame(l));
|
|
@@ -229,18 +525,18 @@ function ve() {
|
|
|
229
525
|
t.add(() => clearTimeout(l));
|
|
230
526
|
}, microTask(...n) {
|
|
231
527
|
let l = { current: !0 };
|
|
232
|
-
return
|
|
528
|
+
return kt(() => {
|
|
233
529
|
l.current && n[0]();
|
|
234
530
|
}), t.add(() => {
|
|
235
531
|
l.current = !1;
|
|
236
532
|
});
|
|
237
533
|
}, style(n, l, r) {
|
|
238
|
-
let
|
|
534
|
+
let o = n.style.getPropertyValue(l);
|
|
239
535
|
return Object.assign(n.style, { [l]: r }), this.add(() => {
|
|
240
|
-
Object.assign(n.style, { [l]:
|
|
536
|
+
Object.assign(n.style, { [l]: o });
|
|
241
537
|
});
|
|
242
538
|
}, group(n) {
|
|
243
|
-
let l =
|
|
539
|
+
let l = Ye();
|
|
244
540
|
return n(l), this.add(() => l.dispose());
|
|
245
541
|
}, add(n) {
|
|
246
542
|
return e.push(n), () => {
|
|
@@ -252,29 +548,29 @@ function ve() {
|
|
|
252
548
|
} };
|
|
253
549
|
return t;
|
|
254
550
|
}
|
|
255
|
-
var
|
|
256
|
-
let
|
|
257
|
-
const
|
|
258
|
-
return
|
|
551
|
+
var Gt;
|
|
552
|
+
let Ll = Symbol("headlessui.useid"), Tl = 0;
|
|
553
|
+
const ye = (Gt = Kt.useId) != null ? Gt : function() {
|
|
554
|
+
return Kt.inject(Ll, () => `${++Tl}`)();
|
|
259
555
|
};
|
|
260
|
-
function
|
|
556
|
+
function D(e) {
|
|
261
557
|
var t;
|
|
262
558
|
if (e == null || e.value == null) return null;
|
|
263
559
|
let n = (t = e.value.$el) != null ? t : e.value;
|
|
264
560
|
return n instanceof Node ? n : null;
|
|
265
561
|
}
|
|
266
|
-
function
|
|
562
|
+
function pe(e, t, ...n) {
|
|
267
563
|
if (e in t) {
|
|
268
564
|
let r = t[e];
|
|
269
565
|
return typeof r == "function" ? r(...n) : r;
|
|
270
566
|
}
|
|
271
567
|
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(", ")}.`);
|
|
272
|
-
throw Error.captureStackTrace && Error.captureStackTrace(l,
|
|
568
|
+
throw Error.captureStackTrace && Error.captureStackTrace(l, pe), l;
|
|
273
569
|
}
|
|
274
|
-
var
|
|
275
|
-
let
|
|
570
|
+
var Cl = Object.defineProperty, Al = (e, t, n) => t in e ? Cl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Xt = (e, t, n) => (Al(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
571
|
+
let kl = class {
|
|
276
572
|
constructor() {
|
|
277
|
-
|
|
573
|
+
Xt(this, "current", this.detect()), Xt(this, "currentId", 0);
|
|
278
574
|
}
|
|
279
575
|
set(t) {
|
|
280
576
|
this.current !== t && (this.currentId = 0, this.current = t);
|
|
@@ -294,553 +590,583 @@ let Yt = class {
|
|
|
294
590
|
detect() {
|
|
295
591
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
296
592
|
}
|
|
297
|
-
},
|
|
298
|
-
function
|
|
299
|
-
if (
|
|
593
|
+
}, Ke = new kl();
|
|
594
|
+
function Be(e) {
|
|
595
|
+
if (Ke.isServer) return null;
|
|
300
596
|
if (e instanceof Node) return e.ownerDocument;
|
|
301
597
|
if (e != null && e.hasOwnProperty("value")) {
|
|
302
|
-
let t =
|
|
598
|
+
let t = D(e);
|
|
303
599
|
if (t) return t.ownerDocument;
|
|
304
600
|
}
|
|
305
601
|
return document;
|
|
306
602
|
}
|
|
307
|
-
let
|
|
308
|
-
var
|
|
309
|
-
function
|
|
310
|
-
return e == null ? [] : Array.from(e.querySelectorAll(
|
|
603
|
+
let bt = ["[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(",");
|
|
604
|
+
var be = ((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))(be || {}), dn = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(dn || {}), Pl = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Pl || {});
|
|
605
|
+
function Dl(e = document.body) {
|
|
606
|
+
return e == null ? [] : Array.from(e.querySelectorAll(bt)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
311
607
|
}
|
|
312
|
-
var
|
|
313
|
-
function
|
|
608
|
+
var fn = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(fn || {});
|
|
609
|
+
function Rl(e, t = 0) {
|
|
314
610
|
var n;
|
|
315
|
-
return e === ((n =
|
|
316
|
-
return e.matches(
|
|
611
|
+
return e === ((n = Be(e)) == null ? void 0 : n.body) ? !1 : pe(t, { 0() {
|
|
612
|
+
return e.matches(bt);
|
|
317
613
|
}, 1() {
|
|
318
614
|
let l = e;
|
|
319
615
|
for (; l !== null; ) {
|
|
320
|
-
if (l.matches(
|
|
616
|
+
if (l.matches(bt)) return !0;
|
|
321
617
|
l = l.parentElement;
|
|
322
618
|
}
|
|
323
619
|
return !1;
|
|
324
620
|
} });
|
|
325
621
|
}
|
|
326
|
-
var
|
|
622
|
+
var Fl = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Fl || {});
|
|
327
623
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
328
624
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
329
625
|
}, !0), document.addEventListener("click", (e) => {
|
|
330
626
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
331
627
|
}, !0));
|
|
332
|
-
function
|
|
628
|
+
function Te(e) {
|
|
333
629
|
e == null || e.focus({ preventScroll: !0 });
|
|
334
630
|
}
|
|
335
|
-
let
|
|
336
|
-
function
|
|
631
|
+
let Bl = ["textarea", "input"].join(",");
|
|
632
|
+
function Ml(e) {
|
|
337
633
|
var t, n;
|
|
338
|
-
return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e,
|
|
634
|
+
return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Bl)) != null ? n : !1;
|
|
339
635
|
}
|
|
340
|
-
function
|
|
636
|
+
function Nl(e, t = (n) => n) {
|
|
341
637
|
return e.slice().sort((n, l) => {
|
|
342
|
-
let r = t(n),
|
|
343
|
-
if (r === null ||
|
|
344
|
-
let i = r.compareDocumentPosition(
|
|
638
|
+
let r = t(n), o = t(l);
|
|
639
|
+
if (r === null || o === null) return 0;
|
|
640
|
+
let i = r.compareDocumentPosition(o);
|
|
345
641
|
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
346
642
|
});
|
|
347
643
|
}
|
|
348
|
-
function
|
|
349
|
-
var
|
|
350
|
-
let i = (
|
|
351
|
-
r.length > 0 &&
|
|
352
|
-
let
|
|
644
|
+
function lt(e, t, { sorted: n = !0, relativeTo: l = null, skipElements: r = [] } = {}) {
|
|
645
|
+
var o;
|
|
646
|
+
let i = (o = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? o : document, a = Array.isArray(e) ? n ? Nl(e) : e : Dl(e);
|
|
647
|
+
r.length > 0 && a.length > 1 && (a = a.filter((p) => !r.includes(p))), l = l ?? i.activeElement;
|
|
648
|
+
let c = (() => {
|
|
353
649
|
if (t & 5) return 1;
|
|
354
650
|
if (t & 10) return -1;
|
|
355
651
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
356
|
-
})(),
|
|
652
|
+
})(), s = (() => {
|
|
357
653
|
if (t & 1) return 0;
|
|
358
|
-
if (t & 2) return Math.max(0,
|
|
359
|
-
if (t & 4) return Math.max(0,
|
|
360
|
-
if (t & 8) return
|
|
654
|
+
if (t & 2) return Math.max(0, a.indexOf(l)) - 1;
|
|
655
|
+
if (t & 4) return Math.max(0, a.indexOf(l)) + 1;
|
|
656
|
+
if (t & 8) return a.length - 1;
|
|
361
657
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
362
|
-
})(),
|
|
658
|
+
})(), u = t & 32 ? { preventScroll: !0 } : {}, d = 0, f = a.length, v;
|
|
363
659
|
do {
|
|
364
|
-
if (
|
|
365
|
-
let
|
|
366
|
-
if (t & 16)
|
|
660
|
+
if (d >= f || d + f <= 0) return 0;
|
|
661
|
+
let p = s + d;
|
|
662
|
+
if (t & 16) p = (p + f) % f;
|
|
367
663
|
else {
|
|
368
|
-
if (
|
|
369
|
-
if (
|
|
664
|
+
if (p < 0) return 3;
|
|
665
|
+
if (p >= f) return 1;
|
|
370
666
|
}
|
|
371
|
-
|
|
372
|
-
} while (
|
|
373
|
-
return t & 6 &&
|
|
667
|
+
v = a[p], v == null || v.focus(u), d += c;
|
|
668
|
+
} while (v !== i.activeElement);
|
|
669
|
+
return t & 6 && Ml(v) && v.select(), 2;
|
|
374
670
|
}
|
|
375
|
-
function
|
|
671
|
+
function vn() {
|
|
376
672
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
377
673
|
}
|
|
378
|
-
function
|
|
674
|
+
function jl() {
|
|
379
675
|
return /Android/gi.test(window.navigator.userAgent);
|
|
380
676
|
}
|
|
381
|
-
function
|
|
382
|
-
return
|
|
677
|
+
function Hl() {
|
|
678
|
+
return vn() || jl();
|
|
383
679
|
}
|
|
384
|
-
function
|
|
385
|
-
|
|
680
|
+
function Je(e, t, n) {
|
|
681
|
+
Ke.isServer || te((l) => {
|
|
386
682
|
document.addEventListener(e, t, n), l(() => document.removeEventListener(e, t, n));
|
|
387
683
|
});
|
|
388
684
|
}
|
|
389
|
-
function
|
|
390
|
-
|
|
685
|
+
function pn(e, t, n) {
|
|
686
|
+
Ke.isServer || te((l) => {
|
|
391
687
|
window.addEventListener(e, t, n), l(() => window.removeEventListener(e, t, n));
|
|
392
688
|
});
|
|
393
689
|
}
|
|
394
|
-
function
|
|
395
|
-
function l(
|
|
396
|
-
if (!n.value ||
|
|
397
|
-
let
|
|
398
|
-
if (
|
|
399
|
-
let
|
|
400
|
-
return typeof
|
|
690
|
+
function Vl(e, t, n = b(() => !0)) {
|
|
691
|
+
function l(o, i) {
|
|
692
|
+
if (!n.value || o.defaultPrevented) return;
|
|
693
|
+
let a = i(o);
|
|
694
|
+
if (a === null || !a.getRootNode().contains(a)) return;
|
|
695
|
+
let c = function s(u) {
|
|
696
|
+
return typeof u == "function" ? s(u()) : Array.isArray(u) || u instanceof Set ? u : [u];
|
|
401
697
|
}(e);
|
|
402
|
-
for (let
|
|
403
|
-
if (
|
|
404
|
-
let
|
|
405
|
-
if (
|
|
698
|
+
for (let s of c) {
|
|
699
|
+
if (s === null) continue;
|
|
700
|
+
let u = s instanceof HTMLElement ? s : D(s);
|
|
701
|
+
if (u != null && u.contains(a) || o.composed && o.composedPath().includes(u)) return;
|
|
406
702
|
}
|
|
407
|
-
return !
|
|
408
|
-
}
|
|
409
|
-
let r =
|
|
410
|
-
|
|
411
|
-
var i,
|
|
412
|
-
n.value && (r.value = ((
|
|
413
|
-
}, !0),
|
|
414
|
-
var i,
|
|
415
|
-
n.value && (r.value = ((
|
|
416
|
-
}, !0),
|
|
417
|
-
|
|
418
|
-
}, !0),
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
703
|
+
return !Rl(a, fn.Loose) && a.tabIndex !== -1 && o.preventDefault(), t(o, a);
|
|
704
|
+
}
|
|
705
|
+
let r = $(null);
|
|
706
|
+
Je("pointerdown", (o) => {
|
|
707
|
+
var i, a;
|
|
708
|
+
n.value && (r.value = ((a = (i = o.composedPath) == null ? void 0 : i.call(o)) == null ? void 0 : a[0]) || o.target);
|
|
709
|
+
}, !0), Je("mousedown", (o) => {
|
|
710
|
+
var i, a;
|
|
711
|
+
n.value && (r.value = ((a = (i = o.composedPath) == null ? void 0 : i.call(o)) == null ? void 0 : a[0]) || o.target);
|
|
712
|
+
}, !0), Je("click", (o) => {
|
|
713
|
+
Hl() || r.value && (l(o, () => r.value), r.value = null);
|
|
714
|
+
}, !0), Je("touchend", (o) => l(o, () => o.target instanceof HTMLElement ? o.target : null), !0), pn("blur", (o) => l(o, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
715
|
+
}
|
|
716
|
+
function Zt(e, t) {
|
|
717
|
+
if (e) return e;
|
|
718
|
+
let n = t ?? "button";
|
|
719
|
+
if (typeof n == "string" && n.toLowerCase() === "button") return "button";
|
|
720
|
+
}
|
|
721
|
+
function Il(e, t) {
|
|
722
|
+
let n = $(Zt(e.value.type, e.value.as));
|
|
723
|
+
return V(() => {
|
|
724
|
+
n.value = Zt(e.value.type, e.value.as);
|
|
725
|
+
}), te(() => {
|
|
726
|
+
var l;
|
|
727
|
+
n.value || D(t) && D(t) instanceof HTMLButtonElement && !((l = D(t)) != null && l.hasAttribute("type")) && (n.value = "button");
|
|
728
|
+
}), n;
|
|
729
|
+
}
|
|
730
|
+
var ot = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(ot || {}), we = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(we || {});
|
|
731
|
+
function W({ visible: e = !0, features: t = 0, ourProps: n, theirProps: l, ...r }) {
|
|
732
|
+
var o;
|
|
733
|
+
let i = gn(l, n), a = Object.assign(r, { props: i });
|
|
734
|
+
if (e || t & 2 && i.static) return mt(a);
|
|
425
735
|
if (t & 1) {
|
|
426
|
-
let
|
|
427
|
-
return
|
|
736
|
+
let c = (o = i.unmount) == null || o ? 0 : 1;
|
|
737
|
+
return pe(c, { 0() {
|
|
428
738
|
return null;
|
|
429
739
|
}, 1() {
|
|
430
|
-
return
|
|
740
|
+
return mt({ ...r, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
431
741
|
} });
|
|
432
742
|
}
|
|
433
|
-
return
|
|
743
|
+
return mt(a);
|
|
434
744
|
}
|
|
435
|
-
function
|
|
436
|
-
var
|
|
437
|
-
let { as:
|
|
745
|
+
function mt({ props: e, attrs: t, slots: n, slot: l, name: r }) {
|
|
746
|
+
var o, i;
|
|
747
|
+
let { as: a, ...c } = Pt(e, ["unmount", "static"]), s = (o = n.default) == null ? void 0 : o.call(n, l), u = {};
|
|
438
748
|
if (l) {
|
|
439
|
-
let
|
|
440
|
-
for (let [
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
if (
|
|
444
|
-
if (
|
|
445
|
-
let [
|
|
446
|
-
if (!
|
|
447
|
-
`), "", "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((
|
|
749
|
+
let d = !1, f = [];
|
|
750
|
+
for (let [v, p] of Object.entries(l)) typeof p == "boolean" && (d = !0), p === !0 && f.push(v);
|
|
751
|
+
d && (u["data-headlessui-state"] = f.join(" "));
|
|
752
|
+
}
|
|
753
|
+
if (a === "template") {
|
|
754
|
+
if (s = mn(s ?? []), Object.keys(c).length > 0 || Object.keys(t).length > 0) {
|
|
755
|
+
let [d, ...f] = s ?? [];
|
|
756
|
+
if (!Ul(d) || f.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(c).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(`
|
|
757
|
+
`), "", "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(`
|
|
448
758
|
`)].join(`
|
|
449
759
|
`));
|
|
450
|
-
let
|
|
451
|
-
for (let
|
|
452
|
-
return
|
|
760
|
+
let v = gn((i = d.props) != null ? i : {}, c, u), p = Gn(d, v, !0);
|
|
761
|
+
for (let m in v) m.startsWith("on") && (p.props || (p.props = {}), p.props[m] = v[m]);
|
|
762
|
+
return p;
|
|
453
763
|
}
|
|
454
|
-
return Array.isArray(
|
|
764
|
+
return Array.isArray(s) && s.length === 1 ? s[0] : s;
|
|
455
765
|
}
|
|
456
|
-
return
|
|
766
|
+
return N(a, Object.assign({}, c, u), { default: () => s });
|
|
457
767
|
}
|
|
458
|
-
function
|
|
459
|
-
return e.flatMap((t) => t.type ===
|
|
768
|
+
function mn(e) {
|
|
769
|
+
return e.flatMap((t) => t.type === Le ? mn(t.children) : [t]);
|
|
460
770
|
}
|
|
461
|
-
function
|
|
771
|
+
function gn(...e) {
|
|
462
772
|
if (e.length === 0) return {};
|
|
463
773
|
if (e.length === 1) return e[0];
|
|
464
774
|
let t = {}, n = {};
|
|
465
775
|
for (let l of e) for (let r in l) r.startsWith("on") && typeof l[r] == "function" ? (n[r] != null || (n[r] = []), n[r].push(l[r])) : t[r] = l[r];
|
|
466
776
|
if (t.disabled || t["aria-disabled"]) return Object.assign(t, Object.fromEntries(Object.keys(n).map((l) => [l, void 0])));
|
|
467
|
-
for (let l in n) Object.assign(t, { [l](r, ...
|
|
777
|
+
for (let l in n) Object.assign(t, { [l](r, ...o) {
|
|
468
778
|
let i = n[l];
|
|
469
|
-
for (let
|
|
779
|
+
for (let a of i) {
|
|
470
780
|
if (r instanceof Event && r.defaultPrevented) return;
|
|
471
|
-
|
|
781
|
+
a(r, ...o);
|
|
472
782
|
}
|
|
473
783
|
} });
|
|
474
784
|
return t;
|
|
475
785
|
}
|
|
476
|
-
function
|
|
786
|
+
function Wl(e) {
|
|
787
|
+
let t = Object.assign({}, e);
|
|
788
|
+
for (let n in t) t[n] === void 0 && delete t[n];
|
|
789
|
+
return t;
|
|
790
|
+
}
|
|
791
|
+
function Pt(e, t = []) {
|
|
477
792
|
let n = Object.assign({}, e);
|
|
478
793
|
for (let l of t) l in n && delete n[l];
|
|
479
794
|
return n;
|
|
480
795
|
}
|
|
481
|
-
function
|
|
796
|
+
function Ul(e) {
|
|
482
797
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
483
798
|
}
|
|
484
|
-
var
|
|
485
|
-
let
|
|
799
|
+
var We = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(We || {});
|
|
800
|
+
let it = I({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: n }) {
|
|
486
801
|
return () => {
|
|
487
802
|
var l;
|
|
488
|
-
let { features: r, ...
|
|
489
|
-
return
|
|
803
|
+
let { features: r, ...o } = e, i = { "aria-hidden": (r & 2) === 2 ? !0 : (l = o["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" } } };
|
|
804
|
+
return W({ ourProps: i, theirProps: o, slot: {}, attrs: n, slots: t, name: "Hidden" });
|
|
490
805
|
};
|
|
491
|
-
} }),
|
|
492
|
-
var
|
|
493
|
-
function
|
|
494
|
-
return
|
|
806
|
+
} }), hn = Symbol("Context");
|
|
807
|
+
var Q = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(Q || {});
|
|
808
|
+
function zl() {
|
|
809
|
+
return Dt() !== null;
|
|
495
810
|
}
|
|
496
|
-
function
|
|
497
|
-
return
|
|
811
|
+
function Dt() {
|
|
812
|
+
return Y(hn, null);
|
|
498
813
|
}
|
|
499
|
-
function
|
|
500
|
-
|
|
814
|
+
function ql(e) {
|
|
815
|
+
ie(hn, e);
|
|
501
816
|
}
|
|
502
|
-
var
|
|
503
|
-
function
|
|
817
|
+
var at = ((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))(at || {});
|
|
818
|
+
function Yl(e) {
|
|
504
819
|
function t() {
|
|
505
820
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
|
|
506
821
|
}
|
|
507
822
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
|
|
508
823
|
}
|
|
509
|
-
let
|
|
510
|
-
|
|
824
|
+
let Ee = [];
|
|
825
|
+
Yl(() => {
|
|
511
826
|
function e(t) {
|
|
512
|
-
t.target instanceof HTMLElement && t.target !== document.body &&
|
|
827
|
+
t.target instanceof HTMLElement && t.target !== document.body && Ee[0] !== t.target && (Ee.unshift(t.target), Ee = Ee.filter((n) => n != null && n.isConnected), Ee.splice(10));
|
|
513
828
|
}
|
|
514
829
|
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 });
|
|
515
830
|
});
|
|
516
|
-
function
|
|
517
|
-
|
|
831
|
+
function Kl(e) {
|
|
832
|
+
var t, n;
|
|
833
|
+
let l = (t = e == null ? void 0 : e.form) != null ? t : e.closest("form");
|
|
834
|
+
if (l) {
|
|
835
|
+
for (let r of l.elements) if (r !== e && (r.tagName === "INPUT" && r.type === "submit" || r.tagName === "BUTTON" && r.type === "submit" || r.nodeName === "INPUT" && r.type === "image")) {
|
|
836
|
+
r.click();
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
(n = l.requestSubmit) == null || n.call(l);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
function yn(e, t, n, l) {
|
|
843
|
+
Ke.isServer || te((r) => {
|
|
518
844
|
e = e ?? window, e.addEventListener(t, n, l), r(() => e.removeEventListener(t, n, l));
|
|
519
845
|
});
|
|
520
846
|
}
|
|
521
|
-
var
|
|
522
|
-
function
|
|
523
|
-
let e =
|
|
524
|
-
return
|
|
847
|
+
var He = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(He || {});
|
|
848
|
+
function Gl() {
|
|
849
|
+
let e = $(0);
|
|
850
|
+
return pn("keydown", (t) => {
|
|
525
851
|
t.key === "Tab" && (e.value = t.shiftKey ? 1 : 0);
|
|
526
852
|
}), e;
|
|
527
853
|
}
|
|
528
|
-
function
|
|
854
|
+
function bn(e) {
|
|
529
855
|
if (!e) return /* @__PURE__ */ new Set();
|
|
530
856
|
if (typeof e == "function") return new Set(e());
|
|
531
857
|
let t = /* @__PURE__ */ new Set();
|
|
532
858
|
for (let n of e.value) {
|
|
533
|
-
let l =
|
|
859
|
+
let l = D(n);
|
|
534
860
|
l instanceof HTMLElement && t.add(l);
|
|
535
861
|
}
|
|
536
862
|
return t;
|
|
537
863
|
}
|
|
538
|
-
var
|
|
539
|
-
let
|
|
540
|
-
let r =
|
|
864
|
+
var wn = ((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))(wn || {});
|
|
865
|
+
let Ne = Object.assign(I({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: [Object, Function], default: $(/* @__PURE__ */ new Set()) } }, inheritAttrs: !1, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
866
|
+
let r = $(null);
|
|
541
867
|
l({ el: r, $el: r });
|
|
542
|
-
let
|
|
543
|
-
|
|
544
|
-
let
|
|
545
|
-
|
|
546
|
-
let
|
|
547
|
-
function
|
|
548
|
-
let
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
}, [
|
|
553
|
-
|
|
868
|
+
let o = b(() => Be(r)), i = $(!1);
|
|
869
|
+
V(() => i.value = !0), ae(() => i.value = !1), Zl({ ownerDocument: o }, b(() => i.value && !!(e.features & 16)));
|
|
870
|
+
let a = Ql({ ownerDocument: o, container: r, initialFocus: b(() => e.initialFocus) }, b(() => i.value && !!(e.features & 2)));
|
|
871
|
+
Jl({ ownerDocument: o, container: r, containers: e.containers, previousActiveElement: a }, b(() => i.value && !!(e.features & 8)));
|
|
872
|
+
let c = Gl();
|
|
873
|
+
function s(v) {
|
|
874
|
+
let p = D(r);
|
|
875
|
+
p && ((m) => m())(() => {
|
|
876
|
+
pe(c.value, { [He.Forwards]: () => {
|
|
877
|
+
lt(p, be.First, { skipElements: [v.relatedTarget] });
|
|
878
|
+
}, [He.Backwards]: () => {
|
|
879
|
+
lt(p, be.Last, { skipElements: [v.relatedTarget] });
|
|
554
880
|
} });
|
|
555
881
|
});
|
|
556
882
|
}
|
|
557
|
-
let
|
|
558
|
-
function
|
|
559
|
-
|
|
560
|
-
|
|
883
|
+
let u = $(!1);
|
|
884
|
+
function d(v) {
|
|
885
|
+
v.key === "Tab" && (u.value = !0, requestAnimationFrame(() => {
|
|
886
|
+
u.value = !1;
|
|
561
887
|
}));
|
|
562
888
|
}
|
|
563
|
-
function
|
|
889
|
+
function f(v) {
|
|
564
890
|
if (!i.value) return;
|
|
565
|
-
let
|
|
566
|
-
|
|
567
|
-
let
|
|
568
|
-
|
|
891
|
+
let p = bn(e.containers);
|
|
892
|
+
D(r) instanceof HTMLElement && p.add(D(r));
|
|
893
|
+
let m = v.relatedTarget;
|
|
894
|
+
m instanceof HTMLElement && m.dataset.headlessuiFocusGuard !== "true" && (xn(p, m) || (u.value ? lt(D(r), pe(c.value, { [He.Forwards]: () => be.Next, [He.Backwards]: () => be.Previous }) | be.WrapAround, { relativeTo: v.target }) : v.target instanceof HTMLElement && Te(v.target)));
|
|
569
895
|
}
|
|
570
896
|
return () => {
|
|
571
|
-
let
|
|
572
|
-
return
|
|
897
|
+
let v = {}, p = { ref: r, onKeydown: d, onFocusout: f }, { features: m, initialFocus: h, containers: y, ...g } = e;
|
|
898
|
+
return N(Le, [!!(m & 4) && N(it, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: s, features: We.Focusable }), W({ ourProps: p, theirProps: { ...t, ...g }, slot: v, attrs: t, slots: n, name: "FocusTrap" }), !!(m & 4) && N(it, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: s, features: We.Focusable })]);
|
|
573
899
|
};
|
|
574
|
-
} }), { features:
|
|
575
|
-
function
|
|
576
|
-
let t =
|
|
577
|
-
return
|
|
578
|
-
l === !0 && n === !1 ?
|
|
900
|
+
} }), { features: wn });
|
|
901
|
+
function Xl(e) {
|
|
902
|
+
let t = $(Ee.slice());
|
|
903
|
+
return de([e], ([n], [l]) => {
|
|
904
|
+
l === !0 && n === !1 ? kt(() => {
|
|
579
905
|
t.value.splice(0);
|
|
580
|
-
}) : l === !1 && n === !0 && (t.value =
|
|
906
|
+
}) : l === !1 && n === !0 && (t.value = Ee.slice());
|
|
581
907
|
}, { flush: "post" }), () => {
|
|
582
908
|
var n;
|
|
583
909
|
return (n = t.value.find((l) => l != null && l.isConnected)) != null ? n : null;
|
|
584
910
|
};
|
|
585
911
|
}
|
|
586
|
-
function
|
|
587
|
-
let n =
|
|
588
|
-
|
|
589
|
-
|
|
912
|
+
function Zl({ ownerDocument: e }, t) {
|
|
913
|
+
let n = Xl(t);
|
|
914
|
+
V(() => {
|
|
915
|
+
te(() => {
|
|
590
916
|
var l, r;
|
|
591
|
-
t.value || ((l = e.value) == null ? void 0 : l.activeElement) === ((r = e.value) == null ? void 0 : r.body) &&
|
|
917
|
+
t.value || ((l = e.value) == null ? void 0 : l.activeElement) === ((r = e.value) == null ? void 0 : r.body) && Te(n());
|
|
592
918
|
}, { flush: "post" });
|
|
593
|
-
}),
|
|
594
|
-
t.value &&
|
|
919
|
+
}), ae(() => {
|
|
920
|
+
t.value && Te(n());
|
|
595
921
|
});
|
|
596
922
|
}
|
|
597
|
-
function
|
|
598
|
-
let r =
|
|
599
|
-
return
|
|
600
|
-
|
|
601
|
-
if (i.every((
|
|
602
|
-
let
|
|
603
|
-
|
|
604
|
-
var
|
|
605
|
-
if (!
|
|
606
|
-
let
|
|
607
|
-
if (
|
|
608
|
-
if (
|
|
609
|
-
r.value =
|
|
923
|
+
function Ql({ ownerDocument: e, container: t, initialFocus: n }, l) {
|
|
924
|
+
let r = $(null), o = $(!1);
|
|
925
|
+
return V(() => o.value = !0), ae(() => o.value = !1), V(() => {
|
|
926
|
+
de([t, n, l], (i, a) => {
|
|
927
|
+
if (i.every((s, u) => (a == null ? void 0 : a[u]) === s) || !l.value) return;
|
|
928
|
+
let c = D(t);
|
|
929
|
+
c && kt(() => {
|
|
930
|
+
var s, u;
|
|
931
|
+
if (!o.value) return;
|
|
932
|
+
let d = D(n), f = (s = e.value) == null ? void 0 : s.activeElement;
|
|
933
|
+
if (d) {
|
|
934
|
+
if (d === f) {
|
|
935
|
+
r.value = f;
|
|
610
936
|
return;
|
|
611
937
|
}
|
|
612
|
-
} else if (
|
|
613
|
-
r.value =
|
|
938
|
+
} else if (c.contains(f)) {
|
|
939
|
+
r.value = f;
|
|
614
940
|
return;
|
|
615
941
|
}
|
|
616
|
-
|
|
942
|
+
d ? Te(d) : lt(c, be.First | be.NoScroll) === dn.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), r.value = (u = e.value) == null ? void 0 : u.activeElement;
|
|
617
943
|
});
|
|
618
944
|
}, { immediate: !0, flush: "post" });
|
|
619
945
|
}), r;
|
|
620
946
|
}
|
|
621
|
-
function
|
|
622
|
-
var
|
|
623
|
-
|
|
947
|
+
function Jl({ ownerDocument: e, container: t, containers: n, previousActiveElement: l }, r) {
|
|
948
|
+
var o;
|
|
949
|
+
yn((o = e.value) == null ? void 0 : o.defaultView, "focus", (i) => {
|
|
624
950
|
if (!r.value) return;
|
|
625
|
-
let
|
|
626
|
-
|
|
627
|
-
let
|
|
628
|
-
if (!
|
|
629
|
-
let
|
|
630
|
-
|
|
951
|
+
let a = bn(n);
|
|
952
|
+
D(t) instanceof HTMLElement && a.add(D(t));
|
|
953
|
+
let c = l.value;
|
|
954
|
+
if (!c) return;
|
|
955
|
+
let s = i.target;
|
|
956
|
+
s && s instanceof HTMLElement ? xn(a, s) ? (l.value = s, Te(s)) : (i.preventDefault(), i.stopPropagation(), Te(c)) : Te(l.value);
|
|
631
957
|
}, !0);
|
|
632
958
|
}
|
|
633
|
-
function
|
|
959
|
+
function xn(e, t) {
|
|
634
960
|
for (let n of e) if (n.contains(t)) return !0;
|
|
635
961
|
return !1;
|
|
636
962
|
}
|
|
637
|
-
function
|
|
638
|
-
let t =
|
|
639
|
-
return
|
|
963
|
+
function _l(e) {
|
|
964
|
+
let t = Ve(e.getSnapshot());
|
|
965
|
+
return ae(e.subscribe(() => {
|
|
640
966
|
t.value = e.getSnapshot();
|
|
641
967
|
})), t;
|
|
642
968
|
}
|
|
643
|
-
function
|
|
969
|
+
function er(e, t) {
|
|
644
970
|
let n = e(), l = /* @__PURE__ */ new Set();
|
|
645
971
|
return { getSnapshot() {
|
|
646
972
|
return n;
|
|
647
973
|
}, subscribe(r) {
|
|
648
974
|
return l.add(r), () => l.delete(r);
|
|
649
|
-
}, dispatch(r, ...
|
|
650
|
-
let i = t[r].call(n, ...
|
|
651
|
-
i && (n = i, l.forEach((
|
|
975
|
+
}, dispatch(r, ...o) {
|
|
976
|
+
let i = t[r].call(n, ...o);
|
|
977
|
+
i && (n = i, l.forEach((a) => a()));
|
|
652
978
|
} };
|
|
653
979
|
}
|
|
654
|
-
function
|
|
980
|
+
function tr() {
|
|
655
981
|
let e;
|
|
656
982
|
return { before({ doc: t }) {
|
|
657
983
|
var n;
|
|
658
984
|
let l = t.documentElement;
|
|
659
985
|
e = ((n = t.defaultView) != null ? n : window).innerWidth - l.clientWidth;
|
|
660
986
|
}, after({ doc: t, d: n }) {
|
|
661
|
-
let l = t.documentElement, r = l.clientWidth - l.offsetWidth,
|
|
662
|
-
n.style(l, "paddingRight", `${
|
|
987
|
+
let l = t.documentElement, r = l.clientWidth - l.offsetWidth, o = e - r;
|
|
988
|
+
n.style(l, "paddingRight", `${o}px`);
|
|
663
989
|
} };
|
|
664
990
|
}
|
|
665
|
-
function
|
|
666
|
-
return
|
|
991
|
+
function nr() {
|
|
992
|
+
return vn() ? { before({ doc: e, d: t, meta: n }) {
|
|
667
993
|
function l(r) {
|
|
668
|
-
return n.containers.flatMap((
|
|
994
|
+
return n.containers.flatMap((o) => o()).some((o) => o.contains(r));
|
|
669
995
|
}
|
|
670
996
|
t.microTask(() => {
|
|
671
997
|
var r;
|
|
672
998
|
if (window.getComputedStyle(e.documentElement).scrollBehavior !== "auto") {
|
|
673
|
-
let
|
|
674
|
-
|
|
999
|
+
let a = Ye();
|
|
1000
|
+
a.style(e.documentElement, "scrollBehavior", "auto"), t.add(() => t.microTask(() => a.dispose()));
|
|
675
1001
|
}
|
|
676
|
-
let
|
|
677
|
-
t.addEventListener(e, "click", (
|
|
678
|
-
if (
|
|
679
|
-
let
|
|
680
|
-
if (!
|
|
681
|
-
let { hash:
|
|
682
|
-
|
|
1002
|
+
let o = (r = window.scrollY) != null ? r : window.pageYOffset, i = null;
|
|
1003
|
+
t.addEventListener(e, "click", (a) => {
|
|
1004
|
+
if (a.target instanceof HTMLElement) try {
|
|
1005
|
+
let c = a.target.closest("a");
|
|
1006
|
+
if (!c) return;
|
|
1007
|
+
let { hash: s } = new URL(c.href), u = e.querySelector(s);
|
|
1008
|
+
u && !l(u) && (i = u);
|
|
683
1009
|
} catch {
|
|
684
1010
|
}
|
|
685
|
-
}, !0), t.addEventListener(e, "touchstart", (
|
|
686
|
-
if (
|
|
687
|
-
let
|
|
688
|
-
for (;
|
|
689
|
-
t.style(
|
|
690
|
-
} else t.style(
|
|
691
|
-
}), t.addEventListener(e, "touchmove", (
|
|
692
|
-
if (
|
|
693
|
-
if (
|
|
694
|
-
if (l(
|
|
695
|
-
let
|
|
696
|
-
for (;
|
|
697
|
-
|
|
698
|
-
} else
|
|
1011
|
+
}, !0), t.addEventListener(e, "touchstart", (a) => {
|
|
1012
|
+
if (a.target instanceof HTMLElement) if (l(a.target)) {
|
|
1013
|
+
let c = a.target;
|
|
1014
|
+
for (; c.parentElement && l(c.parentElement); ) c = c.parentElement;
|
|
1015
|
+
t.style(c, "overscrollBehavior", "contain");
|
|
1016
|
+
} else t.style(a.target, "touchAction", "none");
|
|
1017
|
+
}), t.addEventListener(e, "touchmove", (a) => {
|
|
1018
|
+
if (a.target instanceof HTMLElement) {
|
|
1019
|
+
if (a.target.tagName === "INPUT") return;
|
|
1020
|
+
if (l(a.target)) {
|
|
1021
|
+
let c = a.target;
|
|
1022
|
+
for (; c.parentElement && c.dataset.headlessuiPortal !== "" && !(c.scrollHeight > c.clientHeight || c.scrollWidth > c.clientWidth); ) c = c.parentElement;
|
|
1023
|
+
c.dataset.headlessuiPortal === "" && a.preventDefault();
|
|
1024
|
+
} else a.preventDefault();
|
|
699
1025
|
}
|
|
700
1026
|
}, { passive: !1 }), t.add(() => {
|
|
701
|
-
var
|
|
702
|
-
let
|
|
703
|
-
|
|
1027
|
+
var a;
|
|
1028
|
+
let c = (a = window.scrollY) != null ? a : window.pageYOffset;
|
|
1029
|
+
o !== c && window.scrollTo(0, o), i && i.isConnected && (i.scrollIntoView({ block: "nearest" }), i = null);
|
|
704
1030
|
});
|
|
705
1031
|
});
|
|
706
1032
|
} } : {};
|
|
707
1033
|
}
|
|
708
|
-
function
|
|
1034
|
+
function lr() {
|
|
709
1035
|
return { before({ doc: e, d: t }) {
|
|
710
1036
|
t.style(e.documentElement, "overflow", "hidden");
|
|
711
1037
|
} };
|
|
712
1038
|
}
|
|
713
|
-
function
|
|
1039
|
+
function rr(e) {
|
|
714
1040
|
let t = {};
|
|
715
1041
|
for (let n of e) Object.assign(t, n(t));
|
|
716
1042
|
return t;
|
|
717
1043
|
}
|
|
718
|
-
let
|
|
1044
|
+
let Oe = er(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
|
|
719
1045
|
var n;
|
|
720
|
-
let l = (n = this.get(e)) != null ? n : { doc: e, count: 0, d:
|
|
1046
|
+
let l = (n = this.get(e)) != null ? n : { doc: e, count: 0, d: Ye(), meta: /* @__PURE__ */ new Set() };
|
|
721
1047
|
return l.count++, l.meta.add(t), this.set(e, l), this;
|
|
722
1048
|
}, POP(e, t) {
|
|
723
1049
|
let n = this.get(e);
|
|
724
1050
|
return n && (n.count--, n.meta.delete(t)), this;
|
|
725
1051
|
}, SCROLL_PREVENT({ doc: e, d: t, meta: n }) {
|
|
726
|
-
let l = { doc: e, d: t, meta:
|
|
727
|
-
r.forEach(({ before:
|
|
1052
|
+
let l = { doc: e, d: t, meta: rr(n) }, r = [nr(), tr(), lr()];
|
|
1053
|
+
r.forEach(({ before: o }) => o == null ? void 0 : o(l)), r.forEach(({ after: o }) => o == null ? void 0 : o(l));
|
|
728
1054
|
}, SCROLL_ALLOW({ d: e }) {
|
|
729
1055
|
e.dispose();
|
|
730
1056
|
}, TEARDOWN({ doc: e }) {
|
|
731
1057
|
this.delete(e);
|
|
732
1058
|
} });
|
|
733
|
-
|
|
734
|
-
let e =
|
|
1059
|
+
Oe.subscribe(() => {
|
|
1060
|
+
let e = Oe.getSnapshot(), t = /* @__PURE__ */ new Map();
|
|
735
1061
|
for (let [n] of e) t.set(n, n.documentElement.style.overflow);
|
|
736
1062
|
for (let n of e.values()) {
|
|
737
1063
|
let l = t.get(n.doc) === "hidden", r = n.count !== 0;
|
|
738
|
-
(r && !l || !r && l) &&
|
|
1064
|
+
(r && !l || !r && l) && Oe.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && Oe.dispatch("TEARDOWN", n);
|
|
739
1065
|
}
|
|
740
1066
|
});
|
|
741
|
-
function
|
|
742
|
-
let l =
|
|
743
|
-
let
|
|
744
|
-
return
|
|
1067
|
+
function or(e, t, n) {
|
|
1068
|
+
let l = _l(Oe), r = b(() => {
|
|
1069
|
+
let o = e.value ? l.value.get(e.value) : void 0;
|
|
1070
|
+
return o ? o.count > 0 : !1;
|
|
745
1071
|
});
|
|
746
|
-
return
|
|
747
|
-
if (!
|
|
748
|
-
|
|
749
|
-
let
|
|
750
|
-
|
|
751
|
-
|
|
1072
|
+
return de([e, t], ([o, i], [a], c) => {
|
|
1073
|
+
if (!o || !i) return;
|
|
1074
|
+
Oe.dispatch("PUSH", o, n);
|
|
1075
|
+
let s = !1;
|
|
1076
|
+
c(() => {
|
|
1077
|
+
s || (Oe.dispatch("POP", a ?? o, n), s = !0);
|
|
752
1078
|
});
|
|
753
1079
|
}, { immediate: !0 }), r;
|
|
754
1080
|
}
|
|
755
|
-
let
|
|
756
|
-
function
|
|
757
|
-
|
|
1081
|
+
let gt = /* @__PURE__ */ new Map(), je = /* @__PURE__ */ new Map();
|
|
1082
|
+
function Qt(e, t = $(!0)) {
|
|
1083
|
+
te((n) => {
|
|
758
1084
|
var l;
|
|
759
1085
|
if (!t.value) return;
|
|
760
|
-
let r =
|
|
1086
|
+
let r = D(e);
|
|
761
1087
|
if (!r) return;
|
|
762
1088
|
n(function() {
|
|
763
1089
|
var i;
|
|
764
1090
|
if (!r) return;
|
|
765
|
-
let
|
|
766
|
-
if (
|
|
767
|
-
let
|
|
768
|
-
|
|
1091
|
+
let a = (i = je.get(r)) != null ? i : 1;
|
|
1092
|
+
if (a === 1 ? je.delete(r) : je.set(r, a - 1), a !== 1) return;
|
|
1093
|
+
let c = gt.get(r);
|
|
1094
|
+
c && (c["aria-hidden"] === null ? r.removeAttribute("aria-hidden") : r.setAttribute("aria-hidden", c["aria-hidden"]), r.inert = c.inert, gt.delete(r));
|
|
769
1095
|
});
|
|
770
|
-
let
|
|
771
|
-
|
|
1096
|
+
let o = (l = je.get(r)) != null ? l : 0;
|
|
1097
|
+
je.set(r, o + 1), o === 0 && (gt.set(r, { "aria-hidden": r.getAttribute("aria-hidden"), inert: r.inert }), r.setAttribute("aria-hidden", "true"), r.inert = !0);
|
|
772
1098
|
});
|
|
773
1099
|
}
|
|
774
|
-
function
|
|
775
|
-
let l =
|
|
776
|
-
function
|
|
777
|
-
var i,
|
|
778
|
-
let
|
|
779
|
-
for (let
|
|
780
|
-
if (t != null && t.value) for (let
|
|
781
|
-
for (let
|
|
782
|
-
return
|
|
783
|
-
}
|
|
784
|
-
return { resolveContainers:
|
|
785
|
-
return
|
|
1100
|
+
function ir({ defaultContainers: e = [], portals: t, mainTreeNodeRef: n } = {}) {
|
|
1101
|
+
let l = $(null), r = Be(l);
|
|
1102
|
+
function o() {
|
|
1103
|
+
var i, a, c;
|
|
1104
|
+
let s = [];
|
|
1105
|
+
for (let u of e) u !== null && (u instanceof HTMLElement ? s.push(u) : "value" in u && u.value instanceof HTMLElement && s.push(u.value));
|
|
1106
|
+
if (t != null && t.value) for (let u of t.value) s.push(u);
|
|
1107
|
+
for (let u of (i = r == null ? void 0 : r.querySelectorAll("html > *, body > *")) != null ? i : []) u !== document.body && u !== document.head && u instanceof HTMLElement && u.id !== "headlessui-portal-root" && (u.contains(D(l)) || u.contains((c = (a = D(l)) == null ? void 0 : a.getRootNode()) == null ? void 0 : c.host) || s.some((d) => u.contains(d)) || s.push(u));
|
|
1108
|
+
return s;
|
|
1109
|
+
}
|
|
1110
|
+
return { resolveContainers: o, contains(i) {
|
|
1111
|
+
return o().some((a) => a.contains(i));
|
|
786
1112
|
}, mainTreeNodeRef: l, MainTreeNode() {
|
|
787
|
-
return n != null ? null :
|
|
1113
|
+
return n != null ? null : N(it, { features: We.Hidden, ref: l });
|
|
788
1114
|
} };
|
|
789
1115
|
}
|
|
790
|
-
let
|
|
791
|
-
function
|
|
792
|
-
return
|
|
1116
|
+
let $n = Symbol("ForcePortalRootContext");
|
|
1117
|
+
function ar() {
|
|
1118
|
+
return Y($n, !1);
|
|
793
1119
|
}
|
|
794
|
-
let
|
|
795
|
-
return
|
|
1120
|
+
let wt = I({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: !1 } }, setup(e, { slots: t, attrs: n }) {
|
|
1121
|
+
return ie($n, e.force), () => {
|
|
796
1122
|
let { force: l, ...r } = e;
|
|
797
|
-
return
|
|
1123
|
+
return W({ theirProps: r, ourProps: {}, slot: {}, slots: t, attrs: n, name: "ForcePortalRoot" });
|
|
798
1124
|
};
|
|
799
|
-
} }),
|
|
800
|
-
var
|
|
801
|
-
function
|
|
802
|
-
return
|
|
1125
|
+
} }), Sn = Symbol("StackContext");
|
|
1126
|
+
var xt = ((e) => (e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e))(xt || {});
|
|
1127
|
+
function sr() {
|
|
1128
|
+
return Y(Sn, () => {
|
|
803
1129
|
});
|
|
804
1130
|
}
|
|
805
|
-
function
|
|
806
|
-
let r =
|
|
807
|
-
function
|
|
1131
|
+
function ur({ type: e, enabled: t, element: n, onUpdate: l }) {
|
|
1132
|
+
let r = sr();
|
|
1133
|
+
function o(...i) {
|
|
808
1134
|
l == null || l(...i), r(...i);
|
|
809
1135
|
}
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
i ?
|
|
1136
|
+
V(() => {
|
|
1137
|
+
de(t, (i, a) => {
|
|
1138
|
+
i ? o(0, e, n) : a === !0 && o(1, e, n);
|
|
813
1139
|
}, { immediate: !0, flush: "sync" });
|
|
814
|
-
}),
|
|
815
|
-
t.value &&
|
|
816
|
-
}),
|
|
1140
|
+
}), ae(() => {
|
|
1141
|
+
t.value && o(1, e, n);
|
|
1142
|
+
}), ie(Sn, o);
|
|
817
1143
|
}
|
|
818
|
-
let
|
|
819
|
-
function
|
|
820
|
-
let e =
|
|
1144
|
+
let En = Symbol("DescriptionContext");
|
|
1145
|
+
function cr() {
|
|
1146
|
+
let e = Y(En, null);
|
|
821
1147
|
if (e === null) throw new Error("Missing parent");
|
|
822
1148
|
return e;
|
|
823
1149
|
}
|
|
824
|
-
function On({ slot: e =
|
|
825
|
-
let l =
|
|
826
|
-
function r(
|
|
827
|
-
return l.value.push(
|
|
828
|
-
let i = l.value.indexOf(
|
|
1150
|
+
function On({ slot: e = $({}), name: t = "Description", props: n = {} } = {}) {
|
|
1151
|
+
let l = $([]);
|
|
1152
|
+
function r(o) {
|
|
1153
|
+
return l.value.push(o), () => {
|
|
1154
|
+
let i = l.value.indexOf(o);
|
|
829
1155
|
i !== -1 && l.value.splice(i, 1);
|
|
830
1156
|
};
|
|
831
1157
|
}
|
|
832
|
-
return
|
|
1158
|
+
return ie(En, { register: r, slot: e, name: t, props: n }), b(() => l.value.length > 0 ? l.value.join(" ") : void 0);
|
|
833
1159
|
}
|
|
834
|
-
|
|
1160
|
+
I({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
835
1161
|
var l;
|
|
836
|
-
let r = (l = e.id) != null ? l : `headlessui-description-${
|
|
837
|
-
return
|
|
838
|
-
let { name: i = "Description", slot:
|
|
839
|
-
return
|
|
1162
|
+
let r = (l = e.id) != null ? l : `headlessui-description-${ye()}`, o = cr();
|
|
1163
|
+
return V(() => ae(o.register(r))), () => {
|
|
1164
|
+
let { name: i = "Description", slot: a = $({}), props: c = {} } = o, { ...s } = e, u = { ...Object.entries(c).reduce((d, [f, v]) => Object.assign(d, { [f]: S(v) }), {}), id: r };
|
|
1165
|
+
return W({ ourProps: u, theirProps: s, slot: a.value, attrs: t, slots: n, name: i });
|
|
840
1166
|
};
|
|
841
1167
|
} });
|
|
842
|
-
function
|
|
843
|
-
let t =
|
|
1168
|
+
function dr(e) {
|
|
1169
|
+
let t = Be(e);
|
|
844
1170
|
if (!t) {
|
|
845
1171
|
if (e === null) return null;
|
|
846
1172
|
throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`);
|
|
@@ -850,324 +1176,408 @@ function Fn(e) {
|
|
|
850
1176
|
let l = t.createElement("div");
|
|
851
1177
|
return l.setAttribute("id", "headlessui-portal-root"), t.body.appendChild(l);
|
|
852
1178
|
}
|
|
853
|
-
const
|
|
854
|
-
function
|
|
1179
|
+
const $t = /* @__PURE__ */ new WeakMap();
|
|
1180
|
+
function fr(e) {
|
|
855
1181
|
var t;
|
|
856
|
-
return (t =
|
|
857
|
-
}
|
|
858
|
-
function
|
|
859
|
-
let n = t(
|
|
860
|
-
return n <= 0 ?
|
|
861
|
-
}
|
|
862
|
-
let
|
|
863
|
-
let l =
|
|
864
|
-
|
|
865
|
-
let
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
}),
|
|
869
|
-
|
|
1182
|
+
return (t = $t.get(e)) != null ? t : 0;
|
|
1183
|
+
}
|
|
1184
|
+
function Jt(e, t) {
|
|
1185
|
+
let n = t(fr(e));
|
|
1186
|
+
return n <= 0 ? $t.delete(e) : $t.set(e, n), n;
|
|
1187
|
+
}
|
|
1188
|
+
let Ln = I({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: n }) {
|
|
1189
|
+
let l = $(null), r = b(() => Be(l)), o = ar(), i = Y(Tn, null), a = $(o === !0 || i == null ? dr(l.value) : i.resolveTarget());
|
|
1190
|
+
a.value && Jt(a.value, (f) => f + 1);
|
|
1191
|
+
let c = $(!1);
|
|
1192
|
+
V(() => {
|
|
1193
|
+
c.value = !0;
|
|
1194
|
+
}), te(() => {
|
|
1195
|
+
o || i != null && (a.value = i.resolveTarget());
|
|
870
1196
|
});
|
|
871
|
-
let
|
|
872
|
-
return
|
|
873
|
-
if (
|
|
874
|
-
let
|
|
875
|
-
|
|
876
|
-
}),
|
|
877
|
-
var
|
|
878
|
-
let
|
|
879
|
-
!
|
|
1197
|
+
let s = Y(St, null), u = !1, d = Xn();
|
|
1198
|
+
return de(l, () => {
|
|
1199
|
+
if (u || !s) return;
|
|
1200
|
+
let f = D(l);
|
|
1201
|
+
f && (ae(s.register(f), d), u = !0);
|
|
1202
|
+
}), ae(() => {
|
|
1203
|
+
var f, v;
|
|
1204
|
+
let p = (f = r.value) == null ? void 0 : f.getElementById("headlessui-portal-root");
|
|
1205
|
+
!p || a.value !== p || Jt(a.value, (m) => m - 1) || a.value.children.length > 0 || (v = a.value.parentElement) == null || v.removeChild(a.value);
|
|
880
1206
|
}), () => {
|
|
881
|
-
if (!
|
|
882
|
-
let
|
|
883
|
-
return
|
|
1207
|
+
if (!c.value || a.value === null) return null;
|
|
1208
|
+
let f = { ref: l, "data-headlessui-portal": "" };
|
|
1209
|
+
return N(Zn, { to: a.value }, W({ ourProps: f, theirProps: e, slot: {}, attrs: n, slots: t, name: "Portal" }));
|
|
884
1210
|
};
|
|
885
|
-
} }),
|
|
886
|
-
function
|
|
887
|
-
let e =
|
|
888
|
-
function n(
|
|
889
|
-
return t.value.push(
|
|
1211
|
+
} }), St = Symbol("PortalParentContext");
|
|
1212
|
+
function vr() {
|
|
1213
|
+
let e = Y(St, null), t = $([]);
|
|
1214
|
+
function n(o) {
|
|
1215
|
+
return t.value.push(o), e && e.register(o), () => l(o);
|
|
890
1216
|
}
|
|
891
|
-
function l(
|
|
892
|
-
let i = t.value.indexOf(
|
|
893
|
-
i !== -1 && t.value.splice(i, 1), e && e.unregister(
|
|
1217
|
+
function l(o) {
|
|
1218
|
+
let i = t.value.indexOf(o);
|
|
1219
|
+
i !== -1 && t.value.splice(i, 1), e && e.unregister(o);
|
|
894
1220
|
}
|
|
895
1221
|
let r = { register: n, unregister: l, portals: t };
|
|
896
|
-
return [t,
|
|
897
|
-
return
|
|
898
|
-
var
|
|
899
|
-
return (
|
|
1222
|
+
return [t, I({ name: "PortalWrapper", setup(o, { slots: i }) {
|
|
1223
|
+
return ie(St, r), () => {
|
|
1224
|
+
var a;
|
|
1225
|
+
return (a = i.default) == null ? void 0 : a.call(i);
|
|
900
1226
|
};
|
|
901
1227
|
} })];
|
|
902
1228
|
}
|
|
903
|
-
let
|
|
904
|
-
let l =
|
|
1229
|
+
let Tn = Symbol("PortalGroupContext"), pr = I({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
1230
|
+
let l = Qn({ resolveTarget() {
|
|
905
1231
|
return e.target;
|
|
906
1232
|
} });
|
|
907
|
-
return
|
|
908
|
-
let { target: r, ...
|
|
909
|
-
return
|
|
1233
|
+
return ie(Tn, l), () => {
|
|
1234
|
+
let { target: r, ...o } = e;
|
|
1235
|
+
return W({ theirProps: o, ourProps: {}, slot: {}, attrs: t, slots: n, name: "PortalGroup" });
|
|
910
1236
|
};
|
|
911
1237
|
} });
|
|
912
|
-
var
|
|
913
|
-
let
|
|
914
|
-
function
|
|
915
|
-
let t =
|
|
1238
|
+
var mr = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(mr || {});
|
|
1239
|
+
let Et = Symbol("DialogContext");
|
|
1240
|
+
function Ge(e) {
|
|
1241
|
+
let t = Y(Et, null);
|
|
916
1242
|
if (t === null) {
|
|
917
1243
|
let n = new Error(`<${e} /> is missing a parent <Dialog /> component.`);
|
|
918
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
1244
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, Ge), n;
|
|
919
1245
|
}
|
|
920
1246
|
return t;
|
|
921
1247
|
}
|
|
922
|
-
let
|
|
923
|
-
var
|
|
924
|
-
let
|
|
925
|
-
|
|
926
|
-
|
|
1248
|
+
let _e = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Cn = I({ 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: _e }, 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 }) {
|
|
1249
|
+
var o, i;
|
|
1250
|
+
let a = (o = e.id) != null ? o : `headlessui-dialog-${ye()}`, c = $(!1);
|
|
1251
|
+
V(() => {
|
|
1252
|
+
c.value = !0;
|
|
927
1253
|
});
|
|
928
|
-
let
|
|
929
|
-
if (r({ el:
|
|
930
|
-
if (typeof
|
|
931
|
-
let
|
|
932
|
-
var
|
|
933
|
-
return (
|
|
934
|
-
})] }),
|
|
935
|
-
var
|
|
936
|
-
return (
|
|
1254
|
+
let s = !1, u = b(() => e.role === "dialog" || e.role === "alertdialog" ? e.role : (s || (s = !0, console.warn(`Invalid role [${u}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog")), d = $(0), f = Dt(), v = b(() => e.open === _e && f !== null ? (f.value & Q.Open) === Q.Open : e.open), p = $(null), m = b(() => Be(p));
|
|
1255
|
+
if (r({ el: p, $el: p }), !(e.open !== _e || f !== null)) throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
|
|
1256
|
+
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 === _e ? void 0 : e.open}`);
|
|
1257
|
+
let h = b(() => c.value && v.value ? 0 : 1), y = b(() => h.value === 0), g = b(() => d.value > 1), w = Y(Et, null) !== null, [T, L] = vr(), { resolveContainers: P, mainTreeNodeRef: O, MainTreeNode: R } = ir({ portals: T, defaultContainers: [b(() => {
|
|
1258
|
+
var A;
|
|
1259
|
+
return (A = ce.panelRef.value) != null ? A : p.value;
|
|
1260
|
+
})] }), U = b(() => g.value ? "parent" : "leaf"), F = b(() => f !== null ? (f.value & Q.Closing) === Q.Closing : !1), z = b(() => w || F.value ? !1 : y.value), K = b(() => {
|
|
1261
|
+
var A, B, ne;
|
|
1262
|
+
return (ne = Array.from((B = (A = m.value) == null ? void 0 : A.querySelectorAll("body > *")) != null ? B : []).find((le) => le.id === "headlessui-portal-root" ? !1 : le.contains(D(O)) && le instanceof HTMLElement)) != null ? ne : null;
|
|
937
1263
|
});
|
|
938
|
-
|
|
939
|
-
let
|
|
940
|
-
var
|
|
941
|
-
return (
|
|
1264
|
+
Qt(K, z);
|
|
1265
|
+
let j = b(() => g.value ? !0 : y.value), G = b(() => {
|
|
1266
|
+
var A, B, ne;
|
|
1267
|
+
return (ne = Array.from((B = (A = m.value) == null ? void 0 : A.querySelectorAll("[data-headlessui-portal]")) != null ? B : []).find((le) => le.contains(D(O)) && le instanceof HTMLElement)) != null ? ne : null;
|
|
942
1268
|
});
|
|
943
|
-
|
|
944
|
-
if (
|
|
1269
|
+
Qt(G, j), ur({ type: "Dialog", enabled: b(() => h.value === 0), element: p, onUpdate: (A, B) => {
|
|
1270
|
+
if (B === "Dialog") return pe(A, { [xt.Add]: () => d.value += 1, [xt.Remove]: () => d.value -= 1 });
|
|
945
1271
|
} });
|
|
946
|
-
let
|
|
947
|
-
|
|
1272
|
+
let X = On({ name: "DialogDescription", slot: b(() => ({ open: v.value })) }), Z = $(null), ce = { titleId: Z, panelRef: $(null), dialogState: h, setTitleId(A) {
|
|
1273
|
+
Z.value !== A && (Z.value = A);
|
|
948
1274
|
}, close() {
|
|
949
1275
|
t("close", !1);
|
|
950
1276
|
} };
|
|
951
|
-
|
|
952
|
-
let
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
},
|
|
956
|
-
let
|
|
957
|
-
|
|
958
|
-
|
|
1277
|
+
ie(Et, ce);
|
|
1278
|
+
let zt = b(() => !(!y.value || g.value));
|
|
1279
|
+
Vl(P, (A, B) => {
|
|
1280
|
+
A.preventDefault(), ce.close(), Jn(() => B == null ? void 0 : B.focus());
|
|
1281
|
+
}, zt);
|
|
1282
|
+
let qt = b(() => !(g.value || h.value !== 0));
|
|
1283
|
+
yn((i = m.value) == null ? void 0 : i.defaultView, "keydown", (A) => {
|
|
1284
|
+
qt.value && (A.defaultPrevented || A.key === at.Escape && (A.preventDefault(), A.stopPropagation(), ce.close()));
|
|
959
1285
|
});
|
|
960
|
-
let
|
|
961
|
-
return
|
|
962
|
-
var
|
|
963
|
-
return { containers: [...(
|
|
964
|
-
}),
|
|
965
|
-
if (
|
|
966
|
-
let
|
|
967
|
-
if (!
|
|
968
|
-
let
|
|
969
|
-
for (let
|
|
970
|
-
let
|
|
971
|
-
|
|
1286
|
+
let Yt = b(() => !(F.value || h.value !== 0 || w));
|
|
1287
|
+
return or(m, Yt, (A) => {
|
|
1288
|
+
var B;
|
|
1289
|
+
return { containers: [...(B = A.containers) != null ? B : [], P] };
|
|
1290
|
+
}), te((A) => {
|
|
1291
|
+
if (h.value !== 0) return;
|
|
1292
|
+
let B = D(p);
|
|
1293
|
+
if (!B) return;
|
|
1294
|
+
let ne = new ResizeObserver((le) => {
|
|
1295
|
+
for (let pt of le) {
|
|
1296
|
+
let Qe = pt.target.getBoundingClientRect();
|
|
1297
|
+
Qe.x === 0 && Qe.y === 0 && Qe.width === 0 && Qe.height === 0 && ce.close();
|
|
972
1298
|
}
|
|
973
1299
|
});
|
|
974
|
-
|
|
1300
|
+
ne.observe(B), A(() => ne.disconnect());
|
|
975
1301
|
}), () => {
|
|
976
|
-
let { open:
|
|
977
|
-
return
|
|
1302
|
+
let { open: A, initialFocus: B, ...ne } = e, le = { ...n, ref: p, id: a, role: u.value, "aria-modal": h.value === 0 ? !0 : void 0, "aria-labelledby": Z.value, "aria-describedby": X.value }, pt = { open: h.value === 0 };
|
|
1303
|
+
return N(wt, { force: !0 }, () => [N(Ln, () => N(pr, { target: p.value }, () => N(wt, { force: !1 }, () => N(Ne, { initialFocus: B, containers: P, features: y.value ? pe(U.value, { parent: Ne.features.RestoreFocus, leaf: Ne.features.All & ~Ne.features.FocusLock }) : Ne.features.None }, () => N(L, {}, () => W({ ourProps: le, theirProps: { ...ne, ...n }, slot: pt, attrs: n, slots: l, visible: h.value === 0, features: ot.RenderStrategy | ot.Static, name: "Dialog" })))))), N(R)]);
|
|
978
1304
|
};
|
|
979
1305
|
} });
|
|
980
|
-
|
|
1306
|
+
I({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
981
1307
|
var l;
|
|
982
|
-
let r = (l = e.id) != null ? l : `headlessui-dialog-overlay-${
|
|
983
|
-
function i(
|
|
984
|
-
|
|
1308
|
+
let r = (l = e.id) != null ? l : `headlessui-dialog-overlay-${ye()}`, o = Ge("DialogOverlay");
|
|
1309
|
+
function i(a) {
|
|
1310
|
+
a.target === a.currentTarget && (a.preventDefault(), a.stopPropagation(), o.close());
|
|
985
1311
|
}
|
|
986
1312
|
return () => {
|
|
987
|
-
let { ...
|
|
988
|
-
return
|
|
1313
|
+
let { ...a } = e;
|
|
1314
|
+
return W({ ourProps: { id: r, "aria-hidden": !0, onClick: i }, theirProps: a, slot: { open: o.dialogState.value === 0 }, attrs: t, slots: n, name: "DialogOverlay" });
|
|
989
1315
|
};
|
|
990
1316
|
} });
|
|
991
|
-
|
|
1317
|
+
I({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, inheritAttrs: !1, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
992
1318
|
var r;
|
|
993
|
-
let
|
|
994
|
-
return l({ el:
|
|
1319
|
+
let o = (r = e.id) != null ? r : `headlessui-dialog-backdrop-${ye()}`, i = Ge("DialogBackdrop"), a = $(null);
|
|
1320
|
+
return l({ el: a, $el: a }), V(() => {
|
|
995
1321
|
if (i.panelRef.value === null) throw new Error("A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.");
|
|
996
1322
|
}), () => {
|
|
997
|
-
let { ...
|
|
998
|
-
return
|
|
1323
|
+
let { ...c } = e, s = { id: o, ref: a, "aria-hidden": !0 };
|
|
1324
|
+
return N(wt, { force: !0 }, () => N(Ln, () => W({ ourProps: s, theirProps: { ...t, ...c }, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: n, name: "DialogBackdrop" })));
|
|
999
1325
|
};
|
|
1000
1326
|
} });
|
|
1001
|
-
let
|
|
1327
|
+
let An = I({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
1002
1328
|
var r;
|
|
1003
|
-
let
|
|
1329
|
+
let o = (r = e.id) != null ? r : `headlessui-dialog-panel-${ye()}`, i = Ge("DialogPanel");
|
|
1004
1330
|
l({ el: i.panelRef, $el: i.panelRef });
|
|
1005
|
-
function
|
|
1006
|
-
|
|
1331
|
+
function a(c) {
|
|
1332
|
+
c.stopPropagation();
|
|
1007
1333
|
}
|
|
1008
1334
|
return () => {
|
|
1009
|
-
let { ...
|
|
1010
|
-
return
|
|
1335
|
+
let { ...c } = e, s = { id: o, ref: i.panelRef, onClick: a };
|
|
1336
|
+
return W({ ourProps: s, theirProps: c, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: n, name: "DialogPanel" });
|
|
1011
1337
|
};
|
|
1012
|
-
} }),
|
|
1338
|
+
} }), kn = I({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
1013
1339
|
var l;
|
|
1014
|
-
let r = (l = e.id) != null ? l : `headlessui-dialog-title-${
|
|
1015
|
-
return
|
|
1016
|
-
|
|
1340
|
+
let r = (l = e.id) != null ? l : `headlessui-dialog-title-${ye()}`, o = Ge("DialogTitle");
|
|
1341
|
+
return V(() => {
|
|
1342
|
+
o.setTitleId(r), ae(() => o.setTitleId(null));
|
|
1017
1343
|
}), () => {
|
|
1018
1344
|
let { ...i } = e;
|
|
1019
|
-
return
|
|
1345
|
+
return W({ ourProps: { id: r }, theirProps: i, slot: { open: o.dialogState.value === 0 }, attrs: t, slots: n, name: "DialogTitle" });
|
|
1020
1346
|
};
|
|
1021
|
-
} });
|
|
1022
|
-
function
|
|
1347
|
+
} }), Pn = Symbol("LabelContext");
|
|
1348
|
+
function Dn() {
|
|
1349
|
+
let e = Y(Pn, null);
|
|
1350
|
+
if (e === null) {
|
|
1351
|
+
let t = new Error("You used a <Label /> component, but it is not inside a parent.");
|
|
1352
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t, Dn), t;
|
|
1353
|
+
}
|
|
1354
|
+
return e;
|
|
1355
|
+
}
|
|
1356
|
+
function gr({ slot: e = {}, name: t = "Label", props: n = {} } = {}) {
|
|
1357
|
+
let l = $([]);
|
|
1358
|
+
function r(o) {
|
|
1359
|
+
return l.value.push(o), () => {
|
|
1360
|
+
let i = l.value.indexOf(o);
|
|
1361
|
+
i !== -1 && l.value.splice(i, 1);
|
|
1362
|
+
};
|
|
1363
|
+
}
|
|
1364
|
+
return ie(Pn, { register: r, slot: e, name: t, props: n }), b(() => l.value.length > 0 ? l.value.join(" ") : void 0);
|
|
1365
|
+
}
|
|
1366
|
+
let hr = I({ 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 }) {
|
|
1367
|
+
var l;
|
|
1368
|
+
let r = (l = e.id) != null ? l : `headlessui-label-${ye()}`, o = Dn();
|
|
1369
|
+
return V(() => ae(o.register(r))), () => {
|
|
1370
|
+
let { name: i = "Label", slot: a = {}, props: c = {} } = o, { passive: s, ...u } = e, d = { ...Object.entries(c).reduce((f, [v, p]) => Object.assign(f, { [v]: S(p) }), {}), id: r };
|
|
1371
|
+
return s && (delete d.onClick, delete d.htmlFor, delete u.onClick), W({ ourProps: d, theirProps: u, slot: a, attrs: n, slots: t, name: i });
|
|
1372
|
+
};
|
|
1373
|
+
} }), Rn = Symbol("GroupContext"), yr = I({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: n }) {
|
|
1374
|
+
let l = $(null), r = gr({ name: "SwitchLabel", props: { htmlFor: b(() => {
|
|
1375
|
+
var i;
|
|
1376
|
+
return (i = l.value) == null ? void 0 : i.id;
|
|
1377
|
+
}), onClick(i) {
|
|
1378
|
+
l.value && (i.currentTarget.tagName === "LABEL" && i.preventDefault(), l.value.click(), l.value.focus({ preventScroll: !0 }));
|
|
1379
|
+
} } }), o = On({ name: "SwitchDescription" });
|
|
1380
|
+
return ie(Rn, { switchRef: l, labelledby: r, describedby: o }), () => W({ theirProps: e, ourProps: {}, slot: {}, slots: t, attrs: n, name: "SwitchGroup" });
|
|
1381
|
+
} }), br = I({ 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 }) {
|
|
1382
|
+
var o;
|
|
1383
|
+
let i = (o = e.id) != null ? o : `headlessui-switch-${ye()}`, a = Y(Rn, null), [c, s] = Ol(b(() => e.modelValue), (g) => t("update:modelValue", g), b(() => e.defaultChecked));
|
|
1384
|
+
function u() {
|
|
1385
|
+
s(!c.value);
|
|
1386
|
+
}
|
|
1387
|
+
let d = $(null), f = a === null ? d : a.switchRef, v = Il(b(() => ({ as: e.as, type: n.type })), f);
|
|
1388
|
+
r({ el: f, $el: f });
|
|
1389
|
+
function p(g) {
|
|
1390
|
+
g.preventDefault(), u();
|
|
1391
|
+
}
|
|
1392
|
+
function m(g) {
|
|
1393
|
+
g.key === at.Space ? (g.preventDefault(), u()) : g.key === at.Enter && Kl(g.currentTarget);
|
|
1394
|
+
}
|
|
1395
|
+
function h(g) {
|
|
1396
|
+
g.preventDefault();
|
|
1397
|
+
}
|
|
1398
|
+
let y = b(() => {
|
|
1399
|
+
var g, w;
|
|
1400
|
+
return (w = (g = D(f)) == null ? void 0 : g.closest) == null ? void 0 : w.call(g, "form");
|
|
1401
|
+
});
|
|
1402
|
+
return V(() => {
|
|
1403
|
+
de([y], () => {
|
|
1404
|
+
if (!y.value || e.defaultChecked === void 0) return;
|
|
1405
|
+
function g() {
|
|
1406
|
+
s(e.defaultChecked);
|
|
1407
|
+
}
|
|
1408
|
+
return y.value.addEventListener("reset", g), () => {
|
|
1409
|
+
var w;
|
|
1410
|
+
(w = y.value) == null || w.removeEventListener("reset", g);
|
|
1411
|
+
};
|
|
1412
|
+
}, { immediate: !0 });
|
|
1413
|
+
}), () => {
|
|
1414
|
+
let { name: g, value: w, form: T, tabIndex: L, ...P } = e, O = { checked: c.value }, R = { id: i, ref: f, role: "switch", type: v.value, tabIndex: L === -1 ? 0 : L, "aria-checked": c.value, "aria-labelledby": a == null ? void 0 : a.labelledby.value, "aria-describedby": a == null ? void 0 : a.describedby.value, onClick: p, onKeyup: m, onKeypress: h };
|
|
1415
|
+
return N(Le, [g != null && c.value != null ? N(it, Wl({ features: We.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: c.value, form: T, disabled: P.disabled, name: g, value: w })) : null, W({ ourProps: R, theirProps: { ...n, ...Pt(P, ["modelValue", "defaultChecked"]) }, slot: O, attrs: n, slots: l, name: "Switch" })]);
|
|
1416
|
+
};
|
|
1417
|
+
} }), wr = hr;
|
|
1418
|
+
function xr(e) {
|
|
1023
1419
|
let t = { called: !1 };
|
|
1024
1420
|
return (...n) => {
|
|
1025
1421
|
if (!t.called) return t.called = !0, e(...n);
|
|
1026
1422
|
};
|
|
1027
1423
|
}
|
|
1028
|
-
function
|
|
1424
|
+
function ht(e, ...t) {
|
|
1029
1425
|
e && t.length > 0 && e.classList.add(...t);
|
|
1030
1426
|
}
|
|
1031
|
-
function
|
|
1427
|
+
function et(e, ...t) {
|
|
1032
1428
|
e && t.length > 0 && e.classList.remove(...t);
|
|
1033
1429
|
}
|
|
1034
|
-
var
|
|
1035
|
-
function
|
|
1036
|
-
let n =
|
|
1430
|
+
var Ot = ((e) => (e.Finished = "finished", e.Cancelled = "cancelled", e))(Ot || {});
|
|
1431
|
+
function $r(e, t) {
|
|
1432
|
+
let n = Ye();
|
|
1037
1433
|
if (!e) return n.dispose;
|
|
1038
|
-
let { transitionDuration: l, transitionDelay: r } = getComputedStyle(e), [
|
|
1039
|
-
let [
|
|
1040
|
-
return
|
|
1434
|
+
let { transitionDuration: l, transitionDelay: r } = getComputedStyle(e), [o, i] = [l, r].map((a) => {
|
|
1435
|
+
let [c = 0] = a.split(",").filter(Boolean).map((s) => s.includes("ms") ? parseFloat(s) : parseFloat(s) * 1e3).sort((s, u) => u - s);
|
|
1436
|
+
return c;
|
|
1041
1437
|
});
|
|
1042
|
-
return
|
|
1438
|
+
return o !== 0 ? n.setTimeout(() => t("finished"), o + i) : t("finished"), n.add(() => t("cancelled")), n.dispose;
|
|
1043
1439
|
}
|
|
1044
|
-
function
|
|
1045
|
-
let i =
|
|
1440
|
+
function _t(e, t, n, l, r, o) {
|
|
1441
|
+
let i = Ye(), a = o !== void 0 ? xr(o) : () => {
|
|
1046
1442
|
};
|
|
1047
|
-
return
|
|
1048
|
-
|
|
1049
|
-
}), i.add(() =>
|
|
1443
|
+
return et(e, ...r), ht(e, ...t, ...n), i.nextFrame(() => {
|
|
1444
|
+
et(e, ...n), ht(e, ...l), i.add($r(e, (c) => (et(e, ...l, ...t), ht(e, ...r), a(c))));
|
|
1445
|
+
}), i.add(() => et(e, ...t, ...n, ...l, ...r)), i.add(() => a("cancelled")), i.dispose;
|
|
1050
1446
|
}
|
|
1051
|
-
function
|
|
1447
|
+
function Se(e = "") {
|
|
1052
1448
|
return e.split(/\s+/).filter((t) => t.length > 1);
|
|
1053
1449
|
}
|
|
1054
|
-
let
|
|
1055
|
-
var
|
|
1056
|
-
function
|
|
1057
|
-
return
|
|
1450
|
+
let Rt = Symbol("TransitionContext");
|
|
1451
|
+
var Sr = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(Sr || {});
|
|
1452
|
+
function Er() {
|
|
1453
|
+
return Y(Rt, null) !== null;
|
|
1058
1454
|
}
|
|
1059
|
-
function
|
|
1060
|
-
let e =
|
|
1455
|
+
function Or() {
|
|
1456
|
+
let e = Y(Rt, null);
|
|
1061
1457
|
if (e === null) throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1062
1458
|
return e;
|
|
1063
1459
|
}
|
|
1064
|
-
function
|
|
1065
|
-
let e =
|
|
1460
|
+
function Lr() {
|
|
1461
|
+
let e = Y(Ft, null);
|
|
1066
1462
|
if (e === null) throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1067
1463
|
return e;
|
|
1068
1464
|
}
|
|
1069
|
-
let
|
|
1070
|
-
function
|
|
1071
|
-
return "children" in e ?
|
|
1072
|
-
}
|
|
1073
|
-
function
|
|
1074
|
-
let t =
|
|
1075
|
-
|
|
1076
|
-
function l(
|
|
1077
|
-
let
|
|
1078
|
-
|
|
1079
|
-
t.value.splice(
|
|
1080
|
-
}, [
|
|
1081
|
-
t.value[
|
|
1082
|
-
} }), !
|
|
1083
|
-
}
|
|
1084
|
-
function r(
|
|
1085
|
-
let i = t.value.find(({ id:
|
|
1086
|
-
return i ? i.state !== "visible" && (i.state = "visible") : t.value.push({ id:
|
|
1465
|
+
let Ft = Symbol("NestingContext");
|
|
1466
|
+
function ct(e) {
|
|
1467
|
+
return "children" in e ? ct(e.children) : e.value.filter(({ state: t }) => t === "visible").length > 0;
|
|
1468
|
+
}
|
|
1469
|
+
function Fn(e) {
|
|
1470
|
+
let t = $([]), n = $(!1);
|
|
1471
|
+
V(() => n.value = !0), ae(() => n.value = !1);
|
|
1472
|
+
function l(o, i = we.Hidden) {
|
|
1473
|
+
let a = t.value.findIndex(({ id: c }) => c === o);
|
|
1474
|
+
a !== -1 && (pe(i, { [we.Unmount]() {
|
|
1475
|
+
t.value.splice(a, 1);
|
|
1476
|
+
}, [we.Hidden]() {
|
|
1477
|
+
t.value[a].state = "hidden";
|
|
1478
|
+
} }), !ct(t) && n.value && (e == null || e()));
|
|
1479
|
+
}
|
|
1480
|
+
function r(o) {
|
|
1481
|
+
let i = t.value.find(({ id: a }) => a === o);
|
|
1482
|
+
return i ? i.state !== "visible" && (i.state = "visible") : t.value.push({ id: o, state: "visible" }), () => l(o, we.Unmount);
|
|
1087
1483
|
}
|
|
1088
1484
|
return { children: t, register: r, unregister: l };
|
|
1089
1485
|
}
|
|
1090
|
-
let
|
|
1091
|
-
let
|
|
1486
|
+
let Bn = ot.RenderStrategy, Ue = I({ 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 }) {
|
|
1487
|
+
let o = $(0);
|
|
1092
1488
|
function i() {
|
|
1093
|
-
|
|
1489
|
+
o.value |= Q.Opening, t("beforeEnter");
|
|
1094
1490
|
}
|
|
1095
|
-
function
|
|
1096
|
-
|
|
1491
|
+
function a() {
|
|
1492
|
+
o.value &= ~Q.Opening, t("afterEnter");
|
|
1097
1493
|
}
|
|
1098
|
-
function
|
|
1099
|
-
|
|
1494
|
+
function c() {
|
|
1495
|
+
o.value |= Q.Closing, t("beforeLeave");
|
|
1100
1496
|
}
|
|
1101
|
-
function
|
|
1102
|
-
|
|
1497
|
+
function s() {
|
|
1498
|
+
o.value &= ~Q.Closing, t("afterLeave");
|
|
1103
1499
|
}
|
|
1104
|
-
if (!
|
|
1105
|
-
let
|
|
1106
|
-
r({ el:
|
|
1107
|
-
let { show:
|
|
1108
|
-
!
|
|
1500
|
+
if (!Er() && zl()) return () => N(Bt, { ...e, onBeforeEnter: i, onAfterEnter: a, onBeforeLeave: c, onAfterLeave: s }, l);
|
|
1501
|
+
let u = $(null), d = b(() => e.unmount ? we.Unmount : we.Hidden);
|
|
1502
|
+
r({ el: u, $el: u });
|
|
1503
|
+
let { show: f, appear: v } = Or(), { register: p, unregister: m } = Lr(), h = $(f.value ? "visible" : "hidden"), y = { value: !0 }, g = ye(), w = { value: !1 }, T = Fn(() => {
|
|
1504
|
+
!w.value && h.value !== "hidden" && (h.value = "hidden", m(g), s());
|
|
1109
1505
|
});
|
|
1110
|
-
|
|
1111
|
-
let
|
|
1112
|
-
|
|
1113
|
-
}),
|
|
1114
|
-
if (
|
|
1115
|
-
if (
|
|
1116
|
-
|
|
1506
|
+
V(() => {
|
|
1507
|
+
let j = p(g);
|
|
1508
|
+
ae(j);
|
|
1509
|
+
}), te(() => {
|
|
1510
|
+
if (d.value === we.Hidden && g) {
|
|
1511
|
+
if (f.value && h.value !== "visible") {
|
|
1512
|
+
h.value = "visible";
|
|
1117
1513
|
return;
|
|
1118
1514
|
}
|
|
1119
|
-
|
|
1515
|
+
pe(h.value, { hidden: () => m(g), visible: () => p(g) });
|
|
1120
1516
|
}
|
|
1121
1517
|
});
|
|
1122
|
-
let
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
if (
|
|
1126
|
-
let
|
|
1127
|
-
if (
|
|
1518
|
+
let L = Se(e.enter), P = Se(e.enterFrom), O = Se(e.enterTo), R = Se(e.entered), U = Se(e.leave), F = Se(e.leaveFrom), z = Se(e.leaveTo);
|
|
1519
|
+
V(() => {
|
|
1520
|
+
te(() => {
|
|
1521
|
+
if (h.value === "visible") {
|
|
1522
|
+
let j = D(u);
|
|
1523
|
+
if (j instanceof Comment && j.data === "") throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
1128
1524
|
}
|
|
1129
1525
|
});
|
|
1130
1526
|
});
|
|
1131
|
-
function
|
|
1132
|
-
let
|
|
1133
|
-
!
|
|
1134
|
-
|
|
1135
|
-
}) :
|
|
1136
|
-
|
|
1527
|
+
function K(j) {
|
|
1528
|
+
let G = y.value && !v.value, X = D(u);
|
|
1529
|
+
!X || !(X instanceof HTMLElement) || G || (w.value = !0, f.value && i(), f.value || c(), j(f.value ? _t(X, L, P, O, R, (Z) => {
|
|
1530
|
+
w.value = !1, Z === Ot.Finished && a();
|
|
1531
|
+
}) : _t(X, U, F, z, R, (Z) => {
|
|
1532
|
+
w.value = !1, Z === Ot.Finished && (ct(T) || (h.value = "hidden", m(g), s()));
|
|
1137
1533
|
})));
|
|
1138
1534
|
}
|
|
1139
|
-
return
|
|
1140
|
-
|
|
1141
|
-
|
|
1535
|
+
return V(() => {
|
|
1536
|
+
de([f], (j, G, X) => {
|
|
1537
|
+
K(X), y.value = !1;
|
|
1142
1538
|
}, { immediate: !0 });
|
|
1143
|
-
}),
|
|
1144
|
-
let { appear:
|
|
1145
|
-
return
|
|
1539
|
+
}), ie(Ft, T), ql(b(() => pe(h.value, { visible: Q.Open, hidden: Q.Closed }) | o.value)), () => {
|
|
1540
|
+
let { appear: j, show: G, enter: X, enterFrom: Z, enterTo: ce, entered: zt, leave: qt, leaveFrom: Yt, leaveTo: A, ...B } = e, ne = { ref: u }, le = { ...B, ...v.value && f.value && Ke.isServer ? { class: q([n.class, B.class, ...L, ...P]) } : {} };
|
|
1541
|
+
return W({ theirProps: le, ourProps: ne, slot: {}, slots: l, attrs: n, features: Bn, visible: h.value === "visible", name: "TransitionChild" });
|
|
1146
1542
|
};
|
|
1147
|
-
} }),
|
|
1148
|
-
let r =
|
|
1149
|
-
|
|
1150
|
-
if (![!0, !1].includes(
|
|
1543
|
+
} }), Tr = Ue, Bt = I({ 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 }) {
|
|
1544
|
+
let r = Dt(), o = b(() => e.show === null && r !== null ? (r.value & Q.Open) === Q.Open : e.show);
|
|
1545
|
+
te(() => {
|
|
1546
|
+
if (![!0, !1].includes(o.value)) throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.');
|
|
1151
1547
|
});
|
|
1152
|
-
let i =
|
|
1548
|
+
let i = $(o.value ? "visible" : "hidden"), a = Fn(() => {
|
|
1153
1549
|
i.value = "hidden";
|
|
1154
|
-
}),
|
|
1155
|
-
return
|
|
1156
|
-
|
|
1157
|
-
|
|
1550
|
+
}), c = $(!0), s = { show: o, appear: b(() => e.appear || !c.value) };
|
|
1551
|
+
return V(() => {
|
|
1552
|
+
te(() => {
|
|
1553
|
+
c.value = !1, o.value ? i.value = "visible" : ct(a) || (i.value = "hidden");
|
|
1158
1554
|
});
|
|
1159
|
-
}),
|
|
1160
|
-
let
|
|
1161
|
-
return
|
|
1555
|
+
}), ie(Ft, a), ie(Rt, s), () => {
|
|
1556
|
+
let u = Pt(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), d = { unmount: e.unmount };
|
|
1557
|
+
return W({ ourProps: { ...d, as: "template" }, theirProps: {}, slot: {}, slots: { ...l, default: () => [N(Tr, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...n, ...d, ...u }, l.default)] }, attrs: {}, features: Bn, visible: i.value === "visible", name: "Transition" });
|
|
1162
1558
|
};
|
|
1163
1559
|
} });
|
|
1164
|
-
|
|
1560
|
+
function Mn(e) {
|
|
1561
|
+
const t = $(null), n = $(!1), l = b(() => e.as === "form"), r = b(() => `${e.id}-title`), o = b(() => `${e.id}-content`), i = b(() => {
|
|
1562
|
+
var a;
|
|
1563
|
+
return (a = t.value) == null ? void 0 : a.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
1564
|
+
});
|
|
1565
|
+
return {
|
|
1566
|
+
contentRef: t,
|
|
1567
|
+
ready: n,
|
|
1568
|
+
isForm: l,
|
|
1569
|
+
titleId: r,
|
|
1570
|
+
descriptionId: o,
|
|
1571
|
+
initialFocusElement: i
|
|
1572
|
+
};
|
|
1573
|
+
}
|
|
1574
|
+
const Cr = {
|
|
1165
1575
|
class: "rvc-fixed rvc-inset-0 rvc-overflow-hidden",
|
|
1166
1576
|
role: "presentation"
|
|
1167
|
-
},
|
|
1577
|
+
}, Ar = { class: "rvc-absolute rvc-inset-0 rvc-overflow-hidden" }, kr = { class: "rvc-pointer-events-none rvc-fixed rvc-inset-y-0 rvc-right-0 rvc-flex rvc-max-w-full rvc-pl-10" }, Pr = { class: "rvc-flex rvc-h-full rvc-flex-col rvc-shadow-xl" }, Dr = { class: "rvc-flex rvc-items-center rvc-justify-between" }, Rr = {
|
|
1168
1578
|
key: 0,
|
|
1169
1579
|
class: "rvc-ml-3 rvc-flex rvc-h-7 rvc-items-center"
|
|
1170
|
-
},
|
|
1580
|
+
}, Fr = ["id"], Br = { class: "rvc-flex rvc-shrink-0 rvc-drawer-footer" }, Ho = {
|
|
1171
1581
|
__name: "Drawer",
|
|
1172
1582
|
props: {
|
|
1173
1583
|
as: {
|
|
@@ -1207,27 +1617,31 @@ const Wn = {
|
|
|
1207
1617
|
default: "rvc-max-w-xl"
|
|
1208
1618
|
}
|
|
1209
1619
|
},
|
|
1210
|
-
emits: ["drawer:open", "drawer:close", "drawer:save"],
|
|
1620
|
+
emits: ["drawer:open", "drawer:close", "drawer:save", "drawer:closed"],
|
|
1211
1621
|
setup(e, { emit: t }) {
|
|
1212
|
-
const n = t, l = e,
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1622
|
+
const n = t, l = e, {
|
|
1623
|
+
contentRef: r,
|
|
1624
|
+
ready: o,
|
|
1625
|
+
isForm: i,
|
|
1626
|
+
titleId: a,
|
|
1627
|
+
descriptionId: c,
|
|
1628
|
+
initialFocusElement: s
|
|
1629
|
+
} = Mn(l);
|
|
1630
|
+
return (u, d) => (E(), oe(S(Bt), { as: "template" }, {
|
|
1631
|
+
default: H(() => [
|
|
1632
|
+
M(S(Cn), {
|
|
1219
1633
|
as: e.as,
|
|
1220
|
-
class: "drawer",
|
|
1634
|
+
class: "rvc-drawer",
|
|
1221
1635
|
static: "",
|
|
1222
1636
|
"aria-modal": "true",
|
|
1223
1637
|
role: "dialog",
|
|
1224
|
-
"initial-focus":
|
|
1225
|
-
"aria-labelledby":
|
|
1226
|
-
onClose:
|
|
1227
|
-
onSubmit:
|
|
1638
|
+
"initial-focus": S(s),
|
|
1639
|
+
"aria-labelledby": S(a),
|
|
1640
|
+
onClose: d[5] || (d[5] = (f) => u.$emit("drawer:close")),
|
|
1641
|
+
onSubmit: d[6] || (d[6] = un((f) => n("drawer:save", f), ["prevent"]))
|
|
1228
1642
|
}, {
|
|
1229
|
-
default:
|
|
1230
|
-
|
|
1643
|
+
default: H(() => [
|
|
1644
|
+
M(S(Ue), {
|
|
1231
1645
|
as: "template",
|
|
1232
1646
|
enter: "rvc-ease-in-out rvc-duration-500",
|
|
1233
1647
|
"enter-from": "rvc-opacity-0",
|
|
@@ -1235,20 +1649,20 @@ const Wn = {
|
|
|
1235
1649
|
leave: "rvc-ease-in-out rvc-duration-500",
|
|
1236
1650
|
"leave-from": "rvc-opacity-100",
|
|
1237
1651
|
"leave-to": "rvc-opacity-0",
|
|
1238
|
-
onBeforeEnter:
|
|
1652
|
+
onBeforeEnter: d[0] || (d[0] = (f) => n("drawer:open"))
|
|
1239
1653
|
}, {
|
|
1240
|
-
default:
|
|
1241
|
-
|
|
1242
|
-
class: "rvc-fixed rvc-inset-0 rvc-transition-opacity drawer-backdrop",
|
|
1654
|
+
default: H(() => d[7] || (d[7] = [
|
|
1655
|
+
x("div", {
|
|
1656
|
+
class: "rvc-fixed rvc-inset-0 rvc-transition-opacity rvc-drawer-backdrop",
|
|
1243
1657
|
"aria-hidden": "true"
|
|
1244
1658
|
}, null, -1)
|
|
1245
1659
|
])),
|
|
1246
1660
|
_: 1
|
|
1247
1661
|
}),
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1662
|
+
x("div", Cr, [
|
|
1663
|
+
x("div", Ar, [
|
|
1664
|
+
x("div", kr, [
|
|
1665
|
+
M(S(Ue), {
|
|
1252
1666
|
as: "template",
|
|
1253
1667
|
enter: "rvc-transform rvc-transition rvc-ease-in-out rvc-duration-500 sm:rvc-duration-700",
|
|
1254
1668
|
"enter-from": "rvc-translate-x-full",
|
|
@@ -1256,77 +1670,77 @@ const Wn = {
|
|
|
1256
1670
|
leave: "rvc-transform rvc-transition rvc-ease-in-out rvc-duration-500 sm:rvc-duration-700",
|
|
1257
1671
|
"leave-from": "rvc-translate-x-0",
|
|
1258
1672
|
"leave-to": "rvc-translate-x-full",
|
|
1259
|
-
onBeforeEnter:
|
|
1260
|
-
onAfterLeave:
|
|
1673
|
+
onBeforeEnter: d[3] || (d[3] = (f) => o.value = !0),
|
|
1674
|
+
onAfterLeave: d[4] || (d[4] = (f) => (o.value = !1, n("drawer:closed")))
|
|
1261
1675
|
}, {
|
|
1262
|
-
default:
|
|
1263
|
-
|
|
1264
|
-
class:
|
|
1676
|
+
default: H(() => [
|
|
1677
|
+
M(S(An), {
|
|
1678
|
+
class: q(["rvc-pointer-events-auto rvc-w-screen", e.panelClass]),
|
|
1265
1679
|
"aria-busy": e.spinning,
|
|
1266
|
-
"aria-describedby":
|
|
1680
|
+
"aria-describedby": S(c)
|
|
1267
1681
|
}, {
|
|
1268
|
-
default:
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
class:
|
|
1682
|
+
default: H(() => [
|
|
1683
|
+
x("div", Pr, [
|
|
1684
|
+
x("header", {
|
|
1685
|
+
class: q([{ "rvc-sticky rvc-top-0 rvc-left-0 rvc-w-full rvc-z-10": e.headerSticky }, "rvc-drawer-header"])
|
|
1272
1686
|
}, [
|
|
1273
|
-
|
|
1687
|
+
C(u.$slots, "header", {
|
|
1274
1688
|
title: e.title,
|
|
1275
1689
|
showClose: e.showClose
|
|
1276
1690
|
}, () => [
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
id:
|
|
1280
|
-
class: "drawer-title"
|
|
1691
|
+
x("div", Dr, [
|
|
1692
|
+
M(S(kn), {
|
|
1693
|
+
id: S(a),
|
|
1694
|
+
class: "rvc-drawer-title"
|
|
1281
1695
|
}, {
|
|
1282
|
-
default:
|
|
1283
|
-
|
|
1696
|
+
default: H(() => [
|
|
1697
|
+
he(re(e.title), 1)
|
|
1284
1698
|
]),
|
|
1285
1699
|
_: 1
|
|
1286
1700
|
}, 8, ["id"]),
|
|
1287
|
-
e.showClose ? (
|
|
1288
|
-
|
|
1701
|
+
e.showClose ? (E(), k("div", Rr, [
|
|
1702
|
+
x("button", {
|
|
1289
1703
|
type: "button",
|
|
1290
|
-
class: "rvc-relative drawer-close",
|
|
1704
|
+
class: "rvc-relative rvc-drawer-close",
|
|
1291
1705
|
"aria-label": "Close panel",
|
|
1292
|
-
onClick:
|
|
1706
|
+
onClick: d[1] || (d[1] = (f) => n("drawer:close"))
|
|
1293
1707
|
}, [
|
|
1294
|
-
|
|
1708
|
+
M(S(At), {
|
|
1295
1709
|
class: "rvc-size-full",
|
|
1296
1710
|
"aria-hidden": "true"
|
|
1297
1711
|
})
|
|
1298
1712
|
])
|
|
1299
|
-
])) :
|
|
1713
|
+
])) : _("", !0)
|
|
1300
1714
|
])
|
|
1301
1715
|
])
|
|
1302
1716
|
], 2),
|
|
1303
|
-
|
|
1304
|
-
class:
|
|
1717
|
+
x("div", {
|
|
1718
|
+
class: q([e.scrolledDown ? "rvc-flex-col-reverse" : "rvc-flex-col", "rvc-flex rvc-min-h-0 rvc-flex-1 rvc-overflow-y-scroll"])
|
|
1305
1719
|
}, [
|
|
1306
|
-
|
|
1307
|
-
id:
|
|
1720
|
+
x("div", {
|
|
1721
|
+
id: S(c),
|
|
1308
1722
|
ref_key: "contentRef",
|
|
1309
1723
|
ref: r,
|
|
1310
|
-
class: "rvc-relative rvc-flex-1 drawer-content"
|
|
1724
|
+
class: "rvc-relative rvc-flex-1 rvc-drawer-content"
|
|
1311
1725
|
}, [
|
|
1312
|
-
|
|
1313
|
-
], 8,
|
|
1726
|
+
C(u.$slots, "default", { ready: S(o) })
|
|
1727
|
+
], 8, Fr)
|
|
1314
1728
|
], 2),
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1729
|
+
x("footer", Br, [
|
|
1730
|
+
C(u.$slots, "footer", { loading: e.spinning }, () => [
|
|
1731
|
+
M(rt, {
|
|
1318
1732
|
type: "button",
|
|
1319
1733
|
label: e.cancelLabel,
|
|
1320
1734
|
color: "light",
|
|
1321
|
-
onClick:
|
|
1735
|
+
onClick: d[2] || (d[2] = (f) => n("drawer:close"))
|
|
1322
1736
|
}, null, 8, ["label"]),
|
|
1323
|
-
i
|
|
1737
|
+
S(i) ? (E(), oe(rt, {
|
|
1324
1738
|
key: 0,
|
|
1325
1739
|
type: "submit",
|
|
1326
1740
|
label: e.submitLabel,
|
|
1327
1741
|
spinning: e.spinning,
|
|
1328
1742
|
disabled: e.spinning
|
|
1329
|
-
}, null, 8, ["label", "spinning", "disabled"])) :
|
|
1743
|
+
}, null, 8, ["label", "spinning", "disabled"])) : _("", !0)
|
|
1330
1744
|
])
|
|
1331
1745
|
])
|
|
1332
1746
|
])
|
|
@@ -1346,10 +1760,1431 @@ const Wn = {
|
|
|
1346
1760
|
_: 3
|
|
1347
1761
|
}));
|
|
1348
1762
|
}
|
|
1763
|
+
}, Vo = /* @__PURE__ */ Object.assign({
|
|
1764
|
+
inheritAttrs: !1
|
|
1765
|
+
}, {
|
|
1766
|
+
__name: "Lightswitch",
|
|
1767
|
+
props: {
|
|
1768
|
+
modelValue: {
|
|
1769
|
+
type: Boolean,
|
|
1770
|
+
default: !1
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
emits: ["update:modelValue"],
|
|
1774
|
+
setup(e, { emit: t }) {
|
|
1775
|
+
const n = e, l = t, r = b({
|
|
1776
|
+
get: () => n.modelValue,
|
|
1777
|
+
set: (o) => l("update:modelValue", o)
|
|
1778
|
+
});
|
|
1779
|
+
return (o, i) => (E(), oe(S(yr), {
|
|
1780
|
+
as: "div",
|
|
1781
|
+
class: "rvc-lightswitch-group"
|
|
1782
|
+
}, {
|
|
1783
|
+
default: H(() => [
|
|
1784
|
+
M(S(br), qe({
|
|
1785
|
+
modelValue: r.value,
|
|
1786
|
+
"onUpdate:modelValue": i[0] || (i[0] = (a) => r.value = a),
|
|
1787
|
+
class: [{ "rvc-lightswitch-enabled": r.value }, "rvc-lightswitch"]
|
|
1788
|
+
}, o.$attrs), {
|
|
1789
|
+
default: H(() => [
|
|
1790
|
+
x("span", {
|
|
1791
|
+
class: q([{ "rvc-translate-x-6": r.value }, "rvc-lightswitch-toggle"])
|
|
1792
|
+
}, null, 2)
|
|
1793
|
+
]),
|
|
1794
|
+
_: 1
|
|
1795
|
+
}, 16, ["modelValue", "class"]),
|
|
1796
|
+
o.$slots.default ? (E(), oe(S(wr), { key: 0 }, {
|
|
1797
|
+
default: H(() => [
|
|
1798
|
+
C(o.$slots, "default")
|
|
1799
|
+
]),
|
|
1800
|
+
_: 3
|
|
1801
|
+
})) : _("", !0)
|
|
1802
|
+
]),
|
|
1803
|
+
_: 3
|
|
1804
|
+
}));
|
|
1805
|
+
}
|
|
1806
|
+
}), Mr = {
|
|
1807
|
+
role: "presentation",
|
|
1808
|
+
class: "rvc-fixed rvc-inset-0 rvc-z-10 rvc-w-screen rvc-overflow-y-auto"
|
|
1809
|
+
}, Nr = { class: "rvc-flex rvc-min-h-full rvc-justify-center rvc-p-4 rvc-items-center sm:rvc-p-0" }, jr = { class: "rvc-modal-header" }, Hr = { class: "rvc-flex rvc-items-center rvc-justify-between" }, Vr = {
|
|
1810
|
+
key: 0,
|
|
1811
|
+
class: "rvc-ml-3 rvc-flex rvc-h-7 rvc-items-center"
|
|
1812
|
+
}, Ir = ["id"], Wr = { class: "rvc-modal-footer" }, Io = {
|
|
1813
|
+
__name: "Modal",
|
|
1814
|
+
props: {
|
|
1815
|
+
as: {
|
|
1816
|
+
type: String,
|
|
1817
|
+
default: "div"
|
|
1818
|
+
},
|
|
1819
|
+
id: {
|
|
1820
|
+
type: String,
|
|
1821
|
+
required: !0
|
|
1822
|
+
},
|
|
1823
|
+
title: {
|
|
1824
|
+
type: String,
|
|
1825
|
+
required: !0
|
|
1826
|
+
},
|
|
1827
|
+
showClose: {
|
|
1828
|
+
type: Boolean
|
|
1829
|
+
},
|
|
1830
|
+
spinning: {
|
|
1831
|
+
type: Boolean
|
|
1832
|
+
},
|
|
1833
|
+
submitLabel: {
|
|
1834
|
+
type: String,
|
|
1835
|
+
default: "Confirm"
|
|
1836
|
+
},
|
|
1837
|
+
cancelLabel: {
|
|
1838
|
+
type: String,
|
|
1839
|
+
default: "Cancel"
|
|
1840
|
+
},
|
|
1841
|
+
panelClass: {
|
|
1842
|
+
type: String,
|
|
1843
|
+
default: "sm:rvc-max-w-lg"
|
|
1844
|
+
}
|
|
1845
|
+
},
|
|
1846
|
+
emits: ["modal:open", "modal:close", "modal:save", "modal:closed"],
|
|
1847
|
+
setup(e, { emit: t }) {
|
|
1848
|
+
const n = t, l = e, {
|
|
1849
|
+
contentRef: r,
|
|
1850
|
+
ready: o,
|
|
1851
|
+
isForm: i,
|
|
1852
|
+
titleId: a,
|
|
1853
|
+
descriptionId: c,
|
|
1854
|
+
initialFocusElement: s
|
|
1855
|
+
} = Mn(l);
|
|
1856
|
+
return (u, d) => (E(), oe(S(Bt), { as: "template" }, {
|
|
1857
|
+
default: H(() => [
|
|
1858
|
+
M(S(Cn), {
|
|
1859
|
+
as: e.as,
|
|
1860
|
+
class: "rvc-modal",
|
|
1861
|
+
static: "",
|
|
1862
|
+
"aria-modal": "true",
|
|
1863
|
+
role: "dialog",
|
|
1864
|
+
"initial-focus": S(s),
|
|
1865
|
+
"aria-labelledby": S(a),
|
|
1866
|
+
onClose: d[6] || (d[6] = (f) => u.$emit("modal:close")),
|
|
1867
|
+
onSubmit: d[7] || (d[7] = un((f) => n("modal:save", f), ["prevent"]))
|
|
1868
|
+
}, {
|
|
1869
|
+
default: H(() => [
|
|
1870
|
+
M(S(Ue), {
|
|
1871
|
+
as: "template",
|
|
1872
|
+
enter: "rvc-ease-out rvc-duration-300",
|
|
1873
|
+
"enter-from": "rvc-opacity-0",
|
|
1874
|
+
"enter-to": "rvc-opacity-100",
|
|
1875
|
+
leave: "rvc-ease-in rvc-duration-200",
|
|
1876
|
+
"leave-from": "rvc-opacity-100",
|
|
1877
|
+
"leave-to": "rvc-opacity-0",
|
|
1878
|
+
onBeforeEnter: d[0] || (d[0] = (f) => n("modal:open"))
|
|
1879
|
+
}, {
|
|
1880
|
+
default: H(() => d[8] || (d[8] = [
|
|
1881
|
+
x("div", {
|
|
1882
|
+
"aria-hidden": "true",
|
|
1883
|
+
class: "rvc-fixed rvc-inset-0 rvc-transition-opacity rvc-modal-backdrop"
|
|
1884
|
+
}, null, -1)
|
|
1885
|
+
])),
|
|
1886
|
+
_: 1
|
|
1887
|
+
}),
|
|
1888
|
+
x("div", Mr, [
|
|
1889
|
+
x("div", Nr, [
|
|
1890
|
+
M(S(Ue), {
|
|
1891
|
+
as: "template",
|
|
1892
|
+
enter: "rvc-ease-out rvc-duration-300",
|
|
1893
|
+
"enter-from": "rvc-opacity-0 rvc-translate-y-4 sm:rvc-translate-y-0 sm:rvc-scale-95",
|
|
1894
|
+
"enter-to": "rvc-opacity-100 rvc-translate-y-0 sm:rvc-scale-100",
|
|
1895
|
+
leave: "rvc-ease-in rvc-duration-200",
|
|
1896
|
+
"leave-from": "rvc-opacity-100 rvc-translate-y-0 sm:rvc-scale-100",
|
|
1897
|
+
"leave-to": "rvc-opacity-0 rvc-translate-y-4 sm:rvc-translate-y-0 sm:rvc-scale-95",
|
|
1898
|
+
onBeforeEnter: d[4] || (d[4] = (f) => o.value = !0),
|
|
1899
|
+
onAfterLeave: d[5] || (d[5] = (f) => (o.value = !1, n("modal:closed")))
|
|
1900
|
+
}, {
|
|
1901
|
+
default: H(() => [
|
|
1902
|
+
M(S(An), {
|
|
1903
|
+
class: q(["rvc-modal-panel", e.panelClass]),
|
|
1904
|
+
"aria-busy": e.spinning,
|
|
1905
|
+
"aria-describedby": S(c)
|
|
1906
|
+
}, {
|
|
1907
|
+
default: H(() => [
|
|
1908
|
+
x("header", jr, [
|
|
1909
|
+
C(u.$slots, "header", { title: e.title }, () => [
|
|
1910
|
+
x("div", Hr, [
|
|
1911
|
+
M(S(kn), {
|
|
1912
|
+
id: S(a),
|
|
1913
|
+
class: "rvc-modal-title"
|
|
1914
|
+
}, {
|
|
1915
|
+
default: H(() => [
|
|
1916
|
+
he(re(e.title), 1)
|
|
1917
|
+
]),
|
|
1918
|
+
_: 1
|
|
1919
|
+
}, 8, ["id"]),
|
|
1920
|
+
e.showClose ? (E(), k("div", Vr, [
|
|
1921
|
+
x("button", {
|
|
1922
|
+
type: "button",
|
|
1923
|
+
class: "rvc-relative rvc-modal-close",
|
|
1924
|
+
"aria-label": "Close panel",
|
|
1925
|
+
onClick: d[1] || (d[1] = (f) => n("modal:close"))
|
|
1926
|
+
}, [
|
|
1927
|
+
M(S(At), {
|
|
1928
|
+
class: "rvc-size-full",
|
|
1929
|
+
"aria-hidden": "true"
|
|
1930
|
+
})
|
|
1931
|
+
])
|
|
1932
|
+
])) : _("", !0)
|
|
1933
|
+
])
|
|
1934
|
+
])
|
|
1935
|
+
]),
|
|
1936
|
+
x("div", {
|
|
1937
|
+
id: S(c),
|
|
1938
|
+
ref_key: "contentRef",
|
|
1939
|
+
ref: r,
|
|
1940
|
+
class: "rvc-modal-content"
|
|
1941
|
+
}, [
|
|
1942
|
+
C(u.$slots, "default", { ready: S(o) })
|
|
1943
|
+
], 8, Ir),
|
|
1944
|
+
x("footer", Wr, [
|
|
1945
|
+
C(u.$slots, "footer", {}, () => [
|
|
1946
|
+
M(rt, {
|
|
1947
|
+
type: S(i) ? "submit" : "button",
|
|
1948
|
+
label: e.submitLabel,
|
|
1949
|
+
spinning: e.spinning,
|
|
1950
|
+
disabled: e.spinning,
|
|
1951
|
+
onClick: d[2] || (d[2] = (f) => !S(i) && u.$emit("modal:save"))
|
|
1952
|
+
}, null, 8, ["type", "label", "spinning", "disabled"]),
|
|
1953
|
+
M(rt, {
|
|
1954
|
+
type: "button",
|
|
1955
|
+
color: "light",
|
|
1956
|
+
label: e.cancelLabel,
|
|
1957
|
+
onClick: d[3] || (d[3] = (f) => u.$emit("modal:close"))
|
|
1958
|
+
}, null, 8, ["label"])
|
|
1959
|
+
])
|
|
1960
|
+
])
|
|
1961
|
+
]),
|
|
1962
|
+
_: 3
|
|
1963
|
+
}, 8, ["class", "aria-busy", "aria-describedby"])
|
|
1964
|
+
]),
|
|
1965
|
+
_: 3
|
|
1966
|
+
})
|
|
1967
|
+
])
|
|
1968
|
+
])
|
|
1969
|
+
]),
|
|
1970
|
+
_: 3
|
|
1971
|
+
}, 8, ["as", "initial-focus", "aria-labelledby"])
|
|
1972
|
+
]),
|
|
1973
|
+
_: 3
|
|
1974
|
+
}));
|
|
1975
|
+
}
|
|
1976
|
+
}, Ur = ["top", "right", "bottom", "left"], en = ["start", "end"], tn = /* @__PURE__ */ Ur.reduce((e, t) => e.concat(t, t + "-" + en[0], t + "-" + en[1]), []), xe = Math.min, J = Math.max, st = Math.round, tt = Math.floor, fe = (e) => ({
|
|
1977
|
+
x: e,
|
|
1978
|
+
y: e
|
|
1979
|
+
}), zr = {
|
|
1980
|
+
left: "right",
|
|
1981
|
+
right: "left",
|
|
1982
|
+
bottom: "top",
|
|
1983
|
+
top: "bottom"
|
|
1984
|
+
}, qr = {
|
|
1985
|
+
start: "end",
|
|
1986
|
+
end: "start"
|
|
1987
|
+
};
|
|
1988
|
+
function Lt(e, t, n) {
|
|
1989
|
+
return J(e, xe(t, n));
|
|
1990
|
+
}
|
|
1991
|
+
function Me(e, t) {
|
|
1992
|
+
return typeof e == "function" ? e(t) : e;
|
|
1993
|
+
}
|
|
1994
|
+
function Ae(e) {
|
|
1995
|
+
return e.split("-")[0];
|
|
1996
|
+
}
|
|
1997
|
+
function ve(e) {
|
|
1998
|
+
return e.split("-")[1];
|
|
1999
|
+
}
|
|
2000
|
+
function Nn(e) {
|
|
2001
|
+
return e === "x" ? "y" : "x";
|
|
2002
|
+
}
|
|
2003
|
+
function Mt(e) {
|
|
2004
|
+
return e === "y" ? "height" : "width";
|
|
2005
|
+
}
|
|
2006
|
+
function Xe(e) {
|
|
2007
|
+
return ["top", "bottom"].includes(Ae(e)) ? "y" : "x";
|
|
2008
|
+
}
|
|
2009
|
+
function Nt(e) {
|
|
2010
|
+
return Nn(Xe(e));
|
|
2011
|
+
}
|
|
2012
|
+
function Yr(e, t, n) {
|
|
2013
|
+
n === void 0 && (n = !1);
|
|
2014
|
+
const l = ve(e), r = Nt(e), o = Mt(r);
|
|
2015
|
+
let i = r === "x" ? l === (n ? "end" : "start") ? "right" : "left" : l === "start" ? "bottom" : "top";
|
|
2016
|
+
return t.reference[o] > t.floating[o] && (i = nn(i)), [i, nn(i)];
|
|
2017
|
+
}
|
|
2018
|
+
function Kr(e) {
|
|
2019
|
+
return e.replace(/start|end/g, (t) => qr[t]);
|
|
2020
|
+
}
|
|
2021
|
+
function nn(e) {
|
|
2022
|
+
return e.replace(/left|right|bottom|top/g, (t) => zr[t]);
|
|
2023
|
+
}
|
|
2024
|
+
function Gr(e) {
|
|
2025
|
+
return {
|
|
2026
|
+
top: 0,
|
|
2027
|
+
right: 0,
|
|
2028
|
+
bottom: 0,
|
|
2029
|
+
left: 0,
|
|
2030
|
+
...e
|
|
2031
|
+
};
|
|
2032
|
+
}
|
|
2033
|
+
function jn(e) {
|
|
2034
|
+
return typeof e != "number" ? Gr(e) : {
|
|
2035
|
+
top: e,
|
|
2036
|
+
right: e,
|
|
2037
|
+
bottom: e,
|
|
2038
|
+
left: e
|
|
2039
|
+
};
|
|
2040
|
+
}
|
|
2041
|
+
function ut(e) {
|
|
2042
|
+
const {
|
|
2043
|
+
x: t,
|
|
2044
|
+
y: n,
|
|
2045
|
+
width: l,
|
|
2046
|
+
height: r
|
|
2047
|
+
} = e;
|
|
2048
|
+
return {
|
|
2049
|
+
width: l,
|
|
2050
|
+
height: r,
|
|
2051
|
+
top: n,
|
|
2052
|
+
left: t,
|
|
2053
|
+
right: t + l,
|
|
2054
|
+
bottom: n + r,
|
|
2055
|
+
x: t,
|
|
2056
|
+
y: n
|
|
2057
|
+
};
|
|
2058
|
+
}
|
|
2059
|
+
function ln(e, t, n) {
|
|
2060
|
+
let {
|
|
2061
|
+
reference: l,
|
|
2062
|
+
floating: r
|
|
2063
|
+
} = e;
|
|
2064
|
+
const o = Xe(t), i = Nt(t), a = Mt(i), c = Ae(t), s = o === "y", u = l.x + l.width / 2 - r.width / 2, d = l.y + l.height / 2 - r.height / 2, f = l[a] / 2 - r[a] / 2;
|
|
2065
|
+
let v;
|
|
2066
|
+
switch (c) {
|
|
2067
|
+
case "top":
|
|
2068
|
+
v = {
|
|
2069
|
+
x: u,
|
|
2070
|
+
y: l.y - r.height
|
|
2071
|
+
};
|
|
2072
|
+
break;
|
|
2073
|
+
case "bottom":
|
|
2074
|
+
v = {
|
|
2075
|
+
x: u,
|
|
2076
|
+
y: l.y + l.height
|
|
2077
|
+
};
|
|
2078
|
+
break;
|
|
2079
|
+
case "right":
|
|
2080
|
+
v = {
|
|
2081
|
+
x: l.x + l.width,
|
|
2082
|
+
y: d
|
|
2083
|
+
};
|
|
2084
|
+
break;
|
|
2085
|
+
case "left":
|
|
2086
|
+
v = {
|
|
2087
|
+
x: l.x - r.width,
|
|
2088
|
+
y: d
|
|
2089
|
+
};
|
|
2090
|
+
break;
|
|
2091
|
+
default:
|
|
2092
|
+
v = {
|
|
2093
|
+
x: l.x,
|
|
2094
|
+
y: l.y
|
|
2095
|
+
};
|
|
2096
|
+
}
|
|
2097
|
+
switch (ve(t)) {
|
|
2098
|
+
case "start":
|
|
2099
|
+
v[i] -= f * (n && s ? -1 : 1);
|
|
2100
|
+
break;
|
|
2101
|
+
case "end":
|
|
2102
|
+
v[i] += f * (n && s ? -1 : 1);
|
|
2103
|
+
break;
|
|
2104
|
+
}
|
|
2105
|
+
return v;
|
|
2106
|
+
}
|
|
2107
|
+
const Xr = async (e, t, n) => {
|
|
2108
|
+
const {
|
|
2109
|
+
placement: l = "bottom",
|
|
2110
|
+
strategy: r = "absolute",
|
|
2111
|
+
middleware: o = [],
|
|
2112
|
+
platform: i
|
|
2113
|
+
} = n, a = o.filter(Boolean), c = await (i.isRTL == null ? void 0 : i.isRTL(t));
|
|
2114
|
+
let s = await i.getElementRects({
|
|
2115
|
+
reference: e,
|
|
2116
|
+
floating: t,
|
|
2117
|
+
strategy: r
|
|
2118
|
+
}), {
|
|
2119
|
+
x: u,
|
|
2120
|
+
y: d
|
|
2121
|
+
} = ln(s, l, c), f = l, v = {}, p = 0;
|
|
2122
|
+
for (let m = 0; m < a.length; m++) {
|
|
2123
|
+
const {
|
|
2124
|
+
name: h,
|
|
2125
|
+
fn: y
|
|
2126
|
+
} = a[m], {
|
|
2127
|
+
x: g,
|
|
2128
|
+
y: w,
|
|
2129
|
+
data: T,
|
|
2130
|
+
reset: L
|
|
2131
|
+
} = await y({
|
|
2132
|
+
x: u,
|
|
2133
|
+
y: d,
|
|
2134
|
+
initialPlacement: l,
|
|
2135
|
+
placement: f,
|
|
2136
|
+
strategy: r,
|
|
2137
|
+
middlewareData: v,
|
|
2138
|
+
rects: s,
|
|
2139
|
+
platform: i,
|
|
2140
|
+
elements: {
|
|
2141
|
+
reference: e,
|
|
2142
|
+
floating: t
|
|
2143
|
+
}
|
|
2144
|
+
});
|
|
2145
|
+
u = g ?? u, d = w ?? d, v = {
|
|
2146
|
+
...v,
|
|
2147
|
+
[h]: {
|
|
2148
|
+
...v[h],
|
|
2149
|
+
...T
|
|
2150
|
+
}
|
|
2151
|
+
}, L && p <= 50 && (p++, typeof L == "object" && (L.placement && (f = L.placement), L.rects && (s = L.rects === !0 ? await i.getElementRects({
|
|
2152
|
+
reference: e,
|
|
2153
|
+
floating: t,
|
|
2154
|
+
strategy: r
|
|
2155
|
+
}) : L.rects), {
|
|
2156
|
+
x: u,
|
|
2157
|
+
y: d
|
|
2158
|
+
} = ln(s, f, c)), m = -1);
|
|
2159
|
+
}
|
|
2160
|
+
return {
|
|
2161
|
+
x: u,
|
|
2162
|
+
y: d,
|
|
2163
|
+
placement: f,
|
|
2164
|
+
strategy: r,
|
|
2165
|
+
middlewareData: v
|
|
2166
|
+
};
|
|
2167
|
+
};
|
|
2168
|
+
async function jt(e, t) {
|
|
2169
|
+
var n;
|
|
2170
|
+
t === void 0 && (t = {});
|
|
2171
|
+
const {
|
|
2172
|
+
x: l,
|
|
2173
|
+
y: r,
|
|
2174
|
+
platform: o,
|
|
2175
|
+
rects: i,
|
|
2176
|
+
elements: a,
|
|
2177
|
+
strategy: c
|
|
2178
|
+
} = e, {
|
|
2179
|
+
boundary: s = "clippingAncestors",
|
|
2180
|
+
rootBoundary: u = "viewport",
|
|
2181
|
+
elementContext: d = "floating",
|
|
2182
|
+
altBoundary: f = !1,
|
|
2183
|
+
padding: v = 0
|
|
2184
|
+
} = Me(t, e), p = jn(v), h = a[f ? d === "floating" ? "reference" : "floating" : d], y = ut(await o.getClippingRect({
|
|
2185
|
+
element: (n = await (o.isElement == null ? void 0 : o.isElement(h))) == null || n ? h : h.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
|
|
2186
|
+
boundary: s,
|
|
2187
|
+
rootBoundary: u,
|
|
2188
|
+
strategy: c
|
|
2189
|
+
})), g = d === "floating" ? {
|
|
2190
|
+
x: l,
|
|
2191
|
+
y: r,
|
|
2192
|
+
width: i.floating.width,
|
|
2193
|
+
height: i.floating.height
|
|
2194
|
+
} : i.reference, w = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(a.floating)), T = await (o.isElement == null ? void 0 : o.isElement(w)) ? await (o.getScale == null ? void 0 : o.getScale(w)) || {
|
|
2195
|
+
x: 1,
|
|
2196
|
+
y: 1
|
|
2197
|
+
} : {
|
|
2198
|
+
x: 1,
|
|
2199
|
+
y: 1
|
|
2200
|
+
}, L = ut(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2201
|
+
elements: a,
|
|
2202
|
+
rect: g,
|
|
2203
|
+
offsetParent: w,
|
|
2204
|
+
strategy: c
|
|
2205
|
+
}) : g);
|
|
2206
|
+
return {
|
|
2207
|
+
top: (y.top - L.top + p.top) / T.y,
|
|
2208
|
+
bottom: (L.bottom - y.bottom + p.bottom) / T.y,
|
|
2209
|
+
left: (y.left - L.left + p.left) / T.x,
|
|
2210
|
+
right: (L.right - y.right + p.right) / T.x
|
|
2211
|
+
};
|
|
2212
|
+
}
|
|
2213
|
+
const Zr = (e) => ({
|
|
2214
|
+
name: "arrow",
|
|
2215
|
+
options: e,
|
|
2216
|
+
async fn(t) {
|
|
2217
|
+
const {
|
|
2218
|
+
x: n,
|
|
2219
|
+
y: l,
|
|
2220
|
+
placement: r,
|
|
2221
|
+
rects: o,
|
|
2222
|
+
platform: i,
|
|
2223
|
+
elements: a,
|
|
2224
|
+
middlewareData: c
|
|
2225
|
+
} = t, {
|
|
2226
|
+
element: s,
|
|
2227
|
+
padding: u = 0
|
|
2228
|
+
} = Me(e, t) || {};
|
|
2229
|
+
if (s == null)
|
|
2230
|
+
return {};
|
|
2231
|
+
const d = jn(u), f = {
|
|
2232
|
+
x: n,
|
|
2233
|
+
y: l
|
|
2234
|
+
}, v = Nt(r), p = Mt(v), m = await i.getDimensions(s), h = v === "y", y = h ? "top" : "left", g = h ? "bottom" : "right", w = h ? "clientHeight" : "clientWidth", T = o.reference[p] + o.reference[v] - f[v] - o.floating[p], L = f[v] - o.reference[v], P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(s));
|
|
2235
|
+
let O = P ? P[w] : 0;
|
|
2236
|
+
(!O || !await (i.isElement == null ? void 0 : i.isElement(P))) && (O = a.floating[w] || o.floating[p]);
|
|
2237
|
+
const R = T / 2 - L / 2, U = O / 2 - m[p] / 2 - 1, F = xe(d[y], U), z = xe(d[g], U), K = F, j = O - m[p] - z, G = O / 2 - m[p] / 2 + R, X = Lt(K, G, j), Z = !c.arrow && ve(r) != null && G !== X && o.reference[p] / 2 - (G < K ? F : z) - m[p] / 2 < 0, ce = Z ? G < K ? G - K : G - j : 0;
|
|
2238
|
+
return {
|
|
2239
|
+
[v]: f[v] + ce,
|
|
2240
|
+
data: {
|
|
2241
|
+
[v]: X,
|
|
2242
|
+
centerOffset: G - X - ce,
|
|
2243
|
+
...Z && {
|
|
2244
|
+
alignmentOffset: ce
|
|
2245
|
+
}
|
|
2246
|
+
},
|
|
2247
|
+
reset: Z
|
|
2248
|
+
};
|
|
2249
|
+
}
|
|
2250
|
+
});
|
|
2251
|
+
function Qr(e, t, n) {
|
|
2252
|
+
return (e ? [...n.filter((r) => ve(r) === e), ...n.filter((r) => ve(r) !== e)] : n.filter((r) => Ae(r) === r)).filter((r) => e ? ve(r) === e || (t ? Kr(r) !== r : !1) : !0);
|
|
2253
|
+
}
|
|
2254
|
+
const Jr = function(e) {
|
|
2255
|
+
return e === void 0 && (e = {}), {
|
|
2256
|
+
name: "autoPlacement",
|
|
2257
|
+
options: e,
|
|
2258
|
+
async fn(t) {
|
|
2259
|
+
var n, l, r;
|
|
2260
|
+
const {
|
|
2261
|
+
rects: o,
|
|
2262
|
+
middlewareData: i,
|
|
2263
|
+
placement: a,
|
|
2264
|
+
platform: c,
|
|
2265
|
+
elements: s
|
|
2266
|
+
} = t, {
|
|
2267
|
+
crossAxis: u = !1,
|
|
2268
|
+
alignment: d,
|
|
2269
|
+
allowedPlacements: f = tn,
|
|
2270
|
+
autoAlignment: v = !0,
|
|
2271
|
+
...p
|
|
2272
|
+
} = Me(e, t), m = d !== void 0 || f === tn ? Qr(d || null, v, f) : f, h = await jt(t, p), y = ((n = i.autoPlacement) == null ? void 0 : n.index) || 0, g = m[y];
|
|
2273
|
+
if (g == null)
|
|
2274
|
+
return {};
|
|
2275
|
+
const w = Yr(g, o, await (c.isRTL == null ? void 0 : c.isRTL(s.floating)));
|
|
2276
|
+
if (a !== g)
|
|
2277
|
+
return {
|
|
2278
|
+
reset: {
|
|
2279
|
+
placement: m[0]
|
|
2280
|
+
}
|
|
2281
|
+
};
|
|
2282
|
+
const T = [h[Ae(g)], h[w[0]], h[w[1]]], L = [...((l = i.autoPlacement) == null ? void 0 : l.overflows) || [], {
|
|
2283
|
+
placement: g,
|
|
2284
|
+
overflows: T
|
|
2285
|
+
}], P = m[y + 1];
|
|
2286
|
+
if (P)
|
|
2287
|
+
return {
|
|
2288
|
+
data: {
|
|
2289
|
+
index: y + 1,
|
|
2290
|
+
overflows: L
|
|
2291
|
+
},
|
|
2292
|
+
reset: {
|
|
2293
|
+
placement: P
|
|
2294
|
+
}
|
|
2295
|
+
};
|
|
2296
|
+
const O = L.map((F) => {
|
|
2297
|
+
const z = ve(F.placement);
|
|
2298
|
+
return [F.placement, z && u ? (
|
|
2299
|
+
// Check along the mainAxis and main crossAxis side.
|
|
2300
|
+
F.overflows.slice(0, 2).reduce((K, j) => K + j, 0)
|
|
2301
|
+
) : (
|
|
2302
|
+
// Check only the mainAxis.
|
|
2303
|
+
F.overflows[0]
|
|
2304
|
+
), F.overflows];
|
|
2305
|
+
}).sort((F, z) => F[1] - z[1]), U = ((r = O.filter((F) => F[2].slice(
|
|
2306
|
+
0,
|
|
2307
|
+
// Aligned placements should not check their opposite crossAxis
|
|
2308
|
+
// side.
|
|
2309
|
+
ve(F[0]) ? 2 : 3
|
|
2310
|
+
).every((z) => z <= 0))[0]) == null ? void 0 : r[0]) || O[0][0];
|
|
2311
|
+
return U !== a ? {
|
|
2312
|
+
data: {
|
|
2313
|
+
index: y + 1,
|
|
2314
|
+
overflows: L
|
|
2315
|
+
},
|
|
2316
|
+
reset: {
|
|
2317
|
+
placement: U
|
|
2318
|
+
}
|
|
2319
|
+
} : {};
|
|
2320
|
+
}
|
|
2321
|
+
};
|
|
2322
|
+
};
|
|
2323
|
+
async function _r(e, t) {
|
|
2324
|
+
const {
|
|
2325
|
+
placement: n,
|
|
2326
|
+
platform: l,
|
|
2327
|
+
elements: r
|
|
2328
|
+
} = e, o = await (l.isRTL == null ? void 0 : l.isRTL(r.floating)), i = Ae(n), a = ve(n), c = Xe(n) === "y", s = ["left", "top"].includes(i) ? -1 : 1, u = o && c ? -1 : 1, d = Me(t, e);
|
|
2329
|
+
let {
|
|
2330
|
+
mainAxis: f,
|
|
2331
|
+
crossAxis: v,
|
|
2332
|
+
alignmentAxis: p
|
|
2333
|
+
} = typeof d == "number" ? {
|
|
2334
|
+
mainAxis: d,
|
|
2335
|
+
crossAxis: 0,
|
|
2336
|
+
alignmentAxis: null
|
|
2337
|
+
} : {
|
|
2338
|
+
mainAxis: d.mainAxis || 0,
|
|
2339
|
+
crossAxis: d.crossAxis || 0,
|
|
2340
|
+
alignmentAxis: d.alignmentAxis
|
|
2341
|
+
};
|
|
2342
|
+
return a && typeof p == "number" && (v = a === "end" ? p * -1 : p), c ? {
|
|
2343
|
+
x: v * u,
|
|
2344
|
+
y: f * s
|
|
2345
|
+
} : {
|
|
2346
|
+
x: f * s,
|
|
2347
|
+
y: v * u
|
|
2348
|
+
};
|
|
2349
|
+
}
|
|
2350
|
+
const eo = function(e) {
|
|
2351
|
+
return e === void 0 && (e = 0), {
|
|
2352
|
+
name: "offset",
|
|
2353
|
+
options: e,
|
|
2354
|
+
async fn(t) {
|
|
2355
|
+
var n, l;
|
|
2356
|
+
const {
|
|
2357
|
+
x: r,
|
|
2358
|
+
y: o,
|
|
2359
|
+
placement: i,
|
|
2360
|
+
middlewareData: a
|
|
2361
|
+
} = t, c = await _r(t, e);
|
|
2362
|
+
return i === ((n = a.offset) == null ? void 0 : n.placement) && (l = a.arrow) != null && l.alignmentOffset ? {} : {
|
|
2363
|
+
x: r + c.x,
|
|
2364
|
+
y: o + c.y,
|
|
2365
|
+
data: {
|
|
2366
|
+
...c,
|
|
2367
|
+
placement: i
|
|
2368
|
+
}
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
};
|
|
2372
|
+
}, to = function(e) {
|
|
2373
|
+
return e === void 0 && (e = {}), {
|
|
2374
|
+
name: "shift",
|
|
2375
|
+
options: e,
|
|
2376
|
+
async fn(t) {
|
|
2377
|
+
const {
|
|
2378
|
+
x: n,
|
|
2379
|
+
y: l,
|
|
2380
|
+
placement: r
|
|
2381
|
+
} = t, {
|
|
2382
|
+
mainAxis: o = !0,
|
|
2383
|
+
crossAxis: i = !1,
|
|
2384
|
+
limiter: a = {
|
|
2385
|
+
fn: (h) => {
|
|
2386
|
+
let {
|
|
2387
|
+
x: y,
|
|
2388
|
+
y: g
|
|
2389
|
+
} = h;
|
|
2390
|
+
return {
|
|
2391
|
+
x: y,
|
|
2392
|
+
y: g
|
|
2393
|
+
};
|
|
2394
|
+
}
|
|
2395
|
+
},
|
|
2396
|
+
...c
|
|
2397
|
+
} = Me(e, t), s = {
|
|
2398
|
+
x: n,
|
|
2399
|
+
y: l
|
|
2400
|
+
}, u = await jt(t, c), d = Xe(Ae(r)), f = Nn(d);
|
|
2401
|
+
let v = s[f], p = s[d];
|
|
2402
|
+
if (o) {
|
|
2403
|
+
const h = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", g = v + u[h], w = v - u[y];
|
|
2404
|
+
v = Lt(g, v, w);
|
|
2405
|
+
}
|
|
2406
|
+
if (i) {
|
|
2407
|
+
const h = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", g = p + u[h], w = p - u[y];
|
|
2408
|
+
p = Lt(g, p, w);
|
|
2409
|
+
}
|
|
2410
|
+
const m = a.fn({
|
|
2411
|
+
...t,
|
|
2412
|
+
[f]: v,
|
|
2413
|
+
[d]: p
|
|
2414
|
+
});
|
|
2415
|
+
return {
|
|
2416
|
+
...m,
|
|
2417
|
+
data: {
|
|
2418
|
+
x: m.x - n,
|
|
2419
|
+
y: m.y - l,
|
|
2420
|
+
enabled: {
|
|
2421
|
+
[f]: o,
|
|
2422
|
+
[d]: i
|
|
2423
|
+
}
|
|
2424
|
+
}
|
|
2425
|
+
};
|
|
2426
|
+
}
|
|
2427
|
+
};
|
|
2428
|
+
}, no = function(e) {
|
|
2429
|
+
return e === void 0 && (e = {}), {
|
|
2430
|
+
name: "size",
|
|
2431
|
+
options: e,
|
|
2432
|
+
async fn(t) {
|
|
2433
|
+
var n, l;
|
|
2434
|
+
const {
|
|
2435
|
+
placement: r,
|
|
2436
|
+
rects: o,
|
|
2437
|
+
platform: i,
|
|
2438
|
+
elements: a
|
|
2439
|
+
} = t, {
|
|
2440
|
+
apply: c = () => {
|
|
2441
|
+
},
|
|
2442
|
+
...s
|
|
2443
|
+
} = Me(e, t), u = await jt(t, s), d = Ae(r), f = ve(r), v = Xe(r) === "y", {
|
|
2444
|
+
width: p,
|
|
2445
|
+
height: m
|
|
2446
|
+
} = o.floating;
|
|
2447
|
+
let h, y;
|
|
2448
|
+
d === "top" || d === "bottom" ? (h = d, y = f === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (y = d, h = f === "end" ? "top" : "bottom");
|
|
2449
|
+
const g = m - u.top - u.bottom, w = p - u.left - u.right, T = xe(m - u[h], g), L = xe(p - u[y], w), P = !t.middlewareData.shift;
|
|
2450
|
+
let O = T, R = L;
|
|
2451
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = w), (l = t.middlewareData.shift) != null && l.enabled.y && (O = g), P && !f) {
|
|
2452
|
+
const F = J(u.left, 0), z = J(u.right, 0), K = J(u.top, 0), j = J(u.bottom, 0);
|
|
2453
|
+
v ? R = p - 2 * (F !== 0 || z !== 0 ? F + z : J(u.left, u.right)) : O = m - 2 * (K !== 0 || j !== 0 ? K + j : J(u.top, u.bottom));
|
|
2454
|
+
}
|
|
2455
|
+
await c({
|
|
2456
|
+
...t,
|
|
2457
|
+
availableWidth: R,
|
|
2458
|
+
availableHeight: O
|
|
2459
|
+
});
|
|
2460
|
+
const U = await i.getDimensions(a.floating);
|
|
2461
|
+
return p !== U.width || m !== U.height ? {
|
|
2462
|
+
reset: {
|
|
2463
|
+
rects: !0
|
|
2464
|
+
}
|
|
2465
|
+
} : {};
|
|
2466
|
+
}
|
|
2467
|
+
};
|
|
2468
|
+
};
|
|
2469
|
+
function dt() {
|
|
2470
|
+
return typeof window < "u";
|
|
2471
|
+
}
|
|
2472
|
+
function ke(e) {
|
|
2473
|
+
return Ht(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
2474
|
+
}
|
|
2475
|
+
function ee(e) {
|
|
2476
|
+
var t;
|
|
2477
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
2478
|
+
}
|
|
2479
|
+
function ge(e) {
|
|
2480
|
+
var t;
|
|
2481
|
+
return (t = (Ht(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
2482
|
+
}
|
|
2483
|
+
function Ht(e) {
|
|
2484
|
+
return dt() ? e instanceof Node || e instanceof ee(e).Node : !1;
|
|
2485
|
+
}
|
|
2486
|
+
function se(e) {
|
|
2487
|
+
return dt() ? e instanceof Element || e instanceof ee(e).Element : !1;
|
|
2488
|
+
}
|
|
2489
|
+
function me(e) {
|
|
2490
|
+
return dt() ? e instanceof HTMLElement || e instanceof ee(e).HTMLElement : !1;
|
|
2491
|
+
}
|
|
2492
|
+
function rn(e) {
|
|
2493
|
+
return !dt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ee(e).ShadowRoot;
|
|
2494
|
+
}
|
|
2495
|
+
function Ze(e) {
|
|
2496
|
+
const {
|
|
2497
|
+
overflow: t,
|
|
2498
|
+
overflowX: n,
|
|
2499
|
+
overflowY: l,
|
|
2500
|
+
display: r
|
|
2501
|
+
} = ue(e);
|
|
2502
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + l + n) && !["inline", "contents"].includes(r);
|
|
2503
|
+
}
|
|
2504
|
+
function lo(e) {
|
|
2505
|
+
return ["table", "td", "th"].includes(ke(e));
|
|
2506
|
+
}
|
|
2507
|
+
function ft(e) {
|
|
2508
|
+
return [":popover-open", ":modal"].some((t) => {
|
|
2509
|
+
try {
|
|
2510
|
+
return e.matches(t);
|
|
2511
|
+
} catch {
|
|
2512
|
+
return !1;
|
|
2513
|
+
}
|
|
2514
|
+
});
|
|
2515
|
+
}
|
|
2516
|
+
function Vt(e) {
|
|
2517
|
+
const t = It(), n = se(e) ? ue(e) : e;
|
|
2518
|
+
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));
|
|
2519
|
+
}
|
|
2520
|
+
function ro(e) {
|
|
2521
|
+
let t = $e(e);
|
|
2522
|
+
for (; me(t) && !Fe(t); ) {
|
|
2523
|
+
if (Vt(t))
|
|
2524
|
+
return t;
|
|
2525
|
+
if (ft(t))
|
|
2526
|
+
return null;
|
|
2527
|
+
t = $e(t);
|
|
2528
|
+
}
|
|
2529
|
+
return null;
|
|
2530
|
+
}
|
|
2531
|
+
function It() {
|
|
2532
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
2533
|
+
}
|
|
2534
|
+
function Fe(e) {
|
|
2535
|
+
return ["html", "body", "#document"].includes(ke(e));
|
|
2536
|
+
}
|
|
2537
|
+
function ue(e) {
|
|
2538
|
+
return ee(e).getComputedStyle(e);
|
|
2539
|
+
}
|
|
2540
|
+
function vt(e) {
|
|
2541
|
+
return se(e) ? {
|
|
2542
|
+
scrollLeft: e.scrollLeft,
|
|
2543
|
+
scrollTop: e.scrollTop
|
|
2544
|
+
} : {
|
|
2545
|
+
scrollLeft: e.scrollX,
|
|
2546
|
+
scrollTop: e.scrollY
|
|
2547
|
+
};
|
|
2548
|
+
}
|
|
2549
|
+
function $e(e) {
|
|
2550
|
+
if (ke(e) === "html")
|
|
2551
|
+
return e;
|
|
2552
|
+
const t = (
|
|
2553
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
2554
|
+
e.assignedSlot || // DOM Element detected.
|
|
2555
|
+
e.parentNode || // ShadowRoot detected.
|
|
2556
|
+
rn(e) && e.host || // Fallback.
|
|
2557
|
+
ge(e)
|
|
2558
|
+
);
|
|
2559
|
+
return rn(t) ? t.host : t;
|
|
2560
|
+
}
|
|
2561
|
+
function Hn(e) {
|
|
2562
|
+
const t = $e(e);
|
|
2563
|
+
return Fe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : me(t) && Ze(t) ? t : Hn(t);
|
|
2564
|
+
}
|
|
2565
|
+
function ze(e, t, n) {
|
|
2566
|
+
var l;
|
|
2567
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
2568
|
+
const r = Hn(e), o = r === ((l = e.ownerDocument) == null ? void 0 : l.body), i = ee(r);
|
|
2569
|
+
if (o) {
|
|
2570
|
+
const a = Tt(i);
|
|
2571
|
+
return t.concat(i, i.visualViewport || [], Ze(r) ? r : [], a && n ? ze(a) : []);
|
|
2572
|
+
}
|
|
2573
|
+
return t.concat(r, ze(r, [], n));
|
|
2574
|
+
}
|
|
2575
|
+
function Tt(e) {
|
|
2576
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
2577
|
+
}
|
|
2578
|
+
function Vn(e) {
|
|
2579
|
+
const t = ue(e);
|
|
2580
|
+
let n = parseFloat(t.width) || 0, l = parseFloat(t.height) || 0;
|
|
2581
|
+
const r = me(e), o = r ? e.offsetWidth : n, i = r ? e.offsetHeight : l, a = st(n) !== o || st(l) !== i;
|
|
2582
|
+
return a && (n = o, l = i), {
|
|
2583
|
+
width: n,
|
|
2584
|
+
height: l,
|
|
2585
|
+
$: a
|
|
2586
|
+
};
|
|
2587
|
+
}
|
|
2588
|
+
function Wt(e) {
|
|
2589
|
+
return se(e) ? e : e.contextElement;
|
|
2590
|
+
}
|
|
2591
|
+
function Re(e) {
|
|
2592
|
+
const t = Wt(e);
|
|
2593
|
+
if (!me(t))
|
|
2594
|
+
return fe(1);
|
|
2595
|
+
const n = t.getBoundingClientRect(), {
|
|
2596
|
+
width: l,
|
|
2597
|
+
height: r,
|
|
2598
|
+
$: o
|
|
2599
|
+
} = Vn(t);
|
|
2600
|
+
let i = (o ? st(n.width) : n.width) / l, a = (o ? st(n.height) : n.height) / r;
|
|
2601
|
+
return (!i || !Number.isFinite(i)) && (i = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
2602
|
+
x: i,
|
|
2603
|
+
y: a
|
|
2604
|
+
};
|
|
2605
|
+
}
|
|
2606
|
+
const oo = /* @__PURE__ */ fe(0);
|
|
2607
|
+
function In(e) {
|
|
2608
|
+
const t = ee(e);
|
|
2609
|
+
return !It() || !t.visualViewport ? oo : {
|
|
2610
|
+
x: t.visualViewport.offsetLeft,
|
|
2611
|
+
y: t.visualViewport.offsetTop
|
|
2612
|
+
};
|
|
2613
|
+
}
|
|
2614
|
+
function io(e, t, n) {
|
|
2615
|
+
return t === void 0 && (t = !1), !n || t && n !== ee(e) ? !1 : t;
|
|
2616
|
+
}
|
|
2617
|
+
function Ce(e, t, n, l) {
|
|
2618
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2619
|
+
const r = e.getBoundingClientRect(), o = Wt(e);
|
|
2620
|
+
let i = fe(1);
|
|
2621
|
+
t && (l ? se(l) && (i = Re(l)) : i = Re(e));
|
|
2622
|
+
const a = io(o, n, l) ? In(o) : fe(0);
|
|
2623
|
+
let c = (r.left + a.x) / i.x, s = (r.top + a.y) / i.y, u = r.width / i.x, d = r.height / i.y;
|
|
2624
|
+
if (o) {
|
|
2625
|
+
const f = ee(o), v = l && se(l) ? ee(l) : l;
|
|
2626
|
+
let p = f, m = Tt(p);
|
|
2627
|
+
for (; m && l && v !== p; ) {
|
|
2628
|
+
const h = Re(m), y = m.getBoundingClientRect(), g = ue(m), w = y.left + (m.clientLeft + parseFloat(g.paddingLeft)) * h.x, T = y.top + (m.clientTop + parseFloat(g.paddingTop)) * h.y;
|
|
2629
|
+
c *= h.x, s *= h.y, u *= h.x, d *= h.y, c += w, s += T, p = ee(m), m = Tt(p);
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
return ut({
|
|
2633
|
+
width: u,
|
|
2634
|
+
height: d,
|
|
2635
|
+
x: c,
|
|
2636
|
+
y: s
|
|
2637
|
+
});
|
|
2638
|
+
}
|
|
2639
|
+
function Ut(e, t) {
|
|
2640
|
+
const n = vt(e).scrollLeft;
|
|
2641
|
+
return t ? t.left + n : Ce(ge(e)).left + n;
|
|
2642
|
+
}
|
|
2643
|
+
function Wn(e, t, n) {
|
|
2644
|
+
n === void 0 && (n = !1);
|
|
2645
|
+
const l = e.getBoundingClientRect(), r = l.left + t.scrollLeft - (n ? 0 : (
|
|
2646
|
+
// RTL <body> scrollbar.
|
|
2647
|
+
Ut(e, l)
|
|
2648
|
+
)), o = l.top + t.scrollTop;
|
|
2649
|
+
return {
|
|
2650
|
+
x: r,
|
|
2651
|
+
y: o
|
|
2652
|
+
};
|
|
2653
|
+
}
|
|
2654
|
+
function ao(e) {
|
|
2655
|
+
let {
|
|
2656
|
+
elements: t,
|
|
2657
|
+
rect: n,
|
|
2658
|
+
offsetParent: l,
|
|
2659
|
+
strategy: r
|
|
2660
|
+
} = e;
|
|
2661
|
+
const o = r === "fixed", i = ge(l), a = t ? ft(t.floating) : !1;
|
|
2662
|
+
if (l === i || a && o)
|
|
2663
|
+
return n;
|
|
2664
|
+
let c = {
|
|
2665
|
+
scrollLeft: 0,
|
|
2666
|
+
scrollTop: 0
|
|
2667
|
+
}, s = fe(1);
|
|
2668
|
+
const u = fe(0), d = me(l);
|
|
2669
|
+
if ((d || !d && !o) && ((ke(l) !== "body" || Ze(i)) && (c = vt(l)), me(l))) {
|
|
2670
|
+
const v = Ce(l);
|
|
2671
|
+
s = Re(l), u.x = v.x + l.clientLeft, u.y = v.y + l.clientTop;
|
|
2672
|
+
}
|
|
2673
|
+
const f = i && !d && !o ? Wn(i, c, !0) : fe(0);
|
|
2674
|
+
return {
|
|
2675
|
+
width: n.width * s.x,
|
|
2676
|
+
height: n.height * s.y,
|
|
2677
|
+
x: n.x * s.x - c.scrollLeft * s.x + u.x + f.x,
|
|
2678
|
+
y: n.y * s.y - c.scrollTop * s.y + u.y + f.y
|
|
2679
|
+
};
|
|
2680
|
+
}
|
|
2681
|
+
function so(e) {
|
|
2682
|
+
return Array.from(e.getClientRects());
|
|
2683
|
+
}
|
|
2684
|
+
function uo(e) {
|
|
2685
|
+
const t = ge(e), n = vt(e), l = e.ownerDocument.body, r = J(t.scrollWidth, t.clientWidth, l.scrollWidth, l.clientWidth), o = J(t.scrollHeight, t.clientHeight, l.scrollHeight, l.clientHeight);
|
|
2686
|
+
let i = -n.scrollLeft + Ut(e);
|
|
2687
|
+
const a = -n.scrollTop;
|
|
2688
|
+
return ue(l).direction === "rtl" && (i += J(t.clientWidth, l.clientWidth) - r), {
|
|
2689
|
+
width: r,
|
|
2690
|
+
height: o,
|
|
2691
|
+
x: i,
|
|
2692
|
+
y: a
|
|
2693
|
+
};
|
|
2694
|
+
}
|
|
2695
|
+
function co(e, t) {
|
|
2696
|
+
const n = ee(e), l = ge(e), r = n.visualViewport;
|
|
2697
|
+
let o = l.clientWidth, i = l.clientHeight, a = 0, c = 0;
|
|
2698
|
+
if (r) {
|
|
2699
|
+
o = r.width, i = r.height;
|
|
2700
|
+
const s = It();
|
|
2701
|
+
(!s || s && t === "fixed") && (a = r.offsetLeft, c = r.offsetTop);
|
|
2702
|
+
}
|
|
2703
|
+
return {
|
|
2704
|
+
width: o,
|
|
2705
|
+
height: i,
|
|
2706
|
+
x: a,
|
|
2707
|
+
y: c
|
|
2708
|
+
};
|
|
2709
|
+
}
|
|
2710
|
+
function fo(e, t) {
|
|
2711
|
+
const n = Ce(e, !0, t === "fixed"), l = n.top + e.clientTop, r = n.left + e.clientLeft, o = me(e) ? Re(e) : fe(1), i = e.clientWidth * o.x, a = e.clientHeight * o.y, c = r * o.x, s = l * o.y;
|
|
2712
|
+
return {
|
|
2713
|
+
width: i,
|
|
2714
|
+
height: a,
|
|
2715
|
+
x: c,
|
|
2716
|
+
y: s
|
|
2717
|
+
};
|
|
2718
|
+
}
|
|
2719
|
+
function on(e, t, n) {
|
|
2720
|
+
let l;
|
|
2721
|
+
if (t === "viewport")
|
|
2722
|
+
l = co(e, n);
|
|
2723
|
+
else if (t === "document")
|
|
2724
|
+
l = uo(ge(e));
|
|
2725
|
+
else if (se(t))
|
|
2726
|
+
l = fo(t, n);
|
|
2727
|
+
else {
|
|
2728
|
+
const r = In(e);
|
|
2729
|
+
l = {
|
|
2730
|
+
x: t.x - r.x,
|
|
2731
|
+
y: t.y - r.y,
|
|
2732
|
+
width: t.width,
|
|
2733
|
+
height: t.height
|
|
2734
|
+
};
|
|
2735
|
+
}
|
|
2736
|
+
return ut(l);
|
|
2737
|
+
}
|
|
2738
|
+
function Un(e, t) {
|
|
2739
|
+
const n = $e(e);
|
|
2740
|
+
return n === t || !se(n) || Fe(n) ? !1 : ue(n).position === "fixed" || Un(n, t);
|
|
2741
|
+
}
|
|
2742
|
+
function vo(e, t) {
|
|
2743
|
+
const n = t.get(e);
|
|
2744
|
+
if (n)
|
|
2745
|
+
return n;
|
|
2746
|
+
let l = ze(e, [], !1).filter((a) => se(a) && ke(a) !== "body"), r = null;
|
|
2747
|
+
const o = ue(e).position === "fixed";
|
|
2748
|
+
let i = o ? $e(e) : e;
|
|
2749
|
+
for (; se(i) && !Fe(i); ) {
|
|
2750
|
+
const a = ue(i), c = Vt(i);
|
|
2751
|
+
!c && a.position === "fixed" && (r = null), (o ? !c && !r : !c && a.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || Ze(i) && !c && Un(e, i)) ? l = l.filter((u) => u !== i) : r = a, i = $e(i);
|
|
2752
|
+
}
|
|
2753
|
+
return t.set(e, l), l;
|
|
2754
|
+
}
|
|
2755
|
+
function po(e) {
|
|
2756
|
+
let {
|
|
2757
|
+
element: t,
|
|
2758
|
+
boundary: n,
|
|
2759
|
+
rootBoundary: l,
|
|
2760
|
+
strategy: r
|
|
2761
|
+
} = e;
|
|
2762
|
+
const i = [...n === "clippingAncestors" ? ft(t) ? [] : vo(t, this._c) : [].concat(n), l], a = i[0], c = i.reduce((s, u) => {
|
|
2763
|
+
const d = on(t, u, r);
|
|
2764
|
+
return s.top = J(d.top, s.top), s.right = xe(d.right, s.right), s.bottom = xe(d.bottom, s.bottom), s.left = J(d.left, s.left), s;
|
|
2765
|
+
}, on(t, a, r));
|
|
2766
|
+
return {
|
|
2767
|
+
width: c.right - c.left,
|
|
2768
|
+
height: c.bottom - c.top,
|
|
2769
|
+
x: c.left,
|
|
2770
|
+
y: c.top
|
|
2771
|
+
};
|
|
2772
|
+
}
|
|
2773
|
+
function mo(e) {
|
|
2774
|
+
const {
|
|
2775
|
+
width: t,
|
|
2776
|
+
height: n
|
|
2777
|
+
} = Vn(e);
|
|
2778
|
+
return {
|
|
2779
|
+
width: t,
|
|
2780
|
+
height: n
|
|
2781
|
+
};
|
|
2782
|
+
}
|
|
2783
|
+
function go(e, t, n) {
|
|
2784
|
+
const l = me(t), r = ge(t), o = n === "fixed", i = Ce(e, !0, o, t);
|
|
2785
|
+
let a = {
|
|
2786
|
+
scrollLeft: 0,
|
|
2787
|
+
scrollTop: 0
|
|
2788
|
+
};
|
|
2789
|
+
const c = fe(0);
|
|
2790
|
+
if (l || !l && !o)
|
|
2791
|
+
if ((ke(t) !== "body" || Ze(r)) && (a = vt(t)), l) {
|
|
2792
|
+
const f = Ce(t, !0, o, t);
|
|
2793
|
+
c.x = f.x + t.clientLeft, c.y = f.y + t.clientTop;
|
|
2794
|
+
} else r && (c.x = Ut(r));
|
|
2795
|
+
const s = r && !l && !o ? Wn(r, a) : fe(0), u = i.left + a.scrollLeft - c.x - s.x, d = i.top + a.scrollTop - c.y - s.y;
|
|
2796
|
+
return {
|
|
2797
|
+
x: u,
|
|
2798
|
+
y: d,
|
|
2799
|
+
width: i.width,
|
|
2800
|
+
height: i.height
|
|
2801
|
+
};
|
|
2802
|
+
}
|
|
2803
|
+
function yt(e) {
|
|
2804
|
+
return ue(e).position === "static";
|
|
2805
|
+
}
|
|
2806
|
+
function an(e, t) {
|
|
2807
|
+
if (!me(e) || ue(e).position === "fixed")
|
|
2808
|
+
return null;
|
|
2809
|
+
if (t)
|
|
2810
|
+
return t(e);
|
|
2811
|
+
let n = e.offsetParent;
|
|
2812
|
+
return ge(e) === n && (n = n.ownerDocument.body), n;
|
|
2813
|
+
}
|
|
2814
|
+
function zn(e, t) {
|
|
2815
|
+
const n = ee(e);
|
|
2816
|
+
if (ft(e))
|
|
2817
|
+
return n;
|
|
2818
|
+
if (!me(e)) {
|
|
2819
|
+
let r = $e(e);
|
|
2820
|
+
for (; r && !Fe(r); ) {
|
|
2821
|
+
if (se(r) && !yt(r))
|
|
2822
|
+
return r;
|
|
2823
|
+
r = $e(r);
|
|
2824
|
+
}
|
|
2825
|
+
return n;
|
|
2826
|
+
}
|
|
2827
|
+
let l = an(e, t);
|
|
2828
|
+
for (; l && lo(l) && yt(l); )
|
|
2829
|
+
l = an(l, t);
|
|
2830
|
+
return l && Fe(l) && yt(l) && !Vt(l) ? n : l || ro(e) || n;
|
|
2831
|
+
}
|
|
2832
|
+
const ho = async function(e) {
|
|
2833
|
+
const t = this.getOffsetParent || zn, n = this.getDimensions, l = await n(e.floating);
|
|
2834
|
+
return {
|
|
2835
|
+
reference: go(e.reference, await t(e.floating), e.strategy),
|
|
2836
|
+
floating: {
|
|
2837
|
+
x: 0,
|
|
2838
|
+
y: 0,
|
|
2839
|
+
width: l.width,
|
|
2840
|
+
height: l.height
|
|
2841
|
+
}
|
|
2842
|
+
};
|
|
2843
|
+
};
|
|
2844
|
+
function yo(e) {
|
|
2845
|
+
return ue(e).direction === "rtl";
|
|
2846
|
+
}
|
|
2847
|
+
const bo = {
|
|
2848
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ao,
|
|
2849
|
+
getDocumentElement: ge,
|
|
2850
|
+
getClippingRect: po,
|
|
2851
|
+
getOffsetParent: zn,
|
|
2852
|
+
getElementRects: ho,
|
|
2853
|
+
getClientRects: so,
|
|
2854
|
+
getDimensions: mo,
|
|
2855
|
+
getScale: Re,
|
|
2856
|
+
isElement: se,
|
|
2857
|
+
isRTL: yo
|
|
2858
|
+
};
|
|
2859
|
+
function wo(e, t) {
|
|
2860
|
+
let n = null, l;
|
|
2861
|
+
const r = ge(e);
|
|
2862
|
+
function o() {
|
|
2863
|
+
var a;
|
|
2864
|
+
clearTimeout(l), (a = n) == null || a.disconnect(), n = null;
|
|
2865
|
+
}
|
|
2866
|
+
function i(a, c) {
|
|
2867
|
+
a === void 0 && (a = !1), c === void 0 && (c = 1), o();
|
|
2868
|
+
const {
|
|
2869
|
+
left: s,
|
|
2870
|
+
top: u,
|
|
2871
|
+
width: d,
|
|
2872
|
+
height: f
|
|
2873
|
+
} = e.getBoundingClientRect();
|
|
2874
|
+
if (a || t(), !d || !f)
|
|
2875
|
+
return;
|
|
2876
|
+
const v = tt(u), p = tt(r.clientWidth - (s + d)), m = tt(r.clientHeight - (u + f)), h = tt(s), g = {
|
|
2877
|
+
rootMargin: -v + "px " + -p + "px " + -m + "px " + -h + "px",
|
|
2878
|
+
threshold: J(0, xe(1, c)) || 1
|
|
2879
|
+
};
|
|
2880
|
+
let w = !0;
|
|
2881
|
+
function T(L) {
|
|
2882
|
+
const P = L[0].intersectionRatio;
|
|
2883
|
+
if (P !== c) {
|
|
2884
|
+
if (!w)
|
|
2885
|
+
return i();
|
|
2886
|
+
P ? i(!1, P) : l = setTimeout(() => {
|
|
2887
|
+
i(!1, 1e-7);
|
|
2888
|
+
}, 1e3);
|
|
2889
|
+
}
|
|
2890
|
+
w = !1;
|
|
2891
|
+
}
|
|
2892
|
+
try {
|
|
2893
|
+
n = new IntersectionObserver(T, {
|
|
2894
|
+
...g,
|
|
2895
|
+
// Handle <iframe>s
|
|
2896
|
+
root: r.ownerDocument
|
|
2897
|
+
});
|
|
2898
|
+
} catch {
|
|
2899
|
+
n = new IntersectionObserver(T, g);
|
|
2900
|
+
}
|
|
2901
|
+
n.observe(e);
|
|
2902
|
+
}
|
|
2903
|
+
return i(!0), o;
|
|
2904
|
+
}
|
|
2905
|
+
function xo(e, t, n, l) {
|
|
2906
|
+
l === void 0 && (l = {});
|
|
2907
|
+
const {
|
|
2908
|
+
ancestorScroll: r = !0,
|
|
2909
|
+
ancestorResize: o = !0,
|
|
2910
|
+
elementResize: i = typeof ResizeObserver == "function",
|
|
2911
|
+
layoutShift: a = typeof IntersectionObserver == "function",
|
|
2912
|
+
animationFrame: c = !1
|
|
2913
|
+
} = l, s = Wt(e), u = r || o ? [...s ? ze(s) : [], ...ze(t)] : [];
|
|
2914
|
+
u.forEach((y) => {
|
|
2915
|
+
r && y.addEventListener("scroll", n, {
|
|
2916
|
+
passive: !0
|
|
2917
|
+
}), o && y.addEventListener("resize", n);
|
|
2918
|
+
});
|
|
2919
|
+
const d = s && a ? wo(s, n) : null;
|
|
2920
|
+
let f = -1, v = null;
|
|
2921
|
+
i && (v = new ResizeObserver((y) => {
|
|
2922
|
+
let [g] = y;
|
|
2923
|
+
g && g.target === s && v && (v.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
2924
|
+
var w;
|
|
2925
|
+
(w = v) == null || w.observe(t);
|
|
2926
|
+
})), n();
|
|
2927
|
+
}), s && !c && v.observe(s), v.observe(t));
|
|
2928
|
+
let p, m = c ? Ce(e) : null;
|
|
2929
|
+
c && h();
|
|
2930
|
+
function h() {
|
|
2931
|
+
const y = Ce(e);
|
|
2932
|
+
m && (y.x !== m.x || y.y !== m.y || y.width !== m.width || y.height !== m.height) && n(), m = y, p = requestAnimationFrame(h);
|
|
2933
|
+
}
|
|
2934
|
+
return n(), () => {
|
|
2935
|
+
var y;
|
|
2936
|
+
u.forEach((g) => {
|
|
2937
|
+
r && g.removeEventListener("scroll", n), o && g.removeEventListener("resize", n);
|
|
2938
|
+
}), d == null || d(), (y = v) == null || y.disconnect(), v = null, c && cancelAnimationFrame(p);
|
|
2939
|
+
};
|
|
2940
|
+
}
|
|
2941
|
+
const $o = eo, So = Jr, Eo = to, Oo = no, Lo = Zr, To = (e, t, n) => {
|
|
2942
|
+
const l = /* @__PURE__ */ new Map(), r = {
|
|
2943
|
+
platform: bo,
|
|
2944
|
+
...n
|
|
2945
|
+
}, o = {
|
|
2946
|
+
...r.platform,
|
|
2947
|
+
_c: l
|
|
2948
|
+
};
|
|
2949
|
+
return Xr(e, t, {
|
|
2950
|
+
...r,
|
|
2951
|
+
platform: o
|
|
2952
|
+
});
|
|
2953
|
+
};
|
|
2954
|
+
function Co(e) {
|
|
2955
|
+
return e != null && typeof e == "object" && "$el" in e;
|
|
2956
|
+
}
|
|
2957
|
+
function Ct(e) {
|
|
2958
|
+
if (Co(e)) {
|
|
2959
|
+
const t = e.$el;
|
|
2960
|
+
return Ht(t) && ke(t) === "#comment" ? null : t;
|
|
2961
|
+
}
|
|
2962
|
+
return e;
|
|
2963
|
+
}
|
|
2964
|
+
function De(e) {
|
|
2965
|
+
return typeof e == "function" ? e() : S(e);
|
|
2966
|
+
}
|
|
2967
|
+
function Ao(e) {
|
|
2968
|
+
return {
|
|
2969
|
+
name: "arrow",
|
|
2970
|
+
options: e,
|
|
2971
|
+
fn(t) {
|
|
2972
|
+
const n = Ct(De(e.element));
|
|
2973
|
+
return n == null ? {} : Lo({
|
|
2974
|
+
element: n,
|
|
2975
|
+
padding: e.padding
|
|
2976
|
+
}).fn(t);
|
|
2977
|
+
}
|
|
2978
|
+
};
|
|
2979
|
+
}
|
|
2980
|
+
function qn(e) {
|
|
2981
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2982
|
+
}
|
|
2983
|
+
function sn(e, t) {
|
|
2984
|
+
const n = qn(e);
|
|
2985
|
+
return Math.round(t * n) / n;
|
|
2986
|
+
}
|
|
2987
|
+
function ko(e, t, n) {
|
|
2988
|
+
n === void 0 && (n = {});
|
|
2989
|
+
const l = n.whileElementsMounted, r = b(() => {
|
|
2990
|
+
var O;
|
|
2991
|
+
return (O = De(n.open)) != null ? O : !0;
|
|
2992
|
+
}), o = b(() => De(n.middleware)), i = b(() => {
|
|
2993
|
+
var O;
|
|
2994
|
+
return (O = De(n.placement)) != null ? O : "bottom";
|
|
2995
|
+
}), a = b(() => {
|
|
2996
|
+
var O;
|
|
2997
|
+
return (O = De(n.strategy)) != null ? O : "absolute";
|
|
2998
|
+
}), c = b(() => {
|
|
2999
|
+
var O;
|
|
3000
|
+
return (O = De(n.transform)) != null ? O : !0;
|
|
3001
|
+
}), s = b(() => Ct(e.value)), u = b(() => Ct(t.value)), d = $(0), f = $(0), v = $(a.value), p = $(i.value), m = Ve({}), h = $(!1), y = b(() => {
|
|
3002
|
+
const O = {
|
|
3003
|
+
position: v.value,
|
|
3004
|
+
left: "0",
|
|
3005
|
+
top: "0"
|
|
3006
|
+
};
|
|
3007
|
+
if (!u.value)
|
|
3008
|
+
return O;
|
|
3009
|
+
const R = sn(u.value, d.value), U = sn(u.value, f.value);
|
|
3010
|
+
return c.value ? {
|
|
3011
|
+
...O,
|
|
3012
|
+
transform: "translate(" + R + "px, " + U + "px)",
|
|
3013
|
+
...qn(u.value) >= 1.5 && {
|
|
3014
|
+
willChange: "transform"
|
|
3015
|
+
}
|
|
3016
|
+
} : {
|
|
3017
|
+
position: v.value,
|
|
3018
|
+
left: R + "px",
|
|
3019
|
+
top: U + "px"
|
|
3020
|
+
};
|
|
3021
|
+
});
|
|
3022
|
+
let g;
|
|
3023
|
+
function w() {
|
|
3024
|
+
if (s.value == null || u.value == null)
|
|
3025
|
+
return;
|
|
3026
|
+
const O = r.value;
|
|
3027
|
+
To(s.value, u.value, {
|
|
3028
|
+
middleware: o.value,
|
|
3029
|
+
placement: i.value,
|
|
3030
|
+
strategy: a.value
|
|
3031
|
+
}).then((R) => {
|
|
3032
|
+
d.value = R.x, f.value = R.y, v.value = R.strategy, p.value = R.placement, m.value = R.middlewareData, h.value = O !== !1;
|
|
3033
|
+
});
|
|
3034
|
+
}
|
|
3035
|
+
function T() {
|
|
3036
|
+
typeof g == "function" && (g(), g = void 0);
|
|
3037
|
+
}
|
|
3038
|
+
function L() {
|
|
3039
|
+
if (T(), l === void 0) {
|
|
3040
|
+
w();
|
|
3041
|
+
return;
|
|
3042
|
+
}
|
|
3043
|
+
if (s.value != null && u.value != null) {
|
|
3044
|
+
g = l(s.value, u.value, w);
|
|
3045
|
+
return;
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
function P() {
|
|
3049
|
+
r.value || (h.value = !1);
|
|
3050
|
+
}
|
|
3051
|
+
return de([o, i, a, r], w, {
|
|
3052
|
+
flush: "sync"
|
|
3053
|
+
}), de([s, u], L, {
|
|
3054
|
+
flush: "sync"
|
|
3055
|
+
}), de(r, P, {
|
|
3056
|
+
flush: "sync"
|
|
3057
|
+
}), _n() && el(T), {
|
|
3058
|
+
x: Pe(d),
|
|
3059
|
+
y: Pe(f),
|
|
3060
|
+
strategy: Pe(v),
|
|
3061
|
+
placement: Pe(p),
|
|
3062
|
+
middlewareData: Pe(m),
|
|
3063
|
+
isPositioned: Pe(h),
|
|
3064
|
+
floatingStyles: y,
|
|
3065
|
+
update: w
|
|
3066
|
+
};
|
|
3067
|
+
}
|
|
3068
|
+
const Po = ["innerHTML"], Wo = {
|
|
3069
|
+
__name: "Tooltip",
|
|
3070
|
+
props: {
|
|
3071
|
+
content: {
|
|
3072
|
+
type: String,
|
|
3073
|
+
required: !0
|
|
3074
|
+
},
|
|
3075
|
+
blur: {
|
|
3076
|
+
type: Boolean,
|
|
3077
|
+
default: !0
|
|
3078
|
+
},
|
|
3079
|
+
maxWidth: {
|
|
3080
|
+
type: Number,
|
|
3081
|
+
default: null
|
|
3082
|
+
},
|
|
3083
|
+
tooltipClass: {
|
|
3084
|
+
type: String,
|
|
3085
|
+
default: ""
|
|
3086
|
+
},
|
|
3087
|
+
placement: {
|
|
3088
|
+
type: String,
|
|
3089
|
+
default: void 0,
|
|
3090
|
+
validator: (e) => e === void 0 || [
|
|
3091
|
+
"top",
|
|
3092
|
+
"right",
|
|
3093
|
+
"bottom",
|
|
3094
|
+
"left",
|
|
3095
|
+
"top-start",
|
|
3096
|
+
"top-end",
|
|
3097
|
+
"right-start",
|
|
3098
|
+
"right-end",
|
|
3099
|
+
"bottom-start",
|
|
3100
|
+
"bottom-end",
|
|
3101
|
+
"left-start",
|
|
3102
|
+
"left-end"
|
|
3103
|
+
].includes(e)
|
|
3104
|
+
}
|
|
3105
|
+
},
|
|
3106
|
+
setup(e) {
|
|
3107
|
+
const t = e, n = Ve(), l = Ve(), r = Ve(), {
|
|
3108
|
+
floatingStyles: o,
|
|
3109
|
+
middlewareData: i,
|
|
3110
|
+
placement: a
|
|
3111
|
+
} = ko(n, l, {
|
|
3112
|
+
middleware: [
|
|
3113
|
+
t.placement ? null : So(),
|
|
3114
|
+
$o(10),
|
|
3115
|
+
Eo({ crossAxis: !0, padding: 5 }),
|
|
3116
|
+
Ao({ element: r }),
|
|
3117
|
+
Oo({
|
|
3118
|
+
apply({ availableWidth: u, availableHeight: d, elements: f }) {
|
|
3119
|
+
Object.assign(f.floating.style, {
|
|
3120
|
+
maxWidth: t.maxWidth ? `${Math.min(u, t.maxWidth) / 16}rem` : "",
|
|
3121
|
+
maxHeight: `${d / 16}rem `
|
|
3122
|
+
});
|
|
3123
|
+
}
|
|
3124
|
+
})
|
|
3125
|
+
],
|
|
3126
|
+
whileElementsMounted: xo,
|
|
3127
|
+
placement: t.placement
|
|
3128
|
+
}), c = (u) => ({
|
|
3129
|
+
top: 0,
|
|
3130
|
+
bottom: 180,
|
|
3131
|
+
left: -90,
|
|
3132
|
+
right: 90
|
|
3133
|
+
})[u.split("-")[0]] || 0, s = (u) => {
|
|
3134
|
+
var v, p;
|
|
3135
|
+
const d = a.value.split("-")[0], f = {
|
|
3136
|
+
left: "right",
|
|
3137
|
+
right: "left",
|
|
3138
|
+
bottom: "top",
|
|
3139
|
+
top: "bottom"
|
|
3140
|
+
}[d];
|
|
3141
|
+
return {
|
|
3142
|
+
style: {
|
|
3143
|
+
left: (v = u.arrow) != null && v.x ? `${u.arrow.x}px` : "",
|
|
3144
|
+
top: (p = u.arrow) != null && p.y ? `${u.arrow.y}px` : "",
|
|
3145
|
+
bottom: "",
|
|
3146
|
+
right: "",
|
|
3147
|
+
[f]: r.value ? `${r.value.offsetWidth * -1}px` : "",
|
|
3148
|
+
transform: `rotate(${c(a.value)}deg)`
|
|
3149
|
+
}
|
|
3150
|
+
};
|
|
3151
|
+
};
|
|
3152
|
+
return (u, d) => (E(), k("div", {
|
|
3153
|
+
ref_key: "wrapperRef",
|
|
3154
|
+
ref: n,
|
|
3155
|
+
class: "rvc-group/tooltip"
|
|
3156
|
+
}, [
|
|
3157
|
+
C(u.$slots, "default"),
|
|
3158
|
+
x("div", {
|
|
3159
|
+
ref_key: "tooltipRef",
|
|
3160
|
+
ref: l,
|
|
3161
|
+
class: q(["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 }]),
|
|
3162
|
+
style: tl(S(o))
|
|
3163
|
+
}, [
|
|
3164
|
+
C(u.$slots, "content", { content: e.content }, () => [
|
|
3165
|
+
e.content ? (E(), k("div", {
|
|
3166
|
+
key: 0,
|
|
3167
|
+
innerHTML: e.content
|
|
3168
|
+
}, null, 8, Po)) : _("", !0)
|
|
3169
|
+
]),
|
|
3170
|
+
x("div", qe({
|
|
3171
|
+
ref_key: "arrowRef",
|
|
3172
|
+
ref: r,
|
|
3173
|
+
class: "rvc-absolute rvc-tooltip-arrow"
|
|
3174
|
+
}, s(S(i))), null, 16)
|
|
3175
|
+
], 6)
|
|
3176
|
+
], 512));
|
|
3177
|
+
}
|
|
1349
3178
|
};
|
|
1350
3179
|
export {
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
3180
|
+
Ro as Accordion,
|
|
3181
|
+
Fo as Alert,
|
|
3182
|
+
Bo as Badge,
|
|
3183
|
+
rt as ButtonBase,
|
|
3184
|
+
Mo as Checkbox,
|
|
3185
|
+
No as DataTable,
|
|
3186
|
+
Ho as Drawer,
|
|
3187
|
+
Vo as Lightswitch,
|
|
3188
|
+
Io as Modal,
|
|
3189
|
+
Wo as Tooltip
|
|
1355
3190
|
};
|