ics-ui-kit 0.1.11 → 0.1.13

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 (219) hide show
  1. package/README.md +36 -36
  2. package/dist/AlertContext-CxjW1LVL.js.map +1 -1
  3. package/dist/AlertIcon-5B6AgZpe.js.map +1 -1
  4. package/dist/Button-Dg89xRSi.js.map +1 -1
  5. package/dist/ButtonBase-e6qyv6mD.js.map +1 -1
  6. package/dist/{CheckboxField-cX09-eBX.js → CheckboxField-2zNFubvm.js} +2 -2
  7. package/dist/CheckboxField-2zNFubvm.js.map +1 -0
  8. package/dist/Combination-DeIugdgY.js +353 -0
  9. package/dist/Combination-DeIugdgY.js.map +1 -0
  10. package/dist/{Command-ClIm4U7r.js → Command-D5zgJ7-y.js} +3 -3
  11. package/dist/Command-D5zgJ7-y.js.map +1 -0
  12. package/dist/ComponentVariantProvider-brk0g-hm.js.map +1 -1
  13. package/dist/Description-BTPMlTT-.js.map +1 -1
  14. package/dist/{Dialog-Bs1B5Iu8.js → Dialog-CdnsGyJD.js} +3 -3
  15. package/dist/Dialog-CdnsGyJD.js.map +1 -0
  16. package/dist/Divider-DPW5ZhZ8.js.map +1 -1
  17. package/dist/EmptyState-DRKjscH-.js.map +1 -1
  18. package/dist/ErrorState-B26k67-z.js.map +1 -1
  19. package/dist/FeatureIcon-BGE0Orkc.js.map +1 -1
  20. package/dist/{Field-BiIWtq9o.js → Field-COD9VbUX.js} +2 -2
  21. package/dist/Field-COD9VbUX.js.map +1 -0
  22. package/dist/{FieldLabel-QJ4rJFOi.js → FieldLabel-eyKmeWRn.js} +2 -2
  23. package/dist/FieldLabel-eyKmeWRn.js.map +1 -0
  24. package/dist/FolderSvg-cw0DxNVy.js.map +1 -1
  25. package/dist/{FormFooterTemplate-DPB6Dkxn.js → FormFooterTemplate-ClTxqrIB.js} +2 -2
  26. package/dist/FormFooterTemplate-ClTxqrIB.js.map +1 -0
  27. package/dist/FormHeader--F6b2aRk.js.map +1 -1
  28. package/dist/{FormStack-DO15vBgd.js → FormStack-B3UBh9oF.js} +3 -3
  29. package/dist/FormStack-B3UBh9oF.js.map +1 -0
  30. package/dist/HintState-BxrCAWqq.js.map +1 -1
  31. package/dist/Icon-DH3ev9GK.js.map +1 -1
  32. package/dist/IconButton-DwkpNgn3.js.map +1 -1
  33. package/dist/{IconTooltip-CKJKGHbk.js → IconTooltip-RSxvnBgH.js} +2 -2
  34. package/dist/IconTooltip-RSxvnBgH.js.map +1 -0
  35. package/dist/Indicator-AqxHWPA9.js.map +1 -1
  36. package/dist/InputGroup-BvD9Igmt.js.map +1 -1
  37. package/dist/InputOTP-B2e1nfSO.js.map +1 -1
  38. package/dist/Loader-BpHiL6W-.js.map +1 -1
  39. package/dist/MenuItem-d19Ty84F.js.map +1 -1
  40. package/dist/MenuItemShortcut-D1faeIXp.js.map +1 -1
  41. package/dist/MenuItemText-CRpaPbvg.js.map +1 -1
  42. package/dist/Overlay-CVt011mY.js.map +1 -1
  43. package/dist/{Popover-CY_d3Ggn.js → Popover-CRVD7AtB.js} +20 -19
  44. package/dist/Popover-CRVD7AtB.js.map +1 -0
  45. package/dist/RichButton-DuPTenmS.js.map +1 -1
  46. package/dist/ScrollArea-CuuTeDn3.js.map +1 -1
  47. package/dist/ScrollShadowContainer-DdrnF8qU.js.map +1 -1
  48. package/dist/SearchSelectTag-DFCX9zT1.js.map +1 -1
  49. package/dist/{Select-B2WcoFf5.js → Select-MLPTpIl5.js} +24 -23
  50. package/dist/Select-MLPTpIl5.js.map +1 -0
  51. package/dist/{Sheet-zTMuP7C8.js → Sheet-qTIXsqm0.js} +3 -3
  52. package/dist/Sheet-qTIXsqm0.js.map +1 -0
  53. package/dist/Shortcut-D8L15_ed.js.map +1 -1
  54. package/dist/Skeleton-y6I-i9q5.js.map +1 -1
  55. package/dist/Tag-DdHXTyKF.js.map +1 -1
  56. package/dist/Text-DeBE8AKl.js.map +1 -1
  57. package/dist/TextInput-Cj50ImXi.js.map +1 -1
  58. package/dist/{TextOverflowTooltip-DlUgic5y.js → TextOverflowTooltip-B1I5qwAT.js} +2 -2
  59. package/dist/TextOverflowTooltip-B1I5qwAT.js.map +1 -0
  60. package/dist/Toggle-v_HT3Gm2.js.map +1 -1
  61. package/dist/{Tooltip-C4rVuWr4.js → Tooltip-7Duaau0S.js} +3 -3
  62. package/dist/Tooltip-7Duaau0S.js.map +1 -0
  63. package/dist/TriggerButton-CfDObWP9.js.map +1 -1
  64. package/dist/blocks/auth/otp-form.js +1 -1
  65. package/dist/blocks/auth/otp-form.js.map +1 -1
  66. package/dist/circle-BbEzypQJ.js +14 -0
  67. package/dist/circle-BbEzypQJ.js.map +1 -0
  68. package/dist/cn-dsXlqdJg.js.map +1 -1
  69. package/dist/components/alert-dialog.js +2 -2
  70. package/dist/components/alert-dialog.js.map +1 -1
  71. package/dist/components/alert.js.map +1 -1
  72. package/dist/components/avatar.js.map +1 -1
  73. package/dist/components/background-pattern.js.map +1 -1
  74. package/dist/components/badge.js.map +1 -1
  75. package/dist/components/banner.js.map +1 -1
  76. package/dist/components/breadcrumb.js.map +1 -1
  77. package/dist/components/button.js.map +1 -1
  78. package/dist/components/calendar.js.map +1 -1
  79. package/dist/components/card.js.map +1 -1
  80. package/dist/components/carousel.js.map +1 -1
  81. package/dist/components/checkbox.js +1 -1
  82. package/dist/components/collapsible.js.map +1 -1
  83. package/dist/components/color-tile.js.map +1 -1
  84. package/dist/components/command/Command.stories.d.ts +1 -0
  85. package/dist/components/command.js +1 -1
  86. package/dist/components/container.js.map +1 -1
  87. package/dist/components/context-menu/ContextMenu.d.ts +27 -0
  88. package/dist/components/context-menu/ContextMenu.stories.d.ts +10 -0
  89. package/dist/components/context-menu/index.d.ts +1 -0
  90. package/dist/components/context-menu.d.ts +2 -0
  91. package/dist/components/context-menu.js +2675 -0
  92. package/dist/components/context-menu.js.map +1 -0
  93. package/dist/components/counter.js.map +1 -1
  94. package/dist/components/dialog.js +3 -3
  95. package/dist/components/dialog.js.map +1 -1
  96. package/dist/components/divider.js.map +1 -1
  97. package/dist/components/drawer.js +3 -3
  98. package/dist/components/drawer.js.map +1 -1
  99. package/dist/components/dropdown.js +26 -25
  100. package/dist/components/dropdown.js.map +1 -1
  101. package/dist/components/error-state.js.map +1 -1
  102. package/dist/components/field.js +1 -1
  103. package/dist/components/file-upload.js +1 -1
  104. package/dist/components/file-upload.js.map +1 -1
  105. package/dist/components/form.js +3 -3
  106. package/dist/components/form.js.map +1 -1
  107. package/dist/components/glass-toolbar.js.map +1 -1
  108. package/dist/components/icon-tooltip.js +1 -1
  109. package/dist/components/image-placeholder.js.map +1 -1
  110. package/dist/components/image-preview.js.map +1 -1
  111. package/dist/components/image-uploader.js.map +1 -1
  112. package/dist/components/input.js.map +1 -1
  113. package/dist/components/label.js +1 -1
  114. package/dist/components/menu-item.js.map +1 -1
  115. package/dist/components/overflow-tooltip.js +1 -1
  116. package/dist/components/page-state.js.map +1 -1
  117. package/dist/components/popover.js +1 -1
  118. package/dist/components/portal-container.js +2 -2
  119. package/dist/components/portal-container.js.map +1 -1
  120. package/dist/components/progress-circle.js.map +1 -1
  121. package/dist/components/progress.js.map +1 -1
  122. package/dist/components/prose.js.map +1 -1
  123. package/dist/components/radio-group.js +63 -72
  124. package/dist/components/radio-group.js.map +1 -1
  125. package/dist/components/resizable.js.map +1 -1
  126. package/dist/components/scheduler.js +1 -1
  127. package/dist/components/scheduler.js.map +1 -1
  128. package/dist/components/search-select.js +3 -3
  129. package/dist/components/search-select.js.map +1 -1
  130. package/dist/components/select.js +1 -1
  131. package/dist/components/sheet.js +1 -1
  132. package/dist/components/sidebar.js +2 -2
  133. package/dist/components/sidebar.js.map +1 -1
  134. package/dist/components/slider.js.map +1 -1
  135. package/dist/components/stepper.js.map +1 -1
  136. package/dist/components/switch/Switch.d.ts +1 -1
  137. package/dist/components/switch.js +5 -2
  138. package/dist/components/switch.js.map +1 -1
  139. package/dist/components/system-state.js.map +1 -1
  140. package/dist/components/table.js +1 -1
  141. package/dist/components/table.js.map +1 -1
  142. package/dist/components/tabs.js.map +1 -1
  143. package/dist/components/tag-input.js +1 -1
  144. package/dist/components/tag-input.js.map +1 -1
  145. package/dist/components/textarea.js.map +1 -1
  146. package/dist/components/timer.js.map +1 -1
  147. package/dist/components/toast.js.map +1 -1
  148. package/dist/components/toggle-group.js.map +1 -1
  149. package/dist/components/toolbar.js.map +1 -1
  150. package/dist/components/tooltip.js +1 -1
  151. package/dist/floating-ui.react-dom-BwDfy92G.js +1309 -0
  152. package/dist/floating-ui.react-dom-BwDfy92G.js.map +1 -0
  153. package/dist/formatBytes-C4QXq5lC.js.map +1 -1
  154. package/dist/index-0ioNhtNM.js.map +1 -1
  155. package/dist/index-1SnkxfPR.js +230 -0
  156. package/dist/index-1SnkxfPR.js.map +1 -0
  157. package/dist/index-437EL2iq.js.map +1 -1
  158. package/dist/index-BDrapWDv.js.map +1 -1
  159. package/dist/index-BGQepRFJ.js.map +1 -1
  160. package/dist/index-BVqs-uqP.js.map +1 -1
  161. package/dist/index-BZPx6jYI.js.map +1 -1
  162. package/dist/index-Bb23HztA.js.map +1 -1
  163. package/dist/index-BjtNfqNq.js +333 -0
  164. package/dist/index-BjtNfqNq.js.map +1 -0
  165. package/dist/index-BpWB3aFK.js.map +1 -1
  166. package/dist/index-ByaXH_ih.js.map +1 -1
  167. package/dist/index-CCKe-Mpx.js.map +1 -1
  168. package/dist/index-CFaU3UXv.js.map +1 -1
  169. package/dist/index-CLuiUUQ8.js.map +1 -1
  170. package/dist/{index-CQD-Njgt.js → index-CMxHunQ4.js} +26 -25
  171. package/dist/index-CMxHunQ4.js.map +1 -0
  172. package/dist/index-CmBeyp2d.js.map +1 -1
  173. package/dist/index-DFZozV_h.js.map +1 -1
  174. package/dist/index-DHsfW5Rj.js.map +1 -1
  175. package/dist/index-DHyZ_0Ut.js.map +1 -1
  176. package/dist/index-DLcqcWxM.js.map +1 -1
  177. package/dist/index-DnnQs07z.js.map +1 -1
  178. package/dist/index-Uiy0Xwy2.js.map +1 -1
  179. package/dist/index-_ITz1IyW.js.map +1 -1
  180. package/dist/index.js.map +1 -1
  181. package/dist/inputBaseStyles-DbzD_jvq.js.map +1 -1
  182. package/dist/lib/utils/styles.d.ts +1 -0
  183. package/dist/lib/utils.js.map +1 -1
  184. package/dist/styles-scoped.css +6441 -6413
  185. package/dist/styles.css +6180 -6152
  186. package/dist/theme.css +362 -362
  187. package/dist/types/css.d.ts +4 -4
  188. package/dist/useBreakpoints-D8wKOvil.js.map +1 -1
  189. package/dist/useDebounce-BRah78CF.js.map +1 -1
  190. package/dist/useFileUpload-Bnl3P8mP.js.map +1 -1
  191. package/dist/useItemsKeyboardNavigation-CmeOR30y.js.map +1 -1
  192. package/dist/useMergeRefs-qoKniYqT.js.map +1 -1
  193. package/dist/usePortalContainer-BAIp0kSF.js +44 -0
  194. package/dist/usePortalContainer-BAIp0kSF.js.map +1 -0
  195. package/dist/vendors/tanstack/react-table.js.map +1 -1
  196. package/dist/zod-BMNoK3aM.js.map +1 -1
  197. package/package.json +206 -183
  198. package/tailwind.preset.js +448 -448
  199. package/dist/CheckboxField-cX09-eBX.js.map +0 -1
  200. package/dist/Command-ClIm4U7r.js.map +0 -1
  201. package/dist/Dialog-Bs1B5Iu8.js.map +0 -1
  202. package/dist/Field-BiIWtq9o.js.map +0 -1
  203. package/dist/FieldLabel-QJ4rJFOi.js.map +0 -1
  204. package/dist/FormFooterTemplate-DPB6Dkxn.js.map +0 -1
  205. package/dist/FormStack-DO15vBgd.js.map +0 -1
  206. package/dist/IconTooltip-CKJKGHbk.js.map +0 -1
  207. package/dist/Popover-CY_d3Ggn.js.map +0 -1
  208. package/dist/Select-B2WcoFf5.js.map +0 -1
  209. package/dist/Sheet-zTMuP7C8.js.map +0 -1
  210. package/dist/TextOverflowTooltip-DlUgic5y.js.map +0 -1
  211. package/dist/Tooltip-C4rVuWr4.js.map +0 -1
  212. package/dist/design-tokens.source.json +0 -1
  213. package/dist/index-BzCriPiK.js +0 -671
  214. package/dist/index-BzCriPiK.js.map +0 -1
  215. package/dist/index-CQD-Njgt.js.map +0 -1
  216. package/dist/index-DRo26PBK.js +0 -1525
  217. package/dist/index-DRo26PBK.js.map +0 -1
  218. package/dist/usePortalContainer-ae6EzS08.js +0 -39
  219. package/dist/usePortalContainer-ae6EzS08.js.map +0 -1
@@ -0,0 +1,2675 @@
1
+ var Dt = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var Ft = (e, t, n) => t.has(e) || Dt("Cannot " + n);
5
+ var K = (e, t, n) => (Ft(e, t, "read from private field"), n ? n.call(e) : t.get(e)), kt = (e, t, n) => t.has(e) ? Dt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Xe = (e, t, n, r) => (Ft(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
6
+ import { jsx as h, jsxs as Ge, Fragment as Rr } from "react/jsx-runtime";
7
+ import * as s from "react";
8
+ import * as Yt from "react-dom";
9
+ import { u as Ir, o as _r, s as Or, f as Tr, a as Ar, b as Nr, h as Dr, l as Fr, c as kr } from "../floating-ui.react-dom-BwDfy92G.js";
10
+ import { c as Lr, _ as $r, u as Ur, a as ye, z as Gr, f as Br, s as Kr, b as jr, R as zr, e as Wr, h as Vr } from "../index-BjtNfqNq.js";
11
+ import { I as vt } from "../Icon-DH3ev9GK.js";
12
+ import { T as ie } from "../index-BVqs-uqP.js";
13
+ import { C as Hr } from "../check-CeyaOoZv.js";
14
+ import { C as Yr } from "../circle-BbEzypQJ.js";
15
+ import { C as Xr } from "../chevron-right-D3juAhA-.js";
16
+ var Zr = Object.defineProperty, Ee = (e, t) => Zr(e, "name", { value: t, configurable: !0 }), Xt = !!(typeof window < "u" && window.document && window.document.createElement);
17
+ function R(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
18
+ return /* @__PURE__ */ Ee(function(o) {
19
+ if (e?.(o), n === !1 || !o || !o.defaultPrevented)
20
+ return t?.(o);
21
+ }, "handleEvent");
22
+ }
23
+ Ee(R, "composeEventHandlers");
24
+ function qr(e) {
25
+ if (!Xt)
26
+ throw new Error("Cannot access window outside of the DOM");
27
+ return e?.ownerDocument?.defaultView ?? window;
28
+ }
29
+ Ee(qr, "getOwnerWindow");
30
+ function nt(e) {
31
+ if (!Xt)
32
+ throw new Error("Cannot access document outside of the DOM");
33
+ return e?.ownerDocument ?? document;
34
+ }
35
+ Ee(nt, "getOwnerDocument");
36
+ function Zt(e, t = !1) {
37
+ const { activeElement: n } = nt(e);
38
+ if (!n?.nodeName)
39
+ return null;
40
+ if (qt(n) && n.contentDocument)
41
+ return Zt(n.contentDocument.body, t);
42
+ if (t) {
43
+ const r = n.getAttribute("aria-activedescendant");
44
+ if (r) {
45
+ const o = nt(n).getElementById(r);
46
+ if (o)
47
+ return o;
48
+ }
49
+ }
50
+ return n;
51
+ }
52
+ Ee(Zt, "getActiveElement");
53
+ function qt(e) {
54
+ return e.tagName === "IFRAME";
55
+ }
56
+ Ee(qt, "isFrame");
57
+ var Qr = Object.defineProperty, X = (e, t) => Qr(e, "name", { value: t, configurable: !0 });
58
+ // @__NO_SIDE_EFFECTS__
59
+ function Jr(e, t) {
60
+ const n = s.createContext(t);
61
+ n.displayName = e + "Context";
62
+ const r = /* @__PURE__ */ X((i) => {
63
+ const { children: a, ...u } = i, c = s.useMemo(() => u, Object.values(u));
64
+ return /* @__PURE__ */ h(n.Provider, { value: c, children: a });
65
+ }, "Provider");
66
+ r.displayName = e + "Provider";
67
+ function o(i, a = {}) {
68
+ const { optional: u = !1 } = a, c = s.useContext(n);
69
+ if (c) return c;
70
+ if (t !== void 0) return t;
71
+ if (!u)
72
+ throw new Error(`\`${i}\` must be used within \`${e}\``);
73
+ }
74
+ return X(o, "useContext"), [r, o];
75
+ }
76
+ X(Jr, "createContext");
77
+ // @__NO_SIDE_EFFECTS__
78
+ function fe(e, t = []) {
79
+ let n = [];
80
+ function r(i, a) {
81
+ const u = s.createContext(a);
82
+ u.displayName = i + "Context";
83
+ const c = n.length;
84
+ n = [...n, a];
85
+ const m = /* @__PURE__ */ X((l) => {
86
+ const { scope: d, children: v, ...f } = l, p = d?.[e]?.[c] || u, g = s.useMemo(() => f, Object.values(f));
87
+ return /* @__PURE__ */ h(p.Provider, { value: g, children: v });
88
+ }, "Provider");
89
+ m.displayName = i + "Provider";
90
+ function C(l, d, v = {}) {
91
+ const { optional: f = !1 } = v, p = d?.[e]?.[c] || u, g = s.useContext(p);
92
+ if (g) return g;
93
+ if (a !== void 0) return a;
94
+ if (!f)
95
+ throw new Error(`\`${l}\` must be used within \`${i}\``);
96
+ }
97
+ return X(C, "useContext"), [m, C];
98
+ }
99
+ X(r, "createContext");
100
+ const o = /* @__PURE__ */ X(() => {
101
+ const i = n.map((a) => s.createContext(a));
102
+ return /* @__PURE__ */ X(function(u) {
103
+ const c = u?.[e] || i;
104
+ return s.useMemo(
105
+ () => ({ [`__scope${e}`]: { ...u, [e]: c } }),
106
+ [u, c]
107
+ );
108
+ }, "useScope");
109
+ }, "createScope");
110
+ return o.scopeName = e, [r, Qt(o, ...t)];
111
+ }
112
+ X(fe, "createContextScope");
113
+ function Qt(...e) {
114
+ const t = e[0];
115
+ if (e.length === 1) return t;
116
+ const n = /* @__PURE__ */ X(() => {
117
+ const r = e.map((o) => ({
118
+ useScope: o(),
119
+ scopeName: o.scopeName
120
+ }));
121
+ return /* @__PURE__ */ X(function(i) {
122
+ const a = r.reduce((u, { useScope: c, scopeName: m }) => {
123
+ const l = c(i)[`__scope${m}`];
124
+ return { ...u, ...l };
125
+ }, {});
126
+ return s.useMemo(() => ({ [`__scope${t.scopeName}`]: a }), [a]);
127
+ }, "useComposedScopes");
128
+ }, "createScope");
129
+ return n.scopeName = t.scopeName, n;
130
+ }
131
+ X(Qt, "composeContextScopes");
132
+ var eo = Object.defineProperty, gt = (e, t) => eo(e, "name", { value: t, configurable: !0 });
133
+ function rt(e, t) {
134
+ if (typeof e == "function")
135
+ return e(t);
136
+ e != null && (e.current = t);
137
+ }
138
+ gt(rt, "setRef");
139
+ function Jt(...e) {
140
+ return (t) => {
141
+ let n = !1;
142
+ const r = e.map((o) => {
143
+ const i = rt(o, t);
144
+ return !n && typeof i == "function" && (n = !0), i;
145
+ });
146
+ if (n)
147
+ return () => {
148
+ for (let o = 0; o < r.length; o++) {
149
+ const i = r[o];
150
+ typeof i == "function" ? i() : rt(e[o], null);
151
+ }
152
+ };
153
+ };
154
+ }
155
+ gt(Jt, "composeRefs");
156
+ function $(...e) {
157
+ return s.useCallback(Jt(...e), e);
158
+ }
159
+ gt($, "useComposedRefs");
160
+ var to = Object.defineProperty, ee = (e, t) => to(e, "name", { value: t, configurable: !0 });
161
+ // @__NO_SIDE_EFFECTS__
162
+ function de(e) {
163
+ const t = s.forwardRef((n, r) => {
164
+ let { children: o, ...i } = n, a = null, u = !1;
165
+ const c = [];
166
+ ot(o) && typeof Ne == "function" && (o = Ne(o._payload)), s.Children.forEach(o, (d) => {
167
+ if (rn(d)) {
168
+ u = !0;
169
+ const v = d;
170
+ let f = "child" in v.props ? v.props.child : v.props.children;
171
+ ot(f) && typeof Ne == "function" && (f = Ne(f._payload)), a = ro(v, f), c.push(a?.props?.children);
172
+ } else
173
+ c.push(d);
174
+ }), a ? a = s.cloneElement(a, void 0, c) : (
175
+ // A `Slottable` was found but it didn't resolve to a single element (e.g.
176
+ // it wrapped multiple elements, text, or a render-prop `child` that
177
+ // wasn't an element). Don't fall back to treating the `Slottable` wrapper
178
+ // itself as the slot target — throw a descriptive error below instead.
179
+ !u && s.Children.count(o) === 1 && s.isValidElement(o) && (a = o)
180
+ );
181
+ const m = a ? nn(a) : void 0, C = $(r, m);
182
+ if (!a) {
183
+ if (o || o === 0)
184
+ throw new Error(
185
+ u ? io(e) : so(e)
186
+ );
187
+ return o;
188
+ }
189
+ const l = tn(i, a.props ?? {});
190
+ return a.type !== s.Fragment && (l.ref = r ? C : m), s.cloneElement(a, l);
191
+ });
192
+ return t.displayName = `${e}.Slot`, t;
193
+ }
194
+ ee(de, "createSlot");
195
+ var en = Symbol.for("radix.slottable");
196
+ // @__NO_SIDE_EFFECTS__
197
+ function no(e) {
198
+ const t = /* @__PURE__ */ ee((n) => "child" in n ? n.children(n.child) : n.children, "Slottable");
199
+ return t.displayName = `${e}.Slottable`, t.__radixId = en, t;
200
+ }
201
+ ee(no, "createSlottable");
202
+ var ro = /* @__PURE__ */ ee((e, t) => {
203
+ if ("child" in e.props) {
204
+ const n = e.props.child;
205
+ return s.isValidElement(n) ? s.cloneElement(n, void 0, e.props.children(n.props.children)) : null;
206
+ }
207
+ return s.isValidElement(t) ? t : null;
208
+ }, "getSlottableElementFromSlottable");
209
+ function tn(e, t) {
210
+ const n = { ...t };
211
+ for (const r in t) {
212
+ const o = e[r], i = t[r];
213
+ /^on[A-Z]/.test(r) ? o && i ? n[r] = (...u) => {
214
+ const c = i(...u);
215
+ return o(...u), c;
216
+ } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
217
+ }
218
+ return { ...e, ...n };
219
+ }
220
+ ee(tn, "mergeProps");
221
+ function nn(e) {
222
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
223
+ return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
224
+ }
225
+ ee(nn, "getElementRef");
226
+ function rn(e) {
227
+ return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === en;
228
+ }
229
+ ee(rn, "isSlottable");
230
+ var oo = Symbol.for("react.lazy");
231
+ function ot(e) {
232
+ return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === oo && "_payload" in e && on(e._payload);
233
+ }
234
+ ee(ot, "isLazyComponent");
235
+ function on(e) {
236
+ return typeof e == "object" && e !== null && "then" in e;
237
+ }
238
+ ee(on, "isPromiseLike");
239
+ var so = /* @__PURE__ */ ee((e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, "createSlotError"), io = /* @__PURE__ */ ee((e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, "createSlottableError"), Ne = s[" use ".trim().toString()], ao = Object.defineProperty, co = (e, t) => ao(e, "name", { value: t, configurable: !0 }), uo = [
240
+ "a",
241
+ "button",
242
+ "div",
243
+ "form",
244
+ "h2",
245
+ "h3",
246
+ "img",
247
+ "input",
248
+ "label",
249
+ "li",
250
+ "nav",
251
+ "ol",
252
+ "p",
253
+ "select",
254
+ "span",
255
+ "svg",
256
+ "ul"
257
+ ], Y = uo.reduce((e, t) => {
258
+ const n = /* @__PURE__ */ de(`Primitive.${t}`), r = s.forwardRef((o, i) => {
259
+ const { asChild: a, ...u } = o, c = a ? n : t;
260
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ h(c, { ...u, ref: i });
261
+ });
262
+ return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
263
+ }, {});
264
+ function Ct(e, t) {
265
+ e && Yt.flushSync(() => e.dispatchEvent(t));
266
+ }
267
+ co(Ct, "dispatchDiscreteCustomEvent");
268
+ var lo = Object.defineProperty, L = (e, t) => lo(e, "name", { value: t, configurable: !0 });
269
+ // @__NO_SIDE_EFFECTS__
270
+ function bt(e) {
271
+ const t = e + "CollectionProvider", [n, r] = /* @__PURE__ */ fe(t), [o, i] = n(
272
+ t,
273
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
274
+ ), a = /* @__PURE__ */ L((p) => {
275
+ const { scope: g, children: S } = p, b = s.useRef(null), y = s.useRef(/* @__PURE__ */ new Map()).current;
276
+ return /* @__PURE__ */ h(o, { scope: g, itemMap: y, collectionRef: b, children: S });
277
+ }, "CollectionProvider");
278
+ a.displayName = t;
279
+ const u = e + "CollectionSlot", c = /* @__PURE__ */ de(u), m = s.forwardRef(
280
+ (p, g) => {
281
+ const { scope: S, children: b } = p, y = i(u, S), x = $(g, y.collectionRef);
282
+ return /* @__PURE__ */ h(c, { ref: x, children: b });
283
+ }
284
+ );
285
+ m.displayName = u;
286
+ const C = e + "CollectionItemSlot", l = "data-radix-collection-item", d = /* @__PURE__ */ de(C), v = s.forwardRef(
287
+ (p, g) => {
288
+ const { scope: S, children: b, ...y } = p, x = s.useRef(null), E = $(g, x), w = i(C, S);
289
+ return s.useEffect(() => (w.itemMap.set(x, { ref: x, ...y }), () => void w.itemMap.delete(x))), /* @__PURE__ */ h(d, { [l]: "", ref: E, children: b });
290
+ }
291
+ );
292
+ v.displayName = C;
293
+ function f(p) {
294
+ const g = i(e + "CollectionConsumer", p);
295
+ return s.useCallback(() => {
296
+ const b = g.collectionRef.current;
297
+ if (!b) return [];
298
+ const y = Array.from(b.querySelectorAll(`[${l}]`));
299
+ return Array.from(g.itemMap.values()).sort(
300
+ (w, O) => y.indexOf(w.ref.current) - y.indexOf(O.ref.current)
301
+ );
302
+ }, [g.collectionRef, g.itemMap]);
303
+ }
304
+ return L(f, "useCollection"), [
305
+ { Provider: a, Slot: m, ItemSlot: v },
306
+ f,
307
+ r
308
+ ];
309
+ }
310
+ L(bt, "createCollection");
311
+ var Lt = /* @__PURE__ */ new WeakMap(), D, H, Ze = (H = class extends Map {
312
+ constructor(n) {
313
+ super(n);
314
+ kt(this, D);
315
+ Xe(this, D, [...super.keys()]), Lt.set(this, !0);
316
+ }
317
+ set(n, r) {
318
+ return Lt.get(this) && (this.has(n) ? K(this, D)[K(this, D).indexOf(n)] = n : K(this, D).push(n)), super.set(n, r), this;
319
+ }
320
+ insert(n, r, o) {
321
+ const i = this.has(r), a = K(this, D).length, u = yt(n);
322
+ let c = u >= 0 ? u : a + u;
323
+ const m = c < 0 || c >= a ? -1 : c;
324
+ if (m === this.size || i && m === this.size - 1 || m === -1)
325
+ return this.set(r, o), this;
326
+ const C = this.size + (i ? 0 : 1);
327
+ u < 0 && c++;
328
+ const l = [...K(this, D)];
329
+ let d, v = !1;
330
+ for (let f = c; f < C; f++)
331
+ if (c === f) {
332
+ let p = l[f];
333
+ l[f] === r && (p = l[f + 1]), i && this.delete(r), d = this.get(p), this.set(r, o);
334
+ } else {
335
+ !v && l[f - 1] === r && (v = !0);
336
+ const p = l[v ? f : f - 1], g = d;
337
+ d = this.get(p), this.delete(p), this.set(p, g);
338
+ }
339
+ return this;
340
+ }
341
+ with(n, r, o) {
342
+ const i = new H(this);
343
+ return i.insert(n, r, o), i;
344
+ }
345
+ before(n) {
346
+ const r = K(this, D).indexOf(n) - 1;
347
+ if (!(r < 0))
348
+ return this.entryAt(r);
349
+ }
350
+ /**
351
+ * Sets a new key-value pair at the position before the given key.
352
+ */
353
+ setBefore(n, r, o) {
354
+ const i = K(this, D).indexOf(n);
355
+ return i === -1 ? this : this.insert(i, r, o);
356
+ }
357
+ after(n) {
358
+ let r = K(this, D).indexOf(n);
359
+ if (r = r === -1 || r === this.size - 1 ? -1 : r + 1, r !== -1)
360
+ return this.entryAt(r);
361
+ }
362
+ /**
363
+ * Sets a new key-value pair at the position after the given key.
364
+ */
365
+ setAfter(n, r, o) {
366
+ const i = K(this, D).indexOf(n);
367
+ return i === -1 ? this : this.insert(i + 1, r, o);
368
+ }
369
+ first() {
370
+ return this.entryAt(0);
371
+ }
372
+ last() {
373
+ return this.entryAt(-1);
374
+ }
375
+ clear() {
376
+ return Xe(this, D, []), super.clear();
377
+ }
378
+ delete(n) {
379
+ const r = super.delete(n);
380
+ return r && K(this, D).splice(K(this, D).indexOf(n), 1), r;
381
+ }
382
+ deleteAt(n) {
383
+ const r = this.keyAt(n);
384
+ return r !== void 0 ? this.delete(r) : !1;
385
+ }
386
+ at(n) {
387
+ const r = $e(K(this, D), n);
388
+ if (r !== void 0)
389
+ return this.get(r);
390
+ }
391
+ entryAt(n) {
392
+ const r = $e(K(this, D), n);
393
+ if (r !== void 0)
394
+ return [r, this.get(r)];
395
+ }
396
+ indexOf(n) {
397
+ return K(this, D).indexOf(n);
398
+ }
399
+ keyAt(n) {
400
+ return $e(K(this, D), n);
401
+ }
402
+ from(n, r) {
403
+ const o = this.indexOf(n);
404
+ if (o === -1)
405
+ return;
406
+ let i = o + r;
407
+ return i < 0 && (i = 0), i >= this.size && (i = this.size - 1), this.at(i);
408
+ }
409
+ keyFrom(n, r) {
410
+ const o = this.indexOf(n);
411
+ if (o === -1)
412
+ return;
413
+ let i = o + r;
414
+ return i < 0 && (i = 0), i >= this.size && (i = this.size - 1), this.keyAt(i);
415
+ }
416
+ find(n, r) {
417
+ let o = 0;
418
+ for (const i of this) {
419
+ if (Reflect.apply(n, r, [i, o, this]))
420
+ return i;
421
+ o++;
422
+ }
423
+ }
424
+ findIndex(n, r) {
425
+ let o = 0;
426
+ for (const i of this) {
427
+ if (Reflect.apply(n, r, [i, o, this]))
428
+ return o;
429
+ o++;
430
+ }
431
+ return -1;
432
+ }
433
+ filter(n, r) {
434
+ const o = [];
435
+ let i = 0;
436
+ for (const a of this)
437
+ Reflect.apply(n, r, [a, i, this]) && o.push(a), i++;
438
+ return new H(o);
439
+ }
440
+ map(n, r) {
441
+ const o = [];
442
+ let i = 0;
443
+ for (const a of this)
444
+ o.push([a[0], Reflect.apply(n, r, [a, i, this])]), i++;
445
+ return new H(o);
446
+ }
447
+ reduce(...n) {
448
+ const [r, o] = n;
449
+ let i = 0, a = o ?? this.at(0);
450
+ for (const u of this)
451
+ i === 0 && n.length === 1 ? a = u : a = Reflect.apply(r, this, [a, u, i, this]), i++;
452
+ return a;
453
+ }
454
+ reduceRight(...n) {
455
+ const [r, o] = n;
456
+ let i = o ?? this.at(-1);
457
+ for (let a = this.size - 1; a >= 0; a--) {
458
+ const u = this.at(a);
459
+ a === this.size - 1 && n.length === 1 ? i = u : i = Reflect.apply(r, this, [i, u, a, this]);
460
+ }
461
+ return i;
462
+ }
463
+ toSorted(n) {
464
+ const r = [...this.entries()].sort(n);
465
+ return new H(r);
466
+ }
467
+ toReversed() {
468
+ const n = new H();
469
+ for (let r = this.size - 1; r >= 0; r--) {
470
+ const o = this.keyAt(r), i = this.get(o);
471
+ n.set(o, i);
472
+ }
473
+ return n;
474
+ }
475
+ toSpliced(...n) {
476
+ const r = [...this.entries()];
477
+ return r.splice(...n), new H(r);
478
+ }
479
+ slice(n, r) {
480
+ const o = new H();
481
+ let i = this.size - 1;
482
+ if (n === void 0)
483
+ return o;
484
+ n < 0 && (n = n + this.size), r !== void 0 && r > 0 && (i = r - 1);
485
+ for (let a = n; a <= i; a++) {
486
+ const u = this.keyAt(a), c = this.get(u);
487
+ o.set(u, c);
488
+ }
489
+ return o;
490
+ }
491
+ every(n, r) {
492
+ let o = 0;
493
+ for (const i of this) {
494
+ if (!Reflect.apply(n, r, [i, o, this]))
495
+ return !1;
496
+ o++;
497
+ }
498
+ return !0;
499
+ }
500
+ some(n, r) {
501
+ let o = 0;
502
+ for (const i of this) {
503
+ if (Reflect.apply(n, r, [i, o, this]))
504
+ return !0;
505
+ o++;
506
+ }
507
+ return !1;
508
+ }
509
+ }, D = new WeakMap(), L(H, "OrderedDict"), H);
510
+ function $e(e, t) {
511
+ if ("at" in Array.prototype)
512
+ return Array.prototype.at.call(e, t);
513
+ const n = sn(e, t);
514
+ return n === -1 ? void 0 : e[n];
515
+ }
516
+ L($e, "at");
517
+ function sn(e, t) {
518
+ const n = e.length, r = yt(t), o = r >= 0 ? r : n + r;
519
+ return o < 0 || o >= n ? -1 : o;
520
+ }
521
+ L(sn, "toSafeIndex");
522
+ function yt(e) {
523
+ return e !== e || e === 0 ? 0 : Math.trunc(e);
524
+ }
525
+ L(yt, "toSafeInteger");
526
+ // @__NO_SIDE_EFFECTS__
527
+ function fo(e) {
528
+ const t = e + "CollectionProvider", [n, r] = /* @__PURE__ */ fe(t), [o, i] = n(
529
+ t,
530
+ {
531
+ collectionElement: null,
532
+ collectionRef: { current: null },
533
+ collectionRefObject: { current: null },
534
+ itemMap: new Ze(),
535
+ setItemMap: /* @__PURE__ */ L(() => {
536
+ }, "setItemMap")
537
+ }
538
+ ), a = /* @__PURE__ */ L(({ state: y, ...x }) => y ? /* @__PURE__ */ h(c, { ...x, state: y }) : /* @__PURE__ */ h(u, { ...x }), "CollectionProvider");
539
+ a.displayName = t;
540
+ const u = /* @__PURE__ */ L((y) => {
541
+ const x = g();
542
+ return /* @__PURE__ */ h(c, { ...y, state: x });
543
+ }, "CollectionInit");
544
+ u.displayName = t + "Init";
545
+ const c = /* @__PURE__ */ L((y) => {
546
+ const { scope: x, children: E, state: w } = y, O = s.useRef(null), [A, P] = s.useState(
547
+ null
548
+ ), G = $(O, P), [N, I] = w;
549
+ return s.useEffect(() => {
550
+ if (!A) return;
551
+ const F = un(() => {
552
+ });
553
+ return F.observe(A, {
554
+ childList: !0,
555
+ subtree: !0
556
+ }), () => {
557
+ F.disconnect();
558
+ };
559
+ }, [A]), /* @__PURE__ */ h(
560
+ o,
561
+ {
562
+ scope: x,
563
+ itemMap: N,
564
+ setItemMap: I,
565
+ collectionRef: G,
566
+ collectionRefObject: O,
567
+ collectionElement: A,
568
+ children: E
569
+ }
570
+ );
571
+ }, "CollectionProviderImpl");
572
+ c.displayName = t + "Impl";
573
+ const m = e + "CollectionSlot", C = /* @__PURE__ */ de(m), l = s.forwardRef(
574
+ (y, x) => {
575
+ const { scope: E, children: w } = y, O = i(m, E), A = $(x, O.collectionRef);
576
+ return /* @__PURE__ */ h(C, { ref: A, children: w });
577
+ }
578
+ );
579
+ l.displayName = m;
580
+ const d = e + "CollectionItemSlot", v = "data-radix-collection-item", f = /* @__PURE__ */ de(d), p = s.forwardRef(
581
+ (y, x) => {
582
+ const { scope: E, children: w, ...O } = y, A = s.useRef(null), [P, G] = s.useState(null), N = $(x, A, G), I = i(d, E), { setItemMap: F } = I, B = s.useRef(O);
583
+ an(B.current, O) || (B.current = O);
584
+ const Z = B.current;
585
+ return s.useEffect(() => {
586
+ const ne = Z;
587
+ return F((T) => P ? T.has(P) ? T.set(P, { ...ne, element: P }).toSorted(st) : (T.set(P, { ...ne, element: P }), T.toSorted(st)) : T), () => {
588
+ F((T) => !P || !T.has(P) ? T : (T.delete(P), new Ze(T)));
589
+ };
590
+ }, [P, Z, F]), /* @__PURE__ */ h(f, { [v]: "", ref: N, children: w });
591
+ }
592
+ );
593
+ p.displayName = d;
594
+ function g() {
595
+ return s.useState(new Ze());
596
+ }
597
+ L(g, "useInitCollection");
598
+ function S(y) {
599
+ const { itemMap: x } = i(e + "CollectionConsumer", y);
600
+ return x;
601
+ }
602
+ return L(S, "useCollection"), [
603
+ { Provider: a, Slot: l, ItemSlot: p },
604
+ {
605
+ createCollectionScope: r,
606
+ useCollection: S,
607
+ useInitCollection: g
608
+ }
609
+ ];
610
+ }
611
+ L(fo, "createCollection");
612
+ function an(e, t) {
613
+ if (e === t) return !0;
614
+ if (typeof e != "object" || typeof t != "object" || e == null || t == null) return !1;
615
+ const n = Object.keys(e), r = Object.keys(t);
616
+ if (n.length !== r.length) return !1;
617
+ for (const o of n)
618
+ if (!Object.prototype.hasOwnProperty.call(t, o) || e[o] !== t[o]) return !1;
619
+ return !0;
620
+ }
621
+ L(an, "shallowEqual");
622
+ function cn(e, t) {
623
+ return !!(t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_PRECEDING);
624
+ }
625
+ L(cn, "isElementPreceding");
626
+ function st(e, t) {
627
+ return !e[1].element || !t[1].element ? 0 : cn(e[1].element, t[1].element) ? -1 : 1;
628
+ }
629
+ L(st, "sortByDocumentPosition");
630
+ function un(e) {
631
+ return new MutationObserver((n) => {
632
+ for (const r of n)
633
+ if (r.type === "childList") {
634
+ e();
635
+ return;
636
+ }
637
+ });
638
+ }
639
+ L(un, "getChildListObserver");
640
+ var po = Object.defineProperty, mo = (e, t) => po(e, "name", { value: t, configurable: !0 }), ho = s.createContext(void 0);
641
+ function St(e) {
642
+ const t = s.useContext(ho);
643
+ return e || t || "ltr";
644
+ }
645
+ mo(St, "useDirection");
646
+ var vo = Object.defineProperty, go = (e, t) => vo(e, "name", { value: t, configurable: !0 });
647
+ function J(e) {
648
+ const t = s.useRef(e);
649
+ return s.useEffect(() => {
650
+ t.current = e;
651
+ }), s.useMemo(() => (...n) => t.current?.(...n), []);
652
+ }
653
+ go(J, "useCallbackRef");
654
+ var Co = Object.defineProperty, k = (e, t) => Co(e, "name", { value: t, configurable: !0 }), it = "dismissableLayer.update", bo = "dismissableLayer.pointerDownOutside", yo = "dismissableLayer.focusOutside", $t, ln = s.createContext({
655
+ layers: /* @__PURE__ */ new Set(),
656
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
657
+ branches: /* @__PURE__ */ new Set(),
658
+ // Outside elements that belong to a layer's own dismiss affordance (eg, a
659
+ // dialog overlay). Pressing them should dismiss the layer regardless of
660
+ // whether or not they stop propagation.
661
+ //
662
+ // See https://github.com/radix-ui/primitives/issues/3346
663
+ dismissableSurfaces: /* @__PURE__ */ new Set()
664
+ }), So = /* @__PURE__ */ s.forwardRef(
665
+ // blank line to reduce diff noise
666
+ /* @__PURE__ */ k(function(t, n) {
667
+ const {
668
+ disableOutsidePointerEvents: r = !1,
669
+ deferPointerDownOutside: o = !1,
670
+ onEscapeKeyDown: i,
671
+ onPointerDownOutside: a,
672
+ onFocusOutside: u,
673
+ onInteractOutside: c,
674
+ onDismiss: m,
675
+ ...C
676
+ } = t, l = s.useContext(ln), [d, v] = s.useState(null), f = d?.ownerDocument ?? globalThis?.document, [, p] = s.useState({}), g = $(n, v), S = Array.from(l.layers), [b] = [
677
+ ...l.layersWithOutsidePointerEventsDisabled
678
+ ].slice(-1), y = b ? S.indexOf(b) : -1, x = d ? S.indexOf(d) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0, w = x >= y, O = s.useRef(!1), A = dn(
679
+ (I) => {
680
+ a?.(I), c?.(I), I.defaultPrevented || m?.();
681
+ },
682
+ {
683
+ ownerDocument: f,
684
+ deferPointerDownOutside: o,
685
+ isDeferredPointerDownOutsideRef: O,
686
+ dismissableSurfaces: l.dismissableSurfaces,
687
+ shouldHandlePointerDownOutside: s.useCallback(
688
+ (I) => {
689
+ if (!(I instanceof Node))
690
+ return !1;
691
+ const F = [...l.branches].some(
692
+ (B) => B.contains(I)
693
+ );
694
+ return w && !F;
695
+ },
696
+ [l.branches, w]
697
+ )
698
+ }
699
+ ), P = fn((I) => {
700
+ if (o && O.current)
701
+ return;
702
+ const F = I.target;
703
+ [...l.branches].some((Z) => Z.contains(F)) || (u?.(I), c?.(I), I.defaultPrevented || m?.());
704
+ }, f), G = d ? x === S.length - 1 : !1, N = J((I) => {
705
+ I.key === "Escape" && (i?.(I), !I.defaultPrevented && m && (I.preventDefault(), m()));
706
+ });
707
+ return s.useEffect(() => {
708
+ if (G)
709
+ return f.addEventListener("keydown", N, { capture: !0 }), () => f.removeEventListener("keydown", N, { capture: !0 });
710
+ }, [f, G, N]), s.useEffect(() => {
711
+ if (d)
712
+ return r && (l.layersWithOutsidePointerEventsDisabled.size === 0 && ($t = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), at(), () => {
713
+ r && (l.layersWithOutsidePointerEventsDisabled.delete(d), l.layersWithOutsidePointerEventsDisabled.size === 0 && (f.body.style.pointerEvents = $t));
714
+ };
715
+ }, [d, f, r, l]), s.useEffect(() => () => {
716
+ d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), at());
717
+ }, [d, l]), s.useEffect(() => {
718
+ const I = /* @__PURE__ */ k(() => p({}), "handleUpdate");
719
+ return document.addEventListener(it, I), () => document.removeEventListener(it, I);
720
+ }, []), /* @__PURE__ */ h(
721
+ Y.div,
722
+ {
723
+ ...C,
724
+ ref: g,
725
+ style: {
726
+ pointerEvents: E ? w ? "auto" : "none" : void 0,
727
+ ...t.style
728
+ },
729
+ onFocusCapture: R(t.onFocusCapture, P.onFocusCapture),
730
+ onBlurCapture: R(t.onBlurCapture, P.onBlurCapture),
731
+ onPointerDownCapture: R(
732
+ t.onPointerDownCapture,
733
+ A.onPointerDownCapture
734
+ )
735
+ }
736
+ );
737
+ }, "DismissableLayer")
738
+ );
739
+ function xo() {
740
+ const e = s.useContext(ln), [t, n] = s.useState(null);
741
+ return s.useEffect(() => {
742
+ if (t)
743
+ return e.dismissableSurfaces.add(t), () => {
744
+ e.dismissableSurfaces.delete(t);
745
+ };
746
+ }, [t, e.dismissableSurfaces]), n;
747
+ }
748
+ k(xo, "useDismissableLayerSurface");
749
+ var Eo = /* @__PURE__ */ k(() => !0, "IS_TRUE");
750
+ function dn(e, t) {
751
+ const {
752
+ ownerDocument: n = globalThis?.document,
753
+ deferPointerDownOutside: r = !1,
754
+ isDeferredPointerDownOutsideRef: o,
755
+ dismissableSurfaces: i,
756
+ shouldHandlePointerDownOutside: a = Eo
757
+ } = t, u = J(e), c = s.useRef(!1), m = s.useRef(!1), C = s.useRef(/* @__PURE__ */ new Map()), l = s.useRef(() => {
758
+ });
759
+ return s.useEffect(() => {
760
+ function d() {
761
+ m.current = !1, o.current = !1, C.current.clear();
762
+ }
763
+ k(d, "resetOutsideInteraction");
764
+ function v() {
765
+ return Array.from(C.current.values()).some(Boolean);
766
+ }
767
+ k(v, "isOutsideInteractionIntercepted");
768
+ function f(y) {
769
+ if (!m.current)
770
+ return;
771
+ const x = y.target;
772
+ x instanceof Node && [...i].some((w) => w.contains(x)) || C.current.set(y.type, !0), y.type === "click" && window.setTimeout(() => {
773
+ m.current && l.current();
774
+ }, 0);
775
+ }
776
+ k(f, "handleInteractionCapture");
777
+ function p(y) {
778
+ m.current && C.current.set(y.type, !1);
779
+ }
780
+ k(p, "handleInteractionBubble");
781
+ const g = /* @__PURE__ */ k((y) => {
782
+ if (y.target && !c.current) {
783
+ let x = function() {
784
+ n.removeEventListener("click", l.current);
785
+ const w = v();
786
+ d(), w || xt(
787
+ bo,
788
+ u,
789
+ E,
790
+ { discrete: !0 }
791
+ );
792
+ };
793
+ if (k(x, "handleAndDispatchPointerDownOutsideEvent"), !a(y.target)) {
794
+ n.removeEventListener("click", l.current), d(), c.current = !1;
795
+ return;
796
+ }
797
+ const E = { originalEvent: y };
798
+ m.current = !0, o.current = r && y.button === 0, C.current.clear(), !r || y.button !== 0 ? x() : (n.removeEventListener("click", l.current), l.current = x, n.addEventListener("click", l.current, { once: !0 }));
799
+ } else
800
+ n.removeEventListener("click", l.current), d();
801
+ c.current = !1;
802
+ }, "handlePointerDown"), S = [
803
+ "pointerup",
804
+ "mousedown",
805
+ "mouseup",
806
+ "touchstart",
807
+ "touchend",
808
+ "click"
809
+ ];
810
+ for (const y of S)
811
+ n.addEventListener(y, f, !0), n.addEventListener(y, p);
812
+ const b = window.setTimeout(() => {
813
+ n.addEventListener("pointerdown", g);
814
+ }, 0);
815
+ return () => {
816
+ window.clearTimeout(b), n.removeEventListener("pointerdown", g), n.removeEventListener("click", l.current);
817
+ for (const y of S)
818
+ n.removeEventListener(y, f, !0), n.removeEventListener(y, p);
819
+ };
820
+ }, [
821
+ n,
822
+ u,
823
+ r,
824
+ o,
825
+ i,
826
+ a
827
+ ]), {
828
+ // ensures we check React component tree (not just DOM tree)
829
+ onPointerDownCapture: /* @__PURE__ */ k(() => c.current = !0, "onPointerDownCapture")
830
+ };
831
+ }
832
+ k(dn, "usePointerDownOutside");
833
+ function fn(e, t = globalThis?.document) {
834
+ const n = J(e), r = s.useRef(!1);
835
+ return s.useEffect(() => {
836
+ const o = /* @__PURE__ */ k((i) => {
837
+ i.target && !r.current && xt(yo, n, { originalEvent: i }, {
838
+ discrete: !1
839
+ });
840
+ }, "handleFocus");
841
+ return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
842
+ }, [t, n]), {
843
+ onFocusCapture: /* @__PURE__ */ k(() => r.current = !0, "onFocusCapture"),
844
+ onBlurCapture: /* @__PURE__ */ k(() => r.current = !1, "onBlurCapture")
845
+ };
846
+ }
847
+ k(fn, "useFocusOutside");
848
+ function at() {
849
+ const e = new CustomEvent(it);
850
+ document.dispatchEvent(e);
851
+ }
852
+ k(at, "dispatchUpdate");
853
+ function xt(e, t, n, { discrete: r }) {
854
+ const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
855
+ t && o.addEventListener(e, t, { once: !0 }), r ? Ct(o, i) : o.dispatchEvent(i);
856
+ }
857
+ k(xt, "handleAndDispatchCustomEvent");
858
+ var wo = Object.defineProperty, Et = (e, t) => wo(e, "name", { value: t, configurable: !0 }), De = 0, ge = null;
859
+ function Mo(e) {
860
+ return wt(), e.children;
861
+ }
862
+ Et(Mo, "FocusGuards");
863
+ function wt() {
864
+ s.useEffect(() => {
865
+ ge || (ge = { start: ct(), end: ct() });
866
+ const { start: e, end: t } = ge;
867
+ return document.body.firstElementChild !== e && document.body.insertAdjacentElement("afterbegin", e), document.body.lastElementChild !== t && document.body.insertAdjacentElement("beforeend", t), De++, () => {
868
+ De === 1 && (ge?.start.remove(), ge?.end.remove(), ge = null), De = Math.max(0, De - 1);
869
+ };
870
+ }, []);
871
+ }
872
+ Et(wt, "useFocusGuards");
873
+ function ct() {
874
+ const e = document.createElement("span");
875
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
876
+ }
877
+ Et(ct, "createFocusGuard");
878
+ var Po = Object.defineProperty, z = (e, t) => Po(e, "name", { value: t, configurable: !0 }), qe = "focusScope.autoFocusOnMount", Qe = "focusScope.autoFocusOnUnmount", Ut = { bubbles: !1, cancelable: !0 }, Ro = /* @__PURE__ */ s.forwardRef(
879
+ /* @__PURE__ */ z(function(t, n) {
880
+ const {
881
+ loop: r = !1,
882
+ trapped: o = !1,
883
+ onMountAutoFocus: i,
884
+ onUnmountAutoFocus: a,
885
+ ...u
886
+ } = t, [c, m] = s.useState(null), C = J(i), l = J(a), d = s.useRef(null), v = $(n, m), f = s.useRef({
887
+ paused: !1,
888
+ pause() {
889
+ this.paused = !0;
890
+ },
891
+ resume() {
892
+ this.paused = !1;
893
+ }
894
+ }).current;
895
+ s.useEffect(() => {
896
+ if (o) {
897
+ let g = function(x) {
898
+ if (f.paused || !c) return;
899
+ const E = x.target;
900
+ c.contains(E) ? d.current = E : oe(d.current, { select: !0 });
901
+ }, S = function(x) {
902
+ if (f.paused || !c) return;
903
+ const E = x.relatedTarget;
904
+ E !== null && (c.contains(E) || oe(d.current, { select: !0 }));
905
+ }, b = function(x) {
906
+ if (document.activeElement === document.body)
907
+ for (const w of x)
908
+ w.removedNodes.length > 0 && oe(c);
909
+ };
910
+ z(g, "handleFocusIn"), z(S, "handleFocusOut"), z(b, "handleMutations"), document.addEventListener("focusin", g), document.addEventListener("focusout", S);
911
+ const y = new MutationObserver(b);
912
+ return c && y.observe(c, { childList: !0, subtree: !0 }), () => {
913
+ document.removeEventListener("focusin", g), document.removeEventListener("focusout", S), y.disconnect();
914
+ };
915
+ }
916
+ }, [o, c, f.paused]), s.useEffect(() => {
917
+ if (c) {
918
+ Gt.add(f);
919
+ const g = document.activeElement;
920
+ if (!c.contains(g)) {
921
+ const b = new CustomEvent(qe, Ut);
922
+ c.addEventListener(qe, C), c.dispatchEvent(b), b.defaultPrevented || (pn(Cn(Mt(c)), { select: !0 }), document.activeElement === g && oe(c));
923
+ }
924
+ return () => {
925
+ c.removeEventListener(qe, C), setTimeout(() => {
926
+ const b = new CustomEvent(Qe, Ut);
927
+ c.addEventListener(Qe, l), c.dispatchEvent(b), b.defaultPrevented || oe(g ?? document.body, { select: !0 }), c.removeEventListener(Qe, l), Gt.remove(f);
928
+ }, 0);
929
+ };
930
+ }
931
+ }, [c, C, l, f]);
932
+ const p = s.useCallback(
933
+ (g) => {
934
+ if (!r && !o || f.paused) return;
935
+ const S = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, b = document.activeElement;
936
+ if (S && b) {
937
+ const y = g.currentTarget, [x, E] = mn(y);
938
+ x && E ? !g.shiftKey && b === E ? (g.preventDefault(), r && oe(x, { select: !0 })) : g.shiftKey && b === x && (g.preventDefault(), r && oe(E, { select: !0 })) : b === y && g.preventDefault();
939
+ }
940
+ },
941
+ [r, o, f.paused]
942
+ );
943
+ return /* @__PURE__ */ h(Y.div, { tabIndex: -1, ...u, ref: v, onKeyDown: p });
944
+ }, "FocusScope")
945
+ );
946
+ function pn(e, { select: t = !1 } = {}) {
947
+ const n = document.activeElement;
948
+ for (const r of e)
949
+ if (oe(r, { select: t }), document.activeElement !== n) return;
950
+ }
951
+ z(pn, "focusFirst");
952
+ function mn(e) {
953
+ const t = Mt(e), n = ut(t, e), r = ut(t.reverse(), e);
954
+ return [n, r];
955
+ }
956
+ z(mn, "getTabbableEdges");
957
+ function Mt(e) {
958
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
959
+ acceptNode: /* @__PURE__ */ z((r) => {
960
+ const o = r.tagName === "INPUT" && r.type === "hidden";
961
+ return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
962
+ }, "acceptNode")
963
+ });
964
+ for (; n.nextNode(); ) t.push(n.currentNode);
965
+ return t;
966
+ }
967
+ z(Mt, "getTabbableCandidates");
968
+ function ut(e, t) {
969
+ const n = typeof t.checkVisibility == "function" && t.checkVisibility({ checkVisibilityCSS: !0 });
970
+ for (const r of e)
971
+ if (!(n ? !r.checkVisibility({ checkVisibilityCSS: !0 }) : hn(r, { upTo: t })))
972
+ return r;
973
+ }
974
+ z(ut, "findVisible");
975
+ function hn(e, { upTo: t }) {
976
+ if (getComputedStyle(e).visibility === "hidden") return !0;
977
+ for (; e; ) {
978
+ if (t !== void 0 && e === t) return !1;
979
+ if (getComputedStyle(e).display === "none") return !0;
980
+ e = e.parentElement;
981
+ }
982
+ return !1;
983
+ }
984
+ z(hn, "isHidden");
985
+ function vn(e) {
986
+ return e instanceof HTMLInputElement && "select" in e;
987
+ }
988
+ z(vn, "isSelectableInput");
989
+ function oe(e, { select: t = !1 } = {}) {
990
+ if (e && e.focus) {
991
+ const n = document.activeElement;
992
+ e.focus({ preventScroll: !0 }), e !== n && vn(e) && t && e.select();
993
+ }
994
+ }
995
+ z(oe, "focus");
996
+ var Gt = gn();
997
+ function gn() {
998
+ let e = [];
999
+ return {
1000
+ add(t) {
1001
+ const n = e[0];
1002
+ t !== n && n?.pause(), e = lt(e, t), e.unshift(t);
1003
+ },
1004
+ remove(t) {
1005
+ e = lt(e, t), e[0]?.resume();
1006
+ }
1007
+ };
1008
+ }
1009
+ z(gn, "createFocusScopesStack");
1010
+ function lt(e, t) {
1011
+ const n = [...e], r = n.indexOf(t);
1012
+ return r !== -1 && n.splice(r, 1), n;
1013
+ }
1014
+ z(lt, "arrayRemove");
1015
+ function Cn(e) {
1016
+ return e.filter((t) => t.tagName !== "A");
1017
+ }
1018
+ z(Cn, "removeLinks");
1019
+ var q = globalThis?.document ? s.useLayoutEffect : () => {
1020
+ }, Io = Object.defineProperty, _o = (e, t) => Io(e, "name", { value: t, configurable: !0 }), Oo = s[" useId ".trim().toString()] || (() => {
1021
+ }), To = 0;
1022
+ function Ue(e) {
1023
+ const [t, n] = s.useState(Oo());
1024
+ return q(() => {
1025
+ e || n((r) => r ?? String(To++));
1026
+ }, [e]), e || (t ? `radix-${t}` : "");
1027
+ }
1028
+ _o(Ue, "useId");
1029
+ var Ao = Object.defineProperty, No = (e, t) => Ao(e, "name", { value: t, configurable: !0 });
1030
+ function bn(e) {
1031
+ const [t, n] = s.useState(void 0);
1032
+ return q(() => {
1033
+ if (e) {
1034
+ n({ width: e.offsetWidth, height: e.offsetHeight });
1035
+ const r = new ResizeObserver((o) => {
1036
+ if (!Array.isArray(o) || !o.length)
1037
+ return;
1038
+ const i = o[0];
1039
+ let a, u;
1040
+ if ("borderBoxSize" in i) {
1041
+ const c = i.borderBoxSize, m = Array.isArray(c) ? c[0] : c;
1042
+ a = m.inlineSize, u = m.blockSize;
1043
+ } else
1044
+ a = e.offsetWidth, u = e.offsetHeight;
1045
+ n({ width: a, height: u });
1046
+ });
1047
+ return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
1048
+ } else
1049
+ n(void 0);
1050
+ }, [e]), t;
1051
+ }
1052
+ No(bn, "useSize");
1053
+ var Do = Object.defineProperty, ce = (e, t) => Do(e, "name", { value: t, configurable: !0 }), yn = "Popper", [Sn, xn] = /* @__PURE__ */ fe(yn), [Fo, En] = Sn(yn), ko = /* @__PURE__ */ ce((e) => {
1054
+ const { __scopePopper: t, children: n } = e, [r, o] = s.useState(null), [i, a] = s.useState(void 0);
1055
+ return /* @__PURE__ */ h(
1056
+ Fo,
1057
+ {
1058
+ scope: t,
1059
+ anchor: r,
1060
+ onAnchorChange: o,
1061
+ placementState: i,
1062
+ setPlacementState: a,
1063
+ children: n
1064
+ }
1065
+ );
1066
+ }, "Popper"), Lo = "PopperAnchor", $o = /* @__PURE__ */ s.forwardRef(
1067
+ /* @__PURE__ */ ce(function(t, n) {
1068
+ const { __scopePopper: r, virtualRef: o, ...i } = t, a = En(Lo, r), u = s.useRef(null), c = a.onAnchorChange, m = s.useCallback(
1069
+ (p) => {
1070
+ u.current = p, p && c(p);
1071
+ },
1072
+ [c]
1073
+ ), C = $(n, m), l = s.useRef(null);
1074
+ s.useEffect(() => {
1075
+ if (!o)
1076
+ return;
1077
+ const p = l.current;
1078
+ l.current = o.current, p !== l.current && c(l.current);
1079
+ });
1080
+ const d = a.placementState && Be(a.placementState), v = d?.[0], f = d?.[1];
1081
+ return o ? null : /* @__PURE__ */ h(
1082
+ Y.div,
1083
+ {
1084
+ "data-radix-popper-side": v,
1085
+ "data-radix-popper-align": f,
1086
+ ...i,
1087
+ ref: C
1088
+ }
1089
+ );
1090
+ }, "PopperAnchor")
1091
+ ), wn = "PopperContent", [Uo, ba] = Sn(wn), Go = /* @__PURE__ */ s.forwardRef(
1092
+ /* @__PURE__ */ ce(function(t, n) {
1093
+ const {
1094
+ __scopePopper: r,
1095
+ side: o = "bottom",
1096
+ sideOffset: i = 0,
1097
+ align: a = "center",
1098
+ alignOffset: u = 0,
1099
+ arrowPadding: c = 0,
1100
+ avoidCollisions: m = !0,
1101
+ collisionBoundary: C = [],
1102
+ collisionPadding: l = 0,
1103
+ sticky: d = "partial",
1104
+ hideWhenDetached: v = !1,
1105
+ updatePositionStrategy: f = "optimized",
1106
+ onPlaced: p,
1107
+ ...g
1108
+ } = t, S = En(wn, r), [b, y] = s.useState(null), x = $(n, y), [E, w] = s.useState(null), O = bn(E), A = O?.width ?? 0, P = O?.height ?? 0, G = o + (a !== "center" ? "-" + a : ""), N = typeof l == "number" ? l : { top: 0, right: 0, bottom: 0, left: 0, ...l }, I = Array.isArray(C) ? C : [C], F = I.length > 0, B = {
1109
+ padding: N,
1110
+ boundary: I.filter(Mn),
1111
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
1112
+ altBoundary: F
1113
+ }, { refs: Z, floatingStyles: ne, placement: T, isPositioned: he, middlewareData: V } = Ir({
1114
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
1115
+ strategy: "fixed",
1116
+ placement: G,
1117
+ whileElementsMounted: /* @__PURE__ */ ce((...ve) => kr(...ve, {
1118
+ animationFrame: f === "always"
1119
+ }), "whileElementsMounted"),
1120
+ elements: {
1121
+ reference: S.anchor
1122
+ },
1123
+ middleware: [
1124
+ _r({ mainAxis: i + P, alignmentAxis: u }),
1125
+ m && Or({
1126
+ mainAxis: !0,
1127
+ crossAxis: !1,
1128
+ limiter: d === "partial" ? Fr() : void 0,
1129
+ ...B
1130
+ }),
1131
+ m && Tr({ ...B }),
1132
+ Ar({
1133
+ ...B,
1134
+ apply: /* @__PURE__ */ ce(({ elements: ve, rects: Nt, availableWidth: Er, availableHeight: wr }) => {
1135
+ const { width: Mr, height: Pr } = Nt.reference, Ae = ve.floating.style;
1136
+ Ae.setProperty("--radix-popper-available-width", `${Er}px`), Ae.setProperty("--radix-popper-available-height", `${wr}px`), Ae.setProperty("--radix-popper-anchor-width", `${Mr}px`), Ae.setProperty("--radix-popper-anchor-height", `${Pr}px`);
1137
+ }, "apply")
1138
+ }),
1139
+ E && Nr({ element: E, padding: c }),
1140
+ Bo({ arrowWidth: A, arrowHeight: P }),
1141
+ v && Dr({
1142
+ strategy: "referenceHidden",
1143
+ ...B,
1144
+ // `hide` detects whether the anchor (reference) is clipped, so when
1145
+ // no explicit `collisionBoundary` is set we fall back to Floating
1146
+ // UI's default clipping ancestors (e.g. a scrollable menu). This
1147
+ // lets an occluded submenu hide once its anchor scrolls out of view
1148
+ // (#3237). The collision/size middlewares deliberately keep the
1149
+ // viewport-based default to avoid clamping content rendered inside
1150
+ // transformed or overflow-clipping portal containers.
1151
+ boundary: F ? B.boundary : void 0
1152
+ })
1153
+ ]
1154
+ }), M = S.setPlacementState;
1155
+ q(() => (M(T), () => {
1156
+ M(void 0);
1157
+ }), [T, M]);
1158
+ const [re, te] = Be(T), ae = J(p);
1159
+ q(() => {
1160
+ he && ae?.();
1161
+ }, [he, ae]);
1162
+ const we = V.arrow?.x, Me = V.arrow?.y, Te = V.arrow?.centerOffset !== 0, [le, j] = s.useState();
1163
+ return q(() => {
1164
+ b && j(window.getComputedStyle(b).zIndex);
1165
+ }, [b]), /* @__PURE__ */ h(
1166
+ "div",
1167
+ {
1168
+ ref: Z.setFloating,
1169
+ "data-radix-popper-content-wrapper": "",
1170
+ style: {
1171
+ ...ne,
1172
+ transform: he ? ne.transform : "translate(0, -200%)",
1173
+ // keep off the page when measuring
1174
+ minWidth: "max-content",
1175
+ zIndex: le,
1176
+ "--radix-popper-transform-origin": [
1177
+ V.transformOrigin?.x,
1178
+ V.transformOrigin?.y
1179
+ ].join(" "),
1180
+ // hide the content if using the hide middleware and should be hidden
1181
+ // set visibility to hidden and disable pointer events so the UI behaves
1182
+ // as if the PopperContent isn't there at all
1183
+ ...V.hide?.referenceHidden && {
1184
+ visibility: "hidden",
1185
+ pointerEvents: "none"
1186
+ }
1187
+ },
1188
+ dir: t.dir,
1189
+ children: /* @__PURE__ */ h(
1190
+ Uo,
1191
+ {
1192
+ scope: r,
1193
+ placedSide: re,
1194
+ placedAlign: te,
1195
+ onArrowChange: w,
1196
+ arrowX: we,
1197
+ arrowY: Me,
1198
+ shouldHideArrow: Te,
1199
+ children: /* @__PURE__ */ h(
1200
+ Y.div,
1201
+ {
1202
+ "data-side": re,
1203
+ "data-align": te,
1204
+ ...g,
1205
+ ref: x,
1206
+ style: {
1207
+ ...g.style,
1208
+ // if the PopperContent hasn't been placed yet (not all
1209
+ // measurements done) we prevent animations so that users'
1210
+ // animations don't kick in too early from the wrong sides.
1211
+ animation: he ? g.style?.animation : "none"
1212
+ }
1213
+ }
1214
+ )
1215
+ }
1216
+ )
1217
+ }
1218
+ );
1219
+ }, "PopperContent")
1220
+ );
1221
+ function Mn(e) {
1222
+ return e !== null;
1223
+ }
1224
+ ce(Mn, "isNotNull");
1225
+ var Bo = /* @__PURE__ */ ce((e) => ({
1226
+ name: "transformOrigin",
1227
+ options: e,
1228
+ fn(t) {
1229
+ const { placement: n, rects: r, middlewareData: o } = t, a = o.arrow?.centerOffset !== 0, u = a ? 0 : e.arrowWidth, c = a ? 0 : e.arrowHeight, [m, C] = Be(n), l = { start: "0%", center: "50%", end: "100%" }[C], d = (o.arrow?.x ?? 0) + u / 2, v = (o.arrow?.y ?? 0) + c / 2;
1230
+ let f = "", p = "";
1231
+ return m === "bottom" ? (f = a ? l : `${d}px`, p = `${-c}px`) : m === "top" ? (f = a ? l : `${d}px`, p = `${r.floating.height + c}px`) : m === "right" ? (f = `${-c}px`, p = a ? l : `${v}px`) : m === "left" && (f = `${r.floating.width + c}px`, p = a ? l : `${v}px`), { data: { x: f, y: p } };
1232
+ }
1233
+ }), "transformOrigin");
1234
+ function Be(e) {
1235
+ const [t, n = "center"] = e.split("-");
1236
+ return [t, n];
1237
+ }
1238
+ ce(Be, "getSideAndAlignFromPlacement");
1239
+ var Pn = ko, Ko = $o, jo = Go, zo = Object.defineProperty, Wo = (e, t) => zo(e, "name", { value: t, configurable: !0 }), Vo = /* @__PURE__ */ s.forwardRef(
1240
+ /* @__PURE__ */ Wo(function(t, n) {
1241
+ const { container: r, ...o } = t, [i, a] = s.useState(!1);
1242
+ q(() => a(!0), []);
1243
+ const u = r || i && globalThis?.document?.body;
1244
+ return u ? Yt.createPortal(/* @__PURE__ */ h(Y.div, { ...o, ref: n }), u) : null;
1245
+ }, "Portal")
1246
+ ), Ho = Object.defineProperty, se = (e, t) => Ho(e, "name", { value: t, configurable: !0 });
1247
+ function Rn(e, t) {
1248
+ return s.useReducer((n, r) => t[n][r] ?? n, e);
1249
+ }
1250
+ se(Rn, "useStateMachine");
1251
+ var Ke = /* @__PURE__ */ se((e) => {
1252
+ const { present: t, children: n } = e, r = In(t), o = typeof n == "function" ? n({ present: r.isPresent }) : s.Children.only(n), i = _n(r.ref, On(o));
1253
+ return typeof n == "function" || r.isPresent ? s.cloneElement(o, { ref: i }) : null;
1254
+ }, "Presence");
1255
+ function In(e) {
1256
+ const [t, n] = s.useState(), r = s.useRef(null), o = s.useRef(e), i = s.useRef("none"), a = s.useRef(void 0), u = e ? "mounted" : "unmounted", [c, m] = Rn(u, {
1257
+ mounted: {
1258
+ UNMOUNT: "unmounted",
1259
+ ANIMATION_OUT: "unmountSuspended"
1260
+ },
1261
+ unmountSuspended: {
1262
+ MOUNT: "mounted",
1263
+ ANIMATION_END: "unmounted"
1264
+ },
1265
+ unmounted: {
1266
+ MOUNT: "mounted"
1267
+ }
1268
+ });
1269
+ return s.useEffect(() => {
1270
+ c === "mounted" ? (i.current = a.current ?? Se(r.current), a.current = void 0) : i.current = "none";
1271
+ }, [c]), q(() => {
1272
+ const C = r.current, l = o.current;
1273
+ if (l !== e) {
1274
+ const v = i.current, f = Se(C);
1275
+ e ? (a.current = f, m("MOUNT")) : f === "none" || C?.display === "none" ? m("UNMOUNT") : m(l && v !== f ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
1276
+ }
1277
+ }, [e, m]), q(() => {
1278
+ if (t) {
1279
+ let C;
1280
+ const l = t.ownerDocument.defaultView ?? window, d = /* @__PURE__ */ se((f) => {
1281
+ const g = Se(r.current).includes(CSS.escape(f.animationName));
1282
+ if (f.target === t && g && (m("ANIMATION_END"), !o.current)) {
1283
+ const S = t.style.animationFillMode;
1284
+ t.style.animationFillMode = "forwards", C = l.setTimeout(() => {
1285
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = S);
1286
+ });
1287
+ }
1288
+ }, "handleAnimationEnd"), v = /* @__PURE__ */ se((f) => {
1289
+ f.target === t && (i.current = Se(r.current));
1290
+ }, "handleAnimationStart");
1291
+ return t.addEventListener("animationstart", v), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
1292
+ l.clearTimeout(C), t.removeEventListener("animationstart", v), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
1293
+ };
1294
+ } else
1295
+ m("ANIMATION_END");
1296
+ }, [t, m]), {
1297
+ isPresent: ["mounted", "unmountSuspended"].includes(c),
1298
+ ref: s.useCallback((C) => {
1299
+ if (C) {
1300
+ const l = getComputedStyle(C);
1301
+ r.current = l, a.current = Se(l);
1302
+ } else
1303
+ r.current = null;
1304
+ n(C);
1305
+ }, [])
1306
+ };
1307
+ }
1308
+ se(In, "usePresence");
1309
+ function dt(e, t) {
1310
+ if (typeof e == "function")
1311
+ return e(t);
1312
+ e != null && (e.current = t);
1313
+ }
1314
+ se(dt, "setRef");
1315
+ function _n(...e) {
1316
+ const t = s.useRef(e);
1317
+ return t.current = e, s.useCallback((n) => {
1318
+ const r = t.current;
1319
+ let o = !1;
1320
+ const i = r.map((a) => {
1321
+ const u = dt(a, n);
1322
+ return !o && typeof u == "function" && (o = !0), u;
1323
+ });
1324
+ if (o)
1325
+ return () => {
1326
+ for (let a = 0; a < i.length; a++) {
1327
+ const u = i[a];
1328
+ typeof u == "function" ? u() : dt(r[a], null);
1329
+ }
1330
+ };
1331
+ }, []);
1332
+ }
1333
+ se(_n, "useStableComposedRefs");
1334
+ function Se(e) {
1335
+ return e?.animationName || "none";
1336
+ }
1337
+ se(Se, "getAnimationName");
1338
+ function On(e) {
1339
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
1340
+ return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
1341
+ }
1342
+ se(On, "getElementRef");
1343
+ var Yo = Object.defineProperty, Xo = (e, t) => Yo(e, "name", { value: t, configurable: !0 }), Bt = s[" useEffectEvent ".trim().toString()], Kt = s[" useInsertionEffect ".trim().toString()];
1344
+ function Tn(e) {
1345
+ if (typeof Bt == "function")
1346
+ return Bt(e);
1347
+ const t = s.useRef(() => {
1348
+ throw new Error("Cannot call an event handler while rendering.");
1349
+ });
1350
+ return typeof Kt == "function" ? Kt(() => {
1351
+ t.current = e;
1352
+ }) : q(() => {
1353
+ t.current = e;
1354
+ }), s.useMemo(() => (...n) => t.current?.(...n), []);
1355
+ }
1356
+ Xo(Tn, "useEffectEvent");
1357
+ var Zo = Object.defineProperty, _e = (e, t) => Zo(e, "name", { value: t, configurable: !0 }), qo = s[" useInsertionEffect ".trim().toString()] || q;
1358
+ function je({
1359
+ prop: e,
1360
+ defaultProp: t,
1361
+ onChange: n = /* @__PURE__ */ _e(() => {
1362
+ }, "onChange"),
1363
+ caller: r
1364
+ }) {
1365
+ const [o, i, a] = An({
1366
+ defaultProp: t,
1367
+ onChange: n
1368
+ }), u = e !== void 0, c = u ? e : o, m = s.useCallback(
1369
+ (C) => {
1370
+ if (u) {
1371
+ const l = Nn(C) ? C(e) : C;
1372
+ l !== e && a.current?.(l);
1373
+ } else
1374
+ i(C);
1375
+ },
1376
+ [u, e, i, a]
1377
+ );
1378
+ return [c, m];
1379
+ }
1380
+ _e(je, "useControllableState");
1381
+ function An({
1382
+ defaultProp: e,
1383
+ onChange: t
1384
+ }) {
1385
+ const [n, r] = s.useState(e), o = s.useRef(n), i = s.useRef(t);
1386
+ return qo(() => {
1387
+ i.current = t;
1388
+ }, [t]), s.useEffect(() => {
1389
+ o.current !== n && (i.current?.(n), o.current = n);
1390
+ }, [n, o]), [n, r, i];
1391
+ }
1392
+ _e(An, "useUncontrolledState");
1393
+ function Nn(e) {
1394
+ return typeof e == "function";
1395
+ }
1396
+ _e(Nn, "isFunction");
1397
+ var jt = Symbol("RADIX:SYNC_STATE");
1398
+ function Qo(e, t, n, r) {
1399
+ const { prop: o, defaultProp: i, onChange: a, caller: u } = t, c = o !== void 0, m = Tn(a), C = [{ ...n, state: i }];
1400
+ r && C.push(r);
1401
+ const [l, d] = s.useReducer(
1402
+ (g, S) => {
1403
+ if (S.type === jt)
1404
+ return { ...g, state: S.state };
1405
+ const b = e(g, S);
1406
+ return c && !Object.is(b.state, g.state) && m(b.state), b;
1407
+ },
1408
+ ...C
1409
+ ), v = l.state, f = s.useRef(v);
1410
+ s.useEffect(() => {
1411
+ f.current !== v && (f.current = v, c || m(v));
1412
+ }, [v, f, c]);
1413
+ const p = s.useMemo(() => o !== void 0 ? { ...l, state: o } : l, [l, o]);
1414
+ return s.useEffect(() => {
1415
+ c && !Object.is(o, l.state) && d({ type: jt, state: o });
1416
+ }, [o, l.state, c]), [p, d];
1417
+ }
1418
+ _e(Qo, "useControllableStateReducer");
1419
+ var Jo = Object.defineProperty, Pt = (e, t) => Jo(e, "name", { value: t, configurable: !0 }), Je = !1;
1420
+ function Dn() {
1421
+ const [e, t] = s.useState(Je);
1422
+ return s.useEffect(() => {
1423
+ Je || (Je = !0, t(!0));
1424
+ }, []), e;
1425
+ }
1426
+ Pt(Dn, "useIsHydrated");
1427
+ var Fn = s[" useSyncExternalStore ".trim().toString()];
1428
+ function kn() {
1429
+ return () => {
1430
+ };
1431
+ }
1432
+ Pt(kn, "subscribe");
1433
+ function Ln() {
1434
+ return Fn(
1435
+ kn,
1436
+ () => !0,
1437
+ () => !1
1438
+ );
1439
+ }
1440
+ Pt(Ln, "useIsHydratedModern");
1441
+ var es = typeof Fn == "function" ? Ln : Dn, ts = Object.defineProperty, pe = (e, t) => ts(e, "name", { value: t, configurable: !0 }), et = "rovingFocusGroup.onEntryFocus", ns = { bubbles: !1, cancelable: !0 }, ze = "RovingFocusGroup", [ft, $n, rs] = /* @__PURE__ */ bt(ze), [os, Un] = /* @__PURE__ */ fe(
1442
+ ze,
1443
+ [rs]
1444
+ ), [ss, is] = os(ze), as = /* @__PURE__ */ s.forwardRef(
1445
+ // blank line to reduce diff noise
1446
+ /* @__PURE__ */ pe(function(t, n) {
1447
+ return /* @__PURE__ */ h(ft.Provider, { scope: t.__scopeRovingFocusGroup, children: /* @__PURE__ */ h(ft.Slot, { scope: t.__scopeRovingFocusGroup, children: /* @__PURE__ */ h(cs, { ...t, ref: n }) }) });
1448
+ }, "RovingFocusGroup")
1449
+ ), cs = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ pe(function(t, n) {
1450
+ const {
1451
+ __scopeRovingFocusGroup: r,
1452
+ orientation: o,
1453
+ loop: i = !1,
1454
+ dir: a,
1455
+ currentTabStopId: u,
1456
+ defaultCurrentTabStopId: c,
1457
+ onCurrentTabStopIdChange: m,
1458
+ onEntryFocus: C,
1459
+ preventScrollOnEntryFocus: l = !1,
1460
+ ...d
1461
+ } = t, v = s.useRef(null), f = $(n, v), p = St(a), [g, S] = je({
1462
+ prop: u,
1463
+ defaultProp: c ?? null,
1464
+ onChange: m,
1465
+ caller: ze
1466
+ }), [b, y] = s.useState(!1), x = J(C), E = $n(r), w = s.useRef(!1), [O, A] = s.useState(0);
1467
+ return s.useEffect(() => {
1468
+ const P = v.current;
1469
+ if (P)
1470
+ return P.addEventListener(et, x), () => P.removeEventListener(et, x);
1471
+ }, [x]), /* @__PURE__ */ h(
1472
+ ss,
1473
+ {
1474
+ scope: r,
1475
+ orientation: o,
1476
+ dir: p,
1477
+ loop: i,
1478
+ currentTabStopId: g,
1479
+ onItemFocus: s.useCallback(
1480
+ (P) => S(P),
1481
+ [S]
1482
+ ),
1483
+ onItemShiftTab: s.useCallback(() => y(!0), []),
1484
+ onFocusableItemAdd: s.useCallback(
1485
+ () => A((P) => P + 1),
1486
+ []
1487
+ ),
1488
+ onFocusableItemRemove: s.useCallback(
1489
+ () => A((P) => P - 1),
1490
+ []
1491
+ ),
1492
+ children: /* @__PURE__ */ h(
1493
+ Y.div,
1494
+ {
1495
+ tabIndex: b || O === 0 ? -1 : 0,
1496
+ "data-orientation": o,
1497
+ ...d,
1498
+ ref: f,
1499
+ style: { outline: "none", ...t.style },
1500
+ onMouseDown: R(t.onMouseDown, () => {
1501
+ w.current = !0;
1502
+ }),
1503
+ onFocus: R(t.onFocus, (P) => {
1504
+ const G = !w.current;
1505
+ if (P.target === P.currentTarget && G && !b) {
1506
+ const N = new CustomEvent(et, ns);
1507
+ if (P.currentTarget.dispatchEvent(N), !N.defaultPrevented) {
1508
+ const I = E().filter((T) => T.focusable), F = I.find((T) => T.active), B = I.find((T) => T.id === g), ne = [F, B, ...I].filter(
1509
+ Boolean
1510
+ ).map((T) => T.ref.current);
1511
+ Rt(ne, l);
1512
+ }
1513
+ }
1514
+ w.current = !1;
1515
+ }),
1516
+ onBlur: R(t.onBlur, () => y(!1))
1517
+ }
1518
+ )
1519
+ }
1520
+ );
1521
+ }, "RovingFocusGroupImpl")), us = "RovingFocusGroupItem", ls = /* @__PURE__ */ s.forwardRef(
1522
+ // blank line to reduce diff noise
1523
+ /* @__PURE__ */ pe(function(t, n) {
1524
+ const {
1525
+ __scopeRovingFocusGroup: r,
1526
+ focusable: o = !0,
1527
+ active: i = !1,
1528
+ tabStopId: a,
1529
+ children: u,
1530
+ ...c
1531
+ } = t, m = Ue(), C = a || m, l = is(us, r), d = l.currentTabStopId === C, v = $n(r), { onFocusableItemAdd: f, onFocusableItemRemove: p, currentTabStopId: g } = l, S = es();
1532
+ return q(() => {
1533
+ if (!(!S || !o))
1534
+ return f(), () => p();
1535
+ }, [S, o, f, p]), s.useEffect(() => {
1536
+ if (!(S || !o))
1537
+ return f(), () => p();
1538
+ }, [S, o, f, p]), /* @__PURE__ */ h(
1539
+ ft.ItemSlot,
1540
+ {
1541
+ scope: r,
1542
+ id: C,
1543
+ focusable: o,
1544
+ active: i,
1545
+ children: /* @__PURE__ */ h(
1546
+ Y.span,
1547
+ {
1548
+ tabIndex: d ? 0 : -1,
1549
+ "data-orientation": l.orientation,
1550
+ ...c,
1551
+ ref: n,
1552
+ onMouseDown: R(t.onMouseDown, (b) => {
1553
+ o ? l.onItemFocus(C) : b.preventDefault();
1554
+ }),
1555
+ onFocus: R(t.onFocus, () => l.onItemFocus(C)),
1556
+ onKeyDown: R(t.onKeyDown, (b) => {
1557
+ if (b.key === "Tab" && b.shiftKey) {
1558
+ l.onItemShiftTab();
1559
+ return;
1560
+ }
1561
+ if (b.target !== b.currentTarget) return;
1562
+ const y = Bn(b, l.orientation, l.dir);
1563
+ if (y !== void 0) {
1564
+ if (b.metaKey || b.ctrlKey || b.altKey || b.shiftKey) return;
1565
+ b.preventDefault();
1566
+ let E = v().filter((w) => w.focusable).map((w) => w.ref.current);
1567
+ if (y === "last") E.reverse();
1568
+ else if (y === "prev" || y === "next") {
1569
+ y === "prev" && E.reverse();
1570
+ const w = E.indexOf(b.currentTarget);
1571
+ E = l.loop ? Kn(E, w + 1) : E.slice(w + 1);
1572
+ }
1573
+ setTimeout(() => Rt(E));
1574
+ }
1575
+ }),
1576
+ children: typeof u == "function" ? u({ isCurrentTabStop: d, hasTabStop: g != null }) : u
1577
+ }
1578
+ )
1579
+ }
1580
+ );
1581
+ }, "RovingFocusGroupItem")
1582
+ ), ds = {
1583
+ ArrowLeft: "prev",
1584
+ ArrowUp: "prev",
1585
+ ArrowRight: "next",
1586
+ ArrowDown: "next",
1587
+ PageUp: "first",
1588
+ Home: "first",
1589
+ PageDown: "last",
1590
+ End: "last"
1591
+ };
1592
+ function Gn(e, t) {
1593
+ return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
1594
+ }
1595
+ pe(Gn, "getDirectionAwareKey");
1596
+ function Bn(e, t, n) {
1597
+ const r = Gn(e.key, n);
1598
+ if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
1599
+ return ds[r];
1600
+ }
1601
+ pe(Bn, "getFocusIntent");
1602
+ function Rt(e, t = !1) {
1603
+ const n = document.activeElement;
1604
+ for (const r of e)
1605
+ if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
1606
+ }
1607
+ pe(Rt, "focusFirst");
1608
+ function Kn(e, t) {
1609
+ return e.map((n, r) => e[(t + r) % e.length]);
1610
+ }
1611
+ pe(Kn, "wrapArray");
1612
+ var fs = as, ps = ls, jn = Lr(), tt = function() {
1613
+ }, We = s.forwardRef(function(e, t) {
1614
+ var n = s.useRef(null), r = s.useState({
1615
+ onScrollCapture: tt,
1616
+ onWheelCapture: tt,
1617
+ onTouchMoveCapture: tt
1618
+ }), o = r[0], i = r[1], a = e.forwardProps, u = e.children, c = e.className, m = e.removeScrollBar, C = e.enabled, l = e.shards, d = e.sideCar, v = e.noRelative, f = e.noIsolation, p = e.inert, g = e.allowPinchZoom, S = e.as, b = S === void 0 ? "div" : S, y = e.gapMode, x = $r(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = d, w = Ur([n, t]), O = ye(ye({}, x), o);
1619
+ return s.createElement(
1620
+ s.Fragment,
1621
+ null,
1622
+ C && s.createElement(E, { sideCar: jn, removeScrollBar: m, shards: l, noRelative: v, noIsolation: f, inert: p, setCallbacks: i, allowPinchZoom: !!g, lockRef: n, gapMode: y }),
1623
+ a ? s.cloneElement(s.Children.only(u), ye(ye({}, O), { ref: w })) : s.createElement(b, ye({}, O, { className: c, ref: w }), u)
1624
+ );
1625
+ });
1626
+ We.defaultProps = {
1627
+ enabled: !0,
1628
+ removeScrollBar: !0,
1629
+ inert: !1
1630
+ };
1631
+ We.classNames = {
1632
+ fullWidth: Br,
1633
+ zeroRight: Gr
1634
+ };
1635
+ var pt = !1;
1636
+ if (typeof window < "u")
1637
+ try {
1638
+ var Fe = Object.defineProperty({}, "passive", {
1639
+ get: function() {
1640
+ return pt = !0, !0;
1641
+ }
1642
+ });
1643
+ window.addEventListener("test", Fe, Fe), window.removeEventListener("test", Fe, Fe);
1644
+ } catch {
1645
+ pt = !1;
1646
+ }
1647
+ var Ce = pt ? { passive: !1 } : !1, ms = function(e) {
1648
+ return e.tagName === "TEXTAREA";
1649
+ }, zn = function(e, t) {
1650
+ if (!(e instanceof Element))
1651
+ return !1;
1652
+ var n = window.getComputedStyle(e);
1653
+ return (
1654
+ // not-not-scrollable
1655
+ n[t] !== "hidden" && // contains scroll inside self
1656
+ !(n.overflowY === n.overflowX && !ms(e) && n[t] === "visible")
1657
+ );
1658
+ }, hs = function(e) {
1659
+ return zn(e, "overflowY");
1660
+ }, vs = function(e) {
1661
+ return zn(e, "overflowX");
1662
+ }, zt = function(e, t) {
1663
+ var n = t.ownerDocument, r = t;
1664
+ do {
1665
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
1666
+ var o = Wn(e, r);
1667
+ if (o) {
1668
+ var i = Vn(e, r), a = i[1], u = i[2];
1669
+ if (a > u)
1670
+ return !0;
1671
+ }
1672
+ r = r.parentNode;
1673
+ } while (r && r !== n.body);
1674
+ return !1;
1675
+ }, gs = function(e) {
1676
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
1677
+ return [
1678
+ t,
1679
+ n,
1680
+ r
1681
+ ];
1682
+ }, Cs = function(e) {
1683
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
1684
+ return [
1685
+ t,
1686
+ n,
1687
+ r
1688
+ ];
1689
+ }, Wn = function(e, t) {
1690
+ return e === "v" ? hs(t) : vs(t);
1691
+ }, Vn = function(e, t) {
1692
+ return e === "v" ? gs(t) : Cs(t);
1693
+ }, bs = function(e, t) {
1694
+ return e === "h" && t === "rtl" ? -1 : 1;
1695
+ }, ys = function(e, t, n, r, o) {
1696
+ var i = bs(e, window.getComputedStyle(t).direction), a = i * r, u = n.target, c = t.contains(u), m = !1, C = a > 0, l = 0, d = 0;
1697
+ do {
1698
+ if (!u)
1699
+ break;
1700
+ var v = Vn(e, u), f = v[0], p = v[1], g = v[2], S = p - g - i * f;
1701
+ (f || S) && Wn(e, u) && (l += S, d += f);
1702
+ var b = u.parentNode;
1703
+ u = b && b.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? b.host : b;
1704
+ } while (
1705
+ // portaled content
1706
+ !c && u !== document.body || // self content
1707
+ c && (t.contains(u) || t === u)
1708
+ );
1709
+ return (C && Math.abs(l) < 1 || !C && Math.abs(d) < 1) && (m = !0), m;
1710
+ }, ke = function(e) {
1711
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1712
+ }, Wt = function(e) {
1713
+ return [e.deltaX, e.deltaY];
1714
+ }, Vt = function(e) {
1715
+ return e && "current" in e ? e.current : e;
1716
+ }, Ss = function(e, t) {
1717
+ return e[0] === t[0] && e[1] === t[1];
1718
+ }, xs = function(e) {
1719
+ return `
1720
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
1721
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1722
+ `);
1723
+ }, Es = 0, be = [];
1724
+ function ws(e) {
1725
+ var t = s.useRef([]), n = s.useRef([0, 0]), r = s.useRef(), o = s.useState(Es++)[0], i = s.useState(Kr)[0], a = s.useRef(e);
1726
+ s.useEffect(function() {
1727
+ a.current = e;
1728
+ }, [e]), s.useEffect(function() {
1729
+ if (e.inert) {
1730
+ document.body.classList.add("block-interactivity-".concat(o));
1731
+ var p = jr([e.lockRef.current], (e.shards || []).map(Vt), !0).filter(Boolean);
1732
+ return p.forEach(function(g) {
1733
+ return g.classList.add("allow-interactivity-".concat(o));
1734
+ }), function() {
1735
+ document.body.classList.remove("block-interactivity-".concat(o)), p.forEach(function(g) {
1736
+ return g.classList.remove("allow-interactivity-".concat(o));
1737
+ });
1738
+ };
1739
+ }
1740
+ }, [e.inert, e.lockRef.current, e.shards]);
1741
+ var u = s.useCallback(function(p, g) {
1742
+ if ("touches" in p && p.touches.length === 2 || p.type === "wheel" && p.ctrlKey)
1743
+ return !a.current.allowPinchZoom;
1744
+ var S = ke(p), b = n.current, y = "deltaX" in p ? p.deltaX : b[0] - S[0], x = "deltaY" in p ? p.deltaY : b[1] - S[1], E, w = p.target, O = Math.abs(y) > Math.abs(x) ? "h" : "v";
1745
+ if ("touches" in p && O === "h" && w.type === "range")
1746
+ return !1;
1747
+ var A = window.getSelection(), P = A && A.anchorNode, G = P ? P === w || P.contains(w) : !1;
1748
+ if (G)
1749
+ return !1;
1750
+ var N = zt(O, w);
1751
+ if (!N)
1752
+ return !0;
1753
+ if (N ? E = O : (E = O === "v" ? "h" : "v", N = zt(O, w)), !N)
1754
+ return !1;
1755
+ if (!r.current && "changedTouches" in p && (y || x) && (r.current = E), !E)
1756
+ return !0;
1757
+ var I = r.current || E;
1758
+ return ys(I, g, p, I === "h" ? y : x);
1759
+ }, []), c = s.useCallback(function(p) {
1760
+ var g = p;
1761
+ if (!(!be.length || be[be.length - 1] !== i)) {
1762
+ var S = "deltaY" in g ? Wt(g) : ke(g), b = t.current.filter(function(E) {
1763
+ return E.name === g.type && (E.target === g.target || g.target === E.shadowParent) && Ss(E.delta, S);
1764
+ })[0];
1765
+ if (b && b.should) {
1766
+ g.cancelable && g.preventDefault();
1767
+ return;
1768
+ }
1769
+ if (!b) {
1770
+ var y = (a.current.shards || []).map(Vt).filter(Boolean).filter(function(E) {
1771
+ return E.contains(g.target);
1772
+ }), x = y.length > 0 ? u(g, y[0]) : !a.current.noIsolation;
1773
+ x && g.cancelable && g.preventDefault();
1774
+ }
1775
+ }
1776
+ }, []), m = s.useCallback(function(p, g, S, b) {
1777
+ var y = { name: p, delta: g, target: S, should: b, shadowParent: Ms(S) };
1778
+ t.current.push(y), setTimeout(function() {
1779
+ t.current = t.current.filter(function(x) {
1780
+ return x !== y;
1781
+ });
1782
+ }, 1);
1783
+ }, []), C = s.useCallback(function(p) {
1784
+ n.current = ke(p), r.current = void 0;
1785
+ }, []), l = s.useCallback(function(p) {
1786
+ m(p.type, Wt(p), p.target, u(p, e.lockRef.current));
1787
+ }, []), d = s.useCallback(function(p) {
1788
+ m(p.type, ke(p), p.target, u(p, e.lockRef.current));
1789
+ }, []);
1790
+ s.useEffect(function() {
1791
+ return be.push(i), e.setCallbacks({
1792
+ onScrollCapture: l,
1793
+ onWheelCapture: l,
1794
+ onTouchMoveCapture: d
1795
+ }), document.addEventListener("wheel", c, Ce), document.addEventListener("touchmove", c, Ce), document.addEventListener("touchstart", C, Ce), function() {
1796
+ be = be.filter(function(p) {
1797
+ return p !== i;
1798
+ }), document.removeEventListener("wheel", c, Ce), document.removeEventListener("touchmove", c, Ce), document.removeEventListener("touchstart", C, Ce);
1799
+ };
1800
+ }, []);
1801
+ var v = e.removeScrollBar, f = e.inert;
1802
+ return s.createElement(
1803
+ s.Fragment,
1804
+ null,
1805
+ f ? s.createElement(i, { styles: xs(o) }) : null,
1806
+ v ? s.createElement(zr, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
1807
+ );
1808
+ }
1809
+ function Ms(e) {
1810
+ for (var t = null; e !== null; )
1811
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1812
+ return t;
1813
+ }
1814
+ const Ps = Wr(jn, ws);
1815
+ var Hn = s.forwardRef(function(e, t) {
1816
+ return s.createElement(We, ye({}, e, { ref: t, sideCar: Ps }));
1817
+ });
1818
+ Hn.classNames = We.classNames;
1819
+ var Rs = Object.defineProperty, _ = (e, t) => Rs(e, "name", { value: t, configurable: !0 }), mt = ["Enter", " "], Is = ["ArrowDown", "PageUp", "Home"], Yn = ["ArrowUp", "PageDown", "End"], _s = [...Is, ...Yn], Os = {
1820
+ ltr: [...mt, "ArrowRight"],
1821
+ rtl: [...mt, "ArrowLeft"]
1822
+ }, Ts = {
1823
+ ltr: ["ArrowLeft"],
1824
+ rtl: ["ArrowRight"]
1825
+ }, Ve = "Menu", [Re, As, Ns] = /* @__PURE__ */ bt(Ve), [me, Xn] = /* @__PURE__ */ fe(Ve, [
1826
+ Ns,
1827
+ xn,
1828
+ Un
1829
+ ]), He = xn(), Zn = Un(), [qn, ue] = me(Ve), [Ds, Oe] = me(Ve), Fs = /* @__PURE__ */ _((e) => {
1830
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: i, modal: a = !0 } = e, u = He(t), [c, m] = s.useState(null), C = s.useRef(!1), l = J(i), d = St(o);
1831
+ return s.useEffect(() => {
1832
+ const v = /* @__PURE__ */ _(() => {
1833
+ C.current = !0, document.addEventListener("pointerdown", f, { capture: !0, once: !0 }), document.addEventListener("pointermove", f, { capture: !0, once: !0 });
1834
+ }, "handleKeyDown"), f = /* @__PURE__ */ _(() => C.current = !1, "handlePointer");
1835
+ return document.addEventListener("keydown", v, { capture: !0 }), () => {
1836
+ document.removeEventListener("keydown", v, { capture: !0 }), document.removeEventListener("pointerdown", f, { capture: !0 }), document.removeEventListener("pointermove", f, { capture: !0 });
1837
+ };
1838
+ }, []), s.useEffect(() => {
1839
+ if (!n)
1840
+ return;
1841
+ const v = /* @__PURE__ */ _(() => l(!1), "handleBlur");
1842
+ return window.addEventListener("blur", v), () => window.removeEventListener("blur", v);
1843
+ }, [n, l]), /* @__PURE__ */ h(Pn, { ...u, children: /* @__PURE__ */ h(
1844
+ qn,
1845
+ {
1846
+ scope: t,
1847
+ open: n,
1848
+ onOpenChange: l,
1849
+ content: c,
1850
+ onContentChange: m,
1851
+ children: /* @__PURE__ */ h(
1852
+ Ds,
1853
+ {
1854
+ scope: t,
1855
+ onClose: s.useCallback(() => l(!1), [l]),
1856
+ isUsingKeyboardRef: C,
1857
+ dir: d,
1858
+ modal: a,
1859
+ children: r
1860
+ }
1861
+ )
1862
+ }
1863
+ ) });
1864
+ }, "Menu"), Qn = /* @__PURE__ */ s.forwardRef(
1865
+ /* @__PURE__ */ _(function(t, n) {
1866
+ const { __scopeMenu: r, ...o } = t, i = He(r);
1867
+ return /* @__PURE__ */ h(Ko, { ...i, ...o, ref: n });
1868
+ }, "MenuAnchor")
1869
+ ), Jn = "MenuPortal", [ks, er] = me(Jn, {
1870
+ forceMount: void 0
1871
+ }), Ls = /* @__PURE__ */ _((e) => {
1872
+ const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, i = ue(Jn, t);
1873
+ return /* @__PURE__ */ h(ks, { scope: t, forceMount: n, children: /* @__PURE__ */ h(Ke, { present: n || i.open, children: /* @__PURE__ */ h(Vo, { asChild: !0, container: o, children: r }) }) });
1874
+ }, "MenuPortal"), Q = "MenuContent", [$s, It] = me(Q), Us = /* @__PURE__ */ s.forwardRef(
1875
+ /* @__PURE__ */ _(function(t, n) {
1876
+ const r = er(Q, t.__scopeMenu), { forceMount: o = r.forceMount, ...i } = t, a = ue(Q, t.__scopeMenu), u = Oe(Q, t.__scopeMenu);
1877
+ return /* @__PURE__ */ h(Re.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ h(Ke, { present: o || a.open, children: /* @__PURE__ */ h(Re.Slot, { scope: t.__scopeMenu, children: u.modal ? /* @__PURE__ */ h(Gs, { ...i, ref: n }) : /* @__PURE__ */ h(Bs, { ...i, ref: n }) }) }) });
1878
+ }, "MenuContent")
1879
+ ), Gs = /* @__PURE__ */ s.forwardRef(
1880
+ // blank line to reduce diff noise
1881
+ /* @__PURE__ */ _(function(t, n) {
1882
+ const r = ue(Q, t.__scopeMenu), o = s.useRef(null), i = $(n, o);
1883
+ return s.useEffect(() => {
1884
+ const a = o.current;
1885
+ if (a) return Vr(a);
1886
+ }, []), /* @__PURE__ */ h(
1887
+ _t,
1888
+ {
1889
+ ...t,
1890
+ ref: i,
1891
+ trapFocus: r.open,
1892
+ disableOutsidePointerEvents: r.open,
1893
+ disableOutsideScroll: !0,
1894
+ onFocusOutside: R(
1895
+ t.onFocusOutside,
1896
+ (a) => a.preventDefault(),
1897
+ { checkForDefaultPrevented: !1 }
1898
+ ),
1899
+ onDismiss: () => r.onOpenChange(!1)
1900
+ }
1901
+ );
1902
+ }, "MenuRootContentModal")
1903
+ ), Bs = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ _(function(t, n) {
1904
+ const r = ue(Q, t.__scopeMenu);
1905
+ return /* @__PURE__ */ h(
1906
+ _t,
1907
+ {
1908
+ ...t,
1909
+ ref: n,
1910
+ trapFocus: !1,
1911
+ disableOutsidePointerEvents: !1,
1912
+ disableOutsideScroll: !1,
1913
+ onDismiss: () => r.onOpenChange(!1)
1914
+ }
1915
+ );
1916
+ }, "MenuRootContentNonModal")), Ks = /* @__PURE__ */ de("MenuContent.ScrollLock"), _t = /* @__PURE__ */ s.forwardRef(
1917
+ // blank line to reduce diff noise
1918
+ /* @__PURE__ */ _(function(t, n) {
1919
+ const {
1920
+ __scopeMenu: r,
1921
+ loop: o = !1,
1922
+ trapFocus: i,
1923
+ onOpenAutoFocus: a,
1924
+ onCloseAutoFocus: u,
1925
+ disableOutsidePointerEvents: c,
1926
+ onEntryFocus: m,
1927
+ onEscapeKeyDown: C,
1928
+ onPointerDownOutside: l,
1929
+ onFocusOutside: d,
1930
+ onInteractOutside: v,
1931
+ onDismiss: f,
1932
+ disableOutsideScroll: p,
1933
+ ...g
1934
+ } = t, S = ue(Q, r), b = Oe(Q, r), y = He(r), x = Zn(r), E = As(r), [w, O] = s.useState(null), A = s.useRef(null), P = $(n, A, S.onContentChange), G = s.useRef(0), N = s.useRef(""), I = s.useRef(0), F = s.useRef(null), B = s.useRef("right"), Z = s.useRef(0), ne = p ? Hn : s.Fragment, T = p ? { as: Ks, allowPinchZoom: !0 } : void 0, he = /* @__PURE__ */ _((M) => {
1935
+ const re = N.current + M, te = E().filter((j) => !j.disabled), ae = document.activeElement, we = te.find((j) => j.ref.current === ae)?.textValue, Me = te.map((j) => j.textValue), Te = ur(Me, re, we), le = te.find((j) => j.textValue === Te)?.ref.current;
1936
+ (/* @__PURE__ */ _(function j(ve) {
1937
+ N.current = ve, window.clearTimeout(G.current), ve !== "" && (G.current = window.setTimeout(() => j(""), 1e3));
1938
+ }, "updateSearch"))(re), le && setTimeout(() => le.focus());
1939
+ }, "handleTypeaheadSearch");
1940
+ s.useEffect(() => () => window.clearTimeout(G.current), []), wt();
1941
+ const V = s.useCallback((M) => B.current === F.current?.side && dr(M, F.current?.area), []);
1942
+ return /* @__PURE__ */ h(
1943
+ $s,
1944
+ {
1945
+ scope: r,
1946
+ searchRef: N,
1947
+ onItemEnter: s.useCallback(
1948
+ (M) => {
1949
+ V(M) && M.preventDefault();
1950
+ },
1951
+ [V]
1952
+ ),
1953
+ onItemLeave: s.useCallback(
1954
+ (M) => {
1955
+ V(M) || (A.current?.focus(), O(null));
1956
+ },
1957
+ [V]
1958
+ ),
1959
+ onTriggerLeave: s.useCallback(
1960
+ (M) => {
1961
+ V(M) && M.preventDefault();
1962
+ },
1963
+ [V]
1964
+ ),
1965
+ pointerGraceTimerRef: I,
1966
+ onPointerGraceIntentChange: s.useCallback((M) => {
1967
+ F.current = M;
1968
+ }, []),
1969
+ children: /* @__PURE__ */ h(ne, { ...T, children: /* @__PURE__ */ h(
1970
+ Ro,
1971
+ {
1972
+ asChild: !0,
1973
+ trapped: i,
1974
+ onMountAutoFocus: R(a, (M) => {
1975
+ M.preventDefault(), A.current?.focus({ preventScroll: !0 });
1976
+ }),
1977
+ onUnmountAutoFocus: u,
1978
+ children: /* @__PURE__ */ h(
1979
+ So,
1980
+ {
1981
+ asChild: !0,
1982
+ disableOutsidePointerEvents: c,
1983
+ onEscapeKeyDown: C,
1984
+ onPointerDownOutside: l,
1985
+ onFocusOutside: d,
1986
+ onInteractOutside: v,
1987
+ onDismiss: f,
1988
+ children: /* @__PURE__ */ h(
1989
+ fs,
1990
+ {
1991
+ asChild: !0,
1992
+ ...x,
1993
+ dir: b.dir,
1994
+ orientation: "vertical",
1995
+ loop: o,
1996
+ currentTabStopId: w,
1997
+ onCurrentTabStopIdChange: O,
1998
+ onEntryFocus: R(m, (M) => {
1999
+ b.isUsingKeyboardRef.current || M.preventDefault();
2000
+ }),
2001
+ preventScrollOnEntryFocus: !0,
2002
+ children: /* @__PURE__ */ h(
2003
+ jo,
2004
+ {
2005
+ role: "menu",
2006
+ "aria-orientation": "vertical",
2007
+ "data-state": Tt(S.open),
2008
+ "data-radix-menu-content": "",
2009
+ dir: b.dir,
2010
+ ...y,
2011
+ ...g,
2012
+ ref: P,
2013
+ style: { outline: "none", ...g.style },
2014
+ onKeyDown: R(g.onKeyDown, (M) => {
2015
+ const te = M.target.closest("[data-radix-menu-content]") === M.currentTarget, ae = M.ctrlKey || M.altKey || M.metaKey, we = M.key.length === 1;
2016
+ te && (M.key === "Tab" && M.preventDefault(), !ae && we && he(M.key));
2017
+ const Me = A.current;
2018
+ if (M.target !== Me || !_s.includes(M.key)) return;
2019
+ M.preventDefault();
2020
+ const le = E().filter((j) => !j.disabled).map((j) => j.ref.current);
2021
+ Yn.includes(M.key) && le.reverse(), ar(le);
2022
+ }),
2023
+ onBlur: R(t.onBlur, (M) => {
2024
+ M.currentTarget.contains(M.target) || (window.clearTimeout(G.current), N.current = "");
2025
+ }),
2026
+ onPointerMove: R(
2027
+ t.onPointerMove,
2028
+ xe((M) => {
2029
+ const re = M.target, te = Z.current !== M.clientX;
2030
+ if (M.currentTarget.contains(re) && te) {
2031
+ const ae = M.clientX > Z.current ? "right" : "left";
2032
+ B.current = ae, Z.current = M.clientX;
2033
+ }
2034
+ })
2035
+ )
2036
+ }
2037
+ )
2038
+ }
2039
+ )
2040
+ }
2041
+ )
2042
+ }
2043
+ ) })
2044
+ }
2045
+ );
2046
+ }, "MenuContentImpl")
2047
+ ), tr = /* @__PURE__ */ s.forwardRef(
2048
+ /* @__PURE__ */ _(function(t, n) {
2049
+ const { __scopeMenu: r, ...o } = t;
2050
+ return /* @__PURE__ */ h(Y.div, { role: "group", ...o, ref: n });
2051
+ }, "MenuGroup")
2052
+ ), js = /* @__PURE__ */ s.forwardRef(
2053
+ /* @__PURE__ */ _(function(t, n) {
2054
+ const { __scopeMenu: r, ...o } = t;
2055
+ return /* @__PURE__ */ h(Y.div, { ...o, ref: n });
2056
+ }, "MenuLabel")
2057
+ ), ht = "MenuItem", Ht = "menu.itemSelect", Ot = /* @__PURE__ */ s.forwardRef(
2058
+ // blank line to reduce diff noise
2059
+ /* @__PURE__ */ _(function(t, n) {
2060
+ const { disabled: r = !1, onSelect: o, ...i } = t, a = s.useRef(null), u = Oe(ht, t.__scopeMenu), c = It(ht, t.__scopeMenu), m = $(n, a), C = s.useRef(!1), l = /* @__PURE__ */ _(() => {
2061
+ const d = a.current;
2062
+ if (!r && d) {
2063
+ const v = new CustomEvent(Ht, { bubbles: !0, cancelable: !0 });
2064
+ d.addEventListener(Ht, (f) => o?.(f), { once: !0 }), Ct(d, v), v.defaultPrevented ? C.current = !1 : u.onClose();
2065
+ }
2066
+ }, "handleSelect");
2067
+ return /* @__PURE__ */ h(
2068
+ nr,
2069
+ {
2070
+ ...i,
2071
+ ref: m,
2072
+ disabled: r,
2073
+ onClick: R(t.onClick, l),
2074
+ onPointerDown: (d) => {
2075
+ t.onPointerDown?.(d), C.current = !0;
2076
+ },
2077
+ onPointerUp: R(t.onPointerUp, (d) => {
2078
+ C.current || d.currentTarget?.click();
2079
+ }),
2080
+ onKeyDown: R(t.onKeyDown, (d) => {
2081
+ r || d.target !== d.currentTarget || c.searchRef.current !== "" && d.key === " " || mt.includes(d.key) && (d.currentTarget.click(), d.preventDefault());
2082
+ })
2083
+ }
2084
+ );
2085
+ }, "MenuItem")
2086
+ ), nr = /* @__PURE__ */ s.forwardRef(
2087
+ /* @__PURE__ */ _(function(t, n) {
2088
+ const { __scopeMenu: r, disabled: o = !1, textValue: i, ...a } = t, u = It(ht, r), c = Zn(r), m = s.useRef(null), C = $(n, m), [l, d] = s.useState(!1), [v, f] = s.useState("");
2089
+ return s.useEffect(() => {
2090
+ const p = m.current;
2091
+ p && f((p.textContent ?? "").trim());
2092
+ }, [a.children]), /* @__PURE__ */ h(
2093
+ Re.ItemSlot,
2094
+ {
2095
+ scope: r,
2096
+ disabled: o,
2097
+ textValue: i ?? v,
2098
+ children: /* @__PURE__ */ h(ps, { asChild: !0, ...c, focusable: !o, children: /* @__PURE__ */ h(
2099
+ Y.div,
2100
+ {
2101
+ role: "menuitem",
2102
+ "data-highlighted": l ? "" : void 0,
2103
+ "aria-disabled": o || void 0,
2104
+ "data-disabled": o ? "" : void 0,
2105
+ ...a,
2106
+ ref: C,
2107
+ onPointerMove: R(
2108
+ t.onPointerMove,
2109
+ xe((p) => {
2110
+ o ? u.onItemLeave(p) : (u.onItemEnter(p), p.defaultPrevented || p.currentTarget.focus({ preventScroll: !0 }));
2111
+ })
2112
+ ),
2113
+ onPointerLeave: R(
2114
+ t.onPointerLeave,
2115
+ xe((p) => u.onItemLeave(p))
2116
+ ),
2117
+ onFocus: R(t.onFocus, () => d(!0)),
2118
+ onBlur: R(t.onBlur, () => d(!1))
2119
+ }
2120
+ ) })
2121
+ }
2122
+ );
2123
+ }, "MenuItemImpl")
2124
+ ), zs = /* @__PURE__ */ s.forwardRef(
2125
+ // blank line to reduce diff noise
2126
+ /* @__PURE__ */ _(function(t, n) {
2127
+ const { checked: r = !1, onCheckedChange: o, ...i } = t;
2128
+ return /* @__PURE__ */ h(or, { scope: t.__scopeMenu, checked: r, children: /* @__PURE__ */ h(
2129
+ Ot,
2130
+ {
2131
+ role: "menuitemcheckbox",
2132
+ "aria-checked": Ie(r) ? "mixed" : r,
2133
+ ...i,
2134
+ ref: n,
2135
+ "data-state": Ye(r),
2136
+ onSelect: R(
2137
+ i.onSelect,
2138
+ () => o?.(Ie(r) ? !0 : !r),
2139
+ { checkForDefaultPrevented: !1 }
2140
+ )
2141
+ }
2142
+ ) });
2143
+ }, "MenuCheckboxItem")
2144
+ ), Ws = "MenuRadioGroup", [Vs, Hs] = me(
2145
+ Ws,
2146
+ { value: void 0, onValueChange: /* @__PURE__ */ _(() => {
2147
+ }, "onValueChange") }
2148
+ ), Ys = /* @__PURE__ */ s.forwardRef(
2149
+ /* @__PURE__ */ _(function(t, n) {
2150
+ const { value: r, onValueChange: o, ...i } = t, a = J(o);
2151
+ return /* @__PURE__ */ h(Vs, { scope: t.__scopeMenu, value: r, onValueChange: a, children: /* @__PURE__ */ h(tr, { ...i, ref: n }) });
2152
+ }, "MenuRadioGroup")
2153
+ ), Xs = "MenuRadioItem", Zs = /* @__PURE__ */ s.forwardRef(
2154
+ /* @__PURE__ */ _(function(t, n) {
2155
+ const { value: r, ...o } = t, i = Hs(Xs, t.__scopeMenu), a = r === i.value;
2156
+ return /* @__PURE__ */ h(or, { scope: t.__scopeMenu, checked: a, children: /* @__PURE__ */ h(
2157
+ Ot,
2158
+ {
2159
+ role: "menuitemradio",
2160
+ "aria-checked": a,
2161
+ ...o,
2162
+ ref: n,
2163
+ "data-state": Ye(a),
2164
+ onSelect: R(
2165
+ o.onSelect,
2166
+ () => i.onValueChange?.(r),
2167
+ { checkForDefaultPrevented: !1 }
2168
+ )
2169
+ }
2170
+ ) });
2171
+ }, "MenuRadioItem")
2172
+ ), rr = "MenuItemIndicator", [or, qs] = me(
2173
+ rr,
2174
+ { checked: !1 }
2175
+ ), Qs = /* @__PURE__ */ s.forwardRef(
2176
+ // blank line to reduce diff noise
2177
+ /* @__PURE__ */ _(function(t, n) {
2178
+ const { __scopeMenu: r, forceMount: o, ...i } = t, a = qs(rr, r);
2179
+ return /* @__PURE__ */ h(
2180
+ Ke,
2181
+ {
2182
+ present: o || Ie(a.checked) || a.checked === !0,
2183
+ children: /* @__PURE__ */ h(
2184
+ Y.span,
2185
+ {
2186
+ ...i,
2187
+ ref: n,
2188
+ "data-state": Ye(a.checked)
2189
+ }
2190
+ )
2191
+ }
2192
+ );
2193
+ }, "MenuItemIndicator")
2194
+ ), Js = /* @__PURE__ */ s.forwardRef(
2195
+ /* @__PURE__ */ _(function(t, n) {
2196
+ const { __scopeMenu: r, ...o } = t;
2197
+ return /* @__PURE__ */ h(
2198
+ Y.div,
2199
+ {
2200
+ role: "separator",
2201
+ "aria-orientation": "horizontal",
2202
+ ...o,
2203
+ ref: n
2204
+ }
2205
+ );
2206
+ }, "MenuSeparator")
2207
+ ), sr = "MenuSub", [ei, ir] = me(sr), ti = /* @__PURE__ */ _((e) => {
2208
+ const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, i = ue(sr, t), a = He(t), [u, c] = s.useState(null), [m, C] = s.useState(null), l = J(o);
2209
+ return s.useEffect(() => (i.open === !1 && l(!1), () => l(!1)), [i.open, l]), /* @__PURE__ */ h(Pn, { ...a, children: /* @__PURE__ */ h(
2210
+ qn,
2211
+ {
2212
+ scope: t,
2213
+ open: r,
2214
+ onOpenChange: l,
2215
+ content: m,
2216
+ onContentChange: C,
2217
+ children: /* @__PURE__ */ h(
2218
+ ei,
2219
+ {
2220
+ scope: t,
2221
+ contentId: Ue(),
2222
+ triggerId: Ue(),
2223
+ trigger: u,
2224
+ onTriggerChange: c,
2225
+ children: n
2226
+ }
2227
+ )
2228
+ }
2229
+ ) });
2230
+ }, "MenuSub"), Le = "MenuSubTrigger", ni = /* @__PURE__ */ s.forwardRef(
2231
+ /* @__PURE__ */ _(function(t, n) {
2232
+ const r = ue(Le, t.__scopeMenu), o = Oe(Le, t.__scopeMenu), i = ir(Le, t.__scopeMenu), a = It(Le, t.__scopeMenu), u = s.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: m } = a, C = { __scopeMenu: t.__scopeMenu }, l = s.useCallback(() => {
2233
+ u.current && window.clearTimeout(u.current), u.current = null;
2234
+ }, []);
2235
+ s.useEffect(() => l, [l]), s.useEffect(() => {
2236
+ const v = c.current;
2237
+ return () => {
2238
+ window.clearTimeout(v), m(null);
2239
+ };
2240
+ }, [c, m]);
2241
+ const d = $(n, i.onTriggerChange);
2242
+ return /* @__PURE__ */ h(Qn, { asChild: !0, ...C, children: /* @__PURE__ */ h(
2243
+ nr,
2244
+ {
2245
+ id: i.triggerId,
2246
+ "aria-haspopup": "menu",
2247
+ "aria-expanded": r.open,
2248
+ "aria-controls": r.open ? i.contentId : void 0,
2249
+ "data-state": Tt(r.open),
2250
+ ...t,
2251
+ ref: d,
2252
+ onClick: (v) => {
2253
+ t.onClick?.(v), !(t.disabled || v.defaultPrevented) && (v.currentTarget.focus(), r.open || r.onOpenChange(!0));
2254
+ },
2255
+ onPointerMove: R(
2256
+ t.onPointerMove,
2257
+ xe((v) => {
2258
+ a.onItemEnter(v), !v.defaultPrevented && !t.disabled && !r.open && !u.current && (a.onPointerGraceIntentChange(null), u.current = window.setTimeout(() => {
2259
+ r.onOpenChange(!0), l();
2260
+ }, 100));
2261
+ })
2262
+ ),
2263
+ onPointerLeave: R(
2264
+ t.onPointerLeave,
2265
+ xe((v) => {
2266
+ l();
2267
+ const f = r.content?.getBoundingClientRect();
2268
+ if (f) {
2269
+ const p = r.content?.dataset.side, g = p === "right", S = g ? -5 : 5, b = f[g ? "left" : "right"], y = f[g ? "right" : "left"];
2270
+ a.onPointerGraceIntentChange({
2271
+ area: [
2272
+ // Apply a bleed on clientX to ensure that our exit point is
2273
+ // consistently within polygon bounds
2274
+ { x: v.clientX + S, y: v.clientY },
2275
+ { x: b, y: f.top },
2276
+ { x: y, y: f.top },
2277
+ { x: y, y: f.bottom },
2278
+ { x: b, y: f.bottom }
2279
+ ],
2280
+ side: p
2281
+ }), window.clearTimeout(c.current), c.current = window.setTimeout(
2282
+ () => a.onPointerGraceIntentChange(null),
2283
+ 300
2284
+ );
2285
+ } else {
2286
+ if (a.onTriggerLeave(v), v.defaultPrevented) return;
2287
+ a.onPointerGraceIntentChange(null);
2288
+ }
2289
+ })
2290
+ ),
2291
+ onKeyDown: R(t.onKeyDown, (v) => {
2292
+ t.disabled || v.target !== v.currentTarget || a.searchRef.current !== "" && v.key === " " || Os[o.dir].includes(v.key) && (r.onOpenChange(!0), r.content?.focus(), v.preventDefault());
2293
+ })
2294
+ }
2295
+ ) });
2296
+ }, "MenuSubTrigger")
2297
+ ), ri = "MenuSubContent", oi = /* @__PURE__ */ s.forwardRef(
2298
+ /* @__PURE__ */ _(function(t, n) {
2299
+ const r = er(Q, t.__scopeMenu), { forceMount: o = r.forceMount, align: i = "start", ...a } = t, u = ue(Q, t.__scopeMenu), c = Oe(Q, t.__scopeMenu), m = ir(ri, t.__scopeMenu), C = s.useRef(null), l = $(n, C);
2300
+ return /* @__PURE__ */ h(Re.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ h(Ke, { present: o || u.open, children: /* @__PURE__ */ h(Re.Slot, { scope: t.__scopeMenu, children: /* @__PURE__ */ h(
2301
+ _t,
2302
+ {
2303
+ id: m.contentId,
2304
+ "aria-labelledby": m.triggerId,
2305
+ ...a,
2306
+ ref: l,
2307
+ align: i,
2308
+ side: c.dir === "rtl" ? "left" : "right",
2309
+ disableOutsidePointerEvents: !1,
2310
+ disableOutsideScroll: !1,
2311
+ trapFocus: !1,
2312
+ onOpenAutoFocus: (d) => {
2313
+ c.isUsingKeyboardRef.current && C.current?.focus(), d.preventDefault();
2314
+ },
2315
+ onCloseAutoFocus: (d) => d.preventDefault(),
2316
+ onFocusOutside: R(t.onFocusOutside, (d) => {
2317
+ d.target !== m.trigger && u.onOpenChange(!1);
2318
+ }),
2319
+ onEscapeKeyDown: R(t.onEscapeKeyDown, (d) => {
2320
+ c.onClose(), d.preventDefault();
2321
+ }),
2322
+ onKeyDown: R(t.onKeyDown, (d) => {
2323
+ const v = d.currentTarget.contains(d.target), f = Ts[c.dir].includes(d.key);
2324
+ v && f && (u.onOpenChange(!1), m.trigger?.focus(), d.preventDefault());
2325
+ })
2326
+ }
2327
+ ) }) }) });
2328
+ }, "MenuSubContent")
2329
+ );
2330
+ function Tt(e) {
2331
+ return e ? "open" : "closed";
2332
+ }
2333
+ _(Tt, "getOpenState");
2334
+ function Ie(e) {
2335
+ return e === "indeterminate";
2336
+ }
2337
+ _(Ie, "isIndeterminate");
2338
+ function Ye(e) {
2339
+ return Ie(e) ? "indeterminate" : e ? "checked" : "unchecked";
2340
+ }
2341
+ _(Ye, "getCheckedState");
2342
+ function ar(e) {
2343
+ const t = document.activeElement;
2344
+ for (const n of e)
2345
+ if (n === t || (n.focus(), document.activeElement !== t)) return;
2346
+ }
2347
+ _(ar, "focusFirst");
2348
+ function cr(e, t) {
2349
+ return e.map((n, r) => e[(t + r) % e.length]);
2350
+ }
2351
+ _(cr, "wrapArray");
2352
+ function ur(e, t, n) {
2353
+ const o = t.length > 1 && Array.from(t).every((m) => m === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1;
2354
+ let a = cr(e, Math.max(i, 0));
2355
+ o.length === 1 && (a = a.filter((m) => m !== n));
2356
+ const c = a.find(
2357
+ (m) => m.toLowerCase().startsWith(o.toLowerCase())
2358
+ );
2359
+ return c !== n ? c : void 0;
2360
+ }
2361
+ _(ur, "getNextMatch");
2362
+ function lr(e, t) {
2363
+ const { x: n, y: r } = e;
2364
+ let o = !1;
2365
+ for (let i = 0, a = t.length - 1; i < t.length; a = i++) {
2366
+ const u = t[i], c = t[a], m = u.x, C = u.y, l = c.x, d = c.y;
2367
+ C > r != d > r && n < (l - m) * (r - C) / (d - C) + m && (o = !o);
2368
+ }
2369
+ return o;
2370
+ }
2371
+ _(lr, "isPointInPolygon");
2372
+ function dr(e, t) {
2373
+ if (!t) return !1;
2374
+ const n = { x: e.clientX, y: e.clientY };
2375
+ return lr(n, t);
2376
+ }
2377
+ _(dr, "isPointerInGraceArea");
2378
+ function xe(e) {
2379
+ return (t) => t.pointerType === "mouse" ? e(t) : void 0;
2380
+ }
2381
+ _(xe, "whenMouse");
2382
+ var si = Fs, ii = Qn, ai = Ls, ci = Us, ui = tr, li = js, di = Ot, fi = zs, pi = Ys, mi = Zs, hi = Qs, vi = Js, gi = ti, Ci = ni, bi = oi, yi = Object.defineProperty, U = (e, t) => yi(e, "name", { value: t, configurable: !0 }), At = "ContextMenu", [Si, ya] = /* @__PURE__ */ fe(At, [
2383
+ Xn
2384
+ ]), W = Xn(), [xi, fr] = Si(At), Ei = /* @__PURE__ */ U((e) => {
2385
+ const { __scopeContextMenu: t, children: n, onOpenChange: r, open: o, dir: i, modal: a = !0 } = e, u = s.useRef(!1), [c, m] = je({
2386
+ prop: o,
2387
+ defaultProp: !1,
2388
+ onChange: r,
2389
+ caller: At
2390
+ }), C = W(t);
2391
+ return /* @__PURE__ */ h(
2392
+ xi,
2393
+ {
2394
+ scope: t,
2395
+ open: c,
2396
+ onOpenChange: m,
2397
+ modal: a,
2398
+ hasInteractedRef: u,
2399
+ children: /* @__PURE__ */ h(si, { ...C, dir: i, open: c, onOpenChange: m, modal: a, children: n })
2400
+ }
2401
+ );
2402
+ }, "ContextMenu"), wi = "ContextMenuTrigger", Mi = /* @__PURE__ */ s.forwardRef(
2403
+ // blank line to reduce diff noise
2404
+ /* @__PURE__ */ U(function(t, n) {
2405
+ const { __scopeContextMenu: r, disabled: o = !1, ...i } = t, a = fr(wi, r), u = W(r), [c, m] = s.useState({ x: 0, y: 0 }), C = s.useMemo(
2406
+ () => ({
2407
+ current: {
2408
+ getBoundingClientRect: /* @__PURE__ */ U(() => DOMRect.fromRect({ width: 0, height: 0, ...c }), "getBoundingClientRect")
2409
+ }
2410
+ }),
2411
+ [c]
2412
+ ), l = s.useRef(0), d = s.useCallback(
2413
+ () => window.clearTimeout(l.current),
2414
+ []
2415
+ ), v = /* @__PURE__ */ U((f) => {
2416
+ a.hasInteractedRef.current = !0, m({ x: f.clientX, y: f.clientY }), a.onOpenChange(!0);
2417
+ }, "handleOpen");
2418
+ return s.useEffect(() => d, [d]), s.useEffect(() => void (o && d()), [o, d]), /* @__PURE__ */ Ge(Rr, { children: [
2419
+ /* @__PURE__ */ h(ii, { ...u, virtualRef: C }),
2420
+ /* @__PURE__ */ h(
2421
+ Y.span,
2422
+ {
2423
+ "data-state": a.open ? "open" : "closed",
2424
+ "data-disabled": o ? "" : void 0,
2425
+ ...i,
2426
+ ref: n,
2427
+ style: { WebkitTouchCallout: "none", ...t.style },
2428
+ onContextMenu: o ? t.onContextMenu : R(t.onContextMenu, (f) => {
2429
+ d(), v(f), f.preventDefault();
2430
+ }),
2431
+ onPointerDown: o ? t.onPointerDown : R(
2432
+ t.onPointerDown,
2433
+ Pe((f) => {
2434
+ d(), a.open && a.onOpenChange(!1), l.current = window.setTimeout(() => v(f), 700);
2435
+ })
2436
+ ),
2437
+ onPointerMove: o ? t.onPointerMove : R(t.onPointerMove, Pe(d)),
2438
+ onPointerCancel: o ? t.onPointerCancel : R(t.onPointerCancel, Pe(d)),
2439
+ onPointerUp: o ? t.onPointerUp : R(t.onPointerUp, Pe(d))
2440
+ }
2441
+ )
2442
+ ] });
2443
+ }, "ContextMenuTrigger")
2444
+ ), Pi = /* @__PURE__ */ U((e) => {
2445
+ const { __scopeContextMenu: t, ...n } = e, r = W(t);
2446
+ return /* @__PURE__ */ h(ai, { ...r, ...n });
2447
+ }, "ContextMenuPortal"), Ri = "ContextMenuContent", Ii = /* @__PURE__ */ s.forwardRef(
2448
+ // blank line to reduce diff noise
2449
+ /* @__PURE__ */ U(function(t, n) {
2450
+ const { __scopeContextMenu: r, ...o } = t, i = fr(Ri, r), a = W(r), u = s.useRef(!1);
2451
+ return /* @__PURE__ */ h(
2452
+ ci,
2453
+ {
2454
+ ...a,
2455
+ ...o,
2456
+ ref: n,
2457
+ side: "right",
2458
+ sideOffset: 2,
2459
+ align: "start",
2460
+ onCloseAutoFocus: (c) => {
2461
+ t.onCloseAutoFocus?.(c), !c.defaultPrevented && u.current && c.preventDefault(), u.current = !1;
2462
+ },
2463
+ onInteractOutside: (c) => {
2464
+ t.onInteractOutside?.(c), !c.defaultPrevented && !i.modal && (u.current = !0);
2465
+ },
2466
+ style: {
2467
+ ...t.style,
2468
+ "--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
2469
+ "--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
2470
+ "--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
2471
+ "--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
2472
+ "--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
2473
+ }
2474
+ }
2475
+ );
2476
+ }, "ContextMenuContent")
2477
+ ), _i = /* @__PURE__ */ s.forwardRef(
2478
+ // blank line to reduce diff noise
2479
+ /* @__PURE__ */ U(function(t, n) {
2480
+ const { __scopeContextMenu: r, ...o } = t, i = W(r);
2481
+ return /* @__PURE__ */ h(ui, { ...i, ...o, ref: n });
2482
+ }, "ContextMenuGroup")
2483
+ ), Oi = /* @__PURE__ */ s.forwardRef(
2484
+ // blank line to reduce diff noise
2485
+ /* @__PURE__ */ U(function(t, n) {
2486
+ const { __scopeContextMenu: r, ...o } = t, i = W(r);
2487
+ return /* @__PURE__ */ h(li, { ...i, ...o, ref: n });
2488
+ }, "ContextMenuLabel")
2489
+ ), Ti = /* @__PURE__ */ s.forwardRef(
2490
+ // blank line to reduce diff noise
2491
+ /* @__PURE__ */ U(function(t, n) {
2492
+ const { __scopeContextMenu: r, ...o } = t, i = W(r);
2493
+ return /* @__PURE__ */ h(di, { ...i, ...o, ref: n });
2494
+ }, "ContextMenuItem")
2495
+ ), Ai = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ U(function(t, n) {
2496
+ const { __scopeContextMenu: r, ...o } = t, i = W(r);
2497
+ return /* @__PURE__ */ h(fi, { ...i, ...o, ref: n });
2498
+ }, "ContextMenuCheckboxItem")), Ni = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ U(function(t, n) {
2499
+ const { __scopeContextMenu: r, ...o } = t, i = W(r);
2500
+ return /* @__PURE__ */ h(pi, { ...i, ...o, ref: n });
2501
+ }, "ContextMenuRadioGroup")), Di = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ U(function(t, n) {
2502
+ const { __scopeContextMenu: r, ...o } = t, i = W(r);
2503
+ return /* @__PURE__ */ h(mi, { ...i, ...o, ref: n });
2504
+ }, "ContextMenuRadioItem")), Fi = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ U(function(t, n) {
2505
+ const { __scopeContextMenu: r, ...o } = t, i = W(r);
2506
+ return /* @__PURE__ */ h(hi, { ...i, ...o, ref: n });
2507
+ }, "ContextMenuItemIndicator")), ki = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ U(function(t, n) {
2508
+ const { __scopeContextMenu: r, ...o } = t, i = W(r);
2509
+ return /* @__PURE__ */ h(vi, { ...i, ...o, ref: n });
2510
+ }, "ContextMenuSeparator")), Li = "ContextMenuSub", $i = /* @__PURE__ */ U((e) => {
2511
+ const { __scopeContextMenu: t, children: n, onOpenChange: r, open: o, defaultOpen: i } = e, a = W(t), [u, c] = je({
2512
+ prop: o,
2513
+ defaultProp: i ?? !1,
2514
+ onChange: r,
2515
+ caller: Li
2516
+ });
2517
+ return /* @__PURE__ */ h(gi, { ...a, open: u, onOpenChange: c, children: n });
2518
+ }, "ContextMenuSub"), Ui = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ U(function(t, n) {
2519
+ const { __scopeContextMenu: r, ...o } = t, i = W(r);
2520
+ return /* @__PURE__ */ h(Ci, { ...i, ...o, ref: n });
2521
+ }, "ContextMenuSubTrigger")), Gi = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ U(function(t, n) {
2522
+ const { __scopeContextMenu: r, ...o } = t, i = W(r);
2523
+ return /* @__PURE__ */ h(
2524
+ bi,
2525
+ {
2526
+ ...i,
2527
+ ...o,
2528
+ ref: n,
2529
+ style: {
2530
+ ...t.style,
2531
+ "--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
2532
+ "--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
2533
+ "--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
2534
+ "--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
2535
+ "--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
2536
+ }
2537
+ }
2538
+ );
2539
+ }, "ContextMenuSubContent"));
2540
+ function Pe(e) {
2541
+ return (t) => t.pointerType !== "mouse" ? e(t) : void 0;
2542
+ }
2543
+ U(Pe, "whenTouchOrPen");
2544
+ var Bi = Ei, Ki = Mi, pr = Pi, mr = Ii, ji = _i, hr = Oi, vr = Ti, gr = Ai, zi = Ni, Cr = Di, br = Fi, yr = ki, Wi = $i, Sr = Ui, xr = Gi;
2545
+ const Sa = Bi, xa = Ki, Ea = ji, wa = pr, Ma = Wi, Pa = zi, Vi = ie({
2546
+ base: [
2547
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
2548
+ "focus:bg-secondary-bg-hover focus:text-primary-fg",
2549
+ "data-[state=open]:bg-secondary-bg-hover data-[state=open]:text-primary-fg"
2550
+ ],
2551
+ variants: {
2552
+ inset: {
2553
+ true: "pl-8"
2554
+ }
2555
+ }
2556
+ }), Hi = s.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ Ge(
2557
+ Sr,
2558
+ {
2559
+ ref: o,
2560
+ className: Vi({ className: e, inset: t }),
2561
+ ...r,
2562
+ children: [
2563
+ n,
2564
+ /* @__PURE__ */ h(vt, { icon: Xr, className: "ml-auto" })
2565
+ ]
2566
+ }
2567
+ ));
2568
+ Hi.displayName = Sr.displayName;
2569
+ const Yi = ie({
2570
+ base: [
2571
+ "z-50 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-lg border border-secondary-border bg-secondary-bg p-1 text-primary-fg shadow-lg",
2572
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
2573
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
2574
+ ]
2575
+ }), Xi = s.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h(xr, { ref: n, className: Yi({ className: e }), ...t }));
2576
+ Xi.displayName = xr.displayName;
2577
+ const Zi = ie({
2578
+ base: [
2579
+ "z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-lg border border-secondary-border bg-secondary-bg p-1 text-primary-fg shadow-md",
2580
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
2581
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
2582
+ ]
2583
+ }), qi = s.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h(pr, { children: /* @__PURE__ */ h(mr, { ref: n, className: Zi({ className: e }), ...t }) }));
2584
+ qi.displayName = mr.displayName;
2585
+ const Qi = ie({
2586
+ base: [
2587
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
2588
+ "focus:bg-secondary-bg-hover focus:text-primary-fg",
2589
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
2590
+ ],
2591
+ variants: {
2592
+ inset: {
2593
+ true: "pl-8"
2594
+ }
2595
+ }
2596
+ }), Ji = s.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ h(vr, { ref: r, className: Qi({ className: e, inset: t }), ...n }));
2597
+ Ji.displayName = vr.displayName;
2598
+ const ea = ie({
2599
+ slots: {
2600
+ container: [
2601
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none",
2602
+ "focus:bg-secondary-bg-hover focus:text-primary-fg",
2603
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
2604
+ ],
2605
+ indicator: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
2606
+ }
2607
+ }), ta = s.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => {
2608
+ const i = ea();
2609
+ return /* @__PURE__ */ Ge(
2610
+ gr,
2611
+ {
2612
+ ref: o,
2613
+ className: i.container({ className: e }),
2614
+ checked: n,
2615
+ ...r,
2616
+ children: [
2617
+ /* @__PURE__ */ h("span", { className: i.indicator(), children: /* @__PURE__ */ h(br, { children: /* @__PURE__ */ h(vt, { icon: Hr }) }) }),
2618
+ t
2619
+ ]
2620
+ }
2621
+ );
2622
+ });
2623
+ ta.displayName = gr.displayName;
2624
+ const na = ie({
2625
+ slots: {
2626
+ container: [
2627
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none",
2628
+ "focus:bg-secondary-bg-hover focus:text-primary-fg",
2629
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
2630
+ ],
2631
+ indicator: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
2632
+ }
2633
+ }), ra = s.forwardRef(({ className: e, children: t, ...n }, r) => {
2634
+ const o = na();
2635
+ return /* @__PURE__ */ Ge(Cr, { ref: r, className: o.container({ className: e }), ...n, children: [
2636
+ /* @__PURE__ */ h("span", { className: o.indicator(), children: /* @__PURE__ */ h(br, { children: /* @__PURE__ */ h(vt, { icon: Yr, className: "size-2 fill-current" }) }) }),
2637
+ t
2638
+ ] });
2639
+ });
2640
+ ra.displayName = Cr.displayName;
2641
+ const oa = ie({
2642
+ base: "px-2 py-1.5 text-sm font-semibold text-primary-fg",
2643
+ variants: {
2644
+ inset: {
2645
+ true: "pl-8"
2646
+ }
2647
+ }
2648
+ }), sa = s.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ h(hr, { ref: r, className: oa({ className: e, inset: t }), ...n }));
2649
+ sa.displayName = hr.displayName;
2650
+ const ia = ie({
2651
+ base: "-mx-1 my-1 h-px bg-secondary-border"
2652
+ }), aa = s.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h(yr, { ref: n, className: ia({ className: e }), ...t }));
2653
+ aa.displayName = yr.displayName;
2654
+ const ca = ie({
2655
+ base: "ml-auto text-xs tracking-widest text-muted"
2656
+ }), ua = ({ className: e, ...t }) => /* @__PURE__ */ h("span", { className: ca({ className: e }), ...t });
2657
+ ua.displayName = "ContextMenuShortcut";
2658
+ export {
2659
+ Sa as ContextMenu,
2660
+ ta as ContextMenuCheckboxItem,
2661
+ qi as ContextMenuContent,
2662
+ Ea as ContextMenuGroup,
2663
+ Ji as ContextMenuItem,
2664
+ sa as ContextMenuLabel,
2665
+ wa as ContextMenuPortal,
2666
+ Pa as ContextMenuRadioGroup,
2667
+ ra as ContextMenuRadioItem,
2668
+ aa as ContextMenuSeparator,
2669
+ ua as ContextMenuShortcut,
2670
+ Ma as ContextMenuSub,
2671
+ Xi as ContextMenuSubContent,
2672
+ Hi as ContextMenuSubTrigger,
2673
+ xa as ContextMenuTrigger
2674
+ };
2675
+ //# sourceMappingURL=context-menu.js.map