prlg-ui 1.8.205 → 1.8.207

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.
@@ -1,1248 +0,0 @@
1
- import { computed as X, ref as nt, shallowRef as Ut, watch as ht, getCurrentScope as Kt, onScopeDispose as Gt, shallowReadonly as J, unref as Jt } from "vue";
2
- const Qt = ["top", "right", "bottom", "left"], Y = Math.min, E = Math.max, ct = Math.round, rt = Math.floor, W = (t) => ({
3
- x: t,
4
- y: t
5
- }), Zt = {
6
- left: "right",
7
- right: "left",
8
- bottom: "top",
9
- top: "bottom"
10
- }, te = {
11
- start: "end",
12
- end: "start"
13
- };
14
- function pt(t, e, n) {
15
- return E(t, Y(e, n));
16
- }
17
- function $(t, e) {
18
- return typeof t == "function" ? t(e) : t;
19
- }
20
- function _(t) {
21
- return t.split("-")[0];
22
- }
23
- function et(t) {
24
- return t.split("-")[1];
25
- }
26
- function vt(t) {
27
- return t === "x" ? "y" : "x";
28
- }
29
- function bt(t) {
30
- return t === "y" ? "height" : "width";
31
- }
32
- const ee = /* @__PURE__ */ new Set(["top", "bottom"]);
33
- function k(t) {
34
- return ee.has(_(t)) ? "y" : "x";
35
- }
36
- function At(t) {
37
- return vt(k(t));
38
- }
39
- function ne(t, e, n) {
40
- n === void 0 && (n = !1);
41
- const o = et(t), i = At(t), s = bt(i);
42
- let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
43
- return e.reference[s] > e.floating[s] && (r = lt(r)), [r, lt(r)];
44
- }
45
- function oe(t) {
46
- const e = lt(t);
47
- return [wt(t), e, wt(e)];
48
- }
49
- function wt(t) {
50
- return t.replace(/start|end/g, (e) => te[e]);
51
- }
52
- const Et = ["left", "right"], Lt = ["right", "left"], ie = ["top", "bottom"], se = ["bottom", "top"];
53
- function re(t, e, n) {
54
- switch (t) {
55
- case "top":
56
- case "bottom":
57
- return n ? e ? Lt : Et : e ? Et : Lt;
58
- case "left":
59
- case "right":
60
- return e ? ie : se;
61
- default:
62
- return [];
63
- }
64
- }
65
- function ce(t, e, n, o) {
66
- const i = et(t);
67
- let s = re(_(t), n === "start", o);
68
- return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(wt)))), s;
69
- }
70
- function lt(t) {
71
- return t.replace(/left|right|bottom|top/g, (e) => Zt[e]);
72
- }
73
- function le(t) {
74
- return {
75
- top: 0,
76
- right: 0,
77
- bottom: 0,
78
- left: 0,
79
- ...t
80
- };
81
- }
82
- function Bt(t) {
83
- return typeof t != "number" ? le(t) : {
84
- top: t,
85
- right: t,
86
- bottom: t,
87
- left: t
88
- };
89
- }
90
- function at(t) {
91
- const {
92
- x: e,
93
- y: n,
94
- width: o,
95
- height: i
96
- } = t;
97
- return {
98
- width: o,
99
- height: i,
100
- top: n,
101
- left: e,
102
- right: e + o,
103
- bottom: n + i,
104
- x: e,
105
- y: n
106
- };
107
- }
108
- function Dt(t, e, n) {
109
- let {
110
- reference: o,
111
- floating: i
112
- } = t;
113
- const s = k(e), r = At(e), c = bt(r), d = _(e), a = s === "y", l = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, m = o[c] / 2 - i[c] / 2;
114
- let f;
115
- switch (d) {
116
- case "top":
117
- f = {
118
- x: l,
119
- y: o.y - i.height
120
- };
121
- break;
122
- case "bottom":
123
- f = {
124
- x: l,
125
- y: o.y + o.height
126
- };
127
- break;
128
- case "right":
129
- f = {
130
- x: o.x + o.width,
131
- y: u
132
- };
133
- break;
134
- case "left":
135
- f = {
136
- x: o.x - i.width,
137
- y: u
138
- };
139
- break;
140
- default:
141
- f = {
142
- x: o.x,
143
- y: o.y
144
- };
145
- }
146
- switch (et(e)) {
147
- case "start":
148
- f[r] -= m * (n && a ? -1 : 1);
149
- break;
150
- case "end":
151
- f[r] += m * (n && a ? -1 : 1);
152
- break;
153
- }
154
- return f;
155
- }
156
- const ae = async (t, e, n) => {
157
- const {
158
- placement: o = "bottom",
159
- strategy: i = "absolute",
160
- middleware: s = [],
161
- platform: r
162
- } = n, c = s.filter(Boolean), d = await (r.isRTL == null ? void 0 : r.isRTL(e));
163
- let a = await r.getElementRects({
164
- reference: t,
165
- floating: e,
166
- strategy: i
167
- }), {
168
- x: l,
169
- y: u
170
- } = Dt(a, o, d), m = o, f = {}, h = 0;
171
- for (let g = 0; g < c.length; g++) {
172
- const {
173
- name: p,
174
- fn: w
175
- } = c[g], {
176
- x,
177
- y,
178
- data: A,
179
- reset: b
180
- } = await w({
181
- x: l,
182
- y: u,
183
- initialPlacement: o,
184
- placement: m,
185
- strategy: i,
186
- middlewareData: f,
187
- rects: a,
188
- platform: r,
189
- elements: {
190
- reference: t,
191
- floating: e
192
- }
193
- });
194
- l = x ?? l, u = y ?? u, f = {
195
- ...f,
196
- [p]: {
197
- ...f[p],
198
- ...A
199
- }
200
- }, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (m = b.placement), b.rects && (a = b.rects === !0 ? await r.getElementRects({
201
- reference: t,
202
- floating: e,
203
- strategy: i
204
- }) : b.rects), {
205
- x: l,
206
- y: u
207
- } = Dt(a, m, d)), g = -1);
208
- }
209
- return {
210
- x: l,
211
- y: u,
212
- placement: m,
213
- strategy: i,
214
- middlewareData: f
215
- };
216
- };
217
- async function ot(t, e) {
218
- var n;
219
- e === void 0 && (e = {});
220
- const {
221
- x: o,
222
- y: i,
223
- platform: s,
224
- rects: r,
225
- elements: c,
226
- strategy: d
227
- } = t, {
228
- boundary: a = "clippingAncestors",
229
- rootBoundary: l = "viewport",
230
- elementContext: u = "floating",
231
- altBoundary: m = !1,
232
- padding: f = 0
233
- } = $(e, t), h = Bt(f), p = c[m ? u === "floating" ? "reference" : "floating" : u], w = at(await s.getClippingRect({
234
- element: (n = await (s.isElement == null ? void 0 : s.isElement(p))) == null || n ? p : p.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
235
- boundary: a,
236
- rootBoundary: l,
237
- strategy: d
238
- })), x = u === "floating" ? {
239
- x: o,
240
- y: i,
241
- width: r.floating.width,
242
- height: r.floating.height
243
- } : r.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), A = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
244
- x: 1,
245
- y: 1
246
- } : {
247
- x: 1,
248
- y: 1
249
- }, b = at(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
250
- elements: c,
251
- rect: x,
252
- offsetParent: y,
253
- strategy: d
254
- }) : x);
255
- return {
256
- top: (w.top - b.top + h.top) / A.y,
257
- bottom: (b.bottom - w.bottom + h.bottom) / A.y,
258
- left: (w.left - b.left + h.left) / A.x,
259
- right: (b.right - w.right + h.right) / A.x
260
- };
261
- }
262
- const fe = (t) => ({
263
- name: "arrow",
264
- options: t,
265
- async fn(e) {
266
- const {
267
- x: n,
268
- y: o,
269
- placement: i,
270
- rects: s,
271
- platform: r,
272
- elements: c,
273
- middlewareData: d
274
- } = e, {
275
- element: a,
276
- padding: l = 0
277
- } = $(t, e) || {};
278
- if (a == null)
279
- return {};
280
- const u = Bt(l), m = {
281
- x: n,
282
- y: o
283
- }, f = At(i), h = bt(f), g = await r.getDimensions(a), p = f === "y", w = p ? "top" : "left", x = p ? "bottom" : "right", y = p ? "clientHeight" : "clientWidth", A = s.reference[h] + s.reference[f] - m[f] - s.floating[h], b = m[f] - s.reference[f], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a));
284
- let v = R ? R[y] : 0;
285
- (!v || !await (r.isElement == null ? void 0 : r.isElement(R))) && (v = c.floating[y] || s.floating[h]);
286
- const O = A / 2 - b / 2, S = v / 2 - g[h] / 2 - 1, D = Y(u[w], S), z = Y(u[x], S), V = D, I = v - g[h] - z, C = v / 2 - g[h] / 2 + O, U = pt(V, C, I), N = !d.arrow && et(i) != null && C !== U && s.reference[h] / 2 - (C < V ? D : z) - g[h] / 2 < 0, T = N ? C < V ? C - V : C - I : 0;
287
- return {
288
- [f]: m[f] + T,
289
- data: {
290
- [f]: U,
291
- centerOffset: C - U - T,
292
- ...N && {
293
- alignmentOffset: T
294
- }
295
- },
296
- reset: N
297
- };
298
- }
299
- }), ue = function(t) {
300
- return t === void 0 && (t = {}), {
301
- name: "flip",
302
- options: t,
303
- async fn(e) {
304
- var n, o;
305
- const {
306
- placement: i,
307
- middlewareData: s,
308
- rects: r,
309
- initialPlacement: c,
310
- platform: d,
311
- elements: a
312
- } = e, {
313
- mainAxis: l = !0,
314
- crossAxis: u = !0,
315
- fallbackPlacements: m,
316
- fallbackStrategy: f = "bestFit",
317
- fallbackAxisSideDirection: h = "none",
318
- flipAlignment: g = !0,
319
- ...p
320
- } = $(t, e);
321
- if ((n = s.arrow) != null && n.alignmentOffset)
322
- return {};
323
- const w = _(i), x = k(c), y = _(c) === c, A = await (d.isRTL == null ? void 0 : d.isRTL(a.floating)), b = m || (y || !g ? [lt(c)] : oe(c)), R = h !== "none";
324
- !m && R && b.push(...ce(c, g, h, A));
325
- const v = [c, ...b], O = await ot(e, p), S = [];
326
- let D = ((o = s.flip) == null ? void 0 : o.overflows) || [];
327
- if (l && S.push(O[w]), u) {
328
- const C = ne(i, r, A);
329
- S.push(O[C[0]], O[C[1]]);
330
- }
331
- if (D = [...D, {
332
- placement: i,
333
- overflows: S
334
- }], !S.every((C) => C <= 0)) {
335
- var z, V;
336
- const C = (((z = s.flip) == null ? void 0 : z.index) || 0) + 1, U = v[C];
337
- if (U && (!(u === "alignment" ? x !== k(U) : !1) || // We leave the current main axis only if every placement on that axis
338
- // overflows the main axis.
339
- D.every((P) => k(P.placement) === x ? P.overflows[0] > 0 : !0)))
340
- return {
341
- data: {
342
- index: C,
343
- overflows: D
344
- },
345
- reset: {
346
- placement: U
347
- }
348
- };
349
- let N = (V = D.filter((T) => T.overflows[0] <= 0).sort((T, P) => T.overflows[1] - P.overflows[1])[0]) == null ? void 0 : V.placement;
350
- if (!N)
351
- switch (f) {
352
- case "bestFit": {
353
- var I;
354
- const T = (I = D.filter((P) => {
355
- if (R) {
356
- const j = k(P.placement);
357
- return j === x || // Create a bias to the `y` side axis due to horizontal
358
- // reading directions favoring greater width.
359
- j === "y";
360
- }
361
- return !0;
362
- }).map((P) => [P.placement, P.overflows.filter((j) => j > 0).reduce((j, qt) => j + qt, 0)]).sort((P, j) => P[1] - j[1])[0]) == null ? void 0 : I[0];
363
- T && (N = T);
364
- break;
365
- }
366
- case "initialPlacement":
367
- N = c;
368
- break;
369
- }
370
- if (i !== N)
371
- return {
372
- reset: {
373
- placement: N
374
- }
375
- };
376
- }
377
- return {};
378
- }
379
- };
380
- };
381
- function Tt(t, e) {
382
- return {
383
- top: t.top - e.height,
384
- right: t.right - e.width,
385
- bottom: t.bottom - e.height,
386
- left: t.left - e.width
387
- };
388
- }
389
- function Pt(t) {
390
- return Qt.some((e) => t[e] >= 0);
391
- }
392
- const de = function(t) {
393
- return t === void 0 && (t = {}), {
394
- name: "hide",
395
- options: t,
396
- async fn(e) {
397
- const {
398
- rects: n
399
- } = e, {
400
- strategy: o = "referenceHidden",
401
- ...i
402
- } = $(t, e);
403
- switch (o) {
404
- case "referenceHidden": {
405
- const s = await ot(e, {
406
- ...i,
407
- elementContext: "reference"
408
- }), r = Tt(s, n.reference);
409
- return {
410
- data: {
411
- referenceHiddenOffsets: r,
412
- referenceHidden: Pt(r)
413
- }
414
- };
415
- }
416
- case "escaped": {
417
- const s = await ot(e, {
418
- ...i,
419
- altBoundary: !0
420
- }), r = Tt(s, n.floating);
421
- return {
422
- data: {
423
- escapedOffsets: r,
424
- escaped: Pt(r)
425
- }
426
- };
427
- }
428
- default:
429
- return {};
430
- }
431
- }
432
- };
433
- }, Ht = /* @__PURE__ */ new Set(["left", "top"]);
434
- async function me(t, e) {
435
- const {
436
- placement: n,
437
- platform: o,
438
- elements: i
439
- } = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = _(n), c = et(n), d = k(n) === "y", a = Ht.has(r) ? -1 : 1, l = s && d ? -1 : 1, u = $(e, t);
440
- let {
441
- mainAxis: m,
442
- crossAxis: f,
443
- alignmentAxis: h
444
- } = typeof u == "number" ? {
445
- mainAxis: u,
446
- crossAxis: 0,
447
- alignmentAxis: null
448
- } : {
449
- mainAxis: u.mainAxis || 0,
450
- crossAxis: u.crossAxis || 0,
451
- alignmentAxis: u.alignmentAxis
452
- };
453
- return c && typeof h == "number" && (f = c === "end" ? h * -1 : h), d ? {
454
- x: f * l,
455
- y: m * a
456
- } : {
457
- x: m * a,
458
- y: f * l
459
- };
460
- }
461
- const he = function(t) {
462
- return t === void 0 && (t = 0), {
463
- name: "offset",
464
- options: t,
465
- async fn(e) {
466
- var n, o;
467
- const {
468
- x: i,
469
- y: s,
470
- placement: r,
471
- middlewareData: c
472
- } = e, d = await me(e, t);
473
- return r === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
474
- x: i + d.x,
475
- y: s + d.y,
476
- data: {
477
- ...d,
478
- placement: r
479
- }
480
- };
481
- }
482
- };
483
- }, ge = function(t) {
484
- return t === void 0 && (t = {}), {
485
- name: "shift",
486
- options: t,
487
- async fn(e) {
488
- const {
489
- x: n,
490
- y: o,
491
- placement: i
492
- } = e, {
493
- mainAxis: s = !0,
494
- crossAxis: r = !1,
495
- limiter: c = {
496
- fn: (p) => {
497
- let {
498
- x: w,
499
- y: x
500
- } = p;
501
- return {
502
- x: w,
503
- y: x
504
- };
505
- }
506
- },
507
- ...d
508
- } = $(t, e), a = {
509
- x: n,
510
- y: o
511
- }, l = await ot(e, d), u = k(_(i)), m = vt(u);
512
- let f = a[m], h = a[u];
513
- if (s) {
514
- const p = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", x = f + l[p], y = f - l[w];
515
- f = pt(x, f, y);
516
- }
517
- if (r) {
518
- const p = u === "y" ? "top" : "left", w = u === "y" ? "bottom" : "right", x = h + l[p], y = h - l[w];
519
- h = pt(x, h, y);
520
- }
521
- const g = c.fn({
522
- ...e,
523
- [m]: f,
524
- [u]: h
525
- });
526
- return {
527
- ...g,
528
- data: {
529
- x: g.x - n,
530
- y: g.y - o,
531
- enabled: {
532
- [m]: s,
533
- [u]: r
534
- }
535
- }
536
- };
537
- }
538
- };
539
- }, pe = function(t) {
540
- return t === void 0 && (t = {}), {
541
- options: t,
542
- fn(e) {
543
- const {
544
- x: n,
545
- y: o,
546
- placement: i,
547
- rects: s,
548
- middlewareData: r
549
- } = e, {
550
- offset: c = 0,
551
- mainAxis: d = !0,
552
- crossAxis: a = !0
553
- } = $(t, e), l = {
554
- x: n,
555
- y: o
556
- }, u = k(i), m = vt(u);
557
- let f = l[m], h = l[u];
558
- const g = $(c, e), p = typeof g == "number" ? {
559
- mainAxis: g,
560
- crossAxis: 0
561
- } : {
562
- mainAxis: 0,
563
- crossAxis: 0,
564
- ...g
565
- };
566
- if (d) {
567
- const y = m === "y" ? "height" : "width", A = s.reference[m] - s.floating[y] + p.mainAxis, b = s.reference[m] + s.reference[y] - p.mainAxis;
568
- f < A ? f = A : f > b && (f = b);
569
- }
570
- if (a) {
571
- var w, x;
572
- const y = m === "y" ? "width" : "height", A = Ht.has(_(i)), b = s.reference[u] - s.floating[y] + (A && ((w = r.offset) == null ? void 0 : w[u]) || 0) + (A ? 0 : p.crossAxis), R = s.reference[u] + s.reference[y] + (A ? 0 : ((x = r.offset) == null ? void 0 : x[u]) || 0) - (A ? p.crossAxis : 0);
573
- h < b ? h = b : h > R && (h = R);
574
- }
575
- return {
576
- [m]: f,
577
- [u]: h
578
- };
579
- }
580
- };
581
- }, we = function(t) {
582
- return t === void 0 && (t = {}), {
583
- name: "size",
584
- options: t,
585
- async fn(e) {
586
- var n, o;
587
- const {
588
- placement: i,
589
- rects: s,
590
- platform: r,
591
- elements: c
592
- } = e, {
593
- apply: d = () => {
594
- },
595
- ...a
596
- } = $(t, e), l = await ot(e, a), u = _(i), m = et(i), f = k(i) === "y", {
597
- width: h,
598
- height: g
599
- } = s.floating;
600
- let p, w;
601
- u === "top" || u === "bottom" ? (p = u, w = m === (await (r.isRTL == null ? void 0 : r.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (w = u, p = m === "end" ? "top" : "bottom");
602
- const x = g - l.top - l.bottom, y = h - l.left - l.right, A = Y(g - l[p], x), b = Y(h - l[w], y), R = !e.middlewareData.shift;
603
- let v = A, O = b;
604
- if ((n = e.middlewareData.shift) != null && n.enabled.x && (O = y), (o = e.middlewareData.shift) != null && o.enabled.y && (v = x), R && !m) {
605
- const D = E(l.left, 0), z = E(l.right, 0), V = E(l.top, 0), I = E(l.bottom, 0);
606
- f ? O = h - 2 * (D !== 0 || z !== 0 ? D + z : E(l.left, l.right)) : v = g - 2 * (V !== 0 || I !== 0 ? V + I : E(l.top, l.bottom));
607
- }
608
- await d({
609
- ...e,
610
- availableWidth: O,
611
- availableHeight: v
612
- });
613
- const S = await r.getDimensions(c.floating);
614
- return h !== S.width || g !== S.height ? {
615
- reset: {
616
- rects: !0
617
- }
618
- } : {};
619
- }
620
- };
621
- };
622
- function ft() {
623
- return typeof window < "u";
624
- }
625
- function G(t) {
626
- return Ot(t) ? (t.nodeName || "").toLowerCase() : "#document";
627
- }
628
- function L(t) {
629
- var e;
630
- return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
631
- }
632
- function H(t) {
633
- var e;
634
- return (e = (Ot(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
635
- }
636
- function Ot(t) {
637
- return ft() ? t instanceof Node || t instanceof L(t).Node : !1;
638
- }
639
- function M(t) {
640
- return ft() ? t instanceof Element || t instanceof L(t).Element : !1;
641
- }
642
- function B(t) {
643
- return ft() ? t instanceof HTMLElement || t instanceof L(t).HTMLElement : !1;
644
- }
645
- function Mt(t) {
646
- return !ft() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof L(t).ShadowRoot;
647
- }
648
- const xe = /* @__PURE__ */ new Set(["inline", "contents"]);
649
- function st(t) {
650
- const {
651
- overflow: e,
652
- overflowX: n,
653
- overflowY: o,
654
- display: i
655
- } = F(t);
656
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !xe.has(i);
657
- }
658
- const ye = /* @__PURE__ */ new Set(["table", "td", "th"]);
659
- function ve(t) {
660
- return ye.has(G(t));
661
- }
662
- const be = [":popover-open", ":modal"];
663
- function ut(t) {
664
- return be.some((e) => {
665
- try {
666
- return t.matches(e);
667
- } catch {
668
- return !1;
669
- }
670
- });
671
- }
672
- const Ae = ["transform", "translate", "scale", "rotate", "perspective"], Oe = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Re = ["paint", "layout", "strict", "content"];
673
- function Rt(t) {
674
- const e = Ct(), n = M(t) ? F(t) : t;
675
- return Ae.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || Oe.some((o) => (n.willChange || "").includes(o)) || Re.some((o) => (n.contain || "").includes(o));
676
- }
677
- function Ce(t) {
678
- let e = q(t);
679
- for (; B(e) && !tt(e); ) {
680
- if (Rt(e))
681
- return e;
682
- if (ut(e))
683
- return null;
684
- e = q(e);
685
- }
686
- return null;
687
- }
688
- function Ct() {
689
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
690
- }
691
- const Se = /* @__PURE__ */ new Set(["html", "body", "#document"]);
692
- function tt(t) {
693
- return Se.has(G(t));
694
- }
695
- function F(t) {
696
- return L(t).getComputedStyle(t);
697
- }
698
- function dt(t) {
699
- return M(t) ? {
700
- scrollLeft: t.scrollLeft,
701
- scrollTop: t.scrollTop
702
- } : {
703
- scrollLeft: t.scrollX,
704
- scrollTop: t.scrollY
705
- };
706
- }
707
- function q(t) {
708
- if (G(t) === "html")
709
- return t;
710
- const e = (
711
- // Step into the shadow DOM of the parent of a slotted node.
712
- t.assignedSlot || // DOM Element detected.
713
- t.parentNode || // ShadowRoot detected.
714
- Mt(t) && t.host || // Fallback.
715
- H(t)
716
- );
717
- return Mt(e) ? e.host : e;
718
- }
719
- function Nt(t) {
720
- const e = q(t);
721
- return tt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : B(e) && st(e) ? e : Nt(e);
722
- }
723
- function it(t, e, n) {
724
- var o;
725
- e === void 0 && (e = []), n === void 0 && (n = !0);
726
- const i = Nt(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = L(i);
727
- if (s) {
728
- const c = xt(r);
729
- return e.concat(r, r.visualViewport || [], st(i) ? i : [], c && n ? it(c) : []);
730
- }
731
- return e.concat(i, it(i, [], n));
732
- }
733
- function xt(t) {
734
- return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
735
- }
736
- function $t(t) {
737
- const e = F(t);
738
- let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
739
- const i = B(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, c = ct(n) !== s || ct(o) !== r;
740
- return c && (n = s, o = r), {
741
- width: n,
742
- height: o,
743
- $: c
744
- };
745
- }
746
- function St(t) {
747
- return M(t) ? t : t.contextElement;
748
- }
749
- function Z(t) {
750
- const e = St(t);
751
- if (!B(e))
752
- return W(1);
753
- const n = e.getBoundingClientRect(), {
754
- width: o,
755
- height: i,
756
- $: s
757
- } = $t(e);
758
- let r = (s ? ct(n.width) : n.width) / o, c = (s ? ct(n.height) : n.height) / i;
759
- return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
760
- x: r,
761
- y: c
762
- };
763
- }
764
- const Ee = /* @__PURE__ */ W(0);
765
- function _t(t) {
766
- const e = L(t);
767
- return !Ct() || !e.visualViewport ? Ee : {
768
- x: e.visualViewport.offsetLeft,
769
- y: e.visualViewport.offsetTop
770
- };
771
- }
772
- function Le(t, e, n) {
773
- return e === void 0 && (e = !1), !n || e && n !== L(t) ? !1 : e;
774
- }
775
- function K(t, e, n, o) {
776
- e === void 0 && (e = !1), n === void 0 && (n = !1);
777
- const i = t.getBoundingClientRect(), s = St(t);
778
- let r = W(1);
779
- e && (o ? M(o) && (r = Z(o)) : r = Z(t));
780
- const c = Le(s, n, o) ? _t(s) : W(0);
781
- let d = (i.left + c.x) / r.x, a = (i.top + c.y) / r.y, l = i.width / r.x, u = i.height / r.y;
782
- if (s) {
783
- const m = L(s), f = o && M(o) ? L(o) : o;
784
- let h = m, g = xt(h);
785
- for (; g && o && f !== h; ) {
786
- const p = Z(g), w = g.getBoundingClientRect(), x = F(g), y = w.left + (g.clientLeft + parseFloat(x.paddingLeft)) * p.x, A = w.top + (g.clientTop + parseFloat(x.paddingTop)) * p.y;
787
- d *= p.x, a *= p.y, l *= p.x, u *= p.y, d += y, a += A, h = L(g), g = xt(h);
788
- }
789
- }
790
- return at({
791
- width: l,
792
- height: u,
793
- x: d,
794
- y: a
795
- });
796
- }
797
- function mt(t, e) {
798
- const n = dt(t).scrollLeft;
799
- return e ? e.left + n : K(H(t)).left + n;
800
- }
801
- function zt(t, e) {
802
- const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - mt(t, n), i = n.top + e.scrollTop;
803
- return {
804
- x: o,
805
- y: i
806
- };
807
- }
808
- function De(t) {
809
- let {
810
- elements: e,
811
- rect: n,
812
- offsetParent: o,
813
- strategy: i
814
- } = t;
815
- const s = i === "fixed", r = H(o), c = e ? ut(e.floating) : !1;
816
- if (o === r || c && s)
817
- return n;
818
- let d = {
819
- scrollLeft: 0,
820
- scrollTop: 0
821
- }, a = W(1);
822
- const l = W(0), u = B(o);
823
- if ((u || !u && !s) && ((G(o) !== "body" || st(r)) && (d = dt(o)), B(o))) {
824
- const f = K(o);
825
- a = Z(o), l.x = f.x + o.clientLeft, l.y = f.y + o.clientTop;
826
- }
827
- const m = r && !u && !s ? zt(r, d) : W(0);
828
- return {
829
- width: n.width * a.x,
830
- height: n.height * a.y,
831
- x: n.x * a.x - d.scrollLeft * a.x + l.x + m.x,
832
- y: n.y * a.y - d.scrollTop * a.y + l.y + m.y
833
- };
834
- }
835
- function Te(t) {
836
- return Array.from(t.getClientRects());
837
- }
838
- function Pe(t) {
839
- const e = H(t), n = dt(t), o = t.ownerDocument.body, i = E(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = E(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
840
- let r = -n.scrollLeft + mt(t);
841
- const c = -n.scrollTop;
842
- return F(o).direction === "rtl" && (r += E(e.clientWidth, o.clientWidth) - i), {
843
- width: i,
844
- height: s,
845
- x: r,
846
- y: c
847
- };
848
- }
849
- const Ft = 25;
850
- function Me(t, e) {
851
- const n = L(t), o = H(t), i = n.visualViewport;
852
- let s = o.clientWidth, r = o.clientHeight, c = 0, d = 0;
853
- if (i) {
854
- s = i.width, r = i.height;
855
- const l = Ct();
856
- (!l || l && e === "fixed") && (c = i.offsetLeft, d = i.offsetTop);
857
- }
858
- const a = mt(o);
859
- if (a <= 0) {
860
- const l = o.ownerDocument, u = l.body, m = getComputedStyle(u), f = l.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - u.clientWidth - f);
861
- h <= Ft && (s -= h);
862
- } else a <= Ft && (s += a);
863
- return {
864
- width: s,
865
- height: r,
866
- x: c,
867
- y: d
868
- };
869
- }
870
- const Fe = /* @__PURE__ */ new Set(["absolute", "fixed"]);
871
- function Ve(t, e) {
872
- const n = K(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = B(t) ? Z(t) : W(1), r = t.clientWidth * s.x, c = t.clientHeight * s.y, d = i * s.x, a = o * s.y;
873
- return {
874
- width: r,
875
- height: c,
876
- x: d,
877
- y: a
878
- };
879
- }
880
- function Vt(t, e, n) {
881
- let o;
882
- if (e === "viewport")
883
- o = Me(t, n);
884
- else if (e === "document")
885
- o = Pe(H(t));
886
- else if (M(e))
887
- o = Ve(e, n);
888
- else {
889
- const i = _t(t);
890
- o = {
891
- x: e.x - i.x,
892
- y: e.y - i.y,
893
- width: e.width,
894
- height: e.height
895
- };
896
- }
897
- return at(o);
898
- }
899
- function It(t, e) {
900
- const n = q(t);
901
- return n === e || !M(n) || tt(n) ? !1 : F(n).position === "fixed" || It(n, e);
902
- }
903
- function ke(t, e) {
904
- const n = e.get(t);
905
- if (n)
906
- return n;
907
- let o = it(t, [], !1).filter((c) => M(c) && G(c) !== "body"), i = null;
908
- const s = F(t).position === "fixed";
909
- let r = s ? q(t) : t;
910
- for (; M(r) && !tt(r); ) {
911
- const c = F(r), d = Rt(r);
912
- !d && c.position === "fixed" && (i = null), (s ? !d && !i : !d && c.position === "static" && !!i && Fe.has(i.position) || st(r) && !d && It(t, r)) ? o = o.filter((l) => l !== r) : i = c, r = q(r);
913
- }
914
- return e.set(t, o), o;
915
- }
916
- function We(t) {
917
- let {
918
- element: e,
919
- boundary: n,
920
- rootBoundary: o,
921
- strategy: i
922
- } = t;
923
- const r = [...n === "clippingAncestors" ? ut(e) ? [] : ke(e, this._c) : [].concat(n), o], c = r[0], d = r.reduce((a, l) => {
924
- const u = Vt(e, l, i);
925
- return a.top = E(u.top, a.top), a.right = Y(u.right, a.right), a.bottom = Y(u.bottom, a.bottom), a.left = E(u.left, a.left), a;
926
- }, Vt(e, c, i));
927
- return {
928
- width: d.right - d.left,
929
- height: d.bottom - d.top,
930
- x: d.left,
931
- y: d.top
932
- };
933
- }
934
- function Be(t) {
935
- const {
936
- width: e,
937
- height: n
938
- } = $t(t);
939
- return {
940
- width: e,
941
- height: n
942
- };
943
- }
944
- function He(t, e, n) {
945
- const o = B(e), i = H(e), s = n === "fixed", r = K(t, !0, s, e);
946
- let c = {
947
- scrollLeft: 0,
948
- scrollTop: 0
949
- };
950
- const d = W(0);
951
- function a() {
952
- d.x = mt(i);
953
- }
954
- if (o || !o && !s)
955
- if ((G(e) !== "body" || st(i)) && (c = dt(e)), o) {
956
- const f = K(e, !0, s, e);
957
- d.x = f.x + e.clientLeft, d.y = f.y + e.clientTop;
958
- } else i && a();
959
- s && !o && i && a();
960
- const l = i && !o && !s ? zt(i, c) : W(0), u = r.left + c.scrollLeft - d.x - l.x, m = r.top + c.scrollTop - d.y - l.y;
961
- return {
962
- x: u,
963
- y: m,
964
- width: r.width,
965
- height: r.height
966
- };
967
- }
968
- function gt(t) {
969
- return F(t).position === "static";
970
- }
971
- function kt(t, e) {
972
- if (!B(t) || F(t).position === "fixed")
973
- return null;
974
- if (e)
975
- return e(t);
976
- let n = t.offsetParent;
977
- return H(t) === n && (n = n.ownerDocument.body), n;
978
- }
979
- function jt(t, e) {
980
- const n = L(t);
981
- if (ut(t))
982
- return n;
983
- if (!B(t)) {
984
- let i = q(t);
985
- for (; i && !tt(i); ) {
986
- if (M(i) && !gt(i))
987
- return i;
988
- i = q(i);
989
- }
990
- return n;
991
- }
992
- let o = kt(t, e);
993
- for (; o && ve(o) && gt(o); )
994
- o = kt(o, e);
995
- return o && tt(o) && gt(o) && !Rt(o) ? n : o || Ce(t) || n;
996
- }
997
- const Ne = async function(t) {
998
- const e = this.getOffsetParent || jt, n = this.getDimensions, o = await n(t.floating);
999
- return {
1000
- reference: He(t.reference, await e(t.floating), t.strategy),
1001
- floating: {
1002
- x: 0,
1003
- y: 0,
1004
- width: o.width,
1005
- height: o.height
1006
- }
1007
- };
1008
- };
1009
- function $e(t) {
1010
- return F(t).direction === "rtl";
1011
- }
1012
- const _e = {
1013
- convertOffsetParentRelativeRectToViewportRelativeRect: De,
1014
- getDocumentElement: H,
1015
- getClippingRect: We,
1016
- getOffsetParent: jt,
1017
- getElementRects: Ne,
1018
- getClientRects: Te,
1019
- getDimensions: Be,
1020
- getScale: Z,
1021
- isElement: M,
1022
- isRTL: $e
1023
- };
1024
- function Xt(t, e) {
1025
- return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1026
- }
1027
- function ze(t, e) {
1028
- let n = null, o;
1029
- const i = H(t);
1030
- function s() {
1031
- var c;
1032
- clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
1033
- }
1034
- function r(c, d) {
1035
- c === void 0 && (c = !1), d === void 0 && (d = 1), s();
1036
- const a = t.getBoundingClientRect(), {
1037
- left: l,
1038
- top: u,
1039
- width: m,
1040
- height: f
1041
- } = a;
1042
- if (c || e(), !m || !f)
1043
- return;
1044
- const h = rt(u), g = rt(i.clientWidth - (l + m)), p = rt(i.clientHeight - (u + f)), w = rt(l), y = {
1045
- rootMargin: -h + "px " + -g + "px " + -p + "px " + -w + "px",
1046
- threshold: E(0, Y(1, d)) || 1
1047
- };
1048
- let A = !0;
1049
- function b(R) {
1050
- const v = R[0].intersectionRatio;
1051
- if (v !== d) {
1052
- if (!A)
1053
- return r();
1054
- v ? r(!1, v) : o = setTimeout(() => {
1055
- r(!1, 1e-7);
1056
- }, 1e3);
1057
- }
1058
- v === 1 && !Xt(a, t.getBoundingClientRect()) && r(), A = !1;
1059
- }
1060
- try {
1061
- n = new IntersectionObserver(b, {
1062
- ...y,
1063
- // Handle <iframe>s
1064
- root: i.ownerDocument
1065
- });
1066
- } catch {
1067
- n = new IntersectionObserver(b, y);
1068
- }
1069
- n.observe(t);
1070
- }
1071
- return r(!0), s;
1072
- }
1073
- function qe(t, e, n, o) {
1074
- o === void 0 && (o = {});
1075
- const {
1076
- ancestorScroll: i = !0,
1077
- ancestorResize: s = !0,
1078
- elementResize: r = typeof ResizeObserver == "function",
1079
- layoutShift: c = typeof IntersectionObserver == "function",
1080
- animationFrame: d = !1
1081
- } = o, a = St(t), l = i || s ? [...a ? it(a) : [], ...it(e)] : [];
1082
- l.forEach((w) => {
1083
- i && w.addEventListener("scroll", n, {
1084
- passive: !0
1085
- }), s && w.addEventListener("resize", n);
1086
- });
1087
- const u = a && c ? ze(a, n) : null;
1088
- let m = -1, f = null;
1089
- r && (f = new ResizeObserver((w) => {
1090
- let [x] = w;
1091
- x && x.target === a && f && (f.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1092
- var y;
1093
- (y = f) == null || y.observe(e);
1094
- })), n();
1095
- }), a && !d && f.observe(a), f.observe(e));
1096
- let h, g = d ? K(t) : null;
1097
- d && p();
1098
- function p() {
1099
- const w = K(t);
1100
- g && !Xt(g, w) && n(), g = w, h = requestAnimationFrame(p);
1101
- }
1102
- return n(), () => {
1103
- var w;
1104
- l.forEach((x) => {
1105
- i && x.removeEventListener("scroll", n), s && x.removeEventListener("resize", n);
1106
- }), u?.(), (w = f) == null || w.disconnect(), f = null, d && cancelAnimationFrame(h);
1107
- };
1108
- }
1109
- const Ue = he, Ke = ge, Ge = ue, Je = we, Qe = de, Ie = fe, Ze = pe, je = (t, e, n) => {
1110
- const o = /* @__PURE__ */ new Map(), i = {
1111
- platform: _e,
1112
- ...n
1113
- }, s = {
1114
- ...i.platform,
1115
- _c: o
1116
- };
1117
- return ae(t, e, {
1118
- ...i,
1119
- platform: s
1120
- });
1121
- };
1122
- function Xe(t) {
1123
- return t != null && typeof t == "object" && "$el" in t;
1124
- }
1125
- function yt(t) {
1126
- if (Xe(t)) {
1127
- const e = t.$el;
1128
- return Ot(e) && G(e) === "#comment" ? null : e;
1129
- }
1130
- return t;
1131
- }
1132
- function Q(t) {
1133
- return typeof t == "function" ? t() : Jt(t);
1134
- }
1135
- function tn(t) {
1136
- return {
1137
- name: "arrow",
1138
- options: t,
1139
- fn(e) {
1140
- const n = yt(Q(t.element));
1141
- return n == null ? {} : Ie({
1142
- element: n,
1143
- padding: t.padding
1144
- }).fn(e);
1145
- }
1146
- };
1147
- }
1148
- function Yt(t) {
1149
- return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1150
- }
1151
- function Wt(t, e) {
1152
- const n = Yt(t);
1153
- return Math.round(e * n) / n;
1154
- }
1155
- function en(t, e, n) {
1156
- n === void 0 && (n = {});
1157
- const o = n.whileElementsMounted, i = X(() => {
1158
- var v;
1159
- return (v = Q(n.open)) != null ? v : !0;
1160
- }), s = X(() => Q(n.middleware)), r = X(() => {
1161
- var v;
1162
- return (v = Q(n.placement)) != null ? v : "bottom";
1163
- }), c = X(() => {
1164
- var v;
1165
- return (v = Q(n.strategy)) != null ? v : "absolute";
1166
- }), d = X(() => {
1167
- var v;
1168
- return (v = Q(n.transform)) != null ? v : !0;
1169
- }), a = X(() => yt(t.value)), l = X(() => yt(e.value)), u = nt(0), m = nt(0), f = nt(c.value), h = nt(r.value), g = Ut({}), p = nt(!1), w = X(() => {
1170
- const v = {
1171
- position: f.value,
1172
- left: "0",
1173
- top: "0"
1174
- };
1175
- if (!l.value)
1176
- return v;
1177
- const O = Wt(l.value, u.value), S = Wt(l.value, m.value);
1178
- return d.value ? {
1179
- ...v,
1180
- transform: "translate(" + O + "px, " + S + "px)",
1181
- ...Yt(l.value) >= 1.5 && {
1182
- willChange: "transform"
1183
- }
1184
- } : {
1185
- position: f.value,
1186
- left: O + "px",
1187
- top: S + "px"
1188
- };
1189
- });
1190
- let x;
1191
- function y() {
1192
- if (a.value == null || l.value == null)
1193
- return;
1194
- const v = i.value;
1195
- je(a.value, l.value, {
1196
- middleware: s.value,
1197
- placement: r.value,
1198
- strategy: c.value
1199
- }).then((O) => {
1200
- u.value = O.x, m.value = O.y, f.value = O.strategy, h.value = O.placement, g.value = O.middlewareData, p.value = v !== !1;
1201
- });
1202
- }
1203
- function A() {
1204
- typeof x == "function" && (x(), x = void 0);
1205
- }
1206
- function b() {
1207
- if (A(), o === void 0) {
1208
- y();
1209
- return;
1210
- }
1211
- if (a.value != null && l.value != null) {
1212
- x = o(a.value, l.value, y);
1213
- return;
1214
- }
1215
- }
1216
- function R() {
1217
- i.value || (p.value = !1);
1218
- }
1219
- return ht([s, r, c, i], y, {
1220
- flush: "sync"
1221
- }), ht([a, l], b, {
1222
- flush: "sync"
1223
- }), ht(i, R, {
1224
- flush: "sync"
1225
- }), Kt() && Gt(A), {
1226
- x: J(u),
1227
- y: J(m),
1228
- strategy: J(f),
1229
- placement: J(h),
1230
- middlewareData: J(g),
1231
- isPositioned: J(p),
1232
- floatingStyles: w,
1233
- update: y
1234
- };
1235
- }
1236
- export {
1237
- tn as a,
1238
- qe as b,
1239
- je as c,
1240
- Ie as d,
1241
- Je as e,
1242
- Ge as f,
1243
- Qe as h,
1244
- Ze as l,
1245
- Ue as o,
1246
- Ke as s,
1247
- en as u
1248
- };