xertica-ui 2.4.0 → 2.5.0

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