@pismo/marola 0.0.1-alpha.6 → 0.0.1-alpha.7

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