highsoft-ui 1.0.109 → 1.0.111

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,15 +1,15 @@
1
- import { jsx as w, jsxs as q, Fragment as ee } from "react/jsx-runtime";
2
- import { z as Ke, c as Qe } from "../../utils-BKDJp1i0.js";
1
+ import { jsx as w, jsxs as q, Fragment as oe } from "react/jsx-runtime";
2
+ import { z as qe, c as Ue } from "../../utils-BKDJp1i0.js";
3
3
  import * as g from "react";
4
- import { useLayoutEffect as qe } from "react";
5
- import { C as Ge } from "../../Check-Cm4roSEj.js";
6
- import { _ as xt } from "../../extends-hS2Bh-Yp.js";
7
- import { c as Ue } from "../../clsx-OuTLNxxd.js";
8
- import { Button as Ze } from "../Button/index.js";
9
- import { h as kt, P as lt, u as yt, c as ne, f as Je, e as tn, b as en, d as st, g as oe, i as nn, j as on, R as rn, a as sn, k as cn, F as an, D as ln } from "../../index-CYz8LhDn.js";
10
- import * as fn from "react-dom";
11
- var un = function(e) {
12
- return /* @__PURE__ */ w("svg", xt({
4
+ import { useLayoutEffect as Ge } from "react";
5
+ import { C as Ze } from "../../Check-Cm4roSEj.js";
6
+ import { _ as yt } from "../../extends-hS2Bh-Yp.js";
7
+ import { c as Je } from "../../clsx-OuTLNxxd.js";
8
+ import { Button as tn } from "../Button/index.js";
9
+ import { h as _t, P as ft, u as At, c as re, f as en, e as nn, b as on, d as ct, g as ie, i as rn, j as sn, R as cn, a as an, k as ln, F as fn, D as un } from "../../index-CYz8LhDn.js";
10
+ import * as dn from "react-dom";
11
+ var pn = function(e) {
12
+ return /* @__PURE__ */ w("svg", yt({
13
13
  xmlns: "http://www.w3.org/2000/svg",
14
14
  width: 24,
15
15
  height: 24,
@@ -24,8 +24,8 @@ var un = function(e) {
24
24
  d: "M15 17v4H9v-4m-3.8 0h13.6c1.1201 0 1.6802 0 2.108-.218a2 2 0 0 0 .874-.874C22 15.4802 22 14.9201 22 13.8V6.2c0-1.1201 0-1.6802-.218-2.108a2 2 0 0 0-.874-.874C20.4802 3 19.9201 3 18.8 3H5.2c-1.1201 0-1.6802 0-2.108.218a2 2 0 0 0-.874.874C2 4.5198 2 5.08 2 6.2v7.6c0 1.1201 0 1.6802.218 2.108.1917.3763.4977.6823.874.874C3.5198 17 4.08 17 5.2 17"
25
25
  })
26
26
  }));
27
- }, dn = function(e) {
28
- return /* @__PURE__ */ w("svg", xt({
27
+ }, hn = function(e) {
28
+ return /* @__PURE__ */ w("svg", yt({
29
29
  xmlns: "http://www.w3.org/2000/svg",
30
30
  width: 24,
31
31
  height: 24,
@@ -40,8 +40,8 @@ var un = function(e) {
40
40
  d: "M21.9548 12.9564c-1.3769 2.4153-3.9757 4.0437-6.9548 4.0437-4.4183 0-8-3.5817-8-8 0-2.9794 1.6287-5.5783 4.0443-6.9552C5.9698 2.5261 2 6.7994 2 11.9998c0 5.5229 4.4772 10 10 10 5.2002 0 9.4733-3.9693 9.9548-9.0434"
41
41
  })
42
42
  }));
43
- }, pn = function(e) {
44
- return /* @__PURE__ */ w("svg", xt({
43
+ }, mn = function(e) {
44
+ return /* @__PURE__ */ w("svg", yt({
45
45
  xmlns: "http://www.w3.org/2000/svg",
46
46
  width: 24,
47
47
  height: 24,
@@ -56,8 +56,8 @@ var un = function(e) {
56
56
  d: "M3 8h12m0 0c0 1.6569 1.3431 3 3 3s3-1.3431 3-3-1.3431-3-3-3-3 1.3431-3 3m-6 8h12M9 16c0 1.6569-1.3431 3-3 3s-3-1.3431-3-3 1.3431-3 3-3 3 1.3431 3 3"
57
57
  })
58
58
  }));
59
- }, hn = function(e) {
60
- return /* @__PURE__ */ w("svg", xt({
59
+ }, gn = function(e) {
60
+ return /* @__PURE__ */ w("svg", yt({
61
61
  xmlns: "http://www.w3.org/2000/svg",
62
62
  width: 24,
63
63
  height: 24,
@@ -73,9 +73,9 @@ var un = function(e) {
73
73
  })
74
74
  }));
75
75
  };
76
- function mn(t) {
76
+ function wn(t) {
77
77
  const [e, n] = g.useState(void 0);
78
- return kt(() => {
78
+ return _t(() => {
79
79
  if (t) {
80
80
  n({ width: t.offsetWidth, height: t.offsetHeight });
81
81
  const o = new ResizeObserver((r) => {
@@ -84,8 +84,8 @@ function mn(t) {
84
84
  const i = r[0];
85
85
  let s, c;
86
86
  if ("borderBoxSize" in i) {
87
- const a = i.borderBoxSize, l = Array.isArray(a) ? a[0] : a;
88
- s = l.inlineSize, c = l.blockSize;
87
+ const a = i.borderBoxSize, f = Array.isArray(a) ? a[0] : a;
88
+ s = f.inlineSize, c = f.blockSize;
89
89
  } else
90
90
  s = t.offsetWidth, c = t.offsetHeight;
91
91
  n({ width: s, height: c });
@@ -95,76 +95,74 @@ function mn(t) {
95
95
  n(void 0);
96
96
  }, [t]), e;
97
97
  }
98
- const gn = ["top", "right", "bottom", "left"], G = Math.min, W = Math.max, mt = Math.round, pt = Math.floor, j = (t) => ({
98
+ const vn = ["top", "right", "bottom", "left"], U = Math.min, W = Math.max, gt = Math.round, ht = Math.floor, j = (t) => ({
99
99
  x: t,
100
100
  y: t
101
- }), wn = {
101
+ }), xn = {
102
102
  left: "right",
103
103
  right: "left",
104
104
  bottom: "top",
105
105
  top: "bottom"
106
- }, vn = {
107
- start: "end",
108
- end: "start"
109
106
  };
110
- function Mt(t, e, n) {
111
- return W(t, G(e, n));
107
+ function Dt(t, e, n) {
108
+ return W(t, U(e, n));
112
109
  }
113
- function K(t, e) {
110
+ function Y(t, e) {
114
111
  return typeof t == "function" ? t(e) : t;
115
112
  }
116
- function Q(t) {
113
+ function K(t) {
117
114
  return t.split("-")[0];
118
115
  }
119
- function ot(t) {
116
+ function rt(t) {
120
117
  return t.split("-")[1];
121
118
  }
122
- function _t(t) {
119
+ function Nt(t) {
123
120
  return t === "x" ? "y" : "x";
124
121
  }
125
- function Tt(t) {
122
+ function Ft(t) {
126
123
  return t === "y" ? "height" : "width";
127
124
  }
128
- const xn = /* @__PURE__ */ new Set(["top", "bottom"]);
129
125
  function V(t) {
130
- return xn.has(Q(t)) ? "y" : "x";
126
+ const e = t[0];
127
+ return e === "t" || e === "b" ? "y" : "x";
131
128
  }
132
- function Nt(t) {
133
- return _t(V(t));
129
+ function $t(t) {
130
+ return Nt(V(t));
134
131
  }
135
132
  function yn(t, e, n) {
136
133
  n === void 0 && (n = !1);
137
- const o = ot(t), r = Nt(t), i = Tt(r);
134
+ const o = rt(t), r = $t(t), i = Ft(r);
138
135
  let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
139
- return e.reference[i] > e.floating[i] && (s = gt(s)), [s, gt(s)];
136
+ return e.reference[i] > e.floating[i] && (s = wt(s)), [s, wt(s)];
140
137
  }
141
- function bn(t) {
142
- const e = gt(t);
143
- return [Dt(t), e, Dt(e)];
138
+ function An(t) {
139
+ const e = wt(t);
140
+ return [Lt(t), e, Lt(e)];
144
141
  }
145
- function Dt(t) {
146
- return t.replace(/start|end/g, (e) => vn[e]);
142
+ function Lt(t) {
143
+ return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
147
144
  }
148
- const jt = ["left", "right"], Xt = ["right", "left"], An = ["top", "bottom"], Pn = ["bottom", "top"];
145
+ const Yt = ["left", "right"], Kt = ["right", "left"], Pn = ["top", "bottom"], bn = ["bottom", "top"];
149
146
  function Cn(t, e, n) {
150
147
  switch (t) {
151
148
  case "top":
152
149
  case "bottom":
153
- return n ? e ? Xt : jt : e ? jt : Xt;
150
+ return n ? e ? Kt : Yt : e ? Yt : Kt;
154
151
  case "left":
155
152
  case "right":
156
- return e ? An : Pn;
153
+ return e ? Pn : bn;
157
154
  default:
158
155
  return [];
159
156
  }
160
157
  }
161
158
  function Rn(t, e, n, o) {
162
- const r = ot(t);
163
- let i = Cn(Q(t), n === "start", o);
164
- return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Dt)))), i;
159
+ const r = rt(t);
160
+ let i = Cn(K(t), n === "start", o);
161
+ return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Lt)))), i;
165
162
  }
166
- function gt(t) {
167
- return t.replace(/left|right|bottom|top/g, (e) => wn[e]);
163
+ function wt(t) {
164
+ const e = K(t);
165
+ return xn[e] + t.slice(e.length);
168
166
  }
169
167
  function On(t) {
170
168
  return {
@@ -175,7 +173,7 @@ function On(t) {
175
173
  ...t
176
174
  };
177
175
  }
178
- function re(t) {
176
+ function se(t) {
179
177
  return typeof t != "number" ? On(t) : {
180
178
  top: t,
181
179
  right: t,
@@ -183,7 +181,7 @@ function re(t) {
183
181
  left: t
184
182
  };
185
183
  }
186
- function wt(t) {
184
+ function vt(t) {
187
185
  const {
188
186
  x: e,
189
187
  y: n,
@@ -201,23 +199,23 @@ function wt(t) {
201
199
  y: n
202
200
  };
203
201
  }
204
- function Yt(t, e, n) {
202
+ function Qt(t, e, n) {
205
203
  let {
206
204
  reference: o,
207
205
  floating: r
208
206
  } = t;
209
- const i = V(e), s = Nt(e), c = Tt(s), a = Q(e), l = i === "y", f = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, p = o[c] / 2 - r[c] / 2;
207
+ const i = V(e), s = $t(e), c = Ft(s), a = K(e), f = i === "y", l = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, p = o[c] / 2 - r[c] / 2;
210
208
  let d;
211
209
  switch (a) {
212
210
  case "top":
213
211
  d = {
214
- x: f,
212
+ x: l,
215
213
  y: o.y - r.height
216
214
  };
217
215
  break;
218
216
  case "bottom":
219
217
  d = {
220
- x: f,
218
+ x: l,
221
219
  y: o.y + o.height
222
220
  };
223
221
  break;
@@ -239,12 +237,12 @@ function Yt(t, e, n) {
239
237
  y: o.y
240
238
  };
241
239
  }
242
- switch (ot(e)) {
240
+ switch (rt(e)) {
243
241
  case "start":
244
- d[s] -= p * (n && l ? -1 : 1);
242
+ d[s] -= p * (n && f ? -1 : 1);
245
243
  break;
246
244
  case "end":
247
- d[s] += p * (n && l ? -1 : 1);
245
+ d[s] += p * (n && f ? -1 : 1);
248
246
  break;
249
247
  }
250
248
  return d;
@@ -260,103 +258,103 @@ async function Sn(t, e) {
260
258
  elements: c,
261
259
  strategy: a
262
260
  } = t, {
263
- boundary: l = "clippingAncestors",
264
- rootBoundary: f = "viewport",
261
+ boundary: f = "clippingAncestors",
262
+ rootBoundary: l = "viewport",
265
263
  elementContext: u = "floating",
266
264
  altBoundary: p = !1,
267
265
  padding: d = 0
268
- } = K(e, t), h = re(d), x = c[p ? u === "floating" ? "reference" : "floating" : u], v = wt(await i.getClippingRect({
269
- element: (n = await (i.isElement == null ? void 0 : i.isElement(x))) == null || n ? x : x.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
270
- boundary: l,
271
- rootBoundary: f,
266
+ } = Y(e, t), h = se(d), y = c[p ? u === "floating" ? "reference" : "floating" : u], v = vt(await i.getClippingRect({
267
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
268
+ boundary: f,
269
+ rootBoundary: l,
272
270
  strategy: a
273
- })), A = u === "floating" ? {
271
+ })), P = u === "floating" ? {
274
272
  x: o,
275
273
  y: r,
276
274
  width: s.floating.width,
277
275
  height: s.floating.height
278
- } : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), y = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
276
+ } : s.reference, A = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), x = await (i.isElement == null ? void 0 : i.isElement(A)) ? await (i.getScale == null ? void 0 : i.getScale(A)) || {
279
277
  x: 1,
280
278
  y: 1
281
279
  } : {
282
280
  x: 1,
283
281
  y: 1
284
- }, C = wt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
282
+ }, C = vt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
285
283
  elements: c,
286
- rect: A,
287
- offsetParent: b,
284
+ rect: P,
285
+ offsetParent: A,
288
286
  strategy: a
289
- }) : A);
287
+ }) : P);
290
288
  return {
291
- top: (v.top - C.top + h.top) / y.y,
292
- bottom: (C.bottom - v.bottom + h.bottom) / y.y,
293
- left: (v.left - C.left + h.left) / y.x,
294
- right: (C.right - v.right + h.right) / y.x
289
+ top: (v.top - C.top + h.top) / x.y,
290
+ bottom: (C.bottom - v.bottom + h.bottom) / x.y,
291
+ left: (v.left - C.left + h.left) / x.x,
292
+ right: (C.right - v.right + h.right) / x.x
295
293
  };
296
294
  }
297
- const En = async (t, e, n) => {
295
+ const En = 50, Mn = async (t, e, n) => {
298
296
  const {
299
297
  placement: o = "bottom",
300
298
  strategy: r = "absolute",
301
299
  middleware: i = [],
302
300
  platform: s
303
- } = n, c = i.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(e));
304
- let l = await s.getElementRects({
301
+ } = n, c = s.detectOverflow ? s : {
302
+ ...s,
303
+ detectOverflow: Sn
304
+ }, a = await (s.isRTL == null ? void 0 : s.isRTL(e));
305
+ let f = await s.getElementRects({
305
306
  reference: t,
306
307
  floating: e,
307
308
  strategy: r
308
309
  }), {
309
- x: f,
310
+ x: l,
310
311
  y: u
311
- } = Yt(l, o, a), p = o, d = {}, h = 0;
312
- for (let x = 0; x < c.length; x++) {
313
- var m;
312
+ } = Qt(f, o, a), p = o, d = 0;
313
+ const h = {};
314
+ for (let m = 0; m < i.length; m++) {
315
+ const y = i[m];
316
+ if (!y)
317
+ continue;
314
318
  const {
315
319
  name: v,
316
- fn: A
317
- } = c[x], {
318
- x: b,
319
- y,
320
+ fn: P
321
+ } = y, {
322
+ x: A,
323
+ y: x,
320
324
  data: C,
321
325
  reset: R
322
- } = await A({
323
- x: f,
326
+ } = await P({
327
+ x: l,
324
328
  y: u,
325
329
  initialPlacement: o,
326
330
  placement: p,
327
331
  strategy: r,
328
- middlewareData: d,
329
- rects: l,
330
- platform: {
331
- ...s,
332
- detectOverflow: (m = s.detectOverflow) != null ? m : Sn
333
- },
332
+ middlewareData: h,
333
+ rects: f,
334
+ platform: c,
334
335
  elements: {
335
336
  reference: t,
336
337
  floating: e
337
338
  }
338
339
  });
339
- f = b ?? f, u = y ?? u, d = {
340
- ...d,
341
- [v]: {
342
- ...d[v],
343
- ...C
344
- }
345
- }, R && h <= 50 && (h++, typeof R == "object" && (R.placement && (p = R.placement), R.rects && (l = R.rects === !0 ? await s.getElementRects({
340
+ l = A ?? l, u = x ?? u, h[v] = {
341
+ ...h[v],
342
+ ...C
343
+ }, R && d < En && (d++, typeof R == "object" && (R.placement && (p = R.placement), R.rects && (f = R.rects === !0 ? await s.getElementRects({
346
344
  reference: t,
347
345
  floating: e,
348
346
  strategy: r
349
347
  }) : R.rects), {
350
- x: f,
348
+ x: l,
351
349
  y: u
352
- } = Yt(l, p, a)), x = -1);
350
+ } = Qt(f, p, a)), m = -1);
353
351
  }
354
352
  return {
355
- x: f,
353
+ x: l,
356
354
  y: u,
357
355
  placement: p,
358
356
  strategy: r,
359
- middlewareData: d
357
+ middlewareData: h
360
358
  };
361
359
  }, kn = (t) => ({
362
360
  name: "arrow",
@@ -371,31 +369,31 @@ const En = async (t, e, n) => {
371
369
  elements: c,
372
370
  middlewareData: a
373
371
  } = e, {
374
- element: l,
375
- padding: f = 0
376
- } = K(t, e) || {};
377
- if (l == null)
372
+ element: f,
373
+ padding: l = 0
374
+ } = Y(t, e) || {};
375
+ if (f == null)
378
376
  return {};
379
- const u = re(f), p = {
377
+ const u = se(l), p = {
380
378
  x: n,
381
379
  y: o
382
- }, d = Nt(r), h = Tt(d), m = await s.getDimensions(l), x = d === "y", v = x ? "top" : "left", A = x ? "bottom" : "right", b = x ? "clientHeight" : "clientWidth", y = i.reference[h] + i.reference[d] - p[d] - i.floating[h], C = p[d] - i.reference[d], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
383
- let O = R ? R[b] : 0;
384
- (!O || !await (s.isElement == null ? void 0 : s.isElement(R))) && (O = c.floating[b] || i.floating[h]);
385
- const L = y / 2 - C / 2, F = O / 2 - m[h] / 2 - 1, D = G(u[v], F), T = G(u[A], F), N = D, E = O - m[h] - T, S = O / 2 - m[h] / 2 + L, $ = Mt(N, S, E), k = !a.arrow && ot(r) != null && S !== $ && i.reference[h] / 2 - (S < N ? D : T) - m[h] / 2 < 0, M = k ? S < N ? S - N : S - E : 0;
380
+ }, d = $t(r), h = Ft(d), m = await s.getDimensions(f), y = d === "y", v = y ? "top" : "left", P = y ? "bottom" : "right", A = y ? "clientHeight" : "clientWidth", x = i.reference[h] + i.reference[d] - p[d] - i.floating[h], C = p[d] - i.reference[d], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(f));
381
+ let O = R ? R[A] : 0;
382
+ (!O || !await (s.isElement == null ? void 0 : s.isElement(R))) && (O = c.floating[A] || i.floating[h]);
383
+ const D = x / 2 - C / 2, F = O / 2 - m[h] / 2 - 1, _ = U(u[v], F), T = U(u[P], F), N = _, E = O - m[h] - T, S = O / 2 - m[h] / 2 + D, $ = Dt(N, S, E), M = !a.arrow && rt(r) != null && S !== $ && i.reference[h] / 2 - (S < N ? _ : T) - m[h] / 2 < 0, k = M ? S < N ? S - N : S - E : 0;
386
384
  return {
387
- [d]: p[d] + M,
385
+ [d]: p[d] + k,
388
386
  data: {
389
387
  [d]: $,
390
- centerOffset: S - $ - M,
391
- ...k && {
392
- alignmentOffset: M
388
+ centerOffset: S - $ - k,
389
+ ...M && {
390
+ alignmentOffset: k
393
391
  }
394
392
  },
395
- reset: k
393
+ reset: M
396
394
  };
397
395
  }
398
- }), Mn = function(t) {
396
+ }), _n = function(t) {
399
397
  return t === void 0 && (t = {}), {
400
398
  name: "flip",
401
399
  options: t,
@@ -407,69 +405,69 @@ const En = async (t, e, n) => {
407
405
  rects: s,
408
406
  initialPlacement: c,
409
407
  platform: a,
410
- elements: l
408
+ elements: f
411
409
  } = e, {
412
- mainAxis: f = !0,
410
+ mainAxis: l = !0,
413
411
  crossAxis: u = !0,
414
412
  fallbackPlacements: p,
415
413
  fallbackStrategy: d = "bestFit",
416
414
  fallbackAxisSideDirection: h = "none",
417
415
  flipAlignment: m = !0,
418
- ...x
419
- } = K(t, e);
416
+ ...y
417
+ } = Y(t, e);
420
418
  if ((n = i.arrow) != null && n.alignmentOffset)
421
419
  return {};
422
- const v = Q(r), A = V(c), b = Q(c) === c, y = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), C = p || (b || !m ? [gt(c)] : bn(c)), R = h !== "none";
423
- !p && R && C.push(...Rn(c, m, h, y));
424
- const O = [c, ...C], L = await a.detectOverflow(e, x), F = [];
425
- let D = ((o = i.flip) == null ? void 0 : o.overflows) || [];
426
- if (f && F.push(L[v]), u) {
427
- const S = yn(r, s, y);
428
- F.push(L[S[0]], L[S[1]]);
420
+ const v = K(r), P = V(c), A = K(c) === c, x = await (a.isRTL == null ? void 0 : a.isRTL(f.floating)), C = p || (A || !m ? [wt(c)] : An(c)), R = h !== "none";
421
+ !p && R && C.push(...Rn(c, m, h, x));
422
+ const O = [c, ...C], D = await a.detectOverflow(e, y), F = [];
423
+ let _ = ((o = i.flip) == null ? void 0 : o.overflows) || [];
424
+ if (l && F.push(D[v]), u) {
425
+ const S = yn(r, s, x);
426
+ F.push(D[S[0]], D[S[1]]);
429
427
  }
430
- if (D = [...D, {
428
+ if (_ = [..._, {
431
429
  placement: r,
432
430
  overflows: F
433
431
  }], !F.every((S) => S <= 0)) {
434
432
  var T, N;
435
433
  const S = (((T = i.flip) == null ? void 0 : T.index) || 0) + 1, $ = O[S];
436
- if ($ && (!(u === "alignment" ? A !== V($) : !1) || // We leave the current main axis only if every placement on that axis
434
+ if ($ && (!(u === "alignment" ? P !== V($) : !1) || // We leave the current main axis only if every placement on that axis
437
435
  // overflows the main axis.
438
- D.every((P) => V(P.placement) === A ? P.overflows[0] > 0 : !0)))
436
+ _.every((b) => V(b.placement) === P ? b.overflows[0] > 0 : !0)))
439
437
  return {
440
438
  data: {
441
439
  index: S,
442
- overflows: D
440
+ overflows: _
443
441
  },
444
442
  reset: {
445
443
  placement: $
446
444
  }
447
445
  };
448
- let k = (N = D.filter((M) => M.overflows[0] <= 0).sort((M, P) => M.overflows[1] - P.overflows[1])[0]) == null ? void 0 : N.placement;
449
- if (!k)
446
+ let M = (N = _.filter((k) => k.overflows[0] <= 0).sort((k, b) => k.overflows[1] - b.overflows[1])[0]) == null ? void 0 : N.placement;
447
+ if (!M)
450
448
  switch (d) {
451
449
  case "bestFit": {
452
450
  var E;
453
- const M = (E = D.filter((P) => {
451
+ const k = (E = _.filter((b) => {
454
452
  if (R) {
455
- const _ = V(P.placement);
456
- return _ === A || // Create a bias to the `y` side axis due to horizontal
453
+ const L = V(b.placement);
454
+ return L === P || // Create a bias to the `y` side axis due to horizontal
457
455
  // reading directions favoring greater width.
458
- _ === "y";
456
+ L === "y";
459
457
  }
460
458
  return !0;
461
- }).map((P) => [P.placement, P.overflows.filter((_) => _ > 0).reduce((_, z) => _ + z, 0)]).sort((P, _) => P[1] - _[1])[0]) == null ? void 0 : E[0];
462
- M && (k = M);
459
+ }).map((b) => [b.placement, b.overflows.filter((L) => L > 0).reduce((L, z) => L + z, 0)]).sort((b, L) => b[1] - L[1])[0]) == null ? void 0 : E[0];
460
+ k && (M = k);
463
461
  break;
464
462
  }
465
463
  case "initialPlacement":
466
- k = c;
464
+ M = c;
467
465
  break;
468
466
  }
469
- if (r !== k)
467
+ if (r !== M)
470
468
  return {
471
469
  reset: {
472
- placement: k
470
+ placement: M
473
471
  }
474
472
  };
475
473
  }
@@ -477,7 +475,7 @@ const En = async (t, e, n) => {
477
475
  }
478
476
  };
479
477
  };
480
- function Kt(t, e) {
478
+ function qt(t, e) {
481
479
  return {
482
480
  top: t.top - e.height,
483
481
  right: t.right - e.width,
@@ -485,8 +483,8 @@ function Kt(t, e) {
485
483
  left: t.left - e.width
486
484
  };
487
485
  }
488
- function Qt(t) {
489
- return gn.some((e) => t[e] >= 0);
486
+ function Ut(t) {
487
+ return vn.some((e) => t[e] >= 0);
490
488
  }
491
489
  const Dn = function(t) {
492
490
  return t === void 0 && (t = {}), {
@@ -499,17 +497,17 @@ const Dn = function(t) {
499
497
  } = e, {
500
498
  strategy: r = "referenceHidden",
501
499
  ...i
502
- } = K(t, e);
500
+ } = Y(t, e);
503
501
  switch (r) {
504
502
  case "referenceHidden": {
505
503
  const s = await o.detectOverflow(e, {
506
504
  ...i,
507
505
  elementContext: "reference"
508
- }), c = Kt(s, n.reference);
506
+ }), c = qt(s, n.reference);
509
507
  return {
510
508
  data: {
511
509
  referenceHiddenOffsets: c,
512
- referenceHidden: Qt(c)
510
+ referenceHidden: Ut(c)
513
511
  }
514
512
  };
515
513
  }
@@ -517,11 +515,11 @@ const Dn = function(t) {
517
515
  const s = await o.detectOverflow(e, {
518
516
  ...i,
519
517
  altBoundary: !0
520
- }), c = Kt(s, n.floating);
518
+ }), c = qt(s, n.floating);
521
519
  return {
522
520
  data: {
523
521
  escapedOffsets: c,
524
- escaped: Qt(c)
522
+ escaped: Ut(c)
525
523
  }
526
524
  };
527
525
  }
@@ -530,13 +528,13 @@ const Dn = function(t) {
530
528
  }
531
529
  }
532
530
  };
533
- }, ie = /* @__PURE__ */ new Set(["left", "top"]);
531
+ }, ce = /* @__PURE__ */ new Set(["left", "top"]);
534
532
  async function Ln(t, e) {
535
533
  const {
536
534
  placement: n,
537
535
  platform: o,
538
536
  elements: r
539
- } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = Q(n), c = ot(n), a = V(n) === "y", l = ie.has(s) ? -1 : 1, f = i && a ? -1 : 1, u = K(e, t);
537
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = K(n), c = rt(n), a = V(n) === "y", f = ce.has(s) ? -1 : 1, l = i && a ? -1 : 1, u = Y(e, t);
540
538
  let {
541
539
  mainAxis: p,
542
540
  crossAxis: d,
@@ -551,14 +549,14 @@ async function Ln(t, e) {
551
549
  alignmentAxis: u.alignmentAxis
552
550
  };
553
551
  return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), a ? {
554
- x: d * f,
555
- y: p * l
552
+ x: d * l,
553
+ y: p * f
556
554
  } : {
557
- x: p * l,
558
- y: d * f
555
+ x: p * f,
556
+ y: d * l
559
557
  };
560
558
  }
561
- const _n = function(t) {
559
+ const Tn = function(t) {
562
560
  return t === void 0 && (t = 0), {
563
561
  name: "offset",
564
562
  options: t,
@@ -580,7 +578,7 @@ const _n = function(t) {
580
578
  };
581
579
  }
582
580
  };
583
- }, Tn = function(t) {
581
+ }, Nn = function(t) {
584
582
  return t === void 0 && (t = {}), {
585
583
  name: "shift",
586
584
  options: t,
@@ -596,39 +594,39 @@ const _n = function(t) {
596
594
  limiter: a = {
597
595
  fn: (v) => {
598
596
  let {
599
- x: A,
600
- y: b
597
+ x: P,
598
+ y: A
601
599
  } = v;
602
600
  return {
603
- x: A,
604
- y: b
601
+ x: P,
602
+ y: A
605
603
  };
606
604
  }
607
605
  },
608
- ...l
609
- } = K(t, e), f = {
606
+ ...f
607
+ } = Y(t, e), l = {
610
608
  x: n,
611
609
  y: o
612
- }, u = await i.detectOverflow(e, l), p = V(Q(r)), d = _t(p);
613
- let h = f[d], m = f[p];
610
+ }, u = await i.detectOverflow(e, f), p = V(K(r)), d = Nt(p);
611
+ let h = l[d], m = l[p];
614
612
  if (s) {
615
- const v = d === "y" ? "top" : "left", A = d === "y" ? "bottom" : "right", b = h + u[v], y = h - u[A];
616
- h = Mt(b, h, y);
613
+ const v = d === "y" ? "top" : "left", P = d === "y" ? "bottom" : "right", A = h + u[v], x = h - u[P];
614
+ h = Dt(A, h, x);
617
615
  }
618
616
  if (c) {
619
- const v = p === "y" ? "top" : "left", A = p === "y" ? "bottom" : "right", b = m + u[v], y = m - u[A];
620
- m = Mt(b, m, y);
617
+ const v = p === "y" ? "top" : "left", P = p === "y" ? "bottom" : "right", A = m + u[v], x = m - u[P];
618
+ m = Dt(A, m, x);
621
619
  }
622
- const x = a.fn({
620
+ const y = a.fn({
623
621
  ...e,
624
622
  [d]: h,
625
623
  [p]: m
626
624
  });
627
625
  return {
628
- ...x,
626
+ ...y,
629
627
  data: {
630
- x: x.x - n,
631
- y: x.y - o,
628
+ x: y.x - n,
629
+ y: y.y - o,
632
630
  enabled: {
633
631
  [d]: s,
634
632
  [p]: c
@@ -637,7 +635,7 @@ const _n = function(t) {
637
635
  };
638
636
  }
639
637
  };
640
- }, Nn = function(t) {
638
+ }, Fn = function(t) {
641
639
  return t === void 0 && (t = {}), {
642
640
  options: t,
643
641
  fn(e) {
@@ -650,13 +648,13 @@ const _n = function(t) {
650
648
  } = e, {
651
649
  offset: c = 0,
652
650
  mainAxis: a = !0,
653
- crossAxis: l = !0
654
- } = K(t, e), f = {
651
+ crossAxis: f = !0
652
+ } = Y(t, e), l = {
655
653
  x: n,
656
654
  y: o
657
- }, u = V(r), p = _t(u);
658
- let d = f[p], h = f[u];
659
- const m = K(c, e), x = typeof m == "number" ? {
655
+ }, u = V(r), p = Nt(u);
656
+ let d = l[p], h = l[u];
657
+ const m = Y(c, e), y = typeof m == "number" ? {
660
658
  mainAxis: m,
661
659
  crossAxis: 0
662
660
  } : {
@@ -665,12 +663,12 @@ const _n = function(t) {
665
663
  ...m
666
664
  };
667
665
  if (a) {
668
- const b = p === "y" ? "height" : "width", y = i.reference[p] - i.floating[b] + x.mainAxis, C = i.reference[p] + i.reference[b] - x.mainAxis;
669
- d < y ? d = y : d > C && (d = C);
666
+ const A = p === "y" ? "height" : "width", x = i.reference[p] - i.floating[A] + y.mainAxis, C = i.reference[p] + i.reference[A] - y.mainAxis;
667
+ d < x ? d = x : d > C && (d = C);
670
668
  }
671
- if (l) {
672
- var v, A;
673
- const b = p === "y" ? "width" : "height", y = ie.has(Q(r)), C = i.reference[u] - i.floating[b] + (y && ((v = s.offset) == null ? void 0 : v[u]) || 0) + (y ? 0 : x.crossAxis), R = i.reference[u] + i.reference[b] + (y ? 0 : ((A = s.offset) == null ? void 0 : A[u]) || 0) - (y ? x.crossAxis : 0);
669
+ if (f) {
670
+ var v, P;
671
+ const A = p === "y" ? "width" : "height", x = ce.has(K(r)), C = i.reference[u] - i.floating[A] + (x && ((v = s.offset) == null ? void 0 : v[u]) || 0) + (x ? 0 : y.crossAxis), R = i.reference[u] + i.reference[A] + (x ? 0 : ((P = s.offset) == null ? void 0 : P[u]) || 0) - (x ? y.crossAxis : 0);
674
672
  h < C ? h = C : h > R && (h = R);
675
673
  }
676
674
  return {
@@ -679,7 +677,7 @@ const _n = function(t) {
679
677
  };
680
678
  }
681
679
  };
682
- }, Fn = function(t) {
680
+ }, $n = function(t) {
683
681
  return t === void 0 && (t = {}), {
684
682
  name: "size",
685
683
  options: t,
@@ -693,22 +691,22 @@ const _n = function(t) {
693
691
  } = e, {
694
692
  apply: a = () => {
695
693
  },
696
- ...l
697
- } = K(t, e), f = await s.detectOverflow(e, l), u = Q(r), p = ot(r), d = V(r) === "y", {
694
+ ...f
695
+ } = Y(t, e), l = await s.detectOverflow(e, f), u = K(r), p = rt(r), d = V(r) === "y", {
698
696
  width: h,
699
697
  height: m
700
698
  } = i.floating;
701
- let x, v;
702
- u === "top" || u === "bottom" ? (x = u, v = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (v = u, x = p === "end" ? "top" : "bottom");
703
- const A = m - f.top - f.bottom, b = h - f.left - f.right, y = G(m - f[x], A), C = G(h - f[v], b), R = !e.middlewareData.shift;
704
- let O = y, L = C;
705
- if ((n = e.middlewareData.shift) != null && n.enabled.x && (L = b), (o = e.middlewareData.shift) != null && o.enabled.y && (O = A), R && !p) {
706
- const D = W(f.left, 0), T = W(f.right, 0), N = W(f.top, 0), E = W(f.bottom, 0);
707
- d ? L = h - 2 * (D !== 0 || T !== 0 ? D + T : W(f.left, f.right)) : O = m - 2 * (N !== 0 || E !== 0 ? N + E : W(f.top, f.bottom));
699
+ let y, v;
700
+ u === "top" || u === "bottom" ? (y = u, v = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (v = u, y = p === "end" ? "top" : "bottom");
701
+ const P = m - l.top - l.bottom, A = h - l.left - l.right, x = U(m - l[y], P), C = U(h - l[v], A), R = !e.middlewareData.shift;
702
+ let O = x, D = C;
703
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (D = A), (o = e.middlewareData.shift) != null && o.enabled.y && (O = P), R && !p) {
704
+ const _ = W(l.left, 0), T = W(l.right, 0), N = W(l.top, 0), E = W(l.bottom, 0);
705
+ d ? D = h - 2 * (_ !== 0 || T !== 0 ? _ + T : W(l.left, l.right)) : O = m - 2 * (N !== 0 || E !== 0 ? N + E : W(l.top, l.bottom));
708
706
  }
709
707
  await a({
710
708
  ...e,
711
- availableWidth: L,
709
+ availableWidth: D,
712
710
  availableHeight: O
713
711
  });
714
712
  const F = await s.getDimensions(c.floating);
@@ -720,83 +718,83 @@ const _n = function(t) {
720
718
  }
721
719
  };
722
720
  };
723
- function bt() {
721
+ function Pt() {
724
722
  return typeof window < "u";
725
723
  }
726
- function rt(t) {
727
- return se(t) ? (t.nodeName || "").toLowerCase() : "#document";
724
+ function it(t) {
725
+ return ae(t) ? (t.nodeName || "").toLowerCase() : "#document";
728
726
  }
729
727
  function H(t) {
730
728
  var e;
731
729
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
732
730
  }
733
- function Y(t) {
731
+ function X(t) {
734
732
  var e;
735
- return (e = (se(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
733
+ return (e = (ae(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
736
734
  }
737
- function se(t) {
738
- return bt() ? t instanceof Node || t instanceof H(t).Node : !1;
735
+ function ae(t) {
736
+ return Pt() ? t instanceof Node || t instanceof H(t).Node : !1;
739
737
  }
740
738
  function I(t) {
741
- return bt() ? t instanceof Element || t instanceof H(t).Element : !1;
739
+ return Pt() ? t instanceof Element || t instanceof H(t).Element : !1;
742
740
  }
743
- function X(t) {
744
- return bt() ? t instanceof HTMLElement || t instanceof H(t).HTMLElement : !1;
741
+ function Q(t) {
742
+ return Pt() ? t instanceof HTMLElement || t instanceof H(t).HTMLElement : !1;
745
743
  }
746
- function qt(t) {
747
- return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof H(t).ShadowRoot;
744
+ function Gt(t) {
745
+ return !Pt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof H(t).ShadowRoot;
748
746
  }
749
- const $n = /* @__PURE__ */ new Set(["inline", "contents"]);
750
- function ft(t) {
747
+ function ut(t) {
751
748
  const {
752
749
  overflow: e,
753
750
  overflowX: n,
754
751
  overflowY: o,
755
752
  display: r
756
753
  } = B(t);
757
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !$n.has(r);
754
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && r !== "inline" && r !== "contents";
758
755
  }
759
- const Wn = /* @__PURE__ */ new Set(["table", "td", "th"]);
760
- function Hn(t) {
761
- return Wn.has(rt(t));
756
+ function Wn(t) {
757
+ return /^(table|td|th)$/.test(it(t));
762
758
  }
763
- const In = [":popover-open", ":modal"];
764
- function At(t) {
765
- return In.some((e) => {
766
- try {
767
- return t.matches(e);
768
- } catch {
769
- return !1;
770
- }
771
- });
759
+ function bt(t) {
760
+ try {
761
+ if (t.matches(":popover-open"))
762
+ return !0;
763
+ } catch {
764
+ }
765
+ try {
766
+ return t.matches(":modal");
767
+ } catch {
768
+ return !1;
769
+ }
772
770
  }
773
- const Bn = ["transform", "translate", "scale", "rotate", "perspective"], zn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Vn = ["paint", "layout", "strict", "content"];
774
- function Ft(t) {
775
- const e = $t(), n = I(t) ? B(t) : t;
776
- return Bn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || zn.some((o) => (n.willChange || "").includes(o)) || Vn.some((o) => (n.contain || "").includes(o));
771
+ const Hn = /transform|translate|scale|rotate|perspective|filter/, In = /paint|layout|strict|content/, J = (t) => !!t && t !== "none";
772
+ let St;
773
+ function Wt(t) {
774
+ const e = I(t) ? B(t) : t;
775
+ return J(e.transform) || J(e.translate) || J(e.scale) || J(e.rotate) || J(e.perspective) || !Ht() && (J(e.backdropFilter) || J(e.filter)) || Hn.test(e.willChange || "") || In.test(e.contain || "");
777
776
  }
778
- function jn(t) {
779
- let e = U(t);
780
- for (; X(e) && !et(e); ) {
781
- if (Ft(e))
777
+ function Bn(t) {
778
+ let e = G(t);
779
+ for (; Q(e) && !nt(e); ) {
780
+ if (Wt(e))
782
781
  return e;
783
- if (At(e))
782
+ if (bt(e))
784
783
  return null;
785
- e = U(e);
784
+ e = G(e);
786
785
  }
787
786
  return null;
788
787
  }
789
- function $t() {
790
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
788
+ function Ht() {
789
+ return St == null && (St = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), St;
791
790
  }
792
- const Xn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
793
- function et(t) {
794
- return Xn.has(rt(t));
791
+ function nt(t) {
792
+ return /^(html|body|#document)$/.test(it(t));
795
793
  }
796
794
  function B(t) {
797
795
  return H(t).getComputedStyle(t);
798
796
  }
799
- function Pt(t) {
797
+ function Ct(t) {
800
798
  return I(t) ? {
801
799
  scrollLeft: t.scrollLeft,
802
800
  scrollTop: t.scrollTop
@@ -805,140 +803,140 @@ function Pt(t) {
805
803
  scrollTop: t.scrollY
806
804
  };
807
805
  }
808
- function U(t) {
809
- if (rt(t) === "html")
806
+ function G(t) {
807
+ if (it(t) === "html")
810
808
  return t;
811
809
  const e = (
812
810
  // Step into the shadow DOM of the parent of a slotted node.
813
811
  t.assignedSlot || // DOM Element detected.
814
812
  t.parentNode || // ShadowRoot detected.
815
- qt(t) && t.host || // Fallback.
816
- Y(t)
813
+ Gt(t) && t.host || // Fallback.
814
+ X(t)
817
815
  );
818
- return qt(e) ? e.host : e;
816
+ return Gt(e) ? e.host : e;
819
817
  }
820
- function ce(t) {
821
- const e = U(t);
822
- return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : X(e) && ft(e) ? e : ce(e);
818
+ function le(t) {
819
+ const e = G(t);
820
+ return nt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : Q(e) && ut(e) ? e : le(e);
823
821
  }
824
- function at(t, e, n) {
822
+ function lt(t, e, n) {
825
823
  var o;
826
824
  e === void 0 && (e = []), n === void 0 && (n = !0);
827
- const r = ce(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = H(r);
825
+ const r = le(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = H(r);
828
826
  if (i) {
829
- const c = Lt(s);
830
- return e.concat(s, s.visualViewport || [], ft(r) ? r : [], c && n ? at(c) : []);
831
- }
832
- return e.concat(r, at(r, [], n));
827
+ const c = Tt(s);
828
+ return e.concat(s, s.visualViewport || [], ut(r) ? r : [], c && n ? lt(c) : []);
829
+ } else
830
+ return e.concat(r, lt(r, [], n));
833
831
  }
834
- function Lt(t) {
832
+ function Tt(t) {
835
833
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
836
834
  }
837
- function ae(t) {
835
+ function fe(t) {
838
836
  const e = B(t);
839
837
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
840
- const r = X(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = mt(n) !== i || mt(o) !== s;
838
+ const r = Q(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = gt(n) !== i || gt(o) !== s;
841
839
  return c && (n = i, o = s), {
842
840
  width: n,
843
841
  height: o,
844
842
  $: c
845
843
  };
846
844
  }
847
- function Wt(t) {
845
+ function It(t) {
848
846
  return I(t) ? t : t.contextElement;
849
847
  }
850
- function tt(t) {
851
- const e = Wt(t);
852
- if (!X(e))
848
+ function et(t) {
849
+ const e = It(t);
850
+ if (!Q(e))
853
851
  return j(1);
854
852
  const n = e.getBoundingClientRect(), {
855
853
  width: o,
856
854
  height: r,
857
855
  $: i
858
- } = ae(e);
859
- let s = (i ? mt(n.width) : n.width) / o, c = (i ? mt(n.height) : n.height) / r;
856
+ } = fe(e);
857
+ let s = (i ? gt(n.width) : n.width) / o, c = (i ? gt(n.height) : n.height) / r;
860
858
  return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
861
859
  x: s,
862
860
  y: c
863
861
  };
864
862
  }
865
- const Yn = /* @__PURE__ */ j(0);
866
- function le(t) {
863
+ const zn = /* @__PURE__ */ j(0);
864
+ function ue(t) {
867
865
  const e = H(t);
868
- return !$t() || !e.visualViewport ? Yn : {
866
+ return !Ht() || !e.visualViewport ? zn : {
869
867
  x: e.visualViewport.offsetLeft,
870
868
  y: e.visualViewport.offsetTop
871
869
  };
872
870
  }
873
- function Kn(t, e, n) {
871
+ function Vn(t, e, n) {
874
872
  return e === void 0 && (e = !1), !n || e && n !== H(t) ? !1 : e;
875
873
  }
876
- function J(t, e, n, o) {
874
+ function tt(t, e, n, o) {
877
875
  e === void 0 && (e = !1), n === void 0 && (n = !1);
878
- const r = t.getBoundingClientRect(), i = Wt(t);
876
+ const r = t.getBoundingClientRect(), i = It(t);
879
877
  let s = j(1);
880
- e && (o ? I(o) && (s = tt(o)) : s = tt(t));
881
- const c = Kn(i, n, o) ? le(i) : j(0);
882
- let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, f = r.width / s.x, u = r.height / s.y;
878
+ e && (o ? I(o) && (s = et(o)) : s = et(t));
879
+ const c = Vn(i, n, o) ? ue(i) : j(0);
880
+ let a = (r.left + c.x) / s.x, f = (r.top + c.y) / s.y, l = r.width / s.x, u = r.height / s.y;
883
881
  if (i) {
884
882
  const p = H(i), d = o && I(o) ? H(o) : o;
885
- let h = p, m = Lt(h);
883
+ let h = p, m = Tt(h);
886
884
  for (; m && o && d !== h; ) {
887
- const x = tt(m), v = m.getBoundingClientRect(), A = B(m), b = v.left + (m.clientLeft + parseFloat(A.paddingLeft)) * x.x, y = v.top + (m.clientTop + parseFloat(A.paddingTop)) * x.y;
888
- a *= x.x, l *= x.y, f *= x.x, u *= x.y, a += b, l += y, h = H(m), m = Lt(h);
885
+ const y = et(m), v = m.getBoundingClientRect(), P = B(m), A = v.left + (m.clientLeft + parseFloat(P.paddingLeft)) * y.x, x = v.top + (m.clientTop + parseFloat(P.paddingTop)) * y.y;
886
+ a *= y.x, f *= y.y, l *= y.x, u *= y.y, a += A, f += x, h = H(m), m = Tt(h);
889
887
  }
890
888
  }
891
- return wt({
892
- width: f,
889
+ return vt({
890
+ width: l,
893
891
  height: u,
894
892
  x: a,
895
- y: l
893
+ y: f
896
894
  });
897
895
  }
898
- function Ct(t, e) {
899
- const n = Pt(t).scrollLeft;
900
- return e ? e.left + n : J(Y(t)).left + n;
896
+ function Rt(t, e) {
897
+ const n = Ct(t).scrollLeft;
898
+ return e ? e.left + n : tt(X(t)).left + n;
901
899
  }
902
- function fe(t, e) {
903
- const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - Ct(t, n), r = n.top + e.scrollTop;
900
+ function de(t, e) {
901
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - Rt(t, n), r = n.top + e.scrollTop;
904
902
  return {
905
903
  x: o,
906
904
  y: r
907
905
  };
908
906
  }
909
- function Qn(t) {
907
+ function jn(t) {
910
908
  let {
911
909
  elements: e,
912
910
  rect: n,
913
911
  offsetParent: o,
914
912
  strategy: r
915
913
  } = t;
916
- const i = r === "fixed", s = Y(o), c = e ? At(e.floating) : !1;
914
+ const i = r === "fixed", s = X(o), c = e ? bt(e.floating) : !1;
917
915
  if (o === s || c && i)
918
916
  return n;
919
917
  let a = {
920
918
  scrollLeft: 0,
921
919
  scrollTop: 0
922
- }, l = j(1);
923
- const f = j(0), u = X(o);
924
- if ((u || !u && !i) && ((rt(o) !== "body" || ft(s)) && (a = Pt(o)), X(o))) {
925
- const d = J(o);
926
- l = tt(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
920
+ }, f = j(1);
921
+ const l = j(0), u = Q(o);
922
+ if ((u || !u && !i) && ((it(o) !== "body" || ut(s)) && (a = Ct(o)), u)) {
923
+ const d = tt(o);
924
+ f = et(o), l.x = d.x + o.clientLeft, l.y = d.y + o.clientTop;
927
925
  }
928
- const p = s && !u && !i ? fe(s, a) : j(0);
926
+ const p = s && !u && !i ? de(s, a) : j(0);
929
927
  return {
930
- width: n.width * l.x,
931
- height: n.height * l.y,
932
- x: n.x * l.x - a.scrollLeft * l.x + f.x + p.x,
933
- y: n.y * l.y - a.scrollTop * l.y + f.y + p.y
928
+ width: n.width * f.x,
929
+ height: n.height * f.y,
930
+ x: n.x * f.x - a.scrollLeft * f.x + l.x + p.x,
931
+ y: n.y * f.y - a.scrollTop * f.y + l.y + p.y
934
932
  };
935
933
  }
936
- function qn(t) {
934
+ function Xn(t) {
937
935
  return Array.from(t.getClientRects());
938
936
  }
939
- function Gn(t) {
940
- const e = Y(t), n = Pt(t), o = t.ownerDocument.body, r = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
941
- let s = -n.scrollLeft + Ct(t);
937
+ function Yn(t) {
938
+ const e = X(t), n = Ct(t), o = t.ownerDocument.body, r = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
939
+ let s = -n.scrollLeft + Rt(t);
942
940
  const c = -n.scrollTop;
943
941
  return B(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - r), {
944
942
  width: r,
@@ -947,20 +945,20 @@ function Gn(t) {
947
945
  y: c
948
946
  };
949
947
  }
950
- const Gt = 25;
951
- function Un(t, e) {
952
- const n = H(t), o = Y(t), r = n.visualViewport;
948
+ const Zt = 25;
949
+ function Kn(t, e) {
950
+ const n = H(t), o = X(t), r = n.visualViewport;
953
951
  let i = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
954
952
  if (r) {
955
953
  i = r.width, s = r.height;
956
- const f = $t();
957
- (!f || f && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
954
+ const l = Ht();
955
+ (!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
958
956
  }
959
- const l = Ct(o);
960
- if (l <= 0) {
961
- const f = o.ownerDocument, u = f.body, p = getComputedStyle(u), d = f.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, h = Math.abs(o.clientWidth - u.clientWidth - d);
962
- h <= Gt && (i -= h);
963
- } else l <= Gt && (i += l);
957
+ const f = Rt(o);
958
+ if (f <= 0) {
959
+ const l = o.ownerDocument, u = l.body, p = getComputedStyle(u), d = l.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, h = Math.abs(o.clientWidth - u.clientWidth - d);
960
+ h <= Zt && (i -= h);
961
+ } else f <= Zt && (i += f);
964
962
  return {
965
963
  width: i,
966
964
  height: s,
@@ -968,26 +966,25 @@ function Un(t, e) {
968
966
  y: a
969
967
  };
970
968
  }
971
- const Zn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
972
- function Jn(t, e) {
973
- const n = J(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = X(t) ? tt(t) : j(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = o * i.y;
969
+ function Qn(t, e) {
970
+ const n = tt(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = Q(t) ? et(t) : j(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, f = o * i.y;
974
971
  return {
975
972
  width: s,
976
973
  height: c,
977
974
  x: a,
978
- y: l
975
+ y: f
979
976
  };
980
977
  }
981
- function Ut(t, e, n) {
978
+ function Jt(t, e, n) {
982
979
  let o;
983
980
  if (e === "viewport")
984
- o = Un(t, n);
981
+ o = Kn(t, n);
985
982
  else if (e === "document")
986
- o = Gn(Y(t));
983
+ o = Yn(X(t));
987
984
  else if (I(e))
988
- o = Jn(e, n);
985
+ o = Qn(e, n);
989
986
  else {
990
- const r = le(t);
987
+ const r = ue(t);
991
988
  o = {
992
989
  x: e.x - r.x,
993
990
  y: e.y - r.y,
@@ -995,70 +992,72 @@ function Ut(t, e, n) {
995
992
  height: e.height
996
993
  };
997
994
  }
998
- return wt(o);
995
+ return vt(o);
999
996
  }
1000
- function ue(t, e) {
1001
- const n = U(t);
1002
- return n === e || !I(n) || et(n) ? !1 : B(n).position === "fixed" || ue(n, e);
997
+ function pe(t, e) {
998
+ const n = G(t);
999
+ return n === e || !I(n) || nt(n) ? !1 : B(n).position === "fixed" || pe(n, e);
1003
1000
  }
1004
- function to(t, e) {
1001
+ function qn(t, e) {
1005
1002
  const n = e.get(t);
1006
1003
  if (n)
1007
1004
  return n;
1008
- let o = at(t, [], !1).filter((c) => I(c) && rt(c) !== "body"), r = null;
1005
+ let o = lt(t, [], !1).filter((c) => I(c) && it(c) !== "body"), r = null;
1009
1006
  const i = B(t).position === "fixed";
1010
- let s = i ? U(t) : t;
1011
- for (; I(s) && !et(s); ) {
1012
- const c = B(s), a = Ft(s);
1013
- !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && Zn.has(r.position) || ft(s) && !a && ue(t, s)) ? o = o.filter((f) => f !== s) : r = c, s = U(s);
1007
+ let s = i ? G(t) : t;
1008
+ for (; I(s) && !nt(s); ) {
1009
+ const c = B(s), a = Wt(s);
1010
+ !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && (r.position === "absolute" || r.position === "fixed") || ut(s) && !a && pe(t, s)) ? o = o.filter((l) => l !== s) : r = c, s = G(s);
1014
1011
  }
1015
1012
  return e.set(t, o), o;
1016
1013
  }
1017
- function eo(t) {
1014
+ function Un(t) {
1018
1015
  let {
1019
1016
  element: e,
1020
1017
  boundary: n,
1021
1018
  rootBoundary: o,
1022
1019
  strategy: r
1023
1020
  } = t;
1024
- const s = [...n === "clippingAncestors" ? At(e) ? [] : to(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, f) => {
1025
- const u = Ut(e, f, r);
1026
- return l.top = W(u.top, l.top), l.right = G(u.right, l.right), l.bottom = G(u.bottom, l.bottom), l.left = W(u.left, l.left), l;
1027
- }, Ut(e, c, r));
1021
+ const s = [...n === "clippingAncestors" ? bt(e) ? [] : qn(e, this._c) : [].concat(n), o], c = Jt(e, s[0], r);
1022
+ let a = c.top, f = c.right, l = c.bottom, u = c.left;
1023
+ for (let p = 1; p < s.length; p++) {
1024
+ const d = Jt(e, s[p], r);
1025
+ a = W(d.top, a), f = U(d.right, f), l = U(d.bottom, l), u = W(d.left, u);
1026
+ }
1028
1027
  return {
1029
- width: a.right - a.left,
1030
- height: a.bottom - a.top,
1031
- x: a.left,
1032
- y: a.top
1028
+ width: f - u,
1029
+ height: l - a,
1030
+ x: u,
1031
+ y: a
1033
1032
  };
1034
1033
  }
1035
- function no(t) {
1034
+ function Gn(t) {
1036
1035
  const {
1037
1036
  width: e,
1038
1037
  height: n
1039
- } = ae(t);
1038
+ } = fe(t);
1040
1039
  return {
1041
1040
  width: e,
1042
1041
  height: n
1043
1042
  };
1044
1043
  }
1045
- function oo(t, e, n) {
1046
- const o = X(e), r = Y(e), i = n === "fixed", s = J(t, !0, i, e);
1044
+ function Zn(t, e, n) {
1045
+ const o = Q(e), r = X(e), i = n === "fixed", s = tt(t, !0, i, e);
1047
1046
  let c = {
1048
1047
  scrollLeft: 0,
1049
1048
  scrollTop: 0
1050
1049
  };
1051
1050
  const a = j(0);
1052
- function l() {
1053
- a.x = Ct(r);
1051
+ function f() {
1052
+ a.x = Rt(r);
1054
1053
  }
1055
1054
  if (o || !o && !i)
1056
- if ((rt(e) !== "body" || ft(r)) && (c = Pt(e)), o) {
1057
- const d = J(e, !0, i, e);
1055
+ if ((it(e) !== "body" || ut(r)) && (c = Ct(e)), o) {
1056
+ const d = tt(e, !0, i, e);
1058
1057
  a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
1059
- } else r && l();
1060
- i && !o && r && l();
1061
- const f = r && !o && !i ? fe(r, c) : j(0), u = s.left + c.scrollLeft - a.x - f.x, p = s.top + c.scrollTop - a.y - f.y;
1058
+ } else r && f();
1059
+ i && !o && r && f();
1060
+ const l = r && !o && !i ? de(r, c) : j(0), u = s.left + c.scrollLeft - a.x - l.x, p = s.top + c.scrollTop - a.y - l.y;
1062
1061
  return {
1063
1062
  x: u,
1064
1063
  y: p,
@@ -1066,39 +1065,39 @@ function oo(t, e, n) {
1066
1065
  height: s.height
1067
1066
  };
1068
1067
  }
1069
- function Ot(t) {
1068
+ function Et(t) {
1070
1069
  return B(t).position === "static";
1071
1070
  }
1072
- function Zt(t, e) {
1073
- if (!X(t) || B(t).position === "fixed")
1071
+ function te(t, e) {
1072
+ if (!Q(t) || B(t).position === "fixed")
1074
1073
  return null;
1075
1074
  if (e)
1076
1075
  return e(t);
1077
1076
  let n = t.offsetParent;
1078
- return Y(t) === n && (n = n.ownerDocument.body), n;
1077
+ return X(t) === n && (n = n.ownerDocument.body), n;
1079
1078
  }
1080
- function de(t, e) {
1079
+ function he(t, e) {
1081
1080
  const n = H(t);
1082
- if (At(t))
1081
+ if (bt(t))
1083
1082
  return n;
1084
- if (!X(t)) {
1085
- let r = U(t);
1086
- for (; r && !et(r); ) {
1087
- if (I(r) && !Ot(r))
1083
+ if (!Q(t)) {
1084
+ let r = G(t);
1085
+ for (; r && !nt(r); ) {
1086
+ if (I(r) && !Et(r))
1088
1087
  return r;
1089
- r = U(r);
1088
+ r = G(r);
1090
1089
  }
1091
1090
  return n;
1092
1091
  }
1093
- let o = Zt(t, e);
1094
- for (; o && Hn(o) && Ot(o); )
1095
- o = Zt(o, e);
1096
- return o && et(o) && Ot(o) && !Ft(o) ? n : o || jn(t) || n;
1092
+ let o = te(t, e);
1093
+ for (; o && Wn(o) && Et(o); )
1094
+ o = te(o, e);
1095
+ return o && nt(o) && Et(o) && !Wt(o) ? n : o || Bn(t) || n;
1097
1096
  }
1098
- const ro = async function(t) {
1099
- const e = this.getOffsetParent || de, n = this.getDimensions, o = await n(t.floating);
1097
+ const Jn = async function(t) {
1098
+ const e = this.getOffsetParent || he, n = this.getDimensions, o = await n(t.floating);
1100
1099
  return {
1101
- reference: oo(t.reference, await e(t.floating), t.strategy),
1100
+ reference: Zn(t.reference, await e(t.floating), t.strategy),
1102
1101
  floating: {
1103
1102
  x: 0,
1104
1103
  y: 0,
@@ -1107,71 +1106,71 @@ const ro = async function(t) {
1107
1106
  }
1108
1107
  };
1109
1108
  };
1110
- function io(t) {
1109
+ function to(t) {
1111
1110
  return B(t).direction === "rtl";
1112
1111
  }
1113
- const so = {
1114
- convertOffsetParentRelativeRectToViewportRelativeRect: Qn,
1115
- getDocumentElement: Y,
1116
- getClippingRect: eo,
1117
- getOffsetParent: de,
1118
- getElementRects: ro,
1119
- getClientRects: qn,
1120
- getDimensions: no,
1121
- getScale: tt,
1112
+ const eo = {
1113
+ convertOffsetParentRelativeRectToViewportRelativeRect: jn,
1114
+ getDocumentElement: X,
1115
+ getClippingRect: Un,
1116
+ getOffsetParent: he,
1117
+ getElementRects: Jn,
1118
+ getClientRects: Xn,
1119
+ getDimensions: Gn,
1120
+ getScale: et,
1122
1121
  isElement: I,
1123
- isRTL: io
1122
+ isRTL: to
1124
1123
  };
1125
- function pe(t, e) {
1124
+ function me(t, e) {
1126
1125
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1127
1126
  }
1128
- function co(t, e) {
1127
+ function no(t, e) {
1129
1128
  let n = null, o;
1130
- const r = Y(t);
1129
+ const r = X(t);
1131
1130
  function i() {
1132
1131
  var c;
1133
1132
  clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
1134
1133
  }
1135
1134
  function s(c, a) {
1136
1135
  c === void 0 && (c = !1), a === void 0 && (a = 1), i();
1137
- const l = t.getBoundingClientRect(), {
1138
- left: f,
1136
+ const f = t.getBoundingClientRect(), {
1137
+ left: l,
1139
1138
  top: u,
1140
1139
  width: p,
1141
1140
  height: d
1142
- } = l;
1141
+ } = f;
1143
1142
  if (c || e(), !p || !d)
1144
1143
  return;
1145
- const h = pt(u), m = pt(r.clientWidth - (f + p)), x = pt(r.clientHeight - (u + d)), v = pt(f), b = {
1146
- rootMargin: -h + "px " + -m + "px " + -x + "px " + -v + "px",
1147
- threshold: W(0, G(1, a)) || 1
1144
+ const h = ht(u), m = ht(r.clientWidth - (l + p)), y = ht(r.clientHeight - (u + d)), v = ht(l), A = {
1145
+ rootMargin: -h + "px " + -m + "px " + -y + "px " + -v + "px",
1146
+ threshold: W(0, U(1, a)) || 1
1148
1147
  };
1149
- let y = !0;
1148
+ let x = !0;
1150
1149
  function C(R) {
1151
1150
  const O = R[0].intersectionRatio;
1152
1151
  if (O !== a) {
1153
- if (!y)
1152
+ if (!x)
1154
1153
  return s();
1155
1154
  O ? s(!1, O) : o = setTimeout(() => {
1156
1155
  s(!1, 1e-7);
1157
1156
  }, 1e3);
1158
1157
  }
1159
- O === 1 && !pe(l, t.getBoundingClientRect()) && s(), y = !1;
1158
+ O === 1 && !me(f, t.getBoundingClientRect()) && s(), x = !1;
1160
1159
  }
1161
1160
  try {
1162
1161
  n = new IntersectionObserver(C, {
1163
- ...b,
1162
+ ...A,
1164
1163
  // Handle <iframe>s
1165
1164
  root: r.ownerDocument
1166
1165
  });
1167
1166
  } catch {
1168
- n = new IntersectionObserver(C, b);
1167
+ n = new IntersectionObserver(C, A);
1169
1168
  }
1170
1169
  n.observe(t);
1171
1170
  }
1172
1171
  return s(!0), i;
1173
1172
  }
1174
- function ao(t, e, n, o) {
1173
+ function oo(t, e, n, o) {
1175
1174
  o === void 0 && (o = {});
1176
1175
  const {
1177
1176
  ancestorScroll: r = !0,
@@ -1179,50 +1178,50 @@ function ao(t, e, n, o) {
1179
1178
  elementResize: s = typeof ResizeObserver == "function",
1180
1179
  layoutShift: c = typeof IntersectionObserver == "function",
1181
1180
  animationFrame: a = !1
1182
- } = o, l = Wt(t), f = r || i ? [...l ? at(l) : [], ...at(e)] : [];
1183
- f.forEach((v) => {
1181
+ } = o, f = It(t), l = r || i ? [...f ? lt(f) : [], ...e ? lt(e) : []] : [];
1182
+ l.forEach((v) => {
1184
1183
  r && v.addEventListener("scroll", n, {
1185
1184
  passive: !0
1186
1185
  }), i && v.addEventListener("resize", n);
1187
1186
  });
1188
- const u = l && c ? co(l, n) : null;
1187
+ const u = f && c ? no(f, n) : null;
1189
1188
  let p = -1, d = null;
1190
1189
  s && (d = new ResizeObserver((v) => {
1191
- let [A] = v;
1192
- A && A.target === l && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1193
- var b;
1194
- (b = d) == null || b.observe(e);
1190
+ let [P] = v;
1191
+ P && P.target === f && d && e && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1192
+ var A;
1193
+ (A = d) == null || A.observe(e);
1195
1194
  })), n();
1196
- }), l && !a && d.observe(l), d.observe(e));
1197
- let h, m = a ? J(t) : null;
1198
- a && x();
1199
- function x() {
1200
- const v = J(t);
1201
- m && !pe(m, v) && n(), m = v, h = requestAnimationFrame(x);
1195
+ }), f && !a && d.observe(f), e && d.observe(e));
1196
+ let h, m = a ? tt(t) : null;
1197
+ a && y();
1198
+ function y() {
1199
+ const v = tt(t);
1200
+ m && !me(m, v) && n(), m = v, h = requestAnimationFrame(y);
1202
1201
  }
1203
1202
  return n(), () => {
1204
1203
  var v;
1205
- f.forEach((A) => {
1206
- r && A.removeEventListener("scroll", n), i && A.removeEventListener("resize", n);
1204
+ l.forEach((P) => {
1205
+ r && P.removeEventListener("scroll", n), i && P.removeEventListener("resize", n);
1207
1206
  }), u?.(), (v = d) == null || v.disconnect(), d = null, a && cancelAnimationFrame(h);
1208
1207
  };
1209
1208
  }
1210
- const lo = _n, fo = Tn, uo = Mn, po = Fn, ho = Dn, Jt = kn, mo = Nn, go = (t, e, n) => {
1209
+ const ro = Tn, io = Nn, so = _n, co = $n, ao = Dn, ee = kn, lo = Fn, fo = (t, e, n) => {
1211
1210
  const o = /* @__PURE__ */ new Map(), r = {
1212
- platform: so,
1211
+ platform: eo,
1213
1212
  ...n
1214
1213
  }, i = {
1215
1214
  ...r.platform,
1216
1215
  _c: o
1217
1216
  };
1218
- return En(t, e, {
1217
+ return Mn(t, e, {
1219
1218
  ...r,
1220
1219
  platform: i
1221
1220
  });
1222
1221
  };
1223
- var wo = typeof document < "u", vo = function() {
1224
- }, ht = wo ? qe : vo;
1225
- function vt(t, e) {
1222
+ var uo = typeof document < "u", po = function() {
1223
+ }, mt = uo ? Ge : po;
1224
+ function xt(t, e) {
1226
1225
  if (t === e)
1227
1226
  return !0;
1228
1227
  if (typeof t != typeof e)
@@ -1234,7 +1233,7 @@ function vt(t, e) {
1234
1233
  if (Array.isArray(t)) {
1235
1234
  if (n = t.length, n !== e.length) return !1;
1236
1235
  for (o = n; o-- !== 0; )
1237
- if (!vt(t[o], e[o]))
1236
+ if (!xt(t[o], e[o]))
1238
1237
  return !1;
1239
1238
  return !0;
1240
1239
  }
@@ -1245,27 +1244,27 @@ function vt(t, e) {
1245
1244
  return !1;
1246
1245
  for (o = n; o-- !== 0; ) {
1247
1246
  const i = r[o];
1248
- if (!(i === "_owner" && t.$$typeof) && !vt(t[i], e[i]))
1247
+ if (!(i === "_owner" && t.$$typeof) && !xt(t[i], e[i]))
1249
1248
  return !1;
1250
1249
  }
1251
1250
  return !0;
1252
1251
  }
1253
1252
  return t !== t && e !== e;
1254
1253
  }
1255
- function he(t) {
1254
+ function ge(t) {
1256
1255
  return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1257
1256
  }
1258
- function te(t, e) {
1259
- const n = he(t);
1257
+ function ne(t, e) {
1258
+ const n = ge(t);
1260
1259
  return Math.round(e * n) / n;
1261
1260
  }
1262
- function St(t) {
1261
+ function Mt(t) {
1263
1262
  const e = g.useRef(t);
1264
- return ht(() => {
1263
+ return mt(() => {
1265
1264
  e.current = t;
1266
1265
  }), e;
1267
1266
  }
1268
- function xo(t) {
1267
+ function ho(t) {
1269
1268
  t === void 0 && (t = {});
1270
1269
  const {
1271
1270
  placement: e = "bottom",
@@ -1278,8 +1277,8 @@ function xo(t) {
1278
1277
  } = {},
1279
1278
  transform: c = !0,
1280
1279
  whileElementsMounted: a,
1281
- open: l
1282
- } = t, [f, u] = g.useState({
1280
+ open: f
1281
+ } = t, [l, u] = g.useState({
1283
1282
  x: 0,
1284
1283
  y: 0,
1285
1284
  strategy: n,
@@ -1287,87 +1286,87 @@ function xo(t) {
1287
1286
  middlewareData: {},
1288
1287
  isPositioned: !1
1289
1288
  }), [p, d] = g.useState(o);
1290
- vt(p, o) || d(o);
1291
- const [h, m] = g.useState(null), [x, v] = g.useState(null), A = g.useCallback((P) => {
1292
- P !== R.current && (R.current = P, m(P));
1293
- }, []), b = g.useCallback((P) => {
1294
- P !== O.current && (O.current = P, v(P));
1295
- }, []), y = i || h, C = s || x, R = g.useRef(null), O = g.useRef(null), L = g.useRef(f), F = a != null, D = St(a), T = St(r), N = St(l), E = g.useCallback(() => {
1289
+ xt(p, o) || d(o);
1290
+ const [h, m] = g.useState(null), [y, v] = g.useState(null), P = g.useCallback((b) => {
1291
+ b !== R.current && (R.current = b, m(b));
1292
+ }, []), A = g.useCallback((b) => {
1293
+ b !== O.current && (O.current = b, v(b));
1294
+ }, []), x = i || h, C = s || y, R = g.useRef(null), O = g.useRef(null), D = g.useRef(l), F = a != null, _ = Mt(a), T = Mt(r), N = Mt(f), E = g.useCallback(() => {
1296
1295
  if (!R.current || !O.current)
1297
1296
  return;
1298
- const P = {
1297
+ const b = {
1299
1298
  placement: e,
1300
1299
  strategy: n,
1301
1300
  middleware: p
1302
1301
  };
1303
- T.current && (P.platform = T.current), go(R.current, O.current, P).then((_) => {
1302
+ T.current && (b.platform = T.current), fo(R.current, O.current, b).then((L) => {
1304
1303
  const z = {
1305
- ..._,
1304
+ ...L,
1306
1305
  // The floating element's position may be recomputed while it's closed
1307
1306
  // but still mounted (such as when transitioning out). To ensure
1308
1307
  // `isPositioned` will be `false` initially on the next open, avoid
1309
1308
  // setting it to `true` when `open === false` (must be specified).
1310
1309
  isPositioned: N.current !== !1
1311
1310
  };
1312
- S.current && !vt(L.current, z) && (L.current = z, fn.flushSync(() => {
1311
+ S.current && !xt(D.current, z) && (D.current = z, dn.flushSync(() => {
1313
1312
  u(z);
1314
1313
  }));
1315
1314
  });
1316
1315
  }, [p, e, n, T, N]);
1317
- ht(() => {
1318
- l === !1 && L.current.isPositioned && (L.current.isPositioned = !1, u((P) => ({
1319
- ...P,
1316
+ mt(() => {
1317
+ f === !1 && D.current.isPositioned && (D.current.isPositioned = !1, u((b) => ({
1318
+ ...b,
1320
1319
  isPositioned: !1
1321
1320
  })));
1322
- }, [l]);
1321
+ }, [f]);
1323
1322
  const S = g.useRef(!1);
1324
- ht(() => (S.current = !0, () => {
1323
+ mt(() => (S.current = !0, () => {
1325
1324
  S.current = !1;
1326
- }), []), ht(() => {
1327
- if (y && (R.current = y), C && (O.current = C), y && C) {
1328
- if (D.current)
1329
- return D.current(y, C, E);
1325
+ }), []), mt(() => {
1326
+ if (x && (R.current = x), C && (O.current = C), x && C) {
1327
+ if (_.current)
1328
+ return _.current(x, C, E);
1330
1329
  E();
1331
1330
  }
1332
- }, [y, C, E, D, F]);
1331
+ }, [x, C, E, _, F]);
1333
1332
  const $ = g.useMemo(() => ({
1334
1333
  reference: R,
1335
1334
  floating: O,
1336
- setReference: A,
1337
- setFloating: b
1338
- }), [A, b]), k = g.useMemo(() => ({
1339
- reference: y,
1335
+ setReference: P,
1336
+ setFloating: A
1337
+ }), [P, A]), M = g.useMemo(() => ({
1338
+ reference: x,
1340
1339
  floating: C
1341
- }), [y, C]), M = g.useMemo(() => {
1342
- const P = {
1340
+ }), [x, C]), k = g.useMemo(() => {
1341
+ const b = {
1343
1342
  position: n,
1344
1343
  left: 0,
1345
1344
  top: 0
1346
1345
  };
1347
- if (!k.floating)
1348
- return P;
1349
- const _ = te(k.floating, f.x), z = te(k.floating, f.y);
1346
+ if (!M.floating)
1347
+ return b;
1348
+ const L = ne(M.floating, l.x), z = ne(M.floating, l.y);
1350
1349
  return c ? {
1351
- ...P,
1352
- transform: "translate(" + _ + "px, " + z + "px)",
1353
- ...he(k.floating) >= 1.5 && {
1350
+ ...b,
1351
+ transform: "translate(" + L + "px, " + z + "px)",
1352
+ ...ge(M.floating) >= 1.5 && {
1354
1353
  willChange: "transform"
1355
1354
  }
1356
1355
  } : {
1357
1356
  position: n,
1358
- left: _,
1357
+ left: L,
1359
1358
  top: z
1360
1359
  };
1361
- }, [n, c, k.floating, f.x, f.y]);
1360
+ }, [n, c, M.floating, l.x, l.y]);
1362
1361
  return g.useMemo(() => ({
1363
- ...f,
1362
+ ...l,
1364
1363
  update: E,
1365
1364
  refs: $,
1366
- elements: k,
1367
- floatingStyles: M
1368
- }), [f, E, $, k, M]);
1365
+ elements: M,
1366
+ floatingStyles: k
1367
+ }), [l, E, $, M, k]);
1369
1368
  }
1370
- const yo = (t) => {
1369
+ const mo = (t) => {
1371
1370
  function e(n) {
1372
1371
  return {}.hasOwnProperty.call(n, "current");
1373
1372
  }
@@ -1379,41 +1378,65 @@ const yo = (t) => {
1379
1378
  element: o,
1380
1379
  padding: r
1381
1380
  } = typeof t == "function" ? t(n) : t;
1382
- return o && e(o) ? o.current != null ? Jt({
1381
+ return o && e(o) ? o.current != null ? ee({
1383
1382
  element: o.current,
1384
1383
  padding: r
1385
- }).fn(n) : {} : o ? Jt({
1384
+ }).fn(n) : {} : o ? ee({
1386
1385
  element: o,
1387
1386
  padding: r
1388
1387
  }).fn(n) : {};
1389
1388
  }
1390
1389
  };
1391
- }, bo = (t, e) => ({
1392
- ...lo(t),
1393
- options: [t, e]
1394
- }), Ao = (t, e) => ({
1395
- ...fo(t),
1396
- options: [t, e]
1397
- }), Po = (t, e) => ({
1398
- ...mo(t),
1399
- options: [t, e]
1400
- }), Co = (t, e) => ({
1401
- ...uo(t),
1402
- options: [t, e]
1403
- }), Ro = (t, e) => ({
1404
- ...po(t),
1405
- options: [t, e]
1406
- }), Oo = (t, e) => ({
1407
- ...ho(t),
1408
- options: [t, e]
1409
- }), So = (t, e) => ({
1410
- ...yo(t),
1390
+ }, go = (t, e) => {
1391
+ const n = ro(t);
1392
+ return {
1393
+ name: n.name,
1394
+ fn: n.fn,
1395
+ options: [t, e]
1396
+ };
1397
+ }, wo = (t, e) => {
1398
+ const n = io(t);
1399
+ return {
1400
+ name: n.name,
1401
+ fn: n.fn,
1402
+ options: [t, e]
1403
+ };
1404
+ }, vo = (t, e) => ({
1405
+ fn: lo(t).fn,
1411
1406
  options: [t, e]
1412
- });
1413
- var Eo = "Arrow", me = g.forwardRef((t, e) => {
1407
+ }), xo = (t, e) => {
1408
+ const n = so(t);
1409
+ return {
1410
+ name: n.name,
1411
+ fn: n.fn,
1412
+ options: [t, e]
1413
+ };
1414
+ }, yo = (t, e) => {
1415
+ const n = co(t);
1416
+ return {
1417
+ name: n.name,
1418
+ fn: n.fn,
1419
+ options: [t, e]
1420
+ };
1421
+ }, Ao = (t, e) => {
1422
+ const n = ao(t);
1423
+ return {
1424
+ name: n.name,
1425
+ fn: n.fn,
1426
+ options: [t, e]
1427
+ };
1428
+ }, Po = (t, e) => {
1429
+ const n = mo(t);
1430
+ return {
1431
+ name: n.name,
1432
+ fn: n.fn,
1433
+ options: [t, e]
1434
+ };
1435
+ };
1436
+ var bo = "Arrow", we = g.forwardRef((t, e) => {
1414
1437
  const { children: n, width: o = 10, height: r = 5, ...i } = t;
1415
1438
  return /* @__PURE__ */ w(
1416
- lt.svg,
1439
+ ft.svg,
1417
1440
  {
1418
1441
  ...i,
1419
1442
  ref: e,
@@ -1425,23 +1448,23 @@ var Eo = "Arrow", me = g.forwardRef((t, e) => {
1425
1448
  }
1426
1449
  );
1427
1450
  });
1428
- me.displayName = Eo;
1429
- var ko = me, Ht = "Popper", [ge, we] = ne(Ht), [Mo, ve] = ge(Ht), xe = (t) => {
1451
+ we.displayName = bo;
1452
+ var Co = we, Bt = "Popper", [ve, xe] = re(Bt), [Ro, ye] = ve(Bt), Ae = (t) => {
1430
1453
  const { __scopePopper: e, children: n } = t, [o, r] = g.useState(null);
1431
- return /* @__PURE__ */ w(Mo, { scope: e, anchor: o, onAnchorChange: r, children: n });
1454
+ return /* @__PURE__ */ w(Ro, { scope: e, anchor: o, onAnchorChange: r, children: n });
1432
1455
  };
1433
- xe.displayName = Ht;
1434
- var ye = "PopperAnchor", be = g.forwardRef(
1456
+ Ae.displayName = Bt;
1457
+ var Pe = "PopperAnchor", be = g.forwardRef(
1435
1458
  (t, e) => {
1436
- const { __scopePopper: n, virtualRef: o, ...r } = t, i = ve(ye, n), s = g.useRef(null), c = yt(e, s), a = g.useRef(null);
1459
+ const { __scopePopper: n, virtualRef: o, ...r } = t, i = ye(Pe, n), s = g.useRef(null), c = At(e, s), a = g.useRef(null);
1437
1460
  return g.useEffect(() => {
1438
- const l = a.current;
1439
- a.current = o?.current || s.current, l !== a.current && i.onAnchorChange(a.current);
1440
- }), o ? null : /* @__PURE__ */ w(lt.div, { ...r, ref: c });
1461
+ const f = a.current;
1462
+ a.current = o?.current || s.current, f !== a.current && i.onAnchorChange(a.current);
1463
+ }), o ? null : /* @__PURE__ */ w(ft.div, { ...r, ref: c });
1441
1464
  }
1442
1465
  );
1443
- be.displayName = ye;
1444
- var It = "PopperContent", [Do, Lo] = ge(It), Ae = g.forwardRef(
1466
+ be.displayName = Pe;
1467
+ var zt = "PopperContent", [Oo, So] = ve(zt), Ce = g.forwardRef(
1445
1468
  (t, e) => {
1446
1469
  const {
1447
1470
  __scopePopper: n,
@@ -1451,55 +1474,55 @@ var It = "PopperContent", [Do, Lo] = ge(It), Ae = g.forwardRef(
1451
1474
  alignOffset: s = 0,
1452
1475
  arrowPadding: c = 0,
1453
1476
  avoidCollisions: a = !0,
1454
- collisionBoundary: l = [],
1455
- collisionPadding: f = 0,
1477
+ collisionBoundary: f = [],
1478
+ collisionPadding: l = 0,
1456
1479
  sticky: u = "partial",
1457
1480
  hideWhenDetached: p = !1,
1458
1481
  updatePositionStrategy: d = "optimized",
1459
1482
  onPlaced: h,
1460
1483
  ...m
1461
- } = t, x = ve(It, n), [v, A] = g.useState(null), b = yt(e, (it) => A(it)), [y, C] = g.useState(null), R = mn(y), O = R?.width ?? 0, L = R?.height ?? 0, F = o + (i !== "center" ? "-" + i : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, T = Array.isArray(l) ? l : [l], N = T.length > 0, E = {
1462
- padding: D,
1463
- boundary: T.filter(To),
1484
+ } = t, y = ye(zt, n), [v, P] = g.useState(null), A = At(e, (st) => P(st)), [x, C] = g.useState(null), R = wn(x), O = R?.width ?? 0, D = R?.height ?? 0, F = o + (i !== "center" ? "-" + i : ""), _ = typeof l == "number" ? l : { top: 0, right: 0, bottom: 0, left: 0, ...l }, T = Array.isArray(f) ? f : [f], N = T.length > 0, E = {
1485
+ padding: _,
1486
+ boundary: T.filter(Mo),
1464
1487
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
1465
1488
  altBoundary: N
1466
- }, { refs: S, floatingStyles: $, placement: k, isPositioned: M, middlewareData: P } = xo({
1489
+ }, { refs: S, floatingStyles: $, placement: M, isPositioned: k, middlewareData: b } = ho({
1467
1490
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
1468
1491
  strategy: "fixed",
1469
1492
  placement: F,
1470
- whileElementsMounted: (...it) => ao(...it, {
1493
+ whileElementsMounted: (...st) => oo(...st, {
1471
1494
  animationFrame: d === "always"
1472
1495
  }),
1473
1496
  elements: {
1474
- reference: x.anchor
1497
+ reference: y.anchor
1475
1498
  },
1476
1499
  middleware: [
1477
- bo({ mainAxis: r + L, alignmentAxis: s }),
1478
- a && Ao({
1500
+ go({ mainAxis: r + D, alignmentAxis: s }),
1501
+ a && wo({
1479
1502
  mainAxis: !0,
1480
1503
  crossAxis: !1,
1481
- limiter: u === "partial" ? Po() : void 0,
1504
+ limiter: u === "partial" ? vo() : void 0,
1482
1505
  ...E
1483
1506
  }),
1484
- a && Co({ ...E }),
1485
- Ro({
1507
+ a && xo({ ...E }),
1508
+ yo({
1486
1509
  ...E,
1487
- apply: ({ elements: it, rects: Vt, availableWidth: Ve, availableHeight: je }) => {
1488
- const { width: Xe, height: Ye } = Vt.reference, dt = it.floating.style;
1489
- dt.setProperty("--radix-popper-available-width", `${Ve}px`), dt.setProperty("--radix-popper-available-height", `${je}px`), dt.setProperty("--radix-popper-anchor-width", `${Xe}px`), dt.setProperty("--radix-popper-anchor-height", `${Ye}px`);
1510
+ apply: ({ elements: st, rects: Xt, availableWidth: Xe, availableHeight: Ye }) => {
1511
+ const { width: Ke, height: Qe } = Xt.reference, pt = st.floating.style;
1512
+ pt.setProperty("--radix-popper-available-width", `${Xe}px`), pt.setProperty("--radix-popper-available-height", `${Ye}px`), pt.setProperty("--radix-popper-anchor-width", `${Ke}px`), pt.setProperty("--radix-popper-anchor-height", `${Qe}px`);
1490
1513
  }
1491
1514
  }),
1492
- y && So({ element: y, padding: c }),
1493
- No({ arrowWidth: O, arrowHeight: L }),
1494
- p && Oo({ strategy: "referenceHidden", ...E })
1515
+ x && Po({ element: x, padding: c }),
1516
+ ko({ arrowWidth: O, arrowHeight: D }),
1517
+ p && Ao({ strategy: "referenceHidden", ...E })
1495
1518
  ]
1496
- }), [_, z] = Re(k), zt = Je(h);
1497
- kt(() => {
1498
- M && zt?.();
1499
- }, [M, zt]);
1500
- const We = P.arrow?.x, He = P.arrow?.y, Ie = P.arrow?.centerOffset !== 0, [Be, ze] = g.useState();
1501
- return kt(() => {
1502
- v && ze(window.getComputedStyle(v).zIndex);
1519
+ }), [L, z] = Se(M), jt = en(h);
1520
+ _t(() => {
1521
+ k && jt?.();
1522
+ }, [k, jt]);
1523
+ const Ie = b.arrow?.x, Be = b.arrow?.y, ze = b.arrow?.centerOffset !== 0, [Ve, je] = g.useState();
1524
+ return _t(() => {
1525
+ v && je(window.getComputedStyle(v).zIndex);
1503
1526
  }, [v]), /* @__PURE__ */ w(
1504
1527
  "div",
1505
1528
  {
@@ -1507,44 +1530,44 @@ var It = "PopperContent", [Do, Lo] = ge(It), Ae = g.forwardRef(
1507
1530
  "data-radix-popper-content-wrapper": "",
1508
1531
  style: {
1509
1532
  ...$,
1510
- transform: M ? $.transform : "translate(0, -200%)",
1533
+ transform: k ? $.transform : "translate(0, -200%)",
1511
1534
  // keep off the page when measuring
1512
1535
  minWidth: "max-content",
1513
- zIndex: Be,
1536
+ zIndex: Ve,
1514
1537
  "--radix-popper-transform-origin": [
1515
- P.transformOrigin?.x,
1516
- P.transformOrigin?.y
1538
+ b.transformOrigin?.x,
1539
+ b.transformOrigin?.y
1517
1540
  ].join(" "),
1518
1541
  // hide the content if using the hide middleware and should be hidden
1519
1542
  // set visibility to hidden and disable pointer events so the UI behaves
1520
1543
  // as if the PopperContent isn't there at all
1521
- ...P.hide?.referenceHidden && {
1544
+ ...b.hide?.referenceHidden && {
1522
1545
  visibility: "hidden",
1523
1546
  pointerEvents: "none"
1524
1547
  }
1525
1548
  },
1526
1549
  dir: t.dir,
1527
1550
  children: /* @__PURE__ */ w(
1528
- Do,
1551
+ Oo,
1529
1552
  {
1530
1553
  scope: n,
1531
- placedSide: _,
1554
+ placedSide: L,
1532
1555
  onArrowChange: C,
1533
- arrowX: We,
1534
- arrowY: He,
1535
- shouldHideArrow: Ie,
1556
+ arrowX: Ie,
1557
+ arrowY: Be,
1558
+ shouldHideArrow: ze,
1536
1559
  children: /* @__PURE__ */ w(
1537
- lt.div,
1560
+ ft.div,
1538
1561
  {
1539
- "data-side": _,
1562
+ "data-side": L,
1540
1563
  "data-align": z,
1541
1564
  ...m,
1542
- ref: b,
1565
+ ref: A,
1543
1566
  style: {
1544
1567
  ...m.style,
1545
1568
  // if the PopperContent hasn't been placed yet (not all measurements done)
1546
1569
  // we prevent animations so that users's animation don't kick in too early referring wrong sides
1547
- animation: M ? void 0 : "none"
1570
+ animation: k ? void 0 : "none"
1548
1571
  }
1549
1572
  }
1550
1573
  )
@@ -1554,14 +1577,14 @@ var It = "PopperContent", [Do, Lo] = ge(It), Ae = g.forwardRef(
1554
1577
  );
1555
1578
  }
1556
1579
  );
1557
- Ae.displayName = It;
1558
- var Pe = "PopperArrow", _o = {
1580
+ Ce.displayName = zt;
1581
+ var Re = "PopperArrow", Eo = {
1559
1582
  top: "bottom",
1560
1583
  right: "left",
1561
1584
  bottom: "top",
1562
1585
  left: "right"
1563
- }, Ce = g.forwardRef(function(e, n) {
1564
- const { __scopePopper: o, ...r } = e, i = Lo(Pe, o), s = _o[i.placedSide];
1586
+ }, Oe = g.forwardRef(function(e, n) {
1587
+ const { __scopePopper: o, ...r } = e, i = So(Re, o), s = Eo[i.placedSide];
1565
1588
  return (
1566
1589
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
1567
1590
  // doesn't report size as we'd expect on SVG elements.
@@ -1590,7 +1613,7 @@ var Pe = "PopperArrow", _o = {
1590
1613
  visibility: i.shouldHideArrow ? "hidden" : void 0
1591
1614
  },
1592
1615
  children: /* @__PURE__ */ w(
1593
- ko,
1616
+ Co,
1594
1617
  {
1595
1618
  ...r,
1596
1619
  ref: n,
@@ -1605,26 +1628,26 @@ var Pe = "PopperArrow", _o = {
1605
1628
  )
1606
1629
  );
1607
1630
  });
1608
- Ce.displayName = Pe;
1609
- function To(t) {
1631
+ Oe.displayName = Re;
1632
+ function Mo(t) {
1610
1633
  return t !== null;
1611
1634
  }
1612
- var No = (t) => ({
1635
+ var ko = (t) => ({
1613
1636
  name: "transformOrigin",
1614
1637
  options: t,
1615
1638
  fn(e) {
1616
- const { placement: n, rects: o, middlewareData: r } = e, s = r.arrow?.centerOffset !== 0, c = s ? 0 : t.arrowWidth, a = s ? 0 : t.arrowHeight, [l, f] = Re(n), u = { start: "0%", center: "50%", end: "100%" }[f], p = (r.arrow?.x ?? 0) + c / 2, d = (r.arrow?.y ?? 0) + a / 2;
1639
+ const { placement: n, rects: o, middlewareData: r } = e, s = r.arrow?.centerOffset !== 0, c = s ? 0 : t.arrowWidth, a = s ? 0 : t.arrowHeight, [f, l] = Se(n), u = { start: "0%", center: "50%", end: "100%" }[l], p = (r.arrow?.x ?? 0) + c / 2, d = (r.arrow?.y ?? 0) + a / 2;
1617
1640
  let h = "", m = "";
1618
- return l === "bottom" ? (h = s ? u : `${p}px`, m = `${-a}px`) : l === "top" ? (h = s ? u : `${p}px`, m = `${o.floating.height + a}px`) : l === "right" ? (h = `${-a}px`, m = s ? u : `${d}px`) : l === "left" && (h = `${o.floating.width + a}px`, m = s ? u : `${d}px`), { data: { x: h, y: m } };
1641
+ return f === "bottom" ? (h = s ? u : `${p}px`, m = `${-a}px`) : f === "top" ? (h = s ? u : `${p}px`, m = `${o.floating.height + a}px`) : f === "right" ? (h = `${-a}px`, m = s ? u : `${d}px`) : f === "left" && (h = `${o.floating.width + a}px`, m = s ? u : `${d}px`), { data: { x: h, y: m } };
1619
1642
  }
1620
1643
  });
1621
- function Re(t) {
1644
+ function Se(t) {
1622
1645
  const [e, n = "center"] = t.split("-");
1623
1646
  return [e, n];
1624
1647
  }
1625
- var Fo = xe, Oe = be, $o = Ae, Wo = Ce, Rt = "Popover", [Se] = ne(Rt, [
1626
- we
1627
- ]), ut = we(), [Ho, Z] = Se(Rt), Ee = (t) => {
1648
+ var _o = Ae, Ee = be, Do = Ce, Lo = Oe, Ot = "Popover", [Me] = re(Ot, [
1649
+ xe
1650
+ ]), dt = xe(), [To, Z] = Me(Ot), ke = (t) => {
1628
1651
  const {
1629
1652
  __scopePopover: e,
1630
1653
  children: n,
@@ -1632,95 +1655,95 @@ var Fo = xe, Oe = be, $o = Ae, Wo = Ce, Rt = "Popover", [Se] = ne(Rt, [
1632
1655
  defaultOpen: r,
1633
1656
  onOpenChange: i,
1634
1657
  modal: s = !1
1635
- } = t, c = ut(e), a = g.useRef(null), [l, f] = g.useState(!1), [u, p] = tn({
1658
+ } = t, c = dt(e), a = g.useRef(null), [f, l] = g.useState(!1), [u, p] = nn({
1636
1659
  prop: o,
1637
1660
  defaultProp: r ?? !1,
1638
1661
  onChange: i,
1639
- caller: Rt
1662
+ caller: Ot
1640
1663
  });
1641
- return /* @__PURE__ */ w(Fo, { ...c, children: /* @__PURE__ */ w(
1642
- Ho,
1664
+ return /* @__PURE__ */ w(_o, { ...c, children: /* @__PURE__ */ w(
1665
+ To,
1643
1666
  {
1644
1667
  scope: e,
1645
- contentId: en(),
1668
+ contentId: on(),
1646
1669
  triggerRef: a,
1647
1670
  open: u,
1648
1671
  onOpenChange: p,
1649
1672
  onOpenToggle: g.useCallback(() => p((d) => !d), [p]),
1650
- hasCustomAnchor: l,
1651
- onCustomAnchorAdd: g.useCallback(() => f(!0), []),
1652
- onCustomAnchorRemove: g.useCallback(() => f(!1), []),
1673
+ hasCustomAnchor: f,
1674
+ onCustomAnchorAdd: g.useCallback(() => l(!0), []),
1675
+ onCustomAnchorRemove: g.useCallback(() => l(!1), []),
1653
1676
  modal: s,
1654
1677
  children: n
1655
1678
  }
1656
1679
  ) });
1657
1680
  };
1658
- Ee.displayName = Rt;
1659
- var ke = "PopoverAnchor", Me = g.forwardRef(
1681
+ ke.displayName = Ot;
1682
+ var _e = "PopoverAnchor", De = g.forwardRef(
1660
1683
  (t, e) => {
1661
- const { __scopePopover: n, ...o } = t, r = Z(ke, n), i = ut(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = r;
1662
- return g.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ w(Oe, { ...i, ...o, ref: e });
1684
+ const { __scopePopover: n, ...o } = t, r = Z(_e, n), i = dt(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = r;
1685
+ return g.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ w(Ee, { ...i, ...o, ref: e });
1663
1686
  }
1664
1687
  );
1665
- Me.displayName = ke;
1666
- var De = "PopoverTrigger", Le = g.forwardRef(
1688
+ De.displayName = _e;
1689
+ var Le = "PopoverTrigger", Te = g.forwardRef(
1667
1690
  (t, e) => {
1668
- const { __scopePopover: n, ...o } = t, r = Z(De, n), i = ut(n), s = yt(e, r.triggerRef), c = /* @__PURE__ */ w(
1669
- lt.button,
1691
+ const { __scopePopover: n, ...o } = t, r = Z(Le, n), i = dt(n), s = At(e, r.triggerRef), c = /* @__PURE__ */ w(
1692
+ ft.button,
1670
1693
  {
1671
1694
  type: "button",
1672
1695
  "aria-haspopup": "dialog",
1673
1696
  "aria-expanded": r.open,
1674
1697
  "aria-controls": r.contentId,
1675
- "data-state": $e(r.open),
1698
+ "data-state": He(r.open),
1676
1699
  ...o,
1677
1700
  ref: s,
1678
- onClick: st(t.onClick, r.onOpenToggle)
1701
+ onClick: ct(t.onClick, r.onOpenToggle)
1679
1702
  }
1680
1703
  );
1681
- return r.hasCustomAnchor ? c : /* @__PURE__ */ w(Oe, { asChild: !0, ...i, children: c });
1704
+ return r.hasCustomAnchor ? c : /* @__PURE__ */ w(Ee, { asChild: !0, ...i, children: c });
1682
1705
  }
1683
1706
  );
1684
- Le.displayName = De;
1685
- var Bt = "PopoverPortal", [Io, Bo] = Se(Bt, {
1707
+ Te.displayName = Le;
1708
+ var Vt = "PopoverPortal", [No, Fo] = Me(Vt, {
1686
1709
  forceMount: void 0
1687
- }), _e = (t) => {
1688
- const { __scopePopover: e, forceMount: n, children: o, container: r } = t, i = Z(Bt, e);
1689
- return /* @__PURE__ */ w(Io, { scope: e, forceMount: n, children: /* @__PURE__ */ w(oe, { present: n || i.open, children: /* @__PURE__ */ w(nn, { asChild: !0, container: r, children: o }) }) });
1710
+ }), Ne = (t) => {
1711
+ const { __scopePopover: e, forceMount: n, children: o, container: r } = t, i = Z(Vt, e);
1712
+ return /* @__PURE__ */ w(No, { scope: e, forceMount: n, children: /* @__PURE__ */ w(ie, { present: n || i.open, children: /* @__PURE__ */ w(rn, { asChild: !0, container: r, children: o }) }) });
1690
1713
  };
1691
- _e.displayName = Bt;
1692
- var nt = "PopoverContent", Te = g.forwardRef(
1714
+ Ne.displayName = Vt;
1715
+ var ot = "PopoverContent", Fe = g.forwardRef(
1693
1716
  (t, e) => {
1694
- const n = Bo(nt, t.__scopePopover), { forceMount: o = n.forceMount, ...r } = t, i = Z(nt, t.__scopePopover);
1695
- return /* @__PURE__ */ w(oe, { present: o || i.open, children: i.modal ? /* @__PURE__ */ w(Vo, { ...r, ref: e }) : /* @__PURE__ */ w(jo, { ...r, ref: e }) });
1717
+ const n = Fo(ot, t.__scopePopover), { forceMount: o = n.forceMount, ...r } = t, i = Z(ot, t.__scopePopover);
1718
+ return /* @__PURE__ */ w(ie, { present: o || i.open, children: i.modal ? /* @__PURE__ */ w(Wo, { ...r, ref: e }) : /* @__PURE__ */ w(Ho, { ...r, ref: e }) });
1696
1719
  }
1697
1720
  );
1698
- Te.displayName = nt;
1699
- var zo = sn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1721
+ Fe.displayName = ot;
1722
+ var $o = an("PopoverContent.RemoveScroll"), Wo = g.forwardRef(
1700
1723
  (t, e) => {
1701
- const n = Z(nt, t.__scopePopover), o = g.useRef(null), r = yt(e, o), i = g.useRef(!1);
1724
+ const n = Z(ot, t.__scopePopover), o = g.useRef(null), r = At(e, o), i = g.useRef(!1);
1702
1725
  return g.useEffect(() => {
1703
1726
  const s = o.current;
1704
- if (s) return on(s);
1705
- }, []), /* @__PURE__ */ w(rn, { as: zo, allowPinchZoom: !0, children: /* @__PURE__ */ w(
1706
- Ne,
1727
+ if (s) return sn(s);
1728
+ }, []), /* @__PURE__ */ w(cn, { as: $o, allowPinchZoom: !0, children: /* @__PURE__ */ w(
1729
+ $e,
1707
1730
  {
1708
1731
  ...t,
1709
1732
  ref: r,
1710
1733
  trapFocus: n.open,
1711
1734
  disableOutsidePointerEvents: !0,
1712
- onCloseAutoFocus: st(t.onCloseAutoFocus, (s) => {
1735
+ onCloseAutoFocus: ct(t.onCloseAutoFocus, (s) => {
1713
1736
  s.preventDefault(), i.current || n.triggerRef.current?.focus();
1714
1737
  }),
1715
- onPointerDownOutside: st(
1738
+ onPointerDownOutside: ct(
1716
1739
  t.onPointerDownOutside,
1717
1740
  (s) => {
1718
- const c = s.detail.originalEvent, a = c.button === 0 && c.ctrlKey === !0, l = c.button === 2 || a;
1719
- i.current = l;
1741
+ const c = s.detail.originalEvent, a = c.button === 0 && c.ctrlKey === !0, f = c.button === 2 || a;
1742
+ i.current = f;
1720
1743
  },
1721
1744
  { checkForDefaultPrevented: !1 }
1722
1745
  ),
1723
- onFocusOutside: st(
1746
+ onFocusOutside: ct(
1724
1747
  t.onFocusOutside,
1725
1748
  (s) => s.preventDefault(),
1726
1749
  { checkForDefaultPrevented: !1 }
@@ -1728,11 +1751,11 @@ var zo = sn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1728
1751
  }
1729
1752
  ) });
1730
1753
  }
1731
- ), jo = g.forwardRef(
1754
+ ), Ho = g.forwardRef(
1732
1755
  (t, e) => {
1733
- const n = Z(nt, t.__scopePopover), o = g.useRef(!1), r = g.useRef(!1);
1756
+ const n = Z(ot, t.__scopePopover), o = g.useRef(!1), r = g.useRef(!1);
1734
1757
  return /* @__PURE__ */ w(
1735
- Ne,
1758
+ $e,
1736
1759
  {
1737
1760
  ...t,
1738
1761
  ref: e,
@@ -1749,7 +1772,7 @@ var zo = sn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1749
1772
  }
1750
1773
  );
1751
1774
  }
1752
- ), Ne = g.forwardRef(
1775
+ ), $e = g.forwardRef(
1753
1776
  (t, e) => {
1754
1777
  const {
1755
1778
  __scopePopover: n,
@@ -1759,12 +1782,12 @@ var zo = sn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1759
1782
  disableOutsidePointerEvents: s,
1760
1783
  onEscapeKeyDown: c,
1761
1784
  onPointerDownOutside: a,
1762
- onFocusOutside: l,
1763
- onInteractOutside: f,
1785
+ onFocusOutside: f,
1786
+ onInteractOutside: l,
1764
1787
  ...u
1765
- } = t, p = Z(nt, n), d = ut(n);
1766
- return cn(), /* @__PURE__ */ w(
1767
- an,
1788
+ } = t, p = Z(ot, n), d = dt(n);
1789
+ return ln(), /* @__PURE__ */ w(
1790
+ fn,
1768
1791
  {
1769
1792
  asChild: !0,
1770
1793
  loop: !0,
@@ -1772,19 +1795,19 @@ var zo = sn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1772
1795
  onMountAutoFocus: r,
1773
1796
  onUnmountAutoFocus: i,
1774
1797
  children: /* @__PURE__ */ w(
1775
- ln,
1798
+ un,
1776
1799
  {
1777
1800
  asChild: !0,
1778
1801
  disableOutsidePointerEvents: s,
1779
- onInteractOutside: f,
1802
+ onInteractOutside: l,
1780
1803
  onEscapeKeyDown: c,
1781
1804
  onPointerDownOutside: a,
1782
- onFocusOutside: l,
1805
+ onFocusOutside: f,
1783
1806
  onDismiss: () => p.onOpenChange(!1),
1784
1807
  children: /* @__PURE__ */ w(
1785
- $o,
1808
+ Do,
1786
1809
  {
1787
- "data-state": $e(p.open),
1810
+ "data-state": He(p.open),
1788
1811
  role: "dialog",
1789
1812
  id: p.contentId,
1790
1813
  ...d,
@@ -1805,80 +1828,80 @@ var zo = sn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1805
1828
  }
1806
1829
  );
1807
1830
  }
1808
- ), Fe = "PopoverClose", Xo = g.forwardRef(
1831
+ ), We = "PopoverClose", Io = g.forwardRef(
1809
1832
  (t, e) => {
1810
- const { __scopePopover: n, ...o } = t, r = Z(Fe, n);
1833
+ const { __scopePopover: n, ...o } = t, r = Z(We, n);
1811
1834
  return /* @__PURE__ */ w(
1812
- lt.button,
1835
+ ft.button,
1813
1836
  {
1814
1837
  type: "button",
1815
1838
  ...o,
1816
1839
  ref: e,
1817
- onClick: st(t.onClick, () => r.onOpenChange(!1))
1840
+ onClick: ct(t.onClick, () => r.onOpenChange(!1))
1818
1841
  }
1819
1842
  );
1820
1843
  }
1821
1844
  );
1822
- Xo.displayName = Fe;
1823
- var Yo = "PopoverArrow", Ko = g.forwardRef(
1845
+ Io.displayName = We;
1846
+ var Bo = "PopoverArrow", zo = g.forwardRef(
1824
1847
  (t, e) => {
1825
- const { __scopePopover: n, ...o } = t, r = ut(n);
1826
- return /* @__PURE__ */ w(Wo, { ...r, ...o, ref: e });
1848
+ const { __scopePopover: n, ...o } = t, r = dt(n);
1849
+ return /* @__PURE__ */ w(Lo, { ...r, ...o, ref: e });
1827
1850
  }
1828
1851
  );
1829
- Ko.displayName = Yo;
1830
- function $e(t) {
1852
+ zo.displayName = Bo;
1853
+ function He(t) {
1831
1854
  return t ? "open" : "closed";
1832
1855
  }
1833
- var Qo = Ee, qo = Me, Go = Le, Uo = _e, Zo = Te;
1834
- const Jo = "gQIKVa_anchor", tr = "gQIKVa_check", er = "gQIKVa_container", nr = "gQIKVa_radio", or = "gQIKVa_radioInput", ct = {
1835
- anchor: Jo,
1836
- check: tr,
1837
- container: er,
1838
- radio: nr,
1839
- radioInput: or
1856
+ var Vo = ke, jo = De, Xo = Te, Yo = Ne, Ko = Fe;
1857
+ const Qo = "gQIKVa_anchor", qo = "gQIKVa_check", Uo = "gQIKVa_container", Go = "gQIKVa_radio", Zo = "gQIKVa_radioInput", at = {
1858
+ anchor: Qo,
1859
+ check: qo,
1860
+ container: Uo,
1861
+ radio: Go,
1862
+ radioInput: Zo
1840
1863
  };
1841
- function Et({ children: t, id: e, ...n }) {
1842
- return /* @__PURE__ */ q(ee, { children: [
1864
+ function kt({ children: t, id: e, ...n }) {
1865
+ return /* @__PURE__ */ q(oe, { children: [
1843
1866
  /* @__PURE__ */ w(
1844
1867
  "input",
1845
1868
  {
1846
1869
  type: "radio",
1847
1870
  id: e,
1848
- className: Ue(ct.radioInput, "sr-only"),
1871
+ className: Je(at.radioInput, "sr-only"),
1849
1872
  ...n
1850
1873
  }
1851
1874
  ),
1852
- /* @__PURE__ */ q("label", { htmlFor: e, className: ct.radio, children: [
1875
+ /* @__PURE__ */ q("label", { htmlFor: e, className: at.radio, children: [
1853
1876
  t,
1854
- /* @__PURE__ */ w(Ge, { className: ct.check })
1877
+ /* @__PURE__ */ w(Ze, { className: at.check })
1855
1878
  ] })
1856
1879
  ] });
1857
1880
  }
1858
- function dr() {
1859
- const { theme: t, systemTheme: e, setTheme: n } = Ke(), o = Qe();
1860
- return /* @__PURE__ */ q(Qo, { children: [
1861
- /* @__PURE__ */ w(Go, { asChild: !0, children: /* @__PURE__ */ q(Ze, { variant: "transparent", "aria-label": "Preferences", children: [
1862
- /* @__PURE__ */ w(pn, {}),
1863
- /* @__PURE__ */ w(qo, { className: ct.anchor })
1881
+ function cr() {
1882
+ const { theme: t, systemTheme: e, setTheme: n } = qe(), o = Ue();
1883
+ return /* @__PURE__ */ q(Vo, { children: [
1884
+ /* @__PURE__ */ w(Xo, { asChild: !0, children: /* @__PURE__ */ q(tn, { variant: "transparent", "aria-label": "Preferences", children: [
1885
+ /* @__PURE__ */ w(mn, {}),
1886
+ /* @__PURE__ */ w(jo, { className: at.anchor })
1864
1887
  ] }) }),
1865
- /* @__PURE__ */ w(Uo, { children: /* @__PURE__ */ w(
1866
- Zo,
1888
+ /* @__PURE__ */ w(Yo, { children: /* @__PURE__ */ w(
1889
+ Ko,
1867
1890
  {
1868
1891
  sideOffset: 8,
1869
1892
  hideWhenDetached: !0,
1870
- className: ct.container,
1871
- children: o && /* @__PURE__ */ q(ee, { children: [
1893
+ className: at.container,
1894
+ children: o && /* @__PURE__ */ q(oe, { children: [
1872
1895
  /* @__PURE__ */ w("span", { children: "Appearance" }),
1873
1896
  /* @__PURE__ */ q(
1874
- Et,
1897
+ kt,
1875
1898
  {
1876
1899
  id: "system",
1877
1900
  name: "theme",
1878
1901
  checked: t === "system",
1879
1902
  onChange: () => n("system"),
1880
1903
  children: [
1881
- /* @__PURE__ */ w(un, {}),
1904
+ /* @__PURE__ */ w(pn, {}),
1882
1905
  "Auto (",
1883
1906
  e,
1884
1907
  ")"
@@ -1886,27 +1909,27 @@ function dr() {
1886
1909
  }
1887
1910
  ),
1888
1911
  /* @__PURE__ */ q(
1889
- Et,
1912
+ kt,
1890
1913
  {
1891
1914
  id: "light",
1892
1915
  name: "theme",
1893
1916
  checked: t === "light",
1894
1917
  onChange: () => n("light"),
1895
1918
  children: [
1896
- /* @__PURE__ */ w(hn, {}),
1919
+ /* @__PURE__ */ w(gn, {}),
1897
1920
  "Light"
1898
1921
  ]
1899
1922
  }
1900
1923
  ),
1901
1924
  /* @__PURE__ */ q(
1902
- Et,
1925
+ kt,
1903
1926
  {
1904
1927
  id: "dark",
1905
1928
  name: "theme",
1906
1929
  checked: t === "dark",
1907
1930
  onChange: () => n("dark"),
1908
1931
  children: [
1909
- /* @__PURE__ */ w(dn, {}),
1932
+ /* @__PURE__ */ w(hn, {}),
1910
1933
  "Dark"
1911
1934
  ]
1912
1935
  }
@@ -1917,6 +1940,6 @@ function dr() {
1917
1940
  ] });
1918
1941
  }
1919
1942
  export {
1920
- dr as PrefPanel,
1921
- Et as PrefRadio
1943
+ cr as PrefPanel,
1944
+ kt as PrefRadio
1922
1945
  };