@la-batcave/ui 3.1.2

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 (107) hide show
  1. package/README.md +95 -0
  2. package/dist/Alert.d.ts +27 -0
  3. package/dist/Alert.js +56 -0
  4. package/dist/Avatar.d.ts +20 -0
  5. package/dist/Avatar.js +40 -0
  6. package/dist/Badge.d.ts +56 -0
  7. package/dist/Badge.js +74 -0
  8. package/dist/Button.d.ts +53 -0
  9. package/dist/Button.js +66 -0
  10. package/dist/Card.d.ts +18 -0
  11. package/dist/Card.js +98 -0
  12. package/dist/CodeBlock.d.ts +45 -0
  13. package/dist/CodeBlock.js +306 -0
  14. package/dist/Collapse.d.ts +58 -0
  15. package/dist/Collapse.js +89 -0
  16. package/dist/Combobox.d.ts +44 -0
  17. package/dist/Combobox.js +409 -0
  18. package/dist/DarkMode.d.ts +59 -0
  19. package/dist/DarkMode.js +56 -0
  20. package/dist/DatePicker.d.ts +48 -0
  21. package/dist/DatePicker.js +2954 -0
  22. package/dist/Dialog.d.ts +119 -0
  23. package/dist/Dialog.js +337 -0
  24. package/dist/Drawer.d.ts +28 -0
  25. package/dist/Drawer.js +1126 -0
  26. package/dist/Dropdown.d.ts +23 -0
  27. package/dist/Dropdown.js +247 -0
  28. package/dist/EasyForm.d.ts +138 -0
  29. package/dist/EasyForm.js +286 -0
  30. package/dist/HoverCard.d.ts +10 -0
  31. package/dist/HoverCard.js +195 -0
  32. package/dist/Input.d.ts +230 -0
  33. package/dist/Input.js +2216 -0
  34. package/dist/LogViewer.d.ts +57 -0
  35. package/dist/LogViewer.js +120 -0
  36. package/dist/Menubar.d.ts +32 -0
  37. package/dist/Menubar.js +398 -0
  38. package/dist/Navbar.d.ts +20 -0
  39. package/dist/Navbar.js +31 -0
  40. package/dist/Pagination.d.ts +78 -0
  41. package/dist/Pagination.js +106 -0
  42. package/dist/Popover.d.ts +11 -0
  43. package/dist/Popover.js +28 -0
  44. package/dist/ProgressBar.d.ts +35 -0
  45. package/dist/ProgressBar.js +210 -0
  46. package/dist/Resizable.d.ts +23 -0
  47. package/dist/Resizable.js +1532 -0
  48. package/dist/Separator.d.ts +4 -0
  49. package/dist/Separator.js +46 -0
  50. package/dist/Sheet.d.ts +29 -0
  51. package/dist/Sheet.js +104 -0
  52. package/dist/Sidebar.d.ts +117 -0
  53. package/dist/Sidebar.js +237 -0
  54. package/dist/Skeleton.d.ts +57 -0
  55. package/dist/Skeleton.js +47 -0
  56. package/dist/Table.d.ts +71 -0
  57. package/dist/Table.js +94 -0
  58. package/dist/Tabs.d.ts +76 -0
  59. package/dist/Tabs.js +202 -0
  60. package/dist/Toast.d.ts +54 -0
  61. package/dist/Toast.js +827 -0
  62. package/dist/Tooltip.d.ts +29 -0
  63. package/dist/Tooltip.js +352 -0
  64. package/dist/Typography.d.ts +101 -0
  65. package/dist/Typography.js +123 -0
  66. package/dist/Widget.d.ts +133 -0
  67. package/dist/Widget.js +207 -0
  68. package/dist/_shared/Combination-D_l4PLF_.js +676 -0
  69. package/dist/_shared/index-B03TCNO5.js +142 -0
  70. package/dist/_shared/index-B1f-hyuh.js +31 -0
  71. package/dist/_shared/index-BC7vfx-u.js +13 -0
  72. package/dist/_shared/index-BrLJJgkl.js +67 -0
  73. package/dist/_shared/index-C0gNQvxa.js +269 -0
  74. package/dist/_shared/index-C3aZemLI.js +268 -0
  75. package/dist/_shared/index-CXeb1OMI.js +198 -0
  76. package/dist/_shared/index-CukUn3R0.js +626 -0
  77. package/dist/_shared/index-DLcqcWxM.js +29 -0
  78. package/dist/_shared/index-DlSuDb9N.js +283 -0
  79. package/dist/_shared/index-V-Ajw7Ac.js +79 -0
  80. package/dist/_shared/index-uPOYJZpG.js +34 -0
  81. package/dist/_shared/index-uu9PT5Nu.js +1588 -0
  82. package/dist/_shared/utils-eGXXUFl7.js +2935 -0
  83. package/dist/backgrounds/Aurora.d.ts +7 -0
  84. package/dist/backgrounds/Aurora.js +126 -0
  85. package/dist/backgrounds/Iridescence.d.ts +7 -0
  86. package/dist/backgrounds/Iridescence.js +77 -0
  87. package/dist/backgrounds/Lightning.d.ts +8 -0
  88. package/dist/backgrounds/Lightning.js +75 -0
  89. package/dist/backgrounds/LiquidChrome.d.ts +9 -0
  90. package/dist/backgrounds/LiquidChrome.js +89 -0
  91. package/dist/backgrounds/Particles.d.ts +15 -0
  92. package/dist/backgrounds/Particles.js +137 -0
  93. package/dist/backgrounds/PixelSnow.d.ts +9 -0
  94. package/dist/backgrounds/PixelSnow.js +52 -0
  95. package/dist/backgrounds/Silk.d.ts +8 -0
  96. package/dist/backgrounds/Silk.js +92 -0
  97. package/dist/backgrounds/Squares.d.ts +9 -0
  98. package/dist/backgrounds/Squares.js +75 -0
  99. package/dist/backgrounds/Threads.d.ts +7 -0
  100. package/dist/backgrounds/Threads.js +110 -0
  101. package/dist/backgrounds/Waves.d.ts +14 -0
  102. package/dist/backgrounds/Waves.js +139 -0
  103. package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
  104. package/dist/index.css +1 -0
  105. package/dist/index.d.ts +2 -0
  106. package/dist/index.js +4 -0
  107. package/package.json +318 -0
@@ -0,0 +1,1588 @@
1
+ import * as O from "react";
2
+ import { useLayoutEffect as Re } from "react";
3
+ import * as Oe from "react-dom";
4
+ import { P as Ot } from "./index-V-Ajw7Ac.js";
5
+ import { jsx as Y } from "react/jsx-runtime";
6
+ import { u as jt } from "./index-DLcqcWxM.js";
7
+ import { b as vt, a as Ce, d as Pe } from "./index-CXeb1OMI.js";
8
+ function Se(t) {
9
+ const [e, n] = O.useState(void 0);
10
+ return vt(() => {
11
+ if (t) {
12
+ n({ width: t.offsetWidth, height: t.offsetHeight });
13
+ const o = new ResizeObserver((r) => {
14
+ if (!Array.isArray(r) || !r.length)
15
+ return;
16
+ const i = r[0];
17
+ let s, c;
18
+ if ("borderBoxSize" in i) {
19
+ const l = i.borderBoxSize, f = Array.isArray(l) ? l[0] : l;
20
+ s = f.inlineSize, c = f.blockSize;
21
+ } else
22
+ s = t.offsetWidth, c = t.offsetHeight;
23
+ n({ width: s, height: c });
24
+ });
25
+ return o.observe(t, { box: "border-box" }), () => o.unobserve(t);
26
+ } else
27
+ n(void 0);
28
+ }, [t]), e;
29
+ }
30
+ const Ee = ["top", "right", "bottom", "left"], K = Math.min, F = Math.max, at = Math.round, ct = Math.floor, I = (t) => ({
31
+ x: t,
32
+ y: t
33
+ }), De = {
34
+ left: "right",
35
+ right: "left",
36
+ bottom: "top",
37
+ top: "bottom"
38
+ };
39
+ function bt(t, e, n) {
40
+ return F(t, K(e, n));
41
+ }
42
+ function j(t, e) {
43
+ return typeof t == "function" ? t(e) : t;
44
+ }
45
+ function q(t) {
46
+ return t.split("-")[0];
47
+ }
48
+ function et(t) {
49
+ return t.split("-")[1];
50
+ }
51
+ function Ct(t) {
52
+ return t === "x" ? "y" : "x";
53
+ }
54
+ function Pt(t) {
55
+ return t === "y" ? "height" : "width";
56
+ }
57
+ function V(t) {
58
+ const e = t[0];
59
+ return e === "t" || e === "b" ? "y" : "x";
60
+ }
61
+ function St(t) {
62
+ return Ct(V(t));
63
+ }
64
+ function Le(t, e, n) {
65
+ n === void 0 && (n = !1);
66
+ const o = et(t), r = St(t), i = Pt(r);
67
+ let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
68
+ return e.reference[i] > e.floating[i] && (s = ft(s)), [s, ft(s)];
69
+ }
70
+ function Me(t) {
71
+ const e = ft(t);
72
+ return [At(t), e, At(e)];
73
+ }
74
+ function At(t) {
75
+ return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
76
+ }
77
+ const Wt = ["left", "right"], kt = ["right", "left"], Te = ["top", "bottom"], $e = ["bottom", "top"];
78
+ function Ne(t, e, n) {
79
+ switch (t) {
80
+ case "top":
81
+ case "bottom":
82
+ return n ? e ? kt : Wt : e ? Wt : kt;
83
+ case "left":
84
+ case "right":
85
+ return e ? Te : $e;
86
+ default:
87
+ return [];
88
+ }
89
+ }
90
+ function We(t, e, n, o) {
91
+ const r = et(t);
92
+ let i = Ne(q(t), n === "start", o);
93
+ return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(At)))), i;
94
+ }
95
+ function ft(t) {
96
+ const e = q(t);
97
+ return De[e] + t.slice(e.length);
98
+ }
99
+ function ke(t) {
100
+ return {
101
+ top: 0,
102
+ right: 0,
103
+ bottom: 0,
104
+ left: 0,
105
+ ...t
106
+ };
107
+ }
108
+ function qt(t) {
109
+ return typeof t != "number" ? ke(t) : {
110
+ top: t,
111
+ right: t,
112
+ bottom: t,
113
+ left: t
114
+ };
115
+ }
116
+ function ut(t) {
117
+ const {
118
+ x: e,
119
+ y: n,
120
+ width: o,
121
+ height: r
122
+ } = t;
123
+ return {
124
+ width: o,
125
+ height: r,
126
+ top: n,
127
+ left: e,
128
+ right: e + o,
129
+ bottom: n + r,
130
+ x: e,
131
+ y: n
132
+ };
133
+ }
134
+ function Ft(t, e, n) {
135
+ let {
136
+ reference: o,
137
+ floating: r
138
+ } = t;
139
+ const i = V(e), s = St(e), c = Pt(s), l = q(e), f = i === "y", a = o.x + o.width / 2 - r.width / 2, d = o.y + o.height / 2 - r.height / 2, m = o[c] / 2 - r[c] / 2;
140
+ let u;
141
+ switch (l) {
142
+ case "top":
143
+ u = {
144
+ x: a,
145
+ y: o.y - r.height
146
+ };
147
+ break;
148
+ case "bottom":
149
+ u = {
150
+ x: a,
151
+ y: o.y + o.height
152
+ };
153
+ break;
154
+ case "right":
155
+ u = {
156
+ x: o.x + o.width,
157
+ y: d
158
+ };
159
+ break;
160
+ case "left":
161
+ u = {
162
+ x: o.x - r.width,
163
+ y: d
164
+ };
165
+ break;
166
+ default:
167
+ u = {
168
+ x: o.x,
169
+ y: o.y
170
+ };
171
+ }
172
+ switch (et(e)) {
173
+ case "start":
174
+ u[s] -= m * (n && f ? -1 : 1);
175
+ break;
176
+ case "end":
177
+ u[s] += m * (n && f ? -1 : 1);
178
+ break;
179
+ }
180
+ return u;
181
+ }
182
+ async function Fe(t, e) {
183
+ var n;
184
+ e === void 0 && (e = {});
185
+ const {
186
+ x: o,
187
+ y: r,
188
+ platform: i,
189
+ rects: s,
190
+ elements: c,
191
+ strategy: l
192
+ } = t, {
193
+ boundary: f = "clippingAncestors",
194
+ rootBoundary: a = "viewport",
195
+ elementContext: d = "floating",
196
+ altBoundary: m = !1,
197
+ padding: u = 0
198
+ } = j(e, t), h = qt(u), x = c[m ? d === "floating" ? "reference" : "floating" : d], g = ut(await i.getClippingRect({
199
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(x))) == null || n ? x : x.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
200
+ boundary: f,
201
+ rootBoundary: a,
202
+ strategy: l
203
+ })), v = d === "floating" ? {
204
+ x: o,
205
+ y: r,
206
+ width: s.floating.width,
207
+ height: s.floating.height
208
+ } : s.reference, y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), w = await (i.isElement == null ? void 0 : i.isElement(y)) ? await (i.getScale == null ? void 0 : i.getScale(y)) || {
209
+ x: 1,
210
+ y: 1
211
+ } : {
212
+ x: 1,
213
+ y: 1
214
+ }, A = ut(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
215
+ elements: c,
216
+ rect: v,
217
+ offsetParent: y,
218
+ strategy: l
219
+ }) : v);
220
+ return {
221
+ top: (g.top - A.top + h.top) / w.y,
222
+ bottom: (A.bottom - g.bottom + h.bottom) / w.y,
223
+ left: (g.left - A.left + h.left) / w.x,
224
+ right: (A.right - g.right + h.right) / w.x
225
+ };
226
+ }
227
+ const _e = 50, He = async (t, e, n) => {
228
+ const {
229
+ placement: o = "bottom",
230
+ strategy: r = "absolute",
231
+ middleware: i = [],
232
+ platform: s
233
+ } = n, c = s.detectOverflow ? s : {
234
+ ...s,
235
+ detectOverflow: Fe
236
+ }, l = await (s.isRTL == null ? void 0 : s.isRTL(e));
237
+ let f = await s.getElementRects({
238
+ reference: t,
239
+ floating: e,
240
+ strategy: r
241
+ }), {
242
+ x: a,
243
+ y: d
244
+ } = Ft(f, o, l), m = o, u = 0;
245
+ const h = {};
246
+ for (let p = 0; p < i.length; p++) {
247
+ const x = i[p];
248
+ if (!x)
249
+ continue;
250
+ const {
251
+ name: g,
252
+ fn: v
253
+ } = x, {
254
+ x: y,
255
+ y: w,
256
+ data: A,
257
+ reset: R
258
+ } = await v({
259
+ x: a,
260
+ y: d,
261
+ initialPlacement: o,
262
+ placement: m,
263
+ strategy: r,
264
+ middlewareData: h,
265
+ rects: f,
266
+ platform: c,
267
+ elements: {
268
+ reference: t,
269
+ floating: e
270
+ }
271
+ });
272
+ a = y ?? a, d = w ?? d, h[g] = {
273
+ ...h[g],
274
+ ...A
275
+ }, R && u < _e && (u++, typeof R == "object" && (R.placement && (m = R.placement), R.rects && (f = R.rects === !0 ? await s.getElementRects({
276
+ reference: t,
277
+ floating: e,
278
+ strategy: r
279
+ }) : R.rects), {
280
+ x: a,
281
+ y: d
282
+ } = Ft(f, m, l)), p = -1);
283
+ }
284
+ return {
285
+ x: a,
286
+ y: d,
287
+ placement: m,
288
+ strategy: r,
289
+ middlewareData: h
290
+ };
291
+ }, ze = (t) => ({
292
+ name: "arrow",
293
+ options: t,
294
+ async fn(e) {
295
+ const {
296
+ x: n,
297
+ y: o,
298
+ placement: r,
299
+ rects: i,
300
+ platform: s,
301
+ elements: c,
302
+ middlewareData: l
303
+ } = e, {
304
+ element: f,
305
+ padding: a = 0
306
+ } = j(t, e) || {};
307
+ if (f == null)
308
+ return {};
309
+ const d = qt(a), m = {
310
+ x: n,
311
+ y: o
312
+ }, u = St(r), h = Pt(u), p = await s.getDimensions(f), x = u === "y", g = x ? "top" : "left", v = x ? "bottom" : "right", y = x ? "clientHeight" : "clientWidth", w = i.reference[h] + i.reference[u] - m[u] - i.floating[h], A = m[u] - i.reference[u], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(f));
313
+ let C = R ? R[y] : 0;
314
+ (!C || !await (s.isElement == null ? void 0 : s.isElement(R))) && (C = c.floating[y] || i.floating[h]);
315
+ const M = w / 2 - A / 2, W = C / 2 - p[h] / 2 - 1, L = K(d[g], W), $ = K(d[v], W), N = L, S = C - p[h] - $, P = C / 2 - p[h] / 2 + M, k = bt(N, P, S), E = !l.arrow && et(r) != null && P !== k && i.reference[h] / 2 - (P < N ? L : $) - p[h] / 2 < 0, D = E ? P < N ? P - N : P - S : 0;
316
+ return {
317
+ [u]: m[u] + D,
318
+ data: {
319
+ [u]: k,
320
+ centerOffset: P - k - D,
321
+ ...E && {
322
+ alignmentOffset: D
323
+ }
324
+ },
325
+ reset: E
326
+ };
327
+ }
328
+ }), Be = function(t) {
329
+ return t === void 0 && (t = {}), {
330
+ name: "flip",
331
+ options: t,
332
+ async fn(e) {
333
+ var n, o;
334
+ const {
335
+ placement: r,
336
+ middlewareData: i,
337
+ rects: s,
338
+ initialPlacement: c,
339
+ platform: l,
340
+ elements: f
341
+ } = e, {
342
+ mainAxis: a = !0,
343
+ crossAxis: d = !0,
344
+ fallbackPlacements: m,
345
+ fallbackStrategy: u = "bestFit",
346
+ fallbackAxisSideDirection: h = "none",
347
+ flipAlignment: p = !0,
348
+ ...x
349
+ } = j(t, e);
350
+ if ((n = i.arrow) != null && n.alignmentOffset)
351
+ return {};
352
+ const g = q(r), v = V(c), y = q(c) === c, w = await (l.isRTL == null ? void 0 : l.isRTL(f.floating)), A = m || (y || !p ? [ft(c)] : Me(c)), R = h !== "none";
353
+ !m && R && A.push(...We(c, p, h, w));
354
+ const C = [c, ...A], M = await l.detectOverflow(e, x), W = [];
355
+ let L = ((o = i.flip) == null ? void 0 : o.overflows) || [];
356
+ if (a && W.push(M[g]), d) {
357
+ const P = Le(r, s, w);
358
+ W.push(M[P[0]], M[P[1]]);
359
+ }
360
+ if (L = [...L, {
361
+ placement: r,
362
+ overflows: W
363
+ }], !W.every((P) => P <= 0)) {
364
+ var $, N;
365
+ const P = ((($ = i.flip) == null ? void 0 : $.index) || 0) + 1, k = C[P];
366
+ if (k && (!(d === "alignment" ? v !== V(k) : !1) || // We leave the current main axis only if every placement on that axis
367
+ // overflows the main axis.
368
+ L.every((b) => V(b.placement) === v ? b.overflows[0] > 0 : !0)))
369
+ return {
370
+ data: {
371
+ index: P,
372
+ overflows: L
373
+ },
374
+ reset: {
375
+ placement: k
376
+ }
377
+ };
378
+ let E = (N = L.filter((D) => D.overflows[0] <= 0).sort((D, b) => D.overflows[1] - b.overflows[1])[0]) == null ? void 0 : N.placement;
379
+ if (!E)
380
+ switch (u) {
381
+ case "bestFit": {
382
+ var S;
383
+ const D = (S = L.filter((b) => {
384
+ if (R) {
385
+ const T = V(b.placement);
386
+ return T === v || // Create a bias to the `y` side axis due to horizontal
387
+ // reading directions favoring greater width.
388
+ T === "y";
389
+ }
390
+ return !0;
391
+ }).map((b) => [b.placement, b.overflows.filter((T) => T > 0).reduce((T, B) => T + B, 0)]).sort((b, T) => b[1] - T[1])[0]) == null ? void 0 : S[0];
392
+ D && (E = D);
393
+ break;
394
+ }
395
+ case "initialPlacement":
396
+ E = c;
397
+ break;
398
+ }
399
+ if (r !== E)
400
+ return {
401
+ reset: {
402
+ placement: E
403
+ }
404
+ };
405
+ }
406
+ return {};
407
+ }
408
+ };
409
+ };
410
+ function _t(t, e) {
411
+ return {
412
+ top: t.top - e.height,
413
+ right: t.right - e.width,
414
+ bottom: t.bottom - e.height,
415
+ left: t.left - e.width
416
+ };
417
+ }
418
+ function Ht(t) {
419
+ return Ee.some((e) => t[e] >= 0);
420
+ }
421
+ const Ve = function(t) {
422
+ return t === void 0 && (t = {}), {
423
+ name: "hide",
424
+ options: t,
425
+ async fn(e) {
426
+ const {
427
+ rects: n,
428
+ platform: o
429
+ } = e, {
430
+ strategy: r = "referenceHidden",
431
+ ...i
432
+ } = j(t, e);
433
+ switch (r) {
434
+ case "referenceHidden": {
435
+ const s = await o.detectOverflow(e, {
436
+ ...i,
437
+ elementContext: "reference"
438
+ }), c = _t(s, n.reference);
439
+ return {
440
+ data: {
441
+ referenceHiddenOffsets: c,
442
+ referenceHidden: Ht(c)
443
+ }
444
+ };
445
+ }
446
+ case "escaped": {
447
+ const s = await o.detectOverflow(e, {
448
+ ...i,
449
+ altBoundary: !0
450
+ }), c = _t(s, n.floating);
451
+ return {
452
+ data: {
453
+ escapedOffsets: c,
454
+ escaped: Ht(c)
455
+ }
456
+ };
457
+ }
458
+ default:
459
+ return {};
460
+ }
461
+ }
462
+ };
463
+ }, Ut = /* @__PURE__ */ new Set(["left", "top"]);
464
+ async function Ie(t, e) {
465
+ const {
466
+ placement: n,
467
+ platform: o,
468
+ elements: r
469
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = q(n), c = et(n), l = V(n) === "y", f = Ut.has(s) ? -1 : 1, a = i && l ? -1 : 1, d = j(e, t);
470
+ let {
471
+ mainAxis: m,
472
+ crossAxis: u,
473
+ alignmentAxis: h
474
+ } = typeof d == "number" ? {
475
+ mainAxis: d,
476
+ crossAxis: 0,
477
+ alignmentAxis: null
478
+ } : {
479
+ mainAxis: d.mainAxis || 0,
480
+ crossAxis: d.crossAxis || 0,
481
+ alignmentAxis: d.alignmentAxis
482
+ };
483
+ return c && typeof h == "number" && (u = c === "end" ? h * -1 : h), l ? {
484
+ x: u * a,
485
+ y: m * f
486
+ } : {
487
+ x: m * f,
488
+ y: u * a
489
+ };
490
+ }
491
+ const Xe = function(t) {
492
+ return t === void 0 && (t = 0), {
493
+ name: "offset",
494
+ options: t,
495
+ async fn(e) {
496
+ var n, o;
497
+ const {
498
+ x: r,
499
+ y: i,
500
+ placement: s,
501
+ middlewareData: c
502
+ } = e, l = await Ie(e, t);
503
+ return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
504
+ x: r + l.x,
505
+ y: i + l.y,
506
+ data: {
507
+ ...l,
508
+ placement: s
509
+ }
510
+ };
511
+ }
512
+ };
513
+ }, Ye = function(t) {
514
+ return t === void 0 && (t = {}), {
515
+ name: "shift",
516
+ options: t,
517
+ async fn(e) {
518
+ const {
519
+ x: n,
520
+ y: o,
521
+ placement: r,
522
+ platform: i
523
+ } = e, {
524
+ mainAxis: s = !0,
525
+ crossAxis: c = !1,
526
+ limiter: l = {
527
+ fn: (g) => {
528
+ let {
529
+ x: v,
530
+ y
531
+ } = g;
532
+ return {
533
+ x: v,
534
+ y
535
+ };
536
+ }
537
+ },
538
+ ...f
539
+ } = j(t, e), a = {
540
+ x: n,
541
+ y: o
542
+ }, d = await i.detectOverflow(e, f), m = V(q(r)), u = Ct(m);
543
+ let h = a[u], p = a[m];
544
+ if (s) {
545
+ const g = u === "y" ? "top" : "left", v = u === "y" ? "bottom" : "right", y = h + d[g], w = h - d[v];
546
+ h = bt(y, h, w);
547
+ }
548
+ if (c) {
549
+ const g = m === "y" ? "top" : "left", v = m === "y" ? "bottom" : "right", y = p + d[g], w = p - d[v];
550
+ p = bt(y, p, w);
551
+ }
552
+ const x = l.fn({
553
+ ...e,
554
+ [u]: h,
555
+ [m]: p
556
+ });
557
+ return {
558
+ ...x,
559
+ data: {
560
+ x: x.x - n,
561
+ y: x.y - o,
562
+ enabled: {
563
+ [u]: s,
564
+ [m]: c
565
+ }
566
+ }
567
+ };
568
+ }
569
+ };
570
+ }, je = function(t) {
571
+ return t === void 0 && (t = {}), {
572
+ options: t,
573
+ fn(e) {
574
+ const {
575
+ x: n,
576
+ y: o,
577
+ placement: r,
578
+ rects: i,
579
+ middlewareData: s
580
+ } = e, {
581
+ offset: c = 0,
582
+ mainAxis: l = !0,
583
+ crossAxis: f = !0
584
+ } = j(t, e), a = {
585
+ x: n,
586
+ y: o
587
+ }, d = V(r), m = Ct(d);
588
+ let u = a[m], h = a[d];
589
+ const p = j(c, e), x = typeof p == "number" ? {
590
+ mainAxis: p,
591
+ crossAxis: 0
592
+ } : {
593
+ mainAxis: 0,
594
+ crossAxis: 0,
595
+ ...p
596
+ };
597
+ if (l) {
598
+ const y = m === "y" ? "height" : "width", w = i.reference[m] - i.floating[y] + x.mainAxis, A = i.reference[m] + i.reference[y] - x.mainAxis;
599
+ u < w ? u = w : u > A && (u = A);
600
+ }
601
+ if (f) {
602
+ var g, v;
603
+ const y = m === "y" ? "width" : "height", w = Ut.has(q(r)), A = i.reference[d] - i.floating[y] + (w && ((g = s.offset) == null ? void 0 : g[d]) || 0) + (w ? 0 : x.crossAxis), R = i.reference[d] + i.reference[y] + (w ? 0 : ((v = s.offset) == null ? void 0 : v[d]) || 0) - (w ? x.crossAxis : 0);
604
+ h < A ? h = A : h > R && (h = R);
605
+ }
606
+ return {
607
+ [m]: u,
608
+ [d]: h
609
+ };
610
+ }
611
+ };
612
+ }, qe = function(t) {
613
+ return t === void 0 && (t = {}), {
614
+ name: "size",
615
+ options: t,
616
+ async fn(e) {
617
+ var n, o;
618
+ const {
619
+ placement: r,
620
+ rects: i,
621
+ platform: s,
622
+ elements: c
623
+ } = e, {
624
+ apply: l = () => {
625
+ },
626
+ ...f
627
+ } = j(t, e), a = await s.detectOverflow(e, f), d = q(r), m = et(r), u = V(r) === "y", {
628
+ width: h,
629
+ height: p
630
+ } = i.floating;
631
+ let x, g;
632
+ d === "top" || d === "bottom" ? (x = d, g = m === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (g = d, x = m === "end" ? "top" : "bottom");
633
+ const v = p - a.top - a.bottom, y = h - a.left - a.right, w = K(p - a[x], v), A = K(h - a[g], y), R = !e.middlewareData.shift;
634
+ let C = w, M = A;
635
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (M = y), (o = e.middlewareData.shift) != null && o.enabled.y && (C = v), R && !m) {
636
+ const L = F(a.left, 0), $ = F(a.right, 0), N = F(a.top, 0), S = F(a.bottom, 0);
637
+ u ? M = h - 2 * (L !== 0 || $ !== 0 ? L + $ : F(a.left, a.right)) : C = p - 2 * (N !== 0 || S !== 0 ? N + S : F(a.top, a.bottom));
638
+ }
639
+ await l({
640
+ ...e,
641
+ availableWidth: M,
642
+ availableHeight: C
643
+ });
644
+ const W = await s.getDimensions(c.floating);
645
+ return h !== W.width || p !== W.height ? {
646
+ reset: {
647
+ rects: !0
648
+ }
649
+ } : {};
650
+ }
651
+ };
652
+ };
653
+ function mt() {
654
+ return typeof window < "u";
655
+ }
656
+ function nt(t) {
657
+ return Kt(t) ? (t.nodeName || "").toLowerCase() : "#document";
658
+ }
659
+ function _(t) {
660
+ var e;
661
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
662
+ }
663
+ function X(t) {
664
+ var e;
665
+ return (e = (Kt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
666
+ }
667
+ function Kt(t) {
668
+ return mt() ? t instanceof Node || t instanceof _(t).Node : !1;
669
+ }
670
+ function H(t) {
671
+ return mt() ? t instanceof Element || t instanceof _(t).Element : !1;
672
+ }
673
+ function U(t) {
674
+ return mt() ? t instanceof HTMLElement || t instanceof _(t).HTMLElement : !1;
675
+ }
676
+ function zt(t) {
677
+ return !mt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof _(t).ShadowRoot;
678
+ }
679
+ function it(t) {
680
+ const {
681
+ overflow: e,
682
+ overflowX: n,
683
+ overflowY: o,
684
+ display: r
685
+ } = z(t);
686
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && r !== "inline" && r !== "contents";
687
+ }
688
+ function Ue(t) {
689
+ return /^(table|td|th)$/.test(nt(t));
690
+ }
691
+ function ht(t) {
692
+ try {
693
+ if (t.matches(":popover-open"))
694
+ return !0;
695
+ } catch {
696
+ }
697
+ try {
698
+ return t.matches(":modal");
699
+ } catch {
700
+ return !1;
701
+ }
702
+ }
703
+ const Ke = /transform|translate|scale|rotate|perspective|filter/, Ze = /paint|layout|strict|content/, G = (t) => !!t && t !== "none";
704
+ let wt;
705
+ function Et(t) {
706
+ const e = H(t) ? z(t) : t;
707
+ return G(e.transform) || G(e.translate) || G(e.scale) || G(e.rotate) || G(e.perspective) || !Dt() && (G(e.backdropFilter) || G(e.filter)) || Ke.test(e.willChange || "") || Ze.test(e.contain || "");
708
+ }
709
+ function Ge(t) {
710
+ let e = Z(t);
711
+ for (; U(e) && !tt(e); ) {
712
+ if (Et(e))
713
+ return e;
714
+ if (ht(e))
715
+ return null;
716
+ e = Z(e);
717
+ }
718
+ return null;
719
+ }
720
+ function Dt() {
721
+ return wt == null && (wt = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), wt;
722
+ }
723
+ function tt(t) {
724
+ return /^(html|body|#document)$/.test(nt(t));
725
+ }
726
+ function z(t) {
727
+ return _(t).getComputedStyle(t);
728
+ }
729
+ function pt(t) {
730
+ return H(t) ? {
731
+ scrollLeft: t.scrollLeft,
732
+ scrollTop: t.scrollTop
733
+ } : {
734
+ scrollLeft: t.scrollX,
735
+ scrollTop: t.scrollY
736
+ };
737
+ }
738
+ function Z(t) {
739
+ if (nt(t) === "html")
740
+ return t;
741
+ const e = (
742
+ // Step into the shadow DOM of the parent of a slotted node.
743
+ t.assignedSlot || // DOM Element detected.
744
+ t.parentNode || // ShadowRoot detected.
745
+ zt(t) && t.host || // Fallback.
746
+ X(t)
747
+ );
748
+ return zt(e) ? e.host : e;
749
+ }
750
+ function Zt(t) {
751
+ const e = Z(t);
752
+ return tt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : U(e) && it(e) ? e : Zt(e);
753
+ }
754
+ function rt(t, e, n) {
755
+ var o;
756
+ e === void 0 && (e = []), n === void 0 && (n = !0);
757
+ const r = Zt(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = _(r);
758
+ if (i) {
759
+ const c = Rt(s);
760
+ return e.concat(s, s.visualViewport || [], it(r) ? r : [], c && n ? rt(c) : []);
761
+ } else
762
+ return e.concat(r, rt(r, [], n));
763
+ }
764
+ function Rt(t) {
765
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
766
+ }
767
+ function Gt(t) {
768
+ const e = z(t);
769
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
770
+ const r = U(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = at(n) !== i || at(o) !== s;
771
+ return c && (n = i, o = s), {
772
+ width: n,
773
+ height: o,
774
+ $: c
775
+ };
776
+ }
777
+ function Lt(t) {
778
+ return H(t) ? t : t.contextElement;
779
+ }
780
+ function Q(t) {
781
+ const e = Lt(t);
782
+ if (!U(e))
783
+ return I(1);
784
+ const n = e.getBoundingClientRect(), {
785
+ width: o,
786
+ height: r,
787
+ $: i
788
+ } = Gt(e);
789
+ let s = (i ? at(n.width) : n.width) / o, c = (i ? at(n.height) : n.height) / r;
790
+ return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
791
+ x: s,
792
+ y: c
793
+ };
794
+ }
795
+ const Je = /* @__PURE__ */ I(0);
796
+ function Jt(t) {
797
+ const e = _(t);
798
+ return !Dt() || !e.visualViewport ? Je : {
799
+ x: e.visualViewport.offsetLeft,
800
+ y: e.visualViewport.offsetTop
801
+ };
802
+ }
803
+ function Qe(t, e, n) {
804
+ return e === void 0 && (e = !1), !n || e && n !== _(t) ? !1 : e;
805
+ }
806
+ function J(t, e, n, o) {
807
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
808
+ const r = t.getBoundingClientRect(), i = Lt(t);
809
+ let s = I(1);
810
+ e && (o ? H(o) && (s = Q(o)) : s = Q(t));
811
+ const c = Qe(i, n, o) ? Jt(i) : I(0);
812
+ let l = (r.left + c.x) / s.x, f = (r.top + c.y) / s.y, a = r.width / s.x, d = r.height / s.y;
813
+ if (i) {
814
+ const m = _(i), u = o && H(o) ? _(o) : o;
815
+ let h = m, p = Rt(h);
816
+ for (; p && o && u !== h; ) {
817
+ const x = Q(p), g = p.getBoundingClientRect(), v = z(p), y = g.left + (p.clientLeft + parseFloat(v.paddingLeft)) * x.x, w = g.top + (p.clientTop + parseFloat(v.paddingTop)) * x.y;
818
+ l *= x.x, f *= x.y, a *= x.x, d *= x.y, l += y, f += w, h = _(p), p = Rt(h);
819
+ }
820
+ }
821
+ return ut({
822
+ width: a,
823
+ height: d,
824
+ x: l,
825
+ y: f
826
+ });
827
+ }
828
+ function gt(t, e) {
829
+ const n = pt(t).scrollLeft;
830
+ return e ? e.left + n : J(X(t)).left + n;
831
+ }
832
+ function Qt(t, e) {
833
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - gt(t, n), r = n.top + e.scrollTop;
834
+ return {
835
+ x: o,
836
+ y: r
837
+ };
838
+ }
839
+ function tn(t) {
840
+ let {
841
+ elements: e,
842
+ rect: n,
843
+ offsetParent: o,
844
+ strategy: r
845
+ } = t;
846
+ const i = r === "fixed", s = X(o), c = e ? ht(e.floating) : !1;
847
+ if (o === s || c && i)
848
+ return n;
849
+ let l = {
850
+ scrollLeft: 0,
851
+ scrollTop: 0
852
+ }, f = I(1);
853
+ const a = I(0), d = U(o);
854
+ if ((d || !d && !i) && ((nt(o) !== "body" || it(s)) && (l = pt(o)), d)) {
855
+ const u = J(o);
856
+ f = Q(o), a.x = u.x + o.clientLeft, a.y = u.y + o.clientTop;
857
+ }
858
+ const m = s && !d && !i ? Qt(s, l) : I(0);
859
+ return {
860
+ width: n.width * f.x,
861
+ height: n.height * f.y,
862
+ x: n.x * f.x - l.scrollLeft * f.x + a.x + m.x,
863
+ y: n.y * f.y - l.scrollTop * f.y + a.y + m.y
864
+ };
865
+ }
866
+ function en(t) {
867
+ return Array.from(t.getClientRects());
868
+ }
869
+ function nn(t) {
870
+ const e = X(t), n = pt(t), o = t.ownerDocument.body, r = F(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = F(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
871
+ let s = -n.scrollLeft + gt(t);
872
+ const c = -n.scrollTop;
873
+ return z(o).direction === "rtl" && (s += F(e.clientWidth, o.clientWidth) - r), {
874
+ width: r,
875
+ height: i,
876
+ x: s,
877
+ y: c
878
+ };
879
+ }
880
+ const Bt = 25;
881
+ function on(t, e) {
882
+ const n = _(t), o = X(t), r = n.visualViewport;
883
+ let i = o.clientWidth, s = o.clientHeight, c = 0, l = 0;
884
+ if (r) {
885
+ i = r.width, s = r.height;
886
+ const a = Dt();
887
+ (!a || a && e === "fixed") && (c = r.offsetLeft, l = r.offsetTop);
888
+ }
889
+ const f = gt(o);
890
+ if (f <= 0) {
891
+ const a = o.ownerDocument, d = a.body, m = getComputedStyle(d), u = a.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - d.clientWidth - u);
892
+ h <= Bt && (i -= h);
893
+ } else f <= Bt && (i += f);
894
+ return {
895
+ width: i,
896
+ height: s,
897
+ x: c,
898
+ y: l
899
+ };
900
+ }
901
+ function rn(t, e) {
902
+ const n = J(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = U(t) ? Q(t) : I(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, l = r * i.x, f = o * i.y;
903
+ return {
904
+ width: s,
905
+ height: c,
906
+ x: l,
907
+ y: f
908
+ };
909
+ }
910
+ function Vt(t, e, n) {
911
+ let o;
912
+ if (e === "viewport")
913
+ o = on(t, n);
914
+ else if (e === "document")
915
+ o = nn(X(t));
916
+ else if (H(e))
917
+ o = rn(e, n);
918
+ else {
919
+ const r = Jt(t);
920
+ o = {
921
+ x: e.x - r.x,
922
+ y: e.y - r.y,
923
+ width: e.width,
924
+ height: e.height
925
+ };
926
+ }
927
+ return ut(o);
928
+ }
929
+ function te(t, e) {
930
+ const n = Z(t);
931
+ return n === e || !H(n) || tt(n) ? !1 : z(n).position === "fixed" || te(n, e);
932
+ }
933
+ function sn(t, e) {
934
+ const n = e.get(t);
935
+ if (n)
936
+ return n;
937
+ let o = rt(t, [], !1).filter((c) => H(c) && nt(c) !== "body"), r = null;
938
+ const i = z(t).position === "fixed";
939
+ let s = i ? Z(t) : t;
940
+ for (; H(s) && !tt(s); ) {
941
+ const c = z(s), l = Et(s);
942
+ !l && c.position === "fixed" && (r = null), (i ? !l && !r : !l && c.position === "static" && !!r && (r.position === "absolute" || r.position === "fixed") || it(s) && !l && te(t, s)) ? o = o.filter((a) => a !== s) : r = c, s = Z(s);
943
+ }
944
+ return e.set(t, o), o;
945
+ }
946
+ function cn(t) {
947
+ let {
948
+ element: e,
949
+ boundary: n,
950
+ rootBoundary: o,
951
+ strategy: r
952
+ } = t;
953
+ const s = [...n === "clippingAncestors" ? ht(e) ? [] : sn(e, this._c) : [].concat(n), o], c = Vt(e, s[0], r);
954
+ let l = c.top, f = c.right, a = c.bottom, d = c.left;
955
+ for (let m = 1; m < s.length; m++) {
956
+ const u = Vt(e, s[m], r);
957
+ l = F(u.top, l), f = K(u.right, f), a = K(u.bottom, a), d = F(u.left, d);
958
+ }
959
+ return {
960
+ width: f - d,
961
+ height: a - l,
962
+ x: d,
963
+ y: l
964
+ };
965
+ }
966
+ function ln(t) {
967
+ const {
968
+ width: e,
969
+ height: n
970
+ } = Gt(t);
971
+ return {
972
+ width: e,
973
+ height: n
974
+ };
975
+ }
976
+ function an(t, e, n) {
977
+ const o = U(e), r = X(e), i = n === "fixed", s = J(t, !0, i, e);
978
+ let c = {
979
+ scrollLeft: 0,
980
+ scrollTop: 0
981
+ };
982
+ const l = I(0);
983
+ function f() {
984
+ l.x = gt(r);
985
+ }
986
+ if (o || !o && !i)
987
+ if ((nt(e) !== "body" || it(r)) && (c = pt(e)), o) {
988
+ const u = J(e, !0, i, e);
989
+ l.x = u.x + e.clientLeft, l.y = u.y + e.clientTop;
990
+ } else r && f();
991
+ i && !o && r && f();
992
+ const a = r && !o && !i ? Qt(r, c) : I(0), d = s.left + c.scrollLeft - l.x - a.x, m = s.top + c.scrollTop - l.y - a.y;
993
+ return {
994
+ x: d,
995
+ y: m,
996
+ width: s.width,
997
+ height: s.height
998
+ };
999
+ }
1000
+ function xt(t) {
1001
+ return z(t).position === "static";
1002
+ }
1003
+ function It(t, e) {
1004
+ if (!U(t) || z(t).position === "fixed")
1005
+ return null;
1006
+ if (e)
1007
+ return e(t);
1008
+ let n = t.offsetParent;
1009
+ return X(t) === n && (n = n.ownerDocument.body), n;
1010
+ }
1011
+ function ee(t, e) {
1012
+ const n = _(t);
1013
+ if (ht(t))
1014
+ return n;
1015
+ if (!U(t)) {
1016
+ let r = Z(t);
1017
+ for (; r && !tt(r); ) {
1018
+ if (H(r) && !xt(r))
1019
+ return r;
1020
+ r = Z(r);
1021
+ }
1022
+ return n;
1023
+ }
1024
+ let o = It(t, e);
1025
+ for (; o && Ue(o) && xt(o); )
1026
+ o = It(o, e);
1027
+ return o && tt(o) && xt(o) && !Et(o) ? n : o || Ge(t) || n;
1028
+ }
1029
+ const fn = async function(t) {
1030
+ const e = this.getOffsetParent || ee, n = this.getDimensions, o = await n(t.floating);
1031
+ return {
1032
+ reference: an(t.reference, await e(t.floating), t.strategy),
1033
+ floating: {
1034
+ x: 0,
1035
+ y: 0,
1036
+ width: o.width,
1037
+ height: o.height
1038
+ }
1039
+ };
1040
+ };
1041
+ function un(t) {
1042
+ return z(t).direction === "rtl";
1043
+ }
1044
+ const dn = {
1045
+ convertOffsetParentRelativeRectToViewportRelativeRect: tn,
1046
+ getDocumentElement: X,
1047
+ getClippingRect: cn,
1048
+ getOffsetParent: ee,
1049
+ getElementRects: fn,
1050
+ getClientRects: en,
1051
+ getDimensions: ln,
1052
+ getScale: Q,
1053
+ isElement: H,
1054
+ isRTL: un
1055
+ };
1056
+ function ne(t, e) {
1057
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1058
+ }
1059
+ function mn(t, e) {
1060
+ let n = null, o;
1061
+ const r = X(t);
1062
+ function i() {
1063
+ var c;
1064
+ clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
1065
+ }
1066
+ function s(c, l) {
1067
+ c === void 0 && (c = !1), l === void 0 && (l = 1), i();
1068
+ const f = t.getBoundingClientRect(), {
1069
+ left: a,
1070
+ top: d,
1071
+ width: m,
1072
+ height: u
1073
+ } = f;
1074
+ if (c || e(), !m || !u)
1075
+ return;
1076
+ const h = ct(d), p = ct(r.clientWidth - (a + m)), x = ct(r.clientHeight - (d + u)), g = ct(a), y = {
1077
+ rootMargin: -h + "px " + -p + "px " + -x + "px " + -g + "px",
1078
+ threshold: F(0, K(1, l)) || 1
1079
+ };
1080
+ let w = !0;
1081
+ function A(R) {
1082
+ const C = R[0].intersectionRatio;
1083
+ if (C !== l) {
1084
+ if (!w)
1085
+ return s();
1086
+ C ? s(!1, C) : o = setTimeout(() => {
1087
+ s(!1, 1e-7);
1088
+ }, 1e3);
1089
+ }
1090
+ C === 1 && !ne(f, t.getBoundingClientRect()) && s(), w = !1;
1091
+ }
1092
+ try {
1093
+ n = new IntersectionObserver(A, {
1094
+ ...y,
1095
+ // Handle <iframe>s
1096
+ root: r.ownerDocument
1097
+ });
1098
+ } catch {
1099
+ n = new IntersectionObserver(A, y);
1100
+ }
1101
+ n.observe(t);
1102
+ }
1103
+ return s(!0), i;
1104
+ }
1105
+ function hn(t, e, n, o) {
1106
+ o === void 0 && (o = {});
1107
+ const {
1108
+ ancestorScroll: r = !0,
1109
+ ancestorResize: i = !0,
1110
+ elementResize: s = typeof ResizeObserver == "function",
1111
+ layoutShift: c = typeof IntersectionObserver == "function",
1112
+ animationFrame: l = !1
1113
+ } = o, f = Lt(t), a = r || i ? [...f ? rt(f) : [], ...e ? rt(e) : []] : [];
1114
+ a.forEach((g) => {
1115
+ r && g.addEventListener("scroll", n, {
1116
+ passive: !0
1117
+ }), i && g.addEventListener("resize", n);
1118
+ });
1119
+ const d = f && c ? mn(f, n) : null;
1120
+ let m = -1, u = null;
1121
+ s && (u = new ResizeObserver((g) => {
1122
+ let [v] = g;
1123
+ v && v.target === f && u && e && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1124
+ var y;
1125
+ (y = u) == null || y.observe(e);
1126
+ })), n();
1127
+ }), f && !l && u.observe(f), e && u.observe(e));
1128
+ let h, p = l ? J(t) : null;
1129
+ l && x();
1130
+ function x() {
1131
+ const g = J(t);
1132
+ p && !ne(p, g) && n(), p = g, h = requestAnimationFrame(x);
1133
+ }
1134
+ return n(), () => {
1135
+ var g;
1136
+ a.forEach((v) => {
1137
+ r && v.removeEventListener("scroll", n), i && v.removeEventListener("resize", n);
1138
+ }), d?.(), (g = u) == null || g.disconnect(), u = null, l && cancelAnimationFrame(h);
1139
+ };
1140
+ }
1141
+ const pn = Xe, gn = Ye, wn = Be, xn = qe, yn = Ve, Xt = ze, vn = je, bn = (t, e, n) => {
1142
+ const o = /* @__PURE__ */ new Map(), r = {
1143
+ platform: dn,
1144
+ ...n
1145
+ }, i = {
1146
+ ...r.platform,
1147
+ _c: o
1148
+ };
1149
+ return He(t, e, {
1150
+ ...r,
1151
+ platform: i
1152
+ });
1153
+ };
1154
+ var An = typeof document < "u", Rn = function() {
1155
+ }, lt = An ? Re : Rn;
1156
+ function dt(t, e) {
1157
+ if (t === e)
1158
+ return !0;
1159
+ if (typeof t != typeof e)
1160
+ return !1;
1161
+ if (typeof t == "function" && t.toString() === e.toString())
1162
+ return !0;
1163
+ let n, o, r;
1164
+ if (t && e && typeof t == "object") {
1165
+ if (Array.isArray(t)) {
1166
+ if (n = t.length, n !== e.length) return !1;
1167
+ for (o = n; o-- !== 0; )
1168
+ if (!dt(t[o], e[o]))
1169
+ return !1;
1170
+ return !0;
1171
+ }
1172
+ if (r = Object.keys(t), n = r.length, n !== Object.keys(e).length)
1173
+ return !1;
1174
+ for (o = n; o-- !== 0; )
1175
+ if (!{}.hasOwnProperty.call(e, r[o]))
1176
+ return !1;
1177
+ for (o = n; o-- !== 0; ) {
1178
+ const i = r[o];
1179
+ if (!(i === "_owner" && t.$$typeof) && !dt(t[i], e[i]))
1180
+ return !1;
1181
+ }
1182
+ return !0;
1183
+ }
1184
+ return t !== t && e !== e;
1185
+ }
1186
+ function oe(t) {
1187
+ return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1188
+ }
1189
+ function Yt(t, e) {
1190
+ const n = oe(t);
1191
+ return Math.round(e * n) / n;
1192
+ }
1193
+ function yt(t) {
1194
+ const e = O.useRef(t);
1195
+ return lt(() => {
1196
+ e.current = t;
1197
+ }), e;
1198
+ }
1199
+ function On(t) {
1200
+ t === void 0 && (t = {});
1201
+ const {
1202
+ placement: e = "bottom",
1203
+ strategy: n = "absolute",
1204
+ middleware: o = [],
1205
+ platform: r,
1206
+ elements: {
1207
+ reference: i,
1208
+ floating: s
1209
+ } = {},
1210
+ transform: c = !0,
1211
+ whileElementsMounted: l,
1212
+ open: f
1213
+ } = t, [a, d] = O.useState({
1214
+ x: 0,
1215
+ y: 0,
1216
+ strategy: n,
1217
+ placement: e,
1218
+ middlewareData: {},
1219
+ isPositioned: !1
1220
+ }), [m, u] = O.useState(o);
1221
+ dt(m, o) || u(o);
1222
+ const [h, p] = O.useState(null), [x, g] = O.useState(null), v = O.useCallback((b) => {
1223
+ b !== R.current && (R.current = b, p(b));
1224
+ }, []), y = O.useCallback((b) => {
1225
+ b !== C.current && (C.current = b, g(b));
1226
+ }, []), w = i || h, A = s || x, R = O.useRef(null), C = O.useRef(null), M = O.useRef(a), W = l != null, L = yt(l), $ = yt(r), N = yt(f), S = O.useCallback(() => {
1227
+ if (!R.current || !C.current)
1228
+ return;
1229
+ const b = {
1230
+ placement: e,
1231
+ strategy: n,
1232
+ middleware: m
1233
+ };
1234
+ $.current && (b.platform = $.current), bn(R.current, C.current, b).then((T) => {
1235
+ const B = {
1236
+ ...T,
1237
+ // The floating element's position may be recomputed while it's closed
1238
+ // but still mounted (such as when transitioning out). To ensure
1239
+ // `isPositioned` will be `false` initially on the next open, avoid
1240
+ // setting it to `true` when `open === false` (must be specified).
1241
+ isPositioned: N.current !== !1
1242
+ };
1243
+ P.current && !dt(M.current, B) && (M.current = B, Oe.flushSync(() => {
1244
+ d(B);
1245
+ }));
1246
+ });
1247
+ }, [m, e, n, $, N]);
1248
+ lt(() => {
1249
+ f === !1 && M.current.isPositioned && (M.current.isPositioned = !1, d((b) => ({
1250
+ ...b,
1251
+ isPositioned: !1
1252
+ })));
1253
+ }, [f]);
1254
+ const P = O.useRef(!1);
1255
+ lt(() => (P.current = !0, () => {
1256
+ P.current = !1;
1257
+ }), []), lt(() => {
1258
+ if (w && (R.current = w), A && (C.current = A), w && A) {
1259
+ if (L.current)
1260
+ return L.current(w, A, S);
1261
+ S();
1262
+ }
1263
+ }, [w, A, S, L, W]);
1264
+ const k = O.useMemo(() => ({
1265
+ reference: R,
1266
+ floating: C,
1267
+ setReference: v,
1268
+ setFloating: y
1269
+ }), [v, y]), E = O.useMemo(() => ({
1270
+ reference: w,
1271
+ floating: A
1272
+ }), [w, A]), D = O.useMemo(() => {
1273
+ const b = {
1274
+ position: n,
1275
+ left: 0,
1276
+ top: 0
1277
+ };
1278
+ if (!E.floating)
1279
+ return b;
1280
+ const T = Yt(E.floating, a.x), B = Yt(E.floating, a.y);
1281
+ return c ? {
1282
+ ...b,
1283
+ transform: "translate(" + T + "px, " + B + "px)",
1284
+ ...oe(E.floating) >= 1.5 && {
1285
+ willChange: "transform"
1286
+ }
1287
+ } : {
1288
+ position: n,
1289
+ left: T,
1290
+ top: B
1291
+ };
1292
+ }, [n, c, E.floating, a.x, a.y]);
1293
+ return O.useMemo(() => ({
1294
+ ...a,
1295
+ update: S,
1296
+ refs: k,
1297
+ elements: E,
1298
+ floatingStyles: D
1299
+ }), [a, S, k, E, D]);
1300
+ }
1301
+ const Cn = (t) => {
1302
+ function e(n) {
1303
+ return {}.hasOwnProperty.call(n, "current");
1304
+ }
1305
+ return {
1306
+ name: "arrow",
1307
+ options: t,
1308
+ fn(n) {
1309
+ const {
1310
+ element: o,
1311
+ padding: r
1312
+ } = typeof t == "function" ? t(n) : t;
1313
+ return o && e(o) ? o.current != null ? Xt({
1314
+ element: o.current,
1315
+ padding: r
1316
+ }).fn(n) : {} : o ? Xt({
1317
+ element: o,
1318
+ padding: r
1319
+ }).fn(n) : {};
1320
+ }
1321
+ };
1322
+ }, Pn = (t, e) => {
1323
+ const n = pn(t);
1324
+ return {
1325
+ name: n.name,
1326
+ fn: n.fn,
1327
+ options: [t, e]
1328
+ };
1329
+ }, Sn = (t, e) => {
1330
+ const n = gn(t);
1331
+ return {
1332
+ name: n.name,
1333
+ fn: n.fn,
1334
+ options: [t, e]
1335
+ };
1336
+ }, En = (t, e) => ({
1337
+ fn: vn(t).fn,
1338
+ options: [t, e]
1339
+ }), Dn = (t, e) => {
1340
+ const n = wn(t);
1341
+ return {
1342
+ name: n.name,
1343
+ fn: n.fn,
1344
+ options: [t, e]
1345
+ };
1346
+ }, Ln = (t, e) => {
1347
+ const n = xn(t);
1348
+ return {
1349
+ name: n.name,
1350
+ fn: n.fn,
1351
+ options: [t, e]
1352
+ };
1353
+ }, Mn = (t, e) => {
1354
+ const n = yn(t);
1355
+ return {
1356
+ name: n.name,
1357
+ fn: n.fn,
1358
+ options: [t, e]
1359
+ };
1360
+ }, Tn = (t, e) => {
1361
+ const n = Cn(t);
1362
+ return {
1363
+ name: n.name,
1364
+ fn: n.fn,
1365
+ options: [t, e]
1366
+ };
1367
+ };
1368
+ var $n = "Arrow", re = O.forwardRef((t, e) => {
1369
+ const { children: n, width: o = 10, height: r = 5, ...i } = t;
1370
+ return /* @__PURE__ */ Y(
1371
+ Ot.svg,
1372
+ {
1373
+ ...i,
1374
+ ref: e,
1375
+ width: o,
1376
+ height: r,
1377
+ viewBox: "0 0 30 10",
1378
+ preserveAspectRatio: "none",
1379
+ children: t.asChild ? n : /* @__PURE__ */ Y("polygon", { points: "0,0 30,0 15,10" })
1380
+ }
1381
+ );
1382
+ });
1383
+ re.displayName = $n;
1384
+ var Nn = re, Mt = "Popper", [ie, jn] = Ce(Mt), [Wn, se] = ie(Mt), ce = (t) => {
1385
+ const { __scopePopper: e, children: n } = t, [o, r] = O.useState(null);
1386
+ return /* @__PURE__ */ Y(Wn, { scope: e, anchor: o, onAnchorChange: r, children: n });
1387
+ };
1388
+ ce.displayName = Mt;
1389
+ var le = "PopperAnchor", ae = O.forwardRef(
1390
+ (t, e) => {
1391
+ const { __scopePopper: n, virtualRef: o, ...r } = t, i = se(le, n), s = O.useRef(null), c = jt(e, s), l = O.useRef(null);
1392
+ return O.useEffect(() => {
1393
+ const f = l.current;
1394
+ l.current = o?.current || s.current, f !== l.current && i.onAnchorChange(l.current);
1395
+ }), o ? null : /* @__PURE__ */ Y(Ot.div, { ...r, ref: c });
1396
+ }
1397
+ );
1398
+ ae.displayName = le;
1399
+ var Tt = "PopperContent", [kn, Fn] = ie(Tt), fe = O.forwardRef(
1400
+ (t, e) => {
1401
+ const {
1402
+ __scopePopper: n,
1403
+ side: o = "bottom",
1404
+ sideOffset: r = 0,
1405
+ align: i = "center",
1406
+ alignOffset: s = 0,
1407
+ arrowPadding: c = 0,
1408
+ avoidCollisions: l = !0,
1409
+ collisionBoundary: f = [],
1410
+ collisionPadding: a = 0,
1411
+ sticky: d = "partial",
1412
+ hideWhenDetached: m = !1,
1413
+ updatePositionStrategy: u = "optimized",
1414
+ onPlaced: h,
1415
+ ...p
1416
+ } = t, x = se(Tt, n), [g, v] = O.useState(null), y = jt(e, (ot) => v(ot)), [w, A] = O.useState(null), R = Se(w), C = R?.width ?? 0, M = R?.height ?? 0, W = o + (i !== "center" ? "-" + i : ""), L = typeof a == "number" ? a : { top: 0, right: 0, bottom: 0, left: 0, ...a }, $ = Array.isArray(f) ? f : [f], N = $.length > 0, S = {
1417
+ padding: L,
1418
+ boundary: $.filter(Hn),
1419
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
1420
+ altBoundary: N
1421
+ }, { refs: P, floatingStyles: k, placement: E, isPositioned: D, middlewareData: b } = On({
1422
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
1423
+ strategy: "fixed",
1424
+ placement: W,
1425
+ whileElementsMounted: (...ot) => hn(...ot, {
1426
+ animationFrame: u === "always"
1427
+ }),
1428
+ elements: {
1429
+ reference: x.anchor
1430
+ },
1431
+ middleware: [
1432
+ Pn({ mainAxis: r + M, alignmentAxis: s }),
1433
+ l && Sn({
1434
+ mainAxis: !0,
1435
+ crossAxis: !1,
1436
+ limiter: d === "partial" ? En() : void 0,
1437
+ ...S
1438
+ }),
1439
+ l && Dn({ ...S }),
1440
+ Ln({
1441
+ ...S,
1442
+ apply: ({ elements: ot, rects: Nt, availableWidth: ye, availableHeight: ve }) => {
1443
+ const { width: be, height: Ae } = Nt.reference, st = ot.floating.style;
1444
+ st.setProperty("--radix-popper-available-width", `${ye}px`), st.setProperty("--radix-popper-available-height", `${ve}px`), st.setProperty("--radix-popper-anchor-width", `${be}px`), st.setProperty("--radix-popper-anchor-height", `${Ae}px`);
1445
+ }
1446
+ }),
1447
+ w && Tn({ element: w, padding: c }),
1448
+ zn({ arrowWidth: C, arrowHeight: M }),
1449
+ m && Mn({ strategy: "referenceHidden", ...S })
1450
+ ]
1451
+ }), [T, B] = me(E), $t = Pe(h);
1452
+ vt(() => {
1453
+ D && $t?.();
1454
+ }, [D, $t]);
1455
+ const he = b.arrow?.x, pe = b.arrow?.y, ge = b.arrow?.centerOffset !== 0, [we, xe] = O.useState();
1456
+ return vt(() => {
1457
+ g && xe(window.getComputedStyle(g).zIndex);
1458
+ }, [g]), /* @__PURE__ */ Y(
1459
+ "div",
1460
+ {
1461
+ ref: P.setFloating,
1462
+ "data-radix-popper-content-wrapper": "",
1463
+ style: {
1464
+ ...k,
1465
+ transform: D ? k.transform : "translate(0, -200%)",
1466
+ // keep off the page when measuring
1467
+ minWidth: "max-content",
1468
+ zIndex: we,
1469
+ "--radix-popper-transform-origin": [
1470
+ b.transformOrigin?.x,
1471
+ b.transformOrigin?.y
1472
+ ].join(" "),
1473
+ // hide the content if using the hide middleware and should be hidden
1474
+ // set visibility to hidden and disable pointer events so the UI behaves
1475
+ // as if the PopperContent isn't there at all
1476
+ ...b.hide?.referenceHidden && {
1477
+ visibility: "hidden",
1478
+ pointerEvents: "none"
1479
+ }
1480
+ },
1481
+ dir: t.dir,
1482
+ children: /* @__PURE__ */ Y(
1483
+ kn,
1484
+ {
1485
+ scope: n,
1486
+ placedSide: T,
1487
+ onArrowChange: A,
1488
+ arrowX: he,
1489
+ arrowY: pe,
1490
+ shouldHideArrow: ge,
1491
+ children: /* @__PURE__ */ Y(
1492
+ Ot.div,
1493
+ {
1494
+ "data-side": T,
1495
+ "data-align": B,
1496
+ ...p,
1497
+ ref: y,
1498
+ style: {
1499
+ ...p.style,
1500
+ // if the PopperContent hasn't been placed yet (not all measurements done)
1501
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
1502
+ animation: D ? void 0 : "none"
1503
+ }
1504
+ }
1505
+ )
1506
+ }
1507
+ )
1508
+ }
1509
+ );
1510
+ }
1511
+ );
1512
+ fe.displayName = Tt;
1513
+ var ue = "PopperArrow", _n = {
1514
+ top: "bottom",
1515
+ right: "left",
1516
+ bottom: "top",
1517
+ left: "right"
1518
+ }, de = O.forwardRef(function(e, n) {
1519
+ const { __scopePopper: o, ...r } = e, i = Fn(ue, o), s = _n[i.placedSide];
1520
+ return (
1521
+ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
1522
+ // doesn't report size as we'd expect on SVG elements.
1523
+ // it reports their bounding box which is effectively the largest path inside the SVG.
1524
+ /* @__PURE__ */ Y(
1525
+ "span",
1526
+ {
1527
+ ref: i.onArrowChange,
1528
+ style: {
1529
+ position: "absolute",
1530
+ left: i.arrowX,
1531
+ top: i.arrowY,
1532
+ [s]: 0,
1533
+ transformOrigin: {
1534
+ top: "",
1535
+ right: "0 0",
1536
+ bottom: "center 0",
1537
+ left: "100% 0"
1538
+ }[i.placedSide],
1539
+ transform: {
1540
+ top: "translateY(100%)",
1541
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
1542
+ bottom: "rotate(180deg)",
1543
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
1544
+ }[i.placedSide],
1545
+ visibility: i.shouldHideArrow ? "hidden" : void 0
1546
+ },
1547
+ children: /* @__PURE__ */ Y(
1548
+ Nn,
1549
+ {
1550
+ ...r,
1551
+ ref: n,
1552
+ style: {
1553
+ ...r.style,
1554
+ // ensures the element can be measured correctly (mostly for if SVG)
1555
+ display: "block"
1556
+ }
1557
+ }
1558
+ )
1559
+ }
1560
+ )
1561
+ );
1562
+ });
1563
+ de.displayName = ue;
1564
+ function Hn(t) {
1565
+ return t !== null;
1566
+ }
1567
+ var zn = (t) => ({
1568
+ name: "transformOrigin",
1569
+ options: t,
1570
+ fn(e) {
1571
+ const { placement: n, rects: o, middlewareData: r } = e, s = r.arrow?.centerOffset !== 0, c = s ? 0 : t.arrowWidth, l = s ? 0 : t.arrowHeight, [f, a] = me(n), d = { start: "0%", center: "50%", end: "100%" }[a], m = (r.arrow?.x ?? 0) + c / 2, u = (r.arrow?.y ?? 0) + l / 2;
1572
+ let h = "", p = "";
1573
+ return f === "bottom" ? (h = s ? d : `${m}px`, p = `${-l}px`) : f === "top" ? (h = s ? d : `${m}px`, p = `${o.floating.height + l}px`) : f === "right" ? (h = `${-l}px`, p = s ? d : `${u}px`) : f === "left" && (h = `${o.floating.width + l}px`, p = s ? d : `${u}px`), { data: { x: h, y: p } };
1574
+ }
1575
+ });
1576
+ function me(t) {
1577
+ const [e, n = "center"] = t.split("-");
1578
+ return [e, n];
1579
+ }
1580
+ var qn = ce, Un = ae, Kn = fe, Zn = de;
1581
+ export {
1582
+ Un as A,
1583
+ Kn as C,
1584
+ qn as R,
1585
+ Zn as a,
1586
+ jn as c,
1587
+ Se as u
1588
+ };