hanap-labs 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -0
- package/dist/chunks/{components-DtBY3GxM.js → components-BLnpbn6k.js} +2029 -999
- package/dist/chunks/{composables-BNZwN6Pf.js → composables-BE6lpC2t.js} +499 -514
- package/dist/chunks/usePopup-DVekAEps.js +1031 -0
- package/dist/components/index.js +2 -2
- package/dist/composables/index.js +3 -3
- package/dist/helpers/index.js +1 -1
- package/dist/index.js +1658 -1658
- package/dist/toolkit.css +1 -1
- package/dist/types/components/hl-datepicker/DatepickerButton.types.d.ts +5 -0
- package/dist/types/components/hl-datepicker/DatepickerGridButton.types.d.ts +9 -0
- package/dist/types/components/hl-datepicker/HLDatepicker.types.d.ts +17 -0
- package/dist/types/components/hl-datepicker/index.d.ts +2 -0
- package/dist/types/components/index.d.ts +1 -0
- package/package.json +4 -1
- package/dist/chunks/usePopup-DFoL8dhL.js +0 -1015
- /package/dist/chunks/{helpers-QkG7gR6t.js → helpers-CBknuK3h.js} +0 -0
|
@@ -0,0 +1,1031 @@
|
|
|
1
|
+
import { computed as e, markRaw as t, nextTick as n, onBeforeUnmount as r, ref as i, useId as a, watch as o } from "vue";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var s = Object.create, c = Object.defineProperty, l = Object.getOwnPropertyDescriptor, u = Object.getOwnPropertyNames, d = Object.getPrototypeOf, f = Object.prototype.hasOwnProperty, p = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), m = (e, t) => {
|
|
4
|
+
let n = {};
|
|
5
|
+
for (var r in e) c(n, r, {
|
|
6
|
+
get: e[r],
|
|
7
|
+
enumerable: !0
|
|
8
|
+
});
|
|
9
|
+
return t || c(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
10
|
+
}, h = (e, t, n, r) => {
|
|
11
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = u(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !f.call(e, s) && s !== n && c(e, s, {
|
|
12
|
+
get: ((e) => t[e]).bind(null, s),
|
|
13
|
+
enumerable: !(r = l(t, s)) || r.enumerable
|
|
14
|
+
});
|
|
15
|
+
return e;
|
|
16
|
+
}, g = (e, t, n) => (h(e, t, "default"), n && h(n, t, "default")), _ = (e, t, n) => (n = e == null ? {} : s(d(e)), h(t || !e || !e.__esModule ? c(n, "default", {
|
|
17
|
+
value: e,
|
|
18
|
+
enumerable: !0
|
|
19
|
+
}) : n, e)), v = Math.min, y = Math.max, b = Math.round, x = Math.floor, S = (e) => ({
|
|
20
|
+
x: e,
|
|
21
|
+
y: e
|
|
22
|
+
}), C = {
|
|
23
|
+
left: "right",
|
|
24
|
+
right: "left",
|
|
25
|
+
bottom: "top",
|
|
26
|
+
top: "bottom"
|
|
27
|
+
};
|
|
28
|
+
function w(e, t, n) {
|
|
29
|
+
return y(e, v(t, n));
|
|
30
|
+
}
|
|
31
|
+
function T(e, t) {
|
|
32
|
+
return typeof e == "function" ? e(t) : e;
|
|
33
|
+
}
|
|
34
|
+
function E(e) {
|
|
35
|
+
return e.split("-")[0];
|
|
36
|
+
}
|
|
37
|
+
function D(e) {
|
|
38
|
+
return e.split("-")[1];
|
|
39
|
+
}
|
|
40
|
+
function ee(e) {
|
|
41
|
+
return e === "x" ? "y" : "x";
|
|
42
|
+
}
|
|
43
|
+
function O(e) {
|
|
44
|
+
return e === "y" ? "height" : "width";
|
|
45
|
+
}
|
|
46
|
+
function k(e) {
|
|
47
|
+
let t = e[0];
|
|
48
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
49
|
+
}
|
|
50
|
+
function A(e) {
|
|
51
|
+
return ee(k(e));
|
|
52
|
+
}
|
|
53
|
+
function te(e, t, n) {
|
|
54
|
+
n === void 0 && (n = !1);
|
|
55
|
+
let r = D(e), i = A(e), a = O(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
56
|
+
return t.reference[a] > t.floating[a] && (o = M(o)), [o, M(o)];
|
|
57
|
+
}
|
|
58
|
+
function ne(e) {
|
|
59
|
+
let t = M(e);
|
|
60
|
+
return [
|
|
61
|
+
j(e),
|
|
62
|
+
t,
|
|
63
|
+
j(t)
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
function j(e) {
|
|
67
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
68
|
+
}
|
|
69
|
+
var re = ["left", "right"], ie = ["right", "left"], ae = ["top", "bottom"], oe = ["bottom", "top"];
|
|
70
|
+
function se(e, t, n) {
|
|
71
|
+
switch (e) {
|
|
72
|
+
case "top":
|
|
73
|
+
case "bottom": return n ? t ? ie : re : t ? re : ie;
|
|
74
|
+
case "left":
|
|
75
|
+
case "right": return t ? ae : oe;
|
|
76
|
+
default: return [];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function ce(e, t, n, r) {
|
|
80
|
+
let i = D(e), a = se(E(e), n === "start", r);
|
|
81
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(j)))), a;
|
|
82
|
+
}
|
|
83
|
+
function M(e) {
|
|
84
|
+
let t = E(e);
|
|
85
|
+
return C[t] + e.slice(t.length);
|
|
86
|
+
}
|
|
87
|
+
function le(e) {
|
|
88
|
+
return {
|
|
89
|
+
top: 0,
|
|
90
|
+
right: 0,
|
|
91
|
+
bottom: 0,
|
|
92
|
+
left: 0,
|
|
93
|
+
...e
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function ue(e) {
|
|
97
|
+
return typeof e == "number" ? {
|
|
98
|
+
top: e,
|
|
99
|
+
right: e,
|
|
100
|
+
bottom: e,
|
|
101
|
+
left: e
|
|
102
|
+
} : le(e);
|
|
103
|
+
}
|
|
104
|
+
function N(e) {
|
|
105
|
+
let { x: t, y: n, width: r, height: i } = e;
|
|
106
|
+
return {
|
|
107
|
+
width: r,
|
|
108
|
+
height: i,
|
|
109
|
+
top: n,
|
|
110
|
+
left: t,
|
|
111
|
+
right: t + r,
|
|
112
|
+
bottom: n + i,
|
|
113
|
+
x: t,
|
|
114
|
+
y: n
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
119
|
+
function de(e, t, n) {
|
|
120
|
+
let { reference: r, floating: i } = e, a = k(t), o = A(t), s = O(o), c = E(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
121
|
+
switch (c) {
|
|
122
|
+
case "top":
|
|
123
|
+
p = {
|
|
124
|
+
x: u,
|
|
125
|
+
y: r.y - i.height
|
|
126
|
+
};
|
|
127
|
+
break;
|
|
128
|
+
case "bottom":
|
|
129
|
+
p = {
|
|
130
|
+
x: u,
|
|
131
|
+
y: r.y + r.height
|
|
132
|
+
};
|
|
133
|
+
break;
|
|
134
|
+
case "right":
|
|
135
|
+
p = {
|
|
136
|
+
x: r.x + r.width,
|
|
137
|
+
y: d
|
|
138
|
+
};
|
|
139
|
+
break;
|
|
140
|
+
case "left":
|
|
141
|
+
p = {
|
|
142
|
+
x: r.x - i.width,
|
|
143
|
+
y: d
|
|
144
|
+
};
|
|
145
|
+
break;
|
|
146
|
+
default: p = {
|
|
147
|
+
x: r.x,
|
|
148
|
+
y: r.y
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
switch (D(t)) {
|
|
152
|
+
case "start":
|
|
153
|
+
p[o] -= f * (n && l ? -1 : 1);
|
|
154
|
+
break;
|
|
155
|
+
case "end":
|
|
156
|
+
p[o] += f * (n && l ? -1 : 1);
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
return p;
|
|
160
|
+
}
|
|
161
|
+
async function fe(e, t) {
|
|
162
|
+
t === void 0 && (t = {});
|
|
163
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = T(t, e), p = ue(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = N(await i.getClippingRect({
|
|
164
|
+
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
165
|
+
boundary: c,
|
|
166
|
+
rootBoundary: l,
|
|
167
|
+
strategy: s
|
|
168
|
+
})), g = u === "floating" ? {
|
|
169
|
+
x: n,
|
|
170
|
+
y: r,
|
|
171
|
+
width: a.floating.width,
|
|
172
|
+
height: a.floating.height
|
|
173
|
+
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
174
|
+
x: 1,
|
|
175
|
+
y: 1
|
|
176
|
+
}, y = N(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
177
|
+
elements: o,
|
|
178
|
+
rect: g,
|
|
179
|
+
offsetParent: _,
|
|
180
|
+
strategy: s
|
|
181
|
+
}) : g);
|
|
182
|
+
return {
|
|
183
|
+
top: (h.top - y.top + p.top) / v.y,
|
|
184
|
+
bottom: (y.bottom - h.bottom + p.bottom) / v.y,
|
|
185
|
+
left: (h.left - y.left + p.left) / v.x,
|
|
186
|
+
right: (y.right - h.right + p.right) / v.x
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
var pe = 50, me = async (e, t, n) => {
|
|
190
|
+
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
191
|
+
...o,
|
|
192
|
+
detectOverflow: fe
|
|
193
|
+
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
194
|
+
reference: e,
|
|
195
|
+
floating: t,
|
|
196
|
+
strategy: i
|
|
197
|
+
}), { x: u, y: d } = de(l, r, c), f = r, p = 0, m = {};
|
|
198
|
+
for (let n = 0; n < a.length; n++) {
|
|
199
|
+
let h = a[n];
|
|
200
|
+
if (!h) continue;
|
|
201
|
+
let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
|
|
202
|
+
x: u,
|
|
203
|
+
y: d,
|
|
204
|
+
initialPlacement: r,
|
|
205
|
+
placement: f,
|
|
206
|
+
strategy: i,
|
|
207
|
+
middlewareData: m,
|
|
208
|
+
rects: l,
|
|
209
|
+
platform: s,
|
|
210
|
+
elements: {
|
|
211
|
+
reference: e,
|
|
212
|
+
floating: t
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
u = v ?? u, d = y ?? d, m[g] = {
|
|
216
|
+
...m[g],
|
|
217
|
+
...b
|
|
218
|
+
}, x && p < pe && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
219
|
+
reference: e,
|
|
220
|
+
floating: t,
|
|
221
|
+
strategy: i
|
|
222
|
+
}) : x.rects), {x: u, y: d} = de(l, f, c)), n = -1);
|
|
223
|
+
}
|
|
224
|
+
return {
|
|
225
|
+
x: u,
|
|
226
|
+
y: d,
|
|
227
|
+
placement: f,
|
|
228
|
+
strategy: i,
|
|
229
|
+
middlewareData: m
|
|
230
|
+
};
|
|
231
|
+
}, he = function(e) {
|
|
232
|
+
return e === void 0 && (e = {}), {
|
|
233
|
+
name: "flip",
|
|
234
|
+
options: e,
|
|
235
|
+
async fn(t) {
|
|
236
|
+
var n;
|
|
237
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = T(e, t);
|
|
238
|
+
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
239
|
+
let g = E(r), _ = k(o), v = E(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [M(o)] : ne(o)), x = p !== "none";
|
|
240
|
+
!d && x && b.push(...ce(o, m, p, y));
|
|
241
|
+
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], D = i.flip?.overflows || [];
|
|
242
|
+
if (l && w.push(C[g]), u) {
|
|
243
|
+
let e = te(r, a, y);
|
|
244
|
+
w.push(C[e[0]], C[e[1]]);
|
|
245
|
+
}
|
|
246
|
+
if (D = [...D, {
|
|
247
|
+
placement: r,
|
|
248
|
+
overflows: w
|
|
249
|
+
}], !w.every((e) => e <= 0)) {
|
|
250
|
+
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
251
|
+
if (t && (!(u === "alignment" && _ !== k(t)) || D.every((e) => k(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
|
|
252
|
+
data: {
|
|
253
|
+
index: e,
|
|
254
|
+
overflows: D
|
|
255
|
+
},
|
|
256
|
+
reset: { placement: t }
|
|
257
|
+
};
|
|
258
|
+
let n = D.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
259
|
+
if (!n) switch (f) {
|
|
260
|
+
case "bestFit": {
|
|
261
|
+
let e = D.filter((e) => {
|
|
262
|
+
if (x) {
|
|
263
|
+
let t = k(e.placement);
|
|
264
|
+
return t === _ || t === "y";
|
|
265
|
+
}
|
|
266
|
+
return !0;
|
|
267
|
+
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
|
|
268
|
+
e && (n = e);
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
case "initialPlacement":
|
|
272
|
+
n = o;
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
if (r !== n) return { reset: { placement: n } };
|
|
276
|
+
}
|
|
277
|
+
return {};
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
}, ge = /* @__PURE__ */ new Set(["left", "top"]);
|
|
281
|
+
async function _e(e, t) {
|
|
282
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = E(n), s = D(n), c = k(n) === "y", l = ge.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = T(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
283
|
+
mainAxis: d,
|
|
284
|
+
crossAxis: 0,
|
|
285
|
+
alignmentAxis: null
|
|
286
|
+
} : {
|
|
287
|
+
mainAxis: d.mainAxis || 0,
|
|
288
|
+
crossAxis: d.crossAxis || 0,
|
|
289
|
+
alignmentAxis: d.alignmentAxis
|
|
290
|
+
};
|
|
291
|
+
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
|
|
292
|
+
x: p * u,
|
|
293
|
+
y: f * l
|
|
294
|
+
} : {
|
|
295
|
+
x: f * l,
|
|
296
|
+
y: p * u
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
var ve = function(e) {
|
|
300
|
+
return e === void 0 && (e = 0), {
|
|
301
|
+
name: "offset",
|
|
302
|
+
options: e,
|
|
303
|
+
async fn(t) {
|
|
304
|
+
var n;
|
|
305
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await _e(t, e);
|
|
306
|
+
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
307
|
+
x: r + s.x,
|
|
308
|
+
y: i + s.y,
|
|
309
|
+
data: {
|
|
310
|
+
...s,
|
|
311
|
+
placement: a
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
}, ye = function(e) {
|
|
317
|
+
return e === void 0 && (e = {}), {
|
|
318
|
+
name: "shift",
|
|
319
|
+
options: e,
|
|
320
|
+
async fn(t) {
|
|
321
|
+
let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
|
|
322
|
+
let { x: t, y: n } = e;
|
|
323
|
+
return {
|
|
324
|
+
x: t,
|
|
325
|
+
y: n
|
|
326
|
+
};
|
|
327
|
+
} }, ...l } = T(e, t), u = {
|
|
328
|
+
x: n,
|
|
329
|
+
y: r
|
|
330
|
+
}, d = await a.detectOverflow(t, l), f = k(E(i)), p = ee(f), m = u[p], h = u[f];
|
|
331
|
+
if (o) {
|
|
332
|
+
let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
|
|
333
|
+
m = w(n, m, r);
|
|
334
|
+
}
|
|
335
|
+
if (s) {
|
|
336
|
+
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
|
|
337
|
+
h = w(n, h, r);
|
|
338
|
+
}
|
|
339
|
+
let g = c.fn({
|
|
340
|
+
...t,
|
|
341
|
+
[p]: m,
|
|
342
|
+
[f]: h
|
|
343
|
+
});
|
|
344
|
+
return {
|
|
345
|
+
...g,
|
|
346
|
+
data: {
|
|
347
|
+
x: g.x - n,
|
|
348
|
+
y: g.y - r,
|
|
349
|
+
enabled: {
|
|
350
|
+
[p]: o,
|
|
351
|
+
[f]: s
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
360
|
+
function P() {
|
|
361
|
+
return typeof window < "u";
|
|
362
|
+
}
|
|
363
|
+
function F(e) {
|
|
364
|
+
return be(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
365
|
+
}
|
|
366
|
+
function I(e) {
|
|
367
|
+
var t;
|
|
368
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
369
|
+
}
|
|
370
|
+
function L(e) {
|
|
371
|
+
return ((be(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
372
|
+
}
|
|
373
|
+
function be(e) {
|
|
374
|
+
return P() ? e instanceof Node || e instanceof I(e).Node : !1;
|
|
375
|
+
}
|
|
376
|
+
function R(e) {
|
|
377
|
+
return P() ? e instanceof Element || e instanceof I(e).Element : !1;
|
|
378
|
+
}
|
|
379
|
+
function z(e) {
|
|
380
|
+
return P() ? e instanceof HTMLElement || e instanceof I(e).HTMLElement : !1;
|
|
381
|
+
}
|
|
382
|
+
function xe(e) {
|
|
383
|
+
return !P() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof I(e).ShadowRoot;
|
|
384
|
+
}
|
|
385
|
+
function B(e) {
|
|
386
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = W(e);
|
|
387
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
388
|
+
}
|
|
389
|
+
function Se(e) {
|
|
390
|
+
return /^(table|td|th)$/.test(F(e));
|
|
391
|
+
}
|
|
392
|
+
function V(e) {
|
|
393
|
+
try {
|
|
394
|
+
if (e.matches(":popover-open")) return !0;
|
|
395
|
+
} catch {}
|
|
396
|
+
try {
|
|
397
|
+
return e.matches(":modal");
|
|
398
|
+
} catch {
|
|
399
|
+
return !1;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
var Ce = /transform|translate|scale|rotate|perspective|filter/, we = /paint|layout|strict|content/, H = (e) => !!e && e !== "none", Te;
|
|
403
|
+
function Ee(e) {
|
|
404
|
+
let t = R(e) ? W(e) : e;
|
|
405
|
+
return H(t.transform) || H(t.translate) || H(t.scale) || H(t.rotate) || H(t.perspective) || !Oe() && (H(t.backdropFilter) || H(t.filter)) || Ce.test(t.willChange || "") || we.test(t.contain || "");
|
|
406
|
+
}
|
|
407
|
+
function De(e) {
|
|
408
|
+
let t = K(e);
|
|
409
|
+
for (; z(t) && !U(t);) {
|
|
410
|
+
if (Ee(t)) return t;
|
|
411
|
+
if (V(t)) return null;
|
|
412
|
+
t = K(t);
|
|
413
|
+
}
|
|
414
|
+
return null;
|
|
415
|
+
}
|
|
416
|
+
function Oe() {
|
|
417
|
+
return Te ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), Te;
|
|
418
|
+
}
|
|
419
|
+
function U(e) {
|
|
420
|
+
return /^(html|body|#document)$/.test(F(e));
|
|
421
|
+
}
|
|
422
|
+
function W(e) {
|
|
423
|
+
return I(e).getComputedStyle(e);
|
|
424
|
+
}
|
|
425
|
+
function G(e) {
|
|
426
|
+
return R(e) ? {
|
|
427
|
+
scrollLeft: e.scrollLeft,
|
|
428
|
+
scrollTop: e.scrollTop
|
|
429
|
+
} : {
|
|
430
|
+
scrollLeft: e.scrollX,
|
|
431
|
+
scrollTop: e.scrollY
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
function K(e) {
|
|
435
|
+
if (F(e) === "html") return e;
|
|
436
|
+
let t = e.assignedSlot || e.parentNode || xe(e) && e.host || L(e);
|
|
437
|
+
return xe(t) ? t.host : t;
|
|
438
|
+
}
|
|
439
|
+
function ke(e) {
|
|
440
|
+
let t = K(e);
|
|
441
|
+
return U(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : z(t) && B(t) ? t : ke(t);
|
|
442
|
+
}
|
|
443
|
+
function q(e, t, n) {
|
|
444
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
445
|
+
let r = ke(e), i = r === e.ownerDocument?.body, a = I(r);
|
|
446
|
+
if (i) {
|
|
447
|
+
let e = Ae(a);
|
|
448
|
+
return t.concat(a, a.visualViewport || [], B(r) ? r : [], e && n ? q(e) : []);
|
|
449
|
+
} else return t.concat(r, q(r, [], n));
|
|
450
|
+
}
|
|
451
|
+
function Ae(e) {
|
|
452
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
453
|
+
}
|
|
454
|
+
//#endregion
|
|
455
|
+
//#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
456
|
+
function je(e) {
|
|
457
|
+
let t = W(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = z(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = b(n) !== a || b(r) !== o;
|
|
458
|
+
return s && (n = a, r = o), {
|
|
459
|
+
width: n,
|
|
460
|
+
height: r,
|
|
461
|
+
$: s
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
function Me(e) {
|
|
465
|
+
return R(e) ? e : e.contextElement;
|
|
466
|
+
}
|
|
467
|
+
function J(e) {
|
|
468
|
+
let t = Me(e);
|
|
469
|
+
if (!z(t)) return S(1);
|
|
470
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = je(t), o = (a ? b(n.width) : n.width) / r, s = (a ? b(n.height) : n.height) / i;
|
|
471
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
472
|
+
x: o,
|
|
473
|
+
y: s
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
var Ne = /* @__PURE__ */ S(0);
|
|
477
|
+
function Pe(e) {
|
|
478
|
+
let t = I(e);
|
|
479
|
+
return !Oe() || !t.visualViewport ? Ne : {
|
|
480
|
+
x: t.visualViewport.offsetLeft,
|
|
481
|
+
y: t.visualViewport.offsetTop
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
function Fe(e, t, n) {
|
|
485
|
+
return t === void 0 && (t = !1), !n || t && n !== I(e) ? !1 : t;
|
|
486
|
+
}
|
|
487
|
+
function Y(e, t, n, r) {
|
|
488
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
489
|
+
let i = e.getBoundingClientRect(), a = Me(e), o = S(1);
|
|
490
|
+
t && (r ? R(r) && (o = J(r)) : o = J(e));
|
|
491
|
+
let s = Fe(a, n, r) ? Pe(a) : S(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
492
|
+
if (a) {
|
|
493
|
+
let e = I(a), t = r && R(r) ? I(r) : r, n = e, i = Ae(n);
|
|
494
|
+
for (; i && r && t !== n;) {
|
|
495
|
+
let e = J(i), t = i.getBoundingClientRect(), r = W(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
496
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = I(i), i = Ae(n);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
return N({
|
|
500
|
+
width: u,
|
|
501
|
+
height: d,
|
|
502
|
+
x: c,
|
|
503
|
+
y: l
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
function X(e, t) {
|
|
507
|
+
let n = G(e).scrollLeft;
|
|
508
|
+
return t ? t.left + n : Y(L(e)).left + n;
|
|
509
|
+
}
|
|
510
|
+
function Ie(e, t) {
|
|
511
|
+
let n = e.getBoundingClientRect();
|
|
512
|
+
return {
|
|
513
|
+
x: n.left + t.scrollLeft - X(e, n),
|
|
514
|
+
y: n.top + t.scrollTop
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function Le(e) {
|
|
518
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = L(r), s = t ? V(t.floating) : !1;
|
|
519
|
+
if (r === o || s && a) return n;
|
|
520
|
+
let c = {
|
|
521
|
+
scrollLeft: 0,
|
|
522
|
+
scrollTop: 0
|
|
523
|
+
}, l = S(1), u = S(0), d = z(r);
|
|
524
|
+
if ((d || !d && !a) && ((F(r) !== "body" || B(o)) && (c = G(r)), d)) {
|
|
525
|
+
let e = Y(r);
|
|
526
|
+
l = J(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
527
|
+
}
|
|
528
|
+
let f = o && !d && !a ? Ie(o, c) : S(0);
|
|
529
|
+
return {
|
|
530
|
+
width: n.width * l.x,
|
|
531
|
+
height: n.height * l.y,
|
|
532
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
|
|
533
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
function Re(e) {
|
|
537
|
+
return Array.from(e.getClientRects());
|
|
538
|
+
}
|
|
539
|
+
function ze(e) {
|
|
540
|
+
let t = L(e), n = G(e), r = e.ownerDocument.body, i = y(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = y(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + X(e), s = -n.scrollTop;
|
|
541
|
+
return W(r).direction === "rtl" && (o += y(t.clientWidth, r.clientWidth) - i), {
|
|
542
|
+
width: i,
|
|
543
|
+
height: a,
|
|
544
|
+
x: o,
|
|
545
|
+
y: s
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
var Be = 25;
|
|
549
|
+
function Ve(e, t) {
|
|
550
|
+
let n = I(e), r = L(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
551
|
+
if (i) {
|
|
552
|
+
a = i.width, o = i.height;
|
|
553
|
+
let e = Oe();
|
|
554
|
+
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
555
|
+
}
|
|
556
|
+
let l = X(r);
|
|
557
|
+
if (l <= 0) {
|
|
558
|
+
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
|
|
559
|
+
o <= Be && (a -= o);
|
|
560
|
+
} else l <= Be && (a += l);
|
|
561
|
+
return {
|
|
562
|
+
width: a,
|
|
563
|
+
height: o,
|
|
564
|
+
x: s,
|
|
565
|
+
y: c
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
function He(e, t) {
|
|
569
|
+
let n = Y(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = z(e) ? J(e) : S(1);
|
|
570
|
+
return {
|
|
571
|
+
width: e.clientWidth * a.x,
|
|
572
|
+
height: e.clientHeight * a.y,
|
|
573
|
+
x: i * a.x,
|
|
574
|
+
y: r * a.y
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
function Ue(e, t, n) {
|
|
578
|
+
let r;
|
|
579
|
+
if (t === "viewport") r = Ve(e, n);
|
|
580
|
+
else if (t === "document") r = ze(L(e));
|
|
581
|
+
else if (R(t)) r = He(t, n);
|
|
582
|
+
else {
|
|
583
|
+
let n = Pe(e);
|
|
584
|
+
r = {
|
|
585
|
+
x: t.x - n.x,
|
|
586
|
+
y: t.y - n.y,
|
|
587
|
+
width: t.width,
|
|
588
|
+
height: t.height
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
return N(r);
|
|
592
|
+
}
|
|
593
|
+
function We(e, t) {
|
|
594
|
+
let n = K(e);
|
|
595
|
+
return n === t || !R(n) || U(n) ? !1 : W(n).position === "fixed" || We(n, t);
|
|
596
|
+
}
|
|
597
|
+
function Ge(e, t) {
|
|
598
|
+
let n = t.get(e);
|
|
599
|
+
if (n) return n;
|
|
600
|
+
let r = q(e, [], !1).filter((e) => R(e) && F(e) !== "body"), i = null, a = W(e).position === "fixed", o = a ? K(e) : e;
|
|
601
|
+
for (; R(o) && !U(o);) {
|
|
602
|
+
let t = W(o), n = Ee(o);
|
|
603
|
+
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || B(o) && !n && We(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = K(o);
|
|
604
|
+
}
|
|
605
|
+
return t.set(e, r), r;
|
|
606
|
+
}
|
|
607
|
+
function Ke(e) {
|
|
608
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? V(t) ? [] : Ge(t, this._c) : [].concat(n), r], o = Ue(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
609
|
+
for (let e = 1; e < a.length; e++) {
|
|
610
|
+
let n = Ue(t, a[e], i);
|
|
611
|
+
s = y(n.top, s), c = v(n.right, c), l = v(n.bottom, l), u = y(n.left, u);
|
|
612
|
+
}
|
|
613
|
+
return {
|
|
614
|
+
width: c - u,
|
|
615
|
+
height: l - s,
|
|
616
|
+
x: u,
|
|
617
|
+
y: s
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
function qe(e) {
|
|
621
|
+
let { width: t, height: n } = je(e);
|
|
622
|
+
return {
|
|
623
|
+
width: t,
|
|
624
|
+
height: n
|
|
625
|
+
};
|
|
626
|
+
}
|
|
627
|
+
function Je(e, t, n) {
|
|
628
|
+
let r = z(t), i = L(t), a = n === "fixed", o = Y(e, !0, a, t), s = {
|
|
629
|
+
scrollLeft: 0,
|
|
630
|
+
scrollTop: 0
|
|
631
|
+
}, c = S(0);
|
|
632
|
+
function l() {
|
|
633
|
+
c.x = X(i);
|
|
634
|
+
}
|
|
635
|
+
if (r || !r && !a) if ((F(t) !== "body" || B(i)) && (s = G(t)), r) {
|
|
636
|
+
let e = Y(t, !0, a, t);
|
|
637
|
+
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
638
|
+
} else i && l();
|
|
639
|
+
a && !r && i && l();
|
|
640
|
+
let u = i && !r && !a ? Ie(i, s) : S(0);
|
|
641
|
+
return {
|
|
642
|
+
x: o.left + s.scrollLeft - c.x - u.x,
|
|
643
|
+
y: o.top + s.scrollTop - c.y - u.y,
|
|
644
|
+
width: o.width,
|
|
645
|
+
height: o.height
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
function Ye(e) {
|
|
649
|
+
return W(e).position === "static";
|
|
650
|
+
}
|
|
651
|
+
function Xe(e, t) {
|
|
652
|
+
if (!z(e) || W(e).position === "fixed") return null;
|
|
653
|
+
if (t) return t(e);
|
|
654
|
+
let n = e.offsetParent;
|
|
655
|
+
return L(e) === n && (n = n.ownerDocument.body), n;
|
|
656
|
+
}
|
|
657
|
+
function Ze(e, t) {
|
|
658
|
+
let n = I(e);
|
|
659
|
+
if (V(e)) return n;
|
|
660
|
+
if (!z(e)) {
|
|
661
|
+
let t = K(e);
|
|
662
|
+
for (; t && !U(t);) {
|
|
663
|
+
if (R(t) && !Ye(t)) return t;
|
|
664
|
+
t = K(t);
|
|
665
|
+
}
|
|
666
|
+
return n;
|
|
667
|
+
}
|
|
668
|
+
let r = Xe(e, t);
|
|
669
|
+
for (; r && Se(r) && Ye(r);) r = Xe(r, t);
|
|
670
|
+
return r && U(r) && Ye(r) && !Ee(r) ? n : r || De(e) || n;
|
|
671
|
+
}
|
|
672
|
+
var Qe = async function(e) {
|
|
673
|
+
let t = this.getOffsetParent || Ze, n = this.getDimensions, r = await n(e.floating);
|
|
674
|
+
return {
|
|
675
|
+
reference: Je(e.reference, await t(e.floating), e.strategy),
|
|
676
|
+
floating: {
|
|
677
|
+
x: 0,
|
|
678
|
+
y: 0,
|
|
679
|
+
width: r.width,
|
|
680
|
+
height: r.height
|
|
681
|
+
}
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
function $e(e) {
|
|
685
|
+
return W(e).direction === "rtl";
|
|
686
|
+
}
|
|
687
|
+
var et = {
|
|
688
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Le,
|
|
689
|
+
getDocumentElement: L,
|
|
690
|
+
getClippingRect: Ke,
|
|
691
|
+
getOffsetParent: Ze,
|
|
692
|
+
getElementRects: Qe,
|
|
693
|
+
getClientRects: Re,
|
|
694
|
+
getDimensions: qe,
|
|
695
|
+
getScale: J,
|
|
696
|
+
isElement: R,
|
|
697
|
+
isRTL: $e
|
|
698
|
+
};
|
|
699
|
+
function tt(e, t) {
|
|
700
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
701
|
+
}
|
|
702
|
+
function nt(e, t) {
|
|
703
|
+
let n = null, r, i = L(e);
|
|
704
|
+
function a() {
|
|
705
|
+
var e;
|
|
706
|
+
clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
|
|
707
|
+
}
|
|
708
|
+
function o(s, c) {
|
|
709
|
+
s === void 0 && (s = !1), c === void 0 && (c = 1), a();
|
|
710
|
+
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
711
|
+
if (s || t(), !f || !p) return;
|
|
712
|
+
let m = x(d), h = x(i.clientWidth - (u + f)), g = x(i.clientHeight - (d + p)), _ = x(u), b = {
|
|
713
|
+
rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
|
|
714
|
+
threshold: y(0, v(1, c)) || 1
|
|
715
|
+
}, S = !0;
|
|
716
|
+
function C(t) {
|
|
717
|
+
let n = t[0].intersectionRatio;
|
|
718
|
+
if (n !== c) {
|
|
719
|
+
if (!S) return o();
|
|
720
|
+
n ? o(!1, n) : r = setTimeout(() => {
|
|
721
|
+
o(!1, 1e-7);
|
|
722
|
+
}, 1e3);
|
|
723
|
+
}
|
|
724
|
+
n === 1 && !tt(l, e.getBoundingClientRect()) && o(), S = !1;
|
|
725
|
+
}
|
|
726
|
+
try {
|
|
727
|
+
n = new IntersectionObserver(C, {
|
|
728
|
+
...b,
|
|
729
|
+
root: i.ownerDocument
|
|
730
|
+
});
|
|
731
|
+
} catch {
|
|
732
|
+
n = new IntersectionObserver(C, b);
|
|
733
|
+
}
|
|
734
|
+
n.observe(e);
|
|
735
|
+
}
|
|
736
|
+
return o(!0), a;
|
|
737
|
+
}
|
|
738
|
+
function rt(e, t, n, r) {
|
|
739
|
+
r === void 0 && (r = {});
|
|
740
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Me(e), u = i || a ? [...l ? q(l) : [], ...t ? q(t) : []] : [];
|
|
741
|
+
u.forEach((e) => {
|
|
742
|
+
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
|
|
743
|
+
});
|
|
744
|
+
let d = l && s ? nt(l, n) : null, f = -1, p = null;
|
|
745
|
+
o && (p = new ResizeObserver((e) => {
|
|
746
|
+
let [r] = e;
|
|
747
|
+
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
748
|
+
var e;
|
|
749
|
+
(e = p) == null || e.observe(t);
|
|
750
|
+
})), n();
|
|
751
|
+
}), l && !c && p.observe(l), t && p.observe(t));
|
|
752
|
+
let m, h = c ? Y(e) : null;
|
|
753
|
+
c && g();
|
|
754
|
+
function g() {
|
|
755
|
+
let t = Y(e);
|
|
756
|
+
h && !tt(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
757
|
+
}
|
|
758
|
+
return n(), () => {
|
|
759
|
+
var e;
|
|
760
|
+
u.forEach((e) => {
|
|
761
|
+
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
|
|
762
|
+
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
var it = ve, at = ye, ot = he, st = (e, t, n) => {
|
|
766
|
+
let r = /* @__PURE__ */ new Map(), i = {
|
|
767
|
+
platform: et,
|
|
768
|
+
...n
|
|
769
|
+
}, a = {
|
|
770
|
+
...i.platform,
|
|
771
|
+
_c: r
|
|
772
|
+
};
|
|
773
|
+
return me(e, t, {
|
|
774
|
+
...i,
|
|
775
|
+
platform: a
|
|
776
|
+
});
|
|
777
|
+
}, ct = (e) => typeof e == "object" && !!e && "$el" in e, lt = (e) => typeof HTMLElement > "u" || e === null ? null : e instanceof HTMLElement ? e : ct(e) && e.$el instanceof HTMLElement ? e.$el : null, ut = (e, t) => {
|
|
778
|
+
if (e != null) {
|
|
779
|
+
if (typeof e == "function") {
|
|
780
|
+
e(t, {});
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
typeof e == "object" && "value" in e && (e.value = t);
|
|
784
|
+
}
|
|
785
|
+
}, dt = (e, t, n) => (r) => {
|
|
786
|
+
let i = lt(r);
|
|
787
|
+
e.value = i, i && !i.id && (i.id = t), ut(n, r);
|
|
788
|
+
};
|
|
789
|
+
function ft(t = {}) {
|
|
790
|
+
let { placement: s = "bottom-start", strategy: c = "fixed", gap: l, offset: u = 5, flip: d = !0, shift: f = !0, middleware: p = [], autoUpdate: m = !0 } = t, h = l ?? u, g = i(null), _ = i(null), v = i({
|
|
791
|
+
x: 0,
|
|
792
|
+
y: 0
|
|
793
|
+
}), y = i(s), b = i(!1), x = [
|
|
794
|
+
it(h),
|
|
795
|
+
...d ? [ot(typeof d == "boolean" ? void 0 : d)] : [],
|
|
796
|
+
...f ? [at(typeof f == "boolean" ? void 0 : f)] : [],
|
|
797
|
+
...p
|
|
798
|
+
], S = null, C = () => {
|
|
799
|
+
S !== null && (S(), S = null);
|
|
800
|
+
}, w = async () => {
|
|
801
|
+
let e = g.value, t = _.value;
|
|
802
|
+
if (e === null || t === null) return;
|
|
803
|
+
let n = await st(e, t, {
|
|
804
|
+
placement: s,
|
|
805
|
+
strategy: c,
|
|
806
|
+
middleware: x
|
|
807
|
+
});
|
|
808
|
+
v.value = {
|
|
809
|
+
x: n.x,
|
|
810
|
+
y: n.y
|
|
811
|
+
}, y.value = n.placement;
|
|
812
|
+
}, T = () => {
|
|
813
|
+
if (!m) return;
|
|
814
|
+
let e = g.value, t = _.value;
|
|
815
|
+
e === null || t === null || (C(), S = rt(e, t, w));
|
|
816
|
+
}, E = () => {
|
|
817
|
+
b.value = !0;
|
|
818
|
+
}, D = () => {
|
|
819
|
+
b.value = !1;
|
|
820
|
+
}, ee = () => {
|
|
821
|
+
b.value = !b.value;
|
|
822
|
+
}, O = e(() => ({
|
|
823
|
+
position: c,
|
|
824
|
+
top: `${v.value.y}px`,
|
|
825
|
+
left: `${v.value.x}px`,
|
|
826
|
+
visibility: b.value ? "visible" : "hidden",
|
|
827
|
+
opacity: +!!b.value,
|
|
828
|
+
pointerEvents: b.value ? "auto" : "none",
|
|
829
|
+
transform: b.value ? "scale(1)" : "scale(0.98)",
|
|
830
|
+
transition: "opacity 150ms ease, transform 150ms ease"
|
|
831
|
+
})), k = (e = {}) => {
|
|
832
|
+
let t = e.id ?? a();
|
|
833
|
+
return {
|
|
834
|
+
...e,
|
|
835
|
+
id: t,
|
|
836
|
+
ref: dt(g, t, e.ref),
|
|
837
|
+
"aria-controls": e["aria-controls"] ?? _.value?.id ?? "",
|
|
838
|
+
"aria-expanded": e["aria-expanded"] ?? b.value
|
|
839
|
+
};
|
|
840
|
+
}, A = (e = {}) => {
|
|
841
|
+
let t = e.id ?? _.value?.id;
|
|
842
|
+
return {
|
|
843
|
+
...e,
|
|
844
|
+
id: t ?? a(),
|
|
845
|
+
ref: dt(_, t ?? a(), e.ref),
|
|
846
|
+
style: e.style === void 0 ? O.value : [O.value, e.style],
|
|
847
|
+
"aria-hidden": e["aria-hidden"] ?? !b.value
|
|
848
|
+
};
|
|
849
|
+
}, te = e(() => k()), ne = e(() => A()), j = async () => {
|
|
850
|
+
if (g.value === null || _.value === null) {
|
|
851
|
+
C();
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
await n(), await w(), T();
|
|
855
|
+
};
|
|
856
|
+
return o(b, (e) => {
|
|
857
|
+
e ? j() : C();
|
|
858
|
+
}), o([g, _], () => {
|
|
859
|
+
b.value ? j() : C();
|
|
860
|
+
}), r(C), {
|
|
861
|
+
trigger: te,
|
|
862
|
+
floating: ne,
|
|
863
|
+
getTriggerBindings: k,
|
|
864
|
+
getFloatingBindings: A,
|
|
865
|
+
referenceElement: g,
|
|
866
|
+
floatingElement: _,
|
|
867
|
+
visible: b,
|
|
868
|
+
styles: O,
|
|
869
|
+
resolvedPlacement: y,
|
|
870
|
+
show: E,
|
|
871
|
+
hide: D,
|
|
872
|
+
toggle: ee,
|
|
873
|
+
updatePosition: w
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
//#endregion
|
|
877
|
+
//#region src/composables/ui/useNotify.ts
|
|
878
|
+
var pt = {
|
|
879
|
+
success: "hl-bg-success/10 hl-text-success hl-border hl-border-success/20",
|
|
880
|
+
error: "hl-bg-danger/10 hl-text-danger hl-border hl-border-danger/20",
|
|
881
|
+
info: "hl-bg-info/10 hl-text-info hl-border hl-border-info/20",
|
|
882
|
+
warning: "hl-bg-warning/10 hl-text-warning hl-border hl-border-warning/20"
|
|
883
|
+
}, mt = 1, Z = i({
|
|
884
|
+
id: 0,
|
|
885
|
+
visible: !1,
|
|
886
|
+
type: "success",
|
|
887
|
+
message: "",
|
|
888
|
+
title: "",
|
|
889
|
+
durationMs: 0,
|
|
890
|
+
colorClass: pt.success
|
|
891
|
+
}), Q = i(void 0), ht = (e) => Array.isArray(e) ? e[0] ?? "Something went wrong" : e, gt = () => {
|
|
892
|
+
Q.value !== void 0 && (clearTimeout(Q.value), Q.value = void 0);
|
|
893
|
+
}, _t = () => {
|
|
894
|
+
Z.value.visible = !1, gt();
|
|
895
|
+
}, vt = (e, t, n, r) => {
|
|
896
|
+
gt();
|
|
897
|
+
let i = ht(t), a = Math.max(r, 0);
|
|
898
|
+
Z.value = {
|
|
899
|
+
id: mt++,
|
|
900
|
+
visible: !0,
|
|
901
|
+
type: e,
|
|
902
|
+
message: i,
|
|
903
|
+
title: n,
|
|
904
|
+
durationMs: a,
|
|
905
|
+
colorClass: pt[e]
|
|
906
|
+
}, a > 0 && (Q.value = setTimeout(() => {
|
|
907
|
+
Z.value.visible = !1, Q.value = void 0;
|
|
908
|
+
}, a));
|
|
909
|
+
}, yt = (e, t, n) => {
|
|
910
|
+
vt("success", e, t ?? "", n ?? 3500);
|
|
911
|
+
}, bt = (e, t, n) => {
|
|
912
|
+
vt("error", e, t ?? "", n ?? 3500);
|
|
913
|
+
}, xt = (e, t, n) => {
|
|
914
|
+
vt("info", e, t ?? "", n ?? 3500);
|
|
915
|
+
}, St = (e, t, n) => {
|
|
916
|
+
vt("warning", e, t ?? "", n ?? 3500);
|
|
917
|
+
};
|
|
918
|
+
function Ct() {
|
|
919
|
+
return {
|
|
920
|
+
notification: Z,
|
|
921
|
+
classes: e(() => Z.value.colorClass),
|
|
922
|
+
success: yt,
|
|
923
|
+
error: bt,
|
|
924
|
+
info: xt,
|
|
925
|
+
warning: St,
|
|
926
|
+
hide: _t
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
//#endregion
|
|
930
|
+
//#region src/composables/ui/usePopup.ts
|
|
931
|
+
var wt = 0, Tt = null, Et = null, $ = i({
|
|
932
|
+
isVisible: !1,
|
|
933
|
+
type: "confirm",
|
|
934
|
+
component: null,
|
|
935
|
+
props: void 0,
|
|
936
|
+
isLoading: !1
|
|
937
|
+
}), Dt = () => {
|
|
938
|
+
Tt = null, Et = null;
|
|
939
|
+
}, Ot = () => {
|
|
940
|
+
Dt(), $.value = {
|
|
941
|
+
isVisible: !1,
|
|
942
|
+
type: "confirm",
|
|
943
|
+
component: null,
|
|
944
|
+
props: void 0,
|
|
945
|
+
isLoading: !1
|
|
946
|
+
};
|
|
947
|
+
}, kt = () => {
|
|
948
|
+
setTimeout(Ot, 300);
|
|
949
|
+
}, At = (e) => {
|
|
950
|
+
console.error("[usePopup] popup callback failed", e);
|
|
951
|
+
}, jt = (e) => e instanceof Promise, Mt = () => {
|
|
952
|
+
if (Et !== null) try {
|
|
953
|
+
let e = Et();
|
|
954
|
+
jt(e) && e.catch(At);
|
|
955
|
+
} catch (e) {
|
|
956
|
+
At(e);
|
|
957
|
+
}
|
|
958
|
+
}, Nt = () => {
|
|
959
|
+
$.value.isVisible = !1, kt();
|
|
960
|
+
}, Pt = (e) => {
|
|
961
|
+
let t = {
|
|
962
|
+
onConfirm: (n) => (wt === e && (Tt = n), t),
|
|
963
|
+
onCancel: (n) => (wt === e && (Et = n), t)
|
|
964
|
+
};
|
|
965
|
+
return t;
|
|
966
|
+
}, Ft = (e) => {
|
|
967
|
+
Dt();
|
|
968
|
+
let n = wt + 1;
|
|
969
|
+
return wt = n, e.type === "confirm" ? ($.value = {
|
|
970
|
+
isVisible: !0,
|
|
971
|
+
type: "confirm",
|
|
972
|
+
component: null,
|
|
973
|
+
props: {
|
|
974
|
+
title: e.title,
|
|
975
|
+
message: e.message,
|
|
976
|
+
confirmText: e.confirmText,
|
|
977
|
+
cancelText: e.cancelText,
|
|
978
|
+
icon: e.icon,
|
|
979
|
+
iconSource: e.iconSource,
|
|
980
|
+
hideIcon: e.hideIcon
|
|
981
|
+
},
|
|
982
|
+
isLoading: !1
|
|
983
|
+
}, Pt(n)) : ($.value = {
|
|
984
|
+
isVisible: !0,
|
|
985
|
+
type: "custom",
|
|
986
|
+
component: t(e.component),
|
|
987
|
+
props: e.props,
|
|
988
|
+
isLoading: !1
|
|
989
|
+
}, Pt(n));
|
|
990
|
+
}, It = () => {
|
|
991
|
+
$.value.isLoading || (Nt(), Mt());
|
|
992
|
+
}, Lt = () => {
|
|
993
|
+
if (!$.value.isLoading) {
|
|
994
|
+
if (Tt === null) {
|
|
995
|
+
Nt();
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
try {
|
|
999
|
+
let e = Tt();
|
|
1000
|
+
if (!jt(e)) {
|
|
1001
|
+
Nt();
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
$.value.isLoading = !0, e.then(() => {
|
|
1005
|
+
$.value.isLoading = !1, Nt();
|
|
1006
|
+
}).catch((e) => {
|
|
1007
|
+
$.value.isLoading = !1, At(e);
|
|
1008
|
+
});
|
|
1009
|
+
} catch (e) {
|
|
1010
|
+
At(e);
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
}, Rt = (e) => {
|
|
1014
|
+
$.value.isLoading = e;
|
|
1015
|
+
};
|
|
1016
|
+
function zt() {
|
|
1017
|
+
return {
|
|
1018
|
+
isVisible: e(() => $.value.isVisible),
|
|
1019
|
+
type: e(() => $.value.type),
|
|
1020
|
+
component: e(() => $.value.component),
|
|
1021
|
+
props: e(() => $.value.props),
|
|
1022
|
+
isLoading: e(() => $.value.isLoading),
|
|
1023
|
+
open: Ft,
|
|
1024
|
+
close: It,
|
|
1025
|
+
confirm: Lt,
|
|
1026
|
+
resetPopupState: Ot,
|
|
1027
|
+
setLoading: Rt
|
|
1028
|
+
};
|
|
1029
|
+
}
|
|
1030
|
+
//#endregion
|
|
1031
|
+
export { m as a, p as i, Ct as n, g as o, ft as r, _ as s, zt as t };
|