@cfx-dev/ui-components 4.0.2 → 4.1.1

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