@iress-oss/ids-components 5.14.1 → 5.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/dist/{AutocompleteNoResults-BJwn3Csz.js → AutocompleteNoResults-CvhIxKQI.js} +1 -1
  2. package/dist/{ComboboxHiddenInput-Dgwi3tti.js → ComboboxHiddenInput-B7ztqo0l.js} +5 -5
  3. package/dist/{FieldAppendToLabel-DOal1Jmq.js → FieldAppendToLabel-DgXoSKDG.js} +6 -5
  4. package/dist/{InputBase-DevBiqf2.js → InputBase-nWIFJcGj.js} +1 -1
  5. package/dist/Loading.module-Bs6DSfb4.js +13 -0
  6. package/dist/LoadingSuspense-BdXYIsHy.js +5723 -0
  7. package/dist/LogoFromSrc-CtJE0Fsr.js +59 -0
  8. package/dist/MenuItem.module-Bj20OWCC.js +24 -0
  9. package/dist/Popover.module-DJ-RK5B3.js +11 -0
  10. package/dist/{SelectControl-CrSaqFGs.js → SelectControl-CYKkf3rM.js} +1 -1
  11. package/dist/{SliderTicks-C2tiJ8Jz.js → SliderTicks-Dqz-k-xS.js} +1 -1
  12. package/dist/TabSet.module-Cu1itlcf.js +13 -0
  13. package/dist/Table.module-Bb7fJIr8.js +32 -0
  14. package/dist/components/Alert/Alert.js +1 -1
  15. package/dist/components/Alert/index.js +1 -1
  16. package/dist/components/Autocomplete/Autocomplete.js +5 -4
  17. package/dist/components/Autocomplete/components/AutocompleteNoResults.js +1 -1
  18. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +84 -82
  19. package/dist/components/Autocomplete/index.js +1 -1
  20. package/dist/components/Badge/Badge.js +4 -4
  21. package/dist/components/Button/Button.js +2 -2
  22. package/dist/components/Button/CloseButton/CloseButton.js +1 -1
  23. package/dist/components/Button/index.js +1 -1
  24. package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
  25. package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +1 -1
  26. package/dist/components/ButtonGroup/index.js +1 -1
  27. package/dist/components/Checkbox/Checkbox.js +1 -1
  28. package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +1 -1
  29. package/dist/components/Checkbox/index.js +1 -1
  30. package/dist/components/CheckboxGroup/CheckboxGroup.js +6 -6
  31. package/dist/components/CheckboxMark/CheckboxMark.types.js +2 -2
  32. package/dist/components/Combobox/Combobox.js +5 -4
  33. package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +5 -4
  34. package/dist/components/Combobox/components/ComboboxHiddenInput.js +1 -1
  35. package/dist/components/Combobox/components/ComboboxResults.js +5 -4
  36. package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +4 -3
  37. package/dist/components/Combobox/index.js +1 -1
  38. package/dist/components/Expander/Expander.js +1 -1
  39. package/dist/components/Field/Field.js +1 -1
  40. package/dist/components/Field/FieldGroup/FieldGroup.js +2 -2
  41. package/dist/components/Field/components/FieldAppendToLabel.js +5 -4
  42. package/dist/components/Filter/Filter.js +5 -4
  43. package/dist/components/Filter/components/FilterResetButton.js +4 -3
  44. package/dist/components/Filter/components/FilterSearch.js +4 -3
  45. package/dist/components/Filter/index.js +1 -1
  46. package/dist/components/Form/Form.js +1 -1
  47. package/dist/components/Form/FormField/FormField.js +9 -8
  48. package/dist/components/Form/FormField/FormFieldset.js +5 -4
  49. package/dist/components/Form/HookForm/HookForm.js +1 -1
  50. package/dist/components/Form/index.js +1 -1
  51. package/dist/components/Hide/Hide.js +1 -1
  52. package/dist/components/Hide/helpers/composeHideClasses.js +5 -4
  53. package/dist/components/Hide/index.js +1 -1
  54. package/dist/components/Icon/Icon.js +4 -3
  55. package/dist/components/Icon/index.js +1 -1
  56. package/dist/components/Inline/Inline.js +4 -3
  57. package/dist/components/Inline/index.js +1 -1
  58. package/dist/components/Input/ClearButton/ClearButton.js +1 -1
  59. package/dist/components/Input/Input.js +2 -2
  60. package/dist/components/Input/InputBase/InputBase.js +1 -1
  61. package/dist/components/Input/index.js +1 -1
  62. package/dist/components/InputCurrency/InputCurrency.js +1 -1
  63. package/dist/components/InputCurrency/index.js +1 -1
  64. package/dist/components/Label/LabelBase/LabelBase.js +1 -1
  65. package/dist/components/Menu/Menu.js +1 -1
  66. package/dist/components/Menu/MenuDivider/MenuDivider.js +4 -3
  67. package/dist/components/Menu/MenuHeading/MenuHeading.js +2 -2
  68. package/dist/components/Menu/MenuItem/MenuItem.js +1 -1
  69. package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +1 -1
  70. package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +2 -2
  71. package/dist/components/Menu/MenuText/MenuText.js +5 -4
  72. package/dist/components/Menu/helpers/mapMenuItems.js +1 -1
  73. package/dist/components/Menu/hooks/useMenuStyles.js +3 -3
  74. package/dist/components/Menu/index.js +1 -1
  75. package/dist/components/Modal/Modal.js +2 -2
  76. package/dist/components/Modal/index.js +1 -1
  77. package/dist/components/Navbar/Navbar.js +2 -2
  78. package/dist/components/Navbar/components/HomeLinkContent.js +2 -2
  79. package/dist/components/Navbar/components/LogoFromSrc.js +1 -1
  80. package/dist/components/Navbar/components/NavbarLogo.js +2 -2
  81. package/dist/components/Navbar/index.js +1 -1
  82. package/dist/components/Placeholder/Placeholder.js +1 -1
  83. package/dist/components/Popover/InputPopover/InputPopover.js +1 -1
  84. package/dist/components/Popover/InputPopover/InputPopoverActivator.js +1 -1
  85. package/dist/components/Popover/InputPopover/InputPopoverProvider.js +1 -1
  86. package/dist/components/Popover/Popover.js +1 -1
  87. package/dist/components/Popover/PopoverProvider.js +1 -1
  88. package/dist/components/Popover/components/NestedPopoverActivator.js +1 -1
  89. package/dist/components/Popover/components/PopoverActivator.js +1 -1
  90. package/dist/components/Popover/components/PopoverContent.js +2 -2
  91. package/dist/components/Popover/helpers/handlePopoverTabKey.js +1 -1
  92. package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
  93. package/dist/components/Popover/hooks/usePopoverNavigation.js +1 -1
  94. package/dist/components/Progress/Progress.js +1 -1
  95. package/dist/components/Provider/Provider.js +38 -0
  96. package/dist/components/Provider/index.js +4 -0
  97. package/dist/components/Radio/Radio.js +1 -1
  98. package/dist/components/Radio/helpers/mapRadioGroupOptions.js +1 -1
  99. package/dist/components/Radio/index.js +1 -1
  100. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  101. package/dist/components/Readonly/Readonly.js +5 -4
  102. package/dist/components/Readonly/index.js +1 -1
  103. package/dist/components/RichSelect/RichSelect.js +4 -3
  104. package/dist/components/RichSelect/SelectBody/SelectBody.js +5 -4
  105. package/dist/components/RichSelect/SelectCreate/SelectCreate.js +9 -8
  106. package/dist/components/RichSelect/SelectHeading/SelectHeading.js +4 -3
  107. package/dist/components/RichSelect/SelectLabel/SelectLabel.js +1 -1
  108. package/dist/components/RichSelect/SelectMenu/SelectMenu.js +4 -3
  109. package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +4 -3
  110. package/dist/components/RichSelect/SelectSearch/SelectSearch.js +4 -3
  111. package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +1 -1
  112. package/dist/components/RichSelect/SelectTags/SelectTags.js +4 -3
  113. package/dist/components/RichSelect/components/SelectActivator.js +1 -1
  114. package/dist/components/RichSelect/components/SelectOptions.js +4 -3
  115. package/dist/components/RichSelect/index.js +1 -1
  116. package/dist/components/Row/Row.js +4 -3
  117. package/dist/components/Row/index.js +1 -1
  118. package/dist/components/Select/Select.js +2 -2
  119. package/dist/components/Select/components/SelectControl.js +1 -1
  120. package/dist/components/Select/components/SelectReadonly.js +4 -3
  121. package/dist/components/Select/helpers/mapSelectOptions.js +1 -1
  122. package/dist/components/Select/helpers/nodesToSelectOptions.js +3 -3
  123. package/dist/components/Select/index.js +1 -1
  124. package/dist/components/Skeleton/Skeleton.js +2 -2
  125. package/dist/components/SkipLink/SkipLink.js +1 -1
  126. package/dist/components/Slideout/Slideout.js +2 -2
  127. package/dist/components/Slideout/components/SlideoutInner.js +1 -1
  128. package/dist/components/Slideout/index.js +1 -1
  129. package/dist/components/Slider/Slider.js +2 -2
  130. package/dist/components/Slider/components/SliderTicks.js +1 -1
  131. package/dist/components/Slider/index.js +1 -1
  132. package/dist/components/Spinner/Spinner.js +1 -1
  133. package/dist/components/Spinner/index.js +1 -1
  134. package/dist/components/TabSet/Tab/Tab.js +1 -1
  135. package/dist/components/TabSet/TabSet.js +2 -2
  136. package/dist/components/TabSet/components/TabSetItem.js +2 -2
  137. package/dist/components/Table/Table.js +2 -2
  138. package/dist/components/Table/TableBody/TableBody.js +15 -15
  139. package/dist/components/Table/components/TableEmpty.js +1 -1
  140. package/dist/components/Table/components/TableHeader.js +1 -1
  141. package/dist/components/Table/components/TableHeaderCell.js +1 -1
  142. package/dist/components/Table/components/TableSortButton.js +3 -3
  143. package/dist/components/Table/hooks/useIDSTableColumnStyles.js +1 -1
  144. package/dist/components/Table/index.js +1 -1
  145. package/dist/components/Tag/Tag.js +1 -1
  146. package/dist/components/Tag/TagInput/TagInput.js +1 -1
  147. package/dist/components/Tag/components/TagListInput/TagListInput.js +1 -1
  148. package/dist/components/Tag/index.js +1 -1
  149. package/dist/components/Toaster/Toast/Toast.js +1 -1
  150. package/dist/components/Toaster/Toast/ToastAnimated.js +2 -2
  151. package/dist/components/Toaster/Toast/ToastIcon.js +1 -1
  152. package/dist/components/Toaster/Toaster.js +2 -2
  153. package/dist/components/Toaster/ToasterProvider.js +1 -1
  154. package/dist/components/Toaster/hooks/useToaster.js +24 -3
  155. package/dist/components/Toaster/index.js +11 -10
  156. package/dist/components/Toggle/Toggle.js +3 -3
  157. package/dist/components/Tooltip/Tooltip.js +2 -2
  158. package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +1 -1
  159. package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +1 -1
  160. package/dist/constants.js +11 -11
  161. package/dist/{floating-ui.react-RKRjRgyj.js → floating-ui.react-SmaXvp4L.js} +771 -755
  162. package/dist/main.js +287 -284
  163. package/dist/patterns/Loading/Loading.js +1 -1
  164. package/dist/patterns/Loading/LoadingSuspense.js +1 -1
  165. package/dist/patterns/Loading/components/ComponentLoading.js +2 -2
  166. package/dist/patterns/Loading/components/DefaultLoading.js +3 -3
  167. package/dist/patterns/Loading/components/LongLoading.js +2 -2
  168. package/dist/patterns/Loading/components/PageLoading.js +3 -3
  169. package/dist/patterns/Loading/components/StartUpLoading.js +2 -2
  170. package/dist/patterns/Loading/components/ValidateLoading.js +2 -2
  171. package/dist/patterns/Loading/index.js +1 -1
  172. package/dist/src/components/Form/Form.types.d.ts +10 -1
  173. package/dist/src/components/Provider/Provider.d.ts +20 -0
  174. package/dist/src/components/Provider/index.d.ts +1 -0
  175. package/dist/src/components/Toaster/Toast/Toast.types.d.ts +2 -1
  176. package/dist/src/components/Toaster/ToasterProvider.d.ts +5 -2
  177. package/dist/src/components/Toaster/hooks/useToaster.d.ts +3 -3
  178. package/dist/src/constants.d.ts +7 -7
  179. package/dist/src/main.d.ts +1 -0
  180. package/dist/src/patterns/Loading/components/PageLoading.d.ts +3 -3
  181. package/dist/style.css +1 -1
  182. package/dist/{useIDSButtonGroupItem-DWuujtfY.js → useIDSButtonGroupItem-CniAJ9N5.js} +1 -1
  183. package/dist/vite.config.d.ts +1 -1
  184. package/package.json +6 -4
  185. package/dist/Loading.module-CC_6gnKJ.js +0 -13
  186. package/dist/LoadingSuspense-COCIFlsi.js +0 -5692
  187. package/dist/LogoFromSrc-0jeEBge9.js +0 -59
  188. package/dist/MenuItem.module-mlKiHW50.js +0 -24
  189. package/dist/Popover.module-BVX_vz5-.js +0 -11
  190. package/dist/TabSet.module-BdTRhXdV.js +0 -13
  191. package/dist/Table.module-Dax40UyV.js +0 -32
@@ -1,19 +1,19 @@
1
1
  import * as f from "react";
2
- import { useLayoutEffect as Wn, useEffect as $n } from "react";
2
+ import { useLayoutEffect as $n } from "react";
3
3
  import { t as At, i as Bn, f as Or } from "./index.esm-BnSuefUA.js";
4
4
  import { jsx as ge, jsxs as Hn, Fragment as Ar } from "react/jsx-runtime";
5
5
  import * as tn from "react-dom";
6
6
  function Mt() {
7
7
  return typeof window < "u";
8
8
  }
9
- function _e(e) {
9
+ function Ke(e) {
10
10
  return zn(e) ? (e.nodeName || "").toLowerCase() : "#document";
11
11
  }
12
12
  function he(e) {
13
13
  var t;
14
14
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
15
15
  }
16
- function Te(e) {
16
+ function Oe(e) {
17
17
  var t;
18
18
  return (t = (zn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
19
19
  }
@@ -23,7 +23,7 @@ function zn(e) {
23
23
  function Y(e) {
24
24
  return Mt() ? e instanceof Element || e instanceof he(e).Element : !1;
25
25
  }
26
- function oe(e) {
26
+ function re(e) {
27
27
  return Mt() ? e instanceof HTMLElement || e instanceof he(e).HTMLElement : !1;
28
28
  }
29
29
  function Xt(e) {
@@ -39,9 +39,9 @@ function ut(e) {
39
39
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
40
40
  }
41
41
  function Mr(e) {
42
- return ["table", "td", "th"].includes(_e(e));
42
+ return ["table", "td", "th"].includes(Ke(e));
43
43
  }
44
- function Pt(e) {
44
+ function St(e) {
45
45
  return [":popover-open", ":modal"].some((t) => {
46
46
  try {
47
47
  return e.matches(t);
@@ -51,25 +51,25 @@ function Pt(e) {
51
51
  });
52
52
  }
53
53
  function nn(e) {
54
- const t = St(), n = Y(e) ? we(e) : e;
54
+ const t = Pt(), n = Y(e) ? we(e) : e;
55
55
  return ["transform", "translate", "scale", "rotate", "perspective"].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) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
56
56
  }
57
- function Pr(e) {
58
- let t = Pe(e);
59
- for (; oe(t) && !Me(t); ) {
57
+ function Sr(e) {
58
+ let t = ke(e);
59
+ for (; re(t) && !De(t); ) {
60
60
  if (nn(t))
61
61
  return t;
62
- if (Pt(t))
62
+ if (St(t))
63
63
  return null;
64
- t = Pe(t);
64
+ t = ke(t);
65
65
  }
66
66
  return null;
67
67
  }
68
- function St() {
68
+ function Pt() {
69
69
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
70
70
  }
71
- function Me(e) {
72
- return ["html", "body", "#document"].includes(_e(e));
71
+ function De(e) {
72
+ return ["html", "body", "#document"].includes(Ke(e));
73
73
  }
74
74
  function we(e) {
75
75
  return he(e).getComputedStyle(e);
@@ -83,36 +83,36 @@ function Dt(e) {
83
83
  scrollTop: e.scrollY
84
84
  };
85
85
  }
86
- function Pe(e) {
87
- if (_e(e) === "html")
86
+ function ke(e) {
87
+ if (Ke(e) === "html")
88
88
  return e;
89
89
  const t = (
90
90
  // Step into the shadow DOM of the parent of a slotted node.
91
91
  e.assignedSlot || // DOM Element detected.
92
92
  e.parentNode || // ShadowRoot detected.
93
93
  Xt(e) && e.host || // Fallback.
94
- Te(e)
94
+ Oe(e)
95
95
  );
96
96
  return Xt(t) ? t.host : t;
97
97
  }
98
98
  function Un(e) {
99
- const t = Pe(e);
100
- return Me(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : oe(t) && ut(t) ? t : Un(t);
99
+ const t = ke(e);
100
+ return De(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : re(t) && ut(t) ? t : Un(t);
101
101
  }
102
- function ke(e, t, n) {
102
+ function Fe(e, t, n) {
103
103
  var r;
104
104
  t === void 0 && (t = []), n === void 0 && (n = !0);
105
105
  const o = Un(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = he(o);
106
106
  if (s) {
107
107
  const c = Jt(i);
108
- return t.concat(i, i.visualViewport || [], ut(o) ? o : [], c && n ? ke(c) : []);
108
+ return t.concat(i, i.visualViewport || [], ut(o) ? o : [], c && n ? Fe(c) : []);
109
109
  }
110
- return t.concat(o, ke(o, [], n));
110
+ return t.concat(o, Fe(o, [], n));
111
111
  }
112
112
  function Jt(e) {
113
113
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
114
114
  }
115
- const Sr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @__PURE__ */ Sr.reduce((e, t) => e.concat(t, t + "-" + dn[0], t + "-" + dn[1]), []), Je = Math.min, be = Math.max, wt = Math.round, je = Math.floor, Ee = (e) => ({
115
+ const Pr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @__PURE__ */ Pr.reduce((e, t) => e.concat(t, t + "-" + dn[0], t + "-" + dn[1]), []), Qe = Math.min, be = Math.max, wt = Math.round, je = Math.floor, Ce = (e) => ({
116
116
  x: e,
117
117
  y: e
118
118
  }), Dr = {
@@ -125,12 +125,12 @@ const Sr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @_
125
125
  end: "start"
126
126
  };
127
127
  function pn(e, t, n) {
128
- return be(e, Je(t, n));
128
+ return be(e, Qe(t, n));
129
129
  }
130
- function Qe(e, t) {
130
+ function Ze(e, t) {
131
131
  return typeof e == "function" ? e(t) : e;
132
132
  }
133
- function Ce(e) {
133
+ function Te(e) {
134
134
  return e.split("-")[0];
135
135
  }
136
136
  function Ie(e) {
@@ -142,11 +142,11 @@ function Gn(e) {
142
142
  function jn(e) {
143
143
  return e === "y" ? "height" : "width";
144
144
  }
145
- function He(e) {
146
- return ["top", "bottom"].includes(Ce(e)) ? "y" : "x";
145
+ function Pe(e) {
146
+ return ["top", "bottom"].includes(Te(e)) ? "y" : "x";
147
147
  }
148
148
  function qn(e) {
149
- return Gn(He(e));
149
+ return Gn(Pe(e));
150
150
  }
151
151
  function Yn(e, t, n) {
152
152
  n === void 0 && (n = !1);
@@ -176,7 +176,7 @@ function Fr(e, t, n) {
176
176
  }
177
177
  function Nr(e, t, n, r) {
178
178
  const o = Ie(e);
179
- let s = Fr(Ce(e), n === "start", r);
179
+ let s = Fr(Te(e), n === "start", r);
180
180
  return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(Rt)))), s;
181
181
  }
182
182
  function Et(e) {
@@ -191,7 +191,7 @@ function _r(e) {
191
191
  ...e
192
192
  };
193
193
  }
194
- function Kr(e) {
194
+ function Wr(e) {
195
195
  return typeof e != "number" ? _r(e) : {
196
196
  top: e,
197
197
  right: e,
@@ -199,7 +199,7 @@ function Kr(e) {
199
199
  left: e
200
200
  };
201
201
  }
202
- function It(e) {
202
+ function Ct(e) {
203
203
  const {
204
204
  x: t,
205
205
  y: n,
@@ -238,14 +238,14 @@ function Qt() {
238
238
  const e = /android/i;
239
239
  return e.test(rn()) || e.test(Xn());
240
240
  }
241
- function Vr() {
241
+ function Kr() {
242
242
  return rn().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
243
243
  }
244
244
  function Qn() {
245
245
  return Xn().includes("jsdom/");
246
246
  }
247
- const gn = "data-floating-ui-focusable", Wr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", _t = "ArrowLeft", Kt = "ArrowRight", $r = "ArrowUp", Br = "ArrowDown";
248
- function Re(e) {
247
+ const gn = "data-floating-ui-focusable", Vr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", _t = "ArrowLeft", Wt = "ArrowRight", $r = "ArrowUp", Br = "ArrowDown";
248
+ function Ee(e) {
249
249
  let t = e.activeElement;
250
250
  for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
251
251
  var n;
@@ -253,7 +253,7 @@ function Re(e) {
253
253
  }
254
254
  return t;
255
255
  }
256
- function ue(e, t) {
256
+ function ce(e, t) {
257
257
  if (!e || !t)
258
258
  return !1;
259
259
  const n = t.getRootNode == null ? void 0 : t.getRootNode();
@@ -269,10 +269,10 @@ function ue(e, t) {
269
269
  }
270
270
  return !1;
271
271
  }
272
- function De(e) {
272
+ function Se(e) {
273
273
  return "composedPath" in e ? e.composedPath()[0] : e.target;
274
274
  }
275
- function Vt(e, t) {
275
+ function Kt(e, t) {
276
276
  if (t == null)
277
277
  return !1;
278
278
  if ("composedPath" in e)
@@ -283,11 +283,11 @@ function Vt(e, t) {
283
283
  function Hr(e) {
284
284
  return e.matches("html,body");
285
285
  }
286
- function ae(e) {
286
+ function le(e) {
287
287
  return (e == null ? void 0 : e.ownerDocument) || document;
288
288
  }
289
289
  function on(e) {
290
- return oe(e) && e.matches(Wr);
290
+ return re(e) && e.matches(Vr);
291
291
  }
292
292
  function Zt(e) {
293
293
  return e ? e.getAttribute("role") === "combobox" && on(e) : !1;
@@ -300,7 +300,7 @@ function zr(e) {
300
300
  return !0;
301
301
  }
302
302
  }
303
- function Ct(e) {
303
+ function It(e) {
304
304
  return e ? e.hasAttribute(gn) ? e : e.querySelector("[" + gn + "]") || e : null;
305
305
  }
306
306
  function qe(e, t) {
@@ -353,8 +353,9 @@ function it(e, t) {
353
353
  const n = ["mouse", "pen"];
354
354
  return t || n.push("", void 0), n.includes(e);
355
355
  }
356
- var X = typeof document < "u" ? Wn : $n;
357
- const jr = {
356
+ var jr = typeof document < "u", qr = function() {
357
+ }, X = jr ? $n : qr;
358
+ const Yr = {
358
359
  ...f
359
360
  };
360
361
  function xe(e) {
@@ -363,13 +364,13 @@ function xe(e) {
363
364
  t.current = e;
364
365
  }), t;
365
366
  }
366
- const qr = jr.useInsertionEffect, Yr = qr || ((e) => e());
367
- function ce(e) {
367
+ const Xr = Yr.useInsertionEffect, Jr = Xr || ((e) => e());
368
+ function se(e) {
368
369
  const t = f.useRef(() => {
369
370
  if (process.env.NODE_ENV !== "production")
370
371
  throw new Error("Cannot call an event handler while rendering.");
371
372
  });
372
- return Yr(() => {
373
+ return Jr(() => {
373
374
  t.current = e;
374
375
  }), f.useCallback(function() {
375
376
  for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
@@ -384,18 +385,18 @@ function Ye(e, t) {
384
385
  return t < 0 || t >= e.current.length;
385
386
  }
386
387
  function yt(e, t) {
387
- return le(e, {
388
+ return ue(e, {
388
389
  disabledIndices: t
389
390
  });
390
391
  }
391
392
  function en(e, t) {
392
- return le(e, {
393
+ return ue(e, {
393
394
  decrement: !0,
394
395
  startingIndex: e.current.length,
395
396
  disabledIndices: t
396
397
  });
397
398
  }
398
- function le(e, t) {
399
+ function ue(e, t) {
399
400
  let {
400
401
  startingIndex: n = -1,
401
402
  decrement: r = !1,
@@ -404,7 +405,7 @@ function le(e, t) {
404
405
  } = t === void 0 ? {} : t, i = n;
405
406
  do
406
407
  i += r ? -s : s;
407
- while (i >= 0 && i <= e.current.length - 1 && Be(e, i, o));
408
+ while (i >= 0 && i <= e.current.length - 1 && ze(e, i, o));
408
409
  return i;
409
410
  }
410
411
  function tr(e, t) {
@@ -423,7 +424,7 @@ function tr(e, t) {
423
424
  if (n.key === $r) {
424
425
  if (p && pe(n), l === -1)
425
426
  g = u;
426
- else if (g = le(e, {
427
+ else if (g = ue(e, {
427
428
  startingIndex: g,
428
429
  amount: i,
429
430
  decrement: !0,
@@ -434,40 +435,40 @@ function tr(e, t) {
434
435
  }
435
436
  Ye(e, g) && (g = l);
436
437
  }
437
- if (n.key === Br && (p && pe(n), l === -1 ? g = a : (g = le(e, {
438
+ if (n.key === Br && (p && pe(n), l === -1 ? g = a : (g = ue(e, {
438
439
  startingIndex: l,
439
440
  amount: i,
440
441
  disabledIndices: c
441
- }), o && l + i > u && (g = le(e, {
442
+ }), o && l + i > u && (g = ue(e, {
442
443
  startingIndex: l % i - i,
443
444
  amount: i,
444
445
  disabledIndices: c
445
446
  }))), Ye(e, g) && (g = l)), r === "both") {
446
447
  const d = je(l / i);
447
- n.key === (s ? _t : Kt) && (p && pe(n), l % i !== i - 1 ? (g = le(e, {
448
+ n.key === (s ? _t : Wt) && (p && pe(n), l % i !== i - 1 ? (g = ue(e, {
448
449
  startingIndex: l,
449
450
  disabledIndices: c
450
- }), o && pt(g, i, d) && (g = le(e, {
451
+ }), o && pt(g, i, d) && (g = ue(e, {
451
452
  startingIndex: l - l % i - 1,
452
453
  disabledIndices: c
453
- }))) : o && (g = le(e, {
454
+ }))) : o && (g = ue(e, {
454
455
  startingIndex: l - l % i - 1,
455
456
  disabledIndices: c
456
- })), pt(g, i, d) && (g = l)), n.key === (s ? Kt : _t) && (p && pe(n), l % i !== 0 ? (g = le(e, {
457
+ })), pt(g, i, d) && (g = l)), n.key === (s ? Wt : _t) && (p && pe(n), l % i !== 0 ? (g = ue(e, {
457
458
  startingIndex: l,
458
459
  decrement: !0,
459
460
  disabledIndices: c
460
- }), o && pt(g, i, d) && (g = le(e, {
461
+ }), o && pt(g, i, d) && (g = ue(e, {
461
462
  startingIndex: l + (i - l % i),
462
463
  decrement: !0,
463
464
  disabledIndices: c
464
- }))) : o && (g = le(e, {
465
+ }))) : o && (g = ue(e, {
465
466
  startingIndex: l + (i - l % i),
466
467
  decrement: !0,
467
468
  disabledIndices: c
468
469
  })), pt(g, i, d) && (g = l));
469
470
  const h = je(u / i) === d;
470
- Ye(e, g) && (o && h ? g = n.key === (s ? Kt : _t) ? u : le(e, {
471
+ Ye(e, g) && (o && h ? g = n.key === (s ? Wt : _t) ? u : ue(e, {
471
472
  startingIndex: l - l % i - 1,
472
473
  disabledIndices: c
473
474
  }) : g = l);
@@ -513,7 +514,7 @@ function rr(e, t, n, r, o) {
513
514
  function or(e, t) {
514
515
  return t.flatMap((n, r) => e.includes(n) ? [r] : []);
515
516
  }
516
- function Be(e, t, n) {
517
+ function ze(e, t, n) {
517
518
  if (typeof n == "function")
518
519
  return n(t);
519
520
  if (n)
@@ -533,20 +534,20 @@ const lt = () => ({
533
534
  function ir(e, t) {
534
535
  const n = At(e, lt()), r = n.length;
535
536
  if (r === 0) return;
536
- const o = Re(ae(e)), s = n.indexOf(o), i = s === -1 ? t === 1 ? 0 : r - 1 : s + t;
537
+ const o = Ee(le(e)), s = n.indexOf(o), i = s === -1 ? t === 1 ? 0 : r - 1 : s + t;
537
538
  return n[i];
538
539
  }
539
540
  function sr(e) {
540
- return ir(ae(e).body, 1) || e;
541
+ return ir(le(e).body, 1) || e;
541
542
  }
542
543
  function cr(e) {
543
- return ir(ae(e).body, -1) || e;
544
+ return ir(le(e).body, -1) || e;
544
545
  }
545
546
  function ot(e, t) {
546
547
  const n = t || e.currentTarget, r = e.relatedTarget;
547
- return !r || !ue(n, r);
548
+ return !r || !ce(n, r);
548
549
  }
549
- function Xr(e) {
550
+ function Qr(e) {
550
551
  At(e, lt()).forEach((n) => {
551
552
  n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
552
553
  });
@@ -562,7 +563,7 @@ function bn(e, t, n) {
562
563
  reference: r,
563
564
  floating: o
564
565
  } = e;
565
- const s = He(t), i = qn(t), c = jn(i), a = Ce(t), u = s === "y", l = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, g = r[c] / 2 - o[c] / 2;
566
+ const s = Pe(t), i = qn(t), c = jn(i), a = Te(t), u = s === "y", l = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, g = r[c] / 2 - o[c] / 2;
566
567
  let d;
567
568
  switch (a) {
568
569
  case "top":
@@ -605,7 +606,7 @@ function bn(e, t, n) {
605
606
  }
606
607
  return d;
607
608
  }
608
- const Jr = async (e, t, n) => {
609
+ const Zr = async (e, t, n) => {
609
610
  const {
610
611
  placement: r = "bottom",
611
612
  strategy: o = "absolute",
@@ -627,7 +628,7 @@ const Jr = async (e, t, n) => {
627
628
  } = c[m], {
628
629
  x: v,
629
630
  y: x,
630
- data: I,
631
+ data: C,
631
632
  reset: A
632
633
  } = await R({
633
634
  x: l,
@@ -647,7 +648,7 @@ const Jr = async (e, t, n) => {
647
648
  ...d,
648
649
  [y]: {
649
650
  ...d[y],
650
- ...I
651
+ ...C
651
652
  }
652
653
  }, A && h <= 50 && (h++, typeof A == "object" && (A.placement && (g = A.placement), A.rects && (u = A.rects === !0 ? await i.getElementRects({
653
654
  reference: e,
@@ -682,7 +683,7 @@ async function kt(e, t) {
682
683
  elementContext: p = "floating",
683
684
  altBoundary: g = !1,
684
685
  padding: d = 0
685
- } = Qe(t, e), h = Kr(d), y = c[g ? p === "floating" ? "reference" : "floating" : p], R = It(await s.getClippingRect({
686
+ } = Ze(t, e), h = Wr(d), y = c[g ? p === "floating" ? "reference" : "floating" : p], R = Ct(await s.getClippingRect({
686
687
  element: (n = await (s.isElement == null ? void 0 : s.isElement(y))) == null || n ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
687
688
  boundary: u,
688
689
  rootBoundary: l,
@@ -692,29 +693,29 @@ async function kt(e, t) {
692
693
  y: o,
693
694
  width: i.floating.width,
694
695
  height: i.floating.height
695
- } : i.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), I = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
696
+ } : i.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), C = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
696
697
  x: 1,
697
698
  y: 1
698
699
  } : {
699
700
  x: 1,
700
701
  y: 1
701
- }, A = It(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
702
+ }, A = Ct(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
702
703
  elements: c,
703
704
  rect: v,
704
705
  offsetParent: x,
705
706
  strategy: a
706
707
  }) : v);
707
708
  return {
708
- top: (R.top - A.top + h.top) / I.y,
709
- bottom: (A.bottom - R.bottom + h.bottom) / I.y,
710
- left: (R.left - A.left + h.left) / I.x,
711
- right: (A.right - R.right + h.right) / I.x
709
+ top: (R.top - A.top + h.top) / C.y,
710
+ bottom: (A.bottom - R.bottom + h.bottom) / C.y,
711
+ left: (R.left - A.left + h.left) / C.x,
712
+ right: (A.right - R.right + h.right) / C.x
712
713
  };
713
714
  }
714
- function Qr(e, t, n) {
715
- return (e ? [...n.filter((o) => Ie(o) === e), ...n.filter((o) => Ie(o) !== e)] : n.filter((o) => Ce(o) === o)).filter((o) => e ? Ie(o) === e || (t ? Rt(o) !== o : !1) : !0);
715
+ function eo(e, t, n) {
716
+ return (e ? [...n.filter((o) => Ie(o) === e), ...n.filter((o) => Ie(o) !== e)] : n.filter((o) => Te(o) === o)).filter((o) => e ? Ie(o) === e || (t ? Rt(o) !== o : !1) : !0);
716
717
  }
717
- const Zr = function(e) {
718
+ const to = function(e) {
718
719
  return e === void 0 && (e = {}), {
719
720
  name: "autoPlacement",
720
721
  options: e,
@@ -732,7 +733,7 @@ const Zr = function(e) {
732
733
  allowedPlacements: g = mn,
733
734
  autoAlignment: d = !0,
734
735
  ...h
735
- } = Qe(e, t), m = p !== void 0 || g === mn ? Qr(p || null, d, g) : g, y = await kt(t, h), R = ((n = i.autoPlacement) == null ? void 0 : n.index) || 0, v = m[R];
736
+ } = Ze(e, t), m = p !== void 0 || g === mn ? eo(p || null, d, g) : g, y = await kt(t, h), R = ((n = i.autoPlacement) == null ? void 0 : n.index) || 0, v = m[R];
736
737
  if (v == null)
737
738
  return {};
738
739
  const x = Yn(v, s, await (a.isRTL == null ? void 0 : a.isRTL(u.floating)));
@@ -742,9 +743,9 @@ const Zr = function(e) {
742
743
  placement: m[0]
743
744
  }
744
745
  };
745
- const I = [y[Ce(v)], y[x[0]], y[x[1]]], A = [...((r = i.autoPlacement) == null ? void 0 : r.overflows) || [], {
746
+ const C = [y[Te(v)], y[x[0]], y[x[1]]], A = [...((r = i.autoPlacement) == null ? void 0 : r.overflows) || [], {
746
747
  placement: v,
747
- overflows: I
748
+ overflows: C
748
749
  }], k = m[R + 1];
749
750
  if (k)
750
751
  return {
@@ -760,7 +761,7 @@ const Zr = function(e) {
760
761
  const _ = Ie(F.placement);
761
762
  return [F.placement, _ && l ? (
762
763
  // Check along the mainAxis and main crossAxis side.
763
- F.overflows.slice(0, 2).reduce((U, V) => U + V, 0)
764
+ F.overflows.slice(0, 2).reduce((U, K) => U + K, 0)
764
765
  ) : (
765
766
  // Check only the mainAxis.
766
767
  F.overflows[0]
@@ -782,7 +783,7 @@ const Zr = function(e) {
782
783
  } : {};
783
784
  }
784
785
  };
785
- }, eo = function(e) {
786
+ }, no = function(e) {
786
787
  return e === void 0 && (e = {}), {
787
788
  name: "flip",
788
789
  options: e,
@@ -803,16 +804,16 @@ const Zr = function(e) {
803
804
  fallbackAxisSideDirection: h = "none",
804
805
  flipAlignment: m = !0,
805
806
  ...y
806
- } = Qe(e, t);
807
+ } = Ze(e, t);
807
808
  if ((n = s.arrow) != null && n.alignmentOffset)
808
809
  return {};
809
- const R = Ce(o), v = He(c), x = Ce(c) === c, I = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), A = g || (x || !m ? [Et(c)] : Lr(c)), k = h !== "none";
810
- !g && k && A.push(...Nr(c, m, h, I));
811
- const N = [c, ...A], S = await kt(t, y), L = [];
810
+ const R = Te(o), v = Pe(c), x = Te(c) === c, C = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), A = g || (x || !m ? [Et(c)] : Lr(c)), k = h !== "none";
811
+ !g && k && A.push(...Nr(c, m, h, C));
812
+ const N = [c, ...A], D = await kt(t, y), L = [];
812
813
  let F = ((r = s.flip) == null ? void 0 : r.overflows) || [];
813
- if (l && L.push(S[R]), p) {
814
- const O = Yn(o, i, I);
815
- L.push(S[O[0]], S[O[1]]);
814
+ if (l && L.push(D[R]), p) {
815
+ const O = Yn(o, i, C);
816
+ L.push(D[O[0]], D[O[1]]);
816
817
  }
817
818
  if (F = [...F, {
818
819
  placement: o,
@@ -820,7 +821,9 @@ const Zr = function(e) {
820
821
  }], !L.every((O) => O <= 0)) {
821
822
  var _, U;
822
823
  const O = (((_ = s.flip) == null ? void 0 : _.index) || 0) + 1, w = N[O];
823
- if (w)
824
+ if (w && (!(p === "alignment" ? v !== Pe(w) : !1) || // We leave the current main axis only if every placement on that axis
825
+ // overflows the main axis.
826
+ F.every((b) => b.overflows[0] > 0 && Pe(b.placement) === v)))
824
827
  return {
825
828
  data: {
826
829
  index: O,
@@ -830,31 +833,31 @@ const Zr = function(e) {
830
833
  placement: w
831
834
  }
832
835
  };
833
- let K = (U = F.filter((T) => T.overflows[0] <= 0).sort((T, b) => T.overflows[1] - b.overflows[1])[0]) == null ? void 0 : U.placement;
834
- if (!K)
836
+ let W = (U = F.filter((T) => T.overflows[0] <= 0).sort((T, b) => T.overflows[1] - b.overflows[1])[0]) == null ? void 0 : U.placement;
837
+ if (!W)
835
838
  switch (d) {
836
839
  case "bestFit": {
837
- var V;
838
- const T = (V = F.filter((b) => {
840
+ var K;
841
+ const T = (K = F.filter((b) => {
839
842
  if (k) {
840
- const E = He(b.placement);
843
+ const E = Pe(b.placement);
841
844
  return E === v || // Create a bias to the `y` side axis due to horizontal
842
845
  // reading directions favoring greater width.
843
846
  E === "y";
844
847
  }
845
848
  return !0;
846
- }).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E, M) => E + M, 0)]).sort((b, E) => b[1] - E[1])[0]) == null ? void 0 : V[0];
847
- T && (K = T);
849
+ }).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E, S) => E + S, 0)]).sort((b, E) => b[1] - E[1])[0]) == null ? void 0 : K[0];
850
+ T && (W = T);
848
851
  break;
849
852
  }
850
853
  case "initialPlacement":
851
- K = c;
854
+ W = c;
852
855
  break;
853
856
  }
854
- if (o !== K)
857
+ if (o !== W)
855
858
  return {
856
859
  reset: {
857
- placement: K
860
+ placement: W
858
861
  }
859
862
  };
860
863
  }
@@ -862,12 +865,12 @@ const Zr = function(e) {
862
865
  }
863
866
  };
864
867
  };
865
- async function to(e, t) {
868
+ async function ro(e, t) {
866
869
  const {
867
870
  placement: n,
868
871
  platform: r,
869
872
  elements: o
870
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Ce(n), c = Ie(n), a = He(n) === "y", u = ["left", "top"].includes(i) ? -1 : 1, l = s && a ? -1 : 1, p = Qe(t, e);
873
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Te(n), c = Ie(n), a = Pe(n) === "y", u = ["left", "top"].includes(i) ? -1 : 1, l = s && a ? -1 : 1, p = Ze(t, e);
871
874
  let {
872
875
  mainAxis: g,
873
876
  crossAxis: d,
@@ -889,7 +892,7 @@ async function to(e, t) {
889
892
  y: d * l
890
893
  };
891
894
  }
892
- const no = function(e) {
895
+ const oo = function(e) {
893
896
  return e === void 0 && (e = 0), {
894
897
  name: "offset",
895
898
  options: e,
@@ -900,7 +903,7 @@ const no = function(e) {
900
903
  y: s,
901
904
  placement: i,
902
905
  middlewareData: c
903
- } = t, a = await to(t, e);
906
+ } = t, a = await ro(t, e);
904
907
  return i === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
905
908
  x: o + a.x,
906
909
  y: s + a.y,
@@ -911,7 +914,7 @@ const no = function(e) {
911
914
  };
912
915
  }
913
916
  };
914
- }, ro = function(e) {
917
+ }, io = function(e) {
915
918
  return e === void 0 && (e = {}), {
916
919
  name: "shift",
917
920
  options: e,
@@ -936,10 +939,10 @@ const no = function(e) {
936
939
  }
937
940
  },
938
941
  ...a
939
- } = Qe(e, t), u = {
942
+ } = Ze(e, t), u = {
940
943
  x: n,
941
944
  y: r
942
- }, l = await kt(t, a), p = He(Ce(o)), g = Gn(p);
945
+ }, l = await kt(t, a), p = Pe(Te(o)), g = Gn(p);
943
946
  let d = u[g], h = u[p];
944
947
  if (s) {
945
948
  const y = g === "y" ? "top" : "left", R = g === "y" ? "bottom" : "right", v = d + l[y], x = d - l[R];
@@ -967,7 +970,7 @@ const no = function(e) {
967
970
  };
968
971
  }
969
972
  };
970
- }, oo = function(e) {
973
+ }, so = function(e) {
971
974
  return e === void 0 && (e = {}), {
972
975
  name: "size",
973
976
  options: e,
@@ -982,21 +985,21 @@ const no = function(e) {
982
985
  apply: a = () => {
983
986
  },
984
987
  ...u
985
- } = Qe(e, t), l = await kt(t, u), p = Ce(o), g = Ie(o), d = He(o) === "y", {
988
+ } = Ze(e, t), l = await kt(t, u), p = Te(o), g = Ie(o), d = Pe(o) === "y", {
986
989
  width: h,
987
990
  height: m
988
991
  } = s.floating;
989
992
  let y, R;
990
993
  p === "top" || p === "bottom" ? (y = p, R = g === (await (i.isRTL == null ? void 0 : i.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (R = p, y = g === "end" ? "top" : "bottom");
991
- const v = m - l.top - l.bottom, x = h - l.left - l.right, I = Je(m - l[y], v), A = Je(h - l[R], x), k = !t.middlewareData.shift;
992
- let N = I, S = A;
993
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (S = x), (r = t.middlewareData.shift) != null && r.enabled.y && (N = v), k && !g) {
994
- const F = be(l.left, 0), _ = be(l.right, 0), U = be(l.top, 0), V = be(l.bottom, 0);
995
- d ? S = h - 2 * (F !== 0 || _ !== 0 ? F + _ : be(l.left, l.right)) : N = m - 2 * (U !== 0 || V !== 0 ? U + V : be(l.top, l.bottom));
994
+ const v = m - l.top - l.bottom, x = h - l.left - l.right, C = Qe(m - l[y], v), A = Qe(h - l[R], x), k = !t.middlewareData.shift;
995
+ let N = C, D = A;
996
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (D = x), (r = t.middlewareData.shift) != null && r.enabled.y && (N = v), k && !g) {
997
+ const F = be(l.left, 0), _ = be(l.right, 0), U = be(l.top, 0), K = be(l.bottom, 0);
998
+ d ? D = h - 2 * (F !== 0 || _ !== 0 ? F + _ : be(l.left, l.right)) : N = m - 2 * (U !== 0 || K !== 0 ? U + K : be(l.top, l.bottom));
996
999
  }
997
1000
  await a({
998
1001
  ...t,
999
- availableWidth: S,
1002
+ availableWidth: D,
1000
1003
  availableHeight: N
1001
1004
  });
1002
1005
  const L = await i.getDimensions(c.floating);
@@ -1011,7 +1014,7 @@ const no = function(e) {
1011
1014
  function ur(e) {
1012
1015
  const t = we(e);
1013
1016
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
1014
- const o = oe(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, c = wt(n) !== s || wt(r) !== i;
1017
+ const o = re(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, c = wt(n) !== s || wt(r) !== i;
1015
1018
  return c && (n = s, r = i), {
1016
1019
  width: n,
1017
1020
  height: r,
@@ -1023,8 +1026,8 @@ function sn(e) {
1023
1026
  }
1024
1027
  function Xe(e) {
1025
1028
  const t = sn(e);
1026
- if (!oe(t))
1027
- return Ee(1);
1029
+ if (!re(t))
1030
+ return Ce(1);
1028
1031
  const n = t.getBoundingClientRect(), {
1029
1032
  width: r,
1030
1033
  height: o,
@@ -1036,33 +1039,33 @@ function Xe(e) {
1036
1039
  y: c
1037
1040
  };
1038
1041
  }
1039
- const io = /* @__PURE__ */ Ee(0);
1042
+ const co = /* @__PURE__ */ Ce(0);
1040
1043
  function lr(e) {
1041
1044
  const t = he(e);
1042
- return !St() || !t.visualViewport ? io : {
1045
+ return !Pt() || !t.visualViewport ? co : {
1043
1046
  x: t.visualViewport.offsetLeft,
1044
1047
  y: t.visualViewport.offsetTop
1045
1048
  };
1046
1049
  }
1047
- function so(e, t, n) {
1050
+ function uo(e, t, n) {
1048
1051
  return t === void 0 && (t = !1), !n || t && n !== he(e) ? !1 : t;
1049
1052
  }
1050
- function ze(e, t, n, r) {
1053
+ function Ue(e, t, n, r) {
1051
1054
  t === void 0 && (t = !1), n === void 0 && (n = !1);
1052
1055
  const o = e.getBoundingClientRect(), s = sn(e);
1053
- let i = Ee(1);
1056
+ let i = Ce(1);
1054
1057
  t && (r ? Y(r) && (i = Xe(r)) : i = Xe(e));
1055
- const c = so(s, n, r) ? lr(s) : Ee(0);
1058
+ const c = uo(s, n, r) ? lr(s) : Ce(0);
1056
1059
  let a = (o.left + c.x) / i.x, u = (o.top + c.y) / i.y, l = o.width / i.x, p = o.height / i.y;
1057
1060
  if (s) {
1058
1061
  const g = he(s), d = r && Y(r) ? he(r) : r;
1059
1062
  let h = g, m = Jt(h);
1060
1063
  for (; m && r && d !== h; ) {
1061
- const y = Xe(m), R = m.getBoundingClientRect(), v = we(m), x = R.left + (m.clientLeft + parseFloat(v.paddingLeft)) * y.x, I = R.top + (m.clientTop + parseFloat(v.paddingTop)) * y.y;
1062
- a *= y.x, u *= y.y, l *= y.x, p *= y.y, a += x, u += I, h = he(m), m = Jt(h);
1064
+ const y = Xe(m), R = m.getBoundingClientRect(), v = we(m), x = R.left + (m.clientLeft + parseFloat(v.paddingLeft)) * y.x, C = R.top + (m.clientTop + parseFloat(v.paddingTop)) * y.y;
1065
+ a *= y.x, u *= y.y, l *= y.x, p *= y.y, a += x, u += C, h = he(m), m = Jt(h);
1063
1066
  }
1064
1067
  }
1065
- return It({
1068
+ return Ct({
1066
1069
  width: l,
1067
1070
  height: p,
1068
1071
  x: a,
@@ -1071,7 +1074,7 @@ function ze(e, t, n, r) {
1071
1074
  }
1072
1075
  function cn(e, t) {
1073
1076
  const n = Dt(e).scrollLeft;
1074
- return t ? t.left + n : ze(Te(e)).left + n;
1077
+ return t ? t.left + n : Ue(Oe(e)).left + n;
1075
1078
  }
1076
1079
  function ar(e, t, n) {
1077
1080
  n === void 0 && (n = !1);
@@ -1084,26 +1087,26 @@ function ar(e, t, n) {
1084
1087
  y: s
1085
1088
  };
1086
1089
  }
1087
- function co(e) {
1090
+ function lo(e) {
1088
1091
  let {
1089
1092
  elements: t,
1090
1093
  rect: n,
1091
1094
  offsetParent: r,
1092
1095
  strategy: o
1093
1096
  } = e;
1094
- const s = o === "fixed", i = Te(r), c = t ? Pt(t.floating) : !1;
1097
+ const s = o === "fixed", i = Oe(r), c = t ? St(t.floating) : !1;
1095
1098
  if (r === i || c && s)
1096
1099
  return n;
1097
1100
  let a = {
1098
1101
  scrollLeft: 0,
1099
1102
  scrollTop: 0
1100
- }, u = Ee(1);
1101
- const l = Ee(0), p = oe(r);
1102
- if ((p || !p && !s) && ((_e(r) !== "body" || ut(i)) && (a = Dt(r)), oe(r))) {
1103
- const d = ze(r);
1103
+ }, u = Ce(1);
1104
+ const l = Ce(0), p = re(r);
1105
+ if ((p || !p && !s) && ((Ke(r) !== "body" || ut(i)) && (a = Dt(r)), re(r))) {
1106
+ const d = Ue(r);
1104
1107
  u = Xe(r), l.x = d.x + r.clientLeft, l.y = d.y + r.clientTop;
1105
1108
  }
1106
- const g = i && !p && !s ? ar(i, a, !0) : Ee(0);
1109
+ const g = i && !p && !s ? ar(i, a, !0) : Ce(0);
1107
1110
  return {
1108
1111
  width: n.width * u.x,
1109
1112
  height: n.height * u.y,
@@ -1111,11 +1114,11 @@ function co(e) {
1111
1114
  y: n.y * u.y - a.scrollTop * u.y + l.y + g.y
1112
1115
  };
1113
1116
  }
1114
- function uo(e) {
1117
+ function ao(e) {
1115
1118
  return Array.from(e.getClientRects());
1116
1119
  }
1117
- function lo(e) {
1118
- const t = Te(e), n = Dt(e), r = e.ownerDocument.body, o = be(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = be(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1120
+ function fo(e) {
1121
+ const t = Oe(e), n = Dt(e), r = e.ownerDocument.body, o = be(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = be(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1119
1122
  let i = -n.scrollLeft + cn(e);
1120
1123
  const c = -n.scrollTop;
1121
1124
  return we(r).direction === "rtl" && (i += be(t.clientWidth, r.clientWidth) - o), {
@@ -1125,12 +1128,12 @@ function lo(e) {
1125
1128
  y: c
1126
1129
  };
1127
1130
  }
1128
- function ao(e, t) {
1129
- const n = he(e), r = Te(e), o = n.visualViewport;
1131
+ function mo(e, t) {
1132
+ const n = he(e), r = Oe(e), o = n.visualViewport;
1130
1133
  let s = r.clientWidth, i = r.clientHeight, c = 0, a = 0;
1131
1134
  if (o) {
1132
1135
  s = o.width, i = o.height;
1133
- const u = St();
1136
+ const u = Pt();
1134
1137
  (!u || u && t === "fixed") && (c = o.offsetLeft, a = o.offsetTop);
1135
1138
  }
1136
1139
  return {
@@ -1140,8 +1143,8 @@ function ao(e, t) {
1140
1143
  y: a
1141
1144
  };
1142
1145
  }
1143
- function fo(e, t) {
1144
- const n = ze(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = oe(e) ? Xe(e) : Ee(1), i = e.clientWidth * s.x, c = e.clientHeight * s.y, a = o * s.x, u = r * s.y;
1146
+ function po(e, t) {
1147
+ const n = Ue(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = re(e) ? Xe(e) : Ce(1), i = e.clientWidth * s.x, c = e.clientHeight * s.y, a = o * s.x, u = r * s.y;
1145
1148
  return {
1146
1149
  width: i,
1147
1150
  height: c,
@@ -1152,11 +1155,11 @@ function fo(e, t) {
1152
1155
  function yn(e, t, n) {
1153
1156
  let r;
1154
1157
  if (t === "viewport")
1155
- r = ao(e, n);
1158
+ r = mo(e, n);
1156
1159
  else if (t === "document")
1157
- r = lo(Te(e));
1160
+ r = fo(Oe(e));
1158
1161
  else if (Y(t))
1159
- r = fo(t, n);
1162
+ r = po(t, n);
1160
1163
  else {
1161
1164
  const o = lr(e);
1162
1165
  r = {
@@ -1166,35 +1169,35 @@ function yn(e, t, n) {
1166
1169
  height: t.height
1167
1170
  };
1168
1171
  }
1169
- return It(r);
1172
+ return Ct(r);
1170
1173
  }
1171
1174
  function fr(e, t) {
1172
- const n = Pe(e);
1173
- return n === t || !Y(n) || Me(n) ? !1 : we(n).position === "fixed" || fr(n, t);
1175
+ const n = ke(e);
1176
+ return n === t || !Y(n) || De(n) ? !1 : we(n).position === "fixed" || fr(n, t);
1174
1177
  }
1175
- function mo(e, t) {
1178
+ function go(e, t) {
1176
1179
  const n = t.get(e);
1177
1180
  if (n)
1178
1181
  return n;
1179
- let r = ke(e, [], !1).filter((c) => Y(c) && _e(c) !== "body"), o = null;
1182
+ let r = Fe(e, [], !1).filter((c) => Y(c) && Ke(c) !== "body"), o = null;
1180
1183
  const s = we(e).position === "fixed";
1181
- let i = s ? Pe(e) : e;
1182
- for (; Y(i) && !Me(i); ) {
1184
+ let i = s ? ke(e) : e;
1185
+ for (; Y(i) && !De(i); ) {
1183
1186
  const c = we(i), a = nn(i);
1184
- !a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ut(i) && !a && fr(e, i)) ? r = r.filter((l) => l !== i) : o = c, i = Pe(i);
1187
+ !a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ut(i) && !a && fr(e, i)) ? r = r.filter((l) => l !== i) : o = c, i = ke(i);
1185
1188
  }
1186
1189
  return t.set(e, r), r;
1187
1190
  }
1188
- function po(e) {
1191
+ function ho(e) {
1189
1192
  let {
1190
1193
  element: t,
1191
1194
  boundary: n,
1192
1195
  rootBoundary: r,
1193
1196
  strategy: o
1194
1197
  } = e;
1195
- const i = [...n === "clippingAncestors" ? Pt(t) ? [] : mo(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((u, l) => {
1198
+ const i = [...n === "clippingAncestors" ? St(t) ? [] : go(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((u, l) => {
1196
1199
  const p = yn(t, l, o);
1197
- return u.top = be(p.top, u.top), u.right = Je(p.right, u.right), u.bottom = Je(p.bottom, u.bottom), u.left = be(p.left, u.left), u;
1200
+ return u.top = be(p.top, u.top), u.right = Qe(p.right, u.right), u.bottom = Qe(p.bottom, u.bottom), u.left = be(p.left, u.left), u;
1198
1201
  }, yn(t, c, o));
1199
1202
  return {
1200
1203
  width: a.right - a.left,
@@ -1203,7 +1206,7 @@ function po(e) {
1203
1206
  y: a.top
1204
1207
  };
1205
1208
  }
1206
- function go(e) {
1209
+ function vo(e) {
1207
1210
  const {
1208
1211
  width: t,
1209
1212
  height: n
@@ -1213,59 +1216,63 @@ function go(e) {
1213
1216
  height: n
1214
1217
  };
1215
1218
  }
1216
- function ho(e, t, n) {
1217
- const r = oe(t), o = Te(t), s = n === "fixed", i = ze(e, !0, s, t);
1219
+ function bo(e, t, n) {
1220
+ const r = re(t), o = Oe(t), s = n === "fixed", i = Ue(e, !0, s, t);
1218
1221
  let c = {
1219
1222
  scrollLeft: 0,
1220
1223
  scrollTop: 0
1221
1224
  };
1222
- const a = Ee(0);
1225
+ const a = Ce(0);
1226
+ function u() {
1227
+ a.x = cn(o);
1228
+ }
1223
1229
  if (r || !r && !s)
1224
- if ((_e(t) !== "body" || ut(o)) && (c = Dt(t)), r) {
1225
- const g = ze(t, !0, s, t);
1226
- a.x = g.x + t.clientLeft, a.y = g.y + t.clientTop;
1227
- } else o && (a.x = cn(o));
1228
- const u = o && !r && !s ? ar(o, c) : Ee(0), l = i.left + c.scrollLeft - a.x - u.x, p = i.top + c.scrollTop - a.y - u.y;
1230
+ if ((Ke(t) !== "body" || ut(o)) && (c = Dt(t)), r) {
1231
+ const d = Ue(t, !0, s, t);
1232
+ a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
1233
+ } else o && u();
1234
+ s && !r && o && u();
1235
+ const l = o && !r && !s ? ar(o, c) : Ce(0), p = i.left + c.scrollLeft - a.x - l.x, g = i.top + c.scrollTop - a.y - l.y;
1229
1236
  return {
1230
- x: l,
1231
- y: p,
1237
+ x: p,
1238
+ y: g,
1232
1239
  width: i.width,
1233
1240
  height: i.height
1234
1241
  };
1235
1242
  }
1236
- function Wt(e) {
1243
+ function Vt(e) {
1237
1244
  return we(e).position === "static";
1238
1245
  }
1239
1246
  function xn(e, t) {
1240
- if (!oe(e) || we(e).position === "fixed")
1247
+ if (!re(e) || we(e).position === "fixed")
1241
1248
  return null;
1242
1249
  if (t)
1243
1250
  return t(e);
1244
1251
  let n = e.offsetParent;
1245
- return Te(e) === n && (n = n.ownerDocument.body), n;
1252
+ return Oe(e) === n && (n = n.ownerDocument.body), n;
1246
1253
  }
1247
1254
  function dr(e, t) {
1248
1255
  const n = he(e);
1249
- if (Pt(e))
1256
+ if (St(e))
1250
1257
  return n;
1251
- if (!oe(e)) {
1252
- let o = Pe(e);
1253
- for (; o && !Me(o); ) {
1254
- if (Y(o) && !Wt(o))
1258
+ if (!re(e)) {
1259
+ let o = ke(e);
1260
+ for (; o && !De(o); ) {
1261
+ if (Y(o) && !Vt(o))
1255
1262
  return o;
1256
- o = Pe(o);
1263
+ o = ke(o);
1257
1264
  }
1258
1265
  return n;
1259
1266
  }
1260
1267
  let r = xn(e, t);
1261
- for (; r && Mr(r) && Wt(r); )
1268
+ for (; r && Mr(r) && Vt(r); )
1262
1269
  r = xn(r, t);
1263
- return r && Me(r) && Wt(r) && !nn(r) ? n : r || Pr(e) || n;
1270
+ return r && De(r) && Vt(r) && !nn(r) ? n : r || Sr(e) || n;
1264
1271
  }
1265
- const vo = async function(e) {
1272
+ const yo = async function(e) {
1266
1273
  const t = this.getOffsetParent || dr, n = this.getDimensions, r = await n(e.floating);
1267
1274
  return {
1268
- reference: ho(e.reference, await t(e.floating), e.strategy),
1275
+ reference: bo(e.reference, await t(e.floating), e.strategy),
1269
1276
  floating: {
1270
1277
  x: 0,
1271
1278
  y: 0,
@@ -1274,27 +1281,27 @@ const vo = async function(e) {
1274
1281
  }
1275
1282
  };
1276
1283
  };
1277
- function bo(e) {
1284
+ function xo(e) {
1278
1285
  return we(e).direction === "rtl";
1279
1286
  }
1280
- const yo = {
1281
- convertOffsetParentRelativeRectToViewportRelativeRect: co,
1282
- getDocumentElement: Te,
1283
- getClippingRect: po,
1287
+ const wo = {
1288
+ convertOffsetParentRelativeRectToViewportRelativeRect: lo,
1289
+ getDocumentElement: Oe,
1290
+ getClippingRect: ho,
1284
1291
  getOffsetParent: dr,
1285
- getElementRects: vo,
1286
- getClientRects: uo,
1287
- getDimensions: go,
1292
+ getElementRects: yo,
1293
+ getClientRects: ao,
1294
+ getDimensions: vo,
1288
1295
  getScale: Xe,
1289
1296
  isElement: Y,
1290
- isRTL: bo
1297
+ isRTL: xo
1291
1298
  };
1292
1299
  function mr(e, t) {
1293
1300
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1294
1301
  }
1295
- function xo(e, t) {
1302
+ function Ro(e, t) {
1296
1303
  let n = null, r;
1297
- const o = Te(e);
1304
+ const o = Oe(e);
1298
1305
  function s() {
1299
1306
  var c;
1300
1307
  clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
@@ -1311,19 +1318,19 @@ function xo(e, t) {
1311
1318
  return;
1312
1319
  const h = je(p), m = je(o.clientWidth - (l + g)), y = je(o.clientHeight - (p + d)), R = je(l), x = {
1313
1320
  rootMargin: -h + "px " + -m + "px " + -y + "px " + -R + "px",
1314
- threshold: be(0, Je(1, a)) || 1
1321
+ threshold: be(0, Qe(1, a)) || 1
1315
1322
  };
1316
- let I = !0;
1323
+ let C = !0;
1317
1324
  function A(k) {
1318
1325
  const N = k[0].intersectionRatio;
1319
1326
  if (N !== a) {
1320
- if (!I)
1327
+ if (!C)
1321
1328
  return i();
1322
1329
  N ? i(!1, N) : r = setTimeout(() => {
1323
1330
  i(!1, 1e-7);
1324
1331
  }, 1e3);
1325
1332
  }
1326
- N === 1 && !mr(u, e.getBoundingClientRect()) && i(), I = !1;
1333
+ N === 1 && !mr(u, e.getBoundingClientRect()) && i(), C = !1;
1327
1334
  }
1328
1335
  try {
1329
1336
  n = new IntersectionObserver(A, {
@@ -1338,7 +1345,7 @@ function xo(e, t) {
1338
1345
  }
1339
1346
  return i(!0), s;
1340
1347
  }
1341
- function oi(e, t, n, r) {
1348
+ function ui(e, t, n, r) {
1342
1349
  r === void 0 && (r = {});
1343
1350
  const {
1344
1351
  ancestorScroll: o = !0,
@@ -1346,13 +1353,13 @@ function oi(e, t, n, r) {
1346
1353
  elementResize: i = typeof ResizeObserver == "function",
1347
1354
  layoutShift: c = typeof IntersectionObserver == "function",
1348
1355
  animationFrame: a = !1
1349
- } = r, u = sn(e), l = o || s ? [...u ? ke(u) : [], ...ke(t)] : [];
1356
+ } = r, u = sn(e), l = o || s ? [...u ? Fe(u) : [], ...Fe(t)] : [];
1350
1357
  l.forEach((R) => {
1351
1358
  o && R.addEventListener("scroll", n, {
1352
1359
  passive: !0
1353
1360
  }), s && R.addEventListener("resize", n);
1354
1361
  });
1355
- const p = u && c ? xo(u, n) : null;
1362
+ const p = u && c ? Ro(u, n) : null;
1356
1363
  let g = -1, d = null;
1357
1364
  i && (d = new ResizeObserver((R) => {
1358
1365
  let [v] = R;
@@ -1361,10 +1368,10 @@ function oi(e, t, n, r) {
1361
1368
  (x = d) == null || x.observe(t);
1362
1369
  })), n();
1363
1370
  }), u && !a && d.observe(u), d.observe(t));
1364
- let h, m = a ? ze(e) : null;
1371
+ let h, m = a ? Ue(e) : null;
1365
1372
  a && y();
1366
1373
  function y() {
1367
- const R = ze(e);
1374
+ const R = Ue(e);
1368
1375
  m && !mr(m, R) && n(), m = R, h = requestAnimationFrame(y);
1369
1376
  }
1370
1377
  return n(), () => {
@@ -1374,20 +1381,21 @@ function oi(e, t, n, r) {
1374
1381
  }), p == null || p(), (R = d) == null || R.disconnect(), d = null, a && cancelAnimationFrame(h);
1375
1382
  };
1376
1383
  }
1377
- const wo = no, Ro = Zr, Eo = ro, Io = eo, Co = oo, To = (e, t, n) => {
1384
+ const Eo = oo, Co = to, Io = io, To = no, Oo = so, Ao = (e, t, n) => {
1378
1385
  const r = /* @__PURE__ */ new Map(), o = {
1379
- platform: yo,
1386
+ platform: wo,
1380
1387
  ...n
1381
1388
  }, s = {
1382
1389
  ...o.platform,
1383
1390
  _c: r
1384
1391
  };
1385
- return Jr(e, t, {
1392
+ return Zr(e, t, {
1386
1393
  ...o,
1387
1394
  platform: s
1388
1395
  });
1389
1396
  };
1390
- var xt = typeof document < "u" ? Wn : $n;
1397
+ var Mo = typeof document < "u", So = function() {
1398
+ }, xt = Mo ? $n : So;
1391
1399
  function Tt(e, t) {
1392
1400
  if (e === t)
1393
1401
  return !0;
@@ -1431,7 +1439,7 @@ function $t(e) {
1431
1439
  t.current = e;
1432
1440
  }), t;
1433
1441
  }
1434
- function Oo(e) {
1442
+ function Po(e) {
1435
1443
  e === void 0 && (e = {});
1436
1444
  const {
1437
1445
  placement: t = "bottom",
@@ -1458,7 +1466,7 @@ function Oo(e) {
1458
1466
  b !== k.current && (k.current = b, m(b));
1459
1467
  }, []), x = f.useCallback((b) => {
1460
1468
  b !== N.current && (N.current = b, R(b));
1461
- }, []), I = s || h, A = i || y, k = f.useRef(null), N = f.useRef(null), S = f.useRef(l), L = a != null, F = $t(a), _ = $t(o), U = $t(u), V = f.useCallback(() => {
1469
+ }, []), C = s || h, A = i || y, k = f.useRef(null), N = f.useRef(null), D = f.useRef(l), L = a != null, F = $t(a), _ = $t(o), U = $t(u), K = f.useCallback(() => {
1462
1470
  if (!k.current || !N.current)
1463
1471
  return;
1464
1472
  const b = {
@@ -1466,8 +1474,8 @@ function Oo(e) {
1466
1474
  strategy: n,
1467
1475
  middleware: g
1468
1476
  };
1469
- _.current && (b.platform = _.current), To(k.current, N.current, b).then((E) => {
1470
- const M = {
1477
+ _.current && (b.platform = _.current), Ao(k.current, N.current, b).then((E) => {
1478
+ const S = {
1471
1479
  ...E,
1472
1480
  // The floating element's position may be recomputed while it's closed
1473
1481
  // but still mounted (such as when transitioning out). To ensure
@@ -1475,13 +1483,13 @@ function Oo(e) {
1475
1483
  // setting it to `true` when `open === false` (must be specified).
1476
1484
  isPositioned: U.current !== !1
1477
1485
  };
1478
- O.current && !Tt(S.current, M) && (S.current = M, tn.flushSync(() => {
1479
- p(M);
1486
+ O.current && !Tt(D.current, S) && (D.current = S, tn.flushSync(() => {
1487
+ p(S);
1480
1488
  }));
1481
1489
  });
1482
1490
  }, [g, t, n, _, U]);
1483
1491
  xt(() => {
1484
- u === !1 && S.current.isPositioned && (S.current.isPositioned = !1, p((b) => ({
1492
+ u === !1 && D.current.isPositioned && (D.current.isPositioned = !1, p((b) => ({
1485
1493
  ...b,
1486
1494
  isPositioned: !1
1487
1495
  })));
@@ -1490,66 +1498,66 @@ function Oo(e) {
1490
1498
  xt(() => (O.current = !0, () => {
1491
1499
  O.current = !1;
1492
1500
  }), []), xt(() => {
1493
- if (I && (k.current = I), A && (N.current = A), I && A) {
1501
+ if (C && (k.current = C), A && (N.current = A), C && A) {
1494
1502
  if (F.current)
1495
- return F.current(I, A, V);
1496
- V();
1503
+ return F.current(C, A, K);
1504
+ K();
1497
1505
  }
1498
- }, [I, A, V, F, L]);
1506
+ }, [C, A, K, F, L]);
1499
1507
  const w = f.useMemo(() => ({
1500
1508
  reference: k,
1501
1509
  floating: N,
1502
1510
  setReference: v,
1503
1511
  setFloating: x
1504
- }), [v, x]), K = f.useMemo(() => ({
1505
- reference: I,
1512
+ }), [v, x]), W = f.useMemo(() => ({
1513
+ reference: C,
1506
1514
  floating: A
1507
- }), [I, A]), T = f.useMemo(() => {
1515
+ }), [C, A]), T = f.useMemo(() => {
1508
1516
  const b = {
1509
1517
  position: n,
1510
1518
  left: 0,
1511
1519
  top: 0
1512
1520
  };
1513
- if (!K.floating)
1521
+ if (!W.floating)
1514
1522
  return b;
1515
- const E = wn(K.floating, l.x), M = wn(K.floating, l.y);
1523
+ const E = wn(W.floating, l.x), S = wn(W.floating, l.y);
1516
1524
  return c ? {
1517
1525
  ...b,
1518
- transform: "translate(" + E + "px, " + M + "px)",
1519
- ...pr(K.floating) >= 1.5 && {
1526
+ transform: "translate(" + E + "px, " + S + "px)",
1527
+ ...pr(W.floating) >= 1.5 && {
1520
1528
  willChange: "transform"
1521
1529
  }
1522
1530
  } : {
1523
1531
  position: n,
1524
1532
  left: E,
1525
- top: M
1533
+ top: S
1526
1534
  };
1527
- }, [n, c, K.floating, l.x, l.y]);
1535
+ }, [n, c, W.floating, l.x, l.y]);
1528
1536
  return f.useMemo(() => ({
1529
1537
  ...l,
1530
- update: V,
1538
+ update: K,
1531
1539
  refs: w,
1532
- elements: K,
1540
+ elements: W,
1533
1541
  floatingStyles: T
1534
- }), [l, V, w, K, T]);
1542
+ }), [l, K, w, W, T]);
1535
1543
  }
1536
- const ii = (e, t) => ({
1537
- ...wo(e),
1538
- options: [e, t]
1539
- }), si = (e, t) => ({
1544
+ const li = (e, t) => ({
1540
1545
  ...Eo(e),
1541
1546
  options: [e, t]
1542
- }), ci = (e, t) => ({
1547
+ }), ai = (e, t) => ({
1543
1548
  ...Io(e),
1544
1549
  options: [e, t]
1545
- }), ui = (e, t) => ({
1546
- ...Co(e),
1550
+ }), fi = (e, t) => ({
1551
+ ...To(e),
1547
1552
  options: [e, t]
1548
- }), li = (e, t) => ({
1549
- ...Ro(e),
1553
+ }), di = (e, t) => ({
1554
+ ...Oo(e),
1555
+ options: [e, t]
1556
+ }), mi = (e, t) => ({
1557
+ ...Co(e),
1550
1558
  options: [e, t]
1551
1559
  });
1552
- function Ao(e) {
1560
+ function Do(e) {
1553
1561
  const t = f.useRef(void 0), n = f.useCallback((r) => {
1554
1562
  const o = e.map((s) => {
1555
1563
  if (s != null) {
@@ -1572,7 +1580,7 @@ function Ao(e) {
1572
1580
  t.current && (t.current(), t.current = void 0), r != null && (t.current = n(r));
1573
1581
  }, e);
1574
1582
  }
1575
- function Mo(e, t) {
1583
+ function ko(e, t) {
1576
1584
  const n = e.compareDocumentPosition(t);
1577
1585
  return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
1578
1586
  }
@@ -1586,7 +1594,7 @@ const gr = /* @__PURE__ */ f.createContext({
1586
1594
  current: []
1587
1595
  }
1588
1596
  });
1589
- function Po(e) {
1597
+ function Lo(e) {
1590
1598
  const {
1591
1599
  children: t,
1592
1600
  elementsRef: n,
@@ -1600,7 +1608,7 @@ function Po(e) {
1600
1608
  });
1601
1609
  }, []), a = f.useMemo(() => {
1602
1610
  const u = /* @__PURE__ */ new Map();
1603
- return Array.from(o.keys()).sort(Mo).forEach((p, g) => {
1611
+ return Array.from(o.keys()).sort(ko).forEach((p, g) => {
1604
1612
  u.set(p, g);
1605
1613
  }), u;
1606
1614
  }, [o]);
@@ -1615,7 +1623,7 @@ function Po(e) {
1615
1623
  children: t
1616
1624
  });
1617
1625
  }
1618
- function So(e) {
1626
+ function Fo(e) {
1619
1627
  e === void 0 && (e = {});
1620
1628
  const {
1621
1629
  label: t
@@ -1646,7 +1654,7 @@ function So(e) {
1646
1654
  index: c ?? -1
1647
1655
  }), [c, l]);
1648
1656
  }
1649
- const Do = "data-floating-ui-focusable", Rn = "active", En = "selected", Fe = "ArrowLeft", Ne = "ArrowRight", st = "ArrowUp", Le = "ArrowDown";
1657
+ const No = "data-floating-ui-focusable", Rn = "active", En = "selected", _e = "ArrowLeft", We = "ArrowRight", st = "ArrowUp", Ne = "ArrowDown";
1650
1658
  function hr(e, t) {
1651
1659
  return typeof e == "function" ? e(t) : e ? /* @__PURE__ */ f.cloneElement(e, t) : /* @__PURE__ */ ge("div", {
1652
1660
  ...t
@@ -1656,7 +1664,7 @@ const vr = /* @__PURE__ */ f.createContext({
1656
1664
  activeIndex: 0,
1657
1665
  onNavigate: () => {
1658
1666
  }
1659
- }), br = [Fe, Ne], yr = [st, Le], Bt = [...br, ...yr], ai = /* @__PURE__ */ f.forwardRef(function(t, n) {
1667
+ }), br = [_e, We], yr = [st, Ne], Bt = [...br, ...yr], pi = /* @__PURE__ */ f.forwardRef(function(t, n) {
1660
1668
  const {
1661
1669
  render: r,
1662
1670
  orientation: o = "both",
@@ -1669,32 +1677,32 @@ const vr = /* @__PURE__ */ f.createContext({
1669
1677
  itemSizes: p,
1670
1678
  dense: g = !1,
1671
1679
  ...d
1672
- } = t, [h, m] = f.useState(0), y = u ?? h, R = ce(l ?? m), v = f.useRef([]), x = r && typeof r != "function" ? r.props : {}, I = f.useMemo(() => ({
1680
+ } = t, [h, m] = f.useState(0), y = u ?? h, R = se(l ?? m), v = f.useRef([]), x = r && typeof r != "function" ? r.props : {}, C = f.useMemo(() => ({
1673
1681
  activeIndex: y,
1674
1682
  onNavigate: R
1675
1683
  }), [y, R]), A = c > 1;
1676
- function k(S) {
1677
- if (!Bt.includes(S.key)) return;
1684
+ function k(D) {
1685
+ if (!Bt.includes(D.key)) return;
1678
1686
  let L = y;
1679
- const F = yt(v, a), _ = en(v, a), U = i ? Fe : Ne, V = i ? Ne : Fe;
1687
+ const F = yt(v, a), _ = en(v, a), U = i ? _e : We, K = i ? We : _e;
1680
1688
  if (A) {
1681
1689
  const b = p || Array.from({
1682
1690
  length: v.current.length
1683
1691
  }, () => ({
1684
1692
  width: 1,
1685
1693
  height: 1
1686
- })), E = nr(b, c, g), M = E.findIndex((W) => W != null && !Be(v, W, a)), G = E.reduce((W, Z, fe) => Z != null && !Be(v, Z, a) ? fe : W, -1), C = E[tr({
1687
- current: E.map((W) => W ? v.current[W] : null)
1694
+ })), E = nr(b, c, g), S = E.findIndex((V) => V != null && !ze(v, V, a)), G = E.reduce((V, ee, ae) => ee != null && !ze(v, ee, a) ? ae : V, -1), I = E[tr({
1695
+ current: E.map((V) => V ? v.current[V] : null)
1688
1696
  }, {
1689
- event: S,
1697
+ event: D,
1690
1698
  orientation: o,
1691
1699
  loop: s,
1692
1700
  rtl: i,
1693
1701
  cols: c,
1694
1702
  // treat undefined (empty grid spaces) as disabled indices so we
1695
1703
  // don't end up in them
1696
- disabledIndices: or([...(typeof a != "function" ? a : null) || v.current.map((W, Z) => Be(v, Z, a) ? Z : void 0), void 0], E),
1697
- minIndex: M,
1704
+ disabledIndices: or([...(typeof a != "function" ? a : null) || v.current.map((V, ee) => ze(v, ee, a) ? ee : void 0), void 0], E),
1705
+ minIndex: S,
1698
1706
  maxIndex: G,
1699
1707
  prevIndex: rr(
1700
1708
  y > _ ? F : y,
@@ -1704,31 +1712,31 @@ const vr = /* @__PURE__ */ f.createContext({
1704
1712
  // use a corner matching the edge closest to the direction we're
1705
1713
  // moving in so we don't end up in the same item. Prefer
1706
1714
  // top/left over bottom/right.
1707
- S.key === Le ? "bl" : S.key === U ? "tr" : "tl"
1715
+ D.key === Ne ? "bl" : D.key === U ? "tr" : "tl"
1708
1716
  )
1709
1717
  })];
1710
- C != null && (L = C);
1718
+ I != null && (L = I);
1711
1719
  }
1712
1720
  const O = {
1713
1721
  horizontal: [U],
1714
- vertical: [Le],
1715
- both: [U, Le]
1722
+ vertical: [Ne],
1723
+ both: [U, Ne]
1716
1724
  }[o], w = {
1717
- horizontal: [V],
1725
+ horizontal: [K],
1718
1726
  vertical: [st],
1719
- both: [V, st]
1720
- }[o], K = A ? Bt : {
1727
+ both: [K, st]
1728
+ }[o], W = A ? Bt : {
1721
1729
  horizontal: br,
1722
1730
  vertical: yr,
1723
1731
  both: Bt
1724
1732
  }[o];
1725
- if (L === y && [...O, ...w].includes(S.key) && (s && L === _ && O.includes(S.key) ? L = F : s && L === F && w.includes(S.key) ? L = _ : L = le(v, {
1733
+ if (L === y && [...O, ...w].includes(D.key) && (s && L === _ && O.includes(D.key) ? L = F : s && L === F && w.includes(D.key) ? L = _ : L = ue(v, {
1726
1734
  startingIndex: L,
1727
- decrement: w.includes(S.key),
1735
+ decrement: w.includes(D.key),
1728
1736
  disabledIndices: a
1729
1737
  })), L !== y && !Ye(v, L)) {
1730
1738
  var T;
1731
- S.stopPropagation(), K.includes(S.key) && S.preventDefault(), R(L), (T = v.current[L]) == null || T.focus();
1739
+ D.stopPropagation(), W.includes(D.key) && D.preventDefault(), R(L), (T = v.current[L]) == null || T.focus();
1732
1740
  }
1733
1741
  }
1734
1742
  const N = {
@@ -1736,18 +1744,18 @@ const vr = /* @__PURE__ */ f.createContext({
1736
1744
  ...x,
1737
1745
  ref: n,
1738
1746
  "aria-orientation": o === "both" ? void 0 : o,
1739
- onKeyDown(S) {
1740
- d.onKeyDown == null || d.onKeyDown(S), x.onKeyDown == null || x.onKeyDown(S), k(S);
1747
+ onKeyDown(D) {
1748
+ d.onKeyDown == null || d.onKeyDown(D), x.onKeyDown == null || x.onKeyDown(D), k(D);
1741
1749
  }
1742
1750
  };
1743
1751
  return /* @__PURE__ */ ge(vr.Provider, {
1744
- value: I,
1745
- children: /* @__PURE__ */ ge(Po, {
1752
+ value: C,
1753
+ children: /* @__PURE__ */ ge(Lo, {
1746
1754
  elementsRef: v,
1747
1755
  children: hr(r, N)
1748
1756
  })
1749
1757
  });
1750
- }), fi = /* @__PURE__ */ f.forwardRef(function(t, n) {
1758
+ }), gi = /* @__PURE__ */ f.forwardRef(function(t, n) {
1751
1759
  const {
1752
1760
  render: r,
1753
1761
  ...o
@@ -1757,7 +1765,7 @@ const vr = /* @__PURE__ */ f.createContext({
1757
1765
  } = f.useContext(vr), {
1758
1766
  ref: a,
1759
1767
  index: u
1760
- } = So(), l = Ao([a, n, s.ref]), p = i === u, g = {
1768
+ } = Fo(), l = Do([a, n, s.ref]), p = i === u, g = {
1761
1769
  ...o,
1762
1770
  ...s,
1763
1771
  ref: l,
@@ -1768,24 +1776,24 @@ const vr = /* @__PURE__ */ f.createContext({
1768
1776
  }
1769
1777
  };
1770
1778
  return hr(r, g);
1771
- }), ko = {
1779
+ }), _o = {
1772
1780
  ...f
1773
1781
  };
1774
- let In = !1, Lo = 0;
1775
- const Cn = () => (
1782
+ let Cn = !1, Wo = 0;
1783
+ const In = () => (
1776
1784
  // Ensure the id is unique with multiple independent versions of Floating UI
1777
1785
  // on <React 18
1778
- "floating-ui-" + Math.random().toString(36).slice(2, 6) + Lo++
1786
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + Wo++
1779
1787
  );
1780
- function Fo() {
1781
- const [e, t] = f.useState(() => In ? Cn() : void 0);
1788
+ function Ko() {
1789
+ const [e, t] = f.useState(() => Cn ? In() : void 0);
1782
1790
  return X(() => {
1783
- e == null && t(Cn());
1791
+ e == null && t(In());
1784
1792
  }, []), f.useEffect(() => {
1785
- In = !0;
1793
+ Cn = !0;
1786
1794
  }, []), e;
1787
1795
  }
1788
- const No = ko.useId, Lt = No || Fo;
1796
+ const Vo = _o.useId, Lt = Vo || Ko;
1789
1797
  let ct;
1790
1798
  process.env.NODE_ENV !== "production" && (ct = /* @__PURE__ */ new Set());
1791
1799
  function Ht() {
@@ -1797,7 +1805,7 @@ function Ht() {
1797
1805
  (s = ct) == null || s.add(o), console.warn(o);
1798
1806
  }
1799
1807
  }
1800
- function _o() {
1808
+ function $o() {
1801
1809
  for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1802
1810
  n[r] = arguments[r];
1803
1811
  const o = "Floating UI: " + n.join(" ");
@@ -1822,12 +1830,12 @@ function xr() {
1822
1830
  }
1823
1831
  };
1824
1832
  }
1825
- const wr = /* @__PURE__ */ f.createContext(null), Rr = /* @__PURE__ */ f.createContext(null), Ze = () => {
1833
+ const wr = /* @__PURE__ */ f.createContext(null), Rr = /* @__PURE__ */ f.createContext(null), et = () => {
1826
1834
  var e;
1827
1835
  return ((e = f.useContext(wr)) == null ? void 0 : e.id) || null;
1828
- }, et = () => f.useContext(Rr);
1829
- function di(e) {
1830
- const t = Lt(), n = et(), o = Ze();
1836
+ }, tt = () => f.useContext(Rr);
1837
+ function hi(e) {
1838
+ const t = Lt(), n = tt(), o = et();
1831
1839
  return X(() => {
1832
1840
  if (!t) return;
1833
1841
  const s = {
@@ -1839,11 +1847,11 @@ function di(e) {
1839
1847
  };
1840
1848
  }, [n, t, o]), t;
1841
1849
  }
1842
- function mi(e) {
1850
+ function vi(e) {
1843
1851
  const {
1844
1852
  children: t,
1845
1853
  id: n
1846
- } = e, r = Ze();
1854
+ } = e, r = et();
1847
1855
  return /* @__PURE__ */ ge(wr.Provider, {
1848
1856
  value: f.useMemo(() => ({
1849
1857
  id: n,
@@ -1852,7 +1860,7 @@ function mi(e) {
1852
1860
  children: t
1853
1861
  });
1854
1862
  }
1855
- function pi(e) {
1863
+ function bi(e) {
1856
1864
  const {
1857
1865
  children: t
1858
1866
  } = e, n = f.useRef([]), r = f.useCallback((i) => {
@@ -1870,13 +1878,13 @@ function pi(e) {
1870
1878
  children: t
1871
1879
  });
1872
1880
  }
1873
- function Ue(e) {
1881
+ function Ge(e) {
1874
1882
  return "data-floating-ui-" + e;
1875
1883
  }
1876
1884
  function ve(e) {
1877
1885
  e.current !== -1 && (clearTimeout(e.current), e.current = -1);
1878
1886
  }
1879
- const Tn = /* @__PURE__ */ Ue("safe-polygon");
1887
+ const Tn = /* @__PURE__ */ Ge("safe-polygon");
1880
1888
  function zt(e, t, n) {
1881
1889
  if (n && !it(n))
1882
1890
  return 0;
@@ -1891,7 +1899,7 @@ function zt(e, t, n) {
1891
1899
  function Ut(e) {
1892
1900
  return typeof e == "function" ? e() : e;
1893
1901
  }
1894
- function gi(e, t) {
1902
+ function yi(e, t) {
1895
1903
  t === void 0 && (t = {});
1896
1904
  const {
1897
1905
  open: n,
@@ -1906,8 +1914,8 @@ function gi(e, t) {
1906
1914
  mouseOnly: l = !1,
1907
1915
  restMs: p = 0,
1908
1916
  move: g = !0
1909
- } = t, d = et(), h = Ze(), m = xe(u), y = xe(a), R = xe(n), v = xe(p), x = f.useRef(), I = f.useRef(-1), A = f.useRef(), k = f.useRef(-1), N = f.useRef(!0), S = f.useRef(!1), L = f.useRef(() => {
1910
- }), F = f.useRef(!1), _ = ce(() => {
1917
+ } = t, d = tt(), h = et(), m = xe(u), y = xe(a), R = xe(n), v = xe(p), x = f.useRef(), C = f.useRef(-1), A = f.useRef(), k = f.useRef(-1), N = f.useRef(!0), D = f.useRef(!1), L = f.useRef(() => {
1918
+ }), F = f.useRef(!1), _ = se(() => {
1911
1919
  var T;
1912
1920
  const b = (T = o.current.openEvent) == null ? void 0 : T.type;
1913
1921
  return (b == null ? void 0 : b.includes("mouse")) && b !== "mousedown";
@@ -1918,7 +1926,7 @@ function gi(e, t) {
1918
1926
  let {
1919
1927
  open: E
1920
1928
  } = b;
1921
- E || (ve(I), ve(k), N.current = !0, F.current = !1);
1929
+ E || (ve(C), ve(k), N.current = !0, F.current = !1);
1922
1930
  }
1923
1931
  return s.on("openchange", T), () => {
1924
1932
  s.off("openchange", T);
@@ -1928,104 +1936,104 @@ function gi(e, t) {
1928
1936
  function T(E) {
1929
1937
  _() && r(!1, E, "hover");
1930
1938
  }
1931
- const b = ae(i.floating).documentElement;
1939
+ const b = le(i.floating).documentElement;
1932
1940
  return b.addEventListener("mouseleave", T), () => {
1933
1941
  b.removeEventListener("mouseleave", T);
1934
1942
  };
1935
1943
  }, [i.floating, n, r, c, m, _]);
1936
1944
  const U = f.useCallback(function(T, b, E) {
1937
1945
  b === void 0 && (b = !0), E === void 0 && (E = "hover");
1938
- const M = zt(y.current, "close", x.current);
1939
- M && !A.current ? (ve(I), I.current = window.setTimeout(() => r(!1, T, E), M)) : b && (ve(I), r(!1, T, E));
1940
- }, [y, r]), V = ce(() => {
1946
+ const S = zt(y.current, "close", x.current);
1947
+ S && !A.current ? (ve(C), C.current = window.setTimeout(() => r(!1, T, E), S)) : b && (ve(C), r(!1, T, E));
1948
+ }, [y, r]), K = se(() => {
1941
1949
  L.current(), A.current = void 0;
1942
- }), O = ce(() => {
1943
- if (S.current) {
1944
- const T = ae(i.floating).body;
1945
- T.style.pointerEvents = "", T.removeAttribute(Tn), S.current = !1;
1950
+ }), O = se(() => {
1951
+ if (D.current) {
1952
+ const T = le(i.floating).body;
1953
+ T.style.pointerEvents = "", T.removeAttribute(Tn), D.current = !1;
1946
1954
  }
1947
- }), w = ce(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
1955
+ }), w = se(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
1948
1956
  f.useEffect(() => {
1949
1957
  if (!c) return;
1950
- function T(C) {
1951
- if (ve(I), N.current = !1, l && !it(x.current) || Ut(v.current) > 0 && !zt(y.current, "open"))
1958
+ function T(I) {
1959
+ if (ve(C), N.current = !1, l && !it(x.current) || Ut(v.current) > 0 && !zt(y.current, "open"))
1952
1960
  return;
1953
- const W = zt(y.current, "open", x.current);
1954
- W ? I.current = window.setTimeout(() => {
1955
- R.current || r(!0, C, "hover");
1956
- }, W) : n || r(!0, C, "hover");
1961
+ const V = zt(y.current, "open", x.current);
1962
+ V ? C.current = window.setTimeout(() => {
1963
+ R.current || r(!0, I, "hover");
1964
+ }, V) : n || r(!0, I, "hover");
1957
1965
  }
1958
- function b(C) {
1966
+ function b(I) {
1959
1967
  if (w()) {
1960
1968
  O();
1961
1969
  return;
1962
1970
  }
1963
1971
  L.current();
1964
- const W = ae(i.floating);
1972
+ const V = le(i.floating);
1965
1973
  if (ve(k), F.current = !1, m.current && o.current.floatingContext) {
1966
- n || ve(I), A.current = m.current({
1974
+ n || ve(C), A.current = m.current({
1967
1975
  ...o.current.floatingContext,
1968
1976
  tree: d,
1969
- x: C.clientX,
1970
- y: C.clientY,
1977
+ x: I.clientX,
1978
+ y: I.clientY,
1971
1979
  onClose() {
1972
- O(), V(), w() || U(C, !0, "safe-polygon");
1980
+ O(), K(), w() || U(I, !0, "safe-polygon");
1973
1981
  }
1974
1982
  });
1975
- const fe = A.current;
1976
- W.addEventListener("mousemove", fe), L.current = () => {
1977
- W.removeEventListener("mousemove", fe);
1983
+ const ae = A.current;
1984
+ V.addEventListener("mousemove", ae), L.current = () => {
1985
+ V.removeEventListener("mousemove", ae);
1978
1986
  };
1979
1987
  return;
1980
1988
  }
1981
- (x.current === "touch" ? !ue(i.floating, C.relatedTarget) : !0) && U(C);
1989
+ (x.current === "touch" ? !ce(i.floating, I.relatedTarget) : !0) && U(I);
1982
1990
  }
1983
- function E(C) {
1991
+ function E(I) {
1984
1992
  w() || o.current.floatingContext && (m.current == null || m.current({
1985
1993
  ...o.current.floatingContext,
1986
1994
  tree: d,
1987
- x: C.clientX,
1988
- y: C.clientY,
1995
+ x: I.clientX,
1996
+ y: I.clientY,
1989
1997
  onClose() {
1990
- O(), V(), w() || U(C);
1998
+ O(), K(), w() || U(I);
1991
1999
  }
1992
- })(C));
2000
+ })(I));
1993
2001
  }
1994
- function M() {
1995
- ve(I);
2002
+ function S() {
2003
+ ve(C);
1996
2004
  }
1997
- function G(C) {
1998
- w() || U(C, !1);
2005
+ function G(I) {
2006
+ w() || U(I, !1);
1999
2007
  }
2000
2008
  if (Y(i.domReference)) {
2001
- const C = i.domReference, W = i.floating;
2002
- return n && C.addEventListener("mouseleave", E), g && C.addEventListener("mousemove", T, {
2009
+ const I = i.domReference, V = i.floating;
2010
+ return n && I.addEventListener("mouseleave", E), g && I.addEventListener("mousemove", T, {
2003
2011
  once: !0
2004
- }), C.addEventListener("mouseenter", T), C.addEventListener("mouseleave", b), W && (W.addEventListener("mouseleave", E), W.addEventListener("mouseenter", M), W.addEventListener("mouseleave", G)), () => {
2005
- n && C.removeEventListener("mouseleave", E), g && C.removeEventListener("mousemove", T), C.removeEventListener("mouseenter", T), C.removeEventListener("mouseleave", b), W && (W.removeEventListener("mouseleave", E), W.removeEventListener("mouseenter", M), W.removeEventListener("mouseleave", G));
2012
+ }), I.addEventListener("mouseenter", T), I.addEventListener("mouseleave", b), V && (V.addEventListener("mouseleave", E), V.addEventListener("mouseenter", S), V.addEventListener("mouseleave", G)), () => {
2013
+ n && I.removeEventListener("mouseleave", E), g && I.removeEventListener("mousemove", T), I.removeEventListener("mouseenter", T), I.removeEventListener("mouseleave", b), V && (V.removeEventListener("mouseleave", E), V.removeEventListener("mouseenter", S), V.removeEventListener("mouseleave", G));
2006
2014
  };
2007
2015
  }
2008
- }, [i, c, e, l, g, U, V, O, r, n, R, d, y, m, o, w, v]), X(() => {
2016
+ }, [i, c, e, l, g, U, K, O, r, n, R, d, y, m, o, w, v]), X(() => {
2009
2017
  var T;
2010
2018
  if (c && n && (T = m.current) != null && (T = T.__options) != null && T.blockPointerEvents && _()) {
2011
- S.current = !0;
2019
+ D.current = !0;
2012
2020
  const E = i.floating;
2013
2021
  if (Y(i.domReference) && E) {
2014
2022
  var b;
2015
- const M = ae(i.floating).body;
2016
- M.setAttribute(Tn, "");
2017
- const G = i.domReference, C = d == null || (b = d.nodesRef.current.find((W) => W.id === h)) == null || (b = b.context) == null ? void 0 : b.elements.floating;
2018
- return C && (C.style.pointerEvents = ""), M.style.pointerEvents = "none", G.style.pointerEvents = "auto", E.style.pointerEvents = "auto", () => {
2019
- M.style.pointerEvents = "", G.style.pointerEvents = "", E.style.pointerEvents = "";
2023
+ const S = le(i.floating).body;
2024
+ S.setAttribute(Tn, "");
2025
+ const G = i.domReference, I = d == null || (b = d.nodesRef.current.find((V) => V.id === h)) == null || (b = b.context) == null ? void 0 : b.elements.floating;
2026
+ return I && (I.style.pointerEvents = ""), S.style.pointerEvents = "none", G.style.pointerEvents = "auto", E.style.pointerEvents = "auto", () => {
2027
+ S.style.pointerEvents = "", G.style.pointerEvents = "", E.style.pointerEvents = "";
2020
2028
  };
2021
2029
  }
2022
2030
  }
2023
2031
  }, [c, n, h, i, d, m, _]), X(() => {
2024
- n || (x.current = void 0, F.current = !1, V(), O());
2025
- }, [n, V, O]), f.useEffect(() => () => {
2026
- V(), ve(I), ve(k), O();
2027
- }, [c, i.domReference, V, O]);
2028
- const K = f.useMemo(() => {
2032
+ n || (x.current = void 0, F.current = !1, K(), O());
2033
+ }, [n, K, O]), f.useEffect(() => () => {
2034
+ K(), ve(C), ve(k), O();
2035
+ }, [c, i.domReference, K, O]);
2036
+ const W = f.useMemo(() => {
2029
2037
  function T(b) {
2030
2038
  x.current = b.pointerType;
2031
2039
  }
@@ -2036,19 +2044,19 @@ function gi(e, t) {
2036
2044
  const {
2037
2045
  nativeEvent: E
2038
2046
  } = b;
2039
- function M() {
2047
+ function S() {
2040
2048
  !N.current && !R.current && r(!0, E, "hover");
2041
2049
  }
2042
- l && !it(x.current) || n || Ut(v.current) === 0 || F.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ve(k), x.current === "touch" ? M() : (F.current = !0, k.current = window.setTimeout(M, Ut(v.current))));
2050
+ l && !it(x.current) || n || Ut(v.current) === 0 || F.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ve(k), x.current === "touch" ? S() : (F.current = !0, k.current = window.setTimeout(S, Ut(v.current))));
2043
2051
  }
2044
2052
  };
2045
2053
  }, [l, r, n, R, v]);
2046
2054
  return f.useMemo(() => c ? {
2047
- reference: K
2048
- } : {}, [c, K]);
2055
+ reference: W
2056
+ } : {}, [c, W]);
2049
2057
  }
2050
2058
  let On = 0;
2051
- function We(e, t) {
2059
+ function Be(e, t) {
2052
2060
  t === void 0 && (t = {});
2053
2061
  const {
2054
2062
  preventScroll: n = !1,
@@ -2061,18 +2069,26 @@ function We(e, t) {
2061
2069
  });
2062
2070
  o ? s() : On = requestAnimationFrame(s);
2063
2071
  }
2064
- function Ko(e) {
2072
+ function Bo(e) {
2065
2073
  return (e == null ? void 0 : e.ownerDocument) || document;
2066
2074
  }
2067
- let Ge = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakSet(), ht = {}, Gt = 0;
2068
- const Vo = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, Er = (e) => e && (e.host || Er(e.parentNode)), Wo = (e, t) => t.map((n) => {
2075
+ const Je = {
2076
+ inert: /* @__PURE__ */ new WeakMap(),
2077
+ "aria-hidden": /* @__PURE__ */ new WeakMap(),
2078
+ none: /* @__PURE__ */ new WeakMap()
2079
+ };
2080
+ function An(e) {
2081
+ return e === "inert" ? Je.inert : e === "aria-hidden" ? Je["aria-hidden"] : Je.none;
2082
+ }
2083
+ let gt = /* @__PURE__ */ new WeakSet(), ht = {}, Gt = 0;
2084
+ const Ho = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, Er = (e) => e && (e.host || Er(e.parentNode)), zo = (e, t) => t.map((n) => {
2069
2085
  if (e.contains(n))
2070
2086
  return n;
2071
2087
  const r = Er(n);
2072
2088
  return e.contains(r) ? r : null;
2073
2089
  }).filter((n) => n != null);
2074
- function $o(e, t, n, r) {
2075
- const o = "data-floating-ui-inert", s = r ? "inert" : n ? "aria-hidden" : null, i = Wo(t, e), c = /* @__PURE__ */ new Set(), a = new Set(i), u = [];
2090
+ function Uo(e, t, n, r) {
2091
+ const o = "data-floating-ui-inert", s = r ? "inert" : n ? "aria-hidden" : null, i = zo(t, e), c = /* @__PURE__ */ new Set(), a = new Set(i), u = [];
2076
2092
  ht[o] || (ht[o] = /* @__PURE__ */ new WeakMap());
2077
2093
  const l = ht[o];
2078
2094
  i.forEach(p), g(t), c.clear();
@@ -2081,26 +2097,26 @@ function $o(e, t, n, r) {
2081
2097
  }
2082
2098
  function g(d) {
2083
2099
  !d || a.has(d) || [].forEach.call(d.children, (h) => {
2084
- if (_e(h) !== "script")
2100
+ if (Ke(h) !== "script")
2085
2101
  if (c.has(h))
2086
2102
  g(h);
2087
2103
  else {
2088
- const m = s ? h.getAttribute(s) : null, y = m !== null && m !== "false", R = Ge.get(h) || 0, v = s ? R + 1 : R, x = (l.get(h) || 0) + 1;
2089
- Ge.set(h, v), l.set(h, x), u.push(h), v === 1 && y && gt.add(h), x === 1 && h.setAttribute(o, ""), !y && s && h.setAttribute(s, s === "inert" ? "" : "true");
2104
+ const m = s ? h.getAttribute(s) : null, y = m !== null && m !== "false", R = An(s), v = (R.get(h) || 0) + 1, x = (l.get(h) || 0) + 1;
2105
+ R.set(h, v), l.set(h, x), u.push(h), v === 1 && y && gt.add(h), x === 1 && h.setAttribute(o, ""), !y && s && h.setAttribute(s, s === "inert" ? "" : "true");
2090
2106
  }
2091
2107
  });
2092
2108
  }
2093
2109
  return Gt++, () => {
2094
2110
  u.forEach((d) => {
2095
- const h = Ge.get(d) || 0, m = s ? h - 1 : h, y = (l.get(d) || 0) - 1;
2096
- Ge.set(d, m), l.set(d, y), m || (!gt.has(d) && s && d.removeAttribute(s), gt.delete(d)), y || d.removeAttribute(o);
2097
- }), Gt--, Gt || (Ge = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakSet(), ht = {});
2111
+ const h = An(s), y = (h.get(d) || 0) - 1, R = (l.get(d) || 0) - 1;
2112
+ h.set(d, y), l.set(d, R), y || (!gt.has(d) && s && d.removeAttribute(s), gt.delete(d)), R || d.removeAttribute(o);
2113
+ }), Gt--, Gt || (Je.inert = /* @__PURE__ */ new WeakMap(), Je["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Je.none = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakSet(), ht = {});
2098
2114
  };
2099
2115
  }
2100
- function An(e, t, n) {
2116
+ function Mn(e, t, n) {
2101
2117
  t === void 0 && (t = !1), n === void 0 && (n = !1);
2102
- const r = Ko(e[0]).body;
2103
- return $o(e.concat(Array.from(r.querySelectorAll("[aria-live]"))), r, t, n);
2118
+ const r = Bo(e[0]).body;
2119
+ return Uo(e.concat(Array.from(r.querySelectorAll("[aria-live]"))), r, t, n);
2104
2120
  }
2105
2121
  const Ft = {
2106
2122
  border: 0,
@@ -2125,20 +2141,20 @@ const Ft = {
2125
2141
  // Role is only for VoiceOver
2126
2142
  role: r,
2127
2143
  "aria-hidden": r ? void 0 : !0,
2128
- [Ue("focus-guard")]: "",
2144
+ [Ge("focus-guard")]: "",
2129
2145
  style: Ft
2130
2146
  };
2131
2147
  return /* @__PURE__ */ ge("span", {
2132
2148
  ...t,
2133
2149
  ...s
2134
2150
  });
2135
- }), Ir = /* @__PURE__ */ f.createContext(null), Mn = /* @__PURE__ */ Ue("portal");
2136
- function Bo(e) {
2151
+ }), Cr = /* @__PURE__ */ f.createContext(null), Sn = /* @__PURE__ */ Ge("portal");
2152
+ function Go(e) {
2137
2153
  e === void 0 && (e = {});
2138
2154
  const {
2139
2155
  id: t,
2140
2156
  root: n
2141
- } = e, r = Lt(), o = Cr(), [s, i] = f.useState(null), c = f.useRef(null);
2157
+ } = e, r = Lt(), o = Ir(), [s, i] = f.useState(null), c = f.useRef(null);
2142
2158
  return X(() => () => {
2143
2159
  s == null || s.remove(), queueMicrotask(() => {
2144
2160
  c.current = null;
@@ -2148,7 +2164,7 @@ function Bo(e) {
2148
2164
  const a = t ? document.getElementById(t) : null;
2149
2165
  if (!a) return;
2150
2166
  const u = document.createElement("div");
2151
- u.id = r, u.setAttribute(Mn, ""), a.appendChild(u), c.current = u, i(u);
2167
+ u.id = r, u.setAttribute(Sn, ""), a.appendChild(u), c.current = u, i(u);
2152
2168
  }, [t, r]), X(() => {
2153
2169
  if (n === null || !r || c.current) return;
2154
2170
  let a = n || (o == null ? void 0 : o.portalNode);
@@ -2156,16 +2172,16 @@ function Bo(e) {
2156
2172
  let u = null;
2157
2173
  t && (u = document.createElement("div"), u.id = t, a.appendChild(u));
2158
2174
  const l = document.createElement("div");
2159
- l.id = r, l.setAttribute(Mn, ""), a = u || a, a.appendChild(l), c.current = l, i(l);
2175
+ l.id = r, l.setAttribute(Sn, ""), a = u || a, a.appendChild(l), c.current = l, i(l);
2160
2176
  }, [t, n, r, o]), s;
2161
2177
  }
2162
- function hi(e) {
2178
+ function xi(e) {
2163
2179
  const {
2164
2180
  children: t,
2165
2181
  id: n,
2166
2182
  root: r,
2167
2183
  preserveTabOrder: o = !0
2168
- } = e, s = Bo({
2184
+ } = e, s = Go({
2169
2185
  id: n,
2170
2186
  root: r
2171
2187
  }), [i, c] = f.useState(null), a = f.useRef(null), u = f.useRef(null), l = f.useRef(null), p = f.useRef(null), g = i == null ? void 0 : i.modal, d = i == null ? void 0 : i.open, h = (
@@ -2179,14 +2195,14 @@ function hi(e) {
2179
2195
  if (!s || !o || g)
2180
2196
  return;
2181
2197
  function m(y) {
2182
- s && ot(y) && (y.type === "focusin" ? vn : Xr)(s);
2198
+ s && ot(y) && (y.type === "focusin" ? vn : Qr)(s);
2183
2199
  }
2184
2200
  return s.addEventListener("focusin", m, !0), s.addEventListener("focusout", m, !0), () => {
2185
2201
  s.removeEventListener("focusin", m, !0), s.removeEventListener("focusout", m, !0);
2186
2202
  };
2187
2203
  }, [s, o, g]), f.useEffect(() => {
2188
2204
  s && (d || vn(s));
2189
- }, [d, s]), /* @__PURE__ */ Hn(Ir.Provider, {
2205
+ }, [d, s]), /* @__PURE__ */ Hn(Cr.Provider, {
2190
2206
  value: f.useMemo(() => ({
2191
2207
  preserveTabOrder: o,
2192
2208
  beforeOutsideRef: a,
@@ -2226,7 +2242,7 @@ function hi(e) {
2226
2242
  })]
2227
2243
  });
2228
2244
  }
2229
- const Cr = () => f.useContext(Ir);
2245
+ const Ir = () => f.useContext(Cr);
2230
2246
  function Pn(e) {
2231
2247
  return f.useMemo(() => (t) => {
2232
2248
  e.forEach((n) => {
@@ -2234,19 +2250,19 @@ function Pn(e) {
2234
2250
  });
2235
2251
  }, e);
2236
2252
  }
2237
- const Ho = 20;
2238
- let $e = [];
2239
- function zo(e) {
2240
- $e = $e.filter((t) => t.isConnected), e && _e(e) !== "body" && ($e.push(e), $e.length > Ho && ($e = $e.slice(-20)));
2253
+ const jo = 20;
2254
+ let He = [];
2255
+ function qo(e) {
2256
+ He = He.filter((t) => t.isConnected), e && Ke(e) !== "body" && (He.push(e), He.length > jo && (He = He.slice(-20)));
2241
2257
  }
2242
- function Sn() {
2243
- return $e.slice().reverse().find((e) => e.isConnected);
2258
+ function Dn() {
2259
+ return He.slice().reverse().find((e) => e.isConnected);
2244
2260
  }
2245
- function Uo(e) {
2261
+ function Yo(e) {
2246
2262
  const t = lt();
2247
2263
  return Bn(e, t) ? e : At(e, t)[0] || e;
2248
2264
  }
2249
- function Dn(e, t) {
2265
+ function kn(e, t) {
2250
2266
  var n;
2251
2267
  if (!t.current.includes("floating") && !((n = e.getAttribute("role")) != null && n.includes("dialog")))
2252
2268
  return;
@@ -2256,7 +2272,7 @@ function Dn(e, t) {
2256
2272
  }), i = e.getAttribute("tabindex");
2257
2273
  t.current.includes("floating") || s.length === 0 ? i !== "0" && e.setAttribute("tabindex", "0") : (i !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
2258
2274
  }
2259
- const Go = /* @__PURE__ */ f.forwardRef(function(t, n) {
2275
+ const Xo = /* @__PURE__ */ f.forwardRef(function(t, n) {
2260
2276
  return /* @__PURE__ */ ge("button", {
2261
2277
  ...t,
2262
2278
  type: "button",
@@ -2265,7 +2281,7 @@ const Go = /* @__PURE__ */ f.forwardRef(function(t, n) {
2265
2281
  style: Ft
2266
2282
  });
2267
2283
  });
2268
- function vi(e) {
2284
+ function wi(e) {
2269
2285
  const {
2270
2286
  context: t,
2271
2287
  children: n,
@@ -2289,147 +2305,147 @@ function vi(e) {
2289
2305
  domReference: v,
2290
2306
  floating: x
2291
2307
  }
2292
- } = t, I = ce(() => {
2293
- var B;
2294
- return (B = R.current.floatingContext) == null ? void 0 : B.nodeId;
2295
- }), A = ce(d), k = typeof i == "number" && i < 0, N = Zt(v) && k, S = Vo(), L = S ? s : !0, F = !L || S && g, _ = xe(o), U = xe(i), V = xe(c), O = et(), w = Cr(), K = f.useRef(null), T = f.useRef(null), b = f.useRef(!1), E = f.useRef(!1), M = f.useRef(-1), G = w != null, C = Ct(x), W = ce(function(B) {
2296
- return B === void 0 && (B = C), B ? At(B, lt()) : [];
2297
- }), Z = ce((B) => {
2298
- const z = W(B);
2299
- return _.current.map((H) => v && H === "reference" ? v : C && H === "floating" ? C : z).filter(Boolean).flat();
2308
+ } = t, C = se(() => {
2309
+ var H;
2310
+ return (H = R.current.floatingContext) == null ? void 0 : H.nodeId;
2311
+ }), A = se(d), k = typeof i == "number" && i < 0, N = Zt(v) && k, D = Ho(), L = D ? s : !0, F = !L || D && g, _ = xe(o), U = xe(i), K = xe(c), O = tt(), w = Ir(), W = f.useRef(null), T = f.useRef(null), b = f.useRef(!1), E = f.useRef(!1), S = f.useRef(-1), G = w != null, I = It(x), V = se(function(H) {
2312
+ return H === void 0 && (H = I), H ? At(H, lt()) : [];
2313
+ }), ee = se((H) => {
2314
+ const z = V(H);
2315
+ return _.current.map(($) => v && $ === "reference" ? v : I && $ === "floating" ? I : z).filter(Boolean).flat();
2300
2316
  });
2301
2317
  f.useEffect(() => {
2302
2318
  if (r || !u) return;
2303
- function B(H) {
2304
- if (H.key === "Tab") {
2305
- ue(C, Re(ae(C))) && W().length === 0 && !N && pe(H);
2306
- const $ = Z(), se = De(H);
2307
- _.current[0] === "reference" && se === v && (pe(H), H.shiftKey ? We($[$.length - 1]) : We($[1])), _.current[1] === "floating" && se === C && H.shiftKey && (pe(H), We($[0]));
2319
+ function H($) {
2320
+ if ($.key === "Tab") {
2321
+ ce(I, Ee(le(I))) && V().length === 0 && !N && pe($);
2322
+ const B = ee(), oe = Se($);
2323
+ _.current[0] === "reference" && oe === v && (pe($), $.shiftKey ? Be(B[B.length - 1]) : Be(B[1])), _.current[1] === "floating" && oe === I && $.shiftKey && (pe($), Be(B[0]));
2308
2324
  }
2309
2325
  }
2310
- const z = ae(C);
2311
- return z.addEventListener("keydown", B), () => {
2312
- z.removeEventListener("keydown", B);
2326
+ const z = le(I);
2327
+ return z.addEventListener("keydown", H), () => {
2328
+ z.removeEventListener("keydown", H);
2313
2329
  };
2314
- }, [r, v, C, u, _, N, W, Z]), f.useEffect(() => {
2330
+ }, [r, v, I, u, _, N, V, ee]), f.useEffect(() => {
2315
2331
  if (r || !x) return;
2316
- function B(z) {
2317
- const H = De(z), se = W().indexOf(H);
2318
- se !== -1 && (M.current = se);
2332
+ function H(z) {
2333
+ const $ = Se(z), oe = V().indexOf($);
2334
+ oe !== -1 && (S.current = oe);
2319
2335
  }
2320
- return x.addEventListener("focusin", B), () => {
2321
- x.removeEventListener("focusin", B);
2336
+ return x.addEventListener("focusin", H), () => {
2337
+ x.removeEventListener("focusin", H);
2322
2338
  };
2323
- }, [r, x, W]), f.useEffect(() => {
2339
+ }, [r, x, V]), f.useEffect(() => {
2324
2340
  if (r || !p) return;
2325
- function B() {
2341
+ function H() {
2326
2342
  E.current = !0, setTimeout(() => {
2327
2343
  E.current = !1;
2328
2344
  });
2329
2345
  }
2330
- function z(H) {
2331
- const $ = H.relatedTarget, se = H.currentTarget;
2346
+ function z($) {
2347
+ const B = $.relatedTarget, oe = $.currentTarget, ne = Se($);
2332
2348
  queueMicrotask(() => {
2333
- const re = I(), me = !(ue(v, $) || ue(x, $) || ue($, x) || ue(w == null ? void 0 : w.portalNode, $) || $ != null && $.hasAttribute(Ue("focus-guard")) || O && (qe(O.nodesRef.current, re).find((ne) => {
2334
- var j, ee;
2335
- return ue((j = ne.context) == null ? void 0 : j.elements.floating, $) || ue((ee = ne.context) == null ? void 0 : ee.elements.domReference, $);
2336
- }) || hn(O.nodesRef.current, re).find((ne) => {
2337
- var j, ee, tt;
2338
- return [(j = ne.context) == null ? void 0 : j.elements.floating, Ct((ee = ne.context) == null ? void 0 : ee.elements.floating)].includes($) || ((tt = ne.context) == null ? void 0 : tt.elements.domReference) === $;
2349
+ const de = C(), me = !(ce(v, B) || ce(x, B) || ce(B, x) || ce(w == null ? void 0 : w.portalNode, B) || B != null && B.hasAttribute(Ge("focus-guard")) || O && (qe(O.nodesRef.current, de).find((q) => {
2350
+ var J, Re;
2351
+ return ce((J = q.context) == null ? void 0 : J.elements.floating, B) || ce((Re = q.context) == null ? void 0 : Re.elements.domReference, B);
2352
+ }) || hn(O.nodesRef.current, de).find((q) => {
2353
+ var J, Re, M;
2354
+ return [(J = q.context) == null ? void 0 : J.elements.floating, It((Re = q.context) == null ? void 0 : Re.elements.floating)].includes(B) || ((M = q.context) == null ? void 0 : M.elements.domReference) === B;
2339
2355
  })));
2340
- if (se === v && C && Dn(C, _), a && me && Re(ae(C)) === ae(C).body) {
2341
- oe(C) && C.focus();
2342
- const ne = M.current, j = W(), ee = j[ne] || j[j.length - 1] || C;
2343
- oe(ee) && ee.focus();
2356
+ if (oe === v && I && kn(I, _), a && oe !== v && !(ne != null && ne.isConnected) && Ee(le(I)) === le(I).body) {
2357
+ re(I) && I.focus();
2358
+ const q = S.current, J = V(), Re = J[q] || J[J.length - 1] || I;
2359
+ re(Re) && Re.focus();
2344
2360
  }
2345
2361
  if (R.current.insideReactTree) {
2346
2362
  R.current.insideReactTree = !1;
2347
2363
  return;
2348
2364
  }
2349
- (N || !u) && $ && me && !E.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
2350
- $ !== Sn() && (b.current = !0, m(!1, H, "focus-out"));
2365
+ (N || !u) && B && me && !E.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
2366
+ B !== Dn() && (b.current = !0, m(!1, $, "focus-out"));
2351
2367
  });
2352
2368
  }
2353
- if (x && oe(v))
2354
- return v.addEventListener("focusout", z), v.addEventListener("pointerdown", B), x.addEventListener("focusout", z), () => {
2355
- v.removeEventListener("focusout", z), v.removeEventListener("pointerdown", B), x.removeEventListener("focusout", z);
2369
+ if (x && re(v))
2370
+ return v.addEventListener("focusout", z), v.addEventListener("pointerdown", H), x.addEventListener("focusout", z), () => {
2371
+ v.removeEventListener("focusout", z), v.removeEventListener("pointerdown", H), x.removeEventListener("focusout", z);
2356
2372
  };
2357
- }, [r, v, x, C, u, O, w, m, p, a, W, N, I, _, R]);
2358
- const fe = f.useRef(null), te = f.useRef(null), de = Pn([fe, w == null ? void 0 : w.beforeInsideRef]), Oe = Pn([te, w == null ? void 0 : w.afterInsideRef]);
2373
+ }, [r, v, x, I, u, O, w, m, p, a, V, N, C, _, R]);
2374
+ const ae = f.useRef(null), te = f.useRef(null), fe = Pn([ae, w == null ? void 0 : w.beforeInsideRef]), Ae = Pn([te, w == null ? void 0 : w.afterInsideRef]);
2359
2375
  f.useEffect(() => {
2360
- var B, z;
2376
+ var H, z;
2361
2377
  if (r || !x) return;
2362
- const H = Array.from((w == null || (B = w.portalNode) == null ? void 0 : B.querySelectorAll("[" + Ue("portal") + "]")) || []), $ = O ? hn(O.nodesRef.current, I()) : [], se = O && !u ? $.map((j) => {
2363
- var ee;
2364
- return (ee = j.context) == null ? void 0 : ee.elements.floating;
2365
- }) : [], re = (z = $.find((j) => {
2366
- var ee;
2367
- return Zt(((ee = j.context) == null ? void 0 : ee.elements.domReference) || null);
2368
- })) == null || (z = z.context) == null ? void 0 : z.elements.domReference, me = [x, re, ...H, ...se, ...A(), K.current, T.current, fe.current, te.current, w == null ? void 0 : w.beforeOutsideRef.current, w == null ? void 0 : w.afterOutsideRef.current, _.current.includes("reference") || N ? v : null].filter((j) => j != null), ne = u || N ? An(me, !F, F) : An(me);
2378
+ const $ = Array.from((w == null || (H = w.portalNode) == null ? void 0 : H.querySelectorAll("[" + Ge("portal") + "]")) || []), B = O ? hn(O.nodesRef.current, C()) : [], oe = O && !u ? B.map((q) => {
2379
+ var J;
2380
+ return (J = q.context) == null ? void 0 : J.elements.floating;
2381
+ }) : [], ne = (z = B.find((q) => {
2382
+ var J;
2383
+ return Zt(((J = q.context) == null ? void 0 : J.elements.domReference) || null);
2384
+ })) == null || (z = z.context) == null ? void 0 : z.elements.domReference, de = [x, ne, ...$, ...oe, ...A(), W.current, T.current, ae.current, te.current, w == null ? void 0 : w.beforeOutsideRef.current, w == null ? void 0 : w.afterOutsideRef.current, _.current.includes("reference") || N ? v : null].filter((q) => q != null), me = u || N ? Mn(de, !F, F) : Mn(de);
2369
2385
  return () => {
2370
- ne();
2386
+ me();
2371
2387
  };
2372
- }, [r, v, x, u, _, w, N, L, F, O, I, A]), X(() => {
2373
- if (r || !oe(C)) return;
2374
- const B = ae(C), z = Re(B);
2388
+ }, [r, v, x, u, _, w, N, L, F, O, C, A]), X(() => {
2389
+ if (r || !re(I)) return;
2390
+ const H = le(I), z = Ee(H);
2375
2391
  queueMicrotask(() => {
2376
- const H = Z(C), $ = U.current, se = (typeof $ == "number" ? H[$] : $.current) || C, re = ue(C, z);
2377
- !k && !re && h && We(se, {
2378
- preventScroll: se === C
2392
+ const $ = ee(I), B = U.current, oe = (typeof B == "number" ? $[B] : B.current) || I, ne = ce(I, z);
2393
+ !k && !ne && h && Be(oe, {
2394
+ preventScroll: oe === I
2379
2395
  });
2380
2396
  });
2381
- }, [r, h, C, k, Z, U]), X(() => {
2382
- if (r || !C) return;
2383
- const B = ae(C), z = Re(B);
2384
- zo(z);
2385
- function H(re) {
2397
+ }, [r, h, I, k, ee, U]), X(() => {
2398
+ if (r || !I) return;
2399
+ const H = le(I), z = Ee(H);
2400
+ qo(z);
2401
+ function $(ne) {
2386
2402
  let {
2387
- reason: me,
2388
- event: ne,
2389
- nested: j
2390
- } = re;
2391
- if (["hover", "safe-polygon"].includes(me) && ne.type === "mouseleave" && (b.current = !0), me === "outside-press")
2392
- if (j)
2403
+ reason: de,
2404
+ event: me,
2405
+ nested: q
2406
+ } = ne;
2407
+ if (["hover", "safe-polygon"].includes(de) && me.type === "mouseleave" && (b.current = !0), de === "outside-press")
2408
+ if (q)
2393
2409
  b.current = !1;
2394
- else if (Zn(ne) || er(ne))
2410
+ else if (Zn(me) || er(me))
2395
2411
  b.current = !1;
2396
2412
  else {
2397
- let ee = !1;
2413
+ let J = !1;
2398
2414
  document.createElement("div").focus({
2399
2415
  get preventScroll() {
2400
- return ee = !0, !1;
2416
+ return J = !0, !1;
2401
2417
  }
2402
- }), ee ? b.current = !1 : b.current = !0;
2418
+ }), J ? b.current = !1 : b.current = !0;
2403
2419
  }
2404
2420
  }
2405
- y.on("openchange", H);
2406
- const $ = B.createElement("span");
2407
- $.setAttribute("tabindex", "-1"), $.setAttribute("aria-hidden", "true"), Object.assign($.style, Ft), G && v && v.insertAdjacentElement("afterend", $);
2408
- function se() {
2409
- if (typeof V.current == "boolean") {
2410
- const re = v || Sn();
2411
- return re && re.isConnected ? re : $;
2421
+ y.on("openchange", $);
2422
+ const B = H.createElement("span");
2423
+ B.setAttribute("tabindex", "-1"), B.setAttribute("aria-hidden", "true"), Object.assign(B.style, Ft), G && v && v.insertAdjacentElement("afterend", B);
2424
+ function oe() {
2425
+ if (typeof K.current == "boolean") {
2426
+ const ne = v || Dn();
2427
+ return ne && ne.isConnected ? ne : B;
2412
2428
  }
2413
- return V.current.current || $;
2429
+ return K.current.current || B;
2414
2430
  }
2415
2431
  return () => {
2416
- y.off("openchange", H);
2417
- const re = Re(B), me = ue(x, re) || O && qe(O.nodesRef.current, I()).some((j) => {
2418
- var ee;
2419
- return ue((ee = j.context) == null ? void 0 : ee.elements.floating, re);
2420
- }), ne = se();
2432
+ y.off("openchange", $);
2433
+ const ne = Ee(H), de = ce(x, ne) || O && qe(O.nodesRef.current, C()).some((q) => {
2434
+ var J;
2435
+ return ce((J = q.context) == null ? void 0 : J.elements.floating, ne);
2436
+ }), me = oe();
2421
2437
  queueMicrotask(() => {
2422
- const j = Uo(ne);
2438
+ const q = Yo(me);
2423
2439
  // eslint-disable-next-line react-hooks/exhaustive-deps
2424
- V.current && !b.current && oe(j) && // If the focus moved somewhere else after mount, avoid returning focus
2440
+ K.current && !b.current && re(q) && // If the focus moved somewhere else after mount, avoid returning focus
2425
2441
  // since it likely entered a different element which should be
2426
2442
  // respected: https://github.com/floating-ui/floating-ui/issues/2607
2427
- (!(j !== re && re !== B.body) || me) && j.focus({
2443
+ (!(q !== ne && ne !== H.body) || de) && q.focus({
2428
2444
  preventScroll: !0
2429
- }), $.remove();
2445
+ }), B.remove();
2430
2446
  });
2431
2447
  };
2432
- }, [r, x, C, V, R, y, O, G, v, I]), f.useEffect(() => {
2448
+ }, [r, x, I, K, R, y, O, G, v, C]), f.useEffect(() => {
2433
2449
  queueMicrotask(() => {
2434
2450
  b.current = !1;
2435
2451
  });
@@ -2445,43 +2461,43 @@ function vi(e) {
2445
2461
  w.setFocusManagerState(null);
2446
2462
  };
2447
2463
  }, [r, w, u, h, m, p, v]), X(() => {
2448
- r || C && Dn(C, _);
2449
- }, [r, C, _]);
2450
- function Ke(B) {
2451
- return r || !l || !u ? null : /* @__PURE__ */ ge(Go, {
2452
- ref: B === "start" ? K : T,
2464
+ r || I && kn(I, _);
2465
+ }, [r, I, _]);
2466
+ function Ve(H) {
2467
+ return r || !l || !u ? null : /* @__PURE__ */ ge(Xo, {
2468
+ ref: H === "start" ? W : T,
2453
2469
  onClick: (z) => m(!1, z.nativeEvent),
2454
2470
  children: typeof l == "string" ? l : "Dismiss"
2455
2471
  });
2456
2472
  }
2457
- const Ae = !r && L && (u ? !N : !0) && (G || u);
2473
+ const Me = !r && L && (u ? !N : !0) && (G || u);
2458
2474
  return /* @__PURE__ */ Hn(Ar, {
2459
- children: [Ae && /* @__PURE__ */ ge(Ot, {
2475
+ children: [Me && /* @__PURE__ */ ge(Ot, {
2460
2476
  "data-type": "inside",
2461
- ref: de,
2462
- onFocus: (B) => {
2477
+ ref: fe,
2478
+ onFocus: (H) => {
2463
2479
  if (u) {
2464
- const H = Z();
2465
- We(o[0] === "reference" ? H[0] : H[H.length - 1]);
2480
+ const $ = ee();
2481
+ Be(o[0] === "reference" ? $[0] : $[$.length - 1]);
2466
2482
  } else if (w != null && w.preserveTabOrder && w.portalNode)
2467
- if (b.current = !1, ot(B, w.portalNode)) {
2468
- const H = sr(v);
2469
- H == null || H.focus();
2483
+ if (b.current = !1, ot(H, w.portalNode)) {
2484
+ const $ = sr(v);
2485
+ $ == null || $.focus();
2470
2486
  } else {
2471
2487
  var z;
2472
2488
  (z = w.beforeOutsideRef.current) == null || z.focus();
2473
2489
  }
2474
2490
  }
2475
- }), !N && Ke("start"), n, Ke("end"), Ae && /* @__PURE__ */ ge(Ot, {
2491
+ }), !N && Ve("start"), n, Ve("end"), Me && /* @__PURE__ */ ge(Ot, {
2476
2492
  "data-type": "inside",
2477
- ref: Oe,
2478
- onFocus: (B) => {
2493
+ ref: Ae,
2494
+ onFocus: (H) => {
2479
2495
  if (u)
2480
- We(Z()[0]);
2496
+ Be(ee()[0]);
2481
2497
  else if (w != null && w.preserveTabOrder && w.portalNode)
2482
- if (p && (b.current = !0), ot(B, w.portalNode)) {
2483
- const H = cr(v);
2484
- H == null || H.focus();
2498
+ if (p && (b.current = !0), ot(H, w.portalNode)) {
2499
+ const $ = cr(v);
2500
+ $ == null || $.focus();
2485
2501
  } else {
2486
2502
  var z;
2487
2503
  (z = w.afterOutsideRef.current) == null || z.focus();
@@ -2491,11 +2507,11 @@ function vi(e) {
2491
2507
  });
2492
2508
  }
2493
2509
  let vt = 0;
2494
- const kn = "--floating-ui-scrollbar-width";
2495
- function jo() {
2510
+ const Ln = "--floating-ui-scrollbar-width";
2511
+ function Jo() {
2496
2512
  const e = rn(), t = /iP(hone|ad|od)|iOS/.test(e) || // iPads can claim to be MacIntel
2497
2513
  e === "MacIntel" && navigator.maxTouchPoints > 1, n = document.body.style, o = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft ? "paddingLeft" : "paddingRight", s = window.innerWidth - document.documentElement.clientWidth, i = n.left ? parseFloat(n.left) : window.scrollX, c = n.top ? parseFloat(n.top) : window.scrollY;
2498
- if (n.overflow = "hidden", n.setProperty(kn, s + "px"), s && (n[o] = s + "px"), t) {
2514
+ if (n.overflow = "hidden", n.setProperty(Ln, s + "px"), s && (n[o] = s + "px"), t) {
2499
2515
  var a, u;
2500
2516
  const l = ((a = window.visualViewport) == null ? void 0 : a.offsetLeft) || 0, p = ((u = window.visualViewport) == null ? void 0 : u.offsetTop) || 0;
2501
2517
  Object.assign(n, {
@@ -2509,7 +2525,7 @@ function jo() {
2509
2525
  Object.assign(n, {
2510
2526
  overflow: "",
2511
2527
  [o]: ""
2512
- }), n.removeProperty(kn), t && (Object.assign(n, {
2528
+ }), n.removeProperty(Ln), t && (Object.assign(n, {
2513
2529
  position: "",
2514
2530
  top: "",
2515
2531
  left: "",
@@ -2517,17 +2533,17 @@ function jo() {
2517
2533
  }), window.scrollTo(i, c));
2518
2534
  };
2519
2535
  }
2520
- let Ln = () => {
2536
+ let Fn = () => {
2521
2537
  };
2522
- const bi = /* @__PURE__ */ f.forwardRef(function(t, n) {
2538
+ const Ri = /* @__PURE__ */ f.forwardRef(function(t, n) {
2523
2539
  const {
2524
2540
  lockScroll: r = !1,
2525
2541
  ...o
2526
2542
  } = t;
2527
2543
  return X(() => {
2528
2544
  if (r)
2529
- return vt++, vt === 1 && (Ln = jo()), () => {
2530
- vt--, vt === 0 && Ln();
2545
+ return vt++, vt === 1 && (Fn = Jo()), () => {
2546
+ vt--, vt === 0 && Fn();
2531
2547
  };
2532
2548
  }, [r]), /* @__PURE__ */ ge("div", {
2533
2549
  ref: n,
@@ -2543,16 +2559,16 @@ const bi = /* @__PURE__ */ f.forwardRef(function(t, n) {
2543
2559
  }
2544
2560
  });
2545
2561
  });
2546
- function Fn(e) {
2547
- return oe(e.target) && e.target.tagName === "BUTTON";
2562
+ function Nn(e) {
2563
+ return re(e.target) && e.target.tagName === "BUTTON";
2548
2564
  }
2549
- function qo(e) {
2550
- return oe(e.target) && e.target.tagName === "A";
2565
+ function Qo(e) {
2566
+ return re(e.target) && e.target.tagName === "A";
2551
2567
  }
2552
- function Nn(e) {
2568
+ function _n(e) {
2553
2569
  return on(e);
2554
2570
  }
2555
- function yi(e, t) {
2571
+ function Ei(e, t) {
2556
2572
  t === void 0 && (t = {});
2557
2573
  const {
2558
2574
  open: n,
@@ -2585,32 +2601,32 @@ function yi(e, t) {
2585
2601
  it(y, !0) && u || (n && a && (!(o.current.openEvent && p) || o.current.openEvent.type === "click") ? r(!1, m.nativeEvent, "click") : r(!0, m.nativeEvent, "click"));
2586
2602
  },
2587
2603
  onKeyDown(m) {
2588
- g.current = void 0, !(m.defaultPrevented || !l || Fn(m)) && (m.key === " " && !Nn(s) && (m.preventDefault(), d.current = !0), !qo(m) && m.key === "Enter" && r(!(n && a), m.nativeEvent, "click"));
2604
+ g.current = void 0, !(m.defaultPrevented || !l || Nn(m)) && (m.key === " " && !_n(s) && (m.preventDefault(), d.current = !0), !Qo(m) && m.key === "Enter" && r(!(n && a), m.nativeEvent, "click"));
2589
2605
  },
2590
2606
  onKeyUp(m) {
2591
- m.defaultPrevented || !l || Fn(m) || Nn(s) || m.key === " " && d.current && (d.current = !1, r(!(n && a), m.nativeEvent, "click"));
2607
+ m.defaultPrevented || !l || Nn(m) || _n(s) || m.key === " " && d.current && (d.current = !1, r(!(n && a), m.nativeEvent, "click"));
2592
2608
  }
2593
2609
  }), [o, s, c, u, l, r, n, p, a]);
2594
2610
  return f.useMemo(() => i ? {
2595
2611
  reference: h
2596
2612
  } : {}, [i, h]);
2597
2613
  }
2598
- const Yo = {
2614
+ const Zo = {
2599
2615
  pointerdown: "onPointerDown",
2600
2616
  mousedown: "onMouseDown",
2601
2617
  click: "onClick"
2602
- }, Xo = {
2618
+ }, ei = {
2603
2619
  pointerdown: "onPointerDownCapture",
2604
2620
  mousedown: "onMouseDownCapture",
2605
2621
  click: "onClickCapture"
2606
- }, _n = (e) => {
2622
+ }, Wn = (e) => {
2607
2623
  var t, n;
2608
2624
  return {
2609
2625
  escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
2610
2626
  outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
2611
2627
  };
2612
2628
  };
2613
- function xi(e, t) {
2629
+ function Ci(e, t) {
2614
2630
  t === void 0 && (t = {});
2615
2631
  const {
2616
2632
  open: n,
@@ -2627,22 +2643,22 @@ function xi(e, t) {
2627
2643
  ancestorScroll: g = !1,
2628
2644
  bubbles: d,
2629
2645
  capture: h
2630
- } = t, m = et(), y = ce(typeof a == "function" ? a : () => !1), R = typeof a == "function" ? y : a, v = f.useRef(!1), {
2646
+ } = t, m = tt(), y = se(typeof a == "function" ? a : () => !1), R = typeof a == "function" ? y : a, v = f.useRef(!1), {
2631
2647
  escapeKey: x,
2632
- outsidePress: I
2633
- } = _n(d), {
2648
+ outsidePress: C
2649
+ } = Wn(d), {
2634
2650
  escapeKey: A,
2635
2651
  outsidePress: k
2636
- } = _n(h), N = f.useRef(!1), S = f.useRef(-1), L = ce((w) => {
2637
- var K;
2652
+ } = Wn(h), N = f.useRef(!1), D = f.useRef(-1), L = se((w) => {
2653
+ var W;
2638
2654
  if (!n || !i || !c || w.key !== "Escape" || N.current)
2639
2655
  return;
2640
- const T = (K = s.current.floatingContext) == null ? void 0 : K.nodeId, b = m ? qe(m.nodesRef.current, T) : [];
2656
+ const T = (W = s.current.floatingContext) == null ? void 0 : W.nodeId, b = m ? qe(m.nodesRef.current, T) : [];
2641
2657
  if (!x && (w.stopPropagation(), b.length > 0)) {
2642
2658
  let E = !0;
2643
- if (b.forEach((M) => {
2659
+ if (b.forEach((S) => {
2644
2660
  var G;
2645
- if ((G = M.context) != null && G.open && !M.context.dataRef.current.__escapeKeyBubbles) {
2661
+ if ((G = S.context) != null && G.open && !S.context.dataRef.current.__escapeKeyBubbles) {
2646
2662
  E = !1;
2647
2663
  return;
2648
2664
  }
@@ -2650,50 +2666,50 @@ function xi(e, t) {
2650
2666
  return;
2651
2667
  }
2652
2668
  r(!1, Gr(w) ? w.nativeEvent : w, "escape-key");
2653
- }), F = ce((w) => {
2654
- var K;
2669
+ }), F = se((w) => {
2670
+ var W;
2655
2671
  const T = () => {
2656
2672
  var b;
2657
- L(w), (b = De(w)) == null || b.removeEventListener("keydown", T);
2673
+ L(w), (b = Se(w)) == null || b.removeEventListener("keydown", T);
2658
2674
  };
2659
- (K = De(w)) == null || K.addEventListener("keydown", T);
2660
- }), _ = ce((w) => {
2661
- var K;
2675
+ (W = Se(w)) == null || W.addEventListener("keydown", T);
2676
+ }), _ = se((w) => {
2677
+ var W;
2662
2678
  const T = s.current.insideReactTree;
2663
2679
  s.current.insideReactTree = !1;
2664
2680
  const b = v.current;
2665
2681
  if (v.current = !1, u === "click" && b || T || typeof R == "function" && !R(w))
2666
2682
  return;
2667
- const E = De(w), M = "[" + Ue("inert") + "]", G = ae(o.floating).querySelectorAll(M);
2668
- let C = Y(E) ? E : null;
2669
- for (; C && !Me(C); ) {
2670
- const te = Pe(C);
2671
- if (Me(te) || !Y(te))
2683
+ const E = Se(w), S = "[" + Ge("inert") + "]", G = le(o.floating).querySelectorAll(S);
2684
+ let I = Y(E) ? E : null;
2685
+ for (; I && !De(I); ) {
2686
+ const te = ke(I);
2687
+ if (De(te) || !Y(te))
2672
2688
  break;
2673
- C = te;
2689
+ I = te;
2674
2690
  }
2675
2691
  if (G.length && Y(E) && !Hr(E) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2676
- !ue(E, o.floating) && // If the target root element contains none of the markers, then the
2692
+ !ce(E, o.floating) && // If the target root element contains none of the markers, then the
2677
2693
  // element was injected after the floating element rendered.
2678
- Array.from(G).every((te) => !ue(C, te)))
2694
+ Array.from(G).every((te) => !ce(I, te)))
2679
2695
  return;
2680
- if (oe(E) && O) {
2681
- const te = Me(E), de = we(E), Oe = /auto|scroll/, Ke = te || Oe.test(de.overflowX), Ae = te || Oe.test(de.overflowY), B = Ke && E.clientWidth > 0 && E.scrollWidth > E.clientWidth, z = Ae && E.clientHeight > 0 && E.scrollHeight > E.clientHeight, H = de.direction === "rtl", $ = z && (H ? w.offsetX <= E.offsetWidth - E.clientWidth : w.offsetX > E.clientWidth), se = B && w.offsetY > E.clientHeight;
2682
- if ($ || se)
2696
+ if (re(E) && O) {
2697
+ const te = De(E), fe = we(E), Ae = /auto|scroll/, Ve = te || Ae.test(fe.overflowX), Me = te || Ae.test(fe.overflowY), H = Ve && E.clientWidth > 0 && E.scrollWidth > E.clientWidth, z = Me && E.clientHeight > 0 && E.scrollHeight > E.clientHeight, $ = fe.direction === "rtl", B = z && ($ ? w.offsetX <= E.offsetWidth - E.clientWidth : w.offsetX > E.clientWidth), oe = H && w.offsetY > E.clientHeight;
2698
+ if (B || oe)
2683
2699
  return;
2684
2700
  }
2685
- const W = (K = s.current.floatingContext) == null ? void 0 : K.nodeId, Z = m && qe(m.nodesRef.current, W).some((te) => {
2686
- var de;
2687
- return Vt(w, (de = te.context) == null ? void 0 : de.elements.floating);
2701
+ const V = (W = s.current.floatingContext) == null ? void 0 : W.nodeId, ee = m && qe(m.nodesRef.current, V).some((te) => {
2702
+ var fe;
2703
+ return Kt(w, (fe = te.context) == null ? void 0 : fe.elements.floating);
2688
2704
  });
2689
- if (Vt(w, o.floating) || Vt(w, o.domReference) || Z)
2705
+ if (Kt(w, o.floating) || Kt(w, o.domReference) || ee)
2690
2706
  return;
2691
- const fe = m ? qe(m.nodesRef.current, W) : [];
2692
- if (fe.length > 0) {
2707
+ const ae = m ? qe(m.nodesRef.current, V) : [];
2708
+ if (ae.length > 0) {
2693
2709
  let te = !0;
2694
- if (fe.forEach((de) => {
2695
- var Oe;
2696
- if ((Oe = de.context) != null && Oe.open && !de.context.dataRef.current.__outsidePressBubbles) {
2710
+ if (ae.forEach((fe) => {
2711
+ var Ae;
2712
+ if ((Ae = fe.context) != null && Ae.open && !fe.context.dataRef.current.__outsidePressBubbles) {
2697
2713
  te = !1;
2698
2714
  return;
2699
2715
  }
@@ -2701,20 +2717,20 @@ function xi(e, t) {
2701
2717
  return;
2702
2718
  }
2703
2719
  r(!1, w, "outside-press");
2704
- }), U = ce((w) => {
2705
- var K;
2720
+ }), U = se((w) => {
2721
+ var W;
2706
2722
  const T = () => {
2707
2723
  var b;
2708
- _(w), (b = De(w)) == null || b.removeEventListener(u, T);
2724
+ _(w), (b = Se(w)) == null || b.removeEventListener(u, T);
2709
2725
  };
2710
- (K = De(w)) == null || K.addEventListener(u, T);
2726
+ (W = Se(w)) == null || W.addEventListener(u, T);
2711
2727
  });
2712
2728
  f.useEffect(() => {
2713
2729
  if (!n || !i)
2714
2730
  return;
2715
- s.current.__escapeKeyBubbles = x, s.current.__outsidePressBubbles = I;
2731
+ s.current.__escapeKeyBubbles = x, s.current.__outsidePressBubbles = C;
2716
2732
  let w = -1;
2717
- function K(G) {
2733
+ function W(G) {
2718
2734
  r(!1, G, "ancestor-scroll");
2719
2735
  }
2720
2736
  function T() {
@@ -2727,31 +2743,31 @@ function xi(e, t) {
2727
2743
  },
2728
2744
  // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2729
2745
  // Only apply to WebKit for the test to remain 0ms.
2730
- St() ? 5 : 0
2746
+ Pt() ? 5 : 0
2731
2747
  );
2732
2748
  }
2733
- const E = ae(o.floating);
2749
+ const E = le(o.floating);
2734
2750
  c && (E.addEventListener("keydown", A ? F : L, A), E.addEventListener("compositionstart", T), E.addEventListener("compositionend", b)), R && E.addEventListener(u, k ? U : _, k);
2735
- let M = [];
2736
- return g && (Y(o.domReference) && (M = ke(o.domReference)), Y(o.floating) && (M = M.concat(ke(o.floating))), !Y(o.reference) && o.reference && o.reference.contextElement && (M = M.concat(ke(o.reference.contextElement)))), M = M.filter((G) => {
2737
- var C;
2738
- return G !== ((C = E.defaultView) == null ? void 0 : C.visualViewport);
2739
- }), M.forEach((G) => {
2740
- G.addEventListener("scroll", K, {
2751
+ let S = [];
2752
+ return g && (Y(o.domReference) && (S = Fe(o.domReference)), Y(o.floating) && (S = S.concat(Fe(o.floating))), !Y(o.reference) && o.reference && o.reference.contextElement && (S = S.concat(Fe(o.reference.contextElement)))), S = S.filter((G) => {
2753
+ var I;
2754
+ return G !== ((I = E.defaultView) == null ? void 0 : I.visualViewport);
2755
+ }), S.forEach((G) => {
2756
+ G.addEventListener("scroll", W, {
2741
2757
  passive: !0
2742
2758
  });
2743
2759
  }), () => {
2744
- c && (E.removeEventListener("keydown", A ? F : L, A), E.removeEventListener("compositionstart", T), E.removeEventListener("compositionend", b)), R && E.removeEventListener(u, k ? U : _, k), M.forEach((G) => {
2745
- G.removeEventListener("scroll", K);
2760
+ c && (E.removeEventListener("keydown", A ? F : L, A), E.removeEventListener("compositionstart", T), E.removeEventListener("compositionend", b)), R && E.removeEventListener(u, k ? U : _, k), S.forEach((G) => {
2761
+ G.removeEventListener("scroll", W);
2746
2762
  }), window.clearTimeout(w);
2747
2763
  };
2748
- }, [s, o, c, R, u, n, r, g, i, x, I, L, A, F, _, k, U]), f.useEffect(() => {
2764
+ }, [s, o, c, R, u, n, r, g, i, x, C, L, A, F, _, k, U]), f.useEffect(() => {
2749
2765
  s.current.insideReactTree = !1;
2750
2766
  }, [s, R, u]);
2751
- const V = f.useMemo(() => ({
2767
+ const K = f.useMemo(() => ({
2752
2768
  onKeyDown: L,
2753
2769
  ...l && {
2754
- [Yo[p]]: (w) => {
2770
+ [Zo[p]]: (w) => {
2755
2771
  r(!1, w.nativeEvent, "reference-press");
2756
2772
  },
2757
2773
  ...p !== "click" && {
@@ -2768,31 +2784,31 @@ function xi(e, t) {
2768
2784
  onMouseUp() {
2769
2785
  v.current = !0;
2770
2786
  },
2771
- [Xo[u]]: () => {
2787
+ [ei[u]]: () => {
2772
2788
  s.current.insideReactTree = !0;
2773
2789
  },
2774
2790
  onBlurCapture() {
2775
- m || (ve(S), s.current.insideReactTree = !0, S.current = window.setTimeout(() => {
2791
+ m || (ve(D), s.current.insideReactTree = !0, D.current = window.setTimeout(() => {
2776
2792
  s.current.insideReactTree = !1;
2777
2793
  }));
2778
2794
  }
2779
2795
  }), [L, u, s, m]);
2780
2796
  return f.useMemo(() => i ? {
2781
- reference: V,
2797
+ reference: K,
2782
2798
  floating: O
2783
- } : {}, [i, V, O]);
2799
+ } : {}, [i, K, O]);
2784
2800
  }
2785
- function Jo(e) {
2801
+ function ti(e) {
2786
2802
  const {
2787
2803
  open: t = !1,
2788
2804
  onOpenChange: n,
2789
2805
  elements: r
2790
- } = e, o = Lt(), s = f.useRef({}), [i] = f.useState(() => xr()), c = Ze() != null;
2806
+ } = e, o = Lt(), s = f.useRef({}), [i] = f.useState(() => xr()), c = et() != null;
2791
2807
  if (process.env.NODE_ENV !== "production") {
2792
2808
  const d = r.reference;
2793
- d && !Y(d) && _o("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2809
+ d && !Y(d) && $o("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2794
2810
  }
2795
- const [a, u] = f.useState(r.reference), l = ce((d, h, m) => {
2811
+ const [a, u] = f.useState(r.reference), l = se((d, h, m) => {
2796
2812
  s.current.openEvent = d ? h : void 0, i.emit("openchange", {
2797
2813
  open: d,
2798
2814
  event: h,
@@ -2816,22 +2832,22 @@ function Jo(e) {
2816
2832
  refs: p
2817
2833
  }), [t, l, g, i, o, p]);
2818
2834
  }
2819
- function wi(e) {
2835
+ function Ii(e) {
2820
2836
  e === void 0 && (e = {});
2821
2837
  const {
2822
2838
  nodeId: t
2823
- } = e, n = Jo({
2839
+ } = e, n = ti({
2824
2840
  ...e,
2825
2841
  elements: {
2826
2842
  reference: null,
2827
2843
  floating: null,
2828
2844
  ...e.elements
2829
2845
  }
2830
- }), r = e.rootContext || n, o = r.elements, [s, i] = f.useState(null), [c, a] = f.useState(null), l = (o == null ? void 0 : o.domReference) || s, p = f.useRef(null), g = et();
2846
+ }), r = e.rootContext || n, o = r.elements, [s, i] = f.useState(null), [c, a] = f.useState(null), l = (o == null ? void 0 : o.domReference) || s, p = f.useRef(null), g = tt();
2831
2847
  X(() => {
2832
2848
  l && (p.current = l);
2833
2849
  }, [l]);
2834
- const d = Oo({
2850
+ const d = Po({
2835
2851
  ...e,
2836
2852
  elements: {
2837
2853
  ...o,
@@ -2840,12 +2856,12 @@ function wi(e) {
2840
2856
  }
2841
2857
  }
2842
2858
  }), h = f.useCallback((x) => {
2843
- const I = Y(x) ? {
2859
+ const C = Y(x) ? {
2844
2860
  getBoundingClientRect: () => x.getBoundingClientRect(),
2845
2861
  getClientRects: () => x.getClientRects(),
2846
2862
  contextElement: x
2847
2863
  } : x;
2848
- a(I), d.refs.setReference(I);
2864
+ a(C), d.refs.setReference(C);
2849
2865
  }, [d.refs]), m = f.useCallback((x) => {
2850
2866
  (Y(x) || x === null) && (p.current = x, i(x)), (Y(d.refs.reference.current) || d.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2851
2867
  // `null` to support `positionReference` + an unstable `reference`
@@ -2868,7 +2884,7 @@ function wi(e) {
2868
2884
  }), [d, y, R, t, r]);
2869
2885
  return X(() => {
2870
2886
  r.dataRef.current.floatingContext = v;
2871
- const x = g == null ? void 0 : g.nodesRef.current.find((I) => I.id === t);
2887
+ const x = g == null ? void 0 : g.nodesRef.current.find((C) => C.id === t);
2872
2888
  x && (x.context = v);
2873
2889
  }), f.useMemo(() => ({
2874
2890
  ...d,
@@ -2878,9 +2894,9 @@ function wi(e) {
2878
2894
  }), [d, y, R, v]);
2879
2895
  }
2880
2896
  function jt() {
2881
- return Vr() && Jn();
2897
+ return Kr() && Jn();
2882
2898
  }
2883
- function Ri(e, t) {
2899
+ function Ti(e, t) {
2884
2900
  t === void 0 && (t = {});
2885
2901
  const {
2886
2902
  open: n,
@@ -2896,7 +2912,7 @@ function Ri(e, t) {
2896
2912
  if (!c) return;
2897
2913
  const d = he(i.domReference);
2898
2914
  function h() {
2899
- !n && oe(i.domReference) && i.domReference === Re(ae(i.domReference)) && (u.current = !0);
2915
+ !n && re(i.domReference) && i.domReference === Ee(le(i.domReference)) && (u.current = !0);
2900
2916
  }
2901
2917
  function m() {
2902
2918
  p.current = !0;
@@ -2927,7 +2943,7 @@ function Ri(e, t) {
2927
2943
  },
2928
2944
  onFocus(d) {
2929
2945
  if (u.current) return;
2930
- const h = De(d.nativeEvent);
2946
+ const h = Se(d.nativeEvent);
2931
2947
  if (a && Y(h)) {
2932
2948
  if (jt() && !d.relatedTarget) {
2933
2949
  if (!p.current && !on(h))
@@ -2939,11 +2955,11 @@ function Ri(e, t) {
2939
2955
  },
2940
2956
  onBlur(d) {
2941
2957
  u.current = !1;
2942
- const h = d.relatedTarget, m = d.nativeEvent, y = Y(h) && h.hasAttribute(Ue("focus-guard")) && h.getAttribute("data-type") === "outside";
2958
+ const h = d.relatedTarget, m = d.nativeEvent, y = Y(h) && h.hasAttribute(Ge("focus-guard")) && h.getAttribute("data-type") === "outside";
2943
2959
  l.current = window.setTimeout(() => {
2944
2960
  var R;
2945
- const v = Re(i.domReference ? i.domReference.ownerDocument : document);
2946
- !h && v === i.domReference || ue((R = s.current.floatingContext) == null ? void 0 : R.refs.floating.current, v) || ue(i.domReference, v) || y || r(!1, m, "focus");
2961
+ const v = Ee(i.domReference ? i.domReference.ownerDocument : document);
2962
+ !h && v === i.domReference || ce((R = s.current.floatingContext) == null ? void 0 : R.refs.floating.current, v) || ce(i.domReference, v) || y || r(!1, m, "focus");
2947
2963
  });
2948
2964
  }
2949
2965
  }), [s, i.domReference, r, a]);
@@ -2965,7 +2981,7 @@ function qt(e, t, n) {
2965
2981
  return {
2966
2982
  ...n === "floating" && {
2967
2983
  tabIndex: -1,
2968
- [Do]: ""
2984
+ [No]: ""
2969
2985
  },
2970
2986
  ...s,
2971
2987
  ...t.map((i) => {
@@ -2988,7 +3004,7 @@ function qt(e, t, n) {
2988
3004
  }), i), {})
2989
3005
  };
2990
3006
  }
2991
- function Ei(e) {
3007
+ function Oi(e) {
2992
3008
  e === void 0 && (e = []);
2993
3009
  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 = f.useCallback(
2994
3010
  (c) => qt(c, e, "reference"),
@@ -3009,7 +3025,7 @@ function Ei(e) {
3009
3025
  getItemProps: i
3010
3026
  }), [o, s, i]);
3011
3027
  }
3012
- const Qo = "Escape";
3028
+ const ni = "Escape";
3013
3029
  function Nt(e, t, n) {
3014
3030
  switch (e) {
3015
3031
  case "vertical":
@@ -3021,19 +3037,19 @@ function Nt(e, t, n) {
3021
3037
  }
3022
3038
  }
3023
3039
  function bt(e, t) {
3024
- return Nt(t, e === st || e === Le, e === Fe || e === Ne);
3040
+ return Nt(t, e === st || e === Ne, e === _e || e === We);
3025
3041
  }
3026
3042
  function Yt(e, t, n) {
3027
- return Nt(t, e === Le, n ? e === Fe : e === Ne) || e === "Enter" || e === " " || e === "";
3043
+ return Nt(t, e === Ne, n ? e === _e : e === We) || e === "Enter" || e === " " || e === "";
3028
3044
  }
3029
3045
  function Kn(e, t, n) {
3030
- return Nt(t, n ? e === Fe : e === Ne, e === Le);
3046
+ return Nt(t, n ? e === _e : e === We, e === Ne);
3031
3047
  }
3032
3048
  function Vn(e, t, n, r) {
3033
- const o = n ? e === Ne : e === Fe, s = e === st;
3034
- return t === "both" || t === "horizontal" && r && r > 1 ? e === Qo : Nt(t, o, s);
3049
+ const o = n ? e === We : e === _e, s = e === st;
3050
+ return t === "both" || t === "horizontal" && r && r > 1 ? e === ni : Nt(t, o, s);
3035
3051
  }
3036
- function Ii(e, t) {
3052
+ function Ai(e, t) {
3037
3053
  const {
3038
3054
  open: n,
3039
3055
  onOpenChange: r,
@@ -3055,98 +3071,98 @@ function Ii(e, t) {
3055
3071
  focusItemOnHover: R = !0,
3056
3072
  openOnArrowKeyDown: v = !0,
3057
3073
  disabledIndices: x = void 0,
3058
- orientation: I = "vertical",
3074
+ orientation: C = "vertical",
3059
3075
  parentOrientation: A,
3060
3076
  cols: k = 1,
3061
3077
  scrollItemIntoView: N = !0,
3062
- virtualItemRef: S,
3078
+ virtualItemRef: D,
3063
3079
  itemSizes: L,
3064
3080
  dense: F = !1
3065
3081
  } = t;
3066
- process.env.NODE_ENV !== "production" && (p && (g || Ht("`useListNavigation` looping must be enabled to allow escaping."), m || Ht("`useListNavigation` must be virtual to allow escaping.")), I === "vertical" && k > 1 && Ht("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
3067
- const _ = Ct(o.floating), U = xe(_), V = Ze(), O = et();
3082
+ process.env.NODE_ENV !== "production" && (p && (g || Ht("`useListNavigation` looping must be enabled to allow escaping."), m || Ht("`useListNavigation` must be virtual to allow escaping.")), C === "vertical" && k > 1 && Ht("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
3083
+ const _ = It(o.floating), U = xe(_), K = et(), O = tt();
3068
3084
  X(() => {
3069
- e.dataRef.current.orientation = I;
3070
- }, [e, I]);
3071
- const w = ce(() => {
3085
+ e.dataRef.current.orientation = C;
3086
+ }, [e, C]);
3087
+ const w = se(() => {
3072
3088
  a(b.current === -1 ? null : b.current);
3073
- }), K = Zt(o.domReference), T = f.useRef(y), b = f.useRef(l ?? -1), E = f.useRef(null), M = f.useRef(!0), G = f.useRef(w), C = f.useRef(!!o.floating), W = f.useRef(n), Z = f.useRef(!1), fe = f.useRef(!1), te = xe(x), de = xe(n), Oe = xe(N), Ke = xe(l), [Ae, B] = f.useState(), [z, H] = f.useState(), $ = ce(() => {
3074
- function D(Q) {
3089
+ }), W = Zt(o.domReference), T = f.useRef(y), b = f.useRef(l ?? -1), E = f.useRef(null), S = f.useRef(!0), G = f.useRef(w), I = f.useRef(!!o.floating), V = f.useRef(n), ee = f.useRef(!1), ae = f.useRef(!1), te = xe(x), fe = xe(n), Ae = xe(N), Ve = xe(l), [Me, H] = f.useState(), [z, $] = f.useState(), B = se(() => {
3090
+ function M(Z) {
3075
3091
  if (m) {
3076
3092
  var ie;
3077
- (ie = Q.id) != null && ie.endsWith("-fui-option") && (Q.id = s + "-" + Math.random().toString(16).slice(2, 10)), B(Q.id), O == null || O.events.emit("virtualfocus", Q), S && (S.current = Q);
3093
+ (ie = Z.id) != null && ie.endsWith("-fui-option") && (Z.id = s + "-" + Math.random().toString(16).slice(2, 10)), H(Z.id), O == null || O.events.emit("virtualfocus", Z), D && (D.current = Z);
3078
3094
  } else
3079
- We(Q, {
3080
- sync: Z.current,
3095
+ Be(Z, {
3096
+ sync: ee.current,
3081
3097
  preventScroll: !0
3082
3098
  });
3083
3099
  }
3084
- const q = i.current[b.current], P = fe.current;
3085
- q && D(q), (Z.current ? (Q) => Q() : requestAnimationFrame)(() => {
3086
- const Q = i.current[b.current] || q;
3087
- if (!Q) return;
3088
- q || D(Q);
3089
- const ie = Oe.current;
3090
- ie && re && (P || !M.current) && (Q.scrollIntoView == null || Q.scrollIntoView(typeof ie == "boolean" ? {
3100
+ const j = i.current[b.current], P = ae.current;
3101
+ j && M(j), (ee.current ? (Z) => Z() : requestAnimationFrame)(() => {
3102
+ const Z = i.current[b.current] || j;
3103
+ if (!Z) return;
3104
+ j || M(Z);
3105
+ const ie = Ae.current;
3106
+ ie && ne && (P || !S.current) && (Z.scrollIntoView == null || Z.scrollIntoView(typeof ie == "boolean" ? {
3091
3107
  block: "nearest",
3092
3108
  inline: "nearest"
3093
3109
  } : ie));
3094
3110
  });
3095
3111
  });
3096
3112
  X(() => {
3097
- u && (n && o.floating ? T.current && l != null && (fe.current = !0, b.current = l, w()) : C.current && (b.current = -1, G.current()));
3113
+ u && (n && o.floating ? T.current && l != null && (ae.current = !0, b.current = l, w()) : I.current && (b.current = -1, G.current()));
3098
3114
  }, [u, n, o.floating, l, w]), X(() => {
3099
3115
  if (u && n && o.floating)
3100
3116
  if (c == null) {
3101
- if (Z.current = !1, Ke.current != null)
3117
+ if (ee.current = !1, Ve.current != null)
3102
3118
  return;
3103
- if (C.current && (b.current = -1, $()), (!W.current || !C.current) && T.current && (E.current != null || T.current === !0 && E.current == null)) {
3104
- let D = 0;
3105
- const q = () => {
3106
- i.current[0] == null ? (D < 2 && (D ? requestAnimationFrame : queueMicrotask)(q), D++) : (b.current = E.current == null || Yt(E.current, I, h) || d ? yt(i, te.current) : en(i, te.current), E.current = null, w());
3119
+ if (I.current && (b.current = -1, B()), (!V.current || !I.current) && T.current && (E.current != null || T.current === !0 && E.current == null)) {
3120
+ let M = 0;
3121
+ const j = () => {
3122
+ i.current[0] == null ? (M < 2 && (M ? requestAnimationFrame : queueMicrotask)(j), M++) : (b.current = E.current == null || Yt(E.current, C, h) || d ? yt(i, te.current) : en(i, te.current), E.current = null, w());
3107
3123
  };
3108
- q();
3124
+ j();
3109
3125
  }
3110
- } else Ye(i, c) || (b.current = c, $(), fe.current = !1);
3111
- }, [u, n, o.floating, c, Ke, d, i, I, h, w, $, te]), X(() => {
3112
- var D;
3113
- if (!u || o.floating || !O || m || !C.current)
3126
+ } else Ye(i, c) || (b.current = c, B(), ae.current = !1);
3127
+ }, [u, n, o.floating, c, Ve, d, i, C, h, w, B, te]), X(() => {
3128
+ var M;
3129
+ if (!u || o.floating || !O || m || !I.current)
3114
3130
  return;
3115
- const q = O.nodesRef.current, P = (D = q.find((ie) => ie.id === V)) == null || (D = D.context) == null ? void 0 : D.elements.floating, J = Re(ae(o.floating)), Q = q.some((ie) => ie.context && ue(ie.context.elements.floating, J));
3116
- P && !Q && M.current && P.focus({
3131
+ const j = O.nodesRef.current, P = (M = j.find((ie) => ie.id === K)) == null || (M = M.context) == null ? void 0 : M.elements.floating, Q = Ee(le(o.floating)), Z = j.some((ie) => ie.context && ce(ie.context.elements.floating, Q));
3132
+ P && !Z && S.current && P.focus({
3117
3133
  preventScroll: !0
3118
3134
  });
3119
- }, [u, o.floating, O, V, m]), X(() => {
3120
- if (!u || !O || !m || V) return;
3121
- function D(q) {
3122
- H(q.id), S && (S.current = q);
3135
+ }, [u, o.floating, O, K, m]), X(() => {
3136
+ if (!u || !O || !m || K) return;
3137
+ function M(j) {
3138
+ $(j.id), D && (D.current = j);
3123
3139
  }
3124
- return O.events.on("virtualfocus", D), () => {
3125
- O.events.off("virtualfocus", D);
3140
+ return O.events.on("virtualfocus", M), () => {
3141
+ O.events.off("virtualfocus", M);
3126
3142
  };
3127
- }, [u, O, m, V, S]), X(() => {
3128
- G.current = w, W.current = n, C.current = !!o.floating;
3143
+ }, [u, O, m, K, D]), X(() => {
3144
+ G.current = w, V.current = n, I.current = !!o.floating;
3129
3145
  }), X(() => {
3130
3146
  n || (E.current = null, T.current = y);
3131
3147
  }, [n, y]);
3132
- const se = c != null, re = f.useMemo(() => {
3133
- function D(P) {
3134
- if (!de.current) return;
3135
- const J = i.current.indexOf(P);
3136
- J !== -1 && b.current !== J && (b.current = J, w());
3148
+ const oe = c != null, ne = f.useMemo(() => {
3149
+ function M(P) {
3150
+ if (!fe.current) return;
3151
+ const Q = i.current.indexOf(P);
3152
+ Q !== -1 && b.current !== Q && (b.current = Q, w());
3137
3153
  }
3138
3154
  return {
3139
3155
  onFocus(P) {
3140
3156
  let {
3141
- currentTarget: J
3157
+ currentTarget: Q
3142
3158
  } = P;
3143
- Z.current = !0, D(J);
3159
+ ee.current = !0, M(Q);
3144
3160
  },
3145
3161
  onClick: (P) => {
3146
3162
  let {
3147
- currentTarget: J
3163
+ currentTarget: Q
3148
3164
  } = P;
3149
- return J.focus({
3165
+ return Q.focus({
3150
3166
  preventScroll: !0
3151
3167
  });
3152
3168
  },
@@ -3154,159 +3170,159 @@ function Ii(e, t) {
3154
3170
  ...R && {
3155
3171
  onMouseMove(P) {
3156
3172
  let {
3157
- currentTarget: J
3173
+ currentTarget: Q
3158
3174
  } = P;
3159
- Z.current = !0, fe.current = !1, D(J);
3175
+ ee.current = !0, ae.current = !1, M(Q);
3160
3176
  },
3161
3177
  onPointerLeave(P) {
3162
3178
  let {
3163
- pointerType: J
3179
+ pointerType: Q
3164
3180
  } = P;
3165
- if (!(!M.current || J === "touch") && (Z.current = !0, b.current = -1, w(), !m)) {
3166
- var Q;
3167
- (Q = U.current) == null || Q.focus({
3181
+ if (!(!S.current || Q === "touch") && (ee.current = !0, b.current = -1, w(), !m)) {
3182
+ var Z;
3183
+ (Z = U.current) == null || Z.focus({
3168
3184
  preventScroll: !0
3169
3185
  });
3170
3186
  }
3171
3187
  }
3172
3188
  }
3173
3189
  };
3174
- }, [de, U, R, i, w, m]), me = f.useCallback(() => {
3175
- var D;
3176
- return A ?? (O == null || (D = O.nodesRef.current.find((q) => q.id === V)) == null || (D = D.context) == null || (D = D.dataRef) == null ? void 0 : D.current.orientation);
3177
- }, [V, O, A]), ne = ce((D) => {
3178
- if (M.current = !1, Z.current = !0, D.which === 229 || !de.current && D.currentTarget === U.current)
3190
+ }, [fe, U, R, i, w, m]), de = f.useCallback(() => {
3191
+ var M;
3192
+ return A ?? (O == null || (M = O.nodesRef.current.find((j) => j.id === K)) == null || (M = M.context) == null || (M = M.dataRef) == null ? void 0 : M.current.orientation);
3193
+ }, [K, O, A]), me = se((M) => {
3194
+ if (S.current = !1, ee.current = !0, M.which === 229 || !fe.current && M.currentTarget === U.current)
3179
3195
  return;
3180
- if (d && Vn(D.key, I, h, k)) {
3181
- bt(D.key, me()) || pe(D), r(!1, D.nativeEvent, "list-navigation"), oe(o.domReference) && (m ? O == null || O.events.emit("virtualfocus", o.domReference) : o.domReference.focus());
3196
+ if (d && Vn(M.key, C, h, k)) {
3197
+ bt(M.key, de()) || pe(M), r(!1, M.nativeEvent, "list-navigation"), re(o.domReference) && (m ? O == null || O.events.emit("virtualfocus", o.domReference) : o.domReference.focus());
3182
3198
  return;
3183
3199
  }
3184
- const q = b.current, P = yt(i, x), J = en(i, x);
3185
- if (K || (D.key === "Home" && (pe(D), b.current = P, w()), D.key === "End" && (pe(D), b.current = J, w())), k > 1) {
3186
- const Q = L || Array.from({
3200
+ const j = b.current, P = yt(i, x), Q = en(i, x);
3201
+ if (W || (M.key === "Home" && (pe(M), b.current = P, w()), M.key === "End" && (pe(M), b.current = Q, w())), k > 1) {
3202
+ const Z = L || Array.from({
3187
3203
  length: i.current.length
3188
3204
  }, () => ({
3189
3205
  width: 1,
3190
3206
  height: 1
3191
- })), ie = nr(Q, k, F), nt = ie.findIndex((ye) => ye != null && !Be(i, ye, x)), at = ie.reduce((ye, Ve, ft) => Ve != null && !Be(i, Ve, x) ? ft : ye, -1), rt = ie[tr({
3207
+ })), ie = nr(Z, k, F), nt = ie.findIndex((ye) => ye != null && !ze(i, ye, x)), at = ie.reduce((ye, $e, ft) => $e != null && !ze(i, $e, x) ? ft : ye, -1), rt = ie[tr({
3192
3208
  current: ie.map((ye) => ye != null ? i.current[ye] : null)
3193
3209
  }, {
3194
- event: D,
3195
- orientation: I,
3210
+ event: M,
3211
+ orientation: C,
3196
3212
  loop: g,
3197
3213
  rtl: h,
3198
3214
  cols: k,
3199
3215
  // treat undefined (empty grid spaces) as disabled indices so we
3200
3216
  // don't end up in them
3201
- disabledIndices: or([...(typeof x != "function" ? x : null) || i.current.map((ye, Ve) => Be(i, Ve, x) ? Ve : void 0), void 0], ie),
3217
+ disabledIndices: or([...(typeof x != "function" ? x : null) || i.current.map((ye, $e) => ze(i, $e, x) ? $e : void 0), void 0], ie),
3202
3218
  minIndex: nt,
3203
3219
  maxIndex: at,
3204
3220
  prevIndex: rr(
3205
- b.current > J ? P : b.current,
3206
- Q,
3221
+ b.current > Q ? P : b.current,
3222
+ Z,
3207
3223
  ie,
3208
3224
  k,
3209
3225
  // use a corner matching the edge closest to the direction
3210
3226
  // we're moving in so we don't end up in the same item. Prefer
3211
3227
  // top/left over bottom/right.
3212
- D.key === Le ? "bl" : D.key === (h ? Fe : Ne) ? "tr" : "tl"
3228
+ M.key === Ne ? "bl" : M.key === (h ? _e : We) ? "tr" : "tl"
3213
3229
  ),
3214
3230
  stopEvent: !0
3215
3231
  })];
3216
- if (rt != null && (b.current = rt, w()), I === "both")
3232
+ if (rt != null && (b.current = rt, w()), C === "both")
3217
3233
  return;
3218
3234
  }
3219
- if (bt(D.key, I)) {
3220
- if (pe(D), n && !m && Re(D.currentTarget.ownerDocument) === D.currentTarget) {
3221
- b.current = Yt(D.key, I, h) ? P : J, w();
3235
+ if (bt(M.key, C)) {
3236
+ if (pe(M), n && !m && Ee(M.currentTarget.ownerDocument) === M.currentTarget) {
3237
+ b.current = Yt(M.key, C, h) ? P : Q, w();
3222
3238
  return;
3223
3239
  }
3224
- Yt(D.key, I, h) ? g ? b.current = q >= J ? p && q !== i.current.length ? -1 : P : le(i, {
3225
- startingIndex: q,
3240
+ Yt(M.key, C, h) ? g ? b.current = j >= Q ? p && j !== i.current.length ? -1 : P : ue(i, {
3241
+ startingIndex: j,
3226
3242
  disabledIndices: x
3227
- }) : b.current = Math.min(J, le(i, {
3228
- startingIndex: q,
3243
+ }) : b.current = Math.min(Q, ue(i, {
3244
+ startingIndex: j,
3229
3245
  disabledIndices: x
3230
- })) : g ? b.current = q <= P ? p && q !== -1 ? i.current.length : J : le(i, {
3231
- startingIndex: q,
3246
+ })) : g ? b.current = j <= P ? p && j !== -1 ? i.current.length : Q : ue(i, {
3247
+ startingIndex: j,
3232
3248
  decrement: !0,
3233
3249
  disabledIndices: x
3234
- }) : b.current = Math.max(P, le(i, {
3235
- startingIndex: q,
3250
+ }) : b.current = Math.max(P, ue(i, {
3251
+ startingIndex: j,
3236
3252
  decrement: !0,
3237
3253
  disabledIndices: x
3238
3254
  })), Ye(i, b.current) && (b.current = -1), w();
3239
3255
  }
3240
- }), j = f.useMemo(() => m && n && se && {
3241
- "aria-activedescendant": z || Ae
3242
- }, [m, n, se, z, Ae]), ee = f.useMemo(() => ({
3243
- "aria-orientation": I === "both" ? void 0 : I,
3244
- ...K ? {} : j,
3245
- onKeyDown: ne,
3256
+ }), q = f.useMemo(() => m && n && oe && {
3257
+ "aria-activedescendant": z || Me
3258
+ }, [m, n, oe, z, Me]), J = f.useMemo(() => ({
3259
+ "aria-orientation": C === "both" ? void 0 : C,
3260
+ ...W ? {} : q,
3261
+ onKeyDown: me,
3246
3262
  onPointerMove() {
3247
- M.current = !0;
3263
+ S.current = !0;
3248
3264
  }
3249
- }), [j, ne, I, K]), tt = f.useMemo(() => {
3250
- function D(P) {
3265
+ }), [q, me, C, W]), Re = f.useMemo(() => {
3266
+ function M(P) {
3251
3267
  y === "auto" && Zn(P.nativeEvent) && (T.current = !0);
3252
3268
  }
3253
- function q(P) {
3269
+ function j(P) {
3254
3270
  T.current = y, y === "auto" && er(P.nativeEvent) && (T.current = !0);
3255
3271
  }
3256
3272
  return {
3257
- ...j,
3273
+ ...q,
3258
3274
  onKeyDown(P) {
3259
- M.current = !1;
3260
- const J = P.key.startsWith("Arrow"), Q = ["Home", "End"].includes(P.key), ie = J || Q, nt = Kn(P.key, I, h), at = Vn(P.key, I, h, k), rt = Kn(P.key, me(), h), ye = bt(P.key, I), Ve = (d ? rt : ye) || P.key === "Enter" || P.key.trim() === "";
3275
+ S.current = !1;
3276
+ const Q = P.key.startsWith("Arrow"), Z = ["Home", "End"].includes(P.key), ie = Q || Z, nt = Kn(P.key, C, h), at = Vn(P.key, C, h, k), rt = Kn(P.key, de(), h), ye = bt(P.key, C), $e = (d ? rt : ye) || P.key === "Enter" || P.key.trim() === "";
3261
3277
  if (m && n) {
3262
- const dt = O == null ? void 0 : O.nodesRef.current.find((mt) => mt.parentId == null), Se = O && dt ? Ur(O.nodesRef.current, dt.id) : null;
3263
- if (ie && Se && S) {
3278
+ const dt = O == null ? void 0 : O.nodesRef.current.find((mt) => mt.parentId == null), Le = O && dt ? Ur(O.nodesRef.current, dt.id) : null;
3279
+ if (ie && Le && D) {
3264
3280
  const mt = new KeyboardEvent("keydown", {
3265
3281
  key: P.key,
3266
3282
  bubbles: !0
3267
3283
  });
3268
3284
  if (nt || at) {
3269
3285
  var ft, un;
3270
- const Tr = ((ft = Se.context) == null ? void 0 : ft.elements.domReference) === P.currentTarget, an = at && !Tr ? (un = Se.context) == null ? void 0 : un.elements.domReference : nt ? i.current.find((fn) => (fn == null ? void 0 : fn.id) === Ae) : null;
3271
- an && (pe(P), an.dispatchEvent(mt), H(void 0));
3286
+ const Tr = ((ft = Le.context) == null ? void 0 : ft.elements.domReference) === P.currentTarget, an = at && !Tr ? (un = Le.context) == null ? void 0 : un.elements.domReference : nt ? i.current.find((fn) => (fn == null ? void 0 : fn.id) === Me) : null;
3287
+ an && (pe(P), an.dispatchEvent(mt), $(void 0));
3272
3288
  }
3273
- if ((ye || Q) && Se.context && Se.context.open && Se.parentId && P.currentTarget !== Se.context.elements.domReference) {
3289
+ if ((ye || Z) && Le.context && Le.context.open && Le.parentId && P.currentTarget !== Le.context.elements.domReference) {
3274
3290
  var ln;
3275
- pe(P), (ln = Se.context.elements.domReference) == null || ln.dispatchEvent(mt);
3291
+ pe(P), (ln = Le.context.elements.domReference) == null || ln.dispatchEvent(mt);
3276
3292
  return;
3277
3293
  }
3278
3294
  }
3279
- return ne(P);
3295
+ return me(P);
3280
3296
  }
3281
- if (!(!n && !v && J)) {
3282
- if (Ve) {
3283
- const dt = bt(P.key, me());
3297
+ if (!(!n && !v && Q)) {
3298
+ if ($e) {
3299
+ const dt = bt(P.key, de());
3284
3300
  E.current = d && dt ? null : P.key;
3285
3301
  }
3286
3302
  if (d) {
3287
3303
  rt && (pe(P), n ? (b.current = yt(i, te.current), w()) : r(!0, P.nativeEvent, "list-navigation"));
3288
3304
  return;
3289
3305
  }
3290
- ye && (l != null && (b.current = l), pe(P), !n && v ? r(!0, P.nativeEvent, "list-navigation") : ne(P), n && w());
3306
+ ye && (l != null && (b.current = l), pe(P), !n && v ? r(!0, P.nativeEvent, "list-navigation") : me(P), n && w());
3291
3307
  }
3292
3308
  },
3293
3309
  onFocus() {
3294
3310
  n && !m && (b.current = -1, w());
3295
3311
  },
3296
- onPointerDown: q,
3297
- onPointerEnter: q,
3298
- onMouseDown: D,
3299
- onClick: D
3312
+ onPointerDown: j,
3313
+ onPointerEnter: j,
3314
+ onMouseDown: M,
3315
+ onClick: M
3300
3316
  };
3301
- }, [Ae, j, k, ne, te, y, i, d, w, r, n, v, I, me, h, l, O, m, S]);
3317
+ }, [Me, q, k, me, te, y, i, d, w, r, n, v, C, de, h, l, O, m, D]);
3302
3318
  return f.useMemo(() => u ? {
3303
- reference: tt,
3304
- floating: ee,
3305
- item: re
3306
- } : {}, [u, tt, ee, re]);
3319
+ reference: Re,
3320
+ floating: J,
3321
+ item: ne
3322
+ } : {}, [u, Re, J, ne]);
3307
3323
  }
3308
- const Zo = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
3309
- function Ci(e, t) {
3324
+ const ri = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
3325
+ function Mi(e, t) {
3310
3326
  var n, r;
3311
3327
  t === void 0 && (t = {});
3312
3328
  const {
@@ -3318,8 +3334,8 @@ function Ci(e, t) {
3318
3334
  role: a = "dialog"
3319
3335
  } = t, u = Lt(), l = ((n = s.domReference) == null ? void 0 : n.id) || u, p = f.useMemo(() => {
3320
3336
  var v;
3321
- return ((v = Ct(s.floating)) == null ? void 0 : v.id) || i;
3322
- }, [s.floating, i]), g = (r = Zo.get(a)) != null ? r : a, h = Ze() != null, m = f.useMemo(() => g === "tooltip" || a === "label" ? {
3337
+ return ((v = It(s.floating)) == null ? void 0 : v.id) || i;
3338
+ }, [s.floating, i]), g = (r = ri.get(a)) != null ? r : a, h = et() != null, m = f.useMemo(() => g === "tooltip" || a === "label" ? {
3323
3339
  ["aria-" + (a === "label" ? "labelledby" : "describedby")]: o ? p : void 0
3324
3340
  } : {
3325
3341
  "aria-expanded": o ? "true" : "false",
@@ -3356,7 +3372,7 @@ function Ci(e, t) {
3356
3372
  }, [g, p, l, a]), R = f.useCallback((v) => {
3357
3373
  let {
3358
3374
  active: x,
3359
- selected: I
3375
+ selected: C
3360
3376
  } = v;
3361
3377
  const A = {
3362
3378
  role: "option",
@@ -3368,12 +3384,12 @@ function Ci(e, t) {
3368
3384
  case "select":
3369
3385
  return {
3370
3386
  ...A,
3371
- "aria-selected": x && I
3387
+ "aria-selected": x && C
3372
3388
  };
3373
3389
  case "combobox":
3374
3390
  return {
3375
3391
  ...A,
3376
- "aria-selected": I
3392
+ "aria-selected": C
3377
3393
  };
3378
3394
  }
3379
3395
  return {};
@@ -3384,7 +3400,7 @@ function Ci(e, t) {
3384
3400
  item: R
3385
3401
  } : {}, [c, m, y, R]);
3386
3402
  }
3387
- function ei(e, t) {
3403
+ function oi(e, t) {
3388
3404
  const [n, r] = f.useState(e);
3389
3405
  return e && !n && r(!0), f.useEffect(() => {
3390
3406
  if (!e && n) {
@@ -3393,7 +3409,7 @@ function ei(e, t) {
3393
3409
  }
3394
3410
  }, [e, n, t]), n;
3395
3411
  }
3396
- function Ti(e, t) {
3412
+ function Si(e, t) {
3397
3413
  t === void 0 && (t = {});
3398
3414
  const {
3399
3415
  open: n,
@@ -3402,7 +3418,7 @@ function Ti(e, t) {
3402
3418
  }
3403
3419
  } = e, {
3404
3420
  duration: o = 250
3405
- } = t, i = (typeof o == "number" ? o : o.close) || 0, [c, a] = f.useState("unmounted"), u = ei(n, i);
3421
+ } = t, i = (typeof o == "number" ? o : o.close) || 0, [c, a] = f.useState("unmounted"), u = oi(n, i);
3406
3422
  return !u && c === "close" && a("unmounted"), X(() => {
3407
3423
  if (r) {
3408
3424
  if (n) {
@@ -3424,30 +3440,30 @@ function Ti(e, t) {
3424
3440
  };
3425
3441
  }
3426
3442
  export {
3427
- ai as C,
3428
- pi as F,
3429
- fi as a,
3430
- li as b,
3431
- ui as c,
3432
- wi as d,
3433
- yi as e,
3434
- ci as f,
3435
- xi as g,
3436
- Ci as h,
3437
- Ei as i,
3438
- oi as j,
3439
- Ze as k,
3440
- di as l,
3441
- mi as m,
3442
- hi as n,
3443
- ii as o,
3444
- Po as p,
3445
- vi as q,
3446
- Ii as r,
3447
- si as s,
3448
- gi as t,
3449
- So as u,
3450
- Ri as v,
3451
- Ti as w,
3452
- bi as x
3443
+ pi as C,
3444
+ bi as F,
3445
+ gi as a,
3446
+ mi as b,
3447
+ di as c,
3448
+ Ii as d,
3449
+ Ei as e,
3450
+ fi as f,
3451
+ Ci as g,
3452
+ Mi as h,
3453
+ Oi as i,
3454
+ ui as j,
3455
+ et as k,
3456
+ hi as l,
3457
+ vi as m,
3458
+ xi as n,
3459
+ li as o,
3460
+ Lo as p,
3461
+ wi as q,
3462
+ Ai as r,
3463
+ ai as s,
3464
+ yi as t,
3465
+ Fo as u,
3466
+ Ti as v,
3467
+ Si as w,
3468
+ Ri as x
3453
3469
  };