xertica-ui 2.1.2 → 2.1.3

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 (402) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +1 -1
  3. package/assets/xertica-logo.svg +37 -37
  4. package/assets/xertica-x-logo.svg +20 -20
  5. package/bin/cli.ts +1 -1
  6. package/bin/generate-tokens.ts +13 -7
  7. package/components/assistant/index.ts +6 -6
  8. package/components/assistant/xertica-assistant/index.ts +2 -0
  9. package/components/assistant/xertica-assistant/use-assistant.ts +564 -0
  10. package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +200 -0
  11. package/components/assistant/xertica-assistant/xertica-assistant.tsx +183 -474
  12. package/components/blocks/card-patterns/ActivityCard.tsx +72 -72
  13. package/components/blocks/card-patterns/FeatureCard.tsx +100 -100
  14. package/components/blocks/card-patterns/NotificationCard.tsx +127 -127
  15. package/components/blocks/card-patterns/ProfileCard.tsx +84 -84
  16. package/components/blocks/card-patterns/ProjectCard.tsx +89 -89
  17. package/components/blocks/card-patterns/QuickActionCard.tsx +62 -62
  18. package/components/blocks/card-patterns/card-patterns.stories.tsx +445 -445
  19. package/components/blocks/card-patterns/index.ts +17 -17
  20. package/components/blocks/index.ts +1 -1
  21. package/components/brand/index.ts +6 -6
  22. package/components/brand/xertica-provider/XerticaProvider.tsx +48 -48
  23. package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
  24. package/components/brand/xertica-provider/xertica-provider.test.tsx +52 -52
  25. package/components/examples/MapExamples.tsx +282 -282
  26. package/components/examples/SimpleFilterableMap.tsx +191 -191
  27. package/components/examples/index.ts +51 -51
  28. package/components/figma/ImageWithFallback.tsx +27 -27
  29. package/components/hooks/index.ts +7 -7
  30. package/components/index.ts +5 -5
  31. package/components/layout/header/header.test.tsx +8 -8
  32. package/components/layout/header/header.tsx +4 -4
  33. package/components/layout/index.ts +2 -2
  34. package/components/layout/sidebar/index.ts +2 -0
  35. package/components/layout/sidebar/sidebar.mdx +1 -1
  36. package/components/layout/sidebar/sidebar.stories.tsx +160 -8
  37. package/components/layout/sidebar/sidebar.test.tsx +11 -11
  38. package/components/layout/sidebar/sidebar.tsx +610 -471
  39. package/components/layout/sidebar/use-sidebar.ts +113 -0
  40. package/components/media/FloatingMediaWrapper.tsx +11 -11
  41. package/components/media/audio-player/AudioPlayer.tsx +22 -22
  42. package/components/media/index.ts +3 -3
  43. package/components/pages/home-content/HomeContent.tsx +7 -7
  44. package/components/pages/home-content/home-content.mdx +62 -62
  45. package/components/pages/home-page/HomePage.stories.tsx +39 -39
  46. package/components/pages/home-page/HomePage.tsx +1 -1
  47. package/components/pages/home-page/home-page.mdx +53 -53
  48. package/components/pages/index.ts +8 -8
  49. package/components/pages/template-content/TemplateContent.tsx +5 -5
  50. package/components/pages/template-content/template-content.mdx +61 -61
  51. package/components/pages/template-page/TemplatePage.stories.tsx +39 -39
  52. package/components/pages/template-page/TemplatePage.tsx +5 -5
  53. package/components/pages/template-page/template-page.mdx +53 -53
  54. package/components/public-api-smoke.test.tsx +52 -52
  55. package/components/shared/assistant-utils.ts +43 -43
  56. package/components/shared/layout-constants.ts +1 -1
  57. package/components/ui/accordion/accordion.mdx +8 -8
  58. package/components/ui/accordion/accordion.stories.tsx +53 -53
  59. package/components/ui/alert/alert.mdx +8 -8
  60. package/components/ui/alert-dialog/alert-dialog.mdx +8 -8
  61. package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -8
  62. package/components/ui/assistant-chart/assistant-chart.mdx +8 -8
  63. package/components/ui/avatar/avatar.mdx +8 -8
  64. package/components/ui/badge/badge.mdx +8 -8
  65. package/components/ui/badge/badge.tsx +9 -9
  66. package/components/ui/breadcrumb/breadcrumb.mdx +8 -8
  67. package/components/ui/button/button.mdx +8 -8
  68. package/components/ui/calendar/calendar.mdx +8 -8
  69. package/components/ui/calendar/calendar.tsx +258 -258
  70. package/components/ui/card/card.mdx +8 -8
  71. package/components/ui/card/card.stories.tsx +245 -245
  72. package/components/ui/carousel/carousel.mdx +8 -8
  73. package/components/ui/chart/chart.mdx +8 -8
  74. package/components/ui/chart/chart.stories.tsx +1303 -344
  75. package/components/ui/chart/chart.test.tsx +154 -154
  76. package/components/ui/chart/chart.tsx +2367 -1494
  77. package/components/ui/checkbox/checkbox.mdx +8 -8
  78. package/components/ui/checkbox/checkbox.stories.tsx +20 -20
  79. package/components/ui/collapsible/collapsible.mdx +8 -8
  80. package/components/ui/command/command.mdx +8 -8
  81. package/components/ui/context-menu/context-menu.mdx +8 -8
  82. package/components/ui/dialog/dialog.mdx +8 -8
  83. package/components/ui/drawer/drawer.mdx +8 -8
  84. package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -8
  85. package/components/ui/empty/empty.mdx +8 -8
  86. package/components/ui/file-upload/file-upload.mdx +8 -8
  87. package/components/ui/file-upload/file-upload.stories.tsx +100 -0
  88. package/components/ui/file-upload/file-upload.tsx +14 -74
  89. package/components/ui/file-upload/index.ts +1 -0
  90. package/components/ui/file-upload/use-file-upload.ts +181 -0
  91. package/components/ui/google-maps-loader/google-maps-loader.tsx +2 -2
  92. package/components/ui/hover-card/hover-card.mdx +8 -8
  93. package/components/ui/input/input.mdx +8 -8
  94. package/components/ui/input-otp/input-otp.mdx +8 -8
  95. package/components/ui/input-otp/input-otp.stories.tsx +6 -6
  96. package/components/ui/label/label.mdx +8 -8
  97. package/components/ui/map/map.mdx +8 -8
  98. package/components/ui/map/map.stories.tsx +51 -51
  99. package/components/ui/map/map.tsx +2 -2
  100. package/components/ui/menubar/menubar.mdx +8 -8
  101. package/components/ui/navigation-menu/navigation-menu.mdx +8 -8
  102. package/components/ui/notification-badge/notification-badge.mdx +8 -8
  103. package/components/ui/pagination/index.ts +2 -0
  104. package/components/ui/pagination/pagination.mdx +8 -8
  105. package/components/ui/pagination/pagination.stories.tsx +94 -0
  106. package/components/ui/pagination/use-pagination.ts +194 -0
  107. package/components/ui/popover/popover.mdx +8 -8
  108. package/components/ui/progress/progress.mdx +8 -8
  109. package/components/ui/progress/progress.tsx +68 -68
  110. package/components/ui/radio-group/radio-group.mdx +8 -8
  111. package/components/ui/rating/rating.mdx +8 -8
  112. package/components/ui/resizable/resizable.mdx +8 -8
  113. package/components/ui/rich-text-editor/index.ts +2 -0
  114. package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +129 -1
  115. package/components/ui/rich-text-editor/rich-text-editor.tsx +86 -305
  116. package/components/ui/rich-text-editor/use-rich-text-editor.ts +439 -0
  117. package/components/ui/route-map/route-map.mdx +8 -8
  118. package/components/ui/route-map/route-map.stories.tsx +54 -54
  119. package/components/ui/route-map/route-map.tsx +2 -2
  120. package/components/ui/scroll-area/scroll-area.mdx +8 -8
  121. package/components/ui/search/search.mdx +8 -8
  122. package/components/ui/select/select.mdx +8 -8
  123. package/components/ui/select/select.stories.tsx +9 -9
  124. package/components/ui/separator/separator.mdx +8 -8
  125. package/components/ui/sheet/sheet.mdx +8 -8
  126. package/components/ui/sheet/sheet.stories.tsx +95 -95
  127. package/components/ui/simple-map/simple-map.mdx +8 -8
  128. package/components/ui/simple-map/simple-map.stories.tsx +48 -48
  129. package/components/ui/skeleton/skeleton.mdx +8 -8
  130. package/components/ui/slider/slider.mdx +8 -8
  131. package/components/ui/sonner/sonner.mdx +8 -8
  132. package/components/ui/stats-card/stats-card.mdx +8 -8
  133. package/components/ui/stepper/index.ts +3 -1
  134. package/components/ui/stepper/stepper.mdx +8 -8
  135. package/components/ui/stepper/stepper.stories.tsx +116 -0
  136. package/components/ui/stepper/stepper.tsx +4 -4
  137. package/components/ui/stepper/use-stepper.ts +137 -0
  138. package/components/ui/switch/switch.mdx +8 -8
  139. package/components/ui/switch/switch.stories.tsx +20 -20
  140. package/components/ui/table/table.mdx +8 -8
  141. package/components/ui/tabs/tabs.mdx +8 -8
  142. package/components/ui/tabs/tabs.stories.tsx +26 -26
  143. package/components/ui/textarea/textarea.mdx +8 -8
  144. package/components/ui/timeline/timeline.mdx +8 -8
  145. package/components/ui/toggle/toggle.mdx +8 -8
  146. package/components/ui/toggle-group/toggle-group.mdx +8 -8
  147. package/components/ui/tooltip/tooltip.mdx +8 -8
  148. package/components/ui/tree-view/index.ts +4 -1
  149. package/components/ui/tree-view/tree-view.mdx +8 -8
  150. package/components/ui/tree-view/tree-view.stories.tsx +110 -4
  151. package/components/ui/tree-view/tree-view.tsx +17 -125
  152. package/components/ui/tree-view/use-tree-view.ts +229 -0
  153. package/components.json +1512 -1512
  154. package/contexts/ApiKeyContext.tsx +72 -72
  155. package/contexts/BrandColorsContext.tsx +26 -26
  156. package/contexts/LanguageContext.tsx +13 -13
  157. package/contexts/LayoutContext.test.tsx +11 -11
  158. package/contexts/LayoutContext.tsx +29 -29
  159. package/contexts/ThemeContext.tsx +26 -26
  160. package/contexts/theme-data.ts +4 -4
  161. package/dist/{AssistantChart-CVzmmhx4.js → AssistantChart-C_hwFRRr.js} +4 -4
  162. package/dist/{AssistantChart-BAx9VQvb.cjs → AssistantChart-CldVCVDe.cjs} +311 -94
  163. package/dist/{AssistantChart-CVko2A1W.js → AssistantChart-Cu3m7RBo.js} +314 -97
  164. package/dist/{AssistantChart-9w31gdAb.cjs → AssistantChart-DoZCyS5r.cjs} +4 -4
  165. package/dist/AudioPlayer-B1lt5cPl.cjs +989 -0
  166. package/dist/AudioPlayer-BZ7bibzU.cjs +982 -0
  167. package/dist/AudioPlayer-C12BjQBV.cjs +997 -0
  168. package/dist/AudioPlayer-DMcG_c7L.js +990 -0
  169. package/dist/AudioPlayer-DcFKRJE_.js +998 -0
  170. package/dist/AudioPlayer-e8LfNoqO.js +983 -0
  171. package/dist/{xertica-assistant-Qp3ydksa.cjs → CodeBlock-7TTgmdGG.cjs} +263 -51
  172. package/dist/{xertica-assistant-gnCJdcZY.js → CodeBlock-BeSt1h5P.js} +219 -7
  173. package/dist/CodeBlock-BgfYL_rD.cjs +2094 -0
  174. package/dist/CodeBlock-BlcqlA9M.cjs +2094 -0
  175. package/dist/CodeBlock-Bnmeu5ez.cjs +2094 -0
  176. package/dist/CodeBlock-BtfPlbAI.js +2078 -0
  177. package/dist/CodeBlock-CIySIuYr.js +2078 -0
  178. package/dist/CodeBlock-CuPtUM-7.cjs +2094 -0
  179. package/dist/CodeBlock-D6ffWXgc.js +2078 -0
  180. package/dist/CodeBlock-D8dcwbit.cjs +2094 -0
  181. package/dist/CodeBlock-DMZrFnlw.cjs +2094 -0
  182. package/dist/CodeBlock-DlBehYN8.js +2078 -0
  183. package/dist/CodeBlock-DnYNI8rQ.js +2078 -0
  184. package/dist/CodeBlock-DvKWbSnE.cjs +2094 -0
  185. package/dist/CodeBlock-DwMCfkFY.js +2078 -0
  186. package/dist/CodeBlock-Dy6CNYyj.js +2078 -0
  187. package/dist/CodeBlock-U1pPOQI7.cjs +2094 -0
  188. package/dist/CodeBlock-f_GpNhEB.js +2078 -0
  189. package/dist/CodeBlock-oB6u8nI1.js +2078 -0
  190. package/dist/CodeBlock-tZC31B73.cjs +2094 -0
  191. package/dist/ImageWithFallback-CGtidP6B.cjs +4542 -0
  192. package/dist/ImageWithFallback-lsg3pdFg.js +4508 -0
  193. package/dist/LanguageSelector-B5YfbHra.js +231 -0
  194. package/dist/LanguageSelector-D6uacAIM.cjs +230 -0
  195. package/dist/LayoutContext-BAql6ZRY.js +97 -0
  196. package/dist/LayoutContext-BvK-ggDa.cjs +96 -0
  197. package/dist/ThemeContext-BoH4NLfN.js +734 -0
  198. package/dist/{ThemeContext-BbBNoFTG.js → ThemeContext-C2EwAPDt.js} +2 -2
  199. package/dist/ThemeContext-r69W20Xg.cjs +733 -0
  200. package/dist/{ThemeContext-Cmr8Ex8H.cjs → ThemeContext-vTjumZeM.cjs} +2 -2
  201. package/dist/{VerifyEmailPage-BE-L9mB7.js → VerifyEmailPage-C0c2e5n0.js} +7 -7
  202. package/dist/{VerifyEmailPage-DMBh4NM9.cjs → VerifyEmailPage-CYXtbKi3.cjs} +1 -1
  203. package/dist/{VerifyEmailPage-CR7kb5df.cjs → VerifyEmailPage-Cwi3kbol.cjs} +7 -7
  204. package/dist/{VerifyEmailPage-CdYPSJoO.js → VerifyEmailPage-DvMLZgFt.js} +1 -1
  205. package/dist/XerticaOrbe-KL1RBHzw.cjs +1354 -0
  206. package/dist/XerticaOrbe-zwS1p2a8.js +1355 -0
  207. package/dist/XerticaProvider-6btlAlzc.js +17 -0
  208. package/dist/XerticaProvider-BNoNOxQ5.cjs +16 -0
  209. package/dist/XerticaProvider-BlY2limY.cjs +38 -0
  210. package/dist/{XerticaProvider-BITjgC5p.js → XerticaProvider-CEoWMTxu.js} +2 -2
  211. package/dist/{XerticaProvider-By8q3Roe.cjs → XerticaProvider-CllrbMEJ.cjs} +2 -2
  212. package/dist/XerticaProvider-DDuiIcKo.js +39 -0
  213. package/dist/XerticaProvider-cI9hSs27.cjs +38 -0
  214. package/dist/XerticaProvider-hSwhNQex.js +39 -0
  215. package/dist/{alert-dialog-yckpaOpy.cjs → alert-dialog-DSKByiKZ.cjs} +3 -3
  216. package/dist/{alert-dialog-iDe5VE5o.js → alert-dialog-s-vmNkJ_.js} +3 -3
  217. package/dist/assistant.cjs.js +2 -1
  218. package/dist/assistant.es.js +3 -2
  219. package/dist/brand.cjs.js +1 -1
  220. package/dist/brand.es.js +1 -1
  221. package/dist/breadcrumb-CqJ7bHY5.js +161 -0
  222. package/dist/breadcrumb-m9Hb2_XN.cjs +177 -0
  223. package/dist/cli.js +14 -8
  224. package/dist/components/assistant/xertica-assistant/index.d.ts +2 -0
  225. package/dist/components/assistant/xertica-assistant/use-assistant.d.ts +126 -0
  226. package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +7 -2
  227. package/dist/components/blocks/audio-player/AudioPlayer.d.ts +35 -0
  228. package/dist/components/blocks/audio-player/index.d.ts +1 -0
  229. package/dist/components/blocks/document-editor/DocumentEditor.d.ts +26 -0
  230. package/dist/components/blocks/document-editor/index.d.ts +1 -0
  231. package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +41 -0
  232. package/dist/components/blocks/podcast-player/index.d.ts +1 -0
  233. package/dist/components/layout/sidebar/index.d.ts +2 -0
  234. package/dist/components/layout/sidebar/sidebar.d.ts +80 -0
  235. package/dist/components/layout/sidebar/use-sidebar.d.ts +22 -0
  236. package/dist/components/shared/layout-constants.d.ts +1 -1
  237. package/dist/components/ui/button/button.d.ts +1 -1
  238. package/dist/components/ui/chart/chart.d.ts +162 -5
  239. package/dist/components/ui/file-upload/file-upload.d.ts +2 -0
  240. package/dist/components/ui/file-upload/index.d.ts +1 -0
  241. package/dist/components/ui/file-upload/use-file-upload.d.ts +49 -0
  242. package/dist/components/ui/pagination/index.d.ts +2 -0
  243. package/dist/components/ui/pagination/use-pagination.d.ts +78 -0
  244. package/dist/components/ui/rich-text-editor/index.d.ts +2 -0
  245. package/dist/components/ui/rich-text-editor/use-rich-text-editor.d.ts +107 -0
  246. package/dist/components/ui/stepper/index.d.ts +3 -1
  247. package/dist/components/ui/stepper/stepper.d.ts +2 -2
  248. package/dist/components/ui/stepper/use-stepper.d.ts +60 -0
  249. package/dist/components/ui/tree-view/index.d.ts +4 -1
  250. package/dist/components/ui/tree-view/tree-view.d.ts +4 -6
  251. package/dist/components/ui/tree-view/use-tree-view.d.ts +60 -0
  252. package/dist/dropdown-menu-BDB5CmQs.cjs +247 -0
  253. package/dist/dropdown-menu-DQidbKBD.js +231 -0
  254. package/dist/google-maps-loader-BFWp6VPd.js +287 -0
  255. package/dist/{google-maps-loader-t2IlYBzw.js → google-maps-loader-CTYySAun.js} +4 -0
  256. package/dist/{google-maps-loader-BqsYL48U.cjs → google-maps-loader-Y-QkD-Li.cjs} +5 -0
  257. package/dist/google-maps-loader-eS3uQ5TA.cjs +287 -0
  258. package/dist/header-Cgy6vYPk.cjs +731 -0
  259. package/dist/header-DRlT4jgI.js +715 -0
  260. package/dist/header-Dux00SI4.cjs +731 -0
  261. package/dist/header-EkGKXPsD.js +715 -0
  262. package/dist/header-WfEywpyc.cjs +731 -0
  263. package/dist/header-tifNQn2U.js +715 -0
  264. package/dist/hooks.cjs.js +1 -1
  265. package/dist/hooks.es.js +1 -1
  266. package/dist/index-BhapVLVj.js +8 -0
  267. package/dist/{index-D3RLKRAs.cjs → index-COtD8bRW.cjs} +1 -1
  268. package/dist/index-D6fxYEY8.cjs +7 -0
  269. package/dist/index-DW5tYe26.js +8 -0
  270. package/dist/index.cjs.js +19 -8
  271. package/dist/index.es.js +39 -28
  272. package/dist/index.umd.js +1043 -470
  273. package/dist/input-2R4loU86.js +127 -0
  274. package/dist/input-DWANSKGb.cjs +145 -0
  275. package/dist/layout.cjs.js +89 -1
  276. package/dist/layout.es.js +90 -2
  277. package/dist/pages.cjs.js +1 -1
  278. package/dist/pages.es.js +1 -1
  279. package/dist/rich-text-editor-0mraWT5y.cjs +2376 -0
  280. package/dist/rich-text-editor-B6jMRLzk.cjs +1939 -0
  281. package/dist/rich-text-editor-B8_oYcIR.js +1730 -0
  282. package/dist/rich-text-editor-B9UbSXNb.js +1203 -0
  283. package/dist/rich-text-editor-BYuRBNBU.js +2373 -0
  284. package/dist/rich-text-editor-Bb9pySTs.cjs +2374 -0
  285. package/dist/rich-text-editor-BcL6L3cm.cjs +2374 -0
  286. package/dist/rich-text-editor-BoVZYtTs.cjs +2391 -0
  287. package/dist/rich-text-editor-CPV1lEPH.cjs +1748 -0
  288. package/dist/rich-text-editor-CoKqbCtu.cjs +1799 -0
  289. package/dist/rich-text-editor-Cw56T_mB.js +2356 -0
  290. package/dist/rich-text-editor-Cyt8qs2b.js +1921 -0
  291. package/dist/rich-text-editor-D6H84OcX.cjs +1220 -0
  292. package/dist/rich-text-editor-D76gD-QI.js +2328 -0
  293. package/dist/rich-text-editor-DKkokOnA.js +1781 -0
  294. package/dist/rich-text-editor-DNsdpN64.cjs +2359 -0
  295. package/dist/rich-text-editor-DfG8bCyY.js +2358 -0
  296. package/dist/rich-text-editor-DgF8s7xW.js +2949 -0
  297. package/dist/rich-text-editor-Dxjw31Z4.js +2341 -0
  298. package/dist/rich-text-editor-DzP0Epmb.js +2356 -0
  299. package/dist/rich-text-editor-mWoaSCE4.cjs +2966 -0
  300. package/dist/rich-text-editor-skplNlBM.cjs +2345 -0
  301. package/dist/select-Bkbr0f-Z.cjs +162 -0
  302. package/dist/select-CvIVdX2n.js +145 -0
  303. package/dist/sidebar-CK_0ZQHj.cjs +803 -0
  304. package/dist/sidebar-CUuOvYhK.js +787 -0
  305. package/dist/slider-Bc5Hd0y1.js +56 -0
  306. package/dist/slider-N7hFFj6X.cjs +73 -0
  307. package/dist/tooltip-Ded96neP.cjs +137 -0
  308. package/dist/tooltip-HDOoD2-0.js +120 -0
  309. package/dist/ui.cjs.js +14 -4
  310. package/dist/ui.es.js +26 -16
  311. package/dist/use-mobile-B0hNy_Y6.cjs +4303 -0
  312. package/dist/use-mobile-BXuYROXM.js +4202 -0
  313. package/dist/use-mobile-Bbd51ASU.cjs +4392 -0
  314. package/dist/use-mobile-Bk6CX-TC.js +4359 -0
  315. package/dist/use-mobile-BvYdisLP.js +4202 -0
  316. package/dist/use-mobile-BzuxjzNX.cjs +4392 -0
  317. package/dist/use-mobile-CG2-SdXV.cjs +4235 -0
  318. package/dist/use-mobile-CKb5pqTs.js +4269 -0
  319. package/dist/use-mobile-CYuAuGDl.js +4202 -0
  320. package/dist/use-mobile-CaENcqm-.js +4508 -0
  321. package/dist/use-mobile-CbrYgJGJ.js +4203 -0
  322. package/dist/use-mobile-DMOvImGQ.cjs +4542 -0
  323. package/dist/use-mobile-DRB3BQgD.cjs +4235 -0
  324. package/dist/use-mobile-DZvv7QMR.js +4359 -0
  325. package/dist/use-mobile-DdI_TXam.cjs +4235 -0
  326. package/dist/use-mobile-DlceKf8a.js +4359 -0
  327. package/dist/use-mobile-DsOnow1o.cjs +4236 -0
  328. package/dist/use-mobile-Kcj6jSnK.cjs +4392 -0
  329. package/dist/use-mobile-bnKcua_i.js +4202 -0
  330. package/dist/use-mobile-ncXBeE2z.cjs +4235 -0
  331. package/dist/{xertica-assistant-B1IaHXnB.cjs → xertica-assistant-dyP7KHM5.cjs} +533 -392
  332. package/dist/{xertica-assistant-DPsESB6t.js → xertica-assistant-yX1CFBBo.js} +535 -394
  333. package/dist/xertica-ui.css +2 -2
  334. package/docs/ai-usage.md +28 -10
  335. package/docs/architecture.md +76 -0
  336. package/docs/components/assistant.md +159 -0
  337. package/docs/components/calendar.md +154 -154
  338. package/docs/components/card-patterns.md +337 -337
  339. package/docs/components/card.md +235 -235
  340. package/docs/components/chart.md +354 -39
  341. package/docs/components/file-upload.md +119 -2
  342. package/docs/components/map.md +84 -84
  343. package/docs/components/pagination.md +187 -0
  344. package/docs/components/rich-text-editor.md +164 -0
  345. package/docs/components/sidebar.md +153 -4
  346. package/docs/components/stepper.md +157 -12
  347. package/docs/components/tree-view.md +164 -6
  348. package/docs/components/xertica-provider.md +24 -24
  349. package/docs/decision-tree.md +287 -287
  350. package/docs/getting-started.md +1 -1
  351. package/docs/guidelines.md +14 -8
  352. package/docs/layout.md +2 -2
  353. package/docs/llms.md +4 -4
  354. package/guidelines/Guidelines.md +252 -250
  355. package/hooks/useTheme.ts +3 -3
  356. package/imports/Podcast.tsx +388 -388
  357. package/imports/XerticaAi.tsx +45 -45
  358. package/imports/XerticaX.tsx +19 -19
  359. package/imports/svg-aueiaqngck.ts +11 -11
  360. package/imports/svg-v9krss1ozd.ts +16 -16
  361. package/imports/svg-vhrdofe3qe.ts +5 -5
  362. package/llms-compact.txt +327 -327
  363. package/llms.txt +160 -160
  364. package/package.json +203 -203
  365. package/styles/xertica/app-overrides/chat.css +61 -61
  366. package/styles/xertica/app-overrides/scrollbar.css +33 -33
  367. package/styles/xertica/integrations/google-maps.css +76 -76
  368. package/styles/xertica/integrations/sonner.css +73 -73
  369. package/styles/xertica/tokens.css +41 -12
  370. package/templates/CLAUDE.md +182 -172
  371. package/templates/guidelines/Guidelines.md +325 -313
  372. package/templates/package.json +3 -3
  373. package/templates/src/features/auth/index.ts +4 -4
  374. package/templates/src/features/auth/ui/AuthPageShell.tsx +34 -34
  375. package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -70
  376. package/templates/src/features/auth/ui/LoginContent.tsx +90 -90
  377. package/templates/src/features/auth/ui/ResetPasswordContent.tsx +151 -151
  378. package/templates/src/features/auth/ui/SocialLoginButtons.tsx +59 -59
  379. package/templates/src/features/auth/ui/VerifyEmailContent.tsx +82 -82
  380. package/templates/src/features/home/index.ts +1 -1
  381. package/templates/src/features/home/ui/HomeContent.tsx +100 -100
  382. package/templates/src/features/template/index.ts +5 -5
  383. package/templates/src/features/template/ui/CrudTemplate.tsx +3 -3
  384. package/templates/src/features/template/ui/DashboardTemplate.tsx +3 -3
  385. package/templates/src/features/template/ui/FormTemplate.tsx +120 -120
  386. package/templates/src/features/template/ui/LoginTemplate.tsx +3 -3
  387. package/templates/src/pages/AssistantPage.tsx +328 -328
  388. package/templates/src/pages/ForgotPasswordPage.tsx +6 -6
  389. package/templates/src/pages/HomePage.tsx +57 -57
  390. package/templates/src/pages/LoginPage.tsx +10 -10
  391. package/templates/src/pages/ResetPasswordPage.tsx +6 -6
  392. package/templates/src/pages/TemplatePage.tsx +30 -30
  393. package/templates/src/pages/VerifyEmailPage.tsx +6 -6
  394. package/templates/src/shared/config/navigation.ts +20 -20
  395. package/templates/src/shared/lib/auth.ts +20 -20
  396. package/templates/src/shared/types/auth.ts +3 -3
  397. package/templates/src/styles/xertica/tokens.css +39 -10
  398. package/templates/tsconfig.json +5 -5
  399. package/utils/gemini.ts +140 -140
  400. package/dist/VerifyEmailPage-Bae2cBXT.cjs +0 -2827
  401. package/dist/VerifyEmailPage-CbgjOF0v.js +0 -2828
  402. package/dist/index-CkTUgOwX.js +0 -8
@@ -0,0 +1,4202 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Slot, Slottable } from "@radix-ui/react-slot";
3
+ import { cva } from "class-variance-authority";
4
+ import { e as cn, B as Button, d as buttonVariants } from "./tooltip-HDOoD2-0.js";
5
+ import * as React from "react";
6
+ import React__default, { useRef, useEffect, useState } from "react";
7
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
8
+ import { Check, ChevronLeft, GripVerticalIcon, ChevronDownIcon, MoreHorizontalIcon, ChevronRightIcon, ChevronLeftIcon, MinusIcon, ChevronRight, ChevronDown, XIcon, CheckIcon, CircleIcon, SearchIcon, TrendingUp, TrendingDown, Minus, ArrowRight, ArrowLeft, X, Upload, AlertCircle, FileIcon, Star, Search as Search$1 } from "lucide-react";
9
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
10
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
11
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
12
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
13
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
14
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
15
+ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
16
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
17
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
18
+ import { OTPInput, OTPInputContext } from "input-otp";
19
+ import { FormProvider, Controller, useFormContext, useFormState } from "react-hook-form";
20
+ import * as LabelPrimitive from "@radix-ui/react-label";
21
+ import { getDefaultClassNames, DayPicker } from "react-day-picker";
22
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
23
+ import { Drawer as Drawer$1 } from "vaul";
24
+ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
25
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
26
+ import * as MenubarPrimitive from "@radix-ui/react-menubar";
27
+ import { Command as Command$1 } from "cmdk";
28
+ import { r as Dialog, x as DialogHeader, B as DialogTitle, v as DialogDescription, u as DialogContent, C as Card, d as CardContent, j as ChartContainer, n as ChartTooltip, o as ChartTooltipContent } from "./rich-text-editor-BYuRBNBU.js";
29
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
30
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
31
+ import useEmblaCarousel from "embla-carousel-react";
32
+ import { u as useGoogleMapsLoader } from "./google-maps-loader-BFWp6VPd.js";
33
+ import { createRoot } from "react-dom/client";
34
+ import { BarChart, CartesianGrid, XAxis, Bar } from "recharts";
35
+ function Label({
36
+ className,
37
+ size = "md",
38
+ ...props
39
+ }) {
40
+ const sizeClasses = {
41
+ sm: "text-xs",
42
+ md: "text-sm",
43
+ lg: "text-base"
44
+ };
45
+ return /* @__PURE__ */ jsx(
46
+ LabelPrimitive.Root,
47
+ {
48
+ "data-slot": "label",
49
+ className: cn(
50
+ "flex items-center gap-2 leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
51
+ sizeClasses[size],
52
+ className
53
+ ),
54
+ ...props
55
+ }
56
+ );
57
+ }
58
+ const badgeVariants = cva(
59
+ "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
60
+ {
61
+ variants: {
62
+ variant: {
63
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
64
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
65
+ destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
66
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
67
+ success: "border-transparent bg-[var(--toast-success-bg)] text-[var(--toast-success-icon)]",
68
+ warning: "border-transparent bg-[var(--toast-warning-bg)] text-[var(--toast-warning-icon)]",
69
+ info: "border-transparent bg-[var(--toast-info-bg)] text-[var(--toast-info-icon)]"
70
+ }
71
+ },
72
+ defaultVariants: {
73
+ variant: "default"
74
+ }
75
+ }
76
+ );
77
+ function Badge({
78
+ className,
79
+ variant,
80
+ asChild = false,
81
+ children,
82
+ ...props
83
+ }) {
84
+ const Comp = asChild ? Slot : "span";
85
+ return /* @__PURE__ */ jsx(
86
+ Comp,
87
+ {
88
+ "data-slot": "badge",
89
+ className: cn(badgeVariants({ variant }), className),
90
+ ...props,
91
+ children: /* @__PURE__ */ jsx(Slottable, { children })
92
+ }
93
+ );
94
+ }
95
+ const Checkbox = React.forwardRef(({ className, size = "md", ...props }, ref) => {
96
+ const sizeClasses = {
97
+ sm: "size-3.5",
98
+ md: "size-4",
99
+ lg: "size-5"
100
+ };
101
+ const iconSizeClasses = {
102
+ sm: "size-3",
103
+ md: "size-3.5",
104
+ lg: "size-4"
105
+ };
106
+ return /* @__PURE__ */ jsx(
107
+ CheckboxPrimitive.Root,
108
+ {
109
+ ref,
110
+ "data-slot": "checkbox",
111
+ className: cn(
112
+ "peer border bg-white dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
113
+ sizeClasses[size],
114
+ className
115
+ ),
116
+ ...props,
117
+ children: /* @__PURE__ */ jsx(
118
+ CheckboxPrimitive.Indicator,
119
+ {
120
+ "data-slot": "checkbox-indicator",
121
+ className: "flex items-center justify-center text-current transition-none",
122
+ children: /* @__PURE__ */ jsx(Check, { className: iconSizeClasses[size] })
123
+ }
124
+ )
125
+ }
126
+ );
127
+ });
128
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
129
+ const RadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
130
+ RadioGroupPrimitive.Root,
131
+ {
132
+ className: cn("grid gap-4", className),
133
+ ...props,
134
+ ref
135
+ }
136
+ ));
137
+ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
138
+ const RadioGroupItem = React.forwardRef(({ className, size = "md", ...props }, ref) => {
139
+ const sizeClasses = {
140
+ sm: "size-4",
141
+ md: "size-5",
142
+ lg: "size-6"
143
+ };
144
+ const dotSizeClasses = {
145
+ sm: "size-2",
146
+ md: "size-2.5",
147
+ lg: "size-3"
148
+ };
149
+ return /* @__PURE__ */ jsx(
150
+ RadioGroupPrimitive.Item,
151
+ {
152
+ ref,
153
+ "data-slot": "radio-group-item",
154
+ className: cn(
155
+ // Base styles - Material UI inspired
156
+ "relative aspect-square shrink-0 rounded-full border-2 transition-all duration-200 outline-none cursor-pointer",
157
+ // Default state - sempre com contorno usando variáveis CSS
158
+ "border-muted-foreground bg-background",
159
+ // Hover state - usa variável primary
160
+ "hover:border-primary hover:shadow-md",
161
+ // Focus state - usa variável primary
162
+ "focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
163
+ // Checked state - mantém contorno com primary
164
+ "data-[state=checked]:border-primary data-[state=checked]:bg-background",
165
+ // Disabled state
166
+ "disabled:cursor-not-allowed disabled:opacity-50 disabled:border-muted",
167
+ // Invalid state - usa variável destructive
168
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20",
169
+ sizeClasses[size],
170
+ className
171
+ ),
172
+ ...props,
173
+ children: /* @__PURE__ */ jsx(
174
+ RadioGroupPrimitive.Indicator,
175
+ {
176
+ "data-slot": "radio-group-indicator",
177
+ className: "flex items-center justify-center",
178
+ children: /* @__PURE__ */ jsx("div", { className: cn("rounded-full bg-primary transition-all duration-200", dotSizeClasses[size]) })
179
+ }
180
+ )
181
+ }
182
+ );
183
+ });
184
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
185
+ const Switch = React.forwardRef(({ className, size = "md", ...props }, ref) => {
186
+ const trackClasses = {
187
+ sm: "h-3.5 w-7",
188
+ md: "h-[1.15rem] w-8",
189
+ lg: "h-[1.375rem] w-10"
190
+ };
191
+ const thumbClasses = {
192
+ sm: "size-3",
193
+ md: "size-4",
194
+ lg: "size-5"
195
+ };
196
+ return /* @__PURE__ */ jsx(
197
+ SwitchPrimitive.Root,
198
+ {
199
+ className: cn(
200
+ "peer inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none disabled:cursor-not-allowed disabled:opacity-50",
201
+ "data-[state=checked]:bg-primary",
202
+ "data-[state=unchecked]:bg-muted",
203
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
204
+ trackClasses[size],
205
+ className
206
+ ),
207
+ ...props,
208
+ ref,
209
+ children: /* @__PURE__ */ jsx(
210
+ SwitchPrimitive.Thumb,
211
+ {
212
+ className: cn(
213
+ "pointer-events-none block rounded-full ring-0 transition-transform shadow-sm",
214
+ "bg-background",
215
+ "data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0",
216
+ thumbClasses[size]
217
+ )
218
+ }
219
+ )
220
+ }
221
+ );
222
+ });
223
+ Switch.displayName = SwitchPrimitive.Root.displayName;
224
+ const trackVariants = {
225
+ default: "bg-primary/20",
226
+ success: "bg-success/20",
227
+ info: "bg-info/20",
228
+ warning: "bg-warning/20",
229
+ destructive: "bg-destructive/20"
230
+ };
231
+ const indicatorVariants = {
232
+ default: "bg-primary",
233
+ success: "bg-success",
234
+ info: "bg-info",
235
+ warning: "bg-warning",
236
+ destructive: "bg-destructive"
237
+ };
238
+ function Progress({
239
+ className,
240
+ value,
241
+ variant = "default",
242
+ ...props
243
+ }) {
244
+ return /* @__PURE__ */ jsx(
245
+ ProgressPrimitive.Root,
246
+ {
247
+ "data-slot": "progress",
248
+ "aria-label": props["aria-label"] || "Progresso",
249
+ className: cn(
250
+ "relative h-2 w-full overflow-hidden rounded-full",
251
+ trackVariants[variant],
252
+ className
253
+ ),
254
+ ...props,
255
+ children: /* @__PURE__ */ jsx(
256
+ ProgressPrimitive.Indicator,
257
+ {
258
+ "data-slot": "progress-indicator",
259
+ className: cn("h-full w-full flex-1 transition-all", indicatorVariants[variant]),
260
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
261
+ }
262
+ )
263
+ }
264
+ );
265
+ }
266
+ function Separator({
267
+ className,
268
+ orientation = "horizontal",
269
+ decorative = true,
270
+ ...props
271
+ }) {
272
+ return /* @__PURE__ */ jsx(
273
+ SeparatorPrimitive.Root,
274
+ {
275
+ "data-slot": "separator-root",
276
+ decorative,
277
+ orientation,
278
+ className: cn(
279
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
280
+ className
281
+ ),
282
+ ...props
283
+ }
284
+ );
285
+ }
286
+ function useMapLayers(map, layers) {
287
+ const trafficLayerRef = useRef(null);
288
+ const transitLayerRef = useRef(null);
289
+ const bicyclingLayerRef = useRef(null);
290
+ useEffect(() => {
291
+ if (!map) return;
292
+ if (layers.traffic) {
293
+ if (!trafficLayerRef.current) {
294
+ trafficLayerRef.current = new google.maps.TrafficLayer();
295
+ }
296
+ trafficLayerRef.current.setMap(map);
297
+ } else {
298
+ if (trafficLayerRef.current) {
299
+ trafficLayerRef.current.setMap(null);
300
+ }
301
+ }
302
+ return () => {
303
+ if (trafficLayerRef.current) {
304
+ trafficLayerRef.current.setMap(null);
305
+ }
306
+ };
307
+ }, [map, layers.traffic]);
308
+ useEffect(() => {
309
+ if (!map) return;
310
+ if (layers.transit) {
311
+ if (!transitLayerRef.current) {
312
+ transitLayerRef.current = new google.maps.TransitLayer();
313
+ }
314
+ transitLayerRef.current.setMap(map);
315
+ } else {
316
+ if (transitLayerRef.current) {
317
+ transitLayerRef.current.setMap(null);
318
+ }
319
+ }
320
+ return () => {
321
+ if (transitLayerRef.current) {
322
+ transitLayerRef.current.setMap(null);
323
+ }
324
+ };
325
+ }, [map, layers.transit]);
326
+ useEffect(() => {
327
+ if (!map) return;
328
+ if (layers.bicycling) {
329
+ if (!bicyclingLayerRef.current) {
330
+ bicyclingLayerRef.current = new google.maps.BicyclingLayer();
331
+ }
332
+ bicyclingLayerRef.current.setMap(map);
333
+ } else {
334
+ if (bicyclingLayerRef.current) {
335
+ bicyclingLayerRef.current.setMap(null);
336
+ }
337
+ }
338
+ return () => {
339
+ if (bicyclingLayerRef.current) {
340
+ bicyclingLayerRef.current.setMap(null);
341
+ }
342
+ };
343
+ }, [map, layers.bicycling]);
344
+ }
345
+ const __vite_import_meta_env__$1 = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_GEMINI_API_KEY": "AIzaSyBnoWKe4LjQzlIklON_dVXMXNUl2gvfH6U", "VITE_GOOGLE_MAPS_API_KEY": "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" };
346
+ const DEFAULT_CENTER = { lat: -23.5505, lng: -46.6333 };
347
+ const DEFAULT_ZOOM = 12;
348
+ const MapContent = React__default.forwardRef(
349
+ ({ apiKey, ...props }, ref) => {
350
+ const { isLoaded, loadError, load } = useGoogleMapsLoader();
351
+ const {
352
+ center = DEFAULT_CENTER,
353
+ zoom = DEFAULT_ZOOM,
354
+ markers = [],
355
+ circle,
356
+ polygon,
357
+ layers,
358
+ height = "400px",
359
+ mapContainerClassName,
360
+ disableDefaultUI = false,
361
+ zoomControl = true,
362
+ streetViewControl = false,
363
+ mapTypeControl = false,
364
+ fullscreenControl = true,
365
+ gestureHandling = "cooperative",
366
+ onMapLoad,
367
+ className,
368
+ ...divProps
369
+ } = props;
370
+ const [selectedMarker, setSelectedMarker] = useState(null);
371
+ const mapRef = useRef(null);
372
+ const gmpMapRef = useRef(null);
373
+ const infoWindowRef = useRef(null);
374
+ const circleRef = useRef(null);
375
+ const polygonRef = useRef(null);
376
+ const [themeColors, setThemeColors] = useState({
377
+ primary: "#4F46E5",
378
+ chart2: "#10B981"
379
+ });
380
+ useEffect(() => {
381
+ if (typeof window !== "undefined") {
382
+ const styles = getComputedStyle(document.documentElement);
383
+ setThemeColors({
384
+ primary: styles.getPropertyValue("--primary").trim() || "#4F46E5",
385
+ chart2: styles.getPropertyValue("--chart-2").trim() || "#10B981"
386
+ });
387
+ }
388
+ }, []);
389
+ useEffect(() => {
390
+ if (!isLoaded && apiKey && !loadError && load) {
391
+ load(apiKey).catch(console.error);
392
+ }
393
+ }, [isLoaded, apiKey, loadError, load]);
394
+ useEffect(() => {
395
+ if (!isLoaded || !gmpMapRef.current) return;
396
+ const gmpMap = gmpMapRef.current;
397
+ if (gmpMap.innerMap) {
398
+ mapRef.current = gmpMap.innerMap;
399
+ if (onMapLoad) {
400
+ onMapLoad(gmpMap.innerMap);
401
+ }
402
+ } else {
403
+ const interval = setInterval(() => {
404
+ if (gmpMap.innerMap) {
405
+ mapRef.current = gmpMap.innerMap;
406
+ if (onMapLoad) {
407
+ onMapLoad(gmpMap.innerMap);
408
+ }
409
+ clearInterval(interval);
410
+ }
411
+ }, 100);
412
+ return () => clearInterval(interval);
413
+ }
414
+ return () => {
415
+ mapRef.current = null;
416
+ };
417
+ }, [isLoaded]);
418
+ useEffect(() => {
419
+ if (gmpMapRef.current) {
420
+ if (center) gmpMapRef.current.center = center;
421
+ }
422
+ }, [center]);
423
+ useEffect(() => {
424
+ if (gmpMapRef.current) {
425
+ if (zoom !== void 0) gmpMapRef.current.zoom = zoom;
426
+ }
427
+ }, [zoom]);
428
+ useEffect(() => {
429
+ if (gmpMapRef.current) {
430
+ if (props.mapTypeId) gmpMapRef.current.mapTypeId = props.mapTypeId;
431
+ }
432
+ }, [props.mapTypeId]);
433
+ useEffect(() => {
434
+ var _a;
435
+ const map = mapRef.current;
436
+ if (!map || !isLoaded) return;
437
+ (_a = circleRef.current) == null ? void 0 : _a.setMap(null);
438
+ circleRef.current = null;
439
+ if (circle && circle.center && circle.radius) {
440
+ circleRef.current = new google.maps.Circle({
441
+ map,
442
+ center: circle.center,
443
+ radius: circle.radius,
444
+ fillColor: circle.fillColor || themeColors.primary,
445
+ fillOpacity: 0.2,
446
+ strokeColor: circle.strokeColor || themeColors.primary,
447
+ strokeOpacity: 0.8,
448
+ strokeWeight: 2
449
+ });
450
+ }
451
+ return () => {
452
+ var _a2;
453
+ (_a2 = circleRef.current) == null ? void 0 : _a2.setMap(null);
454
+ };
455
+ }, [circle, isLoaded, themeColors, mapRef.current]);
456
+ useEffect(() => {
457
+ var _a;
458
+ const map = mapRef.current;
459
+ if (!map || !isLoaded) return;
460
+ (_a = polygonRef.current) == null ? void 0 : _a.setMap(null);
461
+ polygonRef.current = null;
462
+ if (polygon && polygon.paths) {
463
+ polygonRef.current = new google.maps.Polygon({
464
+ map,
465
+ paths: polygon.paths,
466
+ fillColor: polygon.fillColor || themeColors.chart2,
467
+ fillOpacity: 0.2,
468
+ strokeColor: polygon.strokeColor || themeColors.chart2,
469
+ strokeOpacity: 0.8,
470
+ strokeWeight: 2
471
+ });
472
+ }
473
+ return () => {
474
+ var _a2;
475
+ (_a2 = polygonRef.current) == null ? void 0 : _a2.setMap(null);
476
+ };
477
+ }, [polygon, isLoaded, themeColors, mapRef.current]);
478
+ useMapLayers(mapRef.current, layers || {});
479
+ useEffect(() => {
480
+ var _a;
481
+ const map = mapRef.current;
482
+ if (!map || selectedMarker === null) {
483
+ (_a = infoWindowRef.current) == null ? void 0 : _a.close();
484
+ return;
485
+ }
486
+ const markerData = markers[selectedMarker];
487
+ if (!markerData) return;
488
+ }, [selectedMarker, markers]);
489
+ const handleMarkerClick = (index, markerElement) => {
490
+ setSelectedMarker(index);
491
+ const map = mapRef.current;
492
+ if (!map) return;
493
+ const markerData = markers[index];
494
+ if (!markerData) return;
495
+ let contentToRender = markerData.richContent;
496
+ if (!contentToRender && (markerData.title || markerData.info)) {
497
+ contentToRender = /* @__PURE__ */ jsxs("div", { className: "p-4 pr-8 min-w-[200px] max-w-[300px]", children: [
498
+ markerData.title && /* @__PURE__ */ jsx("h4", { className: "font-semibold text-base mb-1", children: markerData.title }),
499
+ markerData.info && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: markerData.info })
500
+ ] });
501
+ }
502
+ if (contentToRender && markerElement.innerMarker) {
503
+ if (!infoWindowRef.current) {
504
+ infoWindowRef.current = new google.maps.InfoWindow();
505
+ }
506
+ const container = document.createElement("div");
507
+ const root = createRoot(container);
508
+ root.render(contentToRender);
509
+ infoWindowRef.current.setContent(container);
510
+ infoWindowRef.current.open({
511
+ map,
512
+ anchor: markerElement.innerMarker
513
+ });
514
+ infoWindowRef.current.addListener("closeclick", () => {
515
+ setSelectedMarker(null);
516
+ setTimeout(() => root.unmount(), 0);
517
+ });
518
+ }
519
+ };
520
+ if (loadError) {
521
+ return /* @__PURE__ */ jsx(
522
+ "div",
523
+ {
524
+ ref,
525
+ className: cn(
526
+ "relative rounded-[var(--radius-card)] border border-destructive/50 overflow-hidden bg-destructive/5",
527
+ className
528
+ ),
529
+ style: { height },
530
+ ...divProps,
531
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-2 p-6", children: [
532
+ /* @__PURE__ */ jsx("div", { className: "text-destructive", children: /* @__PURE__ */ jsx("svg", { className: "w-12 h-12 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }) }),
533
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: "Failed to load Google Maps" }),
534
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Check API key in Settings" })
535
+ ] }) })
536
+ }
537
+ );
538
+ }
539
+ if (!isLoaded) {
540
+ return /* @__PURE__ */ jsx(
541
+ "div",
542
+ {
543
+ ref,
544
+ className: cn(
545
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted animate-pulse",
546
+ className
547
+ ),
548
+ style: { height },
549
+ ...divProps
550
+ }
551
+ );
552
+ }
553
+ return /* @__PURE__ */ jsx(
554
+ "div",
555
+ {
556
+ ref,
557
+ className: cn(
558
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden",
559
+ className
560
+ ),
561
+ style: { height },
562
+ ...divProps,
563
+ children: /* @__PURE__ */ jsx(
564
+ "gmp-map",
565
+ {
566
+ ref: gmpMapRef,
567
+ style: { height: "100%", width: "100%", display: "block" },
568
+ "map-id": props.mapId || "DEMO_MAP_ID",
569
+ children: markers.map((markerData, idx) => {
570
+ const markerColor = markerData.customColor || "var(--primary)";
571
+ const iconColor = markerData.iconColor || "white";
572
+ return (
573
+ // @ts-ignore
574
+ /* @__PURE__ */ jsx(
575
+ "gmp-advanced-marker",
576
+ {
577
+ title: markerData.title,
578
+ ref: (el) => {
579
+ if (el) {
580
+ el.position = markerData.position;
581
+ el.addEventListener("gmp-click", () => handleMarkerClick(idx, el));
582
+ }
583
+ },
584
+ children: /* @__PURE__ */ jsx(
585
+ "div",
586
+ {
587
+ className: "flex items-center justify-center w-8 h-8 border-[3px] border-background shadow-lg cursor-pointer origin-center transition-transform duration-200",
588
+ style: {
589
+ borderRadius: "50% 50% 50% 0",
590
+ transform: "rotate(-45deg)",
591
+ backgroundColor: markerColor
592
+ },
593
+ children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center rotate-45", children: markerData.iconSvg ? /* @__PURE__ */ jsx(
594
+ "div",
595
+ {
596
+ dangerouslySetInnerHTML: { __html: markerData.iconSvg },
597
+ style: { color: iconColor, width: 16, height: 16, fill: "currentColor" }
598
+ }
599
+ ) : /* @__PURE__ */ jsx("span", { className: "font-semibold text-sm", style: { color: iconColor }, children: markerData.icon || markerData.label || "" }) })
600
+ }
601
+ )
602
+ },
603
+ idx
604
+ )
605
+ );
606
+ })
607
+ }
608
+ )
609
+ }
610
+ );
611
+ }
612
+ );
613
+ MapContent.displayName = "MapContent";
614
+ const Map$1 = React__default.forwardRef(
615
+ (props, ref) => {
616
+ const { isLoaded, loadError } = useGoogleMapsLoader();
617
+ const effectiveApiKey = props.apiKey || typeof import.meta !== "undefined" && __vite_import_meta_env__$1 && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
618
+ const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
619
+ if (isLoaded || isValidKey || loadError) {
620
+ return /* @__PURE__ */ jsx(MapContent, { ref, ...props, apiKey: effectiveApiKey });
621
+ }
622
+ const isScriptInjected = typeof document !== "undefined" && !!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]');
623
+ if (isScriptInjected) {
624
+ return /* @__PURE__ */ jsx(MapContent, { ref, ...props, apiKey: effectiveApiKey });
625
+ }
626
+ return /* @__PURE__ */ jsx(
627
+ "div",
628
+ {
629
+ ref,
630
+ className: cn(
631
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted",
632
+ props.className
633
+ ),
634
+ style: { height: props.height || "400px" },
635
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-muted", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-3 p-6", children: [
636
+ /* @__PURE__ */ jsx("div", { className: "w-16 h-16 mx-auto bg-primary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxs("svg", { className: "w-8 h-8 text-primary", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
637
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
638
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
639
+ ] }) }),
640
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Configure Google Maps API Key in Settings" })
641
+ ] }) })
642
+ }
643
+ );
644
+ }
645
+ );
646
+ Map$1.displayName = "Map";
647
+ function PageHeader({
648
+ title,
649
+ subtitle,
650
+ backHref,
651
+ onBack,
652
+ renderBackLink,
653
+ actions,
654
+ className,
655
+ backLabel = "Back"
656
+ }) {
657
+ const showBack = !!(backHref || onBack || renderBackLink);
658
+ const icon = /* @__PURE__ */ jsx(ChevronLeft, { className: "h-5 w-5" });
659
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4 md:flex-row md:items-center md:justify-between mb-8", className), children: [
660
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
661
+ showBack && /* @__PURE__ */ jsx(
662
+ Button,
663
+ {
664
+ variant: "outline",
665
+ size: "icon",
666
+ className: "h-10 w-10 shrink-0",
667
+ onClick: onBack,
668
+ asChild: !!renderBackLink || !!backHref,
669
+ "aria-label": backLabel,
670
+ children: renderBackLink ? renderBackLink(icon) : backHref ? /* @__PURE__ */ jsx("a", { href: backHref, children: icon }) : icon
671
+ }
672
+ ),
673
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-1", children: [
674
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold tracking-tight text-foreground", children: title }),
675
+ subtitle && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: subtitle })
676
+ ] })
677
+ ] }),
678
+ actions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: actions })
679
+ ] });
680
+ }
681
+ function PageHeaderHeading({
682
+ className,
683
+ ...props
684
+ }) {
685
+ return /* @__PURE__ */ jsx(
686
+ "h1",
687
+ {
688
+ className: cn(
689
+ "text-3xl font-bold leading-tight tracking-tighter md:text-4xl lg:leading-[1.1]",
690
+ className
691
+ ),
692
+ ...props
693
+ }
694
+ );
695
+ }
696
+ function PageHeaderDescription({
697
+ className,
698
+ ...props
699
+ }) {
700
+ return /* @__PURE__ */ jsx(
701
+ "p",
702
+ {
703
+ className: cn(
704
+ "text-lg text-muted-foreground sm:text-xl",
705
+ className
706
+ ),
707
+ ...props
708
+ }
709
+ );
710
+ }
711
+ function AlertDialog({
712
+ ...props
713
+ }) {
714
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
715
+ }
716
+ function AlertDialogTrigger({
717
+ ...props
718
+ }) {
719
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
720
+ }
721
+ function AlertDialogPortal({
722
+ ...props
723
+ }) {
724
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
725
+ }
726
+ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => {
727
+ return /* @__PURE__ */ jsx(
728
+ AlertDialogPrimitive.Overlay,
729
+ {
730
+ ref,
731
+ "data-slot": "alert-dialog-overlay",
732
+ className: cn(
733
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
734
+ className
735
+ ),
736
+ ...props
737
+ }
738
+ );
739
+ });
740
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
741
+ function AlertDialogContent({
742
+ className,
743
+ ...props
744
+ }) {
745
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
746
+ /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
747
+ /* @__PURE__ */ jsx(
748
+ AlertDialogPrimitive.Content,
749
+ {
750
+ "data-slot": "alert-dialog-content",
751
+ className: cn(
752
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
753
+ className
754
+ ),
755
+ ...props
756
+ }
757
+ )
758
+ ] });
759
+ }
760
+ function AlertDialogHeader({
761
+ className,
762
+ ...props
763
+ }) {
764
+ return /* @__PURE__ */ jsx(
765
+ "div",
766
+ {
767
+ "data-slot": "alert-dialog-header",
768
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
769
+ ...props
770
+ }
771
+ );
772
+ }
773
+ function AlertDialogFooter({
774
+ className,
775
+ ...props
776
+ }) {
777
+ return /* @__PURE__ */ jsx(
778
+ "div",
779
+ {
780
+ "data-slot": "alert-dialog-footer",
781
+ className: cn(
782
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
783
+ className
784
+ ),
785
+ ...props
786
+ }
787
+ );
788
+ }
789
+ function AlertDialogTitle({
790
+ className,
791
+ ...props
792
+ }) {
793
+ return /* @__PURE__ */ jsx(
794
+ AlertDialogPrimitive.Title,
795
+ {
796
+ "data-slot": "alert-dialog-title",
797
+ className: cn("text-lg font-semibold", className),
798
+ ...props
799
+ }
800
+ );
801
+ }
802
+ function AlertDialogDescription({
803
+ className,
804
+ ...props
805
+ }) {
806
+ return /* @__PURE__ */ jsx(
807
+ AlertDialogPrimitive.Description,
808
+ {
809
+ "data-slot": "alert-dialog-description",
810
+ className: cn("text-muted-foreground text-sm", className),
811
+ ...props
812
+ }
813
+ );
814
+ }
815
+ function AlertDialogAction({
816
+ className,
817
+ ...props
818
+ }) {
819
+ return /* @__PURE__ */ jsx(
820
+ AlertDialogPrimitive.Action,
821
+ {
822
+ className: cn(buttonVariants(), className),
823
+ ...props
824
+ }
825
+ );
826
+ }
827
+ function AlertDialogCancel({
828
+ className,
829
+ ...props
830
+ }) {
831
+ return /* @__PURE__ */ jsx(
832
+ AlertDialogPrimitive.Cancel,
833
+ {
834
+ className: cn(buttonVariants({ variant: "outline" }), className),
835
+ ...props
836
+ }
837
+ );
838
+ }
839
+ const ERROR_IMG_SRC = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjciPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjU2IiBoZWlnaHQ9IjU2IiByeD0iNiIvPjxwYXRoIGQ9Im0xNiA1OCAxNi0xOCAzMiAzMiIvPjxjaXJjbGUgY3g9IjUzIiBjeT0iMzUiIHI9IjciLz48L3N2Zz4KCg==";
840
+ function ImageWithFallback(props) {
841
+ const [didError, setDidError] = useState(false);
842
+ const handleError = () => {
843
+ setDidError(true);
844
+ };
845
+ const { src, alt, style, className, ...rest } = props;
846
+ return didError ? /* @__PURE__ */ jsx(
847
+ "div",
848
+ {
849
+ className: `inline-block bg-gray-100 text-center align-middle ${className ?? ""}`,
850
+ style,
851
+ children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx("img", { src: ERROR_IMG_SRC, alt: "Error loading image", ...rest, "data-original-url": src }) })
852
+ }
853
+ ) : /* @__PURE__ */ jsx("img", { src, alt, className, style, ...rest, onError: handleError });
854
+ }
855
+ function AspectRatio({
856
+ ...props
857
+ }) {
858
+ return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
859
+ }
860
+ const ResizableContext = React.createContext(null);
861
+ const ResizablePanelGroup = ({
862
+ children,
863
+ className,
864
+ direction = "horizontal",
865
+ id,
866
+ autoSaveId,
867
+ storage,
868
+ onLayout,
869
+ ...props
870
+ }) => {
871
+ const [panels, setPanels] = React.useState(/* @__PURE__ */ new Map());
872
+ const [handles, setHandles] = React.useState(/* @__PURE__ */ new Map());
873
+ const [sizes, setSizes] = React.useState(/* @__PURE__ */ new Map());
874
+ const [isDragging, setIsDragging] = React.useState(false);
875
+ const containerRef = React.useRef(null);
876
+ const getSortedItems = React.useCallback((items) => {
877
+ if (!containerRef.current) return [];
878
+ return Array.from(items.values()).sort((a, b) => {
879
+ if (!a.ref.current || !b.ref.current) return 0;
880
+ const position = a.ref.current.compareDocumentPosition(b.ref.current);
881
+ if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
882
+ if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
883
+ return 0;
884
+ });
885
+ }, []);
886
+ React.useEffect(() => {
887
+ const sortedPanels = getSortedItems(panels);
888
+ if (sortedPanels.length === 0) return;
889
+ const uninitialized = sortedPanels.some((p) => !sizes.has(p.id));
890
+ if (uninitialized) {
891
+ const newSizes = new Map(sizes);
892
+ const remainingSpace = 100;
893
+ const defaultSizeCount = sortedPanels.filter((p) => p.defaultSize).length;
894
+ let usedSpace = 0;
895
+ sortedPanels.forEach((p) => {
896
+ if (p.defaultSize) usedSpace += p.defaultSize;
897
+ });
898
+ const spaceForOthers = Math.max(0, remainingSpace - usedSpace);
899
+ const countOthers = sortedPanels.length - defaultSizeCount;
900
+ const sizeForOthers = countOthers > 0 ? spaceForOthers / countOthers : 0;
901
+ sortedPanels.forEach((p) => {
902
+ if (!newSizes.has(p.id)) {
903
+ newSizes.set(p.id, p.defaultSize ?? sizeForOthers);
904
+ }
905
+ });
906
+ setSizes(newSizes);
907
+ }
908
+ }, [panels, sizes, getSortedItems]);
909
+ const registerPanel = React.useCallback((data) => {
910
+ setPanels((prev) => {
911
+ const next = new Map(prev);
912
+ next.set(data.id, data);
913
+ return next;
914
+ });
915
+ }, []);
916
+ const unregisterPanel = React.useCallback((id2) => {
917
+ setPanels((prev) => {
918
+ const next = new Map(prev);
919
+ next.delete(id2);
920
+ return next;
921
+ });
922
+ setSizes((prev) => {
923
+ const next = new Map(prev);
924
+ next.delete(id2);
925
+ return next;
926
+ });
927
+ }, []);
928
+ const registerHandle = React.useCallback((data) => {
929
+ setHandles((prev) => {
930
+ const next = new Map(prev);
931
+ next.set(data.id, data);
932
+ return next;
933
+ });
934
+ }, []);
935
+ const unregisterHandle = React.useCallback((id2) => {
936
+ setHandles((prev) => {
937
+ const next = new Map(prev);
938
+ next.delete(id2);
939
+ return next;
940
+ });
941
+ }, []);
942
+ const startDragging = React.useCallback((handleId, event) => {
943
+ var _a, _b;
944
+ event.preventDefault();
945
+ setIsDragging(true);
946
+ const sortedPanels = getSortedItems(panels);
947
+ const sortedHandles = getSortedItems(handles);
948
+ const handleIndex = sortedHandles.findIndex((h) => h.id === handleId);
949
+ if (handleIndex === -1) return;
950
+ const leftPanel = sortedPanels[handleIndex];
951
+ const rightPanel = sortedPanels[handleIndex + 1];
952
+ if (!leftPanel || !rightPanel) return;
953
+ const startX = "touches" in event ? event.touches[0].clientX : event.clientX;
954
+ const startY = "touches" in event ? event.touches[0].clientY : event.clientY;
955
+ const startSizeLeft = sizes.get(leftPanel.id) || 0;
956
+ const startSizeRight = sizes.get(rightPanel.id) || 0;
957
+ const containerSize = direction === "horizontal" ? ((_a = containerRef.current) == null ? void 0 : _a.offsetWidth) || 1 : ((_b = containerRef.current) == null ? void 0 : _b.offsetHeight) || 1;
958
+ const onMove = (e) => {
959
+ var _a2, _b2;
960
+ const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
961
+ const currentY = "touches" in e ? e.touches[0].clientY : e.clientY;
962
+ const deltaPixels = direction === "horizontal" ? currentX - startX : currentY - startY;
963
+ const deltaPercent = deltaPixels / containerSize * 100;
964
+ let finalLeft = startSizeLeft + deltaPercent;
965
+ let finalRight = startSizeRight - deltaPercent;
966
+ if (leftPanel.minSize !== void 0 && finalLeft < leftPanel.minSize) {
967
+ const diff = leftPanel.minSize - finalLeft;
968
+ finalLeft = leftPanel.minSize;
969
+ finalRight -= diff;
970
+ }
971
+ if (rightPanel.minSize !== void 0 && finalRight < rightPanel.minSize) {
972
+ const diff = rightPanel.minSize - finalRight;
973
+ finalRight = rightPanel.minSize;
974
+ finalLeft -= diff;
975
+ }
976
+ if (leftPanel.maxSize !== void 0 && finalLeft > leftPanel.maxSize) {
977
+ const diff = finalLeft - leftPanel.maxSize;
978
+ finalLeft = leftPanel.maxSize;
979
+ finalRight += diff;
980
+ }
981
+ if (rightPanel.maxSize !== void 0 && finalRight > rightPanel.maxSize) {
982
+ const diff = finalRight - rightPanel.maxSize;
983
+ finalRight = rightPanel.maxSize;
984
+ finalLeft -= diff;
985
+ }
986
+ finalLeft = Math.max(0, Math.min(100, finalLeft));
987
+ finalRight = Math.max(0, Math.min(100, finalRight));
988
+ setSizes((prev) => {
989
+ const next = new Map(prev);
990
+ next.set(leftPanel.id, finalLeft);
991
+ next.set(rightPanel.id, finalRight);
992
+ return next;
993
+ });
994
+ (_a2 = leftPanel.onResize) == null ? void 0 : _a2.call(leftPanel, finalLeft);
995
+ (_b2 = rightPanel.onResize) == null ? void 0 : _b2.call(rightPanel, finalRight);
996
+ };
997
+ const onUp = () => {
998
+ setIsDragging(false);
999
+ window.removeEventListener("mousemove", onMove);
1000
+ window.removeEventListener("mouseup", onUp);
1001
+ window.removeEventListener("touchmove", onMove);
1002
+ window.removeEventListener("touchend", onUp);
1003
+ if (onLayout) {
1004
+ onLayout(sortedPanels.map((p) => sizes.get(p.id) || 0));
1005
+ }
1006
+ };
1007
+ window.addEventListener("mousemove", onMove);
1008
+ window.addEventListener("mouseup", onUp);
1009
+ window.addEventListener("touchmove", onMove);
1010
+ window.addEventListener("touchend", onUp);
1011
+ }, [panels, handles, sizes, direction, getSortedItems, onLayout]);
1012
+ const getPanelStyle = React.useCallback((id2) => {
1013
+ const size = sizes.get(id2);
1014
+ if (size === void 0) return { flex: "1 1 0%", overflow: "hidden" };
1015
+ return { flex: `${size} 1 0%`, overflow: "hidden" };
1016
+ }, [sizes]);
1017
+ const contextValue = React.useMemo(() => ({
1018
+ direction,
1019
+ registerPanel,
1020
+ unregisterPanel,
1021
+ registerHandle,
1022
+ unregisterHandle,
1023
+ isDragging,
1024
+ startDragging,
1025
+ getPanelStyle
1026
+ }), [direction, registerPanel, unregisterPanel, registerHandle, unregisterHandle, isDragging, startDragging, getPanelStyle]);
1027
+ return /* @__PURE__ */ jsx(ResizableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
1028
+ "div",
1029
+ {
1030
+ ref: containerRef,
1031
+ "data-slot": "resizable-panel-group",
1032
+ "data-panel-group-direction": direction,
1033
+ className: cn(
1034
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
1035
+ className
1036
+ ),
1037
+ ...props,
1038
+ children
1039
+ }
1040
+ ) });
1041
+ };
1042
+ const ResizablePanel = ({
1043
+ className,
1044
+ defaultSize,
1045
+ minSize = 0,
1046
+ maxSize = 100,
1047
+ collapsible,
1048
+ collapsedSize,
1049
+ onCollapse,
1050
+ onExpand,
1051
+ onResize,
1052
+ order,
1053
+ tagName,
1054
+ id: propId,
1055
+ children,
1056
+ ...props
1057
+ }) => {
1058
+ const context = React.useContext(ResizableContext);
1059
+ const ref = React.useRef(null);
1060
+ const [generatedId] = React.useState(() => Math.random().toString(36).substr(2, 9));
1061
+ const id = propId || generatedId;
1062
+ const registerPanel = context == null ? void 0 : context.registerPanel;
1063
+ const unregisterPanel = context == null ? void 0 : context.unregisterPanel;
1064
+ React.useLayoutEffect(() => {
1065
+ if (!registerPanel || !unregisterPanel) return;
1066
+ registerPanel({
1067
+ id,
1068
+ ref,
1069
+ defaultSize,
1070
+ minSize,
1071
+ maxSize,
1072
+ collapsible,
1073
+ onCollapse,
1074
+ onExpand,
1075
+ onResize
1076
+ });
1077
+ return () => unregisterPanel(id);
1078
+ }, [registerPanel, unregisterPanel, id, defaultSize, minSize, maxSize, collapsible, onCollapse, onExpand, onResize]);
1079
+ if (!context) {
1080
+ return /* @__PURE__ */ jsx("div", { className: cn("flex-1", className), ...props, children });
1081
+ }
1082
+ return /* @__PURE__ */ jsx(
1083
+ "div",
1084
+ {
1085
+ ref,
1086
+ "data-slot": "resizable-panel",
1087
+ className: cn("relative transition-[flex-grow] duration-0", className),
1088
+ style: context.getPanelStyle(id),
1089
+ ...props,
1090
+ children
1091
+ }
1092
+ );
1093
+ };
1094
+ const ResizableHandle = ({
1095
+ withHandle,
1096
+ className,
1097
+ id: propId,
1098
+ tagName,
1099
+ ...props
1100
+ }) => {
1101
+ const context = React.useContext(ResizableContext);
1102
+ const ref = React.useRef(null);
1103
+ const [generatedId] = React.useState(() => Math.random().toString(36).substr(2, 9));
1104
+ const id = propId || generatedId;
1105
+ const registerHandle = context == null ? void 0 : context.registerHandle;
1106
+ const unregisterHandle = context == null ? void 0 : context.unregisterHandle;
1107
+ React.useLayoutEffect(() => {
1108
+ if (!registerHandle || !unregisterHandle) return;
1109
+ registerHandle({ id, ref });
1110
+ return () => unregisterHandle(id);
1111
+ }, [registerHandle, unregisterHandle, id]);
1112
+ const handleMouseDown = (e) => {
1113
+ if (context) {
1114
+ context.startDragging(id, e);
1115
+ }
1116
+ };
1117
+ if (!context) return null;
1118
+ return /* @__PURE__ */ jsx(
1119
+ "div",
1120
+ {
1121
+ ref,
1122
+ "data-slot": "resizable-handle",
1123
+ className: cn(
1124
+ "bg-border relative flex items-center justify-center focus-visible:outline-hidden",
1125
+ "touch-none select-none",
1126
+ context.direction === "vertical" ? "h-px w-full cursor-row-resize after:left-0 after:h-1 after:w-full after:-translate-y-1/2 hover:after:h-4" : "w-px h-full cursor-col-resize after:top-0 after:w-1 after:h-full after:-translate-x-1/2 hover:after:w-4",
1127
+ "after:absolute after:z-10",
1128
+ className
1129
+ ),
1130
+ onMouseDown: handleMouseDown,
1131
+ onTouchStart: handleMouseDown,
1132
+ ...props,
1133
+ children: withHandle && /* @__PURE__ */ jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" }) })
1134
+ }
1135
+ );
1136
+ };
1137
+ function NavigationMenu({
1138
+ className,
1139
+ children,
1140
+ viewport = true,
1141
+ ...props
1142
+ }) {
1143
+ return /* @__PURE__ */ jsxs(
1144
+ NavigationMenuPrimitive.Root,
1145
+ {
1146
+ "data-slot": "navigation-menu",
1147
+ className: cn(
1148
+ "relative z-10 flex w-full flex-1 items-center justify-center",
1149
+ className
1150
+ ),
1151
+ ...props,
1152
+ children: [
1153
+ children,
1154
+ viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})
1155
+ ]
1156
+ }
1157
+ );
1158
+ }
1159
+ function NavigationMenuList({
1160
+ className,
1161
+ ...props
1162
+ }) {
1163
+ return /* @__PURE__ */ jsx(
1164
+ NavigationMenuPrimitive.List,
1165
+ {
1166
+ "data-slot": "navigation-menu-list",
1167
+ className: cn(
1168
+ "group flex flex-1 list-none items-center justify-center gap-1",
1169
+ className
1170
+ ),
1171
+ ...props
1172
+ }
1173
+ );
1174
+ }
1175
+ function NavigationMenuItem({
1176
+ className,
1177
+ ...props
1178
+ }) {
1179
+ return /* @__PURE__ */ jsx(
1180
+ NavigationMenuPrimitive.Item,
1181
+ {
1182
+ "data-slot": "navigation-menu-item",
1183
+ className: cn("relative", className),
1184
+ ...props
1185
+ }
1186
+ );
1187
+ }
1188
+ const navigationMenuTriggerStyle = cva(
1189
+ "group inline-flex h-10 w-max items-center justify-center rounded-[var(--radius)] bg-background px-4 py-2 text-[var(--text-p)] font-[var(--font-weight-medium)] hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 outline-none focus-visible:ring-2 focus-visible:ring-ring"
1190
+ );
1191
+ function NavigationMenuTrigger({
1192
+ className,
1193
+ children,
1194
+ ...props
1195
+ }) {
1196
+ return /* @__PURE__ */ jsxs(
1197
+ NavigationMenuPrimitive.Trigger,
1198
+ {
1199
+ "data-slot": "navigation-menu-trigger",
1200
+ className: cn(navigationMenuTriggerStyle(), "group", className),
1201
+ ...props,
1202
+ children: [
1203
+ children,
1204
+ " ",
1205
+ /* @__PURE__ */ jsx(
1206
+ ChevronDownIcon,
1207
+ {
1208
+ className: "relative top-[1px] ml-1 size-3 group-data-[state=open]:rotate-180",
1209
+ "aria-hidden": "true"
1210
+ }
1211
+ )
1212
+ ]
1213
+ }
1214
+ );
1215
+ }
1216
+ function NavigationMenuContent({
1217
+ className,
1218
+ ...props
1219
+ }) {
1220
+ return /* @__PURE__ */ jsx(
1221
+ NavigationMenuPrimitive.Content,
1222
+ {
1223
+ "data-slot": "navigation-menu-content",
1224
+ className: cn(
1225
+ "left-0 top-0 w-full md:w-auto",
1226
+ className
1227
+ ),
1228
+ ...props
1229
+ }
1230
+ );
1231
+ }
1232
+ function NavigationMenuViewport({
1233
+ className,
1234
+ ...props
1235
+ }) {
1236
+ return /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center w-full"), children: /* @__PURE__ */ jsx(
1237
+ NavigationMenuPrimitive.Viewport,
1238
+ {
1239
+ "data-slot": "navigation-menu-viewport",
1240
+ className: cn(
1241
+ "origin-top-center relative mt-1.5 overflow-hidden rounded-[var(--radius)] border border-border bg-popover text-popover-foreground shadow-lg",
1242
+ className
1243
+ ),
1244
+ ...props
1245
+ }
1246
+ ) });
1247
+ }
1248
+ function NavigationMenuLink({
1249
+ className,
1250
+ ...props
1251
+ }) {
1252
+ return /* @__PURE__ */ jsx(
1253
+ NavigationMenuPrimitive.Link,
1254
+ {
1255
+ "data-slot": "navigation-menu-link",
1256
+ className: cn(
1257
+ "block select-none space-y-1 rounded-[var(--radius)] p-3 leading-none no-underline outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
1258
+ className
1259
+ ),
1260
+ ...props
1261
+ }
1262
+ );
1263
+ }
1264
+ function NavigationMenuIndicator({
1265
+ className,
1266
+ ...props
1267
+ }) {
1268
+ return /* @__PURE__ */ jsx(
1269
+ NavigationMenuPrimitive.Indicator,
1270
+ {
1271
+ "data-slot": "navigation-menu-indicator",
1272
+ className: cn(
1273
+ "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
1274
+ className
1275
+ ),
1276
+ ...props,
1277
+ children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
1278
+ }
1279
+ );
1280
+ }
1281
+ function Pagination({ className, ...props }) {
1282
+ return /* @__PURE__ */ jsx(
1283
+ "nav",
1284
+ {
1285
+ role: "navigation",
1286
+ "aria-label": "pagination",
1287
+ "data-slot": "pagination",
1288
+ className: cn("mx-auto flex w-full justify-center", className),
1289
+ ...props
1290
+ }
1291
+ );
1292
+ }
1293
+ function PaginationContent({
1294
+ className,
1295
+ ...props
1296
+ }) {
1297
+ return /* @__PURE__ */ jsx(
1298
+ "ul",
1299
+ {
1300
+ "data-slot": "pagination-content",
1301
+ className: cn("flex flex-row items-center gap-1", className),
1302
+ ...props
1303
+ }
1304
+ );
1305
+ }
1306
+ function PaginationItem({ ...props }) {
1307
+ return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
1308
+ }
1309
+ function PaginationLink({
1310
+ className,
1311
+ isActive,
1312
+ size = "icon",
1313
+ ...props
1314
+ }) {
1315
+ return /* @__PURE__ */ jsx(
1316
+ "a",
1317
+ {
1318
+ "aria-current": isActive ? "page" : void 0,
1319
+ "data-slot": "pagination-link",
1320
+ "data-active": isActive,
1321
+ className: cn(
1322
+ buttonVariants({
1323
+ variant: isActive ? "outline" : "ghost",
1324
+ size
1325
+ }),
1326
+ className
1327
+ ),
1328
+ ...props
1329
+ }
1330
+ );
1331
+ }
1332
+ function PaginationPrevious({
1333
+ className,
1334
+ ...props
1335
+ }) {
1336
+ return /* @__PURE__ */ jsxs(
1337
+ PaginationLink,
1338
+ {
1339
+ "aria-label": "Go to previous page",
1340
+ size: "default",
1341
+ className: cn("gap-1 px-2.5 sm:pl-2.5", className),
1342
+ ...props,
1343
+ children: [
1344
+ /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
1345
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
1346
+ ]
1347
+ }
1348
+ );
1349
+ }
1350
+ function PaginationNext({
1351
+ className,
1352
+ ...props
1353
+ }) {
1354
+ return /* @__PURE__ */ jsxs(
1355
+ PaginationLink,
1356
+ {
1357
+ "aria-label": "Go to next page",
1358
+ size: "default",
1359
+ className: cn("gap-1 px-2.5 sm:pr-2.5", className),
1360
+ ...props,
1361
+ children: [
1362
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
1363
+ /* @__PURE__ */ jsx(ChevronRightIcon, {})
1364
+ ]
1365
+ }
1366
+ );
1367
+ }
1368
+ function PaginationEllipsis({
1369
+ className,
1370
+ ...props
1371
+ }) {
1372
+ return /* @__PURE__ */ jsxs(
1373
+ "span",
1374
+ {
1375
+ "aria-hidden": true,
1376
+ "data-slot": "pagination-ellipsis",
1377
+ className: cn("flex size-9 items-center justify-center", className),
1378
+ ...props,
1379
+ children: [
1380
+ /* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
1381
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
1382
+ ]
1383
+ }
1384
+ );
1385
+ }
1386
+ const toggleVariants = cva(
1387
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
1388
+ {
1389
+ variants: {
1390
+ variant: {
1391
+ default: "bg-transparent",
1392
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
1393
+ },
1394
+ size: {
1395
+ default: "h-9 px-2 min-w-9",
1396
+ sm: "h-8 px-1.5 min-w-8",
1397
+ lg: "h-10 px-2.5 min-w-10"
1398
+ }
1399
+ },
1400
+ defaultVariants: {
1401
+ variant: "default",
1402
+ size: "default"
1403
+ }
1404
+ }
1405
+ );
1406
+ const Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
1407
+ TogglePrimitive.Root,
1408
+ {
1409
+ ref,
1410
+ "data-slot": "toggle",
1411
+ className: cn(toggleVariants({ variant, size, className })),
1412
+ ...props
1413
+ }
1414
+ ));
1415
+ Toggle.displayName = TogglePrimitive.Root.displayName;
1416
+ const ToggleGroupContext = React.createContext({
1417
+ size: "default",
1418
+ variant: "default"
1419
+ });
1420
+ const ToggleGroup = React.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
1421
+ ToggleGroupPrimitive.Root,
1422
+ {
1423
+ ref,
1424
+ "data-slot": "toggle-group",
1425
+ "data-variant": variant,
1426
+ "data-size": size,
1427
+ className: cn(
1428
+ "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
1429
+ className
1430
+ ),
1431
+ ...props,
1432
+ children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
1433
+ }
1434
+ ));
1435
+ ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
1436
+ const ToggleGroupItem = React.forwardRef(({ className, children, variant, size, ...props }, ref) => {
1437
+ const context = React.useContext(ToggleGroupContext);
1438
+ return /* @__PURE__ */ jsx(
1439
+ ToggleGroupPrimitive.Item,
1440
+ {
1441
+ ref,
1442
+ "data-slot": "toggle-group-item",
1443
+ "data-variant": context.variant || variant,
1444
+ "data-size": context.size || size,
1445
+ className: cn(
1446
+ toggleVariants({
1447
+ variant: context.variant || variant,
1448
+ size: context.size || size
1449
+ }),
1450
+ "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
1451
+ className
1452
+ ),
1453
+ ...props,
1454
+ children
1455
+ }
1456
+ );
1457
+ });
1458
+ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
1459
+ function InputOTP({
1460
+ className,
1461
+ containerClassName,
1462
+ ...props
1463
+ }) {
1464
+ return /* @__PURE__ */ jsx(
1465
+ OTPInput,
1466
+ {
1467
+ "data-slot": "input-otp",
1468
+ containerClassName: cn(
1469
+ "flex items-center gap-2 has-disabled:opacity-50",
1470
+ containerClassName
1471
+ ),
1472
+ className: cn("disabled:cursor-not-allowed", className),
1473
+ ...props
1474
+ }
1475
+ );
1476
+ }
1477
+ function InputOTPGroup({ className, ...props }) {
1478
+ return /* @__PURE__ */ jsx(
1479
+ "div",
1480
+ {
1481
+ "data-slot": "input-otp-group",
1482
+ className: cn("flex items-center gap-1", className),
1483
+ ...props
1484
+ }
1485
+ );
1486
+ }
1487
+ function InputOTPSlot({
1488
+ index,
1489
+ className,
1490
+ size = "md",
1491
+ ...props
1492
+ }) {
1493
+ const inputOTPContext = React.useContext(OTPInputContext);
1494
+ const { char, hasFakeCaret, isActive } = (inputOTPContext == null ? void 0 : inputOTPContext.slots[index]) ?? {};
1495
+ const sizeClasses = {
1496
+ sm: "h-8 w-8 text-sm",
1497
+ md: "h-10 w-10 text-base",
1498
+ lg: "h-12 w-12 text-lg"
1499
+ };
1500
+ return /* @__PURE__ */ jsxs(
1501
+ "div",
1502
+ {
1503
+ "data-slot": "input-otp-slot",
1504
+ "data-active": isActive,
1505
+ className: cn(
1506
+ "data-[active=true]:border-primary data-[active=true]:ring-primary/20 data-[active=true]:aria-invalid:ring-destructive/20 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive relative flex items-center justify-center border border-border rounded-[var(--radius)] bg-background transition-all outline-none data-[active=true]:z-10 data-[active=true]:ring-2",
1507
+ sizeClasses[size],
1508
+ className
1509
+ ),
1510
+ ...props,
1511
+ children: [
1512
+ char,
1513
+ hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
1514
+ ]
1515
+ }
1516
+ );
1517
+ }
1518
+ function InputOTPSeparator({ ...props }) {
1519
+ return /* @__PURE__ */ jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx(MinusIcon, {}) });
1520
+ }
1521
+ const Form = FormProvider;
1522
+ const FormFieldContext = React.createContext(
1523
+ {}
1524
+ );
1525
+ const FormField = ({
1526
+ ...props
1527
+ }) => {
1528
+ return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
1529
+ };
1530
+ const useFormField = () => {
1531
+ const fieldContext = React.useContext(FormFieldContext);
1532
+ const itemContext = React.useContext(FormItemContext);
1533
+ const { getFieldState } = useFormContext();
1534
+ const formState = useFormState({ name: fieldContext.name });
1535
+ const fieldState = getFieldState(
1536
+ fieldContext.name,
1537
+ formState
1538
+ );
1539
+ if (!fieldContext) {
1540
+ throw new Error(
1541
+ "useFormField should be used within <FormField>"
1542
+ );
1543
+ }
1544
+ const { id } = itemContext;
1545
+ return {
1546
+ id,
1547
+ name: fieldContext.name,
1548
+ formItemId: `${id}-form-item`,
1549
+ formDescriptionId: `${id}-form-item-description`,
1550
+ formMessageId: `${id}-form-item-message`,
1551
+ ...fieldState
1552
+ };
1553
+ };
1554
+ const FormItemContext = React.createContext(
1555
+ {}
1556
+ );
1557
+ function FormItem({
1558
+ className,
1559
+ ...props
1560
+ }) {
1561
+ const id = React.useId();
1562
+ return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx(
1563
+ "div",
1564
+ {
1565
+ "data-slot": "form-item",
1566
+ className: cn("grid gap-2", className),
1567
+ ...props
1568
+ }
1569
+ ) });
1570
+ }
1571
+ function FormLabel({
1572
+ className,
1573
+ ...props
1574
+ }) {
1575
+ const { error, formItemId } = useFormField();
1576
+ return /* @__PURE__ */ jsx(
1577
+ Label,
1578
+ {
1579
+ "data-slot": "form-label",
1580
+ "data-error": !!error,
1581
+ className: cn(
1582
+ "data-[error=true]:text-destructive",
1583
+ className
1584
+ ),
1585
+ htmlFor: formItemId,
1586
+ ...props
1587
+ }
1588
+ );
1589
+ }
1590
+ function FormControl({
1591
+ ...props
1592
+ }) {
1593
+ const {
1594
+ error,
1595
+ formItemId,
1596
+ formDescriptionId,
1597
+ formMessageId
1598
+ } = useFormField();
1599
+ return /* @__PURE__ */ jsx(
1600
+ Slot,
1601
+ {
1602
+ "data-slot": "form-control",
1603
+ id: formItemId,
1604
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
1605
+ "aria-invalid": !!error,
1606
+ ...props
1607
+ }
1608
+ );
1609
+ }
1610
+ function FormDescription({
1611
+ className,
1612
+ ...props
1613
+ }) {
1614
+ const { formDescriptionId } = useFormField();
1615
+ return /* @__PURE__ */ jsx(
1616
+ "p",
1617
+ {
1618
+ "data-slot": "form-description",
1619
+ id: formDescriptionId,
1620
+ className: cn("text-muted-foreground text-sm", className),
1621
+ ...props
1622
+ }
1623
+ );
1624
+ }
1625
+ function FormMessage({
1626
+ className,
1627
+ ...props
1628
+ }) {
1629
+ const { error, formMessageId } = useFormField();
1630
+ const body = error ? String((error == null ? void 0 : error.message) ?? "") : props.children;
1631
+ if (!body) {
1632
+ return null;
1633
+ }
1634
+ return /* @__PURE__ */ jsx(
1635
+ "p",
1636
+ {
1637
+ "data-slot": "form-message",
1638
+ id: formMessageId,
1639
+ className: cn("text-destructive text-sm", className),
1640
+ ...props,
1641
+ children: body
1642
+ }
1643
+ );
1644
+ }
1645
+ function Calendar({
1646
+ className,
1647
+ classNames,
1648
+ showOutsideDays = true,
1649
+ captionLayout = "label",
1650
+ buttonVariant = "ghost",
1651
+ formatters,
1652
+ components,
1653
+ ...props
1654
+ }) {
1655
+ const defaultClassNames = getDefaultClassNames();
1656
+ return /* @__PURE__ */ jsx(
1657
+ DayPicker,
1658
+ {
1659
+ showOutsideDays,
1660
+ className: cn(
1661
+ "bg-background group/calendar p-4 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent font-sans",
1662
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
1663
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
1664
+ className
1665
+ ),
1666
+ captionLayout,
1667
+ formatters,
1668
+ classNames: {
1669
+ root: cn("w-fit", defaultClassNames.root),
1670
+ months: cn(
1671
+ "flex gap-6 flex-col md:flex-row relative",
1672
+ defaultClassNames.months
1673
+ ),
1674
+ month: cn("flex flex-col w-full gap-5", defaultClassNames.month),
1675
+ nav: cn(
1676
+ "flex items-center gap-2 w-full absolute top-0 inset-x-0 justify-between",
1677
+ defaultClassNames.nav
1678
+ ),
1679
+ button_previous: cn(
1680
+ buttonVariants({ variant: buttonVariant }),
1681
+ "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
1682
+ defaultClassNames.button_previous
1683
+ ),
1684
+ button_next: cn(
1685
+ buttonVariants({ variant: buttonVariant }),
1686
+ "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
1687
+ defaultClassNames.button_next
1688
+ ),
1689
+ month_caption: cn(
1690
+ "flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
1691
+ defaultClassNames.month_caption
1692
+ ),
1693
+ dropdowns: cn(
1694
+ "w-full flex items-center justify-center h-(--cell-size) gap-2",
1695
+ defaultClassNames.dropdowns
1696
+ ),
1697
+ dropdown_root: cn(
1698
+ "relative rounded-[var(--radius)] hover:bg-accent transition-colors",
1699
+ defaultClassNames.dropdown_root
1700
+ ),
1701
+ dropdown: cn(
1702
+ "absolute bg-popover inset-0 opacity-0 cursor-pointer",
1703
+ defaultClassNames.dropdown
1704
+ ),
1705
+ caption_label: cn(
1706
+ "select-none font-[family-name:var(--font-family,Roboto)] tracking-tight hover:bg-accent hover:text-accent-foreground transition-all duration-200 rounded-[var(--radius)] px-2 py-1",
1707
+ captionLayout === "label" ? "text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)]" : "flex items-center gap-1.5 text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)] [&>svg]:text-muted-foreground [&>svg]:size-4",
1708
+ defaultClassNames.caption_label
1709
+ ),
1710
+ table: "w-full border-collapse mt-1",
1711
+ weekdays: cn("flex gap-1", defaultClassNames.weekdays),
1712
+ weekday: cn(
1713
+ "text-muted-foreground rounded-(--cell-radius) flex-1 select-none text-[length:var(--calendar-weekday-size)] font-[number:var(--font-weight-medium)] uppercase tracking-wider",
1714
+ defaultClassNames.weekday
1715
+ ),
1716
+ week: cn("flex w-full gap-1", defaultClassNames.week),
1717
+ week_number_header: cn(
1718
+ "select-none w-(--cell-size)",
1719
+ defaultClassNames.week_number_header
1720
+ ),
1721
+ week_number: cn(
1722
+ "select-none text-muted-foreground text-[length:var(--calendar-weekday-size)]",
1723
+ defaultClassNames.week_number
1724
+ ),
1725
+ day: cn(
1726
+ "relative w-full rounded-(--cell-radius) h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius) group/day aspect-square select-none",
1727
+ props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
1728
+ defaultClassNames.day
1729
+ ),
1730
+ range_start: cn(
1731
+ "rounded-l-(--cell-radius) bg-accent/50 relative after:bg-accent/50 after:absolute after:inset-y-0 after:w-2 after:right-0 -z-0 isolate",
1732
+ defaultClassNames.range_start
1733
+ ),
1734
+ range_middle: cn(
1735
+ "rounded-none bg-accent/30",
1736
+ defaultClassNames.range_middle
1737
+ ),
1738
+ range_end: cn(
1739
+ "rounded-r-(--cell-radius) bg-accent/50 relative after:bg-accent/50 after:absolute after:inset-y-0 after:w-2 after:left-0 -z-0 isolate",
1740
+ defaultClassNames.range_end
1741
+ ),
1742
+ today: cn(
1743
+ "bg-accent/60 text-accent-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none font-[number:var(--font-weight-semibold)]",
1744
+ defaultClassNames.today
1745
+ ),
1746
+ outside: cn(
1747
+ "text-muted-foreground/40 aria-selected:text-muted-foreground/40",
1748
+ defaultClassNames.outside
1749
+ ),
1750
+ disabled: cn(
1751
+ "text-muted-foreground/30 opacity-40",
1752
+ defaultClassNames.disabled
1753
+ ),
1754
+ hidden: cn("invisible", defaultClassNames.hidden),
1755
+ ...classNames
1756
+ },
1757
+ components: {
1758
+ Root: ({ className: className2, rootRef, ...props2 }) => {
1759
+ return /* @__PURE__ */ jsx(
1760
+ "div",
1761
+ {
1762
+ "data-slot": "calendar",
1763
+ ref: rootRef,
1764
+ className: cn(className2),
1765
+ ...props2
1766
+ }
1767
+ );
1768
+ },
1769
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
1770
+ if (orientation === "left") {
1771
+ return /* @__PURE__ */ jsx(
1772
+ ChevronLeft,
1773
+ {
1774
+ className: cn("size-5 transition-transform group-hover:scale-110", className2),
1775
+ ...props2
1776
+ }
1777
+ );
1778
+ }
1779
+ if (orientation === "right") {
1780
+ return /* @__PURE__ */ jsx(
1781
+ ChevronRight,
1782
+ {
1783
+ className: cn("size-5 transition-transform group-hover:scale-110", className2),
1784
+ ...props2
1785
+ }
1786
+ );
1787
+ }
1788
+ return /* @__PURE__ */ jsx(
1789
+ ChevronDown,
1790
+ {
1791
+ className: cn("size-4", className2),
1792
+ ...props2
1793
+ }
1794
+ );
1795
+ },
1796
+ DayButton: CalendarDayButton,
1797
+ WeekNumber: ({ children, ...props2 }) => {
1798
+ return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center font-[number:var(--font-weight-medium)]", children }) });
1799
+ },
1800
+ ...components
1801
+ },
1802
+ ...props
1803
+ }
1804
+ );
1805
+ }
1806
+ function CalendarDayButton({
1807
+ className,
1808
+ day,
1809
+ modifiers,
1810
+ ...props
1811
+ }) {
1812
+ const defaultClassNames = getDefaultClassNames();
1813
+ const ref = React.useRef(null);
1814
+ React.useEffect(() => {
1815
+ var _a;
1816
+ if (modifiers.focused) (_a = ref.current) == null ? void 0 : _a.focus();
1817
+ }, [modifiers.focused]);
1818
+ return /* @__PURE__ */ jsx(
1819
+ Button,
1820
+ {
1821
+ ref,
1822
+ variant: "ghost",
1823
+ size: "icon",
1824
+ "data-day": day.date.toLocaleDateString(),
1825
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
1826
+ "data-range-start": modifiers.range_start,
1827
+ "data-range-end": modifiers.range_end,
1828
+ "data-range-middle": modifiers.range_middle,
1829
+ className: cn(
1830
+ "relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col items-center justify-center gap-1 border-0 leading-none transition-all duration-200 cursor-pointer disabled:cursor-not-allowed",
1831
+ "text-[length:var(--calendar-day-size)] font-[number:var(--font-weight-regular)]",
1832
+ "hover:bg-accent/70 hover:text-accent-foreground hover:scale-105",
1833
+ "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[selected-single=true]:font-[number:var(--font-weight-semibold)] data-[selected-single=true]:shadow-sm",
1834
+ "data-[range-middle=true]:bg-accent/50 data-[range-middle=true]:text-foreground",
1835
+ "data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-start=true]:font-[number:var(--font-weight-semibold)] data-[range-start=true]:shadow-sm",
1836
+ "data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-end=true]:font-[number:var(--font-weight-semibold)] data-[range-end=true]:shadow-sm",
1837
+ "group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 group-data-[focused=true]/day:ring-2 group-data-[focused=true]/day:ring-offset-2 group-data-[focused=true]/day:ring-offset-background",
1838
+ "data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius)",
1839
+ "data-[range-middle=true]:rounded-none",
1840
+ "data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius)",
1841
+ "[&>span]:opacity-80",
1842
+ defaultClassNames.day,
1843
+ className
1844
+ ),
1845
+ ...props,
1846
+ children: day.date.getDate()
1847
+ }
1848
+ );
1849
+ }
1850
+ function Sheet({ ...props }) {
1851
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
1852
+ }
1853
+ function SheetTrigger({
1854
+ ...props
1855
+ }) {
1856
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
1857
+ }
1858
+ function SheetPortal({
1859
+ ...props
1860
+ }) {
1861
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
1862
+ }
1863
+ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1864
+ DialogPrimitive.Overlay,
1865
+ {
1866
+ className: cn(
1867
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1868
+ className
1869
+ ),
1870
+ ...props,
1871
+ ref
1872
+ }
1873
+ ));
1874
+ SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
1875
+ function SheetContent({
1876
+ className,
1877
+ children,
1878
+ side = "right",
1879
+ ...props
1880
+ }) {
1881
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [
1882
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
1883
+ /* @__PURE__ */ jsxs(
1884
+ DialogPrimitive.Content,
1885
+ {
1886
+ "data-slot": "sheet-content",
1887
+ className: cn(
1888
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
1889
+ side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
1890
+ side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
1891
+ side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
1892
+ side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
1893
+ className
1894
+ ),
1895
+ ...props,
1896
+ children: [
1897
+ children,
1898
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
1899
+ /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
1900
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1901
+ ] })
1902
+ ]
1903
+ }
1904
+ )
1905
+ ] });
1906
+ }
1907
+ function SheetHeader({ className, ...props }) {
1908
+ return /* @__PURE__ */ jsx(
1909
+ "div",
1910
+ {
1911
+ "data-slot": "sheet-header",
1912
+ className: cn("flex flex-col gap-1.5 px-6 pt-6", className),
1913
+ ...props
1914
+ }
1915
+ );
1916
+ }
1917
+ function SheetFooter({ className, ...props }) {
1918
+ return /* @__PURE__ */ jsx(
1919
+ "div",
1920
+ {
1921
+ "data-slot": "sheet-footer",
1922
+ className: cn("mt-auto flex flex-col gap-2 px-6 pb-6", className),
1923
+ ...props
1924
+ }
1925
+ );
1926
+ }
1927
+ function SheetTitle({
1928
+ className,
1929
+ ...props
1930
+ }) {
1931
+ return /* @__PURE__ */ jsx(
1932
+ DialogPrimitive.Title,
1933
+ {
1934
+ "data-slot": "sheet-title",
1935
+ className: cn("text-foreground font-semibold", className),
1936
+ ...props
1937
+ }
1938
+ );
1939
+ }
1940
+ function SheetDescription({
1941
+ className,
1942
+ ...props
1943
+ }) {
1944
+ return /* @__PURE__ */ jsx(
1945
+ DialogPrimitive.Description,
1946
+ {
1947
+ "data-slot": "sheet-description",
1948
+ className: cn("text-muted-foreground text-sm", className),
1949
+ ...props
1950
+ }
1951
+ );
1952
+ }
1953
+ function Drawer({
1954
+ ...props
1955
+ }) {
1956
+ return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
1957
+ }
1958
+ function DrawerTrigger({
1959
+ ...props
1960
+ }) {
1961
+ return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
1962
+ }
1963
+ function DrawerPortal({
1964
+ ...props
1965
+ }) {
1966
+ return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
1967
+ }
1968
+ const DrawerOverlay = React.forwardRef(({ className, ...props }, ref) => {
1969
+ return /* @__PURE__ */ jsx(
1970
+ Drawer$1.Overlay,
1971
+ {
1972
+ ref,
1973
+ "data-slot": "drawer-overlay",
1974
+ className: cn(
1975
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1976
+ className
1977
+ ),
1978
+ ...props
1979
+ }
1980
+ );
1981
+ });
1982
+ DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
1983
+ function DrawerContent({
1984
+ className,
1985
+ children,
1986
+ ...props
1987
+ }) {
1988
+ return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
1989
+ /* @__PURE__ */ jsx(DrawerOverlay, {}),
1990
+ /* @__PURE__ */ jsxs(
1991
+ Drawer$1.Content,
1992
+ {
1993
+ "data-slot": "drawer-content",
1994
+ className: cn(
1995
+ "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
1996
+ "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
1997
+ "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
1998
+ "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
1999
+ "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
2000
+ className
2001
+ ),
2002
+ ...props,
2003
+ children: [
2004
+ /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
2005
+ children
2006
+ ]
2007
+ }
2008
+ )
2009
+ ] });
2010
+ }
2011
+ function DrawerHeader({ className, ...props }) {
2012
+ return /* @__PURE__ */ jsx(
2013
+ "div",
2014
+ {
2015
+ "data-slot": "drawer-header",
2016
+ className: cn("flex flex-col gap-1.5 p-4", className),
2017
+ ...props
2018
+ }
2019
+ );
2020
+ }
2021
+ function DrawerFooter({ className, ...props }) {
2022
+ return /* @__PURE__ */ jsx(
2023
+ "div",
2024
+ {
2025
+ "data-slot": "drawer-footer",
2026
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
2027
+ ...props
2028
+ }
2029
+ );
2030
+ }
2031
+ function DrawerTitle({
2032
+ className,
2033
+ ...props
2034
+ }) {
2035
+ return /* @__PURE__ */ jsx(
2036
+ Drawer$1.Title,
2037
+ {
2038
+ "data-slot": "drawer-title",
2039
+ className: cn("text-foreground font-semibold", className),
2040
+ ...props
2041
+ }
2042
+ );
2043
+ }
2044
+ function DrawerDescription({
2045
+ className,
2046
+ ...props
2047
+ }) {
2048
+ return /* @__PURE__ */ jsx(
2049
+ Drawer$1.Description,
2050
+ {
2051
+ "data-slot": "drawer-description",
2052
+ className: cn("text-muted-foreground text-sm", className),
2053
+ ...props
2054
+ }
2055
+ );
2056
+ }
2057
+ function DrawerHandle({ className, ...props }) {
2058
+ return /* @__PURE__ */ jsx(
2059
+ "div",
2060
+ {
2061
+ "data-slot": "drawer-handle",
2062
+ className: cn("bg-muted mx-auto mt-4 h-2 w-[100px] shrink-0 rounded-full", className),
2063
+ ...props
2064
+ }
2065
+ );
2066
+ }
2067
+ function HoverCard({
2068
+ ...props
2069
+ }) {
2070
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
2071
+ }
2072
+ function HoverCardTrigger({
2073
+ ...props
2074
+ }) {
2075
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
2076
+ }
2077
+ function HoverCardContent({
2078
+ className,
2079
+ align = "center",
2080
+ sideOffset = 4,
2081
+ ...props
2082
+ }) {
2083
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
2084
+ HoverCardPrimitive.Content,
2085
+ {
2086
+ "data-slot": "hover-card-content",
2087
+ align,
2088
+ sideOffset,
2089
+ className: cn(
2090
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
2091
+ className
2092
+ ),
2093
+ ...props
2094
+ }
2095
+ ) });
2096
+ }
2097
+ function ContextMenu({
2098
+ ...props
2099
+ }) {
2100
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
2101
+ }
2102
+ function ContextMenuTrigger({
2103
+ ...props
2104
+ }) {
2105
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
2106
+ }
2107
+ function ContextMenuGroup({
2108
+ ...props
2109
+ }) {
2110
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
2111
+ }
2112
+ function ContextMenuPortal({
2113
+ ...props
2114
+ }) {
2115
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
2116
+ }
2117
+ function ContextMenuSub({
2118
+ ...props
2119
+ }) {
2120
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
2121
+ }
2122
+ function ContextMenuRadioGroup({
2123
+ ...props
2124
+ }) {
2125
+ return /* @__PURE__ */ jsx(
2126
+ ContextMenuPrimitive.RadioGroup,
2127
+ {
2128
+ "data-slot": "context-menu-radio-group",
2129
+ ...props
2130
+ }
2131
+ );
2132
+ }
2133
+ function ContextMenuSubTrigger({
2134
+ className,
2135
+ inset,
2136
+ children,
2137
+ ...props
2138
+ }) {
2139
+ return /* @__PURE__ */ jsxs(
2140
+ ContextMenuPrimitive.SubTrigger,
2141
+ {
2142
+ "data-slot": "context-menu-sub-trigger",
2143
+ "data-inset": inset,
2144
+ className: cn(
2145
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2146
+ className
2147
+ ),
2148
+ ...props,
2149
+ children: [
2150
+ children,
2151
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
2152
+ ]
2153
+ }
2154
+ );
2155
+ }
2156
+ function ContextMenuSubContent({
2157
+ className,
2158
+ ...props
2159
+ }) {
2160
+ return /* @__PURE__ */ jsx(
2161
+ ContextMenuPrimitive.SubContent,
2162
+ {
2163
+ "data-slot": "context-menu-sub-content",
2164
+ className: cn(
2165
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
2166
+ className
2167
+ ),
2168
+ ...props
2169
+ }
2170
+ );
2171
+ }
2172
+ function ContextMenuContent({
2173
+ className,
2174
+ ...props
2175
+ }) {
2176
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
2177
+ ContextMenuPrimitive.Content,
2178
+ {
2179
+ "data-slot": "context-menu-content",
2180
+ className: cn(
2181
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
2182
+ className
2183
+ ),
2184
+ ...props
2185
+ }
2186
+ ) });
2187
+ }
2188
+ function ContextMenuItem({
2189
+ className,
2190
+ inset,
2191
+ variant = "default",
2192
+ ...props
2193
+ }) {
2194
+ return /* @__PURE__ */ jsx(
2195
+ ContextMenuPrimitive.Item,
2196
+ {
2197
+ "data-slot": "context-menu-item",
2198
+ "data-inset": inset,
2199
+ "data-variant": variant,
2200
+ className: cn(
2201
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2202
+ className
2203
+ ),
2204
+ ...props
2205
+ }
2206
+ );
2207
+ }
2208
+ function ContextMenuCheckboxItem({
2209
+ className,
2210
+ children,
2211
+ checked,
2212
+ ...props
2213
+ }) {
2214
+ return /* @__PURE__ */ jsxs(
2215
+ ContextMenuPrimitive.CheckboxItem,
2216
+ {
2217
+ "data-slot": "context-menu-checkbox-item",
2218
+ className: cn(
2219
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2220
+ className
2221
+ ),
2222
+ checked,
2223
+ ...props,
2224
+ children: [
2225
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
2226
+ children
2227
+ ]
2228
+ }
2229
+ );
2230
+ }
2231
+ function ContextMenuRadioItem({
2232
+ className,
2233
+ children,
2234
+ ...props
2235
+ }) {
2236
+ return /* @__PURE__ */ jsxs(
2237
+ ContextMenuPrimitive.RadioItem,
2238
+ {
2239
+ "data-slot": "context-menu-radio-item",
2240
+ className: cn(
2241
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2242
+ className
2243
+ ),
2244
+ ...props,
2245
+ children: [
2246
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
2247
+ children
2248
+ ]
2249
+ }
2250
+ );
2251
+ }
2252
+ function ContextMenuLabel({
2253
+ className,
2254
+ inset,
2255
+ ...props
2256
+ }) {
2257
+ return /* @__PURE__ */ jsx(
2258
+ ContextMenuPrimitive.Label,
2259
+ {
2260
+ "data-slot": "context-menu-label",
2261
+ "data-inset": inset,
2262
+ className: cn(
2263
+ "text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
2264
+ className
2265
+ ),
2266
+ ...props
2267
+ }
2268
+ );
2269
+ }
2270
+ function ContextMenuSeparator({
2271
+ className,
2272
+ ...props
2273
+ }) {
2274
+ return /* @__PURE__ */ jsx(
2275
+ ContextMenuPrimitive.Separator,
2276
+ {
2277
+ "data-slot": "context-menu-separator",
2278
+ className: cn("bg-border -mx-1 my-1 h-px", className),
2279
+ ...props
2280
+ }
2281
+ );
2282
+ }
2283
+ function ContextMenuShortcut({
2284
+ className,
2285
+ ...props
2286
+ }) {
2287
+ return /* @__PURE__ */ jsx(
2288
+ "span",
2289
+ {
2290
+ "data-slot": "context-menu-shortcut",
2291
+ className: cn(
2292
+ "text-muted-foreground ml-auto text-xs tracking-widest",
2293
+ className
2294
+ ),
2295
+ ...props
2296
+ }
2297
+ );
2298
+ }
2299
+ function Menubar({
2300
+ className,
2301
+ ...props
2302
+ }) {
2303
+ return /* @__PURE__ */ jsx(
2304
+ MenubarPrimitive.Root,
2305
+ {
2306
+ "data-slot": "menubar",
2307
+ className: cn(
2308
+ "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
2309
+ className
2310
+ ),
2311
+ ...props
2312
+ }
2313
+ );
2314
+ }
2315
+ function MenubarMenu({
2316
+ ...props
2317
+ }) {
2318
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
2319
+ }
2320
+ function MenubarGroup({
2321
+ ...props
2322
+ }) {
2323
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
2324
+ }
2325
+ function MenubarPortal({
2326
+ ...props
2327
+ }) {
2328
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
2329
+ }
2330
+ function MenubarRadioGroup({
2331
+ ...props
2332
+ }) {
2333
+ return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
2334
+ }
2335
+ function MenubarTrigger({
2336
+ className,
2337
+ ...props
2338
+ }) {
2339
+ return /* @__PURE__ */ jsx(
2340
+ MenubarPrimitive.Trigger,
2341
+ {
2342
+ "data-slot": "menubar-trigger",
2343
+ className: cn(
2344
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
2345
+ className
2346
+ ),
2347
+ ...props
2348
+ }
2349
+ );
2350
+ }
2351
+ function MenubarContent({
2352
+ className,
2353
+ align = "start",
2354
+ alignOffset = -4,
2355
+ sideOffset = 8,
2356
+ ...props
2357
+ }) {
2358
+ return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(
2359
+ MenubarPrimitive.Content,
2360
+ {
2361
+ "data-slot": "menubar-content",
2362
+ align,
2363
+ alignOffset,
2364
+ sideOffset,
2365
+ className: cn(
2366
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
2367
+ className
2368
+ ),
2369
+ ...props
2370
+ }
2371
+ ) });
2372
+ }
2373
+ function MenubarItem({
2374
+ className,
2375
+ inset,
2376
+ variant = "default",
2377
+ ...props
2378
+ }) {
2379
+ return /* @__PURE__ */ jsx(
2380
+ MenubarPrimitive.Item,
2381
+ {
2382
+ "data-slot": "menubar-item",
2383
+ "data-inset": inset,
2384
+ "data-variant": variant,
2385
+ className: cn(
2386
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2387
+ className
2388
+ ),
2389
+ ...props
2390
+ }
2391
+ );
2392
+ }
2393
+ function MenubarCheckboxItem({
2394
+ className,
2395
+ children,
2396
+ checked,
2397
+ ...props
2398
+ }) {
2399
+ return /* @__PURE__ */ jsxs(
2400
+ MenubarPrimitive.CheckboxItem,
2401
+ {
2402
+ "data-slot": "menubar-checkbox-item",
2403
+ className: cn(
2404
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2405
+ className
2406
+ ),
2407
+ checked,
2408
+ ...props,
2409
+ children: [
2410
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
2411
+ children
2412
+ ]
2413
+ }
2414
+ );
2415
+ }
2416
+ function MenubarRadioItem({
2417
+ className,
2418
+ children,
2419
+ ...props
2420
+ }) {
2421
+ return /* @__PURE__ */ jsxs(
2422
+ MenubarPrimitive.RadioItem,
2423
+ {
2424
+ "data-slot": "menubar-radio-item",
2425
+ className: cn(
2426
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2427
+ className
2428
+ ),
2429
+ ...props,
2430
+ children: [
2431
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
2432
+ children
2433
+ ]
2434
+ }
2435
+ );
2436
+ }
2437
+ function MenubarLabel({
2438
+ className,
2439
+ inset,
2440
+ ...props
2441
+ }) {
2442
+ return /* @__PURE__ */ jsx(
2443
+ MenubarPrimitive.Label,
2444
+ {
2445
+ "data-slot": "menubar-label",
2446
+ "data-inset": inset,
2447
+ className: cn(
2448
+ "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
2449
+ className
2450
+ ),
2451
+ ...props
2452
+ }
2453
+ );
2454
+ }
2455
+ function MenubarSeparator({
2456
+ className,
2457
+ ...props
2458
+ }) {
2459
+ return /* @__PURE__ */ jsx(
2460
+ MenubarPrimitive.Separator,
2461
+ {
2462
+ "data-slot": "menubar-separator",
2463
+ className: cn("bg-border -mx-1 my-1 h-px", className),
2464
+ ...props
2465
+ }
2466
+ );
2467
+ }
2468
+ function MenubarShortcut({
2469
+ className,
2470
+ ...props
2471
+ }) {
2472
+ return /* @__PURE__ */ jsx(
2473
+ "span",
2474
+ {
2475
+ "data-slot": "menubar-shortcut",
2476
+ className: cn(
2477
+ "text-muted-foreground ml-auto text-xs tracking-widest",
2478
+ className
2479
+ ),
2480
+ ...props
2481
+ }
2482
+ );
2483
+ }
2484
+ function MenubarSub({
2485
+ ...props
2486
+ }) {
2487
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
2488
+ }
2489
+ function MenubarSubTrigger({
2490
+ className,
2491
+ inset,
2492
+ children,
2493
+ ...props
2494
+ }) {
2495
+ return /* @__PURE__ */ jsxs(
2496
+ MenubarPrimitive.SubTrigger,
2497
+ {
2498
+ "data-slot": "menubar-sub-trigger",
2499
+ "data-inset": inset,
2500
+ className: cn(
2501
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",
2502
+ className
2503
+ ),
2504
+ ...props,
2505
+ children: [
2506
+ children,
2507
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
2508
+ ]
2509
+ }
2510
+ );
2511
+ }
2512
+ function MenubarSubContent({
2513
+ className,
2514
+ ...props
2515
+ }) {
2516
+ return /* @__PURE__ */ jsx(
2517
+ MenubarPrimitive.SubContent,
2518
+ {
2519
+ "data-slot": "menubar-sub-content",
2520
+ className: cn(
2521
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
2522
+ className
2523
+ ),
2524
+ ...props
2525
+ }
2526
+ );
2527
+ }
2528
+ function Command({
2529
+ className,
2530
+ ...props
2531
+ }) {
2532
+ return /* @__PURE__ */ jsx(
2533
+ Command$1,
2534
+ {
2535
+ "data-slot": "command",
2536
+ className: cn(
2537
+ "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
2538
+ className
2539
+ ),
2540
+ ...props
2541
+ }
2542
+ );
2543
+ }
2544
+ function CommandDialog({
2545
+ title = "Command Palette",
2546
+ description = "Search for a command to run...",
2547
+ children,
2548
+ ...props
2549
+ }) {
2550
+ return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
2551
+ /* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
2552
+ /* @__PURE__ */ jsx(DialogTitle, { children: title }),
2553
+ /* @__PURE__ */ jsx(DialogDescription, { children: description })
2554
+ ] }),
2555
+ /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) })
2556
+ ] });
2557
+ }
2558
+ function CommandInput({
2559
+ className,
2560
+ ...props
2561
+ }) {
2562
+ return /* @__PURE__ */ jsxs(
2563
+ "div",
2564
+ {
2565
+ "data-slot": "command-input-wrapper",
2566
+ className: "flex h-9 items-center gap-2 border-b px-3",
2567
+ children: [
2568
+ /* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
2569
+ /* @__PURE__ */ jsx(
2570
+ Command$1.Input,
2571
+ {
2572
+ "data-slot": "command-input",
2573
+ className: cn(
2574
+ "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
2575
+ className
2576
+ ),
2577
+ ...props
2578
+ }
2579
+ )
2580
+ ]
2581
+ }
2582
+ );
2583
+ }
2584
+ function CommandList({
2585
+ className,
2586
+ ...props
2587
+ }) {
2588
+ return /* @__PURE__ */ jsx(
2589
+ Command$1.List,
2590
+ {
2591
+ "data-slot": "command-list",
2592
+ role: "listbox",
2593
+ className: cn(
2594
+ "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
2595
+ className
2596
+ ),
2597
+ ...props
2598
+ }
2599
+ );
2600
+ }
2601
+ function CommandEmpty({
2602
+ ...props
2603
+ }) {
2604
+ return /* @__PURE__ */ jsx(
2605
+ Command$1.Empty,
2606
+ {
2607
+ "data-slot": "command-empty",
2608
+ className: "py-6 text-center text-sm",
2609
+ ...props
2610
+ }
2611
+ );
2612
+ }
2613
+ function CommandGroup({
2614
+ className,
2615
+ ...props
2616
+ }) {
2617
+ return /* @__PURE__ */ jsx(
2618
+ Command$1.Group,
2619
+ {
2620
+ "data-slot": "command-group",
2621
+ className: cn(
2622
+ "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
2623
+ className
2624
+ ),
2625
+ ...props
2626
+ }
2627
+ );
2628
+ }
2629
+ function CommandSeparator({
2630
+ className,
2631
+ ...props
2632
+ }) {
2633
+ return /* @__PURE__ */ jsx(
2634
+ Command$1.Separator,
2635
+ {
2636
+ "data-slot": "command-separator",
2637
+ className: cn("bg-border -mx-1 h-px", className),
2638
+ ...props
2639
+ }
2640
+ );
2641
+ }
2642
+ function CommandItem({
2643
+ className,
2644
+ ...props
2645
+ }) {
2646
+ return /* @__PURE__ */ jsx(
2647
+ Command$1.Item,
2648
+ {
2649
+ "data-slot": "command-item",
2650
+ role: "option",
2651
+ className: cn(
2652
+ "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2653
+ className
2654
+ ),
2655
+ ...props
2656
+ }
2657
+ );
2658
+ }
2659
+ function CommandShortcut({
2660
+ className,
2661
+ ...props
2662
+ }) {
2663
+ return /* @__PURE__ */ jsx(
2664
+ "span",
2665
+ {
2666
+ "data-slot": "command-shortcut",
2667
+ className: cn(
2668
+ "text-muted-foreground ml-auto text-xs tracking-widest",
2669
+ className
2670
+ ),
2671
+ ...props
2672
+ }
2673
+ );
2674
+ }
2675
+ const variantStyles = {
2676
+ default: "bg-primary text-primary-foreground",
2677
+ secondary: "bg-secondary text-secondary-foreground",
2678
+ destructive: "bg-destructive text-destructive-foreground",
2679
+ outline: "border-2 border-primary bg-background text-primary",
2680
+ success: "bg-success text-success-foreground",
2681
+ info: "bg-info text-info-foreground",
2682
+ warning: "bg-warning text-warning-foreground"
2683
+ };
2684
+ const NotificationBadge = React.forwardRef(
2685
+ ({
2686
+ className,
2687
+ count = 0,
2688
+ max = 99,
2689
+ showZero = false,
2690
+ dot = false,
2691
+ variant = "destructive",
2692
+ children,
2693
+ ...props
2694
+ }, ref) => {
2695
+ const displayCount = count > max ? `${max}+` : count;
2696
+ const shouldShow = count > 0 || showZero;
2697
+ if (!shouldShow && !dot) {
2698
+ return /* @__PURE__ */ jsx("div", { ref, className, ...props, children });
2699
+ }
2700
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("relative inline-block", className), ...props, children: [
2701
+ children,
2702
+ /* @__PURE__ */ jsx(
2703
+ "span",
2704
+ {
2705
+ className: cn(
2706
+ "absolute -right-1 -top-1 flex items-center justify-center rounded-full",
2707
+ variantStyles[variant],
2708
+ dot ? "h-2 w-2" : "min-w-[1.25rem] h-5 px-1.5"
2709
+ ),
2710
+ children: !dot && shouldShow && /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-none", children: displayCount })
2711
+ }
2712
+ )
2713
+ ] });
2714
+ }
2715
+ );
2716
+ NotificationBadge.displayName = "NotificationBadge";
2717
+ const StatsCard = React.forwardRef(
2718
+ ({ className, title, value, description, trend, icon, ...props }, ref) => {
2719
+ const getTrendIcon = () => {
2720
+ if (!trend) return null;
2721
+ if (trend.value > 0) {
2722
+ return /* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4 text-success" });
2723
+ } else if (trend.value < 0) {
2724
+ return /* @__PURE__ */ jsx(TrendingDown, { className: "h-4 w-4 text-destructive" });
2725
+ } else {
2726
+ return /* @__PURE__ */ jsx(Minus, { className: "h-4 w-4 text-muted-foreground" });
2727
+ }
2728
+ };
2729
+ const getTrendColor = () => {
2730
+ if (!trend) return "";
2731
+ if (trend.value > 0) {
2732
+ return "text-success";
2733
+ } else if (trend.value < 0) {
2734
+ return "text-destructive";
2735
+ } else {
2736
+ return "text-muted-foreground";
2737
+ }
2738
+ };
2739
+ return /* @__PURE__ */ jsx(Card, { ref, className: cn("", className), ...props, children: /* @__PURE__ */ jsx(CardContent, { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
2740
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
2741
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-1 text-sm", children: title }),
2742
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-2", children: [
2743
+ /* @__PURE__ */ jsx("h3", { className: "text-foreground text-xl sm:text-2xl", children: value }),
2744
+ trend && /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1 text-sm", getTrendColor()), children: [
2745
+ getTrendIcon(),
2746
+ /* @__PURE__ */ jsxs("span", { children: [
2747
+ Math.abs(trend.value),
2748
+ "%"
2749
+ ] })
2750
+ ] })
2751
+ ] }),
2752
+ (description || (trend == null ? void 0 : trend.label)) && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1 text-xs sm:text-sm", children: (trend == null ? void 0 : trend.label) || description })
2753
+ ] }),
2754
+ icon && /* @__PURE__ */ jsx("div", { className: "rounded-[var(--radius)] bg-muted p-2 sm:p-3 text-muted-foreground flex-shrink-0", children: icon })
2755
+ ] }) }) });
2756
+ }
2757
+ );
2758
+ StatsCard.displayName = "StatsCard";
2759
+ const Timeline = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2760
+ "ol",
2761
+ {
2762
+ ref,
2763
+ className: cn("relative border-l border-border", className),
2764
+ ...props
2765
+ }
2766
+ ));
2767
+ Timeline.displayName = "Timeline";
2768
+ const TimelineItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2769
+ "li",
2770
+ {
2771
+ ref,
2772
+ className: cn("mb-10 ml-6", className),
2773
+ ...props
2774
+ }
2775
+ ));
2776
+ TimelineItem.displayName = "TimelineItem";
2777
+ const TimelineDot = React.forwardRef(({ className, variant = "default", icon, children, ...props }, ref) => {
2778
+ const variantStyles2 = {
2779
+ default: "bg-muted border-border",
2780
+ primary: "bg-primary border-primary",
2781
+ success: "bg-success border-success",
2782
+ info: "bg-info border-info",
2783
+ warning: "bg-warning border-warning",
2784
+ destructive: "bg-destructive border-destructive",
2785
+ outline: "bg-background border-border"
2786
+ };
2787
+ const iconColorStyles = {
2788
+ default: "text-muted-foreground",
2789
+ primary: "text-primary-foreground",
2790
+ success: "text-success-foreground",
2791
+ info: "text-info-foreground",
2792
+ warning: "text-warning-foreground",
2793
+ destructive: "text-destructive-foreground",
2794
+ outline: "text-foreground"
2795
+ };
2796
+ if (icon || children) {
2797
+ return /* @__PURE__ */ jsx(
2798
+ "div",
2799
+ {
2800
+ ref,
2801
+ className: cn(
2802
+ "absolute -left-[17px] mt-0.5 h-8 w-8 rounded-full border-2 flex items-center justify-center",
2803
+ variantStyles2[variant],
2804
+ className
2805
+ ),
2806
+ ...props,
2807
+ children: /* @__PURE__ */ jsx("span", { className: cn("h-4 w-4", iconColorStyles[variant]), children: icon || children })
2808
+ }
2809
+ );
2810
+ }
2811
+ return /* @__PURE__ */ jsx(
2812
+ "div",
2813
+ {
2814
+ ref,
2815
+ className: cn(
2816
+ "absolute -left-[9px] mt-1.5 h-4 w-4 rounded-full border-2",
2817
+ variantStyles2[variant],
2818
+ className
2819
+ ),
2820
+ ...props
2821
+ }
2822
+ );
2823
+ });
2824
+ TimelineDot.displayName = "TimelineDot";
2825
+ const TimelineContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2826
+ "div",
2827
+ {
2828
+ ref,
2829
+ className: cn("", className),
2830
+ ...props
2831
+ }
2832
+ ));
2833
+ TimelineContent.displayName = "TimelineContent";
2834
+ const TimelineHeading = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2835
+ "h3",
2836
+ {
2837
+ ref,
2838
+ className: cn("mb-1 text-foreground", className),
2839
+ ...props
2840
+ }
2841
+ ));
2842
+ TimelineHeading.displayName = "TimelineHeading";
2843
+ const TimelineTime = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2844
+ "time",
2845
+ {
2846
+ ref,
2847
+ className: cn("mb-2 block text-muted-foreground", className),
2848
+ ...props
2849
+ }
2850
+ ));
2851
+ TimelineTime.displayName = "TimelineTime";
2852
+ const TimelineDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2853
+ "p",
2854
+ {
2855
+ ref,
2856
+ className: cn("text-muted-foreground", className),
2857
+ ...props
2858
+ }
2859
+ ));
2860
+ TimelineDescription.displayName = "TimelineDescription";
2861
+ const TreeView = React.forwardRef(
2862
+ ({ className, data, onNodeClick, onNodeSelect, defaultExpanded = [], selectedNodeId, ...props }, ref) => {
2863
+ const [expanded, setExpanded] = React.useState(new Set(defaultExpanded));
2864
+ const [internalSelectedId, setInternalSelectedId] = React.useState(void 0);
2865
+ const nodeRefs = React.useRef(/* @__PURE__ */ new Map());
2866
+ const isControlled = selectedNodeId !== void 0;
2867
+ const effectiveSelectedId = isControlled ? selectedNodeId : internalSelectedId;
2868
+ const toggleExpand = (nodeId) => {
2869
+ setExpanded((prev) => {
2870
+ const next = new Set(prev);
2871
+ next.has(nodeId) ? next.delete(nodeId) : next.add(nodeId);
2872
+ return next;
2873
+ });
2874
+ };
2875
+ const getVisibleNodes = React.useCallback(() => {
2876
+ const result = [];
2877
+ const traverse = (nodes) => {
2878
+ var _a;
2879
+ for (const node of nodes) {
2880
+ result.push(node);
2881
+ if (((_a = node.children) == null ? void 0 : _a.length) && expanded.has(node.id)) traverse(node.children);
2882
+ }
2883
+ };
2884
+ traverse(data);
2885
+ return result;
2886
+ }, [data, expanded]);
2887
+ const findParent = (nodes, targetId) => {
2888
+ var _a;
2889
+ for (const n of nodes) {
2890
+ if ((_a = n.children) == null ? void 0 : _a.some((c) => c.id === targetId)) return n;
2891
+ if (n.children) {
2892
+ const found = findParent(n.children, targetId);
2893
+ if (found) return found;
2894
+ }
2895
+ }
2896
+ return null;
2897
+ };
2898
+ const handleSelect = (node) => {
2899
+ if (!isControlled) setInternalSelectedId(node.id);
2900
+ onNodeSelect == null ? void 0 : onNodeSelect(node);
2901
+ onNodeClick == null ? void 0 : onNodeClick(node);
2902
+ };
2903
+ const handleKeyDown = (e, node) => {
2904
+ var _a, _b;
2905
+ const visibleNodes = getVisibleNodes();
2906
+ const idx = visibleNodes.findIndex((n) => n.id === node.id);
2907
+ const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
2908
+ const isExpanded = expanded.has(node.id);
2909
+ const focusNode = (id) => {
2910
+ var _a2;
2911
+ (_a2 = nodeRefs.current.get(id)) == null ? void 0 : _a2.focus();
2912
+ };
2913
+ switch (e.key) {
2914
+ case "ArrowDown": {
2915
+ e.preventDefault();
2916
+ const next = visibleNodes[idx + 1];
2917
+ if (next) focusNode(next.id);
2918
+ break;
2919
+ }
2920
+ case "ArrowUp": {
2921
+ e.preventDefault();
2922
+ const prev = visibleNodes[idx - 1];
2923
+ if (prev) focusNode(prev.id);
2924
+ break;
2925
+ }
2926
+ case "ArrowRight": {
2927
+ e.preventDefault();
2928
+ if (hasChildren && !isExpanded) {
2929
+ toggleExpand(node.id);
2930
+ } else if (hasChildren && isExpanded && ((_b = node.children) == null ? void 0 : _b.length)) {
2931
+ focusNode(node.children[0].id);
2932
+ }
2933
+ break;
2934
+ }
2935
+ case "ArrowLeft": {
2936
+ e.preventDefault();
2937
+ if (hasChildren && isExpanded) {
2938
+ toggleExpand(node.id);
2939
+ } else {
2940
+ const parent = findParent(data, node.id);
2941
+ if (parent) focusNode(parent.id);
2942
+ }
2943
+ break;
2944
+ }
2945
+ case "Home": {
2946
+ e.preventDefault();
2947
+ if (visibleNodes.length > 0) focusNode(visibleNodes[0].id);
2948
+ break;
2949
+ }
2950
+ case "End": {
2951
+ e.preventDefault();
2952
+ const last = visibleNodes[visibleNodes.length - 1];
2953
+ if (last) focusNode(last.id);
2954
+ break;
2955
+ }
2956
+ case "Enter":
2957
+ case " ": {
2958
+ e.preventDefault();
2959
+ if (hasChildren) toggleExpand(node.id);
2960
+ handleSelect(node);
2961
+ break;
2962
+ }
2963
+ }
2964
+ };
2965
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("w-full", className), role: "tree", ...props, children: data.map((node) => /* @__PURE__ */ jsx(
2966
+ TreeNodeComponent,
2967
+ {
2968
+ node,
2969
+ level: 0,
2970
+ expanded,
2971
+ selectedId: effectiveSelectedId,
2972
+ onToggle: toggleExpand,
2973
+ onSelect: handleSelect,
2974
+ onKeyDown: handleKeyDown,
2975
+ nodeRefs
2976
+ },
2977
+ node.id
2978
+ )) });
2979
+ }
2980
+ );
2981
+ TreeView.displayName = "TreeView";
2982
+ const TreeNodeComponent = ({
2983
+ node,
2984
+ level,
2985
+ expanded,
2986
+ selectedId,
2987
+ onToggle,
2988
+ onSelect,
2989
+ onKeyDown,
2990
+ nodeRefs
2991
+ }) => {
2992
+ var _a;
2993
+ const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
2994
+ const isExpanded = expanded.has(node.id);
2995
+ const isSelected = node.id === selectedId;
2996
+ const handleClick = () => {
2997
+ if (hasChildren) onToggle(node.id);
2998
+ onSelect(node);
2999
+ };
3000
+ const setRef = (el) => {
3001
+ if (el) nodeRefs.current.set(node.id, el);
3002
+ else nodeRefs.current.delete(node.id);
3003
+ };
3004
+ return /* @__PURE__ */ jsxs("div", { role: "none", children: [
3005
+ /* @__PURE__ */ jsxs(
3006
+ "button",
3007
+ {
3008
+ ref: setRef,
3009
+ role: "treeitem",
3010
+ "aria-expanded": hasChildren ? isExpanded : void 0,
3011
+ "aria-selected": isSelected,
3012
+ tabIndex: isSelected ? 0 : -1,
3013
+ onClick: handleClick,
3014
+ onKeyDown: (e) => onKeyDown(e, node),
3015
+ className: cn(
3016
+ "flex w-full items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-left transition-colors",
3017
+ "hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
3018
+ isSelected && "bg-primary/10 text-primary font-medium"
3019
+ ),
3020
+ style: { paddingLeft: `${level * 1.5 + 0.5}rem` },
3021
+ children: [
3022
+ hasChildren ? /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }) }) : /* @__PURE__ */ jsx("span", { className: "w-4 flex-shrink-0", "aria-hidden": "true" }),
3023
+ node.icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: node.icon }),
3024
+ /* @__PURE__ */ jsx("span", { className: "flex-1 text-foreground", children: node.label })
3025
+ ]
3026
+ }
3027
+ ),
3028
+ hasChildren && isExpanded && /* @__PURE__ */ jsx("div", { role: "group", children: node.children.map((child) => /* @__PURE__ */ jsx(
3029
+ TreeNodeComponent,
3030
+ {
3031
+ node: child,
3032
+ level: level + 1,
3033
+ expanded,
3034
+ selectedId,
3035
+ onToggle,
3036
+ onSelect,
3037
+ onKeyDown,
3038
+ nodeRefs
3039
+ },
3040
+ child.id
3041
+ )) })
3042
+ ] });
3043
+ };
3044
+ function Collapsible({
3045
+ ...props
3046
+ }) {
3047
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
3048
+ }
3049
+ function CollapsibleTrigger({
3050
+ ...props
3051
+ }) {
3052
+ return /* @__PURE__ */ jsx(
3053
+ CollapsiblePrimitive.CollapsibleTrigger,
3054
+ {
3055
+ "data-slot": "collapsible-trigger",
3056
+ ...props
3057
+ }
3058
+ );
3059
+ }
3060
+ function CollapsibleContent({
3061
+ ...props
3062
+ }) {
3063
+ return /* @__PURE__ */ jsx(
3064
+ CollapsiblePrimitive.CollapsibleContent,
3065
+ {
3066
+ "data-slot": "collapsible-content",
3067
+ ...props
3068
+ }
3069
+ );
3070
+ }
3071
+ function Accordion({
3072
+ ...props
3073
+ }) {
3074
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
3075
+ }
3076
+ function AccordionItem({
3077
+ className,
3078
+ ...props
3079
+ }) {
3080
+ return /* @__PURE__ */ jsx(
3081
+ AccordionPrimitive.Item,
3082
+ {
3083
+ "data-slot": "accordion-item",
3084
+ className: cn("border-b last:border-b-0", className),
3085
+ ...props
3086
+ }
3087
+ );
3088
+ }
3089
+ function AccordionTrigger({
3090
+ className,
3091
+ children,
3092
+ ...props
3093
+ }) {
3094
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
3095
+ AccordionPrimitive.Trigger,
3096
+ {
3097
+ "data-slot": "accordion-trigger",
3098
+ className: cn(
3099
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
3100
+ className
3101
+ ),
3102
+ ...props,
3103
+ children: [
3104
+ children,
3105
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
3106
+ ]
3107
+ }
3108
+ ) });
3109
+ }
3110
+ function AccordionContent({
3111
+ className,
3112
+ children,
3113
+ ...props
3114
+ }) {
3115
+ return /* @__PURE__ */ jsx(
3116
+ AccordionPrimitive.Content,
3117
+ {
3118
+ "data-slot": "accordion-content",
3119
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
3120
+ ...props,
3121
+ children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
3122
+ }
3123
+ );
3124
+ }
3125
+ const CarouselContext = React.createContext(null);
3126
+ function useCarousel() {
3127
+ const context = React.useContext(CarouselContext);
3128
+ if (!context) {
3129
+ throw new Error("useCarousel must be used within a <Carousel />");
3130
+ }
3131
+ return context;
3132
+ }
3133
+ function Carousel({
3134
+ orientation = "horizontal",
3135
+ opts,
3136
+ setApi,
3137
+ plugins,
3138
+ className,
3139
+ children,
3140
+ ...props
3141
+ }) {
3142
+ const [carouselRef, api] = useEmblaCarousel(
3143
+ {
3144
+ ...opts,
3145
+ axis: orientation === "horizontal" ? "x" : "y"
3146
+ },
3147
+ plugins
3148
+ );
3149
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
3150
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
3151
+ const onSelect = React.useCallback((api2) => {
3152
+ if (!api2) return;
3153
+ setCanScrollPrev(api2.canScrollPrev());
3154
+ setCanScrollNext(api2.canScrollNext());
3155
+ }, []);
3156
+ const scrollPrev = React.useCallback(() => {
3157
+ api == null ? void 0 : api.scrollPrev();
3158
+ }, [api]);
3159
+ const scrollNext = React.useCallback(() => {
3160
+ api == null ? void 0 : api.scrollNext();
3161
+ }, [api]);
3162
+ const handleKeyDown = React.useCallback(
3163
+ (event) => {
3164
+ if (event.key === "ArrowLeft") {
3165
+ event.preventDefault();
3166
+ scrollPrev();
3167
+ } else if (event.key === "ArrowRight") {
3168
+ event.preventDefault();
3169
+ scrollNext();
3170
+ }
3171
+ },
3172
+ [scrollPrev, scrollNext]
3173
+ );
3174
+ React.useEffect(() => {
3175
+ if (!api || !setApi) return;
3176
+ setApi(api);
3177
+ }, [api, setApi]);
3178
+ React.useEffect(() => {
3179
+ if (!api) return;
3180
+ onSelect(api);
3181
+ api.on("reInit", onSelect);
3182
+ api.on("select", onSelect);
3183
+ return () => {
3184
+ api == null ? void 0 : api.off("select", onSelect);
3185
+ };
3186
+ }, [api, onSelect]);
3187
+ return /* @__PURE__ */ jsx(
3188
+ CarouselContext.Provider,
3189
+ {
3190
+ value: {
3191
+ carouselRef,
3192
+ api,
3193
+ opts,
3194
+ orientation: orientation || ((opts == null ? void 0 : opts.axis) === "y" ? "vertical" : "horizontal"),
3195
+ scrollPrev,
3196
+ scrollNext,
3197
+ canScrollPrev,
3198
+ canScrollNext
3199
+ },
3200
+ children: /* @__PURE__ */ jsx(
3201
+ "div",
3202
+ {
3203
+ onKeyDownCapture: handleKeyDown,
3204
+ className: cn("relative", className),
3205
+ role: "region",
3206
+ "aria-roledescription": "carousel",
3207
+ "data-slot": "carousel",
3208
+ ...props,
3209
+ children
3210
+ }
3211
+ )
3212
+ }
3213
+ );
3214
+ }
3215
+ function CarouselContent({ className, ...props }) {
3216
+ const { carouselRef, orientation } = useCarousel();
3217
+ return /* @__PURE__ */ jsx(
3218
+ "div",
3219
+ {
3220
+ ref: carouselRef,
3221
+ className: "overflow-hidden",
3222
+ "data-slot": "carousel-content",
3223
+ children: /* @__PURE__ */ jsx(
3224
+ "div",
3225
+ {
3226
+ className: cn(
3227
+ "flex",
3228
+ orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
3229
+ className
3230
+ ),
3231
+ ...props
3232
+ }
3233
+ )
3234
+ }
3235
+ );
3236
+ }
3237
+ function CarouselItem({ className, ...props }) {
3238
+ const { orientation } = useCarousel();
3239
+ return /* @__PURE__ */ jsx(
3240
+ "div",
3241
+ {
3242
+ role: "group",
3243
+ "aria-roledescription": "slide",
3244
+ "data-slot": "carousel-item",
3245
+ className: cn(
3246
+ "min-w-0 shrink-0 grow-0 basis-full",
3247
+ orientation === "horizontal" ? "pl-4" : "pt-4",
3248
+ className
3249
+ ),
3250
+ ...props
3251
+ }
3252
+ );
3253
+ }
3254
+ function CarouselPrevious({
3255
+ className,
3256
+ variant = "outline",
3257
+ size = "icon",
3258
+ ...props
3259
+ }) {
3260
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
3261
+ return /* @__PURE__ */ jsxs(
3262
+ Button,
3263
+ {
3264
+ "data-slot": "carousel-previous",
3265
+ variant,
3266
+ size,
3267
+ className: cn(
3268
+ "absolute size-8 rounded-full",
3269
+ orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
3270
+ className
3271
+ ),
3272
+ disabled: !canScrollPrev,
3273
+ onClick: scrollPrev,
3274
+ ...props,
3275
+ children: [
3276
+ /* @__PURE__ */ jsx(ArrowLeft, {}),
3277
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
3278
+ ]
3279
+ }
3280
+ );
3281
+ }
3282
+ function CarouselNext({
3283
+ className,
3284
+ variant = "outline",
3285
+ size = "icon",
3286
+ ...props
3287
+ }) {
3288
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
3289
+ return /* @__PURE__ */ jsxs(
3290
+ Button,
3291
+ {
3292
+ "data-slot": "carousel-next",
3293
+ variant,
3294
+ size,
3295
+ className: cn(
3296
+ "absolute size-8 rounded-full",
3297
+ orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
3298
+ className
3299
+ ),
3300
+ disabled: !canScrollNext,
3301
+ onClick: scrollNext,
3302
+ ...props,
3303
+ children: [
3304
+ /* @__PURE__ */ jsx(ArrowRight, {}),
3305
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
3306
+ ]
3307
+ }
3308
+ );
3309
+ }
3310
+ const StepperContext = React.createContext(void 0);
3311
+ const useStepper = () => {
3312
+ const context = React.useContext(StepperContext);
3313
+ if (!context) throw new Error("useStepper must be used within a Stepper");
3314
+ return context;
3315
+ };
3316
+ const Stepper = React.forwardRef(
3317
+ ({ currentStep, orientation = "horizontal", className, children, ...props }, ref) => {
3318
+ const totalSteps = React.Children.count(children);
3319
+ return /* @__PURE__ */ jsx(StepperContext.Provider, { value: { currentStep, totalSteps, orientation }, children: /* @__PURE__ */ jsx(
3320
+ "div",
3321
+ {
3322
+ ref,
3323
+ className: cn("w-full", className),
3324
+ ...props,
3325
+ children: /* @__PURE__ */ jsx("div", { className: cn(
3326
+ orientation === "horizontal" ? "flex items-start justify-between" : "flex flex-col gap-0"
3327
+ ), children })
3328
+ }
3329
+ ) });
3330
+ }
3331
+ );
3332
+ Stepper.displayName = "Stepper";
3333
+ const Step = React.forwardRef(
3334
+ ({ step, label, description, error = false, className, ...props }, ref) => {
3335
+ const { currentStep, totalSteps, orientation } = useStepper();
3336
+ const isActive = step === currentStep;
3337
+ const isCompleted = step < currentStep && !error;
3338
+ const isFirst = step === 1;
3339
+ const isLast = step === totalSteps;
3340
+ const circleClasses = cn(
3341
+ "relative flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors",
3342
+ isActive && !error && "border-primary bg-primary text-primary-foreground",
3343
+ isCompleted && "border-primary bg-primary text-primary-foreground",
3344
+ error && "border-destructive bg-destructive text-destructive-foreground",
3345
+ !isActive && !isCompleted && !error && "border-muted bg-background text-muted-foreground"
3346
+ );
3347
+ const connectorClasses = (filled) => cn("transition-colors", filled ? "bg-primary" : "bg-muted");
3348
+ if (orientation === "vertical") {
3349
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex gap-4", className), ...props, children: [
3350
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
3351
+ /* @__PURE__ */ jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsx(X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsx(Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx("span", { children: step }) }),
3352
+ !isLast && /* @__PURE__ */ jsx("div", { className: cn("w-0.5 flex-1 min-h-[2rem] mt-1", connectorClasses(step < currentStep)) })
3353
+ ] }),
3354
+ /* @__PURE__ */ jsxs("div", { className: cn("pb-6", isLast && "pb-0"), children: [
3355
+ /* @__PURE__ */ jsx("div", { className: cn("transition-colors", isActive || error ? "text-foreground" : "text-muted-foreground"), children: label }),
3356
+ description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
3357
+ ] })
3358
+ ] });
3359
+ }
3360
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-1 flex-col items-center", className), ...props, children: [
3361
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full items-start", children: [
3362
+ step > 1 && /* @__PURE__ */ jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step <= currentStep)) }),
3363
+ /* @__PURE__ */ jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsx(X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsx(Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx("span", { children: step }) }),
3364
+ step < totalSteps && /* @__PURE__ */ jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step < currentStep)) })
3365
+ ] }),
3366
+ /* @__PURE__ */ jsxs("div", { className: cn(
3367
+ "mt-2 px-1",
3368
+ isFirst && "text-left self-start",
3369
+ isLast && "text-right self-end",
3370
+ !isFirst && !isLast && "text-center w-full"
3371
+ ), children: [
3372
+ /* @__PURE__ */ jsx("div", { className: cn("transition-colors", isActive || error ? "text-foreground" : "text-muted-foreground"), children: label }),
3373
+ description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
3374
+ ] })
3375
+ ] });
3376
+ }
3377
+ );
3378
+ Step.displayName = "Step";
3379
+ const FileUpload = React.forwardRef(
3380
+ ({
3381
+ className,
3382
+ onFilesChange,
3383
+ maxFiles = 1,
3384
+ maxSize = 5 * 1024 * 1024,
3385
+ // 5MB default
3386
+ showPreview = true,
3387
+ onError,
3388
+ accept,
3389
+ disabled,
3390
+ ...props
3391
+ }, ref) => {
3392
+ const [files, setFiles] = React.useState([]);
3393
+ const [dragActive, setDragActive] = React.useState(false);
3394
+ const [errorMessage, setErrorMessage] = React.useState(null);
3395
+ const inputRef = React.useRef(null);
3396
+ const handleFiles = (newFiles) => {
3397
+ if (!newFiles) return;
3398
+ setErrorMessage(null);
3399
+ const filesArray = Array.from(newFiles);
3400
+ const oversized = filesArray.filter((f) => f.size > maxSize);
3401
+ const validFiles = filesArray.filter((f) => f.size <= maxSize);
3402
+ if (oversized.length > 0) {
3403
+ const limitMB = (maxSize / 1024 / 1024).toFixed(0);
3404
+ setErrorMessage(`${oversized.length} file(s) exceed the ${limitMB}MB limit and were not added.`);
3405
+ onError == null ? void 0 : onError(oversized, "size");
3406
+ }
3407
+ const merged = maxFiles === 1 ? validFiles.slice(0, 1) : [...files, ...validFiles].slice(0, maxFiles);
3408
+ const countRejected = maxFiles === 1 ? validFiles.slice(1) : [...files, ...validFiles].slice(maxFiles);
3409
+ if (countRejected.length > 0) {
3410
+ setErrorMessage(`Only ${maxFiles} file(s) allowed. ${countRejected.length} file(s) were not added.`);
3411
+ onError == null ? void 0 : onError(countRejected, "count");
3412
+ }
3413
+ setFiles(merged);
3414
+ onFilesChange == null ? void 0 : onFilesChange(merged);
3415
+ };
3416
+ const handleDrag = (e) => {
3417
+ e.preventDefault();
3418
+ e.stopPropagation();
3419
+ if (e.type === "dragenter" || e.type === "dragover") {
3420
+ setDragActive(true);
3421
+ } else if (e.type === "dragleave") {
3422
+ setDragActive(false);
3423
+ }
3424
+ };
3425
+ const handleDrop = (e) => {
3426
+ e.preventDefault();
3427
+ e.stopPropagation();
3428
+ setDragActive(false);
3429
+ if (disabled) return;
3430
+ handleFiles(e.dataTransfer.files);
3431
+ };
3432
+ const handleChange = (e) => {
3433
+ e.preventDefault();
3434
+ if (disabled) return;
3435
+ handleFiles(e.target.files);
3436
+ };
3437
+ const removeFile = (index) => {
3438
+ const updatedFiles = files.filter((_, i) => i !== index);
3439
+ setFiles(updatedFiles);
3440
+ onFilesChange == null ? void 0 : onFilesChange(updatedFiles);
3441
+ if (updatedFiles.length === 0) setErrorMessage(null);
3442
+ };
3443
+ const openFileDialog = () => {
3444
+ var _a;
3445
+ if (!disabled) {
3446
+ setErrorMessage(null);
3447
+ (_a = inputRef.current) == null ? void 0 : _a.click();
3448
+ }
3449
+ };
3450
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("w-full", className), children: [
3451
+ /* @__PURE__ */ jsxs(
3452
+ "div",
3453
+ {
3454
+ onDragEnter: handleDrag,
3455
+ onDragLeave: handleDrag,
3456
+ onDragOver: handleDrag,
3457
+ onDrop: handleDrop,
3458
+ onClick: openFileDialog,
3459
+ className: cn(
3460
+ "relative flex cursor-pointer flex-col items-center justify-center rounded-[var(--radius)] border-2 border-dashed border-border bg-background p-8 transition-colors hover:bg-muted/50",
3461
+ dragActive && "border-primary bg-primary/5",
3462
+ errorMessage && "border-destructive/50",
3463
+ disabled && "cursor-not-allowed opacity-50"
3464
+ ),
3465
+ children: [
3466
+ /* @__PURE__ */ jsx(Upload, { className: "mb-4 h-10 w-10 text-muted-foreground" }),
3467
+ /* @__PURE__ */ jsxs("p", { className: "mb-2 text-foreground", children: [
3468
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: "Click to upload" }),
3469
+ " or drag and drop"
3470
+ ] }),
3471
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
3472
+ maxFiles > 1 ? `Up to ${maxFiles} files` : "1 file",
3473
+ " • Max ",
3474
+ (maxSize / 1024 / 1024).toFixed(0),
3475
+ "MB"
3476
+ ] }),
3477
+ /* @__PURE__ */ jsx(
3478
+ "input",
3479
+ {
3480
+ ...props,
3481
+ ref: inputRef,
3482
+ type: "file",
3483
+ className: "hidden",
3484
+ onChange: handleChange,
3485
+ multiple: maxFiles > 1,
3486
+ accept,
3487
+ disabled
3488
+ }
3489
+ )
3490
+ ]
3491
+ }
3492
+ ),
3493
+ errorMessage && /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-2 rounded-[var(--radius)] border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive", children: [
3494
+ /* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4 shrink-0" }),
3495
+ /* @__PURE__ */ jsx("span", { children: errorMessage })
3496
+ ] }),
3497
+ showPreview && files.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4 space-y-2", children: files.map((file, index) => /* @__PURE__ */ jsxs(
3498
+ "div",
3499
+ {
3500
+ className: "flex items-center justify-between rounded-[var(--radius)] border border-border bg-card p-3",
3501
+ children: [
3502
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
3503
+ /* @__PURE__ */ jsx(FileIcon, { className: "h-5 w-5 text-muted-foreground" }),
3504
+ /* @__PURE__ */ jsxs("div", { children: [
3505
+ /* @__PURE__ */ jsx("p", { className: "text-foreground", children: file.name }),
3506
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
3507
+ (file.size / 1024).toFixed(2),
3508
+ " KB"
3509
+ ] })
3510
+ ] })
3511
+ ] }),
3512
+ /* @__PURE__ */ jsx(
3513
+ Button,
3514
+ {
3515
+ type: "button",
3516
+ variant: "ghost",
3517
+ size: "sm",
3518
+ onClick: (e) => {
3519
+ e.stopPropagation();
3520
+ removeFile(index);
3521
+ },
3522
+ disabled,
3523
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
3524
+ }
3525
+ )
3526
+ ]
3527
+ },
3528
+ index
3529
+ )) })
3530
+ ] });
3531
+ }
3532
+ );
3533
+ FileUpload.displayName = "FileUpload";
3534
+ const Rating = React.forwardRef(
3535
+ ({
3536
+ className,
3537
+ value = 0,
3538
+ onChange,
3539
+ max = 5,
3540
+ readonly = false,
3541
+ disabled = false,
3542
+ size = "md",
3543
+ showValue = false,
3544
+ allowHalf = false,
3545
+ getAriaLabel,
3546
+ ...props
3547
+ }, ref) => {
3548
+ const [hoverValue, setHoverValue] = React.useState(null);
3549
+ const isInteractive = !readonly && !disabled;
3550
+ const sizeStyles = {
3551
+ sm: "h-4 w-4",
3552
+ md: "h-5 w-5",
3553
+ lg: "h-6 w-6"
3554
+ };
3555
+ const handleClick = (rating) => {
3556
+ if (isInteractive) onChange == null ? void 0 : onChange(rating);
3557
+ };
3558
+ const handleMouseMove = (e, rating) => {
3559
+ if (!isInteractive) return;
3560
+ if (allowHalf) {
3561
+ const rect = e.currentTarget.getBoundingClientRect();
3562
+ setHoverValue(e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating);
3563
+ } else {
3564
+ setHoverValue(rating);
3565
+ }
3566
+ };
3567
+ const handleMouseLeave = () => {
3568
+ if (isInteractive) setHoverValue(null);
3569
+ };
3570
+ const handleClickWithHalf = (e, rating) => {
3571
+ if (!isInteractive) return;
3572
+ if (allowHalf) {
3573
+ const rect = e.currentTarget.getBoundingClientRect();
3574
+ const half = e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating;
3575
+ onChange == null ? void 0 : onChange(half);
3576
+ } else {
3577
+ handleClick(rating);
3578
+ }
3579
+ };
3580
+ const displayValue = hoverValue ?? value;
3581
+ return /* @__PURE__ */ jsxs(
3582
+ "div",
3583
+ {
3584
+ ref,
3585
+ className: cn("flex items-center gap-1", disabled && "opacity-50", className),
3586
+ ...props,
3587
+ children: [
3588
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", role: "group", "aria-label": "Rating", children: Array.from({ length: max }, (_, index) => {
3589
+ const rating = index + 1;
3590
+ const isFull = rating <= displayValue;
3591
+ const isHalf = allowHalf && !isFull && rating - 0.5 <= displayValue;
3592
+ return /* @__PURE__ */ jsxs(
3593
+ "button",
3594
+ {
3595
+ type: "button",
3596
+ onClick: (e) => handleClickWithHalf(e, rating),
3597
+ onMouseMove: (e) => handleMouseMove(e, rating),
3598
+ onMouseLeave: handleMouseLeave,
3599
+ disabled: readonly || disabled,
3600
+ "aria-label": getAriaLabel ? getAriaLabel(rating, max) : `${rating} / ${max}`,
3601
+ className: cn(
3602
+ "relative transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3603
+ isInteractive && "cursor-pointer hover:scale-110",
3604
+ !isInteractive && "cursor-default"
3605
+ ),
3606
+ children: [
3607
+ /* @__PURE__ */ jsx(Star, { className: cn(sizeStyles[size], "fill-none text-muted-foreground") }),
3608
+ (isFull || isHalf) && /* @__PURE__ */ jsx(
3609
+ "span",
3610
+ {
3611
+ className: cn(
3612
+ "absolute inset-0 overflow-hidden",
3613
+ isHalf ? "w-1/2" : "w-full"
3614
+ ),
3615
+ children: /* @__PURE__ */ jsx(Star, { className: cn(sizeStyles[size], "fill-warning text-warning") })
3616
+ }
3617
+ )
3618
+ ]
3619
+ },
3620
+ index
3621
+ );
3622
+ }) }),
3623
+ showValue && /* @__PURE__ */ jsx("span", { className: "ml-2 text-sm text-muted-foreground", children: value % 1 === 0 ? value.toFixed(0) : value.toFixed(1) })
3624
+ ]
3625
+ }
3626
+ );
3627
+ }
3628
+ );
3629
+ Rating.displayName = "Rating";
3630
+ const Search = React.forwardRef(
3631
+ ({
3632
+ className,
3633
+ containerClassName,
3634
+ onSearch,
3635
+ onClear,
3636
+ onChange,
3637
+ size = "md",
3638
+ searchLabel = "Search",
3639
+ clearLabel = "Clear search",
3640
+ value: controlledValue,
3641
+ defaultValue,
3642
+ ...props
3643
+ }, ref) => {
3644
+ const isControlled = controlledValue !== void 0;
3645
+ const [internalValue, setInternalValue] = React.useState(
3646
+ isControlled ? "" : defaultValue ?? ""
3647
+ );
3648
+ const displayValue = isControlled ? controlledValue : internalValue;
3649
+ const sizeClasses = {
3650
+ sm: "h-8 px-8 py-1 text-sm",
3651
+ md: "h-10 px-10 py-2 text-base",
3652
+ lg: "h-12 px-12 py-3 text-base"
3653
+ };
3654
+ const iconSizeClasses = {
3655
+ sm: "left-2 h-3.5 w-3.5",
3656
+ md: "left-3 h-4 w-4",
3657
+ lg: "left-4 h-5 w-5"
3658
+ };
3659
+ const clearSizeClasses = {
3660
+ sm: "right-2",
3661
+ md: "right-3",
3662
+ lg: "right-4"
3663
+ };
3664
+ const handleChange = (e) => {
3665
+ const newValue = e.target.value;
3666
+ if (!isControlled) setInternalValue(newValue);
3667
+ onChange == null ? void 0 : onChange(e);
3668
+ onSearch == null ? void 0 : onSearch(newValue);
3669
+ };
3670
+ const handleClear = () => {
3671
+ if (!isControlled) setInternalValue("");
3672
+ onClear == null ? void 0 : onClear();
3673
+ onSearch == null ? void 0 : onSearch("");
3674
+ };
3675
+ const handleKeyDown = (e) => {
3676
+ var _a;
3677
+ if (e.key === "Escape") {
3678
+ handleClear();
3679
+ }
3680
+ (_a = props.onKeyDown) == null ? void 0 : _a.call(props, e);
3681
+ };
3682
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full", containerClassName), children: [
3683
+ /* @__PURE__ */ jsx(
3684
+ Search$1,
3685
+ {
3686
+ "aria-hidden": "true",
3687
+ className: cn("absolute top-1/2 -translate-y-1/2 text-muted-foreground", iconSizeClasses[size])
3688
+ }
3689
+ ),
3690
+ /* @__PURE__ */ jsx(
3691
+ "input",
3692
+ {
3693
+ ref,
3694
+ type: "text",
3695
+ value: displayValue,
3696
+ onChange: handleChange,
3697
+ onKeyDown: handleKeyDown,
3698
+ className: cn(
3699
+ "flex w-full rounded-[var(--radius)] border border-border bg-background text-foreground transition-colors outline-none",
3700
+ "placeholder:text-muted-foreground",
3701
+ "focus:ring-2 focus:ring-primary focus:border-transparent",
3702
+ "disabled:cursor-not-allowed disabled:opacity-50",
3703
+ sizeClasses[size],
3704
+ className
3705
+ ),
3706
+ "aria-label": props.placeholder || searchLabel,
3707
+ ...props
3708
+ }
3709
+ ),
3710
+ displayValue && /* @__PURE__ */ jsx(
3711
+ "button",
3712
+ {
3713
+ type: "button",
3714
+ onClick: handleClear,
3715
+ "aria-label": clearLabel,
3716
+ className: cn(
3717
+ "absolute top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
3718
+ clearSizeClasses[size]
3719
+ ),
3720
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
3721
+ }
3722
+ )
3723
+ ] });
3724
+ }
3725
+ );
3726
+ Search.displayName = "Search";
3727
+ const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_GEMINI_API_KEY": "AIzaSyBnoWKe4LjQzlIklON_dVXMXNUl2gvfH6U", "VITE_GOOGLE_MAPS_API_KEY": "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" };
3728
+ const RouteMapContent = React__default.forwardRef(
3729
+ ({ apiKey, ...props }, ref) => {
3730
+ const { isLoaded, loadError, load } = useGoogleMapsLoader();
3731
+ const {
3732
+ origin,
3733
+ destination,
3734
+ waypoints = [],
3735
+ travelMode = "DRIVING",
3736
+ height = "450px",
3737
+ mapContainerClassName,
3738
+ disableDefaultUI = false,
3739
+ zoomControl = true,
3740
+ streetViewControl = false,
3741
+ mapTypeControl = false,
3742
+ fullscreenControl = true,
3743
+ onRouteCalculated,
3744
+ className,
3745
+ ...divProps
3746
+ } = props;
3747
+ const mapRef = useRef(null);
3748
+ const gmpMapRef = useRef(null);
3749
+ const directionsRendererRef = useRef(null);
3750
+ useRef(false);
3751
+ const isCalculatingRef = useRef(false);
3752
+ useEffect(() => {
3753
+ if (!isLoaded && apiKey && !loadError && load) {
3754
+ load(apiKey).catch(console.error);
3755
+ }
3756
+ }, [isLoaded, apiKey, loadError, load]);
3757
+ useEffect(() => {
3758
+ if (!isLoaded || !gmpMapRef.current) return;
3759
+ const setupMap = (map) => {
3760
+ mapRef.current = map;
3761
+ const computedStyle = getComputedStyle(document.documentElement);
3762
+ const primaryColor = computedStyle.getPropertyValue("--primary").trim() || "#4F46E5";
3763
+ if (!directionsRendererRef.current) {
3764
+ directionsRendererRef.current = new google.maps.DirectionsRenderer({
3765
+ map,
3766
+ suppressMarkers: false,
3767
+ polylineOptions: {
3768
+ strokeColor: primaryColor,
3769
+ strokeWeight: 5,
3770
+ strokeOpacity: 0.8
3771
+ }
3772
+ });
3773
+ } else {
3774
+ directionsRendererRef.current.setMap(map);
3775
+ }
3776
+ };
3777
+ const gmpMap = gmpMapRef.current;
3778
+ if (gmpMap.innerMap) {
3779
+ setupMap(gmpMap.innerMap);
3780
+ } else {
3781
+ const interval = setInterval(() => {
3782
+ if (gmpMap.innerMap) {
3783
+ setupMap(gmpMap.innerMap);
3784
+ clearInterval(interval);
3785
+ }
3786
+ }, 100);
3787
+ return () => clearInterval(interval);
3788
+ }
3789
+ return () => {
3790
+ if (directionsRendererRef.current) {
3791
+ directionsRendererRef.current.setMap(null);
3792
+ }
3793
+ mapRef.current = null;
3794
+ };
3795
+ }, [isLoaded]);
3796
+ useEffect(() => {
3797
+ if (gmpMapRef.current && origin) {
3798
+ gmpMapRef.current.center = origin;
3799
+ }
3800
+ }, [origin.lat, origin.lng]);
3801
+ useEffect(() => {
3802
+ if (gmpMapRef.current) {
3803
+ gmpMapRef.current.zoom = 13;
3804
+ }
3805
+ }, []);
3806
+ useEffect(() => {
3807
+ const map = mapRef.current;
3808
+ const renderer = directionsRendererRef.current;
3809
+ if (!map || !renderer || !isLoaded || isCalculatingRef.current) return;
3810
+ if (!origin || !destination) return;
3811
+ isCalculatingRef.current = true;
3812
+ const directionsService = new google.maps.DirectionsService();
3813
+ const request = {
3814
+ origin,
3815
+ destination,
3816
+ waypoints: waypoints.map((wp) => ({
3817
+ location: wp,
3818
+ stopover: true
3819
+ })),
3820
+ travelMode: google.maps.TravelMode[travelMode]
3821
+ };
3822
+ directionsService.route(request, (result, status) => {
3823
+ var _a;
3824
+ isCalculatingRef.current = false;
3825
+ if (status === "OK" && result) {
3826
+ renderer.setDirections(result);
3827
+ const route = result.routes[0];
3828
+ if (((_a = route == null ? void 0 : route.legs) == null ? void 0 : _a.length) > 0 && onRouteCalculated) {
3829
+ let totalDistance = 0;
3830
+ let totalDuration = 0;
3831
+ route.legs.forEach((leg) => {
3832
+ if (leg.distance) totalDistance += leg.distance.value;
3833
+ if (leg.duration) totalDuration += leg.duration.value;
3834
+ });
3835
+ const distanceKm = (totalDistance / 1e3).toFixed(1);
3836
+ const distanceText = `${distanceKm} km`;
3837
+ const hours = Math.floor(totalDuration / 3600);
3838
+ const minutes = Math.floor(totalDuration % 3600 / 60);
3839
+ const durationText = hours > 0 ? `${hours}h ${minutes}min` : `${minutes} min`;
3840
+ onRouteCalculated(distanceText, durationText);
3841
+ }
3842
+ }
3843
+ });
3844
+ }, [isLoaded, origin.lat, origin.lng, destination.lat, destination.lng, travelMode, mapRef.current]);
3845
+ if (loadError) {
3846
+ return /* @__PURE__ */ jsx(
3847
+ "div",
3848
+ {
3849
+ ref,
3850
+ className: cn(
3851
+ "relative rounded-[var(--radius-card)] border border-destructive/50 overflow-hidden bg-destructive/5",
3852
+ className
3853
+ ),
3854
+ style: { height },
3855
+ ...divProps,
3856
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-2 p-6", children: [
3857
+ /* @__PURE__ */ jsx("div", { className: "text-destructive", children: /* @__PURE__ */ jsx("svg", { className: "w-12 h-12 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }) }),
3858
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: "Failed to load Google Maps" }),
3859
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Check API key in Settings" })
3860
+ ] }) })
3861
+ }
3862
+ );
3863
+ }
3864
+ if (!isLoaded) {
3865
+ return /* @__PURE__ */ jsx(
3866
+ "div",
3867
+ {
3868
+ ref,
3869
+ className: cn(
3870
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted animate-pulse",
3871
+ className
3872
+ ),
3873
+ style: { height },
3874
+ ...divProps
3875
+ }
3876
+ );
3877
+ }
3878
+ return /* @__PURE__ */ jsx(
3879
+ "div",
3880
+ {
3881
+ ref,
3882
+ className: cn(
3883
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden",
3884
+ className
3885
+ ),
3886
+ style: { height },
3887
+ ...divProps,
3888
+ children: /* @__PURE__ */ jsx(
3889
+ "gmp-map",
3890
+ {
3891
+ ref: gmpMapRef,
3892
+ style: { height: "100%", width: "100%", display: "block" },
3893
+ "map-id": props.mapId || "xertica-route-map"
3894
+ }
3895
+ )
3896
+ }
3897
+ );
3898
+ }
3899
+ );
3900
+ RouteMapContent.displayName = "RouteMapContent";
3901
+ const RouteMap = React__default.forwardRef(
3902
+ (props, ref) => {
3903
+ const { isLoaded, loadError } = useGoogleMapsLoader();
3904
+ const effectiveApiKey = props.apiKey || typeof import.meta !== "undefined" && __vite_import_meta_env__ && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
3905
+ const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
3906
+ if (isLoaded || isValidKey || loadError) {
3907
+ return /* @__PURE__ */ jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
3908
+ }
3909
+ const isScriptInjected = typeof document !== "undefined" && !!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]');
3910
+ if (isScriptInjected) {
3911
+ return /* @__PURE__ */ jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
3912
+ }
3913
+ const {
3914
+ origin,
3915
+ destination,
3916
+ waypoints,
3917
+ travelMode,
3918
+ height,
3919
+ apiKey,
3920
+ mapContainerClassName,
3921
+ disableDefaultUI,
3922
+ zoomControl,
3923
+ streetViewControl,
3924
+ mapTypeControl,
3925
+ fullscreenControl,
3926
+ onRouteCalculated,
3927
+ ...divProps
3928
+ } = props;
3929
+ return /* @__PURE__ */ jsx(
3930
+ "div",
3931
+ {
3932
+ ref,
3933
+ className: cn(
3934
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted",
3935
+ props.className
3936
+ ),
3937
+ style: { height: props.height || "450px" },
3938
+ ...divProps,
3939
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-muted/50 to-muted", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-3 p-6", children: [
3940
+ /* @__PURE__ */ jsx("div", { className: "w-16 h-16 mx-auto bg-primary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxs("svg", { className: "w-8 h-8 text-primary", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
3941
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
3942
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
3943
+ ] }) }),
3944
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Configure Google Maps API Key in Settings" })
3945
+ ] }) })
3946
+ }
3947
+ );
3948
+ }
3949
+ );
3950
+ RouteMap.displayName = "RouteMap";
3951
+ const SimpleMap = React__default.forwardRef(
3952
+ ({
3953
+ center,
3954
+ address,
3955
+ markerTitle,
3956
+ markerInfo,
3957
+ showMarker = true,
3958
+ zoom = 15,
3959
+ height = "350px",
3960
+ ...props
3961
+ }, ref) => {
3962
+ const markers = showMarker && center ? [
3963
+ {
3964
+ position: center,
3965
+ title: markerTitle || address || "Location",
3966
+ info: markerInfo || address
3967
+ }
3968
+ ] : [];
3969
+ return /* @__PURE__ */ jsx(
3970
+ Map$1,
3971
+ {
3972
+ ref,
3973
+ center,
3974
+ zoom,
3975
+ height,
3976
+ markers,
3977
+ ...props
3978
+ }
3979
+ );
3980
+ }
3981
+ );
3982
+ SimpleMap.displayName = "SimpleMap";
3983
+ function AssistantChart({
3984
+ data,
3985
+ config,
3986
+ categoryKey = "month",
3987
+ bars,
3988
+ xAxisFormatter,
3989
+ className
3990
+ }) {
3991
+ const resolvedBars = bars ?? Object.keys(config).map((key) => ({ dataKey: key }));
3992
+ const formatTick = xAxisFormatter ?? ((value) => value.slice(0, 3));
3993
+ return /* @__PURE__ */ jsx(ChartContainer, { config, className: cn("min-h-[200px] w-full", className), children: /* @__PURE__ */ jsxs(BarChart, { accessibilityLayer: true, data, children: [
3994
+ /* @__PURE__ */ jsx(CartesianGrid, { vertical: false }),
3995
+ /* @__PURE__ */ jsx(
3996
+ XAxis,
3997
+ {
3998
+ dataKey: categoryKey,
3999
+ tickLine: false,
4000
+ tickMargin: 10,
4001
+ axisLine: false,
4002
+ tickFormatter: formatTick
4003
+ }
4004
+ ),
4005
+ /* @__PURE__ */ jsx(ChartTooltip, { cursor: false, content: /* @__PURE__ */ jsx(ChartTooltipContent, { indicator: "dashed" }) }),
4006
+ resolvedBars.map((bar) => /* @__PURE__ */ jsx(
4007
+ Bar,
4008
+ {
4009
+ dataKey: bar.dataKey,
4010
+ fill: bar.fill ?? `var(--color-${bar.dataKey})`,
4011
+ radius: bar.radius ?? 4
4012
+ },
4013
+ bar.dataKey
4014
+ ))
4015
+ ] }) });
4016
+ }
4017
+ const MOBILE_BREAKPOINT = 768;
4018
+ function useIsMobile() {
4019
+ const [isMobile, setIsMobile] = React.useState(
4020
+ void 0
4021
+ );
4022
+ React.useEffect(() => {
4023
+ var _a;
4024
+ if (typeof window === "undefined") {
4025
+ setIsMobile(false);
4026
+ return;
4027
+ }
4028
+ const mql = (_a = window.matchMedia) == null ? void 0 : _a.call(window, `(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
4029
+ const onChange = () => {
4030
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
4031
+ };
4032
+ if (mql) {
4033
+ mql.addEventListener("change", onChange);
4034
+ }
4035
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
4036
+ return () => {
4037
+ if (mql) {
4038
+ mql.removeEventListener("change", onChange);
4039
+ }
4040
+ };
4041
+ }, []);
4042
+ return !!isMobile;
4043
+ }
4044
+ const useMobile = useIsMobile;
4045
+ export {
4046
+ DrawerContent as $,
4047
+ Accordion as A,
4048
+ Badge as B,
4049
+ Calendar as C,
4050
+ CommandDialog as D,
4051
+ CommandEmpty as E,
4052
+ CommandGroup as F,
4053
+ CommandInput as G,
4054
+ CommandItem as H,
4055
+ CommandList as I,
4056
+ CommandSeparator as J,
4057
+ CommandShortcut as K,
4058
+ ContextMenu as L,
4059
+ ContextMenuCheckboxItem as M,
4060
+ ContextMenuContent as N,
4061
+ ContextMenuGroup as O,
4062
+ ContextMenuItem as P,
4063
+ ContextMenuLabel as Q,
4064
+ ContextMenuPortal as R,
4065
+ ContextMenuRadioGroup as S,
4066
+ ContextMenuRadioItem as T,
4067
+ ContextMenuSeparator as U,
4068
+ ContextMenuShortcut as V,
4069
+ ContextMenuSub as W,
4070
+ ContextMenuSubContent as X,
4071
+ ContextMenuSubTrigger as Y,
4072
+ ContextMenuTrigger as Z,
4073
+ Drawer as _,
4074
+ AccordionContent as a,
4075
+ RadioGroupItem as a$,
4076
+ DrawerDescription as a0,
4077
+ DrawerFooter as a1,
4078
+ DrawerHandle as a2,
4079
+ DrawerHeader as a3,
4080
+ DrawerOverlay as a4,
4081
+ DrawerPortal as a5,
4082
+ DrawerTitle as a6,
4083
+ DrawerTrigger as a7,
4084
+ FileUpload as a8,
4085
+ Form as a9,
4086
+ MenubarSeparator as aA,
4087
+ MenubarShortcut as aB,
4088
+ MenubarSub as aC,
4089
+ MenubarSubContent as aD,
4090
+ MenubarSubTrigger as aE,
4091
+ MenubarTrigger as aF,
4092
+ NavigationMenu as aG,
4093
+ NavigationMenuContent as aH,
4094
+ NavigationMenuIndicator as aI,
4095
+ NavigationMenuItem as aJ,
4096
+ NavigationMenuLink as aK,
4097
+ NavigationMenuList as aL,
4098
+ NavigationMenuTrigger as aM,
4099
+ NavigationMenuViewport as aN,
4100
+ NotificationBadge as aO,
4101
+ PageHeader as aP,
4102
+ PageHeaderDescription as aQ,
4103
+ PageHeaderHeading as aR,
4104
+ Pagination as aS,
4105
+ PaginationContent as aT,
4106
+ PaginationEllipsis as aU,
4107
+ PaginationItem as aV,
4108
+ PaginationLink as aW,
4109
+ PaginationNext as aX,
4110
+ PaginationPrevious as aY,
4111
+ Progress as aZ,
4112
+ RadioGroup as a_,
4113
+ FormControl as aa,
4114
+ FormDescription as ab,
4115
+ FormField as ac,
4116
+ FormItem as ad,
4117
+ FormLabel as ae,
4118
+ FormMessage as af,
4119
+ HoverCard as ag,
4120
+ HoverCardContent as ah,
4121
+ HoverCardTrigger as ai,
4122
+ ImageWithFallback as aj,
4123
+ InputOTP as ak,
4124
+ InputOTPGroup as al,
4125
+ InputOTPSeparator as am,
4126
+ InputOTPSlot as an,
4127
+ Label as ao,
4128
+ Map$1 as ap,
4129
+ Menubar as aq,
4130
+ MenubarCheckboxItem as ar,
4131
+ MenubarContent as as,
4132
+ MenubarGroup as at,
4133
+ MenubarItem as au,
4134
+ MenubarLabel as av,
4135
+ MenubarMenu as aw,
4136
+ MenubarPortal as ax,
4137
+ MenubarRadioGroup as ay,
4138
+ MenubarRadioItem as az,
4139
+ AccordionItem as b,
4140
+ Rating as b0,
4141
+ ResizableHandle as b1,
4142
+ ResizablePanel as b2,
4143
+ ResizablePanelGroup as b3,
4144
+ RouteMap as b4,
4145
+ Search as b5,
4146
+ Separator as b6,
4147
+ Sheet as b7,
4148
+ SheetContent as b8,
4149
+ SheetDescription as b9,
4150
+ useMobile as bA,
4151
+ useStepper as bB,
4152
+ SheetFooter as ba,
4153
+ SheetHeader as bb,
4154
+ SheetPortal as bc,
4155
+ SheetTitle as bd,
4156
+ SheetTrigger as be,
4157
+ SimpleMap as bf,
4158
+ StatsCard as bg,
4159
+ Step as bh,
4160
+ Stepper as bi,
4161
+ Switch as bj,
4162
+ Timeline as bk,
4163
+ TimelineContent as bl,
4164
+ TimelineDescription as bm,
4165
+ TimelineDot as bn,
4166
+ TimelineHeading as bo,
4167
+ TimelineItem as bp,
4168
+ TimelineTime as bq,
4169
+ Toggle as br,
4170
+ ToggleGroup as bs,
4171
+ ToggleGroupItem as bt,
4172
+ TreeView as bu,
4173
+ badgeVariants as bv,
4174
+ navigationMenuTriggerStyle as bw,
4175
+ toggleVariants as bx,
4176
+ useFormField as by,
4177
+ useIsMobile as bz,
4178
+ AccordionTrigger as c,
4179
+ AlertDialog as d,
4180
+ AlertDialogAction as e,
4181
+ AlertDialogCancel as f,
4182
+ AlertDialogContent as g,
4183
+ AlertDialogDescription as h,
4184
+ AlertDialogFooter as i,
4185
+ AlertDialogHeader as j,
4186
+ AlertDialogOverlay as k,
4187
+ AlertDialogPortal as l,
4188
+ AlertDialogTitle as m,
4189
+ AlertDialogTrigger as n,
4190
+ AspectRatio as o,
4191
+ AssistantChart as p,
4192
+ Carousel as q,
4193
+ CarouselContent as r,
4194
+ CarouselItem as s,
4195
+ CarouselNext as t,
4196
+ CarouselPrevious as u,
4197
+ Checkbox as v,
4198
+ Collapsible as w,
4199
+ CollapsibleContent as x,
4200
+ CollapsibleTrigger as y,
4201
+ Command as z
4202
+ };