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