@alixpartners/ui-components 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
- import * as O from "react";
2
- import { useLayoutEffect as Se } from "react";
3
- import * as Ee from "react-dom";
4
- import { P as At, d as Kt, b as Le, i as Ht } from "./index-DM51yNMI.js";
1
+ import * as C from "react";
2
+ import { useLayoutEffect as Ee } from "react";
3
+ import * as Le from "react-dom";
4
+ import { P as Rt, d as Gt, b as De, i as _t } from "./index-DM51yNMI.js";
5
5
  import { jsx as j } from "react/jsx-runtime";
6
- import { a as De } from "./index-7CBv-Jx6.js";
7
- import { u as Me } from "./index-CxAtPSMM.js";
8
- const Te = ["top", "right", "bottom", "left"], Z = Math.min, W = Math.max, at = Math.round, ct = Math.floor, I = (t) => ({
6
+ import { a as Me } from "./index-7CBv-Jx6.js";
7
+ import { u as Te } from "./index-CxAtPSMM.js";
8
+ const $e = ["top", "right", "bottom", "left"], Z = Math.min, W = Math.max, ft = Math.round, lt = Math.floor, I = (t) => ({
9
9
  x: t,
10
10
  y: t
11
- }), $e = {
11
+ }), ke = {
12
12
  left: "right",
13
13
  right: "left",
14
14
  bottom: "top",
15
15
  top: "bottom"
16
- }, ke = {
16
+ }, Fe = {
17
17
  start: "end",
18
18
  end: "start"
19
19
  };
20
- function yt(t, e, n) {
20
+ function vt(t, e, n) {
21
21
  return W(t, Z(e, n));
22
22
  }
23
23
  function q(t, e) {
@@ -29,54 +29,54 @@ function U(t) {
29
29
  function tt(t) {
30
30
  return t.split("-")[1];
31
31
  }
32
- function Rt(t) {
32
+ function Ct(t) {
33
33
  return t === "x" ? "y" : "x";
34
34
  }
35
35
  function Ot(t) {
36
36
  return t === "y" ? "height" : "width";
37
37
  }
38
- const Fe = /* @__PURE__ */ new Set(["top", "bottom"]);
38
+ const Ne = /* @__PURE__ */ new Set(["top", "bottom"]);
39
39
  function z(t) {
40
- return Fe.has(U(t)) ? "y" : "x";
40
+ return Ne.has(U(t)) ? "y" : "x";
41
41
  }
42
- function Ct(t) {
43
- return Rt(z(t));
42
+ function Pt(t) {
43
+ return Ct(z(t));
44
44
  }
45
- function Ne(t, e, n) {
45
+ function We(t, e, n) {
46
46
  n === void 0 && (n = !1);
47
- const o = tt(t), r = Ct(t), i = Ot(r);
48
- let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
49
- return e.reference[i] > e.floating[i] && (s = ft(s)), [s, ft(s)];
47
+ const o = tt(t), i = Pt(t), r = Ot(i);
48
+ let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
49
+ return e.reference[r] > e.floating[r] && (s = ut(s)), [s, ut(s)];
50
50
  }
51
- function We(t) {
52
- const e = ft(t);
53
- return [vt(t), e, vt(e)];
51
+ function He(t) {
52
+ const e = ut(t);
53
+ return [bt(t), e, bt(e)];
54
54
  }
55
- function vt(t) {
56
- return t.replace(/start|end/g, (e) => ke[e]);
55
+ function bt(t) {
56
+ return t.replace(/start|end/g, (e) => Fe[e]);
57
57
  }
58
- const _t = ["left", "right"], Bt = ["right", "left"], He = ["top", "bottom"], _e = ["bottom", "top"];
59
- function Be(t, e, n) {
58
+ const Bt = ["left", "right"], Vt = ["right", "left"], _e = ["top", "bottom"], Be = ["bottom", "top"];
59
+ function Ve(t, e, n) {
60
60
  switch (t) {
61
61
  case "top":
62
62
  case "bottom":
63
- return n ? e ? Bt : _t : e ? _t : Bt;
63
+ return n ? e ? Vt : Bt : e ? Bt : Vt;
64
64
  case "left":
65
65
  case "right":
66
- return e ? He : _e;
66
+ return e ? _e : Be;
67
67
  default:
68
68
  return [];
69
69
  }
70
70
  }
71
- function Ve(t, e, n, o) {
72
- const r = tt(t);
73
- let i = Be(U(t), n === "start", o);
74
- return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(vt)))), i;
71
+ function ze(t, e, n, o) {
72
+ const i = tt(t);
73
+ let r = Ve(U(t), n === "start", o);
74
+ return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(bt)))), r;
75
75
  }
76
- function ft(t) {
77
- return t.replace(/left|right|bottom|top/g, (e) => $e[e]);
76
+ function ut(t) {
77
+ return t.replace(/left|right|bottom|top/g, (e) => ke[e]);
78
78
  }
79
- function ze(t) {
79
+ function Ie(t) {
80
80
  return {
81
81
  top: 0,
82
82
  right: 0,
@@ -85,44 +85,44 @@ function ze(t) {
85
85
  ...t
86
86
  };
87
87
  }
88
- function Gt(t) {
89
- return typeof t != "number" ? ze(t) : {
88
+ function Jt(t) {
89
+ return typeof t != "number" ? Ie(t) : {
90
90
  top: t,
91
91
  right: t,
92
92
  bottom: t,
93
93
  left: t
94
94
  };
95
95
  }
96
- function ut(t) {
96
+ function dt(t) {
97
97
  const {
98
98
  x: e,
99
99
  y: n,
100
100
  width: o,
101
- height: r
101
+ height: i
102
102
  } = t;
103
103
  return {
104
104
  width: o,
105
- height: r,
105
+ height: i,
106
106
  top: n,
107
107
  left: e,
108
108
  right: e + o,
109
- bottom: n + r,
109
+ bottom: n + i,
110
110
  x: e,
111
111
  y: n
112
112
  };
113
113
  }
114
- function Vt(t, e, n) {
114
+ function zt(t, e, n) {
115
115
  let {
116
116
  reference: o,
117
- floating: r
117
+ floating: i
118
118
  } = t;
119
- const i = z(e), s = Ct(e), c = Ot(s), l = U(e), a = 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;
119
+ const r = z(e), s = Pt(e), c = Ot(s), l = U(e), a = r === "y", f = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, p = o[c] / 2 - i[c] / 2;
120
120
  let d;
121
121
  switch (l) {
122
122
  case "top":
123
123
  d = {
124
124
  x: f,
125
- y: o.y - r.height
125
+ y: o.y - i.height
126
126
  };
127
127
  break;
128
128
  case "bottom":
@@ -139,7 +139,7 @@ function Vt(t, e, n) {
139
139
  break;
140
140
  case "left":
141
141
  d = {
142
- x: o.x - r.width,
142
+ x: o.x - i.width,
143
143
  y: u
144
144
  };
145
145
  break;
@@ -159,124 +159,121 @@ function Vt(t, e, n) {
159
159
  }
160
160
  return d;
161
161
  }
162
- async function Ie(t, e) {
163
- var n;
164
- e === void 0 && (e = {});
165
- const {
166
- x: o,
167
- y: r,
168
- platform: i,
169
- rects: s,
170
- elements: c,
171
- strategy: l
172
- } = t, {
173
- boundary: a = "clippingAncestors",
174
- rootBoundary: f = "viewport",
175
- elementContext: u = "floating",
176
- altBoundary: p = !1,
177
- padding: d = 0
178
- } = q(e, t), m = Gt(d), w = c[p ? u === "floating" ? "reference" : "floating" : u], g = ut(await i.getClippingRect({
179
- element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
180
- boundary: a,
181
- rootBoundary: f,
182
- strategy: l
183
- })), y = u === "floating" ? {
184
- x: o,
185
- y: r,
186
- width: s.floating.width,
187
- height: s.floating.height
188
- } : s.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), x = await (i.isElement == null ? void 0 : i.isElement(v)) ? await (i.getScale == null ? void 0 : i.getScale(v)) || {
189
- x: 1,
190
- y: 1
191
- } : {
192
- x: 1,
193
- y: 1
194
- }, R = ut(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
195
- elements: c,
196
- rect: y,
197
- offsetParent: v,
198
- strategy: l
199
- }) : y);
200
- return {
201
- top: (g.top - R.top + m.top) / x.y,
202
- bottom: (R.bottom - g.bottom + m.bottom) / x.y,
203
- left: (g.left - R.left + m.left) / x.x,
204
- right: (R.right - g.right + m.right) / x.x
205
- };
206
- }
207
162
  const Xe = async (t, e, n) => {
208
163
  const {
209
164
  placement: o = "bottom",
210
- strategy: r = "absolute",
211
- middleware: i = [],
165
+ strategy: i = "absolute",
166
+ middleware: r = [],
212
167
  platform: s
213
- } = n, c = i.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(e));
168
+ } = n, c = r.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(e));
214
169
  let a = await s.getElementRects({
215
170
  reference: t,
216
171
  floating: e,
217
- strategy: r
172
+ strategy: i
218
173
  }), {
219
174
  x: f,
220
175
  y: u
221
- } = Vt(a, o, l), p = o, d = {}, m = 0;
222
- for (let w = 0; w < c.length; w++) {
223
- var h;
176
+ } = zt(a, o, l), p = o, d = {}, m = 0;
177
+ for (let h = 0; h < c.length; h++) {
224
178
  const {
225
- name: g,
226
- fn: y
227
- } = c[w], {
228
- x: v,
229
- y: x,
230
- data: R,
231
- reset: b
232
- } = await y({
179
+ name: w,
180
+ fn: g
181
+ } = c[h], {
182
+ x,
183
+ y: b,
184
+ data: y,
185
+ reset: v
186
+ } = await g({
233
187
  x: f,
234
188
  y: u,
235
189
  initialPlacement: o,
236
190
  placement: p,
237
- strategy: r,
191
+ strategy: i,
238
192
  middlewareData: d,
239
193
  rects: a,
240
- platform: {
241
- ...s,
242
- detectOverflow: (h = s.detectOverflow) != null ? h : Ie
243
- },
194
+ platform: s,
244
195
  elements: {
245
196
  reference: t,
246
197
  floating: e
247
198
  }
248
199
  });
249
- f = v ?? f, u = x ?? u, d = {
200
+ f = x ?? f, u = b ?? u, d = {
250
201
  ...d,
251
- [g]: {
252
- ...d[g],
253
- ...R
202
+ [w]: {
203
+ ...d[w],
204
+ ...y
254
205
  }
255
- }, b && m <= 50 && (m++, typeof b == "object" && (b.placement && (p = b.placement), b.rects && (a = b.rects === !0 ? await s.getElementRects({
206
+ }, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (p = v.placement), v.rects && (a = v.rects === !0 ? await s.getElementRects({
256
207
  reference: t,
257
208
  floating: e,
258
- strategy: r
259
- }) : b.rects), {
209
+ strategy: i
210
+ }) : v.rects), {
260
211
  x: f,
261
212
  y: u
262
- } = Vt(a, p, l)), w = -1);
213
+ } = zt(a, p, l)), h = -1);
263
214
  }
264
215
  return {
265
216
  x: f,
266
217
  y: u,
267
218
  placement: p,
268
- strategy: r,
219
+ strategy: i,
269
220
  middlewareData: d
270
221
  };
271
- }, Ye = (t) => ({
222
+ };
223
+ async function ot(t, e) {
224
+ var n;
225
+ e === void 0 && (e = {});
226
+ const {
227
+ x: o,
228
+ y: i,
229
+ platform: r,
230
+ rects: s,
231
+ elements: c,
232
+ strategy: l
233
+ } = t, {
234
+ boundary: a = "clippingAncestors",
235
+ rootBoundary: f = "viewport",
236
+ elementContext: u = "floating",
237
+ altBoundary: p = !1,
238
+ padding: d = 0
239
+ } = q(e, t), m = Jt(d), w = c[p ? u === "floating" ? "reference" : "floating" : u], g = dt(await r.getClippingRect({
240
+ element: (n = await (r.isElement == null ? void 0 : r.isElement(w))) == null || n ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
241
+ boundary: a,
242
+ rootBoundary: f,
243
+ strategy: l
244
+ })), x = u === "floating" ? {
245
+ x: o,
246
+ y: i,
247
+ width: s.floating.width,
248
+ height: s.floating.height
249
+ } : s.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), y = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
250
+ x: 1,
251
+ y: 1
252
+ } : {
253
+ x: 1,
254
+ y: 1
255
+ }, v = dt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
256
+ elements: c,
257
+ rect: x,
258
+ offsetParent: b,
259
+ strategy: l
260
+ }) : x);
261
+ return {
262
+ top: (g.top - v.top + m.top) / y.y,
263
+ bottom: (v.bottom - g.bottom + m.bottom) / y.y,
264
+ left: (g.left - v.left + m.left) / y.x,
265
+ right: (v.right - g.right + m.right) / y.x
266
+ };
267
+ }
268
+ const Ye = (t) => ({
272
269
  name: "arrow",
273
270
  options: t,
274
271
  async fn(e) {
275
272
  const {
276
273
  x: n,
277
274
  y: o,
278
- placement: r,
279
- rects: i,
275
+ placement: i,
276
+ rects: r,
280
277
  platform: s,
281
278
  elements: c,
282
279
  middlewareData: l
@@ -286,13 +283,13 @@ const Xe = async (t, e, n) => {
286
283
  } = q(t, e) || {};
287
284
  if (a == null)
288
285
  return {};
289
- const u = Gt(f), p = {
286
+ const u = Jt(f), p = {
290
287
  x: n,
291
288
  y: o
292
- }, d = Ct(r), m = Ot(d), h = await s.getDimensions(a), w = d === "y", g = w ? "top" : "left", y = w ? "bottom" : "right", v = w ? "clientHeight" : "clientWidth", x = i.reference[m] + i.reference[d] - p[d] - i.floating[m], R = p[d] - i.reference[d], b = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
293
- let C = b ? b[v] : 0;
294
- (!C || !await (s.isElement == null ? void 0 : s.isElement(b))) && (C = c.floating[v] || i.floating[m]);
295
- const M = x / 2 - R / 2, F = C / 2 - h[m] / 2 - 1, D = Z(u[g], F), $ = Z(u[y], F), k = D, S = C - h[m] - $, P = C / 2 - h[m] / 2 + M, N = yt(k, P, S), E = !l.arrow && tt(r) != null && P !== N && i.reference[m] / 2 - (P < k ? D : $) - h[m] / 2 < 0, L = E ? P < k ? P - k : P - S : 0;
289
+ }, d = Pt(i), m = Ot(d), h = await s.getDimensions(a), w = d === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", b = w ? "clientHeight" : "clientWidth", y = r.reference[m] + r.reference[d] - p[d] - r.floating[m], v = p[d] - r.reference[d], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
290
+ let O = R ? R[b] : 0;
291
+ (!O || !await (s.isElement == null ? void 0 : s.isElement(R))) && (O = c.floating[b] || r.floating[m]);
292
+ const M = y / 2 - v / 2, F = O / 2 - h[m] / 2 - 1, D = Z(u[g], F), $ = Z(u[x], F), k = D, S = O - h[m] - $, P = O / 2 - h[m] / 2 + M, N = vt(k, P, S), E = !l.arrow && tt(i) != null && P !== N && r.reference[m] / 2 - (P < k ? D : $) - h[m] / 2 < 0, L = E ? P < k ? P - k : P - S : 0;
296
293
  return {
297
294
  [d]: p[d] + L,
298
295
  data: {
@@ -312,8 +309,8 @@ const Xe = async (t, e, n) => {
312
309
  async fn(e) {
313
310
  var n, o;
314
311
  const {
315
- placement: r,
316
- middlewareData: i,
312
+ placement: i,
313
+ middlewareData: r,
317
314
  rects: s,
318
315
  initialPlacement: c,
319
316
  platform: l,
@@ -327,25 +324,25 @@ const Xe = async (t, e, n) => {
327
324
  flipAlignment: h = !0,
328
325
  ...w
329
326
  } = q(t, e);
330
- if ((n = i.arrow) != null && n.alignmentOffset)
327
+ if ((n = r.arrow) != null && n.alignmentOffset)
331
328
  return {};
332
- const g = U(r), y = z(c), v = U(c) === c, x = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), R = p || (v || !h ? [ft(c)] : We(c)), b = m !== "none";
333
- !p && b && R.push(...Ve(c, h, m, x));
334
- const C = [c, ...R], M = await l.detectOverflow(e, w), F = [];
335
- let D = ((o = i.flip) == null ? void 0 : o.overflows) || [];
329
+ const g = U(i), x = z(c), b = U(c) === c, y = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = p || (b || !h ? [ut(c)] : He(c)), R = m !== "none";
330
+ !p && R && v.push(...ze(c, h, m, y));
331
+ const O = [c, ...v], M = await ot(e, w), F = [];
332
+ let D = ((o = r.flip) == null ? void 0 : o.overflows) || [];
336
333
  if (f && F.push(M[g]), u) {
337
- const P = Ne(r, s, x);
334
+ const P = We(i, s, y);
338
335
  F.push(M[P[0]], M[P[1]]);
339
336
  }
340
337
  if (D = [...D, {
341
- placement: r,
338
+ placement: i,
342
339
  overflows: F
343
340
  }], !F.every((P) => P <= 0)) {
344
341
  var $, k;
345
- const P = ((($ = i.flip) == null ? void 0 : $.index) || 0) + 1, N = C[P];
346
- if (N && (!(u === "alignment" ? y !== z(N) : !1) || // We leave the current main axis only if every placement on that axis
342
+ const P = ((($ = r.flip) == null ? void 0 : $.index) || 0) + 1, N = O[P];
343
+ if (N && (!(u === "alignment" ? x !== z(N) : !1) || // We leave the current main axis only if every placement on that axis
347
344
  // overflows the main axis.
348
- D.every((A) => z(A.placement) === y ? A.overflows[0] > 0 : !0)))
345
+ D.every((A) => z(A.placement) === x ? A.overflows[0] > 0 : !0)))
349
346
  return {
350
347
  data: {
351
348
  index: P,
@@ -361,9 +358,9 @@ const Xe = async (t, e, n) => {
361
358
  case "bestFit": {
362
359
  var S;
363
360
  const L = (S = D.filter((A) => {
364
- if (b) {
361
+ if (R) {
365
362
  const T = z(A.placement);
366
- return T === y || // Create a bias to the `y` side axis due to horizontal
363
+ return T === x || // Create a bias to the `y` side axis due to horizontal
367
364
  // reading directions favoring greater width.
368
365
  T === "y";
369
366
  }
@@ -376,7 +373,7 @@ const Xe = async (t, e, n) => {
376
373
  E = c;
377
374
  break;
378
375
  }
379
- if (r !== E)
376
+ if (i !== E)
380
377
  return {
381
378
  reset: {
382
379
  placement: E
@@ -387,7 +384,7 @@ const Xe = async (t, e, n) => {
387
384
  }
388
385
  };
389
386
  };
390
- function zt(t, e) {
387
+ function It(t, e) {
391
388
  return {
392
389
  top: t.top - e.height,
393
390
  right: t.right - e.width,
@@ -395,8 +392,8 @@ function zt(t, e) {
395
392
  left: t.left - e.width
396
393
  };
397
394
  }
398
- function It(t) {
399
- return Te.some((e) => t[e] >= 0);
395
+ function Xt(t) {
396
+ return $e.some((e) => t[e] >= 0);
400
397
  }
401
398
  const qe = function(t) {
402
399
  return t === void 0 && (t = {}), {
@@ -404,34 +401,33 @@ const qe = function(t) {
404
401
  options: t,
405
402
  async fn(e) {
406
403
  const {
407
- rects: n,
408
- platform: o
404
+ rects: n
409
405
  } = e, {
410
- strategy: r = "referenceHidden",
406
+ strategy: o = "referenceHidden",
411
407
  ...i
412
408
  } = q(t, e);
413
- switch (r) {
409
+ switch (o) {
414
410
  case "referenceHidden": {
415
- const s = await o.detectOverflow(e, {
411
+ const r = await ot(e, {
416
412
  ...i,
417
413
  elementContext: "reference"
418
- }), c = zt(s, n.reference);
414
+ }), s = It(r, n.reference);
419
415
  return {
420
416
  data: {
421
- referenceHiddenOffsets: c,
422
- referenceHidden: It(c)
417
+ referenceHiddenOffsets: s,
418
+ referenceHidden: Xt(s)
423
419
  }
424
420
  };
425
421
  }
426
422
  case "escaped": {
427
- const s = await o.detectOverflow(e, {
423
+ const r = await ot(e, {
428
424
  ...i,
429
425
  altBoundary: !0
430
- }), c = zt(s, n.floating);
426
+ }), s = It(r, n.floating);
431
427
  return {
432
428
  data: {
433
- escapedOffsets: c,
434
- escaped: It(c)
429
+ escapedOffsets: s,
430
+ escaped: Xt(s)
435
431
  }
436
432
  };
437
433
  }
@@ -440,13 +436,13 @@ const qe = function(t) {
440
436
  }
441
437
  }
442
438
  };
443
- }, Jt = /* @__PURE__ */ new Set(["left", "top"]);
439
+ }, Qt = /* @__PURE__ */ new Set(["left", "top"]);
444
440
  async function Ue(t, e) {
445
441
  const {
446
442
  placement: n,
447
443
  platform: o,
448
- elements: r
449
- } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = U(n), c = tt(n), l = z(n) === "y", a = Jt.has(s) ? -1 : 1, f = i && l ? -1 : 1, u = q(e, t);
444
+ elements: i
445
+ } = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = U(n), c = tt(n), l = z(n) === "y", a = Qt.has(s) ? -1 : 1, f = r && l ? -1 : 1, u = q(e, t);
450
446
  let {
451
447
  mainAxis: p,
452
448
  crossAxis: d,
@@ -475,14 +471,14 @@ const Ze = function(t) {
475
471
  async fn(e) {
476
472
  var n, o;
477
473
  const {
478
- x: r,
479
- y: i,
474
+ x: i,
475
+ y: r,
480
476
  placement: s,
481
477
  middlewareData: c
482
478
  } = e, l = await Ue(e, t);
483
479
  return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
484
- x: r + l.x,
485
- y: i + l.y,
480
+ x: i + l.x,
481
+ y: r + l.y,
486
482
  data: {
487
483
  ...l,
488
484
  placement: s
@@ -498,50 +494,49 @@ const Ze = function(t) {
498
494
  const {
499
495
  x: n,
500
496
  y: o,
501
- placement: r,
502
- platform: i
497
+ placement: i
503
498
  } = e, {
504
- mainAxis: s = !0,
505
- crossAxis: c = !1,
506
- limiter: l = {
507
- fn: (g) => {
499
+ mainAxis: r = !0,
500
+ crossAxis: s = !1,
501
+ limiter: c = {
502
+ fn: (w) => {
508
503
  let {
509
- x: y,
510
- y: v
511
- } = g;
504
+ x: g,
505
+ y: x
506
+ } = w;
512
507
  return {
513
- x: y,
514
- y: v
508
+ x: g,
509
+ y: x
515
510
  };
516
511
  }
517
512
  },
518
- ...a
519
- } = q(t, e), f = {
513
+ ...l
514
+ } = q(t, e), a = {
520
515
  x: n,
521
516
  y: o
522
- }, u = await i.detectOverflow(e, a), p = z(U(r)), d = Rt(p);
523
- let m = f[d], h = f[p];
524
- if (s) {
525
- const g = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", v = m + u[g], x = m - u[y];
526
- m = yt(v, m, x);
517
+ }, f = await ot(e, l), u = z(U(i)), p = Ct(u);
518
+ let d = a[p], m = a[u];
519
+ if (r) {
520
+ const w = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", x = d + f[w], b = d - f[g];
521
+ d = vt(x, d, b);
527
522
  }
528
- if (c) {
529
- const g = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", v = h + u[g], x = h - u[y];
530
- h = yt(v, h, x);
523
+ if (s) {
524
+ const w = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", x = m + f[w], b = m - f[g];
525
+ m = vt(x, m, b);
531
526
  }
532
- const w = l.fn({
527
+ const h = c.fn({
533
528
  ...e,
534
- [d]: m,
535
- [p]: h
529
+ [p]: d,
530
+ [u]: m
536
531
  });
537
532
  return {
538
- ...w,
533
+ ...h,
539
534
  data: {
540
- x: w.x - n,
541
- y: w.y - o,
535
+ x: h.x - n,
536
+ y: h.y - o,
542
537
  enabled: {
543
- [d]: s,
544
- [p]: c
538
+ [p]: r,
539
+ [u]: s
545
540
  }
546
541
  }
547
542
  };
@@ -554,8 +549,8 @@ const Ze = function(t) {
554
549
  const {
555
550
  x: n,
556
551
  y: o,
557
- placement: r,
558
- rects: i,
552
+ placement: i,
553
+ rects: r,
559
554
  middlewareData: s
560
555
  } = e, {
561
556
  offset: c = 0,
@@ -564,7 +559,7 @@ const Ze = function(t) {
564
559
  } = q(t, e), f = {
565
560
  x: n,
566
561
  y: o
567
- }, u = z(r), p = Rt(u);
562
+ }, u = z(i), p = Ct(u);
568
563
  let d = f[p], m = f[u];
569
564
  const h = q(c, e), w = typeof h == "number" ? {
570
565
  mainAxis: h,
@@ -575,13 +570,13 @@ const Ze = function(t) {
575
570
  ...h
576
571
  };
577
572
  if (l) {
578
- const v = p === "y" ? "height" : "width", x = i.reference[p] - i.floating[v] + w.mainAxis, R = i.reference[p] + i.reference[v] - w.mainAxis;
579
- d < x ? d = x : d > R && (d = R);
573
+ const b = p === "y" ? "height" : "width", y = r.reference[p] - r.floating[b] + w.mainAxis, v = r.reference[p] + r.reference[b] - w.mainAxis;
574
+ d < y ? d = y : d > v && (d = v);
580
575
  }
581
576
  if (a) {
582
- var g, y;
583
- const v = p === "y" ? "width" : "height", x = Jt.has(U(r)), R = i.reference[u] - i.floating[v] + (x && ((g = s.offset) == null ? void 0 : g[u]) || 0) + (x ? 0 : w.crossAxis), b = i.reference[u] + i.reference[v] + (x ? 0 : ((y = s.offset) == null ? void 0 : y[u]) || 0) - (x ? w.crossAxis : 0);
584
- m < R ? m = R : m > b && (m = b);
577
+ var g, x;
578
+ const b = p === "y" ? "width" : "height", y = Qt.has(U(i)), v = r.reference[u] - r.floating[b] + (y && ((g = s.offset) == null ? void 0 : g[u]) || 0) + (y ? 0 : w.crossAxis), R = r.reference[u] + r.reference[b] + (y ? 0 : ((x = s.offset) == null ? void 0 : x[u]) || 0) - (y ? w.crossAxis : 0);
579
+ m < v ? m = v : m > R && (m = R);
585
580
  }
586
581
  return {
587
582
  [p]: d,
@@ -596,30 +591,30 @@ const Ze = function(t) {
596
591
  async fn(e) {
597
592
  var n, o;
598
593
  const {
599
- placement: r,
600
- rects: i,
594
+ placement: i,
595
+ rects: r,
601
596
  platform: s,
602
597
  elements: c
603
598
  } = e, {
604
599
  apply: l = () => {
605
600
  },
606
601
  ...a
607
- } = q(t, e), f = await s.detectOverflow(e, a), u = U(r), p = tt(r), d = z(r) === "y", {
602
+ } = q(t, e), f = await ot(e, a), u = U(i), p = tt(i), d = z(i) === "y", {
608
603
  width: m,
609
604
  height: h
610
- } = i.floating;
605
+ } = r.floating;
611
606
  let w, g;
612
607
  u === "top" || u === "bottom" ? (w = u, g = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (g = u, w = p === "end" ? "top" : "bottom");
613
- const y = h - f.top - f.bottom, v = m - f.left - f.right, x = Z(h - f[w], y), R = Z(m - f[g], v), b = !e.middlewareData.shift;
614
- let C = x, M = R;
615
- if ((n = e.middlewareData.shift) != null && n.enabled.x && (M = v), (o = e.middlewareData.shift) != null && o.enabled.y && (C = y), b && !p) {
608
+ const x = h - f.top - f.bottom, b = m - f.left - f.right, y = Z(h - f[w], x), v = Z(m - f[g], b), R = !e.middlewareData.shift;
609
+ let O = y, M = v;
610
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (M = b), (o = e.middlewareData.shift) != null && o.enabled.y && (O = x), R && !p) {
616
611
  const D = W(f.left, 0), $ = W(f.right, 0), k = W(f.top, 0), S = W(f.bottom, 0);
617
- d ? M = m - 2 * (D !== 0 || $ !== 0 ? D + $ : W(f.left, f.right)) : C = h - 2 * (k !== 0 || S !== 0 ? k + S : W(f.top, f.bottom));
612
+ d ? M = m - 2 * (D !== 0 || $ !== 0 ? D + $ : W(f.left, f.right)) : O = h - 2 * (k !== 0 || S !== 0 ? k + S : W(f.top, f.bottom));
618
613
  }
619
614
  await l({
620
615
  ...e,
621
616
  availableWidth: M,
622
- availableHeight: C
617
+ availableHeight: O
623
618
  });
624
619
  const F = await s.getDimensions(c.floating);
625
620
  return m !== F.width || h !== F.height ? {
@@ -630,11 +625,11 @@ const Ze = function(t) {
630
625
  }
631
626
  };
632
627
  };
633
- function mt() {
628
+ function pt() {
634
629
  return typeof window < "u";
635
630
  }
636
631
  function et(t) {
637
- return Qt(t) ? (t.nodeName || "").toLowerCase() : "#document";
632
+ return te(t) ? (t.nodeName || "").toLowerCase() : "#document";
638
633
  }
639
634
  function H(t) {
640
635
  var e;
@@ -642,19 +637,19 @@ function H(t) {
642
637
  }
643
638
  function Y(t) {
644
639
  var e;
645
- return (e = (Qt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
640
+ return (e = (te(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
646
641
  }
647
- function Qt(t) {
648
- return mt() ? t instanceof Node || t instanceof H(t).Node : !1;
642
+ function te(t) {
643
+ return pt() ? t instanceof Node || t instanceof H(t).Node : !1;
649
644
  }
650
645
  function _(t) {
651
- return mt() ? t instanceof Element || t instanceof H(t).Element : !1;
646
+ return pt() ? t instanceof Element || t instanceof H(t).Element : !1;
652
647
  }
653
648
  function X(t) {
654
- return mt() ? t instanceof HTMLElement || t instanceof H(t).HTMLElement : !1;
649
+ return pt() ? t instanceof HTMLElement || t instanceof H(t).HTMLElement : !1;
655
650
  }
656
- function Xt(t) {
657
- return !mt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof H(t).ShadowRoot;
651
+ function Yt(t) {
652
+ return !pt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof H(t).ShadowRoot;
658
653
  }
659
654
  const Qe = /* @__PURE__ */ new Set(["inline", "contents"]);
660
655
  function rt(t) {
@@ -662,16 +657,16 @@ function rt(t) {
662
657
  overflow: e,
663
658
  overflowX: n,
664
659
  overflowY: o,
665
- display: r
660
+ display: i
666
661
  } = B(t);
667
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Qe.has(r);
662
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Qe.has(i);
668
663
  }
669
664
  const tn = /* @__PURE__ */ new Set(["table", "td", "th"]);
670
665
  function en(t) {
671
666
  return tn.has(et(t));
672
667
  }
673
668
  const nn = [":popover-open", ":modal"];
674
- function pt(t) {
669
+ function ht(t) {
675
670
  return nn.some((e) => {
676
671
  try {
677
672
  return t.matches(e);
@@ -681,22 +676,22 @@ function pt(t) {
681
676
  });
682
677
  }
683
678
  const on = ["transform", "translate", "scale", "rotate", "perspective"], rn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], sn = ["paint", "layout", "strict", "content"];
684
- function Pt(t) {
685
- const e = St(), n = _(t) ? B(t) : t;
679
+ function St(t) {
680
+ const e = Et(), n = _(t) ? B(t) : t;
686
681
  return on.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) || rn.some((o) => (n.willChange || "").includes(o)) || sn.some((o) => (n.contain || "").includes(o));
687
682
  }
688
683
  function cn(t) {
689
684
  let e = K(t);
690
685
  for (; X(e) && !Q(e); ) {
691
- if (Pt(e))
686
+ if (St(e))
692
687
  return e;
693
- if (pt(e))
688
+ if (ht(e))
694
689
  return null;
695
690
  e = K(e);
696
691
  }
697
692
  return null;
698
693
  }
699
- function St() {
694
+ function Et() {
700
695
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
701
696
  }
702
697
  const ln = /* @__PURE__ */ new Set(["html", "body", "#document"]);
@@ -706,7 +701,7 @@ function Q(t) {
706
701
  function B(t) {
707
702
  return H(t).getComputedStyle(t);
708
703
  }
709
- function ht(t) {
704
+ function gt(t) {
710
705
  return _(t) ? {
711
706
  scrollLeft: t.scrollLeft,
712
707
  scrollTop: t.scrollTop
@@ -722,60 +717,60 @@ function K(t) {
722
717
  // Step into the shadow DOM of the parent of a slotted node.
723
718
  t.assignedSlot || // DOM Element detected.
724
719
  t.parentNode || // ShadowRoot detected.
725
- Xt(t) && t.host || // Fallback.
720
+ Yt(t) && t.host || // Fallback.
726
721
  Y(t)
727
722
  );
728
- return Xt(e) ? e.host : e;
723
+ return Yt(e) ? e.host : e;
729
724
  }
730
- function te(t) {
725
+ function ee(t) {
731
726
  const e = K(t);
732
- return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : X(e) && rt(e) ? e : te(e);
727
+ return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : X(e) && rt(e) ? e : ee(e);
733
728
  }
734
- function ot(t, e, n) {
729
+ function it(t, e, n) {
735
730
  var o;
736
731
  e === void 0 && (e = []), n === void 0 && (n = !0);
737
- const r = te(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = H(r);
738
- if (i) {
739
- const c = bt(s);
740
- return e.concat(s, s.visualViewport || [], rt(r) ? r : [], c && n ? ot(c) : []);
732
+ const i = ee(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = H(i);
733
+ if (r) {
734
+ const c = At(s);
735
+ return e.concat(s, s.visualViewport || [], rt(i) ? i : [], c && n ? it(c) : []);
741
736
  }
742
- return e.concat(r, ot(r, [], n));
737
+ return e.concat(i, it(i, [], n));
743
738
  }
744
- function bt(t) {
739
+ function At(t) {
745
740
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
746
741
  }
747
- function ee(t) {
742
+ function ne(t) {
748
743
  const e = B(t);
749
744
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
750
- const r = X(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = at(n) !== i || at(o) !== s;
751
- return c && (n = i, o = s), {
745
+ const i = X(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, c = ft(n) !== r || ft(o) !== s;
746
+ return c && (n = r, o = s), {
752
747
  width: n,
753
748
  height: o,
754
749
  $: c
755
750
  };
756
751
  }
757
- function Et(t) {
752
+ function Lt(t) {
758
753
  return _(t) ? t : t.contextElement;
759
754
  }
760
755
  function J(t) {
761
- const e = Et(t);
756
+ const e = Lt(t);
762
757
  if (!X(e))
763
758
  return I(1);
764
759
  const n = e.getBoundingClientRect(), {
765
760
  width: o,
766
- height: r,
767
- $: i
768
- } = ee(e);
769
- let s = (i ? at(n.width) : n.width) / o, c = (i ? at(n.height) : n.height) / r;
761
+ height: i,
762
+ $: r
763
+ } = ne(e);
764
+ let s = (r ? ft(n.width) : n.width) / o, c = (r ? ft(n.height) : n.height) / i;
770
765
  return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
771
766
  x: s,
772
767
  y: c
773
768
  };
774
769
  }
775
770
  const an = /* @__PURE__ */ I(0);
776
- function ne(t) {
771
+ function oe(t) {
777
772
  const e = H(t);
778
- return !St() || !e.visualViewport ? an : {
773
+ return !Et() || !e.visualViewport ? an : {
779
774
  x: e.visualViewport.offsetLeft,
780
775
  y: e.visualViewport.offsetTop
781
776
  };
@@ -785,35 +780,35 @@ function fn(t, e, n) {
785
780
  }
786
781
  function G(t, e, n, o) {
787
782
  e === void 0 && (e = !1), n === void 0 && (n = !1);
788
- const r = t.getBoundingClientRect(), i = Et(t);
783
+ const i = t.getBoundingClientRect(), r = Lt(t);
789
784
  let s = I(1);
790
785
  e && (o ? _(o) && (s = J(o)) : s = J(t));
791
- const c = fn(i, n, o) ? ne(i) : I(0);
792
- let l = (r.left + c.x) / s.x, a = (r.top + c.y) / s.y, f = r.width / s.x, u = r.height / s.y;
793
- if (i) {
794
- const p = H(i), d = o && _(o) ? H(o) : o;
795
- let m = p, h = bt(m);
786
+ const c = fn(r, n, o) ? oe(r) : I(0);
787
+ let l = (i.left + c.x) / s.x, a = (i.top + c.y) / s.y, f = i.width / s.x, u = i.height / s.y;
788
+ if (r) {
789
+ const p = H(r), d = o && _(o) ? H(o) : o;
790
+ let m = p, h = At(m);
796
791
  for (; h && o && d !== m; ) {
797
- const w = J(h), g = h.getBoundingClientRect(), y = B(h), v = g.left + (h.clientLeft + parseFloat(y.paddingLeft)) * w.x, x = g.top + (h.clientTop + parseFloat(y.paddingTop)) * w.y;
798
- l *= w.x, a *= w.y, f *= w.x, u *= w.y, l += v, a += x, m = H(h), h = bt(m);
792
+ const w = J(h), g = h.getBoundingClientRect(), x = B(h), b = g.left + (h.clientLeft + parseFloat(x.paddingLeft)) * w.x, y = g.top + (h.clientTop + parseFloat(x.paddingTop)) * w.y;
793
+ l *= w.x, a *= w.y, f *= w.x, u *= w.y, l += b, a += y, m = H(h), h = At(m);
799
794
  }
800
795
  }
801
- return ut({
796
+ return dt({
802
797
  width: f,
803
798
  height: u,
804
799
  x: l,
805
800
  y: a
806
801
  });
807
802
  }
808
- function gt(t, e) {
809
- const n = ht(t).scrollLeft;
803
+ function wt(t, e) {
804
+ const n = gt(t).scrollLeft;
810
805
  return e ? e.left + n : G(Y(t)).left + n;
811
806
  }
812
- function oe(t, e) {
813
- const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - gt(t, n), r = n.top + e.scrollTop;
807
+ function ie(t, e) {
808
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - wt(t, n), i = n.top + e.scrollTop;
814
809
  return {
815
810
  x: o,
816
- y: r
811
+ y: i
817
812
  };
818
813
  }
819
814
  function un(t) {
@@ -821,21 +816,21 @@ function un(t) {
821
816
  elements: e,
822
817
  rect: n,
823
818
  offsetParent: o,
824
- strategy: r
819
+ strategy: i
825
820
  } = t;
826
- const i = r === "fixed", s = Y(o), c = e ? pt(e.floating) : !1;
827
- if (o === s || c && i)
821
+ const r = i === "fixed", s = Y(o), c = e ? ht(e.floating) : !1;
822
+ if (o === s || c && r)
828
823
  return n;
829
824
  let l = {
830
825
  scrollLeft: 0,
831
826
  scrollTop: 0
832
827
  }, a = I(1);
833
828
  const f = I(0), u = X(o);
834
- if ((u || !u && !i) && ((et(o) !== "body" || rt(s)) && (l = ht(o)), X(o))) {
829
+ if ((u || !u && !r) && ((et(o) !== "body" || rt(s)) && (l = gt(o)), X(o))) {
835
830
  const d = G(o);
836
831
  a = J(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
837
832
  }
838
- const p = s && !u && !i ? oe(s, l) : I(0);
833
+ const p = s && !u && !r ? ie(s, l) : I(0);
839
834
  return {
840
835
  width: n.width * a.x,
841
836
  height: n.height * a.y,
@@ -847,32 +842,32 @@ function dn(t) {
847
842
  return Array.from(t.getClientRects());
848
843
  }
849
844
  function mn(t) {
850
- const e = Y(t), n = ht(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);
851
- let s = -n.scrollLeft + gt(t);
845
+ const e = Y(t), n = gt(t), o = t.ownerDocument.body, i = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
846
+ let s = -n.scrollLeft + wt(t);
852
847
  const c = -n.scrollTop;
853
- return B(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - r), {
854
- width: r,
855
- height: i,
848
+ return B(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - i), {
849
+ width: i,
850
+ height: r,
856
851
  x: s,
857
852
  y: c
858
853
  };
859
854
  }
860
- const Yt = 25;
855
+ const jt = 25;
861
856
  function pn(t, e) {
862
- const n = H(t), o = Y(t), r = n.visualViewport;
863
- let i = o.clientWidth, s = o.clientHeight, c = 0, l = 0;
864
- if (r) {
865
- i = r.width, s = r.height;
866
- const f = St();
867
- (!f || f && e === "fixed") && (c = r.offsetLeft, l = r.offsetTop);
857
+ const n = H(t), o = Y(t), i = n.visualViewport;
858
+ let r = o.clientWidth, s = o.clientHeight, c = 0, l = 0;
859
+ if (i) {
860
+ r = i.width, s = i.height;
861
+ const f = Et();
862
+ (!f || f && e === "fixed") && (c = i.offsetLeft, l = i.offsetTop);
868
863
  }
869
- const a = gt(o);
864
+ const a = wt(o);
870
865
  if (a <= 0) {
871
866
  const f = o.ownerDocument, u = f.body, p = getComputedStyle(u), d = f.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, m = Math.abs(o.clientWidth - u.clientWidth - d);
872
- m <= Yt && (i -= m);
873
- } else a <= Yt && (i += a);
867
+ m <= jt && (r -= m);
868
+ } else a <= jt && (r += a);
874
869
  return {
875
- width: i,
870
+ width: r,
876
871
  height: s,
877
872
  x: c,
878
873
  y: l
@@ -880,7 +875,7 @@ function pn(t, e) {
880
875
  }
881
876
  const hn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
882
877
  function gn(t, e) {
883
- const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = X(t) ? J(t) : I(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, l = r * i.x, a = o * i.y;
878
+ const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = X(t) ? J(t) : I(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = i * r.x, a = o * r.y;
884
879
  return {
885
880
  width: s,
886
881
  height: c,
@@ -888,7 +883,7 @@ function gn(t, e) {
888
883
  y: a
889
884
  };
890
885
  }
891
- function jt(t, e, n) {
886
+ function qt(t, e, n) {
892
887
  let o;
893
888
  if (e === "viewport")
894
889
  o = pn(t, n);
@@ -897,15 +892,15 @@ function jt(t, e, n) {
897
892
  else if (_(e))
898
893
  o = gn(e, n);
899
894
  else {
900
- const r = ne(t);
895
+ const i = oe(t);
901
896
  o = {
902
- x: e.x - r.x,
903
- y: e.y - r.y,
897
+ x: e.x - i.x,
898
+ y: e.y - i.y,
904
899
  width: e.width,
905
900
  height: e.height
906
901
  };
907
902
  }
908
- return ut(o);
903
+ return dt(o);
909
904
  }
910
905
  function re(t, e) {
911
906
  const n = K(t);
@@ -915,12 +910,12 @@ function wn(t, e) {
915
910
  const n = e.get(t);
916
911
  if (n)
917
912
  return n;
918
- let o = ot(t, [], !1).filter((c) => _(c) && et(c) !== "body"), r = null;
919
- const i = B(t).position === "fixed";
920
- let s = i ? K(t) : t;
913
+ let o = it(t, [], !1).filter((c) => _(c) && et(c) !== "body"), i = null;
914
+ const r = B(t).position === "fixed";
915
+ let s = r ? K(t) : t;
921
916
  for (; _(s) && !Q(s); ) {
922
- const c = B(s), l = Pt(s);
923
- !l && c.position === "fixed" && (r = null), (i ? !l && !r : !l && c.position === "static" && !!r && hn.has(r.position) || rt(s) && !l && re(t, s)) ? o = o.filter((f) => f !== s) : r = c, s = K(s);
917
+ const c = B(s), l = St(s);
918
+ !l && c.position === "fixed" && (i = null), (r ? !l && !i : !l && c.position === "static" && !!i && hn.has(i.position) || rt(s) && !l && re(t, s)) ? o = o.filter((f) => f !== s) : i = c, s = K(s);
924
919
  }
925
920
  return e.set(t, o), o;
926
921
  }
@@ -929,12 +924,12 @@ function xn(t) {
929
924
  element: e,
930
925
  boundary: n,
931
926
  rootBoundary: o,
932
- strategy: r
927
+ strategy: i
933
928
  } = t;
934
- const s = [...n === "clippingAncestors" ? pt(e) ? [] : wn(e, this._c) : [].concat(n), o], c = s[0], l = s.reduce((a, f) => {
935
- const u = jt(e, f, r);
929
+ const s = [...n === "clippingAncestors" ? ht(e) ? [] : wn(e, this._c) : [].concat(n), o], c = s[0], l = s.reduce((a, f) => {
930
+ const u = qt(e, f, i);
936
931
  return a.top = W(u.top, a.top), a.right = Z(u.right, a.right), a.bottom = Z(u.bottom, a.bottom), a.left = W(u.left, a.left), a;
937
- }, jt(e, c, r));
932
+ }, qt(e, c, i));
938
933
  return {
939
934
  width: l.right - l.left,
940
935
  height: l.bottom - l.top,
@@ -946,29 +941,29 @@ function yn(t) {
946
941
  const {
947
942
  width: e,
948
943
  height: n
949
- } = ee(t);
944
+ } = ne(t);
950
945
  return {
951
946
  width: e,
952
947
  height: n
953
948
  };
954
949
  }
955
950
  function vn(t, e, n) {
956
- const o = X(e), r = Y(e), i = n === "fixed", s = G(t, !0, i, e);
951
+ const o = X(e), i = Y(e), r = n === "fixed", s = G(t, !0, r, e);
957
952
  let c = {
958
953
  scrollLeft: 0,
959
954
  scrollTop: 0
960
955
  };
961
956
  const l = I(0);
962
957
  function a() {
963
- l.x = gt(r);
958
+ l.x = wt(i);
964
959
  }
965
- if (o || !o && !i)
966
- if ((et(e) !== "body" || rt(r)) && (c = ht(e)), o) {
967
- const d = G(e, !0, i, e);
960
+ if (o || !o && !r)
961
+ if ((et(e) !== "body" || rt(i)) && (c = gt(e)), o) {
962
+ const d = G(e, !0, r, e);
968
963
  l.x = d.x + e.clientLeft, l.y = d.y + e.clientTop;
969
- } else r && a();
970
- i && !o && r && a();
971
- const f = r && !o && !i ? oe(r, c) : I(0), u = s.left + c.scrollLeft - l.x - f.x, p = s.top + c.scrollTop - l.y - f.y;
964
+ } else i && a();
965
+ r && !o && i && a();
966
+ const f = i && !o && !r ? ie(i, c) : I(0), u = s.left + c.scrollLeft - l.x - f.x, p = s.top + c.scrollTop - l.y - f.y;
972
967
  return {
973
968
  x: u,
974
969
  y: p,
@@ -976,10 +971,10 @@ function vn(t, e, n) {
976
971
  height: s.height
977
972
  };
978
973
  }
979
- function wt(t) {
974
+ function xt(t) {
980
975
  return B(t).position === "static";
981
976
  }
982
- function qt(t, e) {
977
+ function Ut(t, e) {
983
978
  if (!X(t) || B(t).position === "fixed")
984
979
  return null;
985
980
  if (e)
@@ -987,26 +982,26 @@ function qt(t, e) {
987
982
  let n = t.offsetParent;
988
983
  return Y(t) === n && (n = n.ownerDocument.body), n;
989
984
  }
990
- function ie(t, e) {
985
+ function se(t, e) {
991
986
  const n = H(t);
992
- if (pt(t))
987
+ if (ht(t))
993
988
  return n;
994
989
  if (!X(t)) {
995
- let r = K(t);
996
- for (; r && !Q(r); ) {
997
- if (_(r) && !wt(r))
998
- return r;
999
- r = K(r);
990
+ let i = K(t);
991
+ for (; i && !Q(i); ) {
992
+ if (_(i) && !xt(i))
993
+ return i;
994
+ i = K(i);
1000
995
  }
1001
996
  return n;
1002
997
  }
1003
- let o = qt(t, e);
1004
- for (; o && en(o) && wt(o); )
1005
- o = qt(o, e);
1006
- return o && Q(o) && wt(o) && !Pt(o) ? n : o || cn(t) || n;
998
+ let o = Ut(t, e);
999
+ for (; o && en(o) && xt(o); )
1000
+ o = Ut(o, e);
1001
+ return o && Q(o) && xt(o) && !St(o) ? n : o || cn(t) || n;
1007
1002
  }
1008
1003
  const bn = async function(t) {
1009
- const e = this.getOffsetParent || ie, n = this.getDimensions, o = await n(t.floating);
1004
+ const e = this.getOffsetParent || se, n = this.getDimensions, o = await n(t.floating);
1010
1005
  return {
1011
1006
  reference: vn(t.reference, await e(t.floating), t.strategy),
1012
1007
  floating: {
@@ -1024,7 +1019,7 @@ const Rn = {
1024
1019
  convertOffsetParentRelativeRectToViewportRelativeRect: un,
1025
1020
  getDocumentElement: Y,
1026
1021
  getClippingRect: xn,
1027
- getOffsetParent: ie,
1022
+ getOffsetParent: se,
1028
1023
  getElementRects: bn,
1029
1024
  getClientRects: dn,
1030
1025
  getDimensions: yn,
@@ -1032,18 +1027,18 @@ const Rn = {
1032
1027
  isElement: _,
1033
1028
  isRTL: An
1034
1029
  };
1035
- function se(t, e) {
1030
+ function ce(t, e) {
1036
1031
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1037
1032
  }
1038
- function On(t, e) {
1033
+ function Cn(t, e) {
1039
1034
  let n = null, o;
1040
- const r = Y(t);
1041
- function i() {
1035
+ const i = Y(t);
1036
+ function r() {
1042
1037
  var c;
1043
1038
  clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
1044
1039
  }
1045
1040
  function s(c, l) {
1046
- c === void 0 && (c = !1), l === void 0 && (l = 1), i();
1041
+ c === void 0 && (c = !1), l === void 0 && (l = 1), r();
1047
1042
  const a = t.getBoundingClientRect(), {
1048
1043
  left: f,
1049
1044
  top: u,
@@ -1052,126 +1047,126 @@ function On(t, e) {
1052
1047
  } = a;
1053
1048
  if (c || e(), !p || !d)
1054
1049
  return;
1055
- const m = ct(u), h = ct(r.clientWidth - (f + p)), w = ct(r.clientHeight - (u + d)), g = ct(f), v = {
1050
+ const m = lt(u), h = lt(i.clientWidth - (f + p)), w = lt(i.clientHeight - (u + d)), g = lt(f), b = {
1056
1051
  rootMargin: -m + "px " + -h + "px " + -w + "px " + -g + "px",
1057
1052
  threshold: W(0, Z(1, l)) || 1
1058
1053
  };
1059
- let x = !0;
1060
- function R(b) {
1061
- const C = b[0].intersectionRatio;
1062
- if (C !== l) {
1063
- if (!x)
1054
+ let y = !0;
1055
+ function v(R) {
1056
+ const O = R[0].intersectionRatio;
1057
+ if (O !== l) {
1058
+ if (!y)
1064
1059
  return s();
1065
- C ? s(!1, C) : o = setTimeout(() => {
1060
+ O ? s(!1, O) : o = setTimeout(() => {
1066
1061
  s(!1, 1e-7);
1067
1062
  }, 1e3);
1068
1063
  }
1069
- C === 1 && !se(a, t.getBoundingClientRect()) && s(), x = !1;
1064
+ O === 1 && !ce(a, t.getBoundingClientRect()) && s(), y = !1;
1070
1065
  }
1071
1066
  try {
1072
- n = new IntersectionObserver(R, {
1073
- ...v,
1067
+ n = new IntersectionObserver(v, {
1068
+ ...b,
1074
1069
  // Handle <iframe>s
1075
- root: r.ownerDocument
1070
+ root: i.ownerDocument
1076
1071
  });
1077
1072
  } catch {
1078
- n = new IntersectionObserver(R, v);
1073
+ n = new IntersectionObserver(v, b);
1079
1074
  }
1080
1075
  n.observe(t);
1081
1076
  }
1082
- return s(!0), i;
1077
+ return s(!0), r;
1083
1078
  }
1084
- function Cn(t, e, n, o) {
1079
+ function On(t, e, n, o) {
1085
1080
  o === void 0 && (o = {});
1086
1081
  const {
1087
- ancestorScroll: r = !0,
1088
- ancestorResize: i = !0,
1082
+ ancestorScroll: i = !0,
1083
+ ancestorResize: r = !0,
1089
1084
  elementResize: s = typeof ResizeObserver == "function",
1090
1085
  layoutShift: c = typeof IntersectionObserver == "function",
1091
1086
  animationFrame: l = !1
1092
- } = o, a = Et(t), f = r || i ? [...a ? ot(a) : [], ...ot(e)] : [];
1087
+ } = o, a = Lt(t), f = i || r ? [...a ? it(a) : [], ...it(e)] : [];
1093
1088
  f.forEach((g) => {
1094
- r && g.addEventListener("scroll", n, {
1089
+ i && g.addEventListener("scroll", n, {
1095
1090
  passive: !0
1096
- }), i && g.addEventListener("resize", n);
1091
+ }), r && g.addEventListener("resize", n);
1097
1092
  });
1098
- const u = a && c ? On(a, n) : null;
1093
+ const u = a && c ? Cn(a, n) : null;
1099
1094
  let p = -1, d = null;
1100
1095
  s && (d = new ResizeObserver((g) => {
1101
- let [y] = g;
1102
- y && y.target === a && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1103
- var v;
1104
- (v = d) == null || v.observe(e);
1096
+ let [x] = g;
1097
+ x && x.target === a && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1098
+ var b;
1099
+ (b = d) == null || b.observe(e);
1105
1100
  })), n();
1106
1101
  }), a && !l && d.observe(a), d.observe(e));
1107
1102
  let m, h = l ? G(t) : null;
1108
1103
  l && w();
1109
1104
  function w() {
1110
1105
  const g = G(t);
1111
- h && !se(h, g) && n(), h = g, m = requestAnimationFrame(w);
1106
+ h && !ce(h, g) && n(), h = g, m = requestAnimationFrame(w);
1112
1107
  }
1113
1108
  return n(), () => {
1114
1109
  var g;
1115
- f.forEach((y) => {
1116
- r && y.removeEventListener("scroll", n), i && y.removeEventListener("resize", n);
1110
+ f.forEach((x) => {
1111
+ i && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
1117
1112
  }), u == null || u(), (g = d) == null || g.disconnect(), d = null, l && cancelAnimationFrame(m);
1118
1113
  };
1119
1114
  }
1120
- const Pn = Ze, Sn = Ke, En = je, Ln = Je, Dn = qe, Ut = Ye, Mn = Ge, Tn = (t, e, n) => {
1121
- const o = /* @__PURE__ */ new Map(), r = {
1115
+ const Pn = Ze, Sn = Ke, En = je, Ln = Je, Dn = qe, Zt = Ye, Mn = Ge, Tn = (t, e, n) => {
1116
+ const o = /* @__PURE__ */ new Map(), i = {
1122
1117
  platform: Rn,
1123
1118
  ...n
1124
- }, i = {
1125
- ...r.platform,
1119
+ }, r = {
1120
+ ...i.platform,
1126
1121
  _c: o
1127
1122
  };
1128
1123
  return Xe(t, e, {
1129
- ...r,
1130
- platform: i
1124
+ ...i,
1125
+ platform: r
1131
1126
  });
1132
1127
  };
1133
1128
  var $n = typeof document < "u", kn = function() {
1134
- }, lt = $n ? Se : kn;
1135
- function dt(t, e) {
1129
+ }, at = $n ? Ee : kn;
1130
+ function mt(t, e) {
1136
1131
  if (t === e)
1137
1132
  return !0;
1138
1133
  if (typeof t != typeof e)
1139
1134
  return !1;
1140
1135
  if (typeof t == "function" && t.toString() === e.toString())
1141
1136
  return !0;
1142
- let n, o, r;
1137
+ let n, o, i;
1143
1138
  if (t && e && typeof t == "object") {
1144
1139
  if (Array.isArray(t)) {
1145
1140
  if (n = t.length, n !== e.length) return !1;
1146
1141
  for (o = n; o-- !== 0; )
1147
- if (!dt(t[o], e[o]))
1142
+ if (!mt(t[o], e[o]))
1148
1143
  return !1;
1149
1144
  return !0;
1150
1145
  }
1151
- if (r = Object.keys(t), n = r.length, n !== Object.keys(e).length)
1146
+ if (i = Object.keys(t), n = i.length, n !== Object.keys(e).length)
1152
1147
  return !1;
1153
1148
  for (o = n; o-- !== 0; )
1154
- if (!{}.hasOwnProperty.call(e, r[o]))
1149
+ if (!{}.hasOwnProperty.call(e, i[o]))
1155
1150
  return !1;
1156
1151
  for (o = n; o-- !== 0; ) {
1157
- const i = r[o];
1158
- if (!(i === "_owner" && t.$$typeof) && !dt(t[i], e[i]))
1152
+ const r = i[o];
1153
+ if (!(r === "_owner" && t.$$typeof) && !mt(t[r], e[r]))
1159
1154
  return !1;
1160
1155
  }
1161
1156
  return !0;
1162
1157
  }
1163
1158
  return t !== t && e !== e;
1164
1159
  }
1165
- function ce(t) {
1160
+ function le(t) {
1166
1161
  return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1167
1162
  }
1168
- function Zt(t, e) {
1169
- const n = ce(t);
1163
+ function Kt(t, e) {
1164
+ const n = le(t);
1170
1165
  return Math.round(e * n) / n;
1171
1166
  }
1172
- function xt(t) {
1173
- const e = O.useRef(t);
1174
- return lt(() => {
1167
+ function yt(t) {
1168
+ const e = C.useRef(t);
1169
+ return at(() => {
1175
1170
  e.current = t;
1176
1171
  }), e;
1177
1172
  }
@@ -1181,36 +1176,36 @@ function Fn(t) {
1181
1176
  placement: e = "bottom",
1182
1177
  strategy: n = "absolute",
1183
1178
  middleware: o = [],
1184
- platform: r,
1179
+ platform: i,
1185
1180
  elements: {
1186
- reference: i,
1181
+ reference: r,
1187
1182
  floating: s
1188
1183
  } = {},
1189
1184
  transform: c = !0,
1190
1185
  whileElementsMounted: l,
1191
1186
  open: a
1192
- } = t, [f, u] = O.useState({
1187
+ } = t, [f, u] = C.useState({
1193
1188
  x: 0,
1194
1189
  y: 0,
1195
1190
  strategy: n,
1196
1191
  placement: e,
1197
1192
  middlewareData: {},
1198
1193
  isPositioned: !1
1199
- }), [p, d] = O.useState(o);
1200
- dt(p, o) || d(o);
1201
- const [m, h] = O.useState(null), [w, g] = O.useState(null), y = O.useCallback((A) => {
1202
- A !== b.current && (b.current = A, h(A));
1203
- }, []), v = O.useCallback((A) => {
1204
- A !== C.current && (C.current = A, g(A));
1205
- }, []), x = i || m, R = s || w, b = O.useRef(null), C = O.useRef(null), M = O.useRef(f), F = l != null, D = xt(l), $ = xt(r), k = xt(a), S = O.useCallback(() => {
1206
- if (!b.current || !C.current)
1194
+ }), [p, d] = C.useState(o);
1195
+ mt(p, o) || d(o);
1196
+ const [m, h] = C.useState(null), [w, g] = C.useState(null), x = C.useCallback((A) => {
1197
+ A !== R.current && (R.current = A, h(A));
1198
+ }, []), b = C.useCallback((A) => {
1199
+ A !== O.current && (O.current = A, g(A));
1200
+ }, []), y = r || m, v = s || w, R = C.useRef(null), O = C.useRef(null), M = C.useRef(f), F = l != null, D = yt(l), $ = yt(i), k = yt(a), S = C.useCallback(() => {
1201
+ if (!R.current || !O.current)
1207
1202
  return;
1208
1203
  const A = {
1209
1204
  placement: e,
1210
1205
  strategy: n,
1211
1206
  middleware: p
1212
1207
  };
1213
- $.current && (A.platform = $.current), Tn(b.current, C.current, A).then((T) => {
1208
+ $.current && (A.platform = $.current), Tn(R.current, O.current, A).then((T) => {
1214
1209
  const V = {
1215
1210
  ...T,
1216
1211
  // The floating element's position may be recomputed while it's closed
@@ -1219,36 +1214,36 @@ function Fn(t) {
1219
1214
  // setting it to `true` when `open === false` (must be specified).
1220
1215
  isPositioned: k.current !== !1
1221
1216
  };
1222
- P.current && !dt(M.current, V) && (M.current = V, Ee.flushSync(() => {
1217
+ P.current && !mt(M.current, V) && (M.current = V, Le.flushSync(() => {
1223
1218
  u(V);
1224
1219
  }));
1225
1220
  });
1226
1221
  }, [p, e, n, $, k]);
1227
- lt(() => {
1222
+ at(() => {
1228
1223
  a === !1 && M.current.isPositioned && (M.current.isPositioned = !1, u((A) => ({
1229
1224
  ...A,
1230
1225
  isPositioned: !1
1231
1226
  })));
1232
1227
  }, [a]);
1233
- const P = O.useRef(!1);
1234
- lt(() => (P.current = !0, () => {
1228
+ const P = C.useRef(!1);
1229
+ at(() => (P.current = !0, () => {
1235
1230
  P.current = !1;
1236
- }), []), lt(() => {
1237
- if (x && (b.current = x), R && (C.current = R), x && R) {
1231
+ }), []), at(() => {
1232
+ if (y && (R.current = y), v && (O.current = v), y && v) {
1238
1233
  if (D.current)
1239
- return D.current(x, R, S);
1234
+ return D.current(y, v, S);
1240
1235
  S();
1241
1236
  }
1242
- }, [x, R, S, D, F]);
1243
- const N = O.useMemo(() => ({
1244
- reference: b,
1245
- floating: C,
1246
- setReference: y,
1247
- setFloating: v
1248
- }), [y, v]), E = O.useMemo(() => ({
1249
- reference: x,
1250
- floating: R
1251
- }), [x, R]), L = O.useMemo(() => {
1237
+ }, [y, v, S, D, F]);
1238
+ const N = C.useMemo(() => ({
1239
+ reference: R,
1240
+ floating: O,
1241
+ setReference: x,
1242
+ setFloating: b
1243
+ }), [x, b]), E = C.useMemo(() => ({
1244
+ reference: y,
1245
+ floating: v
1246
+ }), [y, v]), L = C.useMemo(() => {
1252
1247
  const A = {
1253
1248
  position: n,
1254
1249
  left: 0,
@@ -1256,11 +1251,11 @@ function Fn(t) {
1256
1251
  };
1257
1252
  if (!E.floating)
1258
1253
  return A;
1259
- const T = Zt(E.floating, f.x), V = Zt(E.floating, f.y);
1254
+ const T = Kt(E.floating, f.x), V = Kt(E.floating, f.y);
1260
1255
  return c ? {
1261
1256
  ...A,
1262
1257
  transform: "translate(" + T + "px, " + V + "px)",
1263
- ...ce(E.floating) >= 1.5 && {
1258
+ ...le(E.floating) >= 1.5 && {
1264
1259
  willChange: "transform"
1265
1260
  }
1266
1261
  } : {
@@ -1269,7 +1264,7 @@ function Fn(t) {
1269
1264
  top: V
1270
1265
  };
1271
1266
  }, [n, c, E.floating, f.x, f.y]);
1272
- return O.useMemo(() => ({
1267
+ return C.useMemo(() => ({
1273
1268
  ...f,
1274
1269
  update: S,
1275
1270
  refs: N,
@@ -1287,14 +1282,14 @@ const Nn = (t) => {
1287
1282
  fn(n) {
1288
1283
  const {
1289
1284
  element: o,
1290
- padding: r
1285
+ padding: i
1291
1286
  } = typeof t == "function" ? t(n) : t;
1292
- return o && e(o) ? o.current != null ? Ut({
1287
+ return o && e(o) ? o.current != null ? Zt({
1293
1288
  element: o.current,
1294
- padding: r
1295
- }).fn(n) : {} : o ? Ut({
1289
+ padding: i
1290
+ }).fn(n) : {} : o ? Zt({
1296
1291
  element: o,
1297
- padding: r
1292
+ padding: i
1298
1293
  }).fn(n) : {};
1299
1294
  }
1300
1295
  };
@@ -1320,45 +1315,45 @@ const Nn = (t) => {
1320
1315
  ...Nn(t),
1321
1316
  options: [t, e]
1322
1317
  });
1323
- var Xn = "Arrow", le = O.forwardRef((t, e) => {
1324
- const { children: n, width: o = 10, height: r = 5, ...i } = t;
1318
+ var Xn = "Arrow", ae = C.forwardRef((t, e) => {
1319
+ const { children: n, width: o = 10, height: i = 5, ...r } = t;
1325
1320
  return /* @__PURE__ */ j(
1326
- At.svg,
1321
+ Rt.svg,
1327
1322
  {
1328
- ...i,
1323
+ ...r,
1329
1324
  ref: e,
1330
1325
  width: o,
1331
- height: r,
1326
+ height: i,
1332
1327
  viewBox: "0 0 30 10",
1333
1328
  preserveAspectRatio: "none",
1334
1329
  children: t.asChild ? n : /* @__PURE__ */ j("polygon", { points: "0,0 30,0 15,10" })
1335
1330
  }
1336
1331
  );
1337
1332
  });
1338
- le.displayName = Xn;
1339
- var Yn = le, Lt = "Popper", [ae, oo] = Le(Lt), [jn, fe] = ae(Lt), ue = (t) => {
1340
- const { __scopePopper: e, children: n } = t, [o, r] = O.useState(null);
1341
- return /* @__PURE__ */ j(jn, { scope: e, anchor: o, onAnchorChange: r, children: n });
1333
+ ae.displayName = Xn;
1334
+ var Yn = ae, Dt = "Popper", [fe, oo] = De(Dt), [jn, ue] = fe(Dt), de = (t) => {
1335
+ const { __scopePopper: e, children: n } = t, [o, i] = C.useState(null);
1336
+ return /* @__PURE__ */ j(jn, { scope: e, anchor: o, onAnchorChange: i, children: n });
1342
1337
  };
1343
- ue.displayName = Lt;
1344
- var de = "PopperAnchor", me = O.forwardRef(
1338
+ de.displayName = Dt;
1339
+ var me = "PopperAnchor", pe = C.forwardRef(
1345
1340
  (t, e) => {
1346
- const { __scopePopper: n, virtualRef: o, ...r } = t, i = fe(de, n), s = O.useRef(null), c = Kt(e, s), l = O.useRef(null);
1347
- return O.useEffect(() => {
1341
+ const { __scopePopper: n, virtualRef: o, ...i } = t, r = ue(me, n), s = C.useRef(null), c = Gt(e, s), l = C.useRef(null);
1342
+ return C.useEffect(() => {
1348
1343
  const a = l.current;
1349
- l.current = (o == null ? void 0 : o.current) || s.current, a !== l.current && i.onAnchorChange(l.current);
1350
- }), o ? null : /* @__PURE__ */ j(At.div, { ...r, ref: c });
1344
+ l.current = (o == null ? void 0 : o.current) || s.current, a !== l.current && r.onAnchorChange(l.current);
1345
+ }), o ? null : /* @__PURE__ */ j(Rt.div, { ...i, ref: c });
1351
1346
  }
1352
1347
  );
1353
- me.displayName = de;
1354
- var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
1348
+ pe.displayName = me;
1349
+ var Mt = "PopperContent", [qn, Un] = fe(Mt), he = C.forwardRef(
1355
1350
  (t, e) => {
1356
- var Mt, Tt, $t, kt, Ft, Nt;
1351
+ var Tt, $t, kt, Ft, Nt, Wt;
1357
1352
  const {
1358
1353
  __scopePopper: n,
1359
1354
  side: o = "bottom",
1360
- sideOffset: r = 0,
1361
- align: i = "center",
1355
+ sideOffset: i = 0,
1356
+ align: r = "center",
1362
1357
  alignOffset: s = 0,
1363
1358
  arrowPadding: c = 0,
1364
1359
  avoidCollisions: l = !0,
@@ -1369,7 +1364,7 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
1369
1364
  updatePositionStrategy: d = "optimized",
1370
1365
  onPlaced: m,
1371
1366
  ...h
1372
- } = t, w = fe(Dt, n), [g, y] = O.useState(null), v = Kt(e, (nt) => y(nt)), [x, R] = O.useState(null), b = Me(x), C = (b == null ? void 0 : b.width) ?? 0, M = (b == null ? void 0 : b.height) ?? 0, F = o + (i !== "center" ? "-" + i : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, $ = Array.isArray(a) ? a : [a], k = $.length > 0, S = {
1367
+ } = t, w = ue(Mt, n), [g, x] = C.useState(null), b = Gt(e, (nt) => x(nt)), [y, v] = C.useState(null), R = Te(y), O = (R == null ? void 0 : R.width) ?? 0, M = (R == null ? void 0 : R.height) ?? 0, F = o + (r !== "center" ? "-" + r : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, $ = Array.isArray(a) ? a : [a], k = $.length > 0, S = {
1373
1368
  padding: D,
1374
1369
  boundary: $.filter(Kn),
1375
1370
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -1378,14 +1373,14 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
1378
1373
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
1379
1374
  strategy: "fixed",
1380
1375
  placement: F,
1381
- whileElementsMounted: (...nt) => Cn(...nt, {
1376
+ whileElementsMounted: (...nt) => On(...nt, {
1382
1377
  animationFrame: d === "always"
1383
1378
  }),
1384
1379
  elements: {
1385
1380
  reference: w.anchor
1386
1381
  },
1387
1382
  middleware: [
1388
- Wn({ mainAxis: r + M, alignmentAxis: s }),
1383
+ Wn({ mainAxis: i + M, alignmentAxis: s }),
1389
1384
  l && Hn({
1390
1385
  mainAxis: !0,
1391
1386
  crossAxis: !1,
@@ -1395,22 +1390,22 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
1395
1390
  l && Bn({ ...S }),
1396
1391
  Vn({
1397
1392
  ...S,
1398
- apply: ({ elements: nt, rects: Wt, availableWidth: Re, availableHeight: Oe }) => {
1399
- const { width: Ce, height: Pe } = Wt.reference, st = nt.floating.style;
1400
- st.setProperty("--radix-popper-available-width", `${Re}px`), st.setProperty("--radix-popper-available-height", `${Oe}px`), st.setProperty("--radix-popper-anchor-width", `${Ce}px`), st.setProperty("--radix-popper-anchor-height", `${Pe}px`);
1393
+ apply: ({ elements: nt, rects: Ht, availableWidth: Ce, availableHeight: Oe }) => {
1394
+ const { width: Pe, height: Se } = Ht.reference, ct = nt.floating.style;
1395
+ ct.setProperty("--radix-popper-available-width", `${Ce}px`), ct.setProperty("--radix-popper-available-height", `${Oe}px`), ct.setProperty("--radix-popper-anchor-width", `${Pe}px`), ct.setProperty("--radix-popper-anchor-height", `${Se}px`);
1401
1396
  }
1402
1397
  }),
1403
- x && In({ element: x, padding: c }),
1404
- Gn({ arrowWidth: C, arrowHeight: M }),
1398
+ y && In({ element: y, padding: c }),
1399
+ Gn({ arrowWidth: O, arrowHeight: M }),
1405
1400
  p && zn({ strategy: "referenceHidden", ...S })
1406
1401
  ]
1407
- }), [T, V] = we(E), it = De(m);
1408
- Ht(() => {
1409
- L && (it == null || it());
1410
- }, [L, it]);
1411
- const xe = (Mt = A.arrow) == null ? void 0 : Mt.x, ye = (Tt = A.arrow) == null ? void 0 : Tt.y, ve = (($t = A.arrow) == null ? void 0 : $t.centerOffset) !== 0, [be, Ae] = O.useState();
1412
- return Ht(() => {
1413
- g && Ae(window.getComputedStyle(g).zIndex);
1402
+ }), [T, V] = xe(E), st = Me(m);
1403
+ _t(() => {
1404
+ L && (st == null || st());
1405
+ }, [L, st]);
1406
+ const ye = (Tt = A.arrow) == null ? void 0 : Tt.x, ve = ($t = A.arrow) == null ? void 0 : $t.y, be = ((kt = A.arrow) == null ? void 0 : kt.centerOffset) !== 0, [Ae, Re] = C.useState();
1407
+ return _t(() => {
1408
+ g && Re(window.getComputedStyle(g).zIndex);
1414
1409
  }, [g]), /* @__PURE__ */ j(
1415
1410
  "div",
1416
1411
  {
@@ -1421,15 +1416,15 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
1421
1416
  transform: L ? N.transform : "translate(0, -200%)",
1422
1417
  // keep off the page when measuring
1423
1418
  minWidth: "max-content",
1424
- zIndex: be,
1419
+ zIndex: Ae,
1425
1420
  "--radix-popper-transform-origin": [
1426
- (kt = A.transformOrigin) == null ? void 0 : kt.x,
1427
- (Ft = A.transformOrigin) == null ? void 0 : Ft.y
1421
+ (Ft = A.transformOrigin) == null ? void 0 : Ft.x,
1422
+ (Nt = A.transformOrigin) == null ? void 0 : Nt.y
1428
1423
  ].join(" "),
1429
1424
  // hide the content if using the hide middleware and should be hidden
1430
1425
  // set visibility to hidden and disable pointer events so the UI behaves
1431
1426
  // as if the PopperContent isn't there at all
1432
- ...((Nt = A.hide) == null ? void 0 : Nt.referenceHidden) && {
1427
+ ...((Wt = A.hide) == null ? void 0 : Wt.referenceHidden) && {
1433
1428
  visibility: "hidden",
1434
1429
  pointerEvents: "none"
1435
1430
  }
@@ -1440,17 +1435,17 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
1440
1435
  {
1441
1436
  scope: n,
1442
1437
  placedSide: T,
1443
- onArrowChange: R,
1444
- arrowX: xe,
1445
- arrowY: ye,
1446
- shouldHideArrow: ve,
1438
+ onArrowChange: v,
1439
+ arrowX: ye,
1440
+ arrowY: ve,
1441
+ shouldHideArrow: be,
1447
1442
  children: /* @__PURE__ */ j(
1448
- At.div,
1443
+ Rt.div,
1449
1444
  {
1450
1445
  "data-side": T,
1451
1446
  "data-align": V,
1452
1447
  ...h,
1453
- ref: v,
1448
+ ref: b,
1454
1449
  style: {
1455
1450
  ...h.style,
1456
1451
  // if the PopperContent hasn't been placed yet (not all measurements done)
@@ -1465,14 +1460,14 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
1465
1460
  );
1466
1461
  }
1467
1462
  );
1468
- pe.displayName = Dt;
1469
- var he = "PopperArrow", Zn = {
1463
+ he.displayName = Mt;
1464
+ var ge = "PopperArrow", Zn = {
1470
1465
  top: "bottom",
1471
1466
  right: "left",
1472
1467
  bottom: "top",
1473
1468
  left: "right"
1474
- }, ge = O.forwardRef(function(e, n) {
1475
- const { __scopePopper: o, ...r } = e, i = Un(he, o), s = Zn[i.placedSide];
1469
+ }, we = C.forwardRef(function(e, n) {
1470
+ const { __scopePopper: o, ...i } = e, r = Un(ge, o), s = Zn[r.placedSide];
1476
1471
  return (
1477
1472
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
1478
1473
  // doesn't report size as we'd expect on SVG elements.
@@ -1480,33 +1475,33 @@ var he = "PopperArrow", Zn = {
1480
1475
  /* @__PURE__ */ j(
1481
1476
  "span",
1482
1477
  {
1483
- ref: i.onArrowChange,
1478
+ ref: r.onArrowChange,
1484
1479
  style: {
1485
1480
  position: "absolute",
1486
- left: i.arrowX,
1487
- top: i.arrowY,
1481
+ left: r.arrowX,
1482
+ top: r.arrowY,
1488
1483
  [s]: 0,
1489
1484
  transformOrigin: {
1490
1485
  top: "",
1491
1486
  right: "0 0",
1492
1487
  bottom: "center 0",
1493
1488
  left: "100% 0"
1494
- }[i.placedSide],
1489
+ }[r.placedSide],
1495
1490
  transform: {
1496
1491
  top: "translateY(100%)",
1497
1492
  right: "translateY(50%) rotate(90deg) translateX(-50%)",
1498
1493
  bottom: "rotate(180deg)",
1499
1494
  left: "translateY(50%) rotate(-90deg) translateX(50%)"
1500
- }[i.placedSide],
1501
- visibility: i.shouldHideArrow ? "hidden" : void 0
1495
+ }[r.placedSide],
1496
+ visibility: r.shouldHideArrow ? "hidden" : void 0
1502
1497
  },
1503
1498
  children: /* @__PURE__ */ j(
1504
1499
  Yn,
1505
1500
  {
1506
- ...r,
1501
+ ...i,
1507
1502
  ref: n,
1508
1503
  style: {
1509
- ...r.style,
1504
+ ...i.style,
1510
1505
  // ensures the element can be measured correctly (mostly for if SVG)
1511
1506
  display: "block"
1512
1507
  }
@@ -1516,7 +1511,7 @@ var he = "PopperArrow", Zn = {
1516
1511
  )
1517
1512
  );
1518
1513
  });
1519
- ge.displayName = he;
1514
+ we.displayName = ge;
1520
1515
  function Kn(t) {
1521
1516
  return t !== null;
1522
1517
  }
@@ -1524,21 +1519,21 @@ var Gn = (t) => ({
1524
1519
  name: "transformOrigin",
1525
1520
  options: t,
1526
1521
  fn(e) {
1527
- var w, g, y;
1528
- const { placement: n, rects: o, middlewareData: r } = e, s = ((w = r.arrow) == null ? void 0 : w.centerOffset) !== 0, c = s ? 0 : t.arrowWidth, l = s ? 0 : t.arrowHeight, [a, f] = we(n), u = { start: "0%", center: "50%", end: "100%" }[f], p = (((g = r.arrow) == null ? void 0 : g.x) ?? 0) + c / 2, d = (((y = r.arrow) == null ? void 0 : y.y) ?? 0) + l / 2;
1522
+ var w, g, x;
1523
+ const { placement: n, rects: o, middlewareData: i } = e, s = ((w = i.arrow) == null ? void 0 : w.centerOffset) !== 0, c = s ? 0 : t.arrowWidth, l = s ? 0 : t.arrowHeight, [a, f] = xe(n), u = { start: "0%", center: "50%", end: "100%" }[f], p = (((g = i.arrow) == null ? void 0 : g.x) ?? 0) + c / 2, d = (((x = i.arrow) == null ? void 0 : x.y) ?? 0) + l / 2;
1529
1524
  let m = "", h = "";
1530
1525
  return a === "bottom" ? (m = s ? u : `${p}px`, h = `${-l}px`) : a === "top" ? (m = s ? u : `${p}px`, h = `${o.floating.height + l}px`) : a === "right" ? (m = `${-l}px`, h = s ? u : `${d}px`) : a === "left" && (m = `${o.floating.width + l}px`, h = s ? u : `${d}px`), { data: { x: m, y: h } };
1531
1526
  }
1532
1527
  });
1533
- function we(t) {
1528
+ function xe(t) {
1534
1529
  const [e, n = "center"] = t.split("-");
1535
1530
  return [e, n];
1536
1531
  }
1537
- var ro = ue, io = me, so = pe, co = ge;
1532
+ var io = de, ro = pe, so = he, co = we;
1538
1533
  export {
1539
- io as A,
1534
+ ro as A,
1540
1535
  so as C,
1541
- ro as R,
1536
+ io as R,
1542
1537
  co as a,
1543
1538
  oo as c
1544
1539
  };