@txnlab/use-wallet-ui-react 1.1.0 → 1.2.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,12 +1,12 @@
1
- import * as p from "react";
2
- import { useLayoutEffect as cn } from "react";
3
- import { jsxs as ln, jsx as fe, Fragment as Wn } from "react/jsx-runtime";
4
- import * as an from "react-dom";
5
- function Qe() {
1
+ import * as g from "react";
2
+ import { useLayoutEffect as un } from "react";
3
+ import { jsxs as fn, jsx as fe, Fragment as Hn } from "react/jsx-runtime";
4
+ import * as dn from "react-dom";
5
+ function tt() {
6
6
  return typeof window < "u";
7
7
  }
8
8
  function xe(e) {
9
- return Rt(e) ? (e.nodeName || "").toLowerCase() : "#document";
9
+ return St(e) ? (e.nodeName || "").toLowerCase() : "#document";
10
10
  }
11
11
  function J(e) {
12
12
  var t;
@@ -14,72 +14,72 @@ function J(e) {
14
14
  }
15
15
  function ce(e) {
16
16
  var t;
17
- return (t = (Rt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
17
+ return (t = (St(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
18
18
  }
19
- function Rt(e) {
20
- return Qe() ? e instanceof Node || e instanceof J(e).Node : !1;
19
+ function St(e) {
20
+ return tt() ? e instanceof Node || e instanceof J(e).Node : !1;
21
21
  }
22
- function _(e) {
23
- return Qe() ? e instanceof Element || e instanceof J(e).Element : !1;
22
+ function B(e) {
23
+ return tt() ? e instanceof Element || e instanceof J(e).Element : !1;
24
24
  }
25
25
  function q(e) {
26
- return Qe() ? e instanceof HTMLElement || e instanceof J(e).HTMLElement : !1;
26
+ return tt() ? e instanceof HTMLElement || e instanceof J(e).HTMLElement : !1;
27
27
  }
28
- function pt(e) {
29
- return !Qe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof J(e).ShadowRoot;
28
+ function Ue(e) {
29
+ return !tt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof J(e).ShadowRoot;
30
30
  }
31
- const _n = /* @__PURE__ */ new Set(["inline", "contents"]);
32
- function Fe(e) {
31
+ function Le(e) {
33
32
  const {
34
33
  overflow: t,
35
34
  overflowX: n,
36
35
  overflowY: r,
37
36
  display: o
38
37
  } = te(e);
39
- return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !_n.has(o);
38
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && o !== "inline" && o !== "contents";
40
39
  }
41
- const Vn = /* @__PURE__ */ new Set(["table", "td", "th"]);
42
- function Hn(e) {
43
- return Vn.has(xe(e));
40
+ function Kn(e) {
41
+ return /^(table|td|th)$/.test(xe(e));
44
42
  }
45
- const Kn = [":popover-open", ":modal"];
46
- function et(e) {
47
- return Kn.some((t) => {
48
- try {
49
- return e.matches(t);
50
- } catch {
51
- return !1;
52
- }
53
- });
43
+ function nt(e) {
44
+ try {
45
+ if (e.matches(":popover-open"))
46
+ return !0;
47
+ } catch {
48
+ }
49
+ try {
50
+ return e.matches(":modal");
51
+ } catch {
52
+ return !1;
53
+ }
54
54
  }
55
- const qn = ["transform", "translate", "scale", "rotate", "perspective"], jn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Un = ["paint", "layout", "strict", "content"];
56
- function Et(e) {
57
- const t = tt(), n = _(e) ? te(e) : e;
58
- return qn.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || jn.some((r) => (n.willChange || "").includes(r)) || Un.some((r) => (n.contain || "").includes(r));
55
+ const qn = /transform|translate|scale|rotate|perspective|filter/, jn = /paint|layout|strict|content/, Ee = (e) => !!e && e !== "none";
56
+ let at;
57
+ function Tt(e) {
58
+ const t = B(e) ? te(e) : e;
59
+ return Ee(t.transform) || Ee(t.translate) || Ee(t.scale) || Ee(t.rotate) || Ee(t.perspective) || !rt() && (Ee(t.backdropFilter) || Ee(t.filter)) || qn.test(t.willChange || "") || jn.test(t.contain || "");
59
60
  }
60
- function Xn(e) {
61
+ function Un(e) {
61
62
  let t = me(e);
62
63
  for (; q(t) && !de(t); ) {
63
- if (Et(t))
64
+ if (Tt(t))
64
65
  return t;
65
- if (et(t))
66
+ if (nt(t))
66
67
  return null;
67
68
  t = me(t);
68
69
  }
69
70
  return null;
70
71
  }
71
- function tt() {
72
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
72
+ function rt() {
73
+ return at == null && (at = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), at;
73
74
  }
74
- const Yn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
75
75
  function de(e) {
76
- return Yn.has(xe(e));
76
+ return /^(html|body|#document)$/.test(xe(e));
77
77
  }
78
78
  function te(e) {
79
79
  return J(e).getComputedStyle(e);
80
80
  }
81
- function nt(e) {
82
- return _(e) ? {
81
+ function ot(e) {
82
+ return B(e) ? {
83
83
  scrollLeft: e.scrollLeft,
84
84
  scrollTop: e.scrollTop
85
85
  } : {
@@ -94,100 +94,98 @@ function me(e) {
94
94
  // Step into the shadow DOM of the parent of a slotted node.
95
95
  e.assignedSlot || // DOM Element detected.
96
96
  e.parentNode || // ShadowRoot detected.
97
- pt(e) && e.host || // Fallback.
97
+ Ue(e) && e.host || // Fallback.
98
98
  ce(e)
99
99
  );
100
- return pt(t) ? t.host : t;
100
+ return Ue(t) ? t.host : t;
101
101
  }
102
- function un(e) {
102
+ function mn(e) {
103
103
  const t = me(e);
104
- return de(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : q(t) && Fe(t) ? t : un(t);
104
+ return de(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : q(t) && Le(t) ? t : mn(t);
105
105
  }
106
- function we(e, t, n) {
106
+ function ye(e, t, n) {
107
107
  var r;
108
108
  t === void 0 && (t = []), n === void 0 && (n = !0);
109
- const o = un(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = J(o);
109
+ const o = mn(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = J(o);
110
110
  if (i) {
111
- const c = gt(s);
112
- return t.concat(s, s.visualViewport || [], Fe(o) ? o : [], c && n ? we(c) : []);
113
- }
114
- return t.concat(o, we(o, [], n));
111
+ const c = bt(s);
112
+ return t.concat(s, s.visualViewport || [], Le(o) ? o : [], c && n ? ye(c) : []);
113
+ } else
114
+ return t.concat(o, ye(o, [], n));
115
115
  }
116
- function gt(e) {
116
+ function bt(e) {
117
117
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
118
118
  }
119
- const Pe = Math.min, G = Math.max, je = Math.round, _e = Math.floor, se = (e) => ({
119
+ const Pe = Math.min, G = Math.max, Xe = Math.round, Ve = Math.floor, se = (e) => ({
120
120
  x: e,
121
121
  y: e
122
- }), zn = {
122
+ }), Xn = {
123
123
  left: "right",
124
124
  right: "left",
125
125
  bottom: "top",
126
126
  top: "bottom"
127
- }, Gn = {
128
- start: "end",
129
- end: "start"
130
127
  };
131
- function Pt(e, t, n) {
128
+ function Dt(e, t, n) {
132
129
  return G(e, Pe(t, n));
133
130
  }
134
- function Le(e, t) {
131
+ function Ne(e, t) {
135
132
  return typeof e == "function" ? e(t) : e;
136
133
  }
137
- function ye(e) {
134
+ function we(e) {
138
135
  return e.split("-")[0];
139
136
  }
140
- function Ne(e) {
137
+ function $e(e) {
141
138
  return e.split("-")[1];
142
139
  }
143
- function fn(e) {
140
+ function gn(e) {
144
141
  return e === "x" ? "y" : "x";
145
142
  }
146
- function dn(e) {
143
+ function pn(e) {
147
144
  return e === "y" ? "height" : "width";
148
145
  }
149
- const Zn = /* @__PURE__ */ new Set(["top", "bottom"]);
150
146
  function ue(e) {
151
- return Zn.has(ye(e)) ? "y" : "x";
147
+ const t = e[0];
148
+ return t === "t" || t === "b" ? "y" : "x";
152
149
  }
153
- function mn(e) {
154
- return fn(ue(e));
150
+ function hn(e) {
151
+ return gn(ue(e));
155
152
  }
156
- function Jn(e, t, n) {
153
+ function Yn(e, t, n) {
157
154
  n === void 0 && (n = !1);
158
- const r = Ne(e), o = mn(e), i = dn(o);
155
+ const r = $e(e), o = hn(e), i = pn(o);
159
156
  let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
160
- return t.reference[i] > t.floating[i] && (s = Ue(s)), [s, Ue(s)];
157
+ return t.reference[i] > t.floating[i] && (s = Ye(s)), [s, Ye(s)];
161
158
  }
162
- function Qn(e) {
163
- const t = Ue(e);
164
- return [ht(e), t, ht(t)];
159
+ function zn(e) {
160
+ const t = Ye(e);
161
+ return [vt(e), t, vt(t)];
165
162
  }
166
- function ht(e) {
167
- return e.replace(/start|end/g, (t) => Gn[t]);
163
+ function vt(e) {
164
+ return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
168
165
  }
169
- const Mt = ["left", "right"], kt = ["right", "left"], er = ["top", "bottom"], tr = ["bottom", "top"];
170
- function nr(e, t, n) {
166
+ const kt = ["left", "right"], Ft = ["right", "left"], Gn = ["top", "bottom"], Zn = ["bottom", "top"];
167
+ function Jn(e, t, n) {
171
168
  switch (e) {
172
169
  case "top":
173
170
  case "bottom":
174
- return n ? t ? kt : Mt : t ? Mt : kt;
171
+ return n ? t ? Ft : kt : t ? kt : Ft;
175
172
  case "left":
176
173
  case "right":
177
- return t ? er : tr;
174
+ return t ? Gn : Zn;
178
175
  default:
179
176
  return [];
180
177
  }
181
178
  }
182
- function rr(e, t, n, r) {
183
- const o = Ne(e);
184
- let i = nr(ye(e), n === "start", r);
185
- return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(ht)))), i;
179
+ function Qn(e, t, n, r) {
180
+ const o = $e(e);
181
+ let i = Jn(we(e), n === "start", r);
182
+ return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(vt)))), i;
186
183
  }
187
- function Ue(e) {
188
- return e.replace(/left|right|bottom|top/g, (t) => zn[t]);
184
+ function Ye(e) {
185
+ const t = we(e);
186
+ return Xn[t] + e.slice(t.length);
189
187
  }
190
- function or(e) {
188
+ function er(e) {
191
189
  return {
192
190
  top: 0,
193
191
  right: 0,
@@ -196,15 +194,15 @@ function or(e) {
196
194
  ...e
197
195
  };
198
196
  }
199
- function ir(e) {
200
- return typeof e != "number" ? or(e) : {
197
+ function tr(e) {
198
+ return typeof e != "number" ? er(e) : {
201
199
  top: e,
202
200
  right: e,
203
201
  bottom: e,
204
202
  left: e
205
203
  };
206
204
  }
207
- function Xe(e) {
205
+ function ze(e) {
208
206
  const {
209
207
  x: t,
210
208
  y: n,
@@ -226,29 +224,29 @@ function Xe(e) {
226
224
  * tabbable 6.2.0
227
225
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
228
226
  */
229
- var sr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], Ye = /* @__PURE__ */ sr.join(","), pn = typeof Element > "u", Me = pn ? function() {
230
- } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, ze = !pn && Element.prototype.getRootNode ? function(e) {
227
+ var nr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], Ge = /* @__PURE__ */ nr.join(","), bn = typeof Element > "u", De = bn ? function() {
228
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Ze = !bn && Element.prototype.getRootNode ? function(e) {
231
229
  var t;
232
230
  return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
233
231
  } : function(e) {
234
232
  return e == null ? void 0 : e.ownerDocument;
235
- }, Ge = function e(t, n) {
233
+ }, Je = function e(t, n) {
236
234
  var r;
237
235
  n === void 0 && (n = !0);
238
236
  var o = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), i = o === "" || o === "true", s = i || n && t && e(t.parentNode);
239
237
  return s;
240
- }, cr = function(t) {
238
+ }, rr = function(t) {
241
239
  var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable");
242
240
  return r === "" || r === "true";
243
- }, gn = function(t, n, r) {
244
- if (Ge(t))
241
+ }, vn = function(t, n, r) {
242
+ if (Je(t))
245
243
  return [];
246
- var o = Array.prototype.slice.apply(t.querySelectorAll(Ye));
247
- return n && Me.call(t, Ye) && o.unshift(t), o = o.filter(r), o;
248
- }, hn = function e(t, n, r) {
244
+ var o = Array.prototype.slice.apply(t.querySelectorAll(Ge));
245
+ return n && De.call(t, Ge) && o.unshift(t), o = o.filter(r), o;
246
+ }, yn = function e(t, n, r) {
249
247
  for (var o = [], i = Array.from(t); i.length; ) {
250
248
  var s = i.shift();
251
- if (!Ge(s, !1))
249
+ if (!Je(s, !1))
252
250
  if (s.tagName === "SLOT") {
253
251
  var c = s.assignedElements(), l = c.length ? c : s.children, a = e(l, !0, r);
254
252
  r.flatten ? o.push.apply(o, a) : o.push({
@@ -256,11 +254,11 @@ var sr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
256
254
  candidates: a
257
255
  });
258
256
  } else {
259
- var u = Me.call(s, Ye);
257
+ var u = De.call(s, Ge);
260
258
  u && r.filter(s) && (n || !t.includes(s)) && o.push(s);
261
259
  var d = s.shadowRoot || // check for an undisclosed shadow
262
- typeof r.getShadowRoot == "function" && r.getShadowRoot(s), g = !Ge(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
263
- if (d && g) {
260
+ typeof r.getShadowRoot == "function" && r.getShadowRoot(s), p = !Je(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
261
+ if (d && p) {
264
262
  var f = e(d === !0 ? s.children : d.children, !0, r);
265
263
  r.flatten ? o.push.apply(o, f) : o.push({
266
264
  scopeParent: s,
@@ -271,34 +269,34 @@ var sr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
271
269
  }
272
270
  }
273
271
  return o;
274
- }, bn = function(t) {
272
+ }, wn = function(t) {
275
273
  return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
276
- }, vn = function(t) {
274
+ }, xn = function(t) {
277
275
  if (!t)
278
276
  throw new Error("No node provided");
279
- return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || cr(t)) && !bn(t) ? 0 : t.tabIndex;
280
- }, lr = function(t, n) {
281
- var r = vn(t);
282
- return r < 0 && n && !bn(t) ? 0 : r;
283
- }, ar = function(t, n) {
277
+ return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || rr(t)) && !wn(t) ? 0 : t.tabIndex;
278
+ }, or = function(t, n) {
279
+ var r = xn(t);
280
+ return r < 0 && n && !wn(t) ? 0 : r;
281
+ }, ir = function(t, n) {
284
282
  return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex;
285
- }, wn = function(t) {
283
+ }, Rn = function(t) {
286
284
  return t.tagName === "INPUT";
287
- }, ur = function(t) {
288
- return wn(t) && t.type === "hidden";
289
- }, fr = function(t) {
285
+ }, sr = function(t) {
286
+ return Rn(t) && t.type === "hidden";
287
+ }, cr = function(t) {
290
288
  var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
291
289
  return r.tagName === "SUMMARY";
292
290
  });
293
291
  return n;
294
- }, dr = function(t, n) {
292
+ }, lr = function(t, n) {
295
293
  for (var r = 0; r < t.length; r++)
296
294
  if (t[r].checked && t[r].form === n)
297
295
  return t[r];
298
- }, mr = function(t) {
296
+ }, ar = function(t) {
299
297
  if (!t.name)
300
298
  return !0;
301
- var n = t.form || ze(t), r = function(c) {
299
+ var n = t.form || Ze(t), r = function(c) {
302
300
  return n.querySelectorAll('input[type="radio"][name="' + c + '"]');
303
301
  }, o;
304
302
  if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
@@ -309,78 +307,78 @@ var sr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
309
307
  } catch (s) {
310
308
  return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", s.message), !1;
311
309
  }
312
- var i = dr(o, t.form);
310
+ var i = lr(o, t.form);
313
311
  return !i || i === t;
314
- }, pr = function(t) {
315
- return wn(t) && t.type === "radio";
316
- }, gr = function(t) {
317
- return pr(t) && !mr(t);
318
- }, hr = function(t) {
319
- var n, r = t && ze(t), o = (n = r) === null || n === void 0 ? void 0 : n.host, i = !1;
312
+ }, ur = function(t) {
313
+ return Rn(t) && t.type === "radio";
314
+ }, fr = function(t) {
315
+ return ur(t) && !ar(t);
316
+ }, dr = function(t) {
317
+ var n, r = t && Ze(t), o = (n = r) === null || n === void 0 ? void 0 : n.host, i = !1;
320
318
  if (r && r !== t) {
321
319
  var s, c, l;
322
320
  for (i = !!((s = o) !== null && s !== void 0 && (c = s.ownerDocument) !== null && c !== void 0 && c.contains(o) || t != null && (l = t.ownerDocument) !== null && l !== void 0 && l.contains(t)); !i && o; ) {
323
321
  var a, u, d;
324
- r = ze(o), o = (a = r) === null || a === void 0 ? void 0 : a.host, i = !!((u = o) !== null && u !== void 0 && (d = u.ownerDocument) !== null && d !== void 0 && d.contains(o));
322
+ r = Ze(o), o = (a = r) === null || a === void 0 ? void 0 : a.host, i = !!((u = o) !== null && u !== void 0 && (d = u.ownerDocument) !== null && d !== void 0 && d.contains(o));
325
323
  }
326
324
  }
327
325
  return i;
328
- }, Dt = function(t) {
326
+ }, Lt = function(t) {
329
327
  var n = t.getBoundingClientRect(), r = n.width, o = n.height;
330
328
  return r === 0 && o === 0;
331
- }, br = function(t, n) {
329
+ }, mr = function(t, n) {
332
330
  var r = n.displayCheck, o = n.getShadowRoot;
333
331
  if (getComputedStyle(t).visibility === "hidden")
334
332
  return !0;
335
- var i = Me.call(t, "details>summary:first-of-type"), s = i ? t.parentElement : t;
336
- if (Me.call(s, "details:not([open]) *"))
333
+ var i = De.call(t, "details>summary:first-of-type"), s = i ? t.parentElement : t;
334
+ if (De.call(s, "details:not([open]) *"))
337
335
  return !0;
338
336
  if (!r || r === "full" || r === "legacy-full") {
339
337
  if (typeof o == "function") {
340
338
  for (var c = t; t; ) {
341
- var l = t.parentElement, a = ze(t);
339
+ var l = t.parentElement, a = Ze(t);
342
340
  if (l && !l.shadowRoot && o(l) === !0)
343
- return Dt(t);
341
+ return Lt(t);
344
342
  t.assignedSlot ? t = t.assignedSlot : !l && a !== t.ownerDocument ? t = a.host : t = l;
345
343
  }
346
344
  t = c;
347
345
  }
348
- if (hr(t))
346
+ if (dr(t))
349
347
  return !t.getClientRects().length;
350
348
  if (r !== "legacy-full")
351
349
  return !0;
352
350
  } else if (r === "non-zero-area")
353
- return Dt(t);
351
+ return Lt(t);
354
352
  return !1;
355
- }, vr = function(t) {
353
+ }, gr = function(t) {
356
354
  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
357
355
  for (var n = t.parentElement; n; ) {
358
356
  if (n.tagName === "FIELDSET" && n.disabled) {
359
357
  for (var r = 0; r < n.children.length; r++) {
360
358
  var o = n.children.item(r);
361
359
  if (o.tagName === "LEGEND")
362
- return Me.call(n, "fieldset[disabled] *") ? !0 : !o.contains(t);
360
+ return De.call(n, "fieldset[disabled] *") ? !0 : !o.contains(t);
363
361
  }
364
362
  return !0;
365
363
  }
366
364
  n = n.parentElement;
367
365
  }
368
366
  return !1;
369
- }, bt = function(t, n) {
367
+ }, yt = function(t, n) {
370
368
  return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
371
369
  // because we're limited in the type of selectors we can use in JSDom (see related
372
370
  // note related to `candidateSelectors`)
373
- Ge(n) || ur(n) || br(n, t) || // For a details element with a summary, the summary element gets the focus
374
- fr(n) || vr(n));
375
- }, vt = function(t, n) {
376
- return !(gr(n) || vn(n) < 0 || !bt(t, n));
377
- }, wr = function(t) {
371
+ Je(n) || sr(n) || mr(n, t) || // For a details element with a summary, the summary element gets the focus
372
+ cr(n) || gr(n));
373
+ }, wt = function(t, n) {
374
+ return !(fr(n) || xn(n) < 0 || !yt(t, n));
375
+ }, pr = function(t) {
378
376
  var n = parseInt(t.getAttribute("tabindex"), 10);
379
377
  return !!(isNaN(n) || n >= 0);
380
- }, yr = function e(t) {
378
+ }, hr = function e(t) {
381
379
  var n = [], r = [];
382
380
  return t.forEach(function(o, i) {
383
- var s = !!o.scopeParent, c = s ? o.scopeParent : o, l = lr(c, s), a = s ? e(o.candidates) : c;
381
+ var s = !!o.scopeParent, c = s ? o.scopeParent : o, l = or(c, s), a = s ? e(o.candidates) : c;
384
382
  l === 0 ? s ? n.push.apply(n, a) : n.push(c) : r.push({
385
383
  documentOrder: i,
386
384
  tabIndex: l,
@@ -388,36 +386,36 @@ var sr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
388
386
  isScope: s,
389
387
  content: a
390
388
  });
391
- }), r.sort(ar).reduce(function(o, i) {
389
+ }), r.sort(ir).reduce(function(o, i) {
392
390
  return i.isScope ? o.push.apply(o, i.content) : o.push(i.content), o;
393
391
  }, []).concat(n);
394
- }, rt = function(t, n) {
392
+ }, it = function(t, n) {
395
393
  n = n || {};
396
394
  var r;
397
- return n.getShadowRoot ? r = hn([t], n.includeContainer, {
398
- filter: vt.bind(null, n),
395
+ return n.getShadowRoot ? r = yn([t], n.includeContainer, {
396
+ filter: wt.bind(null, n),
399
397
  flatten: !1,
400
398
  getShadowRoot: n.getShadowRoot,
401
- shadowRootFilter: wr
402
- }) : r = gn(t, n.includeContainer, vt.bind(null, n)), yr(r);
403
- }, xr = function(t, n) {
399
+ shadowRootFilter: pr
400
+ }) : r = vn(t, n.includeContainer, wt.bind(null, n)), hr(r);
401
+ }, br = function(t, n) {
404
402
  n = n || {};
405
403
  var r;
406
- return n.getShadowRoot ? r = hn([t], n.includeContainer, {
407
- filter: bt.bind(null, n),
404
+ return n.getShadowRoot ? r = yn([t], n.includeContainer, {
405
+ filter: yt.bind(null, n),
408
406
  flatten: !0,
409
407
  getShadowRoot: n.getShadowRoot
410
- }) : r = gn(t, n.includeContainer, bt.bind(null, n)), r;
411
- }, yn = function(t, n) {
408
+ }) : r = vn(t, n.includeContainer, yt.bind(null, n)), r;
409
+ }, En = function(t, n) {
412
410
  if (n = n || {}, !t)
413
411
  throw new Error("No node provided");
414
- return Me.call(t, Ye) === !1 ? !1 : vt(n, t);
412
+ return De.call(t, Ge) === !1 ? !1 : wt(n, t);
415
413
  };
416
- function xn() {
414
+ function Sn() {
417
415
  const e = navigator.userAgentData;
418
416
  return e != null && e.platform ? e.platform : navigator.platform;
419
417
  }
420
- function Rn() {
418
+ function Tn() {
421
419
  const e = navigator.userAgentData;
422
420
  return e && Array.isArray(e.brands) ? e.brands.map((t) => {
423
421
  let {
@@ -427,18 +425,18 @@ function Rn() {
427
425
  return n + "/" + r;
428
426
  }).join(" ") : navigator.userAgent;
429
427
  }
430
- function Rr() {
428
+ function vr() {
431
429
  return /apple/i.test(navigator.vendor);
432
430
  }
433
- function wt() {
431
+ function xt() {
434
432
  const e = /android/i;
435
- return e.test(xn()) || e.test(Rn());
433
+ return e.test(Sn()) || e.test(Tn());
436
434
  }
437
- function Er() {
438
- return Rn().includes("jsdom/");
435
+ function yr() {
436
+ return Tn().includes("jsdom/");
439
437
  }
440
- const Ft = "data-floating-ui-focusable", Sr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
441
- function Ce(e) {
438
+ const Nt = "data-floating-ui-focusable", wr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
439
+ function Ae(e) {
442
440
  let t = e.activeElement;
443
441
  for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
444
442
  var n;
@@ -452,7 +450,7 @@ function z(e, t) {
452
450
  const n = t.getRootNode == null ? void 0 : t.getRootNode();
453
451
  if (e.contains(t))
454
452
  return !0;
455
- if (n && pt(n)) {
453
+ if (n && Ue(n)) {
456
454
  let r = t;
457
455
  for (; r; ) {
458
456
  if (e === r)
@@ -465,7 +463,7 @@ function z(e, t) {
465
463
  function be(e) {
466
464
  return "composedPath" in e ? e.composedPath()[0] : e.target;
467
465
  }
468
- function ct(e, t) {
466
+ function ut(e, t) {
469
467
  if (t == null)
470
468
  return !1;
471
469
  if ("composedPath" in e)
@@ -473,28 +471,28 @@ function ct(e, t) {
473
471
  const n = e;
474
472
  return n.target != null && t.contains(n.target);
475
473
  }
476
- function Tr(e) {
474
+ function xr(e) {
477
475
  return e.matches("html,body");
478
476
  }
479
477
  function re(e) {
480
478
  return (e == null ? void 0 : e.ownerDocument) || document;
481
479
  }
482
- function En(e) {
483
- return q(e) && e.matches(Sr);
480
+ function Cn(e) {
481
+ return q(e) && e.matches(wr);
484
482
  }
485
- function Lt(e) {
486
- return e ? e.getAttribute("role") === "combobox" && En(e) : !1;
483
+ function $t(e) {
484
+ return e ? e.getAttribute("role") === "combobox" && Cn(e) : !1;
487
485
  }
488
- function yt(e) {
489
- return e ? e.hasAttribute(Ft) ? e : e.querySelector("[" + Ft + "]") || e : null;
486
+ function Rt(e) {
487
+ return e ? e.hasAttribute(Nt) ? e : e.querySelector("[" + Nt + "]") || e : null;
490
488
  }
491
- function Ae(e, t, n) {
489
+ function Oe(e, t, n) {
492
490
  return n === void 0 && (n = !0), e.filter((o) => {
493
491
  var i;
494
492
  return o.parentId === t && (!n || ((i = o.context) == null ? void 0 : i.open));
495
- }).flatMap((o) => [o, ...Ae(e, o.id, n)]);
493
+ }).flatMap((o) => [o, ...Oe(e, o.id, n)]);
496
494
  }
497
- function Nt(e, t) {
495
+ function _t(e, t) {
498
496
  var n;
499
497
  let r = [], o = (n = e.find((i) => i.id === t)) == null ? void 0 : n.parentId;
500
498
  for (; o; ) {
@@ -503,48 +501,48 @@ function Nt(e, t) {
503
501
  }
504
502
  return r;
505
503
  }
506
- function lt(e) {
504
+ function ft(e) {
507
505
  e.preventDefault(), e.stopPropagation();
508
506
  }
509
- function Cr(e) {
507
+ function Rr(e) {
510
508
  return "nativeEvent" in e;
511
509
  }
512
- function Ar(e) {
513
- return e.mozInputSource === 0 && e.isTrusted ? !0 : wt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
510
+ function Er(e) {
511
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : xt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
514
512
  }
515
- function Or(e) {
516
- return Er() ? !1 : !wt() && e.width === 0 && e.height === 0 || wt() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
513
+ function Sr(e) {
514
+ return yr() ? !1 : !xt() && e.width === 0 && e.height === 0 || xt() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
517
515
  e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
518
516
  }
519
- function $t(e, t) {
517
+ function Wt(e, t) {
520
518
  return ["mouse", "pen"].includes(e);
521
519
  }
522
- var Ir = typeof document < "u", Pr = function() {
523
- }, Z = Ir ? cn : Pr;
524
- const Mr = {
525
- ...p
520
+ var Tr = typeof document < "u", Cr = function() {
521
+ }, Z = Tr ? un : Cr;
522
+ const Ar = {
523
+ ...g
526
524
  };
527
- function at(e) {
528
- const t = p.useRef(e);
525
+ function dt(e) {
526
+ const t = g.useRef(e);
529
527
  return Z(() => {
530
528
  t.current = e;
531
529
  }), t;
532
530
  }
533
- const kr = Mr.useInsertionEffect, Dr = kr || ((e) => e());
531
+ const Or = Ar.useInsertionEffect, Ir = Or || ((e) => e());
534
532
  function ie(e) {
535
- const t = p.useRef(() => {
533
+ const t = g.useRef(() => {
536
534
  if (process.env.NODE_ENV !== "production")
537
535
  throw new Error("Cannot call an event handler while rendering.");
538
536
  });
539
- return Dr(() => {
537
+ return Ir(() => {
540
538
  t.current = e;
541
- }), p.useCallback(function() {
539
+ }), g.useCallback(function() {
542
540
  for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
543
541
  r[o] = arguments[o];
544
542
  return t.current == null ? void 0 : t.current(...r);
545
543
  }, []);
546
544
  }
547
- const $e = () => ({
545
+ const _e = () => ({
548
546
  getShadowRoot: !0,
549
547
  displayCheck: (
550
548
  // JSDOM does not support the `tabbable` library. To solve this we can
@@ -553,24 +551,24 @@ const $e = () => ({
553
551
  typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
554
552
  )
555
553
  });
556
- function Sn(e, t) {
557
- const n = rt(e, $e()), r = n.length;
554
+ function An(e, t) {
555
+ const n = it(e, _e()), r = n.length;
558
556
  if (r === 0) return;
559
- const o = Ce(re(e)), i = n.indexOf(o), s = i === -1 ? t === 1 ? 0 : r - 1 : i + t;
557
+ const o = Ae(re(e)), i = n.indexOf(o), s = i === -1 ? t === 1 ? 0 : r - 1 : i + t;
560
558
  return n[s];
561
559
  }
562
- function Tn(e) {
563
- return Sn(re(e).body, 1) || e;
560
+ function On(e) {
561
+ return An(re(e).body, 1) || e;
564
562
  }
565
- function Cn(e) {
566
- return Sn(re(e).body, -1) || e;
563
+ function In(e) {
564
+ return An(re(e).body, -1) || e;
567
565
  }
568
566
  function ke(e, t) {
569
567
  const n = t || e.currentTarget, r = e.relatedTarget;
570
568
  return !r || !z(n, r);
571
569
  }
572
- function Fr(e) {
573
- rt(e, $e()).forEach((n) => {
570
+ function Mr(e) {
571
+ it(e, _e()).forEach((n) => {
574
572
  n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
575
573
  });
576
574
  }
@@ -580,12 +578,12 @@ function Bt(e) {
580
578
  delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
581
579
  });
582
580
  }
583
- function Wt(e, t, n) {
581
+ function Vt(e, t, n) {
584
582
  let {
585
583
  reference: r,
586
584
  floating: o
587
585
  } = e;
588
- const i = ue(t), s = mn(t), c = dn(s), l = ye(t), a = i === "y", u = r.x + r.width / 2 - o.width / 2, d = r.y + r.height / 2 - o.height / 2, g = r[c] / 2 - o[c] / 2;
586
+ const i = ue(t), s = hn(t), c = pn(s), l = we(t), a = i === "y", u = r.x + r.width / 2 - o.width / 2, d = r.y + r.height / 2 - o.height / 2, p = r[c] / 2 - o[c] / 2;
589
587
  let f;
590
588
  switch (l) {
591
589
  case "top":
@@ -618,17 +616,17 @@ function Wt(e, t, n) {
618
616
  y: r.y
619
617
  };
620
618
  }
621
- switch (Ne(t)) {
619
+ switch ($e(t)) {
622
620
  case "start":
623
- f[s] -= g * (n && a ? -1 : 1);
621
+ f[s] -= p * (n && a ? -1 : 1);
624
622
  break;
625
623
  case "end":
626
- f[s] += g * (n && a ? -1 : 1);
624
+ f[s] += p * (n && a ? -1 : 1);
627
625
  break;
628
626
  }
629
627
  return f;
630
628
  }
631
- async function An(e, t) {
629
+ async function Mn(e, t) {
632
630
  var n;
633
631
  t === void 0 && (t = {});
634
632
  const {
@@ -642,9 +640,9 @@ async function An(e, t) {
642
640
  boundary: a = "clippingAncestors",
643
641
  rootBoundary: u = "viewport",
644
642
  elementContext: d = "floating",
645
- altBoundary: g = !1,
643
+ altBoundary: p = !1,
646
644
  padding: f = 0
647
- } = Le(t, e), h = ir(f), x = c[g ? d === "floating" ? "reference" : "floating" : d], w = Xe(await i.getClippingRect({
645
+ } = Ne(t, e), h = tr(f), x = c[p ? d === "floating" ? "reference" : "floating" : d], y = ze(await i.getClippingRect({
648
646
  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)),
649
647
  boundary: a,
650
648
  rootBoundary: u,
@@ -660,26 +658,29 @@ async function An(e, t) {
660
658
  } : {
661
659
  x: 1,
662
660
  y: 1
663
- }, A = Xe(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
661
+ }, A = ze(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
664
662
  elements: c,
665
663
  rect: b,
666
664
  offsetParent: v,
667
665
  strategy: l
668
666
  }) : b);
669
667
  return {
670
- top: (w.top - A.top + h.top) / S.y,
671
- bottom: (A.bottom - w.bottom + h.bottom) / S.y,
672
- left: (w.left - A.left + h.left) / S.x,
673
- right: (A.right - w.right + h.right) / S.x
668
+ top: (y.top - A.top + h.top) / S.y,
669
+ bottom: (A.bottom - y.bottom + h.bottom) / S.y,
670
+ left: (y.left - A.left + h.left) / S.x,
671
+ right: (A.right - y.right + h.right) / S.x
674
672
  };
675
673
  }
676
- const Lr = async (e, t, n) => {
674
+ const Pr = 50, Dr = async (e, t, n) => {
677
675
  const {
678
676
  placement: r = "bottom",
679
677
  strategy: o = "absolute",
680
678
  middleware: i = [],
681
679
  platform: s
682
- } = n, c = i.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(t));
680
+ } = n, c = s.detectOverflow ? s : {
681
+ ...s,
682
+ detectOverflow: Mn
683
+ }, l = await (s.isRTL == null ? void 0 : s.isRTL(t));
683
684
  let a = await s.getElementRects({
684
685
  reference: e,
685
686
  floating: t,
@@ -687,13 +688,16 @@ const Lr = async (e, t, n) => {
687
688
  }), {
688
689
  x: u,
689
690
  y: d
690
- } = Wt(a, r, l), g = r, f = {}, h = 0;
691
- for (let x = 0; x < c.length; x++) {
692
- var m;
691
+ } = Vt(a, r, l), p = r, f = 0;
692
+ const h = {};
693
+ for (let m = 0; m < i.length; m++) {
694
+ const x = i[m];
695
+ if (!x)
696
+ continue;
693
697
  const {
694
- name: w,
698
+ name: y,
695
699
  fn: b
696
- } = c[x], {
700
+ } = x, {
697
701
  x: v,
698
702
  y: S,
699
703
  data: A,
@@ -702,42 +706,36 @@ const Lr = async (e, t, n) => {
702
706
  x: u,
703
707
  y: d,
704
708
  initialPlacement: r,
705
- placement: g,
709
+ placement: p,
706
710
  strategy: o,
707
- middlewareData: f,
711
+ middlewareData: h,
708
712
  rects: a,
709
- platform: {
710
- ...s,
711
- detectOverflow: (m = s.detectOverflow) != null ? m : An
712
- },
713
+ platform: c,
713
714
  elements: {
714
715
  reference: e,
715
716
  floating: t
716
717
  }
717
718
  });
718
- u = v ?? u, d = S ?? d, f = {
719
- ...f,
720
- [w]: {
721
- ...f[w],
722
- ...A
723
- }
724
- }, O && h <= 50 && (h++, typeof O == "object" && (O.placement && (g = O.placement), O.rects && (a = O.rects === !0 ? await s.getElementRects({
719
+ u = v ?? u, d = S ?? d, h[y] = {
720
+ ...h[y],
721
+ ...A
722
+ }, O && f < Pr && (f++, typeof O == "object" && (O.placement && (p = O.placement), O.rects && (a = O.rects === !0 ? await s.getElementRects({
725
723
  reference: e,
726
724
  floating: t,
727
725
  strategy: o
728
726
  }) : O.rects), {
729
727
  x: u,
730
728
  y: d
731
- } = Wt(a, g, l)), x = -1);
729
+ } = Vt(a, p, l)), m = -1);
732
730
  }
733
731
  return {
734
732
  x: u,
735
733
  y: d,
736
- placement: g,
734
+ placement: p,
737
735
  strategy: o,
738
- middlewareData: f
736
+ middlewareData: h
739
737
  };
740
- }, Nr = function(e) {
738
+ }, kr = function(e) {
741
739
  return e === void 0 && (e = {}), {
742
740
  name: "flip",
743
741
  options: e,
@@ -753,31 +751,31 @@ const Lr = async (e, t, n) => {
753
751
  } = t, {
754
752
  mainAxis: u = !0,
755
753
  crossAxis: d = !0,
756
- fallbackPlacements: g,
754
+ fallbackPlacements: p,
757
755
  fallbackStrategy: f = "bestFit",
758
756
  fallbackAxisSideDirection: h = "none",
759
757
  flipAlignment: m = !0,
760
758
  ...x
761
- } = Le(e, t);
759
+ } = Ne(e, t);
762
760
  if ((n = i.arrow) != null && n.alignmentOffset)
763
761
  return {};
764
- const w = ye(o), b = ue(c), v = ye(c) === c, S = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), A = g || (v || !m ? [Ue(c)] : Qn(c)), O = h !== "none";
765
- !g && O && A.push(...rr(c, m, h, S));
766
- const P = [c, ...A], $ = await l.detectOverflow(t, x), j = [];
762
+ const y = we(o), b = ue(c), v = we(c) === c, S = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), A = p || (v || !m ? [Ye(c)] : zn(c)), O = h !== "none";
763
+ !p && O && A.push(...Qn(c, m, h, S));
764
+ const M = [c, ...A], $ = await l.detectOverflow(t, x), j = [];
767
765
  let W = ((r = i.flip) == null ? void 0 : r.overflows) || [];
768
- if (u && j.push($[w]), d) {
769
- const R = Jn(o, s, S);
766
+ if (u && j.push($[y]), d) {
767
+ const R = Yn(o, s, S);
770
768
  j.push($[R[0]], $[R[1]]);
771
769
  }
772
770
  if (W = [...W, {
773
771
  placement: o,
774
772
  overflows: j
775
773
  }], !j.every((R) => R <= 0)) {
776
- var B, X;
777
- const R = (((B = i.flip) == null ? void 0 : B.index) || 0) + 1, E = P[R];
774
+ var _, X;
775
+ const R = (((_ = i.flip) == null ? void 0 : _.index) || 0) + 1, E = M[R];
778
776
  if (E && (!(d === "alignment" ? b !== ue(E) : !1) || // We leave the current main axis only if every placement on that axis
779
777
  // overflows the main axis.
780
- W.every((y) => ue(y.placement) === b ? y.overflows[0] > 0 : !0)))
778
+ W.every((w) => ue(w.placement) === b ? w.overflows[0] > 0 : !0)))
781
779
  return {
782
780
  data: {
783
781
  index: R,
@@ -787,46 +785,46 @@ const Lr = async (e, t, n) => {
787
785
  placement: E
788
786
  }
789
787
  };
790
- let D = (X = W.filter((L) => L.overflows[0] <= 0).sort((L, y) => L.overflows[1] - y.overflows[1])[0]) == null ? void 0 : X.placement;
791
- if (!D)
788
+ let k = (X = W.filter((L) => L.overflows[0] <= 0).sort((L, w) => L.overflows[1] - w.overflows[1])[0]) == null ? void 0 : X.placement;
789
+ if (!k)
792
790
  switch (f) {
793
791
  case "bestFit": {
794
792
  var H;
795
- const L = (H = W.filter((y) => {
793
+ const L = (H = W.filter((w) => {
796
794
  if (O) {
797
- const I = ue(y.placement);
795
+ const I = ue(w.placement);
798
796
  return I === b || // Create a bias to the `y` side axis due to horizontal
799
797
  // reading directions favoring greater width.
800
798
  I === "y";
801
799
  }
802
800
  return !0;
803
- }).map((y) => [y.placement, y.overflows.filter((I) => I > 0).reduce((I, N) => I + N, 0)]).sort((y, I) => y[1] - I[1])[0]) == null ? void 0 : H[0];
804
- L && (D = L);
801
+ }).map((w) => [w.placement, w.overflows.filter((I) => I > 0).reduce((I, N) => I + N, 0)]).sort((w, I) => w[1] - I[1])[0]) == null ? void 0 : H[0];
802
+ L && (k = L);
805
803
  break;
806
804
  }
807
805
  case "initialPlacement":
808
- D = c;
806
+ k = c;
809
807
  break;
810
808
  }
811
- if (o !== D)
809
+ if (o !== k)
812
810
  return {
813
811
  reset: {
814
- placement: D
812
+ placement: k
815
813
  }
816
814
  };
817
815
  }
818
816
  return {};
819
817
  }
820
818
  };
821
- }, $r = /* @__PURE__ */ new Set(["left", "top"]);
822
- async function Br(e, t) {
819
+ }, Fr = /* @__PURE__ */ new Set(["left", "top"]);
820
+ async function Lr(e, t) {
823
821
  const {
824
822
  placement: n,
825
823
  platform: r,
826
824
  elements: o
827
- } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = ye(n), c = Ne(n), l = ue(n) === "y", a = $r.has(s) ? -1 : 1, u = i && l ? -1 : 1, d = Le(t, e);
825
+ } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = we(n), c = $e(n), l = ue(n) === "y", a = Fr.has(s) ? -1 : 1, u = i && l ? -1 : 1, d = Ne(t, e);
828
826
  let {
829
- mainAxis: g,
827
+ mainAxis: p,
830
828
  crossAxis: f,
831
829
  alignmentAxis: h
832
830
  } = typeof d == "number" ? {
@@ -840,13 +838,13 @@ async function Br(e, t) {
840
838
  };
841
839
  return c && typeof h == "number" && (f = c === "end" ? h * -1 : h), l ? {
842
840
  x: f * u,
843
- y: g * a
841
+ y: p * a
844
842
  } : {
845
- x: g * a,
843
+ x: p * a,
846
844
  y: f * u
847
845
  };
848
846
  }
849
- const Wr = function(e) {
847
+ const Nr = function(e) {
850
848
  return e === void 0 && (e = 0), {
851
849
  name: "offset",
852
850
  options: e,
@@ -857,7 +855,7 @@ const Wr = function(e) {
857
855
  y: i,
858
856
  placement: s,
859
857
  middlewareData: c
860
- } = t, l = await Br(t, e);
858
+ } = t, l = await Lr(t, e);
861
859
  return s === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
862
860
  x: o + l.x,
863
861
  y: i + l.y,
@@ -868,7 +866,7 @@ const Wr = function(e) {
868
866
  };
869
867
  }
870
868
  };
871
- }, _r = function(e) {
869
+ }, $r = function(e) {
872
870
  return e === void 0 && (e = {}), {
873
871
  name: "shift",
874
872
  options: e,
@@ -882,11 +880,11 @@ const Wr = function(e) {
882
880
  mainAxis: s = !0,
883
881
  crossAxis: c = !1,
884
882
  limiter: l = {
885
- fn: (w) => {
883
+ fn: (y) => {
886
884
  let {
887
885
  x: b,
888
886
  y: v
889
- } = w;
887
+ } = y;
890
888
  return {
891
889
  x: b,
892
890
  y: v
@@ -894,23 +892,23 @@ const Wr = function(e) {
894
892
  }
895
893
  },
896
894
  ...a
897
- } = Le(e, t), u = {
895
+ } = Ne(e, t), u = {
898
896
  x: n,
899
897
  y: r
900
- }, d = await i.detectOverflow(t, a), g = ue(ye(o)), f = fn(g);
901
- let h = u[f], m = u[g];
898
+ }, d = await i.detectOverflow(t, a), p = ue(we(o)), f = gn(p);
899
+ let h = u[f], m = u[p];
902
900
  if (s) {
903
- const w = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", v = h + d[w], S = h - d[b];
904
- h = Pt(v, h, S);
901
+ const y = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", v = h + d[y], S = h - d[b];
902
+ h = Dt(v, h, S);
905
903
  }
906
904
  if (c) {
907
- const w = g === "y" ? "top" : "left", b = g === "y" ? "bottom" : "right", v = m + d[w], S = m - d[b];
908
- m = Pt(v, m, S);
905
+ const y = p === "y" ? "top" : "left", b = p === "y" ? "bottom" : "right", v = m + d[y], S = m - d[b];
906
+ m = Dt(v, m, S);
909
907
  }
910
908
  const x = l.fn({
911
909
  ...t,
912
910
  [f]: h,
913
- [g]: m
911
+ [p]: m
914
912
  });
915
913
  return {
916
914
  ...x,
@@ -919,13 +917,13 @@ const Wr = function(e) {
919
917
  y: x.y - r,
920
918
  enabled: {
921
919
  [f]: s,
922
- [g]: c
920
+ [p]: c
923
921
  }
924
922
  }
925
923
  };
926
924
  }
927
925
  };
928
- }, Vr = function(e) {
926
+ }, _r = function(e) {
929
927
  return e === void 0 && (e = {}), {
930
928
  name: "size",
931
929
  options: e,
@@ -940,22 +938,22 @@ const Wr = function(e) {
940
938
  apply: l = () => {
941
939
  },
942
940
  ...a
943
- } = Le(e, t), u = await s.detectOverflow(t, a), d = ye(o), g = Ne(o), f = ue(o) === "y", {
941
+ } = Ne(e, t), u = await s.detectOverflow(t, a), d = we(o), p = $e(o), f = ue(o) === "y", {
944
942
  width: h,
945
943
  height: m
946
944
  } = i.floating;
947
- let x, w;
948
- d === "top" || d === "bottom" ? (x = d, w = g === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (w = d, x = g === "end" ? "top" : "bottom");
949
- const b = m - u.top - u.bottom, v = h - u.left - u.right, S = Pe(m - u[x], b), A = Pe(h - u[w], v), O = !t.middlewareData.shift;
950
- let P = S, $ = A;
951
- if ((n = t.middlewareData.shift) != null && n.enabled.x && ($ = v), (r = t.middlewareData.shift) != null && r.enabled.y && (P = b), O && !g) {
952
- const W = G(u.left, 0), B = G(u.right, 0), X = G(u.top, 0), H = G(u.bottom, 0);
953
- f ? $ = h - 2 * (W !== 0 || B !== 0 ? W + B : G(u.left, u.right)) : P = m - 2 * (X !== 0 || H !== 0 ? X + H : G(u.top, u.bottom));
945
+ let x, y;
946
+ d === "top" || d === "bottom" ? (x = d, y = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (y = d, x = p === "end" ? "top" : "bottom");
947
+ const b = m - u.top - u.bottom, v = h - u.left - u.right, S = Pe(m - u[x], b), A = Pe(h - u[y], v), O = !t.middlewareData.shift;
948
+ let M = S, $ = A;
949
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && ($ = v), (r = t.middlewareData.shift) != null && r.enabled.y && (M = b), O && !p) {
950
+ const W = G(u.left, 0), _ = G(u.right, 0), X = G(u.top, 0), H = G(u.bottom, 0);
951
+ f ? $ = h - 2 * (W !== 0 || _ !== 0 ? W + _ : G(u.left, u.right)) : M = m - 2 * (X !== 0 || H !== 0 ? X + H : G(u.top, u.bottom));
954
952
  }
955
953
  await l({
956
954
  ...t,
957
955
  availableWidth: $,
958
- availableHeight: P
956
+ availableHeight: M
959
957
  });
960
958
  const j = await s.getDimensions(c.floating);
961
959
  return h !== j.width || m !== j.height ? {
@@ -966,86 +964,86 @@ const Wr = function(e) {
966
964
  }
967
965
  };
968
966
  };
969
- function On(e) {
967
+ function Pn(e) {
970
968
  const t = te(e);
971
969
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
972
- const o = q(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = je(n) !== i || je(r) !== s;
970
+ const o = q(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = Xe(n) !== i || Xe(r) !== s;
973
971
  return c && (n = i, r = s), {
974
972
  width: n,
975
973
  height: r,
976
974
  $: c
977
975
  };
978
976
  }
979
- function St(e) {
980
- return _(e) ? e : e.contextElement;
977
+ function Ct(e) {
978
+ return B(e) ? e : e.contextElement;
981
979
  }
982
- function Oe(e) {
983
- const t = St(e);
980
+ function Ie(e) {
981
+ const t = Ct(e);
984
982
  if (!q(t))
985
983
  return se(1);
986
984
  const n = t.getBoundingClientRect(), {
987
985
  width: r,
988
986
  height: o,
989
987
  $: i
990
- } = On(t);
991
- let s = (i ? je(n.width) : n.width) / r, c = (i ? je(n.height) : n.height) / o;
988
+ } = Pn(t);
989
+ let s = (i ? Xe(n.width) : n.width) / r, c = (i ? Xe(n.height) : n.height) / o;
992
990
  return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
993
991
  x: s,
994
992
  y: c
995
993
  };
996
994
  }
997
- const Hr = /* @__PURE__ */ se(0);
998
- function In(e) {
995
+ const Wr = /* @__PURE__ */ se(0);
996
+ function Dn(e) {
999
997
  const t = J(e);
1000
- return !tt() || !t.visualViewport ? Hr : {
998
+ return !rt() || !t.visualViewport ? Wr : {
1001
999
  x: t.visualViewport.offsetLeft,
1002
1000
  y: t.visualViewport.offsetTop
1003
1001
  };
1004
1002
  }
1005
- function Kr(e, t, n) {
1003
+ function Br(e, t, n) {
1006
1004
  return t === void 0 && (t = !1), !n || t && n !== J(e) ? !1 : t;
1007
1005
  }
1008
- function Ee(e, t, n, r) {
1006
+ function Se(e, t, n, r) {
1009
1007
  t === void 0 && (t = !1), n === void 0 && (n = !1);
1010
- const o = e.getBoundingClientRect(), i = St(e);
1008
+ const o = e.getBoundingClientRect(), i = Ct(e);
1011
1009
  let s = se(1);
1012
- t && (r ? _(r) && (s = Oe(r)) : s = Oe(e));
1013
- const c = Kr(i, n, r) ? In(i) : se(0);
1010
+ t && (r ? B(r) && (s = Ie(r)) : s = Ie(e));
1011
+ const c = Br(i, n, r) ? Dn(i) : se(0);
1014
1012
  let l = (o.left + c.x) / s.x, a = (o.top + c.y) / s.y, u = o.width / s.x, d = o.height / s.y;
1015
1013
  if (i) {
1016
- const g = J(i), f = r && _(r) ? J(r) : r;
1017
- let h = g, m = gt(h);
1014
+ const p = J(i), f = r && B(r) ? J(r) : r;
1015
+ let h = p, m = bt(h);
1018
1016
  for (; m && r && f !== h; ) {
1019
- const x = Oe(m), w = m.getBoundingClientRect(), b = te(m), v = w.left + (m.clientLeft + parseFloat(b.paddingLeft)) * x.x, S = w.top + (m.clientTop + parseFloat(b.paddingTop)) * x.y;
1020
- l *= x.x, a *= x.y, u *= x.x, d *= x.y, l += v, a += S, h = J(m), m = gt(h);
1017
+ const x = Ie(m), y = m.getBoundingClientRect(), b = te(m), v = y.left + (m.clientLeft + parseFloat(b.paddingLeft)) * x.x, S = y.top + (m.clientTop + parseFloat(b.paddingTop)) * x.y;
1018
+ l *= x.x, a *= x.y, u *= x.x, d *= x.y, l += v, a += S, h = J(m), m = bt(h);
1021
1019
  }
1022
1020
  }
1023
- return Xe({
1021
+ return ze({
1024
1022
  width: u,
1025
1023
  height: d,
1026
1024
  x: l,
1027
1025
  y: a
1028
1026
  });
1029
1027
  }
1030
- function ot(e, t) {
1031
- const n = nt(e).scrollLeft;
1032
- return t ? t.left + n : Ee(ce(e)).left + n;
1028
+ function st(e, t) {
1029
+ const n = ot(e).scrollLeft;
1030
+ return t ? t.left + n : Se(ce(e)).left + n;
1033
1031
  }
1034
- function Pn(e, t) {
1035
- const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - ot(e, n), o = n.top + t.scrollTop;
1032
+ function kn(e, t) {
1033
+ const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - st(e, n), o = n.top + t.scrollTop;
1036
1034
  return {
1037
1035
  x: r,
1038
1036
  y: o
1039
1037
  };
1040
1038
  }
1041
- function qr(e) {
1039
+ function Vr(e) {
1042
1040
  let {
1043
1041
  elements: t,
1044
1042
  rect: n,
1045
1043
  offsetParent: r,
1046
1044
  strategy: o
1047
1045
  } = e;
1048
- const i = o === "fixed", s = ce(r), c = t ? et(t.floating) : !1;
1046
+ const i = o === "fixed", s = ce(r), c = t ? nt(t.floating) : !1;
1049
1047
  if (r === s || c && i)
1050
1048
  return n;
1051
1049
  let l = {
@@ -1053,24 +1051,24 @@ function qr(e) {
1053
1051
  scrollTop: 0
1054
1052
  }, a = se(1);
1055
1053
  const u = se(0), d = q(r);
1056
- if ((d || !d && !i) && ((xe(r) !== "body" || Fe(s)) && (l = nt(r)), q(r))) {
1057
- const f = Ee(r);
1058
- a = Oe(r), u.x = f.x + r.clientLeft, u.y = f.y + r.clientTop;
1054
+ if ((d || !d && !i) && ((xe(r) !== "body" || Le(s)) && (l = ot(r)), d)) {
1055
+ const f = Se(r);
1056
+ a = Ie(r), u.x = f.x + r.clientLeft, u.y = f.y + r.clientTop;
1059
1057
  }
1060
- const g = s && !d && !i ? Pn(s, l) : se(0);
1058
+ const p = s && !d && !i ? kn(s, l) : se(0);
1061
1059
  return {
1062
1060
  width: n.width * a.x,
1063
1061
  height: n.height * a.y,
1064
- x: n.x * a.x - l.scrollLeft * a.x + u.x + g.x,
1065
- y: n.y * a.y - l.scrollTop * a.y + u.y + g.y
1062
+ x: n.x * a.x - l.scrollLeft * a.x + u.x + p.x,
1063
+ y: n.y * a.y - l.scrollTop * a.y + u.y + p.y
1066
1064
  };
1067
1065
  }
1068
- function jr(e) {
1066
+ function Hr(e) {
1069
1067
  return Array.from(e.getClientRects());
1070
1068
  }
1071
- function Ur(e) {
1072
- const t = ce(e), n = nt(e), r = e.ownerDocument.body, o = G(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = G(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1073
- let s = -n.scrollLeft + ot(e);
1069
+ function Kr(e) {
1070
+ const t = ce(e), n = ot(e), r = e.ownerDocument.body, o = G(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = G(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1071
+ let s = -n.scrollLeft + st(e);
1074
1072
  const c = -n.scrollTop;
1075
1073
  return te(r).direction === "rtl" && (s += G(t.clientWidth, r.clientWidth) - o), {
1076
1074
  width: o,
@@ -1079,20 +1077,20 @@ function Ur(e) {
1079
1077
  y: c
1080
1078
  };
1081
1079
  }
1082
- const _t = 25;
1083
- function Xr(e, t) {
1080
+ const Ht = 25;
1081
+ function qr(e, t) {
1084
1082
  const n = J(e), r = ce(e), o = n.visualViewport;
1085
1083
  let i = r.clientWidth, s = r.clientHeight, c = 0, l = 0;
1086
1084
  if (o) {
1087
1085
  i = o.width, s = o.height;
1088
- const u = tt();
1086
+ const u = rt();
1089
1087
  (!u || u && t === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
1090
1088
  }
1091
- const a = ot(r);
1089
+ const a = st(r);
1092
1090
  if (a <= 0) {
1093
- const u = r.ownerDocument, d = u.body, g = getComputedStyle(d), f = u.compatMode === "CSS1Compat" && parseFloat(g.marginLeft) + parseFloat(g.marginRight) || 0, h = Math.abs(r.clientWidth - d.clientWidth - f);
1094
- h <= _t && (i -= h);
1095
- } else a <= _t && (i += a);
1091
+ const u = r.ownerDocument, d = u.body, p = getComputedStyle(d), f = u.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, h = Math.abs(r.clientWidth - d.clientWidth - f);
1092
+ h <= Ht && (i -= h);
1093
+ } else a <= Ht && (i += a);
1096
1094
  return {
1097
1095
  width: i,
1098
1096
  height: s,
@@ -1100,9 +1098,8 @@ function Xr(e, t) {
1100
1098
  y: l
1101
1099
  };
1102
1100
  }
1103
- const Yr = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1104
- function zr(e, t) {
1105
- const n = Ee(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = q(e) ? Oe(e) : se(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, l = o * i.x, a = r * i.y;
1101
+ function jr(e, t) {
1102
+ const n = Se(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = q(e) ? Ie(e) : se(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, l = o * i.x, a = r * i.y;
1106
1103
  return {
1107
1104
  width: s,
1108
1105
  height: c,
@@ -1110,16 +1107,16 @@ function zr(e, t) {
1110
1107
  y: a
1111
1108
  };
1112
1109
  }
1113
- function Vt(e, t, n) {
1110
+ function Kt(e, t, n) {
1114
1111
  let r;
1115
1112
  if (t === "viewport")
1116
- r = Xr(e, n);
1113
+ r = qr(e, n);
1117
1114
  else if (t === "document")
1118
- r = Ur(ce(e));
1119
- else if (_(t))
1120
- r = zr(t, n);
1115
+ r = Kr(ce(e));
1116
+ else if (B(t))
1117
+ r = jr(t, n);
1121
1118
  else {
1122
- const o = In(e);
1119
+ const o = Dn(e);
1123
1120
  r = {
1124
1121
  x: t.x - o.x,
1125
1122
  y: t.y - o.y,
@@ -1127,81 +1124,83 @@ function Vt(e, t, n) {
1127
1124
  height: t.height
1128
1125
  };
1129
1126
  }
1130
- return Xe(r);
1127
+ return ze(r);
1131
1128
  }
1132
- function Mn(e, t) {
1129
+ function Fn(e, t) {
1133
1130
  const n = me(e);
1134
- return n === t || !_(n) || de(n) ? !1 : te(n).position === "fixed" || Mn(n, t);
1131
+ return n === t || !B(n) || de(n) ? !1 : te(n).position === "fixed" || Fn(n, t);
1135
1132
  }
1136
- function Gr(e, t) {
1133
+ function Ur(e, t) {
1137
1134
  const n = t.get(e);
1138
1135
  if (n)
1139
1136
  return n;
1140
- let r = we(e, [], !1).filter((c) => _(c) && xe(c) !== "body"), o = null;
1137
+ let r = ye(e, [], !1).filter((c) => B(c) && xe(c) !== "body"), o = null;
1141
1138
  const i = te(e).position === "fixed";
1142
1139
  let s = i ? me(e) : e;
1143
- for (; _(s) && !de(s); ) {
1144
- const c = te(s), l = Et(s);
1145
- !l && c.position === "fixed" && (o = null), (i ? !l && !o : !l && c.position === "static" && !!o && Yr.has(o.position) || Fe(s) && !l && Mn(e, s)) ? r = r.filter((u) => u !== s) : o = c, s = me(s);
1140
+ for (; B(s) && !de(s); ) {
1141
+ const c = te(s), l = Tt(s);
1142
+ !l && c.position === "fixed" && (o = null), (i ? !l && !o : !l && c.position === "static" && !!o && (o.position === "absolute" || o.position === "fixed") || Le(s) && !l && Fn(e, s)) ? r = r.filter((u) => u !== s) : o = c, s = me(s);
1146
1143
  }
1147
1144
  return t.set(e, r), r;
1148
1145
  }
1149
- function Zr(e) {
1146
+ function Xr(e) {
1150
1147
  let {
1151
1148
  element: t,
1152
1149
  boundary: n,
1153
1150
  rootBoundary: r,
1154
1151
  strategy: o
1155
1152
  } = e;
1156
- const s = [...n === "clippingAncestors" ? et(t) ? [] : Gr(t, this._c) : [].concat(n), r], c = s[0], l = s.reduce((a, u) => {
1157
- const d = Vt(t, u, o);
1158
- return a.top = G(d.top, a.top), a.right = Pe(d.right, a.right), a.bottom = Pe(d.bottom, a.bottom), a.left = G(d.left, a.left), a;
1159
- }, Vt(t, c, o));
1153
+ const s = [...n === "clippingAncestors" ? nt(t) ? [] : Ur(t, this._c) : [].concat(n), r], c = Kt(t, s[0], o);
1154
+ let l = c.top, a = c.right, u = c.bottom, d = c.left;
1155
+ for (let p = 1; p < s.length; p++) {
1156
+ const f = Kt(t, s[p], o);
1157
+ l = G(f.top, l), a = Pe(f.right, a), u = Pe(f.bottom, u), d = G(f.left, d);
1158
+ }
1160
1159
  return {
1161
- width: l.right - l.left,
1162
- height: l.bottom - l.top,
1163
- x: l.left,
1164
- y: l.top
1160
+ width: a - d,
1161
+ height: u - l,
1162
+ x: d,
1163
+ y: l
1165
1164
  };
1166
1165
  }
1167
- function Jr(e) {
1166
+ function Yr(e) {
1168
1167
  const {
1169
1168
  width: t,
1170
1169
  height: n
1171
- } = On(e);
1170
+ } = Pn(e);
1172
1171
  return {
1173
1172
  width: t,
1174
1173
  height: n
1175
1174
  };
1176
1175
  }
1177
- function Qr(e, t, n) {
1178
- const r = q(t), o = ce(t), i = n === "fixed", s = Ee(e, !0, i, t);
1176
+ function zr(e, t, n) {
1177
+ const r = q(t), o = ce(t), i = n === "fixed", s = Se(e, !0, i, t);
1179
1178
  let c = {
1180
1179
  scrollLeft: 0,
1181
1180
  scrollTop: 0
1182
1181
  };
1183
1182
  const l = se(0);
1184
1183
  function a() {
1185
- l.x = ot(o);
1184
+ l.x = st(o);
1186
1185
  }
1187
1186
  if (r || !r && !i)
1188
- if ((xe(t) !== "body" || Fe(o)) && (c = nt(t)), r) {
1189
- const f = Ee(t, !0, i, t);
1187
+ if ((xe(t) !== "body" || Le(o)) && (c = ot(t)), r) {
1188
+ const f = Se(t, !0, i, t);
1190
1189
  l.x = f.x + t.clientLeft, l.y = f.y + t.clientTop;
1191
1190
  } else o && a();
1192
1191
  i && !r && o && a();
1193
- const u = o && !r && !i ? Pn(o, c) : se(0), d = s.left + c.scrollLeft - l.x - u.x, g = s.top + c.scrollTop - l.y - u.y;
1192
+ const u = o && !r && !i ? kn(o, c) : se(0), d = s.left + c.scrollLeft - l.x - u.x, p = s.top + c.scrollTop - l.y - u.y;
1194
1193
  return {
1195
1194
  x: d,
1196
- y: g,
1195
+ y: p,
1197
1196
  width: s.width,
1198
1197
  height: s.height
1199
1198
  };
1200
1199
  }
1201
- function ut(e) {
1200
+ function mt(e) {
1202
1201
  return te(e).position === "static";
1203
1202
  }
1204
- function Ht(e, t) {
1203
+ function qt(e, t) {
1205
1204
  if (!q(e) || te(e).position === "fixed")
1206
1205
  return null;
1207
1206
  if (t)
@@ -1209,28 +1208,28 @@ function Ht(e, t) {
1209
1208
  let n = e.offsetParent;
1210
1209
  return ce(e) === n && (n = n.ownerDocument.body), n;
1211
1210
  }
1212
- function kn(e, t) {
1211
+ function Ln(e, t) {
1213
1212
  const n = J(e);
1214
- if (et(e))
1213
+ if (nt(e))
1215
1214
  return n;
1216
1215
  if (!q(e)) {
1217
1216
  let o = me(e);
1218
1217
  for (; o && !de(o); ) {
1219
- if (_(o) && !ut(o))
1218
+ if (B(o) && !mt(o))
1220
1219
  return o;
1221
1220
  o = me(o);
1222
1221
  }
1223
1222
  return n;
1224
1223
  }
1225
- let r = Ht(e, t);
1226
- for (; r && Hn(r) && ut(r); )
1227
- r = Ht(r, t);
1228
- return r && de(r) && ut(r) && !Et(r) ? n : r || Xn(e) || n;
1224
+ let r = qt(e, t);
1225
+ for (; r && Kn(r) && mt(r); )
1226
+ r = qt(r, t);
1227
+ return r && de(r) && mt(r) && !Tt(r) ? n : r || Un(e) || n;
1229
1228
  }
1230
- const eo = async function(e) {
1231
- const t = this.getOffsetParent || kn, n = this.getDimensions, r = await n(e.floating);
1229
+ const Gr = async function(e) {
1230
+ const t = this.getOffsetParent || Ln, n = this.getDimensions, r = await n(e.floating);
1232
1231
  return {
1233
- reference: Qr(e.reference, await t(e.floating), e.strategy),
1232
+ reference: zr(e.reference, await t(e.floating), e.strategy),
1234
1233
  floating: {
1235
1234
  x: 0,
1236
1235
  y: 0,
@@ -1239,25 +1238,25 @@ const eo = async function(e) {
1239
1238
  }
1240
1239
  };
1241
1240
  };
1242
- function to(e) {
1241
+ function Zr(e) {
1243
1242
  return te(e).direction === "rtl";
1244
1243
  }
1245
- const no = {
1246
- convertOffsetParentRelativeRectToViewportRelativeRect: qr,
1244
+ const Jr = {
1245
+ convertOffsetParentRelativeRectToViewportRelativeRect: Vr,
1247
1246
  getDocumentElement: ce,
1248
- getClippingRect: Zr,
1249
- getOffsetParent: kn,
1250
- getElementRects: eo,
1251
- getClientRects: jr,
1252
- getDimensions: Jr,
1253
- getScale: Oe,
1254
- isElement: _,
1255
- isRTL: to
1247
+ getClippingRect: Xr,
1248
+ getOffsetParent: Ln,
1249
+ getElementRects: Gr,
1250
+ getClientRects: Hr,
1251
+ getDimensions: Yr,
1252
+ getScale: Ie,
1253
+ isElement: B,
1254
+ isRTL: Zr
1256
1255
  };
1257
- function Dn(e, t) {
1256
+ function Nn(e, t) {
1258
1257
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1259
1258
  }
1260
- function ro(e, t) {
1259
+ function Qr(e, t) {
1261
1260
  let n = null, r;
1262
1261
  const o = ce(e);
1263
1262
  function i() {
@@ -1269,26 +1268,26 @@ function ro(e, t) {
1269
1268
  const a = e.getBoundingClientRect(), {
1270
1269
  left: u,
1271
1270
  top: d,
1272
- width: g,
1271
+ width: p,
1273
1272
  height: f
1274
1273
  } = a;
1275
- if (c || t(), !g || !f)
1274
+ if (c || t(), !p || !f)
1276
1275
  return;
1277
- const h = _e(d), m = _e(o.clientWidth - (u + g)), x = _e(o.clientHeight - (d + f)), w = _e(u), v = {
1278
- rootMargin: -h + "px " + -m + "px " + -x + "px " + -w + "px",
1276
+ const h = Ve(d), m = Ve(o.clientWidth - (u + p)), x = Ve(o.clientHeight - (d + f)), y = Ve(u), v = {
1277
+ rootMargin: -h + "px " + -m + "px " + -x + "px " + -y + "px",
1279
1278
  threshold: G(0, Pe(1, l)) || 1
1280
1279
  };
1281
1280
  let S = !0;
1282
1281
  function A(O) {
1283
- const P = O[0].intersectionRatio;
1284
- if (P !== l) {
1282
+ const M = O[0].intersectionRatio;
1283
+ if (M !== l) {
1285
1284
  if (!S)
1286
1285
  return s();
1287
- P ? s(!1, P) : r = setTimeout(() => {
1286
+ M ? s(!1, M) : r = setTimeout(() => {
1288
1287
  s(!1, 1e-7);
1289
1288
  }, 1e3);
1290
1289
  }
1291
- P === 1 && !Dn(a, e.getBoundingClientRect()) && s(), S = !1;
1290
+ M === 1 && !Nn(a, e.getBoundingClientRect()) && s(), S = !1;
1292
1291
  }
1293
1292
  try {
1294
1293
  n = new IntersectionObserver(A, {
@@ -1303,7 +1302,7 @@ function ro(e, t) {
1303
1302
  }
1304
1303
  return s(!0), i;
1305
1304
  }
1306
- function Vo(e, t, n, r) {
1305
+ function No(e, t, n, r) {
1307
1306
  r === void 0 && (r = {});
1308
1307
  const {
1309
1308
  ancestorScroll: o = !0,
@@ -1311,50 +1310,50 @@ function Vo(e, t, n, r) {
1311
1310
  elementResize: s = typeof ResizeObserver == "function",
1312
1311
  layoutShift: c = typeof IntersectionObserver == "function",
1313
1312
  animationFrame: l = !1
1314
- } = r, a = St(e), u = o || i ? [...a ? we(a) : [], ...we(t)] : [];
1315
- u.forEach((w) => {
1316
- o && w.addEventListener("scroll", n, {
1313
+ } = r, a = Ct(e), u = o || i ? [...a ? ye(a) : [], ...t ? ye(t) : []] : [];
1314
+ u.forEach((y) => {
1315
+ o && y.addEventListener("scroll", n, {
1317
1316
  passive: !0
1318
- }), i && w.addEventListener("resize", n);
1317
+ }), i && y.addEventListener("resize", n);
1319
1318
  });
1320
- const d = a && c ? ro(a, n) : null;
1321
- let g = -1, f = null;
1322
- s && (f = new ResizeObserver((w) => {
1323
- let [b] = w;
1324
- b && b.target === a && f && (f.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
1319
+ const d = a && c ? Qr(a, n) : null;
1320
+ let p = -1, f = null;
1321
+ s && (f = new ResizeObserver((y) => {
1322
+ let [b] = y;
1323
+ b && b.target === a && f && t && (f.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1325
1324
  var v;
1326
1325
  (v = f) == null || v.observe(t);
1327
1326
  })), n();
1328
- }), a && !l && f.observe(a), f.observe(t));
1329
- let h, m = l ? Ee(e) : null;
1327
+ }), a && !l && f.observe(a), t && f.observe(t));
1328
+ let h, m = l ? Se(e) : null;
1330
1329
  l && x();
1331
1330
  function x() {
1332
- const w = Ee(e);
1333
- m && !Dn(m, w) && n(), m = w, h = requestAnimationFrame(x);
1331
+ const y = Se(e);
1332
+ m && !Nn(m, y) && n(), m = y, h = requestAnimationFrame(x);
1334
1333
  }
1335
1334
  return n(), () => {
1336
- var w;
1335
+ var y;
1337
1336
  u.forEach((b) => {
1338
1337
  o && b.removeEventListener("scroll", n), i && b.removeEventListener("resize", n);
1339
- }), d == null || d(), (w = f) == null || w.disconnect(), f = null, l && cancelAnimationFrame(h);
1338
+ }), d == null || d(), (y = f) == null || y.disconnect(), f = null, l && cancelAnimationFrame(h);
1340
1339
  };
1341
1340
  }
1342
- const Ho = An, oo = Wr, io = _r, so = Nr, co = Vr, lo = (e, t, n) => {
1341
+ const $o = Mn, eo = Nr, to = $r, no = kr, ro = _r, oo = (e, t, n) => {
1343
1342
  const r = /* @__PURE__ */ new Map(), o = {
1344
- platform: no,
1343
+ platform: Jr,
1345
1344
  ...n
1346
1345
  }, i = {
1347
1346
  ...o.platform,
1348
1347
  _c: r
1349
1348
  };
1350
- return Lr(e, t, {
1349
+ return Dr(e, t, {
1351
1350
  ...o,
1352
1351
  platform: i
1353
1352
  });
1354
1353
  };
1355
- var ao = typeof document < "u", uo = function() {
1356
- }, qe = ao ? cn : uo;
1357
- function Ze(e, t) {
1354
+ var io = typeof document < "u", so = function() {
1355
+ }, je = io ? un : so;
1356
+ function Qe(e, t) {
1358
1357
  if (e === t)
1359
1358
  return !0;
1360
1359
  if (typeof e != typeof t)
@@ -1366,7 +1365,7 @@ function Ze(e, t) {
1366
1365
  if (Array.isArray(e)) {
1367
1366
  if (n = e.length, n !== t.length) return !1;
1368
1367
  for (r = n; r-- !== 0; )
1369
- if (!Ze(e[r], t[r]))
1368
+ if (!Qe(e[r], t[r]))
1370
1369
  return !1;
1371
1370
  return !0;
1372
1371
  }
@@ -1377,27 +1376,27 @@ function Ze(e, t) {
1377
1376
  return !1;
1378
1377
  for (r = n; r-- !== 0; ) {
1379
1378
  const i = o[r];
1380
- if (!(i === "_owner" && e.$$typeof) && !Ze(e[i], t[i]))
1379
+ if (!(i === "_owner" && e.$$typeof) && !Qe(e[i], t[i]))
1381
1380
  return !1;
1382
1381
  }
1383
1382
  return !0;
1384
1383
  }
1385
1384
  return e !== e && t !== t;
1386
1385
  }
1387
- function Fn(e) {
1386
+ function $n(e) {
1388
1387
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1389
1388
  }
1390
- function Kt(e, t) {
1391
- const n = Fn(e);
1389
+ function jt(e, t) {
1390
+ const n = $n(e);
1392
1391
  return Math.round(t * n) / n;
1393
1392
  }
1394
- function ft(e) {
1395
- const t = p.useRef(e);
1396
- return qe(() => {
1393
+ function gt(e) {
1394
+ const t = g.useRef(e);
1395
+ return je(() => {
1397
1396
  t.current = e;
1398
1397
  }), t;
1399
1398
  }
1400
- function fo(e) {
1399
+ function co(e) {
1401
1400
  e === void 0 && (e = {});
1402
1401
  const {
1403
1402
  placement: t = "bottom",
@@ -1411,28 +1410,28 @@ function fo(e) {
1411
1410
  transform: c = !0,
1412
1411
  whileElementsMounted: l,
1413
1412
  open: a
1414
- } = e, [u, d] = p.useState({
1413
+ } = e, [u, d] = g.useState({
1415
1414
  x: 0,
1416
1415
  y: 0,
1417
1416
  strategy: n,
1418
1417
  placement: t,
1419
1418
  middlewareData: {},
1420
1419
  isPositioned: !1
1421
- }), [g, f] = p.useState(r);
1422
- Ze(g, r) || f(r);
1423
- const [h, m] = p.useState(null), [x, w] = p.useState(null), b = p.useCallback((y) => {
1424
- y !== O.current && (O.current = y, m(y));
1425
- }, []), v = p.useCallback((y) => {
1426
- y !== P.current && (P.current = y, w(y));
1427
- }, []), S = i || h, A = s || x, O = p.useRef(null), P = p.useRef(null), $ = p.useRef(u), j = l != null, W = ft(l), B = ft(o), X = ft(a), H = p.useCallback(() => {
1428
- if (!O.current || !P.current)
1420
+ }), [p, f] = g.useState(r);
1421
+ Qe(p, r) || f(r);
1422
+ const [h, m] = g.useState(null), [x, y] = g.useState(null), b = g.useCallback((w) => {
1423
+ w !== O.current && (O.current = w, m(w));
1424
+ }, []), v = g.useCallback((w) => {
1425
+ w !== M.current && (M.current = w, y(w));
1426
+ }, []), S = i || h, A = s || x, O = g.useRef(null), M = g.useRef(null), $ = g.useRef(u), j = l != null, W = gt(l), _ = gt(o), X = gt(a), H = g.useCallback(() => {
1427
+ if (!O.current || !M.current)
1429
1428
  return;
1430
- const y = {
1429
+ const w = {
1431
1430
  placement: t,
1432
1431
  strategy: n,
1433
- middleware: g
1432
+ middleware: p
1434
1433
  };
1435
- B.current && (y.platform = B.current), lo(O.current, P.current, y).then((I) => {
1434
+ _.current && (w.platform = _.current), oo(O.current, M.current, w).then((I) => {
1436
1435
  const N = {
1437
1436
  ...I,
1438
1437
  // The floating element's position may be recomputed while it's closed
@@ -1441,48 +1440,48 @@ function fo(e) {
1441
1440
  // setting it to `true` when `open === false` (must be specified).
1442
1441
  isPositioned: X.current !== !1
1443
1442
  };
1444
- R.current && !Ze($.current, N) && ($.current = N, an.flushSync(() => {
1443
+ R.current && !Qe($.current, N) && ($.current = N, dn.flushSync(() => {
1445
1444
  d(N);
1446
1445
  }));
1447
1446
  });
1448
- }, [g, t, n, B, X]);
1449
- qe(() => {
1450
- a === !1 && $.current.isPositioned && ($.current.isPositioned = !1, d((y) => ({
1451
- ...y,
1447
+ }, [p, t, n, _, X]);
1448
+ je(() => {
1449
+ a === !1 && $.current.isPositioned && ($.current.isPositioned = !1, d((w) => ({
1450
+ ...w,
1452
1451
  isPositioned: !1
1453
1452
  })));
1454
1453
  }, [a]);
1455
- const R = p.useRef(!1);
1456
- qe(() => (R.current = !0, () => {
1454
+ const R = g.useRef(!1);
1455
+ je(() => (R.current = !0, () => {
1457
1456
  R.current = !1;
1458
- }), []), qe(() => {
1459
- if (S && (O.current = S), A && (P.current = A), S && A) {
1457
+ }), []), je(() => {
1458
+ if (S && (O.current = S), A && (M.current = A), S && A) {
1460
1459
  if (W.current)
1461
1460
  return W.current(S, A, H);
1462
1461
  H();
1463
1462
  }
1464
1463
  }, [S, A, H, W, j]);
1465
- const E = p.useMemo(() => ({
1464
+ const E = g.useMemo(() => ({
1466
1465
  reference: O,
1467
- floating: P,
1466
+ floating: M,
1468
1467
  setReference: b,
1469
1468
  setFloating: v
1470
- }), [b, v]), D = p.useMemo(() => ({
1469
+ }), [b, v]), k = g.useMemo(() => ({
1471
1470
  reference: S,
1472
1471
  floating: A
1473
- }), [S, A]), L = p.useMemo(() => {
1474
- const y = {
1472
+ }), [S, A]), L = g.useMemo(() => {
1473
+ const w = {
1475
1474
  position: n,
1476
1475
  left: 0,
1477
1476
  top: 0
1478
1477
  };
1479
- if (!D.floating)
1480
- return y;
1481
- const I = Kt(D.floating, u.x), N = Kt(D.floating, u.y);
1478
+ if (!k.floating)
1479
+ return w;
1480
+ const I = jt(k.floating, u.x), N = jt(k.floating, u.y);
1482
1481
  return c ? {
1483
- ...y,
1482
+ ...w,
1484
1483
  transform: "translate(" + I + "px, " + N + "px)",
1485
- ...Fn(D.floating) >= 1.5 && {
1484
+ ...$n(k.floating) >= 1.5 && {
1486
1485
  willChange: "transform"
1487
1486
  }
1488
1487
  } : {
@@ -1490,30 +1489,46 @@ function fo(e) {
1490
1489
  left: I,
1491
1490
  top: N
1492
1491
  };
1493
- }, [n, c, D.floating, u.x, u.y]);
1494
- return p.useMemo(() => ({
1492
+ }, [n, c, k.floating, u.x, u.y]);
1493
+ return g.useMemo(() => ({
1495
1494
  ...u,
1496
1495
  update: H,
1497
1496
  refs: E,
1498
- elements: D,
1497
+ elements: k,
1499
1498
  floatingStyles: L
1500
- }), [u, H, E, D, L]);
1501
- }
1502
- const Ko = (e, t) => ({
1503
- ...oo(e),
1504
- options: [e, t]
1505
- }), qo = (e, t) => ({
1506
- ...io(e),
1507
- options: [e, t]
1508
- }), jo = (e, t) => ({
1509
- ...so(e),
1510
- options: [e, t]
1511
- }), Uo = (e, t) => ({
1512
- ...co(e),
1513
- options: [e, t]
1514
- });
1515
- function Xo(e) {
1516
- const t = p.useRef(void 0), n = p.useCallback((r) => {
1499
+ }), [u, H, E, k, L]);
1500
+ }
1501
+ const _o = (e, t) => {
1502
+ const n = eo(e);
1503
+ return {
1504
+ name: n.name,
1505
+ fn: n.fn,
1506
+ options: [e, t]
1507
+ };
1508
+ }, Wo = (e, t) => {
1509
+ const n = to(e);
1510
+ return {
1511
+ name: n.name,
1512
+ fn: n.fn,
1513
+ options: [e, t]
1514
+ };
1515
+ }, Bo = (e, t) => {
1516
+ const n = no(e);
1517
+ return {
1518
+ name: n.name,
1519
+ fn: n.fn,
1520
+ options: [e, t]
1521
+ };
1522
+ }, Vo = (e, t) => {
1523
+ const n = ro(e);
1524
+ return {
1525
+ name: n.name,
1526
+ fn: n.fn,
1527
+ options: [e, t]
1528
+ };
1529
+ };
1530
+ function Ho(e) {
1531
+ const t = g.useRef(void 0), n = g.useCallback((r) => {
1517
1532
  const o = e.map((i) => {
1518
1533
  if (i != null) {
1519
1534
  if (typeof i == "function") {
@@ -1531,40 +1546,40 @@ function Xo(e) {
1531
1546
  o.forEach((i) => i == null ? void 0 : i());
1532
1547
  };
1533
1548
  }, e);
1534
- return p.useMemo(() => e.every((r) => r == null) ? null : (r) => {
1549
+ return g.useMemo(() => e.every((r) => r == null) ? null : (r) => {
1535
1550
  t.current && (t.current(), t.current = void 0), r != null && (t.current = n(r));
1536
1551
  }, e);
1537
1552
  }
1538
- const mo = "data-floating-ui-focusable", qt = "active", jt = "selected", po = {
1539
- ...p
1553
+ const lo = "data-floating-ui-focusable", Ut = "active", Xt = "selected", ao = {
1554
+ ...g
1540
1555
  };
1541
- let Ut = !1, go = 0;
1542
- const Xt = () => (
1556
+ let Yt = !1, uo = 0;
1557
+ const zt = () => (
1543
1558
  // Ensure the id is unique with multiple independent versions of Floating UI
1544
1559
  // on <React 18
1545
- "floating-ui-" + Math.random().toString(36).slice(2, 6) + go++
1560
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + uo++
1546
1561
  );
1547
- function ho() {
1548
- const [e, t] = p.useState(() => Ut ? Xt() : void 0);
1562
+ function fo() {
1563
+ const [e, t] = g.useState(() => Yt ? zt() : void 0);
1549
1564
  return Z(() => {
1550
- e == null && t(Xt());
1551
- }, []), p.useEffect(() => {
1552
- Ut = !0;
1565
+ e == null && t(zt());
1566
+ }, []), g.useEffect(() => {
1567
+ Yt = !0;
1553
1568
  }, []), e;
1554
1569
  }
1555
- const bo = po.useId, Tt = bo || ho;
1556
- let xt;
1557
- process.env.NODE_ENV !== "production" && (xt = /* @__PURE__ */ new Set());
1558
- function vo() {
1570
+ const mo = ao.useId, At = mo || fo;
1571
+ let Et;
1572
+ process.env.NODE_ENV !== "production" && (Et = /* @__PURE__ */ new Set());
1573
+ function go() {
1559
1574
  for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1560
1575
  n[r] = arguments[r];
1561
1576
  const o = "Floating UI: " + n.join(" ");
1562
- if (!((e = xt) != null && e.has(o))) {
1577
+ if (!((e = Et) != null && e.has(o))) {
1563
1578
  var i;
1564
- (i = xt) == null || i.add(o), console.error(o);
1579
+ (i = Et) == null || i.add(o), console.error(o);
1565
1580
  }
1566
1581
  }
1567
- function wo() {
1582
+ function po() {
1568
1583
  const e = /* @__PURE__ */ new Map();
1569
1584
  return {
1570
1585
  emit(t, n) {
@@ -1580,80 +1595,84 @@ function wo() {
1580
1595
  }
1581
1596
  };
1582
1597
  }
1583
- const yo = /* @__PURE__ */ p.createContext(null), xo = /* @__PURE__ */ p.createContext(null), Ln = () => {
1598
+ const ho = /* @__PURE__ */ g.createContext(null), bo = /* @__PURE__ */ g.createContext(null), _n = () => {
1584
1599
  var e;
1585
- return ((e = p.useContext(yo)) == null ? void 0 : e.id) || null;
1586
- }, Ct = () => p.useContext(xo);
1587
- function De(e) {
1600
+ return ((e = g.useContext(ho)) == null ? void 0 : e.id) || null;
1601
+ }, Ot = () => g.useContext(bo);
1602
+ function Fe(e) {
1588
1603
  return "data-floating-ui-" + e;
1589
1604
  }
1590
- function Ro(e) {
1605
+ function vo(e) {
1591
1606
  e.current !== -1 && (clearTimeout(e.current), e.current = -1);
1592
1607
  }
1593
- let Yt = 0;
1594
- function Te(e, t) {
1608
+ let Gt = 0;
1609
+ function Ce(e, t) {
1595
1610
  t === void 0 && (t = {});
1596
1611
  const {
1597
1612
  preventScroll: n = !1,
1598
1613
  cancelPrevious: r = !0,
1599
1614
  sync: o = !1
1600
1615
  } = t;
1601
- r && cancelAnimationFrame(Yt);
1616
+ r && cancelAnimationFrame(Gt);
1602
1617
  const i = () => e == null ? void 0 : e.focus({
1603
1618
  preventScroll: n
1604
1619
  });
1605
- o ? i() : Yt = requestAnimationFrame(i);
1620
+ o ? i() : Gt = requestAnimationFrame(i);
1606
1621
  }
1607
- function Eo(e) {
1622
+ function yo(e) {
1608
1623
  return (e == null ? void 0 : e.ownerDocument) || document;
1609
1624
  }
1610
- const Ie = {
1625
+ const Me = {
1611
1626
  inert: /* @__PURE__ */ new WeakMap(),
1612
1627
  "aria-hidden": /* @__PURE__ */ new WeakMap(),
1613
1628
  none: /* @__PURE__ */ new WeakMap()
1614
1629
  };
1615
- function zt(e) {
1616
- return e === "inert" ? Ie.inert : e === "aria-hidden" ? Ie["aria-hidden"] : Ie.none;
1630
+ function Zt(e) {
1631
+ return e === "inert" ? Me.inert : e === "aria-hidden" ? Me["aria-hidden"] : Me.none;
1617
1632
  }
1618
- let Ve = /* @__PURE__ */ new WeakSet(), He = {}, dt = 0;
1619
- const So = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, Nn = (e) => e && (e.host || Nn(e.parentNode)), To = (e, t) => t.map((n) => {
1633
+ let He = /* @__PURE__ */ new WeakSet(), Ke = {}, pt = 0;
1634
+ const wo = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype;
1635
+ function Wn(e) {
1636
+ return e ? Ue(e) ? e.host : Wn(e.parentNode) : null;
1637
+ }
1638
+ const xo = (e, t) => t.map((n) => {
1620
1639
  if (e.contains(n))
1621
1640
  return n;
1622
- const r = Nn(n);
1641
+ const r = Wn(n);
1623
1642
  return e.contains(r) ? r : null;
1624
1643
  }).filter((n) => n != null);
1625
- function Co(e, t, n, r) {
1626
- const o = "data-floating-ui-inert", i = r ? "inert" : n ? "aria-hidden" : null, s = To(t, e), c = /* @__PURE__ */ new Set(), l = new Set(s), a = [];
1627
- He[o] || (He[o] = /* @__PURE__ */ new WeakMap());
1628
- const u = He[o];
1629
- s.forEach(d), g(t), c.clear();
1644
+ function Ro(e, t, n, r) {
1645
+ const o = "data-floating-ui-inert", i = r ? "inert" : n ? "aria-hidden" : null, s = xo(t, e), c = /* @__PURE__ */ new Set(), l = new Set(s), a = [];
1646
+ Ke[o] || (Ke[o] = /* @__PURE__ */ new WeakMap());
1647
+ const u = Ke[o];
1648
+ s.forEach(d), p(t), c.clear();
1630
1649
  function d(f) {
1631
1650
  !f || c.has(f) || (c.add(f), f.parentNode && d(f.parentNode));
1632
1651
  }
1633
- function g(f) {
1652
+ function p(f) {
1634
1653
  !f || l.has(f) || [].forEach.call(f.children, (h) => {
1635
1654
  if (xe(h) !== "script")
1636
1655
  if (c.has(h))
1637
- g(h);
1656
+ p(h);
1638
1657
  else {
1639
- const m = i ? h.getAttribute(i) : null, x = m !== null && m !== "false", w = zt(i), b = (w.get(h) || 0) + 1, v = (u.get(h) || 0) + 1;
1640
- w.set(h, b), u.set(h, v), a.push(h), b === 1 && x && Ve.add(h), v === 1 && h.setAttribute(o, ""), !x && i && h.setAttribute(i, i === "inert" ? "" : "true");
1658
+ const m = i ? h.getAttribute(i) : null, x = m !== null && m !== "false", y = Zt(i), b = (y.get(h) || 0) + 1, v = (u.get(h) || 0) + 1;
1659
+ y.set(h, b), u.set(h, v), a.push(h), b === 1 && x && He.add(h), v === 1 && h.setAttribute(o, ""), !x && i && h.setAttribute(i, i === "inert" ? "" : "true");
1641
1660
  }
1642
1661
  });
1643
1662
  }
1644
- return dt++, () => {
1663
+ return pt++, () => {
1645
1664
  a.forEach((f) => {
1646
- const h = zt(i), x = (h.get(f) || 0) - 1, w = (u.get(f) || 0) - 1;
1647
- h.set(f, x), u.set(f, w), x || (!Ve.has(f) && i && f.removeAttribute(i), Ve.delete(f)), w || f.removeAttribute(o);
1648
- }), dt--, dt || (Ie.inert = /* @__PURE__ */ new WeakMap(), Ie["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Ie.none = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakSet(), He = {});
1665
+ const h = Zt(i), x = (h.get(f) || 0) - 1, y = (u.get(f) || 0) - 1;
1666
+ h.set(f, x), u.set(f, y), x || (!He.has(f) && i && f.removeAttribute(i), He.delete(f)), y || f.removeAttribute(o);
1667
+ }), pt--, pt || (Me.inert = /* @__PURE__ */ new WeakMap(), Me["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Me.none = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakSet(), Ke = {});
1649
1668
  };
1650
1669
  }
1651
- function Gt(e, t, n) {
1670
+ function Jt(e, t, n) {
1652
1671
  t === void 0 && (t = !1), n === void 0 && (n = !1);
1653
- const r = Eo(e[0]).body;
1654
- return Co(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))), r, t, n);
1672
+ const r = yo(e[0]).body;
1673
+ return Ro(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))), r, t, n);
1655
1674
  }
1656
- const At = {
1675
+ const It = {
1657
1676
  border: 0,
1658
1677
  clip: "rect(0 0 0 0)",
1659
1678
  height: "1px",
@@ -1665,10 +1684,10 @@ const At = {
1665
1684
  width: "1px",
1666
1685
  top: 0,
1667
1686
  left: 0
1668
- }, Je = /* @__PURE__ */ p.forwardRef(function(t, n) {
1669
- const [r, o] = p.useState();
1687
+ }, et = /* @__PURE__ */ g.forwardRef(function(t, n) {
1688
+ const [r, o] = g.useState();
1670
1689
  Z(() => {
1671
- Rr() && o("button");
1690
+ vr() && o("button");
1672
1691
  }, []);
1673
1692
  const i = {
1674
1693
  ref: n,
@@ -1676,25 +1695,25 @@ const At = {
1676
1695
  // Role is only for VoiceOver
1677
1696
  role: r,
1678
1697
  "aria-hidden": r ? void 0 : !0,
1679
- [De("focus-guard")]: "",
1680
- style: At
1698
+ [Fe("focus-guard")]: "",
1699
+ style: It
1681
1700
  };
1682
1701
  return /* @__PURE__ */ fe("span", {
1683
1702
  ...t,
1684
1703
  ...i
1685
1704
  });
1686
- }), Ao = {
1705
+ }), Eo = {
1687
1706
  clipPath: "inset(50%)",
1688
1707
  position: "fixed",
1689
1708
  top: 0,
1690
1709
  left: 0
1691
- }, $n = /* @__PURE__ */ p.createContext(null), Zt = /* @__PURE__ */ De("portal");
1692
- function Oo(e) {
1710
+ }, Bn = /* @__PURE__ */ g.createContext(null), Qt = /* @__PURE__ */ Fe("portal");
1711
+ function So(e) {
1693
1712
  e === void 0 && (e = {});
1694
1713
  const {
1695
1714
  id: t,
1696
1715
  root: n
1697
- } = e, r = Tt(), o = Bn(), [i, s] = p.useState(null), c = p.useRef(null);
1716
+ } = e, r = At(), o = Vn(), [i, s] = g.useState(null), c = g.useRef(null);
1698
1717
  return Z(() => () => {
1699
1718
  i == null || i.remove(), queueMicrotask(() => {
1700
1719
  c.current = null;
@@ -1704,46 +1723,46 @@ function Oo(e) {
1704
1723
  const l = t ? document.getElementById(t) : null;
1705
1724
  if (!l) return;
1706
1725
  const a = document.createElement("div");
1707
- a.id = r, a.setAttribute(Zt, ""), l.appendChild(a), c.current = a, s(a);
1726
+ a.id = r, a.setAttribute(Qt, ""), l.appendChild(a), c.current = a, s(a);
1708
1727
  }, [t, r]), Z(() => {
1709
1728
  if (n === null || !r || c.current) return;
1710
1729
  let l = n || (o == null ? void 0 : o.portalNode);
1711
- l && !Rt(l) && (l = l.current), l = l || document.body;
1730
+ l && !St(l) && (l = l.current), l = l || document.body;
1712
1731
  let a = null;
1713
1732
  t && (a = document.createElement("div"), a.id = t, l.appendChild(a));
1714
1733
  const u = document.createElement("div");
1715
- u.id = r, u.setAttribute(Zt, ""), l = a || l, l.appendChild(u), c.current = u, s(u);
1734
+ u.id = r, u.setAttribute(Qt, ""), l = a || l, l.appendChild(u), c.current = u, s(u);
1716
1735
  }, [t, n, r, o]), i;
1717
1736
  }
1718
- function Yo(e) {
1737
+ function Ko(e) {
1719
1738
  const {
1720
1739
  children: t,
1721
1740
  id: n,
1722
1741
  root: r,
1723
1742
  preserveTabOrder: o = !0
1724
- } = e, i = Oo({
1743
+ } = e, i = So({
1725
1744
  id: n,
1726
1745
  root: r
1727
- }), [s, c] = p.useState(null), l = p.useRef(null), a = p.useRef(null), u = p.useRef(null), d = p.useRef(null), g = s == null ? void 0 : s.modal, f = s == null ? void 0 : s.open, h = (
1746
+ }), [s, c] = g.useState(null), l = g.useRef(null), a = g.useRef(null), u = g.useRef(null), d = g.useRef(null), p = s == null ? void 0 : s.modal, f = s == null ? void 0 : s.open, h = (
1728
1747
  // The FocusManager and therefore floating element are currently open/
1729
1748
  // rendered.
1730
1749
  !!s && // Guards are only for non-modal focus management.
1731
1750
  !s.modal && // Don't render if unmount is transitioning.
1732
1751
  s.open && o && !!(r || i)
1733
1752
  );
1734
- return p.useEffect(() => {
1735
- if (!i || !o || g)
1753
+ return g.useEffect(() => {
1754
+ if (!i || !o || p)
1736
1755
  return;
1737
1756
  function m(x) {
1738
- i && ke(x) && (x.type === "focusin" ? Bt : Fr)(i);
1757
+ i && ke(x) && (x.type === "focusin" ? Bt : Mr)(i);
1739
1758
  }
1740
1759
  return i.addEventListener("focusin", m, !0), i.addEventListener("focusout", m, !0), () => {
1741
1760
  i.removeEventListener("focusin", m, !0), i.removeEventListener("focusout", m, !0);
1742
1761
  };
1743
- }, [i, o, g]), p.useEffect(() => {
1762
+ }, [i, o, p]), g.useEffect(() => {
1744
1763
  i && (f || Bt(i));
1745
- }, [f, i]), /* @__PURE__ */ ln($n.Provider, {
1746
- value: p.useMemo(() => ({
1764
+ }, [f, i]), /* @__PURE__ */ fn(Bn.Provider, {
1765
+ value: g.useMemo(() => ({
1747
1766
  preserveTabOrder: o,
1748
1767
  beforeOutsideRef: l,
1749
1768
  afterOutsideRef: a,
@@ -1752,7 +1771,7 @@ function Yo(e) {
1752
1771
  portalNode: i,
1753
1772
  setFocusManagerState: c
1754
1773
  }), [o, i]),
1755
- children: [h && i && /* @__PURE__ */ fe(Je, {
1774
+ children: [h && i && /* @__PURE__ */ fe(et, {
1756
1775
  "data-type": "outside",
1757
1776
  ref: l,
1758
1777
  onFocus: (m) => {
@@ -1760,14 +1779,14 @@ function Yo(e) {
1760
1779
  var x;
1761
1780
  (x = u.current) == null || x.focus();
1762
1781
  } else {
1763
- const w = s ? s.domReference : null, b = Cn(w);
1782
+ const y = s ? s.domReference : null, b = In(y);
1764
1783
  b == null || b.focus();
1765
1784
  }
1766
1785
  }
1767
1786
  }), h && i && /* @__PURE__ */ fe("span", {
1768
1787
  "aria-owns": i.id,
1769
- style: Ao
1770
- }), i && /* @__PURE__ */ an.createPortal(t, i), h && i && /* @__PURE__ */ fe(Je, {
1788
+ style: Eo
1789
+ }), i && /* @__PURE__ */ dn.createPortal(t, i), h && i && /* @__PURE__ */ fe(et, {
1771
1790
  "data-type": "outside",
1772
1791
  ref: a,
1773
1792
  onFocus: (m) => {
@@ -1775,61 +1794,61 @@ function Yo(e) {
1775
1794
  var x;
1776
1795
  (x = d.current) == null || x.focus();
1777
1796
  } else {
1778
- const w = s ? s.domReference : null, b = Tn(w);
1797
+ const y = s ? s.domReference : null, b = On(y);
1779
1798
  b == null || b.focus(), s != null && s.closeOnFocusOut && (s == null || s.onOpenChange(!1, m.nativeEvent, "focus-out"));
1780
1799
  }
1781
1800
  }
1782
1801
  })]
1783
1802
  });
1784
1803
  }
1785
- const Bn = () => p.useContext($n);
1786
- function Jt(e) {
1787
- return p.useMemo(() => (t) => {
1804
+ const Vn = () => g.useContext(Bn);
1805
+ function en(e) {
1806
+ return g.useMemo(() => (t) => {
1788
1807
  e.forEach((n) => {
1789
1808
  n && (n.current = t);
1790
1809
  });
1791
1810
  }, e);
1792
1811
  }
1793
- const Io = 20;
1812
+ const tn = 20;
1794
1813
  let ve = [];
1795
- function Ot() {
1814
+ function Mt() {
1796
1815
  ve = ve.filter((e) => {
1797
1816
  var t;
1798
1817
  return (t = e.deref()) == null ? void 0 : t.isConnected;
1799
1818
  });
1800
1819
  }
1801
- function Po(e) {
1802
- Ot(), e && xe(e) !== "body" && (ve.push(new WeakRef(e)), ve.length > Io && (ve = ve.slice(-20)));
1820
+ function To(e) {
1821
+ Mt(), e && xe(e) !== "body" && (ve.push(new WeakRef(e)), ve.length > tn && (ve = ve.slice(-tn)));
1803
1822
  }
1804
- function Qt() {
1805
- Ot();
1823
+ function nn() {
1824
+ Mt();
1806
1825
  const e = ve[ve.length - 1];
1807
1826
  return e == null ? void 0 : e.deref();
1808
1827
  }
1809
- function Mo(e) {
1810
- const t = $e();
1811
- return yn(e, t) ? e : rt(e, t)[0] || e;
1828
+ function Co(e) {
1829
+ const t = _e();
1830
+ return En(e, t) ? e : it(e, t)[0] || e;
1812
1831
  }
1813
- function en(e, t) {
1832
+ function rn(e, t) {
1814
1833
  var n;
1815
1834
  if (!t.current.includes("floating") && !((n = e.getAttribute("role")) != null && n.includes("dialog")))
1816
1835
  return;
1817
- const r = $e(), i = xr(e, r).filter((c) => {
1836
+ const r = _e(), i = br(e, r).filter((c) => {
1818
1837
  const l = c.getAttribute("data-tabindex") || "";
1819
- return yn(c, r) || c.hasAttribute("data-tabindex") && !l.startsWith("-");
1838
+ return En(c, r) || c.hasAttribute("data-tabindex") && !l.startsWith("-");
1820
1839
  }), s = e.getAttribute("tabindex");
1821
1840
  t.current.includes("floating") || i.length === 0 ? s !== "0" && e.setAttribute("tabindex", "0") : (s !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
1822
1841
  }
1823
- const ko = /* @__PURE__ */ p.forwardRef(function(t, n) {
1842
+ const Ao = /* @__PURE__ */ g.forwardRef(function(t, n) {
1824
1843
  return /* @__PURE__ */ fe("button", {
1825
1844
  ...t,
1826
1845
  type: "button",
1827
1846
  ref: n,
1828
1847
  tabIndex: -1,
1829
- style: At
1848
+ style: It
1830
1849
  });
1831
1850
  });
1832
- function zo(e) {
1851
+ function qo(e) {
1833
1852
  const {
1834
1853
  context: t,
1835
1854
  children: n,
@@ -1842,153 +1861,153 @@ function zo(e) {
1842
1861
  modal: a = !0,
1843
1862
  visuallyHiddenDismiss: u = !1,
1844
1863
  closeOnFocusOut: d = !0,
1845
- outsideElementsInert: g = !1,
1864
+ outsideElementsInert: p = !1,
1846
1865
  getInsideElements: f = () => []
1847
1866
  } = e, {
1848
1867
  open: h,
1849
1868
  onOpenChange: m,
1850
1869
  events: x,
1851
- dataRef: w,
1870
+ dataRef: y,
1852
1871
  elements: {
1853
1872
  domReference: b,
1854
1873
  floating: v
1855
1874
  }
1856
1875
  } = t, S = ie(() => {
1857
1876
  var T;
1858
- return (T = w.current.floatingContext) == null ? void 0 : T.nodeId;
1859
- }), A = ie(f), O = typeof s == "number" && s < 0, P = Lt(b) && O, $ = So(), j = $ ? i : !0, W = !j || $ && g, B = at(o), X = at(s), H = at(c), R = Ct(), E = Bn(), D = p.useRef(null), L = p.useRef(null), y = p.useRef(!1), I = p.useRef(!1), N = p.useRef(-1), ne = p.useRef(-1), Se = E != null, M = yt(v), oe = ie(function(T) {
1860
- return T === void 0 && (T = M), T ? rt(T, $e()) : [];
1877
+ return (T = y.current.floatingContext) == null ? void 0 : T.nodeId;
1878
+ }), A = ie(f), O = typeof s == "number" && s < 0, M = $t(b) && O, $ = wo(), j = $ ? i : !0, W = !j || $ && p, _ = dt(o), X = dt(s), H = dt(c), R = Ot(), E = Vn(), k = g.useRef(null), L = g.useRef(null), w = g.useRef(!1), I = g.useRef(!1), N = g.useRef(-1), ne = g.useRef(-1), Te = E != null, P = Rt(v), oe = ie(function(T) {
1879
+ return T === void 0 && (T = P), T ? it(T, _e()) : [];
1861
1880
  }), K = ie((T) => {
1862
- const k = oe(T);
1863
- return B.current.map((C) => b && C === "reference" ? b : M && C === "floating" ? M : k).filter(Boolean).flat();
1881
+ const D = oe(T);
1882
+ return _.current.map((C) => b && C === "reference" ? b : P && C === "floating" ? P : D).filter(Boolean).flat();
1864
1883
  });
1865
- p.useEffect(() => {
1884
+ g.useEffect(() => {
1866
1885
  if (r || !a) return;
1867
1886
  function T(C) {
1868
1887
  if (C.key === "Tab") {
1869
- z(M, Ce(re(M))) && oe().length === 0 && !P && lt(C);
1888
+ z(P, Ae(re(P))) && oe().length === 0 && !M && ft(C);
1870
1889
  const V = K(), U = be(C);
1871
- B.current[0] === "reference" && U === b && (lt(C), C.shiftKey ? Te(V[V.length - 1]) : Te(V[1])), B.current[1] === "floating" && U === M && C.shiftKey && (lt(C), Te(V[0]));
1890
+ _.current[0] === "reference" && U === b && (ft(C), C.shiftKey ? Ce(V[V.length - 1]) : Ce(V[1])), _.current[1] === "floating" && U === P && C.shiftKey && (ft(C), Ce(V[0]));
1872
1891
  }
1873
1892
  }
1874
- const k = re(M);
1875
- return k.addEventListener("keydown", T), () => {
1876
- k.removeEventListener("keydown", T);
1893
+ const D = re(P);
1894
+ return D.addEventListener("keydown", T), () => {
1895
+ D.removeEventListener("keydown", T);
1877
1896
  };
1878
- }, [r, b, M, a, B, P, oe, K]), p.useEffect(() => {
1897
+ }, [r, b, P, a, _, M, oe, K]), g.useEffect(() => {
1879
1898
  if (r || !v) return;
1880
- function T(k) {
1881
- const C = be(k), U = oe().indexOf(C);
1899
+ function T(D) {
1900
+ const C = be(D), U = oe().indexOf(C);
1882
1901
  U !== -1 && (N.current = U);
1883
1902
  }
1884
1903
  return v.addEventListener("focusin", T), () => {
1885
1904
  v.removeEventListener("focusin", T);
1886
1905
  };
1887
- }, [r, v, oe]), p.useEffect(() => {
1906
+ }, [r, v, oe]), g.useEffect(() => {
1888
1907
  if (r || !d) return;
1889
1908
  function T() {
1890
1909
  I.current = !0, setTimeout(() => {
1891
1910
  I.current = !1;
1892
1911
  });
1893
1912
  }
1894
- function k(U) {
1913
+ function D(U) {
1895
1914
  const F = U.relatedTarget, le = U.currentTarget, ee = be(U);
1896
1915
  queueMicrotask(() => {
1897
- const Y = S(), Re = !(z(b, F) || z(v, F) || z(F, v) || z(E == null ? void 0 : E.portalNode, F) || F != null && F.hasAttribute(De("focus-guard")) || R && (Ae(R.nodesRef.current, Y).find((ge) => {
1916
+ const Y = S(), Re = !(z(b, F) || z(v, F) || z(F, v) || z(E == null ? void 0 : E.portalNode, F) || F != null && F.hasAttribute(Fe("focus-guard")) || R && (Oe(R.nodesRef.current, Y).find((pe) => {
1898
1917
  var ae, he;
1899
- return z((ae = ge.context) == null ? void 0 : ae.elements.floating, F) || z((he = ge.context) == null ? void 0 : he.elements.domReference, F);
1900
- }) || Nt(R.nodesRef.current, Y).find((ge) => {
1901
- var ae, he, It;
1902
- return [(ae = ge.context) == null ? void 0 : ae.elements.floating, yt((he = ge.context) == null ? void 0 : he.elements.floating)].includes(F) || ((It = ge.context) == null ? void 0 : It.elements.domReference) === F;
1918
+ return z((ae = pe.context) == null ? void 0 : ae.elements.floating, F) || z((he = pe.context) == null ? void 0 : he.elements.domReference, F);
1919
+ }) || _t(R.nodesRef.current, Y).find((pe) => {
1920
+ var ae, he, Pt;
1921
+ return [(ae = pe.context) == null ? void 0 : ae.elements.floating, Rt((he = pe.context) == null ? void 0 : he.elements.floating)].includes(F) || ((Pt = pe.context) == null ? void 0 : Pt.elements.domReference) === F;
1903
1922
  })));
1904
- if (le === b && M && en(M, B), l && le !== b && !(ee != null && ee.isConnected) && Ce(re(M)) === re(M).body) {
1905
- q(M) && M.focus();
1906
- const ge = N.current, ae = oe(), he = ae[ge] || ae[ae.length - 1] || M;
1923
+ if (le === b && P && rn(P, _), l && le !== b && !(ee != null && ee.isConnected) && Ae(re(P)) === re(P).body) {
1924
+ q(P) && P.focus();
1925
+ const pe = N.current, ae = oe(), he = ae[pe] || ae[ae.length - 1] || P;
1907
1926
  q(he) && he.focus();
1908
1927
  }
1909
- if (w.current.insideReactTree) {
1910
- w.current.insideReactTree = !1;
1928
+ if (y.current.insideReactTree) {
1929
+ y.current.insideReactTree = !1;
1911
1930
  return;
1912
1931
  }
1913
- (P || !a) && F && Re && !I.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
1914
- F !== Qt() && (y.current = !0, m(!1, U, "focus-out"));
1932
+ (M || !a) && F && Re && !I.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
1933
+ F !== nn() && (w.current = !0, m(!1, U, "focus-out"));
1915
1934
  });
1916
1935
  }
1917
1936
  const C = !!(!R && E);
1918
1937
  function V() {
1919
- Ro(ne), w.current.insideReactTree = !0, ne.current = window.setTimeout(() => {
1920
- w.current.insideReactTree = !1;
1938
+ vo(ne), y.current.insideReactTree = !0, ne.current = window.setTimeout(() => {
1939
+ y.current.insideReactTree = !1;
1921
1940
  });
1922
1941
  }
1923
1942
  if (v && q(b))
1924
- return b.addEventListener("focusout", k), b.addEventListener("pointerdown", T), v.addEventListener("focusout", k), C && v.addEventListener("focusout", V, !0), () => {
1925
- b.removeEventListener("focusout", k), b.removeEventListener("pointerdown", T), v.removeEventListener("focusout", k), C && v.removeEventListener("focusout", V, !0);
1943
+ return b.addEventListener("focusout", D), b.addEventListener("pointerdown", T), v.addEventListener("focusout", D), C && v.addEventListener("focusout", V, !0), () => {
1944
+ b.removeEventListener("focusout", D), b.removeEventListener("pointerdown", T), v.removeEventListener("focusout", D), C && v.removeEventListener("focusout", V, !0);
1926
1945
  };
1927
- }, [r, b, v, M, a, R, E, m, d, l, oe, P, S, B, w]);
1928
- const Q = p.useRef(null), pe = p.useRef(null), it = Jt([Q, E == null ? void 0 : E.beforeInsideRef]), st = Jt([pe, E == null ? void 0 : E.afterInsideRef]);
1929
- p.useEffect(() => {
1930
- var T, k;
1946
+ }, [r, b, v, P, a, R, E, m, d, l, oe, M, S, _, y]);
1947
+ const Q = g.useRef(null), ge = g.useRef(null), ct = en([Q, E == null ? void 0 : E.beforeInsideRef]), lt = en([ge, E == null ? void 0 : E.afterInsideRef]);
1948
+ g.useEffect(() => {
1949
+ var T, D;
1931
1950
  if (r || !v) return;
1932
- const C = Array.from((E == null || (T = E.portalNode) == null ? void 0 : T.querySelectorAll("[" + De("portal") + "]")) || []), U = (k = (R ? Nt(R.nodesRef.current, S()) : []).find((ee) => {
1951
+ const C = Array.from((E == null || (T = E.portalNode) == null ? void 0 : T.querySelectorAll("[" + Fe("portal") + "]")) || []), U = (D = (R ? _t(R.nodesRef.current, S()) : []).find((ee) => {
1933
1952
  var Y;
1934
- return Lt(((Y = ee.context) == null ? void 0 : Y.elements.domReference) || null);
1935
- })) == null || (k = k.context) == null ? void 0 : k.elements.domReference, F = [v, U, ...C, ...A(), D.current, L.current, Q.current, pe.current, E == null ? void 0 : E.beforeOutsideRef.current, E == null ? void 0 : E.afterOutsideRef.current, B.current.includes("reference") || P ? b : null].filter((ee) => ee != null), le = a || P ? Gt(F, !W, W) : Gt(F);
1953
+ return $t(((Y = ee.context) == null ? void 0 : Y.elements.domReference) || null);
1954
+ })) == null || (D = D.context) == null ? void 0 : D.elements.domReference, F = [v, U, ...C, ...A(), k.current, L.current, Q.current, ge.current, E == null ? void 0 : E.beforeOutsideRef.current, E == null ? void 0 : E.afterOutsideRef.current, _.current.includes("reference") || M ? b : null].filter((ee) => ee != null), le = a || M ? Jt(F, !W, W) : Jt(F);
1936
1955
  return () => {
1937
1956
  le();
1938
1957
  };
1939
- }, [r, b, v, a, B, E, P, j, W, R, S, A]), Z(() => {
1940
- if (r || !q(M)) return;
1941
- const T = re(M), k = Ce(T);
1958
+ }, [r, b, v, a, _, E, M, j, W, R, S, A]), Z(() => {
1959
+ if (r || !q(P)) return;
1960
+ const T = re(P), D = Ae(T);
1942
1961
  queueMicrotask(() => {
1943
- const C = K(M), V = X.current, U = (typeof V == "number" ? C[V] : V.current) || M, F = z(M, k);
1944
- !O && !F && h && Te(U, {
1945
- preventScroll: U === M
1962
+ const C = K(P), V = X.current, U = (typeof V == "number" ? C[V] : V.current) || P, F = z(P, D);
1963
+ !O && !F && h && Ce(U, {
1964
+ preventScroll: U === P
1946
1965
  });
1947
1966
  });
1948
- }, [r, h, M, O, K, X]), Z(() => {
1949
- if (r || !M) return;
1950
- const T = re(M), k = Ce(T);
1951
- Po(k);
1967
+ }, [r, h, P, O, K, X]), Z(() => {
1968
+ if (r || !P) return;
1969
+ const T = re(P), D = Ae(T);
1970
+ To(D);
1952
1971
  function C(F) {
1953
1972
  let {
1954
1973
  reason: le,
1955
1974
  event: ee,
1956
1975
  nested: Y
1957
1976
  } = F;
1958
- if (["hover", "safe-polygon"].includes(le) && ee.type === "mouseleave" && (y.current = !0), le === "outside-press")
1977
+ if (["hover", "safe-polygon"].includes(le) && ee.type === "mouseleave" && (w.current = !0), le === "outside-press")
1959
1978
  if (Y)
1960
- y.current = !1;
1961
- else if (Ar(ee) || Or(ee))
1962
- y.current = !1;
1979
+ w.current = !1;
1980
+ else if (Er(ee) || Sr(ee))
1981
+ w.current = !1;
1963
1982
  else {
1964
1983
  let Re = !1;
1965
1984
  document.createElement("div").focus({
1966
1985
  get preventScroll() {
1967
1986
  return Re = !0, !1;
1968
1987
  }
1969
- }), Re ? y.current = !1 : y.current = !0;
1988
+ }), Re ? w.current = !1 : w.current = !0;
1970
1989
  }
1971
1990
  }
1972
1991
  x.on("openchange", C);
1973
1992
  const V = T.createElement("span");
1974
- V.setAttribute("tabindex", "-1"), V.setAttribute("aria-hidden", "true"), Object.assign(V.style, At), Se && b && b.insertAdjacentElement("afterend", V);
1993
+ V.setAttribute("tabindex", "-1"), V.setAttribute("aria-hidden", "true"), Object.assign(V.style, It), Te && b && b.insertAdjacentElement("afterend", V);
1975
1994
  function U() {
1976
1995
  if (typeof H.current == "boolean") {
1977
- const F = b || Qt();
1996
+ const F = b || nn();
1978
1997
  return F && F.isConnected ? F : V;
1979
1998
  }
1980
1999
  return H.current.current || V;
1981
2000
  }
1982
2001
  return () => {
1983
2002
  x.off("openchange", C);
1984
- const F = Ce(T), le = z(v, F) || R && Ae(R.nodesRef.current, S(), !1).some((Y) => {
2003
+ const F = Ae(T), le = z(v, F) || R && Oe(R.nodesRef.current, S(), !1).some((Y) => {
1985
2004
  var Re;
1986
2005
  return z((Re = Y.context) == null ? void 0 : Re.elements.floating, F);
1987
2006
  }), ee = U();
1988
2007
  queueMicrotask(() => {
1989
- const Y = Mo(ee);
2008
+ const Y = Co(ee);
1990
2009
  // eslint-disable-next-line react-hooks/exhaustive-deps
1991
- H.current && !y.current && q(Y) && // If the focus moved somewhere else after mount, avoid returning focus
2010
+ H.current && !w.current && q(Y) && // If the focus moved somewhere else after mount, avoid returning focus
1992
2011
  // since it likely entered a different element which should be
1993
2012
  // respected: https://github.com/floating-ui/floating-ui/issues/2607
1994
2013
  (!(Y !== F && F !== T.body) || le) && Y.focus({
@@ -1996,10 +2015,10 @@ function zo(e) {
1996
2015
  }), V.remove();
1997
2016
  });
1998
2017
  };
1999
- }, [r, v, M, H, w, x, R, Se, b, S]), p.useEffect(() => (queueMicrotask(() => {
2000
- y.current = !1;
2018
+ }, [r, v, P, H, y, x, R, Te, b, S]), g.useEffect(() => (queueMicrotask(() => {
2019
+ w.current = !1;
2001
2020
  }), () => {
2002
- queueMicrotask(Ot);
2021
+ queueMicrotask(Mt);
2003
2022
  }), [r]), Z(() => {
2004
2023
  if (!r && E)
2005
2024
  return E.setFocusManagerState({
@@ -2012,57 +2031,57 @@ function zo(e) {
2012
2031
  E.setFocusManagerState(null);
2013
2032
  };
2014
2033
  }, [r, E, a, h, m, d, b]), Z(() => {
2015
- r || M && en(M, B);
2016
- }, [r, M, B]);
2017
- function Be(T) {
2018
- return r || !u || !a ? null : /* @__PURE__ */ fe(ko, {
2019
- ref: T === "start" ? D : L,
2020
- onClick: (k) => m(!1, k.nativeEvent),
2034
+ r || P && rn(P, _);
2035
+ }, [r, P, _]);
2036
+ function We(T) {
2037
+ return r || !u || !a ? null : /* @__PURE__ */ fe(Ao, {
2038
+ ref: T === "start" ? k : L,
2039
+ onClick: (D) => m(!1, D.nativeEvent),
2021
2040
  children: typeof u == "string" ? u : "Dismiss"
2022
2041
  });
2023
2042
  }
2024
- const We = !r && j && (a ? !P : !0) && (Se || a);
2025
- return /* @__PURE__ */ ln(Wn, {
2026
- children: [We && /* @__PURE__ */ fe(Je, {
2043
+ const Be = !r && j && (a ? !M : !0) && (Te || a);
2044
+ return /* @__PURE__ */ fn(Hn, {
2045
+ children: [Be && /* @__PURE__ */ fe(et, {
2027
2046
  "data-type": "inside",
2028
- ref: it,
2047
+ ref: ct,
2029
2048
  onFocus: (T) => {
2030
2049
  if (a) {
2031
2050
  const C = K();
2032
- Te(o[0] === "reference" ? C[0] : C[C.length - 1]);
2051
+ Ce(o[0] === "reference" ? C[0] : C[C.length - 1]);
2033
2052
  } else if (E != null && E.preserveTabOrder && E.portalNode)
2034
- if (y.current = !1, ke(T, E.portalNode)) {
2035
- const C = Tn(b);
2053
+ if (w.current = !1, ke(T, E.portalNode)) {
2054
+ const C = On(b);
2036
2055
  C == null || C.focus();
2037
2056
  } else {
2038
- var k;
2039
- (k = E.beforeOutsideRef.current) == null || k.focus();
2057
+ var D;
2058
+ (D = E.beforeOutsideRef.current) == null || D.focus();
2040
2059
  }
2041
2060
  }
2042
- }), !P && Be("start"), n, Be("end"), We && /* @__PURE__ */ fe(Je, {
2061
+ }), !M && We("start"), n, We("end"), Be && /* @__PURE__ */ fe(et, {
2043
2062
  "data-type": "inside",
2044
- ref: st,
2063
+ ref: lt,
2045
2064
  onFocus: (T) => {
2046
2065
  if (a)
2047
- Te(K()[0]);
2066
+ Ce(K()[0]);
2048
2067
  else if (E != null && E.preserveTabOrder && E.portalNode)
2049
- if (d && (y.current = !0), ke(T, E.portalNode)) {
2050
- const C = Cn(b);
2068
+ if (d && (w.current = !0), ke(T, E.portalNode)) {
2069
+ const C = In(b);
2051
2070
  C == null || C.focus();
2052
2071
  } else {
2053
- var k;
2054
- (k = E.afterOutsideRef.current) == null || k.focus();
2072
+ var D;
2073
+ (D = E.afterOutsideRef.current) == null || D.focus();
2055
2074
  }
2056
2075
  }
2057
2076
  })]
2058
2077
  });
2059
2078
  }
2060
- let Ke = 0;
2061
- const tn = "--floating-ui-scrollbar-width";
2062
- function Do() {
2063
- const e = xn(), t = /iP(hone|ad|od)|iOS/.test(e) || // iPads can claim to be MacIntel
2079
+ let qe = 0;
2080
+ const on = "--floating-ui-scrollbar-width";
2081
+ function Oo() {
2082
+ const e = Sn(), t = /iP(hone|ad|od)|iOS/.test(e) || // iPads can claim to be MacIntel
2064
2083
  e === "MacIntel" && navigator.maxTouchPoints > 1, n = document.body.style, o = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft ? "paddingLeft" : "paddingRight", i = window.innerWidth - document.documentElement.clientWidth, s = n.left ? parseFloat(n.left) : window.scrollX, c = n.top ? parseFloat(n.top) : window.scrollY;
2065
- if (n.overflow = "hidden", n.setProperty(tn, i + "px"), i && (n[o] = i + "px"), t) {
2084
+ if (n.overflow = "hidden", n.setProperty(on, i + "px"), i && (n[o] = i + "px"), t) {
2066
2085
  var l, a;
2067
2086
  const u = ((l = window.visualViewport) == null ? void 0 : l.offsetLeft) || 0, d = ((a = window.visualViewport) == null ? void 0 : a.offsetTop) || 0;
2068
2087
  Object.assign(n, {
@@ -2076,7 +2095,7 @@ function Do() {
2076
2095
  Object.assign(n, {
2077
2096
  overflow: "",
2078
2097
  [o]: ""
2079
- }), n.removeProperty(tn), t && (Object.assign(n, {
2098
+ }), n.removeProperty(on), t && (Object.assign(n, {
2080
2099
  position: "",
2081
2100
  top: "",
2082
2101
  left: "",
@@ -2084,17 +2103,17 @@ function Do() {
2084
2103
  }), window.scrollTo(s, c));
2085
2104
  };
2086
2105
  }
2087
- let nn = () => {
2106
+ let sn = () => {
2088
2107
  };
2089
- const Go = /* @__PURE__ */ p.forwardRef(function(t, n) {
2108
+ const jo = /* @__PURE__ */ g.forwardRef(function(t, n) {
2090
2109
  const {
2091
2110
  lockScroll: r = !1,
2092
2111
  ...o
2093
2112
  } = t;
2094
2113
  return Z(() => {
2095
2114
  if (r)
2096
- return Ke++, Ke === 1 && (nn = Do()), () => {
2097
- Ke--, Ke === 0 && nn();
2115
+ return qe++, qe === 1 && (sn = Oo()), () => {
2116
+ qe--, qe === 0 && sn();
2098
2117
  };
2099
2118
  }, [r]), /* @__PURE__ */ fe("div", {
2100
2119
  ref: n,
@@ -2110,16 +2129,16 @@ const Go = /* @__PURE__ */ p.forwardRef(function(t, n) {
2110
2129
  }
2111
2130
  });
2112
2131
  });
2113
- function rn(e) {
2132
+ function cn(e) {
2114
2133
  return q(e.target) && e.target.tagName === "BUTTON";
2115
2134
  }
2116
- function Fo(e) {
2135
+ function Io(e) {
2117
2136
  return q(e.target) && e.target.tagName === "A";
2118
2137
  }
2119
- function on(e) {
2120
- return En(e);
2138
+ function ln(e) {
2139
+ return Cn(e);
2121
2140
  }
2122
- function Zo(e, t) {
2141
+ function Uo(e, t) {
2123
2142
  t === void 0 && (t = {});
2124
2143
  const {
2125
2144
  open: n,
@@ -2135,49 +2154,49 @@ function Zo(e, t) {
2135
2154
  ignoreMouse: a = !1,
2136
2155
  keyboardHandlers: u = !0,
2137
2156
  stickIfOpen: d = !0
2138
- } = t, g = p.useRef(), f = p.useRef(!1), h = p.useMemo(() => ({
2157
+ } = t, p = g.useRef(), f = g.useRef(!1), h = g.useMemo(() => ({
2139
2158
  onPointerDown(m) {
2140
- g.current = m.pointerType;
2159
+ p.current = m.pointerType;
2141
2160
  },
2142
2161
  onMouseDown(m) {
2143
- const x = g.current;
2144
- m.button === 0 && c !== "click" && ($t(x) && a || (n && l && (!(o.current.openEvent && d) || o.current.openEvent.type === "mousedown") ? r(!1, m.nativeEvent, "click") : (m.preventDefault(), r(!0, m.nativeEvent, "click"))));
2162
+ const x = p.current;
2163
+ m.button === 0 && c !== "click" && (Wt(x) && a || (n && l && (!(o.current.openEvent && d) || o.current.openEvent.type === "mousedown") ? r(!1, m.nativeEvent, "click") : (m.preventDefault(), r(!0, m.nativeEvent, "click"))));
2145
2164
  },
2146
2165
  onClick(m) {
2147
- const x = g.current;
2148
- if (c === "mousedown" && g.current) {
2149
- g.current = void 0;
2166
+ const x = p.current;
2167
+ if (c === "mousedown" && p.current) {
2168
+ p.current = void 0;
2150
2169
  return;
2151
2170
  }
2152
- $t(x) && a || (n && l && (!(o.current.openEvent && d) || o.current.openEvent.type === "click") ? r(!1, m.nativeEvent, "click") : r(!0, m.nativeEvent, "click"));
2171
+ Wt(x) && a || (n && l && (!(o.current.openEvent && d) || o.current.openEvent.type === "click") ? r(!1, m.nativeEvent, "click") : r(!0, m.nativeEvent, "click"));
2153
2172
  },
2154
2173
  onKeyDown(m) {
2155
- g.current = void 0, !(m.defaultPrevented || !u || rn(m)) && (m.key === " " && !on(i) && (m.preventDefault(), f.current = !0), !Fo(m) && m.key === "Enter" && r(!(n && l), m.nativeEvent, "click"));
2174
+ p.current = void 0, !(m.defaultPrevented || !u || cn(m)) && (m.key === " " && !ln(i) && (m.preventDefault(), f.current = !0), !Io(m) && m.key === "Enter" && r(!(n && l), m.nativeEvent, "click"));
2156
2175
  },
2157
2176
  onKeyUp(m) {
2158
- m.defaultPrevented || !u || rn(m) || on(i) || m.key === " " && f.current && (f.current = !1, r(!(n && l), m.nativeEvent, "click"));
2177
+ m.defaultPrevented || !u || cn(m) || ln(i) || m.key === " " && f.current && (f.current = !1, r(!(n && l), m.nativeEvent, "click"));
2159
2178
  }
2160
2179
  }), [o, i, c, a, u, r, n, d, l]);
2161
- return p.useMemo(() => s ? {
2180
+ return g.useMemo(() => s ? {
2162
2181
  reference: h
2163
2182
  } : {}, [s, h]);
2164
2183
  }
2165
- const Lo = {
2184
+ const Mo = {
2166
2185
  pointerdown: "onPointerDown",
2167
2186
  mousedown: "onMouseDown",
2168
2187
  click: "onClick"
2169
- }, No = {
2188
+ }, Po = {
2170
2189
  pointerdown: "onPointerDownCapture",
2171
2190
  mousedown: "onMouseDownCapture",
2172
2191
  click: "onClickCapture"
2173
- }, sn = (e) => {
2192
+ }, an = (e) => {
2174
2193
  var t, n;
2175
2194
  return {
2176
2195
  escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
2177
2196
  outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
2178
2197
  };
2179
2198
  };
2180
- function Jo(e, t) {
2199
+ function Xo(e, t) {
2181
2200
  t === void 0 && (t = {});
2182
2201
  const {
2183
2202
  open: n,
@@ -2191,76 +2210,76 @@ function Jo(e, t) {
2191
2210
  outsidePressEvent: a = "pointerdown",
2192
2211
  referencePress: u = !1,
2193
2212
  referencePressEvent: d = "pointerdown",
2194
- ancestorScroll: g = !1,
2213
+ ancestorScroll: p = !1,
2195
2214
  bubbles: f,
2196
2215
  capture: h
2197
- } = t, m = Ct(), x = ie(typeof l == "function" ? l : () => !1), w = typeof l == "function" ? x : l, b = p.useRef(!1), {
2216
+ } = t, m = Ot(), x = ie(typeof l == "function" ? l : () => !1), y = typeof l == "function" ? x : l, b = g.useRef(!1), {
2198
2217
  escapeKey: v,
2199
2218
  outsidePress: S
2200
- } = sn(f), {
2219
+ } = an(f), {
2201
2220
  escapeKey: A,
2202
2221
  outsidePress: O
2203
- } = sn(h), P = p.useRef(!1), $ = ie((R) => {
2222
+ } = an(h), M = g.useRef(!1), $ = ie((R) => {
2204
2223
  var E;
2205
- if (!n || !s || !c || R.key !== "Escape" || P.current)
2224
+ if (!n || !s || !c || R.key !== "Escape" || M.current)
2206
2225
  return;
2207
- const D = (E = i.current.floatingContext) == null ? void 0 : E.nodeId, L = m ? Ae(m.nodesRef.current, D) : [];
2226
+ const k = (E = i.current.floatingContext) == null ? void 0 : E.nodeId, L = m ? Oe(m.nodesRef.current, k) : [];
2208
2227
  if (!v && (R.stopPropagation(), L.length > 0)) {
2209
- let y = !0;
2228
+ let w = !0;
2210
2229
  if (L.forEach((I) => {
2211
2230
  var N;
2212
2231
  if ((N = I.context) != null && N.open && !I.context.dataRef.current.__escapeKeyBubbles) {
2213
- y = !1;
2232
+ w = !1;
2214
2233
  return;
2215
2234
  }
2216
- }), !y)
2235
+ }), !w)
2217
2236
  return;
2218
2237
  }
2219
- r(!1, Cr(R) ? R.nativeEvent : R, "escape-key");
2238
+ r(!1, Rr(R) ? R.nativeEvent : R, "escape-key");
2220
2239
  }), j = ie((R) => {
2221
2240
  var E;
2222
- const D = () => {
2241
+ const k = () => {
2223
2242
  var L;
2224
- $(R), (L = be(R)) == null || L.removeEventListener("keydown", D);
2243
+ $(R), (L = be(R)) == null || L.removeEventListener("keydown", k);
2225
2244
  };
2226
- (E = be(R)) == null || E.addEventListener("keydown", D);
2245
+ (E = be(R)) == null || E.addEventListener("keydown", k);
2227
2246
  }), W = ie((R) => {
2228
2247
  var E;
2229
- const D = i.current.insideReactTree;
2248
+ const k = i.current.insideReactTree;
2230
2249
  i.current.insideReactTree = !1;
2231
2250
  const L = b.current;
2232
- if (b.current = !1, a === "click" && L || D || typeof w == "function" && !w(R))
2251
+ if (b.current = !1, a === "click" && L || k || typeof y == "function" && !y(R))
2233
2252
  return;
2234
- const y = be(R), I = "[" + De("inert") + "]", N = re(o.floating).querySelectorAll(I);
2235
- let ne = _(y) ? y : null;
2253
+ const w = be(R), I = "[" + Fe("inert") + "]", N = re(o.floating).querySelectorAll(I);
2254
+ let ne = B(w) ? w : null;
2236
2255
  for (; ne && !de(ne); ) {
2237
2256
  const K = me(ne);
2238
- if (de(K) || !_(K))
2257
+ if (de(K) || !B(K))
2239
2258
  break;
2240
2259
  ne = K;
2241
2260
  }
2242
- if (N.length && _(y) && !Tr(y) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2243
- !z(y, o.floating) && // If the target root element contains none of the markers, then the
2261
+ if (N.length && B(w) && !xr(w) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2262
+ !z(w, o.floating) && // If the target root element contains none of the markers, then the
2244
2263
  // element was injected after the floating element rendered.
2245
2264
  Array.from(N).every((K) => !z(ne, K)))
2246
2265
  return;
2247
- if (q(y) && H) {
2248
- const K = de(y), Q = te(y), pe = /auto|scroll/, it = K || pe.test(Q.overflowX), st = K || pe.test(Q.overflowY), Be = it && y.clientWidth > 0 && y.scrollWidth > y.clientWidth, We = st && y.clientHeight > 0 && y.scrollHeight > y.clientHeight, T = Q.direction === "rtl", k = We && (T ? R.offsetX <= y.offsetWidth - y.clientWidth : R.offsetX > y.clientWidth), C = Be && R.offsetY > y.clientHeight;
2249
- if (k || C)
2266
+ if (q(w) && H) {
2267
+ const K = de(w), Q = te(w), ge = /auto|scroll/, ct = K || ge.test(Q.overflowX), lt = K || ge.test(Q.overflowY), We = ct && w.clientWidth > 0 && w.scrollWidth > w.clientWidth, Be = lt && w.clientHeight > 0 && w.scrollHeight > w.clientHeight, T = Q.direction === "rtl", D = Be && (T ? R.offsetX <= w.offsetWidth - w.clientWidth : R.offsetX > w.clientWidth), C = We && R.offsetY > w.clientHeight;
2268
+ if (D || C)
2250
2269
  return;
2251
2270
  }
2252
- const Se = (E = i.current.floatingContext) == null ? void 0 : E.nodeId, M = m && Ae(m.nodesRef.current, Se).some((K) => {
2271
+ const Te = (E = i.current.floatingContext) == null ? void 0 : E.nodeId, P = m && Oe(m.nodesRef.current, Te).some((K) => {
2253
2272
  var Q;
2254
- return ct(R, (Q = K.context) == null ? void 0 : Q.elements.floating);
2273
+ return ut(R, (Q = K.context) == null ? void 0 : Q.elements.floating);
2255
2274
  });
2256
- if (ct(R, o.floating) || ct(R, o.domReference) || M)
2275
+ if (ut(R, o.floating) || ut(R, o.domReference) || P)
2257
2276
  return;
2258
- const oe = m ? Ae(m.nodesRef.current, Se) : [];
2277
+ const oe = m ? Oe(m.nodesRef.current, Te) : [];
2259
2278
  if (oe.length > 0) {
2260
2279
  let K = !0;
2261
2280
  if (oe.forEach((Q) => {
2262
- var pe;
2263
- if ((pe = Q.context) != null && pe.open && !Q.context.dataRef.current.__outsidePressBubbles) {
2281
+ var ge;
2282
+ if ((ge = Q.context) != null && ge.open && !Q.context.dataRef.current.__outsidePressBubbles) {
2264
2283
  K = !1;
2265
2284
  return;
2266
2285
  }
@@ -2268,15 +2287,15 @@ function Jo(e, t) {
2268
2287
  return;
2269
2288
  }
2270
2289
  r(!1, R, "outside-press");
2271
- }), B = ie((R) => {
2290
+ }), _ = ie((R) => {
2272
2291
  var E;
2273
- const D = () => {
2292
+ const k = () => {
2274
2293
  var L;
2275
- W(R), (L = be(R)) == null || L.removeEventListener(a, D);
2294
+ W(R), (L = be(R)) == null || L.removeEventListener(a, k);
2276
2295
  };
2277
- (E = be(R)) == null || E.addEventListener(a, D);
2296
+ (E = be(R)) == null || E.addEventListener(a, k);
2278
2297
  });
2279
- p.useEffect(() => {
2298
+ g.useEffect(() => {
2280
2299
  if (!n || !s)
2281
2300
  return;
2282
2301
  i.current.__escapeKeyBubbles = v, i.current.__outsidePressBubbles = S;
@@ -2284,41 +2303,41 @@ function Jo(e, t) {
2284
2303
  function E(N) {
2285
2304
  r(!1, N, "ancestor-scroll");
2286
2305
  }
2287
- function D() {
2288
- window.clearTimeout(R), P.current = !0;
2306
+ function k() {
2307
+ window.clearTimeout(R), M.current = !0;
2289
2308
  }
2290
2309
  function L() {
2291
2310
  R = window.setTimeout(
2292
2311
  () => {
2293
- P.current = !1;
2312
+ M.current = !1;
2294
2313
  },
2295
2314
  // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2296
2315
  // Only apply to WebKit for the test to remain 0ms.
2297
- tt() ? 5 : 0
2316
+ rt() ? 5 : 0
2298
2317
  );
2299
2318
  }
2300
- const y = re(o.floating);
2301
- c && (y.addEventListener("keydown", A ? j : $, A), y.addEventListener("compositionstart", D), y.addEventListener("compositionend", L)), w && y.addEventListener(a, O ? B : W, O);
2319
+ const w = re(o.floating);
2320
+ c && (w.addEventListener("keydown", A ? j : $, A), w.addEventListener("compositionstart", k), w.addEventListener("compositionend", L)), y && w.addEventListener(a, O ? _ : W, O);
2302
2321
  let I = [];
2303
- return g && (_(o.domReference) && (I = we(o.domReference)), _(o.floating) && (I = I.concat(we(o.floating))), !_(o.reference) && o.reference && o.reference.contextElement && (I = I.concat(we(o.reference.contextElement)))), I = I.filter((N) => {
2322
+ return p && (B(o.domReference) && (I = ye(o.domReference)), B(o.floating) && (I = I.concat(ye(o.floating))), !B(o.reference) && o.reference && o.reference.contextElement && (I = I.concat(ye(o.reference.contextElement)))), I = I.filter((N) => {
2304
2323
  var ne;
2305
- return N !== ((ne = y.defaultView) == null ? void 0 : ne.visualViewport);
2324
+ return N !== ((ne = w.defaultView) == null ? void 0 : ne.visualViewport);
2306
2325
  }), I.forEach((N) => {
2307
2326
  N.addEventListener("scroll", E, {
2308
2327
  passive: !0
2309
2328
  });
2310
2329
  }), () => {
2311
- c && (y.removeEventListener("keydown", A ? j : $, A), y.removeEventListener("compositionstart", D), y.removeEventListener("compositionend", L)), w && y.removeEventListener(a, O ? B : W, O), I.forEach((N) => {
2330
+ c && (w.removeEventListener("keydown", A ? j : $, A), w.removeEventListener("compositionstart", k), w.removeEventListener("compositionend", L)), y && w.removeEventListener(a, O ? _ : W, O), I.forEach((N) => {
2312
2331
  N.removeEventListener("scroll", E);
2313
2332
  }), window.clearTimeout(R);
2314
2333
  };
2315
- }, [i, o, c, w, a, n, r, g, s, v, S, $, A, j, W, O, B]), p.useEffect(() => {
2334
+ }, [i, o, c, y, a, n, r, p, s, v, S, $, A, j, W, O, _]), g.useEffect(() => {
2316
2335
  i.current.insideReactTree = !1;
2317
- }, [i, w, a]);
2318
- const X = p.useMemo(() => ({
2336
+ }, [i, y, a]);
2337
+ const X = g.useMemo(() => ({
2319
2338
  onKeyDown: $,
2320
2339
  ...u && {
2321
- [Lo[d]]: (R) => {
2340
+ [Mo[d]]: (R) => {
2322
2341
  r(!1, R.nativeEvent, "reference-press");
2323
2342
  },
2324
2343
  ...d !== "click" && {
@@ -2327,73 +2346,74 @@ function Jo(e, t) {
2327
2346
  }
2328
2347
  }
2329
2348
  }
2330
- }), [$, r, u, d]), H = p.useMemo(() => ({
2331
- onKeyDown: $,
2332
- onMouseDown() {
2333
- b.current = !0;
2334
- },
2335
- onMouseUp() {
2336
- b.current = !0;
2337
- },
2338
- [No[a]]: () => {
2339
- i.current.insideReactTree = !0;
2349
+ }), [$, r, u, d]), H = g.useMemo(() => {
2350
+ function R(E) {
2351
+ E.button === 0 && (b.current = !0);
2340
2352
  }
2341
- }), [$, a, i]);
2342
- return p.useMemo(() => s ? {
2353
+ return {
2354
+ onKeyDown: $,
2355
+ onMouseDown: R,
2356
+ onMouseUp: R,
2357
+ [Po[a]]: () => {
2358
+ i.current.insideReactTree = !0;
2359
+ }
2360
+ };
2361
+ }, [$, a, i]);
2362
+ return g.useMemo(() => s ? {
2343
2363
  reference: X,
2344
2364
  floating: H
2345
2365
  } : {}, [s, X, H]);
2346
2366
  }
2347
- function $o(e) {
2367
+ function Do(e) {
2348
2368
  const {
2349
2369
  open: t = !1,
2350
2370
  onOpenChange: n,
2351
2371
  elements: r
2352
- } = e, o = Tt(), i = p.useRef({}), [s] = p.useState(() => wo()), c = Ln() != null;
2372
+ } = e, o = At(), i = g.useRef({}), [s] = g.useState(() => po()), c = _n() != null;
2353
2373
  if (process.env.NODE_ENV !== "production") {
2354
2374
  const f = r.reference;
2355
- f && !_(f) && vo("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2375
+ f && !B(f) && go("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2356
2376
  }
2357
- const [l, a] = p.useState(r.reference), u = ie((f, h, m) => {
2377
+ const [l, a] = g.useState(r.reference), u = ie((f, h, m) => {
2358
2378
  i.current.openEvent = f ? h : void 0, s.emit("openchange", {
2359
2379
  open: f,
2360
2380
  event: h,
2361
2381
  reason: m,
2362
2382
  nested: c
2363
2383
  }), n == null || n(f, h, m);
2364
- }), d = p.useMemo(() => ({
2384
+ }), d = g.useMemo(() => ({
2365
2385
  setPositionReference: a
2366
- }), []), g = p.useMemo(() => ({
2386
+ }), []), p = g.useMemo(() => ({
2367
2387
  reference: l || r.reference || null,
2368
2388
  floating: r.floating || null,
2369
2389
  domReference: r.reference
2370
2390
  }), [l, r.reference, r.floating]);
2371
- return p.useMemo(() => ({
2391
+ return g.useMemo(() => ({
2372
2392
  dataRef: i,
2373
2393
  open: t,
2374
2394
  onOpenChange: u,
2375
- elements: g,
2395
+ elements: p,
2376
2396
  events: s,
2377
2397
  floatingId: o,
2378
2398
  refs: d
2379
- }), [t, u, g, s, o, d]);
2399
+ }), [t, u, p, s, o, d]);
2380
2400
  }
2381
- function Qo(e) {
2401
+ function Yo(e) {
2382
2402
  e === void 0 && (e = {});
2383
2403
  const {
2384
2404
  nodeId: t
2385
- } = e, n = $o({
2405
+ } = e, n = Do({
2386
2406
  ...e,
2387
2407
  elements: {
2388
2408
  reference: null,
2389
2409
  floating: null,
2390
2410
  ...e.elements
2391
2411
  }
2392
- }), r = e.rootContext || n, o = r.elements, [i, s] = p.useState(null), [c, l] = p.useState(null), u = (o == null ? void 0 : o.domReference) || i, d = p.useRef(null), g = Ct();
2412
+ }), r = e.rootContext || n, o = r.elements, [i, s] = g.useState(null), [c, l] = g.useState(null), u = (o == null ? void 0 : o.domReference) || i, d = g.useRef(null), p = Ot();
2393
2413
  Z(() => {
2394
2414
  u && (d.current = u);
2395
2415
  }, [u]);
2396
- const f = fo({
2416
+ const f = co({
2397
2417
  ...e,
2398
2418
  elements: {
2399
2419
  ...o,
@@ -2401,51 +2421,51 @@ function Qo(e) {
2401
2421
  reference: c
2402
2422
  }
2403
2423
  }
2404
- }), h = p.useCallback((v) => {
2405
- const S = _(v) ? {
2424
+ }), h = g.useCallback((v) => {
2425
+ const S = B(v) ? {
2406
2426
  getBoundingClientRect: () => v.getBoundingClientRect(),
2407
2427
  getClientRects: () => v.getClientRects(),
2408
2428
  contextElement: v
2409
2429
  } : v;
2410
2430
  l(S), f.refs.setReference(S);
2411
- }, [f.refs]), m = p.useCallback((v) => {
2412
- (_(v) || v === null) && (d.current = v, s(v)), (_(f.refs.reference.current) || f.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2431
+ }, [f.refs]), m = g.useCallback((v) => {
2432
+ (B(v) || v === null) && (d.current = v, s(v)), (B(f.refs.reference.current) || f.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2413
2433
  // `null` to support `positionReference` + an unstable `reference`
2414
2434
  // callback ref.
2415
- v !== null && !_(v)) && f.refs.setReference(v);
2416
- }, [f.refs]), x = p.useMemo(() => ({
2435
+ v !== null && !B(v)) && f.refs.setReference(v);
2436
+ }, [f.refs]), x = g.useMemo(() => ({
2417
2437
  ...f.refs,
2418
2438
  setReference: m,
2419
2439
  setPositionReference: h,
2420
2440
  domReference: d
2421
- }), [f.refs, m, h]), w = p.useMemo(() => ({
2441
+ }), [f.refs, m, h]), y = g.useMemo(() => ({
2422
2442
  ...f.elements,
2423
2443
  domReference: u
2424
- }), [f.elements, u]), b = p.useMemo(() => ({
2444
+ }), [f.elements, u]), b = g.useMemo(() => ({
2425
2445
  ...f,
2426
2446
  ...r,
2427
2447
  refs: x,
2428
- elements: w,
2448
+ elements: y,
2429
2449
  nodeId: t
2430
- }), [f, x, w, t, r]);
2450
+ }), [f, x, y, t, r]);
2431
2451
  return Z(() => {
2432
2452
  r.dataRef.current.floatingContext = b;
2433
- const v = g == null ? void 0 : g.nodesRef.current.find((S) => S.id === t);
2453
+ const v = p == null ? void 0 : p.nodesRef.current.find((S) => S.id === t);
2434
2454
  v && (v.context = b);
2435
- }), p.useMemo(() => ({
2455
+ }), g.useMemo(() => ({
2436
2456
  ...f,
2437
2457
  context: b,
2438
2458
  refs: x,
2439
- elements: w
2440
- }), [f, x, w, b]);
2459
+ elements: y
2460
+ }), [f, x, y, b]);
2441
2461
  }
2442
- function mt(e, t, n) {
2462
+ function ht(e, t, n) {
2443
2463
  const r = /* @__PURE__ */ new Map(), o = n === "item";
2444
2464
  let i = e;
2445
2465
  if (o && e) {
2446
2466
  const {
2447
- [qt]: s,
2448
- [jt]: c,
2467
+ [Ut]: s,
2468
+ [Xt]: c,
2449
2469
  ...l
2450
2470
  } = e;
2451
2471
  i = l;
@@ -2453,7 +2473,7 @@ function mt(e, t, n) {
2453
2473
  return {
2454
2474
  ...n === "floating" && {
2455
2475
  tabIndex: -1,
2456
- [mo]: ""
2476
+ [lo]: ""
2457
2477
  },
2458
2478
  ...i,
2459
2479
  ...t.map((s) => {
@@ -2461,14 +2481,14 @@ function mt(e, t, n) {
2461
2481
  return typeof c == "function" ? e ? c(e) : null : c;
2462
2482
  }).concat(e).reduce((s, c) => (c && Object.entries(c).forEach((l) => {
2463
2483
  let [a, u] = l;
2464
- if (!(o && [qt, jt].includes(a)))
2484
+ if (!(o && [Ut, Xt].includes(a)))
2465
2485
  if (a.indexOf("on") === 0) {
2466
2486
  if (r.has(a) || r.set(a, []), typeof u == "function") {
2467
2487
  var d;
2468
2488
  (d = r.get(a)) == null || d.push(u), s[a] = function() {
2469
- for (var g, f = arguments.length, h = new Array(f), m = 0; m < f; m++)
2489
+ for (var p, f = arguments.length, h = new Array(f), m = 0; m < f; m++)
2470
2490
  h[m] = arguments[m];
2471
- return (g = r.get(a)) == null ? void 0 : g.map((x) => x(...h)).find((x) => x !== void 0);
2491
+ return (p = r.get(a)) == null ? void 0 : p.map((x) => x(...h)).find((x) => x !== void 0);
2472
2492
  };
2473
2493
  }
2474
2494
  } else
@@ -2476,29 +2496,29 @@ function mt(e, t, n) {
2476
2496
  }), s), {})
2477
2497
  };
2478
2498
  }
2479
- function ei(e) {
2499
+ function zo(e) {
2480
2500
  e === void 0 && (e = []);
2481
- const t = e.map((c) => c == null ? void 0 : c.reference), n = e.map((c) => c == null ? void 0 : c.floating), r = e.map((c) => c == null ? void 0 : c.item), o = p.useCallback(
2482
- (c) => mt(c, e, "reference"),
2501
+ const t = e.map((c) => c == null ? void 0 : c.reference), n = e.map((c) => c == null ? void 0 : c.floating), r = e.map((c) => c == null ? void 0 : c.item), o = g.useCallback(
2502
+ (c) => ht(c, e, "reference"),
2483
2503
  // eslint-disable-next-line react-hooks/exhaustive-deps
2484
2504
  t
2485
- ), i = p.useCallback(
2486
- (c) => mt(c, e, "floating"),
2505
+ ), i = g.useCallback(
2506
+ (c) => ht(c, e, "floating"),
2487
2507
  // eslint-disable-next-line react-hooks/exhaustive-deps
2488
2508
  n
2489
- ), s = p.useCallback(
2490
- (c) => mt(c, e, "item"),
2509
+ ), s = g.useCallback(
2510
+ (c) => ht(c, e, "item"),
2491
2511
  // eslint-disable-next-line react-hooks/exhaustive-deps
2492
2512
  r
2493
2513
  );
2494
- return p.useMemo(() => ({
2514
+ return g.useMemo(() => ({
2495
2515
  getReferenceProps: o,
2496
2516
  getFloatingProps: i,
2497
2517
  getItemProps: s
2498
2518
  }), [o, i, s]);
2499
2519
  }
2500
- const Bo = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
2501
- function ti(e, t) {
2520
+ const ko = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
2521
+ function Go(e, t) {
2502
2522
  var n, r;
2503
2523
  t === void 0 && (t = {});
2504
2524
  const {
@@ -2508,22 +2528,22 @@ function ti(e, t) {
2508
2528
  } = e, {
2509
2529
  enabled: c = !0,
2510
2530
  role: l = "dialog"
2511
- } = t, a = Tt(), u = ((n = i.domReference) == null ? void 0 : n.id) || a, d = p.useMemo(() => {
2531
+ } = t, a = At(), u = ((n = i.domReference) == null ? void 0 : n.id) || a, d = g.useMemo(() => {
2512
2532
  var b;
2513
- return ((b = yt(i.floating)) == null ? void 0 : b.id) || s;
2514
- }, [i.floating, s]), g = (r = Bo.get(l)) != null ? r : l, h = Ln() != null, m = p.useMemo(() => g === "tooltip" || l === "label" ? {
2533
+ return ((b = Rt(i.floating)) == null ? void 0 : b.id) || s;
2534
+ }, [i.floating, s]), p = (r = ko.get(l)) != null ? r : l, h = _n() != null, m = g.useMemo(() => p === "tooltip" || l === "label" ? {
2515
2535
  ["aria-" + (l === "label" ? "labelledby" : "describedby")]: o ? d : void 0
2516
2536
  } : {
2517
2537
  "aria-expanded": o ? "true" : "false",
2518
- "aria-haspopup": g === "alertdialog" ? "dialog" : g,
2538
+ "aria-haspopup": p === "alertdialog" ? "dialog" : p,
2519
2539
  "aria-controls": o ? d : void 0,
2520
- ...g === "listbox" && {
2540
+ ...p === "listbox" && {
2521
2541
  role: "combobox"
2522
2542
  },
2523
- ...g === "menu" && {
2543
+ ...p === "menu" && {
2524
2544
  id: u
2525
2545
  },
2526
- ...g === "menu" && h && {
2546
+ ...p === "menu" && h && {
2527
2547
  role: "menuitem"
2528
2548
  },
2529
2549
  ...l === "select" && {
@@ -2532,20 +2552,20 @@ function ti(e, t) {
2532
2552
  ...l === "combobox" && {
2533
2553
  "aria-autocomplete": "list"
2534
2554
  }
2535
- }, [g, d, h, o, u, l]), x = p.useMemo(() => {
2555
+ }, [p, d, h, o, u, l]), x = g.useMemo(() => {
2536
2556
  const b = {
2537
2557
  id: d,
2538
- ...g && {
2539
- role: g
2558
+ ...p && {
2559
+ role: p
2540
2560
  }
2541
2561
  };
2542
- return g === "tooltip" || l === "label" ? b : {
2562
+ return p === "tooltip" || l === "label" ? b : {
2543
2563
  ...b,
2544
- ...g === "menu" && {
2564
+ ...p === "menu" && {
2545
2565
  "aria-labelledby": u
2546
2566
  }
2547
2567
  };
2548
- }, [g, d, u, l]), w = p.useCallback((b) => {
2568
+ }, [p, d, u, l]), y = g.useCallback((b) => {
2549
2569
  let {
2550
2570
  active: v,
2551
2571
  selected: S
@@ -2566,34 +2586,34 @@ function ti(e, t) {
2566
2586
  }
2567
2587
  return {};
2568
2588
  }, [d, l]);
2569
- return p.useMemo(() => c ? {
2589
+ return g.useMemo(() => c ? {
2570
2590
  reference: m,
2571
2591
  floating: x,
2572
- item: w
2573
- } : {}, [c, m, x, w]);
2592
+ item: y
2593
+ } : {}, [c, m, x, y]);
2574
2594
  }
2575
2595
  export {
2576
- Yo as F,
2577
- Zo as a,
2578
- Jo as b,
2579
- ti as c,
2580
- ei as d,
2581
- Tt as e,
2582
- Xo as f,
2583
- Go as g,
2584
- zo as h,
2585
- fo as i,
2586
- _ as j,
2587
- Le as k,
2588
- Ho as l,
2596
+ Ko as F,
2597
+ Uo as a,
2598
+ Xo as b,
2599
+ Go as c,
2600
+ zo as d,
2601
+ At as e,
2602
+ Ho as f,
2603
+ jo as g,
2604
+ qo as h,
2605
+ co as i,
2606
+ B as j,
2607
+ Ne as k,
2608
+ $o as l,
2589
2609
  G as m,
2590
2610
  Pe as n,
2591
- Ko as o,
2592
- jo as p,
2593
- Uo as q,
2594
- je as r,
2595
- qo as s,
2596
- Vo as t,
2597
- Qo as u
2611
+ _o as o,
2612
+ Bo as p,
2613
+ Vo as q,
2614
+ Xe as r,
2615
+ Wo as s,
2616
+ No as t,
2617
+ Yo as u
2598
2618
  };
2599
- //# sourceMappingURL=floating-ui.react-BBJf3vGf.js.map
2619
+ //# sourceMappingURL=floating-ui.react-Co7v2aHO.js.map