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