@pismo/marola 2.1.64 → 2.1.66

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