@purpurds/tooltip 8.2.2 → 8.2.4

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.
@@ -1,23 +1,23 @@
1
- import { jsxs as be, jsx as x, Fragment as Sn } from "react/jsx-runtime";
2
- import * as u from "react";
3
- import { forwardRef as Tt, useLayoutEffect as Nn, useEffect as Dn, useState as Ln, Children as $n } from "react";
4
- import * as St from "react-dom";
5
- import Mn from "react-dom";
6
- const kn = {
1
+ import { jsxs as _e, jsx as x, Fragment as Fn } from "react/jsx-runtime";
2
+ import * as f from "react";
3
+ import { forwardRef as Mt, useLayoutEffect as In, useState as Wn, Children as Bn } from "react";
4
+ import * as $t from "react-dom";
5
+ import Hn from "react-dom";
6
+ const jn = {
7
7
  LG: "lg"
8
8
  };
9
- function Fn(e) {
9
+ function zn(e) {
10
10
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
11
11
  }
12
- var st = { exports: {} };
12
+ var lt = { exports: {} };
13
13
  /*!
14
14
  Copyright (c) 2018 Jed Watson.
15
15
  Licensed under the MIT License (MIT), see
16
16
  http://jedwatson.github.io/classnames
17
17
  */
18
- var at;
19
- function In() {
20
- return at || (at = 1, function(e) {
18
+ var ut;
19
+ function Vn() {
20
+ return ut || (ut = 1, (function(e) {
21
21
  (function() {
22
22
  var t = {}.hasOwnProperty;
23
23
  function n() {
@@ -46,52 +46,52 @@ function In() {
46
46
  }
47
47
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
48
48
  })();
49
- }(st)), st.exports;
49
+ })(lt)), lt.exports;
50
50
  }
51
- var Bn = In();
52
- const Wn = /* @__PURE__ */ Fn(Bn), Hn = "_rotate_12t9p_1", jn = "_dash_12t9p_1", zn = {
51
+ var Un = Vn();
52
+ const Yn = /* @__PURE__ */ zn(Un), qn = "_rotate_12t9p_1", Gn = "_dash_12t9p_1", Xn = {
53
53
  "purpur-spinner": "_purpur-spinner_12t9p_2",
54
- rotate: Hn,
54
+ rotate: qn,
55
55
  "purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
56
56
  "purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
57
57
  "purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
58
58
  "purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
59
59
  "purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
60
60
  "purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
61
- dash: jn,
61
+ dash: Gn,
62
62
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
63
63
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
64
- }, ct = Wn.bind(zn), ue = "purpur-spinner", Vn = {
64
+ }, ft = Yn.bind(Xn), fe = "purpur-spinner", Zn = {
65
65
  SM: "sm"
66
- }, Un = ({
66
+ }, Kn = ({
67
67
  disabled: e = !1,
68
68
  negative: t = !1,
69
- size: n = Vn.SM,
69
+ size: n = Zn.SM,
70
70
  ...o
71
- }) => /* @__PURE__ */ x("div", { className: ct(ue, `${ue}--${n}`), ...o, children: /* @__PURE__ */ x("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ x(
71
+ }) => /* @__PURE__ */ x("div", { className: ft(fe, `${fe}--${n}`), ...o, children: /* @__PURE__ */ x("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ x(
72
72
  "circle",
73
73
  {
74
- className: ct(`${ue}__circle`, {
75
- [`${ue}__circle--disabled`]: e,
76
- [`${ue}__circle--negative`]: t
74
+ className: ft(`${fe}__circle`, {
75
+ [`${fe}__circle--disabled`]: e,
76
+ [`${fe}__circle--negative`]: t
77
77
  }),
78
78
  cx: "25",
79
79
  cy: "25",
80
80
  r: "20"
81
81
  }
82
82
  ) }) });
83
- function Yn(e) {
83
+ function Jn(e) {
84
84
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
85
85
  }
86
- var lt = { exports: {} };
86
+ var pt = { exports: {} };
87
87
  /*!
88
88
  Copyright (c) 2018 Jed Watson.
89
89
  Licensed under the MIT License (MIT), see
90
90
  http://jedwatson.github.io/classnames
91
91
  */
92
- var ut;
93
- function Gn() {
94
- return ut || (ut = 1, function(e) {
92
+ var dt;
93
+ function Qn() {
94
+ return dt || (dt = 1, (function(e) {
95
95
  (function() {
96
96
  var t = {}.hasOwnProperty;
97
97
  function n() {
@@ -120,10 +120,10 @@ function Gn() {
120
120
  }
121
121
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
122
122
  })();
123
- }(lt)), lt.exports;
123
+ })(pt)), pt.exports;
124
124
  }
125
- var qn = Gn();
126
- const Xn = /* @__PURE__ */ Yn(qn), Zn = {
125
+ var er = Qn();
126
+ const tr = /* @__PURE__ */ Jn(er), nr = {
127
127
  "purpur-button": "_purpur-button_1goi7_1",
128
128
  "purpur-button--xs": "_purpur-button--xs_1goi7_33",
129
129
  "purpur-button--icon-only": "_purpur-button--icon-only_1goi7_36",
@@ -145,9 +145,9 @@ const Xn = /* @__PURE__ */ Yn(qn), Zn = {
145
145
  "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1goi7_166",
146
146
  "purpur-button--text-negative": "_purpur-button--text-negative_1goi7_181",
147
147
  "purpur-button--text": "_purpur-button--text_1goi7_181"
148
- }, Kn = {
148
+ }, rr = {
149
149
  TERTIARY_PURPLE: "tertiary-purple"
150
- }, Jn = Xn.bind(Zn), J = "purpur-button", Nt = Tt(
150
+ }, or = tr.bind(nr), Q = "purpur-button", kt = Mt(
151
151
  ({
152
152
  children: e,
153
153
  className: t,
@@ -157,45 +157,45 @@ const Xn = /* @__PURE__ */ Yn(qn), Zn = {
157
157
  loading: r = !1,
158
158
  negative: s = !1,
159
159
  onClick: a,
160
- size: c = "md",
161
- variant: l,
162
- type: f = "button",
163
- ...d
160
+ size: l = "md",
161
+ variant: c,
162
+ type: u = "button",
163
+ ...p
164
164
  }, h) => {
165
- if (i && l === "destructive")
165
+ if (i && c === "destructive")
166
166
  return null;
167
- const p = Jn(
167
+ const d = or(
168
168
  [
169
- J,
170
- `${J}--${s ? `${l}-negative` : l}`,
171
- `${J}--${c}`
169
+ Q,
170
+ `${Q}--${s ? `${c}-negative` : c}`,
171
+ `${Q}--${l}`
172
172
  ],
173
173
  {
174
- [`${J}--icon-only`]: i,
175
- [`${J}--negative`]: s,
176
- [`${J}--full-width`]: o,
177
- [`${J}--disabled`]: n || r
174
+ [`${Q}--icon-only`]: i,
175
+ [`${Q}--negative`]: s,
176
+ [`${Q}--full-width`]: o,
177
+ [`${Q}--disabled`]: n || r
178
178
  },
179
179
  t
180
- ), g = (v) => {
180
+ ), m = (v) => {
181
181
  n || r ? v.preventDefault() : a && a(v);
182
- }, m = !!d["aria-disabled"] || n || r;
183
- return /* @__PURE__ */ be(
182
+ }, g = !!p["aria-disabled"] || n || r;
183
+ return /* @__PURE__ */ _e(
184
184
  "button",
185
185
  {
186
- className: p,
187
- type: f,
186
+ className: d,
187
+ type: u,
188
188
  ref: h,
189
- "aria-disabled": m,
190
- onClick: g,
191
- ...d,
189
+ "aria-disabled": g,
190
+ onClick: m,
191
+ ...p,
192
192
  children: [
193
193
  r && /* @__PURE__ */ x(
194
- Un,
194
+ Kn,
195
195
  {
196
- size: c === kn.LG ? "xs" : "xxs",
196
+ size: l === jn.LG ? "xs" : "xxs",
197
197
  negative: s,
198
- disabled: m
198
+ disabled: g
199
199
  }
200
200
  ),
201
201
  " ",
@@ -205,19 +205,19 @@ const Xn = /* @__PURE__ */ Yn(qn), Zn = {
205
205
  );
206
206
  }
207
207
  );
208
- Nt.displayName = "Button";
209
- function Qn(e) {
208
+ kt.displayName = "Button";
209
+ function ir(e) {
210
210
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
211
211
  }
212
- var ft = { exports: {} };
212
+ var ht = { exports: {} };
213
213
  /*!
214
214
  Copyright (c) 2018 Jed Watson.
215
215
  Licensed under the MIT License (MIT), see
216
216
  http://jedwatson.github.io/classnames
217
217
  */
218
- var pt;
219
- function er() {
220
- return pt || (pt = 1, function(e) {
218
+ var mt;
219
+ function sr() {
220
+ return mt || (mt = 1, (function(e) {
221
221
  (function() {
222
222
  var t = {}.hasOwnProperty;
223
223
  function n() {
@@ -246,10 +246,10 @@ function er() {
246
246
  }
247
247
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
248
248
  })();
249
- }(ft)), ft.exports;
249
+ })(ht)), ht.exports;
250
250
  }
251
- var tr = er();
252
- const nr = /* @__PURE__ */ Qn(tr), rr = {
251
+ var ar = sr();
252
+ const cr = /* @__PURE__ */ ir(ar), lr = {
253
253
  "purpur-icon": "_purpur-icon_8u1lq_1",
254
254
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
255
255
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -257,41 +257,41 @@ const nr = /* @__PURE__ */ Qn(tr), rr = {
257
257
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
258
258
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
259
259
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
260
- }, or = nr.bind(rr), dt = "purpur-icon", ir = "md", sr = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), ar = ({ content: e = "", title: t } = {}) => {
260
+ }, ur = cr.bind(lr), gt = "purpur-icon", fr = "md", pr = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), dr = ({ content: e = "", title: t } = {}) => {
261
261
  const n = [
262
262
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
263
263
  { name: "fill", value: "currentColor" },
264
264
  { name: "viewBox", value: "0 0 24 24" },
265
265
  t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
266
266
  ], o = t ? `<title>${t}</title>` : "";
267
- return `<svg ${sr(n)}>${o}${e}</svg>`;
268
- }, cr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Dt = ({ svg: e, allyTitle: t, className: n, size: o = ir, ...i }) => {
269
- const r = ar({
270
- content: cr(e.svg),
267
+ return `<svg ${pr(n)}>${o}${e}</svg>`;
268
+ }, hr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ft = ({ svg: e, allyTitle: t, className: n, size: o = fr, ...i }) => {
269
+ const r = dr({
270
+ content: hr(e.svg),
271
271
  title: t
272
- }), s = or(n, dt, `${dt}--${o}`);
272
+ }), s = ur(n, gt, `${gt}--${o}`);
273
273
  return /* @__PURE__ */ x("span", { className: s, dangerouslySetInnerHTML: { __html: r }, ...i });
274
274
  };
275
- Dt.displayName = "Icon";
276
- const lr = {
275
+ Ft.displayName = "Icon";
276
+ const mr = {
277
277
  name: "info",
278
278
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
279
279
  keywords: ["info"],
280
280
  category: "status"
281
- }, Lt = (e) => /* @__PURE__ */ x(Dt, { ...e, svg: lr });
282
- Lt.displayName = "IconInfo";
283
- function ur(e) {
281
+ }, It = (e) => /* @__PURE__ */ x(Ft, { ...e, svg: mr });
282
+ It.displayName = "IconInfo";
283
+ function gr(e) {
284
284
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
285
285
  }
286
- var ht = { exports: {} };
286
+ var vt = { exports: {} };
287
287
  /*!
288
288
  Copyright (c) 2018 Jed Watson.
289
289
  Licensed under the MIT License (MIT), see
290
290
  http://jedwatson.github.io/classnames
291
291
  */
292
- var gt;
293
- function fr() {
294
- return gt || (gt = 1, function(e) {
292
+ var yt;
293
+ function vr() {
294
+ return yt || (yt = 1, (function(e) {
295
295
  (function() {
296
296
  var t = {}.hasOwnProperty;
297
297
  function n() {
@@ -320,10 +320,10 @@ function fr() {
320
320
  }
321
321
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
322
322
  })();
323
- }(ht)), ht.exports;
323
+ })(vt)), vt.exports;
324
324
  }
325
- var pr = fr();
326
- const dr = /* @__PURE__ */ ur(pr), hr = {
325
+ var yr = vr();
326
+ const wr = /* @__PURE__ */ gr(yr), xr = {
327
327
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
328
328
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
329
329
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -338,89 +338,89 @@ const dr = /* @__PURE__ */ ur(pr), hr = {
338
338
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
339
339
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
340
340
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
341
- }, gr = dr.bind(hr), $t = {
341
+ }, br = wr.bind(xr), Wt = {
342
342
  PARAGRAPH100: "paragraph-100"
343
- }, fe = "purpur-paragraph", Mt = ({
343
+ }, pe = "purpur-paragraph", Bt = ({
344
344
  children: e,
345
345
  className: t,
346
346
  disabled: n,
347
347
  enableHyphenation: o = !1,
348
348
  negative: i = !1,
349
- variant: r = $t.PARAGRAPH100,
349
+ variant: r = Wt.PARAGRAPH100,
350
350
  ...s
351
351
  }) => {
352
- const a = gr(t, fe, `${fe}--${r}`, {
353
- [`${fe}--hyphens`]: o,
354
- [`${fe}--disabled`]: n,
355
- [`${fe}--negative`]: i
352
+ const a = br(t, pe, `${pe}--${r}`, {
353
+ [`${pe}--hyphens`]: o,
354
+ [`${pe}--disabled`]: n,
355
+ [`${pe}--negative`]: i
356
356
  });
357
357
  return /* @__PURE__ */ x("p", { ...s, className: a, children: e });
358
358
  };
359
- Mt.displayName = "Paragraph";
360
- const mr = "400ms";
361
- function V(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
359
+ Bt.displayName = "Paragraph";
360
+ const _r = "400ms";
361
+ function q(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
362
362
  return function(i) {
363
363
  if (e == null || e(i), n === !1 || !i.defaultPrevented)
364
364
  return t == null ? void 0 : t(i);
365
365
  };
366
366
  }
367
- function mt(e, t) {
367
+ function wt(e, t) {
368
368
  if (typeof e == "function")
369
369
  return e(t);
370
370
  e != null && (e.current = t);
371
371
  }
372
- function kt(...e) {
372
+ function Ht(...e) {
373
373
  return (t) => {
374
374
  let n = !1;
375
375
  const o = e.map((i) => {
376
- const r = mt(i, t);
376
+ const r = wt(i, t);
377
377
  return !n && typeof r == "function" && (n = !0), r;
378
378
  });
379
379
  if (n)
380
380
  return () => {
381
381
  for (let i = 0; i < o.length; i++) {
382
382
  const r = o[i];
383
- typeof r == "function" ? r() : mt(e[i], null);
383
+ typeof r == "function" ? r() : wt(e[i], null);
384
384
  }
385
385
  };
386
386
  };
387
387
  }
388
- function te(...e) {
389
- return u.useCallback(kt(...e), e);
388
+ function ne(...e) {
389
+ return f.useCallback(Ht(...e), e);
390
390
  }
391
- function Ft(e, t = []) {
391
+ function jt(e, t = []) {
392
392
  let n = [];
393
393
  function o(r, s) {
394
- const a = u.createContext(s), c = n.length;
394
+ const a = f.createContext(s), l = n.length;
395
395
  n = [...n, s];
396
- const l = (d) => {
396
+ const c = (p) => {
397
397
  var y;
398
- const { scope: h, children: p, ...g } = d, m = ((y = h == null ? void 0 : h[e]) == null ? void 0 : y[c]) || a, v = u.useMemo(() => g, Object.values(g));
399
- return /* @__PURE__ */ x(m.Provider, { value: v, children: p });
398
+ const { scope: h, children: d, ...m } = p, g = ((y = h == null ? void 0 : h[e]) == null ? void 0 : y[l]) || a, v = f.useMemo(() => m, Object.values(m));
399
+ return /* @__PURE__ */ x(g.Provider, { value: v, children: d });
400
400
  };
401
- l.displayName = r + "Provider";
402
- function f(d, h) {
403
- var m;
404
- const p = ((m = h == null ? void 0 : h[e]) == null ? void 0 : m[c]) || a, g = u.useContext(p);
405
- if (g) return g;
401
+ c.displayName = r + "Provider";
402
+ function u(p, h) {
403
+ var g;
404
+ const d = ((g = h == null ? void 0 : h[e]) == null ? void 0 : g[l]) || a, m = f.useContext(d);
405
+ if (m) return m;
406
406
  if (s !== void 0) return s;
407
- throw new Error(`\`${d}\` must be used within \`${r}\``);
407
+ throw new Error(`\`${p}\` must be used within \`${r}\``);
408
408
  }
409
- return [l, f];
409
+ return [c, u];
410
410
  }
411
411
  const i = () => {
412
- const r = n.map((s) => u.createContext(s));
412
+ const r = n.map((s) => f.createContext(s));
413
413
  return function(a) {
414
- const c = (a == null ? void 0 : a[e]) || r;
415
- return u.useMemo(
416
- () => ({ [`__scope${e}`]: { ...a, [e]: c } }),
417
- [a, c]
414
+ const l = (a == null ? void 0 : a[e]) || r;
415
+ return f.useMemo(
416
+ () => ({ [`__scope${e}`]: { ...a, [e]: l } }),
417
+ [a, l]
418
418
  );
419
419
  };
420
420
  };
421
- return i.scopeName = e, [o, vr(i, ...t)];
421
+ return i.scopeName = e, [o, Ar(i, ...t)];
422
422
  }
423
- function vr(...e) {
423
+ function Ar(...e) {
424
424
  const t = e[0];
425
425
  if (e.length === 1) return t;
426
426
  const n = () => {
@@ -429,38 +429,38 @@ function vr(...e) {
429
429
  scopeName: i.scopeName
430
430
  }));
431
431
  return function(r) {
432
- const s = o.reduce((a, { useScope: c, scopeName: l }) => {
433
- const d = c(r)[`__scope${l}`];
434
- return { ...a, ...d };
432
+ const s = o.reduce((a, { useScope: l, scopeName: c }) => {
433
+ const p = l(r)[`__scope${c}`];
434
+ return { ...a, ...p };
435
435
  }, {});
436
- return u.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
436
+ return f.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
437
437
  };
438
438
  };
439
439
  return n.scopeName = t.scopeName, n;
440
440
  }
441
- var It = u.forwardRef((e, t) => {
442
- const { children: n, ...o } = e, i = u.Children.toArray(n), r = i.find(yr);
441
+ var zt = f.forwardRef((e, t) => {
442
+ const { children: n, ...o } = e, i = f.Children.toArray(n), r = i.find(Cr);
443
443
  if (r) {
444
- const s = r.props.children, a = i.map((c) => c === r ? u.Children.count(s) > 1 ? u.Children.only(null) : u.isValidElement(s) ? s.props.children : null : c);
445
- return /* @__PURE__ */ x(Me, { ...o, ref: t, children: u.isValidElement(s) ? u.cloneElement(s, void 0, a) : null });
444
+ const s = r.props.children, a = i.map((l) => l === r ? f.Children.count(s) > 1 ? f.Children.only(null) : f.isValidElement(s) ? s.props.children : null : l);
445
+ return /* @__PURE__ */ x(Ie, { ...o, ref: t, children: f.isValidElement(s) ? f.cloneElement(s, void 0, a) : null });
446
446
  }
447
- return /* @__PURE__ */ x(Me, { ...o, ref: t, children: n });
447
+ return /* @__PURE__ */ x(Ie, { ...o, ref: t, children: n });
448
448
  });
449
- It.displayName = "Slot";
450
- var Me = u.forwardRef((e, t) => {
449
+ zt.displayName = "Slot";
450
+ var Ie = f.forwardRef((e, t) => {
451
451
  const { children: n, ...o } = e;
452
- if (u.isValidElement(n)) {
453
- const i = xr(n), r = wr(o, n.props);
454
- return n.type !== u.Fragment && (r.ref = t ? kt(t, i) : i), u.cloneElement(n, r);
452
+ if (f.isValidElement(n)) {
453
+ const i = Or(n), r = Pr(o, n.props);
454
+ return n.type !== f.Fragment && (r.ref = t ? Ht(t, i) : i), f.cloneElement(n, r);
455
455
  }
456
- return u.Children.count(n) > 1 ? u.Children.only(null) : null;
456
+ return f.Children.count(n) > 1 ? f.Children.only(null) : null;
457
457
  });
458
- Me.displayName = "SlotClone";
459
- var Bt = ({ children: e }) => /* @__PURE__ */ x(Sn, { children: e });
460
- function yr(e) {
461
- return u.isValidElement(e) && e.type === Bt;
458
+ Ie.displayName = "SlotClone";
459
+ var Vt = ({ children: e }) => /* @__PURE__ */ x(Fn, { children: e });
460
+ function Cr(e) {
461
+ return f.isValidElement(e) && e.type === Vt;
462
462
  }
463
- function wr(e, t) {
463
+ function Pr(e, t) {
464
464
  const n = { ...t };
465
465
  for (const o in t) {
466
466
  const i = e[o], r = t[o];
@@ -470,12 +470,12 @@ function wr(e, t) {
470
470
  }
471
471
  return { ...e, ...n };
472
472
  }
473
- function xr(e) {
473
+ function Or(e) {
474
474
  var o, i;
475
475
  let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
476
476
  return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
477
477
  }
478
- var br = [
478
+ var Rr = [
479
479
  "a",
480
480
  "button",
481
481
  "div",
@@ -492,39 +492,39 @@ var br = [
492
492
  "span",
493
493
  "svg",
494
494
  "ul"
495
- ], K = br.reduce((e, t) => {
496
- const n = u.forwardRef((o, i) => {
497
- const { asChild: r, ...s } = o, a = r ? It : t;
495
+ ], J = Rr.reduce((e, t) => {
496
+ const n = f.forwardRef((o, i) => {
497
+ const { asChild: r, ...s } = o, a = r ? zt : t;
498
498
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ x(a, { ...s, ref: i });
499
499
  });
500
500
  return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
501
501
  }, {});
502
- function _r(e, t) {
503
- e && St.flushSync(() => e.dispatchEvent(t));
502
+ function Er(e, t) {
503
+ e && $t.flushSync(() => e.dispatchEvent(t));
504
504
  }
505
- function se(e) {
506
- const t = u.useRef(e);
507
- return u.useEffect(() => {
505
+ function ae(e) {
506
+ const t = f.useRef(e);
507
+ return f.useEffect(() => {
508
508
  t.current = e;
509
- }), u.useMemo(() => (...n) => {
509
+ }), f.useMemo(() => (...n) => {
510
510
  var o;
511
511
  return (o = t.current) == null ? void 0 : o.call(t, ...n);
512
512
  }, []);
513
513
  }
514
- function Ar(e, t = globalThis == null ? void 0 : globalThis.document) {
515
- const n = se(e);
516
- u.useEffect(() => {
514
+ function Sr(e, t = globalThis == null ? void 0 : globalThis.document) {
515
+ const n = ae(e);
516
+ f.useEffect(() => {
517
517
  const o = (i) => {
518
518
  i.key === "Escape" && n(i);
519
519
  };
520
520
  return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
521
521
  }, [n, t]);
522
522
  }
523
- var Pr = "DismissableLayer", ke = "dismissableLayer.update", Cr = "dismissableLayer.pointerDownOutside", Er = "dismissableLayer.focusOutside", vt, Wt = u.createContext({
523
+ var Tr = "DismissableLayer", We = "dismissableLayer.update", Nr = "dismissableLayer.pointerDownOutside", Dr = "dismissableLayer.focusOutside", xt, Ut = f.createContext({
524
524
  layers: /* @__PURE__ */ new Set(),
525
525
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
526
526
  branches: /* @__PURE__ */ new Set()
527
- }), Ht = u.forwardRef(
527
+ }), Yt = f.forwardRef(
528
528
  (e, t) => {
529
529
  const {
530
530
  disableOutsidePointerEvents: n = !1,
@@ -533,73 +533,73 @@ var Pr = "DismissableLayer", ke = "dismissableLayer.update", Cr = "dismissableLa
533
533
  onFocusOutside: r,
534
534
  onInteractOutside: s,
535
535
  onDismiss: a,
536
- ...c
537
- } = e, l = u.useContext(Wt), [f, d] = u.useState(null), h = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = u.useState({}), g = te(t, (P) => d(P)), m = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), y = m.indexOf(v), w = f ? m.indexOf(f) : -1, A = l.layersWithOutsidePointerEventsDisabled.size > 0, b = w >= y, _ = Tr((P) => {
538
- const O = P.target, D = [...l.branches].some((R) => R.contains(O));
539
- !b || D || (i == null || i(P), s == null || s(P), P.defaultPrevented || a == null || a());
540
- }, h), C = Sr((P) => {
541
- const O = P.target;
542
- [...l.branches].some((R) => R.contains(O)) || (r == null || r(P), s == null || s(P), P.defaultPrevented || a == null || a());
536
+ ...l
537
+ } = e, c = f.useContext(Ut), [u, p] = f.useState(null), h = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, d] = f.useState({}), m = ne(t, (_) => p(_)), g = Array.from(c.layers), [v] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), y = g.indexOf(v), w = u ? g.indexOf(u) : -1, C = c.layersWithOutsidePointerEventsDisabled.size > 0, b = w >= y, A = $r((_) => {
538
+ const R = _.target, L = [...c.branches].some((E) => E.contains(R));
539
+ !b || L || (i == null || i(_), s == null || s(_), _.defaultPrevented || a == null || a());
540
+ }, h), P = kr((_) => {
541
+ const R = _.target;
542
+ [...c.branches].some((E) => E.contains(R)) || (r == null || r(_), s == null || s(_), _.defaultPrevented || a == null || a());
543
543
  }, h);
544
- return Ar((P) => {
545
- w === l.layers.size - 1 && (o == null || o(P), !P.defaultPrevented && a && (P.preventDefault(), a()));
546
- }, h), u.useEffect(() => {
547
- if (f)
548
- return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (vt = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), yt(), () => {
549
- n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = vt);
544
+ return Sr((_) => {
545
+ w === c.layers.size - 1 && (o == null || o(_), !_.defaultPrevented && a && (_.preventDefault(), a()));
546
+ }, h), f.useEffect(() => {
547
+ if (u)
548
+ return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (xt = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), bt(), () => {
549
+ n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = xt);
550
550
  };
551
- }, [f, h, n, l]), u.useEffect(() => () => {
552
- f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), yt());
553
- }, [f, l]), u.useEffect(() => {
554
- const P = () => p({});
555
- return document.addEventListener(ke, P), () => document.removeEventListener(ke, P);
551
+ }, [u, h, n, c]), f.useEffect(() => () => {
552
+ u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), bt());
553
+ }, [u, c]), f.useEffect(() => {
554
+ const _ = () => d({});
555
+ return document.addEventListener(We, _), () => document.removeEventListener(We, _);
556
556
  }, []), /* @__PURE__ */ x(
557
- K.div,
557
+ J.div,
558
558
  {
559
- ...c,
560
- ref: g,
559
+ ...l,
560
+ ref: m,
561
561
  style: {
562
- pointerEvents: A ? b ? "auto" : "none" : void 0,
562
+ pointerEvents: C ? b ? "auto" : "none" : void 0,
563
563
  ...e.style
564
564
  },
565
- onFocusCapture: V(e.onFocusCapture, C.onFocusCapture),
566
- onBlurCapture: V(e.onBlurCapture, C.onBlurCapture),
567
- onPointerDownCapture: V(
565
+ onFocusCapture: q(e.onFocusCapture, P.onFocusCapture),
566
+ onBlurCapture: q(e.onBlurCapture, P.onBlurCapture),
567
+ onPointerDownCapture: q(
568
568
  e.onPointerDownCapture,
569
- _.onPointerDownCapture
569
+ A.onPointerDownCapture
570
570
  )
571
571
  }
572
572
  );
573
573
  }
574
574
  );
575
- Ht.displayName = Pr;
576
- var Or = "DismissableLayerBranch", Rr = u.forwardRef((e, t) => {
577
- const n = u.useContext(Wt), o = u.useRef(null), i = te(t, o);
578
- return u.useEffect(() => {
575
+ Yt.displayName = Tr;
576
+ var Lr = "DismissableLayerBranch", Mr = f.forwardRef((e, t) => {
577
+ const n = f.useContext(Ut), o = f.useRef(null), i = ne(t, o);
578
+ return f.useEffect(() => {
579
579
  const r = o.current;
580
580
  if (r)
581
581
  return n.branches.add(r), () => {
582
582
  n.branches.delete(r);
583
583
  };
584
- }, [n.branches]), /* @__PURE__ */ x(K.div, { ...e, ref: i });
584
+ }, [n.branches]), /* @__PURE__ */ x(J.div, { ...e, ref: i });
585
585
  });
586
- Rr.displayName = Or;
587
- function Tr(e, t = globalThis == null ? void 0 : globalThis.document) {
588
- const n = se(e), o = u.useRef(!1), i = u.useRef(() => {
586
+ Mr.displayName = Lr;
587
+ function $r(e, t = globalThis == null ? void 0 : globalThis.document) {
588
+ const n = ae(e), o = f.useRef(!1), i = f.useRef(() => {
589
589
  });
590
- return u.useEffect(() => {
590
+ return f.useEffect(() => {
591
591
  const r = (a) => {
592
592
  if (a.target && !o.current) {
593
- let c = function() {
594
- jt(
595
- Cr,
593
+ let l = function() {
594
+ qt(
595
+ Nr,
596
596
  n,
597
- l,
597
+ c,
598
598
  { discrete: !0 }
599
599
  );
600
600
  };
601
- const l = { originalEvent: a };
602
- a.pointerType === "touch" ? (t.removeEventListener("click", i.current), i.current = c, t.addEventListener("click", i.current, { once: !0 })) : c();
601
+ const c = { originalEvent: a };
602
+ a.pointerType === "touch" ? (t.removeEventListener("click", i.current), i.current = l, t.addEventListener("click", i.current, { once: !0 })) : l();
603
603
  } else
604
604
  t.removeEventListener("click", i.current);
605
605
  o.current = !1;
@@ -614,11 +614,11 @@ function Tr(e, t = globalThis == null ? void 0 : globalThis.document) {
614
614
  onPointerDownCapture: () => o.current = !0
615
615
  };
616
616
  }
617
- function Sr(e, t = globalThis == null ? void 0 : globalThis.document) {
618
- const n = se(e), o = u.useRef(!1);
619
- return u.useEffect(() => {
617
+ function kr(e, t = globalThis == null ? void 0 : globalThis.document) {
618
+ const n = ae(e), o = f.useRef(!1);
619
+ return f.useEffect(() => {
620
620
  const i = (r) => {
621
- r.target && !o.current && jt(Er, n, { originalEvent: r }, {
621
+ r.target && !o.current && qt(Dr, n, { originalEvent: r }, {
622
622
  discrete: !1
623
623
  });
624
624
  };
@@ -628,94 +628,95 @@ function Sr(e, t = globalThis == null ? void 0 : globalThis.document) {
628
628
  onBlurCapture: () => o.current = !1
629
629
  };
630
630
  }
631
- function yt() {
632
- const e = new CustomEvent(ke);
631
+ function bt() {
632
+ const e = new CustomEvent(We);
633
633
  document.dispatchEvent(e);
634
634
  }
635
- function jt(e, t, n, { discrete: o }) {
635
+ function qt(e, t, n, { discrete: o }) {
636
636
  const i = n.originalEvent.target, r = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
637
- t && i.addEventListener(e, t, { once: !0 }), o ? _r(i, r) : i.dispatchEvent(r);
638
- }
639
- var Q = globalThis != null && globalThis.document ? u.useLayoutEffect : () => {
640
- }, Nr = u.useId || (() => {
641
- }), Dr = 0;
642
- function Lr(e) {
643
- const [t, n] = u.useState(Nr());
644
- return Q(() => {
645
- n((o) => o ?? String(Dr++));
637
+ t && i.addEventListener(e, t, { once: !0 }), o ? Er(i, r) : i.dispatchEvent(r);
638
+ }
639
+ var ee = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
640
+ }, Fr = f.useId || (() => {
641
+ }), Ir = 0;
642
+ function Wr(e) {
643
+ const [t, n] = f.useState(Fr());
644
+ return ee(() => {
645
+ n((o) => o ?? String(Ir++));
646
646
  }, [e]), t ? `radix-${t}` : "";
647
647
  }
648
- const $r = ["top", "right", "bottom", "left"], j = Math.min, I = Math.max, _e = Math.round, ye = Math.floor, q = (e) => ({
648
+ const Br = ["top", "right", "bottom", "left"], Z = Math.min, I = Math.max, Ae = Math.round, we = Math.floor, V = (e) => ({
649
649
  x: e,
650
650
  y: e
651
- }), Mr = {
651
+ }), Hr = {
652
652
  left: "right",
653
653
  right: "left",
654
654
  bottom: "top",
655
655
  top: "bottom"
656
- }, kr = {
656
+ }, jr = {
657
657
  start: "end",
658
658
  end: "start"
659
659
  };
660
- function Fe(e, t, n) {
661
- return I(e, j(t, n));
660
+ function Be(e, t, n) {
661
+ return I(e, Z(t, n));
662
662
  }
663
- function U(e, t) {
663
+ function G(e, t) {
664
664
  return typeof e == "function" ? e(t) : e;
665
665
  }
666
- function Y(e) {
666
+ function X(e) {
667
667
  return e.split("-")[0];
668
668
  }
669
- function ae(e) {
669
+ function ce(e) {
670
670
  return e.split("-")[1];
671
671
  }
672
- function je(e) {
672
+ function Ue(e) {
673
673
  return e === "x" ? "y" : "x";
674
674
  }
675
- function ze(e) {
675
+ function Ye(e) {
676
676
  return e === "y" ? "height" : "width";
677
677
  }
678
- function X(e) {
679
- return ["top", "bottom"].includes(Y(e)) ? "y" : "x";
678
+ const zr = /* @__PURE__ */ new Set(["top", "bottom"]);
679
+ function z(e) {
680
+ return zr.has(X(e)) ? "y" : "x";
680
681
  }
681
- function Ve(e) {
682
- return je(X(e));
682
+ function qe(e) {
683
+ return Ue(z(e));
683
684
  }
684
- function Fr(e, t, n) {
685
+ function Vr(e, t, n) {
685
686
  n === void 0 && (n = !1);
686
- const o = ae(e), i = Ve(e), r = ze(i);
687
+ const o = ce(e), i = qe(e), r = Ye(i);
687
688
  let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
688
- return t.reference[r] > t.floating[r] && (s = Ae(s)), [s, Ae(s)];
689
+ return t.reference[r] > t.floating[r] && (s = Ce(s)), [s, Ce(s)];
689
690
  }
690
- function Ir(e) {
691
- const t = Ae(e);
692
- return [Ie(e), t, Ie(t)];
691
+ function Ur(e) {
692
+ const t = Ce(e);
693
+ return [He(e), t, He(t)];
693
694
  }
694
- function Ie(e) {
695
- return e.replace(/start|end/g, (t) => kr[t]);
695
+ function He(e) {
696
+ return e.replace(/start|end/g, (t) => jr[t]);
696
697
  }
697
- function Br(e, t, n) {
698
- const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
698
+ const _t = ["left", "right"], At = ["right", "left"], Yr = ["top", "bottom"], qr = ["bottom", "top"];
699
+ function Gr(e, t, n) {
699
700
  switch (e) {
700
701
  case "top":
701
702
  case "bottom":
702
- return n ? t ? i : o : t ? o : i;
703
+ return n ? t ? At : _t : t ? _t : At;
703
704
  case "left":
704
705
  case "right":
705
- return t ? r : s;
706
+ return t ? Yr : qr;
706
707
  default:
707
708
  return [];
708
709
  }
709
710
  }
710
- function Wr(e, t, n, o) {
711
- const i = ae(e);
712
- let r = Br(Y(e), n === "start", o);
713
- return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(Ie)))), r;
711
+ function Xr(e, t, n, o) {
712
+ const i = ce(e);
713
+ let r = Gr(X(e), n === "start", o);
714
+ return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(He)))), r;
714
715
  }
715
- function Ae(e) {
716
- return e.replace(/left|right|bottom|top/g, (t) => Mr[t]);
716
+ function Ce(e) {
717
+ return e.replace(/left|right|bottom|top/g, (t) => Hr[t]);
717
718
  }
718
- function Hr(e) {
719
+ function Zr(e) {
719
720
  return {
720
721
  top: 0,
721
722
  right: 0,
@@ -724,8 +725,8 @@ function Hr(e) {
724
725
  ...e
725
726
  };
726
727
  }
727
- function zt(e) {
728
- return typeof e != "number" ? Hr(e) : {
728
+ function Gt(e) {
729
+ return typeof e != "number" ? Zr(e) : {
729
730
  top: e,
730
731
  right: e,
731
732
  bottom: e,
@@ -750,116 +751,116 @@ function Pe(e) {
750
751
  y: n
751
752
  };
752
753
  }
753
- function wt(e, t, n) {
754
+ function Ct(e, t, n) {
754
755
  let {
755
756
  reference: o,
756
757
  floating: i
757
758
  } = e;
758
- const r = X(t), s = Ve(t), a = ze(s), c = Y(t), l = r === "y", f = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, h = o[a] / 2 - i[a] / 2;
759
- let p;
760
- switch (c) {
759
+ const r = z(t), s = qe(t), a = Ye(s), l = X(t), c = r === "y", u = o.x + o.width / 2 - i.width / 2, p = o.y + o.height / 2 - i.height / 2, h = o[a] / 2 - i[a] / 2;
760
+ let d;
761
+ switch (l) {
761
762
  case "top":
762
- p = {
763
- x: f,
763
+ d = {
764
+ x: u,
764
765
  y: o.y - i.height
765
766
  };
766
767
  break;
767
768
  case "bottom":
768
- p = {
769
- x: f,
769
+ d = {
770
+ x: u,
770
771
  y: o.y + o.height
771
772
  };
772
773
  break;
773
774
  case "right":
774
- p = {
775
+ d = {
775
776
  x: o.x + o.width,
776
- y: d
777
+ y: p
777
778
  };
778
779
  break;
779
780
  case "left":
780
- p = {
781
+ d = {
781
782
  x: o.x - i.width,
782
- y: d
783
+ y: p
783
784
  };
784
785
  break;
785
786
  default:
786
- p = {
787
+ d = {
787
788
  x: o.x,
788
789
  y: o.y
789
790
  };
790
791
  }
791
- switch (ae(t)) {
792
+ switch (ce(t)) {
792
793
  case "start":
793
- p[s] -= h * (n && l ? -1 : 1);
794
+ d[s] -= h * (n && c ? -1 : 1);
794
795
  break;
795
796
  case "end":
796
- p[s] += h * (n && l ? -1 : 1);
797
+ d[s] += h * (n && c ? -1 : 1);
797
798
  break;
798
799
  }
799
- return p;
800
+ return d;
800
801
  }
801
- const jr = async (e, t, n) => {
802
+ const Kr = async (e, t, n) => {
802
803
  const {
803
804
  placement: o = "bottom",
804
805
  strategy: i = "absolute",
805
806
  middleware: r = [],
806
807
  platform: s
807
- } = n, a = r.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
808
- let l = await s.getElementRects({
808
+ } = n, a = r.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(t));
809
+ let c = await s.getElementRects({
809
810
  reference: e,
810
811
  floating: t,
811
812
  strategy: i
812
813
  }), {
813
- x: f,
814
- y: d
815
- } = wt(l, o, c), h = o, p = {}, g = 0;
816
- for (let m = 0; m < a.length; m++) {
814
+ x: u,
815
+ y: p
816
+ } = Ct(c, o, l), h = o, d = {}, m = 0;
817
+ for (let g = 0; g < a.length; g++) {
817
818
  const {
818
819
  name: v,
819
820
  fn: y
820
- } = a[m], {
821
+ } = a[g], {
821
822
  x: w,
822
- y: A,
823
+ y: C,
823
824
  data: b,
824
- reset: _
825
+ reset: A
825
826
  } = await y({
826
- x: f,
827
- y: d,
827
+ x: u,
828
+ y: p,
828
829
  initialPlacement: o,
829
830
  placement: h,
830
831
  strategy: i,
831
- middlewareData: p,
832
- rects: l,
832
+ middlewareData: d,
833
+ rects: c,
833
834
  platform: s,
834
835
  elements: {
835
836
  reference: e,
836
837
  floating: t
837
838
  }
838
839
  });
839
- f = w ?? f, d = A ?? d, p = {
840
- ...p,
840
+ u = w ?? u, p = C ?? p, d = {
841
+ ...d,
841
842
  [v]: {
842
- ...p[v],
843
+ ...d[v],
843
844
  ...b
844
845
  }
845
- }, _ && g <= 50 && (g++, typeof _ == "object" && (_.placement && (h = _.placement), _.rects && (l = _.rects === !0 ? await s.getElementRects({
846
+ }, A && m <= 50 && (m++, typeof A == "object" && (A.placement && (h = A.placement), A.rects && (c = A.rects === !0 ? await s.getElementRects({
846
847
  reference: e,
847
848
  floating: t,
848
849
  strategy: i
849
- }) : _.rects), {
850
- x: f,
851
- y: d
852
- } = wt(l, h, c)), m = -1);
850
+ }) : A.rects), {
851
+ x: u,
852
+ y: p
853
+ } = Ct(c, h, l)), g = -1);
853
854
  }
854
855
  return {
855
- x: f,
856
- y: d,
856
+ x: u,
857
+ y: p,
857
858
  placement: h,
858
859
  strategy: i,
859
- middlewareData: p
860
+ middlewareData: d
860
861
  };
861
862
  };
862
- async function pe(e, t) {
863
+ async function de(e, t) {
863
864
  var n;
864
865
  t === void 0 && (t = {});
865
866
  const {
@@ -868,43 +869,43 @@ async function pe(e, t) {
868
869
  platform: r,
869
870
  rects: s,
870
871
  elements: a,
871
- strategy: c
872
+ strategy: l
872
873
  } = e, {
873
- boundary: l = "clippingAncestors",
874
- rootBoundary: f = "viewport",
875
- elementContext: d = "floating",
874
+ boundary: c = "clippingAncestors",
875
+ rootBoundary: u = "viewport",
876
+ elementContext: p = "floating",
876
877
  altBoundary: h = !1,
877
- padding: p = 0
878
- } = U(t, e), g = zt(p), v = a[h ? d === "floating" ? "reference" : "floating" : d], y = Pe(await r.getClippingRect({
878
+ padding: d = 0
879
+ } = G(t, e), m = Gt(d), v = a[h ? p === "floating" ? "reference" : "floating" : p], y = Pe(await r.getClippingRect({
879
880
  element: (n = await (r.isElement == null ? void 0 : r.isElement(v))) == null || n ? v : v.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
880
- boundary: l,
881
- rootBoundary: f,
882
- strategy: c
883
- })), w = d === "floating" ? {
881
+ boundary: c,
882
+ rootBoundary: u,
883
+ strategy: l
884
+ })), w = p === "floating" ? {
884
885
  x: o,
885
886
  y: i,
886
887
  width: s.floating.width,
887
888
  height: s.floating.height
888
- } : s.reference, A = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), b = await (r.isElement == null ? void 0 : r.isElement(A)) ? await (r.getScale == null ? void 0 : r.getScale(A)) || {
889
+ } : s.reference, C = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), b = await (r.isElement == null ? void 0 : r.isElement(C)) ? await (r.getScale == null ? void 0 : r.getScale(C)) || {
889
890
  x: 1,
890
891
  y: 1
891
892
  } : {
892
893
  x: 1,
893
894
  y: 1
894
- }, _ = Pe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
895
+ }, A = Pe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
895
896
  elements: a,
896
897
  rect: w,
897
- offsetParent: A,
898
- strategy: c
898
+ offsetParent: C,
899
+ strategy: l
899
900
  }) : w);
900
901
  return {
901
- top: (y.top - _.top + g.top) / b.y,
902
- bottom: (_.bottom - y.bottom + g.bottom) / b.y,
903
- left: (y.left - _.left + g.left) / b.x,
904
- right: (_.right - y.right + g.right) / b.x
902
+ top: (y.top - A.top + m.top) / b.y,
903
+ bottom: (A.bottom - y.bottom + m.bottom) / b.y,
904
+ left: (y.left - A.left + m.left) / b.x,
905
+ right: (A.right - y.right + m.right) / b.x
905
906
  };
906
907
  }
907
- const zr = (e) => ({
908
+ const Jr = (e) => ({
908
909
  name: "arrow",
909
910
  options: e,
910
911
  async fn(t) {
@@ -915,33 +916,33 @@ const zr = (e) => ({
915
916
  rects: r,
916
917
  platform: s,
917
918
  elements: a,
918
- middlewareData: c
919
+ middlewareData: l
919
920
  } = t, {
920
- element: l,
921
- padding: f = 0
922
- } = U(e, t) || {};
923
- if (l == null)
921
+ element: c,
922
+ padding: u = 0
923
+ } = G(e, t) || {};
924
+ if (c == null)
924
925
  return {};
925
- const d = zt(f), h = {
926
+ const p = Gt(u), h = {
926
927
  x: n,
927
928
  y: o
928
- }, p = Ve(i), g = ze(p), m = await s.getDimensions(l), v = p === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", A = v ? "clientHeight" : "clientWidth", b = r.reference[g] + r.reference[p] - h[p] - r.floating[g], _ = h[p] - r.reference[p], C = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
929
- let P = C ? C[A] : 0;
930
- (!P || !await (s.isElement == null ? void 0 : s.isElement(C))) && (P = a.floating[A] || r.floating[g]);
931
- const O = b / 2 - _ / 2, D = P / 2 - m[g] / 2 - 1, R = j(d[y], D), $ = j(d[w], D), M = R, k = P - m[g] - $, T = P / 2 - m[g] / 2 + O, L = Fe(M, T, k), F = !c.arrow && ae(i) != null && T !== L && r.reference[g] / 2 - (T < M ? R : $) - m[g] / 2 < 0, E = F ? T < M ? T - M : T - k : 0;
929
+ }, d = qe(i), m = Ye(d), g = await s.getDimensions(c), v = d === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", C = v ? "clientHeight" : "clientWidth", b = r.reference[m] + r.reference[d] - h[d] - r.floating[m], A = h[d] - r.reference[d], P = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
930
+ let _ = P ? P[C] : 0;
931
+ (!_ || !await (s.isElement == null ? void 0 : s.isElement(P))) && (_ = a.floating[C] || r.floating[m]);
932
+ const R = b / 2 - A / 2, L = _ / 2 - g[m] / 2 - 1, E = Z(p[y], L), $ = Z(p[w], L), k = E, T = _ - g[m] - $, S = _ / 2 - g[m] / 2 + R, F = Be(k, S, T), N = !l.arrow && ce(i) != null && S !== F && r.reference[m] / 2 - (S < k ? E : $) - g[m] / 2 < 0, D = N ? S < k ? S - k : S - T : 0;
932
933
  return {
933
- [p]: h[p] + E,
934
+ [d]: h[d] + D,
934
935
  data: {
935
- [p]: L,
936
- centerOffset: T - L - E,
937
- ...F && {
938
- alignmentOffset: E
936
+ [d]: F,
937
+ centerOffset: S - F - D,
938
+ ...N && {
939
+ alignmentOffset: D
939
940
  }
940
941
  },
941
- reset: F
942
+ reset: N
942
943
  };
943
944
  }
944
- }), Vr = function(e) {
945
+ }), Qr = function(e) {
945
946
  return e === void 0 && (e = {}), {
946
947
  name: "flip",
947
948
  options: e,
@@ -952,68 +953,70 @@ const zr = (e) => ({
952
953
  middlewareData: r,
953
954
  rects: s,
954
955
  initialPlacement: a,
955
- platform: c,
956
- elements: l
956
+ platform: l,
957
+ elements: c
957
958
  } = t, {
958
- mainAxis: f = !0,
959
- crossAxis: d = !0,
959
+ mainAxis: u = !0,
960
+ crossAxis: p = !0,
960
961
  fallbackPlacements: h,
961
- fallbackStrategy: p = "bestFit",
962
- fallbackAxisSideDirection: g = "none",
963
- flipAlignment: m = !0,
962
+ fallbackStrategy: d = "bestFit",
963
+ fallbackAxisSideDirection: m = "none",
964
+ flipAlignment: g = !0,
964
965
  ...v
965
- } = U(e, t);
966
+ } = G(e, t);
966
967
  if ((n = r.arrow) != null && n.alignmentOffset)
967
968
  return {};
968
- const y = Y(i), w = X(a), A = Y(a) === a, b = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), _ = h || (A || !m ? [Ae(a)] : Ir(a)), C = g !== "none";
969
- !h && C && _.push(...Wr(a, m, g, b));
970
- const P = [a, ..._], O = await pe(t, v), D = [];
971
- let R = ((o = r.flip) == null ? void 0 : o.overflows) || [];
972
- if (f && D.push(O[y]), d) {
973
- const T = Fr(i, s, b);
974
- D.push(O[T[0]], O[T[1]]);
969
+ const y = X(i), w = z(a), C = X(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), A = h || (C || !g ? [Ce(a)] : Ur(a)), P = m !== "none";
970
+ !h && P && A.push(...Xr(a, g, m, b));
971
+ const _ = [a, ...A], R = await de(t, v), L = [];
972
+ let E = ((o = r.flip) == null ? void 0 : o.overflows) || [];
973
+ if (u && L.push(R[y]), p) {
974
+ const S = Vr(i, s, b);
975
+ L.push(R[S[0]], R[S[1]]);
975
976
  }
976
- if (R = [...R, {
977
+ if (E = [...E, {
977
978
  placement: i,
978
- overflows: D
979
- }], !D.every((T) => T <= 0)) {
980
- var $, M;
981
- const T = ((($ = r.flip) == null ? void 0 : $.index) || 0) + 1, L = P[T];
982
- if (L)
979
+ overflows: L
980
+ }], !L.every((S) => S <= 0)) {
981
+ var $, k;
982
+ const S = ((($ = r.flip) == null ? void 0 : $.index) || 0) + 1, F = _[S];
983
+ if (F && (!(p === "alignment" ? w !== z(F) : !1) || // We leave the current main axis only if every placement on that axis
984
+ // overflows the main axis.
985
+ E.every((O) => z(O.placement) === w ? O.overflows[0] > 0 : !0)))
983
986
  return {
984
987
  data: {
985
- index: T,
986
- overflows: R
988
+ index: S,
989
+ overflows: E
987
990
  },
988
991
  reset: {
989
- placement: L
992
+ placement: F
990
993
  }
991
994
  };
992
- let F = (M = R.filter((E) => E.overflows[0] <= 0).sort((E, S) => E.overflows[1] - S.overflows[1])[0]) == null ? void 0 : M.placement;
993
- if (!F)
994
- switch (p) {
995
+ let N = (k = E.filter((D) => D.overflows[0] <= 0).sort((D, O) => D.overflows[1] - O.overflows[1])[0]) == null ? void 0 : k.placement;
996
+ if (!N)
997
+ switch (d) {
995
998
  case "bestFit": {
996
- var k;
997
- const E = (k = R.filter((S) => {
998
- if (C) {
999
- const N = X(S.placement);
1000
- return N === w || // Create a bias to the `y` side axis due to horizontal
999
+ var T;
1000
+ const D = (T = E.filter((O) => {
1001
+ if (P) {
1002
+ const M = z(O.placement);
1003
+ return M === w || // Create a bias to the `y` side axis due to horizontal
1001
1004
  // reading directions favoring greater width.
1002
- N === "y";
1005
+ M === "y";
1003
1006
  }
1004
1007
  return !0;
1005
- }).map((S) => [S.placement, S.overflows.filter((N) => N > 0).reduce((N, Ne) => N + Ne, 0)]).sort((S, N) => S[1] - N[1])[0]) == null ? void 0 : k[0];
1006
- E && (F = E);
1008
+ }).map((O) => [O.placement, O.overflows.filter((M) => M > 0).reduce((M, j) => M + j, 0)]).sort((O, M) => O[1] - M[1])[0]) == null ? void 0 : T[0];
1009
+ D && (N = D);
1007
1010
  break;
1008
1011
  }
1009
1012
  case "initialPlacement":
1010
- F = a;
1013
+ N = a;
1011
1014
  break;
1012
1015
  }
1013
- if (i !== F)
1016
+ if (i !== N)
1014
1017
  return {
1015
1018
  reset: {
1016
- placement: F
1019
+ placement: N
1017
1020
  }
1018
1021
  };
1019
1022
  }
@@ -1021,7 +1024,7 @@ const zr = (e) => ({
1021
1024
  }
1022
1025
  };
1023
1026
  };
1024
- function xt(e, t) {
1027
+ function Pt(e, t) {
1025
1028
  return {
1026
1029
  top: e.top - t.height,
1027
1030
  right: e.right - t.width,
@@ -1029,10 +1032,10 @@ function xt(e, t) {
1029
1032
  left: e.left - t.width
1030
1033
  };
1031
1034
  }
1032
- function bt(e) {
1033
- return $r.some((t) => e[t] >= 0);
1035
+ function Ot(e) {
1036
+ return Br.some((t) => e[t] >= 0);
1034
1037
  }
1035
- const Ur = function(e) {
1038
+ const eo = function(e) {
1036
1039
  return e === void 0 && (e = {}), {
1037
1040
  name: "hide",
1038
1041
  options: e,
@@ -1042,29 +1045,29 @@ const Ur = function(e) {
1042
1045
  } = t, {
1043
1046
  strategy: o = "referenceHidden",
1044
1047
  ...i
1045
- } = U(e, t);
1048
+ } = G(e, t);
1046
1049
  switch (o) {
1047
1050
  case "referenceHidden": {
1048
- const r = await pe(t, {
1051
+ const r = await de(t, {
1049
1052
  ...i,
1050
1053
  elementContext: "reference"
1051
- }), s = xt(r, n.reference);
1054
+ }), s = Pt(r, n.reference);
1052
1055
  return {
1053
1056
  data: {
1054
1057
  referenceHiddenOffsets: s,
1055
- referenceHidden: bt(s)
1058
+ referenceHidden: Ot(s)
1056
1059
  }
1057
1060
  };
1058
1061
  }
1059
1062
  case "escaped": {
1060
- const r = await pe(t, {
1063
+ const r = await de(t, {
1061
1064
  ...i,
1062
1065
  altBoundary: !0
1063
- }), s = xt(r, n.floating);
1066
+ }), s = Pt(r, n.floating);
1064
1067
  return {
1065
1068
  data: {
1066
1069
  escapedOffsets: s,
1067
- escaped: bt(s)
1070
+ escaped: Ot(s)
1068
1071
  }
1069
1072
  };
1070
1073
  }
@@ -1073,36 +1076,35 @@ const Ur = function(e) {
1073
1076
  }
1074
1077
  }
1075
1078
  };
1076
- };
1077
- async function Yr(e, t) {
1079
+ }, Xt = /* @__PURE__ */ new Set(["left", "top"]);
1080
+ async function to(e, t) {
1078
1081
  const {
1079
1082
  placement: n,
1080
1083
  platform: o,
1081
1084
  elements: i
1082
- } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = Y(n), a = ae(n), c = X(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, f = r && c ? -1 : 1, d = U(t, e);
1085
+ } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = X(n), a = ce(n), l = z(n) === "y", c = Xt.has(s) ? -1 : 1, u = r && l ? -1 : 1, p = G(t, e);
1083
1086
  let {
1084
1087
  mainAxis: h,
1085
- crossAxis: p,
1086
- alignmentAxis: g
1087
- } = typeof d == "number" ? {
1088
- mainAxis: d,
1088
+ crossAxis: d,
1089
+ alignmentAxis: m
1090
+ } = typeof p == "number" ? {
1091
+ mainAxis: p,
1089
1092
  crossAxis: 0,
1090
1093
  alignmentAxis: null
1091
1094
  } : {
1092
- mainAxis: 0,
1093
- crossAxis: 0,
1094
- alignmentAxis: null,
1095
- ...d
1095
+ mainAxis: p.mainAxis || 0,
1096
+ crossAxis: p.crossAxis || 0,
1097
+ alignmentAxis: p.alignmentAxis
1096
1098
  };
1097
- return a && typeof g == "number" && (p = a === "end" ? g * -1 : g), c ? {
1098
- x: p * f,
1099
- y: h * l
1099
+ return a && typeof m == "number" && (d = a === "end" ? m * -1 : m), l ? {
1100
+ x: d * u,
1101
+ y: h * c
1100
1102
  } : {
1101
- x: h * l,
1102
- y: p * f
1103
+ x: h * c,
1104
+ y: d * u
1103
1105
  };
1104
1106
  }
1105
- const Gr = function(e) {
1107
+ const no = function(e) {
1106
1108
  return e === void 0 && (e = 0), {
1107
1109
  name: "offset",
1108
1110
  options: e,
@@ -1113,18 +1115,18 @@ const Gr = function(e) {
1113
1115
  y: r,
1114
1116
  placement: s,
1115
1117
  middlewareData: a
1116
- } = t, c = await Yr(t, e);
1118
+ } = t, l = await to(t, e);
1117
1119
  return s === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
1118
- x: i + c.x,
1119
- y: r + c.y,
1120
+ x: i + l.x,
1121
+ y: r + l.y,
1120
1122
  data: {
1121
- ...c,
1123
+ ...l,
1122
1124
  placement: s
1123
1125
  }
1124
1126
  };
1125
1127
  }
1126
1128
  };
1127
- }, qr = function(e) {
1129
+ }, ro = function(e) {
1128
1130
  return e === void 0 && (e = {}), {
1129
1131
  name: "shift",
1130
1132
  options: e,
@@ -1148,35 +1150,39 @@ const Gr = function(e) {
1148
1150
  };
1149
1151
  }
1150
1152
  },
1151
- ...c
1152
- } = U(e, t), l = {
1153
+ ...l
1154
+ } = G(e, t), c = {
1153
1155
  x: n,
1154
1156
  y: o
1155
- }, f = await pe(t, c), d = X(Y(i)), h = je(d);
1156
- let p = l[h], g = l[d];
1157
+ }, u = await de(t, l), p = z(X(i)), h = Ue(p);
1158
+ let d = c[h], m = c[p];
1157
1159
  if (r) {
1158
- const v = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", w = p + f[v], A = p - f[y];
1159
- p = Fe(w, p, A);
1160
+ const v = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", w = d + u[v], C = d - u[y];
1161
+ d = Be(w, d, C);
1160
1162
  }
1161
1163
  if (s) {
1162
- const v = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", w = g + f[v], A = g - f[y];
1163
- g = Fe(w, g, A);
1164
+ const v = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", w = m + u[v], C = m - u[y];
1165
+ m = Be(w, m, C);
1164
1166
  }
1165
- const m = a.fn({
1167
+ const g = a.fn({
1166
1168
  ...t,
1167
- [h]: p,
1168
- [d]: g
1169
+ [h]: d,
1170
+ [p]: m
1169
1171
  });
1170
1172
  return {
1171
- ...m,
1173
+ ...g,
1172
1174
  data: {
1173
- x: m.x - n,
1174
- y: m.y - o
1175
+ x: g.x - n,
1176
+ y: g.y - o,
1177
+ enabled: {
1178
+ [h]: r,
1179
+ [p]: s
1180
+ }
1175
1181
  }
1176
1182
  };
1177
1183
  }
1178
1184
  };
1179
- }, Xr = function(e) {
1185
+ }, oo = function(e) {
1180
1186
  return e === void 0 && (e = {}), {
1181
1187
  options: e,
1182
1188
  fn(t) {
@@ -1188,69 +1194,70 @@ const Gr = function(e) {
1188
1194
  middlewareData: s
1189
1195
  } = t, {
1190
1196
  offset: a = 0,
1191
- mainAxis: c = !0,
1192
- crossAxis: l = !0
1193
- } = U(e, t), f = {
1197
+ mainAxis: l = !0,
1198
+ crossAxis: c = !0
1199
+ } = G(e, t), u = {
1194
1200
  x: n,
1195
1201
  y: o
1196
- }, d = X(i), h = je(d);
1197
- let p = f[h], g = f[d];
1198
- const m = U(a, t), v = typeof m == "number" ? {
1199
- mainAxis: m,
1202
+ }, p = z(i), h = Ue(p);
1203
+ let d = u[h], m = u[p];
1204
+ const g = G(a, t), v = typeof g == "number" ? {
1205
+ mainAxis: g,
1200
1206
  crossAxis: 0
1201
1207
  } : {
1202
1208
  mainAxis: 0,
1203
1209
  crossAxis: 0,
1204
- ...m
1210
+ ...g
1205
1211
  };
1206
- if (c) {
1207
- const A = h === "y" ? "height" : "width", b = r.reference[h] - r.floating[A] + v.mainAxis, _ = r.reference[h] + r.reference[A] - v.mainAxis;
1208
- p < b ? p = b : p > _ && (p = _);
1209
- }
1210
1212
  if (l) {
1213
+ const C = h === "y" ? "height" : "width", b = r.reference[h] - r.floating[C] + v.mainAxis, A = r.reference[h] + r.reference[C] - v.mainAxis;
1214
+ d < b ? d = b : d > A && (d = A);
1215
+ }
1216
+ if (c) {
1211
1217
  var y, w;
1212
- const A = h === "y" ? "width" : "height", b = ["top", "left"].includes(Y(i)), _ = r.reference[d] - r.floating[A] + (b && ((y = s.offset) == null ? void 0 : y[d]) || 0) + (b ? 0 : v.crossAxis), C = r.reference[d] + r.reference[A] + (b ? 0 : ((w = s.offset) == null ? void 0 : w[d]) || 0) - (b ? v.crossAxis : 0);
1213
- g < _ ? g = _ : g > C && (g = C);
1218
+ const C = h === "y" ? "width" : "height", b = Xt.has(X(i)), A = r.reference[p] - r.floating[C] + (b && ((y = s.offset) == null ? void 0 : y[p]) || 0) + (b ? 0 : v.crossAxis), P = r.reference[p] + r.reference[C] + (b ? 0 : ((w = s.offset) == null ? void 0 : w[p]) || 0) - (b ? v.crossAxis : 0);
1219
+ m < A ? m = A : m > P && (m = P);
1214
1220
  }
1215
1221
  return {
1216
- [h]: p,
1217
- [d]: g
1222
+ [h]: d,
1223
+ [p]: m
1218
1224
  };
1219
1225
  }
1220
1226
  };
1221
- }, Zr = function(e) {
1227
+ }, io = function(e) {
1222
1228
  return e === void 0 && (e = {}), {
1223
1229
  name: "size",
1224
1230
  options: e,
1225
1231
  async fn(t) {
1232
+ var n, o;
1226
1233
  const {
1227
- placement: n,
1228
- rects: o,
1229
- platform: i,
1230
- elements: r
1234
+ placement: i,
1235
+ rects: r,
1236
+ platform: s,
1237
+ elements: a
1231
1238
  } = t, {
1232
- apply: s = () => {
1239
+ apply: l = () => {
1233
1240
  },
1234
- ...a
1235
- } = U(e, t), c = await pe(t, a), l = Y(n), f = ae(n), d = X(n) === "y", {
1236
- width: h,
1237
- height: p
1238
- } = o.floating;
1239
- let g, m;
1240
- l === "top" || l === "bottom" ? (g = l, m = f === (await (i.isRTL == null ? void 0 : i.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (m = l, g = f === "end" ? "top" : "bottom");
1241
- const v = p - c.top - c.bottom, y = h - c.left - c.right, w = j(p - c[g], v), A = j(h - c[m], y), b = !t.middlewareData.shift;
1242
- let _ = w, C = A;
1243
- if (d ? C = f || b ? j(A, y) : y : _ = f || b ? j(w, v) : v, b && !f) {
1244
- const O = I(c.left, 0), D = I(c.right, 0), R = I(c.top, 0), $ = I(c.bottom, 0);
1245
- d ? C = h - 2 * (O !== 0 || D !== 0 ? O + D : I(c.left, c.right)) : _ = p - 2 * (R !== 0 || $ !== 0 ? R + $ : I(c.top, c.bottom));
1241
+ ...c
1242
+ } = G(e, t), u = await de(t, c), p = X(i), h = ce(i), d = z(i) === "y", {
1243
+ width: m,
1244
+ height: g
1245
+ } = r.floating;
1246
+ let v, y;
1247
+ p === "top" || p === "bottom" ? (v = p, y = h === (await (s.isRTL == null ? void 0 : s.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (y = p, v = h === "end" ? "top" : "bottom");
1248
+ const w = g - u.top - u.bottom, C = m - u.left - u.right, b = Z(g - u[v], w), A = Z(m - u[y], C), P = !t.middlewareData.shift;
1249
+ let _ = b, R = A;
1250
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = C), (o = t.middlewareData.shift) != null && o.enabled.y && (_ = w), P && !h) {
1251
+ const E = I(u.left, 0), $ = I(u.right, 0), k = I(u.top, 0), T = I(u.bottom, 0);
1252
+ d ? R = m - 2 * (E !== 0 || $ !== 0 ? E + $ : I(u.left, u.right)) : _ = g - 2 * (k !== 0 || T !== 0 ? k + T : I(u.top, u.bottom));
1246
1253
  }
1247
- await s({
1254
+ await l({
1248
1255
  ...t,
1249
- availableWidth: C,
1256
+ availableWidth: R,
1250
1257
  availableHeight: _
1251
1258
  });
1252
- const P = await i.getDimensions(r.floating);
1253
- return h !== P.width || p !== P.height ? {
1259
+ const L = await s.getDimensions(a.floating);
1260
+ return m !== L.width || g !== L.height ? {
1254
1261
  reset: {
1255
1262
  rects: !0
1256
1263
  }
@@ -1258,43 +1265,49 @@ const Gr = function(e) {
1258
1265
  }
1259
1266
  };
1260
1267
  };
1261
- function ce(e) {
1262
- return Vt(e) ? (e.nodeName || "").toLowerCase() : "#document";
1268
+ function Re() {
1269
+ return typeof window < "u";
1263
1270
  }
1264
- function B(e) {
1271
+ function le(e) {
1272
+ return Zt(e) ? (e.nodeName || "").toLowerCase() : "#document";
1273
+ }
1274
+ function W(e) {
1265
1275
  var t;
1266
1276
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
1267
1277
  }
1268
- function G(e) {
1278
+ function Y(e) {
1269
1279
  var t;
1270
- return (t = (Vt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
1280
+ return (t = (Zt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
1271
1281
  }
1272
- function Vt(e) {
1273
- return e instanceof Node || e instanceof B(e).Node;
1282
+ function Zt(e) {
1283
+ return Re() ? e instanceof Node || e instanceof W(e).Node : !1;
1274
1284
  }
1275
- function W(e) {
1276
- return e instanceof Element || e instanceof B(e).Element;
1285
+ function B(e) {
1286
+ return Re() ? e instanceof Element || e instanceof W(e).Element : !1;
1277
1287
  }
1278
- function z(e) {
1279
- return e instanceof HTMLElement || e instanceof B(e).HTMLElement;
1288
+ function U(e) {
1289
+ return Re() ? e instanceof HTMLElement || e instanceof W(e).HTMLElement : !1;
1280
1290
  }
1281
- function _t(e) {
1282
- return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof B(e).ShadowRoot;
1291
+ function Rt(e) {
1292
+ return !Re() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof W(e).ShadowRoot;
1283
1293
  }
1284
- function he(e) {
1294
+ const so = /* @__PURE__ */ new Set(["inline", "contents"]);
1295
+ function me(e) {
1285
1296
  const {
1286
1297
  overflow: t,
1287
1298
  overflowX: n,
1288
1299
  overflowY: o,
1289
1300
  display: i
1290
1301
  } = H(e);
1291
- return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(i);
1302
+ return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !so.has(i);
1292
1303
  }
1293
- function Kr(e) {
1294
- return ["table", "td", "th"].includes(ce(e));
1304
+ const ao = /* @__PURE__ */ new Set(["table", "td", "th"]);
1305
+ function co(e) {
1306
+ return ao.has(le(e));
1295
1307
  }
1308
+ const lo = [":popover-open", ":modal"];
1296
1309
  function Ee(e) {
1297
- return [":popover-open", ":modal"].some((t) => {
1310
+ return lo.some((t) => {
1298
1311
  try {
1299
1312
  return e.matches(t);
1300
1313
  } catch {
@@ -1302,32 +1315,34 @@ function Ee(e) {
1302
1315
  }
1303
1316
  });
1304
1317
  }
1305
- function Ue(e) {
1306
- const t = Ye(), n = W(e) ? H(e) : e;
1307
- return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
1318
+ const uo = ["transform", "translate", "scale", "rotate", "perspective"], fo = ["transform", "translate", "scale", "rotate", "perspective", "filter"], po = ["paint", "layout", "strict", "content"];
1319
+ function Ge(e) {
1320
+ const t = Xe(), n = B(e) ? H(e) : e;
1321
+ return uo.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || fo.some((o) => (n.willChange || "").includes(o)) || po.some((o) => (n.contain || "").includes(o));
1308
1322
  }
1309
- function Jr(e) {
1310
- let t = Z(e);
1311
- for (; z(t) && !oe(t); ) {
1312
- if (Ue(t))
1323
+ function ho(e) {
1324
+ let t = K(e);
1325
+ for (; U(t) && !ie(t); ) {
1326
+ if (Ge(t))
1313
1327
  return t;
1314
1328
  if (Ee(t))
1315
1329
  return null;
1316
- t = Z(t);
1330
+ t = K(t);
1317
1331
  }
1318
1332
  return null;
1319
1333
  }
1320
- function Ye() {
1334
+ function Xe() {
1321
1335
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1322
1336
  }
1323
- function oe(e) {
1324
- return ["html", "body", "#document"].includes(ce(e));
1337
+ const mo = /* @__PURE__ */ new Set(["html", "body", "#document"]);
1338
+ function ie(e) {
1339
+ return mo.has(le(e));
1325
1340
  }
1326
1341
  function H(e) {
1327
- return B(e).getComputedStyle(e);
1342
+ return W(e).getComputedStyle(e);
1328
1343
  }
1329
- function Oe(e) {
1330
- return W(e) ? {
1344
+ function Se(e) {
1345
+ return B(e) ? {
1331
1346
  scrollLeft: e.scrollLeft,
1332
1347
  scrollTop: e.scrollTop
1333
1348
  } : {
@@ -1335,131 +1350,140 @@ function Oe(e) {
1335
1350
  scrollTop: e.scrollY
1336
1351
  };
1337
1352
  }
1338
- function Z(e) {
1339
- if (ce(e) === "html")
1353
+ function K(e) {
1354
+ if (le(e) === "html")
1340
1355
  return e;
1341
1356
  const t = (
1342
1357
  // Step into the shadow DOM of the parent of a slotted node.
1343
1358
  e.assignedSlot || // DOM Element detected.
1344
1359
  e.parentNode || // ShadowRoot detected.
1345
- _t(e) && e.host || // Fallback.
1346
- G(e)
1360
+ Rt(e) && e.host || // Fallback.
1361
+ Y(e)
1347
1362
  );
1348
- return _t(t) ? t.host : t;
1363
+ return Rt(t) ? t.host : t;
1349
1364
  }
1350
- function Ut(e) {
1351
- const t = Z(e);
1352
- return oe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : z(t) && he(t) ? t : Ut(t);
1365
+ function Kt(e) {
1366
+ const t = K(e);
1367
+ return ie(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && me(t) ? t : Kt(t);
1353
1368
  }
1354
- function de(e, t, n) {
1369
+ function he(e, t, n) {
1355
1370
  var o;
1356
1371
  t === void 0 && (t = []), n === void 0 && (n = !0);
1357
- const i = Ut(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = B(i);
1372
+ const i = Kt(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = W(i);
1358
1373
  if (r) {
1359
- const a = Be(s);
1360
- return t.concat(s, s.visualViewport || [], he(i) ? i : [], a && n ? de(a) : []);
1374
+ const a = je(s);
1375
+ return t.concat(s, s.visualViewport || [], me(i) ? i : [], a && n ? he(a) : []);
1361
1376
  }
1362
- return t.concat(i, de(i, [], n));
1377
+ return t.concat(i, he(i, [], n));
1363
1378
  }
1364
- function Be(e) {
1379
+ function je(e) {
1365
1380
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
1366
1381
  }
1367
- function Yt(e) {
1382
+ function Jt(e) {
1368
1383
  const t = H(e);
1369
1384
  let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
1370
- const i = z(e), r = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, a = _e(n) !== r || _e(o) !== s;
1385
+ const i = U(e), r = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, a = Ae(n) !== r || Ae(o) !== s;
1371
1386
  return a && (n = r, o = s), {
1372
1387
  width: n,
1373
1388
  height: o,
1374
1389
  $: a
1375
1390
  };
1376
1391
  }
1377
- function Ge(e) {
1378
- return W(e) ? e : e.contextElement;
1392
+ function Ze(e) {
1393
+ return B(e) ? e : e.contextElement;
1379
1394
  }
1380
- function re(e) {
1381
- const t = Ge(e);
1382
- if (!z(t))
1383
- return q(1);
1395
+ function oe(e) {
1396
+ const t = Ze(e);
1397
+ if (!U(t))
1398
+ return V(1);
1384
1399
  const n = t.getBoundingClientRect(), {
1385
1400
  width: o,
1386
1401
  height: i,
1387
1402
  $: r
1388
- } = Yt(t);
1389
- let s = (r ? _e(n.width) : n.width) / o, a = (r ? _e(n.height) : n.height) / i;
1403
+ } = Jt(t);
1404
+ let s = (r ? Ae(n.width) : n.width) / o, a = (r ? Ae(n.height) : n.height) / i;
1390
1405
  return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1391
1406
  x: s,
1392
1407
  y: a
1393
1408
  };
1394
1409
  }
1395
- const Qr = /* @__PURE__ */ q(0);
1396
- function Gt(e) {
1397
- const t = B(e);
1398
- return !Ye() || !t.visualViewport ? Qr : {
1410
+ const go = /* @__PURE__ */ V(0);
1411
+ function Qt(e) {
1412
+ const t = W(e);
1413
+ return !Xe() || !t.visualViewport ? go : {
1399
1414
  x: t.visualViewport.offsetLeft,
1400
1415
  y: t.visualViewport.offsetTop
1401
1416
  };
1402
1417
  }
1403
- function eo(e, t, n) {
1404
- return t === void 0 && (t = !1), !n || t && n !== B(e) ? !1 : t;
1418
+ function vo(e, t, n) {
1419
+ return t === void 0 && (t = !1), !n || t && n !== W(e) ? !1 : t;
1405
1420
  }
1406
- function ee(e, t, n, o) {
1421
+ function te(e, t, n, o) {
1407
1422
  t === void 0 && (t = !1), n === void 0 && (n = !1);
1408
- const i = e.getBoundingClientRect(), r = Ge(e);
1409
- let s = q(1);
1410
- t && (o ? W(o) && (s = re(o)) : s = re(e));
1411
- const a = eo(r, n, o) ? Gt(r) : q(0);
1412
- let c = (i.left + a.x) / s.x, l = (i.top + a.y) / s.y, f = i.width / s.x, d = i.height / s.y;
1423
+ const i = e.getBoundingClientRect(), r = Ze(e);
1424
+ let s = V(1);
1425
+ t && (o ? B(o) && (s = oe(o)) : s = oe(e));
1426
+ const a = vo(r, n, o) ? Qt(r) : V(0);
1427
+ let l = (i.left + a.x) / s.x, c = (i.top + a.y) / s.y, u = i.width / s.x, p = i.height / s.y;
1413
1428
  if (r) {
1414
- const h = B(r), p = o && W(o) ? B(o) : o;
1415
- let g = h, m = Be(g);
1416
- for (; m && o && p !== g; ) {
1417
- const v = re(m), y = m.getBoundingClientRect(), w = H(m), A = y.left + (m.clientLeft + parseFloat(w.paddingLeft)) * v.x, b = y.top + (m.clientTop + parseFloat(w.paddingTop)) * v.y;
1418
- c *= v.x, l *= v.y, f *= v.x, d *= v.y, c += A, l += b, g = B(m), m = Be(g);
1429
+ const h = W(r), d = o && B(o) ? W(o) : o;
1430
+ let m = h, g = je(m);
1431
+ for (; g && o && d !== m; ) {
1432
+ const v = oe(g), y = g.getBoundingClientRect(), w = H(g), C = y.left + (g.clientLeft + parseFloat(w.paddingLeft)) * v.x, b = y.top + (g.clientTop + parseFloat(w.paddingTop)) * v.y;
1433
+ l *= v.x, c *= v.y, u *= v.x, p *= v.y, l += C, c += b, m = W(g), g = je(m);
1419
1434
  }
1420
1435
  }
1421
1436
  return Pe({
1422
- width: f,
1423
- height: d,
1424
- x: c,
1425
- y: l
1437
+ width: u,
1438
+ height: p,
1439
+ x: l,
1440
+ y: c
1426
1441
  });
1427
1442
  }
1428
- function to(e) {
1443
+ function Te(e, t) {
1444
+ const n = Se(e).scrollLeft;
1445
+ return t ? t.left + n : te(Y(e)).left + n;
1446
+ }
1447
+ function en(e, t) {
1448
+ const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Te(e, n), i = n.top + t.scrollTop;
1449
+ return {
1450
+ x: o,
1451
+ y: i
1452
+ };
1453
+ }
1454
+ function yo(e) {
1429
1455
  let {
1430
1456
  elements: t,
1431
1457
  rect: n,
1432
1458
  offsetParent: o,
1433
1459
  strategy: i
1434
1460
  } = e;
1435
- const r = i === "fixed", s = G(o), a = t ? Ee(t.floating) : !1;
1461
+ const r = i === "fixed", s = Y(o), a = t ? Ee(t.floating) : !1;
1436
1462
  if (o === s || a && r)
1437
1463
  return n;
1438
- let c = {
1464
+ let l = {
1439
1465
  scrollLeft: 0,
1440
1466
  scrollTop: 0
1441
- }, l = q(1);
1442
- const f = q(0), d = z(o);
1443
- if ((d || !d && !r) && ((ce(o) !== "body" || he(s)) && (c = Oe(o)), z(o))) {
1444
- const h = ee(o);
1445
- l = re(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
1467
+ }, c = V(1);
1468
+ const u = V(0), p = U(o);
1469
+ if ((p || !p && !r) && ((le(o) !== "body" || me(s)) && (l = Se(o)), U(o))) {
1470
+ const d = te(o);
1471
+ c = oe(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
1446
1472
  }
1473
+ const h = s && !p && !r ? en(s, l) : V(0);
1447
1474
  return {
1448
- width: n.width * l.x,
1449
- height: n.height * l.y,
1450
- x: n.x * l.x - c.scrollLeft * l.x + f.x,
1451
- y: n.y * l.y - c.scrollTop * l.y + f.y
1475
+ width: n.width * c.x,
1476
+ height: n.height * c.y,
1477
+ x: n.x * c.x - l.scrollLeft * c.x + u.x + h.x,
1478
+ y: n.y * c.y - l.scrollTop * c.y + u.y + h.y
1452
1479
  };
1453
1480
  }
1454
- function no(e) {
1481
+ function wo(e) {
1455
1482
  return Array.from(e.getClientRects());
1456
1483
  }
1457
- function qt(e) {
1458
- return ee(G(e)).left + Oe(e).scrollLeft;
1459
- }
1460
- function ro(e) {
1461
- const t = G(e), n = Oe(e), o = e.ownerDocument.body, i = I(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = I(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
1462
- let s = -n.scrollLeft + qt(e);
1484
+ function xo(e) {
1485
+ const t = Y(e), n = Se(e), o = e.ownerDocument.body, i = I(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = I(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
1486
+ let s = -n.scrollLeft + Te(e);
1463
1487
  const a = -n.scrollTop;
1464
1488
  return H(o).direction === "rtl" && (s += I(t.clientWidth, o.clientWidth) - i), {
1465
1489
  width: i,
@@ -1468,141 +1492,158 @@ function ro(e) {
1468
1492
  y: a
1469
1493
  };
1470
1494
  }
1471
- function oo(e, t) {
1472
- const n = B(e), o = G(e), i = n.visualViewport;
1473
- let r = o.clientWidth, s = o.clientHeight, a = 0, c = 0;
1495
+ const Et = 25;
1496
+ function bo(e, t) {
1497
+ const n = W(e), o = Y(e), i = n.visualViewport;
1498
+ let r = o.clientWidth, s = o.clientHeight, a = 0, l = 0;
1474
1499
  if (i) {
1475
1500
  r = i.width, s = i.height;
1476
- const l = Ye();
1477
- (!l || l && t === "fixed") && (a = i.offsetLeft, c = i.offsetTop);
1501
+ const u = Xe();
1502
+ (!u || u && t === "fixed") && (a = i.offsetLeft, l = i.offsetTop);
1478
1503
  }
1504
+ const c = Te(o);
1505
+ if (c <= 0) {
1506
+ const u = o.ownerDocument, p = u.body, h = getComputedStyle(p), d = u.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, m = Math.abs(o.clientWidth - p.clientWidth - d);
1507
+ m <= Et && (r -= m);
1508
+ } else c <= Et && (r += c);
1479
1509
  return {
1480
1510
  width: r,
1481
1511
  height: s,
1482
1512
  x: a,
1483
- y: c
1513
+ y: l
1484
1514
  };
1485
1515
  }
1486
- function io(e, t) {
1487
- const n = ee(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = z(e) ? re(e) : q(1), s = e.clientWidth * r.x, a = e.clientHeight * r.y, c = i * r.x, l = o * r.y;
1516
+ const _o = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1517
+ function Ao(e, t) {
1518
+ const n = te(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = U(e) ? oe(e) : V(1), s = e.clientWidth * r.x, a = e.clientHeight * r.y, l = i * r.x, c = o * r.y;
1488
1519
  return {
1489
1520
  width: s,
1490
1521
  height: a,
1491
- x: c,
1492
- y: l
1522
+ x: l,
1523
+ y: c
1493
1524
  };
1494
1525
  }
1495
- function At(e, t, n) {
1526
+ function St(e, t, n) {
1496
1527
  let o;
1497
1528
  if (t === "viewport")
1498
- o = oo(e, n);
1529
+ o = bo(e, n);
1499
1530
  else if (t === "document")
1500
- o = ro(G(e));
1501
- else if (W(t))
1502
- o = io(t, n);
1531
+ o = xo(Y(e));
1532
+ else if (B(t))
1533
+ o = Ao(t, n);
1503
1534
  else {
1504
- const i = Gt(e);
1535
+ const i = Qt(e);
1505
1536
  o = {
1506
- ...t,
1507
1537
  x: t.x - i.x,
1508
- y: t.y - i.y
1538
+ y: t.y - i.y,
1539
+ width: t.width,
1540
+ height: t.height
1509
1541
  };
1510
1542
  }
1511
1543
  return Pe(o);
1512
1544
  }
1513
- function Xt(e, t) {
1514
- const n = Z(e);
1515
- return n === t || !W(n) || oe(n) ? !1 : H(n).position === "fixed" || Xt(n, t);
1545
+ function tn(e, t) {
1546
+ const n = K(e);
1547
+ return n === t || !B(n) || ie(n) ? !1 : H(n).position === "fixed" || tn(n, t);
1516
1548
  }
1517
- function so(e, t) {
1549
+ function Co(e, t) {
1518
1550
  const n = t.get(e);
1519
1551
  if (n)
1520
1552
  return n;
1521
- let o = de(e, [], !1).filter((a) => W(a) && ce(a) !== "body"), i = null;
1553
+ let o = he(e, [], !1).filter((a) => B(a) && le(a) !== "body"), i = null;
1522
1554
  const r = H(e).position === "fixed";
1523
- let s = r ? Z(e) : e;
1524
- for (; W(s) && !oe(s); ) {
1525
- const a = H(s), c = Ue(s);
1526
- !c && a.position === "fixed" && (i = null), (r ? !c && !i : !c && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || he(s) && !c && Xt(e, s)) ? o = o.filter((f) => f !== s) : i = a, s = Z(s);
1555
+ let s = r ? K(e) : e;
1556
+ for (; B(s) && !ie(s); ) {
1557
+ const a = H(s), l = Ge(s);
1558
+ !l && a.position === "fixed" && (i = null), (r ? !l && !i : !l && a.position === "static" && !!i && _o.has(i.position) || me(s) && !l && tn(e, s)) ? o = o.filter((u) => u !== s) : i = a, s = K(s);
1527
1559
  }
1528
1560
  return t.set(e, o), o;
1529
1561
  }
1530
- function ao(e) {
1562
+ function Po(e) {
1531
1563
  let {
1532
1564
  element: t,
1533
1565
  boundary: n,
1534
1566
  rootBoundary: o,
1535
1567
  strategy: i
1536
1568
  } = e;
1537
- const s = [...n === "clippingAncestors" ? Ee(t) ? [] : so(t, this._c) : [].concat(n), o], a = s[0], c = s.reduce((l, f) => {
1538
- const d = At(t, f, i);
1539
- return l.top = I(d.top, l.top), l.right = j(d.right, l.right), l.bottom = j(d.bottom, l.bottom), l.left = I(d.left, l.left), l;
1540
- }, At(t, a, i));
1569
+ const s = [...n === "clippingAncestors" ? Ee(t) ? [] : Co(t, this._c) : [].concat(n), o], a = s[0], l = s.reduce((c, u) => {
1570
+ const p = St(t, u, i);
1571
+ return c.top = I(p.top, c.top), c.right = Z(p.right, c.right), c.bottom = Z(p.bottom, c.bottom), c.left = I(p.left, c.left), c;
1572
+ }, St(t, a, i));
1541
1573
  return {
1542
- width: c.right - c.left,
1543
- height: c.bottom - c.top,
1544
- x: c.left,
1545
- y: c.top
1574
+ width: l.right - l.left,
1575
+ height: l.bottom - l.top,
1576
+ x: l.left,
1577
+ y: l.top
1546
1578
  };
1547
1579
  }
1548
- function co(e) {
1580
+ function Oo(e) {
1549
1581
  const {
1550
1582
  width: t,
1551
1583
  height: n
1552
- } = Yt(e);
1584
+ } = Jt(e);
1553
1585
  return {
1554
1586
  width: t,
1555
1587
  height: n
1556
1588
  };
1557
1589
  }
1558
- function lo(e, t, n) {
1559
- const o = z(t), i = G(t), r = n === "fixed", s = ee(e, !0, r, t);
1590
+ function Ro(e, t, n) {
1591
+ const o = U(t), i = Y(t), r = n === "fixed", s = te(e, !0, r, t);
1560
1592
  let a = {
1561
1593
  scrollLeft: 0,
1562
1594
  scrollTop: 0
1563
1595
  };
1564
- const c = q(0);
1596
+ const l = V(0);
1597
+ function c() {
1598
+ l.x = Te(i);
1599
+ }
1565
1600
  if (o || !o && !r)
1566
- if ((ce(t) !== "body" || he(i)) && (a = Oe(t)), o) {
1567
- const d = ee(t, !0, r, t);
1568
- c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
1569
- } else i && (c.x = qt(i));
1570
- const l = s.left + a.scrollLeft - c.x, f = s.top + a.scrollTop - c.y;
1601
+ if ((le(t) !== "body" || me(i)) && (a = Se(t)), o) {
1602
+ const d = te(t, !0, r, t);
1603
+ l.x = d.x + t.clientLeft, l.y = d.y + t.clientTop;
1604
+ } else i && c();
1605
+ r && !o && i && c();
1606
+ const u = i && !o && !r ? en(i, a) : V(0), p = s.left + a.scrollLeft - l.x - u.x, h = s.top + a.scrollTop - l.y - u.y;
1571
1607
  return {
1572
- x: l,
1573
- y: f,
1608
+ x: p,
1609
+ y: h,
1574
1610
  width: s.width,
1575
1611
  height: s.height
1576
1612
  };
1577
1613
  }
1578
- function De(e) {
1614
+ function Me(e) {
1579
1615
  return H(e).position === "static";
1580
1616
  }
1581
- function Pt(e, t) {
1582
- return !z(e) || H(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
1617
+ function Tt(e, t) {
1618
+ if (!U(e) || H(e).position === "fixed")
1619
+ return null;
1620
+ if (t)
1621
+ return t(e);
1622
+ let n = e.offsetParent;
1623
+ return Y(e) === n && (n = n.ownerDocument.body), n;
1583
1624
  }
1584
- function Zt(e, t) {
1585
- const n = B(e);
1625
+ function nn(e, t) {
1626
+ const n = W(e);
1586
1627
  if (Ee(e))
1587
1628
  return n;
1588
- if (!z(e)) {
1589
- let i = Z(e);
1590
- for (; i && !oe(i); ) {
1591
- if (W(i) && !De(i))
1629
+ if (!U(e)) {
1630
+ let i = K(e);
1631
+ for (; i && !ie(i); ) {
1632
+ if (B(i) && !Me(i))
1592
1633
  return i;
1593
- i = Z(i);
1634
+ i = K(i);
1594
1635
  }
1595
1636
  return n;
1596
1637
  }
1597
- let o = Pt(e, t);
1598
- for (; o && Kr(o) && De(o); )
1599
- o = Pt(o, t);
1600
- return o && oe(o) && De(o) && !Ue(o) ? n : o || Jr(e) || n;
1638
+ let o = Tt(e, t);
1639
+ for (; o && co(o) && Me(o); )
1640
+ o = Tt(o, t);
1641
+ return o && ie(o) && Me(o) && !Ge(o) ? n : o || ho(e) || n;
1601
1642
  }
1602
- const uo = async function(e) {
1603
- const t = this.getOffsetParent || Zt, n = this.getDimensions, o = await n(e.floating);
1643
+ const Eo = async function(e) {
1644
+ const t = this.getOffsetParent || nn, n = this.getDimensions, o = await n(e.floating);
1604
1645
  return {
1605
- reference: lo(e.reference, await t(e.floating), e.strategy),
1646
+ reference: Ro(e.reference, await t(e.floating), e.strategy),
1606
1647
  floating: {
1607
1648
  x: 0,
1608
1649
  y: 0,
@@ -1611,118 +1652,122 @@ const uo = async function(e) {
1611
1652
  }
1612
1653
  };
1613
1654
  };
1614
- function fo(e) {
1655
+ function So(e) {
1615
1656
  return H(e).direction === "rtl";
1616
1657
  }
1617
- const po = {
1618
- convertOffsetParentRelativeRectToViewportRelativeRect: to,
1619
- getDocumentElement: G,
1620
- getClippingRect: ao,
1621
- getOffsetParent: Zt,
1622
- getElementRects: uo,
1623
- getClientRects: no,
1624
- getDimensions: co,
1625
- getScale: re,
1626
- isElement: W,
1627
- isRTL: fo
1658
+ const To = {
1659
+ convertOffsetParentRelativeRectToViewportRelativeRect: yo,
1660
+ getDocumentElement: Y,
1661
+ getClippingRect: Po,
1662
+ getOffsetParent: nn,
1663
+ getElementRects: Eo,
1664
+ getClientRects: wo,
1665
+ getDimensions: Oo,
1666
+ getScale: oe,
1667
+ isElement: B,
1668
+ isRTL: So
1628
1669
  };
1629
- function ho(e, t) {
1670
+ function rn(e, t) {
1671
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1672
+ }
1673
+ function No(e, t) {
1630
1674
  let n = null, o;
1631
- const i = G(e);
1675
+ const i = Y(e);
1632
1676
  function r() {
1633
1677
  var a;
1634
1678
  clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
1635
1679
  }
1636
- function s(a, c) {
1637
- a === void 0 && (a = !1), c === void 0 && (c = 1), r();
1638
- const {
1639
- left: l,
1640
- top: f,
1641
- width: d,
1642
- height: h
1643
- } = e.getBoundingClientRect();
1644
- if (a || t(), !d || !h)
1680
+ function s(a, l) {
1681
+ a === void 0 && (a = !1), l === void 0 && (l = 1), r();
1682
+ const c = e.getBoundingClientRect(), {
1683
+ left: u,
1684
+ top: p,
1685
+ width: h,
1686
+ height: d
1687
+ } = c;
1688
+ if (a || t(), !h || !d)
1645
1689
  return;
1646
- const p = ye(f), g = ye(i.clientWidth - (l + d)), m = ye(i.clientHeight - (f + h)), v = ye(l), w = {
1647
- rootMargin: -p + "px " + -g + "px " + -m + "px " + -v + "px",
1648
- threshold: I(0, j(1, c)) || 1
1690
+ const m = we(p), g = we(i.clientWidth - (u + h)), v = we(i.clientHeight - (p + d)), y = we(u), C = {
1691
+ rootMargin: -m + "px " + -g + "px " + -v + "px " + -y + "px",
1692
+ threshold: I(0, Z(1, l)) || 1
1649
1693
  };
1650
- let A = !0;
1651
- function b(_) {
1652
- const C = _[0].intersectionRatio;
1653
- if (C !== c) {
1654
- if (!A)
1694
+ let b = !0;
1695
+ function A(P) {
1696
+ const _ = P[0].intersectionRatio;
1697
+ if (_ !== l) {
1698
+ if (!b)
1655
1699
  return s();
1656
- C ? s(!1, C) : o = setTimeout(() => {
1700
+ _ ? s(!1, _) : o = setTimeout(() => {
1657
1701
  s(!1, 1e-7);
1658
1702
  }, 1e3);
1659
1703
  }
1660
- A = !1;
1704
+ _ === 1 && !rn(c, e.getBoundingClientRect()) && s(), b = !1;
1661
1705
  }
1662
1706
  try {
1663
- n = new IntersectionObserver(b, {
1664
- ...w,
1707
+ n = new IntersectionObserver(A, {
1708
+ ...C,
1665
1709
  // Handle <iframe>s
1666
1710
  root: i.ownerDocument
1667
1711
  });
1668
1712
  } catch {
1669
- n = new IntersectionObserver(b, w);
1713
+ n = new IntersectionObserver(A, C);
1670
1714
  }
1671
1715
  n.observe(e);
1672
1716
  }
1673
1717
  return s(!0), r;
1674
1718
  }
1675
- function go(e, t, n, o) {
1719
+ function Do(e, t, n, o) {
1676
1720
  o === void 0 && (o = {});
1677
1721
  const {
1678
1722
  ancestorScroll: i = !0,
1679
1723
  ancestorResize: r = !0,
1680
1724
  elementResize: s = typeof ResizeObserver == "function",
1681
1725
  layoutShift: a = typeof IntersectionObserver == "function",
1682
- animationFrame: c = !1
1683
- } = o, l = Ge(e), f = i || r ? [...l ? de(l) : [], ...de(t)] : [];
1684
- f.forEach((y) => {
1726
+ animationFrame: l = !1
1727
+ } = o, c = Ze(e), u = i || r ? [...c ? he(c) : [], ...he(t)] : [];
1728
+ u.forEach((y) => {
1685
1729
  i && y.addEventListener("scroll", n, {
1686
1730
  passive: !0
1687
1731
  }), r && y.addEventListener("resize", n);
1688
1732
  });
1689
- const d = l && a ? ho(l, n) : null;
1690
- let h = -1, p = null;
1691
- s && (p = new ResizeObserver((y) => {
1733
+ const p = c && a ? No(c, n) : null;
1734
+ let h = -1, d = null;
1735
+ s && (d = new ResizeObserver((y) => {
1692
1736
  let [w] = y;
1693
- w && w.target === l && p && (p.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
1694
- var A;
1695
- (A = p) == null || A.observe(t);
1737
+ w && w.target === c && d && (d.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
1738
+ var C;
1739
+ (C = d) == null || C.observe(t);
1696
1740
  })), n();
1697
- }), l && !c && p.observe(l), p.observe(t));
1698
- let g, m = c ? ee(e) : null;
1699
- c && v();
1741
+ }), c && !l && d.observe(c), d.observe(t));
1742
+ let m, g = l ? te(e) : null;
1743
+ l && v();
1700
1744
  function v() {
1701
- const y = ee(e);
1702
- m && (y.x !== m.x || y.y !== m.y || y.width !== m.width || y.height !== m.height) && n(), m = y, g = requestAnimationFrame(v);
1745
+ const y = te(e);
1746
+ g && !rn(g, y) && n(), g = y, m = requestAnimationFrame(v);
1703
1747
  }
1704
1748
  return n(), () => {
1705
1749
  var y;
1706
- f.forEach((w) => {
1750
+ u.forEach((w) => {
1707
1751
  i && w.removeEventListener("scroll", n), r && w.removeEventListener("resize", n);
1708
- }), d == null || d(), (y = p) == null || y.disconnect(), p = null, c && cancelAnimationFrame(g);
1752
+ }), p == null || p(), (y = d) == null || y.disconnect(), d = null, l && cancelAnimationFrame(m);
1709
1753
  };
1710
1754
  }
1711
- const mo = Gr, vo = qr, yo = Vr, wo = Zr, xo = Ur, Ct = zr, bo = Xr, _o = (e, t, n) => {
1755
+ const Lo = no, Mo = ro, $o = Qr, ko = io, Fo = eo, Nt = Jr, Io = oo, Wo = (e, t, n) => {
1712
1756
  const o = /* @__PURE__ */ new Map(), i = {
1713
- platform: po,
1757
+ platform: To,
1714
1758
  ...n
1715
1759
  }, r = {
1716
1760
  ...i.platform,
1717
1761
  _c: o
1718
1762
  };
1719
- return jr(e, t, {
1763
+ return Kr(e, t, {
1720
1764
  ...i,
1721
1765
  platform: r
1722
1766
  });
1723
1767
  };
1724
- var xe = typeof document < "u" ? Nn : Dn;
1725
- function Ce(e, t) {
1768
+ var Bo = typeof document < "u", Ho = function() {
1769
+ }, be = Bo ? In : Ho;
1770
+ function Oe(e, t) {
1726
1771
  if (e === t)
1727
1772
  return !0;
1728
1773
  if (typeof e != typeof t)
@@ -1734,7 +1779,7 @@ function Ce(e, t) {
1734
1779
  if (Array.isArray(e)) {
1735
1780
  if (n = e.length, n !== t.length) return !1;
1736
1781
  for (o = n; o-- !== 0; )
1737
- if (!Ce(e[o], t[o]))
1782
+ if (!Oe(e[o], t[o]))
1738
1783
  return !1;
1739
1784
  return !0;
1740
1785
  }
@@ -1745,27 +1790,27 @@ function Ce(e, t) {
1745
1790
  return !1;
1746
1791
  for (o = n; o-- !== 0; ) {
1747
1792
  const r = i[o];
1748
- if (!(r === "_owner" && e.$$typeof) && !Ce(e[r], t[r]))
1793
+ if (!(r === "_owner" && e.$$typeof) && !Oe(e[r], t[r]))
1749
1794
  return !1;
1750
1795
  }
1751
1796
  return !0;
1752
1797
  }
1753
1798
  return e !== e && t !== t;
1754
1799
  }
1755
- function Kt(e) {
1800
+ function on(e) {
1756
1801
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1757
1802
  }
1758
- function Et(e, t) {
1759
- const n = Kt(e);
1803
+ function Dt(e, t) {
1804
+ const n = on(e);
1760
1805
  return Math.round(t * n) / n;
1761
1806
  }
1762
- function Ot(e) {
1763
- const t = u.useRef(e);
1764
- return xe(() => {
1807
+ function $e(e) {
1808
+ const t = f.useRef(e);
1809
+ return be(() => {
1765
1810
  t.current = e;
1766
1811
  }), t;
1767
1812
  }
1768
- function Ao(e) {
1813
+ function jo(e) {
1769
1814
  e === void 0 && (e = {});
1770
1815
  const {
1771
1816
  placement: t = "bottom",
@@ -1777,93 +1822,97 @@ function Ao(e) {
1777
1822
  floating: s
1778
1823
  } = {},
1779
1824
  transform: a = !0,
1780
- whileElementsMounted: c,
1781
- open: l
1782
- } = e, [f, d] = u.useState({
1825
+ whileElementsMounted: l,
1826
+ open: c
1827
+ } = e, [u, p] = f.useState({
1783
1828
  x: 0,
1784
1829
  y: 0,
1785
1830
  strategy: n,
1786
1831
  placement: t,
1787
1832
  middlewareData: {},
1788
1833
  isPositioned: !1
1789
- }), [h, p] = u.useState(o);
1790
- Ce(h, o) || p(o);
1791
- const [g, m] = u.useState(null), [v, y] = u.useState(null), w = u.useCallback((E) => {
1792
- E !== C.current && (C.current = E, m(E));
1793
- }, []), A = u.useCallback((E) => {
1794
- E !== P.current && (P.current = E, y(E));
1795
- }, []), b = r || g, _ = s || v, C = u.useRef(null), P = u.useRef(null), O = u.useRef(f), D = c != null, R = Ot(c), $ = Ot(i), M = u.useCallback(() => {
1796
- if (!C.current || !P.current)
1834
+ }), [h, d] = f.useState(o);
1835
+ Oe(h, o) || d(o);
1836
+ const [m, g] = f.useState(null), [v, y] = f.useState(null), w = f.useCallback((O) => {
1837
+ O !== P.current && (P.current = O, g(O));
1838
+ }, []), C = f.useCallback((O) => {
1839
+ O !== _.current && (_.current = O, y(O));
1840
+ }, []), b = r || m, A = s || v, P = f.useRef(null), _ = f.useRef(null), R = f.useRef(u), L = l != null, E = $e(l), $ = $e(i), k = $e(c), T = f.useCallback(() => {
1841
+ if (!P.current || !_.current)
1797
1842
  return;
1798
- const E = {
1843
+ const O = {
1799
1844
  placement: t,
1800
1845
  strategy: n,
1801
1846
  middleware: h
1802
1847
  };
1803
- $.current && (E.platform = $.current), _o(C.current, P.current, E).then((S) => {
1804
- const N = {
1805
- ...S,
1806
- isPositioned: !0
1848
+ $.current && (O.platform = $.current), Wo(P.current, _.current, O).then((M) => {
1849
+ const j = {
1850
+ ...M,
1851
+ // The floating element's position may be recomputed while it's closed
1852
+ // but still mounted (such as when transitioning out). To ensure
1853
+ // `isPositioned` will be `false` initially on the next open, avoid
1854
+ // setting it to `true` when `open === false` (must be specified).
1855
+ isPositioned: k.current !== !1
1807
1856
  };
1808
- k.current && !Ce(O.current, N) && (O.current = N, St.flushSync(() => {
1809
- d(N);
1857
+ S.current && !Oe(R.current, j) && (R.current = j, $t.flushSync(() => {
1858
+ p(j);
1810
1859
  }));
1811
1860
  });
1812
- }, [h, t, n, $]);
1813
- xe(() => {
1814
- l === !1 && O.current.isPositioned && (O.current.isPositioned = !1, d((E) => ({
1815
- ...E,
1861
+ }, [h, t, n, $, k]);
1862
+ be(() => {
1863
+ c === !1 && R.current.isPositioned && (R.current.isPositioned = !1, p((O) => ({
1864
+ ...O,
1816
1865
  isPositioned: !1
1817
1866
  })));
1818
- }, [l]);
1819
- const k = u.useRef(!1);
1820
- xe(() => (k.current = !0, () => {
1821
- k.current = !1;
1822
- }), []), xe(() => {
1823
- if (b && (C.current = b), _ && (P.current = _), b && _) {
1824
- if (R.current)
1825
- return R.current(b, _, M);
1826
- M();
1867
+ }, [c]);
1868
+ const S = f.useRef(!1);
1869
+ be(() => (S.current = !0, () => {
1870
+ S.current = !1;
1871
+ }), []), be(() => {
1872
+ if (b && (P.current = b), A && (_.current = A), b && A) {
1873
+ if (E.current)
1874
+ return E.current(b, A, T);
1875
+ T();
1827
1876
  }
1828
- }, [b, _, M, R, D]);
1829
- const T = u.useMemo(() => ({
1830
- reference: C,
1831
- floating: P,
1877
+ }, [b, A, T, E, L]);
1878
+ const F = f.useMemo(() => ({
1879
+ reference: P,
1880
+ floating: _,
1832
1881
  setReference: w,
1833
- setFloating: A
1834
- }), [w, A]), L = u.useMemo(() => ({
1882
+ setFloating: C
1883
+ }), [w, C]), N = f.useMemo(() => ({
1835
1884
  reference: b,
1836
- floating: _
1837
- }), [b, _]), F = u.useMemo(() => {
1838
- const E = {
1885
+ floating: A
1886
+ }), [b, A]), D = f.useMemo(() => {
1887
+ const O = {
1839
1888
  position: n,
1840
1889
  left: 0,
1841
1890
  top: 0
1842
1891
  };
1843
- if (!L.floating)
1844
- return E;
1845
- const S = Et(L.floating, f.x), N = Et(L.floating, f.y);
1892
+ if (!N.floating)
1893
+ return O;
1894
+ const M = Dt(N.floating, u.x), j = Dt(N.floating, u.y);
1846
1895
  return a ? {
1847
- ...E,
1848
- transform: "translate(" + S + "px, " + N + "px)",
1849
- ...Kt(L.floating) >= 1.5 && {
1896
+ ...O,
1897
+ transform: "translate(" + M + "px, " + j + "px)",
1898
+ ...on(N.floating) >= 1.5 && {
1850
1899
  willChange: "transform"
1851
1900
  }
1852
1901
  } : {
1853
1902
  position: n,
1854
- left: S,
1855
- top: N
1903
+ left: M,
1904
+ top: j
1856
1905
  };
1857
- }, [n, a, L.floating, f.x, f.y]);
1858
- return u.useMemo(() => ({
1859
- ...f,
1860
- update: M,
1861
- refs: T,
1862
- elements: L,
1863
- floatingStyles: F
1864
- }), [f, M, T, L, F]);
1865
- }
1866
- const Po = (e) => {
1906
+ }, [n, a, N.floating, u.x, u.y]);
1907
+ return f.useMemo(() => ({
1908
+ ...u,
1909
+ update: T,
1910
+ refs: F,
1911
+ elements: N,
1912
+ floatingStyles: D
1913
+ }), [u, T, F, N, D]);
1914
+ }
1915
+ const zo = (e) => {
1867
1916
  function t(n) {
1868
1917
  return {}.hasOwnProperty.call(n, "current");
1869
1918
  }
@@ -1875,41 +1924,41 @@ const Po = (e) => {
1875
1924
  element: o,
1876
1925
  padding: i
1877
1926
  } = typeof e == "function" ? e(n) : e;
1878
- return o && t(o) ? o.current != null ? Ct({
1927
+ return o && t(o) ? o.current != null ? Nt({
1879
1928
  element: o.current,
1880
1929
  padding: i
1881
- }).fn(n) : {} : o ? Ct({
1930
+ }).fn(n) : {} : o ? Nt({
1882
1931
  element: o,
1883
1932
  padding: i
1884
1933
  }).fn(n) : {};
1885
1934
  }
1886
1935
  };
1887
- }, Co = (e, t) => ({
1888
- ...mo(e),
1936
+ }, Vo = (e, t) => ({
1937
+ ...Lo(e),
1889
1938
  options: [e, t]
1890
- }), Eo = (e, t) => ({
1891
- ...vo(e),
1939
+ }), Uo = (e, t) => ({
1940
+ ...Mo(e),
1892
1941
  options: [e, t]
1893
- }), Oo = (e, t) => ({
1894
- ...bo(e),
1942
+ }), Yo = (e, t) => ({
1943
+ ...Io(e),
1895
1944
  options: [e, t]
1896
- }), Ro = (e, t) => ({
1897
- ...yo(e),
1945
+ }), qo = (e, t) => ({
1946
+ ...$o(e),
1898
1947
  options: [e, t]
1899
- }), To = (e, t) => ({
1900
- ...wo(e),
1948
+ }), Go = (e, t) => ({
1949
+ ...ko(e),
1901
1950
  options: [e, t]
1902
- }), So = (e, t) => ({
1903
- ...xo(e),
1951
+ }), Xo = (e, t) => ({
1952
+ ...Fo(e),
1904
1953
  options: [e, t]
1905
- }), No = (e, t) => ({
1906
- ...Po(e),
1954
+ }), Zo = (e, t) => ({
1955
+ ...zo(e),
1907
1956
  options: [e, t]
1908
1957
  });
1909
- var Do = "Arrow", Jt = u.forwardRef((e, t) => {
1958
+ var Ko = "Arrow", sn = f.forwardRef((e, t) => {
1910
1959
  const { children: n, width: o = 10, height: i = 5, ...r } = e;
1911
1960
  return /* @__PURE__ */ x(
1912
- K.svg,
1961
+ J.svg,
1913
1962
  {
1914
1963
  ...r,
1915
1964
  ref: t,
@@ -1921,11 +1970,11 @@ var Do = "Arrow", Jt = u.forwardRef((e, t) => {
1921
1970
  }
1922
1971
  );
1923
1972
  });
1924
- Jt.displayName = Do;
1925
- var Lo = Jt;
1926
- function $o(e) {
1927
- const [t, n] = u.useState(void 0);
1928
- return Q(() => {
1973
+ sn.displayName = Ko;
1974
+ var Jo = sn;
1975
+ function Qo(e) {
1976
+ const [t, n] = f.useState(void 0);
1977
+ return ee(() => {
1929
1978
  if (e) {
1930
1979
  n({ width: e.offsetWidth, height: e.offsetHeight });
1931
1980
  const o = new ResizeObserver((i) => {
@@ -1934,8 +1983,8 @@ function $o(e) {
1934
1983
  const r = i[0];
1935
1984
  let s, a;
1936
1985
  if ("borderBoxSize" in r) {
1937
- const c = r.borderBoxSize, l = Array.isArray(c) ? c[0] : c;
1938
- s = l.inlineSize, a = l.blockSize;
1986
+ const l = r.borderBoxSize, c = Array.isArray(l) ? l[0] : l;
1987
+ s = c.inlineSize, a = c.blockSize;
1939
1988
  } else
1940
1989
  s = e.offsetWidth, a = e.offsetHeight;
1941
1990
  n({ width: s, height: a });
@@ -1945,23 +1994,23 @@ function $o(e) {
1945
1994
  n(void 0);
1946
1995
  }, [e]), t;
1947
1996
  }
1948
- var qe = "Popper", [Qt, en] = Ft(qe), [Mo, tn] = Qt(qe), nn = (e) => {
1949
- const { __scopePopper: t, children: n } = e, [o, i] = u.useState(null);
1950
- return /* @__PURE__ */ x(Mo, { scope: t, anchor: o, onAnchorChange: i, children: n });
1997
+ var Ke = "Popper", [an, cn] = jt(Ke), [ei, ln] = an(Ke), un = (e) => {
1998
+ const { __scopePopper: t, children: n } = e, [o, i] = f.useState(null);
1999
+ return /* @__PURE__ */ x(ei, { scope: t, anchor: o, onAnchorChange: i, children: n });
1951
2000
  };
1952
- nn.displayName = qe;
1953
- var rn = "PopperAnchor", on = u.forwardRef(
2001
+ un.displayName = Ke;
2002
+ var fn = "PopperAnchor", pn = f.forwardRef(
1954
2003
  (e, t) => {
1955
- const { __scopePopper: n, virtualRef: o, ...i } = e, r = tn(rn, n), s = u.useRef(null), a = te(t, s);
1956
- return u.useEffect(() => {
2004
+ const { __scopePopper: n, virtualRef: o, ...i } = e, r = ln(fn, n), s = f.useRef(null), a = ne(t, s);
2005
+ return f.useEffect(() => {
1957
2006
  r.onAnchorChange((o == null ? void 0 : o.current) || s.current);
1958
- }), o ? null : /* @__PURE__ */ x(K.div, { ...i, ref: a });
2007
+ }), o ? null : /* @__PURE__ */ x(J.div, { ...i, ref: a });
1959
2008
  }
1960
2009
  );
1961
- on.displayName = rn;
1962
- var Xe = "PopperContent", [ko, Fo] = Qt(Xe), sn = u.forwardRef(
2010
+ pn.displayName = fn;
2011
+ var Je = "PopperContent", [ti, ni] = an(Je), dn = f.forwardRef(
1963
2012
  (e, t) => {
1964
- var Qe, et, tt, nt, rt, ot;
2013
+ var nt, rt, ot, it, st, at;
1965
2014
  const {
1966
2015
  __scopePopper: n,
1967
2016
  side: o = "bottom",
@@ -1969,101 +2018,101 @@ var Xe = "PopperContent", [ko, Fo] = Qt(Xe), sn = u.forwardRef(
1969
2018
  align: r = "center",
1970
2019
  alignOffset: s = 0,
1971
2020
  arrowPadding: a = 0,
1972
- avoidCollisions: c = !0,
1973
- collisionBoundary: l = [],
1974
- collisionPadding: f = 0,
1975
- sticky: d = "partial",
2021
+ avoidCollisions: l = !0,
2022
+ collisionBoundary: c = [],
2023
+ collisionPadding: u = 0,
2024
+ sticky: p = "partial",
1976
2025
  hideWhenDetached: h = !1,
1977
- updatePositionStrategy: p = "optimized",
1978
- onPlaced: g,
1979
- ...m
1980
- } = e, v = tn(Xe, n), [y, w] = u.useState(null), A = te(t, (le) => w(le)), [b, _] = u.useState(null), C = $o(b), P = (C == null ? void 0 : C.width) ?? 0, O = (C == null ? void 0 : C.height) ?? 0, D = o + (r !== "center" ? "-" + r : ""), R = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, $ = Array.isArray(l) ? l : [l], M = $.length > 0, k = {
1981
- padding: R,
1982
- boundary: $.filter(Bo),
2026
+ updatePositionStrategy: d = "optimized",
2027
+ onPlaced: m,
2028
+ ...g
2029
+ } = e, v = ln(Je, n), [y, w] = f.useState(null), C = ne(t, (ue) => w(ue)), [b, A] = f.useState(null), P = Qo(b), _ = (P == null ? void 0 : P.width) ?? 0, R = (P == null ? void 0 : P.height) ?? 0, L = o + (r !== "center" ? "-" + r : ""), E = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, $ = Array.isArray(c) ? c : [c], k = $.length > 0, T = {
2030
+ padding: E,
2031
+ boundary: $.filter(oi),
1983
2032
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
1984
- altBoundary: M
1985
- }, { refs: T, floatingStyles: L, placement: F, isPositioned: E, middlewareData: S } = Ao({
2033
+ altBoundary: k
2034
+ }, { refs: S, floatingStyles: F, placement: N, isPositioned: D, middlewareData: O } = jo({
1986
2035
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
1987
2036
  strategy: "fixed",
1988
- placement: D,
1989
- whileElementsMounted: (...le) => go(...le, {
1990
- animationFrame: p === "always"
2037
+ placement: L,
2038
+ whileElementsMounted: (...ue) => Do(...ue, {
2039
+ animationFrame: d === "always"
1991
2040
  }),
1992
2041
  elements: {
1993
2042
  reference: v.anchor
1994
2043
  },
1995
2044
  middleware: [
1996
- Co({ mainAxis: i + O, alignmentAxis: s }),
1997
- c && Eo({
2045
+ Vo({ mainAxis: i + R, alignmentAxis: s }),
2046
+ l && Uo({
1998
2047
  mainAxis: !0,
1999
2048
  crossAxis: !1,
2000
- limiter: d === "partial" ? Oo() : void 0,
2001
- ...k
2049
+ limiter: p === "partial" ? Yo() : void 0,
2050
+ ...T
2002
2051
  }),
2003
- c && Ro({ ...k }),
2004
- To({
2005
- ...k,
2006
- apply: ({ elements: le, rects: it, availableWidth: En, availableHeight: On }) => {
2007
- const { width: Rn, height: Tn } = it.reference, ve = le.floating.style;
2008
- ve.setProperty("--radix-popper-available-width", `${En}px`), ve.setProperty("--radix-popper-available-height", `${On}px`), ve.setProperty("--radix-popper-anchor-width", `${Rn}px`), ve.setProperty("--radix-popper-anchor-height", `${Tn}px`);
2052
+ l && qo({ ...T }),
2053
+ Go({
2054
+ ...T,
2055
+ apply: ({ elements: ue, rects: ct, availableWidth: Ln, availableHeight: Mn }) => {
2056
+ const { width: $n, height: kn } = ct.reference, ye = ue.floating.style;
2057
+ ye.setProperty("--radix-popper-available-width", `${Ln}px`), ye.setProperty("--radix-popper-available-height", `${Mn}px`), ye.setProperty("--radix-popper-anchor-width", `${$n}px`), ye.setProperty("--radix-popper-anchor-height", `${kn}px`);
2009
2058
  }
2010
2059
  }),
2011
- b && No({ element: b, padding: a }),
2012
- Wo({ arrowWidth: P, arrowHeight: O }),
2013
- h && So({ strategy: "referenceHidden", ...k })
2060
+ b && Zo({ element: b, padding: a }),
2061
+ ii({ arrowWidth: _, arrowHeight: R }),
2062
+ h && Xo({ strategy: "referenceHidden", ...T })
2014
2063
  ]
2015
- }), [N, Ne] = ln(F), me = se(g);
2016
- Q(() => {
2017
- E && (me == null || me());
2018
- }, [E, me]);
2019
- const bn = (Qe = S.arrow) == null ? void 0 : Qe.x, _n = (et = S.arrow) == null ? void 0 : et.y, An = ((tt = S.arrow) == null ? void 0 : tt.centerOffset) !== 0, [Pn, Cn] = u.useState();
2020
- return Q(() => {
2021
- y && Cn(window.getComputedStyle(y).zIndex);
2064
+ }), [M, j] = gn(N), ve = ae(m);
2065
+ ee(() => {
2066
+ D && (ve == null || ve());
2067
+ }, [D, ve]);
2068
+ const En = (nt = O.arrow) == null ? void 0 : nt.x, Sn = (rt = O.arrow) == null ? void 0 : rt.y, Tn = ((ot = O.arrow) == null ? void 0 : ot.centerOffset) !== 0, [Nn, Dn] = f.useState();
2069
+ return ee(() => {
2070
+ y && Dn(window.getComputedStyle(y).zIndex);
2022
2071
  }, [y]), /* @__PURE__ */ x(
2023
2072
  "div",
2024
2073
  {
2025
- ref: T.setFloating,
2074
+ ref: S.setFloating,
2026
2075
  "data-radix-popper-content-wrapper": "",
2027
2076
  style: {
2028
- ...L,
2029
- transform: E ? L.transform : "translate(0, -200%)",
2077
+ ...F,
2078
+ transform: D ? F.transform : "translate(0, -200%)",
2030
2079
  // keep off the page when measuring
2031
2080
  minWidth: "max-content",
2032
- zIndex: Pn,
2081
+ zIndex: Nn,
2033
2082
  "--radix-popper-transform-origin": [
2034
- (nt = S.transformOrigin) == null ? void 0 : nt.x,
2035
- (rt = S.transformOrigin) == null ? void 0 : rt.y
2083
+ (it = O.transformOrigin) == null ? void 0 : it.x,
2084
+ (st = O.transformOrigin) == null ? void 0 : st.y
2036
2085
  ].join(" "),
2037
2086
  // hide the content if using the hide middleware and should be hidden
2038
2087
  // set visibility to hidden and disable pointer events so the UI behaves
2039
2088
  // as if the PopperContent isn't there at all
2040
- ...((ot = S.hide) == null ? void 0 : ot.referenceHidden) && {
2089
+ ...((at = O.hide) == null ? void 0 : at.referenceHidden) && {
2041
2090
  visibility: "hidden",
2042
2091
  pointerEvents: "none"
2043
2092
  }
2044
2093
  },
2045
2094
  dir: e.dir,
2046
2095
  children: /* @__PURE__ */ x(
2047
- ko,
2096
+ ti,
2048
2097
  {
2049
2098
  scope: n,
2050
- placedSide: N,
2051
- onArrowChange: _,
2052
- arrowX: bn,
2053
- arrowY: _n,
2054
- shouldHideArrow: An,
2099
+ placedSide: M,
2100
+ onArrowChange: A,
2101
+ arrowX: En,
2102
+ arrowY: Sn,
2103
+ shouldHideArrow: Tn,
2055
2104
  children: /* @__PURE__ */ x(
2056
- K.div,
2105
+ J.div,
2057
2106
  {
2058
- "data-side": N,
2059
- "data-align": Ne,
2060
- ...m,
2061
- ref: A,
2107
+ "data-side": M,
2108
+ "data-align": j,
2109
+ ...g,
2110
+ ref: C,
2062
2111
  style: {
2063
- ...m.style,
2112
+ ...g.style,
2064
2113
  // if the PopperContent hasn't been placed yet (not all measurements done)
2065
2114
  // we prevent animations so that users's animation don't kick in too early referring wrong sides
2066
- animation: E ? void 0 : "none"
2115
+ animation: D ? void 0 : "none"
2067
2116
  }
2068
2117
  }
2069
2118
  )
@@ -2073,14 +2122,14 @@ var Xe = "PopperContent", [ko, Fo] = Qt(Xe), sn = u.forwardRef(
2073
2122
  );
2074
2123
  }
2075
2124
  );
2076
- sn.displayName = Xe;
2077
- var an = "PopperArrow", Io = {
2125
+ dn.displayName = Je;
2126
+ var hn = "PopperArrow", ri = {
2078
2127
  top: "bottom",
2079
2128
  right: "left",
2080
2129
  bottom: "top",
2081
2130
  left: "right"
2082
- }, cn = u.forwardRef(function(t, n) {
2083
- const { __scopePopper: o, ...i } = t, r = Fo(an, o), s = Io[r.placedSide];
2131
+ }, mn = f.forwardRef(function(t, n) {
2132
+ const { __scopePopper: o, ...i } = t, r = ni(hn, o), s = ri[r.placedSide];
2084
2133
  return (
2085
2134
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
2086
2135
  // doesn't report size as we'd expect on SVG elements.
@@ -2109,7 +2158,7 @@ var an = "PopperArrow", Io = {
2109
2158
  visibility: r.shouldHideArrow ? "hidden" : void 0
2110
2159
  },
2111
2160
  children: /* @__PURE__ */ x(
2112
- Lo,
2161
+ Jo,
2113
2162
  {
2114
2163
  ...i,
2115
2164
  ref: n,
@@ -2124,42 +2173,42 @@ var an = "PopperArrow", Io = {
2124
2173
  )
2125
2174
  );
2126
2175
  });
2127
- cn.displayName = an;
2128
- function Bo(e) {
2176
+ mn.displayName = hn;
2177
+ function oi(e) {
2129
2178
  return e !== null;
2130
2179
  }
2131
- var Wo = (e) => ({
2180
+ var ii = (e) => ({
2132
2181
  name: "transformOrigin",
2133
2182
  options: e,
2134
2183
  fn(t) {
2135
2184
  var v, y, w;
2136
- const { placement: n, rects: o, middlewareData: i } = t, s = ((v = i.arrow) == null ? void 0 : v.centerOffset) !== 0, a = s ? 0 : e.arrowWidth, c = s ? 0 : e.arrowHeight, [l, f] = ln(n), d = { start: "0%", center: "50%", end: "100%" }[f], h = (((y = i.arrow) == null ? void 0 : y.x) ?? 0) + a / 2, p = (((w = i.arrow) == null ? void 0 : w.y) ?? 0) + c / 2;
2137
- let g = "", m = "";
2138
- return l === "bottom" ? (g = s ? d : `${h}px`, m = `${-c}px`) : l === "top" ? (g = s ? d : `${h}px`, m = `${o.floating.height + c}px`) : l === "right" ? (g = `${-c}px`, m = s ? d : `${p}px`) : l === "left" && (g = `${o.floating.width + c}px`, m = s ? d : `${p}px`), { data: { x: g, y: m } };
2185
+ const { placement: n, rects: o, middlewareData: i } = t, s = ((v = i.arrow) == null ? void 0 : v.centerOffset) !== 0, a = s ? 0 : e.arrowWidth, l = s ? 0 : e.arrowHeight, [c, u] = gn(n), p = { start: "0%", center: "50%", end: "100%" }[u], h = (((y = i.arrow) == null ? void 0 : y.x) ?? 0) + a / 2, d = (((w = i.arrow) == null ? void 0 : w.y) ?? 0) + l / 2;
2186
+ let m = "", g = "";
2187
+ return c === "bottom" ? (m = s ? p : `${h}px`, g = `${-l}px`) : c === "top" ? (m = s ? p : `${h}px`, g = `${o.floating.height + l}px`) : c === "right" ? (m = `${-l}px`, g = s ? p : `${d}px`) : c === "left" && (m = `${o.floating.width + l}px`, g = s ? p : `${d}px`), { data: { x: m, y: g } };
2139
2188
  }
2140
2189
  });
2141
- function ln(e) {
2190
+ function gn(e) {
2142
2191
  const [t, n = "center"] = e.split("-");
2143
2192
  return [t, n];
2144
2193
  }
2145
- var Ho = nn, jo = on, zo = sn, Vo = cn, Uo = "Portal", un = u.forwardRef((e, t) => {
2194
+ var si = un, ai = pn, ci = dn, li = mn, ui = "Portal", vn = f.forwardRef((e, t) => {
2146
2195
  var a;
2147
- const { container: n, ...o } = e, [i, r] = u.useState(!1);
2148
- Q(() => r(!0), []);
2196
+ const { container: n, ...o } = e, [i, r] = f.useState(!1);
2197
+ ee(() => r(!0), []);
2149
2198
  const s = n || i && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
2150
- return s ? Mn.createPortal(/* @__PURE__ */ x(K.div, { ...o, ref: t }), s) : null;
2199
+ return s ? Hn.createPortal(/* @__PURE__ */ x(J.div, { ...o, ref: t }), s) : null;
2151
2200
  });
2152
- un.displayName = Uo;
2153
- function Yo(e, t) {
2154
- return u.useReducer((n, o) => t[n][o] ?? n, e);
2201
+ vn.displayName = ui;
2202
+ function fi(e, t) {
2203
+ return f.useReducer((n, o) => t[n][o] ?? n, e);
2155
2204
  }
2156
- var Ze = (e) => {
2157
- const { present: t, children: n } = e, o = Go(t), i = typeof n == "function" ? n({ present: o.isPresent }) : u.Children.only(n), r = te(o.ref, qo(i));
2158
- return typeof n == "function" || o.isPresent ? u.cloneElement(i, { ref: r }) : null;
2205
+ var Qe = (e) => {
2206
+ const { present: t, children: n } = e, o = pi(t), i = typeof n == "function" ? n({ present: o.isPresent }) : f.Children.only(n), r = ne(o.ref, di(i));
2207
+ return typeof n == "function" || o.isPresent ? f.cloneElement(i, { ref: r }) : null;
2159
2208
  };
2160
- Ze.displayName = "Presence";
2161
- function Go(e) {
2162
- const [t, n] = u.useState(), o = u.useRef({}), i = u.useRef(e), r = u.useRef("none"), s = e ? "mounted" : "unmounted", [a, c] = Yo(s, {
2209
+ Qe.displayName = "Presence";
2210
+ function pi(e) {
2211
+ const [t, n] = f.useState(), o = f.useRef({}), i = f.useRef(e), r = f.useRef("none"), s = e ? "mounted" : "unmounted", [a, l] = fi(s, {
2163
2212
  mounted: {
2164
2213
  UNMOUNT: "unmounted",
2165
2214
  ANIMATION_OUT: "unmountSuspended"
@@ -2172,79 +2221,79 @@ function Go(e) {
2172
2221
  MOUNT: "mounted"
2173
2222
  }
2174
2223
  });
2175
- return u.useEffect(() => {
2176
- const l = we(o.current);
2177
- r.current = a === "mounted" ? l : "none";
2178
- }, [a]), Q(() => {
2179
- const l = o.current, f = i.current;
2180
- if (f !== e) {
2181
- const h = r.current, p = we(l);
2182
- e ? c("MOUNT") : p === "none" || (l == null ? void 0 : l.display) === "none" ? c("UNMOUNT") : c(f && h !== p ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
2224
+ return f.useEffect(() => {
2225
+ const c = xe(o.current);
2226
+ r.current = a === "mounted" ? c : "none";
2227
+ }, [a]), ee(() => {
2228
+ const c = o.current, u = i.current;
2229
+ if (u !== e) {
2230
+ const h = r.current, d = xe(c);
2231
+ e ? l("MOUNT") : d === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(u && h !== d ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
2183
2232
  }
2184
- }, [e, c]), Q(() => {
2233
+ }, [e, l]), ee(() => {
2185
2234
  if (t) {
2186
- let l;
2187
- const f = t.ownerDocument.defaultView ?? window, d = (p) => {
2188
- const m = we(o.current).includes(p.animationName);
2189
- if (p.target === t && m && (c("ANIMATION_END"), !i.current)) {
2235
+ let c;
2236
+ const u = t.ownerDocument.defaultView ?? window, p = (d) => {
2237
+ const g = xe(o.current).includes(d.animationName);
2238
+ if (d.target === t && g && (l("ANIMATION_END"), !i.current)) {
2190
2239
  const v = t.style.animationFillMode;
2191
- t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
2240
+ t.style.animationFillMode = "forwards", c = u.setTimeout(() => {
2192
2241
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
2193
2242
  });
2194
2243
  }
2195
- }, h = (p) => {
2196
- p.target === t && (r.current = we(o.current));
2244
+ }, h = (d) => {
2245
+ d.target === t && (r.current = xe(o.current));
2197
2246
  };
2198
- return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
2199
- f.clearTimeout(l), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
2247
+ return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
2248
+ u.clearTimeout(c), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
2200
2249
  };
2201
2250
  } else
2202
- c("ANIMATION_END");
2203
- }, [t, c]), {
2251
+ l("ANIMATION_END");
2252
+ }, [t, l]), {
2204
2253
  isPresent: ["mounted", "unmountSuspended"].includes(a),
2205
- ref: u.useCallback((l) => {
2206
- l && (o.current = getComputedStyle(l)), n(l);
2254
+ ref: f.useCallback((c) => {
2255
+ c && (o.current = getComputedStyle(c)), n(c);
2207
2256
  }, [])
2208
2257
  };
2209
2258
  }
2210
- function we(e) {
2259
+ function xe(e) {
2211
2260
  return (e == null ? void 0 : e.animationName) || "none";
2212
2261
  }
2213
- function qo(e) {
2262
+ function di(e) {
2214
2263
  var o, i;
2215
2264
  let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
2216
2265
  return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
2217
2266
  }
2218
- function Xo({
2267
+ function hi({
2219
2268
  prop: e,
2220
2269
  defaultProp: t,
2221
2270
  onChange: n = () => {
2222
2271
  }
2223
2272
  }) {
2224
- const [o, i] = Zo({ defaultProp: t, onChange: n }), r = e !== void 0, s = r ? e : o, a = se(n), c = u.useCallback(
2225
- (l) => {
2273
+ const [o, i] = mi({ defaultProp: t, onChange: n }), r = e !== void 0, s = r ? e : o, a = ae(n), l = f.useCallback(
2274
+ (c) => {
2226
2275
  if (r) {
2227
- const d = typeof l == "function" ? l(e) : l;
2228
- d !== e && a(d);
2276
+ const p = typeof c == "function" ? c(e) : c;
2277
+ p !== e && a(p);
2229
2278
  } else
2230
- i(l);
2279
+ i(c);
2231
2280
  },
2232
2281
  [r, e, i, a]
2233
2282
  );
2234
- return [s, c];
2283
+ return [s, l];
2235
2284
  }
2236
- function Zo({
2285
+ function mi({
2237
2286
  defaultProp: e,
2238
2287
  onChange: t
2239
2288
  }) {
2240
- const n = u.useState(e), [o] = n, i = u.useRef(o), r = se(t);
2241
- return u.useEffect(() => {
2289
+ const n = f.useState(e), [o] = n, i = f.useRef(o), r = ae(t);
2290
+ return f.useEffect(() => {
2242
2291
  i.current !== o && (r(o), i.current = o);
2243
2292
  }, [o, i, r]), n;
2244
2293
  }
2245
- var Ko = "VisuallyHidden", fn = u.forwardRef(
2294
+ var gi = "VisuallyHidden", yn = f.forwardRef(
2246
2295
  (e, t) => /* @__PURE__ */ x(
2247
- K.span,
2296
+ J.span,
2248
2297
  {
2249
2298
  ...e,
2250
2299
  ref: t,
@@ -2265,46 +2314,46 @@ var Ko = "VisuallyHidden", fn = u.forwardRef(
2265
2314
  }
2266
2315
  )
2267
2316
  );
2268
- fn.displayName = Ko;
2269
- var Jo = fn, [Re, $i] = Ft("Tooltip", [
2270
- en
2271
- ]), Te = en(), pn = "TooltipProvider", Qo = 700, We = "tooltip.open", [ei, Ke] = Re(pn), dn = (e) => {
2317
+ yn.displayName = gi;
2318
+ var vi = yn, [Ne] = jt("Tooltip", [
2319
+ cn
2320
+ ]), De = cn(), wn = "TooltipProvider", yi = 700, ze = "tooltip.open", [wi, et] = Ne(wn), xn = (e) => {
2272
2321
  const {
2273
2322
  __scopeTooltip: t,
2274
- delayDuration: n = Qo,
2323
+ delayDuration: n = yi,
2275
2324
  skipDelayDuration: o = 300,
2276
2325
  disableHoverableContent: i = !1,
2277
2326
  children: r
2278
- } = e, [s, a] = u.useState(!0), c = u.useRef(!1), l = u.useRef(0);
2279
- return u.useEffect(() => {
2280
- const f = l.current;
2281
- return () => window.clearTimeout(f);
2327
+ } = e, [s, a] = f.useState(!0), l = f.useRef(!1), c = f.useRef(0);
2328
+ return f.useEffect(() => {
2329
+ const u = c.current;
2330
+ return () => window.clearTimeout(u);
2282
2331
  }, []), /* @__PURE__ */ x(
2283
- ei,
2332
+ wi,
2284
2333
  {
2285
2334
  scope: t,
2286
2335
  isOpenDelayed: s,
2287
2336
  delayDuration: n,
2288
- onOpen: u.useCallback(() => {
2289
- window.clearTimeout(l.current), a(!1);
2337
+ onOpen: f.useCallback(() => {
2338
+ window.clearTimeout(c.current), a(!1);
2290
2339
  }, []),
2291
- onClose: u.useCallback(() => {
2292
- window.clearTimeout(l.current), l.current = window.setTimeout(
2340
+ onClose: f.useCallback(() => {
2341
+ window.clearTimeout(c.current), c.current = window.setTimeout(
2293
2342
  () => a(!0),
2294
2343
  o
2295
2344
  );
2296
2345
  }, [o]),
2297
- isPointerInTransitRef: c,
2298
- onPointerInTransitChange: u.useCallback((f) => {
2299
- c.current = f;
2346
+ isPointerInTransitRef: l,
2347
+ onPointerInTransitChange: f.useCallback((u) => {
2348
+ l.current = u;
2300
2349
  }, []),
2301
2350
  disableHoverableContent: i,
2302
2351
  children: r
2303
2352
  }
2304
2353
  );
2305
2354
  };
2306
- dn.displayName = pn;
2307
- var Se = "Tooltip", [ti, ge] = Re(Se), hn = (e) => {
2355
+ xn.displayName = wn;
2356
+ var Le = "Tooltip", [xi, ge] = Ne(Le), bn = (e) => {
2308
2357
  const {
2309
2358
  __scopeTooltip: t,
2310
2359
  children: n,
@@ -2313,114 +2362,114 @@ var Se = "Tooltip", [ti, ge] = Re(Se), hn = (e) => {
2313
2362
  onOpenChange: r,
2314
2363
  disableHoverableContent: s,
2315
2364
  delayDuration: a
2316
- } = e, c = Ke(Se, e.__scopeTooltip), l = Te(t), [f, d] = u.useState(null), h = Lr(), p = u.useRef(0), g = s ?? c.disableHoverableContent, m = a ?? c.delayDuration, v = u.useRef(!1), [y = !1, w] = Xo({
2365
+ } = e, l = et(Le, e.__scopeTooltip), c = De(t), [u, p] = f.useState(null), h = Wr(), d = f.useRef(0), m = s ?? l.disableHoverableContent, g = a ?? l.delayDuration, v = f.useRef(!1), [y = !1, w] = hi({
2317
2366
  prop: o,
2318
2367
  defaultProp: i,
2319
- onChange: (P) => {
2320
- P ? (c.onOpen(), document.dispatchEvent(new CustomEvent(We))) : c.onClose(), r == null || r(P);
2368
+ onChange: (_) => {
2369
+ _ ? (l.onOpen(), document.dispatchEvent(new CustomEvent(ze))) : l.onClose(), r == null || r(_);
2321
2370
  }
2322
- }), A = u.useMemo(() => y ? v.current ? "delayed-open" : "instant-open" : "closed", [y]), b = u.useCallback(() => {
2323
- window.clearTimeout(p.current), p.current = 0, v.current = !1, w(!0);
2324
- }, [w]), _ = u.useCallback(() => {
2325
- window.clearTimeout(p.current), p.current = 0, w(!1);
2326
- }, [w]), C = u.useCallback(() => {
2327
- window.clearTimeout(p.current), p.current = window.setTimeout(() => {
2328
- v.current = !0, w(!0), p.current = 0;
2329
- }, m);
2330
- }, [m, w]);
2331
- return u.useEffect(() => () => {
2332
- p.current && (window.clearTimeout(p.current), p.current = 0);
2333
- }, []), /* @__PURE__ */ x(Ho, { ...l, children: /* @__PURE__ */ x(
2334
- ti,
2371
+ }), C = f.useMemo(() => y ? v.current ? "delayed-open" : "instant-open" : "closed", [y]), b = f.useCallback(() => {
2372
+ window.clearTimeout(d.current), d.current = 0, v.current = !1, w(!0);
2373
+ }, [w]), A = f.useCallback(() => {
2374
+ window.clearTimeout(d.current), d.current = 0, w(!1);
2375
+ }, [w]), P = f.useCallback(() => {
2376
+ window.clearTimeout(d.current), d.current = window.setTimeout(() => {
2377
+ v.current = !0, w(!0), d.current = 0;
2378
+ }, g);
2379
+ }, [g, w]);
2380
+ return f.useEffect(() => () => {
2381
+ d.current && (window.clearTimeout(d.current), d.current = 0);
2382
+ }, []), /* @__PURE__ */ x(si, { ...c, children: /* @__PURE__ */ x(
2383
+ xi,
2335
2384
  {
2336
2385
  scope: t,
2337
2386
  contentId: h,
2338
2387
  open: y,
2339
- stateAttribute: A,
2340
- trigger: f,
2341
- onTriggerChange: d,
2342
- onTriggerEnter: u.useCallback(() => {
2343
- c.isOpenDelayed ? C() : b();
2344
- }, [c.isOpenDelayed, C, b]),
2345
- onTriggerLeave: u.useCallback(() => {
2346
- g ? _() : (window.clearTimeout(p.current), p.current = 0);
2347
- }, [_, g]),
2388
+ stateAttribute: C,
2389
+ trigger: u,
2390
+ onTriggerChange: p,
2391
+ onTriggerEnter: f.useCallback(() => {
2392
+ l.isOpenDelayed ? P() : b();
2393
+ }, [l.isOpenDelayed, P, b]),
2394
+ onTriggerLeave: f.useCallback(() => {
2395
+ m ? A() : (window.clearTimeout(d.current), d.current = 0);
2396
+ }, [A, m]),
2348
2397
  onOpen: b,
2349
- onClose: _,
2350
- disableHoverableContent: g,
2398
+ onClose: A,
2399
+ disableHoverableContent: m,
2351
2400
  children: n
2352
2401
  }
2353
2402
  ) });
2354
2403
  };
2355
- hn.displayName = Se;
2356
- var He = "TooltipTrigger", gn = u.forwardRef(
2404
+ bn.displayName = Le;
2405
+ var Ve = "TooltipTrigger", _n = f.forwardRef(
2357
2406
  (e, t) => {
2358
- const { __scopeTooltip: n, ...o } = e, i = ge(He, n), r = Ke(He, n), s = Te(n), a = u.useRef(null), c = te(t, a, i.onTriggerChange), l = u.useRef(!1), f = u.useRef(!1), d = u.useCallback(() => l.current = !1, []);
2359
- return u.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ x(jo, { asChild: !0, ...s, children: /* @__PURE__ */ x(
2360
- K.button,
2407
+ const { __scopeTooltip: n, ...o } = e, i = ge(Ve, n), r = et(Ve, n), s = De(n), a = f.useRef(null), l = ne(t, a, i.onTriggerChange), c = f.useRef(!1), u = f.useRef(!1), p = f.useCallback(() => c.current = !1, []);
2408
+ return f.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ x(ai, { asChild: !0, ...s, children: /* @__PURE__ */ x(
2409
+ J.button,
2361
2410
  {
2362
2411
  "aria-describedby": i.open ? i.contentId : void 0,
2363
2412
  "data-state": i.stateAttribute,
2364
2413
  ...o,
2365
- ref: c,
2366
- onPointerMove: V(e.onPointerMove, (h) => {
2367
- h.pointerType !== "touch" && !f.current && !r.isPointerInTransitRef.current && (i.onTriggerEnter(), f.current = !0);
2414
+ ref: l,
2415
+ onPointerMove: q(e.onPointerMove, (h) => {
2416
+ h.pointerType !== "touch" && !u.current && !r.isPointerInTransitRef.current && (i.onTriggerEnter(), u.current = !0);
2368
2417
  }),
2369
- onPointerLeave: V(e.onPointerLeave, () => {
2370
- i.onTriggerLeave(), f.current = !1;
2418
+ onPointerLeave: q(e.onPointerLeave, () => {
2419
+ i.onTriggerLeave(), u.current = !1;
2371
2420
  }),
2372
- onPointerDown: V(e.onPointerDown, () => {
2373
- l.current = !0, document.addEventListener("pointerup", d, { once: !0 });
2421
+ onPointerDown: q(e.onPointerDown, () => {
2422
+ c.current = !0, document.addEventListener("pointerup", p, { once: !0 });
2374
2423
  }),
2375
- onFocus: V(e.onFocus, () => {
2376
- l.current || i.onOpen();
2424
+ onFocus: q(e.onFocus, () => {
2425
+ c.current || i.onOpen();
2377
2426
  }),
2378
- onBlur: V(e.onBlur, i.onClose),
2379
- onClick: V(e.onClick, i.onClose)
2427
+ onBlur: q(e.onBlur, i.onClose),
2428
+ onClick: q(e.onClick, i.onClose)
2380
2429
  }
2381
2430
  ) });
2382
2431
  }
2383
2432
  );
2384
- gn.displayName = He;
2385
- var Je = "TooltipPortal", [ni, ri] = Re(Je, {
2433
+ _n.displayName = Ve;
2434
+ var tt = "TooltipPortal", [bi, _i] = Ne(tt, {
2386
2435
  forceMount: void 0
2387
- }), mn = (e) => {
2388
- const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r = ge(Je, t);
2389
- return /* @__PURE__ */ x(ni, { scope: t, forceMount: n, children: /* @__PURE__ */ x(Ze, { present: n || r.open, children: /* @__PURE__ */ x(un, { asChild: !0, container: i, children: o }) }) });
2436
+ }), An = (e) => {
2437
+ const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r = ge(tt, t);
2438
+ return /* @__PURE__ */ x(bi, { scope: t, forceMount: n, children: /* @__PURE__ */ x(Qe, { present: n || r.open, children: /* @__PURE__ */ x(vn, { asChild: !0, container: i, children: o }) }) });
2390
2439
  };
2391
- mn.displayName = Je;
2392
- var ie = "TooltipContent", vn = u.forwardRef(
2440
+ An.displayName = tt;
2441
+ var se = "TooltipContent", Cn = f.forwardRef(
2393
2442
  (e, t) => {
2394
- const n = ri(ie, e.__scopeTooltip), { forceMount: o = n.forceMount, side: i = "top", ...r } = e, s = ge(ie, e.__scopeTooltip);
2395
- return /* @__PURE__ */ x(Ze, { present: o || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ x(yn, { side: i, ...r, ref: t }) : /* @__PURE__ */ x(oi, { side: i, ...r, ref: t }) });
2443
+ const n = _i(se, e.__scopeTooltip), { forceMount: o = n.forceMount, side: i = "top", ...r } = e, s = ge(se, e.__scopeTooltip);
2444
+ return /* @__PURE__ */ x(Qe, { present: o || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ x(Pn, { side: i, ...r, ref: t }) : /* @__PURE__ */ x(Ai, { side: i, ...r, ref: t }) });
2396
2445
  }
2397
- ), oi = u.forwardRef((e, t) => {
2398
- const n = ge(ie, e.__scopeTooltip), o = Ke(ie, e.__scopeTooltip), i = u.useRef(null), r = te(t, i), [s, a] = u.useState(null), { trigger: c, onClose: l } = n, f = i.current, { onPointerInTransitChange: d } = o, h = u.useCallback(() => {
2399
- a(null), d(!1);
2400
- }, [d]), p = u.useCallback(
2401
- (g, m) => {
2402
- const v = g.currentTarget, y = { x: g.clientX, y: g.clientY }, w = ai(y, v.getBoundingClientRect()), A = ci(y, w), b = li(m.getBoundingClientRect()), _ = fi([...A, ...b]);
2403
- a(_), d(!0);
2446
+ ), Ai = f.forwardRef((e, t) => {
2447
+ const n = ge(se, e.__scopeTooltip), o = et(se, e.__scopeTooltip), i = f.useRef(null), r = ne(t, i), [s, a] = f.useState(null), { trigger: l, onClose: c } = n, u = i.current, { onPointerInTransitChange: p } = o, h = f.useCallback(() => {
2448
+ a(null), p(!1);
2449
+ }, [p]), d = f.useCallback(
2450
+ (m, g) => {
2451
+ const v = m.currentTarget, y = { x: m.clientX, y: m.clientY }, w = Oi(y, v.getBoundingClientRect()), C = Ri(y, w), b = Ei(g.getBoundingClientRect()), A = Ti([...C, ...b]);
2452
+ a(A), p(!0);
2404
2453
  },
2405
- [d]
2454
+ [p]
2406
2455
  );
2407
- return u.useEffect(() => () => h(), [h]), u.useEffect(() => {
2408
- if (c && f) {
2409
- const g = (v) => p(v, f), m = (v) => p(v, c);
2410
- return c.addEventListener("pointerleave", g), f.addEventListener("pointerleave", m), () => {
2411
- c.removeEventListener("pointerleave", g), f.removeEventListener("pointerleave", m);
2456
+ return f.useEffect(() => () => h(), [h]), f.useEffect(() => {
2457
+ if (l && u) {
2458
+ const m = (v) => d(v, u), g = (v) => d(v, l);
2459
+ return l.addEventListener("pointerleave", m), u.addEventListener("pointerleave", g), () => {
2460
+ l.removeEventListener("pointerleave", m), u.removeEventListener("pointerleave", g);
2412
2461
  };
2413
2462
  }
2414
- }, [c, f, p, h]), u.useEffect(() => {
2463
+ }, [l, u, d, h]), f.useEffect(() => {
2415
2464
  if (s) {
2416
- const g = (m) => {
2417
- const v = m.target, y = { x: m.clientX, y: m.clientY }, w = (c == null ? void 0 : c.contains(v)) || (f == null ? void 0 : f.contains(v)), A = !ui(y, s);
2418
- w ? h() : A && (h(), l());
2465
+ const m = (g) => {
2466
+ const v = g.target, y = { x: g.clientX, y: g.clientY }, w = (l == null ? void 0 : l.contains(v)) || (u == null ? void 0 : u.contains(v)), C = !Si(y, s);
2467
+ w ? h() : C && (h(), c());
2419
2468
  };
2420
- return document.addEventListener("pointermove", g), () => document.removeEventListener("pointermove", g);
2469
+ return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
2421
2470
  }
2422
- }, [c, f, s, l, h]), /* @__PURE__ */ x(yn, { ...e, ref: r });
2423
- }), [ii, si] = Re(Se, { isInside: !1 }), yn = u.forwardRef(
2471
+ }, [l, u, s, c, h]), /* @__PURE__ */ x(Pn, { ...e, ref: r });
2472
+ }), [Ci, Pi] = Ne(Le, { isInside: !1 }), Pn = f.forwardRef(
2424
2473
  (e, t) => {
2425
2474
  const {
2426
2475
  __scopeTooltip: n,
@@ -2429,29 +2478,29 @@ var ie = "TooltipContent", vn = u.forwardRef(
2429
2478
  onEscapeKeyDown: r,
2430
2479
  onPointerDownOutside: s,
2431
2480
  ...a
2432
- } = e, c = ge(ie, n), l = Te(n), { onClose: f } = c;
2433
- return u.useEffect(() => (document.addEventListener(We, f), () => document.removeEventListener(We, f)), [f]), u.useEffect(() => {
2434
- if (c.trigger) {
2435
- const d = (h) => {
2436
- const p = h.target;
2437
- p != null && p.contains(c.trigger) && f();
2481
+ } = e, l = ge(se, n), c = De(n), { onClose: u } = l;
2482
+ return f.useEffect(() => (document.addEventListener(ze, u), () => document.removeEventListener(ze, u)), [u]), f.useEffect(() => {
2483
+ if (l.trigger) {
2484
+ const p = (h) => {
2485
+ const d = h.target;
2486
+ d != null && d.contains(l.trigger) && u();
2438
2487
  };
2439
- return window.addEventListener("scroll", d, { capture: !0 }), () => window.removeEventListener("scroll", d, { capture: !0 });
2488
+ return window.addEventListener("scroll", p, { capture: !0 }), () => window.removeEventListener("scroll", p, { capture: !0 });
2440
2489
  }
2441
- }, [c.trigger, f]), /* @__PURE__ */ x(
2442
- Ht,
2490
+ }, [l.trigger, u]), /* @__PURE__ */ x(
2491
+ Yt,
2443
2492
  {
2444
2493
  asChild: !0,
2445
2494
  disableOutsidePointerEvents: !1,
2446
2495
  onEscapeKeyDown: r,
2447
2496
  onPointerDownOutside: s,
2448
- onFocusOutside: (d) => d.preventDefault(),
2449
- onDismiss: f,
2450
- children: /* @__PURE__ */ be(
2451
- zo,
2497
+ onFocusOutside: (p) => p.preventDefault(),
2498
+ onDismiss: u,
2499
+ children: /* @__PURE__ */ _e(
2500
+ ci,
2452
2501
  {
2453
- "data-state": c.stateAttribute,
2454
- ...l,
2502
+ "data-state": l.stateAttribute,
2503
+ ...c,
2455
2504
  ...a,
2456
2505
  ref: t,
2457
2506
  style: {
@@ -2463,8 +2512,8 @@ var ie = "TooltipContent", vn = u.forwardRef(
2463
2512
  "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
2464
2513
  },
2465
2514
  children: [
2466
- /* @__PURE__ */ x(Bt, { children: o }),
2467
- /* @__PURE__ */ x(ii, { scope: n, isInside: !0, children: /* @__PURE__ */ x(Jo, { id: c.contentId, role: "tooltip", children: i || o }) })
2515
+ /* @__PURE__ */ x(Vt, { children: o }),
2516
+ /* @__PURE__ */ x(Ci, { scope: n, isInside: !0, children: /* @__PURE__ */ x(vi, { id: l.contentId, role: "tooltip", children: i || o }) })
2468
2517
  ]
2469
2518
  }
2470
2519
  )
@@ -2472,18 +2521,18 @@ var ie = "TooltipContent", vn = u.forwardRef(
2472
2521
  );
2473
2522
  }
2474
2523
  );
2475
- vn.displayName = ie;
2476
- var wn = "TooltipArrow", xn = u.forwardRef(
2524
+ Cn.displayName = se;
2525
+ var On = "TooltipArrow", Rn = f.forwardRef(
2477
2526
  (e, t) => {
2478
- const { __scopeTooltip: n, ...o } = e, i = Te(n);
2479
- return si(
2480
- wn,
2527
+ const { __scopeTooltip: n, ...o } = e, i = De(n);
2528
+ return Pi(
2529
+ On,
2481
2530
  n
2482
- ).isInside ? null : /* @__PURE__ */ x(Vo, { ...i, ...o, ref: t });
2531
+ ).isInside ? null : /* @__PURE__ */ x(li, { ...i, ...o, ref: t });
2483
2532
  }
2484
2533
  );
2485
- xn.displayName = wn;
2486
- function ai(e, t) {
2534
+ Rn.displayName = On;
2535
+ function Oi(e, t) {
2487
2536
  const n = Math.abs(t.top - e.y), o = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), r = Math.abs(t.left - e.x);
2488
2537
  switch (Math.min(n, o, i, r)) {
2489
2538
  case r:
@@ -2498,7 +2547,7 @@ function ai(e, t) {
2498
2547
  throw new Error("unreachable");
2499
2548
  }
2500
2549
  }
2501
- function ci(e, t, n = 5) {
2550
+ function Ri(e, t, n = 5) {
2502
2551
  const o = [];
2503
2552
  switch (t) {
2504
2553
  case "top":
@@ -2528,7 +2577,7 @@ function ci(e, t, n = 5) {
2528
2577
  }
2529
2578
  return o;
2530
2579
  }
2531
- function li(e) {
2580
+ function Ei(e) {
2532
2581
  const { top: t, right: n, bottom: o, left: i } = e;
2533
2582
  return [
2534
2583
  { x: i, y: t },
@@ -2537,20 +2586,20 @@ function li(e) {
2537
2586
  { x: i, y: o }
2538
2587
  ];
2539
2588
  }
2540
- function ui(e, t) {
2589
+ function Si(e, t) {
2541
2590
  const { x: n, y: o } = e;
2542
2591
  let i = !1;
2543
2592
  for (let r = 0, s = t.length - 1; r < t.length; s = r++) {
2544
- const a = t[r].x, c = t[r].y, l = t[s].x, f = t[s].y;
2545
- c > o != f > o && n < (l - a) * (o - c) / (f - c) + a && (i = !i);
2593
+ const a = t[r].x, l = t[r].y, c = t[s].x, u = t[s].y;
2594
+ l > o != u > o && n < (c - a) * (o - l) / (u - l) + a && (i = !i);
2546
2595
  }
2547
2596
  return i;
2548
2597
  }
2549
- function fi(e) {
2598
+ function Ti(e) {
2550
2599
  const t = e.slice();
2551
- return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0), pi(t);
2600
+ return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0), Ni(t);
2552
2601
  }
2553
- function pi(e) {
2602
+ function Ni(e) {
2554
2603
  if (e.length <= 1) return e.slice();
2555
2604
  const t = [];
2556
2605
  for (let o = 0; o < e.length; o++) {
@@ -2575,19 +2624,19 @@ function pi(e) {
2575
2624
  }
2576
2625
  return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
2577
2626
  }
2578
- var di = dn, hi = hn, gi = gn, mi = mn, vi = vn, yi = xn;
2579
- function wi(e) {
2627
+ var Di = xn, Li = bn, Mi = _n, $i = An, ki = Cn, Fi = Rn;
2628
+ function Ii(e) {
2580
2629
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
2581
2630
  }
2582
- var Le = { exports: {} };
2631
+ var ke = { exports: {} };
2583
2632
  /*!
2584
2633
  Copyright (c) 2018 Jed Watson.
2585
2634
  Licensed under the MIT License (MIT), see
2586
2635
  http://jedwatson.github.io/classnames
2587
2636
  */
2588
- var Rt;
2589
- function xi() {
2590
- return Rt || (Rt = 1, function(e) {
2637
+ var Lt;
2638
+ function Wi() {
2639
+ return Lt || (Lt = 1, (function(e) {
2591
2640
  (function() {
2592
2641
  var t = {}.hasOwnProperty;
2593
2642
  function n() {
@@ -2616,30 +2665,30 @@ function xi() {
2616
2665
  }
2617
2666
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
2618
2667
  })();
2619
- }(Le)), Le.exports;
2668
+ })(ke)), ke.exports;
2620
2669
  }
2621
- var bi = xi();
2622
- const _i = /* @__PURE__ */ wi(bi), Ai = "_slideDownAndFade_fkagk_1", Pi = "_slideLeftAndFade_fkagk_1", Ci = "_slideUpAndFade_fkagk_1", Ei = "_slideRightAndFade_fkagk_1", Oi = {
2670
+ var Bi = Wi();
2671
+ const Hi = /* @__PURE__ */ Ii(Bi), ji = "_slideDownAndFade_fkagk_1", zi = "_slideLeftAndFade_fkagk_1", Vi = "_slideUpAndFade_fkagk_1", Ui = "_slideRightAndFade_fkagk_1", Yi = {
2623
2672
  "purpur-tooltip": "_purpur-tooltip_fkagk_1",
2624
2673
  "purpur-tooltip__content": "_purpur-tooltip__content_fkagk_4",
2625
2674
  "purpur-tooltip__content--primary": "_purpur-tooltip__content--primary_fkagk_14",
2626
2675
  "purpur-tooltip__content--primary-negative": "_purpur-tooltip__content--primary-negative_fkagk_17",
2627
- slideDownAndFade: Ai,
2628
- slideLeftAndFade: Pi,
2629
- slideUpAndFade: Ci,
2630
- slideRightAndFade: Ei,
2676
+ slideDownAndFade: ji,
2677
+ slideLeftAndFade: zi,
2678
+ slideUpAndFade: Vi,
2679
+ slideRightAndFade: Ui,
2631
2680
  "purpur-tooltip__arrow--primary": "_purpur-tooltip__arrow--primary_fkagk_32",
2632
2681
  "purpur-tooltip__arrow--primary-negative": "_purpur-tooltip__arrow--primary-negative_fkagk_35"
2633
- }, $e = _i.bind(Oi), Ri = {
2682
+ }, Fe = Hi.bind(Yi), qi = {
2634
2683
  TOP: "top",
2635
2684
  BOTTOM: "bottom",
2636
2685
  LEFT: "left",
2637
2686
  RIGHT: "right"
2638
- }, Ti = {
2687
+ }, Gi = {
2639
2688
  START: "start",
2640
2689
  CENTER: "center",
2641
2690
  END: "end"
2642
- }, ne = "purpur-tooltip", Si = Tt(
2691
+ }, re = "purpur-tooltip", Xi = Mt(
2643
2692
  ({
2644
2693
  ["data-testid"]: e,
2645
2694
  buttonSize: t = "md",
@@ -2647,69 +2696,69 @@ const _i = /* @__PURE__ */ wi(bi), Ai = "_slideDownAndFade_fkagk_1", Pi = "_slid
2647
2696
  className: o,
2648
2697
  contentClassName: i,
2649
2698
  negative: r = !1,
2650
- position: s = Ri.TOP,
2651
- align: a = Ti.CENTER,
2652
- triggerAriaLabel: c,
2653
- triggerElement: l,
2654
- ...f
2655
- }, d) => {
2656
- const [h, p] = Ln(!1), g = $e(
2699
+ position: s = qi.TOP,
2700
+ align: a = Gi.CENTER,
2701
+ triggerAriaLabel: l,
2702
+ triggerElement: c,
2703
+ ...u
2704
+ }, p) => {
2705
+ const [h, d] = Wn(!1), m = Fe(
2657
2706
  o,
2658
- ne,
2659
- `${ne}--primary${r ? "-negative" : ""}`
2660
- ), m = /* @__PURE__ */ x(
2661
- Nt,
2707
+ re,
2708
+ `${re}--primary${r ? "-negative" : ""}`
2709
+ ), g = /* @__PURE__ */ x(
2710
+ kt,
2662
2711
  {
2663
- ref: d,
2664
- "aria-label": c,
2712
+ ref: p,
2713
+ "aria-label": l,
2665
2714
  "aria-expanded": h,
2666
- variant: Kn.TERTIARY_PURPLE,
2715
+ variant: rr.TERTIARY_PURPLE,
2667
2716
  negative: r,
2668
2717
  iconOnly: !0,
2669
2718
  "data-testid": `${e}-trigger-button`,
2670
2719
  size: t,
2671
- children: /* @__PURE__ */ x(Lt, { size: "md" })
2720
+ children: /* @__PURE__ */ x(It, { size: "md" })
2672
2721
  }
2673
2722
  );
2674
- return /* @__PURE__ */ x("div", { "data-testid": e, className: g, children: /* @__PURE__ */ x(di, { delayDuration: parseInt(mr), children: /* @__PURE__ */ be(hi, { open: h, onOpenChange: p, ...f, children: [
2723
+ return /* @__PURE__ */ x("div", { "data-testid": e, className: m, children: /* @__PURE__ */ x(Di, { delayDuration: parseInt(_r), children: /* @__PURE__ */ _e(Li, { open: h, onOpenChange: d, ...u, children: [
2675
2724
  /* @__PURE__ */ x(
2676
- gi,
2725
+ Mi,
2677
2726
  {
2678
2727
  asChild: !0,
2679
2728
  onClick: (v) => {
2680
- v.preventDefault(), p(!0);
2729
+ v.preventDefault(), d(!0);
2681
2730
  },
2682
- children: $n.count(l) === 0 ? m : l
2731
+ children: Bn.count(c) === 0 ? g : c
2683
2732
  }
2684
2733
  ),
2685
- /* @__PURE__ */ x(mi, { children: /* @__PURE__ */ be(
2686
- vi,
2734
+ /* @__PURE__ */ x($i, { children: /* @__PURE__ */ _e(
2735
+ ki,
2687
2736
  {
2688
2737
  side: s,
2689
2738
  align: a,
2690
- className: $e(
2739
+ className: Fe(
2691
2740
  i,
2692
- `${ne}__content`,
2693
- `${ne}__content--primary${r ? "-negative" : ""}`
2741
+ `${re}__content`,
2742
+ `${re}__content--primary${r ? "-negative" : ""}`
2694
2743
  ),
2695
2744
  sideOffset: -5,
2696
2745
  "data-testid": `${e}-content`,
2697
2746
  children: [
2698
2747
  typeof n == "string" ? /* @__PURE__ */ x(
2699
- Mt,
2748
+ Bt,
2700
2749
  {
2701
- variant: $t.PARAGRAPH100,
2750
+ variant: Wt.PARAGRAPH100,
2702
2751
  negative: !r,
2703
2752
  "data-testid": `${e}-paragraph`,
2704
2753
  children: n
2705
2754
  }
2706
2755
  ) : n,
2707
2756
  /* @__PURE__ */ x(
2708
- yi,
2757
+ Fi,
2709
2758
  {
2710
- className: $e(
2711
- `${ne}__arrow`,
2712
- `${ne}__arrow--primary${r ? "-negative" : ""}`
2759
+ className: Fe(
2760
+ `${re}__arrow`,
2761
+ `${re}__arrow--primary${r ? "-negative" : ""}`
2713
2762
  )
2714
2763
  }
2715
2764
  )
@@ -2719,10 +2768,10 @@ const _i = /* @__PURE__ */ wi(bi), Ai = "_slideDownAndFade_fkagk_1", Pi = "_slid
2719
2768
  ] }) }) });
2720
2769
  }
2721
2770
  );
2722
- Si.displayName = "Tooltip";
2771
+ Xi.displayName = "Tooltip";
2723
2772
  export {
2724
- Ti as TOOLTIP_ALIGN,
2725
- Ri as TOOLTIP_POSITION,
2726
- Si as Tooltip
2773
+ Gi as TOOLTIP_ALIGN,
2774
+ qi as TOOLTIP_POSITION,
2775
+ Xi as Tooltip
2727
2776
  };
2728
2777
  //# sourceMappingURL=tooltip.es.js.map