@koide-labs/ui 0.0.0 → 0.0.2

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 (383) hide show
  1. package/README.md +53 -3
  2. package/{src/-types.ts → dist/-types.d.ts} +1 -6
  3. package/dist/-types.js +1 -0
  4. package/dist/-utils.d.ts +19 -0
  5. package/dist/-utils.js +33 -0
  6. package/dist/Button-DrPFFzo7.js +31 -0
  7. package/dist/CompositeRoot-CVk5a-pR.js +233 -0
  8. package/dist/DirectionContext-C2o_MF_i.js +9 -0
  9. package/dist/FieldItemContext-DAvk99to.js +11 -0
  10. package/dist/FloatingPortal-tWyuKRSN.js +435 -0
  11. package/dist/FloatingPortalLite-DVyq6YhV.js +28 -0
  12. package/dist/InternalBackdrop-jYAiOJ8v.js +574 -0
  13. package/dist/LabelableContext-BMvjVwor.js +169 -0
  14. package/dist/ToolbarRootContext-CvvL0Tk1.js +9 -0
  15. package/dist/clamp-D0KDAQIz.js +6 -0
  16. package/dist/clsx-OuTLNxxd.js +16 -0
  17. package/dist/components/accordion/index.d.ts +12 -0
  18. package/dist/components/accordion/index.js +699 -0
  19. package/dist/components/alert-dialog/index.d.ts +26 -0
  20. package/dist/components/alert-dialog/index.js +136 -0
  21. package/dist/components/anchor/index.d.ts +8 -0
  22. package/dist/components/anchor/index.js +38 -0
  23. package/dist/components/avatar/index.d.ts +21 -0
  24. package/dist/components/avatar/index.js +161 -0
  25. package/dist/components/badge/index.d.ts +16 -0
  26. package/dist/components/badge/index.js +40 -0
  27. package/dist/components/button/index.d.ts +24 -0
  28. package/dist/components/button/index.js +47 -0
  29. package/dist/components/checkbox/index.d.ts +9 -0
  30. package/dist/components/checkbox/index.js +269 -0
  31. package/dist/components/code/index.d.ts +9 -0
  32. package/dist/components/code/index.js +10 -0
  33. package/dist/components/collapse/index.d.ts +11 -0
  34. package/dist/components/collapse/index.js +41 -0
  35. package/dist/components/command/index.d.ts +14 -0
  36. package/dist/components/command/index.js +1695 -0
  37. package/dist/components/context-menu/index.d.ts +42 -0
  38. package/dist/components/context-menu/index.js +1444 -0
  39. package/dist/components/dialog/index.d.ts +48 -0
  40. package/dist/components/dialog/index.js +138 -0
  41. package/dist/components/heading/index.d.ts +44 -0
  42. package/dist/components/heading/index.js +56 -0
  43. package/dist/components/icon/icon-names.d.ts +1 -0
  44. package/dist/components/icon/icon-names.js +1 -0
  45. package/dist/components/icon/index.d.ts +24 -0
  46. package/dist/components/icon/index.js +43 -0
  47. package/dist/components/icon-button/index.d.ts +12 -0
  48. package/dist/components/icon-button/index.js +45 -0
  49. package/dist/components/inline-code/index.d.ts +6 -0
  50. package/dist/components/inline-code/index.js +22 -0
  51. package/dist/components/input/index.d.ts +3 -0
  52. package/dist/components/input/index.js +119 -0
  53. package/dist/components/meter/index.d.ts +18 -0
  54. package/dist/components/meter/index.js +165 -0
  55. package/dist/components/multiline-input/index.d.ts +6 -0
  56. package/dist/components/multiline-input/index.js +100 -0
  57. package/dist/components/number-input/index.d.ts +10 -0
  58. package/dist/components/number-input/index.js +1169 -0
  59. package/dist/components/password-input/index.d.ts +2 -0
  60. package/dist/components/password-input/index.js +29 -0
  61. package/dist/components/pill/index.d.ts +13 -0
  62. package/dist/components/pill/index.js +38 -0
  63. package/dist/components/popover/index.d.ts +21 -0
  64. package/dist/components/popover/index.js +636 -0
  65. package/dist/components/preview-card/index.d.ts +17 -0
  66. package/dist/components/preview-card/index.js +402 -0
  67. package/dist/components/radio/index.d.ts +13 -0
  68. package/dist/components/radio/index.js +404 -0
  69. package/dist/components/search-bar/index.d.ts +12 -0
  70. package/dist/components/search-bar/index.js +48 -0
  71. package/dist/components/select/index.d.ts +16 -0
  72. package/dist/components/select/index.js +1263 -0
  73. package/dist/components/separator/index.d.ts +7 -0
  74. package/dist/components/separator/index.js +6 -0
  75. package/dist/components/slider/index.d.ts +5 -0
  76. package/dist/components/slider/index.js +902 -0
  77. package/dist/components/spinner/index.d.ts +2 -0
  78. package/dist/components/spinner/index.js +13 -0
  79. package/dist/components/stacked-avatars/index.d.ts +14 -0
  80. package/dist/components/stacked-avatars/index.js +92 -0
  81. package/dist/components/status-banner/index.d.ts +17 -0
  82. package/dist/components/status-banner/index.js +69 -0
  83. package/dist/components/surface/index.d.ts +27 -0
  84. package/dist/components/surface/index.js +41 -0
  85. package/dist/components/switch/index.d.ts +5 -0
  86. package/dist/components/switch/index.js +196 -0
  87. package/dist/components/tabs/index.d.ts +18 -0
  88. package/dist/components/tabs/index.js +509 -0
  89. package/dist/components/text/index.d.ts +26 -0
  90. package/dist/components/text/index.js +51 -0
  91. package/dist/components/theme-provider/index.d.ts +2 -0
  92. package/dist/components/theme-provider/index.js +6 -0
  93. package/dist/components/theme-provider/theme-context.d.ts +9 -0
  94. package/dist/components/theme-provider/theme-context.js +13 -0
  95. package/dist/components/theme-provider/theme-provider.d.ts +17 -0
  96. package/dist/components/theme-provider/theme-provider.js +30 -0
  97. package/dist/components/timestamp/index.d.ts +23 -0
  98. package/dist/components/timestamp/index.js +1392 -0
  99. package/dist/components/toast/index.d.ts +2 -0
  100. package/dist/components/toast/index.js +7 -0
  101. package/dist/components/toast/toast.d.ts +2 -0
  102. package/dist/components/toast/toast.js +878 -0
  103. package/dist/components/toast/use-toast-manager.d.ts +27 -0
  104. package/dist/components/toast/use-toast-manager.js +4 -0
  105. package/dist/components/tooltip/index.d.ts +14 -0
  106. package/dist/components/tooltip/index.js +712 -0
  107. package/dist/components/tooltip/tooltip-arrow.d.ts +3 -0
  108. package/dist/components/tooltip/tooltip-arrow.js +6 -0
  109. package/dist/components/view/index.d.ts +30 -0
  110. package/dist/components/view/index.js +84 -0
  111. package/dist/components/visually-hidden/index.d.ts +1 -0
  112. package/dist/components/visually-hidden/index.js +4 -0
  113. package/dist/composite-Bx7Szd_T.js +208 -0
  114. package/dist/composite-C9L5QmZL.js +66 -0
  115. package/dist/createBaseUIEventDetails-D8M2Yl-a.js +59 -0
  116. package/dist/detectBrowser-I-s3yzIE.js +43 -0
  117. package/dist/dialog.css +1 -0
  118. package/dist/dialog.module-BeF-6XAo.js +415 -0
  119. package/dist/element-CZEOj04G.js +80 -0
  120. package/dist/event-CKoGyQEJ.js +30 -0
  121. package/dist/floating-ui.utils-C7pRWMZ_.js +128 -0
  122. package/dist/floating-ui.utils.dom-C7FS5id0.js +135 -0
  123. package/dist/formatErrorMessage-BqPuTBN-.js +7 -0
  124. package/dist/formatNumber-1UNwjeqf.js +25 -0
  125. package/dist/getDisabledMountTransitionStyles-YfHPge6T.js +1510 -0
  126. package/dist/index-BX1XbbRk.js +1206 -0
  127. package/dist/index-CeuccO-T.js +109 -0
  128. package/dist/index-DN9Bn1qm.js +29 -0
  129. package/dist/index-FMoPxlJ2.js +52 -0
  130. package/dist/index.css +1 -0
  131. package/dist/index.d.ts +42 -0
  132. package/dist/index.js +108 -0
  133. package/dist/index10.css +1 -0
  134. package/dist/index11.css +1 -0
  135. package/dist/index12.css +1 -0
  136. package/dist/index13.css +1 -0
  137. package/dist/index14.css +1 -0
  138. package/dist/index15.css +1 -0
  139. package/dist/index16.css +1 -0
  140. package/dist/index17.css +1 -0
  141. package/dist/index18.css +1 -0
  142. package/dist/index19.css +1 -0
  143. package/dist/index2.css +1 -0
  144. package/dist/index20.css +1 -0
  145. package/dist/index21.css +1 -0
  146. package/dist/index22.css +1 -0
  147. package/dist/index23.css +1 -0
  148. package/dist/index24.css +1 -0
  149. package/dist/index25.css +1 -0
  150. package/dist/index26.css +1 -0
  151. package/dist/index27.css +1 -0
  152. package/dist/index28.css +1 -0
  153. package/dist/index29.css +1 -0
  154. package/dist/index3.css +1 -0
  155. package/dist/index30.css +1 -0
  156. package/dist/index31.css +1 -0
  157. package/dist/index32.css +1 -0
  158. package/dist/index33.css +1 -0
  159. package/dist/index34.css +1 -0
  160. package/dist/index35.css +1 -0
  161. package/dist/index36.css +1 -0
  162. package/dist/index37.css +1 -0
  163. package/dist/index4.css +1 -0
  164. package/dist/index5.css +1 -0
  165. package/dist/index6.css +1 -0
  166. package/dist/index7.css +1 -0
  167. package/dist/index8.css +1 -0
  168. package/dist/index9.css +1 -0
  169. package/dist/inertValue-BCYGsdmf.js +7 -0
  170. package/dist/input.css +1 -0
  171. package/dist/input.module-DDQY_Ij6.js +7 -0
  172. package/dist/integrations/react-markdown/index.d.ts +5 -0
  173. package/dist/integrations/react-markdown/index.js +6895 -0
  174. package/dist/integrations/remix/index.d.ts +9 -0
  175. package/{src/integrations/remix.ts → dist/integrations/remix/index.js} +7 -4
  176. package/dist/integrations/tailwind.css +1 -0
  177. package/dist/integrations/twemoij/index.d.ts +3 -0
  178. package/dist/integrations/twemoij/index.js +18 -0
  179. package/dist/isElementDisabled-Cbd8W9kH.js +6 -0
  180. package/dist/owner-rKN292Q9.js +6 -0
  181. package/dist/safePolygon-DWy1dGKJ.js +308 -0
  182. package/dist/styles/core.css +1 -0
  183. package/dist/styles/tokens.d.ts +400 -0
  184. package/{src/styles/tokens.ts → dist/styles/tokens.js} +54 -96
  185. package/dist/toast.css +1 -0
  186. package/dist/tooltip-arrow-C1qXdi5T.js +24 -0
  187. package/dist/tooltip-arrow.css +1 -0
  188. package/dist/transitions.css +1 -0
  189. package/dist/transitions.module-CWX8e5cx.js +1343 -0
  190. package/dist/use-toast-manager-Dq-44AuW.js +37 -0
  191. package/dist/useAnimationFrame-451ugS_6.js +68 -0
  192. package/dist/useBaseUiId-B7WyxtIE.js +7 -0
  193. package/dist/useButton-DfIwsdb8.js +127 -0
  194. package/dist/useCompositeListItem-OkcAim_1.js +148 -0
  195. package/dist/useControlled-Du4sJyMj.js +31 -0
  196. package/dist/useHoverReferenceInteraction-SfOBPoXM.js +264 -0
  197. package/dist/useId-C5kyn6tA.js +22 -0
  198. package/dist/useIsoLayoutEffect-CIDbvm3Q.js +6 -0
  199. package/dist/useLabelableId-Ci_jDvmv.js +29 -0
  200. package/dist/useOnMount-VRW6CK2u.js +8 -0
  201. package/dist/useOpenChangeComplete-Dse9kY9E.js +61 -0
  202. package/dist/usePopupAutoResize-CNR6Ekmx.js +85 -0
  203. package/dist/useRender-CLx7dR_1.js +7 -0
  204. package/dist/useRenderElement-DwToLA61.js +244 -0
  205. package/dist/useRole-oDBdbuwQ.js +77 -0
  206. package/dist/useStableCallback-CkTrVkNX.js +29 -0
  207. package/dist/useSyncedFloatingRootContext-Dorsv-jf.js +167 -0
  208. package/dist/useTimeout-CflX-kz3.js +32 -0
  209. package/dist/useTransitionStatus-CUfcuGAV.js +42 -0
  210. package/dist/useTypeahead-D85V2IUx.js +333 -0
  211. package/dist/useValueAsRef-HURLzret.js +19 -0
  212. package/dist/useValueChanged-DL757-yD.js +14 -0
  213. package/dist/valueToPercent-DaP9qN4u.js +6 -0
  214. package/dist/view.css +1 -0
  215. package/dist/view.module-DfDLgJE0.js +6 -0
  216. package/dist/visuallyHidden-CpJ-mhai.js +16 -0
  217. package/dist/warn-CKtX8MLJ.js +11 -0
  218. package/package.json +18 -2
  219. package/.husky/pre-commit +0 -1
  220. package/.storybook/main.ts +0 -25
  221. package/.storybook/preview-head.html +0 -6
  222. package/.storybook/preview.tsx +0 -48
  223. package/.storybook/vitest.setup.ts +0 -8
  224. package/eslint.config.mjs +0 -29
  225. package/lint-staged.config.js +0 -15
  226. package/pnpm-workspace.yaml +0 -2
  227. package/postcss.config.mjs +0 -7
  228. package/prettier.config.mjs +0 -24
  229. package/scripts/build-icon-types.ts +0 -38
  230. package/src/-utils.tsx +0 -64
  231. package/src/components/accordion/accordion.module.css +0 -44
  232. package/src/components/accordion/accordion.stories.tsx +0 -36
  233. package/src/components/accordion/index.tsx +0 -67
  234. package/src/components/alert-dialog/alert-dialog.module.css +0 -5
  235. package/src/components/alert-dialog/alert-dialog.stories.tsx +0 -53
  236. package/src/components/alert-dialog/index.tsx +0 -138
  237. package/src/components/anchor/anchor.module.css +0 -18
  238. package/src/components/anchor/anchor.stories.tsx +0 -28
  239. package/src/components/anchor/index.tsx +0 -45
  240. package/src/components/avatar/avatar.module.css +0 -56
  241. package/src/components/avatar/avatar.stories.tsx +0 -61
  242. package/src/components/avatar/index.tsx +0 -82
  243. package/src/components/badge/badge.module.css +0 -35
  244. package/src/components/badge/badge.stories.tsx +0 -60
  245. package/src/components/badge/index.tsx +0 -71
  246. package/src/components/button/button.module.css +0 -42
  247. package/src/components/button/button.stories.tsx +0 -108
  248. package/src/components/button/index.tsx +0 -63
  249. package/src/components/checkbox/checkbox.module.css +0 -36
  250. package/src/components/checkbox/checkbox.stories.tsx +0 -21
  251. package/src/components/checkbox/index.tsx +0 -41
  252. package/src/components/code/code.module.css +0 -20
  253. package/src/components/code/code.stories.tsx +0 -42
  254. package/src/components/code/index.tsx +0 -73
  255. package/src/components/collapse/collapse.module.css +0 -27
  256. package/src/components/collapse/collapse.stories.tsx +0 -27
  257. package/src/components/collapse/index.tsx +0 -59
  258. package/src/components/command/command.module.css +0 -95
  259. package/src/components/command/command.stories.tsx +0 -38
  260. package/src/components/command/index.tsx +0 -108
  261. package/src/components/context-menu/context-menu.module.css +0 -36
  262. package/src/components/context-menu/context-menu.stories.tsx +0 -99
  263. package/src/components/context-menu/index.tsx +0 -242
  264. package/src/components/dialog/dialog.module.css +0 -71
  265. package/src/components/dialog/dialog.stories.tsx +0 -29
  266. package/src/components/dialog/index.tsx +0 -148
  267. package/src/components/heading/heading.module.css +0 -3
  268. package/src/components/heading/heading.stories.tsx +0 -52
  269. package/src/components/heading/index.tsx +0 -112
  270. package/src/components/icon/icon-names.ts +0 -3189
  271. package/src/components/icon/icon.module.css +0 -36
  272. package/src/components/icon/icon.stories.tsx +0 -40
  273. package/src/components/icon/index.tsx +0 -60
  274. package/src/components/icon-button/icon-button.module.css +0 -33
  275. package/src/components/icon-button/icon-button.stories.tsx +0 -59
  276. package/src/components/icon-button/index.tsx +0 -48
  277. package/src/components/inline-code/index.tsx +0 -29
  278. package/src/components/inline-code/inline-code.module.css +0 -13
  279. package/src/components/inline-code/inline-code.stories.tsx +0 -31
  280. package/src/components/input/index.tsx +0 -22
  281. package/src/components/input/input.module.css +0 -23
  282. package/src/components/input/input.stories.tsx +0 -52
  283. package/src/components/meter/index.tsx +0 -55
  284. package/src/components/meter/meter.module.css +0 -23
  285. package/src/components/meter/meter.stories.tsx +0 -31
  286. package/src/components/multiline-input/index.tsx +0 -58
  287. package/src/components/multiline-input/multiline-input.stories.tsx +0 -26
  288. package/src/components/number-input/index.tsx +0 -74
  289. package/src/components/number-input/number-input.module.css +0 -41
  290. package/src/components/number-input/number-input.stories.tsx +0 -24
  291. package/src/components/password-input/index.tsx +0 -24
  292. package/src/components/password-input/password-input.module.css +0 -10
  293. package/src/components/password-input/password-input.stories.tsx +0 -24
  294. package/src/components/pill/index.tsx +0 -45
  295. package/src/components/pill/pill.module.css +0 -22
  296. package/src/components/pill/pill.stories.tsx +0 -83
  297. package/src/components/popover/index.tsx +0 -94
  298. package/src/components/popover/popover.module.css +0 -8
  299. package/src/components/popover/popover.stories.tsx +0 -53
  300. package/src/components/preview-card/index.tsx +0 -68
  301. package/src/components/preview-card/preview-card.module.css +0 -5
  302. package/src/components/preview-card/preview-card.stories.tsx +0 -58
  303. package/src/components/radio/index.tsx +0 -67
  304. package/src/components/radio/radio-group.module.css +0 -5
  305. package/src/components/radio/radio.module.css +0 -36
  306. package/src/components/radio/radio.stories.tsx +0 -27
  307. package/src/components/search-bar/index.tsx +0 -60
  308. package/src/components/search-bar/search-bar.module.css +0 -29
  309. package/src/components/search-bar/search-bar.stories.tsx +0 -37
  310. package/src/components/select/index.tsx +0 -132
  311. package/src/components/select/select.module.css +0 -63
  312. package/src/components/select/select.stories.tsx +0 -49
  313. package/src/components/separator/index.tsx +0 -28
  314. package/src/components/separator/separator.module.css +0 -24
  315. package/src/components/separator/separator.stories.tsx +0 -40
  316. package/src/components/slider/index.tsx +0 -28
  317. package/src/components/slider/slider.module.css +0 -52
  318. package/src/components/slider/slider.stories.tsx +0 -53
  319. package/src/components/spinner/index.tsx +0 -14
  320. package/src/components/spinner/spinner.module.css +0 -13
  321. package/src/components/spinner/spinner.stories.tsx +0 -17
  322. package/src/components/stacked-avatars/index.tsx +0 -88
  323. package/src/components/stacked-avatars/stacked-avatars.module.css +0 -79
  324. package/src/components/stacked-avatars/stacked-avatars.stories.tsx +0 -48
  325. package/src/components/status-banner/index.tsx +0 -96
  326. package/src/components/status-banner/status-banner.module.css +0 -52
  327. package/src/components/status-banner/status-banner.stories.tsx +0 -44
  328. package/src/components/surface/index.tsx +0 -83
  329. package/src/components/surface/surface.module.css +0 -35
  330. package/src/components/surface/surface.stories.tsx +0 -84
  331. package/src/components/switch/index.tsx +0 -23
  332. package/src/components/switch/switch.module.css +0 -45
  333. package/src/components/switch/switch.stories.tsx +0 -48
  334. package/src/components/tabs/index.tsx +0 -126
  335. package/src/components/tabs/tabs.module.css +0 -134
  336. package/src/components/tabs/tabs.stories.tsx +0 -88
  337. package/src/components/text/index.tsx +0 -69
  338. package/src/components/text/text.module.css +0 -76
  339. package/src/components/text/text.stories.tsx +0 -107
  340. package/src/components/theme-provider/index.ts +0 -2
  341. package/src/components/theme-provider/theme-context.tsx +0 -18
  342. package/src/components/theme-provider/theme-provider.stories.tsx +0 -47
  343. package/src/components/theme-provider/theme-provider.tsx +0 -77
  344. package/src/components/timestamp/index.tsx +0 -131
  345. package/src/components/timestamp/timestamp.module.css +0 -8
  346. package/src/components/timestamp/timestamp.stories.tsx +0 -37
  347. package/src/components/toast/index.ts +0 -2
  348. package/src/components/toast/toast.module.css +0 -163
  349. package/src/components/toast/toast.stories.tsx +0 -53
  350. package/src/components/toast/toast.tsx +0 -104
  351. package/src/components/toast/use-toast-manager.ts +0 -63
  352. package/src/components/tooltip/index.tsx +0 -61
  353. package/src/components/tooltip/tooltip-arrow.tsx +0 -17
  354. package/src/components/tooltip/tooltip.module.css +0 -44
  355. package/src/components/tooltip/tooltip.stories.tsx +0 -76
  356. package/src/components/view/index.tsx +0 -137
  357. package/src/components/view/view.module.css +0 -11
  358. package/src/components/view/view.stories.tsx +0 -131
  359. package/src/components/view/view_colorway.module.css +0 -280
  360. package/src/components/view/view_interactive.module.css +0 -127
  361. package/src/components/view/view_loading.module.css +0 -58
  362. package/src/components/visually-hidden/index.ts +0 -1
  363. package/src/index.ts +0 -49
  364. package/src/integrations/react-markdown/index.tsx +0 -134
  365. package/src/integrations/react-markdown/react-markdown.module.css +0 -62
  366. package/src/integrations/react-markdown/react-markdown.stories.tsx +0 -31
  367. package/src/integrations/tailwind.css +0 -173
  368. package/src/integrations/twemoij/index.tsx +0 -13
  369. package/src/integrations/twemoij/twemoji.module.css +0 -7
  370. package/src/integrations/twemoij/twemoji.stories.tsx +0 -40
  371. package/src/stories/components/all-variants.tsx +0 -40
  372. package/src/stories/data.ts +0 -72
  373. package/src/stories/utils.ts +0 -20
  374. package/src/styles/core.css +0 -153
  375. package/src/styles/themes/dark.css +0 -86
  376. package/src/styles/themes/light.css +0 -86
  377. package/src/styles/transitions.module.css +0 -31
  378. package/stylelint.config.mjs +0 -29
  379. package/tsconfig.app.json +0 -35
  380. package/tsconfig.json +0 -7
  381. package/tsconfig.node.json +0 -26
  382. package/vite.config.ts +0 -103
  383. package/vitest.shims.d.ts +0 -1
@@ -0,0 +1,1695 @@
1
+ import { jsx as E, jsxs as oe, Fragment as Qe } from "react/jsx-runtime";
2
+ import { c as We } from "../../clsx-OuTLNxxd.js";
3
+ import * as a from "react";
4
+ import { useState as Qt } from "react";
5
+ import { c as ie, u as q, P as G } from "../../index-CeuccO-T.js";
6
+ import * as Jt from "react-dom";
7
+ import en from "react-dom";
8
+ import { textify as tn } from "../../-utils.js";
9
+ import { Dialog as nn } from "../dialog/index.js";
10
+ import { Icon as vt } from "../icon/index.js";
11
+ import { S as rn } from "../../index-FMoPxlJ2.js";
12
+ import { Text as pt } from "../text/index.js";
13
+ import { View as ye } from "../view/index.js";
14
+ import '../../index35.css';var Je = 1, on = 0.9, an = 0.8, cn = 0.17, Ne = 0.1, Oe = 0.999, un = 0.9999, sn = 0.99, ln = /[\\\/_+.#"@\[\(\{&]/, dn = /[\\\/_+.#"@\[\(\{&]/g, fn = /[\s-]/, ht = /[\s-]/g;
15
+ function Be(e, t, n, r, o, i, u) {
16
+ if (i === t.length) return o === e.length ? Je : sn;
17
+ var c = `${o},${i}`;
18
+ if (u[c] !== void 0) return u[c];
19
+ for (var m = r.charAt(i), s = n.indexOf(m, o), d = 0, f, p, h, _; s >= 0; ) f = Be(e, t, n, r, s + 1, i + 1, u), f > d && (s === o ? f *= Je : ln.test(e.charAt(s - 1)) ? (f *= an, h = e.slice(o, s - 1).match(dn), h && o > 0 && (f *= Math.pow(Oe, h.length))) : fn.test(e.charAt(s - 1)) ? (f *= on, _ = e.slice(o, s - 1).match(ht), _ && o > 0 && (f *= Math.pow(Oe, _.length))) : (f *= cn, o > 0 && (f *= Math.pow(Oe, s - o))), e.charAt(s) !== t.charAt(i) && (f *= un)), (f < Ne && n.charAt(s - 1) === r.charAt(i + 1) || r.charAt(i + 1) === r.charAt(i) && n.charAt(s - 1) !== r.charAt(i)) && (p = Be(e, t, n, r, s + 1, i + 2, u), p * Ne > f && (f = p * Ne)), f > d && (d = f), s = n.indexOf(m, s + 1);
20
+ return u[c] = d, d;
21
+ }
22
+ function et(e) {
23
+ return e.toLowerCase().replace(ht, " ");
24
+ }
25
+ function mn(e, t, n) {
26
+ return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, Be(e, t, et(e), et(t), 0, 0, {});
27
+ }
28
+ function j(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
29
+ return function(o) {
30
+ if (e?.(o), n === !1 || !o.defaultPrevented)
31
+ return t?.(o);
32
+ };
33
+ }
34
+ function vn(e, t) {
35
+ const n = a.createContext(t), r = (i) => {
36
+ const { children: u, ...c } = i, m = a.useMemo(() => c, Object.values(c));
37
+ return /* @__PURE__ */ E(n.Provider, { value: m, children: u });
38
+ };
39
+ r.displayName = e + "Provider";
40
+ function o(i) {
41
+ const u = a.useContext(n);
42
+ if (u) return u;
43
+ if (t !== void 0) return t;
44
+ throw new Error(`\`${i}\` must be used within \`${e}\``);
45
+ }
46
+ return [r, o];
47
+ }
48
+ function pn(e, t = []) {
49
+ let n = [];
50
+ function r(i, u) {
51
+ const c = a.createContext(u), m = n.length;
52
+ n = [...n, u];
53
+ const s = (f) => {
54
+ const { scope: p, children: h, ..._ } = f, v = p?.[e]?.[m] || c, y = a.useMemo(() => _, Object.values(_));
55
+ return /* @__PURE__ */ E(v.Provider, { value: y, children: h });
56
+ };
57
+ s.displayName = i + "Provider";
58
+ function d(f, p) {
59
+ const h = p?.[e]?.[m] || c, _ = a.useContext(h);
60
+ if (_) return _;
61
+ if (u !== void 0) return u;
62
+ throw new Error(`\`${f}\` must be used within \`${i}\``);
63
+ }
64
+ return [s, d];
65
+ }
66
+ const o = () => {
67
+ const i = n.map((u) => a.createContext(u));
68
+ return function(c) {
69
+ const m = c?.[e] || i;
70
+ return a.useMemo(
71
+ () => ({ [`__scope${e}`]: { ...c, [e]: m } }),
72
+ [c, m]
73
+ );
74
+ };
75
+ };
76
+ return o.scopeName = e, [r, hn(o, ...t)];
77
+ }
78
+ function hn(...e) {
79
+ const t = e[0];
80
+ if (e.length === 1) return t;
81
+ const n = () => {
82
+ const r = e.map((o) => ({
83
+ useScope: o(),
84
+ scopeName: o.scopeName
85
+ }));
86
+ return function(i) {
87
+ const u = r.reduce((c, { useScope: m, scopeName: s }) => {
88
+ const f = m(i)[`__scope${s}`];
89
+ return { ...c, ...f };
90
+ }, {});
91
+ return a.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
92
+ };
93
+ };
94
+ return n.scopeName = t.scopeName, n;
95
+ }
96
+ var se = globalThis?.document ? a.useLayoutEffect : () => {
97
+ }, gn = a[" useId ".trim().toString()] || (() => {
98
+ }), yn = 0;
99
+ function $(e) {
100
+ const [t, n] = a.useState(gn());
101
+ return se(() => {
102
+ n((r) => r ?? String(yn++));
103
+ }, [e]), t ? `radix-${t}` : "";
104
+ }
105
+ var En = a[" useInsertionEffect ".trim().toString()] || se;
106
+ function bn({
107
+ prop: e,
108
+ defaultProp: t,
109
+ onChange: n = () => {
110
+ },
111
+ caller: r
112
+ }) {
113
+ const [o, i, u] = wn({
114
+ defaultProp: t,
115
+ onChange: n
116
+ }), c = e !== void 0, m = c ? e : o;
117
+ {
118
+ const d = a.useRef(e !== void 0);
119
+ a.useEffect(() => {
120
+ const f = d.current;
121
+ f !== c && console.warn(
122
+ `${r} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
123
+ ), d.current = c;
124
+ }, [c, r]);
125
+ }
126
+ const s = a.useCallback(
127
+ (d) => {
128
+ if (c) {
129
+ const f = Cn(d) ? d(e) : d;
130
+ f !== e && u.current?.(f);
131
+ } else
132
+ i(d);
133
+ },
134
+ [c, e, i, u]
135
+ );
136
+ return [m, s];
137
+ }
138
+ function wn({
139
+ defaultProp: e,
140
+ onChange: t
141
+ }) {
142
+ const [n, r] = a.useState(e), o = a.useRef(n), i = a.useRef(t);
143
+ return En(() => {
144
+ i.current = t;
145
+ }, [t]), a.useEffect(() => {
146
+ o.current !== n && (i.current?.(n), o.current = n);
147
+ }, [n, o]), [n, r, i];
148
+ }
149
+ function Cn(e) {
150
+ return typeof e == "function";
151
+ }
152
+ // @__NO_SIDE_EFFECTS__
153
+ function gt(e) {
154
+ const t = /* @__PURE__ */ Sn(e), n = a.forwardRef((r, o) => {
155
+ const { children: i, ...u } = r, c = a.Children.toArray(i), m = c.find(_n);
156
+ if (m) {
157
+ const s = m.props.children, d = c.map((f) => f === m ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : f);
158
+ return /* @__PURE__ */ E(t, { ...u, ref: o, children: a.isValidElement(s) ? a.cloneElement(s, void 0, d) : null });
159
+ }
160
+ return /* @__PURE__ */ E(t, { ...u, ref: o, children: i });
161
+ });
162
+ return n.displayName = `${e}.Slot`, n;
163
+ }
164
+ // @__NO_SIDE_EFFECTS__
165
+ function Sn(e) {
166
+ const t = a.forwardRef((n, r) => {
167
+ const { children: o, ...i } = n;
168
+ if (a.isValidElement(o)) {
169
+ const u = Pn(o), c = Dn(i, o.props);
170
+ return o.type !== a.Fragment && (c.ref = r ? ie(r, u) : u), a.cloneElement(o, c);
171
+ }
172
+ return a.Children.count(o) > 1 ? a.Children.only(null) : null;
173
+ });
174
+ return t.displayName = `${e}.SlotClone`, t;
175
+ }
176
+ var Rn = /* @__PURE__ */ Symbol("radix.slottable");
177
+ function _n(e) {
178
+ return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Rn;
179
+ }
180
+ function Dn(e, t) {
181
+ const n = { ...t };
182
+ for (const r in t) {
183
+ const o = e[r], i = t[r];
184
+ /^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
185
+ const m = i(...c);
186
+ return o(...c), m;
187
+ } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
188
+ }
189
+ return { ...e, ...n };
190
+ }
191
+ function Pn(e) {
192
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
193
+ 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);
194
+ }
195
+ var Nn = [
196
+ "a",
197
+ "button",
198
+ "div",
199
+ "form",
200
+ "h2",
201
+ "h3",
202
+ "img",
203
+ "input",
204
+ "label",
205
+ "li",
206
+ "nav",
207
+ "ol",
208
+ "p",
209
+ "select",
210
+ "span",
211
+ "svg",
212
+ "ul"
213
+ ], U = Nn.reduce((e, t) => {
214
+ const n = /* @__PURE__ */ gt(`Primitive.${t}`), r = a.forwardRef((o, i) => {
215
+ const { asChild: u, ...c } = o, m = u ? n : t;
216
+ return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ E(m, { ...c, ref: i });
217
+ });
218
+ return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
219
+ }, {});
220
+ function On(e, t) {
221
+ e && Jt.flushSync(() => e.dispatchEvent(t));
222
+ }
223
+ function le(e) {
224
+ const t = a.useRef(e);
225
+ return a.useEffect(() => {
226
+ t.current = e;
227
+ }), a.useMemo(() => (...n) => t.current?.(...n), []);
228
+ }
229
+ function In(e, t = globalThis?.document) {
230
+ const n = le(e);
231
+ a.useEffect(() => {
232
+ const r = (o) => {
233
+ o.key === "Escape" && n(o);
234
+ };
235
+ return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
236
+ }, [n, t]);
237
+ }
238
+ var An = "DismissableLayer", $e = "dismissableLayer.update", xn = "dismissableLayer.pointerDownOutside", Mn = "dismissableLayer.focusOutside", tt, yt = a.createContext({
239
+ layers: /* @__PURE__ */ new Set(),
240
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
241
+ branches: /* @__PURE__ */ new Set()
242
+ }), Et = a.forwardRef(
243
+ (e, t) => {
244
+ const {
245
+ disableOutsidePointerEvents: n = !1,
246
+ onEscapeKeyDown: r,
247
+ onPointerDownOutside: o,
248
+ onFocusOutside: i,
249
+ onInteractOutside: u,
250
+ onDismiss: c,
251
+ ...m
252
+ } = e, s = a.useContext(yt), [d, f] = a.useState(null), p = d?.ownerDocument ?? globalThis?.document, [, h] = a.useState({}), _ = q(t, (b) => f(b)), v = Array.from(s.layers), [y] = [...s.layersWithOutsidePointerEventsDisabled].slice(-1), C = v.indexOf(y), D = d ? v.indexOf(d) : -1, I = s.layersWithOutsidePointerEventsDisabled.size > 0, P = D >= C, N = Ln((b) => {
253
+ const k = b.target, F = [...s.branches].some((W) => W.contains(k));
254
+ !P || F || (o?.(b), u?.(b), b.defaultPrevented || c?.());
255
+ }, p), S = Fn((b) => {
256
+ const k = b.target;
257
+ [...s.branches].some((W) => W.contains(k)) || (i?.(b), u?.(b), b.defaultPrevented || c?.());
258
+ }, p);
259
+ return In((b) => {
260
+ D === s.layers.size - 1 && (r?.(b), !b.defaultPrevented && c && (b.preventDefault(), c()));
261
+ }, p), a.useEffect(() => {
262
+ if (d)
263
+ return n && (s.layersWithOutsidePointerEventsDisabled.size === 0 && (tt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), s.layersWithOutsidePointerEventsDisabled.add(d)), s.layers.add(d), nt(), () => {
264
+ n && s.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = tt);
265
+ };
266
+ }, [d, p, n, s]), a.useEffect(() => () => {
267
+ d && (s.layers.delete(d), s.layersWithOutsidePointerEventsDisabled.delete(d), nt());
268
+ }, [d, s]), a.useEffect(() => {
269
+ const b = () => h({});
270
+ return document.addEventListener($e, b), () => document.removeEventListener($e, b);
271
+ }, []), /* @__PURE__ */ E(
272
+ U.div,
273
+ {
274
+ ...m,
275
+ ref: _,
276
+ style: {
277
+ pointerEvents: I ? P ? "auto" : "none" : void 0,
278
+ ...e.style
279
+ },
280
+ onFocusCapture: j(e.onFocusCapture, S.onFocusCapture),
281
+ onBlurCapture: j(e.onBlurCapture, S.onBlurCapture),
282
+ onPointerDownCapture: j(
283
+ e.onPointerDownCapture,
284
+ N.onPointerDownCapture
285
+ )
286
+ }
287
+ );
288
+ }
289
+ );
290
+ Et.displayName = An;
291
+ var kn = "DismissableLayerBranch", Tn = a.forwardRef((e, t) => {
292
+ const n = a.useContext(yt), r = a.useRef(null), o = q(t, r);
293
+ return a.useEffect(() => {
294
+ const i = r.current;
295
+ if (i)
296
+ return n.branches.add(i), () => {
297
+ n.branches.delete(i);
298
+ };
299
+ }, [n.branches]), /* @__PURE__ */ E(U.div, { ...e, ref: o });
300
+ });
301
+ Tn.displayName = kn;
302
+ function Ln(e, t = globalThis?.document) {
303
+ const n = le(e), r = a.useRef(!1), o = a.useRef(() => {
304
+ });
305
+ return a.useEffect(() => {
306
+ const i = (c) => {
307
+ if (c.target && !r.current) {
308
+ let m = function() {
309
+ bt(
310
+ xn,
311
+ n,
312
+ s,
313
+ { discrete: !0 }
314
+ );
315
+ };
316
+ const s = { originalEvent: c };
317
+ c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = m, t.addEventListener("click", o.current, { once: !0 })) : m();
318
+ } else
319
+ t.removeEventListener("click", o.current);
320
+ r.current = !1;
321
+ }, u = window.setTimeout(() => {
322
+ t.addEventListener("pointerdown", i);
323
+ }, 0);
324
+ return () => {
325
+ window.clearTimeout(u), t.removeEventListener("pointerdown", i), t.removeEventListener("click", o.current);
326
+ };
327
+ }, [t, n]), {
328
+ // ensures we check React component tree (not just DOM tree)
329
+ onPointerDownCapture: () => r.current = !0
330
+ };
331
+ }
332
+ function Fn(e, t = globalThis?.document) {
333
+ const n = le(e), r = a.useRef(!1);
334
+ return a.useEffect(() => {
335
+ const o = (i) => {
336
+ i.target && !r.current && bt(Mn, n, { originalEvent: i }, {
337
+ discrete: !1
338
+ });
339
+ };
340
+ return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
341
+ }, [t, n]), {
342
+ onFocusCapture: () => r.current = !0,
343
+ onBlurCapture: () => r.current = !1
344
+ };
345
+ }
346
+ function nt() {
347
+ const e = new CustomEvent($e);
348
+ document.dispatchEvent(e);
349
+ }
350
+ function bt(e, t, n, { discrete: r }) {
351
+ const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
352
+ t && o.addEventListener(e, t, { once: !0 }), r ? On(o, i) : o.dispatchEvent(i);
353
+ }
354
+ var Ie = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", rt = { bubbles: !1, cancelable: !0 }, Wn = "FocusScope", wt = a.forwardRef((e, t) => {
355
+ const {
356
+ loop: n = !1,
357
+ trapped: r = !1,
358
+ onMountAutoFocus: o,
359
+ onUnmountAutoFocus: i,
360
+ ...u
361
+ } = e, [c, m] = a.useState(null), s = le(o), d = le(i), f = a.useRef(null), p = q(t, (v) => m(v)), h = a.useRef({
362
+ paused: !1,
363
+ pause() {
364
+ this.paused = !0;
365
+ },
366
+ resume() {
367
+ this.paused = !1;
368
+ }
369
+ }).current;
370
+ a.useEffect(() => {
371
+ if (r) {
372
+ let v = function(I) {
373
+ if (h.paused || !c) return;
374
+ const P = I.target;
375
+ c.contains(P) ? f.current = P : K(f.current, { select: !0 });
376
+ }, y = function(I) {
377
+ if (h.paused || !c) return;
378
+ const P = I.relatedTarget;
379
+ P !== null && (c.contains(P) || K(f.current, { select: !0 }));
380
+ }, C = function(I) {
381
+ if (document.activeElement === document.body)
382
+ for (const N of I)
383
+ N.removedNodes.length > 0 && K(c);
384
+ };
385
+ document.addEventListener("focusin", v), document.addEventListener("focusout", y);
386
+ const D = new MutationObserver(C);
387
+ return c && D.observe(c, { childList: !0, subtree: !0 }), () => {
388
+ document.removeEventListener("focusin", v), document.removeEventListener("focusout", y), D.disconnect();
389
+ };
390
+ }
391
+ }, [r, c, h.paused]), a.useEffect(() => {
392
+ if (c) {
393
+ at.add(h);
394
+ const v = document.activeElement;
395
+ if (!c.contains(v)) {
396
+ const C = new CustomEvent(Ie, rt);
397
+ c.addEventListener(Ie, s), c.dispatchEvent(C), C.defaultPrevented || (Bn(jn(Ct(c)), { select: !0 }), document.activeElement === v && K(c));
398
+ }
399
+ return () => {
400
+ c.removeEventListener(Ie, s), setTimeout(() => {
401
+ const C = new CustomEvent(Ae, rt);
402
+ c.addEventListener(Ae, d), c.dispatchEvent(C), C.defaultPrevented || K(v ?? document.body, { select: !0 }), c.removeEventListener(Ae, d), at.remove(h);
403
+ }, 0);
404
+ };
405
+ }
406
+ }, [c, s, d, h]);
407
+ const _ = a.useCallback(
408
+ (v) => {
409
+ if (!n && !r || h.paused) return;
410
+ const y = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, C = document.activeElement;
411
+ if (y && C) {
412
+ const D = v.currentTarget, [I, P] = $n(D);
413
+ I && P ? !v.shiftKey && C === P ? (v.preventDefault(), n && K(I, { select: !0 })) : v.shiftKey && C === I && (v.preventDefault(), n && K(P, { select: !0 })) : C === D && v.preventDefault();
414
+ }
415
+ },
416
+ [n, r, h.paused]
417
+ );
418
+ return /* @__PURE__ */ E(U.div, { tabIndex: -1, ...u, ref: p, onKeyDown: _ });
419
+ });
420
+ wt.displayName = Wn;
421
+ function Bn(e, { select: t = !1 } = {}) {
422
+ const n = document.activeElement;
423
+ for (const r of e)
424
+ if (K(r, { select: t }), document.activeElement !== n) return;
425
+ }
426
+ function $n(e) {
427
+ const t = Ct(e), n = ot(t, e), r = ot(t.reverse(), e);
428
+ return [n, r];
429
+ }
430
+ function Ct(e) {
431
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
432
+ acceptNode: (r) => {
433
+ const o = r.tagName === "INPUT" && r.type === "hidden";
434
+ return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
435
+ }
436
+ });
437
+ for (; n.nextNode(); ) t.push(n.currentNode);
438
+ return t;
439
+ }
440
+ function ot(e, t) {
441
+ for (const n of e)
442
+ if (!Un(n, { upTo: t })) return n;
443
+ }
444
+ function Un(e, { upTo: t }) {
445
+ if (getComputedStyle(e).visibility === "hidden") return !0;
446
+ for (; e; ) {
447
+ if (t !== void 0 && e === t) return !1;
448
+ if (getComputedStyle(e).display === "none") return !0;
449
+ e = e.parentElement;
450
+ }
451
+ return !1;
452
+ }
453
+ function Vn(e) {
454
+ return e instanceof HTMLInputElement && "select" in e;
455
+ }
456
+ function K(e, { select: t = !1 } = {}) {
457
+ if (e && e.focus) {
458
+ const n = document.activeElement;
459
+ e.focus({ preventScroll: !0 }), e !== n && Vn(e) && t && e.select();
460
+ }
461
+ }
462
+ var at = Kn();
463
+ function Kn() {
464
+ let e = [];
465
+ return {
466
+ add(t) {
467
+ const n = e[0];
468
+ t !== n && n?.pause(), e = it(e, t), e.unshift(t);
469
+ },
470
+ remove(t) {
471
+ e = it(e, t), e[0]?.resume();
472
+ }
473
+ };
474
+ }
475
+ function it(e, t) {
476
+ const n = [...e], r = n.indexOf(t);
477
+ return r !== -1 && n.splice(r, 1), n;
478
+ }
479
+ function jn(e) {
480
+ return e.filter((t) => t.tagName !== "A");
481
+ }
482
+ var Hn = "Portal", St = a.forwardRef((e, t) => {
483
+ const { container: n, ...r } = e, [o, i] = a.useState(!1);
484
+ se(() => i(!0), []);
485
+ const u = n || o && globalThis?.document?.body;
486
+ return u ? en.createPortal(/* @__PURE__ */ E(U.div, { ...r, ref: t }), u) : null;
487
+ });
488
+ St.displayName = Hn;
489
+ function Gn(e, t) {
490
+ return a.useReducer((n, r) => t[n][r] ?? n, e);
491
+ }
492
+ var Ce = (e) => {
493
+ const { present: t, children: n } = e, r = zn(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = q(r.ref, Yn(o));
494
+ return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: i }) : null;
495
+ };
496
+ Ce.displayName = "Presence";
497
+ function zn(e) {
498
+ const [t, n] = a.useState(), r = a.useRef(null), o = a.useRef(e), i = a.useRef("none"), u = e ? "mounted" : "unmounted", [c, m] = Gn(u, {
499
+ mounted: {
500
+ UNMOUNT: "unmounted",
501
+ ANIMATION_OUT: "unmountSuspended"
502
+ },
503
+ unmountSuspended: {
504
+ MOUNT: "mounted",
505
+ ANIMATION_END: "unmounted"
506
+ },
507
+ unmounted: {
508
+ MOUNT: "mounted"
509
+ }
510
+ });
511
+ return a.useEffect(() => {
512
+ const s = me(r.current);
513
+ i.current = c === "mounted" ? s : "none";
514
+ }, [c]), se(() => {
515
+ const s = r.current, d = o.current;
516
+ if (d !== e) {
517
+ const p = i.current, h = me(s);
518
+ e ? m("MOUNT") : h === "none" || s?.display === "none" ? m("UNMOUNT") : m(d && p !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
519
+ }
520
+ }, [e, m]), se(() => {
521
+ if (t) {
522
+ let s;
523
+ const d = t.ownerDocument.defaultView ?? window, f = (h) => {
524
+ const v = me(r.current).includes(CSS.escape(h.animationName));
525
+ if (h.target === t && v && (m("ANIMATION_END"), !o.current)) {
526
+ const y = t.style.animationFillMode;
527
+ t.style.animationFillMode = "forwards", s = d.setTimeout(() => {
528
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = y);
529
+ });
530
+ }
531
+ }, p = (h) => {
532
+ h.target === t && (i.current = me(r.current));
533
+ };
534
+ return t.addEventListener("animationstart", p), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
535
+ d.clearTimeout(s), t.removeEventListener("animationstart", p), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
536
+ };
537
+ } else
538
+ m("ANIMATION_END");
539
+ }, [t, m]), {
540
+ isPresent: ["mounted", "unmountSuspended"].includes(c),
541
+ ref: a.useCallback((s) => {
542
+ r.current = s ? getComputedStyle(s) : null, n(s);
543
+ }, [])
544
+ };
545
+ }
546
+ function me(e) {
547
+ return e?.animationName || "none";
548
+ }
549
+ function Yn(e) {
550
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
551
+ 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);
552
+ }
553
+ var xe = 0;
554
+ function Xn() {
555
+ a.useEffect(() => {
556
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
557
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? ct()), document.body.insertAdjacentElement("beforeend", e[1] ?? ct()), xe++, () => {
558
+ xe === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), xe--;
559
+ };
560
+ }, []);
561
+ }
562
+ function ct() {
563
+ const e = document.createElement("span");
564
+ 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;
565
+ }
566
+ var L = function() {
567
+ return L = Object.assign || function(t) {
568
+ for (var n, r = 1, o = arguments.length; r < o; r++) {
569
+ n = arguments[r];
570
+ for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
571
+ }
572
+ return t;
573
+ }, L.apply(this, arguments);
574
+ };
575
+ function Rt(e, t) {
576
+ var n = {};
577
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
578
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
579
+ for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
580
+ t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
581
+ return n;
582
+ }
583
+ function qn(e, t, n) {
584
+ if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
585
+ (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
586
+ return e.concat(i || Array.prototype.slice.call(t));
587
+ }
588
+ var Ee = "right-scroll-bar-position", be = "width-before-scroll-bar", Zn = "with-scroll-bars-hidden", Qn = "--removed-body-scroll-bar-size";
589
+ function Me(e, t) {
590
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
591
+ }
592
+ function Jn(e, t) {
593
+ var n = Qt(function() {
594
+ return {
595
+ // value
596
+ value: e,
597
+ // last callback
598
+ callback: t,
599
+ // "memoized" public interface
600
+ facade: {
601
+ get current() {
602
+ return n.value;
603
+ },
604
+ set current(r) {
605
+ var o = n.value;
606
+ o !== r && (n.value = r, n.callback(r, o));
607
+ }
608
+ }
609
+ };
610
+ })[0];
611
+ return n.callback = t, n.facade;
612
+ }
613
+ var er = typeof window < "u" ? a.useLayoutEffect : a.useEffect, ut = /* @__PURE__ */ new WeakMap();
614
+ function tr(e, t) {
615
+ var n = Jn(null, function(r) {
616
+ return e.forEach(function(o) {
617
+ return Me(o, r);
618
+ });
619
+ });
620
+ return er(function() {
621
+ var r = ut.get(n);
622
+ if (r) {
623
+ var o = new Set(r), i = new Set(e), u = n.current;
624
+ o.forEach(function(c) {
625
+ i.has(c) || Me(c, null);
626
+ }), i.forEach(function(c) {
627
+ o.has(c) || Me(c, u);
628
+ });
629
+ }
630
+ ut.set(n, e);
631
+ }, [e]), n;
632
+ }
633
+ function nr(e) {
634
+ return e;
635
+ }
636
+ function rr(e, t) {
637
+ t === void 0 && (t = nr);
638
+ var n = [], r = !1, o = {
639
+ read: function() {
640
+ if (r)
641
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
642
+ return n.length ? n[n.length - 1] : e;
643
+ },
644
+ useMedium: function(i) {
645
+ var u = t(i, r);
646
+ return n.push(u), function() {
647
+ n = n.filter(function(c) {
648
+ return c !== u;
649
+ });
650
+ };
651
+ },
652
+ assignSyncMedium: function(i) {
653
+ for (r = !0; n.length; ) {
654
+ var u = n;
655
+ n = [], u.forEach(i);
656
+ }
657
+ n = {
658
+ push: function(c) {
659
+ return i(c);
660
+ },
661
+ filter: function() {
662
+ return n;
663
+ }
664
+ };
665
+ },
666
+ assignMedium: function(i) {
667
+ r = !0;
668
+ var u = [];
669
+ if (n.length) {
670
+ var c = n;
671
+ n = [], c.forEach(i), u = n;
672
+ }
673
+ var m = function() {
674
+ var d = u;
675
+ u = [], d.forEach(i);
676
+ }, s = function() {
677
+ return Promise.resolve().then(m);
678
+ };
679
+ s(), n = {
680
+ push: function(d) {
681
+ u.push(d), s();
682
+ },
683
+ filter: function(d) {
684
+ return u = u.filter(d), n;
685
+ }
686
+ };
687
+ }
688
+ };
689
+ return o;
690
+ }
691
+ function or(e) {
692
+ e === void 0 && (e = {});
693
+ var t = rr(null);
694
+ return t.options = L({ async: !0, ssr: !1 }, e), t;
695
+ }
696
+ var _t = function(e) {
697
+ var t = e.sideCar, n = Rt(e, ["sideCar"]);
698
+ if (!t)
699
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
700
+ var r = t.read();
701
+ if (!r)
702
+ throw new Error("Sidecar medium not found");
703
+ return a.createElement(r, L({}, n));
704
+ };
705
+ _t.isSideCarExport = !0;
706
+ function ar(e, t) {
707
+ return e.useMedium(t), _t;
708
+ }
709
+ var Dt = or(), ke = function() {
710
+ }, Se = a.forwardRef(function(e, t) {
711
+ var n = a.useRef(null), r = a.useState({
712
+ onScrollCapture: ke,
713
+ onWheelCapture: ke,
714
+ onTouchMoveCapture: ke
715
+ }), o = r[0], i = r[1], u = e.forwardProps, c = e.children, m = e.className, s = e.removeScrollBar, d = e.enabled, f = e.shards, p = e.sideCar, h = e.noRelative, _ = e.noIsolation, v = e.inert, y = e.allowPinchZoom, C = e.as, D = C === void 0 ? "div" : C, I = e.gapMode, P = Rt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), N = p, S = tr([n, t]), b = L(L({}, P), o);
716
+ return a.createElement(
717
+ a.Fragment,
718
+ null,
719
+ d && a.createElement(N, { sideCar: Dt, removeScrollBar: s, shards: f, noRelative: h, noIsolation: _, inert: v, setCallbacks: i, allowPinchZoom: !!y, lockRef: n, gapMode: I }),
720
+ u ? a.cloneElement(a.Children.only(c), L(L({}, b), { ref: S })) : a.createElement(D, L({}, b, { className: m, ref: S }), c)
721
+ );
722
+ });
723
+ Se.defaultProps = {
724
+ enabled: !0,
725
+ removeScrollBar: !0,
726
+ inert: !1
727
+ };
728
+ Se.classNames = {
729
+ fullWidth: be,
730
+ zeroRight: Ee
731
+ };
732
+ var ir = function() {
733
+ if (typeof __webpack_nonce__ < "u")
734
+ return __webpack_nonce__;
735
+ };
736
+ function cr() {
737
+ if (!document)
738
+ return null;
739
+ var e = document.createElement("style");
740
+ e.type = "text/css";
741
+ var t = ir();
742
+ return t && e.setAttribute("nonce", t), e;
743
+ }
744
+ function ur(e, t) {
745
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
746
+ }
747
+ function sr(e) {
748
+ var t = document.head || document.getElementsByTagName("head")[0];
749
+ t.appendChild(e);
750
+ }
751
+ var lr = function() {
752
+ var e = 0, t = null;
753
+ return {
754
+ add: function(n) {
755
+ e == 0 && (t = cr()) && (ur(t, n), sr(t)), e++;
756
+ },
757
+ remove: function() {
758
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
759
+ }
760
+ };
761
+ }, dr = function() {
762
+ var e = lr();
763
+ return function(t, n) {
764
+ a.useEffect(function() {
765
+ return e.add(t), function() {
766
+ e.remove();
767
+ };
768
+ }, [t && n]);
769
+ };
770
+ }, Pt = function() {
771
+ var e = dr(), t = function(n) {
772
+ var r = n.styles, o = n.dynamic;
773
+ return e(r, o), null;
774
+ };
775
+ return t;
776
+ }, fr = {
777
+ left: 0,
778
+ top: 0,
779
+ right: 0,
780
+ gap: 0
781
+ }, Te = function(e) {
782
+ return parseInt(e || "", 10) || 0;
783
+ }, mr = function(e) {
784
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
785
+ return [Te(n), Te(r), Te(o)];
786
+ }, vr = function(e) {
787
+ if (e === void 0 && (e = "margin"), typeof window > "u")
788
+ return fr;
789
+ var t = mr(e), n = document.documentElement.clientWidth, r = window.innerWidth;
790
+ return {
791
+ left: t[0],
792
+ top: t[1],
793
+ right: t[2],
794
+ gap: Math.max(0, r - n + t[2] - t[0])
795
+ };
796
+ }, pr = Pt(), ae = "data-scroll-locked", hr = function(e, t, n, r) {
797
+ var o = e.left, i = e.top, u = e.right, c = e.gap;
798
+ return n === void 0 && (n = "margin"), `
799
+ .`.concat(Zn, ` {
800
+ overflow: hidden `).concat(r, `;
801
+ padding-right: `).concat(c, "px ").concat(r, `;
802
+ }
803
+ body[`).concat(ae, `] {
804
+ overflow: hidden `).concat(r, `;
805
+ overscroll-behavior: contain;
806
+ `).concat([
807
+ t && "position: relative ".concat(r, ";"),
808
+ n === "margin" && `
809
+ padding-left: `.concat(o, `px;
810
+ padding-top: `).concat(i, `px;
811
+ padding-right: `).concat(u, `px;
812
+ margin-left:0;
813
+ margin-top:0;
814
+ margin-right: `).concat(c, "px ").concat(r, `;
815
+ `),
816
+ n === "padding" && "padding-right: ".concat(c, "px ").concat(r, ";")
817
+ ].filter(Boolean).join(""), `
818
+ }
819
+
820
+ .`).concat(Ee, ` {
821
+ right: `).concat(c, "px ").concat(r, `;
822
+ }
823
+
824
+ .`).concat(be, ` {
825
+ margin-right: `).concat(c, "px ").concat(r, `;
826
+ }
827
+
828
+ .`).concat(Ee, " .").concat(Ee, ` {
829
+ right: 0 `).concat(r, `;
830
+ }
831
+
832
+ .`).concat(be, " .").concat(be, ` {
833
+ margin-right: 0 `).concat(r, `;
834
+ }
835
+
836
+ body[`).concat(ae, `] {
837
+ `).concat(Qn, ": ").concat(c, `px;
838
+ }
839
+ `);
840
+ }, st = function() {
841
+ var e = parseInt(document.body.getAttribute(ae) || "0", 10);
842
+ return isFinite(e) ? e : 0;
843
+ }, gr = function() {
844
+ a.useEffect(function() {
845
+ return document.body.setAttribute(ae, (st() + 1).toString()), function() {
846
+ var e = st() - 1;
847
+ e <= 0 ? document.body.removeAttribute(ae) : document.body.setAttribute(ae, e.toString());
848
+ };
849
+ }, []);
850
+ }, yr = function(e) {
851
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
852
+ gr();
853
+ var i = a.useMemo(function() {
854
+ return vr(o);
855
+ }, [o]);
856
+ return a.createElement(pr, { styles: hr(i, !t, o, n ? "" : "!important") });
857
+ }, Ue = !1;
858
+ if (typeof window < "u")
859
+ try {
860
+ var ve = Object.defineProperty({}, "passive", {
861
+ get: function() {
862
+ return Ue = !0, !0;
863
+ }
864
+ });
865
+ window.addEventListener("test", ve, ve), window.removeEventListener("test", ve, ve);
866
+ } catch {
867
+ Ue = !1;
868
+ }
869
+ var J = Ue ? { passive: !1 } : !1, Er = function(e) {
870
+ return e.tagName === "TEXTAREA";
871
+ }, Nt = function(e, t) {
872
+ if (!(e instanceof Element))
873
+ return !1;
874
+ var n = window.getComputedStyle(e);
875
+ return (
876
+ // not-not-scrollable
877
+ n[t] !== "hidden" && // contains scroll inside self
878
+ !(n.overflowY === n.overflowX && !Er(e) && n[t] === "visible")
879
+ );
880
+ }, br = function(e) {
881
+ return Nt(e, "overflowY");
882
+ }, wr = function(e) {
883
+ return Nt(e, "overflowX");
884
+ }, lt = function(e, t) {
885
+ var n = t.ownerDocument, r = t;
886
+ do {
887
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
888
+ var o = Ot(e, r);
889
+ if (o) {
890
+ var i = It(e, r), u = i[1], c = i[2];
891
+ if (u > c)
892
+ return !0;
893
+ }
894
+ r = r.parentNode;
895
+ } while (r && r !== n.body);
896
+ return !1;
897
+ }, Cr = function(e) {
898
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
899
+ return [
900
+ t,
901
+ n,
902
+ r
903
+ ];
904
+ }, Sr = function(e) {
905
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
906
+ return [
907
+ t,
908
+ n,
909
+ r
910
+ ];
911
+ }, Ot = function(e, t) {
912
+ return e === "v" ? br(t) : wr(t);
913
+ }, It = function(e, t) {
914
+ return e === "v" ? Cr(t) : Sr(t);
915
+ }, Rr = function(e, t) {
916
+ return e === "h" && t === "rtl" ? -1 : 1;
917
+ }, _r = function(e, t, n, r, o) {
918
+ var i = Rr(e, window.getComputedStyle(t).direction), u = i * r, c = n.target, m = t.contains(c), s = !1, d = u > 0, f = 0, p = 0;
919
+ do {
920
+ if (!c)
921
+ break;
922
+ var h = It(e, c), _ = h[0], v = h[1], y = h[2], C = v - y - i * _;
923
+ (_ || C) && Ot(e, c) && (f += C, p += _);
924
+ var D = c.parentNode;
925
+ c = D && D.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? D.host : D;
926
+ } while (
927
+ // portaled content
928
+ !m && c !== document.body || // self content
929
+ m && (t.contains(c) || t === c)
930
+ );
931
+ return (d && Math.abs(f) < 1 || !d && Math.abs(p) < 1) && (s = !0), s;
932
+ }, pe = function(e) {
933
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
934
+ }, dt = function(e) {
935
+ return [e.deltaX, e.deltaY];
936
+ }, ft = function(e) {
937
+ return e && "current" in e ? e.current : e;
938
+ }, Dr = function(e, t) {
939
+ return e[0] === t[0] && e[1] === t[1];
940
+ }, Pr = function(e) {
941
+ return `
942
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
943
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
944
+ `);
945
+ }, Nr = 0, ee = [];
946
+ function Or(e) {
947
+ var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(Nr++)[0], i = a.useState(Pt)[0], u = a.useRef(e);
948
+ a.useEffect(function() {
949
+ u.current = e;
950
+ }, [e]), a.useEffect(function() {
951
+ if (e.inert) {
952
+ document.body.classList.add("block-interactivity-".concat(o));
953
+ var v = qn([e.lockRef.current], (e.shards || []).map(ft), !0).filter(Boolean);
954
+ return v.forEach(function(y) {
955
+ return y.classList.add("allow-interactivity-".concat(o));
956
+ }), function() {
957
+ document.body.classList.remove("block-interactivity-".concat(o)), v.forEach(function(y) {
958
+ return y.classList.remove("allow-interactivity-".concat(o));
959
+ });
960
+ };
961
+ }
962
+ }, [e.inert, e.lockRef.current, e.shards]);
963
+ var c = a.useCallback(function(v, y) {
964
+ if ("touches" in v && v.touches.length === 2 || v.type === "wheel" && v.ctrlKey)
965
+ return !u.current.allowPinchZoom;
966
+ var C = pe(v), D = n.current, I = "deltaX" in v ? v.deltaX : D[0] - C[0], P = "deltaY" in v ? v.deltaY : D[1] - C[1], N, S = v.target, b = Math.abs(I) > Math.abs(P) ? "h" : "v";
967
+ if ("touches" in v && b === "h" && S.type === "range")
968
+ return !1;
969
+ var k = window.getSelection(), F = k && k.anchorNode, W = F ? F === S || F.contains(S) : !1;
970
+ if (W)
971
+ return !1;
972
+ var V = lt(b, S);
973
+ if (!V)
974
+ return !0;
975
+ if (V ? N = b : (N = b === "v" ? "h" : "v", V = lt(b, S)), !V)
976
+ return !1;
977
+ if (!r.current && "changedTouches" in v && (I || P) && (r.current = N), !N)
978
+ return !0;
979
+ var Z = r.current || N;
980
+ return _r(Z, y, v, Z === "h" ? I : P);
981
+ }, []), m = a.useCallback(function(v) {
982
+ var y = v;
983
+ if (!(!ee.length || ee[ee.length - 1] !== i)) {
984
+ var C = "deltaY" in y ? dt(y) : pe(y), D = t.current.filter(function(N) {
985
+ return N.name === y.type && (N.target === y.target || y.target === N.shadowParent) && Dr(N.delta, C);
986
+ })[0];
987
+ if (D && D.should) {
988
+ y.cancelable && y.preventDefault();
989
+ return;
990
+ }
991
+ if (!D) {
992
+ var I = (u.current.shards || []).map(ft).filter(Boolean).filter(function(N) {
993
+ return N.contains(y.target);
994
+ }), P = I.length > 0 ? c(y, I[0]) : !u.current.noIsolation;
995
+ P && y.cancelable && y.preventDefault();
996
+ }
997
+ }
998
+ }, []), s = a.useCallback(function(v, y, C, D) {
999
+ var I = { name: v, delta: y, target: C, should: D, shadowParent: Ir(C) };
1000
+ t.current.push(I), setTimeout(function() {
1001
+ t.current = t.current.filter(function(P) {
1002
+ return P !== I;
1003
+ });
1004
+ }, 1);
1005
+ }, []), d = a.useCallback(function(v) {
1006
+ n.current = pe(v), r.current = void 0;
1007
+ }, []), f = a.useCallback(function(v) {
1008
+ s(v.type, dt(v), v.target, c(v, e.lockRef.current));
1009
+ }, []), p = a.useCallback(function(v) {
1010
+ s(v.type, pe(v), v.target, c(v, e.lockRef.current));
1011
+ }, []);
1012
+ a.useEffect(function() {
1013
+ return ee.push(i), e.setCallbacks({
1014
+ onScrollCapture: f,
1015
+ onWheelCapture: f,
1016
+ onTouchMoveCapture: p
1017
+ }), document.addEventListener("wheel", m, J), document.addEventListener("touchmove", m, J), document.addEventListener("touchstart", d, J), function() {
1018
+ ee = ee.filter(function(v) {
1019
+ return v !== i;
1020
+ }), document.removeEventListener("wheel", m, J), document.removeEventListener("touchmove", m, J), document.removeEventListener("touchstart", d, J);
1021
+ };
1022
+ }, []);
1023
+ var h = e.removeScrollBar, _ = e.inert;
1024
+ return a.createElement(
1025
+ a.Fragment,
1026
+ null,
1027
+ _ ? a.createElement(i, { styles: Pr(o) }) : null,
1028
+ h ? a.createElement(yr, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
1029
+ );
1030
+ }
1031
+ function Ir(e) {
1032
+ for (var t = null; e !== null; )
1033
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1034
+ return t;
1035
+ }
1036
+ const Ar = ar(Dt, Or);
1037
+ var At = a.forwardRef(function(e, t) {
1038
+ return a.createElement(Se, L({}, e, { ref: t, sideCar: Ar }));
1039
+ });
1040
+ At.classNames = Se.classNames;
1041
+ var xr = function(e) {
1042
+ if (typeof document > "u")
1043
+ return null;
1044
+ var t = Array.isArray(e) ? e[0] : e;
1045
+ return t.ownerDocument.body;
1046
+ }, te = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = {}, Le = 0, xt = function(e) {
1047
+ return e && (e.host || xt(e.parentNode));
1048
+ }, Mr = function(e, t) {
1049
+ return t.map(function(n) {
1050
+ if (e.contains(n))
1051
+ return n;
1052
+ var r = xt(n);
1053
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
1054
+ }).filter(function(n) {
1055
+ return !!n;
1056
+ });
1057
+ }, kr = function(e, t, n, r) {
1058
+ var o = Mr(t, Array.isArray(e) ? e : [e]);
1059
+ ge[n] || (ge[n] = /* @__PURE__ */ new WeakMap());
1060
+ var i = ge[n], u = [], c = /* @__PURE__ */ new Set(), m = new Set(o), s = function(f) {
1061
+ !f || c.has(f) || (c.add(f), s(f.parentNode));
1062
+ };
1063
+ o.forEach(s);
1064
+ var d = function(f) {
1065
+ !f || m.has(f) || Array.prototype.forEach.call(f.children, function(p) {
1066
+ if (c.has(p))
1067
+ d(p);
1068
+ else
1069
+ try {
1070
+ var h = p.getAttribute(r), _ = h !== null && h !== "false", v = (te.get(p) || 0) + 1, y = (i.get(p) || 0) + 1;
1071
+ te.set(p, v), i.set(p, y), u.push(p), v === 1 && _ && he.set(p, !0), y === 1 && p.setAttribute(n, "true"), _ || p.setAttribute(r, "true");
1072
+ } catch (C) {
1073
+ console.error("aria-hidden: cannot operate on ", p, C);
1074
+ }
1075
+ });
1076
+ };
1077
+ return d(t), c.clear(), Le++, function() {
1078
+ u.forEach(function(f) {
1079
+ var p = te.get(f) - 1, h = i.get(f) - 1;
1080
+ te.set(f, p), i.set(f, h), p || (he.has(f) || f.removeAttribute(r), he.delete(f)), h || f.removeAttribute(n);
1081
+ }), Le--, Le || (te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = {});
1082
+ };
1083
+ }, Tr = function(e, t, n) {
1084
+ n === void 0 && (n = "data-aria-hidden");
1085
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = xr(e);
1086
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), kr(r, o, n, "aria-hidden")) : function() {
1087
+ return null;
1088
+ };
1089
+ }, Re = "Dialog", [Mt] = pn(Re), [Lr, T] = Mt(Re), kt = (e) => {
1090
+ const {
1091
+ __scopeDialog: t,
1092
+ children: n,
1093
+ open: r,
1094
+ defaultOpen: o,
1095
+ onOpenChange: i,
1096
+ modal: u = !0
1097
+ } = e, c = a.useRef(null), m = a.useRef(null), [s, d] = bn({
1098
+ prop: r,
1099
+ defaultProp: o ?? !1,
1100
+ onChange: i,
1101
+ caller: Re
1102
+ });
1103
+ return /* @__PURE__ */ E(
1104
+ Lr,
1105
+ {
1106
+ scope: t,
1107
+ triggerRef: c,
1108
+ contentRef: m,
1109
+ contentId: $(),
1110
+ titleId: $(),
1111
+ descriptionId: $(),
1112
+ open: s,
1113
+ onOpenChange: d,
1114
+ onOpenToggle: a.useCallback(() => d((f) => !f), [d]),
1115
+ modal: u,
1116
+ children: n
1117
+ }
1118
+ );
1119
+ };
1120
+ kt.displayName = Re;
1121
+ var Tt = "DialogTrigger", Fr = a.forwardRef(
1122
+ (e, t) => {
1123
+ const { __scopeDialog: n, ...r } = e, o = T(Tt, n), i = q(t, o.triggerRef);
1124
+ return /* @__PURE__ */ E(
1125
+ U.button,
1126
+ {
1127
+ type: "button",
1128
+ "aria-haspopup": "dialog",
1129
+ "aria-expanded": o.open,
1130
+ "aria-controls": o.contentId,
1131
+ "data-state": He(o.open),
1132
+ ...r,
1133
+ ref: i,
1134
+ onClick: j(e.onClick, o.onOpenToggle)
1135
+ }
1136
+ );
1137
+ }
1138
+ );
1139
+ Fr.displayName = Tt;
1140
+ var Ke = "DialogPortal", [Wr, Lt] = Mt(Ke, {
1141
+ forceMount: void 0
1142
+ }), Ft = (e) => {
1143
+ const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, i = T(Ke, t);
1144
+ return /* @__PURE__ */ E(Wr, { scope: t, forceMount: n, children: a.Children.map(r, (u) => /* @__PURE__ */ E(Ce, { present: n || i.open, children: /* @__PURE__ */ E(St, { asChild: !0, container: o, children: u }) })) });
1145
+ };
1146
+ Ft.displayName = Ke;
1147
+ var we = "DialogOverlay", Wt = a.forwardRef(
1148
+ (e, t) => {
1149
+ const n = Lt(we, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, i = T(we, e.__scopeDialog);
1150
+ return i.modal ? /* @__PURE__ */ E(Ce, { present: r || i.open, children: /* @__PURE__ */ E($r, { ...o, ref: t }) }) : null;
1151
+ }
1152
+ );
1153
+ Wt.displayName = we;
1154
+ var Br = /* @__PURE__ */ gt("DialogOverlay.RemoveScroll"), $r = a.forwardRef(
1155
+ (e, t) => {
1156
+ const { __scopeDialog: n, ...r } = e, o = T(we, n);
1157
+ return (
1158
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1159
+ // ie. when `Overlay` and `Content` are siblings
1160
+ /* @__PURE__ */ E(At, { as: Br, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ E(
1161
+ U.div,
1162
+ {
1163
+ "data-state": He(o.open),
1164
+ ...r,
1165
+ ref: t,
1166
+ style: { pointerEvents: "auto", ...r.style }
1167
+ }
1168
+ ) })
1169
+ );
1170
+ }
1171
+ ), Y = "DialogContent", Bt = a.forwardRef(
1172
+ (e, t) => {
1173
+ const n = Lt(Y, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, i = T(Y, e.__scopeDialog);
1174
+ return /* @__PURE__ */ E(Ce, { present: r || i.open, children: i.modal ? /* @__PURE__ */ E(Ur, { ...o, ref: t }) : /* @__PURE__ */ E(Vr, { ...o, ref: t }) });
1175
+ }
1176
+ );
1177
+ Bt.displayName = Y;
1178
+ var Ur = a.forwardRef(
1179
+ (e, t) => {
1180
+ const n = T(Y, e.__scopeDialog), r = a.useRef(null), o = q(t, n.contentRef, r);
1181
+ return a.useEffect(() => {
1182
+ const i = r.current;
1183
+ if (i) return Tr(i);
1184
+ }, []), /* @__PURE__ */ E(
1185
+ $t,
1186
+ {
1187
+ ...e,
1188
+ ref: o,
1189
+ trapFocus: n.open,
1190
+ disableOutsidePointerEvents: !0,
1191
+ onCloseAutoFocus: j(e.onCloseAutoFocus, (i) => {
1192
+ i.preventDefault(), n.triggerRef.current?.focus();
1193
+ }),
1194
+ onPointerDownOutside: j(e.onPointerDownOutside, (i) => {
1195
+ const u = i.detail.originalEvent, c = u.button === 0 && u.ctrlKey === !0;
1196
+ (u.button === 2 || c) && i.preventDefault();
1197
+ }),
1198
+ onFocusOutside: j(
1199
+ e.onFocusOutside,
1200
+ (i) => i.preventDefault()
1201
+ )
1202
+ }
1203
+ );
1204
+ }
1205
+ ), Vr = a.forwardRef(
1206
+ (e, t) => {
1207
+ const n = T(Y, e.__scopeDialog), r = a.useRef(!1), o = a.useRef(!1);
1208
+ return /* @__PURE__ */ E(
1209
+ $t,
1210
+ {
1211
+ ...e,
1212
+ ref: t,
1213
+ trapFocus: !1,
1214
+ disableOutsidePointerEvents: !1,
1215
+ onCloseAutoFocus: (i) => {
1216
+ e.onCloseAutoFocus?.(i), i.defaultPrevented || (r.current || n.triggerRef.current?.focus(), i.preventDefault()), r.current = !1, o.current = !1;
1217
+ },
1218
+ onInteractOutside: (i) => {
1219
+ e.onInteractOutside?.(i), i.defaultPrevented || (r.current = !0, i.detail.originalEvent.type === "pointerdown" && (o.current = !0));
1220
+ const u = i.target;
1221
+ n.triggerRef.current?.contains(u) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && o.current && i.preventDefault();
1222
+ }
1223
+ }
1224
+ );
1225
+ }
1226
+ ), $t = a.forwardRef(
1227
+ (e, t) => {
1228
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...u } = e, c = T(Y, n), m = a.useRef(null), s = q(t, m);
1229
+ return Xn(), /* @__PURE__ */ oe(Qe, { children: [
1230
+ /* @__PURE__ */ E(
1231
+ wt,
1232
+ {
1233
+ asChild: !0,
1234
+ loop: !0,
1235
+ trapped: r,
1236
+ onMountAutoFocus: o,
1237
+ onUnmountAutoFocus: i,
1238
+ children: /* @__PURE__ */ E(
1239
+ Et,
1240
+ {
1241
+ role: "dialog",
1242
+ id: c.contentId,
1243
+ "aria-describedby": c.descriptionId,
1244
+ "aria-labelledby": c.titleId,
1245
+ "data-state": He(c.open),
1246
+ ...u,
1247
+ ref: s,
1248
+ onDismiss: () => c.onOpenChange(!1)
1249
+ }
1250
+ )
1251
+ }
1252
+ ),
1253
+ /* @__PURE__ */ oe(Qe, { children: [
1254
+ /* @__PURE__ */ E(Gr, { titleId: c.titleId }),
1255
+ /* @__PURE__ */ E(Yr, { contentRef: m, descriptionId: c.descriptionId })
1256
+ ] })
1257
+ ] });
1258
+ }
1259
+ ), je = "DialogTitle", Kr = a.forwardRef(
1260
+ (e, t) => {
1261
+ const { __scopeDialog: n, ...r } = e, o = T(je, n);
1262
+ return /* @__PURE__ */ E(U.h2, { id: o.titleId, ...r, ref: t });
1263
+ }
1264
+ );
1265
+ Kr.displayName = je;
1266
+ var Ut = "DialogDescription", jr = a.forwardRef(
1267
+ (e, t) => {
1268
+ const { __scopeDialog: n, ...r } = e, o = T(Ut, n);
1269
+ return /* @__PURE__ */ E(U.p, { id: o.descriptionId, ...r, ref: t });
1270
+ }
1271
+ );
1272
+ jr.displayName = Ut;
1273
+ var Vt = "DialogClose", Hr = a.forwardRef(
1274
+ (e, t) => {
1275
+ const { __scopeDialog: n, ...r } = e, o = T(Vt, n);
1276
+ return /* @__PURE__ */ E(
1277
+ U.button,
1278
+ {
1279
+ type: "button",
1280
+ ...r,
1281
+ ref: t,
1282
+ onClick: j(e.onClick, () => o.onOpenChange(!1))
1283
+ }
1284
+ );
1285
+ }
1286
+ );
1287
+ Hr.displayName = Vt;
1288
+ function He(e) {
1289
+ return e ? "open" : "closed";
1290
+ }
1291
+ var Kt = "DialogTitleWarning", [Mo, jt] = vn(Kt, {
1292
+ contentName: Y,
1293
+ titleName: je,
1294
+ docsSlug: "dialog"
1295
+ }), Gr = ({ titleId: e }) => {
1296
+ const t = jt(Kt), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1297
+
1298
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
1299
+
1300
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
1301
+ return a.useEffect(() => {
1302
+ e && (document.getElementById(e) || console.error(n));
1303
+ }, [n, e]), null;
1304
+ }, zr = "DialogDescriptionWarning", Yr = ({ contentRef: e, descriptionId: t }) => {
1305
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${jt(zr).contentName}}.`;
1306
+ return a.useEffect(() => {
1307
+ const o = e.current?.getAttribute("aria-describedby");
1308
+ t && o && (document.getElementById(t) || console.warn(r));
1309
+ }, [r, e, t]), null;
1310
+ }, Xr = kt, qr = Ft, Zr = Wt, Qr = Bt, ue = '[cmdk-group=""]', Fe = '[cmdk-group-items=""]', Jr = '[cmdk-group-heading=""]', Ht = '[cmdk-item=""]', mt = `${Ht}:not([aria-disabled="true"])`, Ve = "cmdk-item-select", ne = "data-value", eo = (e, t, n) => mn(e, t, n), Gt = a.createContext(void 0), de = () => a.useContext(Gt), zt = a.createContext(void 0), Ge = () => a.useContext(zt), Yt = a.createContext(void 0), Xt = a.forwardRef((e, t) => {
1311
+ let n = re(() => {
1312
+ var l, w;
1313
+ return { search: "", value: (w = (l = e.value) != null ? l : e.defaultValue) != null ? w : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
1314
+ }), r = re(() => /* @__PURE__ */ new Set()), o = re(() => /* @__PURE__ */ new Map()), i = re(() => /* @__PURE__ */ new Map()), u = re(() => /* @__PURE__ */ new Set()), c = qt(e), { label: m, children: s, value: d, onValueChange: f, filter: p, shouldFilter: h, loop: _, disablePointerSelection: v = !1, vimBindings: y = !0, ...C } = e, D = $(), I = $(), P = $(), N = a.useRef(null), S = fo();
1315
+ X(() => {
1316
+ if (d !== void 0) {
1317
+ let l = d.trim();
1318
+ n.current.value = l, b.emit();
1319
+ }
1320
+ }, [d]), X(() => {
1321
+ S(6, ze);
1322
+ }, []);
1323
+ let b = a.useMemo(() => ({ subscribe: (l) => (u.current.add(l), () => u.current.delete(l)), snapshot: () => n.current, setState: (l, w, R) => {
1324
+ var g, O, A, M;
1325
+ if (!Object.is(n.current[l], w)) {
1326
+ if (n.current[l] = w, l === "search") Z(), W(), S(1, V);
1327
+ else if (l === "value") {
1328
+ if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
1329
+ let x = document.getElementById(P);
1330
+ x ? x.focus() : (g = document.getElementById(D)) == null || g.focus();
1331
+ }
1332
+ if (S(7, () => {
1333
+ var x;
1334
+ n.current.selectedItemId = (x = Q()) == null ? void 0 : x.id, b.emit();
1335
+ }), R || S(5, ze), ((O = c.current) == null ? void 0 : O.value) !== void 0) {
1336
+ let x = w ?? "";
1337
+ (M = (A = c.current).onValueChange) == null || M.call(A, x);
1338
+ return;
1339
+ }
1340
+ }
1341
+ b.emit();
1342
+ }
1343
+ }, emit: () => {
1344
+ u.current.forEach((l) => l());
1345
+ } }), []), k = a.useMemo(() => ({ value: (l, w, R) => {
1346
+ var g;
1347
+ w !== ((g = i.current.get(l)) == null ? void 0 : g.value) && (i.current.set(l, { value: w, keywords: R }), n.current.filtered.items.set(l, F(w, R)), S(2, () => {
1348
+ W(), b.emit();
1349
+ }));
1350
+ }, item: (l, w) => (r.current.add(l), w && (o.current.has(w) ? o.current.get(w).add(l) : o.current.set(w, /* @__PURE__ */ new Set([l]))), S(3, () => {
1351
+ Z(), W(), n.current.value || V(), b.emit();
1352
+ }), () => {
1353
+ i.current.delete(l), r.current.delete(l), n.current.filtered.items.delete(l);
1354
+ let R = Q();
1355
+ S(4, () => {
1356
+ Z(), R?.getAttribute("id") === l && V(), b.emit();
1357
+ });
1358
+ }), group: (l) => (o.current.has(l) || o.current.set(l, /* @__PURE__ */ new Set()), () => {
1359
+ i.current.delete(l), o.current.delete(l);
1360
+ }), filter: () => c.current.shouldFilter, label: m || e["aria-label"], getDisablePointerSelection: () => c.current.disablePointerSelection, listId: D, inputId: P, labelId: I, listInnerRef: N }), []);
1361
+ function F(l, w) {
1362
+ var R, g;
1363
+ let O = (g = (R = c.current) == null ? void 0 : R.filter) != null ? g : eo;
1364
+ return l ? O(l, n.current.search, w) : 0;
1365
+ }
1366
+ function W() {
1367
+ if (!n.current.search || c.current.shouldFilter === !1) return;
1368
+ let l = n.current.filtered.items, w = [];
1369
+ n.current.filtered.groups.forEach((g) => {
1370
+ let O = o.current.get(g), A = 0;
1371
+ O.forEach((M) => {
1372
+ let x = l.get(M);
1373
+ A = Math.max(x, A);
1374
+ }), w.push([g, A]);
1375
+ });
1376
+ let R = N.current;
1377
+ ce().sort((g, O) => {
1378
+ var A, M;
1379
+ let x = g.getAttribute("id"), fe = O.getAttribute("id");
1380
+ return ((A = l.get(fe)) != null ? A : 0) - ((M = l.get(x)) != null ? M : 0);
1381
+ }).forEach((g) => {
1382
+ let O = g.closest(Fe);
1383
+ O ? O.appendChild(g.parentElement === O ? g : g.closest(`${Fe} > *`)) : R.appendChild(g.parentElement === R ? g : g.closest(`${Fe} > *`));
1384
+ }), w.sort((g, O) => O[1] - g[1]).forEach((g) => {
1385
+ var O;
1386
+ let A = (O = N.current) == null ? void 0 : O.querySelector(`${ue}[${ne}="${encodeURIComponent(g[0])}"]`);
1387
+ A?.parentElement.appendChild(A);
1388
+ });
1389
+ }
1390
+ function V() {
1391
+ let l = ce().find((R) => R.getAttribute("aria-disabled") !== "true"), w = l?.getAttribute(ne);
1392
+ b.setState("value", w || void 0);
1393
+ }
1394
+ function Z() {
1395
+ var l, w, R, g;
1396
+ if (!n.current.search || c.current.shouldFilter === !1) {
1397
+ n.current.filtered.count = r.current.size;
1398
+ return;
1399
+ }
1400
+ n.current.filtered.groups = /* @__PURE__ */ new Set();
1401
+ let O = 0;
1402
+ for (let A of r.current) {
1403
+ let M = (w = (l = i.current.get(A)) == null ? void 0 : l.value) != null ? w : "", x = (g = (R = i.current.get(A)) == null ? void 0 : R.keywords) != null ? g : [], fe = F(M, x);
1404
+ n.current.filtered.items.set(A, fe), fe > 0 && O++;
1405
+ }
1406
+ for (let [A, M] of o.current) for (let x of M) if (n.current.filtered.items.get(x) > 0) {
1407
+ n.current.filtered.groups.add(A);
1408
+ break;
1409
+ }
1410
+ n.current.filtered.count = O;
1411
+ }
1412
+ function ze() {
1413
+ var l, w, R;
1414
+ let g = Q();
1415
+ g && (((l = g.parentElement) == null ? void 0 : l.firstChild) === g && ((R = (w = g.closest(ue)) == null ? void 0 : w.querySelector(Jr)) == null || R.scrollIntoView({ block: "nearest" })), g.scrollIntoView({ block: "nearest" }));
1416
+ }
1417
+ function Q() {
1418
+ var l;
1419
+ return (l = N.current) == null ? void 0 : l.querySelector(`${Ht}[aria-selected="true"]`);
1420
+ }
1421
+ function ce() {
1422
+ var l;
1423
+ return Array.from(((l = N.current) == null ? void 0 : l.querySelectorAll(mt)) || []);
1424
+ }
1425
+ function De(l) {
1426
+ let w = ce()[l];
1427
+ w && b.setState("value", w.getAttribute(ne));
1428
+ }
1429
+ function Pe(l) {
1430
+ var w;
1431
+ let R = Q(), g = ce(), O = g.findIndex((M) => M === R), A = g[O + l];
1432
+ (w = c.current) != null && w.loop && (A = O + l < 0 ? g[g.length - 1] : O + l === g.length ? g[0] : g[O + l]), A && b.setState("value", A.getAttribute(ne));
1433
+ }
1434
+ function Ye(l) {
1435
+ let w = Q(), R = w?.closest(ue), g;
1436
+ for (; R && !g; ) R = l > 0 ? so(R, ue) : lo(R, ue), g = R?.querySelector(mt);
1437
+ g ? b.setState("value", g.getAttribute(ne)) : Pe(l);
1438
+ }
1439
+ let Xe = () => De(ce().length - 1), qe = (l) => {
1440
+ l.preventDefault(), l.metaKey ? Xe() : l.altKey ? Ye(1) : Pe(1);
1441
+ }, Ze = (l) => {
1442
+ l.preventDefault(), l.metaKey ? De(0) : l.altKey ? Ye(-1) : Pe(-1);
1443
+ };
1444
+ return a.createElement(G.div, { ref: t, tabIndex: -1, ...C, "cmdk-root": "", onKeyDown: (l) => {
1445
+ var w;
1446
+ (w = C.onKeyDown) == null || w.call(C, l);
1447
+ let R = l.nativeEvent.isComposing || l.keyCode === 229;
1448
+ if (!(l.defaultPrevented || R)) switch (l.key) {
1449
+ case "n":
1450
+ case "j": {
1451
+ y && l.ctrlKey && qe(l);
1452
+ break;
1453
+ }
1454
+ case "ArrowDown": {
1455
+ qe(l);
1456
+ break;
1457
+ }
1458
+ case "p":
1459
+ case "k": {
1460
+ y && l.ctrlKey && Ze(l);
1461
+ break;
1462
+ }
1463
+ case "ArrowUp": {
1464
+ Ze(l);
1465
+ break;
1466
+ }
1467
+ case "Home": {
1468
+ l.preventDefault(), De(0);
1469
+ break;
1470
+ }
1471
+ case "End": {
1472
+ l.preventDefault(), Xe();
1473
+ break;
1474
+ }
1475
+ case "Enter": {
1476
+ l.preventDefault();
1477
+ let g = Q();
1478
+ if (g) {
1479
+ let O = new Event(Ve);
1480
+ g.dispatchEvent(O);
1481
+ }
1482
+ }
1483
+ }
1484
+ } }, a.createElement("label", { "cmdk-label": "", htmlFor: k.inputId, id: k.labelId, style: vo }, m), _e(e, (l) => a.createElement(zt.Provider, { value: b }, a.createElement(Gt.Provider, { value: k }, l))));
1485
+ }), to = a.forwardRef((e, t) => {
1486
+ var n, r;
1487
+ let o = $(), i = a.useRef(null), u = a.useContext(Yt), c = de(), m = qt(e), s = (r = (n = m.current) == null ? void 0 : n.forceMount) != null ? r : u?.forceMount;
1488
+ X(() => {
1489
+ if (!s) return c.item(o, u?.id);
1490
+ }, [s]);
1491
+ let d = Zt(o, i, [e.value, e.children, i], e.keywords), f = Ge(), p = H((S) => S.value && S.value === d.current), h = H((S) => s || c.filter() === !1 ? !0 : S.search ? S.filtered.items.get(o) > 0 : !0);
1492
+ a.useEffect(() => {
1493
+ let S = i.current;
1494
+ if (!(!S || e.disabled)) return S.addEventListener(Ve, _), () => S.removeEventListener(Ve, _);
1495
+ }, [h, e.onSelect, e.disabled]);
1496
+ function _() {
1497
+ var S, b;
1498
+ v(), (b = (S = m.current).onSelect) == null || b.call(S, d.current);
1499
+ }
1500
+ function v() {
1501
+ f.setState("value", d.current, !0);
1502
+ }
1503
+ if (!h) return null;
1504
+ let { disabled: y, value: C, onSelect: D, forceMount: I, keywords: P, ...N } = e;
1505
+ return a.createElement(G.div, { ref: ie(i, t), ...N, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!y, "aria-selected": !!p, "data-disabled": y ? !0 : void 0, "data-selected": y ? !0 : void 0, onPointerMove: y || c.getDisablePointerSelection() ? void 0 : v, onClick: y ? void 0 : _ }, e.children);
1506
+ }), no = a.forwardRef((e, t) => {
1507
+ let { heading: n, children: r, forceMount: o, ...i } = e, u = $(), c = a.useRef(null), m = a.useRef(null), s = $(), d = de(), f = H((h) => o || d.filter() === !1 ? !0 : h.search ? h.filtered.groups.has(u) : !0);
1508
+ X(() => d.group(u), []), Zt(u, c, [e.value, e.heading, m]);
1509
+ let p = a.useMemo(() => ({ id: u, forceMount: o }), [o]);
1510
+ return a.createElement(G.div, { ref: ie(c, t), ...i, "cmdk-group": "", role: "presentation", hidden: f ? void 0 : !0 }, n && a.createElement("div", { ref: m, "cmdk-group-heading": "", "aria-hidden": !0, id: s }, n), _e(e, (h) => a.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? s : void 0 }, a.createElement(Yt.Provider, { value: p }, h))));
1511
+ }), ro = a.forwardRef((e, t) => {
1512
+ let { alwaysRender: n, ...r } = e, o = a.useRef(null), i = H((u) => !u.search);
1513
+ return !n && !i ? null : a.createElement(G.div, { ref: ie(o, t), ...r, "cmdk-separator": "", role: "separator" });
1514
+ }), oo = a.forwardRef((e, t) => {
1515
+ let { onValueChange: n, ...r } = e, o = e.value != null, i = Ge(), u = H((s) => s.search), c = H((s) => s.selectedItemId), m = de();
1516
+ return a.useEffect(() => {
1517
+ e.value != null && i.setState("search", e.value);
1518
+ }, [e.value]), a.createElement(G.input, { ref: t, ...r, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": m.listId, "aria-labelledby": m.labelId, "aria-activedescendant": c, id: m.inputId, type: "text", value: o ? e.value : u, onChange: (s) => {
1519
+ o || i.setState("search", s.target.value), n?.(s.target.value);
1520
+ } });
1521
+ }), ao = a.forwardRef((e, t) => {
1522
+ let { children: n, label: r = "Suggestions", ...o } = e, i = a.useRef(null), u = a.useRef(null), c = H((s) => s.selectedItemId), m = de();
1523
+ return a.useEffect(() => {
1524
+ if (u.current && i.current) {
1525
+ let s = u.current, d = i.current, f, p = new ResizeObserver(() => {
1526
+ f = requestAnimationFrame(() => {
1527
+ let h = s.offsetHeight;
1528
+ d.style.setProperty("--cmdk-list-height", h.toFixed(1) + "px");
1529
+ });
1530
+ });
1531
+ return p.observe(s), () => {
1532
+ cancelAnimationFrame(f), p.unobserve(s);
1533
+ };
1534
+ }
1535
+ }, []), a.createElement(G.div, { ref: ie(i, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": c, "aria-label": r, id: m.listId }, _e(e, (s) => a.createElement("div", { ref: ie(u, m.listInnerRef), "cmdk-list-sizer": "" }, s)));
1536
+ }), io = a.forwardRef((e, t) => {
1537
+ let { open: n, onOpenChange: r, overlayClassName: o, contentClassName: i, container: u, ...c } = e;
1538
+ return a.createElement(Xr, { open: n, onOpenChange: r }, a.createElement(qr, { container: u }, a.createElement(Zr, { "cmdk-overlay": "", className: o }), a.createElement(Qr, { "aria-label": e.label, "cmdk-dialog": "", className: i }, a.createElement(Xt, { ref: t, ...c }))));
1539
+ }), co = a.forwardRef((e, t) => H((n) => n.filtered.count === 0) ? a.createElement(G.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), uo = a.forwardRef((e, t) => {
1540
+ let { progress: n, children: r, label: o = "Loading...", ...i } = e;
1541
+ return a.createElement(G.div, { ref: t, ...i, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": o }, _e(e, (u) => a.createElement("div", { "aria-hidden": !0 }, u)));
1542
+ }), z = Object.assign(Xt, { List: ao, Item: to, Input: oo, Group: no, Separator: ro, Dialog: io, Empty: co, Loading: uo });
1543
+ function so(e, t) {
1544
+ let n = e.nextElementSibling;
1545
+ for (; n; ) {
1546
+ if (n.matches(t)) return n;
1547
+ n = n.nextElementSibling;
1548
+ }
1549
+ }
1550
+ function lo(e, t) {
1551
+ let n = e.previousElementSibling;
1552
+ for (; n; ) {
1553
+ if (n.matches(t)) return n;
1554
+ n = n.previousElementSibling;
1555
+ }
1556
+ }
1557
+ function qt(e) {
1558
+ let t = a.useRef(e);
1559
+ return X(() => {
1560
+ t.current = e;
1561
+ }), t;
1562
+ }
1563
+ var X = typeof window > "u" ? a.useEffect : a.useLayoutEffect;
1564
+ function re(e) {
1565
+ let t = a.useRef();
1566
+ return t.current === void 0 && (t.current = e()), t;
1567
+ }
1568
+ function H(e) {
1569
+ let t = Ge(), n = () => e(t.snapshot());
1570
+ return a.useSyncExternalStore(t.subscribe, n, n);
1571
+ }
1572
+ function Zt(e, t, n, r = []) {
1573
+ let o = a.useRef(), i = de();
1574
+ return X(() => {
1575
+ var u;
1576
+ let c = (() => {
1577
+ var s;
1578
+ for (let d of n) {
1579
+ if (typeof d == "string") return d.trim();
1580
+ if (typeof d == "object" && "current" in d) return d.current ? (s = d.current.textContent) == null ? void 0 : s.trim() : o.current;
1581
+ }
1582
+ })(), m = r.map((s) => s.trim());
1583
+ i.value(e, c, m), (u = t.current) == null || u.setAttribute(ne, c), o.current = c;
1584
+ }), o;
1585
+ }
1586
+ var fo = () => {
1587
+ let [e, t] = a.useState(), n = re(() => /* @__PURE__ */ new Map());
1588
+ return X(() => {
1589
+ n.current.forEach((r) => r()), n.current = /* @__PURE__ */ new Map();
1590
+ }, [e]), (r, o) => {
1591
+ n.current.set(r, o), t({});
1592
+ };
1593
+ };
1594
+ function mo(e) {
1595
+ let t = e.type;
1596
+ return typeof t == "function" ? t(e.props) : "render" in t ? t.render(e.props) : e;
1597
+ }
1598
+ function _e({ asChild: e, children: t }, n) {
1599
+ return e && a.isValidElement(t) ? a.cloneElement(mo(t), { ref: t.ref }, n(t.props.children)) : n(t);
1600
+ }
1601
+ var vo = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
1602
+ const po = "_command_v9d1p_1", ho = "_command__empty_v9d1p_14", go = "_command__input_v9d1p_20", yo = "_command__list_v9d1p_51", Eo = "_command__group_v9d1p_61", bo = "_command__item_v9d1p_74", wo = "_command__shortcut_v9d1p_87", B = {
1603
+ command: po,
1604
+ command__empty: ho,
1605
+ "command__input-root": "_command__input-root_v9d1p_20",
1606
+ command__input: go,
1607
+ "command__input-icon": "_command__input-icon_v9d1p_45",
1608
+ command__list: yo,
1609
+ command__group: Eo,
1610
+ command__item: bo,
1611
+ command__shortcut: wo
1612
+ };
1613
+ function ko({
1614
+ placeholder: e,
1615
+ children: t,
1616
+ ...n
1617
+ }) {
1618
+ return /* @__PURE__ */ E(
1619
+ nn,
1620
+ {
1621
+ width: "sm",
1622
+ background: "default",
1623
+ className: B.command,
1624
+ ...n,
1625
+ closable: !0,
1626
+ children: /* @__PURE__ */ oe(z, { children: [
1627
+ /* @__PURE__ */ oe(ye, { className: B["command__input-root"], children: [
1628
+ /* @__PURE__ */ E(
1629
+ ye,
1630
+ {
1631
+ interactive: "fill-outline",
1632
+ className: B.command__input,
1633
+ render: /* @__PURE__ */ E(z.Input, { placeholder: e })
1634
+ }
1635
+ ),
1636
+ /* @__PURE__ */ E(vt, { name: "search-line", className: B["command__input-icon"] })
1637
+ ] }),
1638
+ /* @__PURE__ */ oe(z.List, { className: B.command__list, children: [
1639
+ /* @__PURE__ */ E(z.Empty, { children: /* @__PURE__ */ E(ye, { className: B.command__empty, children: /* @__PURE__ */ E(pt, { color: "dimmer", children: "No results found." }) }) }),
1640
+ t
1641
+ ] })
1642
+ ] })
1643
+ }
1644
+ );
1645
+ }
1646
+ function To({
1647
+ className: e,
1648
+ ...t
1649
+ }) {
1650
+ return /* @__PURE__ */ E(
1651
+ z.Group,
1652
+ {
1653
+ className: We(B.command__group, e),
1654
+ ...t
1655
+ }
1656
+ );
1657
+ }
1658
+ function Lo(e) {
1659
+ return /* @__PURE__ */ E(rn, { render: /* @__PURE__ */ E(z.Separator, { ...e }) });
1660
+ }
1661
+ function Fo({
1662
+ shortcut: e,
1663
+ icon: t,
1664
+ className: n,
1665
+ children: r,
1666
+ ...o
1667
+ }) {
1668
+ return /* @__PURE__ */ oe(
1669
+ ye,
1670
+ {
1671
+ interactive: "list-item",
1672
+ className: We(B.command__item, n),
1673
+ render: /* @__PURE__ */ E(z.Item, { ...o }),
1674
+ children: [
1675
+ t ? /* @__PURE__ */ E(vt, { name: t }) : void 0,
1676
+ tn(r),
1677
+ e ? /* @__PURE__ */ E(
1678
+ pt,
1679
+ {
1680
+ className: We(B.command__shortcut),
1681
+ color: "dimmer",
1682
+ size: "sm",
1683
+ children: e
1684
+ }
1685
+ ) : null
1686
+ ]
1687
+ }
1688
+ );
1689
+ }
1690
+ export {
1691
+ ko as CommandDialog,
1692
+ To as CommandGroup,
1693
+ Fo as CommandItem,
1694
+ Lo as CommandSeparator
1695
+ };