xertica-ui 2.4.0 → 2.4.1

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