@arcadeai/design-system 3.39.0 → 3.39.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 (425) hide show
  1. package/dist/CompositeItem-CniPsjzP.js +30 -0
  2. package/dist/CompositeList-yq5K_yj6.js +81 -0
  3. package/dist/CompositeRoot-Dy-5A-Je.js +206 -0
  4. package/dist/DialogRoot-DDokfJcO.js +57 -0
  5. package/dist/DialogTrigger-CFUE8YsM.js +402 -0
  6. package/dist/DirectionContext-BSOheMwC.js +10 -0
  7. package/dist/FieldItemContext-CF2fRwBC.js +12 -0
  8. package/dist/FloatingPortalLite-BHsRx4XN.js +29 -0
  9. package/dist/InternalBackdrop-BVEfe6O1.js +610 -0
  10. package/dist/LabelableContext-Dzw1DWuj.js +171 -0
  11. package/dist/Separator-CswSYAXX.js +25 -0
  12. package/dist/ToolbarRootContext-D7EsmJ5f.js +10 -0
  13. package/dist/andromeeda-B-gfN00q.js +4 -0
  14. package/dist/angular-html-dA1qUKRV.js +32 -0
  15. package/dist/angular-ts-CXyBC0vY.js +21 -0
  16. package/dist/apl-CjNiDgad.js +3 -3
  17. package/dist/assets/icons/telegram.js +10 -0
  18. package/dist/assets/images/arcade-grid.d.ts.map +1 -1
  19. package/dist/assets/images/arcade-grid.js +1 -0
  20. package/dist/assets/index.css +1 -1
  21. package/dist/assets/tokens.css +1 -1
  22. package/dist/assets/variables.css +1 -1
  23. package/dist/astro--3ZkKqYU.js +18 -0
  24. package/dist/astro-CFFExE8Q.js +5 -5
  25. package/dist/aurora-x-B56eICma.js +4 -0
  26. package/dist/ayu-dark-DJSOaKig.js +4 -0
  27. package/dist/ayu-light-BPfFt4v-.js +4 -0
  28. package/dist/ayu-mirage-DmPLRBj7.js +4 -0
  29. package/dist/blade-BoRuQEEj.js +20 -0
  30. package/dist/blade-D0HyNvCw.js +4 -4
  31. package/dist/c-C4SM8H98.js +6 -0
  32. package/dist/cairo-DM6WF2e3.js +1 -1
  33. package/dist/{calendar-DreAgQKY.js → calendar-CLEnvrbp.js} +483 -482
  34. package/dist/catppuccin-frappe-CA5k7W3u.js +4 -0
  35. package/dist/catppuccin-latte-CYfkUW5v.js +4 -0
  36. package/dist/catppuccin-macchiato-BOj_4I3g.js +4 -0
  37. package/dist/catppuccin-mocha-BXpUXme4.js +4 -0
  38. package/dist/clamp-BxE4ZAuA.js +17 -0
  39. package/dist/cobol-HihOMwht.js +1 -1
  40. package/dist/coffee-D8Swy5yR.js +8 -0
  41. package/dist/components/index.js +665 -644
  42. package/dist/components/ui/atoms/accordion.d.ts +9 -7
  43. package/dist/components/ui/atoms/accordion.d.ts.map +1 -1
  44. package/dist/components/ui/atoms/accordion.js +454 -243
  45. package/dist/components/ui/atoms/alert-dialog.d.ts +13 -9
  46. package/dist/components/ui/atoms/alert-dialog.d.ts.map +1 -1
  47. package/dist/components/ui/atoms/alert-dialog.js +149 -183
  48. package/dist/components/ui/atoms/alert.d.ts +2 -1
  49. package/dist/components/ui/atoms/alert.d.ts.map +1 -1
  50. package/dist/components/ui/atoms/alert.js +36 -25
  51. package/dist/components/ui/atoms/avatar.d.ts +10 -5
  52. package/dist/components/ui/atoms/avatar.d.ts.map +1 -1
  53. package/dist/components/ui/atoms/avatar.js +198 -205
  54. package/dist/components/ui/atoms/badge.d.ts +4 -5
  55. package/dist/components/ui/atoms/badge.d.ts.map +1 -1
  56. package/dist/components/ui/atoms/badge.js +31 -22
  57. package/dist/components/ui/atoms/breadcrumb.d.ts +4 -5
  58. package/dist/components/ui/atoms/breadcrumb.d.ts.map +1 -1
  59. package/dist/components/ui/atoms/breadcrumb.js +46 -29
  60. package/dist/components/ui/atoms/button.d.ts +4 -6
  61. package/dist/components/ui/atoms/button.d.ts.map +1 -1
  62. package/dist/components/ui/atoms/button.js +59 -28
  63. package/dist/components/ui/atoms/byoc-badge.d.ts +2 -2
  64. package/dist/components/ui/atoms/byoc-badge.d.ts.map +1 -1
  65. package/dist/components/ui/atoms/byoc-badge.js +14 -8
  66. package/dist/components/ui/atoms/calendar.d.ts +6 -16
  67. package/dist/components/ui/atoms/calendar.d.ts.map +1 -1
  68. package/dist/components/ui/atoms/calendar.js +1 -1
  69. package/dist/components/ui/atoms/card.d.ts +4 -2
  70. package/dist/components/ui/atoms/card.d.ts.map +1 -1
  71. package/dist/components/ui/atoms/card.js +46 -35
  72. package/dist/components/ui/atoms/chart.d.ts +24 -48
  73. package/dist/components/ui/atoms/chart.d.ts.map +1 -1
  74. package/dist/components/ui/atoms/chart.js +179 -148
  75. package/dist/components/ui/atoms/checkbox.d.ts +2 -3
  76. package/dist/components/ui/atoms/checkbox.d.ts.map +1 -1
  77. package/dist/components/ui/atoms/checkbox.js +269 -249
  78. package/dist/components/ui/atoms/code-block.js +1 -1
  79. package/dist/components/ui/atoms/collapsible.d.ts +5 -5
  80. package/dist/components/ui/atoms/collapsible.d.ts.map +1 -1
  81. package/dist/components/ui/atoms/collapsible.js +208 -23
  82. package/dist/components/ui/atoms/command.d.ts +4 -3
  83. package/dist/components/ui/atoms/command.d.ts.map +1 -1
  84. package/dist/components/ui/atoms/command.js +1655 -348
  85. package/dist/components/ui/atoms/dialog.d.ts +12 -10
  86. package/dist/components/ui/atoms/dialog.d.ts.map +1 -1
  87. package/dist/components/ui/atoms/dialog.js +91 -80
  88. package/dist/components/ui/atoms/dropdown-menu.d.ts +21 -17
  89. package/dist/components/ui/atoms/dropdown-menu.d.ts.map +1 -1
  90. package/dist/components/ui/atoms/dropdown-menu.js +1507 -899
  91. package/dist/components/ui/atoms/form.d.ts +5 -3
  92. package/dist/components/ui/atoms/form.d.ts.map +1 -1
  93. package/dist/components/ui/atoms/form.js +36 -42
  94. package/dist/components/ui/atoms/hover-card.d.ts +5 -6
  95. package/dist/components/ui/atoms/hover-card.d.ts.map +1 -1
  96. package/dist/components/ui/atoms/hover-card.js +355 -193
  97. package/dist/components/ui/atoms/icons/index.d.ts +1 -0
  98. package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
  99. package/dist/components/ui/atoms/icons/index.js +58 -56
  100. package/dist/components/ui/atoms/icons/telegram.d.ts +4 -0
  101. package/dist/components/ui/atoms/icons/telegram.d.ts.map +1 -0
  102. package/dist/components/ui/atoms/icons/telegram.js +37 -0
  103. package/dist/components/ui/atoms/index.d.ts +1 -0
  104. package/dist/components/ui/atoms/index.d.ts.map +1 -1
  105. package/dist/components/ui/atoms/index.js +566 -545
  106. package/dist/components/ui/atoms/input-group.d.ts +20 -0
  107. package/dist/components/ui/atoms/input-group.d.ts.map +1 -0
  108. package/dist/components/ui/atoms/input-group.js +136 -0
  109. package/dist/components/ui/atoms/input.d.ts.map +1 -1
  110. package/dist/components/ui/atoms/input.js +113 -13
  111. package/dist/components/ui/atoms/label.d.ts +1 -2
  112. package/dist/components/ui/atoms/label.d.ts.map +1 -1
  113. package/dist/components/ui/atoms/label.js +18 -31
  114. package/dist/components/ui/atoms/markdown.js +1 -1
  115. package/dist/components/ui/atoms/mobile-tooltip.js +4 -3
  116. package/dist/components/ui/atoms/popover.d.ts +8 -6
  117. package/dist/components/ui/atoms/popover.d.ts.map +1 -1
  118. package/dist/components/ui/atoms/popover.js +617 -245
  119. package/dist/components/ui/atoms/pro-badge.js +1 -1
  120. package/dist/components/ui/atoms/progress.d.ts +7 -4
  121. package/dist/components/ui/atoms/progress.d.ts.map +1 -1
  122. package/dist/components/ui/atoms/progress.js +236 -92
  123. package/dist/components/ui/atoms/radio-group.d.ts +4 -4
  124. package/dist/components/ui/atoms/radio-group.d.ts.map +1 -1
  125. package/dist/components/ui/atoms/radio-group.js +355 -251
  126. package/dist/components/ui/atoms/resizable.d.ts +3 -4
  127. package/dist/components/ui/atoms/resizable.d.ts.map +1 -1
  128. package/dist/components/ui/atoms/resizable.js +25 -27
  129. package/dist/components/ui/atoms/scroll-area.d.ts +5 -5
  130. package/dist/components/ui/atoms/scroll-area.d.ts.map +1 -1
  131. package/dist/components/ui/atoms/scroll-area.js +611 -526
  132. package/dist/components/ui/atoms/scroll-button.d.ts.map +1 -1
  133. package/dist/components/ui/atoms/scroll-button.js +27 -22
  134. package/dist/components/ui/atoms/select.d.ts +11 -11
  135. package/dist/components/ui/atoms/select.d.ts.map +1 -1
  136. package/dist/components/ui/atoms/select.js +1525 -889
  137. package/dist/components/ui/atoms/separator.d.ts +2 -3
  138. package/dist/components/ui/atoms/separator.d.ts.map +1 -1
  139. package/dist/components/ui/atoms/separator.js +16 -35
  140. package/dist/components/ui/atoms/sheet.d.ts +9 -9
  141. package/dist/components/ui/atoms/sheet.d.ts.map +1 -1
  142. package/dist/components/ui/atoms/sheet.js +65 -64
  143. package/dist/components/ui/atoms/sidebar.d.ts +9 -15
  144. package/dist/components/ui/atoms/sidebar.d.ts.map +1 -1
  145. package/dist/components/ui/atoms/sidebar.js +288 -283
  146. package/dist/components/ui/atoms/skeleton.js +4 -4
  147. package/dist/components/ui/atoms/slider.d.ts +2 -3
  148. package/dist/components/ui/atoms/slider.d.ts.map +1 -1
  149. package/dist/components/ui/atoms/slider.js +886 -440
  150. package/dist/components/ui/atoms/switch.d.ts +4 -5
  151. package/dist/components/ui/atoms/switch.d.ts.map +1 -1
  152. package/dist/components/ui/atoms/switch.js +218 -151
  153. package/dist/components/ui/atoms/table.d.ts +2 -4
  154. package/dist/components/ui/atoms/table.d.ts.map +1 -1
  155. package/dist/components/ui/atoms/table.js +35 -36
  156. package/dist/components/ui/atoms/tabs.d.ts +11 -7
  157. package/dist/components/ui/atoms/tabs.d.ts.map +1 -1
  158. package/dist/components/ui/atoms/tabs.js +492 -186
  159. package/dist/components/ui/atoms/textarea.d.ts.map +1 -1
  160. package/dist/components/ui/atoms/textarea.js +7 -7
  161. package/dist/components/ui/atoms/toggle.d.ts +2 -3
  162. package/dist/components/ui/atoms/toggle.d.ts.map +1 -1
  163. package/dist/components/ui/atoms/toggle.js +92 -45
  164. package/dist/components/ui/atoms/tooltip.d.ts +6 -9
  165. package/dist/components/ui/atoms/tooltip.d.ts.map +1 -1
  166. package/dist/components/ui/atoms/tooltip.js +625 -343
  167. package/dist/components/ui/atoms/view-tools-control.js +16 -15
  168. package/dist/components/ui/atoms/virtualized-grid.d.ts +11 -4
  169. package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -1
  170. package/dist/components/ui/atoms/virtualized-grid.js +365 -333
  171. package/dist/components/ui/index.js +665 -644
  172. package/dist/components/ui/molecules/chat-history-item.d.ts.map +1 -1
  173. package/dist/components/ui/molecules/chat-history-item.js +47 -40
  174. package/dist/components/ui/molecules/command-bar.js +1 -1
  175. package/dist/components/ui/molecules/confirm-popover.d.ts +2 -2
  176. package/dist/components/ui/molecules/confirm-popover.d.ts.map +1 -1
  177. package/dist/components/ui/molecules/confirm-popover.js +26 -24
  178. package/dist/components/ui/molecules/date-time-picker.d.ts.map +1 -1
  179. package/dist/components/ui/molecules/date-time-picker.js +17 -11
  180. package/dist/components/ui/molecules/index.js +1 -1
  181. package/dist/components/ui/molecules/message.d.ts +2 -3
  182. package/dist/components/ui/molecules/message.d.ts.map +1 -1
  183. package/dist/components/ui/molecules/message.js +10 -16
  184. package/dist/components/ui/molecules/prompt-input.d.ts +1 -1
  185. package/dist/components/ui/molecules/prompt-input.d.ts.map +1 -1
  186. package/dist/components/ui/molecules/prompt-input.js +21 -22
  187. package/dist/components/ui/molecules/requirement-badges.d.ts.map +1 -1
  188. package/dist/components/ui/molecules/requirement-badges.js +3 -3
  189. package/dist/components/ui/molecules/steps-progress.js +1 -0
  190. package/dist/components/ui/molecules/tool-call-accordion.js +1 -0
  191. package/dist/components/ui/molecules/tool-card.d.ts.map +1 -1
  192. package/dist/components/ui/molecules/tool-card.js +60 -47
  193. package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
  194. package/dist/components/ui/molecules/toolkit-card.js +1 -1
  195. package/dist/components/ui/molecules/user-nav.d.ts.map +1 -1
  196. package/dist/components/ui/molecules/user-nav.js +62 -57
  197. package/dist/components/ui/templates/auth-template.js +5 -5
  198. package/dist/composite-BASdnlNo.js +220 -0
  199. package/dist/composite-BSpUD7nI.js +66 -0
  200. package/dist/cpp-CA4iM_wM.js +18 -0
  201. package/dist/createBaseUIEventDetails-CqidROtw.js +55 -0
  202. package/dist/crystal-CRJyc4G-.js +4 -4
  203. package/dist/css-M7EaDHN_.js +6 -0
  204. package/dist/csv-B7yqA61e.js +6 -0
  205. package/dist/dark-plus-B4vfALTw.js +4 -0
  206. package/dist/detectBrowser-Dn2N72k1.js +42 -0
  207. package/dist/dracula-Cb59ZzY3.js +4 -0
  208. package/dist/dracula-soft-aaEmszbU.js +4 -0
  209. package/dist/edge-BYQkOzbF.js +1 -1
  210. package/dist/element-DSo91iOi.js +88 -0
  211. package/dist/elm-BtNbw_Cd.js +1 -1
  212. package/dist/erlang-DNcDT8Hi.js +1 -1
  213. package/dist/event-BCa0Un_3.js +30 -0
  214. package/dist/everforest-dark-CLp_21RJ.js +4 -0
  215. package/dist/everforest-light-CZ0NCAAv.js +4 -0
  216. package/dist/floating-ui.utils-48URp89E.js +126 -0
  217. package/dist/floating-ui.utils.dom-jr2suqy2.js +135 -0
  218. package/dist/fsharp-CYOiIVNx.js +1 -1
  219. package/dist/getDisabledMountTransitionStyles-fmnaQYVj.js +1539 -0
  220. package/dist/getPseudoElementBounds-B4_miSEJ.js +364 -0
  221. package/dist/git-rebase-ZWUFO_T4.js +1 -1
  222. package/dist/github-dark-BD3lImVS.js +4 -0
  223. package/dist/github-dark-default-ID_nBUwl.js +4 -0
  224. package/dist/github-dark-dimmed-Cw4rFgde.js +4 -0
  225. package/dist/github-dark-high-contrast-DSby9de8.js +4 -0
  226. package/dist/github-light-W396yAFe.js +4 -0
  227. package/dist/github-light-default-DCAQ2px1.js +4 -0
  228. package/dist/github-light-high-contrast-ChWJGEvx.js +4 -0
  229. package/dist/glimmer-js-DkxNrfPT.js +2 -2
  230. package/dist/glimmer-ts-D6YZEmK_.js +2 -2
  231. package/dist/glsl-CgdqkyFp.js +8 -0
  232. package/dist/graphql-Bv26LTzG.js +14 -0
  233. package/dist/gruvbox-dark-hard-BC1GRqFa.js +4 -0
  234. package/dist/gruvbox-dark-medium-COLy2cDY.js +4 -0
  235. package/dist/gruvbox-dark-soft-B8MALL4f.js +4 -0
  236. package/dist/gruvbox-light-hard-Bzxr_AnB.js +4 -0
  237. package/dist/gruvbox-light-medium-D2fqu3Kj.js +4 -0
  238. package/dist/gruvbox-light-soft-atzRH3-n.js +4 -0
  239. package/dist/hack-ItRNKiEb.js +1 -1
  240. package/dist/haml-B1t5q1Sv.js +10 -0
  241. package/dist/haml-NZLVzu_R.js +1 -1
  242. package/dist/handlebars-B2fb61mr.js +14 -0
  243. package/dist/handlebars-mxStpSE7.js +2 -2
  244. package/dist/highlighted-body-OFNGDK62-Df6AJMbs.js +20 -0
  245. package/dist/hooks/use-mobile.d.ts.map +1 -1
  246. package/dist/hooks/use-mobile.js +11 -12
  247. package/dist/horizon-PFtq58ZB.js +4 -0
  248. package/dist/horizon-bright-2WzHy-Vo.js +4 -0
  249. package/dist/houston-BEqUWhHr.js +4 -0
  250. package/dist/html-B50bmoVb.js +1 -1
  251. package/dist/html-CPZ3oZQ7.js +10 -0
  252. package/dist/html-derivative-B2qv7eyt.js +8 -0
  253. package/dist/http-BQ2t9cn1.js +14 -0
  254. package/dist/hurl-RyCMCa80.js +12 -0
  255. package/dist/imba-DpB-wtPB.js +6 -0
  256. package/dist/index-3rscXtm3.js +4708 -0
  257. package/dist/inertValue-kpZZDBEy.js +7 -0
  258. package/dist/integrations/rhf/index.js +6 -5
  259. package/dist/isElementDisabled-Cbd8W9kH.js +6 -0
  260. package/dist/java-CbphP4lz.js +6 -0
  261. package/dist/javascript-CgYd5l7W.js +6 -0
  262. package/dist/jinja-DFCUirAg.js +11 -0
  263. package/dist/jison-CTEI_s6O.js +8 -0
  264. package/dist/json-B5-prx4F.js +6 -0
  265. package/dist/json5-CZ8R1oUY.js +6 -0
  266. package/dist/jsonc-DMboCKBJ.js +6 -0
  267. package/dist/jsonl-YgIUi4Dg.js +6 -0
  268. package/dist/jsx-D4q4E1UD.js +6 -0
  269. package/dist/julia-2ubi2n9a.js +16 -0
  270. package/dist/just-CEK2SJ_k.js +4 -4
  271. package/dist/kanagawa-dragon-DuYaOBBk.js +4 -0
  272. package/dist/kanagawa-lotus-CyjAihYC.js +4 -0
  273. package/dist/kanagawa-wave-BVdXUMj5.js +4 -0
  274. package/dist/laserwave-B_2VVKNJ.js +4 -0
  275. package/dist/less-MoGo8xoS.js +6 -0
  276. package/dist/light-plus-IB4fPeJj.js +4 -0
  277. package/dist/liquid-CHzkx3jT.js +2 -2
  278. package/dist/lua-Bp3IRv7I.js +1 -1
  279. package/dist/main.js +691 -670
  280. package/dist/markdown-B-zRtm0x.js +6 -0
  281. package/dist/{markdown-D0xxRbwP.js → markdown-B71Eurda.js} +10329 -8108
  282. package/dist/marko-BlmC3dqW.js +14 -0
  283. package/dist/marko-CJBA24Ri.js +2 -2
  284. package/dist/material-theme-CjsSdYF2.js +4 -0
  285. package/dist/material-theme-darker-DEk0vgdS.js +4 -0
  286. package/dist/material-theme-lighter-DEVB_7K5.js +4 -0
  287. package/dist/material-theme-ocean-DK6jm24j.js +4 -0
  288. package/dist/material-theme-palenight-CNkXNpHv.js +4 -0
  289. package/dist/mdc-C9YSUwVC.js +2 -2
  290. package/dist/mdc-CLNk3q28.js +12 -0
  291. package/dist/mdx-CiUWpBB_.js +6 -0
  292. package/dist/mermaid-GHXKKRXX-BkplG-MI.js +5 -0
  293. package/dist/metadata/toolkit-icons.d.ts.map +1 -1
  294. package/dist/metadata/toolkit-icons.js +40 -38
  295. package/dist/metadata/toolkits.d.ts.map +1 -1
  296. package/dist/metadata/toolkits.js +13 -0
  297. package/dist/min-dark-CJcHUHwu.js +4 -0
  298. package/dist/min-light-BAN2UR75.js +4 -0
  299. package/dist/monokai-BbXwpjKl.js +4 -0
  300. package/dist/night-owl-csViJ7u4.js +4 -0
  301. package/dist/night-owl-light-BC-NuMC3.js +4 -0
  302. package/dist/nim-QAjRdh9w.js +5 -5
  303. package/dist/nord-B8Sq-VQ0.js +4 -0
  304. package/dist/one-dark-pro-DTdrcl-J.js +4 -0
  305. package/dist/one-light-kPHTChCU.js +4 -0
  306. package/dist/owner-rKN292Q9.js +6 -0
  307. package/dist/perl-DkVrgJBg.js +3 -3
  308. package/dist/php-BIzsF_5x.js +4 -4
  309. package/dist/php-Kn-vgdBD.js +18 -0
  310. package/dist/plastic-DDweBgVs.js +4 -0
  311. package/dist/poimandres-Dqvs16BQ.js +4 -0
  312. package/dist/popupStateMapping-BT9Y_jIq.js +1849 -0
  313. package/dist/postcss-CwL8bLZI.js +6 -0
  314. package/dist/pug-CTOOvSEH.js +12 -0
  315. package/dist/pug-XOw9Q1Ho.js +1 -1
  316. package/dist/python-jjYlTiSH.js +6 -0
  317. package/dist/qml-rTNXsquU.js +1 -1
  318. package/dist/r-C8zl4zMO.js +6 -0
  319. package/dist/react-resizable-panels-BqIpIFl2.js +2017 -0
  320. package/dist/red-DBDwQkX-.js +4 -0
  321. package/dist/regexp-Dpy_RgoJ.js +6 -0
  322. package/dist/resolveAriaLabelledBy-B5vw-szP.js +11 -0
  323. package/dist/rose-pine-DGHrTu7e.js +4 -0
  324. package/dist/rose-pine-dawn-DfRVdapG.js +4 -0
  325. package/dist/rose-pine-moon-DFpJm5Rd.js +4 -0
  326. package/dist/rst-DM32Wy3O.js +5 -5
  327. package/dist/ruby-BeqCs27h.js +8 -8
  328. package/dist/safePolygon-CJcmMc0u.js +389 -0
  329. package/dist/safeReact-DKq-628G.js +7 -0
  330. package/dist/sas-fpEvgATw.js +1 -1
  331. package/dist/sass-BmupNt-w.js +6 -0
  332. package/dist/scss-BZYVIVaN.js +8 -0
  333. package/dist/serializeValue-BebmSzW3.js +14 -0
  334. package/dist/shellscript-fMxXshxv.js +6 -0
  335. package/dist/shellsession-DiDJNQdy.js +1 -1
  336. package/dist/slack-dark-noeC6QPl.js +4 -0
  337. package/dist/slack-ochin-3_2idqLR.js +4 -0
  338. package/dist/snazzy-light-B9cV359v.js +4 -0
  339. package/dist/solarized-dark-B6X0ILWr.js +4 -0
  340. package/dist/solarized-light-LxOemn3c.js +4 -0
  341. package/dist/sql-D30Zid36.js +6 -0
  342. package/dist/stata-B8c5fTjX.js +1 -1
  343. package/dist/styles-DU5BO7fS.js +16 -0
  344. package/dist/stylus-BoBcEBjx.js +6 -0
  345. package/dist/surrealql-CQi7GQN7.js +1 -1
  346. package/dist/svelte-b9PAcyUe.js +14 -0
  347. package/dist/svelte-rYri41WT.js +3 -3
  348. package/dist/synthwave-84-DzQeMpV0.js +4 -0
  349. package/dist/templ-Crs9Ui8q.js +1 -1
  350. package/dist/tex-AHxmLTL0.js +1 -1
  351. package/dist/tokyo-night-CLM-V_Re.js +4 -0
  352. package/dist/{toolkit-card-CB1oiaei.js → toolkit-card-DhpOY80l.js} +56 -36
  353. package/dist/ts-tags-CP1b-4Z2.js +41 -0
  354. package/dist/ts-tags-ioVe2PKw.js +5 -5
  355. package/dist/tsx-QNpb2qLW.js +6 -0
  356. package/dist/twig-DwV2Fi4L.js +2 -2
  357. package/dist/typescript-AhniRyfZ.js +6 -0
  358. package/dist/useAnimationFrame-DIc6eFHa.js +69 -0
  359. package/dist/useAriaLabelledBy-VklrCmKp.js +34 -0
  360. package/dist/useBaseUiId-C8Dq0BQq.js +25 -0
  361. package/dist/useButton-JYPKQKj4.js +150 -0
  362. package/dist/useCollapsiblePanel-9pDlDh3R.js +257 -0
  363. package/dist/useCompositeItem-D00ALGkT.js +35 -0
  364. package/dist/useCompositeListItem-CYQrZg5-.js +74 -0
  365. package/dist/useControlled-Sx-_x7Sz.js +32 -0
  366. package/dist/useFocus-Aj9ShMQu.js +97 -0
  367. package/dist/useIsoLayoutEffect-DpJo20by.js +7 -0
  368. package/dist/useLabelableId-DF_d91GP.js +44 -0
  369. package/dist/useOnFirstRender-B4aruaIA.js +9 -0
  370. package/dist/useOnMount-JHtE6teb.js +9 -0
  371. package/dist/useOpenChangeComplete-DkeH9FGJ.js +130 -0
  372. package/dist/useRender-BNXBkp2o.js +7 -0
  373. package/dist/useRenderElement-DNB2vtF1.js +274 -0
  374. package/dist/useRole-N-RCRzo1.js +76 -0
  375. package/dist/useStableCallback-CudqoENs.js +33 -0
  376. package/dist/useSyncedFloatingRootContext-Bc90zSTy.js +185 -0
  377. package/dist/useTimeout-DAqPwigF.js +33 -0
  378. package/dist/useValueAsRef-LhoZc6As.js +20 -0
  379. package/dist/useValueChanged-Bissqjjn.js +15 -0
  380. package/dist/valueToPercent-BBgE4D3L.js +27 -0
  381. package/dist/vesper-BmV7KiQ0.js +4 -0
  382. package/dist/visuallyHidden-PuyyGHVF.js +22 -0
  383. package/dist/vitesse-black-CxZz3C4s.js +4 -0
  384. package/dist/vitesse-dark-DVUJ0sy2.js +4 -0
  385. package/dist/vitesse-light-BDJohtUr.js +4 -0
  386. package/dist/vue-CY6W2ID0.js +31 -0
  387. package/dist/vue-DXEmyXn9.js +3 -3
  388. package/dist/vue-html-DYXHAJ2G.js +8 -0
  389. package/dist/vue-vine-D41-N99t.js +4 -4
  390. package/dist/vue-vine-DiWTpMwZ.js +18 -0
  391. package/dist/wasm-3y0A1Y71.js +6 -0
  392. package/dist/wasm-Dm9SFfrx.js +7 -0
  393. package/dist/web-BbvN_Lei.js +2846 -0
  394. package/dist/wgsl-SXl3EZUN.js +6 -0
  395. package/dist/wit-Cw0CTVY0.js +6 -0
  396. package/dist/xml-CNXGTZ6Z.js +8 -0
  397. package/dist/xsl-BmSZphgC.js +1 -1
  398. package/dist/yaml-DZqZ2PBD.js +6 -0
  399. package/package.json +37 -34
  400. package/dist/highlighted-body-TPN3WLV5-D6UnKGod.js +0 -19
  401. package/dist/index-0ioNhtNM.js +0 -10
  402. package/dist/index-437EL2iq.js +0 -52
  403. package/dist/index-B695uy69.js +0 -9
  404. package/dist/index-BEZCAdXQ.js +0 -1568
  405. package/dist/index-BGQepRFJ.js +0 -27
  406. package/dist/index-BZPx6jYI.js +0 -8
  407. package/dist/index-BaLuVb4t.js +0 -70
  408. package/dist/index-Bw62B28F.js +0 -31
  409. package/dist/index-By-GFSsC.js +0 -245
  410. package/dist/index-ByaXH_ih.js +0 -10
  411. package/dist/index-CCKe-Mpx.js +0 -6
  412. package/dist/index-Cv867SGx.js +0 -13
  413. package/dist/index-CvA4FcaC.js +0 -677
  414. package/dist/index-D2LZVjSn.js +0 -82
  415. package/dist/index-DFZozV_h.js +0 -68
  416. package/dist/index-DJQkmo5O.js +0 -49
  417. package/dist/index-DLohNuco.js +0 -36
  418. package/dist/index-DrFfdHac.js +0 -144
  419. package/dist/index-DrlYGDRT.js +0 -119
  420. package/dist/index-Dz8CQngS.js +0 -181
  421. package/dist/index-cd1ceFJg.js +0 -6973
  422. package/dist/index-rKs9bXHr.js +0 -6
  423. package/dist/mermaid-O7DHMXV3-gUrB-Xs1.js +0 -4
  424. package/dist/react-resizable-panels.browser-DYl0LXfw.js +0 -1510
  425. package/dist/web-BwFNdl01.js +0 -697
@@ -1,483 +1,929 @@
1
- import { jsx as m, jsxs as j } from "react/jsx-runtime";
2
- import * as c from "react";
3
- import { cn as H } from "../../../lib/utils.js";
4
- import { c as X } from "../../../index-rKs9bXHr.js";
5
- import { c as _ } from "../../../index-B695uy69.js";
6
- import { u as C } from "../../../index-D2LZVjSn.js";
7
- import { c as de } from "../../../index-DFZozV_h.js";
8
- import { u as ue } from "../../../index-437EL2iq.js";
9
- import { u as fe } from "../../../index-ByaXH_ih.js";
10
- import { u as me } from "../../../index-BZPx6jYI.js";
11
- import { u as pe } from "../../../index-BGQepRFJ.js";
12
- import { P as B } from "../../../index-DLohNuco.js";
13
- import { c as he } from "../../../index-DJQkmo5O.js";
14
- var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], q = {
15
- "from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
16
- "from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
17
- "from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
18
- "from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
19
- }, M = "Slider", [L, Se, ge] = he(M), [J] = de(M, [
20
- ge
21
- ]), [ve, T] = J(M), Q = c.forwardRef(
22
- (e, t) => {
23
- const {
24
- name: o,
25
- min: n = 0,
26
- max: r = 100,
27
- step: l = 1,
28
- orientation: i = "horizontal",
29
- disabled: s = !1,
30
- minStepsBetweenThumbs: d = 0,
31
- defaultValue: w = [n],
32
- value: S,
33
- onValueChange: a = () => {
34
- },
35
- onValueCommit: u = () => {
36
- },
37
- inverted: v = !1,
38
- form: R,
39
- ...g
40
- } = e, p = c.useRef(/* @__PURE__ */ new Set()), f = c.useRef(0), b = i === "horizontal" ? we : be, [h = [], A] = ue({
41
- prop: S,
42
- defaultProp: w,
43
- onChange: (y) => {
44
- [...p.current][f.current]?.focus(), a(y);
1
+ "use client";
2
+ import { jsx as ye, jsxs as Qe } from "react/jsx-runtime";
3
+ import { cn as Pt } from "../../../lib/utils.js";
4
+ import * as l from "react";
5
+ import { o as Te } from "../../../owner-rKN292Q9.js";
6
+ import { u as wt } from "../../../useControlled-Sx-_x7Sz.js";
7
+ import { u as U } from "../../../useStableCallback-CudqoENs.js";
8
+ import { u as Ze } from "../../../useValueAsRef-LhoZc6As.js";
9
+ import { u as Ke } from "../../../useIsoLayoutEffect-DpJo20by.js";
10
+ import { f as Et, w as Nt, u as Oe, m as At, c as Vt } from "../../../useRenderElement-DNB2vtF1.js";
11
+ import { c as Me, n as Tt, h as et, k as Mt, j as Ot, m as Lt, p as Ge } from "../../../createBaseUIEventDetails-CqidROtw.js";
12
+ import { u as Ft } from "../../../useValueChanged-Bissqjjn.js";
13
+ import { u as qe } from "../../../useBaseUiId-C8Dq0BQq.js";
14
+ import { c as le, u as Bt } from "../../../clamp-BxE4ZAuA.js";
15
+ import { C as Dt } from "../../../CompositeList-yq5K_yj6.js";
16
+ import { f as kt, c as _t, a as tt, u as $t, b as Ht } from "../../../LabelableContext-Dzw1DWuj.js";
17
+ import { g as zt, r as Ut } from "../../../resolveAriaLabelledBy-B5vw-szP.js";
18
+ import { a as nt, c as Wt } from "../../../element-DSo91iOi.js";
19
+ import { a as We } from "../../../floating-ui.utils.dom-jr2suqy2.js";
20
+ import { u as Kt } from "../../../useAnimationFrame-DIc6eFHa.js";
21
+ import { u as rt } from "../../../DirectionContext-BSOheMwC.js";
22
+ import { u as ot } from "../../../useOnMount-JHtE6teb.js";
23
+ import { a as _e, v as Ye } from "../../../valueToPercent-BBgE4D3L.js";
24
+ import { a as Xe } from "../../../visuallyHidden-PuyyGHVF.js";
25
+ import { C as qt, H as it, E as st, d as at, b as lt, c as ut, e as ct } from "../../../composite-BSpUD7nI.js";
26
+ import { u as Yt } from "../../../useCompositeListItem-CYQrZg5-.js";
27
+ import { u as jt } from "../../../useLabelableId-DF_d91GP.js";
28
+ function dt(e, t, r = (i, o) => i === o) {
29
+ return e.length === t.length && e.every((i, o) => r(i, t[o]));
30
+ }
31
+ function ft(e, t) {
32
+ return e - t;
33
+ }
34
+ function Gt(e, t, r) {
35
+ const i = e.slice();
36
+ return i[t] = r, i.sort(ft);
37
+ }
38
+ function mt(e, t, r, i, o, u) {
39
+ let a = e;
40
+ return a = le(a, r, i), o && (a = Gt(
41
+ u,
42
+ t,
43
+ // Bound the new value to the thumb's neighbours.
44
+ le(a, u[t - 1] || -1 / 0, u[t + 1] || 1 / 0)
45
+ )), a;
46
+ }
47
+ function pt(e, t, r) {
48
+ if (!Array.isArray(e))
49
+ return !0;
50
+ const i = e.reduce((o, u, a, p) => (a === p.length - 1 || o.push(Math.abs(u - p[a + 1])), o), []);
51
+ return Math.min(...i) >= t * r;
52
+ }
53
+ const Le = {
54
+ activeThumbIndex: () => null,
55
+ max: () => null,
56
+ min: () => null,
57
+ minStepsBetweenValues: () => null,
58
+ step: () => null,
59
+ values: () => null,
60
+ ...kt
61
+ }, je = /* @__PURE__ */ l.createContext(void 0);
62
+ process.env.NODE_ENV !== "production" && (je.displayName = "SliderRootContext");
63
+ function $e() {
64
+ const e = l.useContext(je);
65
+ if (e === void 0)
66
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>." : Et(62));
67
+ return e;
68
+ }
69
+ function Xt(e) {
70
+ return "key" in e ? Mt : Ot;
71
+ }
72
+ function Jt(e, t) {
73
+ return typeof e == "number" && typeof t == "number" ? e === t : Array.isArray(e) && Array.isArray(t) ? dt(e, t) : !1;
74
+ }
75
+ const ht = /* @__PURE__ */ l.forwardRef(function(t, r) {
76
+ const {
77
+ "aria-labelledby": i,
78
+ className: o,
79
+ defaultValue: u,
80
+ disabled: a = !1,
81
+ id: p,
82
+ format: f,
83
+ largeStep: N = 10,
84
+ locale: b,
85
+ render: F,
86
+ max: A = 100,
87
+ min: g = 0,
88
+ minStepsBetweenValues: s = 0,
89
+ name: V,
90
+ onValueChange: I,
91
+ onValueCommitted: w,
92
+ orientation: v = "horizontal",
93
+ step: k = 1,
94
+ thumbCollisionBehavior: he = "push",
95
+ thumbAlignment: fe = "center",
96
+ value: J,
97
+ ...Q
98
+ } = t, Z = qe(p), ee = zt(Z), te = U(I), z = U(w), {
99
+ clearErrors: K
100
+ } = _t(), {
101
+ state: P,
102
+ disabled: q,
103
+ name: O,
104
+ setTouched: W,
105
+ setDirty: h,
106
+ validityData: S,
107
+ shouldValidateOnChange: ue,
108
+ validation: _
109
+ } = tt(), {
110
+ labelId: Y
111
+ } = $t(), [Re, ce] = l.useState(), be = i ?? Ut(Y, Re), $ = q || a, ne = O ?? V, [E, ge] = wt({
112
+ controlled: J,
113
+ default: u ?? g,
114
+ name: "Slider"
115
+ }), B = l.useRef(null), L = l.useRef(null), j = l.useRef([]), ve = l.useRef(null), re = l.useRef(null), n = l.useRef(-1), d = l.useRef(null), c = l.useRef(null), y = l.useRef("none"), m = Ze(f), [T, G] = l.useState(-1), [oe, me] = l.useState(-1), [de, Ie] = l.useState(!1), [Se, Ae] = l.useState(() => /* @__PURE__ */ new Map()), [x, Ce] = l.useState([void 0, void 0]), D = U((C) => {
116
+ G(C), C !== -1 && me(C);
117
+ });
118
+ Ht({
119
+ id: Z,
120
+ commit: _.commit,
121
+ value: E,
122
+ controlRef: L,
123
+ name: ne,
124
+ getValue: () => E
125
+ }), Ft(E, () => {
126
+ K(ne), ue() ? _.commit(E) : _.commit(E, !0);
127
+ const C = S.initialValue;
128
+ let se;
129
+ Array.isArray(E) && Array.isArray(C) ? se = !dt(E, C) : se = E !== C, h(se);
130
+ });
131
+ const ie = U((C) => {
132
+ C && (L.current = C);
133
+ }), X = Array.isArray(E), xe = l.useMemo(() => X ? E.slice().sort(ft) : [le(E, g, A)], [A, g, X, E]), Pe = U((C, se) => {
134
+ if (Number.isNaN(C) || Jt(C, E))
135
+ return;
136
+ const ae = se ?? Me(Tt, void 0, void 0, {
137
+ activeThumbIndex: -1
138
+ });
139
+ y.current = ae.reason;
140
+ const pe = ae.event, Ve = pe.constructor ?? Event, R = new Ve(pe.type, pe);
141
+ Object.defineProperty(R, "target", {
142
+ writable: !0,
143
+ value: {
144
+ value: C,
145
+ name: ne
45
146
  }
46
- }), k = c.useRef(h);
47
- function V(y) {
48
- const P = De(h, y);
49
- K(y, P);
50
- }
51
- function le(y) {
52
- K(y, f.current);
53
- }
54
- function ce() {
55
- const y = k.current[f.current];
56
- h[f.current] !== y && u(h);
147
+ }), ae.event = R, c.current = C, te(C, ae), !ae.isCanceled && ge(C);
148
+ }), Fe = U((C, se, ae) => {
149
+ const pe = mt(C, se, g, A, X, xe);
150
+ if (pt(pe, k, s)) {
151
+ const Ve = Xt(ae);
152
+ Pe(pe, Me(Ve, ae.nativeEvent, void 0, {
153
+ activeThumbIndex: se
154
+ })), W(!0);
155
+ const R = c.current ?? pe;
156
+ z(R, et(Ve, ae.nativeEvent));
57
157
  }
58
- function K(y, P, { commit: z } = { commit: !1 }) {
59
- const Y = Me(l), N = Ae(Math.round((y - n) / l) * l + n, Y), I = X(N, [n, r]);
60
- A((E = []) => {
61
- const x = Pe(E, I, P);
62
- if (Ce(x, d * l)) {
63
- f.current = x.indexOf(I);
64
- const $ = String(x) !== String(E);
65
- return $ && z && u(x), $ ? x : E;
66
- } else
67
- return E;
158
+ });
159
+ process.env.NODE_ENV !== "production" && g >= A && Nt("Slider `max` must be greater than `min`."), Ke(() => {
160
+ const C = nt(Te(B.current));
161
+ $ && C && B.current?.contains(C) && C.blur();
162
+ }, [$]), $ && T !== -1 && D(-1);
163
+ const we = l.useMemo(() => ({
164
+ ...P,
165
+ activeThumbIndex: T,
166
+ disabled: $,
167
+ dragging: de,
168
+ orientation: v,
169
+ max: A,
170
+ min: g,
171
+ minStepsBetweenValues: s,
172
+ step: k,
173
+ values: xe
174
+ }), [P, T, $, de, A, g, s, v, k, xe]), Ee = l.useMemo(() => ({
175
+ active: T,
176
+ controlRef: L,
177
+ disabled: $,
178
+ dragging: de,
179
+ validation: _,
180
+ formatOptionsRef: m,
181
+ handleInputChange: Fe,
182
+ indicatorPosition: x,
183
+ inset: fe !== "center",
184
+ labelId: be,
185
+ rootLabelId: ee,
186
+ largeStep: N,
187
+ lastUsedThumbIndex: oe,
188
+ lastChangedValueRef: c,
189
+ lastChangeReasonRef: y,
190
+ locale: b,
191
+ max: A,
192
+ min: g,
193
+ minStepsBetweenValues: s,
194
+ name: ne,
195
+ onValueCommitted: z,
196
+ orientation: v,
197
+ pressedInputRef: ve,
198
+ pressedThumbCenterOffsetRef: re,
199
+ pressedThumbIndexRef: n,
200
+ pressedValuesRef: d,
201
+ registerFieldControlRef: ie,
202
+ renderBeforeHydration: fe === "edge",
203
+ setActive: D,
204
+ setDragging: Ie,
205
+ setIndicatorPosition: Ce,
206
+ setLabelId: ce,
207
+ setValue: Pe,
208
+ state: we,
209
+ step: k,
210
+ thumbCollisionBehavior: he,
211
+ thumbMap: Se,
212
+ thumbRefs: j,
213
+ values: xe
214
+ }), [T, L, be, ee, $, de, _, m, Fe, x, N, oe, c, y, b, A, g, s, ne, z, v, ve, re, n, d, ie, D, Ie, Ce, ce, Pe, we, k, he, fe, Se, j, xe]), He = Oe("div", t, {
215
+ state: we,
216
+ ref: [r, B],
217
+ props: [{
218
+ "aria-labelledby": be,
219
+ id: Z,
220
+ role: "group"
221
+ }, _.getValidationProps, Q],
222
+ stateAttributesMapping: Le
223
+ });
224
+ return /* @__PURE__ */ ye(je.Provider, {
225
+ value: Ee,
226
+ children: /* @__PURE__ */ ye(Dt, {
227
+ elementsRef: j,
228
+ onMapChange: Ae,
229
+ children: He
230
+ })
231
+ });
232
+ });
233
+ process.env.NODE_ENV !== "production" && (ht.displayName = "SliderRoot");
234
+ function bt(e) {
235
+ const t = e.getBoundingClientRect();
236
+ return {
237
+ x: (t.left + t.right) / 2,
238
+ y: (t.top + t.bottom) / 2
239
+ };
240
+ }
241
+ function Qt(e) {
242
+ if (Math.abs(e) < 1) {
243
+ const r = e.toExponential().split("e-"), i = r[0].split(".")[1];
244
+ return (i ? i.length : 0) + parseInt(r[1], 10);
245
+ }
246
+ const t = e.toString().split(".")[1];
247
+ return t ? t.length : 0;
248
+ }
249
+ function gt(e, t, r) {
250
+ const i = Math.round((e - r) / t) * t + r;
251
+ return Number(i.toFixed(Qt(t)));
252
+ }
253
+ function Je({
254
+ values: e,
255
+ index: t,
256
+ nextValue: r,
257
+ min: i,
258
+ max: o,
259
+ step: u,
260
+ minStepsBetweenValues: a,
261
+ initialValues: p
262
+ }) {
263
+ if (e.length === 0)
264
+ return [];
265
+ const f = e.slice(), N = u * a, b = f.length - 1, F = p ?? e, A = i + t * N, g = o - (b - t) * N;
266
+ f[t] = le(r, A, g);
267
+ for (let s = t + 1; s <= b; s += 1) {
268
+ const V = f[s - 1] + N, I = o - (b - s) * N, w = F[s] ?? f[s];
269
+ let v = Math.max(f[s], V);
270
+ w < v && (v = Math.max(w, V)), f[s] = le(v, V, I);
271
+ }
272
+ for (let s = t - 1; s >= 0; s -= 1) {
273
+ const V = f[s + 1] - N, I = i + s * N, w = F[s] ?? f[s];
274
+ let v = Math.min(f[s], V);
275
+ w > v && (v = Math.min(w, V)), f[s] = le(v, I, V);
276
+ }
277
+ for (let s = 0; s <= b; s += 1)
278
+ f[s] = Number(f[s].toFixed(12));
279
+ return f;
280
+ }
281
+ function Zt({
282
+ behavior: e,
283
+ values: t,
284
+ currentValues: r,
285
+ initialValues: i,
286
+ pressedIndex: o,
287
+ nextValue: u,
288
+ min: a,
289
+ max: p,
290
+ step: f,
291
+ minStepsBetweenValues: N
292
+ }) {
293
+ const b = r ?? t, F = i ?? t;
294
+ if (!(b.length > 1))
295
+ return {
296
+ value: u,
297
+ thumbIndex: 0,
298
+ didSwap: !1
299
+ };
300
+ const g = f * N;
301
+ switch (e) {
302
+ case "swap": {
303
+ const s = b[o], V = 1e-7, I = b.slice(), w = I[o - 1], v = I[o + 1], k = w != null ? w + g : a, he = v != null ? v - g : p, fe = le(u, k, he), J = Number(fe.toFixed(12));
304
+ I[o] = J;
305
+ const Q = u > s, Z = u < s, ee = Q && v != null && u >= v - V, te = Z && w != null && u <= w + V;
306
+ if (!ee && !te)
307
+ return {
308
+ value: I,
309
+ thumbIndex: o,
310
+ didSwap: !1
311
+ };
312
+ const z = ee ? o + 1 : o - 1, K = I.map((W, h) => {
313
+ if (h === o)
314
+ return J;
315
+ const S = F[h];
316
+ return S ?? b[h];
68
317
  });
69
- }
70
- return /* @__PURE__ */ m(
71
- ve,
72
- {
73
- scope: e.__scopeSlider,
74
- name: o,
75
- disabled: s,
76
- min: n,
77
- max: r,
78
- valueIndexToChangeRef: f,
79
- thumbs: p.current,
80
- values: h,
81
- orientation: i,
82
- form: R,
83
- children: /* @__PURE__ */ m(L.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ m(L.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ m(
84
- b,
85
- {
86
- "aria-disabled": s,
87
- "data-disabled": s ? "" : void 0,
88
- ...g,
89
- ref: t,
90
- onPointerDown: _(g.onPointerDown, () => {
91
- s || (k.current = h);
92
- }),
93
- min: n,
94
- max: r,
95
- inverted: v,
96
- onSlideStart: s ? void 0 : V,
97
- onSlideMove: s ? void 0 : le,
98
- onSlideEnd: s ? void 0 : ce,
99
- onHomeKeyDown: () => !s && K(n, 0, { commit: !0 }),
100
- onEndKeyDown: () => !s && K(r, h.length - 1, { commit: !0 }),
101
- onStepKeyDown: ({ event: y, direction: P }) => {
102
- if (!s) {
103
- const N = G.includes(y.key) || y.shiftKey && W.includes(y.key) ? 10 : 1, I = f.current, E = h[I], x = l * N * P;
104
- K(E + x, I, { commit: !0 });
105
- }
106
- }
107
- }
108
- ) }) })
318
+ let P = u;
319
+ ee ? P = Math.max(u, I[z]) : P = Math.min(u, I[z]);
320
+ const q = Je({
321
+ values: I,
322
+ index: z,
323
+ nextValue: P,
324
+ min: a,
325
+ max: p,
326
+ step: f,
327
+ minStepsBetweenValues: N,
328
+ initialValues: K
329
+ }), O = ee ? z - 1 : z + 1;
330
+ if (O >= 0 && O < q.length) {
331
+ const W = q[O - 1], h = q[O + 1];
332
+ let S = W != null ? W + g : a;
333
+ S = Math.max(S, a + O * g);
334
+ let ue = h != null ? h - g : p;
335
+ ue = Math.min(ue, p - (q.length - 1 - O) * g);
336
+ const _ = le(J, S, ue);
337
+ q[O] = Number(_.toFixed(12));
109
338
  }
110
- );
111
- }
112
- );
113
- Q.displayName = M;
114
- var [Z, ee] = J(M, {
115
- startEdge: "left",
116
- endEdge: "right",
117
- size: "width",
118
- direction: 1
119
- }), we = c.forwardRef(
120
- (e, t) => {
121
- const {
122
- min: o,
123
- max: n,
124
- dir: r,
125
- inverted: l,
126
- onSlideStart: i,
127
- onSlideMove: s,
128
- onSlideEnd: d,
129
- onStepKeyDown: w,
130
- ...S
131
- } = e, [a, u] = c.useState(null), v = C(t, (b) => u(b)), R = c.useRef(void 0), g = fe(r), p = g === "ltr", f = p && !l || !p && l;
132
- function D(b) {
133
- const h = R.current || a.getBoundingClientRect(), A = [0, h.width], V = F(A, f ? [o, n] : [n, o]);
134
- return R.current = h, V(b - h.left);
339
+ return {
340
+ value: q,
341
+ thumbIndex: z,
342
+ didSwap: !0
343
+ };
344
+ }
345
+ case "push":
346
+ return {
347
+ value: Je({
348
+ values: b,
349
+ index: o,
350
+ nextValue: u,
351
+ min: a,
352
+ max: p,
353
+ step: f,
354
+ minStepsBetweenValues: N
355
+ }),
356
+ thumbIndex: o,
357
+ didSwap: !1
358
+ };
359
+ default: {
360
+ const s = b.slice(), V = s[o - 1], I = s[o + 1], w = V != null ? V + g : a, v = I != null ? I - g : p, k = le(u, w, v);
361
+ return s[o] = Number(k.toFixed(12)), {
362
+ value: s,
363
+ thumbIndex: o,
364
+ didSwap: !1
365
+ };
135
366
  }
136
- return /* @__PURE__ */ m(
137
- Z,
138
- {
139
- scope: e.__scopeSlider,
140
- startEdge: f ? "left" : "right",
141
- endEdge: f ? "right" : "left",
142
- direction: f ? 1 : -1,
143
- size: "width",
144
- children: /* @__PURE__ */ m(
145
- te,
146
- {
147
- dir: g,
148
- "data-orientation": "horizontal",
149
- ...S,
150
- ref: v,
151
- style: {
152
- ...S.style,
153
- "--radix-slider-thumb-transform": "translateX(-50%)"
154
- },
155
- onSlideStart: (b) => {
156
- const h = D(b.clientX);
157
- i?.(h);
158
- },
159
- onSlideMove: (b) => {
160
- const h = D(b.clientX);
161
- s?.(h);
162
- },
163
- onSlideEnd: () => {
164
- R.current = void 0, d?.();
165
- },
166
- onStepKeyDown: (b) => {
167
- const A = q[f ? "from-left" : "from-right"].includes(b.key);
168
- w?.({ event: b, direction: A ? -1 : 1 });
169
- }
170
- }
171
- )
172
- }
173
- );
174
367
  }
175
- ), be = c.forwardRef(
176
- (e, t) => {
177
- const {
178
- min: o,
179
- max: n,
180
- inverted: r,
181
- onSlideStart: l,
182
- onSlideMove: i,
183
- onSlideEnd: s,
184
- onStepKeyDown: d,
185
- ...w
186
- } = e, S = c.useRef(null), a = C(t, S), u = c.useRef(void 0), v = !r;
187
- function R(g) {
188
- const p = u.current || S.current.getBoundingClientRect(), f = [0, p.height], b = F(f, v ? [n, o] : [o, n]);
189
- return u.current = p, b(g - p.top);
368
+ }
369
+ const en = 2;
370
+ function tn(e, t) {
371
+ if (!e)
372
+ return {
373
+ start: 0,
374
+ end: 0
375
+ };
376
+ function r(u) {
377
+ const a = u != null ? parseFloat(u) : 0;
378
+ return Number.isNaN(a) ? 0 : a;
379
+ }
380
+ const i = t ? "Top" : "InlineStart", o = t ? "Bottom" : "InlineEnd";
381
+ return {
382
+ start: r(e[`border${i}Width`]) + r(e[`padding${i}`]),
383
+ end: r(e[`border${o}Width`]) + r(e[`padding${o}`])
384
+ };
385
+ }
386
+ function ke(e, t) {
387
+ if (t.current != null && e.changedTouches) {
388
+ const r = e;
389
+ for (let i = 0; i < r.changedTouches.length; i += 1) {
390
+ const o = r.changedTouches[i];
391
+ if (o.identifier === t.current)
392
+ return {
393
+ x: o.clientX,
394
+ y: o.clientY
395
+ };
190
396
  }
191
- return /* @__PURE__ */ m(
192
- Z,
193
- {
194
- scope: e.__scopeSlider,
195
- startEdge: v ? "bottom" : "top",
196
- endEdge: v ? "top" : "bottom",
197
- size: "height",
198
- direction: v ? 1 : -1,
199
- children: /* @__PURE__ */ m(
200
- te,
201
- {
202
- "data-orientation": "vertical",
203
- ...w,
204
- ref: a,
205
- style: {
206
- ...w.style,
207
- "--radix-slider-thumb-transform": "translateY(50%)"
208
- },
209
- onSlideStart: (g) => {
210
- const p = R(g.clientY);
211
- l?.(p);
212
- },
213
- onSlideMove: (g) => {
214
- const p = R(g.clientY);
215
- i?.(p);
216
- },
217
- onSlideEnd: () => {
218
- u.current = void 0, s?.();
219
- },
220
- onStepKeyDown: (g) => {
221
- const f = q[v ? "from-bottom" : "from-top"].includes(g.key);
222
- d?.({ event: g, direction: f ? -1 : 1 });
223
- }
224
- }
225
- )
226
- }
227
- );
397
+ return null;
228
398
  }
229
- ), te = c.forwardRef(
230
- (e, t) => {
399
+ return {
400
+ x: e.clientX,
401
+ y: e.clientY
402
+ };
403
+ }
404
+ const vt = /* @__PURE__ */ l.forwardRef(function(t, r) {
405
+ const {
406
+ render: i,
407
+ className: o,
408
+ ...u
409
+ } = t, {
410
+ disabled: a,
411
+ dragging: p,
412
+ inset: f,
413
+ lastChangedValueRef: N,
414
+ lastChangeReasonRef: b,
415
+ max: F,
416
+ min: A,
417
+ minStepsBetweenValues: g,
418
+ onValueCommitted: s,
419
+ orientation: V,
420
+ pressedInputRef: I,
421
+ pressedThumbCenterOffsetRef: w,
422
+ pressedThumbIndexRef: v,
423
+ pressedValuesRef: k,
424
+ registerFieldControlRef: he,
425
+ renderBeforeHydration: fe,
426
+ setActive: J,
427
+ setDragging: Q,
428
+ setValue: Z,
429
+ state: ee,
430
+ step: te,
431
+ thumbCollisionBehavior: z,
432
+ thumbRefs: K,
433
+ values: P
434
+ } = $e(), q = rt(), O = P.length > 1, W = V === "vertical", h = l.useRef(null), S = l.useRef(null), ue = U((n) => {
435
+ n && S.current == null && S.current == null && (S.current = getComputedStyle(n));
436
+ }), _ = l.useRef(null), Y = l.useRef(0), Re = l.useRef(0), ce = Ze(P), be = U((n) => {
437
+ v.current !== n && (v.current = n);
438
+ const d = K.current[n];
439
+ if (!d) {
440
+ w.current = null, I.current = null;
441
+ return;
442
+ }
443
+ I.current = d.querySelector('input[type="range"]');
444
+ }), $ = U((n) => {
445
+ const d = h.current;
446
+ if (!d)
447
+ return null;
231
448
  const {
232
- __scopeSlider: o,
233
- onSlideStart: n,
234
- onSlideMove: r,
235
- onSlideEnd: l,
236
- onHomeKeyDown: i,
237
- onEndKeyDown: s,
238
- onStepKeyDown: d,
239
- ...w
240
- } = e, S = T(M, o);
241
- return /* @__PURE__ */ m(
242
- B.span,
243
- {
244
- ...w,
245
- ref: t,
246
- onKeyDown: _(e.onKeyDown, (a) => {
247
- a.key === "Home" ? (i(a), a.preventDefault()) : a.key === "End" ? (s(a), a.preventDefault()) : G.concat(W).includes(a.key) && (d(a), a.preventDefault());
248
- }),
249
- onPointerDown: _(e.onPointerDown, (a) => {
250
- const u = a.target;
251
- u.setPointerCapture(a.pointerId), a.preventDefault(), S.thumbs.has(u) ? u.focus() : n(a);
252
- }),
253
- onPointerMove: _(e.onPointerMove, (a) => {
254
- a.target.hasPointerCapture(a.pointerId) && r(a);
255
- }),
256
- onPointerUp: _(e.onPointerUp, (a) => {
257
- const u = a.target;
258
- u.hasPointerCapture(a.pointerId) && (u.releasePointerCapture(a.pointerId), l(a));
259
- })
260
- }
261
- );
262
- }
263
- ), oe = "SliderTrack", ne = c.forwardRef(
264
- (e, t) => {
265
- const { __scopeSlider: o, ...n } = e, r = T(oe, o);
266
- return /* @__PURE__ */ m(
267
- B.span,
268
- {
269
- "data-disabled": r.disabled ? "" : void 0,
270
- "data-orientation": r.orientation,
271
- ...n,
272
- ref: t
449
+ width: c,
450
+ height: y,
451
+ bottom: m,
452
+ left: T,
453
+ right: G
454
+ } = d.getBoundingClientRect(), oe = tn(S.current, W), me = Re.current, de = (W ? y : c) - oe.start - oe.end - me * 2, Ie = w.current ?? 0, Se = n.x - Ie, Ae = n.y - Ie, x = W ? m - Ae - oe.end : (q === "rtl" ? G - Se : Se - T) - oe.start, Ce = le((x - me) / de, 0, 1);
455
+ let D = (F - A) * Ce + A;
456
+ if (D = gt(D, te, A), D = le(D, A, F), !O)
457
+ return {
458
+ value: D,
459
+ thumbIndex: 0,
460
+ didSwap: !1
461
+ };
462
+ const ie = v.current;
463
+ if (ie < 0)
464
+ return null;
465
+ const X = Zt({
466
+ behavior: z,
467
+ values: P,
468
+ currentValues: ce.current ?? P,
469
+ initialValues: k.current,
470
+ pressedIndex: ie,
471
+ nextValue: D,
472
+ min: A,
473
+ max: F,
474
+ step: te,
475
+ minStepsBetweenValues: g
476
+ });
477
+ return z === "swap" && X.didSwap ? be(X.thumbIndex) : v.current = X.thumbIndex, X;
478
+ }), ne = U((n) => {
479
+ k.current = O ? P.slice() : null, ce.current = P;
480
+ const d = v.current;
481
+ let c = d;
482
+ if (d > -1 && d < P.length) {
483
+ if (P[d] === F) {
484
+ let y = d;
485
+ for (; y > 0 && P[y - 1] === F; )
486
+ y -= 1;
487
+ c = y;
273
488
  }
274
- );
275
- }
276
- );
277
- ne.displayName = oe;
278
- var O = "SliderRange", re = c.forwardRef(
279
- (e, t) => {
280
- const { __scopeSlider: o, ...n } = e, r = T(O, o), l = ee(O, o), i = c.useRef(null), s = C(t, i), d = r.values.length, w = r.values.map(
281
- (u) => se(u, r.min, r.max)
282
- ), S = d > 1 ? Math.min(...w) : 0, a = 100 - Math.max(...w);
283
- return /* @__PURE__ */ m(
284
- B.span,
285
- {
286
- "data-orientation": r.orientation,
287
- "data-disabled": r.disabled ? "" : void 0,
288
- ...n,
289
- ref: s,
290
- style: {
291
- ...e.style,
292
- [l.startEdge]: S + "%",
293
- [l.endEdge]: a + "%"
489
+ } else {
490
+ const y = W ? "y" : "x";
491
+ let m;
492
+ c = -1;
493
+ for (let T = 0; T < K.current.length; T += 1) {
494
+ const G = K.current[T];
495
+ if (We(G)) {
496
+ const oe = bt(G), me = Math.abs(n[y] - oe[y]);
497
+ (m === void 0 || me <= m) && (c = T, m = me);
294
498
  }
295
499
  }
296
- );
297
- }
298
- );
299
- re.displayName = O;
300
- var U = "SliderThumb", ie = c.forwardRef(
301
- (e, t) => {
302
- const o = Se(e.__scopeSlider), [n, r] = c.useState(null), l = C(t, (s) => r(s)), i = c.useMemo(
303
- () => n ? o().findIndex((s) => s.ref.current === n) : -1,
304
- [o, n]
305
- );
306
- return /* @__PURE__ */ m(ye, { ...e, ref: l, index: i });
307
- }
308
- ), ye = c.forwardRef(
309
- (e, t) => {
310
- const { __scopeSlider: o, index: n, name: r, ...l } = e, i = T(U, o), s = ee(U, o), [d, w] = c.useState(null), S = C(t, (D) => w(D)), a = d ? i.form || !!d.closest("form") : !0, u = pe(d), v = i.values[n], R = v === void 0 ? 0 : se(v, i.min, i.max), g = xe(n, i.values.length), p = u?.[s.size], f = p ? Ee(p, R, s.direction) : 0;
311
- return c.useEffect(() => {
312
- if (d)
313
- return i.thumbs.add(d), () => {
314
- i.thumbs.delete(d);
315
- };
316
- }, [d, i.thumbs]), /* @__PURE__ */ j(
317
- "span",
318
- {
319
- style: {
320
- transform: "var(--radix-slider-thumb-transform)",
321
- position: "absolute",
322
- [s.startEdge]: `calc(${R}% + ${f}px)`
323
- },
324
- children: [
325
- /* @__PURE__ */ m(L.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ m(
326
- B.span,
327
- {
328
- role: "slider",
329
- "aria-label": e["aria-label"] || g,
330
- "aria-valuemin": i.min,
331
- "aria-valuenow": v,
332
- "aria-valuemax": i.max,
333
- "aria-orientation": i.orientation,
334
- "data-orientation": i.orientation,
335
- "data-disabled": i.disabled ? "" : void 0,
336
- tabIndex: i.disabled ? void 0 : 0,
337
- ...l,
338
- ref: S,
339
- style: v === void 0 ? { display: "none" } : e.style,
340
- onFocus: _(e.onFocus, () => {
341
- i.valueIndexToChangeRef.current = n;
342
- })
343
- }
344
- ) }),
345
- a && /* @__PURE__ */ m(
346
- ae,
347
- {
348
- name: r ?? (i.name ? i.name + (i.values.length > 1 ? "[]" : "") : void 0),
349
- form: i.form,
350
- value: v
351
- },
352
- n
353
- )
354
- ]
500
+ }
501
+ if (c > -1 && c !== d && be(c), f) {
502
+ const y = K.current[c];
503
+ if (We(y)) {
504
+ const m = y.getBoundingClientRect(), T = W ? "height" : "width";
505
+ Re.current = m[T] / 2;
355
506
  }
356
- );
507
+ }
508
+ }), E = U((n) => {
509
+ K.current?.[n]?.querySelector('input[type="range"]')?.focus({
510
+ preventScroll: !0
511
+ });
512
+ }), ge = U((n) => {
513
+ const d = ke(n, _);
514
+ if (d == null)
515
+ return;
516
+ if (Y.current += 1, n.type === "pointermove" && n.buttons === 0) {
517
+ B(n);
518
+ return;
519
+ }
520
+ const c = $(d);
521
+ c != null && pt(c.value, te, g) && (!p && Y.current > en && Q(!0), Z(c.value, Me(Lt, n, void 0, {
522
+ activeThumbIndex: c.thumbIndex
523
+ })), ce.current = Array.isArray(c.value) ? c.value : [c.value], c.didSwap && E(c.thumbIndex));
524
+ });
525
+ function B(n) {
526
+ J(-1), Q(!1), I.current = null, w.current = null;
527
+ const d = ke(n, _), c = d != null ? $(d) : null;
528
+ if (c != null) {
529
+ const y = b.current;
530
+ s(N.current ?? c.value, et(y, n));
531
+ }
532
+ "pointerType" in n && h.current?.hasPointerCapture(n.pointerId) && h.current?.releasePointerCapture(n.pointerId), v.current = -1, _.current = null, k.current = null, j();
357
533
  }
358
- );
359
- ie.displayName = U;
360
- var Re = "RadioBubbleInput", ae = c.forwardRef(
361
- ({ __scopeSlider: e, value: t, ...o }, n) => {
362
- const r = c.useRef(null), l = C(r, n), i = me(t);
363
- return c.useEffect(() => {
364
- const s = r.current;
365
- if (!s) return;
366
- const d = window.HTMLInputElement.prototype, S = Object.getOwnPropertyDescriptor(d, "value").set;
367
- if (i !== t && S) {
368
- const a = new Event("input", { bubbles: !0 });
369
- S.call(s, t), s.dispatchEvent(a);
370
- }
371
- }, [i, t]), /* @__PURE__ */ m(
372
- B.input,
373
- {
374
- style: { display: "none" },
375
- ...o,
376
- ref: l,
377
- defaultValue: t
534
+ const L = U((n) => {
535
+ if (a)
536
+ return;
537
+ const d = n.changedTouches[0];
538
+ d != null && (_.current = d.identifier);
539
+ const c = ke(n, _);
540
+ if (c != null) {
541
+ ne(c);
542
+ const m = $(c);
543
+ if (m == null)
544
+ return;
545
+ E(m.thumbIndex), Z(m.value, Me(Ge, n, void 0, {
546
+ activeThumbIndex: m.thumbIndex
547
+ })), ce.current = Array.isArray(m.value) ? m.value : [m.value], m.didSwap && E(m.thumbIndex);
548
+ }
549
+ Y.current = 0;
550
+ const y = Te(h.current);
551
+ y.addEventListener("touchmove", ge, {
552
+ passive: !0
553
+ }), y.addEventListener("touchend", B, {
554
+ passive: !0
555
+ });
556
+ }), j = U(() => {
557
+ const n = Te(h.current);
558
+ n.removeEventListener("pointermove", ge), n.removeEventListener("pointerup", B), n.removeEventListener("touchmove", ge), n.removeEventListener("touchend", B), k.current = null;
559
+ }), ve = Kt();
560
+ return l.useEffect(() => {
561
+ const n = h.current;
562
+ return n ? (n.addEventListener("touchstart", L, {
563
+ passive: !0
564
+ }), () => {
565
+ n.removeEventListener("touchstart", L), ve.cancel(), j();
566
+ }) : () => j();
567
+ }, [j, L, h, ve]), l.useEffect(() => {
568
+ a && j();
569
+ }, [a, j]), Oe("div", t, {
570
+ state: ee,
571
+ ref: [r, he, h, ue],
572
+ props: [{
573
+ "data-base-ui-slider-control": fe ? "" : void 0,
574
+ onPointerDown(n) {
575
+ const d = h.current;
576
+ if (!d || a || n.defaultPrevented || !We(n.target) || // Only handle left clicks
577
+ n.button !== 0)
578
+ return;
579
+ const c = ke(n, _);
580
+ if (c != null) {
581
+ ne(c);
582
+ const m = $(c);
583
+ if (m == null)
584
+ return;
585
+ Wt(K.current[m.thumbIndex], nt(Te(d))) ? n.preventDefault() : ve.request(() => {
586
+ E(m.thumbIndex);
587
+ }), Q(!0), w.current != null || (Z(m.value, Me(Ge, n.nativeEvent, void 0, {
588
+ activeThumbIndex: m.thumbIndex
589
+ })), ce.current = Array.isArray(m.value) ? m.value : [m.value], m.didSwap && E(m.thumbIndex));
590
+ }
591
+ n.nativeEvent.pointerId && d.setPointerCapture(n.nativeEvent.pointerId), Y.current = 0;
592
+ const y = Te(h.current);
593
+ y.addEventListener("pointermove", ge, {
594
+ passive: !0
595
+ }), y.addEventListener("pointerup", B, {
596
+ once: !0
597
+ });
598
+ },
599
+ tabIndex: -1
600
+ }, u],
601
+ stateAttributesMapping: Le
602
+ });
603
+ });
604
+ process.env.NODE_ENV !== "production" && (vt.displayName = "SliderControl");
605
+ const yt = /* @__PURE__ */ l.forwardRef(function(t, r) {
606
+ const {
607
+ render: i,
608
+ className: o,
609
+ ...u
610
+ } = t, {
611
+ state: a
612
+ } = $e();
613
+ return Oe("div", t, {
614
+ state: a,
615
+ ref: r,
616
+ props: [{
617
+ style: {
618
+ position: "relative"
378
619
  }
379
- );
380
- }
381
- );
382
- ae.displayName = Re;
383
- function Pe(e = [], t, o) {
384
- const n = [...e];
385
- return n[o] = t, n.sort((r, l) => r - l);
386
- }
387
- function se(e, t, o) {
388
- const l = 100 / (o - t) * (e - t);
389
- return X(l, [0, 100]);
390
- }
391
- function xe(e, t) {
392
- return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
393
- }
394
- function De(e, t) {
395
- if (e.length === 1) return 0;
396
- const o = e.map((r) => Math.abs(r - t)), n = Math.min(...o);
397
- return o.indexOf(n);
620
+ }, u],
621
+ stateAttributesMapping: Le
622
+ });
623
+ });
624
+ process.env.NODE_ENV !== "production" && (yt.displayName = "SliderTrack");
625
+ let nn = /* @__PURE__ */ (function(e) {
626
+ return e.index = "data-index", e.dragging = "data-dragging", e.orientation = "data-orientation", e.disabled = "data-disabled", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.focused = "data-focused", e;
627
+ })({});
628
+ const rn = '!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();', Rt = "PageUp", It = "PageDown", on = /* @__PURE__ */ new Set([ct, lt, at, ut, it, st, Rt, It]);
629
+ function sn(e, t, r, i) {
630
+ if (!(t < 0))
631
+ return e.length === 2 ? t === 0 ? `${_e(e[t], i, r)} start range` : `${_e(e[t], i, r)} end range` : r ? _e(e[t], i, r) : void 0;
398
632
  }
399
- function Ee(e, t, o) {
400
- const n = e / 2, l = F([0, 50], [0, n]);
401
- return (n - l(t) * o) * o;
633
+ function Ne(e, t, r, i, o) {
634
+ return r === 1 ? Math.min(e + t, o) : Math.max(e - t, i);
402
635
  }
403
- function _e(e) {
404
- return e.slice(0, -1).map((t, o) => e[o + 1] - t);
405
- }
406
- function Ce(e, t) {
407
- if (t > 0) {
408
- const o = _e(e);
409
- return Math.min(...o) >= t;
410
- }
411
- return !0;
412
- }
413
- function F(e, t) {
414
- return (o) => {
415
- if (e[0] === e[1] || t[0] === t[1]) return t[0];
416
- const n = (t[1] - t[0]) / (e[1] - e[0]);
417
- return t[0] + n * (o - e[0]);
636
+ const St = /* @__PURE__ */ l.forwardRef(function(t, r) {
637
+ const {
638
+ render: i,
639
+ children: o,
640
+ className: u,
641
+ "aria-describedby": a,
642
+ "aria-label": p,
643
+ "aria-labelledby": f,
644
+ disabled: N = !1,
645
+ getAriaLabel: b,
646
+ getAriaValueText: F,
647
+ id: A,
648
+ index: g,
649
+ inputRef: s,
650
+ onBlur: V,
651
+ onFocus: I,
652
+ onKeyDown: w,
653
+ tabIndex: v,
654
+ ...k
655
+ } = t, {
656
+ nonce: he
657
+ } = Bt(), fe = qe(A), {
658
+ active: J,
659
+ lastUsedThumbIndex: Q,
660
+ controlRef: Z,
661
+ disabled: ee,
662
+ validation: te,
663
+ formatOptionsRef: z,
664
+ handleInputChange: K,
665
+ inset: P,
666
+ labelId: q,
667
+ largeStep: O,
668
+ locale: W,
669
+ max: h,
670
+ min: S,
671
+ minStepsBetweenValues: ue,
672
+ name: _,
673
+ orientation: Y,
674
+ pressedInputRef: Re,
675
+ pressedThumbCenterOffsetRef: ce,
676
+ pressedThumbIndexRef: be,
677
+ renderBeforeHydration: $,
678
+ setActive: ne,
679
+ setIndicatorPosition: E,
680
+ state: ge,
681
+ step: B,
682
+ values: L
683
+ } = $e(), j = rt(), ve = N || ee, re = L.length > 1, n = Y === "vertical", d = j === "rtl", {
684
+ setTouched: c,
685
+ setFocused: y,
686
+ validationMode: m
687
+ } = tt(), T = l.useRef(null), G = l.useRef(null), oe = qe(), me = jt(), de = re ? oe : me, Ie = l.useMemo(() => ({
688
+ inputId: de
689
+ }), [de]), {
690
+ ref: Se,
691
+ index: Ae
692
+ } = Yt({
693
+ metadata: Ie
694
+ }), x = re ? g ?? Ae : 0, Ce = x === L.length - 1, D = L[x], ie = Ye(D, S, h), [X, xe] = l.useState(!1), [Pe, Fe] = l.useState();
695
+ ot(() => xe(!0));
696
+ const we = Q >= 0 && Q < L.length ? Q : -1, Ee = U(() => {
697
+ const R = Z.current, M = T.current;
698
+ if (!R || !M)
699
+ return;
700
+ const H = M.getBoundingClientRect(), Be = R.getBoundingClientRect(), De = n ? "height" : "width", xt = Be[De] - H[De], ze = (H[De] / 2 + xt * ie / 100) / Be[De] * 100;
701
+ Fe(ze), x === 0 ? E((Ue) => [ze, Ue[1]]) : Ce && E((Ue) => [Ue[0], ze]);
702
+ });
703
+ Ke(() => {
704
+ P && queueMicrotask(Ee);
705
+ }, [Ee, P]), Ke(() => {
706
+ P && Ee();
707
+ }, [Ee, P, ie]);
708
+ const He = l.useCallback(() => {
709
+ const R = n ? "bottom" : "insetInlineStart", M = n ? "left" : "top";
710
+ let H;
711
+ return re ? J === x ? H = 2 : we === x && (H = 1) : J === x && (H = 1), P ? {
712
+ "--position": `${Pe}%`,
713
+ visibility: $ && !X || Pe === void 0 ? "hidden" : void 0,
714
+ position: "absolute",
715
+ [R]: "var(--position)",
716
+ [M]: "50%",
717
+ translate: `${(n || !d ? -1 : 1) * 50}% ${(n ? 1 : -1) * 50}%`,
718
+ zIndex: H
719
+ } : Number.isFinite(ie) ? {
720
+ position: "absolute",
721
+ [R]: `${ie}%`,
722
+ [M]: "50%",
723
+ translate: `${(n || !d ? -1 : 1) * 50}% ${(n ? 1 : -1) * 50}%`,
724
+ zIndex: H
725
+ } : Xe;
726
+ }, [J, x, P, X, Pe, re, $, d, we, ie, n]);
727
+ let C;
728
+ Y === "vertical" && (C = d ? "vertical-rl" : "vertical-lr");
729
+ const se = typeof b == "function" ? b(x) : p, ae = At({
730
+ "aria-label": se,
731
+ "aria-labelledby": f ?? (se == null ? q : void 0),
732
+ "aria-describedby": a,
733
+ "aria-orientation": Y,
734
+ "aria-valuenow": D,
735
+ "aria-valuetext": typeof F == "function" ? F(_e(D, W, z.current ?? void 0), D, x) : sn(L, x, z.current ?? void 0, W),
736
+ disabled: ve,
737
+ id: de,
738
+ max: h,
739
+ min: S,
740
+ name: _,
741
+ onChange(R) {
742
+ K(R.target.valueAsNumber, x, R);
743
+ },
744
+ onFocus() {
745
+ ne(x), y(!0);
746
+ },
747
+ onBlur() {
748
+ T.current && (ne(-1), c(!0), y(!1), m === "onBlur" && te.commit(mt(D, x, S, h, re, L)));
749
+ },
750
+ onKeyDown(R) {
751
+ if (!on.has(R.key))
752
+ return;
753
+ qt.has(R.key) && R.stopPropagation();
754
+ let M = null;
755
+ const H = gt(D, B, S);
756
+ switch (R.key) {
757
+ case ct:
758
+ M = Ne(H, R.shiftKey ? O : B, 1, S, h);
759
+ break;
760
+ case ut:
761
+ M = Ne(H, R.shiftKey ? O : B, d ? -1 : 1, S, h);
762
+ break;
763
+ case lt:
764
+ M = Ne(H, R.shiftKey ? O : B, -1, S, h);
765
+ break;
766
+ case at:
767
+ M = Ne(H, R.shiftKey ? O : B, d ? 1 : -1, S, h);
768
+ break;
769
+ case Rt:
770
+ M = Ne(H, O, 1, S, h);
771
+ break;
772
+ case It:
773
+ M = Ne(H, O, -1, S, h);
774
+ break;
775
+ case st:
776
+ M = h, re && (M = Number.isFinite(L[x + 1]) ? L[x + 1] - B * ue : h);
777
+ break;
778
+ case it:
779
+ M = S, re && (M = Number.isFinite(L[x - 1]) ? L[x - 1] + B * ue : S);
780
+ break;
781
+ }
782
+ M !== null && (K(M, x, R), R.preventDefault());
783
+ },
784
+ step: B,
785
+ style: {
786
+ ...Xe,
787
+ // So that VoiceOver's focus indicator matches the thumb's dimensions
788
+ width: "100%",
789
+ height: "100%",
790
+ writingMode: C
791
+ },
792
+ tabIndex: v ?? void 0,
793
+ type: "range",
794
+ value: D ?? ""
795
+ }, te.getInputValidationProps), pe = Vt(G, te.inputRef, s);
796
+ return Oe("div", t, {
797
+ state: ge,
798
+ ref: [r, Se, T],
799
+ props: [{
800
+ [nn.index]: x,
801
+ children: /* @__PURE__ */ Qe(l.Fragment, {
802
+ children: [o, /* @__PURE__ */ ye("input", {
803
+ ref: pe,
804
+ ...ae
805
+ }), P && !X && $ && // this must be rendered with the last thumb to ensure all
806
+ // preceding thumbs are already rendered in the DOM
807
+ Ce && /* @__PURE__ */ ye("script", {
808
+ nonce: he,
809
+ dangerouslySetInnerHTML: {
810
+ __html: rn
811
+ },
812
+ suppressHydrationWarning: !0
813
+ })]
814
+ }),
815
+ id: fe,
816
+ onBlur: V,
817
+ onFocus: I,
818
+ onPointerDown(R) {
819
+ if (be.current = x, T.current != null) {
820
+ const M = Y === "horizontal" ? "x" : "y", H = bt(T.current), Be = (Y === "horizontal" ? R.clientX : R.clientY) - H[M];
821
+ ce.current = Be;
822
+ }
823
+ G.current != null && Re.current !== G.current && (Re.current = G.current);
824
+ },
825
+ style: He(),
826
+ suppressHydrationWarning: $ || void 0,
827
+ tabIndex: -1
828
+ }, k],
829
+ stateAttributesMapping: Le
830
+ });
831
+ });
832
+ process.env.NODE_ENV !== "production" && (St.displayName = "SliderThumb");
833
+ function an(e, t, r, i, o, u) {
834
+ const a = r === void 0 || t && i === void 0 ? "hidden" : void 0, p = e ? "bottom" : "insetInlineStart", f = e ? "height" : "width", b = {
835
+ visibility: o && !u ? "hidden" : a,
836
+ position: e ? "absolute" : "relative",
837
+ [e ? "width" : "height"]: "inherit"
418
838
  };
839
+ return b["--start-position"] = `${r ?? 0}%`, t ? (b["--relative-size"] = `${(i ?? 0) - (r ?? 0)}%`, b[p] = "var(--start-position)", b[f] = "var(--relative-size)", b) : (b[p] = 0, b[f] = "var(--start-position)", b);
419
840
  }
420
- function Me(e) {
421
- return (String(e).split(".")[1] || "").length;
422
- }
423
- function Ae(e, t) {
424
- const o = Math.pow(10, t);
425
- return Math.round(e * o) / o;
841
+ function ln(e, t, r, i) {
842
+ const o = e ? "bottom" : "insetInlineStart", u = e ? "height" : "width", p = {
843
+ position: e ? "absolute" : "relative",
844
+ [e ? "width" : "height"]: "inherit"
845
+ };
846
+ if (!t)
847
+ return p[o] = 0, p[u] = `${r}%`, p;
848
+ const f = i - r;
849
+ return p[o] = `${r}%`, p[u] = `${f}%`, p;
426
850
  }
427
- var Ke = Q, Ie = ne, Be = re, Te = ie;
428
- function Xe({
851
+ const Ct = /* @__PURE__ */ l.forwardRef(function(t, r) {
852
+ const {
853
+ render: i,
854
+ className: o,
855
+ ...u
856
+ } = t, {
857
+ indicatorPosition: a,
858
+ inset: p,
859
+ max: f,
860
+ min: N,
861
+ orientation: b,
862
+ renderBeforeHydration: F,
863
+ state: A,
864
+ values: g
865
+ } = $e(), [s, V] = l.useState(!1);
866
+ ot(() => V(!0));
867
+ const I = b === "vertical", w = g.length > 1, v = p ? an(I, w, a[0], a[1], F, s) : ln(I, w, Ye(g[0], N, f), Ye(g[g.length - 1], N, f));
868
+ return Oe("div", t, {
869
+ state: A,
870
+ ref: r,
871
+ props: [{
872
+ "data-base-ui-slider-indicator": F ? "" : void 0,
873
+ style: v,
874
+ suppressHydrationWarning: F || void 0
875
+ }, u],
876
+ stateAttributesMapping: Le
877
+ });
878
+ });
879
+ process.env.NODE_ENV !== "production" && (Ct.displayName = "SliderIndicator");
880
+ function Fn({
429
881
  className: e,
430
882
  defaultValue: t,
431
- value: o,
432
- min: n = 0,
433
- max: r = 100,
434
- ...l
883
+ value: r,
884
+ min: i = 0,
885
+ max: o = 100,
886
+ ...u
435
887
  }) {
436
- const i = c.useMemo(() => Array.isArray(o) ? o : Array.isArray(t) ? t : [n, r], [o, t, n, r]);
437
- return /* @__PURE__ */ j(
438
- Ke,
888
+ let a;
889
+ return Array.isArray(r) ? a = r : Array.isArray(t) ? a = t : a = [i, o], /* @__PURE__ */ ye(
890
+ ht,
439
891
  {
440
- className: H(
441
- "relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50",
442
- e
443
- ),
892
+ className: Pt("w-full data-[orientation=vertical]:h-full", e),
444
893
  "data-slot": "slider",
445
894
  defaultValue: t,
446
- max: r,
447
- min: n,
448
- value: o,
449
- ...l,
450
- children: [
451
- /* @__PURE__ */ m(
452
- Ie,
895
+ max: o,
896
+ min: i,
897
+ thumbAlignment: "edge",
898
+ value: r,
899
+ ...u,
900
+ children: /* @__PURE__ */ Qe(vt, { className: "relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-disabled:opacity-50", children: [
901
+ /* @__PURE__ */ ye(
902
+ yt,
453
903
  {
454
- className: H(
455
- "relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5"
456
- ),
904
+ className: "relative h-1.5 w-full grow select-none overflow-hidden rounded-full bg-muted data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5",
457
905
  "data-slot": "slider-track",
458
- children: /* @__PURE__ */ m(
459
- Be,
906
+ children: /* @__PURE__ */ ye(
907
+ Ct,
460
908
  {
461
- className: H(
462
- "absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
463
- ),
909
+ className: "h-full select-none bg-primary data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-full",
464
910
  "data-slot": "slider-range"
465
911
  }
466
912
  )
467
913
  }
468
914
  ),
469
- Array.from({ length: i.length }, (s, d) => /* @__PURE__ */ m(
470
- Te,
915
+ Array.from({ length: a.length }, (p, f) => /* @__PURE__ */ ye(
916
+ St,
471
917
  {
472
- className: "block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:outline-hidden focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50",
918
+ className: "relative block size-3 shrink-0 select-none rounded-full border border-primary bg-primary ring-ring/50 transition-[color,box-shadow] after:absolute after:-inset-2 hover:ring-3 focus-visible:outline-hidden focus-visible:ring-3 active:ring-3 disabled:pointer-events-none disabled:opacity-50",
473
919
  "data-slot": "slider-thumb"
474
920
  },
475
- d
921
+ f
476
922
  ))
477
- ]
923
+ ] })
478
924
  }
479
925
  );
480
926
  }
481
927
  export {
482
- Xe as Slider
928
+ Fn as Slider
483
929
  };