@sudobility/components 2.0.33 → 3.0.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 (587) hide show
  1. package/README.md +151 -102
  2. package/dist/charts/area-chart.d.ts +55 -0
  3. package/dist/charts/area-chart.d.ts.map +1 -0
  4. package/dist/charts/bar-chart.d.ts +44 -0
  5. package/dist/charts/bar-chart.d.ts.map +1 -0
  6. package/dist/charts/bubble-chart.d.ts +34 -0
  7. package/dist/charts/bubble-chart.d.ts.map +1 -0
  8. package/dist/charts/burndown-chart.d.ts +19 -0
  9. package/dist/charts/burndown-chart.d.ts.map +1 -0
  10. package/dist/charts/funnel-chart.d.ts +34 -0
  11. package/dist/charts/funnel-chart.d.ts.map +1 -0
  12. package/dist/charts/gauge.d.ts +35 -0
  13. package/dist/charts/gauge.d.ts.map +1 -0
  14. package/dist/charts/heatmap.d.ts +34 -0
  15. package/dist/charts/heatmap.d.ts.map +1 -0
  16. package/dist/charts/index.d.ts +26 -0
  17. package/dist/charts/index.d.ts.map +1 -0
  18. package/dist/charts/line-chart.d.ts +55 -0
  19. package/dist/charts/line-chart.d.ts.map +1 -0
  20. package/dist/charts/metric-comparison.d.ts +34 -0
  21. package/dist/charts/metric-comparison.d.ts.map +1 -0
  22. package/dist/charts/performance-chart.d.ts +34 -0
  23. package/dist/charts/performance-chart.d.ts.map +1 -0
  24. package/dist/charts/pie-chart.d.ts +45 -0
  25. package/dist/charts/pie-chart.d.ts.map +1 -0
  26. package/dist/charts/progress-bar.d.ts +52 -0
  27. package/dist/charts/progress-bar.d.ts.map +1 -0
  28. package/dist/charts/progress-circle.d.ts +49 -0
  29. package/dist/charts/progress-circle.d.ts.map +1 -0
  30. package/dist/charts/progress-tracker.d.ts +34 -0
  31. package/dist/charts/progress-tracker.d.ts.map +1 -0
  32. package/dist/charts/progress.d.ts +52 -0
  33. package/dist/charts/progress.d.ts.map +1 -0
  34. package/dist/charts/radar-chart.d.ts +34 -0
  35. package/dist/charts/radar-chart.d.ts.map +1 -0
  36. package/dist/charts/sankey-diagram.d.ts +34 -0
  37. package/dist/charts/sankey-diagram.d.ts.map +1 -0
  38. package/dist/charts/scatter-plot.d.ts +34 -0
  39. package/dist/charts/scatter-plot.d.ts.map +1 -0
  40. package/dist/charts/sparkline.d.ts +29 -0
  41. package/dist/charts/sparkline.d.ts.map +1 -0
  42. package/dist/charts/tree-map.d.ts +34 -0
  43. package/dist/charts/tree-map.d.ts.map +1 -0
  44. package/dist/core/Breadcrumb.d.ts +17 -0
  45. package/dist/core/Breadcrumb.d.ts.map +1 -0
  46. package/dist/core/BreadcrumbSection.d.ts +14 -0
  47. package/dist/core/BreadcrumbSection.d.ts.map +1 -0
  48. package/dist/core/CodeBlock.d.ts +26 -0
  49. package/dist/core/CodeBlock.d.ts.map +1 -0
  50. package/dist/core/CollapsibleDocumentationTopic.d.ts +40 -0
  51. package/dist/core/CollapsibleDocumentationTopic.d.ts.map +1 -0
  52. package/dist/core/ErrorBoundary.d.ts +19 -0
  53. package/dist/core/ErrorBoundary.d.ts.map +1 -0
  54. package/dist/core/ErrorBoundaryLazy.d.ts +57 -0
  55. package/dist/core/ErrorBoundaryLazy.d.ts.map +1 -0
  56. package/dist/core/LanguageSelector.d.ts +21 -0
  57. package/dist/core/LanguageSelector.d.ts.map +1 -0
  58. package/dist/core/OptimizedImage.d.ts +21 -0
  59. package/dist/core/OptimizedImage.d.ts.map +1 -0
  60. package/dist/core/PromotionalBanner.d.ts +36 -0
  61. package/dist/core/PromotionalBanner.d.ts.map +1 -0
  62. package/dist/core/SafeAppWrapper.d.ts +7 -0
  63. package/dist/core/SafeAppWrapper.d.ts.map +1 -0
  64. package/dist/core/SecurityProvider.d.ts +8 -0
  65. package/dist/core/SecurityProvider.d.ts.map +1 -0
  66. package/dist/core/StepList.d.ts +15 -0
  67. package/dist/core/StepList.d.ts.map +1 -0
  68. package/dist/core/TrackedButton.d.ts +42 -0
  69. package/dist/core/TrackedButton.d.ts.map +1 -0
  70. package/dist/core/TrackedLink.d.ts +47 -0
  71. package/dist/core/TrackedLink.d.ts.map +1 -0
  72. package/dist/core/icons/index.d.ts +8 -0
  73. package/dist/core/icons/index.d.ts.map +1 -0
  74. package/dist/core/index.d.ts +19 -0
  75. package/dist/core/index.d.ts.map +1 -0
  76. package/dist/core/optimized/MemoizedComponent.d.ts +57 -0
  77. package/dist/core/optimized/MemoizedComponent.d.ts.map +1 -0
  78. package/dist/core/optimized/index.d.ts +6 -0
  79. package/dist/core/optimized/index.d.ts.map +1 -0
  80. package/dist/data-display/avatar-group.d.ts +34 -0
  81. package/dist/data-display/avatar-group.d.ts.map +1 -0
  82. package/dist/data-display/avatar.d.ts +40 -0
  83. package/dist/data-display/avatar.d.ts.map +1 -0
  84. package/dist/data-display/card.d.ts +39 -0
  85. package/dist/data-display/card.d.ts.map +1 -0
  86. package/dist/data-display/cell-editor.d.ts +34 -0
  87. package/dist/data-display/cell-editor.d.ts.map +1 -0
  88. package/dist/data-display/column-resize.d.ts +34 -0
  89. package/dist/data-display/column-resize.d.ts.map +1 -0
  90. package/dist/data-display/dashboard-stat-card.d.ts +37 -0
  91. package/dist/data-display/dashboard-stat-card.d.ts.map +1 -0
  92. package/dist/data-display/data-grid.d.ts +34 -0
  93. package/dist/data-display/data-grid.d.ts.map +1 -0
  94. package/dist/data-display/data-table.d.ts +47 -0
  95. package/dist/data-display/data-table.d.ts.map +1 -0
  96. package/dist/data-display/empty-state.d.ts +11 -0
  97. package/dist/data-display/empty-state.d.ts.map +1 -0
  98. package/dist/data-display/index.d.ts +30 -0
  99. package/dist/data-display/index.d.ts.map +1 -0
  100. package/dist/data-display/key-value-pair.d.ts +57 -0
  101. package/dist/data-display/key-value-pair.d.ts.map +1 -0
  102. package/dist/data-display/list-item-with-action.d.ts +42 -0
  103. package/dist/data-display/list-item-with-action.d.ts.map +1 -0
  104. package/dist/data-display/list.d.ts +53 -0
  105. package/dist/data-display/list.d.ts.map +1 -0
  106. package/dist/data-display/listing-form.d.ts +34 -0
  107. package/dist/data-display/listing-form.d.ts.map +1 -0
  108. package/dist/data-display/no-content.d.ts +9 -0
  109. package/dist/data-display/no-content.d.ts.map +1 -0
  110. package/dist/data-display/pivot-table.d.ts +34 -0
  111. package/dist/data-display/pivot-table.d.ts.map +1 -0
  112. package/dist/data-display/profile-header.d.ts +34 -0
  113. package/dist/data-display/profile-header.d.ts.map +1 -0
  114. package/dist/data-display/spreadsheet-grid.d.ts +34 -0
  115. package/dist/data-display/spreadsheet-grid.d.ts.map +1 -0
  116. package/dist/data-display/stat-display.d.ts +53 -0
  117. package/dist/data-display/stat-display.d.ts.map +1 -0
  118. package/dist/data-display/table-of-contents.d.ts +19 -0
  119. package/dist/data-display/table-of-contents.d.ts.map +1 -0
  120. package/dist/data-display/table-reservation.d.ts +34 -0
  121. package/dist/data-display/table-reservation.d.ts.map +1 -0
  122. package/dist/data-display/table.d.ts +70 -0
  123. package/dist/data-display/table.d.ts.map +1 -0
  124. package/dist/data-display/transfer-list.d.ts +69 -0
  125. package/dist/data-display/transfer-list.d.ts.map +1 -0
  126. package/dist/data-display/tree-view.d.ts +60 -0
  127. package/dist/data-display/tree-view.d.ts.map +1 -0
  128. package/dist/data-display/user-table.d.ts +34 -0
  129. package/dist/data-display/user-table.d.ts.map +1 -0
  130. package/dist/data-display/virtual-list.d.ts +49 -0
  131. package/dist/data-display/virtual-list.d.ts.map +1 -0
  132. package/dist/features/CTASection.d.ts +24 -0
  133. package/dist/features/CTASection.d.ts.map +1 -0
  134. package/dist/features/CalloutBox.d.ts +13 -0
  135. package/dist/features/CalloutBox.d.ts.map +1 -0
  136. package/dist/features/FeatureGrid.d.ts +32 -0
  137. package/dist/features/FeatureGrid.d.ts.map +1 -0
  138. package/dist/features/InfoCard.d.ts +11 -0
  139. package/dist/features/InfoCard.d.ts.map +1 -0
  140. package/dist/features/index.d.ts +10 -0
  141. package/dist/features/index.d.ts.map +1 -0
  142. package/dist/forms/advanced/calendar.d.ts +45 -0
  143. package/dist/forms/advanced/calendar.d.ts.map +1 -0
  144. package/dist/forms/advanced/code-highlighter.d.ts +34 -0
  145. package/dist/forms/advanced/code-highlighter.d.ts.map +1 -0
  146. package/dist/forms/advanced/color-picker-advanced.d.ts +9 -0
  147. package/dist/forms/advanced/color-picker-advanced.d.ts.map +1 -0
  148. package/dist/forms/advanced/color-picker.d.ts +43 -0
  149. package/dist/forms/advanced/color-picker.d.ts.map +1 -0
  150. package/dist/forms/advanced/color-swatch.d.ts +42 -0
  151. package/dist/forms/advanced/color-swatch.d.ts.map +1 -0
  152. package/dist/forms/advanced/credit-card-input.d.ts +58 -0
  153. package/dist/forms/advanced/credit-card-input.d.ts.map +1 -0
  154. package/dist/forms/advanced/currency-converter.d.ts +34 -0
  155. package/dist/forms/advanced/currency-converter.d.ts.map +1 -0
  156. package/dist/forms/advanced/currency-input.d.ts +66 -0
  157. package/dist/forms/advanced/currency-input.d.ts.map +1 -0
  158. package/dist/forms/advanced/currency-rates.d.ts +34 -0
  159. package/dist/forms/advanced/currency-rates.d.ts.map +1 -0
  160. package/dist/forms/advanced/date-range-picker.d.ts +51 -0
  161. package/dist/forms/advanced/date-range-picker.d.ts.map +1 -0
  162. package/dist/forms/advanced/date-time-picker.d.ts +47 -0
  163. package/dist/forms/advanced/date-time-picker.d.ts.map +1 -0
  164. package/dist/forms/advanced/image-cropper.d.ts +42 -0
  165. package/dist/forms/advanced/image-cropper.d.ts.map +1 -0
  166. package/dist/forms/advanced/index.d.ts +22 -0
  167. package/dist/forms/advanced/index.d.ts.map +1 -0
  168. package/dist/forms/advanced/markdown-renderer.d.ts +34 -0
  169. package/dist/forms/advanced/markdown-renderer.d.ts.map +1 -0
  170. package/dist/forms/advanced/media-uploader.d.ts +45 -0
  171. package/dist/forms/advanced/media-uploader.d.ts.map +1 -0
  172. package/dist/forms/advanced/signature-pad.d.ts +9 -0
  173. package/dist/forms/advanced/signature-pad.d.ts.map +1 -0
  174. package/dist/forms/advanced/signature-request.d.ts +19 -0
  175. package/dist/forms/advanced/signature-request.d.ts.map +1 -0
  176. package/dist/forms/advanced/time-slot-picker.d.ts +34 -0
  177. package/dist/forms/advanced/time-slot-picker.d.ts.map +1 -0
  178. package/dist/forms/advanced/wysiwyg-editor.d.ts +9 -0
  179. package/dist/forms/advanced/wysiwyg-editor.d.ts.map +1 -0
  180. package/dist/forms/builders/field-mapper.d.ts +34 -0
  181. package/dist/forms/builders/field-mapper.d.ts.map +1 -0
  182. package/dist/forms/builders/form-builder.d.ts +34 -0
  183. package/dist/forms/builders/form-builder.d.ts.map +1 -0
  184. package/dist/forms/builders/form-template.d.ts +34 -0
  185. package/dist/forms/builders/form-template.d.ts.map +1 -0
  186. package/dist/forms/builders/form-validator.d.ts +34 -0
  187. package/dist/forms/builders/form-validator.d.ts.map +1 -0
  188. package/dist/forms/builders/index.d.ts +13 -0
  189. package/dist/forms/builders/index.d.ts.map +1 -0
  190. package/dist/forms/builders/quiz-builder.d.ts +19 -0
  191. package/dist/forms/builders/quiz-builder.d.ts.map +1 -0
  192. package/dist/forms/builders/schema-validator.d.ts +34 -0
  193. package/dist/forms/builders/schema-validator.d.ts.map +1 -0
  194. package/dist/forms/builders/survey-builder.d.ts +34 -0
  195. package/dist/forms/builders/survey-builder.d.ts.map +1 -0
  196. package/dist/forms/index.d.ts +9 -0
  197. package/dist/forms/index.d.ts.map +1 -0
  198. package/dist/forms/inputs/checkbox.d.ts +64 -0
  199. package/dist/forms/inputs/checkbox.d.ts.map +1 -0
  200. package/dist/forms/inputs/combobox.d.ts +60 -0
  201. package/dist/forms/inputs/combobox.d.ts.map +1 -0
  202. package/dist/forms/inputs/date-input.d.ts +54 -0
  203. package/dist/forms/inputs/date-input.d.ts.map +1 -0
  204. package/dist/forms/inputs/dropdown.d.ts +21 -0
  205. package/dist/forms/inputs/dropdown.d.ts.map +1 -0
  206. package/dist/forms/inputs/file-browser.d.ts +34 -0
  207. package/dist/forms/inputs/file-browser.d.ts.map +1 -0
  208. package/dist/forms/inputs/file-icon.d.ts +33 -0
  209. package/dist/forms/inputs/file-icon.d.ts.map +1 -0
  210. package/dist/forms/inputs/file-input.d.ts +60 -0
  211. package/dist/forms/inputs/file-input.d.ts.map +1 -0
  212. package/dist/forms/inputs/file-preview.d.ts +34 -0
  213. package/dist/forms/inputs/file-preview.d.ts.map +1 -0
  214. package/dist/forms/inputs/file-tree.d.ts +34 -0
  215. package/dist/forms/inputs/file-tree.d.ts.map +1 -0
  216. package/dist/forms/inputs/form-alerts.d.ts +40 -0
  217. package/dist/forms/inputs/form-alerts.d.ts.map +1 -0
  218. package/dist/forms/inputs/form-builder.d.ts +34 -0
  219. package/dist/forms/inputs/form-builder.d.ts.map +1 -0
  220. package/dist/forms/inputs/form-field-group.d.ts +58 -0
  221. package/dist/forms/inputs/form-field-group.d.ts.map +1 -0
  222. package/dist/forms/inputs/form-field.d.ts +53 -0
  223. package/dist/forms/inputs/form-field.d.ts.map +1 -0
  224. package/dist/forms/inputs/form-template.d.ts +34 -0
  225. package/dist/forms/inputs/form-template.d.ts.map +1 -0
  226. package/dist/forms/inputs/form-validator.d.ts +34 -0
  227. package/dist/forms/inputs/form-validator.d.ts.map +1 -0
  228. package/dist/forms/inputs/index.d.ts +43 -0
  229. package/dist/forms/inputs/index.d.ts.map +1 -0
  230. package/dist/forms/inputs/input.d.ts +6 -0
  231. package/dist/forms/inputs/input.d.ts.map +1 -0
  232. package/dist/forms/inputs/label.d.ts +5 -0
  233. package/dist/forms/inputs/label.d.ts.map +1 -0
  234. package/dist/forms/inputs/mention-input.d.ts +56 -0
  235. package/dist/forms/inputs/mention-input.d.ts.map +1 -0
  236. package/dist/forms/inputs/multi-select.d.ts +59 -0
  237. package/dist/forms/inputs/multi-select.d.ts.map +1 -0
  238. package/dist/forms/inputs/number-input.d.ts +59 -0
  239. package/dist/forms/inputs/number-input.d.ts.map +1 -0
  240. package/dist/forms/inputs/otp-input.d.ts +51 -0
  241. package/dist/forms/inputs/otp-input.d.ts.map +1 -0
  242. package/dist/forms/inputs/password-input.d.ts +68 -0
  243. package/dist/forms/inputs/password-input.d.ts.map +1 -0
  244. package/dist/forms/inputs/password-strength.d.ts +34 -0
  245. package/dist/forms/inputs/password-strength.d.ts.map +1 -0
  246. package/dist/forms/inputs/phone-directory.d.ts +19 -0
  247. package/dist/forms/inputs/phone-directory.d.ts.map +1 -0
  248. package/dist/forms/inputs/phone-input.d.ts +58 -0
  249. package/dist/forms/inputs/phone-input.d.ts.map +1 -0
  250. package/dist/forms/inputs/radio-group.d.ts +76 -0
  251. package/dist/forms/inputs/radio-group.d.ts.map +1 -0
  252. package/dist/forms/inputs/search-input.d.ts +52 -0
  253. package/dist/forms/inputs/search-input.d.ts.map +1 -0
  254. package/dist/forms/inputs/select.d.ts +14 -0
  255. package/dist/forms/inputs/select.d.ts.map +1 -0
  256. package/dist/forms/inputs/slider-input.d.ts +12 -0
  257. package/dist/forms/inputs/slider-input.d.ts.map +1 -0
  258. package/dist/forms/inputs/slider.d.ts +67 -0
  259. package/dist/forms/inputs/slider.d.ts.map +1 -0
  260. package/dist/forms/inputs/switch.d.ts +4 -0
  261. package/dist/forms/inputs/switch.d.ts.map +1 -0
  262. package/dist/forms/inputs/tag-input.d.ts +50 -0
  263. package/dist/forms/inputs/tag-input.d.ts.map +1 -0
  264. package/dist/forms/inputs/text-area.d.ts +57 -0
  265. package/dist/forms/inputs/text-area.d.ts.map +1 -0
  266. package/dist/forms/inputs/time-picker.d.ts +42 -0
  267. package/dist/forms/inputs/time-picker.d.ts.map +1 -0
  268. package/dist/forms/inputs/toggle-group.d.ts +63 -0
  269. package/dist/forms/inputs/toggle-group.d.ts.map +1 -0
  270. package/dist/index.d.ts +17 -41
  271. package/dist/index.d.ts.map +1 -1
  272. package/dist/index.esm.js +18097 -12640
  273. package/dist/index.umd.js +30 -45
  274. package/dist/interactive/double-tap.d.ts +34 -0
  275. package/dist/interactive/double-tap.d.ts.map +1 -0
  276. package/dist/interactive/drag-drop-list.d.ts +34 -0
  277. package/dist/interactive/drag-drop-list.d.ts.map +1 -0
  278. package/dist/interactive/drag-drop.d.ts +49 -0
  279. package/dist/interactive/drag-drop.d.ts.map +1 -0
  280. package/dist/interactive/focus-trap.d.ts +42 -0
  281. package/dist/interactive/focus-trap.d.ts.map +1 -0
  282. package/dist/interactive/gesture-detector.d.ts +34 -0
  283. package/dist/interactive/gesture-detector.d.ts.map +1 -0
  284. package/dist/interactive/hover-tooltip.d.ts +34 -0
  285. package/dist/interactive/hover-tooltip.d.ts.map +1 -0
  286. package/dist/interactive/index.d.ts +21 -0
  287. package/dist/interactive/index.d.ts.map +1 -0
  288. package/dist/interactive/infinite-scroll.d.ts +59 -0
  289. package/dist/interactive/infinite-scroll.d.ts.map +1 -0
  290. package/dist/interactive/long-press.d.ts +34 -0
  291. package/dist/interactive/long-press.d.ts.map +1 -0
  292. package/dist/interactive/nested-drag.d.ts +34 -0
  293. package/dist/interactive/nested-drag.d.ts.map +1 -0
  294. package/dist/interactive/pinch-zoom.d.ts +34 -0
  295. package/dist/interactive/pinch-zoom.d.ts.map +1 -0
  296. package/dist/interactive/pull-to-refresh.d.ts +14 -0
  297. package/dist/interactive/pull-to-refresh.d.ts.map +1 -0
  298. package/dist/interactive/radial-menu.d.ts +34 -0
  299. package/dist/interactive/radial-menu.d.ts.map +1 -0
  300. package/dist/interactive/scroll-spy.d.ts +59 -0
  301. package/dist/interactive/scroll-spy.d.ts.map +1 -0
  302. package/dist/interactive/sortable-grid.d.ts +34 -0
  303. package/dist/interactive/sortable-grid.d.ts.map +1 -0
  304. package/dist/interactive/swipe-actions.d.ts +34 -0
  305. package/dist/interactive/swipe-actions.d.ts.map +1 -0
  306. package/dist/kyc/KYCLevelCard.d.ts +14 -0
  307. package/dist/kyc/KYCLevelCard.d.ts.map +1 -0
  308. package/dist/kyc/KYCStatusBadge.d.ts +11 -0
  309. package/dist/kyc/KYCStatusBadge.d.ts.map +1 -0
  310. package/dist/kyc/SumsubWebSDK.d.ts +15 -0
  311. package/dist/kyc/SumsubWebSDK.d.ts.map +1 -0
  312. package/dist/kyc/index.d.ts +9 -0
  313. package/dist/kyc/index.d.ts.map +1 -0
  314. package/dist/layout/MasterDetailLayout.d.ts +92 -0
  315. package/dist/layout/MasterDetailLayout.d.ts.map +1 -0
  316. package/dist/layout/PageHeader.d.ts +18 -0
  317. package/dist/layout/PageHeader.d.ts.map +1 -0
  318. package/dist/layout/StandardPageLayout.d.ts +15 -0
  319. package/dist/layout/StandardPageLayout.d.ts.map +1 -0
  320. package/dist/layout/index.d.ts +7 -0
  321. package/dist/layout/index.d.ts.map +1 -0
  322. package/dist/media/audio-player.d.ts +36 -0
  323. package/dist/media/audio-player.d.ts.map +1 -0
  324. package/dist/media/audio-waveform.d.ts +34 -0
  325. package/dist/media/audio-waveform.d.ts.map +1 -0
  326. package/dist/media/image-comparison.d.ts +34 -0
  327. package/dist/media/image-comparison.d.ts.map +1 -0
  328. package/dist/media/image-cropper.d.ts +42 -0
  329. package/dist/media/image-cropper.d.ts.map +1 -0
  330. package/dist/media/image-gallery.d.ts +41 -0
  331. package/dist/media/image-gallery.d.ts.map +1 -0
  332. package/dist/media/image.d.ts +60 -0
  333. package/dist/media/image.d.ts.map +1 -0
  334. package/dist/media/index.d.ts +25 -0
  335. package/dist/media/index.d.ts.map +1 -0
  336. package/dist/media/lightbox.d.ts +64 -0
  337. package/dist/media/lightbox.d.ts.map +1 -0
  338. package/dist/media/live-stream.d.ts +19 -0
  339. package/dist/media/live-stream.d.ts.map +1 -0
  340. package/dist/media/media-playlist.d.ts +34 -0
  341. package/dist/media/media-playlist.d.ts.map +1 -0
  342. package/dist/media/media-uploader.d.ts +45 -0
  343. package/dist/media/media-uploader.d.ts.map +1 -0
  344. package/dist/media/playlist-manager.d.ts +19 -0
  345. package/dist/media/playlist-manager.d.ts.map +1 -0
  346. package/dist/media/podcast-player.d.ts +19 -0
  347. package/dist/media/podcast-player.d.ts.map +1 -0
  348. package/dist/media/qr-code-display.d.ts +47 -0
  349. package/dist/media/qr-code-display.d.ts.map +1 -0
  350. package/dist/media/video-call.d.ts +34 -0
  351. package/dist/media/video-call.d.ts.map +1 -0
  352. package/dist/media/video-editor.d.ts +19 -0
  353. package/dist/media/video-editor.d.ts.map +1 -0
  354. package/dist/media/video-player.d.ts +35 -0
  355. package/dist/media/video-player.d.ts.map +1 -0
  356. package/dist/media/video-thumbnail.d.ts +34 -0
  357. package/dist/media/video-thumbnail.d.ts.map +1 -0
  358. package/dist/media/voice-recorder.d.ts +34 -0
  359. package/dist/media/voice-recorder.d.ts.map +1 -0
  360. package/dist/media/wave-form.d.ts +34 -0
  361. package/dist/media/wave-form.d.ts.map +1 -0
  362. package/dist/modals/confirmation-dialog.d.ts +16 -0
  363. package/dist/modals/confirmation-dialog.d.ts.map +1 -0
  364. package/dist/modals/dialog.d.ts +50 -0
  365. package/dist/modals/dialog.d.ts.map +1 -0
  366. package/dist/modals/drawer.d.ts +51 -0
  367. package/dist/modals/drawer.d.ts.map +1 -0
  368. package/dist/modals/hover-card.d.ts +47 -0
  369. package/dist/modals/hover-card.d.ts.map +1 -0
  370. package/dist/modals/index.d.ts +15 -0
  371. package/dist/modals/index.d.ts.map +1 -0
  372. package/dist/modals/modal.d.ts +38 -0
  373. package/dist/modals/modal.d.ts.map +1 -0
  374. package/dist/modals/popover.d.ts +47 -0
  375. package/dist/modals/popover.d.ts.map +1 -0
  376. package/dist/modals/sheet.d.ts +59 -0
  377. package/dist/modals/sheet.d.ts.map +1 -0
  378. package/dist/modals/text-input-modal.d.ts +20 -0
  379. package/dist/modals/text-input-modal.d.ts.map +1 -0
  380. package/dist/modals/tooltip.d.ts +50 -0
  381. package/dist/modals/tooltip.d.ts.map +1 -0
  382. package/dist/navigation/breadcrumb-nav.d.ts +14 -0
  383. package/dist/navigation/breadcrumb-nav.d.ts.map +1 -0
  384. package/dist/navigation/external-link.d.ts +46 -0
  385. package/dist/navigation/external-link.d.ts.map +1 -0
  386. package/dist/navigation/index.d.ts +20 -0
  387. package/dist/navigation/index.d.ts.map +1 -0
  388. package/dist/navigation/link.d.ts +44 -0
  389. package/dist/navigation/link.d.ts.map +1 -0
  390. package/dist/navigation/navigation-list.d.ts +60 -0
  391. package/dist/navigation/navigation-list.d.ts.map +1 -0
  392. package/dist/navigation/navigation-menu.d.ts +49 -0
  393. package/dist/navigation/navigation-menu.d.ts.map +1 -0
  394. package/dist/navigation/pagination-nav.d.ts +11 -0
  395. package/dist/navigation/pagination-nav.d.ts.map +1 -0
  396. package/dist/navigation/pagination.d.ts +47 -0
  397. package/dist/navigation/pagination.d.ts.map +1 -0
  398. package/dist/navigation/side-nav.d.ts +16 -0
  399. package/dist/navigation/side-nav.d.ts.map +1 -0
  400. package/dist/navigation/smart-link.d.ts +23 -0
  401. package/dist/navigation/smart-link.d.ts.map +1 -0
  402. package/dist/navigation/stepper-nav.d.ts +16 -0
  403. package/dist/navigation/stepper-nav.d.ts.map +1 -0
  404. package/dist/navigation/stepper.d.ts +57 -0
  405. package/dist/navigation/stepper.d.ts.map +1 -0
  406. package/dist/navigation/table-of-contents.d.ts +19 -0
  407. package/dist/navigation/table-of-contents.d.ts.map +1 -0
  408. package/dist/navigation/tabs.d.ts +7 -0
  409. package/dist/navigation/tabs.d.ts.map +1 -0
  410. package/dist/optimization/LoadingOptimizer.d.ts +21 -0
  411. package/dist/optimization/LoadingOptimizer.d.ts.map +1 -0
  412. package/dist/optimization/OptimizedRoutePreloader.d.ts +7 -0
  413. package/dist/optimization/OptimizedRoutePreloader.d.ts.map +1 -0
  414. package/dist/optimization/PerformanceOptimizer.d.ts +10 -0
  415. package/dist/optimization/PerformanceOptimizer.d.ts.map +1 -0
  416. package/dist/optimization/criticalPathOptimizer.d.ts +44 -0
  417. package/dist/optimization/criticalPathOptimizer.d.ts.map +1 -0
  418. package/dist/optimization/index.d.ts +11 -0
  419. package/dist/optimization/index.d.ts.map +1 -0
  420. package/dist/optimization/optimization/advancedLazyLoading.d.ts +80 -0
  421. package/dist/optimization/optimization/advancedLazyLoading.d.ts.map +1 -0
  422. package/dist/optimization/optimization/advancedPreloading.d.ts +36 -0
  423. package/dist/optimization/optimization/advancedPreloading.d.ts.map +1 -0
  424. package/dist/optimization/optimization/aiOptimization.d.ts +139 -0
  425. package/dist/optimization/optimization/aiOptimization.d.ts.map +1 -0
  426. package/dist/optimization/optimization/apiOptimization.d.ts +199 -0
  427. package/dist/optimization/optimization/apiOptimization.d.ts.map +1 -0
  428. package/dist/optimization/optimization/conditionalImports.d.ts +49 -0
  429. package/dist/optimization/optimization/conditionalImports.d.ts.map +1 -0
  430. package/dist/optimization/optimization/css-loader.d.ts +24 -0
  431. package/dist/optimization/optimization/css-loader.d.ts.map +1 -0
  432. package/dist/optimization/optimization/dynamicImports.d.ts +39 -0
  433. package/dist/optimization/optimization/dynamicImports.d.ts.map +1 -0
  434. package/dist/optimization/optimization/environmentDetection.d.ts +9 -0
  435. package/dist/optimization/optimization/environmentDetection.d.ts.map +1 -0
  436. package/dist/optimization/optimization/index.d.ts +14 -0
  437. package/dist/optimization/optimization/index.d.ts.map +1 -0
  438. package/dist/optimization/optimization/route-preloading.d.ts +87 -0
  439. package/dist/optimization/optimization/route-preloading.d.ts.map +1 -0
  440. package/dist/optimization/optimization/securityHeaders.d.ts +87 -0
  441. package/dist/optimization/optimization/securityHeaders.d.ts.map +1 -0
  442. package/dist/optimization/optimization/walletLazyLoading.d.ts +57 -0
  443. package/dist/optimization/optimization/walletLazyLoading.d.ts.map +1 -0
  444. package/dist/optimization/performance-monitoring.d.ts +63 -0
  445. package/dist/optimization/performance-monitoring.d.ts.map +1 -0
  446. package/dist/optimization/performance.d.ts +98 -0
  447. package/dist/optimization/performance.d.ts.map +1 -0
  448. package/dist/platforms/index.d.ts +17 -0
  449. package/dist/platforms/index.d.ts.map +1 -0
  450. package/dist/platforms/web.d.ts +33 -0
  451. package/dist/platforms/web.d.ts.map +1 -0
  452. package/dist/primitives/feedback/alert-banner.d.ts +11 -0
  453. package/dist/primitives/feedback/alert-banner.d.ts.map +1 -0
  454. package/dist/primitives/feedback/alert.d.ts +20 -0
  455. package/dist/primitives/feedback/alert.d.ts.map +1 -0
  456. package/dist/primitives/feedback/badge-designer.d.ts +34 -0
  457. package/dist/primitives/feedback/badge-designer.d.ts.map +1 -0
  458. package/dist/primitives/feedback/badge.d.ts +52 -0
  459. package/dist/primitives/feedback/badge.d.ts.map +1 -0
  460. package/dist/primitives/feedback/index.d.ts +20 -0
  461. package/dist/primitives/feedback/index.d.ts.map +1 -0
  462. package/dist/primitives/feedback/loading-dots.d.ts +30 -0
  463. package/dist/primitives/feedback/loading-dots.d.ts.map +1 -0
  464. package/dist/primitives/feedback/loading-overlay.d.ts +44 -0
  465. package/dist/primitives/feedback/loading-overlay.d.ts.map +1 -0
  466. package/dist/primitives/feedback/loading-state.d.ts +11 -0
  467. package/dist/primitives/feedback/loading-state.d.ts.map +1 -0
  468. package/dist/primitives/feedback/notification-badge.d.ts +10 -0
  469. package/dist/primitives/feedback/notification-badge.d.ts.map +1 -0
  470. package/dist/primitives/feedback/notification-panel.d.ts +16 -0
  471. package/dist/primitives/feedback/notification-panel.d.ts.map +1 -0
  472. package/dist/primitives/feedback/skeleton-loader.d.ts +48 -0
  473. package/dist/primitives/feedback/skeleton-loader.d.ts.map +1 -0
  474. package/dist/primitives/feedback/spinner.d.ts +11 -0
  475. package/dist/primitives/feedback/spinner.d.ts.map +1 -0
  476. package/dist/primitives/feedback/status-badge.d.ts +17 -0
  477. package/dist/primitives/feedback/status-badge.d.ts.map +1 -0
  478. package/dist/primitives/feedback/status-indicator.d.ts +10 -0
  479. package/dist/primitives/feedback/status-indicator.d.ts.map +1 -0
  480. package/dist/primitives/feedback/status-pipeline.d.ts +34 -0
  481. package/dist/primitives/feedback/status-pipeline.d.ts.map +1 -0
  482. package/dist/primitives/feedback/toast-notification.d.ts +10 -0
  483. package/dist/primitives/feedback/toast-notification.d.ts.map +1 -0
  484. package/dist/primitives/feedback/toast.d.ts +48 -0
  485. package/dist/primitives/feedback/toast.d.ts.map +1 -0
  486. package/dist/primitives/index.d.ts +9 -0
  487. package/dist/primitives/index.d.ts.map +1 -0
  488. package/dist/primitives/layout/aspect-ratio.d.ts +32 -0
  489. package/dist/primitives/layout/aspect-ratio.d.ts.map +1 -0
  490. package/dist/primitives/layout/border-accent.d.ts +42 -0
  491. package/dist/primitives/layout/border-accent.d.ts.map +1 -0
  492. package/dist/primitives/layout/box.d.ts +56 -0
  493. package/dist/primitives/layout/box.d.ts.map +1 -0
  494. package/dist/primitives/layout/center.d.ts +34 -0
  495. package/dist/primitives/layout/center.d.ts.map +1 -0
  496. package/dist/primitives/layout/container.d.ts +36 -0
  497. package/dist/primitives/layout/container.d.ts.map +1 -0
  498. package/dist/primitives/layout/divider.d.ts +45 -0
  499. package/dist/primitives/layout/divider.d.ts.map +1 -0
  500. package/dist/primitives/layout/flex-container.d.ts +20 -0
  501. package/dist/primitives/layout/flex-container.d.ts.map +1 -0
  502. package/dist/primitives/layout/flex.d.ts +43 -0
  503. package/dist/primitives/layout/flex.d.ts.map +1 -0
  504. package/dist/primitives/layout/floating-panel.d.ts +39 -0
  505. package/dist/primitives/layout/floating-panel.d.ts.map +1 -0
  506. package/dist/primitives/layout/grid.d.ts +59 -0
  507. package/dist/primitives/layout/grid.d.ts.map +1 -0
  508. package/dist/primitives/layout/index.d.ts +28 -0
  509. package/dist/primitives/layout/index.d.ts.map +1 -0
  510. package/dist/primitives/layout/masonry.d.ts +41 -0
  511. package/dist/primitives/layout/masonry.d.ts.map +1 -0
  512. package/dist/primitives/layout/overlay.d.ts +40 -0
  513. package/dist/primitives/layout/overlay.d.ts.map +1 -0
  514. package/dist/primitives/layout/page-container.d.ts +13 -0
  515. package/dist/primitives/layout/page-container.d.ts.map +1 -0
  516. package/dist/primitives/layout/portal.d.ts +30 -0
  517. package/dist/primitives/layout/portal.d.ts.map +1 -0
  518. package/dist/primitives/layout/resizable-panels.d.ts +34 -0
  519. package/dist/primitives/layout/resizable-panels.d.ts.map +1 -0
  520. package/dist/primitives/layout/resizable.d.ts +63 -0
  521. package/dist/primitives/layout/resizable.d.ts.map +1 -0
  522. package/dist/primitives/layout/scroll-area.d.ts +36 -0
  523. package/dist/primitives/layout/scroll-area.d.ts.map +1 -0
  524. package/dist/primitives/layout/section.d.ts +16 -0
  525. package/dist/primitives/layout/section.d.ts.map +1 -0
  526. package/dist/primitives/layout/separator.d.ts +38 -0
  527. package/dist/primitives/layout/separator.d.ts.map +1 -0
  528. package/dist/primitives/layout/spacer.d.ts +38 -0
  529. package/dist/primitives/layout/spacer.d.ts.map +1 -0
  530. package/dist/primitives/layout/split-pane.d.ts +57 -0
  531. package/dist/primitives/layout/split-pane.d.ts.map +1 -0
  532. package/dist/primitives/layout/stack.d.ts +60 -0
  533. package/dist/primitives/layout/stack.d.ts.map +1 -0
  534. package/dist/primitives/typography/blockquote.d.ts +36 -0
  535. package/dist/primitives/typography/blockquote.d.ts.map +1 -0
  536. package/dist/primitives/typography/code-display.d.ts +41 -0
  537. package/dist/primitives/typography/code-display.d.ts.map +1 -0
  538. package/dist/primitives/typography/code.d.ts +32 -0
  539. package/dist/primitives/typography/code.d.ts.map +1 -0
  540. package/dist/primitives/typography/formatted-number.d.ts +54 -0
  541. package/dist/primitives/typography/formatted-number.d.ts.map +1 -0
  542. package/dist/primitives/typography/heading.d.ts +40 -0
  543. package/dist/primitives/typography/heading.d.ts.map +1 -0
  544. package/dist/primitives/typography/helper-text.d.ts +36 -0
  545. package/dist/primitives/typography/helper-text.d.ts.map +1 -0
  546. package/dist/primitives/typography/index.d.ts +18 -0
  547. package/dist/primitives/typography/index.d.ts.map +1 -0
  548. package/dist/primitives/typography/kbd.d.ts +28 -0
  549. package/dist/primitives/typography/kbd.d.ts.map +1 -0
  550. package/dist/primitives/typography/relative-time.d.ts +35 -0
  551. package/dist/primitives/typography/relative-time.d.ts.map +1 -0
  552. package/dist/primitives/typography/screen-reader-text.d.ts +34 -0
  553. package/dist/primitives/typography/screen-reader-text.d.ts.map +1 -0
  554. package/dist/primitives/typography/text.d.ts +46 -0
  555. package/dist/primitives/typography/text.d.ts.map +1 -0
  556. package/dist/primitives/typography/truncated-text.d.ts +42 -0
  557. package/dist/primitives/typography/truncated-text.d.ts.map +1 -0
  558. package/dist/primitives/typography/typography.d.ts +50 -0
  559. package/dist/primitives/typography/typography.d.ts.map +1 -0
  560. package/dist/seo/AIMeta.d.ts +20 -0
  561. package/dist/seo/AIMeta.d.ts.map +1 -0
  562. package/dist/seo/AITrainingEnhancer.d.ts +7 -0
  563. package/dist/seo/AITrainingEnhancer.d.ts.map +1 -0
  564. package/dist/seo/SemanticHTML.d.ts +89 -0
  565. package/dist/seo/SemanticHTML.d.ts.map +1 -0
  566. package/dist/seo/advancedSEO.d.ts +1074 -0
  567. package/dist/seo/advancedSEO.d.ts.map +1 -0
  568. package/dist/seo/aiTrainingMetadata.d.ts +181 -0
  569. package/dist/seo/aiTrainingMetadata.d.ts.map +1 -0
  570. package/dist/seo/index.d.ts +10 -0
  571. package/dist/seo/index.d.ts.map +1 -0
  572. package/dist/seo/seo-headings.d.ts +62 -0
  573. package/dist/seo/seo-headings.d.ts.map +1 -0
  574. package/dist/test/setup.d.ts +1 -0
  575. package/dist/test/setup.d.ts.map +1 -0
  576. package/dist/ui/button.d.ts +1 -1
  577. package/dist/ui/content-container.d.ts +1 -1
  578. package/dist/ui/design-system-components.d.ts +2 -2
  579. package/dist/ui/feature-grid.d.ts +1 -1
  580. package/dist/ui/free-email-banner.d.ts +1 -1
  581. package/dist/ui/page-container.d.ts +1 -1
  582. package/dist/ui/section.d.ts +3 -3
  583. package/dist/ui/smart-link.d.ts +1 -1
  584. package/dist/ui/typography.d.ts +6 -6
  585. package/dist/utils/index.d.ts +0 -1
  586. package/dist/utils/index.d.ts.map +1 -1
  587. package/package.json +4 -4
package/dist/index.umd.js CHANGED
@@ -1,70 +1,55 @@
1
- (function(u,Me){typeof exports=="object"&&typeof module<"u"?Me(exports,require("clsx"),require("tailwind-merge"),require("react"),require("react/jsx-runtime"),require("web-vitals"),require("react-dom"),require("@heroicons/react/24/outline"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("@radix-ui/react-label"),require("@radix-ui/react-select"),require("lucide-react"),require("@radix-ui/react-switch"),require("@radix-ui/react-tabs"),require("@heroicons/react/24/solid"),require("react-router-dom"),require("react-i18next"),require("react-helmet-async")):typeof define=="function"&&define.amd?define(["exports","clsx","tailwind-merge","react","react/jsx-runtime","web-vitals","react-dom","@heroicons/react/24/outline","@radix-ui/react-slot","class-variance-authority","@radix-ui/react-label","@radix-ui/react-select","lucide-react","@radix-ui/react-switch","@radix-ui/react-tabs","@heroicons/react/24/solid","react-router-dom","react-i18next","react-helmet-async"],Me):(u=typeof globalThis<"u"?globalThis:u||self,Me(u.MailBoxComponents={},u.clsx,u.tailwindMerge,u.React,u.ReactJSXRuntime,u.WebVitals,u.ReactDOM,u.HeroiconsOutline,u.RadixSlot,u.cva,u.RadixLabel,u.RadixSelect,u.LucideReact,u.RadixSwitch,u.RadixTabs,u.HeroiconsSolid,u.ReactRouterDOM,u.ReactI18next,u.ReactHelmetAsync))})(this,(function(u,Me,hn,x,n,Oe,Qe,A,St,_,hr,bn,Xe,Nt,pe,he,Ze,br,yn){"use strict";function Et(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const S=Et(x),yr=Et(Qe),H=Et(bn);function y(...e){return hn.twMerge(Me.clsx(e))}const xn=e=>e,vn=e=>{if(typeof document>"u")return;const t=document.createElement("style");t.textContent=e,t.setAttribute("data-critical","true"),document.head.appendChild(t)},wn=e=>{if(typeof document>"u")return;const t=document.createElement("link");t.rel="preload",t.as="style",t.href=e,t.onload=()=>{t.rel="stylesheet"},document.head.appendChild(t);const r=document.createElement("noscript");r.innerHTML=`<link rel="stylesheet" href="${e}">`,document.head.appendChild(r)},kn=e=>{const t={};return Object.entries(e).forEach(([r,a])=>{t[`--${r}`]=typeof a=="number"?`${a}px`:a}),t},Cn={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Sn=(e,t=Cn)=>{const[r,a]=x.useState("base");return x.useEffect(()=>{const o=()=>{const s=window.innerWidth;s>=t["2xl"]?a("2xl"):s>=t.xl?a("xl"):s>=t.lg?a("lg"):s>=t.md?a("md"):s>=t.sm?a("sm"):s>=t.xs?a("xs"):a("base")};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[t]),e[r]||e.base||{}},xr=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,Nn=()=>{const[e,t]=x.useState(xr);return x.useEffect(()=>{const r=window.matchMedia("(prefers-reduced-motion: reduce)"),a=()=>{t(r.matches)};return r.addEventListener?r.addEventListener("change",a):r.addListener(a),()=>{r.removeEventListener?r.removeEventListener("change",a):r.removeListener(a)}},[]),e},En=(e,t=["layout","paint"])=>{e&&(e.style.contain=t.join(" "))},An=(e,t)=>e?(e.style.willChange=t.join(", "),()=>{e.style.willChange="auto"}):void 0,Pn=e=>{typeof window>"u"||requestAnimationFrame(()=>{e.forEach(t=>t())})},Tn=(...e)=>e.filter(Boolean).join(" "),In=e=>{const t={},r=["display","position","width","height","margin","padding","fontSize","fontFamily","color","backgroundColor"];return Object.entries(e).forEach(([a,o])=>{r.includes(a)&&(t[a]=o)}),t},$n=(e,t=[])=>{const[r,a]=x.useState(null),[o,s]=x.useState(!0);return x.useEffect(()=>{let i=!0;return e().then(l=>{i&&(a(l.default),s(!1))}),()=>{i=!1}},[e,...t]),{styles:r,loading:o}},Ln=(e,t="1rem")=>({display:"grid",gridTemplateColumns:`repeat(${e}, minmax(0, 1fr))`,gap:t,contain:"layout",willChange:"transform"}),Mn=(e="row",t="center",r="flex-start")=>({display:"flex",flexDirection:e,alignItems:t,justifyContent:r,contain:"layout"}),On=e=>{const[t,r]=x.useState(!1);return x.useEffect(()=>{const a=window.matchMedia(e);r(a.matches);const o=()=>r(a.matches);return a.addEventListener?a.addEventListener("change",o):a.addListener(o),()=>{a.removeEventListener?a.removeEventListener("change",o):a.removeListener(o)}},[e]),t},zn=(e,t)=>{const[r,a]=x.useState("light");return x.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)");a(o.matches?"dark":"light");const s=()=>{a(o.matches?"dark":"light")};return o.addEventListener?o.addEventListener("change",s):o.addListener(s),()=>{o.removeEventListener?o.removeEventListener("change",s):o.removeListener(s)}},[]),r==="dark"?t:e},Dn=e=>{const t={src:e.src,alt:e.alt,loading:e.loading||"lazy"};return e.title&&(t.title=e.title),e.width&&(t.width=e.width),e.height&&(t.height=e.height),e.sizes&&(t.sizes=e.sizes),e.srcSet&&(t.srcSet=e.srcSet),t.itemProp="image",t},Bn=(e,t=[320,640,768,1024,1280,1920])=>t.map(r=>`${e.replace(/\{width\}/g,r.toString())} ${r}w`).join(", "),Wn=e=>e.map(t=>t.maxWidth?`(max-width: ${t.maxWidth}px) ${t.size}`:t.size).join(", "),jn=(e,t="openGraph")=>{const r={};return t==="openGraph"?(r["og:image"]=e.url,e.width&&(r["og:image:width"]=e.width.toString()),e.height&&(r["og:image:height"]=e.height.toString()),e.alt&&(r["og:image:alt"]=e.alt),e.type&&(r["og:image:type"]=e.type)):(r["twitter:image"]=e.url,e.alt&&(r["twitter:image:alt"]=e.alt)),r},Fn=(e='img[loading="lazy"]')=>{if(typeof window>"u"||!("IntersectionObserver"in window))return;const t=document.querySelectorAll(e);if("loading"in HTMLImageElement.prototype){t.forEach(a=>{a.dataset.src&&(a.src=a.dataset.src)});return}const r=new IntersectionObserver(a=>{a.forEach(o=>{if(o.isIntersecting){const s=o.target;s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),r.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});return t.forEach(a=>r.observe(a)),()=>{t.forEach(a=>r.unobserve(a))}},vr=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const t=new Image;t.onload=t.onerror=function(){e(t.height===2)},t.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}),wr=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const t=new Image;t.onload=()=>e(!0),t.onerror=()=>e(!1),t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="}),_n=async(e="jpg")=>{const[t,r]=await Promise.all([vr(),wr()]);return r?"avif":t?"webp":e},Hn=(e,t,r,a)=>`
2
- <picture>
3
- ${e.map(s=>{const i=[`srcset="${s.srcSet}"`];return s.type&&i.push(`type="${s.type}"`),s.media&&i.push(`media="${s.media}"`),s.sizes&&i.push(`sizes="${s.sizes}"`),`<source ${i.join(" ")}>`}).join(`
4
- `)}
5
- <img src="${t}" alt="${r}"${a?` class="${a}"`:""} loading="lazy">
6
- </picture>`.trim(),Un=(e,t="image")=>{if(typeof document>"u")return;const r=document.createElement("link");r.rel="preload",r.as=t,r.href=e,e.includes(".webp")?r.type="image/webp":e.includes(".avif")&&(r.type="image/avif"),document.head.appendChild(r)},Vn=(e,t,r)=>{if(typeof window>"u")return;const a=new Image;a.src=e,a.classList.add("progressive-image-placeholder"),r.appendChild(a);const o=new Image;o.src=t,o.classList.add("progressive-image-main"),o.style.opacity="0",o.onload=()=>{r.appendChild(o),requestAnimationFrame(()=>{o.style.transition="opacity 0.3s",o.style.opacity="1",setTimeout(()=>{a.remove()},300)})}},qn=e=>new Promise(t=>{const r=performance.now();e.complete?t({loadTime:0,size:0,format:e.src.split(".").pop()||"unknown",dimensions:{width:e.naturalWidth,height:e.naturalHeight},isLazyLoaded:e.loading==="lazy",isOptimized:e.srcset!==""||e.sizes!==""}):e.addEventListener("load",()=>{const a=performance.now()-r;t({loadTime:a,size:0,format:e.src.split(".").pop()||"unknown",dimensions:{width:e.naturalWidth,height:e.naturalHeight},isLazyLoaded:e.loading==="lazy",isOptimized:e.srcset!==""||e.sizes!==""})})}),Gn=(e,t,r="#e0e0e0")=>{const a=`
7
- <svg width="${e}" height="${t}" xmlns="http://www.w3.org/2000/svg">
8
- <rect width="100%" height="100%" fill="${r}"/>
9
- </svg>
10
- `;return`data:image/svg+xml;base64,${btoa(a)}`},Kn=(e,t)=>{const r=1/t*100;e.style.position="relative",e.style.paddingTop=`${r}%`;const a=e.querySelector("img");a&&(a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",a.style.objectFit="cover")},Ce={createPureFunction:e=>e,isDevelopment:process.env.NODE_ENV==="development",isProduction:process.env.NODE_ENV==="production",isTest:process.env.NODE_ENV==="test",createFeatureFlags:(e={})=>({enableAnalytics:process.env.VITE_ENABLE_ANALYTICS==="true",enableDebugTools:process.env.NODE_ENV==="development",enablePerformanceMonitoring:process.env.VITE_ENABLE_PERF_MONITORING!=="false",...e})},Yn=e=>{const t={};return Object.entries(e).forEach(([r,a])=>{t[r]=()=>{try{return a()}catch{return Promise.resolve({default:null})}}}),t},kr={createDebounce:e=>t=>{let r;return((...a)=>{clearTimeout(r),r=setTimeout(()=>t(...a),e)})},memoize:e=>{const t=new Map;return((...r)=>{const a=JSON.stringify(r);if(t.has(a))return t.get(a);const o=e(...r);return t.set(a,o),o})},isDeepEqual:(e,t)=>{if(e===t)return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(const o of r)if(!a.includes(o)||!kr.isDeepEqual(e[o],t[o]))return!1;return!0},createThrottle:e=>t=>{let r=0;return((...a)=>{const o=Date.now();if(o-r>=e)return r=o,t(...a)})}},Qn=e=>{const t={};return Object.entries(e).forEach(([r,a])=>{t[r]={},Object.entries(a).forEach(([o,s])=>{t[r][o]=()=>import(s).then(i=>({[o]:i[o]}))})}),t},Se={getModuleSize:e=>new Promise(t=>{if(typeof window<"u"&&"performance"in window){const a=performance.getEntriesByType("resource").find(o=>o.name.includes(e));t(a?.transferSize||0)}else t(0)}),usageTracker:new Set,trackUsage:e=>{Ce.isDevelopment&&Se.usageTracker.add(e)},getUsageReport:()=>Ce.isDevelopment?Array.from(Se.usageTracker).sort():[],estimateImpact:e=>{const t=e.map(r=>Se.getModuleSize(r).then(a=>[r,a]));return Promise.all(t).then(r=>{const a={};let o=0;return r.forEach(([s,i])=>{a[s]=i,o+=i}),{total:o,modules:a}})}},Cr={inlineCriticalCSS:e=>{if(typeof document<"u"){const t=document.createElement("style");t.textContent=e,document.head.appendChild(t)}},loadAsyncCSS:e=>{if(typeof document<"u"){const t=document.createElement("link");t.rel="stylesheet",t.href=e,t.media="print",t.onload=()=>{t.media="all"},document.head.appendChild(t)}},removeUnusedCSS:e=>{if(typeof document>"u")return;const t=new Set;return e.forEach(r=>{try{document.querySelector(r)&&t.add(r)}catch{}}),{used:Array.from(t),unused:e.filter(r=>!t.has(r))}}},Xn=(e={})=>{const{features:t={},criticalCSS:r="",enableUsageTracking:a=Ce.isDevelopment}=e;return{features:Ce.createFeatureFlags(t),initialize:()=>{r&&typeof document<"u"&&Cr.inlineCriticalCSS(r)},cleanup:()=>{Se.usageTracker.clear()},getReport:()=>({usage:Se.getUsageReport(),features:Ce.createFeatureFlags(t)})}};let At;function Zn(e){throw typeof window<"u"?new Error("Web navigation service not implemented in shared library"):new Error("React Native navigation service not implemented in shared library")}function Z(e){return At||(At=Zn()),At}function Jn(){const e=Z(),t=e.getCurrentState();return{navigate:(r,a)=>{e.navigate(r,a)},goBack:r=>{e.goBack(r)},replace:(r,a)=>{e.replace(r,a)},currentPath:t.currentPath,searchParams:t.searchParams,params:t.params,canGoBack:e.canGoBack(),isSupported:e.isSupported()}}function Rn(){const t=Z().getCurrentState(),r=Object.keys(t.searchParams).length>0?"?"+new URLSearchParams(t.searchParams).toString():"";return{pathname:t.currentPath,search:r,searchParams:t.searchParams,hash:"",state:{},key:t.currentPath}}function eo(){const e=Z(),t=e.getCurrentState();return[new URLSearchParams(t.searchParams),o=>{const s=o instanceof URLSearchParams?Object.fromEntries(o.entries()):o,i=new URLSearchParams(s).toString(),l=t.currentPath+(i?`?${i}`:"");e.replace(l)}]}const be={navigate:(e,t)=>{Z().navigate(e,t)},goBack:e=>{Z().goBack(e)},replace:(e,t)=>{Z().replace(e,t)},getCurrentPath:()=>Z().getCurrentPath(),getSearchParams:()=>Z().getSearchParams(),goToMail:()=>{be.navigate("/mail")},goToPreferences:()=>{be.navigate("/preferences")},goToCompose:(e,t)=>{const r=new URLSearchParams;e&&r.set("type",e),t&&Object.entries(t).forEach(([o,s])=>{r.set(o,s)});const a=r.toString();be.navigate(`/mail/compose${a?`?${a}`:""}`)},goToConnect:()=>{be.navigate("/connect")},goToDelegate:()=>{be.navigate("/admin/delegate")},goToHome:()=>{be.navigate("/")},canGoBack:()=>Z().canGoBack()},to=(e,t)=>t.find(r=>r.href===e)||null,ro=(e,t,r)=>{const a=e.split("/").filter(Boolean);if(a.length===0)return[{label:"Home",current:!0}];const o=[{label:"Home",href:"/"}],i={...{docs:"Documentation",about:"About",connect:"Connect",settings:"Settings",preferences:"Preferences",profile:"Profile",help:"Help",support:"Support",contact:"Contact",terms:"Terms of Service",privacy:"Privacy Policy"},...r||{}};return a.forEach((l,c)=>{const d=c===a.length-1,g="/"+a.slice(0,c+1).join("/"),m=t&&d?t:i[l]||l;o.push({label:m,href:d?void 0:g,current:d})}),o},ao={isActivePath:(e,t,r=!0)=>r?e===t:e.startsWith(t),getParentPath:e=>{const t=e.split("/").filter(Boolean);return t.length<=1?"/":"/"+t.slice(0,-1).join("/")},extractParams:(e,t)=>{const r=e.split("/").filter(Boolean),a=t.split("/").filter(Boolean),o={};return r.forEach((s,i)=>{if(s.startsWith(":")&&a[i]){const l=s.substring(1);o[l]=a[i]}}),o},buildUrlWithParams:(e,t)=>{const r=new URL(e,"http://localhost");return Object.entries(t).forEach(([a,o])=>{r.searchParams.set(a,String(o))}),r.pathname+r.search},parseQueryParams:e=>{const t=new URLSearchParams(e.startsWith("?")?e:`?${e}`),r={};return t.forEach((a,o)=>{r[o]=a}),r},normalizePath:e=>{if(!e||e==="/")return"/";let t=e.startsWith("/")?e:`/${e}`;return t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t},isExternalUrl:e=>{try{return new URL(e,window?.location?.origin||"http://localhost").origin!==(window?.location?.origin||"http://localhost")}catch{return!1}}};function no(e,t=3,r=1e3){return x.lazy(()=>new Promise((a,o)=>{const s=i=>{e().then(a).catch(l=>{i>0?setTimeout(()=>{s(i-1)},r):o(l)})};s(t)}))}function oo(e){let t=null;const r=()=>(t||(t=e()),t.then(()=>{}));return{Component:x.lazy(()=>t||e()),preload:r}}function so(e,t={}){const{fallback:r=n.jsx("div",{children:"Loading..."}),errorFallback:a=n.jsx("div",{children:"Failed to load component"}),loadingDelay:o=200,minimumLoadingTime:s=500}=t,i=x.lazy(async()=>{const c=Date.now();try{const d=await e(),g=Date.now()-c;return g<s&&await new Promise(m=>setTimeout(m,s-g)),d}catch{return{default:(()=>a)}}}),l=()=>{const[c,d]=x.useState(!1);return x.useEffect(()=>{const g=setTimeout(()=>{d(!0)},o);return()=>clearTimeout(g)},[]),c?n.jsx(n.Fragment,{children:r}):null};return x.forwardRef((c,d)=>n.jsx(x.Suspense,{fallback:n.jsx(l,{}),children:n.jsx(i,{...c,ref:d})}))}function Sr(e,t={}){const[r,a]=x.useState(!1),[o,s]=x.useState(!1);return x.useEffect(()=>{const i=e.current;if(!i||o)return;const l=new IntersectionObserver(([c])=>{c.isIntersecting&&(a(!0),s(!0),l.disconnect())},{rootMargin:"50px",threshold:.01,...t});return l.observe(i),()=>{l.disconnect()}},[e,t,o]),r}const io=({children:e,fallback:t=n.jsx("div",{children:"Loading..."}),threshold:r=.01,rootMargin:a="50px",placeholder:o})=>{const s=x.useRef(null),i=Sr(s,{threshold:r,rootMargin:a});return n.jsx("div",{ref:s,children:i?e:o||t})};function lo(e){const{importFn:t,preloadOnHover:r=!0,preloadOnFocus:a=!0,prefetchDelay:o=50}=e;let s=null,i=null;const l=()=>(i||(i=t()),i),c=()=>{s&&clearTimeout(s),s=setTimeout(()=>{l()},o)};return{Component:x.lazy(()=>i||t()),preload:l,linkProps:{...r&&{onMouseEnter:c,onMouseLeave:()=>{s&&clearTimeout(s)}},...a&&{onFocus:c}}}}function co(e,t=[]){const[r,a]=x.useState(null),[o,s]=x.useState(!0),[i,l]=x.useState(null);return x.useEffect(()=>{let c=!0;return s(!0),l(null),e().then(d=>{c&&(a(d),s(!1))}).catch(d=>{c&&(l(d),s(!1))}),()=>{c=!1}},[e,...t]),{module:r,loading:o,error:i}}class Nr{constructor(t=3,r=100){this.queue=new Set,this.isProcessing=!1,this.batchSize=t,this.delay=r}add(t){this.queue.add(t),this.process()}async process(){if(this.isProcessing||this.queue.size===0)return;this.isProcessing=!0;const t=Array.from(this.queue).slice(0,this.batchSize);t.forEach(r=>this.queue.delete(r)),await Promise.all(t.map(r=>r().catch(()=>{}))),this.queue.size>0&&await new Promise(r=>setTimeout(r,this.delay)),this.isProcessing=!1,this.queue.size>0&&this.process()}}function uo(e,t,r){if(typeof document>"u")return;const a=document.createElement("link");a.rel=t,a.href=e,r&&(t==="preload"||t==="prefetch")&&(a.as=r),document.head.appendChild(a)}var Pt=(e=>(e[e.HIGH=0]="HIGH",e[e.MEDIUM=1]="MEDIUM",e[e.LOW=2]="LOW",e[e.IDLE=3]="IDLE",e))(Pt||{});class Er{constructor(){this.queues=new Map,this.isProcessing=!1,Object.values(Pt).filter(t=>typeof t=="number").forEach(t=>{this.queues.set(t,[])})}load(t,r=1){const a=this.queues.get(r);a&&a.push(t),this.process()}async process(){if(!this.isProcessing){this.isProcessing=!0;for(const[t,r]of this.queues)for(;r.length>0;){const a=r.shift();if(a)try{await a()}catch{}t>=2&&await new Promise(o=>setTimeout(o,50))}this.isProcessing=!1}}}const go=new Nr,mo=new Er;class Tt{constructor(t={}){this.prefix=t.prefix||"mailbox",this.defaultTTL=t.ttl,this.platformStorage=t.platformStorage||this.createFallbackStorage()}createFallbackStorage(){const t=new Map;return{getItem:r=>t.get(r)||null,setItem:(r,a)=>{t.set(r,a)},removeItem:r=>{t.delete(r)},clear:()=>{t.clear()},getAllKeys:()=>Array.from(t.keys())}}getKey(t){return`${this.prefix}-${t}`}isExpired(t){return t.ttl?Date.now()-t.timestamp>t.ttl:!1}set(t,r,a){try{const o={value:r,timestamp:Date.now(),ttl:a||this.defaultTTL};this.platformStorage.setItem(this.getKey(t),JSON.stringify(o))}catch{}}get(t,r){try{const a=this.platformStorage.getItem(this.getKey(t));if(!a)return r;const o=JSON.parse(a);return this.isExpired(o)?(this.remove(t),r):o.value}catch{return r}}remove(t){try{this.platformStorage.removeItem(this.getKey(t))}catch{}}clear(t){try{if(this.platformStorage.getAllKeys){const r=this.platformStorage.getAllKeys(),a=this.getKey(t||""),o=r.filter(s=>s.startsWith(a));for(const s of o)this.platformStorage.removeItem(s)}else this.platformStorage.clear?.()}catch(r){console.error("Failed to clear storage:",r)}}has(t){try{return this.platformStorage.getItem(this.getKey(t))!==null}catch(r){return console.error(`Failed to check item ${t}:`,r),!1}}getAllKeys(){try{if(this.platformStorage.getAllKeys){const t=this.platformStorage.getAllKeys(),r=`${this.prefix}-`;return t.filter(a=>a.startsWith(r)).map(a=>a.substring(r.length))}return[]}catch(t){return console.error("Failed to get all keys:",t),[]}}}const fo=new Tt,po=new Tt({prefix:"mailbox-theme"}),ho=new Tt({prefix:"walletUser",ttl:10080*60*1e3}),bo=e=>{if(!e)throw new Error("PlatformStorage must be provided to createSimpleStorage");return{setItem:(t,r)=>{try{e.setItem(t,r)}catch{}},getItem:t=>{try{return e.getItem(t)}catch{return null}},removeItem:t=>{try{e.removeItem(t)}catch{}}}};function Ar(){const e={isWalletBrowser:!1,walletType:"unknown",hasEthereum:!1,hasSolana:!1,provider:null};if(typeof window>"u")return e;try{const t=navigator.userAgent.toLowerCase();let r="unknown",a=!1;t.includes("metamask")?(r="metamask",a=!0):t.includes("trustwallet")?(r="trustwallet",a=!0):t.includes("coinbase")?(r="coinbase",a=!0):t.includes("rainbow")?(r="rainbow",a=!0):t.includes("phantom")?(r="phantom",a=!0):t.includes("solflare")?(r="solflare",a=!0):t.includes("exodus")&&(r="exodus",a=!0);const o=!!window.ethereum,s=!!window.solana||!!window.phantom?.solana;(o||s)&&!a&&(a=!0,window.ethereum?.isMetaMask?r="metamask":window.ethereum?.isCoinbaseWallet?r="coinbase":window.ethereum?.isRainbow?r="rainbow":window.phantom?r="phantom":window.solflare&&(r="solflare"));const i=o?window.ethereum:s?window.solana||window.phantom?.solana:null;return{isWalletBrowser:a,walletType:r,hasEthereum:o,hasSolana:s,provider:i}}catch{return e}}async function yo(){const e=Ar();if(!e.isWalletBrowser)return{success:!1,error:"Not running in a wallet browser"};try{if(e.hasEthereum&&e.provider)try{const t=await e.provider.request({method:"eth_requestAccounts"});if(t&&t.length>0)return{success:!0,address:t[0]}}catch{}if(e.hasSolana&&e.provider)try{const t=await e.provider.connect();if(t.publicKey)return{success:!0,address:t.publicKey.toString()}}catch{}return{success:!1,error:"Failed to connect to wallet provider"}}catch(t){return{success:!1,error:t instanceof Error?t.message:"Unknown connection error"}}}class xo{constructor(t){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=t,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){Oe.onCLS(t=>{this.metrics.CLS=t.value,this.reportMetric("CLS",t.value)}),Oe.onINP(t=>{this.metrics.INP=t.value,this.reportMetric("INP",t.value)}),Oe.onFCP(t=>{this.metrics.FCP=t.value,this.reportMetric("FCP",t.value)}),Oe.onLCP(t=>{this.metrics.LCP=t.value,this.reportMetric("LCP",t.value)}),Oe.onTTFB(t=>{this.metrics.TTFB=t.value,this.reportMetric("TTFB",t.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const t=new PerformanceObserver(a=>{a.getEntries().forEach(s=>{if(s.entryType==="navigation"){const i=s;this.metrics.bundleLoadTime=i.loadEventEnd-i.fetchStart}})});try{t.observe({entryTypes:["navigation"]}),this.observers.push(t)}catch{}const r=new PerformanceObserver(a=>{a.getEntries().forEach(s=>{(s.name.includes(".js")||s.name.includes(".css"))&&this.trackResourceLoad(s.name,s.duration)})});try{r.observe({entryTypes:["resource"]}),this.observers.push(r)}catch{}}}collectDeviceInfo(){if(typeof window<"u"){const t=navigator;t.connection&&(this.metrics.connection=t.connection.effectiveType||t.connection.type),t.deviceMemory&&(this.metrics.deviceMemory=t.deviceMemory),t.hardwareConcurrency&&(this.metrics.hardwareConcurrency=t.hardwareConcurrency),this.metrics.viewport={width:window.innerWidth,height:window.innerHeight}}}reportMetric(t,r){this.reportCallback&&this.reportCallback({...this.metrics,timestamp:Date.now()}),process.env.NODE_ENV}trackResourceLoad(t,r){const a=t.includes(".js"),o=t.includes(".css");if(a||o){const s=a?"JavaScript":"CSS";this.reportMetric(`${s} Load`,r)}}measureComponentRender(t,r){this.metrics.componentRenderTime=r,this.reportMetric(`Component Render (${t})`,r)}measureAPICall(t,r){this.metrics.apiResponseTime=r,this.reportMetric(`API Call (${t})`,r)}measureRouteChange(t,r){this.metrics.routeChangeTime=r,this.reportMetric(`Route Change (${t})`,r)}markStart(t){this.performanceMarks.set(t,performance.now())}markEnd(t){const r=this.performanceMarks.get(t);if(r){const a=performance.now()-r;this.reportMetric(`Mark (${t})`,a),this.performanceMarks.delete(t)}}trackRouteChange(t,r,a){typeof r=="string"?this.measureRouteChange(r,a||performance.now()):this.measureRouteChange(t,r)}getSummary(){return{coreWebVitals:{score:this.calculateScore(),LCP:this.metrics.LCP,INP:this.metrics.INP,CLS:this.metrics.CLS},loadingPerformance:{FCP:this.metrics.FCP,TTFB:this.metrics.TTFB,bundleLoadTime:this.metrics.bundleLoadTime},runtime:{routeChangeTime:this.metrics.routeChangeTime,apiResponseTime:this.metrics.apiResponseTime,componentRenderTime:this.metrics.componentRenderTime},device:{connection:this.metrics.connection,deviceMemory:this.metrics.deviceMemory,hardwareConcurrency:this.metrics.hardwareConcurrency}}}calculateScore(){let t=100;return this.metrics.LCP&&this.metrics.LCP>2500?t-=25:this.metrics.LCP&&this.metrics.LCP>2e3&&(t-=15),this.metrics.INP&&this.metrics.INP>200?t-=20:this.metrics.INP&&this.metrics.INP>100&&(t-=10),this.metrics.CLS&&this.metrics.CLS>.1?t-=15:this.metrics.CLS&&this.metrics.CLS>.05&&(t-=8),Math.max(t,0)}getMetrics(){return{...this.metrics}}cleanup(){this.observers.forEach(t=>t.disconnect()),this.observers=[]}}let Je=null;const vo=e=>(Je||(Je=new xo(e)),Je),Re=()=>Je,Pr=e=>{const t=x.useRef(performance.now());x.useEffect(()=>{const r=performance.now()-t.current,a=Re();a&&a.measureComponentRender(e,r)},[e])},wo=(e,t)=>x.forwardRef((r,a)=>(Pr(t),x.createElement(e,{...r,ref:a}))),ko=async(e,t)=>{const r=performance.now(),a=await e(),o=performance.now()-r,s=Re();return s&&s.measureAPICall(t,o),a},Tr={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},Co=(e,t=Tr)=>{const r=[];return t.LCP&&e.LCP&&e.LCP>t.LCP&&r.push(`LCP: ${e.LCP.toFixed(0)}ms (budget: ${t.LCP}ms)`),t.INP&&e.INP&&e.INP>t.INP&&r.push(`INP: ${e.INP.toFixed(0)}ms (budget: ${t.INP}ms)`),t.CLS&&e.CLS&&e.CLS>t.CLS&&r.push(`CLS: ${e.CLS.toFixed(3)} (budget: ${t.CLS})`),t.FCP&&e.FCP&&e.FCP>t.FCP&&r.push(`FCP: ${e.FCP.toFixed(0)}ms (budget: ${t.FCP}ms)`),t.TTFB&&e.TTFB&&e.TTFB>t.TTFB&&r.push(`TTFB: ${e.TTFB.toFixed(0)}ms (budget: ${t.TTFB}ms)`),{passed:r.length===0,violations:r}},So=e=>{const t=e||Re()?.getMetrics()||{timestamp:Date.now()},r={timestamp:new Date().toISOString(),metrics:t,environment:{userAgent:typeof window<"u"?window.navigator.userAgent:"unknown",url:typeof window<"u"?window.location.href:"unknown",referrer:typeof document<"u"?document.referrer:"unknown",viewport:t.viewport,connection:t.connection,deviceMemory:t.deviceMemory,hardwareConcurrency:t.hardwareConcurrency}};return JSON.stringify(r,null,2)},No=e=>{if(e===0)return"0 Bytes";const t=1024,r=["Bytes","KB","MB","GB","TB"],a=Math.floor(Math.log(e)/Math.log(t)),o=Math.min(a,r.length-1);return parseFloat((e/Math.pow(t,o)).toFixed(2))+" "+r[o]},Eo=(e,t,r)=>{const a={bytes:0,kb:1,mb:2,gb:3,tb:4},o=1024,i=e*Math.pow(o,a[t])/Math.pow(o,a[r]);return Math.round(i*100)/100},Ao=e=>{const t=e.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!t)return null;const r=parseFloat(t[1]),a=t[2].toLowerCase(),s={bytes:1,byte:1,kb:1024,mb:1024*1024,gb:1024*1024*1024,tb:1024*1024*1024*1024}[a];return s?Math.round(r*s):null};function Ir(e,t){x.useEffect(()=>{const r=a=>{const o=e?.current;!o||o.contains(a?.target||null)||t(a)};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])}const $r=e=>{const[t,r]=x.useState(""),[a,o]=x.useState(!0),[s,i]=x.useState(null);return x.useEffect(()=>{e&&(async()=>{try{o(!0),i(null);const c=await fetch(`/code/${e}`);if(!c.ok)throw new Error(`Failed to load code file: ${e}`);const d=await c.text();r(d)}catch(c){i(c instanceof Error?c.message:"Unknown error"),r("// Error loading code file")}finally{o(!1)}})()},[e]),{code:t,loading:a,error:s}},Po=(e={})=>{const{successMessage:t="",successDuration:r=3e3,errorPrefix:a="",onSuccess:o,onError:s}=e,[i,l]=x.useState(!1),[c,d]=x.useState(""),[g,m]=x.useState(""),b=x.useCallback(()=>{d(""),m("")},[]),f=x.useCallback(()=>{d("")},[]),p=x.useCallback(()=>{m("")},[]),h=x.useCallback(async w=>{l(!0),b();try{await w(),t&&(d(t),r>0&&setTimeout(()=>{d("")},r)),o&&o()}catch(C){const k=C instanceof Error?C.message:"An error occurred";throw m(a?`${a}: ${k}`:k),s&&C instanceof Error&&s(C),C}finally{l(!1)}},[t,r,a,o,s,b]);return{isSubmitting:i,successMessage:c,errorMessage:g,submit:h,clearMessages:b,clearSuccess:f,clearError:p}},To=(e=!1)=>{const[t,r]=x.useState(e),a=x.useCallback(()=>r(!0),[]),o=x.useCallback(()=>r(!1),[]),s=x.useCallback(()=>r(i=>!i),[]);return{value:t,setTrue:a,setFalse:o,toggle:s,setValue:r}},Lr=(e={})=>{const{successDuration:t=2e3,onSuccess:r,onError:a}=e,[o,s]=x.useState(null),i=x.useCallback(async d=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(d);else{const g=document.createElement("textarea");g.value=d,g.style.position="fixed",g.style.left="-999999px",g.style.top="-999999px",document.body.appendChild(g),g.focus(),g.select();const m=document.execCommand("copy");if(document.body.removeChild(g),!m)throw new Error("Copy command was unsuccessful")}return s(d),r?.(d),setTimeout(()=>{s(null)},t),!0}catch(g){const m=g instanceof Error?g:new Error("Copy failed");return a?.(m),!1}},[t,r,a]),l=x.useCallback(d=>o===d,[o]),c=x.useCallback(()=>{s(null)},[]);return{copiedValue:o,copyToClipboard:i,isCopied:l,resetCopiedState:c}},Io=(e={})=>{const{successDuration:t=2e3,onSuccess:r,onError:a}=e,[o,s]=x.useState({}),i=x.useCallback(async(d,g)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(d);else{const m=document.createElement("textarea");m.value=d,m.style.position="fixed",m.style.left="-999999px",m.style.top="-999999px",document.body.appendChild(m),m.focus(),m.select();const b=document.execCommand("copy");if(document.body.removeChild(m),!b)throw new Error("Copy command was unsuccessful")}return s(m=>({...m,[g]:!0})),r?.(d),setTimeout(()=>{s(m=>({...m,[g]:!1}))},t),!0}catch(m){const b=m instanceof Error?m:new Error("Copy failed");return a?.(b),!1}},[t,r,a]),l=x.useCallback(d=>o[d]||!1,[o]),c=x.useCallback(d=>{s(d?g=>({...g,[d]:!1}):{})},[]);return{copiedStates:o,copyToClipboard:i,isCopied:l,resetCopiedState:c}},$o={pending:{label:"Pending",color:"bg-gray-500",textColor:"text-white"},in_progress:{label:"In Progress",color:"bg-blue-500",textColor:"text-white"},verified:{label:"Verified",color:"bg-green-500",textColor:"text-white"},rejected:{label:"Rejected",color:"bg-red-500",textColor:"text-white"}},Lo={basic:"Basic KYC",enhanced:"Enhanced KYC",accredited:"Accredited Investor"},Mo=({status:e,level:t,className:r=""})=>{const a=$o[e],o=Lo[t];return n.jsx("div",{className:`inline-flex items-center gap-2 ${r}`,children:n.jsxs("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${a.color} ${a.textColor}`,children:[o,": ",a.label]})})},Oo=({accessToken:e,onComplete:t,onError:r,className:a=""})=>{const o=x.useRef(null),s=x.useRef(null);return x.useEffect(()=>{if(!e)return;const i=document.createElement("script");return i.src="https://static.sumsub.com/idensic/static/sns-websdk-builder.js",i.async=!0,i.onload=()=>{if(o.current&&window.snsWebSdk)try{const l=window.snsWebSdk.init(e,()=>e).withConf({lang:"en"}).withOptions({addViewportTag:!1,adaptIframeHeight:!0}).on("idCheck.onStepCompleted",c=>{}).on("idCheck.onApplicantSubmitted",c=>{t?.()}).on("idCheck.onError",c=>{console.error("SumsubWebSDK: Error",c),r?.(c)}).build();s.current=l,l.launch("#sumsub-websdk-container")}catch(l){console.error("Failed to initialize Sumsub SDK:",l),r?.(l)}else console.error("SumsubWebSDK: Missing requirements - containerRef:",!!o.current,"snsWebSdk:",!!window.snsWebSdk)},i.onerror=()=>{const l=new Error("Failed to load Sumsub Web SDK script");console.error(l),r?.(l)},document.body.appendChild(i),()=>{document.body.contains(i)&&document.body.removeChild(i),s.current&&typeof s.current.destroy=="function"&&s.current.destroy()}},[e,t,r]),n.jsx("div",{className:`sumsub-sdk-container ${a}`,children:n.jsx("div",{ref:o,id:"sumsub-websdk-container"})})},zo={basic:{title:"Basic KYC",description:"Age & Identity Verification",color:"border-blue-200",activeColor:"border-blue-500 bg-blue-50"},enhanced:{title:"Enhanced KYC",description:"Basic + Country & Compliance",color:"border-purple-200",activeColor:"border-purple-500 bg-purple-50"},accredited:{title:"Accredited Investor",description:"Enhanced + Financial Verification",color:"border-gold-200",activeColor:"border-gold-500 bg-gold-50"}},Do=({level:e,price:t,features:r,isActive:a=!1,isVerified:o=!1,onSelect:s,className:i=""})=>{const l=zo[e];return n.jsxs("div",{className:`
11
- relative border-2 rounded-lg p-6 transition-all
12
- ${a?l.activeColor:`${l.color} hover:border-gray-400`}
13
- ${i}
14
- `,children:[o&&n.jsx("div",{className:"absolute top-4 right-4",children:n.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"✓ Verified"})}),n.jsx("h3",{className:"text-xl font-bold mb-2",children:l.title}),n.jsx("p",{className:"text-gray-600 mb-4",children:l.description}),n.jsxs("p",{className:"text-3xl font-bold mb-4",children:[t,n.jsx("span",{className:"text-sm font-normal text-gray-600",children:"/year"})]}),n.jsx("ul",{className:"space-y-2 mb-6",children:r.map((c,d)=>n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx("span",{className:"text-green-500 mt-0.5",children:"✓"}),n.jsx("span",{className:"text-sm",children:c})]},d))}),s&&n.jsx("button",{onClick:s,disabled:o,className:`
15
- w-full py-2 px-4 rounded font-medium transition-colors
16
- ${o?"bg-gray-200 text-gray-500 cursor-not-allowed":a?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-200 text-gray-700 hover:bg-gray-300"}
17
- `,children:o?"Verified":a?"Current Plan":"Select Plan"})]})},Bo=(e,t,r)=>e?e.length<=t+r?e:`${e.slice(0,t)}...${e.slice(-r)}`:"",Wo=({address:e,prefixLength:t=6,suffixLength:r=4,className:a="",showCopy:o=!1})=>{const[s,i]=x.useState(!1),[l,c]=x.useState(!1),[d,g]=x.useState({top:0,left:0}),m=x.useRef(null),b=Bo(e,t,r);x.useEffect(()=>{if(s&&m.current){const C=m.current.getBoundingClientRect();g({top:C.top+window.scrollY-48,left:C.left+window.scrollX+C.width/2})}},[s]);const f=async()=>{if(o)try{await navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)}catch(C){console.error("Failed to copy address:",C)}i(!0),setTimeout(()=>i(!1),2e3)},p=()=>{i(!0)},h=()=>{l||i(!1)},w=s&&n.jsxs("div",{className:"fixed z-[9999] px-3 py-2 bg-gray-900 dark:bg-gray-700 text-white text-xs rounded shadow-lg whitespace-nowrap pointer-events-none",style:{top:`${d.top}px`,left:`${d.left}px`,transform:"translateX(-50%)",minWidth:"max-content"},children:[l?n.jsx("span",{className:"text-green-300",children:"✓ Copied!"}):n.jsx("span",{className:"font-mono",children:e}),n.jsx("div",{className:"absolute left-1/2 transform -translate-x-1/2 top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-transparent border-t-gray-900 dark:border-t-gray-700"})]});return n.jsxs(n.Fragment,{children:[n.jsx("code",{ref:m,className:`
18
- font-mono text-sm text-gray-900 dark:text-gray-100
19
- ${o?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":""}
20
- ${a}
21
- `,onClick:f,onMouseEnter:p,onMouseLeave:h,title:e,children:b}),w&&typeof document<"u"&&Qe.createPortal(w,document.body)]})},v={typography:{family:{sans:"font-sans",display:"font-sans",body:"font-sans"},semantic:{caption:"text-xs",small:"text-sm",body:"text-base",bodyLarge:"text-lg",h6:"text-base",h5:"text-lg",h4:"text-xl",h3:"text-2xl",h2:"text-3xl",h1:"text-4xl",hero:"text-8xl"},weight:{semibold:"font-semibold",bold:"font-bold",body:"font-normal",emphasis:"font-medium",strong:"font-semibold",heading:"font-bold",display:"font-extrabold"},decoration:{none:"no-underline",underline:"underline"},underlineOffset:{medium:"underline-offset-2"},leading:{tight:"leading-tight",heading:"leading-tight",body:"leading-relaxed",caption:"leading-normal",display:"leading-none"},tracking:{heading:"tracking-tight",body:"tracking-normal",caption:"tracking-normal",uppercase:"tracking-wider"},transform:{uppercase:"uppercase"}}},T={heading:{display:{hero:()=>`${v.typography.family.display} ${v.typography.semantic.hero} ${v.typography.weight.display} ${v.typography.leading.display} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,xl:()=>`${v.typography.family.display} text-7xl ${v.typography.weight.display} ${v.typography.leading.display} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,lg:()=>`${v.typography.family.display} text-6xl ${v.typography.weight.bold} ${v.typography.leading.display} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,md:()=>`${v.typography.family.display} text-5xl ${v.typography.weight.bold} ${v.typography.leading.tight} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,sm:()=>`${v.typography.family.display} text-4xl ${v.typography.weight.bold} ${v.typography.leading.tight} ${v.typography.tracking.heading} text-gray-900 dark:text-white`},h1:()=>`${v.typography.family.sans} ${v.typography.semantic.h1} ${v.typography.weight.heading} ${v.typography.leading.heading} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${v.typography.family.sans} ${v.typography.semantic.h2} ${v.typography.weight.heading} ${v.typography.leading.heading} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${v.typography.family.sans} ${v.typography.semantic.h3} ${v.typography.weight.heading} ${v.typography.leading.heading} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,h4:()=>`${v.typography.family.sans} ${v.typography.semantic.h4} ${v.typography.weight.semibold} ${v.typography.leading.heading} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,h5:()=>`${v.typography.family.sans} ${v.typography.semantic.h5} ${v.typography.weight.semibold} ${v.typography.leading.heading} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,h6:()=>`${v.typography.family.sans} ${v.typography.semantic.h6} ${v.typography.weight.semibold} ${v.typography.leading.heading} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,responsive:{h1:()=>`${v.typography.family.sans} text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${v.typography.weight.heading} ${v.typography.leading.heading} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${v.typography.family.sans} text-xl sm:text-2xl md:text-3xl lg:text-4xl ${v.typography.weight.heading} ${v.typography.leading.heading} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${v.typography.family.sans} text-lg sm:text-xl md:text-2xl lg:text-3xl ${v.typography.weight.semibold} ${v.typography.leading.heading} ${v.typography.tracking.heading} text-gray-900 dark:text-white`,display:()=>`${v.typography.family.display} text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl ${v.typography.weight.display} ${v.typography.leading.display} ${v.typography.tracking.heading} text-gray-900 dark:text-white`}},body:{xl:()=>`${v.typography.family.body} ${v.typography.semantic.bodyLarge} ${v.typography.weight.body} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-700 dark:text-gray-300`,lg:()=>`${v.typography.family.body} ${v.typography.semantic.body} ${v.typography.weight.body} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-700 dark:text-gray-300`,md:()=>`${v.typography.family.body} ${v.typography.semantic.body} ${v.typography.weight.body} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-700 dark:text-gray-300`,sm:()=>`${v.typography.family.body} ${v.typography.semantic.small} ${v.typography.weight.body} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-600 dark:text-gray-400`,xs:()=>`${v.typography.family.body} ${v.typography.semantic.caption} ${v.typography.weight.body} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-600 dark:text-gray-400`,strong:{xl:()=>`${v.typography.family.body} ${v.typography.semantic.bodyLarge} ${v.typography.weight.strong} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${v.typography.family.body} ${v.typography.semantic.body} ${v.typography.weight.strong} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${v.typography.family.body} ${v.typography.semantic.body} ${v.typography.weight.strong} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${v.typography.family.body} ${v.typography.semantic.small} ${v.typography.weight.strong} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-900 dark:text-white`},emphasis:{xl:()=>`${v.typography.family.body} ${v.typography.semantic.bodyLarge} ${v.typography.weight.emphasis} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${v.typography.family.body} ${v.typography.semantic.body} ${v.typography.weight.emphasis} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${v.typography.family.body} ${v.typography.semantic.body} ${v.typography.weight.emphasis} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${v.typography.family.body} ${v.typography.semantic.small} ${v.typography.weight.emphasis} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-900 dark:text-white`},muted:{xl:()=>`${v.typography.family.body} ${v.typography.semantic.bodyLarge} ${v.typography.weight.body} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-600 dark:text-gray-400`,lg:()=>`${v.typography.family.body} ${v.typography.semantic.body} ${v.typography.weight.body} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-600 dark:text-gray-400`,md:()=>`${v.typography.family.body} ${v.typography.semantic.body} ${v.typography.weight.body} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-600 dark:text-gray-400`,sm:()=>`${v.typography.family.body} ${v.typography.semantic.small} ${v.typography.weight.body} ${v.typography.leading.body} ${v.typography.tracking.body} text-gray-600 dark:text-gray-400`}},caption:{default:()=>`${v.typography.family.body} ${v.typography.semantic.caption} ${v.typography.weight.body} ${v.typography.leading.caption} ${v.typography.tracking.caption} text-gray-500 dark:text-gray-500`,emphasis:()=>`${v.typography.family.body} ${v.typography.semantic.caption} ${v.typography.weight.emphasis} ${v.typography.leading.caption} ${v.typography.tracking.caption} text-gray-600 dark:text-gray-400`,uppercase:()=>`${v.typography.family.body} ${v.typography.semantic.caption} ${v.typography.weight.emphasis} ${v.typography.leading.caption} ${v.typography.tracking.uppercase} ${v.typography.transform.uppercase} text-gray-500 dark:text-gray-500`},link:{default:()=>`${v.typography.decoration.underline} ${v.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,subtle:()=>`${v.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${v.typography.decoration.underline} hover:${v.typography.underlineOffset.medium} transition-all duration-150`,muted:()=>`${v.typography.decoration.underline} ${v.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,external:()=>`${v.typography.decoration.underline} ${v.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150 inline-flex items-center gap-1`},label:{default:()=>`${v.typography.family.body} text-sm ${v.typography.weight.emphasis} text-gray-900 dark:text-white`,required:()=>`${v.typography.family.body} text-sm ${v.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,optional:()=>`${v.typography.family.body} text-sm ${v.typography.weight.body} text-gray-600 dark:text-gray-400`,helper:()=>`${v.typography.family.body} text-sm ${v.typography.weight.body} text-gray-500 dark:text-gray-500`,error:()=>`${v.typography.family.body} text-sm ${v.typography.weight.body} text-red-600 dark:text-red-400`,success:()=>`${v.typography.family.body} text-sm ${v.typography.weight.body} text-green-600 dark:text-green-400`}},$={button:{primary:{default:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",fullWidth:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 flex items-center justify-center w-full rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},secondary:{default:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},outline:{default:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},destructive:{default:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",outline:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8"},ghost:{default:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-2 py-1 text-xs font-medium transition-colors duration-200 h-8",icon:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md p-2 transition-colors duration-200 h-10 w-10"},link:{default:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-blue-600 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline dark:text-blue-400 inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200",muted:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200"},gradient:{primary:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",secondary:()=>"bg-gradient-to-r from-gray-100 to-gray-200 hover:from-gray-200 hover:to-gray-300 text-gray-900 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",success:()=>"bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-green-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200"},web3:{wallet:()=>"bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-900 dark:text-gray-100 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",connect:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",disconnect:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"}},badge:{default:()=>"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",primary:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",success:()=>"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",warning:()=>"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",error:()=>"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",ethereum:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",solana:()=>"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",small:(e="default")=>{const t={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${t[e]||t.default} inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium`},large:(e="default")=>{const t={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${t[e]||t.default} inline-flex items-center px-3 py-1 rounded-full text-sm font-medium`}},input:{default:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",search:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",error:()=>"bg-gray-50 dark:bg-gray-800 border-red-300 dark:border-red-700 text-gray-900 dark:text-gray-100 focus:border-red-500 focus:ring-red-500 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",small:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-2 py-1.5 text-xs placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",large:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-4 py-3 text-base placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",withIcon:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md pl-10 pr-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2"},alert:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded-md border p-4 flex items-start gap-3",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded-md border p-4 flex items-start gap-3",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded-md border p-4 flex items-start gap-3",compact:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded border px-3 py-2 text-sm",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded border px-3 py-2 text-sm",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded border px-3 py-2 text-sm"}},navigation:{tabs:{root:()=>"",list:()=>"inline-flex h-10 items-center justify-center rounded-md bg-gray-100 dark:bg-gray-800 p-1 text-gray-500 dark:text-gray-400",listUnderlined:()=>"flex border-b border-gray-200 dark:border-gray-700",listPills:()=>"flex space-x-1 bg-gray-100 dark:bg-gray-800 rounded-lg p-1",trigger:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-gray-950 data-[state=active]:shadow-sm dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400 dark:data-[state=active]:bg-gray-950 dark:data-[state=active]:text-gray-50",triggerUnderlined:()=>"inline-flex items-center justify-center whitespace-nowrap px-4 py-2 text-sm font-medium text-gray-500 dark:text-gray-400 border-b-2 border-transparent hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-blue-600 focus:border-blue-600 dark:focus:text-blue-400 dark:focus:border-blue-400 data-[state=active]:text-blue-600 data-[state=active]:border-blue-600 dark:data-[state=active]:text-blue-400 dark:data-[state=active]:border-blue-400 transition-colors",triggerPills:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-white dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 data-[state=active]:bg-white data-[state=active]:text-gray-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-700 dark:data-[state=active]:text-gray-100 transition-all",content:()=>"mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400"}},icon:{variant:{default:{xs:()=>"h-3 w-3 text-gray-500 dark:text-gray-400",sm:()=>"h-4 w-4 text-gray-500 dark:text-gray-400",md:()=>"h-5 w-5 text-gray-500 dark:text-gray-400",lg:()=>"h-6 w-6 text-gray-500 dark:text-gray-400",xl:()=>"h-8 w-8 text-gray-500 dark:text-gray-400"},success:{xs:()=>"h-3 w-3 text-green-600 dark:text-green-400",sm:()=>"h-4 w-4 text-green-600 dark:text-green-400",md:()=>"h-5 w-5 text-green-600 dark:text-green-400",lg:()=>"h-6 w-6 text-green-600 dark:text-green-400",xl:()=>"h-8 w-8 text-green-600 dark:text-green-400"},warning:{xs:()=>"h-3 w-3 text-amber-600 dark:text-amber-400",sm:()=>"h-4 w-4 text-amber-600 dark:text-amber-400",md:()=>"h-5 w-5 text-amber-600 dark:text-amber-400",lg:()=>"h-6 w-6 text-amber-600 dark:text-amber-400",xl:()=>"h-8 w-8 text-amber-600 dark:text-amber-400"},error:{xs:()=>"h-3 w-3 text-red-600 dark:text-red-400",sm:()=>"h-4 w-4 text-red-600 dark:text-red-400",md:()=>"h-5 w-5 text-red-600 dark:text-red-400",lg:()=>"h-6 w-6 text-red-600 dark:text-red-400",xl:()=>"h-8 w-8 text-red-600 dark:text-red-400"},muted:{xs:()=>"h-3 w-3 text-gray-400 dark:text-gray-500",sm:()=>"h-4 w-4 text-gray-400 dark:text-gray-500",md:()=>"h-5 w-5 text-gray-400 dark:text-gray-500",lg:()=>"h-6 w-6 text-gray-400 dark:text-gray-500",xl:()=>"h-8 w-8 text-gray-400 dark:text-gray-500"}}},overlays:{modal:{backdrop:()=>"fixed inset-0 z-40 bg-black/50 dark:bg-black/70 backdrop-blur-sm transition-all duration-300 ease-out",backdropEntering:()=>"opacity-0",backdropEntered:()=>"opacity-100",backdropExiting:()=>"opacity-0",container:()=>"fixed inset-0 z-50 flex items-center justify-center p-4 transition-all duration-300 ease-out",containerEntering:()=>"opacity-0 scale-95",containerEntered:()=>"opacity-100 scale-100",containerExiting:()=>"opacity-0 scale-95",content:()=>"relative w-full max-w-lg bg-white dark:bg-gray-900 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 max-h-[80vh] overflow-hidden",small:()=>"max-w-sm",medium:()=>"max-w-lg",large:()=>"max-w-2xl",extraLarge:()=>"max-w-4xl",fullWidth:()=>"max-w-[95vw]",header:()=>"flex items-center justify-between p-4 sm:p-6 border-b border-gray-200 dark:border-gray-700",title:()=>"text-lg font-semibold text-gray-900 dark:text-gray-100",closeButton:()=>"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",body:()=>"p-4 sm:p-6 overflow-y-auto",footer:()=>"flex items-center justify-end space-x-3 p-4 sm:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50"},dropdown:{container:()=>"relative inline-block",trigger:()=>"inline-flex justify-center items-center bg-transparent border-0 text-gray-900 dark:text-gray-100 focus:outline-none transition-colors",triggerBordered:()=>"inline-flex justify-center items-center bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors",menu:()=>"absolute z-50 w-56 bg-white dark:bg-gray-800 rounded-md shadow-lg focus:outline-none transition-all duration-200",menuSmall:()=>"w-40",menuLarge:()=>"w-72",menuAuto:()=>"w-auto min-w-40",menuTop:()=>"bottom-full mb-1",menuBottom:()=>"top-full mt-1",menuLeft:()=>"right-0",menuRight:()=>"left-0",menuEntering:()=>"opacity-0 scale-95 transform origin-top",menuEntered:()=>"opacity-100 scale-100 transform origin-top",menuExiting:()=>"opacity-0 scale-95 transform origin-top",itemContainer:()=>"py-1 px-1",item:()=>"flex items-center w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-blue-50 dark:hover:bg-blue-900/20 hover:text-blue-700 dark:hover:text-blue-300 transition-all duration-200 cursor-pointer hover:shadow-sm rounded-sm",itemActive:()=>"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 shadow-sm",itemDisabled:()=>"text-gray-400 dark:text-gray-600 cursor-not-allowed hover:bg-transparent hover:text-gray-400 dark:hover:text-gray-600",divider:()=>"my-1 border-t border-gray-200 dark:border-gray-700",header:()=>"px-4 py-2 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide",itemIcon:()=>"mr-3 h-4 w-4 flex-shrink-0",itemIconRight:()=>"ml-auto h-4 w-4 flex-shrink-0"}}},jo={success:"bg-green-500",error:"bg-red-500",warning:"bg-orange-500",attention:"bg-amber-500",info:"bg-blue-500",neutral:"bg-gray-500"};function Ne(e){return jo[e]}const Fo={default:"bg-white dark:bg-gray-800",bordered:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",elevated:"bg-white dark:bg-gray-800 shadow-md",info:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 text-green-900 dark:text-green-300",warning:"bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 text-orange-900 dark:text-orange-300",attention:"bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 text-amber-900 dark:text-amber-300",error:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-900 dark:text-red-300"};function _o(e){return Fo[e]}const Ho={default:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},premium:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},primary:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},light:{container:"bg-white/20 border border-white/30 text-white backdrop-blur-sm",icon:"text-white"}};function Uo(e){return Ho[e]}const Vo={section:{gradient:"py-20 bg-gradient-to-r from-purple-50 to-blue-50 dark:from-purple-900 dark:to-blue-900"}},qo=(e,t,r)=>{if(r)return`${r}/address/${e}`;if(!t)return null;if(t<0)return`https://explorer.solana.com/address/${e}${t===-101?"":t===-102?"?cluster=devnet":"?cluster=testnet"}`;const o={1:"https://etherscan.io",11155111:"https://sepolia.etherscan.io",5:"https://goerli.etherscan.io",137:"https://polygonscan.com",80002:"https://amoy.polygonscan.com",42161:"https://arbiscan.io",421614:"https://sepolia.arbiscan.io",10:"https://optimistic.etherscan.io",11155420:"https://sepolia-optimism.etherscan.io",8453:"https://basescan.org",84532:"https://sepolia.basescan.org"}[t];return o?`${o}/address/${e}`:null},Go=(e,t)=>t==="full"?e:t==="medium"?`${e.substring(0,10)}...${e.substring(e.length-8)}`:`${e.substring(0,6)}...${e.substring(e.length-4)}`,Ko=({address:e,chainId:t,explorerUrl:r,label:a,format:o="short",showCopy:s=!0,showExplorer:i=!0,className:l="",textClassName:c=""})=>{const[d,g]=x.useState(!1),m=Go(e,o),b=qo(e,t,r),f=async()=>{try{await navigator.clipboard.writeText(e),g(!0),setTimeout(()=>g(!1),2e3)}catch{}};return n.jsxs("div",{className:y("flex items-center gap-2",l),children:[a&&n.jsxs("span",{className:T.label.default(),children:[a,":"]}),n.jsx("span",{className:y("font-mono text-sm",o==="full"&&"break-all",c),children:m}),n.jsxs("div",{className:"flex items-center gap-1",children:[s&&n.jsx("button",{onClick:f,className:y("p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors","text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"),title:d?"Copied!":"Copy address","aria-label":"Copy address",children:d?n.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):n.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),i&&b&&n.jsx("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:y("p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors","text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400"),title:"View on block explorer","aria-label":"View on block explorer",children:n.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})})]})]})},Yo={info:A.InformationCircleIcon,success:A.CheckCircleIcon,warning:A.ExclamationTriangleIcon,attention:A.BellAlertIcon,error:A.XCircleIcon},Qo=({children:e,className:t})=>n.jsx("div",{className:y("font-medium mb-1",t),children:e}),Xo=({children:e,className:t})=>n.jsx("div",{className:y("text-sm break-words",t),children:e}),Zo=({variant:e="info",title:t,description:r,icon:a,children:o,className:s})=>{const i=Yo[e],l=a||n.jsx(i,{className:"h-5 w-5"}),c=typeof $.alert[e]=="function"?$.alert[e]():"";return n.jsxs("div",{role:"alert",className:y(c,s),children:[l&&n.jsx("div",{className:"flex-shrink-0",children:l}),n.jsxs("div",{className:"flex-1 min-w-0",children:[t&&n.jsx("div",{className:"font-medium mb-1 break-words",children:t}),r&&n.jsx("div",{className:"text-sm break-words",children:r}),o]})]})},Mr=()=>typeof document<"u"&&typeof document.createElement=="function"&&typeof document.getElementById=="function",Jo=e=>{if(typeof document<"u"&&document.getElementById)try{return document.getElementById(e)}catch{}return null},Ro=e=>{if(typeof document<"u"&&document.createElement)try{return document.createElement(e)}catch{}return null},es=e=>{const t=typeof document<"u"?document.head:null;if(t&&e)try{return t.appendChild(e),!0}catch{}return!1},ye=({animation:e="fade-in-up",delay:t=0,duration:r=600,once:a=!0,children:o,className:s="",threshold:i=.1})=>{const[l,c]=x.useState(!1),[d,g]=x.useState(!1),m=x.useRef(null);x.useEffect(()=>{if(!Mr()||typeof IntersectionObserver>"u"){c(!0),a&&g(!0);return}const f=new IntersectionObserver(([h])=>{h.isIntersecting&&(!d||!a)?(c(!0),a&&g(!0)):a||c(!1)},{threshold:i}),p=m.current;return p&&f.observe(p),()=>{p&&f.unobserve(p)}},[i,a,d]);const b=()=>{if(e==="none")return"";const f=`transition-all duration-${r} ease-out`,p=t>0?`delay-${t}`:"",h={"fade-in-up":l?`opacity-100 translate-y-0 ${f} ${p}`:`opacity-0 translate-y-8 ${f} ${p}`,"fade-in-scale":l?`opacity-100 scale-100 ${f} ${p}`:`opacity-0 scale-95 ${f} ${p}`,"fade-in-left":l?`opacity-100 translate-x-0 ${f} ${p}`:`opacity-0 -translate-x-8 ${f} ${p}`,"fade-in-right":l?`opacity-100 translate-x-0 ${f} ${p}`:`opacity-0 translate-x-8 ${f} ${p}`,"slide-in-bottom":l?`translate-y-0 ${f} ${p}`:`translate-y-full ${f} ${p}`,"zoom-in":l?`opacity-100 scale-100 ${f} ${p}`:`opacity-0 scale-50 ${f} ${p}`,float:"animate-float","bounce-slow":"animate-bounce-slow"};return h[e]||h["fade-in-up"]};return x.useEffect(()=>{if(Mr()&&(e==="float"||e==="bounce-slow")){const f="animated-section-keyframes";if(!Jo(f)){const p=Ro("style");p&&(p.id=f,p.textContent=`
22
- @keyframes float {
23
- 0%, 100% { transform: translateY(0px); }
24
- 50% { transform: translateY(-20px); }
25
- }
26
- @keyframes bounce-slow {
27
- 0%, 100% { transform: translateY(0); }
28
- 50% { transform: translateY(-10px); }
29
- }
30
- .animate-float {
31
- animation: float 6s ease-in-out infinite;
32
- }
33
- .animate-bounce-slow {
34
- animation: bounce-slow 4s ease-in-out infinite;
35
- }
36
- `,es(p))}}},[e]),n.jsx("div",{ref:m,className:`${b()} ${s}`,children:o})},ts=({children:e,delay:t=0,className:r=""})=>n.jsx(ye,{animation:"fade-in-up",delay:t,className:r,children:e}),rs=({children:e,delay:t=0,className:r=""})=>n.jsx(ye,{animation:"fade-in-scale",delay:t,className:r,children:e}),as=({children:e,className:t=""})=>n.jsx(ye,{animation:"float",className:t,children:e}),Or=_.cva("min-h-[44px] touch-manipulation",{variants:{variant:{default:"",primary:"",secondary:"",outline:"",ghost:"",destructive:"","destructive-outline":"",success:"",link:"",gradient:"","gradient-secondary":"","gradient-success":"",wallet:"",connect:"",disconnect:""},size:{default:"",sm:"h-8",lg:"h-12",icon:"h-10 w-10 p-0"},animation:{none:"transition-colors duration-200",hover:"transition-all duration-200 hover:scale-105",lift:"transition-all duration-200 hover:scale-105",scale:"transition-transform duration-200 hover:scale-95",glow:"transition-all duration-200 hover:shadow-lg",shimmer:"transition-all duration-200",tap:"transition-transform duration-100 active:scale-95",connect:"transition-all duration-200 hover:scale-105",transaction:"transition-all duration-200 animate-pulse",disconnect:"transition-all duration-200 hover:opacity-80"}},defaultVariants:{variant:"default",size:"default",animation:"hover"}}),de=S.forwardRef(({className:e,variant:t,size:r,animation:a,asChild:o=!1,...s},i)=>{const l=o?St.Slot:"button",c=t||"default",d=r&&r!=="default"&&r!=="icon"?r:void 0,g=f=>f?{sm:"small",lg:"large",default:"default"}[f]||f:"default",b=(()=>{if(c.startsWith("gradient")){const f=c.replace("gradient-","").replace("gradient","primary");return $.button.gradient[f]?.()||$.button.primary.default()}else{if(["wallet","connect","disconnect"].includes(c))return $.button.web3[c]?.()||$.button.primary.default();{const f=g(d);return $.button[c]?.[f]?.()||$.button.primary.default()}}})();return n.jsx(l,{className:y(Or({size:r,animation:a}),b,e),ref:i,...s})});de.displayName="Button";const ns="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border border-blue-200 dark:border-blue-800",os={none:"",sm:"p-3",md:"p-6",lg:"p-8"},It=({variant:e="elevated",padding:t="md",icon:r,onClose:a,className:o,children:s,...i})=>{const c=["info","success","warning","error"].includes(e)&&(r||a),d=e==="callout"?ns:_o(e);return n.jsx("div",{className:y("rounded-lg",d,os[t],o),...i,children:c?n.jsxs("div",{className:"flex items-start gap-3",children:[r&&n.jsx("div",{className:"flex-shrink-0 text-lg",children:r}),n.jsx("div",{className:"flex-1 min-w-0",children:s}),a&&n.jsx("button",{onClick:a,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:n.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):s})},ss=({title:e,description:t,className:r,children:a,...o})=>n.jsxs("div",{className:y("space-y-1.5",r),...o,children:[e&&n.jsx("h3",{className:T.heading.h4(),children:e}),t&&n.jsx("p",{className:T.body.sm(),children:t}),a]}),is=({className:e,children:t,...r})=>n.jsx("div",{className:y("",e),...r,children:t}),ls=({className:e,children:t,...r})=>n.jsx("div",{className:y("flex items-center pt-4",e),...r,children:t}),cs=({title:e,children:t,variant:r="info",size:a="default",className:o})=>{const s={sm:"sm",default:"md",lg:"lg"},i=r==="neutral"?"bordered":r;return n.jsxs(It,{variant:i,padding:s[a],className:o,children:[e&&n.jsx("h3",{className:y("font-semibold mb-2",a==="sm"?"text-base":a==="lg"?"text-xl":"text-lg"),children:e}),t]})},ds=({title:e,icon:t,children:r,variant:a="gradient",size:o="default",centered:s=!1,className:i})=>{const l={sm:"sm",default:"md",lg:"lg"},c=a==="gradient"||a==="neutral"?"callout":a;return n.jsx(It,{variant:c,padding:l[o],className:i,children:n.jsxs("div",{className:y("space-y-4",s&&"text-center"),children:[t&&n.jsx("div",{className:y("font-bold",o==="sm"?"text-2xl":o==="lg"?"text-5xl":"text-4xl",s?"text-center":"text-left"),children:t}),e&&n.jsx("h3",{className:y("font-bold mb-4",o==="sm"?"text-lg":o==="lg"?"text-3xl":"text-2xl"),children:e}),n.jsx("div",{className:y("text-gray-600 dark:text-gray-400",o==="sm"?"text-sm":o==="lg"?"text-lg":"text-base"),children:r})]})})},us=_.cva("grid gap-8",{variants:{layout:{grid:"grid-cols-1 md:grid-cols-2",stacked:"grid-cols-1 space-y-8",cards:"grid-cols-1 md:grid-cols-2 gap-6"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{layout:"grid",spacing:"md"}}),gs=_.cva("rounded-xl p-6 transition-all duration-300",{variants:{variant:{traditional:"bg-red-50 dark:bg-red-900/20 border-2 border-red-100 dark:border-red-800/30 hover:border-red-200 dark:hover:border-red-700/50",web3:"bg-green-50 dark:bg-green-900/20 border-2 border-green-100 dark:border-green-800/30 hover:border-green-200 dark:hover:border-green-700/50",neutral:"bg-gray-50 dark:bg-gray-800/50 border-2 border-gray-100 dark:border-gray-700/30 hover:border-gray-200 dark:hover:border-gray-600/50",elevated:"bg-white dark:bg-gray-800 shadow-lg hover:shadow-xl border border-gray-200 dark:border-gray-700"},animation:{none:"",hover:"hover:transform hover:scale-[1.02]",float:"hover:-translate-y-1"}},defaultVariants:{variant:"traditional",animation:"hover"}}),ms=_.cva("text-lg font-bold mb-4 flex items-center gap-3",{variants:{variant:{traditional:"text-red-600 dark:text-red-400",web3:"text-green-600 dark:text-green-400",neutral:"text-gray-900 dark:text-white",elevated:"text-gray-900 dark:text-white"}},defaultVariants:{variant:"traditional"}}),fs={traditional:"❌",web3:"✅",neutral:"ℹ️",elevated:"⭐"},ps={red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300"},hs=({className:e,layout:t="grid",spacing:r="md",title:a,subtitle:o,traditional:s,web3:i,cardAnimation:l="hover",animate:c=!0,animationDelay:d=0,traditionalIcon:g,web3Icon:m})=>{const b=(p,h)=>{const w=n.jsxs("div",{className:y(gs({variant:p.variant,animation:l})),children:[n.jsxs("div",{className:y(ms({variant:p.variant})),children:[n.jsx("span",{className:"text-2xl",children:p.icon||(h===0?g:m)||fs[p.variant]}),n.jsx("div",{className:"flex-1",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{children:p.title}),p.badge&&n.jsx("span",{className:y("text-xs font-medium px-2 py-1 rounded-full",ps[p.badge.color||"gray"]),children:p.badge.text})]})})]}),n.jsx("ul",{className:"space-y-3",children:p.items.map((C,k)=>n.jsxs("li",{className:y("flex items-start gap-3 text-sm leading-relaxed",C.highlight&&"font-medium"),children:[C.icon&&n.jsx("span",{className:"flex-shrink-0 mt-0.5 text-base",children:C.icon}),n.jsxs("div",{className:"flex-1",children:[n.jsx("span",{className:y(p.variant==="traditional"||p.variant==="web3"?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400"),children:C.text}),C.subtext&&n.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-500 mt-1",children:C.subtext})]})]},k))})]});return c?n.jsx(ye,{animation:"fade-in-up",delay:d+h*200,children:w},p.title):n.jsx("div",{children:w},p.title)},f=n.jsxs("div",{className:y("space-y-8",e),children:[(a||o)&&n.jsxs("div",{className:"text-center space-y-4",children:[a&&n.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-gray-900 dark:text-white",children:a}),o&&n.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-400 max-w-2xl mx-auto",children:o})]}),n.jsxs("div",{className:y(us({layout:t,spacing:r})),children:[b(s,0),b(i,1)]})]});return c?n.jsx(ye,{animation:"fade-in-up",delay:d,children:f}):f},$t=(e,t,r,a)=>({title:e,variant:r,items:t.map(o=>typeof o=="string"?{text:o}:o),...a}),bs=e=>{const t=[{text:"Create account with email/password",icon:"🔑"},{text:"Remember multiple passwords",icon:"🧠"},{text:"Verify email address",icon:"📧"},{text:"Risk of password theft",icon:"⚠️"},{text:"Data stored on company servers",icon:"🏢"},{text:"Account can be locked/suspended",icon:"🔒"}],r=[{text:"Connect your wallet",icon:"🔗"},{text:"No passwords needed",icon:"🚫"},{text:"Instant authentication",icon:"⚡"},{text:"Cryptographically secure",icon:"🔐"},{text:"You own your data",icon:"👑"},{text:"Censorship resistant",icon:"🛡️"}];return{traditional:$t(e?.traditionalTitle||"Traditional Email",e?.traditionalItems||t,"traditional",{badge:{text:e?.traditionalBadge||"Old Way",color:"red"}}),web3:$t(e?.web3Title||"Web3 Email",e?.web3Items||r,"web3",{badge:{text:e?.web3Badge||"New Way",color:"green"}})}},ys=_.cva("mx-auto px-4 sm:px-6",{variants:{size:{sm:"max-w-2xl",md:"max-w-4xl",lg:"max-w-6xl",xl:"max-w-7xl lg:px-8",full:"max-w-full",prose:"max-w-prose"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"xl",spacing:"md",align:"left"}}),xs=({children:e,size:t="xl",spacing:r="md",align:a="left",className:o,as:s="div"})=>x.createElement(s,{className:y(ys({size:t,spacing:r,align:a}),o)},e),vs=({data:e,columns:t,hasActions:r=!1,renderCell:a,renderAction:o,emptyMessage:s="No data available",getRowKey:i=(c,d)=>String(d),className:l=""})=>!e||e.length===0?n.jsx("div",{className:`text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg ${l}`,children:n.jsx("p",{className:`${T.body.sm()} text-gray-500 dark:text-gray-400`,children:s})}):n.jsx("div",{className:`relative ${l}`,children:n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.map((c,d)=>n.jsx("th",{className:`${T.label.default()} text-left py-3 px-4 whitespace-nowrap`,children:c},d)),r&&n.jsx("th",{className:`${T.label.default()} text-right py-3 px-4 sticky right-0 bg-white dark:bg-gray-900 whitespace-nowrap`})]})}),n.jsx("tbody",{children:e.map((c,d)=>n.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.map((g,m)=>{const b=a(c,m);return n.jsx("td",{className:"py-3 px-4",children:typeof b=="string"?n.jsx("span",{className:T.body.sm(),children:b}):b},m)}),r&&n.jsx("td",{className:"py-3 px-4 text-right sticky right-0 bg-white dark:bg-gray-900",children:o?.(c)})]},i(c,d)))})]})})}),ws=({trigger:e,items:t,align:r="right",className:a="",variant:o="default"})=>{const[s,i]=x.useState(!1),l=x.useRef(null);Ir(l,()=>i(!1));const c=m=>{m.disabled||(m.onClick(),i(!1))},d=r==="left"?$.overlays.dropdown.menuRight():$.overlays.dropdown.menuLeft(),g=o==="bordered"?$.overlays.dropdown.triggerBordered():$.overlays.dropdown.trigger();return n.jsxs("div",{className:`${$.overlays.dropdown.container()} ${a}`,ref:l,children:[n.jsx("div",{className:g,onClick:()=>i(!s),children:e}),s&&n.jsx("div",{className:`${$.overlays.dropdown.menu()} ${d} ${$.overlays.dropdown.menuBottom()}`,children:n.jsx("div",{className:$.overlays.dropdown.itemContainer(),children:t.map(m=>m.separator?n.jsx("div",{className:"my-1 h-px bg-gray-200 dark:bg-gray-700",role:"separator"},m.id):n.jsxs("button",{onClick:()=>c(m),disabled:m.disabled,className:`${m.disabled?$.overlays.dropdown.itemDisabled():$.overlays.dropdown.item()} flex items-center gap-2`,children:[m.icon&&n.jsx(m.icon,{className:$.overlays.dropdown.itemIcon()}),n.jsx("span",{children:m.label})]},m.id))})})]})},ks=({icon:e,title:t,description:r,benefits:a,metrics:o,color:s="blue",isHighlight:i=!1,learnMoreUrl:l,cta:c,onClick:d,interactive:g=!1,borderColor:m=!1,className:b})=>{const f={blue:"text-blue-600 dark:text-blue-400",green:"text-green-600 dark:text-green-400",purple:"text-purple-600 dark:text-purple-400",orange:"text-orange-600 dark:text-orange-400",pink:"text-pink-600 dark:text-pink-400",gray:"text-gray-600 dark:text-gray-400",red:"text-red-600 dark:text-red-400",indigo:"text-indigo-600 dark:text-indigo-400",cyan:"text-cyan-600 dark:text-cyan-400",emerald:"text-emerald-600 dark:text-emerald-400"},p={green:"border-l-4 border-green-500",blue:"border-l-4 border-blue-500",purple:"border-l-4 border-purple-500",orange:"border-l-4 border-orange-500",red:"border-l-4 border-red-500",indigo:"border-l-4 border-indigo-500",cyan:"border-l-4 border-cyan-500",emerald:"border-l-4 border-emerald-500",pink:"border-l-4 border-pink-500",gray:"border-l-4 border-gray-500"},h={green:"bg-green-100 dark:bg-green-900/20",blue:"bg-blue-100 dark:bg-blue-900/20",purple:"bg-purple-100 dark:bg-purple-900/20",orange:"bg-orange-100 dark:bg-orange-900/20",red:"bg-red-100 dark:bg-red-900/20",indigo:"bg-indigo-100 dark:bg-indigo-900/20",cyan:"bg-cyan-100 dark:bg-cyan-900/20",emerald:"bg-emerald-100 dark:bg-emerald-900/20",pink:"bg-pink-100 dark:bg-pink-900/20",gray:"bg-gray-100 dark:bg-gray-900/20"},w=f[s],C=typeof e=="string",k=()=>n.jsxs(n.Fragment,{children:[C?n.jsx("div",{className:"text-4xl mb-4",children:e}):m?n.jsx("div",{className:y("w-12 h-12","rounded-lg","flex items-center justify-center","mb-4",h[s],w),children:e}):n.jsx("div",{className:y("flex-shrink-0 mb-4",w),children:e}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:t}),n.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4 leading-relaxed",children:r}),c&&n.jsx("div",{className:"mt-3 mb-4",children:c}),a&&a.length>0&&n.jsx("ul",{className:"space-y-2 mb-4",children:a.map((E,L)=>n.jsxs("li",{className:"flex items-start",children:[n.jsx("div",{className:y("w-2 h-2 rounded-full mt-2 mr-3 flex-shrink-0",`bg-${s}-500`)}),n.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:E})]},L))}),o&&Object.keys(o).length>0&&n.jsx("div",{className:"grid grid-cols-2 gap-4 mt-4",children:Object.entries(o).map(([E,L],I)=>n.jsxs("div",{className:"text-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",children:[n.jsx("div",{className:y("text-lg font-bold",w),children:L}),n.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:E})]},I))})]})]}),N=y("p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-200",m&&p[s],(g||d)&&"cursor-pointer hover:scale-[1.02]",i?"bg-gradient-to-br from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border-blue-200 dark:border-blue-800 border":"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border",b),P=E=>{d&&("key"in E?(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),d()):d())};return l?n.jsx("a",{href:l,className:y(N,"block group"),onClick:d?E=>{E.preventDefault(),P(E)}:void 0,children:n.jsx(k,{})}):d?n.jsx("div",{className:N,onClick:P,onKeyDown:P,role:"button",tabIndex:0,"aria-label":t,children:n.jsx(k,{})}):n.jsx("div",{className:N,children:n.jsx(k,{})})},Cs=_.cva("grid gap-8",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{columns:3,spacing:"md"}}),Ss=_.cva("group transition-all duration-300",{variants:{variant:{default:"text-center",left:"text-left",hoverable:"text-center hover:transform hover:scale-105 cursor-pointer",card:"bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-lg hover:shadow-xl text-center",minimal:"text-center space-y-4"},animation:{none:"",hover:"hover:transform hover:scale-105",float:"hover:-translate-y-2"}},defaultVariants:{variant:"default",animation:"hover"}}),Ns=_.cva("flex items-center justify-center rounded-2xl mb-6 transition-all duration-300",{variants:{size:{sm:"w-16 h-16",md:"w-20 h-20",lg:"w-24 h-24"},style:{gradient:"bg-gradient-to-br from-blue-100 to-blue-200 dark:from-blue-900/30 dark:to-blue-800/30 group-hover:from-blue-200 group-hover:to-blue-300 dark:group-hover:from-blue-800/40 dark:group-hover:to-blue-700/40",solid:"bg-blue-100 dark:bg-blue-900/30 group-hover:bg-blue-200 dark:group-hover:bg-blue-800/40",outline:"border-2 border-blue-200 dark:border-blue-800 group-hover:border-blue-300 dark:group-hover:border-blue-700",colorful:"group-hover:scale-110"},position:{center:"mx-auto",left:"",right:"ml-auto"}},defaultVariants:{size:"md",style:"gradient",position:"center"}}),Es={success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300"},As=({className:e,features:t,columns:r=3,spacing:a="md",cardVariant:o="default",cardAnimation:s="hover",iconSize:i="md",iconStyle:l="gradient",iconPosition:c="center",titleClass:d,descriptionClass:g,animate:m=!0,animationDelay:b=0,staggerDelay:f=100,onFeatureClick:p,defaultLinkText:h="Learn more"})=>{const w=(k,N)=>{if(l==="colorful"&&k.gradient)return{background:`linear-gradient(135deg, ${k.gradient.from}, ${k.gradient.to})`};if(l==="colorful"){const P=[{from:"#3B82F6",to:"#1D4ED8"},{from:"#10B981",to:"#059669"},{from:"#8B5CF6",to:"#7C3AED"},{from:"#F59E0B",to:"#D97706"},{from:"#EF4444",to:"#DC2626"},{from:"#06B6D4",to:"#0891B2"}],E=P[N%P.length];return{background:`linear-gradient(135deg, ${E.from}, ${E.to})`}}},C=(k,N)=>{const P=n.jsxs("div",{className:y(Ss({variant:o,animation:s})),onClick:()=>p?.(k),role:p?"button":void 0,tabIndex:p?0:void 0,children:[k.badge&&n.jsx("div",{className:"mb-4",children:n.jsx("span",{className:y("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",Es[k.badge.variant||"default"]),children:k.badge.text})}),n.jsx("div",{className:y(Ns({size:i,style:l,position:c})),style:w(k,N),children:n.jsx("div",{className:y("flex items-center justify-center",l==="colorful"?"text-white":"text-blue-600 dark:text-blue-400"),children:k.icon})}),n.jsx("h3",{className:y("text-xl font-bold text-gray-900 dark:text-white mb-4",d),children:k.title}),n.jsx("div",{className:y("text-gray-600 dark:text-gray-300 leading-relaxed",g),children:k.description}),k.link&&n.jsx("div",{className:"mt-6",children:n.jsxs("a",{href:k.link.href,className:"inline-flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium transition-colors duration-200",children:[k.link.text||h,n.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})})]});return m?n.jsx(ye,{animation:"fade-in-up",delay:b+N*f,children:P},k.id||N):n.jsx("div",{children:P},k.id||N)};return n.jsx("div",{className:y(Cs({columns:r,spacing:a}),e),children:t.map(C)})},Lt=(e,t,r,a)=>({icon:e,title:t,description:r,...a}),Ps=e=>[Lt(n.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),e?.passwordlessTitle||"Passwordless Security",e?.passwordlessDescription||"Authenticate using your Web3 wallet - no passwords to remember or lose."),Lt(n.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.40A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),e?.encryptionTitle||"End-to-End Encryption",e?.encryptionDescription||"Your emails are encrypted and only you can read them.")],Ts=({badgeIcon:e,badgeText:t,badgeColor:r="blue",title:a,subtitle:o,description:s,primaryButton:i,secondaryButton:l,className:c,children:d})=>{const m={blue:"bg-blue-100 dark:bg-blue-900/30 border-blue-300 dark:border-blue-700 text-blue-800 dark:text-blue-200",green:"bg-green-100 dark:bg-green-900/30 border-green-300 dark:border-green-700 text-green-800 dark:text-green-200",purple:"bg-purple-100 dark:bg-purple-900/30 border-purple-300 dark:border-purple-700 text-purple-800 dark:text-purple-200",orange:"bg-orange-100 dark:bg-orange-900/30 border-orange-300 dark:border-orange-700 text-orange-800 dark:text-orange-200",pink:"bg-pink-100 dark:bg-pink-900/30 border-pink-300 dark:border-pink-700 text-pink-800 dark:text-pink-200",gray:"bg-gray-100 dark:bg-gray-900/30 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-200"}[r];return n.jsx("section",{className:y("py-20",c),children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[n.jsxs("div",{className:y("inline-flex items-center border px-6 py-3 rounded-full mb-6",m),children:[e&&n.jsx("span",{className:"mr-3",children:e}),n.jsx("span",{className:"font-semibold",children:t})]}),n.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 dark:text-gray-100 mb-6",children:[typeof a=="string"?n.jsx("span",{dangerouslySetInnerHTML:{__html:a}}):a,o&&n.jsx("span",{className:"text-blue-600 dark:text-blue-400 block",children:o})]}),n.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-4xl mx-auto leading-relaxed",children:s}),(i||l)&&n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[i&&n.jsx(de,{size:"lg",...i,className:y("px-8 py-3",i.className),children:i.text}),l&&n.jsx(de,{variant:"outline",size:"lg",...l,className:y("px-8 py-3",l.className),children:l.text})]}),d]})})},zr=S.forwardRef(({className:e,type:t,...r},a)=>n.jsx("input",{type:t,className:y($.input.default(),e),ref:a,...r}));zr.displayName="Input";const Is=_.cva(`${T.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),Mt=S.forwardRef(({className:e,...t},r)=>n.jsx(hr.Root,{ref:r,className:y(Is(),e),...t}));Mt.displayName=hr.Root.displayName;const $s=({title:e,description:t,metrics:r,columns:a=3,className:o})=>{const s={blue:"text-blue-600 dark:text-blue-400",green:"text-green-600 dark:text-green-400",purple:"text-purple-600 dark:text-purple-400",orange:"text-orange-600 dark:text-orange-400",pink:"text-pink-600 dark:text-pink-400",gray:"text-gray-600 dark:text-gray-400"},i={2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return n.jsx("section",{className:y("py-16",o),children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(e||t)&&n.jsxs("div",{className:"text-center mb-12",children:[e&&n.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-4",children:e}),t&&n.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t})]}),n.jsx("div",{className:y("grid gap-8",i[a]),children:r.map((l,c)=>{const d=l.color?s[l.color]:s.blue;return n.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 text-center hover:shadow-lg transition-shadow",children:[l.icon&&n.jsx("div",{className:y("flex justify-center mb-4",d),children:l.icon}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("div",{className:y("text-3xl font-bold",d),children:l.value}),n.jsx("div",{className:"text-gray-600 dark:text-gray-400 font-medium",children:l.label}),l.trend&&n.jsxs("div",{className:y("text-sm font-semibold",l.trend.direction==="up"?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[l.trend.direction==="up"?"↑":"↓"," ",l.trend.value]})]})]},c)})})]})})},Ls=({title:e,description:t,steps:r,orientation:a="vertical",color:o="blue",className:s})=>{const l={blue:{bg:"bg-blue-600",text:"text-blue-600 dark:text-blue-400",border:"border-blue-200 dark:border-blue-800"},green:{bg:"bg-green-600",text:"text-green-600 dark:text-green-400",border:"border-green-200 dark:border-green-800"},purple:{bg:"bg-purple-600",text:"text-purple-600 dark:text-purple-400",border:"border-purple-200 dark:border-purple-800"},orange:{bg:"bg-orange-600",text:"text-orange-600 dark:text-orange-400",border:"border-orange-200 dark:border-orange-800"},pink:{bg:"bg-pink-600",text:"text-pink-600 dark:text-pink-400",border:"border-pink-200 dark:border-pink-800"},gray:{bg:"bg-gray-600",text:"text-gray-600 dark:text-gray-400",border:"border-gray-200 dark:border-gray-800"}}[o];return n.jsx("section",{className:y("py-16",s),children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(e||t)&&n.jsxs("div",{className:"text-center mb-12",children:[e&&n.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-4",children:e}),t&&n.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t})]}),n.jsx("div",{className:y(a==="horizontal"?"flex flex-col lg:flex-row justify-center items-center lg:items-start space-y-8 lg:space-y-0 lg:space-x-8":"space-y-8 max-w-4xl mx-auto"),children:r.map((c,d)=>n.jsxs("div",{className:y("relative",a==="horizontal"?"flex-1 text-center lg:text-left":"flex items-start"),children:[n.jsx("div",{className:y("flex-shrink-0 flex items-center justify-center rounded-full text-white font-bold",l.bg,a==="horizontal"?"w-12 h-12 mx-auto lg:mx-0 mb-4":"w-10 h-10 mr-4 mt-1"),children:c.icon?c.icon:c.step}),d<r.length-1&&a==="vertical"&&n.jsx("div",{className:y("absolute left-5 top-12 w-px h-8 -ml-px",l.bg.replace("bg-","bg-").replace("-600","-200"),"dark:"+l.bg.replace("bg-","bg-").replace("-600","-800"))}),n.jsxs("div",{className:y(a==="horizontal"?"flex-1":"flex-1 min-w-0"),children:[n.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:c.title}),n.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-3",children:c.description}),c.details&&c.details.length>0&&n.jsx("ul",{className:"space-y-1",children:c.details.map((g,m)=>n.jsxs("li",{className:"flex items-start",children:[n.jsx("div",{className:y("w-1.5 h-1.5 rounded-full mt-2 mr-2 flex-shrink-0",l.bg)}),n.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:g})]},m))})]})]},d))})]})})},Ms=({children:e,onRefresh:t,disabled:r=!1,refreshingText:a="Refreshing...",pullDownText:o="Pull down to refresh",releaseText:s="Release to refresh",threshold:i=80,maxPullDistance:l=120,className:c=""})=>{const[d,g]=x.useState(0),[m,b]=x.useState(!1),[f,p]=x.useState(!1),h=x.useRef(0),w=x.useRef(null);x.useEffect(()=>{const E=w.current;if(!E)return;const L=D=>{if(r||m)return;E.scrollTop<=0&&(h.current=D.touches[0].clientY,p(!0))},I=D=>{if(!f)return;const B=D.touches[0].clientY-h.current;if(B>0&&E.scrollTop<=0){const U=Math.min(B/l,1),W=Math.min(B*(1-U*.5),l);g(W),B>10&&D.preventDefault()}},z=async()=>{if(f)if(p(!1),d>=i&&!m){b(!0);try{await t()}catch{}finally{b(!1),g(0)}}else g(0)};return E.addEventListener("touchstart",L,{passive:!0}),E.addEventListener("touchmove",I,{passive:!1}),E.addEventListener("touchend",z),()=>{E.removeEventListener("touchstart",L),E.removeEventListener("touchmove",I),E.removeEventListener("touchend",z)}},[r,m,f,d,i,l,t]);const C=Math.min(d/i,1),k=f||m,N=f?d:m?i:0,P=()=>m?a:d>=i?s:o;return n.jsxs("div",{ref:w,className:`relative ${c}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[n.jsx("div",{className:"sticky top-0 left-0 right-0 flex items-center justify-center bg-gradient-to-b from-blue-50/90 to-transparent dark:from-blue-900/20 dark:to-transparent backdrop-blur-sm z-10 transition-all duration-300 ease-out",style:{height:`${N}px`,marginTop:f?0:`-${N}px`,opacity:k?1:0,pointerEvents:"none"},children:n.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[n.jsx(A.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${m?"animate-spin":""}`,style:{transform:`rotate(${C*360}deg)`}}),d>20&&n.jsx("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:P()})]})}),n.jsx("div",{style:{paddingTop:f?`${d}px`:0,transition:f?"none":"padding-top 200ms ease-out"},children:e})]})},Ot=H.Root,Os=H.Group,Dr=H.Value,et=S.forwardRef(({className:e,children:t,...r},a)=>n.jsxs(H.Trigger,{ref:a,className:y("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,n.jsx(H.Icon,{asChild:!0,children:n.jsx(Xe.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));et.displayName=H.Trigger.displayName;const zt=S.forwardRef(({className:e,...t},r)=>n.jsx(H.ScrollUpButton,{ref:r,className:y("flex cursor-default items-center justify-center py-1",e),...t,children:n.jsx(Xe.ChevronUp,{className:"h-4 w-4"})}));zt.displayName=H.ScrollUpButton.displayName;const Dt=S.forwardRef(({className:e,...t},r)=>n.jsx(H.ScrollDownButton,{ref:r,className:y("flex cursor-default items-center justify-center py-1",e),...t,children:n.jsx(Xe.ChevronDown,{className:"h-4 w-4"})}));Dt.displayName=H.ScrollDownButton.displayName;const tt=S.forwardRef(({className:e,children:t,position:r="popper",...a},o)=>n.jsx(H.Portal,{children:n.jsxs(H.Content,{ref:o,className:y($.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden 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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...a,children:[n.jsx(zt,{}),n.jsx(H.Viewport,{className:y($.overlays.dropdown.itemContainer(),r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),n.jsx(Dt,{})]})}));tt.displayName=H.Content.displayName;const Br=S.forwardRef(({className:e,...t},r)=>n.jsx(H.Label,{ref:r,className:y($.overlays.dropdown.header(),"py-1.5",e),...t}));Br.displayName=H.Label.displayName;const rt=S.forwardRef(({className:e,children:t,...r},a)=>n.jsxs(H.Item,{ref:a,className:y($.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[n.jsx(H.ItemText,{children:t}),n.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(H.ItemIndicator,{children:n.jsx(Xe.Check,{className:"h-4 w-4"})})})]}));rt.displayName=H.Item.displayName;const Wr=S.forwardRef(({className:e,...t},r)=>n.jsx(H.Separator,{ref:r,className:y("my-1 h-px bg-gray-200 dark:bg-gray-700",e),...t}));Wr.displayName=H.Separator.displayName;const at=({size:e="default",variant:t="default",className:r,ariaLabel:a="Loading",loadingText:o="Loading..."})=>{const s=()=>{const i={small:"w-4 h-4",default:"w-6 h-6",large:"w-8 h-8",extraLarge:"w-16 h-16 border-4"},l={default:"border-gray-300 border-t-blue-600",white:"border-white/30 border-t-white",success:"border-gray-300 border-t-green-600",warning:"border-gray-300 border-t-orange-600",error:"border-gray-300 border-t-red-600"};return`animate-spin rounded-full border-2 ${i[e]} ${l[t]}`};return n.jsx("div",{className:y(s(),r),role:"status","aria-label":a,children:n.jsx("span",{className:"sr-only",children:o})})},jr=S.forwardRef(({className:e,...t},r)=>n.jsx(Nt.Root,{className:y("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",e),...t,ref:r,children:n.jsx(Nt.Thumb,{className:y("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));jr.displayName=Nt.Root.displayName;const zs=({title:e,onAdd:t,addButtonTooltip:r,loading:a,className:o=""})=>n.jsx("div",{className:`p-4 border-b border-gray-200 dark:border-gray-700 ${o}`,children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e}),n.jsxs("div",{className:"flex items-center space-x-2",children:[a&&n.jsx("div",{className:"w-5 h-5 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}),t&&n.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",title:r,"aria-label":r||"Add",children:n.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})})]})]})}),Ds=({subsections:e,isExpanded:t,selectedSubsection:r,parentSectionId:a,onSubsectionSelect:o})=>{const s=x.useRef(null),[i,l]=x.useState(void 0);return x.useEffect(()=>{if(s.current){const c=s.current.scrollHeight;l(t?c+8:0)}},[t,e]),n.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:i!==void 0?`${i}px`:"auto"},children:n.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:e.map(c=>n.jsx("button",{onClick:()=>o?.(c.id,a),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${r===c.id?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-800 dark:hover:text-gray-200"}`,children:c.title},c.id))})})},Bs=({sections:e,selectedSection:t,selectedSubsection:r,expandedSections:a,onSectionSelect:o,onSubsectionSelect:s,onToggleSection:i,className:l=""})=>n.jsx("nav",{className:`space-y-2 ${l}`,children:e.map(c=>n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{onClick:()=>o(c.id),className:`flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${t===c.id&&!r?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-100"}`,children:c.title}),c.subsections&&c.subsections.length>0&&n.jsx("button",{onClick:()=>i(c.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:n.jsx(A.ChevronRightIcon,{className:`h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${a.includes(c.id)?"rotate-90":"rotate-0"}`})})]}),c.subsections&&n.jsx(Ds,{subsections:c.subsections,isExpanded:a.includes(c.id),selectedSubsection:r,parentSectionId:c.id,onSubsectionSelect:s})]},c.id))}),Ws=e=>{switch(e){case"verified":case"success":return Ne("success");case"connected":case"warning":return Ne("warning");case"disconnected":case"error":return Ne("error");case"pending":return Ne("info");default:return Ne("neutral")}},js=e=>{switch(e){case"sm":return"w-1.5 h-1.5";case"lg":return"w-3 h-3";default:return"w-2 h-2"}},Fs=({status:e,label:t,showDot:r=!0,size:a="md"})=>{const s=t||{verified:"Verified",connected:"Connected",disconnected:"Disconnected",pending:"Pending",error:"Error",success:"Success",warning:"Warning"}[e],l=((g,m)=>{const b={sm:"small",md:"default",lg:"large"},p={verified:"success",success:"success",connected:"warning",warning:"warning",disconnected:"error",error:"error",pending:"primary"}[g]||"default",h=b[m];return h==="default"?$.badge[p]():$.badge[h](p)})(e,a),c=Ws(e),d=js(a);return n.jsxs("span",{className:l,children:[r&&n.jsx("span",{className:`inline-block ${d} rounded-full ${c} mr-1`}),s]})},Fr=({chainType:e,size:t="md"})=>{if(e==="unknown")return null;const r=e==="solana"?"SOL":"ETH",o={sm:"small",md:"default",lg:"large"}[t],s=()=>{const i=e==="solana"?"solana":"ethereum";return o==="default"?$.badge[i]():$.badge[o](i)};return n.jsx("span",{className:s(),children:r})},_s=e=>e?e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`:"",_r=({type:e,addressType:t})=>{if(e==="primary")return n.jsx(Fr,{chainType:t==="solana"?"solana":"evm",size:"sm"});const r=()=>e.toUpperCase(),a=()=>{switch(e){case"ens":return"bg-green-50 text-green-700 border-green-200 dark:bg-green-900/10 dark:text-green-300 dark:border-green-800";case"sns":return"bg-orange-50 text-orange-700 border-orange-200 dark:bg-orange-900/10 dark:text-orange-300 dark:border-orange-800";default:return"bg-gray-50 text-gray-700 border-gray-200 dark:bg-gray-900/10 dark:text-gray-300 dark:border-gray-800"}};return n.jsx("span",{className:y("inline-flex items-center px-2.5 py-0.5 rounded-md text-xs font-medium border",a()),children:r()})},Hs=({domainEmails:e,isExpanded:t,selectedAccount:r,onAccountSelect:a,onAccountSettings:o})=>{const s=x.useRef(null),[i,l]=x.useState(void 0);return x.useEffect(()=>{if(s.current){const c=s.current.scrollHeight;l(t?c+8:0)}},[t,e]),n.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:i!==void 0?`${i}px`:"auto"},children:n.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:e.map(c=>n.jsxs("button",{onClick:()=>a(c.address),className:y("w-full flex items-center justify-between text-left px-3 py-2 rounded-lg transition-colors h-[44px]",T.body.sm(),r===c.address?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-700"),children:[n.jsx("span",{className:"truncate flex-1",children:c.name}),n.jsx(_r,{type:c.type,addressType:c.addressType})]},c.address))})})},Us=({walletGroups:e,selectedAccount:t,expandedWallets:r,onAccountSelect:a,onToggleWallet:o,onAccountSettings:s,className:i=""})=>n.jsx("nav",{className:y("space-y-1",i),children:e.map(l=>n.jsxs("div",{children:[n.jsxs("button",{onClick:()=>a(l.primaryEmail.address),className:y("w-full flex items-center justify-between text-left px-3 py-2 rounded-lg transition-colors h-[44px]",T.body.sm(),t===l.primaryEmail.address&&l.domainEmails.length===0?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-700"),style:l.customColor?{backgroundColor:l.customColor}:void 0,children:[n.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[n.jsx("span",{className:"truncate flex-1",children:_s(l.walletAddress)}),n.jsx(_r,{type:l.primaryEmail.type,addressType:l.addressType})]}),l.domainEmails.length>0&&n.jsx("div",{onClick:c=>{c.stopPropagation(),o(l.walletAddress)},className:"p-1 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors cursor-pointer",role:"button",tabIndex:0,onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),c.stopPropagation(),o(l.walletAddress))},children:n.jsx(A.ChevronRightIcon,{className:y("h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out",r.includes(l.walletAddress)?"rotate-90":"rotate-0")})})]}),l.domainEmails.length>0&&n.jsx(Hs,{domainEmails:l.domainEmails,isExpanded:r.includes(l.walletAddress),selectedAccount:t,onAccountSelect:a,onAccountSettings:s})]},l.walletAddress))}),Vs=e=>{switch(e){case"cog":return A.Cog6ToothIcon;case"arrow-right":return A.ArrowRightIcon;case"shield":return A.ShieldCheckIcon;case"reply":case"chat":return A.ChatBubbleLeftRightIcon;case"filter":return A.FunnelIcon;case"plug":return A.LinkIcon;case"adjustments":return A.AdjustmentsHorizontalIcon;case"currency-dollar":return A.CurrencyDollarIcon;default:return A.Cog6ToothIcon}},qs=({settings:e,selectedSetting:t,onSettingSelect:r,className:a=""})=>n.jsx("nav",{className:y("space-y-1",a),"aria-label":"Settings navigation",children:n.jsx("ul",{className:"space-y-1",role:"list",children:e.map(o=>{const s=Vs(o.icon),i=t===o.id;return n.jsx("li",{children:n.jsx("button",{onClick:()=>r(o.id),className:y("w-full flex items-center text-left px-3 py-2 rounded-lg transition-colors h-[44px]",T.body.sm(),i?"bg-orange-100 dark:bg-orange-900/30 text-orange-700 dark:text-orange-300":"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300"),"aria-current":i?"page":void 0,title:o.description,children:n.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[n.jsx(s,{className:"h-5 w-5 mr-3 flex-shrink-0","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:o.title})]})})},o.id)})})}),Gs=pe.Root,Hr=S.forwardRef(({className:e,...t},r)=>n.jsx(pe.List,{ref:r,className:y($.navigation.tabs.list(),e),...t}));Hr.displayName=pe.List.displayName;const Ur=S.forwardRef(({className:e,...t},r)=>n.jsx(pe.Trigger,{ref:r,className:y($.navigation.tabs.trigger(),e),...t}));Ur.displayName=pe.Trigger.displayName;const Vr=S.forwardRef(({className:e,...t},r)=>n.jsx(pe.Content,{ref:r,className:y($.navigation.tabs.content(),e),...t}));Vr.displayName=pe.Content.displayName;const Ks=({title:e,description:t,useCases:r,columns:a=3,className:o})=>{const s={blue:"text-blue-600 dark:text-blue-400",green:"text-green-600 dark:text-green-400",purple:"text-purple-600 dark:text-purple-400",orange:"text-orange-600 dark:text-orange-400",pink:"text-pink-600 dark:text-pink-400",gray:"text-gray-600 dark:text-gray-400"},i={2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return n.jsx("section",{className:y(Vo.section.gradient,o),children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(e||t)&&n.jsxs("div",{className:"text-center mb-12",children:[e&&n.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-4",children:e}),t&&n.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t})]}),n.jsx("div",{className:y("grid gap-8",i[a]),children:r.map((l,c)=>{const d=l.color?s[l.color]:s.blue;return n.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 hover:shadow-lg transition-shadow",children:[n.jsx("div",{className:y("flex-shrink-0 mb-4",d),children:l.icon}),n.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:l.title}),n.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4",children:l.description}),l.examples&&l.examples.length>0&&n.jsxs("div",{children:[n.jsx("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:"Examples:"}),n.jsx("ul",{className:"space-y-1",children:l.examples.map((g,m)=>n.jsxs("li",{className:"flex items-start",children:[n.jsx("div",{className:y("w-1.5 h-1.5 rounded-full mt-2 mr-2 flex-shrink-0",l.color?`bg-${l.color}-500`:"bg-blue-500")}),n.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:g})]},m))})]})]},c)})})]})})},Ys={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},Qs={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},Xs={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},Zs={wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},Js={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},Rs=({children:e,direction:t="row",align:r="start",justify:a="start",wrap:o="nowrap",gap:s="0",className:i})=>n.jsx("div",{className:y("flex",Ys[t],Qs[r],Xs[a],Zs[o],Js[s],i),children:e}),ei=_.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),ti=({children:e,background:t="default",overflow:r="visible",className:a})=>n.jsx("div",{className:y(ei({background:t,overflow:r}),a),children:e}),ri=_.cva("",{variants:{variant:{default:"",hero:"relative overflow-hidden",feature:"bg-white dark:bg-gray-800",cta:"relative overflow-hidden",testimonial:"bg-gray-50 dark:bg-gray-900",footer:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16","4xl":"py-20","5xl":"py-24"},background:{none:"bg-transparent",default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50","gradient-primary":"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50","gradient-secondary":"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50","gradient-tertiary":"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900","gradient-vibrant":"bg-gradient-to-br from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}}),ai=({children:e,variant:t="default",spacing:r="3xl",background:a="none",className:o,as:s="section",id:i})=>x.createElement(s,{id:i,className:y(ri({variant:t,spacing:r,background:a}),o)},e),qr=({icon:e,title:t="No data",description:r,action:a,className:o})=>n.jsxs("div",{className:y("flex flex-col items-center justify-center py-12 px-4 text-center",o),children:[e&&n.jsx("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:e}),n.jsx("h3",{className:y(T.heading.h3(),"mb-2"),children:t}),r&&n.jsx("p",{className:y(T.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:r}),a&&n.jsx("div",{className:"mt-4",children:a})]}),ni=({message:e="Loading...",size:t="default",fullScreen:r=!1,variant:a="default",className:o})=>{const i={small:{spinner:"small",text:"text-sm"},default:{spinner:"default",text:"text-base"},large:{spinner:"large",text:"text-lg"}}[t],l=r?"fixed inset-0 z-50 flex items-center justify-center bg-white/80 dark:bg-gray-900/80":"flex flex-col items-center justify-center p-8",c=n.jsxs("div",{className:y(l,o),children:[n.jsx(at,{size:i.spinner,variant:a,className:"mb-4"}),e&&n.jsx("p",{className:y(i.text,"text-gray-600 dark:text-gray-400 text-center max-w-sm"),children:e})]});return r?n.jsx("div",{className:"fixed inset-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm",children:n.jsxs("div",{className:"flex items-center justify-center min-h-full p-4",children:[n.jsx(at,{size:i.spinner,variant:a,className:"mb-4"}),e&&n.jsx("p",{className:"text-center text-gray-600 dark:text-gray-400 max-w-sm",children:e})]})}):c},oi=({title:e,subtext:t,className:r})=>n.jsx(qr,{title:e,description:t,className:r}),Bt=({label:e,value:t,onChange:r,placeholder:a,required:o=!1,error:s,className:i=""})=>n.jsxs("div",{className:i,children:[n.jsxs(Mt,{htmlFor:e.toLowerCase(),className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[e," ",o&&n.jsx("span",{className:"text-red-500",children:"*"})]}),n.jsx("input",{id:e.toLowerCase(),type:"email",value:t,onChange:l=>r(l.target.value),placeholder:a,className:`
1
+ (function(d,ce){typeof exports=="object"&&typeof module<"u"?ce(exports,require("clsx"),require("tailwind-merge"),require("react/jsx-runtime"),require("react"),require("class-variance-authority"),require("react-dom"),require("@heroicons/react/24/outline"),require("@heroicons/react/24/solid"),require("@radix-ui/react-label"),require("@radix-ui/react-switch"),require("@radix-ui/react-select"),require("lucide-react"),require("@radix-ui/react-slot"),require("react-router-dom"),require("@radix-ui/react-tabs"),require("react-i18next"),require("react-helmet-async"),require("web-vitals")):typeof define=="function"&&define.amd?define(["exports","clsx","tailwind-merge","react/jsx-runtime","react","class-variance-authority","react-dom","@heroicons/react/24/outline","@heroicons/react/24/solid","@radix-ui/react-label","@radix-ui/react-switch","@radix-ui/react-select","lucide-react","@radix-ui/react-slot","react-router-dom","@radix-ui/react-tabs","react-i18next","react-helmet-async","web-vitals"],ce):(d=typeof globalThis<"u"?globalThis:d||self,ce(d.MailBoxComponents={},d.clsx,d.tailwindMerge,d.ReactJSXRuntime,d.React,d.cva,d.ReactDOM,d.HeroiconsOutline,d.HeroiconsSolid,d.RadixLabel,d.RadixSwitch,d.RadixSelect,d.LucideReact,d.RadixSlot,d.ReactRouterDOM,d.RadixTabs,d.ReactI18next,d.ReactHelmetAsync,d.WebVitals))})(this,(function(d,ce,ft,r,y,V,gr,U,R,xe,oe,pt,X,yt,Ue,H,ur,mt,ge){"use strict";function hr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const O=hr(y),B=hr(pt);function u(...t){return ft.twMerge(ce.clsx(t))}const br=({children:t,as:e="div",p:a,px:o,py:n,m:s,mx:l,my:g,bg:c,border:i=!1,rounded:h,shadow:b,w:x,h:m,className:f})=>{const p={none:"0",xs:"1",sm:"2",md:"4",lg:"6",xl:"8","2xl":"12",auto:"auto"},C=c?{transparent:"bg-transparent",white:"bg-white dark:bg-gray-900",gray:"bg-gray-100 dark:bg-gray-800",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"}[c]:"",S=h?{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}[h]:"",k=b?{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}[b]:"",N=x?{auto:"w-auto",full:"w-full",screen:"w-screen",min:"w-min",max:"w-max"}[x]:"",v=m?{auto:"h-auto",full:"h-full",screen:"h-screen",min:"h-min",max:"h-max"}[m]:"",w=[];a&&w.push("p-"+p[a]),o&&w.push("px-"+p[o]),n&&w.push("py-"+p[n]);const L=[];return s&&L.push("m-"+p[s]),l&&L.push("mx-"+p[l]),g&&L.push("my-"+p[g]),r.jsx(e,{className:u(...w,...L,C,i&&"border border-gray-200 dark:border-gray-700",S,k,N,v,f),children:t})},vt=({direction:t="row",align:e,justify:a,wrap:o="nowrap",gap:n,inline:s=!1,className:l,...g})=>{const c={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},i=e?{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"}[e]:"",h=a?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[a]:"",b={nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},x=n?{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}[n]:"";return r.jsx(br,{...g,className:u(s?"inline-flex":"flex",c[t],i,h,b[o],x,l)})},xt={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},kt={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},wt={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},Ct={wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},Nt={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},St=({children:t,direction:e="row",align:a="start",justify:o="start",wrap:n="nowrap",gap:s="0",className:l})=>r.jsx("div",{className:u("flex",xt[e],kt[a],wt[o],Ct[n],Nt[s],l),children:t}),Et=({children:t,size:e="xl",center:a=!0,padding:o="md",className:n})=>{const s={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},l={none:"",sm:"px-4 py-2",md:"px-6 py-4",lg:"px-8 py-6"};return r.jsx("div",{className:u("w-full",s[e],a&&"mx-auto",l[o],n),children:t})},Lt=({children:t,cols:e=1,gap:a="md",autoFit:o,autoFill:n,alignItems:s="stretch",justifyItems:l="stretch",className:g})=>{const c={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},i={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},h={start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},b=()=>{if(o||n)return"";if(typeof e=="number")return{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"}[e]||"grid-cols-1";const m=[];return e.sm&&m.push("grid-cols-"+e.sm),e.md&&m.push("md:grid-cols-"+e.md),e.lg&&m.push("lg:grid-cols-"+e.lg),e.xl&&m.push("xl:grid-cols-"+e.xl),m.join(" ")};let x;return o?x="repeat(auto-fit, minmax("+o+", 1fr))":n&&(x="repeat(auto-fill, minmax("+n+", 1fr))"),r.jsx("div",{className:u("grid",b(),c[a],i[s],h[l],g),style:x?{gridTemplateColumns:x}:void 0,children:t})},Te=({children:t,direction:e="vertical",spacing:a="md",align:o="stretch",justify:n="start",wrap:s=!1,full:l=!1,divider:g=!1,className:c})=>{const i=e==="vertical",h={vertical:{none:"",xs:"space-y-1",sm:"space-y-2",md:"space-y-4",lg:"space-y-6",xl:"space-y-8","2xl":"space-y-12"},horizontal:{none:"",xs:"space-x-1",sm:"space-x-2",md:"space-x-4",lg:"space-x-6",xl:"space-x-8","2xl":"space-x-12"}},b={vertical:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},horizontal:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}},x={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return r.jsx("div",{className:u("flex",i?"flex-col":"flex-row",g?b[e][a]:h[e][a],x[o],m[n],s&&"flex-wrap",l&&(i?"h-full":"w-full"),c),children:g?y.Children.map(t,(f,p)=>r.jsxs(y.Fragment,{children:[f,p<y.Children.count(t)-1&&r.jsx("div",{className:u("bg-gray-200 dark:bg-gray-700",i?"h-px w-full":"w-px h-full")})]},p)):t})},It=t=>r.jsx(Te,{direction:"vertical",...t}),Mt=t=>r.jsx(Te,{direction:"horizontal",...t}),$t=({children:t,axis:e="both",inline:a=!1,className:o})=>{const n=()=>{switch(e){case"horizontal":return"justify-center";case"vertical":return"items-center";case"both":default:return"justify-center items-center"}};return r.jsx("div",{className:u(a?"inline-flex":"flex",n(),o),children:t})},Ut=({size:t="md",axis:e="vertical",flex:a=!1,className:o})=>{const n={vertical:{xs:"h-1",sm:"h-2",md:"h-4",lg:"h-6",xl:"h-8","2xl":"h-12"},horizontal:{xs:"w-1",sm:"w-2",md:"w-4",lg:"w-6",xl:"w-8","2xl":"w-12"}},s=typeof t=="number"?e==="vertical"?{height:`${t}px`}:{width:`${t}px`}:void 0,l=typeof t=="string"?n[e][t]:"";return r.jsx("div",{className:u(a&&"flex-1",!a&&l,o),style:s,"aria-hidden":"true"})},Tt=V.cva("",{variants:{variant:{default:"",hero:"relative overflow-hidden",feature:"bg-white dark:bg-gray-800",cta:"relative overflow-hidden",testimonial:"bg-gray-50 dark:bg-gray-900",footer:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16","4xl":"py-20","5xl":"py-24"},background:{none:"bg-transparent",default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50","gradient-primary":"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50","gradient-secondary":"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50","gradient-tertiary":"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900","gradient-vibrant":"bg-gradient-to-br from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}}),At=({children:t,variant:e="default",spacing:a="3xl",background:o="none",className:n,as:s="section",id:l})=>y.createElement(s,{id:l,className:u(Tt({variant:e,spacing:a,background:o}),n)},t),Pt=V.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),zt=({children:t,background:e="default",overflow:a="visible",className:o})=>r.jsx("div",{className:u(Pt({background:e,overflow:a}),o),children:t}),Dt=({children:t,ratio:e="16/9",className:a})=>{const s=`${1/(typeof e=="string"?{"16/9":1.7777777777777777,"4/3":1.3333333333333333,"1/1":1,"21/9":2.3333333333333335,"3/2":1.5}[e]:e)*100}%`;return r.jsx("div",{className:u("relative w-full",a),style:{paddingBottom:s},children:r.jsx("div",{className:"absolute inset-0",children:t})})},E={typography:{family:{sans:"font-sans",display:"font-sans",body:"font-sans"},semantic:{caption:"text-xs",small:"text-sm",body:"text-base",bodyLarge:"text-lg",h6:"text-base",h5:"text-lg",h4:"text-xl",h3:"text-2xl",h2:"text-3xl",h1:"text-4xl",hero:"text-8xl"},weight:{semibold:"font-semibold",bold:"font-bold",body:"font-normal",emphasis:"font-medium",strong:"font-semibold",heading:"font-bold",display:"font-extrabold"},decoration:{none:"no-underline",underline:"underline"},underlineOffset:{medium:"underline-offset-2"},leading:{tight:"leading-tight",heading:"leading-tight",body:"leading-relaxed",caption:"leading-normal",display:"leading-none"},tracking:{heading:"tracking-tight",body:"tracking-normal",caption:"tracking-normal",uppercase:"tracking-wider"},transform:{uppercase:"uppercase"}}},T={heading:{display:{hero:()=>`${E.typography.family.display} ${E.typography.semantic.hero} ${E.typography.weight.display} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,xl:()=>`${E.typography.family.display} text-7xl ${E.typography.weight.display} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,lg:()=>`${E.typography.family.display} text-6xl ${E.typography.weight.bold} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,md:()=>`${E.typography.family.display} text-5xl ${E.typography.weight.bold} ${E.typography.leading.tight} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,sm:()=>`${E.typography.family.display} text-4xl ${E.typography.weight.bold} ${E.typography.leading.tight} ${E.typography.tracking.heading} text-gray-900 dark:text-white`},h1:()=>`${E.typography.family.sans} ${E.typography.semantic.h1} ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${E.typography.family.sans} ${E.typography.semantic.h2} ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${E.typography.family.sans} ${E.typography.semantic.h3} ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h4:()=>`${E.typography.family.sans} ${E.typography.semantic.h4} ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h5:()=>`${E.typography.family.sans} ${E.typography.semantic.h5} ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h6:()=>`${E.typography.family.sans} ${E.typography.semantic.h6} ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,responsive:{h1:()=>`${E.typography.family.sans} text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${E.typography.family.sans} text-xl sm:text-2xl md:text-3xl lg:text-4xl ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${E.typography.family.sans} text-lg sm:text-xl md:text-2xl lg:text-3xl ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,display:()=>`${E.typography.family.display} text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl ${E.typography.weight.display} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`}},body:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-700 dark:text-gray-300`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-700 dark:text-gray-300`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-700 dark:text-gray-300`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,xs:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,strong:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`},emphasis:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`},muted:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`}},caption:{default:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.body} ${E.typography.leading.caption} ${E.typography.tracking.caption} text-gray-500 dark:text-gray-500`,emphasis:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.emphasis} ${E.typography.leading.caption} ${E.typography.tracking.caption} text-gray-600 dark:text-gray-400`,uppercase:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.emphasis} ${E.typography.leading.caption} ${E.typography.tracking.uppercase} ${E.typography.transform.uppercase} text-gray-500 dark:text-gray-500`},link:{default:()=>`${E.typography.decoration.underline} ${E.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,subtle:()=>`${E.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${E.typography.decoration.underline} hover:${E.typography.underlineOffset.medium} transition-all duration-150`,muted:()=>`${E.typography.decoration.underline} ${E.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,external:()=>`${E.typography.decoration.underline} ${E.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150 inline-flex items-center gap-1`},label:{default:()=>`${E.typography.family.body} text-sm ${E.typography.weight.emphasis} text-gray-900 dark:text-white`,required:()=>`${E.typography.family.body} text-sm ${E.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,optional:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-gray-600 dark:text-gray-400`,helper:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-gray-500 dark:text-gray-500`,error:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-red-600 dark:text-red-400`,success:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-green-600 dark:text-green-400`}},D={button:{primary:{default:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",fullWidth:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 flex items-center justify-center w-full rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},secondary:{default:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},outline:{default:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},destructive:{default:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",outline:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8"},ghost:{default:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-2 py-1 text-xs font-medium transition-colors duration-200 h-8",icon:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md p-2 transition-colors duration-200 h-10 w-10"},link:{default:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-blue-600 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline dark:text-blue-400 inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200",muted:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200"},gradient:{primary:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",secondary:()=>"bg-gradient-to-r from-gray-100 to-gray-200 hover:from-gray-200 hover:to-gray-300 text-gray-900 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",success:()=>"bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-green-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200"},web3:{wallet:()=>"bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-900 dark:text-gray-100 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",connect:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",disconnect:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"}},badge:{default:()=>"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",primary:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",success:()=>"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",warning:()=>"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",error:()=>"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",ethereum:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",solana:()=>"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",small:(t="default")=>{const e={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${e[t]||e.default} inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium`},large:(t="default")=>{const e={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${e[t]||e.default} inline-flex items-center px-3 py-1 rounded-full text-sm font-medium`}},input:{default:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",search:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",error:()=>"bg-gray-50 dark:bg-gray-800 border-red-300 dark:border-red-700 text-gray-900 dark:text-gray-100 focus:border-red-500 focus:ring-red-500 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",small:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-2 py-1.5 text-xs placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",large:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-4 py-3 text-base placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",withIcon:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md pl-10 pr-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2"},alert:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded-md border p-4 flex items-start gap-3",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded-md border p-4 flex items-start gap-3",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded-md border p-4 flex items-start gap-3",compact:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded border px-3 py-2 text-sm",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded border px-3 py-2 text-sm",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded border px-3 py-2 text-sm"}},navigation:{tabs:{root:()=>"",list:()=>"inline-flex h-10 items-center justify-center rounded-md bg-gray-100 dark:bg-gray-800 p-1 text-gray-500 dark:text-gray-400",listUnderlined:()=>"flex border-b border-gray-200 dark:border-gray-700",listPills:()=>"flex space-x-1 bg-gray-100 dark:bg-gray-800 rounded-lg p-1",trigger:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-gray-950 data-[state=active]:shadow-sm dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400 dark:data-[state=active]:bg-gray-950 dark:data-[state=active]:text-gray-50",triggerUnderlined:()=>"inline-flex items-center justify-center whitespace-nowrap px-4 py-2 text-sm font-medium text-gray-500 dark:text-gray-400 border-b-2 border-transparent hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-blue-600 focus:border-blue-600 dark:focus:text-blue-400 dark:focus:border-blue-400 data-[state=active]:text-blue-600 data-[state=active]:border-blue-600 dark:data-[state=active]:text-blue-400 dark:data-[state=active]:border-blue-400 transition-colors",triggerPills:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-white dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 data-[state=active]:bg-white data-[state=active]:text-gray-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-700 dark:data-[state=active]:text-gray-100 transition-all",content:()=>"mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400"}},icon:{variant:{default:{xs:()=>"h-3 w-3 text-gray-500 dark:text-gray-400",sm:()=>"h-4 w-4 text-gray-500 dark:text-gray-400",md:()=>"h-5 w-5 text-gray-500 dark:text-gray-400",lg:()=>"h-6 w-6 text-gray-500 dark:text-gray-400",xl:()=>"h-8 w-8 text-gray-500 dark:text-gray-400"},success:{xs:()=>"h-3 w-3 text-green-600 dark:text-green-400",sm:()=>"h-4 w-4 text-green-600 dark:text-green-400",md:()=>"h-5 w-5 text-green-600 dark:text-green-400",lg:()=>"h-6 w-6 text-green-600 dark:text-green-400",xl:()=>"h-8 w-8 text-green-600 dark:text-green-400"},warning:{xs:()=>"h-3 w-3 text-amber-600 dark:text-amber-400",sm:()=>"h-4 w-4 text-amber-600 dark:text-amber-400",md:()=>"h-5 w-5 text-amber-600 dark:text-amber-400",lg:()=>"h-6 w-6 text-amber-600 dark:text-amber-400",xl:()=>"h-8 w-8 text-amber-600 dark:text-amber-400"},error:{xs:()=>"h-3 w-3 text-red-600 dark:text-red-400",sm:()=>"h-4 w-4 text-red-600 dark:text-red-400",md:()=>"h-5 w-5 text-red-600 dark:text-red-400",lg:()=>"h-6 w-6 text-red-600 dark:text-red-400",xl:()=>"h-8 w-8 text-red-600 dark:text-red-400"},muted:{xs:()=>"h-3 w-3 text-gray-400 dark:text-gray-500",sm:()=>"h-4 w-4 text-gray-400 dark:text-gray-500",md:()=>"h-5 w-5 text-gray-400 dark:text-gray-500",lg:()=>"h-6 w-6 text-gray-400 dark:text-gray-500",xl:()=>"h-8 w-8 text-gray-400 dark:text-gray-500"}}},overlays:{modal:{backdrop:()=>"fixed inset-0 z-40 bg-black/50 dark:bg-black/70 backdrop-blur-sm transition-all duration-300 ease-out",backdropEntering:()=>"opacity-0",backdropEntered:()=>"opacity-100",backdropExiting:()=>"opacity-0",container:()=>"fixed inset-0 z-50 flex items-center justify-center p-4 transition-all duration-300 ease-out",containerEntering:()=>"opacity-0 scale-95",containerEntered:()=>"opacity-100 scale-100",containerExiting:()=>"opacity-0 scale-95",content:()=>"relative w-full max-w-lg bg-white dark:bg-gray-900 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 max-h-[80vh] overflow-hidden",small:()=>"max-w-sm",medium:()=>"max-w-lg",large:()=>"max-w-2xl",extraLarge:()=>"max-w-4xl",fullWidth:()=>"max-w-[95vw]",header:()=>"flex items-center justify-between p-4 sm:p-6 border-b border-gray-200 dark:border-gray-700",title:()=>"text-lg font-semibold text-gray-900 dark:text-gray-100",closeButton:()=>"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",body:()=>"p-4 sm:p-6 overflow-y-auto",footer:()=>"flex items-center justify-end space-x-3 p-4 sm:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50"},dropdown:{container:()=>"relative inline-block",trigger:()=>"inline-flex justify-center items-center bg-transparent border-0 text-gray-900 dark:text-gray-100 focus:outline-none transition-colors",triggerBordered:()=>"inline-flex justify-center items-center bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors",menu:()=>"absolute z-50 w-56 bg-white dark:bg-gray-800 rounded-md shadow-lg focus:outline-none transition-all duration-200",menuSmall:()=>"w-40",menuLarge:()=>"w-72",menuAuto:()=>"w-auto min-w-40",menuTop:()=>"bottom-full mb-1",menuBottom:()=>"top-full mt-1",menuLeft:()=>"right-0",menuRight:()=>"left-0",menuEntering:()=>"opacity-0 scale-95 transform origin-top",menuEntered:()=>"opacity-100 scale-100 transform origin-top",menuExiting:()=>"opacity-0 scale-95 transform origin-top",itemContainer:()=>"py-1 px-1",item:()=>"flex items-center w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-blue-50 dark:hover:bg-blue-900/20 hover:text-blue-700 dark:hover:text-blue-300 transition-all duration-200 cursor-pointer hover:shadow-sm rounded-sm",itemActive:()=>"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 shadow-sm",itemDisabled:()=>"text-gray-400 dark:text-gray-600 cursor-not-allowed hover:bg-transparent hover:text-gray-400 dark:hover:text-gray-600",divider:()=>"my-1 border-t border-gray-200 dark:border-gray-700",header:()=>"px-4 py-2 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide",itemIcon:()=>"mr-3 h-4 w-4 flex-shrink-0",itemIconRight:()=>"ml-auto h-4 w-4 flex-shrink-0"}}},jt={success:"bg-green-500",error:"bg-red-500",warning:"bg-orange-500",attention:"bg-amber-500",info:"bg-blue-500",neutral:"bg-gray-500"};function ne(t){return jt[t]}const Bt={default:"bg-white dark:bg-gray-800",bordered:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",elevated:"bg-white dark:bg-gray-800 shadow-md",info:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 text-green-900 dark:text-green-300",warning:"bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 text-orange-900 dark:text-orange-300",attention:"bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 text-amber-900 dark:text-amber-300",error:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-900 dark:text-red-300"};function Wt(t){return Bt[t]}const Ot=({label:t,labelPosition:e="center",orientation:a="horizontal",spacing:o="md",thickness:n="thin",variant:s="light",className:l,lineClassName:g})=>{const c={horizontal:{none:"my-0",sm:"my-2",md:"my-4",lg:"my-6",xl:"my-8"},vertical:{none:"mx-0",sm:"mx-2",md:"mx-4",lg:"mx-6",xl:"mx-8"}},i={horizontal:{thin:"border-t",medium:"border-t-2",thick:"border-t-4"},vertical:{thin:"border-l",medium:"border-l-2",thick:"border-l-4"}},h={light:"border-gray-200 dark:border-gray-700",medium:"border-gray-300 dark:border-gray-600",dark:"border-gray-400 dark:border-gray-500"};if(a==="vertical")return r.jsx("div",{className:u("self-stretch",i.vertical[n],h[s],c.vertical[o],l),role:"separator","aria-orientation":"vertical"});if(!t)return r.jsx("hr",{className:u(i.horizontal[n],h[s],c.horizontal[o],g,l),role:"separator","aria-orientation":"horizontal"});const b={left:"justify-start",center:"justify-center",right:"justify-end"};return r.jsxs("div",{className:u("flex items-center",c.horizontal[o],b[e],l),role:"separator","aria-orientation":"horizontal",children:[e!=="left"&&r.jsx("div",{className:u("flex-1",i.horizontal[n],h[s],g)}),r.jsx("span",{className:u(T.body.sm(),"px-3 text-gray-500 dark:text-gray-400 whitespace-nowrap"),children:t}),e!=="right"&&r.jsx("div",{className:u("flex-1",i.horizontal[n],h[s],g)})]})},Ft=({orientation:t="horizontal",spacing:e="md",thickness:a="thin",className:o})=>{const n={horizontal:{none:"",sm:"my-1",md:"my-2",lg:"my-4"},vertical:{none:"",sm:"mx-1",md:"mx-2",lg:"mx-4"}},s={horizontal:{thin:"h-px",medium:"h-0.5",thick:"h-1"},vertical:{thin:"w-px",medium:"w-0.5",thick:"w-1"}},l=t==="horizontal";return r.jsx("div",{role:"separator","aria-orientation":t,className:u("bg-gray-200 dark:bg-gray-700",l?"w-full":"h-full",s[t][a],n[t][e],o)})},Vt=({children:t,variant:e="blue",position:a="left",width:o="thick",padding:n="md",className:s})=>{const l={blue:"border-blue-500 dark:border-blue-400",green:"border-green-500 dark:border-green-400",purple:"border-purple-500 dark:border-purple-400",indigo:"border-indigo-500 dark:border-indigo-400",emerald:"border-emerald-500 dark:border-emerald-400",orange:"border-orange-500 dark:border-orange-400",red:"border-red-500 dark:border-red-400",gray:"border-gray-400 dark:border-gray-500"},g={left:"border-l",right:"border-r",top:"border-t",bottom:"border-b"},c={thin:"2",medium:"3",thick:"4"},i={left:{sm:"pl-3",md:"pl-4",lg:"pl-6"},right:{sm:"pr-3",md:"pr-4",lg:"pr-6"},top:{sm:"pt-3",md:"pt-4",lg:"pt-6"},bottom:{sm:"pb-3",md:"pb-4",lg:"pb-6"}},h=`${g[a]}-${c[o]}`;return r.jsx("div",{className:u(h,l[e],i[a][n],s),children:t})},Ht=({children:t,title:e,position:a="bottom-right",collapsible:o=!0,defaultCollapsed:n=!1,closeable:s=!1,onClose:l,className:g})=>{const[c,i]=y.useState(n),h={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"};return r.jsxs("div",{className:u("fixed z-50 w-80","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-lg shadow-2xl",h[a],g),children:[(e||o||s)&&r.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[e&&r.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white",children:e}),r.jsxs("div",{className:"flex items-center gap-2",children:[o&&r.jsx("button",{onClick:()=>i(!c),className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":c?"Expand":"Collapse",children:r.jsx("svg",{className:u("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",c&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),s&&r.jsx("button",{onClick:l,className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":"Close",children:r.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),!c&&r.jsx("div",{className:"p-4",children:t})]})},qt=({left:t,right:e,direction:a="horizontal",initialSplit:o=.5,split:n,onSplitChange:s,minLeftSize:l=100,minRightSize:g=100,dividerSize:c=8,resizable:i=!0,className:h})=>{const[b,x]=y.useState(o),[m,f]=y.useState(!1),p=y.useRef(null),C=n!==void 0?n:b,S=N=>{i&&(N.preventDefault(),f(!0))};y.useEffect(()=>{if(!m)return;const N=w=>{const L=p.current;if(!L)return;const M=L.getBoundingClientRect();let I;a==="horizontal"?I=(w.clientX-M.left)/M.width:I=(w.clientY-M.top)/M.height,I=Math.max(0,Math.min(1,I));const $=a==="horizontal"?M.width:M.height,A=typeof l=="string"?parseFloat(l)/100*$:l,z=typeof g=="string"?parseFloat(g)/100*$:g,P=A/$,W=1-z/$;I=Math.max(P,Math.min(W,I)),n!==void 0&&s?s(I):x(I)},v=()=>{f(!1)};return document.addEventListener("mousemove",N),document.addEventListener("mouseup",v),()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",v)}},[m,a,l,g,n,s]),y.useEffect(()=>(m?(document.body.style.userSelect="none",document.body.style.cursor=a==="horizontal"?"col-resize":"row-resize"):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[m,a]);const k=a==="horizontal";return r.jsxs("div",{ref:p,className:u("w-full h-full flex",k?"flex-row":"flex-col",h),children:[r.jsx("div",{className:"overflow-auto",style:{[k?"width":"height"]:`${C*100}%`},children:t}),r.jsx("div",{onMouseDown:S,className:u("flex-shrink-0 group","bg-gray-300 dark:bg-gray-700",i&&"hover:bg-blue-500 dark:hover:bg-blue-400","transition-colors",m&&"bg-blue-500 dark:bg-blue-400",k?"cursor-col-resize":"cursor-row-resize",!i&&"cursor-default"),style:{[k?"width":"height"]:`${c}px`},children:i&&r.jsx("div",{className:u("flex items-center justify-center w-full h-full","text-gray-600 dark:text-gray-400","group-hover:text-white",m&&"text-white"),children:k?r.jsxs("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[r.jsx("circle",{cx:"10",cy:"6",r:"1.5"}),r.jsx("circle",{cx:"10",cy:"12",r:"1.5"}),r.jsx("circle",{cx:"10",cy:"18",r:"1.5"}),r.jsx("circle",{cx:"14",cy:"6",r:"1.5"}),r.jsx("circle",{cx:"14",cy:"12",r:"1.5"}),r.jsx("circle",{cx:"14",cy:"18",r:"1.5"})]}):r.jsxs("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[r.jsx("circle",{cx:"6",cy:"10",r:"1.5"}),r.jsx("circle",{cx:"12",cy:"10",r:"1.5"}),r.jsx("circle",{cx:"18",cy:"10",r:"1.5"}),r.jsx("circle",{cx:"6",cy:"14",r:"1.5"}),r.jsx("circle",{cx:"12",cy:"14",r:"1.5"}),r.jsx("circle",{cx:"18",cy:"14",r:"1.5"})]})})}),r.jsx("div",{className:"overflow-auto flex-1",style:{[k?"width":"height"]:`${(1-C)*100}%`},children:e})]})},_t=({children:t,defaultWidth:e=300,defaultHeight:a=200,minWidth:o=100,minHeight:n=100,maxWidth:s,maxHeight:l,directions:g=["right","bottom","bottom-right"],onResize:c,onResizeEnd:i,showHandles:h=!0,className:b})=>{const[x,m]=y.useState(e),[f,p]=y.useState(a),[C,S]=y.useState(!1),[k,N]=y.useState(null),v=y.useRef(null),w=y.useRef({x:0,y:0,width:0,height:0}),L=$=>A=>{A.preventDefault(),A.stopPropagation(),S(!0),N($),w.current={x:A.clientX,y:A.clientY,width:x,height:f}};y.useEffect(()=>{if(!C||!k)return;const $=z=>{const P=z.clientX-w.current.x,W=z.clientY-w.current.y;let j=w.current.width,F=w.current.height;k.includes("right")?j=w.current.width+P:k.includes("left")&&(j=w.current.width-P),k.includes("bottom")?F=w.current.height+W:k.includes("top")&&(F=w.current.height-W),j=Math.max(o,j),F=Math.max(n,F),s&&(j=Math.min(s,j)),l&&(F=Math.min(l,F)),m(j),p(F),c&&c(j,F)},A=()=>{S(!1),N(null),i&&i(x,f)};return document.addEventListener("mousemove",$),document.addEventListener("mouseup",A),()=>{document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",A)}},[C,k,x,f,o,n,s,l,c,i]);const M=y.useCallback($=>({top:"ns-resize",right:"ew-resize",bottom:"ns-resize",left:"ew-resize","top-left":"nwse-resize","top-right":"nesw-resize","bottom-left":"nesw-resize","bottom-right":"nwse-resize"})[$],[]);y.useEffect(()=>(C?(document.body.style.userSelect="none",document.body.style.cursor=M(k)):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[C,k,M]);const I=$=>{if(!g.includes($))return null;const A={top:"top-0 left-0 right-0 h-1 cursor-ns-resize",right:"top-0 right-0 bottom-0 w-1 cursor-ew-resize",bottom:"bottom-0 left-0 right-0 h-1 cursor-ns-resize",left:"top-0 left-0 bottom-0 w-1 cursor-ew-resize","top-left":"top-0 left-0 w-3 h-3 cursor-nwse-resize","top-right":"top-0 right-0 w-3 h-3 cursor-nesw-resize","bottom-left":"bottom-0 left-0 w-3 h-3 cursor-nesw-resize","bottom-right":"bottom-0 right-0 w-3 h-3 cursor-nwse-resize"};return r.jsx("div",{className:u("absolute z-10",h&&"bg-blue-500 dark:bg-blue-400 opacity-0 hover:opacity-50",A[$]),onMouseDown:L($)},$)};return r.jsxs("div",{ref:v,className:u("relative",b),style:{width:`${x}px`,height:`${f}px`},children:[t,["top","right","bottom","left","top-left","top-right","bottom-left","bottom-right"].map(I)]})},Gt=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UresizableUpanels",children:e||"UresizableUpanels Component"}),Kt=({children:t,maxHeight:e,hideScrollbar:a=!1,direction:o="vertical",className:n})=>{const s={vertical:"overflow-y-auto overflow-x-hidden",horizontal:"overflow-x-auto overflow-y-hidden",both:"overflow-auto"},l=a?"scrollbar-hide":u("scrollbar-thin","scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600","scrollbar-track-gray-100 dark:scrollbar-track-gray-800","hover:scrollbar-thumb-gray-400 dark:hover:scrollbar-thumb-gray-500"),g=typeof e=="number"?`${e}px`:e;return r.jsx("div",{className:u("relative",s[o],l,n),style:g?{maxHeight:g}:void 0,children:t})},Yt=({children:t,columns:e=3,gap:a=16,breakpoints:o,className:n})=>{const[s,l]=y.useState(e),g=y.useRef(null);y.useEffect(()=>{if(!o)return;const h=()=>{const b=window.innerWidth,x=Object.keys(o).map(Number).sort((m,f)=>f-m);for(const m of x)if(b>=m){l(o[m]);return}l(e)};return h(),window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[o,e]);const c=y.Children.toArray(t),i=Array.from({length:s},()=>[]);return c.forEach((h,b)=>{i[b%s].push(h)}),r.jsx("div",{ref:g,className:u("flex",n),style:{gap:`${a}px`},children:i.map((h,b)=>r.jsx("div",{className:"flex-1 flex flex-col",style:{gap:`${a}px`},children:h},b))})},ee=({children:t,container:e})=>{const[a,o]=y.useState(!1);if(y.useEffect(()=>(o(!0),()=>o(!1)),[]),!a)return null;const n=e||document.body;return gr.createPortal(t,n)},ke=({isOpen:t,onClose:e,children:a,blur:o=!1,opacity:n="medium",zIndex:s=40,lockScroll:l=!0,className:g})=>{if(y.useEffect(()=>{if(l){if(t){const i=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${i}px`}else document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.style.overflow="",document.body.style.paddingRight=""}}},[t,l]),!t)return null;const c={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/85"};return r.jsx(ee,{children:r.jsx("div",{className:u("fixed inset-0","transition-opacity duration-300",o&&"backdrop-blur-sm",c[n],g),style:{zIndex:s},onClick:e,"aria-hidden":"true",children:a&&r.jsx("div",{className:"relative h-full w-full",onClick:i=>i.stopPropagation(),children:a})})})},Qt=({children:t,as:e="p",size:a="base",weight:o="normal",color:n="default",align:s,transform:l="none",truncate:g=!1,lineClamp:c,className:i})=>{const h={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl"},b={light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},x={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400"},m=s?{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}[s]:"",f={none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},p=c?{display:"-webkit-box",WebkitLineClamp:c,WebkitBoxOrient:"vertical",overflow:"hidden"}:void 0;return r.jsx(e,{className:u(h[a],b[o],x[n],m,f[l],g&&"truncate",c&&"overflow-hidden",i),style:p,children:t})},Zt=({children:t,level:e=2,size:a,weight:o="bold",color:n="default",align:s,className:l})=>{const c=a||{1:"4xl",2:"3xl",3:"2xl",4:"xl",5:"lg",6:"base"}[e],i={"4xl":"text-4xl","3xl":"text-3xl","2xl":"text-2xl",xl:"text-xl",lg:"text-lg",base:"text-base"},h={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},b={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400"},x=s?{left:"text-left",center:"text-center",right:"text-right"}[s]:"",m=`h${e}`;return y.createElement(m,{className:u(i[c],h[o],b[n],x,l)},t)},Xt=V.cva("",{variants:{variant:{hero:T.heading.display.hero(),display:T.heading.display.lg(),h1:T.heading.h1(),h2:T.heading.h2(),h3:T.heading.h3()},responsive:{true:"",false:""},align:{left:"text-left",center:"text-center",right:"text-right"},color:{default:"text-gray-900 dark:text-white",muted:"text-gray-600 dark:text-gray-400",vibrant:"text-white",brand:"bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"}},defaultVariants:{variant:"h1",responsive:!0,align:"left",color:"default"}}),Jt=({children:t,variant:e="h1",responsive:a=!0,align:o="left",color:n="default",className:s,as:l})=>{const g=l||(e==="hero"||e==="display"||e==="h1"?"h1":e==="h2"?"h2":"h3");return r.jsx(g,{className:u(Xt({variant:e,responsive:a,align:o,color:n}),s),children:t})},Rt=V.cva("",{variants:{variant:{h2:T.heading.h2(),h3:T.heading.h3(),h4:T.heading.h4(),h5:T.heading.h5(),h6:T.heading.h6()},spacing:{none:"",sm:"mb-2",md:"mb-4",lg:"mb-6",xl:"mb-8"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{variant:"h2",spacing:"md",align:"left"}}),ea=({children:t,variant:e="h2",spacing:a="md",align:o="left",className:n,as:s})=>{const l=s||e;return y.createElement(l,{className:u(Rt({variant:e,spacing:a,align:o}),n)},t)},ra=V.cva("",{variants:{variant:{body:T.body.md(),lead:T.body.lg(),large:T.body.lg(),small:T.body.sm(),caption:T.body.xs()},color:{default:"text-gray-700 dark:text-gray-300",muted:"text-gray-500 dark:text-gray-500",primary:"text-gray-900 dark:text-white"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"body",color:"default",align:"left"}}),ta=({children:t,variant:e="body",color:a="default",align:o="left",className:n,as:s="p"})=>y.createElement(s,{className:u(ra({variant:e,color:a,align:o}),n)},t),aa=V.cva(T.link.default(),{variants:{variant:{default:T.link.default(),subtle:T.link.subtle(),muted:T.link.muted(),button:"inline-flex items-center justify-center px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors"},external:{true:"inline-flex items-center gap-1",false:""}},defaultVariants:{variant:"default",external:!1}}),oa=({children:t,href:e,variant:a="default",external:o=!1,className:n,target:s,rel:l})=>r.jsxs("a",{href:e,target:s||(o?"_blank":void 0),rel:l||(o?"noopener noreferrer":void 0),className:u(aa({variant:a,external:o}),n),children:[t,o&&r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),na=({children:t,size:e="md",variant:a="default",className:o})=>{const n={sm:"text-xs px-1 py-0.5",md:"text-sm px-1.5 py-0.5",lg:"text-base px-2 py-1"},s={default:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100",primary:"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-50 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",danger:"bg-red-50 dark:bg-red-900/30 text-red-700 dark:text-red-300"};return r.jsx("code",{className:u("inline-block font-mono font-medium rounded",n[e],s[a],o),children:t})},sa=({children:t,variant:e="primary",size:a="md",inline:o=!1,align:n="left",className:s,wrap:l=!1})=>{const g={primary:"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30",secondary:"text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",success:"text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30",warning:"text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/30",neutral:"text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"},c={xs:{text:"text-xs",padding:o?"px-1.5 py-0.5":"px-2 py-1"},sm:{text:"text-sm",padding:o?"px-2 py-0.5":"px-3 py-1.5"},md:{text:"text-base",padding:o?"px-2.5 py-1":"px-4 py-2"},lg:{text:"text-lg",padding:o?"px-3 py-1":"px-4 py-2"}},i={left:"text-left",center:"text-center",right:"text-right"},h=c[a],b=o?"code":"div";return r.jsx(b,{className:u("font-mono rounded-lg",g[e],h.text,h.padding,!o&&i[n],o?"inline-block":"block",!l&&"overflow-x-auto whitespace-nowrap",l&&"break-all",s),children:t})},la=({children:t,size:e="md",className:a})=>{const o={sm:"text-xs px-1.5 py-0.5",md:"text-sm px-2 py-1",lg:"text-base px-2.5 py-1.5"};return r.jsx("kbd",{className:u("inline-flex items-center justify-center","font-mono font-semibold","bg-gray-100 dark:bg-gray-800","text-gray-900 dark:text-gray-100","border border-gray-300 dark:border-gray-600","rounded shadow-sm",o[e],a),children:t})},ia=({children:t,cite:e,variant:a="default",size:o="md",className:n})=>{const s={sm:"text-sm p-3",md:"text-base p-4",lg:"text-lg p-6"},l={sm:"text-xs",md:"text-sm",lg:"text-base"},g={default:"border-l-4 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800/50",bordered:"border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800",accent:"border-l-4 border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/20"};return r.jsxs("blockquote",{className:u("rounded-r-lg",s[o],g[a],n),children:[r.jsx("p",{className:"text-gray-800 dark:text-gray-200 italic",children:t}),e&&r.jsxs("footer",{className:u("mt-2 text-gray-600 dark:text-gray-400",l[o]),children:["— ",r.jsx("cite",{className:"not-italic font-medium",children:e})]})]})},da=({children:t,variant:e="default",showIcon:a=!1,size:o="sm",className:n})=>{const s={sm:"text-sm",base:"text-base"},l={sm:"h-4 w-4",base:"h-5 w-5"},c={default:{text:"text-gray-600 dark:text-gray-400",icon:U.InformationCircleIcon},error:{text:"text-red-600 dark:text-red-400",icon:U.ExclamationCircleIcon},success:{text:"text-green-600 dark:text-green-400",icon:U.CheckCircleIcon},warning:{text:"text-yellow-600 dark:text-yellow-400",icon:U.ExclamationCircleIcon}}[e],i=c.icon;return r.jsxs("div",{className:u("flex items-start gap-1.5",n),children:[a&&r.jsx(i,{className:u(l[o],c.text,"flex-shrink-0 mt-0.5")}),r.jsx("p",{className:u(s[o],c.text),children:t})]})},ca=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UscreenUreaderUtext",children:e||"UscreenUreaderUtext Component"}),ga=({children:t,maxLength:e=50,position:a="end",ellipsis:o="...",showTooltip:n=!0,className:s})=>{const l=t||"";if(l.length<=e)return r.jsx("span",{className:s,children:l});const c=(()=>{const i=o.length,h=e-i;switch(a){case"start":return o+l.slice(l.length-h);case"middle":{const b=Math.floor(h/2),x=l.slice(0,b),m=l.slice(l.length-(h-b));return x+o+m}case"end":default:return l.slice(0,h)+o}})();return r.jsx("span",{className:u("inline-block",s),title:n?l:void 0,children:c})},ua=({value:t,style:e="decimal",currency:a="USD",unit:o,minimumFractionDigits:n,maximumFractionDigits:s,locale:l="en-US",notation:g="standard",className:c})=>{const i=()=>{try{const h={style:e,notation:g,minimumFractionDigits:n,maximumFractionDigits:s};return e==="currency"&&(h.currency=a),e==="unit"&&o&&(h.unit=o),new Intl.NumberFormat(l,h).format(t)}catch(h){return console.error("Number formatting error:",h),t.toLocaleString(l)}};return r.jsx("span",{className:u(c),children:i()})},ha=({date:t,showTooltip:e=!0,updateInterval:a=0,className:o})=>{const[,n]=y.useState(0),s=y.useMemo(()=>t instanceof Date?t:new Date(t),[t]);y.useEffect(()=>{if(a===0)return;const i=setInterval(()=>{n(h=>h+1)},a*1e3);return()=>clearInterval(i)},[a]);const g=(()=>{const h=new Date().getTime()-s.getTime(),b=Math.floor(h/1e3),x=Math.floor(b/60),m=Math.floor(x/60),f=Math.floor(m/24),p=Math.floor(f/7),C=Math.floor(f/30),S=Math.floor(f/365);return b<60?"just now":x<60?`${x} ${x===1?"minute":"minutes"} ago`:m<24?`${m} ${m===1?"hour":"hours"} ago`:f<7?`${f} ${f===1?"day":"days"} ago`:p<4?`${p} ${p===1?"week":"weeks"} ago`:C<12?`${C} ${C===1?"month":"months"} ago`:`${S} ${S===1?"year":"years"} ago`})(),c=s.toLocaleString();return r.jsx("time",{dateTime:s.toISOString(),title:e?c:void 0,className:u(o),children:g})},we=({size:t="default",variant:e="default",className:a,ariaLabel:o="Loading",loadingText:n="Loading..."})=>{const s=()=>{const l={small:"w-4 h-4",default:"w-6 h-6",large:"w-8 h-8",extraLarge:"w-16 h-16 border-4"},g={default:"border-gray-300 border-t-blue-600",white:"border-white/30 border-t-white",success:"border-gray-300 border-t-green-600",warning:"border-gray-300 border-t-orange-600",error:"border-gray-300 border-t-red-600"};return`animate-spin rounded-full border-2 ${l[t]} ${g[e]}`};return r.jsx("div",{className:u(s(),a),role:"status","aria-label":o,children:r.jsx("span",{className:"sr-only",children:n})})},ba=({isLoading:t,message:e,mode:a="fullscreen",blur:o=!1,spinnerSize:n="large",className:s})=>t?r.jsxs("div",{className:u(a==="fullscreen"?"fixed":"absolute","inset-0 z-50","flex flex-col items-center justify-center","bg-white/80 dark:bg-gray-900/80",o&&"backdrop-blur-sm",s),role:"alert","aria-live":"polite","aria-busy":"true",children:[r.jsx(we,{size:n}),e&&r.jsx("p",{className:u(T.body.md(),"text-gray-700 dark:text-gray-300 mt-4"),children:e})]}):null,fa=({size:t="md",variant:e="primary",color:a,className:o})=>{const n={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3"},s={primary:"bg-blue-600 dark:bg-blue-500",secondary:"bg-gray-600 dark:bg-gray-400",white:"bg-white"},l=u("rounded-full",n[t],a?"":s[e]);return r.jsxs("div",{className:u("flex items-center gap-1",o),children:[r.jsx("div",{className:l,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.32s"}}),r.jsx("div",{className:l,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.16s"}}),r.jsx("div",{className:l,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both"}}),r.jsx("style",{children:`
2
+ @keyframes loading-dot-bounce {
3
+ 0%, 80%, 100% {
4
+ transform: scale(0);
5
+ opacity: 0.5;
6
+ }
7
+ 40% {
8
+ transform: scale(1);
9
+ opacity: 1;
10
+ }
11
+ }
12
+ `})]})},pa=({message:t="Loading...",size:e="default",fullScreen:a=!1,variant:o="default",className:n})=>{const l={small:{spinner:"small",text:"text-sm"},default:{spinner:"default",text:"text-base"},large:{spinner:"large",text:"text-lg"}}[e],g=a?"fixed inset-0 z-50 flex items-center justify-center bg-white/80 dark:bg-gray-900/80":"flex flex-col items-center justify-center p-8",c=r.jsxs("div",{className:u(g,n),children:[r.jsx(we,{size:l.spinner,variant:o,className:"mb-4"}),t&&r.jsx("p",{className:u(l.text,"text-gray-600 dark:text-gray-400 text-center max-w-sm"),children:t})]});return a?r.jsx("div",{className:"fixed inset-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm",children:r.jsxs("div",{className:"flex items-center justify-center min-h-full p-4",children:[r.jsx(we,{size:l.spinner,variant:o,className:"mb-4"}),t&&r.jsx("p",{className:"text-center text-gray-600 dark:text-gray-400 max-w-sm",children:t})]})}):c},ya=({variant:t="text",width:e,height:a,className:o,count:n,lines:s=1,animate:l=!0,borderRadius:g,theme:c,spacing:i,gap:h="md"})=>{const b={text:"h-4 rounded",circle:"rounded-full",rectangle:"rounded-lg",avatar:"w-10 h-10 rounded-full",button:"h-10 rounded-lg"},x={light:"bg-gray-200",dark:"bg-gray-700"},m={sm:"space-y-1",md:"space-y-2",lg:"space-y-3"},f=n??s,p=C=>{const S={};return e&&(S.width=typeof e=="number"?`${e}px`:e),a&&(S.height=typeof a=="number"?`${a}px`:a),g&&(S.borderRadius=g),r.jsx("div",{className:u(l&&"animate-pulse",c?x[c]:"bg-gray-200 dark:bg-gray-700",b[t],o),style:S},C)};if(f>1){const C=i!==void 0?`space-y-${i}`:m[h];return r.jsx("div",{className:u(C),children:Array.from({length:f}).map((S,k)=>p(k))})}return p()},ma={info:U.InformationCircleIcon,success:U.CheckCircleIcon,warning:U.ExclamationTriangleIcon,attention:U.BellAlertIcon,error:U.XCircleIcon},va=({children:t,className:e})=>r.jsx("div",{className:u("font-medium mb-1",e),children:t}),xa=({children:t,className:e})=>r.jsx("div",{className:u("text-sm break-words",e),children:t}),Ae=({variant:t="info",title:e,description:a,icon:o,children:n,className:s})=>{const l=ma[t],g=o||r.jsx(l,{className:"h-5 w-5"}),c=typeof D.alert[t]=="function"?D.alert[t]():"";return r.jsxs("div",{role:"alert",className:u(c,s),children:[g&&r.jsx("div",{className:"flex-shrink-0",children:g}),r.jsxs("div",{className:"flex-1 min-w-0",children:[e&&r.jsx("div",{className:"font-medium mb-1 break-words",children:e}),a&&r.jsx("div",{className:"text-sm break-words",children:a}),n]})]})},ka=({message:t,variant:e="info",dismissible:a=!1,onDismiss:o,className:n})=>{const s={info:"bg-blue-100 dark:bg-blue-900/20 text-blue-800 dark:text-blue-300 border-blue-300 dark:border-blue-700",success:"bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300 border-green-300 dark:border-green-700",warning:"bg-yellow-100 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300 border-yellow-300 dark:border-yellow-700",error:"bg-red-100 dark:bg-red-900/20 text-red-800 dark:text-red-300 border-red-300 dark:border-red-700"};return r.jsxs("div",{className:u("p-4 border rounded-lg flex items-center justify-between",s[e],n),children:[r.jsx("span",{children:t}),a&&r.jsx("button",{onClick:o,className:"ml-4 font-bold",children:"×"})]})},fr=y.createContext(void 0),wa=()=>{const t=y.useContext(fr);if(!t)throw new Error("useToast must be used within ToastProvider");return t},pr=({toast:t,onRemove:e})=>{const{id:a,title:o,description:n,variant:s="default",action:l}=t,g={default:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",info:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"},c={default:"text-gray-600 dark:text-gray-400",success:"text-green-600 dark:text-green-400",error:"text-red-600 dark:text-red-400",warning:"text-yellow-600 dark:text-yellow-400",info:"text-blue-600 dark:text-blue-400"},i={default:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),success:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),error:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),warning:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),info:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})};return r.jsxs("div",{className:u("flex items-start gap-3 p-4 rounded-lg border shadow-lg","animate-in slide-in-from-top-2 fade-in duration-300","max-w-md w-full",g[s]),children:[r.jsx("div",{className:u("flex-shrink-0",c[s]),children:i[s]}),r.jsxs("div",{className:"flex-1 min-w-0",children:[o&&r.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:o}),n&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mt-1",children:n}),l&&r.jsx("button",{onClick:l.onClick,className:"text-sm font-medium text-blue-600 dark:text-blue-400 hover:underline mt-2",children:l.label})]}),r.jsx("button",{onClick:()=>e(a),className:"flex-shrink-0 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close notification",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},Ca=({toast:t,onRemove:e})=>(y.useEffect(()=>{const a=t.duration??5e3;if(a>0){const o=setTimeout(()=>{e(t.id)},a);return()=>clearTimeout(o)}},[t.id,t.duration,e]),r.jsx(pr,{toast:t,onRemove:e})),Na=({children:t})=>{const[e,a]=y.useState([]),o=y.useCallback(s=>{a(l=>l.filter(g=>g.id!==s))},[]),n=y.useCallback(s=>{const l=Math.random().toString(36).substr(2,9);a(g=>[...g,{...s,id:l}])},[]);return r.jsxs(fr.Provider,{value:{toasts:e,addToast:n,removeToast:o},children:[t,r.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col gap-2 pointer-events-none",children:r.jsx("div",{className:"pointer-events-auto",children:e.map(s=>r.jsx("div",{className:"mb-2",children:r.jsx(Ca,{toast:s,onRemove:o})},s.id))})})]})},Sa=({message:t,variant:e="info",onClose:a,className:o})=>{const n={info:"bg-blue-500",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500"};return r.jsxs("div",{className:u("fixed bottom-4 right-4 p-4 rounded-lg text-white shadow-lg flex items-center gap-3",n[e],o),children:[r.jsx("span",{children:t}),a&&r.jsx("button",{onClick:a,className:"ml-4",children:"×"})]})},Ea=({count:t,maxCount:e=99,variant:a="danger",className:o})=>{const n=t>e?`${e}+`:t,s={default:"bg-gray-500",primary:"bg-blue-500",danger:"bg-red-500"};return r.jsx("span",{className:u("inline-flex items-center justify-center px-2 py-1 text-xs font-bold text-white rounded-full",s[a],o),children:n})},La=({notifications:t,onMarkAsRead:e,className:a})=>r.jsx("div",{className:u("bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 p-4 max-h-96 overflow-y-auto",a),children:t.map(o=>r.jsxs("div",{className:u("p-3 rounded mb-2",o.read?"bg-transparent":"bg-blue-50 dark:bg-blue-900/20"),onClick:()=>e?.(o.id),children:[r.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white",children:o.title}),r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:o.message}),r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:o.timestamp})]},o.id))}),Ia=({children:t,variant:e="default",size:a="sm",icon:o,dot:n=!1,pill:s=!1,outline:l=!1,onClick:g,dismissible:c=!1,onDismiss:i,count:h,maxCount:b,className:x})=>{const m={default:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",warning:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",danger:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400"},f={default:"border border-gray-300 text-gray-700 dark:border-gray-600 dark:text-gray-300",primary:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",success:"border border-green-600 text-green-600 dark:border-green-400 dark:text-green-400",warning:"border border-yellow-600 text-yellow-600 dark:border-yellow-400 dark:text-yellow-400",danger:"border border-red-600 text-red-600 dark:border-red-400 dark:text-red-400",info:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",purple:"border border-purple-600 text-purple-600 dark:border-purple-400 dark:text-purple-400"},p={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},C={sm:"h-3 w-3",md:"h-3.5 w-3.5",lg:"h-4 w-4"},S={default:"bg-gray-600 dark:bg-gray-400",primary:"bg-blue-600 dark:bg-blue-400",success:"bg-green-600 dark:bg-green-400",warning:"bg-yellow-600 dark:bg-yellow-400",danger:"bg-red-600 dark:bg-red-400",info:"bg-blue-600 dark:bg-blue-400",purple:"bg-purple-600 dark:bg-purple-400"},k=h!==void 0?b!==void 0&&h>b?`${b}+`:h.toString():null,N=r.jsxs(r.Fragment,{children:[n&&r.jsx("span",{className:u("h-2 w-2 rounded-full mr-1.5",S[e])}),o&&r.jsx("span",{className:u(C[a],"mr-1"),children:o}),t,k&&r.jsx("span",{className:"ml-1",children:k}),c&&i&&r.jsx("button",{onClick:w=>{w.stopPropagation(),i()},className:"ml-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full p-0.5","aria-label":"Dismiss",children:r.jsx(R.XMarkIcon,{className:u(C[a])})})]}),v=g?"button":"span";return r.jsx(v,{onClick:g,className:u("inline-flex items-center font-medium",l?f[e]:m[e],p[a],s?"rounded-full":"rounded",g&&"cursor-pointer hover:opacity-80",x),children:N})},Ma=t=>{switch(t){case"verified":case"success":return ne("success");case"connected":case"warning":return ne("warning");case"disconnected":case"error":return ne("error");case"pending":return ne("info");default:return ne("neutral")}},$a=t=>{switch(t){case"sm":return"w-1.5 h-1.5";case"lg":return"w-3 h-3";default:return"w-2 h-2"}},Ua=({status:t,label:e,showDot:a=!0,size:o="md"})=>{const s=e||{verified:"Verified",connected:"Connected",disconnected:"Disconnected",pending:"Pending",error:"Error",success:"Success",warning:"Warning"}[t],g=((h,b)=>{const x={sm:"small",md:"default",lg:"large"},f={verified:"success",success:"success",connected:"warning",warning:"warning",disconnected:"error",error:"error",pending:"primary"}[h]||"default",p=x[b];return p==="default"?D.badge[f]():D.badge[p](f)})(t,o),c=Ma(t),i=$a(o);return r.jsxs("span",{className:g,children:[a&&r.jsx("span",{className:`inline-block ${i} rounded-full ${c} mr-1`}),s]})},Ta=({chainType:t,size:e="md"})=>{if(t==="unknown")return null;const a=t==="solana"?"SOL":"ETH",n={sm:"small",md:"default",lg:"large"}[e],s=()=>{const l=t==="solana"?"solana":"ethereum";return n==="default"?D.badge[l]():D.badge[n](l)};return r.jsx("span",{className:s(),children:a})},Aa={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},Pa=({status:t,size:e="sm",pulse:a=!1,className:o})=>r.jsx("div",{className:u("rounded-full flex-shrink-0",ne(t),Aa[e],a&&"animate-pulse",o)}),Ce=O.forwardRef(({className:t,type:e,...a},o)=>r.jsx("input",{type:e,className:u(D.input.default(),t),ref:o,...a}));Ce.displayName="Input";const za=({value:t,onChange:e,placeholder:a,rows:o=4,disabled:n=!1,readOnly:s=!1,showCount:l=!1,maxLength:g,resize:c="vertical",size:i="md",className:h,textareaProps:b})=>{const x={sm:"p-2 text-sm",md:"p-3 text-base",lg:"p-4 text-lg"},m={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},f=S=>{const k=S.target.value;g&&k.length>g||e(k)},p=t.length,C=l||g!==void 0;return r.jsxs("div",{className:u("w-full",h),children:[r.jsx("textarea",{value:t,onChange:f,placeholder:a,rows:o,disabled:n,readOnly:s,maxLength:g,className:u("w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",x[i],m[c],n&&"opacity-50 cursor-not-allowed",s&&"bg-gray-50 dark:bg-gray-900 cursor-default"),...b}),C&&r.jsx("div",{className:"flex justify-end mt-1",children:r.jsxs("span",{className:u("text-xs",g&&p>g*.9?"text-yellow-600 dark:text-yellow-400":"text-gray-500 dark:text-gray-400",g&&p>=g&&"text-red-600 dark:text-red-400"),children:[p,g&&` / ${g}`]})})]})},Da=({value:t,onChange:e,min:a,max:o,step:n=1,disabled:s=!1,showSteppers:l=!1,stepperPosition:g="right",placeholder:c,size:i="md",className:h,inputProps:b})=>{const m={sm:{input:"py-1.5 px-3 text-sm",button:"w-6 h-6",icon:"h-3 w-3"},md:{input:"py-2 px-3 text-base",button:"w-8 h-8",icon:"h-4 w-4"},lg:{input:"py-3 px-4 text-lg",button:"w-10 h-10",icon:"h-5 w-5"}}[i],f=w=>{const L=parseFloat(w.target.value);if(isNaN(L))w.target.value===""&&e(a??0);else{const M=p(L);e(M)}},p=w=>{let L=w;return a!==void 0&&L<a&&(L=a),o!==void 0&&L>o&&(L=o),L},C=()=>{const w=p(t+n);e(w)},S=()=>{const w=p(t-n);e(w)},k=o===void 0||t<o,N=a===void 0||t>a,v=({onClick:w,icon:L,disabled:M,ariaLabel:I})=>r.jsx("button",{type:"button",onClick:w,disabled:s||M,"aria-label":I,className:u("inline-flex items-center justify-center","border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",m.button,(s||M)&&"opacity-50 cursor-not-allowed"),children:L});return l&&g==="sides"?r.jsxs("div",{className:u("inline-flex items-stretch",h),children:[r.jsx(v,{onClick:S,disabled:!N,icon:r.jsx(U.MinusIcon,{className:m.icon}),ariaLabel:"Decrement"}),r.jsx("input",{type:"number",value:t,onChange:f,min:a,max:o,step:n,disabled:s,placeholder:c,className:u("border-x-0 text-center","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:z-10","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...b}),r.jsx(v,{onClick:C,disabled:!k,icon:r.jsx(U.PlusIcon,{className:m.icon}),ariaLabel:"Increment"})]}):l&&g==="right"?r.jsxs("div",{className:u("inline-flex items-stretch gap-2",h),children:[r.jsx("input",{type:"number",value:t,onChange:f,min:a,max:o,step:n,disabled:s,placeholder:c,className:u("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...b}),r.jsxs("div",{className:"inline-flex flex-col gap-0.5",children:[r.jsx("button",{type:"button",onClick:C,disabled:s||!k,"aria-label":"Increment",className:u("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",m.button.replace(/h-\d+/,"h-auto"),(s||!k)&&"opacity-50 cursor-not-allowed"),children:r.jsx(U.PlusIcon,{className:u(m.icon,"w-3 h-3")})}),r.jsx("button",{type:"button",onClick:S,disabled:s||!N,"aria-label":"Decrement",className:u("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",m.button.replace(/h-\d+/,"h-auto"),(s||!N)&&"opacity-50 cursor-not-allowed"),children:r.jsx(U.MinusIcon,{className:u(m.icon,"w-3 h-3")})})]})]}):r.jsx("input",{type:"number",value:t,onChange:f,min:a,max:o,step:n,disabled:s,placeholder:c,className:u("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed",h),...b})},ja=({value:t,onChange:e,placeholder:a="Search...",autoFocus:o=!1,disabled:n=!1,size:s="md",showIcon:l=!0,showClear:g=!0,loading:c=!1,className:i,inputProps:h})=>{const[b,x]=y.useState(""),m=t!==void 0?t:b,f=t!==void 0,C={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:l?"pl-8 pr-8":"px-3",iconLeft:"left-0 pl-2.5",iconRight:"right-0 pr-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:l?"pl-10 pr-10":"px-3",iconLeft:"left-0 pl-3",iconRight:"right-0 pr-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:l?"pl-12 pr-12":"px-4",iconLeft:"left-0 pl-3.5",iconRight:"right-0 pr-3.5"}}[s],S=y.useCallback(N=>{const v=N.target.value;f||x(v),e?.(v)},[e,f]),k=y.useCallback(()=>{f||x(""),e?.("")},[e,f]);return r.jsxs("div",{className:u("relative w-full",i),children:[l&&r.jsx("div",{className:u("absolute inset-y-0 flex items-center pointer-events-none",C.iconLeft),children:r.jsx(U.MagnifyingGlassIcon,{className:u(C.icon,"text-gray-400 dark:text-gray-500")})}),r.jsx("input",{type:"text",value:m,onChange:S,placeholder:a,autoFocus:o,disabled:n||c,className:u("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",C.input,C.padding,n&&"opacity-50 cursor-not-allowed",c&&"opacity-60"),...h}),g&&m&&!c&&r.jsx("button",{type:"button",onClick:k,disabled:n,className:u("absolute inset-y-0 flex items-center","text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","transition-colors",n?"cursor-not-allowed":"cursor-pointer",C.iconRight),"aria-label":"Clear search",children:r.jsx(U.XMarkIcon,{className:C.icon})}),c&&r.jsx("div",{className:u("absolute inset-y-0 flex items-center",C.iconRight),children:r.jsxs("svg",{className:u(C.icon,"animate-spin text-gray-400"),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})]})},Ba=({value:t,onChange:e,type:a="date",min:o,max:n,disabled:s=!1,showIcon:l=!1,placeholder:g,size:c="md",className:i,inputProps:h})=>{const x={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:l?"pl-8 pr-3":"px-3",iconLeft:"left-0 pl-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:l?"pl-10 pr-4":"px-4",iconLeft:"left-0 pl-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:l?"pl-12 pr-4":"px-4",iconLeft:"left-0 pl-3.5"}}[c],m=t instanceof Date?Wa(t,a):t,f=p=>{e(p.target.value)};return r.jsxs("div",{className:u("relative",i),children:[l&&r.jsx("div",{className:u("absolute inset-y-0 flex items-center pointer-events-none",x.iconLeft),children:r.jsx(U.CalendarIcon,{className:u(x.icon,"text-gray-400 dark:text-gray-500")})}),r.jsx("input",{type:a,value:m,onChange:f,min:o,max:n,disabled:s,placeholder:g,className:u("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",x.input,x.padding,s&&"opacity-50 cursor-not-allowed","appearance-none","[&::-webkit-calendar-picker-indicator]:opacity-100","[&::-webkit-calendar-picker-indicator]:cursor-pointer"),...h})]})};function Wa(t,e){const a=c=>String(c).padStart(2,"0"),o=t.getFullYear(),n=a(t.getMonth()+1),s=a(t.getDate()),l=a(t.getHours()),g=a(t.getMinutes());switch(e){case"date":return`${o}-${n}-${s}`;case"time":return`${l}:${g}`;case"datetime-local":return`${o}-${n}-${s}T${l}:${g}`;case"month":return`${o}-${n}`;case"week":{const c=new Date(o,0,1),i=Math.floor((t.getTime()-c.getTime())/(1440*60*1e3)),h=Math.ceil((i+c.getDay()+1)/7);return`${o}-W${a(h)}`}default:return`${o}-${n}-${s}`}}const yr=({value:t,onChange:e,use12Hour:a=!1,minuteStep:o=1,disabled:n=!1,className:s})=>{const[l,g]=y.useState(!1),[c,i]=y.useState("12"),[h,b]=y.useState("00"),[x,m]=y.useState("AM"),f=y.useRef(null);y.useEffect(()=>{if(t){const[N,v]=t.split(":"),w=parseInt(N,10);if(a){const L=w>=12,M=w===0?12:w>12?w-12:w;i(M.toString().padStart(2,"0")),m(L?"PM":"AM")}else i(N);b(v)}},[t,a]),y.useEffect(()=>{const N=v=>{f.current&&!f.current.contains(v.target)&&g(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const p=()=>{if(!t)return"";const[N,v]=t.split(":"),w=parseInt(N,10);if(a){const L=w===0?12:w>12?w-12:w,M=w>=12?"PM":"AM";return`${L}:${v} ${M}`}return`${N}:${v}`},C=(N,v,w)=>{let L=parseInt(N,10);const M=parseInt(v,10);a&&w&&(w==="PM"&&L!==12?L+=12:w==="AM"&&L===12&&(L=0));const I=`${L.toString().padStart(2,"0")}:${M.toString().padStart(2,"0")}`;e(I)},S=a?Array.from({length:12},(N,v)=>(v+1).toString().padStart(2,"0")):Array.from({length:24},(N,v)=>v.toString().padStart(2,"0")),k=Array.from({length:Math.ceil(60/o)},(N,v)=>(v*o).toString().padStart(2,"0"));return r.jsxs("div",{ref:f,className:u("relative w-full",s),children:[r.jsxs("button",{type:"button",onClick:()=>!n&&g(!l),disabled:n,className:u("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",l&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:u(t?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:t?p():"Select time"}),r.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),l&&r.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:r.jsxs("div",{className:"flex gap-1 p-2",children:[r.jsxs("div",{className:"flex flex-col",children:[r.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Hour"}),r.jsx("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:S.map(N=>r.jsx("button",{onClick:()=>{i(N),C(N,h,a?x:void 0)},className:u("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",N===c&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:N},N))})]}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Min"}),r.jsx("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:k.map(N=>r.jsx("button",{onClick:()=>{b(N),C(c,N,a?x:void 0)},className:u("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",N===h&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:N},N))})]}),a&&r.jsxs("div",{className:"flex flex-col",children:[r.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:" "}),r.jsxs("div",{className:"h-48 flex flex-col justify-center gap-2 w-16",children:[r.jsx("button",{onClick:()=>{m("AM"),C(c,h,"AM")},className:u("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",x==="AM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"AM"}),r.jsx("button",{onClick:()=>{m("PM"),C(c,h,"PM")},className:u("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",x==="PM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"PM"})]})]})]})})]})},Oa=({value:t,onChange:e,placeholder:a="Enter password",showStrength:o=!1,showRequirements:n=!1,minLength:s=8,requireUppercase:l=!0,requireLowercase:g=!0,requireNumbers:c=!0,requireSpecial:i=!0,disabled:h=!1,className:b})=>{const[x,m]=y.useState(!1),f=()=>{if(!t)return{score:0,label:"Very Weak",color:"bg-gray-300"};let S=0;t.length>=s&&S++,t.length>=12&&S++,l&&/[A-Z]/.test(t)&&S++,g&&/[a-z]/.test(t)&&S++,c&&/[0-9]/.test(t)&&S++,i&&/[^A-Za-z0-9]/.test(t)&&S++;const k=Math.min(4,Math.floor(S/6*4));return{0:{score:0,label:"Very Weak",color:"bg-red-500"},1:{score:1,label:"Weak",color:"bg-orange-500"},2:{score:2,label:"Fair",color:"bg-yellow-500"},3:{score:3,label:"Good",color:"bg-blue-500"},4:{score:4,label:"Strong",color:"bg-green-500"}}[k]},p=[{label:`At least ${s} characters`,met:t.length>=s},{label:"Uppercase letter",met:/[A-Z]/.test(t),enabled:l},{label:"Lowercase letter",met:/[a-z]/.test(t),enabled:g},{label:"Number",met:/[0-9]/.test(t),enabled:c},{label:"Special character",met:/[^A-Za-z0-9]/.test(t),enabled:i}].filter(S=>S.enabled!==!1),C=f();return r.jsxs("div",{className:u("w-full",b),children:[r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:x?"text":"password",value:t,onChange:S=>e(S.target.value),placeholder:a,disabled:h,className:u("w-full px-3 py-2 pr-10 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")}),r.jsx("button",{type:"button",onClick:()=>m(!x),disabled:h,className:u("absolute right-2 top-1/2 -translate-y-1/2","p-1.5 text-gray-600 dark:text-gray-400","hover:text-gray-900 dark:hover:text-white","transition-colors","disabled:cursor-not-allowed"),"aria-label":x?"Hide password":"Show password",children:x?r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}):r.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]}),o&&t&&r.jsxs("div",{className:"mt-2",children:[r.jsxs("div",{className:"flex items-center justify-between mb-1",children:[r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Password strength:"}),r.jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:C.label})]}),r.jsx("div",{className:"flex gap-1",children:[0,1,2,3,4].map(S=>r.jsx("div",{className:u("h-1.5 flex-1 rounded-full transition-colors",S<=C.score?C.color:"bg-gray-200 dark:bg-gray-700")},S))})]}),n&&t&&r.jsx("div",{className:"mt-3 space-y-1.5",children:p.map((S,k)=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:u("w-4 h-4 rounded-full flex items-center justify-center flex-shrink-0",S.met?"bg-green-500 dark:bg-green-600":"bg-gray-300 dark:bg-gray-700"),children:S.met&&r.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),r.jsx("span",{className:u("text-xs",S.met?"text-green-600 dark:text-green-400":"text-gray-600 dark:text-gray-400"),children:S.label})]},k))})]})},Fa=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"}],Va=({value:t,onChange:e,country:a,onCountryChange:o,countries:n=Fa,placeholder:s="Phone number",disabled:l=!1,className:g})=>{const[c,i]=y.useState(n[0]?.code||"US"),[h,b]=y.useState(!1),[x,m]=y.useState(""),f=a!==void 0?a:c,p=n.find(v=>v.code===f),C=v=>{a!==void 0&&o?o(v):i(v),b(!1),m("")},S=v=>{const w=v.replace(/\D/g,"");return p?.dialCode==="+1"?w.length<=3?w:w.length<=6?`(${w.slice(0,3)}) ${w.slice(3)}`:`(${w.slice(0,3)}) ${w.slice(3,6)}-${w.slice(6,10)}`:w},k=v=>{const w=S(v.target.value);e(w)},N=n.filter(v=>v.name.toLowerCase().includes(x.toLowerCase())||v.dialCode.includes(x)||v.code.toLowerCase().includes(x.toLowerCase()));return r.jsxs("div",{className:u("relative w-full",g),children:[r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>!l&&b(!h),disabled:l,className:u("flex items-center gap-2 px-3 py-2 min-w-[120px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",h&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:"text-xl",children:p?.flag}),r.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:p?.dialCode}),r.jsx("svg",{className:u("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",h&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),h&&r.jsxs("div",{className:"absolute top-full left-0 mt-1 w-72 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:[r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{type:"text",value:x,onChange:v=>m(v.target.value),placeholder:"Search countries...",className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:v=>v.stopPropagation()})}),r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:N.length===0?r.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No countries found"}):N.map(v=>r.jsxs("button",{onClick:()=>C(v.code),className:u("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",v.code===f&&"bg-blue-50 dark:bg-blue-900/30"),children:[r.jsx("span",{className:"text-xl",children:v.flag}),r.jsx("span",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:v.name}),r.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:v.dialCode})]},v.code))})]})]}),r.jsx("input",{type:"tel",value:t,onChange:k,placeholder:s,disabled:l,className:u("flex-1 px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]}),t&&p&&r.jsxs("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:["Full number: ",p.dialCode," ",t]}),h&&r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>b(!1)})]})},Ha=({length:t=6,value:e,onChange:a,onComplete:o,type:n="text",disabled:s=!1,autoFocus:l=!1,placeholder:g="•",className:c})=>{const i=y.useRef([]),[h,b]=y.useState(null);y.useEffect(()=>{i.current=i.current.slice(0,t)},[t]),y.useEffect(()=>{l&&i.current[0]&&i.current[0].focus()},[l]),y.useEffect(()=>{e.length===t&&o&&o(e)},[e,t,o]);const x=k=>e[k]||"",m=(k,N)=>{const v=N.slice(-1),w=e.substring(0,k)+v+e.substring(k+1);a(w.slice(0,t)),v&&k<t-1&&i.current[k+1]?.focus()},f=(k,N)=>{if(N.key==="Backspace"){if(N.preventDefault(),x(k)){const v=e.substring(0,k)+e.substring(k+1);a(v)}else if(k>0){const v=e.substring(0,k-1)+e.substring(k);a(v),i.current[k-1]?.focus()}}N.key==="ArrowLeft"&&k>0&&(N.preventDefault(),i.current[k-1]?.focus()),N.key==="ArrowRight"&&k<t-1&&(N.preventDefault(),i.current[k+1]?.focus()),N.key==="Home"&&(N.preventDefault(),i.current[0]?.focus()),N.key==="End"&&(N.preventDefault(),i.current[t-1]?.focus())},p=k=>{k.preventDefault();const v=k.clipboardData.getData("text/plain").replace(/\s/g,"").slice(0,t);a(v);const w=Math.min(v.length,t-1);i.current[w]?.focus()},C=k=>{b(k),i.current[k]?.select()},S=()=>{b(null)};return r.jsx("div",{className:u("flex gap-2",c),children:Array.from({length:t},(k,N)=>{const v=x(N),w=h===N;return r.jsx("input",{ref:L=>{i.current[N]=L},type:n,inputMode:"numeric",maxLength:1,value:v,onChange:L=>m(N,L.target.value),onKeyDown:L=>f(N,L),onPaste:p,onFocus:()=>C(N),onBlur:S,disabled:s,placeholder:g,className:u("w-12 h-12 text-center text-lg font-semibold","bg-white dark:bg-gray-900","border-2 border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:border-blue-500 dark:focus:border-blue-400","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",w&&"ring-2 ring-blue-500 dark:ring-blue-400",v&&"border-gray-400 dark:border-gray-600")},N)})})},qa=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtwoUfactorUinput",children:e||"UtwoUfactorUinput Component"}),_a=V.cva(`${T.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),mr=O.forwardRef(({className:t,...e},a)=>r.jsx(xe.Root,{ref:a,className:u(_a(),t),...e}));mr.displayName=xe.Root.displayName;const Pe=({label:t,value:e,onChange:a,placeholder:o,required:n=!1,error:s,className:l=""})=>r.jsxs("div",{className:l,children:[r.jsxs(mr,{htmlFor:t.toLowerCase(),className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[t," ",n&&r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{id:t.toLowerCase(),type:"email",value:e,onChange:g=>a(g.target.value),placeholder:o,className:`
37
13
  mt-1 block w-full px-3 py-2 border rounded-md shadow-sm
38
14
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
39
15
  dark:bg-gray-800 dark:border-gray-600 dark:text-white
40
16
  ${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
41
- `}),s&&n.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:s})]}),Wt=({isVisible:e,onToggle:t,showLabel:r,hideLabel:a,...o})=>{const s=e?a:r;return n.jsxs("div",{children:[n.jsxs("button",{type:"button",onClick:t,className:"flex items-center text-sm text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 mb-2",children:[e?n.jsx(A.ChevronUpIcon,{className:"h-4 w-4 mr-1"}):n.jsx(A.ChevronDownIcon,{className:"h-4 w-4 mr-1"}),s]}),e&&n.jsx(Bt,{...o})]})},si=({to:e,onToChange:t,cc:r="",onCcChange:a,bcc:o="",onBccChange:s,showCc:i=!1,showBcc:l=!1,onToggleCc:c,onToggleBcc:d,errors:g={},className:m="",labels:b={},placeholders:f={}})=>{const p={to:"To",cc:"CC",bcc:"BCC",addCc:"Add CC",removeCc:"Remove CC",addBcc:"Add BCC",removeBcc:"Remove BCC"},h={to:"recipient@example.com",cc:"cc@example.com",bcc:"bcc@example.com"},w={...p,...b},C={...h,...f};return n.jsxs("div",{className:`space-y-4 ${m}`,children:[n.jsx(Bt,{label:w.to,value:e,onChange:t,placeholder:C.to,required:!0,error:g.to}),c&&a&&n.jsx(Wt,{label:w.cc,value:r,onChange:a,placeholder:C.cc,error:g.cc,isVisible:i,onToggle:c,showLabel:w.addCc,hideLabel:w.removeCc}),d&&s&&n.jsx(Wt,{label:w.bcc,value:o,onChange:s,placeholder:C.bcc,error:g.bcc,isVisible:l,onToggle:d,showLabel:w.addBcc,hideLabel:w.removeBcc})]})},nt=({label:e,required:t=!1,error:r,helpText:a,children:o,layout:s="vertical",className:i="",labelClassName:l="",contentClassName:c=""})=>{const d=s==="horizontal";return n.jsxs("div",{className:`${d?"grid grid-cols-1 md:grid-cols-3 gap-4 items-start":"space-y-2"} ${i}`,children:[n.jsxs("div",{className:d?"md:col-span-1":"",children:[n.jsxs("label",{className:`block text-sm font-medium text-gray-700 dark:text-gray-300 ${l}`,children:[e,t&&n.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),a&&!r&&n.jsxs("div",{className:"mt-1 flex items-start",children:[n.jsx(A.InformationCircleIcon,{className:"h-4 w-4 text-gray-400 mr-1 mt-0.5 flex-shrink-0"}),n.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:a})]})]}),n.jsxs("div",{className:`${d?"md:col-span-2":""} ${c}`,children:[n.jsx("div",{className:r?"relative":"",children:o}),r&&n.jsxs("div",{className:"mt-1 flex items-start",children:[n.jsx(A.ExclamationCircleIcon,{className:"h-4 w-4 text-red-500 mr-1 mt-0.5 flex-shrink-0"}),n.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:r})]})]})]})},ii=({label:e,value:t,onChange:r,placeholder:a,required:o=!1,error:s,helpText:i,type:l="text",layout:c="vertical",className:d=""})=>n.jsx(nt,{label:e,required:o,error:s,helpText:i,layout:c,className:d,children:n.jsx("input",{type:l,value:t,onChange:g=>r(g.target.value),placeholder:a,className:`
17
+ `}),s&&r.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:s})]}),ze=({isVisible:t,onToggle:e,showLabel:a,hideLabel:o,...n})=>{const s=t?o:a;return r.jsxs("div",{children:[r.jsxs("button",{type:"button",onClick:e,className:"flex items-center text-sm text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 mb-2",children:[t?r.jsx(U.ChevronUpIcon,{className:"h-4 w-4 mr-1"}):r.jsx(U.ChevronDownIcon,{className:"h-4 w-4 mr-1"}),s]}),t&&r.jsx(Pe,{...n})]})},Ga=({to:t,onToChange:e,cc:a="",onCcChange:o,bcc:n="",onBccChange:s,showCc:l=!1,showBcc:g=!1,onToggleCc:c,onToggleBcc:i,errors:h={},className:b="",labels:x={},placeholders:m={}})=>{const f={to:"To",cc:"CC",bcc:"BCC",addCc:"Add CC",removeCc:"Remove CC",addBcc:"Add BCC",removeBcc:"Remove BCC"},p={to:"recipient@example.com",cc:"cc@example.com",bcc:"bcc@example.com"},C={...f,...x},S={...p,...m};return r.jsxs("div",{className:`space-y-4 ${b}`,children:[r.jsx(Pe,{label:C.to,value:t,onChange:e,placeholder:S.to,required:!0,error:h.to}),c&&o&&r.jsx(ze,{label:C.cc,value:a,onChange:o,placeholder:S.cc,error:h.cc,isVisible:l,onToggle:c,showLabel:C.addCc,hideLabel:C.removeCc}),i&&s&&r.jsx(ze,{label:C.bcc,value:n,onChange:s,placeholder:S.bcc,error:h.bcc,isVisible:g,onToggle:i,showLabel:C.addBcc,hideLabel:C.removeBcc})]})},Ka=({checked:t,defaultChecked:e=!1,onChange:a,label:o,description:n,disabled:s=!1,size:l="md",variant:g="primary",color:c,className:i,id:h,name:b,value:x,required:m=!1,indeterminate:f=!1,error:p=!1,errorMessage:C,icon:S})=>{const[k,N]=y.useState(e),v=t!==void 0,w=v?t:k,L={sm:{box:"w-4 h-4",check:"w-3 h-3",text:"text-sm",desc:"text-xs"},md:{box:"w-5 h-5",check:"w-4 h-4",text:"text-base",desc:"text-sm"},lg:{box:"w-6 h-6",check:"w-5 h-5",text:"text-lg",desc:"text-base"}},I=c?{blue:"primary",green:"success",yellow:"warning",red:"error"}[c]:g,$=()=>p?w?"bg-red-600 border-red-600":"border-red-600 dark:border-red-500":{primary:w?"bg-blue-600 border-blue-600":"border-gray-300 dark:border-gray-600",success:w?"bg-green-600 border-green-600":"border-gray-300 dark:border-gray-600",warning:w?"bg-yellow-600 border-yellow-600":"border-gray-300 dark:border-gray-600",error:w?"bg-red-600 border-red-600":"border-gray-300 dark:border-gray-600"}[I],A=W=>{if(s)return;const j=W.target.checked;v||N(j),a?.(j)},z=W=>{if(!s&&(W.key===" "||W.key==="Spacebar")){W.preventDefault();const j=!w;v||N(j),a?.(j)}},P=L[l];return r.jsxs("div",{className:u("inline-flex flex-col",i),children:[r.jsxs("label",{className:u("inline-flex items-start gap-2 cursor-pointer",s&&"opacity-50 cursor-not-allowed"),children:[r.jsxs("div",{className:"relative flex items-center",children:[r.jsx("input",{type:"checkbox",checked:w,defaultChecked:v?void 0:e,onChange:A,onKeyDown:z,disabled:s,id:h,name:b,value:x,required:m,className:"sr-only peer"}),r.jsx("div",{"data-indeterminate":f?"true":void 0,className:u("rounded border-2 flex items-center justify-center transition-colors bg-white dark:bg-gray-900",P.box,$(),!s&&"hover:border-opacity-75"),children:f?r.jsx(R.MinusIcon,{className:u("text-white",P.check)}):w?S||r.jsx(R.CheckIcon,{className:u("text-white",P.check)}):null})]}),(o||n)&&r.jsxs("div",{className:"flex flex-col",children:[o&&r.jsx("span",{className:u("text-gray-900 dark:text-white",P.text),children:o}),n&&r.jsx("span",{className:u("text-gray-600 dark:text-gray-400",P.desc),children:n})]})]}),C&&r.jsx("span",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:C})]})},vr=O.forwardRef(({className:t,...e},a)=>r.jsx(oe.Root,{className:u("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",t),...e,ref:a,children:r.jsx(oe.Thumb,{className:u("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));vr.displayName=oe.Root.displayName;const Ya=({name:t="radio-group",value:e,onChange:a,options:o,label:n,orientation:s="vertical",disabled:l=!1,error:g=!1,errorMessage:c,required:i=!1,size:h="md",renderOption:b,className:x})=>{const m=y.useRef(null),p={sm:{radio:"w-4 h-4",label:"text-sm",description:"text-xs"},md:{radio:"w-5 h-5",label:"text-base",description:"text-sm"},lg:{radio:"w-6 h-6",label:"text-lg",description:"text-base"}}[h],C=(k,N)=>{!l&&!N&&a(k)},S=(k,N)=>{const v=o.filter(L=>!L.disabled&&!l),w=v.findIndex(L=>L.value===o[N].value);if(k.key==="ArrowDown"||k.key==="ArrowRight"){k.preventDefault();const L=(w+1)%v.length;a(v[L].value)}else if(k.key==="ArrowUp"||k.key==="ArrowLeft"){k.preventDefault();const L=(w-1+v.length)%v.length;a(v[L].value)}};return r.jsxs("div",{className:u("w-full",x),children:[n&&r.jsx("div",{className:"mb-2",children:r.jsxs("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[n,i&&r.jsx("span",{className:"text-red-600 ml-1",children:"*"})]})}),r.jsx("div",{ref:m,className:u(s==="horizontal"?"flex flex-row gap-4":"flex flex-col space-y-2"),role:"radiogroup",children:o.map((k,N)=>{const v=l||k.disabled,w=e===k.value;return r.jsxs("label",{className:u("flex items-start cursor-pointer",v&&"opacity-50 cursor-not-allowed",g&&"border-red-600 dark:border-red-500"),children:[r.jsx("input",{type:"radio",name:t,value:k.value,checked:w,onChange:()=>C(k.value,!!k.disabled),onKeyDown:L=>S(L,N),disabled:v,className:u("mt-0.5 mr-2",p.radio,"text-blue-600 bg-white dark:bg-gray-900","border-gray-300 dark:border-gray-600","focus:ring-blue-500 focus:ring-2","transition-colors",g&&"border-red-600 dark:border-red-500",v&&"cursor-not-allowed")}),r.jsx("div",{className:"flex-1 min-w-0",children:b?b(k):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:u("font-medium text-gray-700 dark:text-gray-300",p.label),children:k.label}),k.description&&r.jsx("p",{className:u("text-gray-500 dark:text-gray-400 mt-0.5",p.description),children:k.description})]})})]},k.value)})}),c&&r.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:c})]})},Qa=B.Root,Za=B.Group,Xa=B.Value,xr=O.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Trigger,{ref:o,className:u("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[e,r.jsx(B.Icon,{asChild:!0,children:r.jsx(X.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));xr.displayName=B.Trigger.displayName;const De=O.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollUpButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronUp,{className:"h-4 w-4"})}));De.displayName=B.ScrollUpButton.displayName;const je=O.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollDownButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronDown,{className:"h-4 w-4"})}));je.displayName=B.ScrollDownButton.displayName;const kr=O.forwardRef(({className:t,children:e,position:a="popper",...o},n)=>r.jsx(B.Portal,{children:r.jsxs(B.Content,{ref:n,className:u(D.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden 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",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...o,children:[r.jsx(De,{}),r.jsx(B.Viewport,{className:u(D.overlays.dropdown.itemContainer(),a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),r.jsx(je,{})]})}));kr.displayName=B.Content.displayName;const wr=O.forwardRef(({className:t,...e},a)=>r.jsx(B.Label,{ref:a,className:u(D.overlays.dropdown.header(),"py-1.5",t),...e}));wr.displayName=B.Label.displayName;const Cr=O.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Item,{ref:o,className:u(D.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[r.jsx(B.ItemText,{children:e}),r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(B.ItemIndicator,{children:r.jsx(X.Check,{className:"h-4 w-4"})})})]}));Cr.displayName=B.Item.displayName;const Nr=O.forwardRef(({className:t,...e},a)=>r.jsx(B.Separator,{ref:a,className:u("my-1 h-px bg-gray-200 dark:bg-gray-700",t),...e}));Nr.displayName=B.Separator.displayName;const Ja=({options:t,value:e,onChange:a,placeholder:o="Select items...",searchPlaceholder:n="Search...",searchable:s=!0,maxDisplay:l=3,disabled:g=!1,className:c})=>{const[i,h]=y.useState(!1),[b,x]=y.useState(""),m=y.useRef(null),f=s?t.filter(v=>v.label.toLowerCase().includes(b.toLowerCase())):t,p=t.filter(v=>e.includes(v.value)),C=v=>{e.includes(v)?a(e.filter(w=>w!==v)):a([...e,v])},S=v=>{a(e.filter(w=>w!==v))};y.useEffect(()=>{const v=w=>{m.current&&!m.current.contains(w.target)&&(h(!1),x(""))};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);const k=p.length,N=k>l?k-l:0;return r.jsxs("div",{ref:m,className:u("relative w-full",c),children:[r.jsx("button",{type:"button",onClick:()=>!g&&h(!i),disabled:g,className:u("w-full min-h-[42px] px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",i&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:r.jsx("div",{className:"flex flex-wrap gap-1.5",children:p.length===0?r.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:o}):r.jsxs(r.Fragment,{children:[p.slice(0,l).map(v=>r.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded text-xs font-medium",children:[v.label,r.jsx("button",{onClick:w=>{w.stopPropagation(),S(v.value)},className:"hover:text-blue-900 dark:hover:text-blue-100",children:r.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},v.value)),N>0&&r.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded text-xs font-medium",children:["+",N," more"]})]})})}),i&&r.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[s&&r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{type:"text",value:b,onChange:v=>x(v.target.value),placeholder:n,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:v=>v.stopPropagation()})}),r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:f.length===0?r.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No options found"}):f.map(v=>{const w=e.includes(v.value);return r.jsxs("button",{onClick:()=>!v.disabled&&C(v.value),disabled:v.disabled,className:u("w-full px-3 py-2 text-sm text-left flex items-center gap-2","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:[r.jsx("div",{className:u("w-4 h-4 border-2 rounded flex items-center justify-center",w?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:w&&r.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),r.jsx("span",{className:"flex-1 text-gray-900 dark:text-white",children:v.label})]},v.value)})}),e.length>0&&r.jsxs("div",{className:"p-2 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center",children:[r.jsxs("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:[e.length," selected"]}),r.jsx("button",{onClick:v=>{v.stopPropagation(),a([])},className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:"Clear all"})]})]})]})},Ra=({options:t,value:e,onChange:a,placeholder:o="Select option...",searchPlaceholder:n="Search...",emptyMessage:s="No results found.",disabled:l=!1,className:g})=>{const[c,i]=y.useState(!1),[h,b]=y.useState(""),[x,m]=y.useState(0),f=y.useRef(null),p=y.useRef(null),C=t.filter(v=>v.label.toLowerCase().includes(h.toLowerCase())),S=t.find(v=>v.value===e);y.useEffect(()=>{if(!c)return;const v=w=>{f.current&&!f.current.contains(w.target)&&(i(!1),b(""))};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]),y.useEffect(()=>{c&&p.current&&p.current.focus()},[c]),y.useEffect(()=>{m(0)},[h]);const k=v=>{if(!c){(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),i(!0));return}switch(v.key){case"ArrowDown":v.preventDefault(),m(w=>w<C.length-1?w+1:w);break;case"ArrowUp":v.preventDefault(),m(w=>w>0?w-1:w);break;case"Enter":v.preventDefault(),C[x]&&!C[x].disabled&&(a(C[x].value),i(!1),b(""));break;case"Escape":v.preventDefault(),i(!1),b("");break}},N=(v,w)=>{w||(a(v),i(!1),b(""))};return r.jsxs("div",{ref:f,className:u("relative w-full",g),children:[r.jsxs("button",{type:"button",onClick:()=>!l&&i(!c),onKeyDown:k,disabled:l,className:u("w-full flex items-center justify-between","px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",c&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:u("truncate",!S&&"text-gray-500 dark:text-gray-400"),children:S?S.label:o}),r.jsx("svg",{className:u("w-4 h-4 ml-2 transition-transform",c&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),c&&r.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{ref:p,type:"text",value:h,onChange:v=>b(v.target.value),onKeyDown:k,placeholder:n,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:C.length===0?r.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:s}):C.map((v,w)=>r.jsx("button",{onClick:()=>N(v.value,v.disabled),disabled:v.disabled,className:u("w-full px-3 py-2 text-sm text-left","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",v.value===e?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":w===x?"bg-gray-100 dark:bg-gray-800":"hover:bg-gray-50 dark:hover:bg-gray-800"),children:v.label},v.value))})]})]})};function Sr(t,e){y.useEffect(()=>{const a=o=>{const n=t?.current;!n||n.contains(o?.target||null)||e(o)};return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[t,e])}const eo=({trigger:t,items:e,align:a="right",className:o="",variant:n="default"})=>{const[s,l]=y.useState(!1),g=y.useRef(null);Sr(g,()=>l(!1));const c=b=>{b.disabled||(b.onClick(),l(!1))},i=a==="left"?D.overlays.dropdown.menuRight():D.overlays.dropdown.menuLeft(),h=n==="bordered"?D.overlays.dropdown.triggerBordered():D.overlays.dropdown.trigger();return r.jsxs("div",{className:`${D.overlays.dropdown.container()} ${o}`,ref:g,children:[r.jsx("div",{className:h,onClick:()=>l(!s),children:t}),s&&r.jsx("div",{className:`${D.overlays.dropdown.menu()} ${i} ${D.overlays.dropdown.menuBottom()}`,children:r.jsx("div",{className:D.overlays.dropdown.itemContainer(),children:e.map(b=>b.separator?r.jsx("div",{className:"my-1 h-px bg-gray-200 dark:bg-gray-700",role:"separator"},b.id):r.jsxs("button",{onClick:()=>c(b),disabled:b.disabled,className:`${b.disabled?D.overlays.dropdown.itemDisabled():D.overlays.dropdown.item()} flex items-center gap-2`,children:[b.icon&&r.jsx(b.icon,{className:D.overlays.dropdown.itemIcon()}),r.jsx("span",{children:b.label})]},b.id))})})]})},ro=({options:t,value:e,values:a=[],onChange:o,onValuesChange:n,multiple:s=!1,size:l="md",variant:g="default",className:c})=>{const i=(m,f)=>{if(!f)if(s){const p=a.includes(m)?a.filter(C=>C!==m):[...a,m];n?.(p)}else o?.(m)},h=m=>s?a.includes(m):e===m,b={sm:"text-xs px-2 py-1",md:"text-sm px-3 py-2",lg:"text-base px-4 py-2"},x={default:{base:"bg-gray-100 dark:bg-gray-800",button:"hover:bg-gray-200 dark:hover:bg-gray-700",selected:"bg-white dark:bg-gray-900 shadow-sm"},outline:{base:"border border-gray-200 dark:border-gray-700",button:"hover:bg-gray-50 dark:hover:bg-gray-800",selected:"bg-gray-100 dark:bg-gray-800 border-gray-300 dark:border-gray-600"}};return r.jsx("div",{className:u("inline-flex rounded-lg p-1 gap-1",x[g].base,c),role:"group",children:t.map(m=>{const f=h(m.value);return r.jsxs("button",{onClick:()=>i(m.value,m.disabled),disabled:m.disabled,className:u("inline-flex items-center justify-center gap-2","rounded-md font-medium","transition-all duration-150","disabled:opacity-50 disabled:cursor-not-allowed",b[l],f?x[g].selected:x[g].button,f?"text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400"),"aria-pressed":f,children:[m.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]},m.value)})})},to=({value:t,onChange:e,min:a=0,max:o=100,step:n=1,disabled:s=!1,showValue:l=!1,formatValue:g=f=>String(f),showMinMax:c=!1,minLabel:i,maxLabel:h,variant:b="primary",size:x="md",className:m})=>{const f={sm:"h-1",md:"h-2",lg:"h-3"},p={primary:"accent-blue-600 dark:accent-blue-500",success:"accent-green-600 dark:accent-green-500",warning:"accent-yellow-600 dark:accent-yellow-500",danger:"accent-red-600 dark:accent-red-500"},C=k=>{e(Number(k.target.value))},S=(t-a)/(o-a)*100;return r.jsxs("div",{className:u("w-full",m),children:[l&&r.jsxs("div",{className:"flex justify-between items-center mb-2",children:[r.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:g(t)}),c&&r.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[i||a," - ",h||o]})]}),r.jsxs("div",{className:"relative",children:[r.jsx("div",{className:u("absolute inset-0 rounded-full","bg-gray-200 dark:bg-gray-700",f[x])}),r.jsx("div",{className:u("absolute left-0 rounded-full transition-all","bg-current",p[b],f[x]),style:{width:`${S}%`}}),r.jsx("input",{type:"range",min:a,max:o,step:n,value:t,onChange:C,disabled:s,className:u("relative w-full appearance-none bg-transparent cursor-pointer","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","rounded-lg",f[x],p[b],s&&"opacity-50 cursor-not-allowed","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:w-4","[&::-webkit-slider-thumb]:h-4","[&::-webkit-slider-thumb]:rounded-full","[&::-webkit-slider-thumb]:bg-white","[&::-webkit-slider-thumb]:border-2","[&::-webkit-slider-thumb]:border-current","[&::-webkit-slider-thumb]:shadow-md","[&::-webkit-slider-thumb]:transition-transform","[&::-webkit-slider-thumb]:hover:scale-110","[&::-moz-range-thumb]:w-4","[&::-moz-range-thumb]:h-4","[&::-moz-range-thumb]:rounded-full","[&::-moz-range-thumb]:bg-white","[&::-moz-range-thumb]:border-2","[&::-moz-range-thumb]:border-current","[&::-moz-range-thumb]:shadow-md","[&::-moz-range-thumb]:transition-transform","[&::-moz-range-thumb]:hover:scale-110")})]}),c&&!l&&r.jsxs("div",{className:"flex justify-between mt-1",children:[r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:i||a}),r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:h||o})]})]})},ao=({value:t,onChange:e,min:a=0,max:o=100,step:n=1,showValue:s=!0,className:l})=>r.jsxs("div",{className:u("flex items-center gap-4",l),children:[r.jsx("input",{type:"range",min:a,max:o,step:n,value:t,onChange:g=>e(Number(g.target.value)),className:"flex-1 accent-blue-500"}),s&&r.jsx("span",{className:"w-12 text-center font-semibold text-gray-900 dark:text-white",children:t})]}),oo=({onChange:t,accept:e,multiple:a=!1,maxSize:o,maxFiles:n,disabled:s=!1,showDropZone:l=!1,showFileList:g=!0,files:c=[],onRemove:i,className:h,buttonText:b="Choose Files",dropZoneText:x="Drop files here or click to browse"})=>{const m=y.useRef(null),[f,p]=y.useState(!1),[C,S]=y.useState(null),k=A=>(S(null),n&&c.length+A.length>n?(S(`Maximum ${n} files allowed`),[]):A.filter(P=>o&&P.size>o?(S(`File "${P.name}" exceeds maximum size of ${Be(o)}`),!1):!0)),N=A=>{const z=Array.from(A.target.files||[]),P=k(z);P.length>0&&t(P),m.current&&(m.current.value="")},v=()=>{m.current?.click()},w=A=>{A.preventDefault(),A.stopPropagation(),s||p(!0)},L=A=>{A.preventDefault(),A.stopPropagation(),p(!1)},M=A=>{A.preventDefault(),A.stopPropagation()},I=A=>{if(A.preventDefault(),A.stopPropagation(),p(!1),s)return;const z=Array.from(A.dataTransfer.files),P=k(z);P.length>0&&t(P)},$=A=>{i&&i(A)};return l?r.jsxs("div",{className:u("w-full",h),children:[r.jsx("input",{ref:m,type:"file",onChange:N,accept:e,multiple:a,disabled:s,className:"hidden"}),r.jsx("div",{onClick:v,onDragEnter:w,onDragLeave:L,onDragOver:M,onDrop:I,className:u("relative border-2 border-dashed rounded-lg p-8","transition-colors duration-200","cursor-pointer",f?"border-blue-500 bg-blue-50 dark:bg-blue-900/10":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500",s&&"opacity-50 cursor-not-allowed"),children:r.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[r.jsx(U.CloudArrowUpIcon,{className:"h-12 w-12 text-gray-400 dark:text-gray-500"}),r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 text-center",children:x}),o&&r.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-500",children:["Max file size: ",Be(o)]})]})}),C&&r.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:C}),g&&c.length>0&&r.jsx(Er,{files:c,onRemove:$})]}):r.jsxs("div",{className:u("w-full",h),children:[r.jsx("input",{ref:m,type:"file",onChange:N,accept:e,multiple:a,disabled:s,className:"hidden"}),r.jsxs("button",{type:"button",onClick:v,disabled:s,className:u("inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600","rounded-lg shadow-sm text-sm font-medium","text-gray-700 dark:text-gray-300","bg-white dark:bg-gray-800","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",s&&"opacity-50 cursor-not-allowed"),children:[r.jsx(U.DocumentIcon,{className:"h-5 w-5 mr-2"}),b]}),C&&r.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:C}),g&&c.length>0&&r.jsx(Er,{files:c,onRemove:$})]})},Er=({files:t,onRemove:e})=>r.jsx("div",{className:"mt-3 space-y-2",children:t.map((a,o)=>r.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700",children:[r.jsxs("div",{className:"flex items-center space-x-2 flex-1 min-w-0",children:[r.jsx(U.DocumentIcon,{className:"h-5 w-5 text-gray-400 flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:a.name}),r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:Be(a.size)})]})]}),r.jsx("button",{type:"button",onClick:()=>e(o),className:"flex-shrink-0 p-1 text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors","aria-label":"Remove file",children:r.jsx(U.XMarkIcon,{className:"h-5 w-5"})})]},`${a.name}-${o}`))});function Be(t){if(t===0)return"0 Bytes";const e=1024,a=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(t)/Math.log(e));return Math.round(t/Math.pow(e,o)*100)/100+" "+a[o]}const no=({type:t,size:e="md",colored:a=!0,className:o})=>{const n={xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8"},s=c=>{const i=c.toLowerCase();return i.startsWith("image/")||[".jpg",".jpeg",".png",".gif",".svg",".webp",".ico"].some(h=>i.endsWith(h))?{Icon:U.PhotoIcon,color:"text-blue-600 dark:text-blue-400"}:i.startsWith("video/")||[".mp4",".avi",".mov",".wmv",".flv",".webm"].some(h=>i.endsWith(h))?{Icon:U.FilmIcon,color:"text-purple-600 dark:text-purple-400"}:i.startsWith("audio/")||[".mp3",".wav",".ogg",".m4a",".flac"].some(h=>i.endsWith(h))?{Icon:U.MusicalNoteIcon,color:"text-pink-600 dark:text-pink-400"}:i.includes("pdf")||i.endsWith(".pdf")?{Icon:U.DocumentArrowDownIcon,color:"text-red-600 dark:text-red-400"}:i.includes("word")||i.includes("document")||[".doc",".docx",".odt"].some(h=>i.endsWith(h))?{Icon:U.DocumentTextIcon,color:"text-blue-700 dark:text-blue-300"}:i.includes("excel")||i.includes("spreadsheet")||[".xls",".xlsx",".ods",".csv"].some(h=>i.endsWith(h))?{Icon:U.TableCellsIcon,color:"text-green-600 dark:text-green-400"}:[".js",".ts",".jsx",".tsx",".py",".java",".cpp",".c",".h",".css",".scss",".html",".json",".xml",".yaml",".yml",".sh",".sql"].some(h=>i.endsWith(h))?{Icon:U.CodeBracketIcon,color:"text-gray-700 dark:text-gray-300"}:i.includes("zip")||i.includes("compressed")||i.includes("archive")||[".zip",".rar",".7z",".tar",".gz",".bz2"].some(h=>i.endsWith(h))?{Icon:U.ArchiveBoxIcon,color:"text-yellow-600 dark:text-yellow-400"}:{Icon:U.DocumentIcon,color:"text-gray-600 dark:text-gray-400"}},{Icon:l,color:g}=s(t);return r.jsx(l,{className:u(n[e],a?g:"text-gray-600 dark:text-gray-400",o)})},so=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfileUbrowser",children:e||"UfileUbrowser Component"}),lo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfileUpreview",children:e||"UfileUpreview Component"}),io=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfileUtree",children:e||"UfileUtree Component"}),co=({value:t,onChange:e,placeholder:a="Type and press Enter...",maxTags:o,validate:n,validator:s,separators:l=[],allowDuplicates:g=!1,disabled:c=!1,error:i=!1,errorMessage:h,variant:b="primary",renderTag:x,className:m})=>{const f=n||s,[p,C]=y.useState(""),S=y.useRef(null),k={primary:"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300",success:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",error:"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300"},N=I=>{const $=I.trim();$&&(o&&t.length>=o||!g&&t.includes($)||f&&!f($)||(e([...t,$]),C("")))},v=I=>{e(t.filter(($,A)=>A!==I))},w=I=>{C(I.target.value)},L=I=>{I.key==="Enter"&&(I.preventDefault(),p.trim()&&N(p)),I.key===","&&(I.preventDefault(),p.trim()&&N(p)),l.length>0&&l.includes(I.key)&&I.key!==","&&(I.preventDefault(),p.trim()&&N(p)),I.key==="Backspace"&&!p&&t.length>0&&v(t.length-1),I.key==="Escape"&&C("")},M=o!==void 0&&t.length>=o;return r.jsxs("div",{className:u("w-full",m),children:[r.jsxs("div",{className:u("min-h-[42px] px-3 py-2 flex flex-wrap gap-2 items-center","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus-within:ring-2 focus-within:ring-blue-500 dark:focus-within:ring-blue-400","transition-all",c&&"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800",i&&"border-red-500 dark:border-red-400"),onClick:()=>!c&&S.current?.focus(),children:[t.map((I,$)=>x?r.jsx(y.Fragment,{children:x(I,$,()=>v($))},$):r.jsxs("span",{className:u("inline-flex items-center gap-1.5 px-2.5 py-1",k[b],"text-sm font-medium","rounded-md","transition-colors"),children:[r.jsx("span",{className:"truncate max-w-[200px]",children:I}),r.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),v($)},disabled:c,className:u("flex-shrink-0 hover:text-blue-900 dark:hover:text-blue-100","transition-colors","disabled:cursor-not-allowed"),"aria-label":`Remove ${I}`,children:r.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},$)),r.jsx("input",{ref:S,type:"text",value:p,onChange:w,onKeyDown:L,placeholder:t.length===0?a:M?`Max ${o} tags`:"",disabled:c,className:u("flex-1 min-w-[120px] outline-none bg-transparent","text-sm text-gray-900 dark:text-white","placeholder:text-gray-500 dark:placeholder:text-gray-400","disabled:cursor-not-allowed")})]}),h&&r.jsx("p",{className:"mt-1.5 text-xs text-red-600 dark:text-red-400",children:h}),o&&r.jsxs("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:[t.length," / ",o," tags"]})]})},go=({value:t,onChange:e,mentions:a,trigger:o="@",placeholder:n="Type a message...",disabled:s=!1,className:l})=>{const[g,c]=y.useState(!1),[i,h]=y.useState([]),[b,x]=y.useState(0),[m,f]=y.useState(0),p=y.useRef(null),C=y.useRef(null),S=v=>{const w=v.target.value,L=v.target.selectionStart||0;e(w),f(L);const I=w.substring(0,L).split(/\s/),$=I[I.length-1];if($.startsWith(o)){const A=$.substring(o.length),z=a.filter(P=>P.label.toLowerCase().includes(A.toLowerCase()));h(z),c(z.length>0),x(0)}else c(!1)},k=v=>{const w=t.substring(0,m),L=t.substring(m),M=w.split(/\s/),I=M[M.length-1],$=w.length-I.length,A=t.substring(0,$)+o+v.label+" "+L;if(e(A),c(!1),p.current){const z=$+o.length+v.label.length+1;setTimeout(()=>{p.current?.focus(),p.current?.setSelectionRange(z,z)},0)}},N=v=>{if(g)switch(v.key){case"ArrowDown":v.preventDefault(),x(w=>w<i.length-1?w+1:w);break;case"ArrowUp":v.preventDefault(),x(w=>w>0?w-1:w);break;case"Enter":v.preventDefault(),i[b]&&k(i[b]);break;case"Escape":v.preventDefault(),c(!1);break}};return y.useEffect(()=>{const v=w=>{C.current&&!C.current.contains(w.target)&&p.current&&!p.current.contains(w.target)&&c(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]),r.jsxs("div",{className:u("relative w-full",l),children:[r.jsx("textarea",{ref:p,value:t,onChange:S,onKeyDown:N,placeholder:n,disabled:s,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed","resize-none","min-h-[100px]")}),g&&r.jsx("div",{ref:C,className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-60 overflow-y-auto",children:i.map((v,w)=>r.jsxs("button",{onClick:()=>k(v),className:u("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",w===b&&"bg-blue-50 dark:bg-blue-900/30"),children:[v.avatar&&r.jsx("img",{src:v.avatar,alt:v.label,className:"w-8 h-8 rounded-full"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:v.label}),v.metadata&&r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:v.metadata})]})]},v.id))})]})},uo=V.cva(`${T.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),We=O.forwardRef(({className:t,...e},a)=>r.jsx(xe.Root,{ref:a,className:u(uo(),t),...e}));We.displayName=xe.Root.displayName;const ho=({id:t,label:e,type:a="text",value:o,onChange:n,placeholder:s,helperText:l,error:g,required:c=!1,disabled:i=!1,maxLength:h,autoFocus:b=!1,className:x,inputClassName:m})=>{const f=!!g,p=l||g?`${t}-helper`:void 0;return r.jsxs("div",{className:u("space-y-2",x),children:[r.jsxs(We,{htmlFor:t,children:[e,c&&r.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),r.jsx(Ce,{type:a,id:t,value:o,onChange:n,placeholder:s,disabled:i,maxLength:h,autoFocus:b,required:c,"aria-invalid":f,"aria-describedby":p,className:m}),(l||g)&&r.jsx("p",{id:p,className:u(T.body.sm(),f?"text-red-600 dark:text-red-400":"text-gray-500 dark:text-gray-400"),role:f?"alert":void 0,children:g||l})]})},Ne=({label:t,required:e=!1,error:a,helpText:o,children:n,layout:s="vertical",className:l="",labelClassName:g="",contentClassName:c=""})=>{const i=s==="horizontal";return r.jsxs("div",{className:`${i?"grid grid-cols-1 md:grid-cols-3 gap-4 items-start":"space-y-2"} ${l}`,children:[r.jsxs("div",{className:i?"md:col-span-1":"",children:[r.jsxs("label",{className:`block text-sm font-medium text-gray-700 dark:text-gray-300 ${g}`,children:[t,e&&r.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),o&&!a&&r.jsxs("div",{className:"mt-1 flex items-start",children:[r.jsx(U.InformationCircleIcon,{className:"h-4 w-4 text-gray-400 mr-1 mt-0.5 flex-shrink-0"}),r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:o})]})]}),r.jsxs("div",{className:`${i?"md:col-span-2":""} ${c}`,children:[r.jsx("div",{className:a?"relative":"",children:n}),a&&r.jsxs("div",{className:"mt-1 flex items-start",children:[r.jsx(U.ExclamationCircleIcon,{className:"h-4 w-4 text-red-500 mr-1 mt-0.5 flex-shrink-0"}),r.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:a})]})]})]})},bo=({label:t,value:e,onChange:a,placeholder:o,required:n=!1,error:s,helpText:l,type:g="text",layout:c="vertical",className:i=""})=>r.jsx(Ne,{label:t,required:n,error:s,helpText:l,layout:c,className:i,children:r.jsx("input",{type:g,value:e,onChange:h=>a(h.target.value),placeholder:o,className:`
42
18
  block w-full px-3 py-2 border rounded-md shadow-sm
43
19
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
44
20
  dark:bg-gray-800 dark:border-gray-600 dark:text-white
45
21
  transition-colors duration-200
46
22
  ${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
47
- `})}),li=({label:e,value:t,onChange:r,placeholder:a,required:o=!1,error:s,helpText:i,rows:l=4,layout:c="vertical",className:d=""})=>n.jsx(nt,{label:e,required:o,error:s,helpText:i,layout:c,className:d,children:n.jsx("textarea",{value:t,onChange:g=>r(g.target.value),placeholder:a,rows:l,className:`
23
+ `})}),fo=({label:t,value:e,onChange:a,placeholder:o,required:n=!1,error:s,helpText:l,rows:g=4,layout:c="vertical",className:i=""})=>r.jsx(Ne,{label:t,required:n,error:s,helpText:l,layout:c,className:i,children:r.jsx("textarea",{value:e,onChange:h=>a(h.target.value),placeholder:o,rows:g,className:`
48
24
  block w-full px-3 py-2 border rounded-md shadow-sm
49
25
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
50
26
  dark:bg-gray-800 dark:border-gray-600 dark:text-white
51
27
  transition-colors duration-200 resize-vertical
52
28
  ${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
53
- `})}),ci=({label:e,value:t,onChange:r,options:a,required:o=!1,error:s,helpText:i,placeholder:l="Select an option",layout:c="vertical",className:d=""})=>n.jsx(nt,{label:e,required:o,error:s,helpText:i,layout:c,className:d,children:n.jsxs("select",{value:t,onChange:g=>r(g.target.value),className:`
29
+ `})}),po=({label:t,value:e,onChange:a,options:o,required:n=!1,error:s,helpText:l,placeholder:g="Select an option",layout:c="vertical",className:i=""})=>r.jsx(Ne,{label:t,required:n,error:s,helpText:l,layout:c,className:i,children:r.jsxs("select",{value:e,onChange:h=>a(h.target.value),className:`
54
30
  block w-full px-3 py-2 border rounded-md shadow-sm
55
31
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
56
32
  dark:bg-gray-800 dark:border-gray-600 dark:text-white
57
33
  transition-colors duration-200
58
34
  ${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
59
- `,children:[l&&n.jsx("option",{value:"",disabled:!0,children:l}),a.map(g=>n.jsx("option",{value:g.value,disabled:g.disabled,children:g.label},g.value))]})}),di={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},ui=({status:e,size:t="sm",pulse:r=!1,className:a})=>n.jsx("div",{className:y("rounded-full flex-shrink-0",Ne(e),di[t],r&&"animate-pulse",a)});function ne(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function Gr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gi(...e){return t=>{let r=!1;const a=e.map(o=>{const s=Gr(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<a.length;o++){const s=a[o];typeof s=="function"?s():Gr(e[o],null)}}}}function xe(...e){return S.useCallback(gi(...e),e)}function Kr(e,t=[]){let r=[];function a(s,i){const l=S.createContext(i),c=r.length;r=[...r,i];const d=m=>{const{scope:b,children:f,...p}=m,h=b?.[e]?.[c]||l,w=S.useMemo(()=>p,Object.values(p));return n.jsx(h.Provider,{value:w,children:f})};d.displayName=s+"Provider";function g(m,b){const f=b?.[e]?.[c]||l,p=S.useContext(f);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[d,g]}const o=()=>{const s=r.map(i=>S.createContext(i));return function(l){const c=l?.[e]||s;return S.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[a,mi(o,...t)]}function mi(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=a.reduce((l,{useScope:c,scopeName:d})=>{const m=c(s)[`__scope${d}`];return{...l,...m}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var fi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=fi.reduce((e,t)=>{const r=St.createSlot(`Primitive.${t}`),a=S.forwardRef((o,s)=>{const{asChild:i,...l}=o,c=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(c,{...l,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function pi(e,t){e&&yr.flushSync(()=>e.dispatchEvent(t))}function ot(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...r)=>t.current?.(...r),[])}function hi(e,t=globalThis?.document){const r=ot(e);S.useEffect(()=>{const a=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[r,t])}var bi="DismissableLayer",jt="dismissableLayer.update",yi="dismissableLayer.pointerDownOutside",xi="dismissableLayer.focusOutside",Yr,Qr=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xr=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=e,d=S.useContext(Qr),[g,m]=S.useState(null),b=g?.ownerDocument??globalThis?.document,[,f]=S.useState({}),p=xe(t,I=>m(I)),h=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),C=h.indexOf(w),k=g?h.indexOf(g):-1,N=d.layersWithOutsidePointerEventsDisabled.size>0,P=k>=C,E=ki(I=>{const z=I.target,D=[...d.branches].some(O=>O.contains(z));!P||D||(o?.(I),i?.(I),I.defaultPrevented||l?.())},b),L=Ci(I=>{const z=I.target;[...d.branches].some(O=>O.contains(z))||(s?.(I),i?.(I),I.defaultPrevented||l?.())},b);return hi(I=>{k===d.layers.size-1&&(a?.(I),!I.defaultPrevented&&l&&(I.preventDefault(),l()))},b),S.useEffect(()=>{if(g)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Yr=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(g)),d.layers.add(g),Zr(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Yr)}},[g,b,r,d]),S.useEffect(()=>()=>{g&&(d.layers.delete(g),d.layersWithOutsidePointerEventsDisabled.delete(g),Zr())},[g,d]),S.useEffect(()=>{const I=()=>f({});return document.addEventListener(jt,I),()=>document.removeEventListener(jt,I)},[]),n.jsx(ue.div,{...c,ref:p,style:{pointerEvents:N?P?"auto":"none":void 0,...e.style},onFocusCapture:ne(e.onFocusCapture,L.onFocusCapture),onBlurCapture:ne(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:ne(e.onPointerDownCapture,E.onPointerDownCapture)})});Xr.displayName=bi;var vi="DismissableLayerBranch",wi=S.forwardRef((e,t)=>{const r=S.useContext(Qr),a=S.useRef(null),o=xe(t,a);return S.useEffect(()=>{const s=a.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),n.jsx(ue.div,{...e,ref:o})});wi.displayName=vi;function ki(e,t=globalThis?.document){const r=ot(e),a=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=l=>{if(l.target&&!a.current){let c=function(){Jr(yi,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);a.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>a.current=!0}}function Ci(e,t=globalThis?.document){const r=ot(e),a=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!a.current&&Jr(xi,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function Zr(){const e=new CustomEvent(jt);document.dispatchEvent(e)}function Jr(e,t,r,{discrete:a}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),a?pi(o,s):o.dispatchEvent(s)}var ge=globalThis?.document?S.useLayoutEffect:()=>{},Si=S[" useId ".trim().toString()]||(()=>{}),Ni=0;function Ei(e){const[t,r]=S.useState(Si());return ge(()=>{r(a=>a??String(Ni++))},[e]),t?`radix-${t}`:""}const Ai=["top","right","bottom","left"],me=Math.min,K=Math.max,st=Math.round,it=Math.floor,J=e=>({x:e,y:e}),Pi={left:"right",right:"left",bottom:"top",top:"bottom"},Ti={start:"end",end:"start"};function Ft(e,t,r){return K(e,me(t,r))}function oe(e,t){return typeof e=="function"?e(t):e}function se(e){return e.split("-")[0]}function Ee(e){return e.split("-")[1]}function _t(e){return e==="x"?"y":"x"}function Ht(e){return e==="y"?"height":"width"}const Ii=new Set(["top","bottom"]);function R(e){return Ii.has(se(e))?"y":"x"}function Ut(e){return _t(R(e))}function $i(e,t,r){r===void 0&&(r=!1);const a=Ee(e),o=Ut(e),s=Ht(o);let i=o==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=lt(i)),[i,lt(i)]}function Li(e){const t=lt(e);return[Vt(e),t,Vt(t)]}function Vt(e){return e.replace(/start|end/g,t=>Ti[t])}const Rr=["left","right"],ea=["right","left"],Mi=["top","bottom"],Oi=["bottom","top"];function zi(e,t,r){switch(e){case"top":case"bottom":return r?t?ea:Rr:t?Rr:ea;case"left":case"right":return t?Mi:Oi;default:return[]}}function Di(e,t,r,a){const o=Ee(e);let s=zi(se(e),r==="start",a);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Vt)))),s}function lt(e){return e.replace(/left|right|bottom|top/g,t=>Pi[t])}function Bi(e){return{top:0,right:0,bottom:0,left:0,...e}}function ta(e){return typeof e!="number"?Bi(e):{top:e,right:e,bottom:e,left:e}}function ct(e){const{x:t,y:r,width:a,height:o}=e;return{width:a,height:o,top:r,left:t,right:t+a,bottom:r+o,x:t,y:r}}function ra(e,t,r){let{reference:a,floating:o}=e;const s=R(t),i=Ut(t),l=Ht(i),c=se(t),d=s==="y",g=a.x+a.width/2-o.width/2,m=a.y+a.height/2-o.height/2,b=a[l]/2-o[l]/2;let f;switch(c){case"top":f={x:g,y:a.y-o.height};break;case"bottom":f={x:g,y:a.y+a.height};break;case"right":f={x:a.x+a.width,y:m};break;case"left":f={x:a.x-o.width,y:m};break;default:f={x:a.x,y:a.y}}switch(Ee(t)){case"start":f[i]-=b*(r&&d?-1:1);break;case"end":f[i]+=b*(r&&d?-1:1);break}return f}const Wi=async(e,t,r)=>{const{placement:a="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,l=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:m}=ra(d,a,c),b=a,f={},p=0;for(let h=0;h<l.length;h++){const{name:w,fn:C}=l[h],{x:k,y:N,data:P,reset:E}=await C({x:g,y:m,initialPlacement:a,placement:b,strategy:o,middlewareData:f,rects:d,platform:i,elements:{reference:e,floating:t}});g=k??g,m=N??m,f={...f,[w]:{...f[w],...P}},E&&p<=50&&(p++,typeof E=="object"&&(E.placement&&(b=E.placement),E.rects&&(d=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:g,y:m}=ra(d,b,c)),h=-1)}return{x:g,y:m,placement:b,strategy:o,middlewareData:f}};async function ze(e,t){var r;t===void 0&&(t={});const{x:a,y:o,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:g="viewport",elementContext:m="floating",altBoundary:b=!1,padding:f=0}=oe(t,e),p=ta(f),w=l[b?m==="floating"?"reference":"floating":m],C=ct(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(w)))==null||r?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:g,strategy:c})),k=m==="floating"?{x:a,y:o,width:i.floating.width,height:i.floating.height}:i.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),P=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},E=ct(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:N,strategy:c}):k);return{top:(C.top-E.top+p.top)/P.y,bottom:(E.bottom-C.bottom+p.bottom)/P.y,left:(C.left-E.left+p.left)/P.x,right:(E.right-C.right+p.right)/P.x}}const ji=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:a,placement:o,rects:s,platform:i,elements:l,middlewareData:c}=t,{element:d,padding:g=0}=oe(e,t)||{};if(d==null)return{};const m=ta(g),b={x:r,y:a},f=Ut(o),p=Ht(f),h=await i.getDimensions(d),w=f==="y",C=w?"top":"left",k=w?"bottom":"right",N=w?"clientHeight":"clientWidth",P=s.reference[p]+s.reference[f]-b[f]-s.floating[p],E=b[f]-s.reference[f],L=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let I=L?L[N]:0;(!I||!await(i.isElement==null?void 0:i.isElement(L)))&&(I=l.floating[N]||s.floating[p]);const z=P/2-E/2,D=I/2-h[p]/2-1,O=me(m[C],D),B=me(m[k],D),U=O,W=I-h[p]-B,j=I/2-h[p]/2+z,V=Ft(U,j,W),F=!c.arrow&&Ee(o)!=null&&j!==V&&s.reference[p]/2-(j<U?O:B)-h[p]/2<0,q=F?j<U?j-U:j-W:0;return{[f]:b[f]+q,data:{[f]:V,centerOffset:j-V-q,...F&&{alignmentOffset:q}},reset:F}}}),Fi=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,a;const{placement:o,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:g=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...w}=oe(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const C=se(o),k=R(l),N=se(l)===l,P=await(c.isRTL==null?void 0:c.isRTL(d.floating)),E=b||(N||!h?[lt(l)]:Li(l)),L=p!=="none";!b&&L&&E.push(...Di(l,h,p,P));const I=[l,...E],z=await ze(t,w),D=[];let O=((a=s.flip)==null?void 0:a.overflows)||[];if(g&&D.push(z[C]),m){const j=$i(o,i,P);D.push(z[j[0]],z[j[1]])}if(O=[...O,{placement:o,overflows:D}],!D.every(j=>j<=0)){var B,U;const j=(((B=s.flip)==null?void 0:B.index)||0)+1,V=I[j];if(V&&(!(m==="alignment"?k!==R(V):!1)||O.every(M=>R(M.placement)===k?M.overflows[0]>0:!0)))return{data:{index:j,overflows:O},reset:{placement:V}};let F=(U=O.filter(q=>q.overflows[0]<=0).sort((q,M)=>q.overflows[1]-M.overflows[1])[0])==null?void 0:U.placement;if(!F)switch(f){case"bestFit":{var W;const q=(W=O.filter(M=>{if(L){const G=R(M.placement);return G===k||G==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(G=>G>0).reduce((G,ae)=>G+ae,0)]).sort((M,G)=>M[1]-G[1])[0])==null?void 0:W[0];q&&(F=q);break}case"initialPlacement":F=l;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function aa(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function na(e){return Ai.some(t=>e[t]>=0)}const _i=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:a="referenceHidden",...o}=oe(e,t);switch(a){case"referenceHidden":{const s=await ze(t,{...o,elementContext:"reference"}),i=aa(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:na(i)}}}case"escaped":{const s=await ze(t,{...o,altBoundary:!0}),i=aa(s,r.floating);return{data:{escapedOffsets:i,escaped:na(i)}}}default:return{}}}}},oa=new Set(["left","top"]);async function Hi(e,t){const{placement:r,platform:a,elements:o}=e,s=await(a.isRTL==null?void 0:a.isRTL(o.floating)),i=se(r),l=Ee(r),c=R(r)==="y",d=oa.has(i)?-1:1,g=s&&c?-1:1,m=oe(t,e);let{mainAxis:b,crossAxis:f,alignmentAxis:p}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof p=="number"&&(f=l==="end"?p*-1:p),c?{x:f*g,y:b*d}:{x:b*d,y:f*g}}const Ui=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,a;const{x:o,y:s,placement:i,middlewareData:l}=t,c=await Hi(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(a=l.arrow)!=null&&a.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Vi=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:a,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x:C,y:k}=w;return{x:C,y:k}}},...c}=oe(e,t),d={x:r,y:a},g=await ze(t,c),m=R(se(o)),b=_t(m);let f=d[b],p=d[m];if(s){const w=b==="y"?"top":"left",C=b==="y"?"bottom":"right",k=f+g[w],N=f-g[C];f=Ft(k,f,N)}if(i){const w=m==="y"?"top":"left",C=m==="y"?"bottom":"right",k=p+g[w],N=p-g[C];p=Ft(k,p,N)}const h=l.fn({...t,[b]:f,[m]:p});return{...h,data:{x:h.x-r,y:h.y-a,enabled:{[b]:s,[m]:i}}}}}},qi=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:a,placement:o,rects:s,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=oe(e,t),g={x:r,y:a},m=R(o),b=_t(m);let f=g[b],p=g[m];const h=oe(l,t),w=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const N=b==="y"?"height":"width",P=s.reference[b]-s.floating[N]+w.mainAxis,E=s.reference[b]+s.reference[N]-w.mainAxis;f<P?f=P:f>E&&(f=E)}if(d){var C,k;const N=b==="y"?"width":"height",P=oa.has(se(o)),E=s.reference[m]-s.floating[N]+(P&&((C=i.offset)==null?void 0:C[m])||0)+(P?0:w.crossAxis),L=s.reference[m]+s.reference[N]+(P?0:((k=i.offset)==null?void 0:k[m])||0)-(P?w.crossAxis:0);p<E?p=E:p>L&&(p=L)}return{[b]:f,[m]:p}}}},Gi=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,a;const{placement:o,rects:s,platform:i,elements:l}=t,{apply:c=()=>{},...d}=oe(e,t),g=await ze(t,d),m=se(o),b=Ee(o),f=R(o)==="y",{width:p,height:h}=s.floating;let w,C;m==="top"||m==="bottom"?(w=m,C=b===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(C=m,w=b==="end"?"top":"bottom");const k=h-g.top-g.bottom,N=p-g.left-g.right,P=me(h-g[w],k),E=me(p-g[C],N),L=!t.middlewareData.shift;let I=P,z=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(z=N),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(I=k),L&&!b){const O=K(g.left,0),B=K(g.right,0),U=K(g.top,0),W=K(g.bottom,0);f?z=p-2*(O!==0||B!==0?O+B:K(g.left,g.right)):I=h-2*(U!==0||W!==0?U+W:K(g.top,g.bottom))}await c({...t,availableWidth:z,availableHeight:I});const D=await i.getDimensions(l.floating);return p!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function dt(){return typeof window<"u"}function Ae(e){return sa(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ee(e){var t;return(t=(sa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sa(e){return dt()?e instanceof Node||e instanceof Y(e).Node:!1}function Q(e){return dt()?e instanceof Element||e instanceof Y(e).Element:!1}function te(e){return dt()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function ia(e){return!dt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}const Ki=new Set(["inline","contents"]);function De(e){const{overflow:t,overflowX:r,overflowY:a,display:o}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+r)&&!Ki.has(o)}const Yi=new Set(["table","td","th"]);function Qi(e){return Yi.has(Ae(e))}const Xi=[":popover-open",":modal"];function ut(e){return Xi.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zi=["transform","translate","scale","rotate","perspective"],Ji=["transform","translate","scale","rotate","perspective","filter"],Ri=["paint","layout","strict","content"];function qt(e){const t=Gt(),r=Q(e)?X(e):e;return Zi.some(a=>r[a]?r[a]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Ji.some(a=>(r.willChange||"").includes(a))||Ri.some(a=>(r.contain||"").includes(a))}function el(e){let t=fe(e);for(;te(t)&&!Pe(t);){if(qt(t))return t;if(ut(t))return null;t=fe(t)}return null}function Gt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tl=new Set(["html","body","#document"]);function Pe(e){return tl.has(Ae(e))}function X(e){return Y(e).getComputedStyle(e)}function gt(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fe(e){if(Ae(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ia(e)&&e.host||ee(e);return ia(t)?t.host:t}function la(e){const t=fe(e);return Pe(t)?e.ownerDocument?e.ownerDocument.body:e.body:te(t)&&De(t)?t:la(t)}function Be(e,t,r){var a;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=la(e),s=o===((a=e.ownerDocument)==null?void 0:a.body),i=Y(o);if(s){const l=Kt(i);return t.concat(i,i.visualViewport||[],De(o)?o:[],l&&r?Be(l):[])}return t.concat(o,Be(o,[],r))}function Kt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ca(e){const t=X(e);let r=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const o=te(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:a,l=st(r)!==s||st(a)!==i;return l&&(r=s,a=i),{width:r,height:a,$:l}}function Yt(e){return Q(e)?e:e.contextElement}function Te(e){const t=Yt(e);if(!te(t))return J(1);const r=t.getBoundingClientRect(),{width:a,height:o,$:s}=ca(t);let i=(s?st(r.width):r.width)/a,l=(s?st(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const rl=J(0);function da(e){const t=Y(e);return!Gt()||!t.visualViewport?rl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function al(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Y(e)?!1:t}function ve(e,t,r,a){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Yt(e);let i=J(1);t&&(a?Q(a)&&(i=Te(a)):i=Te(e));const l=al(s,r,a)?da(s):J(0);let c=(o.left+l.x)/i.x,d=(o.top+l.y)/i.y,g=o.width/i.x,m=o.height/i.y;if(s){const b=Y(s),f=a&&Q(a)?Y(a):a;let p=b,h=Kt(p);for(;h&&a&&f!==p;){const w=Te(h),C=h.getBoundingClientRect(),k=X(h),N=C.left+(h.clientLeft+parseFloat(k.paddingLeft))*w.x,P=C.top+(h.clientTop+parseFloat(k.paddingTop))*w.y;c*=w.x,d*=w.y,g*=w.x,m*=w.y,c+=N,d+=P,p=Y(h),h=Kt(p)}}return ct({width:g,height:m,x:c,y:d})}function mt(e,t){const r=gt(e).scrollLeft;return t?t.left+r:ve(ee(e)).left+r}function ua(e,t){const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-mt(e,r),o=r.top+t.scrollTop;return{x:a,y:o}}function nl(e){let{elements:t,rect:r,offsetParent:a,strategy:o}=e;const s=o==="fixed",i=ee(a),l=t?ut(t.floating):!1;if(a===i||l&&s)return r;let c={scrollLeft:0,scrollTop:0},d=J(1);const g=J(0),m=te(a);if((m||!m&&!s)&&((Ae(a)!=="body"||De(i))&&(c=gt(a)),te(a))){const f=ve(a);d=Te(a),g.x=f.x+a.clientLeft,g.y=f.y+a.clientTop}const b=i&&!m&&!s?ua(i,c):J(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+g.x+b.x,y:r.y*d.y-c.scrollTop*d.y+g.y+b.y}}function ol(e){return Array.from(e.getClientRects())}function sl(e){const t=ee(e),r=gt(e),a=e.ownerDocument.body,o=K(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),s=K(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let i=-r.scrollLeft+mt(e);const l=-r.scrollTop;return X(a).direction==="rtl"&&(i+=K(t.clientWidth,a.clientWidth)-o),{width:o,height:s,x:i,y:l}}const ga=25;function il(e,t){const r=Y(e),a=ee(e),o=r.visualViewport;let s=a.clientWidth,i=a.clientHeight,l=0,c=0;if(o){s=o.width,i=o.height;const g=Gt();(!g||g&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const d=mt(a);if(d<=0){const g=a.ownerDocument,m=g.body,b=getComputedStyle(m),f=g.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,p=Math.abs(a.clientWidth-m.clientWidth-f);p<=ga&&(s-=p)}else d<=ga&&(s+=d);return{width:s,height:i,x:l,y:c}}const ll=new Set(["absolute","fixed"]);function cl(e,t){const r=ve(e,!0,t==="fixed"),a=r.top+e.clientTop,o=r.left+e.clientLeft,s=te(e)?Te(e):J(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=o*s.x,d=a*s.y;return{width:i,height:l,x:c,y:d}}function ma(e,t,r){let a;if(t==="viewport")a=il(e,r);else if(t==="document")a=sl(ee(e));else if(Q(t))a=cl(t,r);else{const o=da(e);a={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ct(a)}function fa(e,t){const r=fe(e);return r===t||!Q(r)||Pe(r)?!1:X(r).position==="fixed"||fa(r,t)}function dl(e,t){const r=t.get(e);if(r)return r;let a=Be(e,[],!1).filter(l=>Q(l)&&Ae(l)!=="body"),o=null;const s=X(e).position==="fixed";let i=s?fe(e):e;for(;Q(i)&&!Pe(i);){const l=X(i),c=qt(i);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&ll.has(o.position)||De(i)&&!c&&fa(e,i))?a=a.filter(g=>g!==i):o=l,i=fe(i)}return t.set(e,a),a}function ul(e){let{element:t,boundary:r,rootBoundary:a,strategy:o}=e;const i=[...r==="clippingAncestors"?ut(t)?[]:dl(t,this._c):[].concat(r),a],l=i[0],c=i.reduce((d,g)=>{const m=ma(t,g,o);return d.top=K(m.top,d.top),d.right=me(m.right,d.right),d.bottom=me(m.bottom,d.bottom),d.left=K(m.left,d.left),d},ma(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function gl(e){const{width:t,height:r}=ca(e);return{width:t,height:r}}function ml(e,t,r){const a=te(t),o=ee(t),s=r==="fixed",i=ve(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=J(0);function d(){c.x=mt(o)}if(a||!a&&!s)if((Ae(t)!=="body"||De(o))&&(l=gt(t)),a){const f=ve(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else o&&d();s&&!a&&o&&d();const g=o&&!a&&!s?ua(o,l):J(0),m=i.left+l.scrollLeft-c.x-g.x,b=i.top+l.scrollTop-c.y-g.y;return{x:m,y:b,width:i.width,height:i.height}}function Qt(e){return X(e).position==="static"}function pa(e,t){if(!te(e)||X(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ee(e)===r&&(r=r.ownerDocument.body),r}function ha(e,t){const r=Y(e);if(ut(e))return r;if(!te(e)){let o=fe(e);for(;o&&!Pe(o);){if(Q(o)&&!Qt(o))return o;o=fe(o)}return r}let a=pa(e,t);for(;a&&Qi(a)&&Qt(a);)a=pa(a,t);return a&&Pe(a)&&Qt(a)&&!qt(a)?r:a||el(e)||r}const fl=async function(e){const t=this.getOffsetParent||ha,r=this.getDimensions,a=await r(e.floating);return{reference:ml(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function pl(e){return X(e).direction==="rtl"}const hl={convertOffsetParentRelativeRectToViewportRelativeRect:nl,getDocumentElement:ee,getClippingRect:ul,getOffsetParent:ha,getElementRects:fl,getClientRects:ol,getDimensions:gl,getScale:Te,isElement:Q,isRTL:pl};function ba(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bl(e,t){let r=null,a;const o=ee(e);function s(){var l;clearTimeout(a),(l=r)==null||l.disconnect(),r=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const d=e.getBoundingClientRect(),{left:g,top:m,width:b,height:f}=d;if(l||t(),!b||!f)return;const p=it(m),h=it(o.clientWidth-(g+b)),w=it(o.clientHeight-(m+f)),C=it(g),N={rootMargin:-p+"px "+-h+"px "+-w+"px "+-C+"px",threshold:K(0,me(1,c))||1};let P=!0;function E(L){const I=L[0].intersectionRatio;if(I!==c){if(!P)return i();I?i(!1,I):a=setTimeout(()=>{i(!1,1e-7)},1e3)}I===1&&!ba(d,e.getBoundingClientRect())&&i(),P=!1}try{r=new IntersectionObserver(E,{...N,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,N)}r.observe(e)}return i(!0),s}function yl(e,t,r,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=a,d=Yt(e),g=o||s?[...d?Be(d):[],...Be(t)]:[];g.forEach(C=>{o&&C.addEventListener("scroll",r,{passive:!0}),s&&C.addEventListener("resize",r)});const m=d&&l?bl(d,r):null;let b=-1,f=null;i&&(f=new ResizeObserver(C=>{let[k]=C;k&&k.target===d&&f&&(f.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var N;(N=f)==null||N.observe(t)})),r()}),d&&!c&&f.observe(d),f.observe(t));let p,h=c?ve(e):null;c&&w();function w(){const C=ve(e);h&&!ba(h,C)&&r(),h=C,p=requestAnimationFrame(w)}return r(),()=>{var C;g.forEach(k=>{o&&k.removeEventListener("scroll",r),s&&k.removeEventListener("resize",r)}),m?.(),(C=f)==null||C.disconnect(),f=null,c&&cancelAnimationFrame(p)}}const xl=Ui,vl=Vi,wl=Fi,kl=Gi,Cl=_i,ya=ji,Sl=qi,Nl=(e,t,r)=>{const a=new Map,o={platform:hl,...r},s={...o.platform,_c:a};return Wi(e,t,{...o,platform:s})};var El=typeof document<"u",Al=function(){},ft=El?x.useLayoutEffect:Al;function pt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,a,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(a=r;a--!==0;)if(!pt(e[a],t[a]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(a=r;a--!==0;)if(!{}.hasOwnProperty.call(t,o[a]))return!1;for(a=r;a--!==0;){const s=o[a];if(!(s==="_owner"&&e.$$typeof)&&!pt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function xa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function va(e,t){const r=xa(e);return Math.round(t*r)/r}function Xt(e){const t=S.useRef(e);return ft(()=>{t.current=e}),t}function Pl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:a=[],platform:o,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[g,m]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[b,f]=S.useState(a);pt(b,a)||f(a);const[p,h]=S.useState(null),[w,C]=S.useState(null),k=S.useCallback(M=>{M!==L.current&&(L.current=M,h(M))},[]),N=S.useCallback(M=>{M!==I.current&&(I.current=M,C(M))},[]),P=s||p,E=i||w,L=S.useRef(null),I=S.useRef(null),z=S.useRef(g),D=c!=null,O=Xt(c),B=Xt(o),U=Xt(d),W=S.useCallback(()=>{if(!L.current||!I.current)return;const M={placement:t,strategy:r,middleware:b};B.current&&(M.platform=B.current),Nl(L.current,I.current,M).then(G=>{const ae={...G,isPositioned:U.current!==!1};j.current&&!pt(z.current,ae)&&(z.current=ae,yr.flushSync(()=>{m(ae)}))})},[b,t,r,B,U]);ft(()=>{d===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,m(M=>({...M,isPositioned:!1})))},[d]);const j=S.useRef(!1);ft(()=>(j.current=!0,()=>{j.current=!1}),[]),ft(()=>{if(P&&(L.current=P),E&&(I.current=E),P&&E){if(O.current)return O.current(P,E,W);W()}},[P,E,W,O,D]);const V=S.useMemo(()=>({reference:L,floating:I,setReference:k,setFloating:N}),[k,N]),F=S.useMemo(()=>({reference:P,floating:E}),[P,E]),q=S.useMemo(()=>{const M={position:r,left:0,top:0};if(!F.floating)return M;const G=va(F.floating,g.x),ae=va(F.floating,g.y);return l?{...M,transform:"translate("+G+"px, "+ae+"px)",...xa(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:G,top:ae}},[r,l,F.floating,g.x,g.y]);return S.useMemo(()=>({...g,update:W,refs:V,elements:F,floatingStyles:q}),[g,W,V,F,q])}const Tl=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:a,padding:o}=typeof e=="function"?e(r):e;return a&&t(a)?a.current!=null?ya({element:a.current,padding:o}).fn(r):{}:a?ya({element:a,padding:o}).fn(r):{}}}},Il=(e,t)=>({...xl(e),options:[e,t]}),$l=(e,t)=>({...vl(e),options:[e,t]}),Ll=(e,t)=>({...Sl(e),options:[e,t]}),Ml=(e,t)=>({...wl(e),options:[e,t]}),Ol=(e,t)=>({...kl(e),options:[e,t]}),zl=(e,t)=>({...Cl(e),options:[e,t]}),Dl=(e,t)=>({...Tl(e),options:[e,t]});var Bl="Arrow",wa=S.forwardRef((e,t)=>{const{children:r,width:a=10,height:o=5,...s}=e;return n.jsx(ue.svg,{...s,ref:t,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:n.jsx("polygon",{points:"0,0 30,0 15,10"})})});wa.displayName=Bl;var Wl=wa;function jl(e){const[t,r]=S.useState(void 0);return ge(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,l;if("borderBoxSize"in s){const c=s.borderBoxSize,d=Array.isArray(c)?c[0]:c;i=d.inlineSize,l=d.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else r(void 0)},[e]),t}var Zt="Popper",[ka,Ca]=Kr(Zt),[Fl,Sa]=ka(Zt),Na=e=>{const{__scopePopper:t,children:r}=e,[a,o]=S.useState(null);return n.jsx(Fl,{scope:t,anchor:a,onAnchorChange:o,children:r})};Na.displayName=Zt;var Ea="PopperAnchor",Aa=S.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:a,...o}=e,s=Sa(Ea,r),i=S.useRef(null),l=xe(t,i),c=S.useRef(null);return S.useEffect(()=>{const d=c.current;c.current=a?.current||i.current,d!==c.current&&s.onAnchorChange(c.current)}),a?null:n.jsx(ue.div,{...o,ref:l})});Aa.displayName=Ea;var Jt="PopperContent",[_l,Hl]=ka(Jt),Pa=S.forwardRef((e,t)=>{const{__scopePopper:r,side:a="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:g=0,sticky:m="partial",hideWhenDetached:b=!1,updatePositionStrategy:f="optimized",onPlaced:p,...h}=e,w=Sa(Jt,r),[C,k]=S.useState(null),N=xe(t,Ye=>k(Ye)),[P,E]=S.useState(null),L=jl(P),I=L?.width??0,z=L?.height??0,D=a+(s!=="center"?"-"+s:""),O=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},B=Array.isArray(d)?d:[d],U=B.length>0,W={padding:O,boundary:B.filter(Vl),altBoundary:U},{refs:j,floatingStyles:V,placement:F,isPositioned:q,middlewareData:M}=Pl({strategy:"fixed",placement:D,whileElementsMounted:(...Ye)=>yl(...Ye,{animationFrame:f==="always"}),elements:{reference:w.anchor},middleware:[Il({mainAxis:o+z,alignmentAxis:i}),c&&$l({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Ll():void 0,...W}),c&&Ml({...W}),Ol({...W,apply:({elements:Ye,rects:pn,availableWidth:Ku,availableHeight:Yu})=>{const{width:Qu,height:Xu}=pn.reference,Ct=Ye.floating.style;Ct.setProperty("--radix-popper-available-width",`${Ku}px`),Ct.setProperty("--radix-popper-available-height",`${Yu}px`),Ct.setProperty("--radix-popper-anchor-width",`${Qu}px`),Ct.setProperty("--radix-popper-anchor-height",`${Xu}px`)}}),P&&Dl({element:P,padding:l}),ql({arrowWidth:I,arrowHeight:z}),b&&zl({strategy:"referenceHidden",...W})]}),[G,ae]=$a(F),fn=ot(p);ge(()=>{q&&fn?.()},[q,fn]);const Hu=M.arrow?.x,Uu=M.arrow?.y,Vu=M.arrow?.centerOffset!==0,[qu,Gu]=S.useState();return ge(()=>{C&&Gu(window.getComputedStyle(C).zIndex)},[C]),n.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:q?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:qu,"--radix-popper-transform-origin":[M.transformOrigin?.x,M.transformOrigin?.y].join(" "),...M.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:n.jsx(_l,{scope:r,placedSide:G,onArrowChange:E,arrowX:Hu,arrowY:Uu,shouldHideArrow:Vu,children:n.jsx(ue.div,{"data-side":G,"data-align":ae,...h,ref:N,style:{...h.style,animation:q?void 0:"none"}})})})});Pa.displayName=Jt;var Ta="PopperArrow",Ul={top:"bottom",right:"left",bottom:"top",left:"right"},Ia=S.forwardRef(function(t,r){const{__scopePopper:a,...o}=t,s=Hl(Ta,a),i=Ul[s.placedSide];return n.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:n.jsx(Wl,{...o,ref:r,style:{...o.style,display:"block"}})})});Ia.displayName=Ta;function Vl(e){return e!==null}var ql=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:a,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[d,g]=$a(r),m={start:"0%",center:"50%",end:"100%"}[g],b=(o.arrow?.x??0)+l/2,f=(o.arrow?.y??0)+c/2;let p="",h="";return d==="bottom"?(p=i?m:`${b}px`,h=`${-c}px`):d==="top"?(p=i?m:`${b}px`,h=`${a.floating.height+c}px`):d==="right"?(p=`${-c}px`,h=i?m:`${f}px`):d==="left"&&(p=`${a.floating.width+c}px`,h=i?m:`${f}px`),{data:{x:p,y:h}}}});function $a(e){const[t,r="center"]=e.split("-");return[t,r]}var Gl=Na,Kl=Aa,Yl=Pa,Ql=Ia,Xl="Portal",La=S.forwardRef((e,t)=>{const{container:r,...a}=e,[o,s]=S.useState(!1);ge(()=>s(!0),[]);const i=r||o&&globalThis?.document?.body;return i?Qe.createPortal(n.jsx(ue.div,{...a,ref:t}),i):null});La.displayName=Xl;function Zl(e,t){return S.useReducer((r,a)=>t[r][a]??r,e)}var Rt=e=>{const{present:t,children:r}=e,a=Jl(t),o=typeof r=="function"?r({present:a.isPresent}):S.Children.only(r),s=xe(a.ref,Rl(o));return typeof r=="function"||a.isPresent?S.cloneElement(o,{ref:s}):null};Rt.displayName="Presence";function Jl(e){const[t,r]=S.useState(),a=S.useRef(null),o=S.useRef(e),s=S.useRef("none"),i=e?"mounted":"unmounted",[l,c]=Zl(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const d=ht(a.current);s.current=l==="mounted"?d:"none"},[l]),ge(()=>{const d=a.current,g=o.current;if(g!==e){const b=s.current,f=ht(d);e?c("MOUNT"):f==="none"||d?.display==="none"?c("UNMOUNT"):c(g&&b!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ge(()=>{if(t){let d;const g=t.ownerDocument.defaultView??window,m=f=>{const h=ht(a.current).includes(CSS.escape(f.animationName));if(f.target===t&&h&&(c("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",d=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},b=f=>{f.target===t&&(s.current=ht(a.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{g.clearTimeout(d),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:S.useCallback(d=>{a.current=d?getComputedStyle(d):null,r(d)},[])}}function ht(e){return e?.animationName||"none"}function Rl(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ec=S[" useInsertionEffect ".trim().toString()]||ge;function tc({prop:e,defaultProp:t,onChange:r=()=>{},caller:a}){const[o,s,i]=rc({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:o;{const g=S.useRef(e!==void 0);S.useEffect(()=>{const m=g.current;m!==l&&console.warn(`${a} is changing from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=l},[l,a])}const d=S.useCallback(g=>{if(l){const m=ac(g)?g(e):g;m!==e&&i.current?.(m)}else s(g)},[l,e,s,i]);return[c,d]}function rc({defaultProp:e,onChange:t}){const[r,a]=S.useState(e),o=S.useRef(r),s=S.useRef(t);return ec(()=>{s.current=t},[t]),S.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,a,s]}function ac(e){return typeof e=="function"}var nc=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),oc="VisuallyHidden",Ma=S.forwardRef((e,t)=>n.jsx(ue.span,{...e,ref:t,style:{...nc,...e.style}}));Ma.displayName=oc;var sc=Ma,[bt]=Kr("Tooltip",[Ca]),yt=Ca(),Oa="TooltipProvider",ic=700,er="tooltip.open",[lc,tr]=bt(Oa),za=e=>{const{__scopeTooltip:t,delayDuration:r=ic,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:s}=e,i=S.useRef(!0),l=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),n.jsx(lc,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,a)},[a]),isPointerInTransitRef:l,onPointerInTransitChange:S.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:s})};za.displayName=Oa;var We="Tooltip",[cc,je]=bt(We),Da=e=>{const{__scopeTooltip:t,children:r,open:a,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:l}=e,c=tr(We,e.__scopeTooltip),d=yt(t),[g,m]=S.useState(null),b=Ei(),f=S.useRef(0),p=i??c.disableHoverableContent,h=l??c.delayDuration,w=S.useRef(!1),[C,k]=tc({prop:a,defaultProp:o??!1,onChange:I=>{I?(c.onOpen(),document.dispatchEvent(new CustomEvent(er))):c.onClose(),s?.(I)},caller:We}),N=S.useMemo(()=>C?w.current?"delayed-open":"instant-open":"closed",[C]),P=S.useCallback(()=>{window.clearTimeout(f.current),f.current=0,w.current=!1,k(!0)},[k]),E=S.useCallback(()=>{window.clearTimeout(f.current),f.current=0,k(!1)},[k]),L=S.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{w.current=!0,k(!0),f.current=0},h)},[h,k]);return S.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),n.jsx(Gl,{...d,children:n.jsx(cc,{scope:t,contentId:b,open:C,stateAttribute:N,trigger:g,onTriggerChange:m,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?L():P()},[c.isOpenDelayedRef,L,P]),onTriggerLeave:S.useCallback(()=>{p?E():(window.clearTimeout(f.current),f.current=0)},[E,p]),onOpen:P,onClose:E,disableHoverableContent:p,children:r})})};Da.displayName=We;var rr="TooltipTrigger",Ba=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...a}=e,o=je(rr,r),s=tr(rr,r),i=yt(r),l=S.useRef(null),c=xe(t,l,o.onTriggerChange),d=S.useRef(!1),g=S.useRef(!1),m=S.useCallback(()=>d.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),n.jsx(Kl,{asChild:!0,...i,children:n.jsx(ue.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:c,onPointerMove:ne(e.onPointerMove,b=>{b.pointerType!=="touch"&&!g.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),g.current=!0)}),onPointerLeave:ne(e.onPointerLeave,()=>{o.onTriggerLeave(),g.current=!1}),onPointerDown:ne(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:ne(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:ne(e.onBlur,o.onClose),onClick:ne(e.onClick,o.onClose)})})});Ba.displayName=rr;var ar="TooltipPortal",[dc,uc]=bt(ar,{forceMount:void 0}),Wa=e=>{const{__scopeTooltip:t,forceMount:r,children:a,container:o}=e,s=je(ar,t);return n.jsx(dc,{scope:t,forceMount:r,children:n.jsx(Rt,{present:r||s.open,children:n.jsx(La,{asChild:!0,container:o,children:a})})})};Wa.displayName=ar;var Ie="TooltipContent",ja=S.forwardRef((e,t)=>{const r=uc(Ie,e.__scopeTooltip),{forceMount:a=r.forceMount,side:o="top",...s}=e,i=je(Ie,e.__scopeTooltip);return n.jsx(Rt,{present:a||i.open,children:i.disableHoverableContent?n.jsx(Fa,{side:o,...s,ref:t}):n.jsx(gc,{side:o,...s,ref:t})})}),gc=S.forwardRef((e,t)=>{const r=je(Ie,e.__scopeTooltip),a=tr(Ie,e.__scopeTooltip),o=S.useRef(null),s=xe(t,o),[i,l]=S.useState(null),{trigger:c,onClose:d}=r,g=o.current,{onPointerInTransitChange:m}=a,b=S.useCallback(()=>{l(null),m(!1)},[m]),f=S.useCallback((p,h)=>{const w=p.currentTarget,C={x:p.clientX,y:p.clientY},k=hc(C,w.getBoundingClientRect()),N=bc(C,k),P=yc(h.getBoundingClientRect()),E=vc([...N,...P]);l(E),m(!0)},[m]);return S.useEffect(()=>()=>b(),[b]),S.useEffect(()=>{if(c&&g){const p=w=>f(w,g),h=w=>f(w,c);return c.addEventListener("pointerleave",p),g.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",p),g.removeEventListener("pointerleave",h)}}},[c,g,f,b]),S.useEffect(()=>{if(i){const p=h=>{const w=h.target,C={x:h.clientX,y:h.clientY},k=c?.contains(w)||g?.contains(w),N=!xc(C,i);k?b():N&&(b(),d())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[c,g,i,d,b]),n.jsx(Fa,{...e,ref:s})}),[mc,fc]=bt(We,{isInside:!1}),pc=St.createSlottable("TooltipContent"),Fa=S.forwardRef((e,t)=>{const{__scopeTooltip:r,children:a,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=e,c=je(Ie,r),d=yt(r),{onClose:g}=c;return S.useEffect(()=>(document.addEventListener(er,g),()=>document.removeEventListener(er,g)),[g]),S.useEffect(()=>{if(c.trigger){const m=b=>{b.target?.contains(c.trigger)&&g()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,g]),n.jsx(Xr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:g,children:n.jsxs(Yl,{"data-state":c.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[n.jsx(pc,{children:a}),n.jsx(mc,{scope:r,isInside:!0,children:n.jsx(sc,{id:c.contentId,role:"tooltip",children:o||a})})]})})});ja.displayName=Ie;var _a="TooltipArrow",Ha=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...a}=e,o=yt(r);return fc(_a,r).isInside?null:n.jsx(Ql,{...o,...a,ref:t})});Ha.displayName=_a;function hc(e,t){const r=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,a,o,s)){case s:return"left";case o:return"right";case r:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function bc(e,t,r=5){const a=[];switch(t){case"top":a.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":a.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":a.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":a.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return a}function yc(e){const{top:t,right:r,bottom:a,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:a},{x:o,y:a}]}function xc(e,t){const{x:r,y:a}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],c=t[i],d=l.x,g=l.y,m=c.x,b=c.y;g>a!=b>a&&r<(m-d)*(a-g)/(b-g)+d&&(o=!o)}return o}function vc(e){const t=e.slice();return t.sort((r,a)=>r.x<a.x?-1:r.x>a.x?1:r.y<a.y?-1:r.y>a.y?1:0),wc(t)}function wc(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const o=e[a];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let a=e.length-1;a>=0;a--){const o=e[a];for(;r.length>=2;){const s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var kc=za,Cc=Da,Sc=Ba,Nc=Wa,Ec=ja,Ac=Ha;const Pc={operational:{color:"bg-green-500/80",hoverColor:"hover:bg-green-500",label:"All systems operational"},degraded:{color:"bg-yellow-500/80",hoverColor:"hover:bg-yellow-500",label:"Degraded performance"},"major-outage":{color:"bg-red-500/80",hoverColor:"hover:bg-red-500",label:"Major outage"}},Tc={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},Ic=({statusPageUrl:e="/status",apiEndpoint:t,refreshInterval:r=6e4,size:a="sm",className:o,version:s,onStatusChange:i,isNetworkOnline:l=!0})=>{const[c,d]=x.useState({status:"operational",version:s||"1.0.0",message:"All systems operational"}),[g,m]=x.useState(!1);x.useEffect(()=>{const w=async()=>{if(t){m(!0);try{const C=await fetch(t);if(C.ok){const k=await C.json();let N;k.status?.indicator?N={status:{none:"operational",minor:"degraded",major:"major-outage",critical:"major-outage"}[k.status.indicator]||"operational",version:s,message:k.status.description}:N=k,d(N),i?.(N)}}catch{}finally{m(!1)}}};if(w(),r>0){const C=setInterval(w,r);return()=>clearInterval(C)}},[t,r,i,s]);const b=l?c.status:"major-outage",f=Pc[b],p=w=>{if(w.preventDefault(),!l){window.alert("Network is not available. Please check your internet connection and try again later.");return}window.open(e,"_blank","noopener,noreferrer")},h=n.jsx("div",{className:"text-xs",children:l?n.jsxs(n.Fragment,{children:[c.version&&n.jsxs("div",{className:"font-semibold mb-1",children:["Version ",c.version]}),n.jsx("div",{children:c.message||f.label}),c.incidents&&c.incidents.length>0&&n.jsxs("div",{className:"mt-2 text-[10px] opacity-90",children:[n.jsx("div",{className:"font-medium",children:"Current incidents:"}),n.jsx("ul",{className:"list-disc list-inside",children:c.incidents.map((w,C)=>n.jsx("li",{children:w},C))})]})]}):n.jsx("div",{children:"Network unavailable"})});return n.jsx(kc,{delayDuration:200,children:n.jsxs(Cc,{children:[n.jsx(Sc,{asChild:!0,children:n.jsx("button",{onClick:p,className:y("rounded-full flex-shrink-0 transition-all duration-200 cursor-pointer","ring-offset-2 focus:outline-none focus:ring-2 focus:ring-offset-2",f.color,f.hoverColor,Tc[a],(g||!l)&&"animate-pulse",o),"aria-label":`System status: ${f.label}`})}),n.jsx(Nc,{children:n.jsxs(Ec,{className:"z-50 overflow-hidden rounded-md bg-gray-900 dark:bg-gray-800 px-3 py-2 text-white shadow-md animate-in fade-in-0 zoom-in-95",sideOffset:5,children:[h,n.jsx(Ac,{className:"fill-gray-900 dark:fill-gray-800"})]})})]})})},$c={sm:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},md:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},lg:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"}},Lc=({icon:e,text:t,variant:r="default",size:a="md",className:o})=>{const{container:s,icon:i}=Uo(r),l=$c[a];return n.jsxs("div",{className:y("inline-flex items-center rounded-full mb-6",s,l.container,o),children:[n.jsx("div",{className:y("animate-float-icon",i,l.icon),children:e}),n.jsx("span",{className:l.text,children:t})]})},Mc=_.cva("",{variants:{variant:{hero:T.heading.display.hero(),display:T.heading.display.lg(),h1:T.heading.h1(),h2:T.heading.h2(),h3:T.heading.h3()},responsive:{true:"",false:""},align:{left:"text-left",center:"text-center",right:"text-right"},color:{default:"text-gray-900 dark:text-white",muted:"text-gray-600 dark:text-gray-400",vibrant:"text-white",brand:"bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"}},defaultVariants:{variant:"h1",responsive:!0,align:"left",color:"default"}}),Oc=({children:e,variant:t="h1",responsive:r=!0,align:a="left",color:o="default",className:s,as:i})=>{const l=i||(t==="hero"||t==="display"||t==="h1"?"h1":t==="h2"?"h2":"h3");return n.jsx(l,{className:y(Mc({variant:t,responsive:r,align:a,color:o}),s),children:e})},zc=_.cva("",{variants:{variant:{h2:T.heading.h2(),h3:T.heading.h3(),h4:T.heading.h4(),h5:T.heading.h5(),h6:T.heading.h6()},spacing:{none:"",sm:"mb-2",md:"mb-4",lg:"mb-6",xl:"mb-8"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{variant:"h2",spacing:"md",align:"left"}}),Dc=({children:e,variant:t="h2",spacing:r="md",align:a="left",className:o,as:s})=>{const i=s||t;return x.createElement(i,{className:y(zc({variant:t,spacing:r,align:a}),o)},e)},Bc=_.cva("",{variants:{variant:{body:T.body.md(),lead:T.body.lg(),large:T.body.lg(),small:T.body.sm(),caption:T.body.xs()},color:{default:"text-gray-700 dark:text-gray-300",muted:"text-gray-500 dark:text-gray-500",primary:"text-gray-900 dark:text-white"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"body",color:"default",align:"left"}}),Wc=({children:e,variant:t="body",color:r="default",align:a="left",className:o,as:s="p"})=>x.createElement(s,{className:y(Bc({variant:t,color:r,align:a}),o)},e),jc=_.cva(T.link.default(),{variants:{variant:{default:T.link.default(),subtle:T.link.subtle(),muted:T.link.muted(),button:"inline-flex items-center justify-center px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors"},external:{true:"inline-flex items-center gap-1",false:""}},defaultVariants:{variant:"default",external:!1}}),Fc=({children:e,href:t,variant:r="default",external:a=!1,className:o,target:s,rel:i})=>n.jsxs("a",{href:t,target:s||(a?"_blank":void 0),rel:i||(a?"noopener noreferrer":void 0),className:y(jc({variant:r,external:a}),o),children:[e,a&&n.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),xt=_.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:T.link.subtle(),default:T.link.default(),muted:T.link.muted(),external:T.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),nr=S.forwardRef(({className:e,variant:t,size:r,to:a,href:o,external:s,children:i,...l},c)=>{const d=a||o;return d?s||d.startsWith("http")||d.startsWith("mailto:")?n.jsx("a",{className:y(xt({variant:t==="subtle"?"external":t,size:r,className:e})),href:d,target:"_blank",rel:"noopener noreferrer",ref:c,...l,children:i}):n.jsx(Ze.Link,{className:y(xt({variant:t,size:r,className:e})),to:d,ref:c,...l,children:i}):n.jsx("span",{className:y(xt({variant:t,size:r,className:e})),...l,children:i})});nr.displayName="SmartLink";const _c=(e,t)=>S.useMemo(()=>{let r=e;return Object.entries(t).forEach(([a,o])=>{const s=new RegExp(`\\b${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");r=r.replace(s,i=>`<SmartLink to="${o}" variant="subtle">${i}</SmartLink>`)}),r},[e,t]),Hc={documentation:"/document",settings:"/settings",about:"/about",contact:"/contact","privacy policy":"/privacy",privacy:"/privacy","terms of service":"/terms",terms:"/terms","cookie policy":"/cookies",cookies:"/cookies",points:"/points","earn points":"/how-to-earn-points","how to earn points":"/how-to-earn-points","connect wallet":"/connect","connect your wallet":"/connect","wallet connection":"/connect",wallet:"/connect",compose:"/compose","compose email":"/compose","send email":"/compose",mail:"/mail",email:"/mail",inbox:"/mail",dashboard:"/mail",delegate:"/delegate",delegation:"/delegate",manage:"/manage","manage preferences":"/preferences",profile:"/settings",account:"/settings",preferences:"/preferences",token:"/token","web3 users":"/web3-users","web3 projects":"/web3-projects","get started":"/connect","start here":"/connect","learn more":"/document","read more":"/document","our features":"/document",support:"/contact",help:"/document","contact us":"/contact"},Uc=({children:e,mappings:t=Hc,className:r,variant:a="subtle"})=>{const o=S.useMemo(()=>{if(!e||typeof e!="string")return e||"";let i=e;return Object.entries(t).sort(([c],[d])=>d.length-c.length).forEach(([c,d])=>{if(c&&d){const g=new RegExp(`\\b${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");i=i.replace(g,m=>`__LINK_START__${d}__LINK_MID__${m}__LINK_END__`)}}),i},[e,t]);if(!o||typeof o!="string")return n.jsx("span",{className:r,children:e});const s=o.split(/(__LINK_START__.*?__LINK_END__)/);return n.jsx("span",{className:r,children:s.map((i,l)=>{const c=i.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(c){const[,d,g]=c;return n.jsx(nr,{to:d,variant:a,children:g},l)}return i})})},Ua=({isOpen:e,onClose:t,title:r,size:a="medium",variant:o="default",overlay:s="default",showCloseButton:i=!0,closeOnOverlayClick:l=!0,closeOnEscape:c=!0,children:d,className:g,"aria-labelledby":m,"aria-describedby":b,closeAriaLabel:f="Close modal"})=>{const p=x.useRef(null),h=x.useRef(null);if(x.useEffect(()=>{if(!e||!c)return;const N=P=>{P.key==="Escape"&&t()};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[e,c,t]),x.useEffect(()=>{if(e)return h.current=document.activeElement,p.current&&p.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",h.current&&h.current.focus()}},[e]),!e)return null;const w=()=>{const N=$.overlays.modal.content(),P=$.overlays.modal[a]();return y(N,P)},C=N=>{l&&N.target===N.currentTarget&&t()},k=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:$.overlays.modal.backdrop(),onClick:C}),n.jsx("div",{className:$.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":m,"aria-describedby":b,children:n.jsxs("div",{ref:p,"data-testid":"modal-content",className:y(w(),g),tabIndex:-1,onClick:N=>N.stopPropagation(),children:[r&&n.jsxs("div",{className:$.overlays.modal.header(),children:[n.jsx("h2",{id:m,className:$.overlays.modal.title(),children:r}),i&&n.jsx("button",{onClick:t,className:$.overlays.modal.closeButton(),"aria-label":f,children:n.jsx(A.XMarkIcon,{className:$.icon.variant.muted.md()})})]}),d]})})]});return Qe.createPortal(k,document.body)},Vc=({children:e,variant:t="default",className:r})=>n.jsx("div",{"data-testid":"modal-header",className:y($.overlays.modal.header(),r),children:e}),Va=({children:e,variant:t="default",className:r})=>n.jsx("div",{"data-testid":"modal-body",className:y($.overlays.modal.body(),r),children:e}),qa=({children:e,variant:t="default",className:r})=>n.jsx("div",{"data-testid":"modal-footer",className:y($.overlays.modal.footer(),r),children:e}),qc={default:A.InformationCircleIcon,warning:A.ExclamationTriangleIcon,danger:A.XCircleIcon,success:A.CheckCircleIcon,info:A.InformationCircleIcon},Gc={default:()=>$.icon.variant.default.lg(),warning:()=>$.icon.variant.warning.lg(),danger:()=>$.icon.variant.error.lg(),success:()=>$.icon.variant.success.lg(),info:()=>$.icon.variant.default.lg()},Kc={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},Yc=({isOpen:e,onClose:t,onConfirm:r,title:a,message:o,confirmText:s="Confirm",cancelText:i="Cancel",loadingText:l="Processing...",variant:c="default",isLoading:d=!1})=>{const g=qc[c],m=Gc[c],b=Kc[c];return n.jsxs(Ua,{isOpen:e,onClose:t,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[n.jsxs(Va,{variant:"padded",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsx(g,{className:m()}),n.jsx("h3",{id:"confirmation-dialog-title",className:T.heading.h4(),children:a})]}),n.jsx("p",{id:"confirmation-dialog-description",className:T.body.md(),children:o})]}),n.jsxs(qa,{children:[n.jsx(de,{variant:"outline",onClick:t,disabled:d,children:i}),n.jsx(de,{variant:b,onClick:r,disabled:d,children:d?l:s})]})]})},Qc={sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24"},Xc={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},Zc={primary:"bg-gradient-to-br from-blue-100 to-blue-200 text-blue-600 shadow-lg hover:shadow-blue-200",secondary:"bg-gradient-to-br from-purple-100 to-purple-200 text-purple-600 shadow-lg hover:shadow-purple-200",success:"bg-gradient-to-br from-green-100 to-green-200 text-green-600 shadow-lg hover:shadow-green-200",warning:"bg-gradient-to-br from-yellow-100 to-yellow-200 text-yellow-600 shadow-lg hover:shadow-yellow-200",error:"bg-gradient-to-br from-red-100 to-red-200 text-red-600 shadow-lg hover:shadow-red-200",neutral:"bg-gradient-to-br from-gray-100 to-gray-200 text-gray-600 shadow-lg hover:shadow-gray-200"},Jc={square:"rounded-none",rounded:"rounded-2xl",circle:"rounded-full"},Rc={none:"",float:"animate-float",pulse:"animate-pulse",bounce:"animate-bounce-slow"},ed=({children:e,size:t="lg",variant:r="primary",shape:a="rounded",animation:o="float",className:s})=>n.jsx("div",{className:y("flex items-center justify-center mx-auto mb-6 transition-all duration-300 group-hover:scale-105",Qc[t],Zc[r],Jc[a],Rc[o],s),children:n.jsx("div",{className:y(Xc[t]),children:e})}),td=_.cva("border-b transition-all duration-200",{variants:{variant:{default:"bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 border-green-200 dark:border-green-700",compact:"bg-green-50 dark:bg-green-900/10 border-green-200 dark:border-green-800",minimal:"bg-gray-50 dark:bg-gray-900/50 border-gray-200 dark:border-gray-700",vibrant:"bg-gradient-to-r from-blue-600 to-purple-600 border-blue-700"},size:{default:"py-4",compact:"py-3",large:"py-6"}},defaultVariants:{variant:"default",size:"default"}}),rd=_.cva("font-semibold",{variants:{variant:{default:"text-green-800 dark:text-green-200",compact:"text-green-700 dark:text-green-300",minimal:"text-gray-700 dark:text-gray-300",vibrant:"text-white"}},defaultVariants:{variant:"default"}}),ad=_.cva("inline-flex items-center justify-center px-6 py-2 rounded-lg font-medium transition-all duration-200 hover:transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-offset-2",{variants:{variant:{default:"bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white focus:ring-green-500",compact:"bg-green-600 hover:bg-green-700 text-white focus:ring-green-500",minimal:"bg-blue-600 hover:bg-blue-700 text-white focus:ring-blue-500",vibrant:"bg-white hover:bg-gray-100 text-blue-600 hover:text-blue-700 focus:ring-white"}},defaultVariants:{variant:"default"}}),nd=({className:e,variant:t="default",size:r="default",message:a="Get Your Free Email Address - Start Using Web3 Email Today",ctaText:o="Get Free Email",ctaLink:s="/connect",showBadge:i=!0,badgeText:l="FREE",onDismiss:c,isDismissible:d=!1,dismissAriaLabel:g="Dismiss banner"})=>n.jsx("div",{className:y(td({variant:t,size:r}),e),children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 text-center relative",children:[d&&c&&n.jsx("button",{onClick:c,className:"absolute right-0 top-1/2 -translate-y-1/2 p-1 rounded-full hover:bg-black/10 dark:hover:bg-white/10 transition-colors","aria-label":g,children:n.jsx("svg",{className:"w-4 h-4 text-current opacity-60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),n.jsxs("div",{className:"flex items-center",children:[i&&n.jsx("div",{className:y("text-xs font-bold px-3 py-1 rounded-full mr-3 transition-colors",t==="vibrant"?"bg-white text-blue-600":"bg-green-500 text-white"),children:l}),n.jsx("span",{className:y(rd({variant:t})),children:a})]}),n.jsx(Ze.Link,{to:s,className:y(ad({variant:t})),children:o})]})})}),od=_.cva("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-all duration-200",{variants:{variant:{default:"border-gray-200 dark:border-gray-700 border hover:shadow-lg",elevated:"shadow-lg hover:shadow-xl",minimal:"bg-transparent shadow-none border-none p-4"},trend:{none:"",up:"border-l-4 border-green-500",down:"border-l-4 border-red-500",neutral:"border-l-4 border-gray-400"}},defaultVariants:{variant:"default",trend:"none"}}),sd=({label:e,value:t,change:r,trend:a="none",icon:o,variant:s="default",className:i})=>{const l={up:"text-green-600 dark:text-green-400",down:"text-red-600 dark:text-red-400",neutral:"text-gray-600 dark:text-gray-400",none:"text-gray-600 dark:text-gray-400"},c={up:"↗",down:"↘",neutral:"→",none:""};return n.jsx("div",{className:y(od({variant:s,trend:a}),i),children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:e}),n.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:t}),r&&n.jsxs("p",{className:y("text-sm font-medium flex items-center gap-1 mt-1",l[a||"none"]),children:[n.jsx("span",{children:c[a||"none"]}),r]})]}),o&&n.jsx("div",{className:"text-3xl opacity-80",children:o})]})})},id=_.cva("space-y-6",{variants:{variant:{default:"",card:"bg-white dark:bg-gray-800 rounded-lg border-gray-200 dark:border-gray-700 border p-6",minimal:"space-y-4"},spacing:{tight:"space-y-3",normal:"space-y-4",relaxed:"space-y-6",loose:"space-y-8"}},defaultVariants:{variant:"default",spacing:"normal"}}),ld=({title:e,description:t,children:r,variant:a="default",spacing:o="normal",className:s})=>n.jsxs("div",{className:y(id({variant:a,spacing:o}),s),children:[(e||t)&&n.jsxs("div",{className:"space-y-1",children:[e&&n.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:e}),t&&n.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:t})]}),r]}),cd=_.cva("flex flex-col items-center text-center space-y-4",{variants:{layout:{vertical:"flex-col items-center text-center",horizontal:"flex-row items-start text-left space-y-0 space-x-4",minimal:"flex-col space-y-2"},spacing:{tight:"space-y-2",normal:"space-y-4",relaxed:"space-y-6"},interactive:{true:"transition-all duration-200 hover:transform hover:scale-105 cursor-pointer",false:""}},defaultVariants:{layout:"vertical",spacing:"normal",interactive:!1}}),dd=({icon:e,title:t,description:r,layout:a="vertical",spacing:o="normal",interactive:s=!1,className:i,onClick:l})=>n.jsxs("div",{className:y(cd({layout:a,spacing:o,interactive:s}),i),onClick:l,children:[n.jsx("div",{className:"text-4xl mb-4 flex-shrink-0",children:e}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:t}),n.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:r})]})]}),ud=({icon:e,size:t="md",shape:r="rounded",variant:a="blue-purple",gradientClasses:o,className:s,iconClassName:i})=>{const l={sm:{container:"w-10 h-10",icon:"h-5 w-5"},md:{container:"w-12 h-12",icon:"h-6 w-6"},lg:{container:"w-16 h-16",icon:"h-8 w-8"},xl:{container:"w-20 h-20",icon:"h-10 w-10"}},c={square:"rounded-lg",rounded:"rounded-xl",circle:"rounded-full"},d={"blue-purple":"bg-gradient-to-r from-blue-600 to-purple-600","green-blue":"bg-gradient-to-r from-green-600 to-blue-600","orange-red":"bg-gradient-to-r from-orange-600 to-red-600",gray:"bg-gradient-to-r from-gray-600 to-gray-800 dark:from-gray-700 dark:to-gray-900",custom:o||"bg-gradient-to-r from-blue-600 to-purple-600"},g=l[t];return n.jsx("div",{className:y("flex items-center justify-center flex-shrink-0",g.container,c[r],d[a],s),children:n.jsx(e,{className:y("text-white",g.icon,i)})})},gd=({children:e,variant:t="blue-purple",gradientClasses:r,size:a="md",rounded:o="2xl",bordered:s=!1,borderClasses:i="border border-white/20",className:l})=>{const c={"blue-purple":"bg-gradient-to-r from-blue-600 to-purple-600 text-white","green-blue":"bg-gradient-to-r from-green-600 to-blue-600 text-white","orange-red":"bg-gradient-to-r from-orange-600 to-red-600 text-white",gray:"bg-gradient-to-r from-gray-600 to-gray-800 dark:from-gray-700 dark:to-gray-900 text-white",light:"bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-900/20 dark:to-purple-900/20 text-gray-900 dark:text-gray-100",custom:r||"bg-gradient-to-r from-blue-600 to-purple-600 text-white"},d={sm:"p-4",md:"p-6",lg:"p-8"},g={md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"};return n.jsx("div",{className:y(c[t],d[a],g[o],s&&i,l),children:e})},md=({children:e,title:t,variant:r="info",size:a="md",icon:o,bordered:s=!0,className:i})=>{const l={info:{bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-200 dark:border-blue-800",title:"text-blue-900 dark:text-blue-300",text:"text-blue-800 dark:text-blue-400",icon:"text-blue-600 dark:text-blue-400"},success:{bg:"bg-green-50 dark:bg-green-900/20",border:"border-green-200 dark:border-green-800",title:"text-green-900 dark:text-green-300",text:"text-green-800 dark:text-green-400",icon:"text-green-600 dark:text-green-400"},warning:{bg:"bg-yellow-50 dark:bg-yellow-900/20",border:"border-yellow-200 dark:border-yellow-800",title:"text-yellow-900 dark:text-yellow-300",text:"text-yellow-800 dark:text-yellow-400",icon:"text-yellow-600 dark:text-yellow-400"},danger:{bg:"bg-red-50 dark:bg-red-900/20",border:"border-red-200 dark:border-red-800",title:"text-red-900 dark:text-red-300",text:"text-red-800 dark:text-red-400",icon:"text-red-600 dark:text-red-400"},neutral:{bg:"bg-gray-50 dark:bg-gray-800",border:"border-gray-200 dark:border-gray-700",title:"text-gray-900 dark:text-gray-100",text:"text-gray-700 dark:text-gray-300",icon:"text-gray-600 dark:text-gray-400"}},c={sm:"p-3",md:"p-4",lg:"p-6"},d=l[r];return n.jsxs("div",{className:y("rounded-lg",d.bg,s&&`border ${d.border}`,c[a],i),children:[(t||o)&&n.jsxs("div",{className:"flex items-start gap-3 mb-2",children:[o&&n.jsx(o,{className:y("h-5 w-5 flex-shrink-0 mt-0.5",d.icon)}),t&&n.jsx("h3",{className:y(T.body.strong.md(),d.title),children:t})]}),n.jsx("div",{className:y(!t&&!o&&d.text),children:e})]})},fd=({children:e,variant:t="blue",position:r="left",width:a="thick",padding:o="md",className:s})=>{const i={blue:"border-blue-500 dark:border-blue-400",green:"border-green-500 dark:border-green-400",purple:"border-purple-500 dark:border-purple-400",indigo:"border-indigo-500 dark:border-indigo-400",emerald:"border-emerald-500 dark:border-emerald-400",orange:"border-orange-500 dark:border-orange-400",red:"border-red-500 dark:border-red-400",gray:"border-gray-400 dark:border-gray-500"},l={left:"border-l",right:"border-r",top:"border-t",bottom:"border-b"},c={thin:"2",medium:"3",thick:"4"},d={left:{sm:"pl-3",md:"pl-4",lg:"pl-6"},right:{sm:"pr-3",md:"pr-4",lg:"pr-6"},top:{sm:"pt-3",md:"pt-4",lg:"pt-6"},bottom:{sm:"pb-3",md:"pb-4",lg:"pb-6"}},g=`${l[r]}-${c[a]}`;return n.jsx("div",{className:y(g,i[t],d[r][o],s),children:e})},pd=({children:e,variant:t="primary",size:r="md",inline:a=!1,align:o="left",className:s,wrap:i=!1})=>{const l={primary:"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30",secondary:"text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",success:"text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30",warning:"text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/30",neutral:"text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"},c={xs:{text:"text-xs",padding:a?"px-1.5 py-0.5":"px-2 py-1"},sm:{text:"text-sm",padding:a?"px-2 py-0.5":"px-3 py-1.5"},md:{text:"text-base",padding:a?"px-2.5 py-1":"px-4 py-2"},lg:{text:"text-lg",padding:a?"px-3 py-1":"px-4 py-2"}},d={left:"text-left",center:"text-center",right:"text-right"},g=c[r],m=a?"code":"div";return n.jsx(m,{className:y("font-mono rounded-lg",l[t],g.text,g.padding,!a&&d[o],a?"inline-block":"block",!i&&"overflow-x-auto whitespace-nowrap",i&&"break-all",s),children:e})},hd=({variant:e="text",width:t,height:r,className:a,count:o,lines:s=1,animate:i=!0,borderRadius:l,theme:c,spacing:d,gap:g="md"})=>{const m={text:"h-4 rounded",circle:"rounded-full",rectangle:"rounded-lg",avatar:"w-10 h-10 rounded-full",button:"h-10 rounded-lg"},b={light:"bg-gray-200",dark:"bg-gray-700"},f={sm:"space-y-1",md:"space-y-2",lg:"space-y-3"},p=o??s,h=w=>{const C={};return t&&(C.width=typeof t=="number"?`${t}px`:t),r&&(C.height=typeof r=="number"?`${r}px`:r),l&&(C.borderRadius=l),n.jsx("div",{className:y(i&&"animate-pulse",c?b[c]:"bg-gray-200 dark:bg-gray-700",m[e],a),style:C},w)};if(p>1){const w=d!==void 0?`space-y-${d}`:f[g];return n.jsx("div",{className:y(w),children:Array.from({length:p}).map((C,k)=>h(k))})}return h()},bd=({value:e,label:t,variant:r="neutral",size:a="md",align:o="center",icon:s,iconPosition:i="top",className:l,valueClassName:c,labelClassName:d})=>{const g={primary:{value:"text-blue-600 dark:text-blue-400",label:"text-blue-600/70 dark:text-blue-400/70",icon:"text-blue-600 dark:text-blue-400"},success:{value:"text-green-600 dark:text-green-400",label:"text-green-600/70 dark:text-green-400/70",icon:"text-green-600 dark:text-green-400"},warning:{value:"text-yellow-600 dark:text-yellow-400",label:"text-yellow-600/70 dark:text-yellow-400/70",icon:"text-yellow-600 dark:text-yellow-400"},danger:{value:"text-red-600 dark:text-red-400",label:"text-red-600/70 dark:text-red-400/70",icon:"text-red-600 dark:text-red-400"},neutral:{value:"text-gray-900 dark:text-gray-100",label:"text-gray-600 dark:text-gray-400",icon:"text-gray-600 dark:text-gray-400"},white:{value:"text-white",label:"text-white/70",icon:"text-white"}},m={sm:{value:T.heading.h5(),label:T.caption.default(),icon:"h-4 w-4"},md:{value:T.heading.h4(),label:T.body.sm(),icon:"h-5 w-5"},lg:{value:T.heading.h3(),label:T.body.md(),icon:"h-6 w-6"},xl:{value:T.heading.h2(),label:T.body.lg(),icon:"h-8 w-8"}},b={left:"text-left",center:"text-center",right:"text-right"},f=g[r],p=m[a];return n.jsxs("div",{className:y(b[o],l),children:[s&&i==="top"&&n.jsx(s,{className:y(p.icon,f.icon,"mb-2",o==="center"&&"mx-auto")}),n.jsxs("div",{className:y(i==="left"&&s&&"flex items-center gap-3",o==="center"&&i==="left"&&"justify-center"),children:[s&&i==="left"&&n.jsx(s,{className:y(p.icon,f.icon)}),n.jsxs("div",{children:[n.jsx("div",{className:y("font-bold",p.value,f.value,c),children:e}),n.jsx("div",{className:y(p.label,f.label,d),children:t})]})]})]})},yd=({value:e,max:t=100,variant:r="primary",size:a="md",showLabel:o=!1,labelPosition:s="outside",label:i,className:l,barClassName:c,animated:d=!0,striped:g=!1})=>{const m=Math.min(Math.max(e/t*100,0),100),b=i||`${Math.round(m)}%`,f={primary:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500",purple:"bg-purple-600 dark:bg-purple-500",gray:"bg-gray-600 dark:bg-gray-500"},p={sm:"h-1",md:"h-2",lg:"h-3"};return n.jsx("div",{className:y("w-full",l),children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:y("flex-1 bg-gray-200 dark:bg-gray-600 rounded-full overflow-hidden",p[a]),children:n.jsx("div",{className:y("rounded-full",p[a],f[r],d&&"transition-all duration-300 ease-in-out",g&&"bg-gradient-to-r from-transparent via-white/20 to-transparent bg-[length:20px_100%]",c),style:{width:`${m}%`},role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,children:o&&s==="inside"&&a==="lg"&&n.jsx("span",{className:"flex items-center justify-center h-full text-xs font-medium text-white px-2",children:b})})}),o&&s==="outside"&&n.jsx("span",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 whitespace-nowrap",children:b})]})})},xd=({label:e,labelPosition:t="center",orientation:r="horizontal",spacing:a="md",thickness:o="thin",variant:s="light",className:i,lineClassName:l})=>{const c={horizontal:{none:"my-0",sm:"my-2",md:"my-4",lg:"my-6",xl:"my-8"},vertical:{none:"mx-0",sm:"mx-2",md:"mx-4",lg:"mx-6",xl:"mx-8"}},d={horizontal:{thin:"border-t",medium:"border-t-2",thick:"border-t-4"},vertical:{thin:"border-l",medium:"border-l-2",thick:"border-l-4"}},g={light:"border-gray-200 dark:border-gray-700",medium:"border-gray-300 dark:border-gray-600",dark:"border-gray-400 dark:border-gray-500"};if(r==="vertical")return n.jsx("div",{className:y("self-stretch",d.vertical[o],g[s],c.vertical[a],i),role:"separator","aria-orientation":"vertical"});if(!e)return n.jsx("hr",{className:y(d.horizontal[o],g[s],c.horizontal[a],l,i),role:"separator","aria-orientation":"horizontal"});const m={left:"justify-start",center:"justify-center",right:"justify-end"};return n.jsxs("div",{className:y("flex items-center",c.horizontal[a],m[t],i),role:"separator","aria-orientation":"horizontal",children:[t!=="left"&&n.jsx("div",{className:y("flex-1",d.horizontal[o],g[s],l)}),n.jsx("span",{className:y(T.body.sm(),"px-3 text-gray-500 dark:text-gray-400 whitespace-nowrap"),children:e}),t!=="right"&&n.jsx("div",{className:y("flex-1",d.horizontal[o],g[s],l)})]})},vd=({icon:e,children:t,iconPosition:r="left",gap:a="md",iconSize:o="md",align:s="left",variant:i="default",className:l,iconClassName:c,textClassName:d})=>{const g={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4"},m={xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8"},b={left:"text-left",center:"text-center items-center",right:"text-right items-end"},f={default:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400",muted:"text-gray-500 dark:text-gray-400"},p={left:"flex items-center",right:"flex flex-row-reverse items-center",top:"flex flex-col"};return n.jsxs("div",{className:y(p[r],g[a],r==="top"&&b[s],f[i],l),children:[n.jsx(e,{className:y(m[o],"flex-shrink-0",c)}),n.jsx("span",{className:y(d),children:t})]})},wd=({text:e,size:t="md",variant:r="icon",label:a="Copy",successLabel:o="Copied!",iconPosition:s="left",className:i,title:l,onCopySuccess:c,onCopyError:d})=>{const{copyToClipboard:g,isCopied:m}=Lr({successDuration:2e3,onSuccess:c,onError:d}),b=m(e),f=()=>{g(e)},h={sm:{icon:"h-3.5 w-3.5",button:"p-1",text:"text-xs px-2 py-1"},md:{icon:"h-4 w-4",button:"p-1.5",text:"text-sm px-3 py-1.5"},lg:{icon:"h-5 w-5",button:"p-2",text:"text-base px-4 py-2"}}[t],w=b?A.CheckIcon:A.ClipboardDocumentIcon;if(r==="icon")return n.jsx("button",{onClick:f,className:y("inline-flex items-center justify-center rounded transition-colors",b?"text-green-600 dark:text-green-400":"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",h.button,i),title:l||(b?"Copied!":"Copy to clipboard"),type:"button",children:n.jsx(w,{className:h.icon})});const C=y("inline-flex items-center gap-2 rounded font-medium transition-colors",h.text),k={text:y(b?"text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300"),outline:y("border",b?"border-green-600 text-green-600 dark:border-green-400 dark:text-green-400":"border-gray-300 text-gray-700 hover:border-gray-400 dark:border-gray-600 dark:text-gray-300 dark:hover:border-gray-500")},N=b?o:a;return n.jsxs("button",{onClick:f,className:y(C,k[r],i),title:l||(b?"Copied!":"Copy to clipboard"),type:"button",children:[s==="left"&&n.jsx(w,{className:h.icon}),n.jsx("span",{children:N}),s==="right"&&n.jsx(w,{className:h.icon})]})},kd=({title:e,description:t,count:r,countLabel:a,action:o,loading:s=!1,loadingText:i="Loading...",size:l="md",className:c})=>{const g={sm:{title:T.heading.h4(),description:T.body.sm(),count:T.caption.default()},md:{title:T.heading.h3(),description:T.body.md(),count:T.body.sm()},lg:{title:T.heading.h2(),description:T.body.lg(),count:T.body.md()}}[l];return n.jsxs("div",{className:y("flex items-start justify-between gap-4",c),children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[n.jsx("h2",{className:y(g.title,"text-gray-900 dark:text-gray-100"),children:e}),r!==void 0&&n.jsxs("span",{className:y(g.count,"text-gray-500 dark:text-gray-400"),children:["(",r,a&&` ${a}`,")"]}),s&&n.jsxs("span",{className:y(g.count,"text-gray-500 dark:text-gray-400 flex items-center gap-2"),children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),i]})]}),t&&n.jsx("p",{className:y(g.description,"mt-1 text-gray-600 dark:text-gray-400"),children:t})]}),o&&n.jsx("div",{className:"flex-shrink-0",children:o})]})},Cd=({children:e,variant:t="default",size:r="sm",icon:a,dot:o=!1,pill:s=!1,outline:i=!1,onClick:l,dismissible:c=!1,onDismiss:d,count:g,maxCount:m,className:b})=>{const f={default:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",warning:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",danger:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400"},p={default:"border border-gray-300 text-gray-700 dark:border-gray-600 dark:text-gray-300",primary:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",success:"border border-green-600 text-green-600 dark:border-green-400 dark:text-green-400",warning:"border border-yellow-600 text-yellow-600 dark:border-yellow-400 dark:text-yellow-400",danger:"border border-red-600 text-red-600 dark:border-red-400 dark:text-red-400",info:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",purple:"border border-purple-600 text-purple-600 dark:border-purple-400 dark:text-purple-400"},h={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},w={sm:"h-3 w-3",md:"h-3.5 w-3.5",lg:"h-4 w-4"},C={default:"bg-gray-600 dark:bg-gray-400",primary:"bg-blue-600 dark:bg-blue-400",success:"bg-green-600 dark:bg-green-400",warning:"bg-yellow-600 dark:bg-yellow-400",danger:"bg-red-600 dark:bg-red-400",info:"bg-blue-600 dark:bg-blue-400",purple:"bg-purple-600 dark:bg-purple-400"},k=g!==void 0?m!==void 0&&g>m?`${m}+`:g.toString():null,N=n.jsxs(n.Fragment,{children:[o&&n.jsx("span",{className:y("h-2 w-2 rounded-full mr-1.5",C[t])}),a&&n.jsx("span",{className:y(w[r],"mr-1"),children:a}),e,k&&n.jsx("span",{className:"ml-1",children:k}),c&&d&&n.jsx("button",{onClick:E=>{E.stopPropagation(),d()},className:"ml-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full p-0.5","aria-label":"Dismiss",children:n.jsx(he.XMarkIcon,{className:y(w[r])})})]}),P=l?"button":"span";return n.jsx(P,{onClick:l,className:y("inline-flex items-center font-medium",i?p[t]:f[t],h[r],s?"rounded-full":"rounded",l&&"cursor-pointer hover:opacity-80",b),children:N})},Sd=({src:e,alt:t="Avatar",fallback:r,name:a,size:o="md",status:s,className:i,onClick:l})=>{const[c,d]=x.useState(!1),g={sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"},m={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},b={online:"bg-green-500",offline:"bg-gray-400",away:"bg-yellow-500",busy:"bg-red-500"},p=r||(a?(C=>{const k=C.trim().split(/\s+/);return k.length===1?k[0].charAt(0).toUpperCase():k[0].charAt(0).toUpperCase()+k[k.length-1].charAt(0).toUpperCase()})(a):""),h=e&&!c,w=()=>{d(!0)};return n.jsxs("div",{className:"relative inline-block flex-shrink-0",children:[n.jsx("div",{className:y("flex items-center justify-center overflow-hidden rounded-full",g[o],!h&&"bg-gray-300 dark:bg-gray-600 text-gray-700 dark:text-gray-200",l&&"cursor-pointer hover:opacity-80 transition-opacity",i),onClick:l,role:l?"button":void 0,tabIndex:l?0:void 0,children:h?n.jsx("img",{src:e,alt:t,className:"w-full h-full object-cover",onError:w}):n.jsx("span",{className:"font-semibold",children:p})}),s&&n.jsx("span",{className:y("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-gray-800",b[s],m[o]),"aria-label":s})]})},Nd=({steps:e,currentStep:t=0,orientation:r="horizontal",size:a="md",variant:o="primary",showConnectors:s=!0,className:i,onStepClick:l})=>{const c={sm:{circle:"w-6 h-6 text-xs",label:"text-xs",description:"text-xs",connector:r==="vertical"?"h-6":"h-0.5"},md:{circle:"w-8 h-8 text-sm",label:"text-sm",description:"text-xs",connector:r==="vertical"?"h-8":"h-0.5"},lg:{circle:"w-10 h-10 text-base",label:"text-base",description:"text-sm",connector:r==="vertical"?"h-10":"h-0.5"}},d={primary:{active:"bg-blue-500 text-white border-blue-500",completed:"bg-blue-500 text-white border-blue-500",pending:"bg-white dark:bg-gray-800 text-gray-400 border-gray-300 dark:border-gray-600",connector:"bg-blue-500",connectorPending:"bg-gray-300 dark:bg-gray-600"},success:{active:"bg-green-500 text-white border-green-500",completed:"bg-green-500 text-white border-green-500",pending:"bg-white dark:bg-gray-800 text-gray-400 border-gray-300 dark:border-gray-600",connector:"bg-green-500",connectorPending:"bg-gray-300 dark:bg-gray-600"},purple:{active:"bg-purple-500 text-white border-purple-500",completed:"bg-purple-500 text-white border-purple-500",pending:"bg-white dark:bg-gray-800 text-gray-400 border-gray-300 dark:border-gray-600",connector:"bg-purple-500",connectorPending:"bg-gray-300 dark:bg-gray-600"}},g=c[a],m=d[o],b=p=>{const h=e[p];return h.status?h.status:p<t?"completed":p===t?"current":"pending"},f=(p,h)=>{const w=b(h),C=l&&w!=="pending",k=y("flex items-center justify-center rounded-full border-2 font-bold flex-shrink-0 transition-all",g.circle,w==="completed"&&m.completed,w==="current"&&m.active,w==="pending"&&m.pending,C&&"cursor-pointer hover:opacity-80");return n.jsxs("div",{className:y(r==="horizontal"?"flex items-center":"flex",r==="horizontal"?"flex-col items-center":"items-start"),children:[n.jsxs("div",{className:y(r==="horizontal"?"flex flex-col items-center":"flex items-start gap-3"),children:[n.jsx("div",{className:k,onClick:C?()=>l(h):void 0,role:C?"button":void 0,tabIndex:C?0:void 0,children:w==="completed"?n.jsx(he.CheckIcon,{className:y(a==="sm"?"h-3 w-3":a==="md"?"h-4 w-4":"h-5 w-5")}):n.jsx("span",{children:h+1})}),n.jsxs("div",{className:y(r==="horizontal"?"text-center mt-2":"flex-1"),children:[n.jsx("div",{className:y("font-medium",g.label,w==="pending"?"text-gray-500 dark:text-gray-400":"text-gray-900 dark:text-gray-100"),children:p.label}),p.description&&n.jsx("div",{className:y(g.description,"text-gray-600 dark:text-gray-400 mt-0.5"),children:p.description})]})]}),s&&h<e.length-1&&n.jsx("div",{className:y(r==="vertical"?"w-0.5 ml-3.5":"flex-1 mx-2",g.connector,w==="completed"?m.connector:m.connectorPending)})]},h)};return n.jsx("div",{className:y("flex",r==="horizontal"?"items-start":"flex-col",i),children:e.map((p,h)=>f(p,h))})},Ed=({label:e,value:t,orientation:r="vertical",align:a="start",labelWidth:o="auto",size:s="md",separator:i=!1,labelVariant:l="muted",valueVariant:c="default",className:d,labelClassName:g,valueClassName:m})=>{const b={sm:{label:T.body.sm(),value:T.body.sm(),gap:"gap-1"},md:{label:T.body.md(),value:T.body.md(),gap:"gap-2"},lg:{label:T.body.lg(),value:T.body.lg(),gap:"gap-3"}},f={auto:"",sm:"w-24",md:"w-32",lg:"w-40"},p={start:"justify-start",center:"justify-center",between:"justify-between"},h={default:"text-gray-700 dark:text-gray-300",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold"},w={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold",primary:"text-blue-600 dark:text-blue-400"},C=b[s];return n.jsxs("div",{className:y(r==="horizontal"?"flex items-center":"flex flex-col",r==="horizontal"&&p[a],C.gap,i&&"pb-3 mb-3 border-b border-gray-200 dark:border-gray-700",d),children:[n.jsx("dt",{className:y(C.label,h[l],r==="horizontal"&&f[o],r==="horizontal"&&"flex-shrink-0",g),children:e}),n.jsx("dd",{className:y(C.value,w[c],r==="horizontal"&&"flex-1",m),children:t})]})},Ad=({content:e,children:t,placement:r="top",delayShow:a=0,delayHide:o=0,className:s,disabled:i=!1,showArrow:l=!0,variant:c="default",trigger:d="hover",isOpen:g,onVisibilityChange:m})=>{const[b,f]=x.useState(!1),p=x.useRef(void 0),h=x.useRef(void 0),w=x.useRef(null),C=x.useRef(null),k=g!==void 0,N=k?g:b,P=x.useCallback(()=>{i||k||(h.current&&(clearTimeout(h.current),h.current=void 0),a>0?p.current=setTimeout(()=>{f(!0),m?.(!0)},a):(f(!0),m?.(!0)))},[i,k,a,m]),E=x.useCallback(()=>{k||(p.current&&(clearTimeout(p.current),p.current=void 0),o>0?h.current=setTimeout(()=>{f(!1),m?.(!1)},o):(f(!1),m?.(!1)))},[k,o,m]);x.useEffect(()=>()=>{p.current&&clearTimeout(p.current),h.current&&clearTimeout(h.current)},[]),x.useEffect(()=>{if(d!=="click"||!N)return;const V=F=>{w.current&&!w.current.contains(F.target)&&C.current&&!C.current.contains(F.target)&&E()};return document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[d,N,E]);const L=()=>{d==="hover"&&P()},I=()=>{d==="hover"&&E()},z=()=>{d==="hover"&&P()},D=()=>{d==="hover"&&E()},O=()=>{d==="click"&&!k&&(N?(f(!1),m?.(!1)):(f(!0),m?.(!0)))},B={top:"bottom-full left-1/2 -translate-x-1/2 -translate-y-2",bottom:"top-full left-1/2 -translate-x-1/2 translate-y-2",left:"right-full top-1/2 -translate-x-2 -translate-y-1/2",right:"left-full top-1/2 translate-x-2 -translate-y-1/2"},U={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"},W={default:"bg-gray-900 dark:bg-gray-700 text-white",info:"bg-blue-600 dark:bg-blue-500 text-white",success:"bg-green-600 dark:bg-green-500 text-white",warning:"bg-yellow-600 dark:bg-yellow-500 text-white",error:"bg-red-600 dark:bg-red-500 text-white"},j={default:{top:"border-t-gray-900 dark:border-t-gray-700",bottom:"border-b-gray-900 dark:border-b-gray-700",left:"border-l-gray-900 dark:border-l-gray-700",right:"border-r-gray-900 dark:border-r-gray-700"},info:{top:"border-t-blue-600 dark:border-t-blue-500",bottom:"border-b-blue-600 dark:border-b-blue-500",left:"border-l-blue-600 dark:border-l-blue-500",right:"border-r-blue-600 dark:border-r-blue-500"},success:{top:"border-t-green-600 dark:border-t-green-500",bottom:"border-b-green-600 dark:border-b-green-500",left:"border-l-green-600 dark:border-l-green-500",right:"border-r-green-600 dark:border-r-green-500"},warning:{top:"border-t-yellow-600 dark:border-t-yellow-500",bottom:"border-b-yellow-600 dark:border-b-yellow-500",left:"border-l-yellow-600 dark:border-l-yellow-500",right:"border-r-yellow-600 dark:border-r-yellow-500"},error:{top:"border-t-red-600 dark:border-t-red-500",bottom:"border-b-red-600 dark:border-b-red-500",left:"border-l-red-600 dark:border-l-red-500",right:"border-r-red-600 dark:border-r-red-500"}};return n.jsxs("div",{ref:C,className:"relative inline-block",onMouseEnter:L,onMouseLeave:I,onFocus:z,onBlur:D,onClick:O,children:[t,N&&!i&&n.jsxs("div",{ref:w,className:y("absolute z-50 px-2 py-1 text-xs font-medium rounded shadow-lg whitespace-nowrap pointer-events-none",B[r],W[c],s),role:"tooltip",children:[e,l&&n.jsx("div",{className:y("absolute w-0 h-0 border-4 arrow",U[r],j[c][r])})]})]})},Pd=({href:e,children:t,showIcon:r=!0,iconPosition:a="right",size:o="md",variant:s="default",className:i,onClick:l})=>{const c={sm:{text:T.body.sm(),icon:"h-3 w-3",gap:"gap-1"},md:{text:T.body.md(),icon:"h-4 w-4",gap:"gap-1.5"},lg:{text:T.body.lg(),icon:"h-5 w-5",gap:"gap-2"}},d={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200 font-semibold",muted:"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"},g=c[o];return n.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",onClick:l,className:y("inline-flex items-center",g.gap,g.text,d[s],"underline decoration-1 underline-offset-2","hover:decoration-2","transition-all duration-200",i),children:[r&&a==="left"&&n.jsx(A.ArrowTopRightOnSquareIcon,{className:y(g.icon,"flex-shrink-0")}),n.jsx("span",{children:t}),r&&a==="right"&&n.jsx(A.ArrowTopRightOnSquareIcon,{className:y(g.icon,"flex-shrink-0")})]})},Td=({icon:e,"aria-label":t,onClick:r,size:a="md",shape:o="rounded",variant:s="default",disabled:i=!1,type:l="button",className:c,title:d})=>{const g={xs:{button:"p-1",icon:"h-3 w-3"},sm:{button:"p-1.5",icon:"h-4 w-4"},md:{button:"p-2",icon:"h-5 w-5"},lg:{button:"p-3",icon:"h-6 w-6"},xl:{button:"p-4",icon:"h-8 w-8"}},m={circle:"rounded-full",square:"rounded-none",rounded:"rounded-lg"},b={default:"bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700",primary:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",secondary:"bg-purple-600 text-white hover:bg-purple-700 dark:bg-purple-500 dark:hover:bg-purple-600",danger:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800",outline:"bg-transparent border-2 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"},f=g[a];return n.jsx("button",{type:l,onClick:r,disabled:i,"aria-label":t,title:d||t,className:y("inline-flex items-center justify-center","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-current",f.button,m[o],b[s],c),children:n.jsx(e,{className:f.icon})})},Id=({type:e,size:t="md",colored:r=!0,className:a})=>{const o={xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8"},s=c=>{const d=c.toLowerCase();return d.startsWith("image/")||[".jpg",".jpeg",".png",".gif",".svg",".webp",".ico"].some(g=>d.endsWith(g))?{Icon:A.PhotoIcon,color:"text-blue-600 dark:text-blue-400"}:d.startsWith("video/")||[".mp4",".avi",".mov",".wmv",".flv",".webm"].some(g=>d.endsWith(g))?{Icon:A.FilmIcon,color:"text-purple-600 dark:text-purple-400"}:d.startsWith("audio/")||[".mp3",".wav",".ogg",".m4a",".flac"].some(g=>d.endsWith(g))?{Icon:A.MusicalNoteIcon,color:"text-pink-600 dark:text-pink-400"}:d.includes("pdf")||d.endsWith(".pdf")?{Icon:A.DocumentArrowDownIcon,color:"text-red-600 dark:text-red-400"}:d.includes("word")||d.includes("document")||[".doc",".docx",".odt"].some(g=>d.endsWith(g))?{Icon:A.DocumentTextIcon,color:"text-blue-700 dark:text-blue-300"}:d.includes("excel")||d.includes("spreadsheet")||[".xls",".xlsx",".ods",".csv"].some(g=>d.endsWith(g))?{Icon:A.TableCellsIcon,color:"text-green-600 dark:text-green-400"}:[".js",".ts",".jsx",".tsx",".py",".java",".cpp",".c",".h",".css",".scss",".html",".json",".xml",".yaml",".yml",".sh",".sql"].some(g=>d.endsWith(g))?{Icon:A.CodeBracketIcon,color:"text-gray-700 dark:text-gray-300"}:d.includes("zip")||d.includes("compressed")||d.includes("archive")||[".zip",".rar",".7z",".tar",".gz",".bz2"].some(g=>d.endsWith(g))?{Icon:A.ArchiveBoxIcon,color:"text-yellow-600 dark:text-yellow-400"}:{Icon:A.DocumentIcon,color:"text-gray-600 dark:text-gray-400"}},{Icon:i,color:l}=s(e);return n.jsx(i,{className:y(o[t],r?l:"text-gray-600 dark:text-gray-400",a)})},$d=({currentPage:e,totalPages:t,onPageChange:r,siblingCount:a=1,showFirstLast:o=!1,size:s="md",className:i})=>{const c={sm:{button:"h-8 w-8 text-xs",icon:"h-3 w-3",text:T.body.sm()},md:{button:"h-10 w-10 text-sm",icon:"h-4 w-4",text:T.body.md()},lg:{button:"h-12 w-12 text-base",icon:"h-5 w-5",text:T.body.lg()}}[s],g=(()=>{const k=[];k.push(1);const N=Math.max(e-a,2),P=Math.min(e+a,t-1);N>2&&k.push("ellipsis");for(let E=N;E<=P;E++)k.push(E);return P<t-1&&k.push("ellipsis"),t>1&&k.push(t),k})(),m=()=>{e>1&&r(e-1)},b=()=>{e<t&&r(e+1)},f=()=>{r(1)},p=()=>{r(t)},h=y("inline-flex items-center justify-center","rounded-md border border-gray-300 dark:border-gray-600","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed"),w=k=>y(h,c.button,c.text,k?"bg-blue-600 text-white border-blue-600 dark:bg-blue-500 dark:border-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"),C=y(h,c.button,"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700");return n.jsxs("nav",{className:y("flex items-center gap-1",i),"aria-label":"Pagination",children:[o&&n.jsx("button",{onClick:f,disabled:e===1,className:C,"aria-label":"Go to first page",children:n.jsx("span",{className:c.text,children:"First"})}),n.jsx("button",{onClick:m,disabled:e===1,className:C,"aria-label":"Go to previous page",children:n.jsx(A.ChevronLeftIcon,{className:c.icon})}),g.map((k,N)=>k==="ellipsis"?n.jsx("span",{className:y("inline-flex items-center justify-center",c.button,"text-gray-400 dark:text-gray-500"),children:"..."},`ellipsis-${N}`):n.jsx("button",{onClick:()=>r(k),className:w(k===e),"aria-label":`Go to page ${k}`,"aria-current":k===e?"page":void 0,children:k},k)),n.jsx("button",{onClick:b,disabled:e===t,className:C,"aria-label":"Go to next page",children:n.jsx(A.ChevronRightIcon,{className:c.icon})}),o&&n.jsx("button",{onClick:p,disabled:e===t,className:C,"aria-label":"Go to last page",children:n.jsx("span",{className:c.text,children:"Last"})})]})},Ld=({children:e,variant:t="default",size:r="md",onRemove:a,onClick:o,disabled:s=!1,className:i})=>{const l={sm:{tag:"px-2 py-0.5 text-xs gap-1",icon:"h-3 w-3"},md:{tag:"px-2.5 py-1 text-sm gap-1.5",icon:"h-3.5 w-3.5"},lg:{tag:"px-3 py-1.5 text-base gap-2",icon:"h-4 w-4"}},c={default:"bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700",primary:"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 hover:bg-blue-200 dark:hover:bg-blue-900/50",success:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300 hover:bg-green-200 dark:hover:bg-green-900/50",warning:"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300 hover:bg-yellow-200 dark:hover:bg-yellow-900/50",danger:"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300 hover:bg-red-200 dark:hover:bg-red-900/50",info:"bg-cyan-100 dark:bg-cyan-900/30 text-cyan-700 dark:text-cyan-300 hover:bg-cyan-200 dark:hover:bg-cyan-900/50",purple:"bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300 hover:bg-purple-200 dark:hover:bg-purple-900/50"},d=l[r],g=o||a,m=()=>{s||o&&o()},b=f=>{f.stopPropagation(),!(s||!a)&&a()};return n.jsxs("span",{onClick:m,className:y("inline-flex items-center font-medium rounded-full","transition-colors duration-200",d.tag,c[t],g&&!s&&"cursor-pointer",s&&"opacity-50 cursor-not-allowed",i),children:[n.jsx("span",{children:e}),a&&n.jsx("button",{type:"button",onClick:b,disabled:s,className:y("inline-flex items-center justify-center rounded-full","hover:bg-black/10 dark:hover:bg-white/10","transition-colors",s?"cursor-not-allowed":"cursor-pointer"),"aria-label":"Remove",children:n.jsx(he.XMarkIcon,{className:d.icon})})]})},Md=({isOpen:e,onClick:t,opacity:r="medium",blur:a=!1,zIndex:o=50,className:s,children:i})=>{const l={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/80"};return e?n.jsx("div",{onClick:t,className:y("fixed inset-0","transition-all duration-200",l[r],a&&"backdrop-blur-sm",s),style:{zIndex:o},role:"presentation","aria-hidden":"true",children:i}):null},Od=({children:e,icon:t,onClick:r,disabled:a=!1,danger:o=!1,selected:s=!1,description:i,shortcut:l,className:c})=>{const d=()=>{a||r?.()},g=m=>{a||(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),r?.())};return n.jsxs("div",{role:"menuitem",tabIndex:a?-1:0,onClick:d,onKeyDown:g,className:y("flex items-center gap-3 px-3 py-2","transition-colors duration-150","cursor-pointer select-none",!a&&!o&&!s&&"hover:bg-gray-100 dark:hover:bg-gray-700",!a&&!o&&s&&"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",!a&&o&&"hover:bg-red-50 dark:hover:bg-red-900/30 text-red-600 dark:text-red-400",a&&"opacity-50 cursor-not-allowed",c),"aria-disabled":a,children:[t&&n.jsx(t,{className:y("h-5 w-5 flex-shrink-0",o?"text-red-600 dark:text-red-400":s?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400")}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:y(T.body.md(),o&&"text-red-600 dark:text-red-400",s&&"text-blue-700 dark:text-blue-300 font-medium",!o&&!s&&"text-gray-900 dark:text-gray-100"),children:e}),i&&n.jsx("div",{className:y(T.caption.default(),"text-gray-600 dark:text-gray-400 mt-0.5"),children:i})]}),l&&n.jsx("span",{className:y(T.caption.default(),"text-gray-500 dark:text-gray-400 flex-shrink-0"),children:l})]})},zd=({isLoading:e,message:t,mode:r="fullscreen",blur:a=!1,spinnerSize:o="large",className:s})=>e?n.jsxs("div",{className:y(r==="fullscreen"?"fixed":"absolute","inset-0 z-50","flex flex-col items-center justify-center","bg-white/80 dark:bg-gray-900/80",a&&"backdrop-blur-sm",s),role:"alert","aria-live":"polite","aria-busy":"true",children:[n.jsx(at,{size:o}),t&&n.jsx("p",{className:y(T.body.md(),"text-gray-700 dark:text-gray-300 mt-4"),children:t})]}):null,Dd=({orientation:e="horizontal",spacing:t="md",thickness:r="thin",className:a})=>{const o={horizontal:{none:"",sm:"my-1",md:"my-2",lg:"my-4"},vertical:{none:"",sm:"mx-1",md:"mx-2",lg:"mx-4"}},s={horizontal:{thin:"h-px",medium:"h-0.5",thick:"h-1"},vertical:{thin:"w-px",medium:"w-0.5",thick:"w-1"}},i=e==="horizontal";return n.jsx("div",{role:"separator","aria-orientation":e,className:y("bg-gray-200 dark:bg-gray-700",i?"w-full":"h-full",s[e][r],o[e][t],a)})};x.createContext(void 0);const Bd=({wallet:e,connector:t,className:r="w-8 h-8",iconBasePath:a="/wallet-icons"})=>{const o=e.toLowerCase(),s=l=>{const c={metamask:"metamask.svg",walletconnect:"walletconnect.svg",coinbase:"coinbase.svg",phantom:"phantom.svg",solflare:"solflare.svg",keplr:"keplr.svg",browser:"browser-wallet.svg",injected:"browser-wallet.svg"};for(const[d,g]of Object.entries(c))if(l.includes(d))return`${a}/${g}`;return`${a}/default.svg`};if(t?.icon)return n.jsx("img",{src:t.icon,alt:`${e} wallet`,className:`${r} rounded-lg`,onError:l=>{const c=l.target;c.src=s(o)}});const i=s(o);return n.jsx("img",{src:i,alt:`${e} wallet`,className:`${r} rounded-lg`,onError:l=>{const c=l.target;c.src=`${a}/default.svg`}})},Wd=({size:e="md",className:t="",showText:r=!0,onClick:a,logoSrc:o="/logo.png",logoAlt:s="Logo",logoText:i,fontFamily:l="Dancing Script, cursive"})=>{const d=(()=>{switch(e){case"sm":return{container:"space-x-2",image:"h-6 w-6",text:"text-lg"};case"md":return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"};case"lg":return{container:"space-x-3",image:"h-10 w-10",text:"text-3xl"};case"xl":return{container:"space-x-4",image:"h-12 w-12",text:"text-4xl"};default:return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"}}})(),g=n.jsxs(n.Fragment,{children:[n.jsx("img",{src:o,alt:s,className:d.image}),r&&n.jsx("div",{className:`${d.text} font-bold text-gray-900 dark:text-gray-100`,style:{fontFamily:l,fontWeight:"700"},children:i})]});return a?n.jsx("button",{onClick:a,className:`flex items-center ${d.container} ${t} hover:opacity-80 transition-opacity`,children:g}):n.jsx("div",{className:`flex items-center ${d.container} ${t}`,children:g})},ie={twitter:(e,t,r)=>{const a=r.length>0?`&hashtags=${r.join(",")}`:"";return`https://twitter.com/intent/tweet?url=${encodeURIComponent(e)}&text=${encodeURIComponent(t)}${a}`},facebook:e=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(e)}`,linkedin:(e,t,r)=>`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(e)}`,reddit:(e,t)=>`https://reddit.com/submit?url=${encodeURIComponent(e)}&title=${encodeURIComponent(t)}`,telegram:(e,t)=>`https://t.me/share/url?url=${encodeURIComponent(e)}&text=${encodeURIComponent(t)}`,whatsapp:(e,t)=>`https://wa.me/?text=${encodeURIComponent(t+" "+e)}`,email:(e,t,r)=>`mailto:?subject=${encodeURIComponent(t)}&body=${encodeURIComponent(r+`
35
+ `,children:[g&&r.jsx("option",{value:"",disabled:!0,children:g}),o.map(h=>r.jsx("option",{value:h.value,disabled:h.disabled,children:h.label},h.value))]})}),yo=({successMessage:t,errorMessage:e,successTitle:a="Success",errorTitle:o="Error",autoDismissDelay:n=0,onSuccessDismiss:s,className:l=""})=>(y.useEffect(()=>{if(t&&n>0&&s){const g=setTimeout(()=>{s()},n);return()=>clearTimeout(g)}},[t,n,s]),!t&&!e?null:r.jsxs("div",{className:`space-y-3 ${l}`,children:[e&&r.jsx(Ae,{variant:"error",title:o,description:e}),t&&r.jsx(Ae,{variant:"success",title:a,description:t})]})),mo=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PhoneDirectory",children:e||"PhoneDirectory Component"}),vo=V.cva("min-h-[44px] touch-manipulation",{variants:{variant:{default:"",primary:"",secondary:"",outline:"",ghost:"",destructive:"","destructive-outline":"",success:"",link:"",gradient:"","gradient-secondary":"","gradient-success":"",wallet:"",connect:"",disconnect:""},size:{default:"",sm:"h-8",lg:"h-12",icon:"h-10 w-10 p-0"},animation:{none:"transition-colors duration-200",hover:"transition-all duration-200 hover:scale-105",lift:"transition-all duration-200 hover:scale-105",scale:"transition-transform duration-200 hover:scale-95",glow:"transition-all duration-200 hover:shadow-lg",shimmer:"transition-all duration-200",tap:"transition-transform duration-100 active:scale-95",connect:"transition-all duration-200 hover:scale-105",transaction:"transition-all duration-200 animate-pulse",disconnect:"transition-all duration-200 hover:opacity-80"}},defaultVariants:{variant:"default",size:"default",animation:"hover"}}),J=O.forwardRef(({className:t,variant:e,size:a,animation:o,asChild:n=!1,...s},l)=>{const g=n?yt.Slot:"button",c=e||"default",i=a&&a!=="default"&&a!=="icon"?a:void 0,h=m=>m?{sm:"small",lg:"large",default:"default"}[m]||m:"default",x=(()=>{if(c.startsWith("gradient")){const m=c.replace("gradient-","").replace("gradient","primary");return D.button.gradient[m]?.()||D.button.primary.default()}else{if(["wallet","connect","disconnect"].includes(c))return D.button.web3[c]?.()||D.button.primary.default();{const m=h(i);return D.button[c]?.[m]?.()||D.button.primary.default()}}})();return r.jsx(g,{className:u(vo({size:a,animation:o}),x,t),ref:l,...s})});J.displayName="Button";const xo=({size:t="default",variant:e="default",className:a,ariaLabel:o="Loading",loadingText:n="Loading..."})=>{const s=()=>{const l={small:"w-4 h-4",default:"w-6 h-6",large:"w-8 h-8",extraLarge:"w-16 h-16 border-4"},g={default:"border-gray-300 border-t-blue-600",white:"border-white/30 border-t-white",success:"border-gray-300 border-t-green-600",warning:"border-gray-300 border-t-orange-600",error:"border-gray-300 border-t-red-600"};return`animate-spin rounded-full border-2 ${l[t]} ${g[e]}`};return r.jsx("div",{className:u(s(),a),role:"status","aria-label":o,children:r.jsx("span",{className:"sr-only",children:n})})},ko=({children:t,isLoading:e=!1,loadingText:a="Loading...",showSpinner:o=!0,disabled:n,...s})=>r.jsx(J,{...s,disabled:n||e,className:s.className,children:e?r.jsxs("span",{className:"flex items-center gap-2",children:[o&&r.jsx(xo,{size:"small"}),r.jsx("span",{children:a})]}):t}),wo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UinlineUedit",children:e||"UinlineUedit Component"}),Co=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprivacyUtoggle",children:e||"UprivacyUtoggle Component"}),No=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpasswordUstrength",children:e||"UpasswordUstrength Component"}),Lr=({value:t,onChange:e,minDate:a,maxDate:o,disabledDates:n=[],showOutsideDays:s=!0,className:l})=>{const[g,c]=y.useState(t||new Date),i=v=>{const w=v.getFullYear(),L=v.getMonth();return new Date(w,L+1,0).getDate()},h=v=>{const w=v.getFullYear(),L=v.getMonth();return new Date(w,L,1).getDay()},b=(v,w)=>v.getFullYear()===w.getFullYear()&&v.getMonth()===w.getMonth()&&v.getDate()===w.getDate(),x=v=>a&&v<a||o&&v>o?!0:n.some(w=>b(v,w)),m=()=>{c(new Date(g.getFullYear(),g.getMonth()-1))},f=()=>{c(new Date(g.getFullYear(),g.getMonth()+1))},C=(()=>{const v=g.getFullYear(),w=g.getMonth(),L=i(g),M=h(g),I=[];if(s){const $=i(new Date(v,w-1));for(let A=M-1;A>=0;A--)I.push(new Date(v,w-1,$-A))}else for(let $=0;$<M;$++)I.push(null);for(let $=1;$<=L;$++)I.push(new Date(v,w,$));if(s){const $=42-I.length;for(let A=1;A<=$;A++)I.push(new Date(v,w+1,A))}return I})(),S=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],k=v=>{!v||x(v)||e(v)},N=g.toLocaleDateString("en-US",{month:"long",year:"numeric"});return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-4",l),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("button",{onClick:m,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("h2",{className:"text-base font-semibold text-gray-900 dark:text-white",children:N}),r.jsx("button",{onClick:f,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:S.map(v=>r.jsx("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:v},v))}),r.jsx("div",{className:"grid grid-cols-7 gap-1",children:C.map((v,w)=>{if(!v)return r.jsx("div",{className:"aspect-square"},w);const L=v.getMonth()===g.getMonth(),M=t&&b(v,t),I=b(v,new Date),$=x(v);return r.jsx("button",{onClick:()=>k(v),disabled:$,className:u("aspect-square flex items-center justify-center rounded-md text-sm transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",L?"text-gray-900 dark:text-white":"text-gray-400 dark:text-gray-600",M&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",I&&!M&&"border-2 border-blue-600 dark:border-blue-400"),children:v.getDate()},w)})})]})},So=({value:t,onChange:e,use12Hour:a=!1,minuteStep:o=1,minDate:n,maxDate:s,disabled:l=!1,className:g})=>{const[c,i]=y.useState(!1),[h,b]=y.useState(t),x=C=>{const S=C.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),k=C.getHours(),N=C.getMinutes();if(a){const v=k===0?12:k>12?k-12:k,w=k>=12?"PM":"AM";return`${S}, ${v}:${N.toString().padStart(2,"0")} ${w}`}return`${S}, ${k.toString().padStart(2,"0")}:${N.toString().padStart(2,"0")}`},m=C=>{const S=new Date(C);S.setHours(h.getHours()),S.setMinutes(h.getMinutes()),b(S),e(S)},f=C=>{const[S,k]=C.split(":").map(Number),N=new Date(h);N.setHours(S),N.setMinutes(k),b(N),e(N)},p=C=>{const S=C.getHours(),k=C.getMinutes();return`${S.toString().padStart(2,"0")}:${k.toString().padStart(2,"0")}`};return r.jsxs("div",{className:u("relative w-full",g),children:[r.jsxs("button",{type:"button",onClick:()=>!l&&i(!c),disabled:l,className:u("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",c&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:"text-gray-900 dark:text-white",children:x(t)}),r.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})]}),c&&r.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50 p-3",children:r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Date"}),r.jsx(Lr,{value:h,onChange:m,minDate:n,maxDate:s})]}),r.jsx("div",{className:"h-px bg-gray-200 dark:bg-gray-700"}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Time"}),r.jsx(yr,{value:p(h),onChange:f,use12Hour:a,minuteStep:o})]}),r.jsxs("div",{className:"flex gap-2 pt-2",children:[r.jsx("button",{onClick:()=>i(!1),className:u("flex-1 px-3 py-1.5 text-sm","bg-gray-100 dark:bg-gray-800","text-gray-700 dark:text-gray-300","rounded-md","hover:bg-gray-200 dark:hover:bg-gray-700","transition-colors"),children:"Cancel"}),r.jsx("button",{onClick:()=>{e(h),i(!1)},className:u("flex-1 px-3 py-1.5 text-sm","bg-blue-600 dark:bg-blue-500","text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"OK"})]})]})}),c&&r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)})]})},Eo=({value:t,onChange:e,minDate:a,maxDate:o,disabledDates:n=[],months:s=2,className:l})=>{const[g,c]=y.useState(new Date),[i,h]=y.useState(null),b=(M,I)=>M.getFullYear()===I.getFullYear()&&M.getMonth()===I.getMonth()&&M.getDate()===I.getDate(),x=M=>a&&M<a||o&&M>o?!0:n.some(I=>b(M,I)),m=M=>{if(!t.start||!t.end&&!i)return!1;const I=t.end||i;return I?M>t.start&&M<I:!1},f=M=>t.start?b(M,t.start):!1,p=M=>t.end?b(M,t.end):!1,C=M=>{x(M)||(!t.start||t.start&&t.end?e({start:M,end:null}):M<t.start?e({start:M,end:t.start}):e({start:t.start,end:M}))},S=M=>{const I=M.getFullYear(),$=M.getMonth();return new Date(I,$+1,0).getDate()},k=M=>{const I=M.getFullYear(),$=M.getMonth();return new Date(I,$,1).getDay()},N=M=>{const I=new Date(g.getFullYear(),g.getMonth()+M),$=I.getFullYear(),A=I.getMonth(),z=S(I),P=k(I),W=[];for(let j=0;j<P;j++)W.push(null);for(let j=1;j<=z;j++)W.push(new Date($,A,j));return{days:W,monthName:I.toLocaleDateString("en-US",{month:"long",year:"numeric"})}},v=()=>{c(new Date(g.getFullYear(),g.getMonth()-1))},w=()=>{c(new Date(g.getFullYear(),g.getMonth()+1))},L=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-4",l),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("button",{onClick:v,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("button",{onClick:w,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${s}, 1fr)`},children:Array.from({length:s},(M,I)=>{const{days:$,monthName:A}=N(I);return r.jsxs("div",{children:[r.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-white mb-4 text-center",children:A}),r.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:L.map(z=>r.jsx("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:z},z))}),r.jsx("div",{className:"grid grid-cols-7 gap-1",children:$.map((z,P)=>{if(!z)return r.jsx("div",{className:"aspect-square"},P);const W=x(z),j=f(z),F=p(z),q=m(z),dr=b(z,new Date);return r.jsx("button",{onClick:()=>C(z),onMouseEnter:()=>h(z),onMouseLeave:()=>h(null),disabled:W,className:u("aspect-square flex items-center justify-center rounded-md text-sm transition-colors relative","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",q&&"bg-blue-100 dark:bg-blue-900/30",(j||F)&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",!j&&!F&&!q&&"hover:bg-gray-100 dark:hover:bg-gray-800",dr&&!j&&!F&&"border-2 border-blue-600 dark:border-blue-400"),children:z.getDate()},P)})})]},I)})}),(t.start||t.end)&&r.jsx("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:r.jsxs("div",{className:"flex items-center justify-between text-sm",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Start: "}),r.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:t.start?.toLocaleDateString()||"Not selected"})]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"End: "}),r.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:t.end?.toLocaleDateString()||"Not selected"})]})]})})]})},Lo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtimeUslotUpicker",children:e||"UtimeUslotUpicker Component"}),Io=({value:t,onChange:e,presets:a=["#000000","#FFFFFF","#FF6B6B","#4ECDC4","#45B7D1","#FFA07A","#F7DC6F","#BB8FCE","#85C1E2","#F8B500","#52B788","#E63946","#1D3557","#457B9D","#A8DADC","#F4A261","#264653","#2A9D8F"],showInput:o=!0,showOpacity:n=!1,className:s})=>{const[l,g]=y.useState(t),[c,i]=y.useState(100),h=p=>{e(p),g(p)},b=p=>{const C=p.target.value;g(C),/^#[0-9A-F]{6}$/i.test(C)&&e(C)},x=p=>{i(Number(p.target.value))},f=n?((p,C)=>{const S=parseInt(p.slice(1,3),16),k=parseInt(p.slice(3,5),16),N=parseInt(p.slice(5,7),16);return`rgba(${S}, ${k}, ${N}, ${C/100})`})(t,c):t;return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-4",s),children:[r.jsx("div",{className:"mb-4",children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-16 h-16 rounded-lg border-2 border-gray-200 dark:border-gray-700 shadow-sm",style:{backgroundColor:f}}),r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Selected Color"}),r.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 mt-1 font-mono",children:[t,n&&` (${c}%)`]})]})]})}),r.jsxs("div",{className:"mb-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Preset Colors"}),r.jsx("div",{className:"grid grid-cols-6 gap-2",children:a.map(p=>r.jsx("button",{onClick:()=>h(p),className:u("w-full aspect-square rounded-md border-2 transition-all hover:scale-110",p===t?"border-blue-500 dark:border-blue-400 ring-2 ring-blue-200 dark:ring-blue-800":"border-gray-200 dark:border-gray-700"),style:{backgroundColor:p},"aria-label":`Select color ${p}`},p))})]}),o&&r.jsxs("div",{className:"mb-4",children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Custom Color (Hex)"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("input",{type:"text",value:l,onChange:b,placeholder:"#000000",className:"flex-1 px-3 py-2 text-sm font-mono bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"}),r.jsx("input",{type:"color",value:t,onChange:p=>h(p.target.value),className:"w-12 h-10 rounded-md cursor-pointer"})]})]}),n&&r.jsxs("div",{children:[r.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:["Opacity: ",c,"%"]}),r.jsx("input",{type:"range",min:"0",max:"100",value:c,onChange:x,className:"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer"})]})]})},Mo=({value:t,onChange:e,presets:a,className:o})=>{const s=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"];return r.jsxs("div",{className:u("space-y-3",o),children:[r.jsx("input",{type:"color",value:t,onChange:l=>e(l.target.value),className:"w-full h-12 rounded cursor-pointer"}),r.jsx("div",{className:"grid grid-cols-8 gap-2",children:s.map(l=>r.jsx("button",{onClick:()=>e(l),className:u("w-8 h-8 rounded border-2",t===l?"border-blue-500":"border-transparent"),style:{backgroundColor:l}},l))})]})},$o=({colors:t,selectedColor:e,onColorSelect:a,size:o="md",showNames:n=!1,showCopy:s=!1,className:l})=>{const[g,c]=y.useState(null),i={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},h=()=>t.map(m=>typeof m=="string"?{hex:m}:m),b=async(m,f)=>{f.stopPropagation(),await navigator.clipboard.writeText(m),c(m),setTimeout(()=>c(null),2e3)},x=h();return r.jsx("div",{className:u("flex flex-wrap gap-3",l),children:x.map((m,f)=>{const p=e===m.hex,C=g===m.hex;return r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx("button",{onClick:()=>a?.(m.hex),className:u("rounded-lg transition-all relative group",i[o],p&&"ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-gray-900",!p&&"hover:scale-110"),style:{backgroundColor:m.hex},"aria-label":m.name||m.hex,children:s&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/50 rounded-lg",onClick:S=>b(m.hex,S),children:C?r.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):r.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})})}),n&&r.jsxs("div",{className:"text-center",children:[m.name&&r.jsx("p",{className:"text-xs font-medium text-gray-900 dark:text-white",children:m.name}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 font-mono",children:m.hex})]})]},f)})})},Uo=({onSave:t,width:e=400,height:a=200,className:o})=>r.jsxs("div",{className:u("border border-gray-300 dark:border-gray-700 rounded-lg",o),children:[r.jsx("canvas",{width:e,height:a,className:"bg-white dark:bg-gray-900"}),r.jsxs("div",{className:"flex gap-2 p-2",children:[r.jsx("button",{className:"px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Clear"}),r.jsx("button",{onClick:()=>t?.(""),className:"px-3 py-1 bg-green-500 text-white rounded hover:bg-green-600",children:"Save"})]})]}),To=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"SignatureRequest",children:e||"SignatureRequest Component"}),Ao=({value:t,onChange:e,placeholder:a,className:o})=>r.jsxs("div",{className:u("border border-gray-300 dark:border-gray-700 rounded-lg",o),children:[r.jsx("div",{className:"flex gap-1 p-2 border-b border-gray-300 dark:border-gray-700",children:["B","I","U","H1","H2","List","Link"].map(n=>r.jsx("button",{className:"px-3 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded text-sm font-semibold",children:n},n))}),r.jsx("textarea",{value:t,onChange:n=>e(n.target.value),placeholder:a,className:"w-full p-4 bg-white dark:bg-gray-900 text-gray-900 dark:text-white resize-none focus:outline-none",rows:10})]}),Po=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmarkdownUrenderer",children:e||"UmarkdownUrenderer Component"}),zo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcodeUhighlighter",children:e||"UcodeUhighlighter Component"}),Do=({cardNumber:t,onCardNumberChange:e,expiryDate:a="",onExpiryDateChange:o,cvv:n="",onCVVChange:s,cardholderName:l="",onCardholderNameChange:g,showAllFields:c=!1,disabled:i=!1,className:h})=>{const b=v=>{const w=v.replace(/\s/g,"");return/^4/.test(w)?"visa":/^5[1-5]/.test(w)?"mastercard":/^3[47]/.test(w)?"amex":/^6(?:011|5)/.test(w)?"discover":"unknown"},x=b(t),m=v=>{const w=v.replace(/\D/g,"");if(b(w)==="amex"){const z=w.slice(0,15);return[z.slice(0,4),z.slice(4,10),z.slice(10,15)].filter(Boolean).join(" ")}return(w.slice(0,16).match(/.{1,4}/g)||[]).join(" ")},f=v=>{const M=v.replace(/\D/g,"").slice(0,4);return M.length>=2?`${M.slice(0,2)}/${M.slice(2)}`:M},p=v=>{const w=v.replace(/\D/g,""),L=x==="amex"?4:3;return w.slice(0,L)},C=v=>{const w=m(v.target.value);e(w)},S=v=>{if(!o)return;const w=f(v.target.value);o(w)},k=v=>{if(!s)return;const w=p(v.target.value);s(w)},N=()=>{switch(x){case"visa":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#1434CB"}),r.jsx("path",{d:"M20 11l-2 10h2l2-10h-2zm8 0l-3.5 7-1.5-7h-2l2.5 10h2l5.5-10h-3zm-12 0c-1.5 0-2.5.5-2.5 1.5 0 1.5 3 1.5 3 3.5s-2.5 2-4 2l-.5-2c1 0 2-.5 2-1.5s-3-1.5-3-3.5 2.5-2 4-2l.5 2z",fill:"white"})]});case"mastercard":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#EB001B"}),r.jsx("circle",{cx:"18",cy:"16",r:"8",fill:"#F79E1B"}),r.jsx("circle",{cx:"30",cy:"16",r:"8",fill:"#FF5F00"})]});case"amex":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#006FCF"}),r.jsx("path",{d:"M10 12h8l2 8-2 8h-8l-2-8 2-8z",fill:"white"})]});case"discover":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#FF6000"}),r.jsx("circle",{cx:"38",cy:"16",r:"6",fill:"#FFA500"})]});default:return r.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})})}};return r.jsxs("div",{className:u("w-full space-y-3",h),children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Card number"}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:"text",value:t,onChange:C,placeholder:"1234 5678 9012 3456",disabled:i,className:u("w-full px-3 py-2 pr-12 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")}),r.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:N()})]})]}),c&&r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Expiry date"}),r.jsx("input",{type:"text",value:a,onChange:S,placeholder:"MM/YY",disabled:i,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"CVV"}),r.jsx("input",{type:"text",value:n,onChange:k,placeholder:x==="amex"?"1234":"123",disabled:i,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]}),c&&r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Cardholder name"}),r.jsx("input",{type:"text",value:l,onChange:v=>g?.(v.target.value),placeholder:"John Doe",disabled:i,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]})},Ir=[{code:"USD",symbol:"$",name:"US Dollar",decimals:2},{code:"EUR",symbol:"€",name:"Euro",decimals:2},{code:"GBP",symbol:"£",name:"British Pound",decimals:2},{code:"JPY",symbol:"¥",name:"Japanese Yen",decimals:0},{code:"CNY",symbol:"¥",name:"Chinese Yuan",decimals:2},{code:"AUD",symbol:"A$",name:"Australian Dollar",decimals:2},{code:"CAD",symbol:"C$",name:"Canadian Dollar",decimals:2},{code:"CHF",symbol:"Fr",name:"Swiss Franc",decimals:2},{code:"INR",symbol:"₹",name:"Indian Rupee",decimals:2},{code:"BRL",symbol:"R$",name:"Brazilian Real",decimals:2}],jo=({value:t,onChange:e,currency:a="USD",onCurrencyChange:o,currencies:n=Ir,showCurrencySelector:s=!1,placeholder:l="0.00",min:g,max:c,disabled:i=!1,className:h})=>{const[b,x]=y.useState(""),[m,f]=y.useState(!1),[p,C]=y.useState(!1),k=typeof a=="string"?n.find(I=>I.code===a)||Ir[0]:a,N=y.useCallback(I=>{const $=k.decimals??2;return I.toLocaleString("en-US",{minimumFractionDigits:$,maximumFractionDigits:$})},[k]);y.useEffect(()=>{m||x(N(t||0))},[t,N,m]);const v=I=>{const A=I.target.value.replace(/[^\d.]/g,""),z=A.split("."),P=z.length>2?`${z[0]}.${z.slice(1).join("")}`:A;x(P);let j=parseFloat(P)||0;g!==void 0&&j<g&&(j=g),c!==void 0&&j>c&&(j=c),e(j)},w=()=>{f(!0),x(t?t.toString():"")},L=()=>{f(!1),x(N(t||0))},M=I=>{o?.(I),C(!1)};return r.jsxs("div",{className:u("relative w-full",h),children:[r.jsxs("div",{className:"flex gap-2",children:[s&&r.jsxs("div",{className:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>!i&&C(!p),disabled:i,className:u("flex items-center gap-2 px-3 py-2 min-w-[100px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",p&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:k.code}),r.jsx("svg",{className:u("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",p&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),p&&r.jsx("div",{className:"absolute top-full left-0 mt-1 w-64 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:n.map(I=>r.jsxs("button",{onClick:()=>M(I.code),className:u("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",I.code===k.code&&"bg-blue-50 dark:bg-blue-900/30"),children:[r.jsx("span",{className:"text-lg font-semibold w-8",children:I.symbol}),r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:I.code}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:I.name})]})]},I.code))})})]}),r.jsxs("div",{className:"relative flex-1",children:[r.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-600 dark:text-gray-400 text-sm font-medium",children:k.symbol}),r.jsx("input",{type:"text",value:b,onChange:v,onFocus:w,onBlur:L,placeholder:l,disabled:i,className:u("w-full pl-8 pr-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]}),(g!==void 0||c!==void 0)&&r.jsx("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:g!==void 0&&c!==void 0?`Range: ${k.symbol}${N(g)} - ${k.symbol}${N(c)}`:g!==void 0?`Minimum: ${k.symbol}${N(g)}`:`Maximum: ${k.symbol}${N(c)}`}),p&&r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>C(!1)})]})},Bo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcurrencyUconverter",children:e||"UcurrencyUconverter Component"}),Wo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcurrencyUrates",children:e||"UcurrencyUrates Component"}),Oo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UformUbuilder",children:e||"UformUbuilder Component"}),Fo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UformUvalidator",children:e||"UformUvalidator Component"}),Vo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UformUtemplate",children:e||"UformUtemplate Component"}),Ho=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UschemaUvalidator",children:e||"UschemaUvalidator Component"}),qo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfieldUmapper",children:e||"UfieldUmapper Component"}),_o=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsurveyUbuilder",children:e||"UsurveyUbuilder Component"}),Go=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"QuizBuilder",children:e||"QuizBuilder Component"}),Se=V.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:T.link.subtle(),default:T.link.default(),muted:T.link.muted(),external:T.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),Oe=O.forwardRef(({className:t,variant:e,size:a,to:o,href:n,external:s,children:l,...g},c)=>{const i=o||n;return i?s||i.startsWith("http")||i.startsWith("mailto:")?r.jsx("a",{className:u(Se({variant:e==="subtle"?"external":e,size:a,className:t})),href:i,target:"_blank",rel:"noopener noreferrer",ref:c,...g,children:l}):r.jsx(Ue.Link,{className:u(Se({variant:e,size:a,className:t})),to:i,ref:c,...g,children:l}):r.jsx("span",{className:u(Se({variant:e,size:a,className:t})),...g,children:l})});Oe.displayName="SmartLink";const Ko=(t,e)=>O.useMemo(()=>{let a=t;return Object.entries(e).forEach(([o,n])=>{const s=new RegExp(`\\b${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");a=a.replace(s,l=>`<SmartLink to="${n}" variant="subtle">${l}</SmartLink>`)}),a},[t,e]),Yo={documentation:"/document",settings:"/settings",about:"/about",contact:"/contact","privacy policy":"/privacy",privacy:"/privacy","terms of service":"/terms",terms:"/terms","cookie policy":"/cookies",cookies:"/cookies",points:"/points","earn points":"/how-to-earn-points","how to earn points":"/how-to-earn-points","connect wallet":"/connect","connect your wallet":"/connect","wallet connection":"/connect",wallet:"/connect",compose:"/compose","compose email":"/compose","send email":"/compose",mail:"/mail",email:"/mail",inbox:"/mail",dashboard:"/mail",delegate:"/delegate",delegation:"/delegate",manage:"/manage","manage preferences":"/preferences",profile:"/settings",account:"/settings",preferences:"/preferences",token:"/token","web3 users":"/web3-users","web3 projects":"/web3-projects","get started":"/connect","start here":"/connect","learn more":"/document","read more":"/document","our features":"/document",support:"/contact",help:"/document","contact us":"/contact"},Qo=({children:t,mappings:e=Yo,className:a,variant:o="subtle"})=>{const n=O.useMemo(()=>{if(!t||typeof t!="string")return t||"";let l=t;return Object.entries(e).sort(([c],[i])=>i.length-c.length).forEach(([c,i])=>{if(c&&i){const h=new RegExp(`\\b${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");l=l.replace(h,b=>`__LINK_START__${i}__LINK_MID__${b}__LINK_END__`)}}),l},[t,e]);if(!n||typeof n!="string")return r.jsx("span",{className:a,children:t});const s=n.split(/(__LINK_START__.*?__LINK_END__)/);return r.jsx("span",{className:a,children:s.map((l,g)=>{const c=l.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(c){const[,i,h]=c;return r.jsx(Oe,{to:i,variant:o,children:h},g)}return l})})},Zo=({href:t,children:e,variant:a="default",external:o=!1,showExternalIcon:n=!1,disabled:s=!1,className:l,...g})=>{const c=o||t.startsWith("http://")||t.startsWith("https://"),i={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium",secondary:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100",muted:"text-gray-500 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",underline:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 underline"},h=c?{target:"_blank",rel:"noopener noreferrer"}:{};return s?r.jsxs("span",{className:u("cursor-not-allowed opacity-50",i[a],l),children:[e,n&&c&&r.jsx(U.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1"})]}):r.jsxs("a",{href:t,className:u("inline-flex items-center transition-colors",i[a],l),...h,...g,children:[e,n&&c&&r.jsx(U.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1 flex-shrink-0"})]})},Xo=({href:t,children:e,showIcon:a=!0,iconPosition:o="right",size:n="md",variant:s="default",className:l,onClick:g})=>{const c={sm:{text:T.body.sm(),icon:"h-3 w-3",gap:"gap-1"},md:{text:T.body.md(),icon:"h-4 w-4",gap:"gap-1.5"},lg:{text:T.body.lg(),icon:"h-5 w-5",gap:"gap-2"}},i={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200 font-semibold",muted:"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"},h=c[n];return r.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",onClick:g,className:u("inline-flex items-center",h.gap,h.text,i[s],"underline decoration-1 underline-offset-2","hover:decoration-2","transition-all duration-200",l),children:[a&&o==="left"&&r.jsx(U.ArrowTopRightOnSquareIcon,{className:u(h.icon,"flex-shrink-0")}),r.jsx("span",{children:e}),a&&o==="right"&&r.jsx(U.ArrowTopRightOnSquareIcon,{className:u(h.icon,"flex-shrink-0")})]})},Jo=({items:t,separator:e="/",className:a})=>r.jsx("nav",{className:u("flex items-center gap-2 text-sm",a),children:t.map((o,n)=>r.jsxs(y.Fragment,{children:[n>0&&r.jsx("span",{className:"text-gray-400 dark:text-gray-600",children:e}),n===t.length-1?r.jsx("span",{className:"text-gray-900 dark:text-white font-medium",children:o.label}):r.jsx("button",{onClick:o.onClick,className:"text-blue-600 dark:text-blue-400 hover:underline",children:o.label})]},n))}),Ro=H.Root,Mr=O.forwardRef(({className:t,...e},a)=>r.jsx(H.List,{ref:a,className:u(D.navigation.tabs.list(),t),...e}));Mr.displayName=H.List.displayName;const $r=O.forwardRef(({className:t,...e},a)=>r.jsx(H.Trigger,{ref:a,className:u(D.navigation.tabs.trigger(),t),...e}));$r.displayName=H.Trigger.displayName;const Ur=O.forwardRef(({className:t,...e},a)=>r.jsx(H.Content,{ref:a,className:u(D.navigation.tabs.content(),t),...e}));Ur.displayName=H.Content.displayName;const en=({items:t,orientation:e="horizontal",className:a})=>{const[o,n]=y.useState(new Set),s=g=>{n(c=>{const i=new Set(c);return i.has(g)?i.delete(g):i.add(g),i})},l=(g,c)=>{const i=g.children&&g.children.length>0,h=o.has(c),b=r.jsxs(r.Fragment,{children:[g.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:g.icon}),r.jsx("span",{className:"flex-1",children:g.label}),i&&r.jsx("svg",{className:u("w-4 h-4 transition-transform",e==="horizontal"&&!h&&"-rotate-90",h&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),x=u("flex items-center gap-2 px-4 py-2 text-sm font-medium","transition-colors",g.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800");return r.jsxs("div",{children:[i?r.jsx("button",{onClick:()=>s(c),className:u(x,"w-full"),children:b}):g.href?r.jsx("a",{href:g.href,className:x,onClick:g.onClick,children:b}):r.jsx("button",{onClick:g.onClick,className:u(x,"w-full"),children:b}),i&&h&&r.jsx("div",{className:u("bg-gray-50 dark:bg-gray-800/50",e==="horizontal"?"pl-4":"border-l-2 border-gray-200 dark:border-gray-700 ml-4"),children:g.children.map((m,f)=>r.jsx("div",{children:m.href?r.jsxs("a",{href:m.href,onClick:m.onClick,className:u("flex items-center gap-2 px-4 py-2 text-sm","transition-colors",m.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[m.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]}):r.jsxs("button",{onClick:m.onClick,className:u("w-full flex items-center gap-2 px-4 py-2 text-sm","transition-colors",m.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[m.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]})},f))})]},c)};return r.jsx("nav",{className:u("bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg",e==="horizontal"?"flex flex-wrap":"flex flex-col",a),children:t.map((g,c)=>l(g,c))})},rn=({items:t,selectedPath:e,onSelect:a,variant:o="default",className:n})=>{const s=o==="compact"?"space-y-1":"space-y-0";return r.jsx("div",{className:u(s,n),children:t.map(l=>{const g=l.icon,c=e===l.path,i=l.disabled,h=u("flex items-start cursor-pointer transition-colors",o==="compact"?"p-3 rounded-lg":"p-4 border-b border-gray-200 dark:border-gray-700 last:border-b-0",i&&"opacity-50 cursor-not-allowed"),b=c?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300";return r.jsxs("div",{onClick:()=>!i&&a(l.path),className:u(h,!i&&b),role:"button",tabIndex:i?-1:0,"aria-current":c?"page":void 0,"aria-disabled":i,onKeyDown:x=>{!i&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),a(l.path))},children:[r.jsx(g,{className:"h-5 w-5 mt-0.5 mr-3 flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:u("font-medium",T.body.md()),children:[l.label,l.badge!==void 0&&l.badge>0&&r.jsx("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:l.badge})]}),l.description&&r.jsx("div",{className:u("text-xs text-gray-500 dark:text-gray-400 mt-0.5"),children:l.description})]})]},l.id)})})},tn=({items:t,className:e})=>r.jsx("nav",{className:u("flex flex-col gap-1",e),children:t.map(a=>r.jsxs("button",{onClick:a.onClick,className:u("flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",a.active?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"),children:[a.icon&&r.jsx("span",{className:"w-5 h-5",children:a.icon}),r.jsx("span",{className:"flex-1 text-left font-medium",children:a.label}),a.badge&&r.jsx("span",{className:"px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs",children:a.badge})]},a.id))}),an=({currentPage:t,totalPages:e,onPageChange:a,siblingCount:o=1,showFirstLast:n=!1,size:s="md",className:l})=>{const c={sm:{button:"h-8 w-8 text-xs",icon:"h-3 w-3",text:T.body.sm()},md:{button:"h-10 w-10 text-sm",icon:"h-4 w-4",text:T.body.md()},lg:{button:"h-12 w-12 text-base",icon:"h-5 w-5",text:T.body.lg()}}[s],h=(()=>{const k=[];k.push(1);const N=Math.max(t-o,2),v=Math.min(t+o,e-1);N>2&&k.push("ellipsis");for(let w=N;w<=v;w++)k.push(w);return v<e-1&&k.push("ellipsis"),e>1&&k.push(e),k})(),b=()=>{t>1&&a(t-1)},x=()=>{t<e&&a(t+1)},m=()=>{a(1)},f=()=>{a(e)},p=u("inline-flex items-center justify-center","rounded-md border border-gray-300 dark:border-gray-600","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed"),C=k=>u(p,c.button,c.text,k?"bg-blue-600 text-white border-blue-600 dark:bg-blue-500 dark:border-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"),S=u(p,c.button,"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700");return r.jsxs("nav",{className:u("flex items-center gap-1",l),"aria-label":"Pagination",children:[n&&r.jsx("button",{onClick:m,disabled:t===1,className:S,"aria-label":"Go to first page",children:r.jsx("span",{className:c.text,children:"First"})}),r.jsx("button",{onClick:b,disabled:t===1,className:S,"aria-label":"Go to previous page",children:r.jsx(U.ChevronLeftIcon,{className:c.icon})}),h.map((k,N)=>k==="ellipsis"?r.jsx("span",{className:u("inline-flex items-center justify-center",c.button,"text-gray-400 dark:text-gray-500"),children:"..."},`ellipsis-${N}`):r.jsx("button",{onClick:()=>a(k),className:C(k===t),"aria-label":`Go to page ${k}`,"aria-current":k===t?"page":void 0,children:k},k)),r.jsx("button",{onClick:x,disabled:t===e,className:S,"aria-label":"Go to next page",children:r.jsx(U.ChevronRightIcon,{className:c.icon})}),n&&r.jsx("button",{onClick:f,disabled:t===e,className:S,"aria-label":"Go to last page",children:r.jsx("span",{className:c.text,children:"Last"})})]})},on=({currentPage:t,totalPages:e,onPageChange:a,maxVisible:o=7,className:n})=>{const s=[];if(e<=o)for(let l=1;l<=e;l++)s.push(l);else{s.push(1),t>3&&s.push("...");const l=Math.max(2,t-1),g=Math.min(e-1,t+1);for(let c=l;c<=g;c++)s.push(c);t<e-2&&s.push("..."),s.push(e)}return r.jsxs("nav",{className:u("flex items-center gap-1",n),children:[r.jsx("button",{onClick:()=>a(t-1),disabled:t===1,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),s.map((l,g)=>l==="..."?r.jsx("span",{className:"px-3 py-2",children:"..."},`ellipsis-${g}`):r.jsx("button",{onClick:()=>a(l),className:u("px-3 py-2 rounded",l===t?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-gray-800"),children:l},l)),r.jsx("button",{onClick:()=>a(t+1),disabled:t===e,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})},nn=({steps:t,currentStep:e,orientation:a="horizontal",clickable:o=!1,onStepClick:n,className:s})=>{const l=c=>{o&&n&&n(c)},g=c=>c<e?"completed":c===e?"active":"upcoming";return a==="horizontal"?r.jsx("div",{className:u("w-full",s),children:r.jsx("div",{className:"flex items-center justify-between",children:t.map((c,i)=>{const h=g(i),b=i===t.length-1;return r.jsxs(y.Fragment,{children:[r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsx("button",{onClick:()=>l(i),disabled:!o,className:u("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default",o&&"hover:scale-110",h==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",h==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",h==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:h==="completed"?r.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):c.icon?r.jsx("span",{className:u("w-5 h-5",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c.icon}):r.jsx("span",{className:u("text-sm font-semibold",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:i+1})}),r.jsxs("div",{className:"mt-2 text-center",children:[r.jsx("p",{className:u("text-sm font-medium",h==="active"?"text-blue-600 dark:text-blue-500":h==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:c.label}),c.description&&r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:c.description})]})]}),!b&&r.jsx("div",{className:"flex-1 h-0.5 mx-2 bg-gray-300 dark:bg-gray-700 relative",children:r.jsx("div",{className:u("absolute left-0 top-0 h-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",i<e?"w-full":"w-0")})})]},c.id)})})}):r.jsx("div",{className:u("w-full",s),children:r.jsx("div",{className:"space-y-4",children:t.map((c,i)=>{const h=g(i),b=i===t.length-1;return r.jsxs("div",{className:"flex gap-4",children:[r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsx("button",{onClick:()=>l(i),disabled:!o,className:u("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default flex-shrink-0",o&&"hover:scale-110",h==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",h==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",h==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:h==="completed"?r.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):c.icon?r.jsx("span",{className:u("w-5 h-5",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c.icon}):r.jsx("span",{className:u("text-sm font-semibold",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:i+1})}),!b&&r.jsx("div",{className:"w-0.5 flex-1 min-h-[32px] bg-gray-300 dark:bg-gray-700 relative mt-2",children:r.jsx("div",{className:u("absolute top-0 left-0 w-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",i<e?"h-full":"h-0")})})]}),r.jsxs("div",{className:"flex-1 pb-4",children:[r.jsx("p",{className:u("text-sm font-medium",h==="active"?"text-blue-600 dark:text-blue-500":h==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:c.label}),c.description&&r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:c.description})]})]},c.id)})})})},sn=({steps:t,currentStep:e,onStepClick:a,orientation:o="horizontal",className:n})=>r.jsx("nav",{className:u(o==="horizontal"?"flex items-center":"flex flex-col",n),children:t.map((s,l)=>r.jsxs("div",{className:u("flex items-center",o==="vertical"&&"flex-col items-start"),children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:()=>a?.(l),disabled:l>e,className:u("w-10 h-10 rounded-full flex items-center justify-center font-semibold transition-colors",l<e&&"bg-green-500 text-white",l===e&&"bg-blue-500 text-white",l>e&&"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400"),children:l<e?"✓":l+1}),r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:s.label}),s.description&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.description})]})]}),l<t.length-1&&r.jsx("div",{className:u(o==="horizontal"?"w-full h-0.5 mx-4":"h-8 w-0.5 ml-5 my-2","bg-gray-300 dark:bg-gray-700")})]},s.id))}),ln=({subsections:t,isExpanded:e,selectedSubsection:a,parentSectionId:o,onSubsectionSelect:n})=>{const s=y.useRef(null),[l,g]=y.useState(void 0);return y.useEffect(()=>{if(s.current){const c=s.current.scrollHeight;g(e?c+8:0)}},[e,t]),r.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:l!==void 0?`${l}px`:"auto"},children:r.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:t.map(c=>r.jsx("button",{onClick:()=>n?.(c.id,o),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${a===c.id?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-800 dark:hover:text-gray-200"}`,children:c.title},c.id))})})},dn=({sections:t,selectedSection:e,selectedSubsection:a,expandedSections:o,onSectionSelect:n,onSubsectionSelect:s,onToggleSection:l,className:g=""})=>r.jsx("nav",{className:`space-y-2 ${g}`,children:t.map(c=>r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center",children:[r.jsx("button",{onClick:()=>n(c.id),className:`flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${e===c.id&&!a?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-100"}`,children:c.title}),c.subsections&&c.subsections.length>0&&r.jsx("button",{onClick:()=>l(c.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:r.jsx(U.ChevronRightIcon,{className:`h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${o.includes(c.id)?"rotate-90":"rotate-0"}`})})]}),c.subsections&&r.jsx(ln,{subsections:c.subsections,isExpanded:o.includes(c.id),selectedSubsection:a,parentSectionId:c.id,onSubsectionSelect:s})]},c.id))});function cn({columns:t,data:e,keyExtractor:a,sort:o,onSort:n,onRowClick:s,striped:l=!1,hoverable:g=!1,compact:c=!1,bordered:i=!1,emptyMessage:h="No data available",className:b}){const x=f=>{f.sortable&&n&&n(f.key)},m={left:"text-left",center:"text-center",right:"text-right"};return r.jsx("div",{className:u("w-full overflow-x-auto",b),children:r.jsxs("table",{className:"w-full",children:[r.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:r.jsx("tr",{children:t.map(f=>r.jsx("th",{className:u(c?"px-3 py-2":"px-6 py-3","text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",m[f.align||"left"],f.sortable&&"cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-700",i&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),style:{width:f.width},onClick:()=>f.sortable&&x(f),children:r.jsxs("div",{className:"flex items-center gap-2",children:[f.label,f.sortable&&r.jsx("span",{className:"flex flex-col",children:o?.column===f.key?o.direction==="asc"?r.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{d:"M5 10l5-5 5 5H5z"})}):r.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{d:"M15 10l-5 5-5-5h10z"})}):r.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{d:"M5 10l5-5 5 5H5z"})})})]})},f.key))})}),r.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:t.length,className:"px-6 py-8 text-center text-sm text-gray-500 dark:text-gray-400",children:h})}):e.map((f,p)=>r.jsx("tr",{className:u(l&&p%2===1&&"bg-gray-50 dark:bg-gray-800/50",g&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",s&&"cursor-pointer"),onClick:()=>s?.(f,p),children:t.map(C=>r.jsx("td",{className:u(c?"px-3 py-2":"px-6 py-4","text-sm text-gray-900 dark:text-white",m[C.align||"left"],i&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),children:C.render?C.render(f,p):f[C.key]},C.key))},a(f,p)))})]})})}const gn=({data:t,columns:e,hasActions:a=!1,renderCell:o,renderAction:n,emptyMessage:s="No data available",getRowKey:l=(c,i)=>String(i),className:g=""})=>!t||t.length===0?r.jsx("div",{className:`text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg ${g}`,children:r.jsx("p",{className:`${T.body.sm()} text-gray-500 dark:text-gray-400`,children:s})}):r.jsx("div",{className:`relative ${g}`,children:r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full border-collapse",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[e.map((c,i)=>r.jsx("th",{className:`${T.label.default()} text-left py-3 px-4 whitespace-nowrap`,children:c},i)),a&&r.jsx("th",{className:`${T.label.default()} text-right py-3 px-4 sticky right-0 bg-white dark:bg-gray-900 whitespace-nowrap`})]})}),r.jsx("tbody",{children:t.map((c,i)=>r.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[e.map((h,b)=>{const x=o(c,b);return r.jsx("td",{className:"py-3 px-4",children:typeof x=="string"?r.jsx("span",{className:T.body.sm(),children:x}):x},b)}),a&&r.jsx("td",{className:"py-3 px-4 text-right sticky right-0 bg-white dark:bg-gray-900",children:n?.(c)})]},l(c,i)))})]})})}),un=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdataUgrid",children:e||"UdataUgrid Component"}),hn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpivotUtable",children:e||"UpivotUtable Component"}),bn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UspreadsheetUgrid",children:e||"UspreadsheetUgrid Component"}),fn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcolumnUresize",children:e||"UcolumnUresize Component"}),pn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcellUeditor",children:e||"UcellUeditor Component"}),yn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtableUreservation",children:e||"UtableUreservation Component"}),mn=({children:t,type:e="unordered",spacing:a="sm",marker:o,size:n="md",className:s})=>{const l=e==="ordered"?"ol":"ul",g={none:"space-y-0",sm:"space-y-1",md:"space-y-2",lg:"space-y-4"},c={sm:"text-sm",md:"text-base",lg:"text-lg"},i=()=>o==="none"?"list-none":e==="unordered"?{disc:"list-disc",circle:"list-circle",square:"list-square",decimal:"list-disc",alpha:"list-disc",roman:"list-disc",none:"list-none"}[o||"disc"]:{decimal:"list-decimal",alpha:"list-alpha",roman:"list-roman",disc:"list-decimal",circle:"list-decimal",square:"list-decimal",none:"list-none"}[o||"decimal"];return r.jsx(l,{className:u("ml-6",i(),g[a],c[n],"text-gray-900 dark:text-gray-100",s),children:t})},vn=({children:t,className:e})=>r.jsx("li",{className:u("leading-relaxed",e),children:t});V.cva("grid gap-8",{variants:{layout:{grid:"grid-cols-1 md:grid-cols-2",stacked:"grid-cols-1 space-y-8",cards:"grid-cols-1 md:grid-cols-2 gap-6"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{layout:"grid",spacing:"md"}}),V.cva("rounded-xl p-6 transition-all duration-300",{variants:{variant:{traditional:"bg-red-50 dark:bg-red-900/20 border-2 border-red-100 dark:border-red-800/30 hover:border-red-200 dark:hover:border-red-700/50",web3:"bg-green-50 dark:bg-green-900/20 border-2 border-green-100 dark:border-green-800/30 hover:border-green-200 dark:hover:border-green-700/50",neutral:"bg-gray-50 dark:bg-gray-800/50 border-2 border-gray-100 dark:border-gray-700/30 hover:border-gray-200 dark:hover:border-gray-600/50",elevated:"bg-white dark:bg-gray-800 shadow-lg hover:shadow-xl border border-gray-200 dark:border-gray-700"},animation:{none:"",hover:"hover:transform hover:scale-[1.02]",float:"hover:-translate-y-1"}},defaultVariants:{variant:"traditional",animation:"hover"}}),V.cva("text-lg font-bold mb-4 flex items-center gap-3",{variants:{variant:{traditional:"text-red-600 dark:text-red-400",web3:"text-green-600 dark:text-green-400",neutral:"text-gray-900 dark:text-white",elevated:"text-gray-900 dark:text-white"}},defaultVariants:{variant:"traditional"}}),V.cva("mx-auto px-4 sm:px-6",{variants:{size:{sm:"max-w-2xl",md:"max-w-4xl",lg:"max-w-6xl",xl:"max-w-7xl lg:px-8",full:"max-w-full",prose:"max-w-prose"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"xl",spacing:"md",align:"left"}}),V.cva("grid gap-8",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{columns:3,spacing:"md"}}),V.cva("group transition-all duration-300",{variants:{variant:{default:"text-center",left:"text-left",hoverable:"text-center hover:transform hover:scale-105 cursor-pointer",card:"bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-lg hover:shadow-xl text-center",minimal:"text-center space-y-4"},animation:{none:"",hover:"hover:transform hover:scale-105",float:"hover:-translate-y-2"}},defaultVariants:{variant:"default",animation:"hover"}}),V.cva("flex items-center justify-center rounded-2xl mb-6 transition-all duration-300",{variants:{size:{sm:"w-16 h-16",md:"w-20 h-20",lg:"w-24 h-24"},style:{gradient:"bg-gradient-to-br from-blue-100 to-blue-200 dark:from-blue-900/30 dark:to-blue-800/30 group-hover:from-blue-200 group-hover:to-blue-300 dark:group-hover:from-blue-800/40 dark:group-hover:to-blue-700/40",solid:"bg-blue-100 dark:bg-blue-900/30 group-hover:bg-blue-200 dark:group-hover:bg-blue-800/40",outline:"border-2 border-blue-200 dark:border-blue-800 group-hover:border-blue-300 dark:group-hover:border-blue-700",colorful:"group-hover:scale-110"},position:{center:"mx-auto",left:"",right:"ml-auto"}},defaultVariants:{size:"md",style:"gradient",position:"center"}});const xn=O.forwardRef(({className:t,type:e,...a},o)=>r.jsx("input",{type:e,className:u(D.input.default(),t),ref:o,...a}));xn.displayName="Input";const Tr=B.Root,kn=B.Value,Fe=O.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Trigger,{ref:o,className:u("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[e,r.jsx(B.Icon,{asChild:!0,children:r.jsx(X.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));Fe.displayName=B.Trigger.displayName;const Ar=O.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollUpButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronUp,{className:"h-4 w-4"})}));Ar.displayName=B.ScrollUpButton.displayName;const Pr=O.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollDownButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronDown,{className:"h-4 w-4"})}));Pr.displayName=B.ScrollDownButton.displayName;const Ve=O.forwardRef(({className:t,children:e,position:a="popper",...o},n)=>r.jsx(B.Portal,{children:r.jsxs(B.Content,{ref:n,className:u(D.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden 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",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...o,children:[r.jsx(Ar,{}),r.jsx(B.Viewport,{className:u(D.overlays.dropdown.itemContainer(),a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),r.jsx(Pr,{})]})}));Ve.displayName=B.Content.displayName;const wn=O.forwardRef(({className:t,...e},a)=>r.jsx(B.Label,{ref:a,className:u(D.overlays.dropdown.header(),"py-1.5",t),...e}));wn.displayName=B.Label.displayName;const He=O.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Item,{ref:o,className:u(D.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[r.jsx(B.ItemText,{children:e}),r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(B.ItemIndicator,{children:r.jsx(X.Check,{className:"h-4 w-4"})})})]}));He.displayName=B.Item.displayName;const Cn=O.forwardRef(({className:t,...e},a)=>r.jsx(B.Separator,{ref:a,className:u("my-1 h-px bg-gray-200 dark:bg-gray-700",t),...e}));Cn.displayName=B.Separator.displayName;const Nn=O.forwardRef(({className:t,...e},a)=>r.jsx(oe.Root,{className:u("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",t),...e,ref:a,children:r.jsx(oe.Thumb,{className:u("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Nn.displayName=oe.Root.displayName;const Sn=O.forwardRef(({className:t,...e},a)=>r.jsx(H.List,{ref:a,className:u(D.navigation.tabs.list(),t),...e}));Sn.displayName=H.List.displayName;const En=O.forwardRef(({className:t,...e},a)=>r.jsx(H.Trigger,{ref:a,className:u(D.navigation.tabs.trigger(),t),...e}));En.displayName=H.Trigger.displayName;const Ln=O.forwardRef(({className:t,...e},a)=>r.jsx(H.Content,{ref:a,className:u(D.navigation.tabs.content(),t),...e}));Ln.displayName=H.Content.displayName,V.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),V.cva("",{variants:{variant:{default:"",hero:"relative overflow-hidden",feature:"bg-white dark:bg-gray-800",cta:"relative overflow-hidden",testimonial:"bg-gray-50 dark:bg-gray-900",footer:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16","4xl":"py-20","5xl":"py-24"},background:{none:"bg-transparent",default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50","gradient-primary":"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50","gradient-secondary":"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50","gradient-tertiary":"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900","gradient-vibrant":"bg-gradient-to-br from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}}),V.cva("",{variants:{variant:{hero:T.heading.display.hero(),display:T.heading.display.lg(),h1:T.heading.h1(),h2:T.heading.h2(),h3:T.heading.h3()},responsive:{true:"",false:""},align:{left:"text-left",center:"text-center",right:"text-right"},color:{default:"text-gray-900 dark:text-white",muted:"text-gray-600 dark:text-gray-400",vibrant:"text-white",brand:"bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"}},defaultVariants:{variant:"h1",responsive:!0,align:"left",color:"default"}}),V.cva("",{variants:{variant:{h2:T.heading.h2(),h3:T.heading.h3(),h4:T.heading.h4(),h5:T.heading.h5(),h6:T.heading.h6()},spacing:{none:"",sm:"mb-2",md:"mb-4",lg:"mb-6",xl:"mb-8"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{variant:"h2",spacing:"md",align:"left"}}),V.cva("",{variants:{variant:{body:T.body.md(),lead:T.body.lg(),large:T.body.lg(),small:T.body.sm(),caption:T.body.xs()},color:{default:"text-gray-700 dark:text-gray-300",muted:"text-gray-500 dark:text-gray-500",primary:"text-gray-900 dark:text-white"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"body",color:"default",align:"left"}}),V.cva(T.link.default(),{variants:{variant:{default:T.link.default(),subtle:T.link.subtle(),muted:T.link.muted(),button:"inline-flex items-center justify-center px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors"},external:{true:"inline-flex items-center gap-1",false:""}},defaultVariants:{variant:"default",external:!1}});const qe=V.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:T.link.subtle(),default:T.link.default(),muted:T.link.muted(),external:T.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),In=O.forwardRef(({className:t,variant:e,size:a,to:o,href:n,external:s,children:l,...g},c)=>{const i=o||n;return i?s||i.startsWith("http")||i.startsWith("mailto:")?r.jsx("a",{className:u(qe({variant:e==="subtle"?"external":e,size:a,className:t})),href:i,target:"_blank",rel:"noopener noreferrer",ref:c,...g,children:l}):r.jsx(Ue.Link,{className:u(qe({variant:e,size:a,className:t})),to:i,ref:c,...g,children:l}):r.jsx("span",{className:u(qe({variant:e,size:a,className:t})),...g,children:l})});In.displayName="SmartLink",V.cva("border-b transition-all duration-200",{variants:{variant:{default:"bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 border-green-200 dark:border-green-700",compact:"bg-green-50 dark:bg-green-900/10 border-green-200 dark:border-green-800",minimal:"bg-gray-50 dark:bg-gray-900/50 border-gray-200 dark:border-gray-700",vibrant:"bg-gradient-to-r from-blue-600 to-purple-600 border-blue-700"},size:{default:"py-4",compact:"py-3",large:"py-6"}},defaultVariants:{variant:"default",size:"default"}}),V.cva("font-semibold",{variants:{variant:{default:"text-green-800 dark:text-green-200",compact:"text-green-700 dark:text-green-300",minimal:"text-gray-700 dark:text-gray-300",vibrant:"text-white"}},defaultVariants:{variant:"default"}}),V.cva("inline-flex items-center justify-center px-6 py-2 rounded-lg font-medium transition-all duration-200 hover:transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-offset-2",{variants:{variant:{default:"bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white focus:ring-green-500",compact:"bg-green-600 hover:bg-green-700 text-white focus:ring-green-500",minimal:"bg-blue-600 hover:bg-blue-700 text-white focus:ring-blue-500",vibrant:"bg-white hover:bg-gray-100 text-blue-600 hover:text-blue-700 focus:ring-white"}},defaultVariants:{variant:"default"}}),V.cva("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-all duration-200",{variants:{variant:{default:"border-gray-200 dark:border-gray-700 border hover:shadow-lg",elevated:"shadow-lg hover:shadow-xl",minimal:"bg-transparent shadow-none border-none p-4"},trend:{none:"",up:"border-l-4 border-green-500",down:"border-l-4 border-red-500",neutral:"border-l-4 border-gray-400"}},defaultVariants:{variant:"default",trend:"none"}}),V.cva("space-y-6",{variants:{variant:{default:"",card:"bg-white dark:bg-gray-800 rounded-lg border-gray-200 dark:border-gray-700 border p-6",minimal:"space-y-4"},spacing:{tight:"space-y-3",normal:"space-y-4",relaxed:"space-y-6",loose:"space-y-8"}},defaultVariants:{variant:"default",spacing:"normal"}}),V.cva("flex flex-col items-center text-center space-y-4",{variants:{layout:{vertical:"flex-col items-center text-center",horizontal:"flex-row items-start text-left space-y-0 space-x-4",minimal:"flex-col space-y-2"},spacing:{tight:"space-y-2",normal:"space-y-4",relaxed:"space-y-6"},interactive:{true:"transition-all duration-200 hover:transform hover:scale-105 cursor-pointer",false:""}},defaultVariants:{layout:"vertical",spacing:"normal",interactive:!1}});const Mn=(t={})=>{const{successDuration:e=2e3,onSuccess:a,onError:o}=t,[n,s]=y.useState(null),l=y.useCallback(async i=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(i);else{const h=document.createElement("textarea");h.value=i,h.style.position="fixed",h.style.left="-999999px",h.style.top="-999999px",document.body.appendChild(h),h.focus(),h.select();const b=document.execCommand("copy");if(document.body.removeChild(h),!b)throw new Error("Copy command was unsuccessful")}return s(i),a?.(i),setTimeout(()=>{s(null)},e),!0}catch(h){const b=h instanceof Error?h:new Error("Copy failed");return o?.(b),!1}},[e,a,o]),g=y.useCallback(i=>n===i,[n]),c=y.useCallback(()=>{s(null)},[]);return{copiedValue:n,copyToClipboard:l,isCopied:g,resetCopiedState:c}},$n=(t={})=>{const{successDuration:e=2e3,onSuccess:a,onError:o}=t,[n,s]=y.useState({}),l=y.useCallback(async(i,h)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(i);else{const b=document.createElement("textarea");b.value=i,b.style.position="fixed",b.style.left="-999999px",b.style.top="-999999px",document.body.appendChild(b),b.focus(),b.select();const x=document.execCommand("copy");if(document.body.removeChild(b),!x)throw new Error("Copy command was unsuccessful")}return s(b=>({...b,[h]:!0})),a?.(i),setTimeout(()=>{s(b=>({...b,[h]:!1}))},e),!0}catch(b){const x=b instanceof Error?b:new Error("Copy failed");return o?.(x),!1}},[e,a,o]),g=y.useCallback(i=>n[i]||!1,[n]),c=y.useCallback(i=>{s(i?h=>({...h,[i]:!1}):{})},[]);return{copiedStates:n,copyToClipboard:l,isCopied:g,resetCopiedState:c}};y.createContext(void 0);const Un=({children:t,onAction:e,actionText:a="Remove",actionIcon:o=U.TrashIcon,destructive:n=!0,isProcessing:s=!1,variant:l="default",className:g})=>{const c="flex items-center justify-between p-4 rounded-lg transition-colors",i={default:"bg-gray-50 dark:bg-gray-700",compact:"bg-gray-50 dark:bg-gray-700 py-2 px-3",elevated:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md"};return r.jsxs("div",{className:u(c,i[l],g),children:[r.jsx("div",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:t}),r.jsxs(J,{variant:n?"ghost":"outline",size:"sm",onClick:e,disabled:s,className:u("ml-4",n&&"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-900/20"),children:[r.jsx(o,{className:"h-4 w-4 mr-1"}),a]})]})},Tn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UuserUtable",children:e||"UuserUtable Component"}),An=({source:t,target:e,onChange:a,sourceTitle:o="Available",targetTitle:n="Selected",searchable:s=!0,sourceSearchPlaceholder:l="Search available...",targetSearchPlaceholder:g="Search selected...",height:c=300,disabled:i=!1,className:h})=>{const[b,x]=y.useState(""),[m,f]=y.useState(""),[p,C]=y.useState(new Set),[S,k]=y.useState(new Set),N=s?t.filter(P=>P.label.toLowerCase().includes(b.toLowerCase())):t,v=s?e.filter(P=>P.label.toLowerCase().includes(m.toLowerCase())):e,w=P=>{const W=new Set(p);W.has(P)?W.delete(P):W.add(P),C(W)},L=P=>{const W=new Set(S);W.has(P)?W.delete(P):W.add(P),k(W)},M=()=>{const P=t.filter(F=>p.has(F.id)),W=t.filter(F=>!p.has(F.id)),j=[...e,...P];a(W,j),C(new Set)},I=()=>{const P=e.filter(F=>S.has(F.id)),W=e.filter(F=>!S.has(F.id)),j=[...t,...P];a(j,W),k(new Set)},$=()=>{const P=[...e,...t];a([],P),C(new Set)},A=()=>{const P=[...t,...e];a(P,[]),k(new Set)},z=(P,W,j,F,q,dr,yc)=>r.jsxs("div",{className:"flex flex-col flex-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-900",children:[r.jsxs("div",{className:"px-3 py-2 border-b border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[r.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:W}),r.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:[P.length," item",P.length!==1?"s":""]})]}),s&&r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{type:"text",value:q,onChange:K=>dr(K.target.value),placeholder:yc,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),r.jsx("div",{className:"overflow-y-auto p-2 space-y-1",style:{height:s?c-120:c-60},children:P.length===0?r.jsx("div",{className:"flex items-center justify-center h-full text-sm text-gray-500 dark:text-gray-400",children:"No items"}):P.map(K=>{const cr=j.has(K.id);return r.jsx("button",{onClick:()=>!K.disabled&&F(K.id),disabled:K.disabled||i,className:u("w-full px-3 py-2 text-left rounded-md transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed",cr&&"bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700"),children:r.jsxs("div",{className:"flex items-start gap-2",children:[r.jsx("div",{className:u("w-4 h-4 border-2 rounded flex items-center justify-center flex-shrink-0 mt-0.5",cr?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:cr&&r.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:K.label}),K.description&&r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:K.description})]})]})},K.id)})})]});return r.jsxs("div",{className:u("flex gap-4",h),children:[z(N,o,p,w,b,x,l),r.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[r.jsx("button",{onClick:$,disabled:i||t.length===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to selected",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5l7 7-7 7M5 5l7 7-7 7"})})}),r.jsx("button",{onClick:M,disabled:i||p.size===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to target",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),r.jsx("button",{onClick:I,disabled:i||S.size===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to source",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("button",{onClick:A,disabled:i||e.length===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to available",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 19l-7-7 7-7M19 19l-7-7 7-7"})})})]}),z(v,n,S,L,m,f,g)]})};function Pn({items:t,itemHeight:e,height:a,renderItem:o,keyExtractor:n,overscan:s=3,className:l}){const[g,c]=y.useState(0),i=y.useRef(null),h=p=>{c(p.currentTarget.scrollTop)},b=t.length*e,x=Math.max(0,Math.floor(g/e)-s),m=Math.min(t.length-1,Math.ceil((g+a)/e)+s),f=t.slice(x,m+1);return r.jsx("div",{ref:i,className:u("overflow-auto",l),style:{height:a},onScroll:h,children:r.jsx("div",{style:{height:b,position:"relative"},children:f.map((p,C)=>{const S=x+C;return r.jsx("div",{style:{position:"absolute",top:S*e,height:e,width:"100%"},children:o(p,S)},n(p,S))})})})}const zn=({data:t,selectedId:e,onSelect:a,expandedIds:o,onExpand:n,defaultExpanded:s=!1,showLines:l=!1,className:g})=>{const[c,i]=y.useState(new Set(s?t.map(f=>f.id):[])),h=o!==void 0?new Set(o):c,b=f=>{o!==void 0&&n?n(f):i(p=>{const C=new Set(p);return C.has(f)?C.delete(f):C.add(f),C})},x=f=>{!f.disabled&&a&&a(f)},m=(f,p=0)=>{const C=f.children&&f.children.length>0,S=h.has(f.id),k=e===f.id;return r.jsxs("div",{children:[r.jsxs("div",{className:u("flex items-center gap-2 px-2 py-1.5 rounded-md transition-colors",!f.disabled&&"hover:bg-gray-100 dark:hover:bg-gray-800",k&&"bg-blue-50 dark:bg-blue-900/30",f.disabled&&"opacity-50 cursor-not-allowed",!f.disabled&&"cursor-pointer"),style:{paddingLeft:`${p*1.5+.5}rem`},onClick:()=>x(f),children:[C?r.jsx("button",{onClick:N=>{N.stopPropagation(),b(f.id)},className:"flex-shrink-0 w-4 h-4 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",children:r.jsx("svg",{className:u("w-3 h-3 transition-transform",S&&"rotate-90"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}):r.jsx("div",{className:"w-4 h-4 flex-shrink-0"}),f.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4 text-gray-600 dark:text-gray-400",children:f.icon}),r.jsx("span",{className:u("flex-1 text-sm",k?"text-blue-700 dark:text-blue-300 font-medium":"text-gray-900 dark:text-white"),children:f.label})]}),C&&S&&r.jsx("div",{className:u(l&&"border-l-2 border-gray-200 dark:border-gray-700 ml-2"),children:f.children.map(N=>m(N,p+1))})]},f.id)};return r.jsx("div",{className:u("w-full",g),children:t.map(f=>m(f,0))})},Dn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UlistingUform",children:e||"UlistingUform Component"}),jn="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border border-blue-200 dark:border-blue-800",Bn={none:"",sm:"p-3",md:"p-6",lg:"p-8"},_e=({variant:t="elevated",padding:e="md",icon:a,onClose:o,className:n,children:s,...l})=>{const c=["info","success","warning","error"].includes(t)&&(a||o),i=t==="callout"?jn:Wt(t);return r.jsx("div",{className:u("rounded-lg",i,Bn[e],n),...l,children:c?r.jsxs("div",{className:"flex items-start gap-3",children:[a&&r.jsx("div",{className:"flex-shrink-0 text-lg",children:a}),r.jsx("div",{className:"flex-1 min-w-0",children:s}),o&&r.jsx("button",{onClick:o,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):s})},Wn=({title:t,description:e,className:a,children:o,...n})=>r.jsxs("div",{className:u("space-y-1.5",a),...n,children:[t&&r.jsx("h3",{className:T.heading.h4(),children:t}),e&&r.jsx("p",{className:T.body.sm(),children:e}),o]}),On=({className:t,children:e,...a})=>r.jsx("div",{className:u("",t),...a,children:e}),Fn=({className:t,children:e,...a})=>r.jsx("div",{className:u("flex items-center pt-4",t),...a,children:e}),Vn=({title:t,children:e,variant:a="info",size:o="default",className:n})=>{const s={sm:"sm",default:"md",lg:"lg"},l=a==="neutral"?"bordered":a;return r.jsxs(_e,{variant:l,padding:s[o],className:n,children:[t&&r.jsx("h3",{className:u("font-semibold mb-2",o==="sm"?"text-base":o==="lg"?"text-xl":"text-lg"),children:t}),e]})},Hn=({title:t,icon:e,children:a,variant:o="gradient",size:n="default",centered:s=!1,className:l})=>{const g={sm:"sm",default:"md",lg:"lg"},c=o==="gradient"||o==="neutral"?"callout":o;return r.jsx(_e,{variant:c,padding:g[n],className:l,children:r.jsxs("div",{className:u("space-y-4",s&&"text-center"),children:[e&&r.jsx("div",{className:u("font-bold",n==="sm"?"text-2xl":n==="lg"?"text-5xl":"text-4xl",s?"text-center":"text-left"),children:e}),t&&r.jsx("h3",{className:u("font-bold mb-4",n==="sm"?"text-lg":n==="lg"?"text-3xl":"text-2xl"),children:t}),r.jsx("div",{className:u("text-gray-600 dark:text-gray-400",n==="sm"?"text-sm":n==="lg"?"text-lg":"text-base"),children:a})]})})},qn=({title:t,value:e,change:a,changePeriod:o="vs last period",icon:n,variant:s="default",className:l})=>{const g={default:"bg-white dark:bg-gray-900",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"};return r.jsxs("div",{className:u("rounded-lg border border-gray-200 dark:border-gray-700 p-6",g[s],l),children:[r.jsxs("div",{className:"flex items-start justify-between mb-2",children:[r.jsx("h3",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:t}),n&&r.jsx("div",{className:"text-gray-400 dark:text-gray-600",children:n})]}),r.jsx("div",{className:"flex items-end justify-between",children:r.jsxs("div",{children:[r.jsx("p",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:e}),a!==void 0&&r.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[r.jsxs("span",{className:u("text-sm font-medium",a>=0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[a>=0?"↑":"↓"," ",Math.abs(a),"%"]}),r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:o})]})]})})]})},_n=({src:t,alt:e="Avatar",fallback:a,name:o,size:n="md",status:s,className:l,onClick:g})=>{const[c,i]=y.useState(!1),h={sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"},b={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},x={online:"bg-green-500",offline:"bg-gray-400",away:"bg-yellow-500",busy:"bg-red-500"},f=a||(o?(S=>{const k=S.trim().split(/\s+/);return k.length===1?k[0].charAt(0).toUpperCase():k[0].charAt(0).toUpperCase()+k[k.length-1].charAt(0).toUpperCase()})(o):""),p=t&&!c,C=()=>{i(!0)};return r.jsxs("div",{className:"relative inline-block flex-shrink-0",children:[r.jsx("div",{className:u("flex items-center justify-center overflow-hidden rounded-full",h[n],!p&&"bg-gray-300 dark:bg-gray-600 text-gray-700 dark:text-gray-200",g&&"cursor-pointer hover:opacity-80 transition-opacity",l),onClick:g,role:g?"button":void 0,tabIndex:g?0:void 0,children:p?r.jsx("img",{src:t,alt:e,className:"w-full h-full object-cover",onError:C}):r.jsx("span",{className:"font-semibold",children:f})}),s&&r.jsx("span",{className:u("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-gray-800",x[s],b[n]),"aria-label":s})]})},Gn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UavatarUgroup",children:e||"UavatarUgroup Component"}),Kn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprofileUheader",children:e||"UprofileUheader Component"}),Yn=({label:t,value:e,orientation:a="vertical",align:o="start",labelWidth:n="auto",size:s="md",separator:l=!1,labelVariant:g="muted",valueVariant:c="default",className:i,labelClassName:h,valueClassName:b})=>{const x={sm:{label:T.body.sm(),value:T.body.sm(),gap:"gap-1"},md:{label:T.body.md(),value:T.body.md(),gap:"gap-2"},lg:{label:T.body.lg(),value:T.body.lg(),gap:"gap-3"}},m={auto:"",sm:"w-24",md:"w-32",lg:"w-40"},f={start:"justify-start",center:"justify-center",between:"justify-between"},p={default:"text-gray-700 dark:text-gray-300",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold"},C={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold",primary:"text-blue-600 dark:text-blue-400"},S=x[s];return r.jsxs("div",{className:u(a==="horizontal"?"flex items-center":"flex flex-col",a==="horizontal"&&f[o],S.gap,l&&"pb-3 mb-3 border-b border-gray-200 dark:border-gray-700",i),children:[r.jsx("dt",{className:u(S.label,p[g],a==="horizontal"&&m[n],a==="horizontal"&&"flex-shrink-0",h),children:t}),r.jsx("dd",{className:u(S.value,C[c],a==="horizontal"&&"flex-1",b),children:e})]})},Qn=({value:t,label:e,variant:a="neutral",size:o="md",align:n="center",icon:s,iconPosition:l="top",className:g,valueClassName:c,labelClassName:i})=>{const h={primary:{value:"text-blue-600 dark:text-blue-400",label:"text-blue-600/70 dark:text-blue-400/70",icon:"text-blue-600 dark:text-blue-400"},success:{value:"text-green-600 dark:text-green-400",label:"text-green-600/70 dark:text-green-400/70",icon:"text-green-600 dark:text-green-400"},warning:{value:"text-yellow-600 dark:text-yellow-400",label:"text-yellow-600/70 dark:text-yellow-400/70",icon:"text-yellow-600 dark:text-yellow-400"},danger:{value:"text-red-600 dark:text-red-400",label:"text-red-600/70 dark:text-red-400/70",icon:"text-red-600 dark:text-red-400"},neutral:{value:"text-gray-900 dark:text-gray-100",label:"text-gray-600 dark:text-gray-400",icon:"text-gray-600 dark:text-gray-400"},white:{value:"text-white",label:"text-white/70",icon:"text-white"}},b={sm:{value:T.heading.h5(),label:T.caption.default(),icon:"h-4 w-4"},md:{value:T.heading.h4(),label:T.body.sm(),icon:"h-5 w-5"},lg:{value:T.heading.h3(),label:T.body.md(),icon:"h-6 w-6"},xl:{value:T.heading.h2(),label:T.body.lg(),icon:"h-8 w-8"}},x={left:"text-left",center:"text-center",right:"text-right"},m=h[a],f=b[o];return r.jsxs("div",{className:u(x[n],g),children:[s&&l==="top"&&r.jsx(s,{className:u(f.icon,m.icon,"mb-2",n==="center"&&"mx-auto")}),r.jsxs("div",{className:u(l==="left"&&s&&"flex items-center gap-3",n==="center"&&l==="left"&&"justify-center"),children:[s&&l==="left"&&r.jsx(s,{className:u(f.icon,m.icon)}),r.jsxs("div",{children:[r.jsx("div",{className:u("font-bold",f.value,m.value,c),children:t}),r.jsx("div",{className:u(f.label,m.label,i),children:e})]})]})]})},zr=({icon:t,title:e="No data",description:a,action:o,className:n})=>r.jsxs("div",{className:u("flex flex-col items-center justify-center py-12 px-4 text-center",n),children:[t&&r.jsx("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:t}),r.jsx("h3",{className:u(T.heading.h3(),"mb-2"),children:e}),a&&r.jsx("p",{className:u(T.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:a}),o&&r.jsx("div",{className:"mt-4",children:o})]}),Zn=({title:t,subtext:e,className:a})=>r.jsx(zr,{title:t,description:e,className:a}),Xn=({data:t,orientation:e="vertical",showValues:a=!1,showGrid:o=!0,barWidth:n=40,height:s=300,className:l})=>{const g=Math.max(...t.map(i=>i.value)),c="#3b82f6";return r.jsx("div",{className:u("w-full",l),children:r.jsxs("div",{className:"relative bg-white dark:bg-gray-900 rounded-lg p-6",style:{height:`${s}px`},children:[o&&r.jsx("div",{className:"absolute inset-6 flex flex-col justify-between",children:[...Array(5)].map((i,h)=>r.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700"},h))}),e==="vertical"?r.jsx("div",{className:"relative h-full flex items-end justify-around gap-2",children:t.map((i,h)=>{const b=i.value/g*100;return r.jsxs("div",{className:"flex flex-col items-center gap-2",style:{width:`${n}px`},children:[a&&r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:i.value}),r.jsx("div",{className:"w-full rounded-t transition-all hover:opacity-80",style:{height:`${b}%`,backgroundColor:i.color||c}}),r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:i.label})]},h)})}):r.jsx("div",{className:"relative h-full flex flex-col justify-around gap-2",children:t.map((i,h)=>{const b=i.value/g*100;return r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 w-16 text-right",children:i.label}),r.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[r.jsx("div",{className:"h-8 rounded transition-all hover:opacity-80",style:{width:`${b}%`,backgroundColor:i.color||c}}),a&&r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:i.value})]})]},h)})})]})})},Jn=({series:t,showLegend:e=!0,showGrid:a=!0,showPoints:o=!0,height:n=300,xLabels:s,className:l})=>{const g=t.flatMap(m=>m.data),c=Math.max(...g.map(m=>m.y)),i=Math.min(...g.map(m=>m.y)),h=Math.max(...g.map(m=>m.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],x=m=>m.length===0?"":`M ${m.map(p=>{const C=p.x/h*100,S=100-(p.y-i)/(c-i)*100;return`${C},${S}`}).join(" L ")}`;return r.jsxs("div",{className:u("w-full",l),children:[e&&r.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:t.map((m,f)=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:m.color||b[f%b.length]}}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:m.name})]},f))}),r.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[r.jsxs("div",{className:"relative",style:{height:`${n}px`},children:[a&&r.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((m,f)=>r.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${f*25}%`}},f))}),r.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:t.map((m,f)=>{const p=m.color||b[f%b.length];return r.jsxs("g",{children:[r.jsx("path",{d:x(m.data),fill:"none",stroke:p,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),o&&m.data.map((C,S)=>{const k=C.x/h*100,N=100-(C.y-i)/(c-i)*100;return r.jsx("circle",{cx:k,cy:N,r:"1",fill:p,vectorEffect:"non-scaling-stroke"},S)})]},f)})})]}),s&&r.jsx("div",{className:"flex justify-between mt-2",children:s.map((m,f)=>r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:m},f))})]})]})},Rn=({data:t,variant:e="pie",showLegend:a=!0,showPercentages:o=!1,size:n=200,donutHoleSize:s=40,className:l})=>{const g=t.reduce((f,p)=>f+p.value,0),c=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"],i=t.reduce((f,p,C)=>{const S=p.value/g*100,k=S/100*360,N=f.length>0?f[f.length-1].endAngle:-90,v=N+k;return f.push({...p,percentage:S,startAngle:N,endAngle:v,color:p.color||c[C%c.length]}),f},[]),h=(f,p,C,S)=>{const k=(S-90)*Math.PI/180;return{x:f+C*Math.cos(k),y:p+C*Math.sin(k)}},b=(f,p,C,S,k)=>{const N=h(f,p,C,k),v=h(f,p,C,S),w=k-S<=180?"0":"1";if(e==="donut"){const L=C*s/100,M=h(f,p,L,k),I=h(f,p,L,S);return["M",N.x,N.y,"A",C,C,0,w,0,v.x,v.y,"L",I.x,I.y,"A",L,L,0,w,1,M.x,M.y,"Z"].join(" ")}return["M",f,p,"L",N.x,N.y,"A",C,C,0,w,0,v.x,v.y,"Z"].join(" ")},x=n/2,m=n/2-10;return r.jsxs("div",{className:u("flex flex-col items-center gap-4",l),children:[r.jsx("svg",{width:n,height:n,className:"transform rotate-0",children:i.map((f,p)=>r.jsx("path",{d:b(x,x,m,f.startAngle,f.endAngle),fill:f.color,className:"transition-opacity hover:opacity-80"},p))}),a&&r.jsx("div",{className:"flex flex-col gap-2",children:i.map((f,p)=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:f.color}}),r.jsxs("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:[f.label,o&&r.jsxs("span",{className:"text-gray-500 dark:text-gray-400 ml-1",children:["(",Math.round(f.percentage),"%)"]})]})]},p))})]})},es=({series:t,showLegend:e=!0,showGrid:a=!0,fillOpacity:o=.2,height:n=300,xLabels:s,className:l})=>{const g=t.flatMap(f=>f.data),c=Math.max(...g.map(f=>f.y)),i=Math.min(...g.map(f=>f.y)),h=Math.max(...g.map(f=>f.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],x=f=>{if(f.length===0)return"";const p=f.map(k=>{const N=k.x/h*100,v=100-(k.y-i)/(c-i)*100;return`${N},${v}`}),C=f[0].x/h*100,S=f[f.length-1].x/h*100;return`M ${C},100 L ${p.join(" L ")} L ${S},100 Z`},m=f=>f.length===0?"":`M ${f.map(C=>{const S=C.x/h*100,k=100-(C.y-i)/(c-i)*100;return`${S},${k}`}).join(" L ")}`;return r.jsxs("div",{className:u("w-full",l),children:[e&&r.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:t.map((f,p)=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:f.color||b[p%b.length]}}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:f.name})]},p))}),r.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[r.jsxs("div",{className:"relative",style:{height:`${n}px`},children:[a&&r.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((f,p)=>r.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${p*25}%`}},p))}),r.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:t.map((f,p)=>{const C=f.color||b[p%b.length];return r.jsxs("g",{children:[r.jsx("path",{d:x(f.data),fill:C,fillOpacity:o}),r.jsx("path",{d:m(f.data),fill:"none",stroke:C,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"})]},p)})})]}),s&&r.jsx("div",{className:"flex justify-between mt-2",children:s.map((f,p)=>r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:f},p))})]})]})},rs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UradarUchart",children:e||"UradarUchart Component"}),ts=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UbubbleUchart",children:e||"UbubbleUchart Component"}),as=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UscatterUplot",children:e||"UscatterUplot Component"}),os=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtreeUmap",children:e||"UtreeUmap Component"}),ns=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsankeyUdiagram",children:e||"UsankeyUdiagram Component"}),ss=({data:t,width:e=100,height:a=30,color:o="#3b82f6",fill:n=!1,className:s})=>{if(t.length===0)return null;const l=Math.max(...t),g=Math.min(...t),c=l-g||1,i=t.map((h,b)=>{const x=b/(t.length-1)*e,m=a-(h-g)/c*a;return`${x},${m}`}).join(" ");return r.jsxs("svg",{width:e,height:a,className:u("inline-block",s),children:[n&&r.jsx("polygon",{points:`0,${a} ${i} ${e},${a}`,fill:o,opacity:"0.2"}),r.jsx("polyline",{points:i,fill:"none",stroke:o,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"})]})},ls=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"Uheatmap",children:e||"Uheatmap Component"}),is=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfunnelUchart",children:e||"UfunnelUchart Component"}),ds=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"BurndownChart",children:e||"BurndownChart Component"}),cs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UperformanceUchart",children:e||"UperformanceUchart Component"}),gs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmetricUcomparison",children:e||"UmetricUcomparison Component"}),us=({value:t,min:e=0,max:a=100,size:o=120,strokeWidth:n=10,showValue:s=!0,label:l,variant:g="primary",className:c})=>{const i=Math.min(a,Math.max(e,t)),h=(i-e)/(a-e)*100,b=o/2,x=(o-n)/2,m=Math.PI*x,f=m-h/100*m,p={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"};return r.jsxs("div",{className:u("inline-flex flex-col items-center gap-2",c),children:[r.jsxs("svg",{width:o,height:o*.65,className:"transform rotate-180",children:[r.jsx("path",{d:`M ${n/2} ${b} A ${x} ${x} 0 0 1 ${o-n/2} ${b}`,fill:"none",className:"stroke-gray-200 dark:stroke-gray-700",strokeWidth:n,strokeLinecap:"round"}),r.jsx("path",{d:`M ${n/2} ${b} A ${x} ${x} 0 0 1 ${o-n/2} ${b}`,fill:"none",className:u(p[g],"transition-all duration-500"),strokeWidth:n,strokeDasharray:m,strokeDashoffset:f,strokeLinecap:"round"})]}),s&&r.jsxs("div",{className:"text-center -mt-8",children:[r.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:Math.round(i)}),l&&r.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:l})]})]})},hs=({value:t,max:e=100,variant:a="primary",size:o="md",showLabel:n=!1,labelPosition:s="outside",label:l,className:g,barClassName:c,animated:i=!0,striped:h=!1})=>{const b=Math.min(Math.max(t/e*100,0),100),x=l||`${Math.round(b)}%`,m={primary:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500",purple:"bg-purple-600 dark:bg-purple-500",gray:"bg-gray-600 dark:bg-gray-500"},f={sm:"h-1",md:"h-2",lg:"h-3"};return r.jsx("div",{className:u("w-full",g),children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:u("flex-1 bg-gray-200 dark:bg-gray-600 rounded-full overflow-hidden",f[o]),children:r.jsx("div",{className:u("rounded-full",f[o],m[a],i&&"transition-all duration-300 ease-in-out",h&&"bg-gradient-to-r from-transparent via-white/20 to-transparent bg-[length:20px_100%]",c),style:{width:`${b}%`},role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":e,children:n&&s==="inside"&&o==="lg"&&r.jsx("span",{className:"flex items-center justify-center h-full text-xs font-medium text-white px-2",children:x})})}),n&&s==="outside"&&r.jsx("span",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 whitespace-nowrap",children:x})]})})},bs=({value:t=0,max:e=100,variant:a="default",size:o="md",showLabel:n=!1,label:s,indeterminate:l=!1,striped:g=!1,animated:c=!1,className:i})=>{const h=Math.min(Math.max(t/e*100,0),100),b={default:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500"},x={sm:"h-1",md:"h-2",lg:"h-4"};return r.jsxs("div",{className:u("w-full",i),children:[r.jsx("div",{className:u("w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",x[o]),role:"progressbar","aria-valuenow":l?void 0:h,"aria-valuemin":0,"aria-valuemax":100,children:l?r.jsx("div",{className:u("h-full rounded-full animate-pulse",b[a]),style:{width:"100%"}}):r.jsx("div",{className:u("h-full rounded-full transition-all duration-300",b[a],g&&"bg-stripe",g&&c&&"animate-stripe"),style:{width:`${h}%`}})}),(n||s)&&r.jsx("div",{className:"mt-1 text-xs text-gray-600 dark:text-gray-400 text-right",children:s||`${Math.round(h)}%`})]})},fs=({value:t,size:e=100,strokeWidth:a=8,showValue:o=!0,label:n,variant:s="primary",color:l,trackColor:g,className:c})=>{const i=Math.min(100,Math.max(0,t)),h=e/2,b=(e-a)/2,x=2*Math.PI*b,m=x-i/100*x,f={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"},p=g||"stroke-gray-200 dark:stroke-gray-700";return r.jsx("div",{className:u("inline-flex items-center justify-center",c),children:r.jsxs("div",{className:"relative",style:{width:e,height:e},children:[r.jsxs("svg",{width:e,height:e,className:"transform -rotate-90",children:[r.jsx("circle",{cx:h,cy:h,r:b,className:p,strokeWidth:a,fill:"none"}),r.jsx("circle",{cx:h,cy:h,r:b,className:u(l?"":f[s],"transition-all duration-300 ease-in-out"),stroke:l,strokeWidth:a,strokeDasharray:x,strokeDashoffset:m,strokeLinecap:"round",fill:"none"})]}),(o||n)&&r.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[o&&!n&&r.jsxs("span",{className:"text-gray-900 dark:text-white font-bold",style:{fontSize:e*.2},children:[Math.round(i),"%"]}),n&&r.jsx("span",{className:"text-gray-900 dark:text-white font-medium text-center px-2",style:{fontSize:e*.15},children:n})]})]})})},ps=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprogressUtracker",children:e||"UprogressUtracker Component"}),ys=({src:t,alt:e,fallback:a,width:o,height:n,objectFit:s="cover",loading:l="lazy",showLoader:g=!0,rounded:c="none",border:i=!1,className:h,onLoad:b,onError:x})=>{const[m,f]=y.useState(!0),[p,C]=y.useState(!1),[S,k]=y.useState(t);y.useEffect(()=>{f(!0),C(!1),k(t)},[t]);const N=()=>{f(!1),b?.()},v=()=>{f(!1),C(!0),a&&S!==a&&(k(a),C(!1),f(!0)),x?.()},w={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},L={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},M={width:typeof o=="number"?`${o}px`:o,height:typeof n=="number"?`${n}px`:n};return r.jsxs("div",{className:u("relative inline-block overflow-hidden bg-gray-100 dark:bg-gray-800",w[c],i&&"border border-gray-200 dark:border-gray-700",h),style:M,children:[g&&m&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:r.jsx("div",{className:"animate-pulse",children:r.jsx(U.PhotoIcon,{className:"h-8 w-8 text-gray-400"})})}),p&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:r.jsx(U.PhotoIcon,{className:"h-8 w-8 text-gray-400"})}),!p&&r.jsx("img",{src:S,alt:e,loading:l,onLoad:N,onError:v,className:u("w-full h-full",L[s],m&&g&&"opacity-0")})]})},ms=({images:t,columns:e=3,gap:a=16,lightbox:o=!0,className:n})=>{const[s,l]=y.useState(null),g=b=>{o&&l(b)},c=()=>{l(null)},i=()=>{if(!s)return;const b=t.findIndex(m=>m.id===s.id),x=b>0?b-1:t.length-1;l(t[x])},h=()=>{if(!s)return;const b=t.findIndex(m=>m.id===s.id),x=b<t.length-1?b+1:0;l(t[x])};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:u("grid",n),style:{gridTemplateColumns:`repeat(${e}, 1fr)`,gap:`${a}px`},children:t.map(b=>r.jsxs("div",{className:u("relative aspect-square overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700",o&&"cursor-pointer hover:opacity-90 transition-opacity"),onClick:()=>g(b),children:[r.jsx("img",{src:b.thumbnail||b.src,alt:b.alt||"",className:"w-full h-full object-cover"}),b.caption&&r.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-sm p-2",children:b.caption})]},b.id))}),o&&s&&r.jsxs("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:c,children:[r.jsx("button",{onClick:c,className:"absolute top-4 right-4 text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),r.jsx("button",{onClick:b=>{b.stopPropagation(),i()},className:"absolute left-4 text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("button",{onClick:b=>{b.stopPropagation(),h()},className:"absolute right-4 text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),r.jsxs("div",{className:"max-w-4xl max-h-full",onClick:b=>b.stopPropagation(),children:[r.jsx("img",{src:s.src,alt:s.alt||"",className:"max-w-full max-h-[80vh] object-contain"}),s.caption&&r.jsx("p",{className:"text-white text-center mt-4",children:s.caption})]})]})]})},vs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UimageUcomparison",children:e||"UimageUcomparison Component"}),xs=({src:t,onCropComplete:e,initialCrop:a,className:o})=>{const[n,s]=y.useState(a||{x:50,y:50,width:200,height:200}),l=y.useRef(null),g=async()=>{if(!l.current||!e)return;const c=document.createElement("canvas"),i=c.getContext("2d");if(!i)return;const h=l.current,b=h.naturalWidth/h.width,x=h.naturalHeight/h.height;c.width=n.width*b,c.height=n.height*x,i.drawImage(h,n.x*b,n.y*x,n.width*b,n.height*x,0,0,c.width,c.height);const m=c.toDataURL("image/png");e(m,n)};return r.jsxs("div",{className:u("inline-flex flex-col gap-4",o),children:[r.jsxs("div",{className:"relative inline-block",children:[r.jsx("img",{ref:l,src:t,alt:"Crop preview",className:"max-w-full h-auto",crossOrigin:"anonymous"}),r.jsxs("div",{className:"absolute border-2 border-blue-500 bg-blue-500/20",style:{left:`${n.x}px`,top:`${n.y}px`,width:`${n.width}px`,height:`${n.height}px`,cursor:"move"},children:[r.jsx("div",{className:"absolute -top-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-nw-resize"}),r.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-ne-resize"}),r.jsx("div",{className:"absolute -bottom-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-sw-resize"}),r.jsx("div",{className:"absolute -bottom-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-se-resize"})]})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{onClick:g,className:u("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Crop Image"}),r.jsx("button",{onClick:()=>s(a||{x:50,y:50,width:200,height:200}),className:u("px-4 py-2 text-sm font-medium","bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white","rounded-md","hover:bg-gray-300 dark:hover:bg-gray-600","transition-colors"),children:"Reset"})]}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:'Drag to adjust crop area. Click "Crop Image" to export.'})]})},ks=({images:t,index:e,isOpen:a,onClose:o,onIndexChange:n,showThumbnails:s=!1,showDownload:l=!1,showZoom:g=!0,className:c})=>{const[i,h]=y.useState(1),b=t[e],x=e>0,m=e<t.length-1,f=y.useCallback(()=>{if(x){const v=e-1;n?.(v),h(1)}},[x,e,n]),p=y.useCallback(()=>{if(m){const v=e+1;n?.(v),h(1)}},[m,e,n]),C=()=>{h(v=>Math.min(v+.5,3))},S=()=>{h(v=>Math.max(v-.5,.5))},k=()=>{h(1)},N=()=>{const v=document.createElement("a");v.href=b.src,v.download=b.alt||"image",v.click()};return y.useEffect(()=>{if(!a)return;const v=w=>{switch(w.key){case"Escape":o();break;case"ArrowLeft":f();break;case"ArrowRight":p();break;case"+":case"=":C();break;case"-":case"_":S();break;case"0":k();break}};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[a,e,t.length,o,f,p]),y.useEffect(()=>(a?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[a]),y.useEffect(()=>{h(1)},[e]),!a||!b?null:r.jsx(ee,{children:r.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center","bg-black/95",c),children:[r.jsx("div",{className:"absolute inset-0",onClick:o,"aria-label":"Close lightbox"}),r.jsx("button",{onClick:o,className:"absolute top-4 right-4 z-10 p-2 text-white hover:text-gray-300 transition-colors","aria-label":"Close",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),x&&r.jsx("button",{onClick:f,className:"absolute left-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Previous image",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),m&&r.jsx("button",{onClick:p,className:"absolute right-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Next image",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),r.jsxs("div",{className:"absolute top-4 left-4 z-10 flex gap-2",children:[r.jsxs("div",{className:"px-3 py-1.5 bg-black/50 text-white text-sm rounded-md",children:[e+1," / ",t.length]}),g&&r.jsxs("div",{className:"flex gap-1 bg-black/50 rounded-md p-1",children:[r.jsx("button",{onClick:S,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom out",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7"})})}),r.jsxs("button",{onClick:k,className:"px-2 text-white text-sm hover:text-gray-300 transition-colors","aria-label":"Reset zoom",children:[Math.round(i*100),"%"]}),r.jsx("button",{onClick:C,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom in",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7"})})})]}),l&&r.jsx("button",{onClick:N,className:"p-1.5 bg-black/50 text-white hover:text-gray-300 rounded-md transition-colors","aria-label":"Download image",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})]}),r.jsx("div",{className:"relative z-0 flex items-center justify-center max-w-7xl max-h-screen p-20",children:r.jsx("img",{src:b.src,alt:b.alt||"",className:"max-w-full max-h-full object-contain transition-transform",style:{transform:`scale(${i})`}})}),b.caption&&r.jsx("div",{className:"absolute bottom-20 left-0 right-0 z-10 text-center",children:r.jsx("p",{className:"px-4 py-2 bg-black/50 text-white text-sm inline-block rounded-md max-w-2xl",children:b.caption})}),s&&t.length>1&&r.jsx("div",{className:"absolute bottom-4 left-0 right-0 z-10 flex justify-center gap-2 px-4 overflow-x-auto",children:t.map((v,w)=>r.jsx("button",{onClick:()=>{n?.(w),h(1)},className:u("flex-shrink-0 w-16 h-16 rounded-md overflow-hidden","border-2 transition-all",w===e?"border-white scale-110":"border-transparent opacity-60 hover:opacity-100 hover:border-gray-400"),children:r.jsx("img",{src:v.thumbnail||v.src,alt:v.alt||"",className:"w-full h-full object-cover"})},w))})]})})},ws=({src:t,poster:e,autoPlay:a=!1,loop:o=!1,muted:n=!1,controls:s=!0,className:l})=>{const g=y.useRef(null),[c,i]=y.useState(a),[h,b]=y.useState(1),[x,m]=y.useState(0),[f,p]=y.useState(0);y.useEffect(()=>{const w=g.current;if(!w)return;const L=()=>m(w.currentTime),M=()=>p(w.duration),I=()=>i(!0),$=()=>i(!1);return w.addEventListener("timeupdate",L),w.addEventListener("loadedmetadata",M),w.addEventListener("play",I),w.addEventListener("pause",$),()=>{w.removeEventListener("timeupdate",L),w.removeEventListener("loadedmetadata",M),w.removeEventListener("play",I),w.removeEventListener("pause",$)}},[]);const C=()=>{g.current&&(c?g.current.pause():g.current.play())},S=w=>{const L=parseFloat(w.target.value);b(L),g.current&&(g.current.volume=L)},k=w=>{const L=parseFloat(w.target.value);m(L),g.current&&(g.current.currentTime=L)},N=()=>{g.current&&(document.fullscreenElement?document.exitFullscreen():g.current.requestFullscreen())},v=w=>{const L=Math.floor(w/60),M=Math.floor(w%60);return`${L}:${M.toString().padStart(2,"0")}`};return r.jsxs("div",{className:u("relative group",l),children:[r.jsx("video",{ref:g,src:t,poster:e,autoPlay:a,loop:o,muted:n,className:"w-full rounded-lg",onClick:C}),s&&r.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 opacity-0 group-hover:opacity-100 transition-opacity",children:[r.jsx("input",{type:"range",min:"0",max:f||0,value:x,onChange:k,className:"w-full mb-2 accent-white"}),r.jsxs("div",{className:"flex items-center justify-between gap-4",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:C,className:"text-white hover:text-gray-300 transition-colors",children:c?r.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):r.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8 5v14l11-7z"})})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),r.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:h,onChange:S,className:"w-20 accent-white"})]}),r.jsxs("span",{className:"text-white text-sm",children:[v(x)," / ",v(f)]})]}),r.jsx("button",{onClick:N,className:"text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})]})]})},Cs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvideoUthumbnail",children:e||"UvideoUthumbnail Component"}),Ns=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"VideoEditor",children:e||"VideoEditor Component"}),Ss=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvideoUcall",children:e||"UvideoUcall Component"}),Es=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"LiveStream",children:e||"LiveStream Component"}),Ls=({src:t,title:e,artist:a,artwork:o,autoPlay:n=!1,loop:s=!1,className:l})=>{const g=y.useRef(null),[c,i]=y.useState(n),[h,b]=y.useState(0),[x,m]=y.useState(0),[f,p]=y.useState(1);y.useEffect(()=>{const w=g.current;if(!w)return;const L=()=>b(w.currentTime),M=()=>m(w.duration),I=()=>i(!0),$=()=>i(!1),A=()=>i(!1);return w.addEventListener("timeupdate",L),w.addEventListener("loadedmetadata",M),w.addEventListener("play",I),w.addEventListener("pause",$),w.addEventListener("ended",A),()=>{w.removeEventListener("timeupdate",L),w.removeEventListener("loadedmetadata",M),w.removeEventListener("play",I),w.removeEventListener("pause",$),w.removeEventListener("ended",A)}},[]);const C=()=>{g.current&&(c?g.current.pause():g.current.play())},S=w=>{const L=parseFloat(w.target.value);b(L),g.current&&(g.current.currentTime=L)},k=w=>{const L=parseFloat(w.target.value);p(L),g.current&&(g.current.volume=L)},N=w=>{const L=Math.floor(w/60),M=Math.floor(w%60);return`${L}:${M.toString().padStart(2,"0")}`},v=x>0?h/x*100:0;return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-6 shadow-lg",l),children:[r.jsx("audio",{ref:g,src:t,autoPlay:n,loop:s}),r.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[o&&r.jsx("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-200 dark:bg-gray-700",children:r.jsx("img",{src:o,alt:e||"Album artwork",className:"w-full h-full object-cover"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[e&&r.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white truncate",children:e}),a&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:a})]})]}),r.jsxs("div",{className:"mb-4",children:[r.jsx("input",{type:"range",min:"0",max:x||0,value:h,onChange:S,className:"w-full accent-blue-500"}),r.jsxs("div",{className:"flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1",children:[r.jsx("span",{children:N(h)}),r.jsx("span",{children:N(x)})]})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("button",{onClick:C,className:"w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors",children:c?r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):r.jsx("svg",{className:"w-5 h-5 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8 5v14l11-7z"})})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),r.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:f,onChange:k,className:"w-24 accent-blue-500"})]})]}),r.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[v.toFixed(0),"%"]})]})]})},Is=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UaudioUwaveform",children:e||"UaudioUwaveform Component"}),Ms=({data:t,width:e=200,height:a=40,color:o="#3b82f6",gap:n=2,className:s})=>{if(t.length===0)return null;const l=(e-(t.length-1)*n)/t.length;return r.jsx("svg",{width:e,height:a,className:u("inline-block",s),children:t.map((g,c)=>{const i=Math.max(2,g*a),h=c*(l+n),b=(a-i)/2;return r.jsx("rect",{x:h,y:b,width:l,height:i,fill:o,rx:l/2},c)})})},$s=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvoiceUrecorder",children:e||"UvoiceUrecorder Component"}),Us=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PodcastPlayer",children:e||"PodcastPlayer Component"}),Ts=({accept:t=["image/*","video/*","audio/*"],maxSize:e=50*1024*1024,maxFiles:a=10,multiple:o=!0,onUpload:n,onRemove:s,className:l})=>{const[g,c]=y.useState([]),[i,h]=y.useState(!1),b=y.useRef(null),x=N=>{N.preventDefault(),h(!0)},m=N=>{N.preventDefault(),h(!1)},f=N=>{N.preventDefault(),h(!1);const v=Array.from(N.dataTransfer.files);C(v)},p=N=>{if(N.target.files){const v=Array.from(N.target.files);C(v)}},C=N=>{const v=N.filter(I=>{const $=t.some(z=>{if(z.endsWith("/*")){const P=z.split("/")[0];return I.type.startsWith(P)}return I.type===z}),A=I.size<=e;return $&&A}),w=a-g.length,L=v.slice(0,w),M=L.map(I=>({id:`${Date.now()}-${Math.random()}`,file:I,preview:I.type.startsWith("image/")?URL.createObjectURL(I):void 0,status:"pending"}));c(I=>[...I,...M]),n&&n(L)},S=N=>{c(v=>v.filter(w=>w.id!==N)),s&&s(N)},k=N=>N<1024?`${N} B`:N<1024*1024?`${(N/1024).toFixed(1)} KB`:`${(N/(1024*1024)).toFixed(1)} MB`;return r.jsxs("div",{className:u("space-y-4",l),children:[r.jsxs("div",{onDragEnter:x,onDragOver:N=>N.preventDefault(),onDragLeave:m,onDrop:f,onClick:()=>b.current?.click(),className:u("border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",i?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600"),children:[r.jsx("svg",{className:"w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-2",children:"Drag and drop files here, or click to browse"}),r.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Max ",a," files, ",k(e)," each"]}),r.jsx("input",{ref:b,type:"file",multiple:o,accept:t.join(","),onChange:p,className:"hidden"})]}),g.length>0&&r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:g.map(N=>r.jsxs("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",children:[N.preview?r.jsx("img",{src:N.preview,alt:N.file.name,className:"w-full h-full object-cover"}):r.jsx("div",{className:"w-full h-full flex items-center justify-center",children:r.jsx("svg",{className:"w-12 h-12 text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z"})})}),r.jsx("button",{onClick:()=>S(N.id),className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),r.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2",children:[r.jsx("p",{className:"truncate",children:N.file.name}),r.jsx("p",{className:"text-gray-300",children:k(N.file.size)})]})]},N.id))})]})},As=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmediaUplaylist",children:e||"UmediaUplaylist Component"}),Ps=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PlaylistManager",children:e||"PlaylistManager Component"}),zs=({value:t,size:e=200,fgColor:a="#000000",bgColor:o="#ffffff",showDownload:n=!1,className:s})=>{const l=y.useRef(null);y.useEffect(()=>{const c=l.current;if(!c)return;const i=c.getContext("2d");if(!i)return;i.fillStyle=o,i.fillRect(0,0,e,e),i.fillStyle=a;const h=8,b=e/h,x=t.split("").reduce((f,p)=>f+p.charCodeAt(0),0);for(let f=0;f<h;f++)for(let p=0;p<h;p++)(x+f*h+p)%3!==0&&i.fillRect(p*b,f*b,b,b);const m=b*3;[[0,0],[e-m,0],[0,e-m]].forEach(([f,p])=>{i.strokeStyle=a,i.lineWidth=b,i.strokeRect(f+b/2,p+b/2,m-b,m-b)})},[t,e,a,o]);const g=()=>{const c=l.current;if(!c)return;const i=c.toDataURL("image/png"),h=document.createElement("a");h.download="qrcode.png",h.href=i,h.click()};return r.jsxs("div",{className:u("inline-flex flex-col items-center gap-3",s),children:[r.jsx("canvas",{ref:l,width:e,height:e,className:"border-2 border-gray-200 dark:border-gray-700 rounded-lg"}),n&&r.jsx("button",{onClick:g,className:u("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Download QR Code"}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 max-w-[200px] text-center break-all",children:t})]})},Ge=({isOpen:t,onClose:e,title:a,size:o="medium",variant:n="default",overlay:s="default",showCloseButton:l=!0,closeOnOverlayClick:g=!0,closeOnEscape:c=!0,children:i,className:h,"aria-labelledby":b,"aria-describedby":x,closeAriaLabel:m="Close modal"})=>{const f=y.useRef(null),p=y.useRef(null);if(y.useEffect(()=>{if(!t||!c)return;const N=v=>{v.key==="Escape"&&e()};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[t,c,e]),y.useEffect(()=>{if(t)return p.current=document.activeElement,f.current&&f.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",p.current&&p.current.focus()}},[t]),!t)return null;const C=()=>{const N=D.overlays.modal.content(),v=D.overlays.modal[o]();return u(N,v)},S=N=>{g&&N.target===N.currentTarget&&e()},k=r.jsxs(r.Fragment,{children:[r.jsx("div",{className:D.overlays.modal.backdrop(),onClick:S}),r.jsx("div",{className:D.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":b,"aria-describedby":x,children:r.jsxs("div",{ref:f,"data-testid":"modal-content",className:u(C(),h),tabIndex:-1,onClick:N=>N.stopPropagation(),children:[a&&r.jsxs("div",{className:D.overlays.modal.header(),children:[r.jsx("h2",{id:b,className:D.overlays.modal.title(),children:a}),l&&r.jsx("button",{onClick:e,className:D.overlays.modal.closeButton(),"aria-label":m,children:r.jsx(U.XMarkIcon,{className:D.icon.variant.muted.md()})})]}),i]})})]});return gr.createPortal(k,document.body)},Ds=({children:t,variant:e="default",className:a})=>r.jsx("div",{"data-testid":"modal-header",className:u(D.overlays.modal.header(),a),children:t}),Ke=({children:t,variant:e="default",className:a})=>r.jsx("div",{"data-testid":"modal-body",className:u(D.overlays.modal.body(),a),children:t}),Ye=({children:t,variant:e="default",className:a})=>r.jsx("div",{"data-testid":"modal-footer",className:u(D.overlays.modal.footer(),a),children:t}),js=({isOpen:t,onClose:e,children:a,size:o="md",showCloseButton:n=!0,closeOnOutsideClick:s=!0,closeOnEscape:l=!0,className:g})=>{if(y.useEffect(()=>{if(!l||!t||!e)return;const h=b=>{b.key==="Escape"&&e()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,e,l]),!t)return null;const c={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-full mx-4"},i=()=>{s&&e&&e()};return r.jsxs(ee,{children:[r.jsx(ke,{isOpen:t,onClose:i,opacity:"dark",blur:!0}),r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:r.jsxs("div",{className:u("relative w-full",c[o],"bg-white dark:bg-gray-900","rounded-lg shadow-xl","animate-in fade-in zoom-in-95 duration-200",g),onClick:h=>h.stopPropagation(),children:[n&&e&&r.jsx("button",{onClick:e,className:"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close dialog",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a]})})]})},Bs={default:U.InformationCircleIcon,warning:U.ExclamationTriangleIcon,danger:U.XCircleIcon,success:U.CheckCircleIcon,info:U.InformationCircleIcon},Ws={default:()=>D.icon.variant.default.lg(),warning:()=>D.icon.variant.warning.lg(),danger:()=>D.icon.variant.error.lg(),success:()=>D.icon.variant.success.lg(),info:()=>D.icon.variant.default.lg()},Os={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},Fs=({isOpen:t,onClose:e,onConfirm:a,title:o,message:n,confirmText:s="Confirm",cancelText:l="Cancel",loadingText:g="Processing...",variant:c="default",isLoading:i=!1})=>{const h=Bs[c],b=Ws[c],x=Os[c];return r.jsxs(Ge,{isOpen:t,onClose:e,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[r.jsxs(Ke,{variant:"padded",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[r.jsx(h,{className:b()}),r.jsx("h3",{id:"confirmation-dialog-title",className:T.heading.h4(),children:o})]}),r.jsx("p",{id:"confirmation-dialog-description",className:T.body.md(),children:n})]}),r.jsxs(Ye,{children:[r.jsx(J,{variant:"outline",onClick:e,disabled:i,children:l}),r.jsx(J,{variant:x,onClick:a,disabled:i,children:i?g:s})]})]})},Vs=({isOpen:t,onClose:e,onSubmit:a,title:o,description:n,placeholder:s="",initialValue:l="",cancelText:g="Cancel",confirmText:c="Confirm",isLoading:i=!1,loadingText:h="Processing...",maxLength:b,required:x=!0,validate:m})=>{const[f,p]=y.useState(l),[C,S]=y.useState(null);y.useEffect(()=>{t&&(p(l),S(null))},[t,l]);const k=async w=>{if(w.preventDefault(),S(null),x&&!f.trim()){S("This field is required");return}if(m){const L=m(f);if(L){S(L);return}}try{await a(f.trim())}catch(L){S(L instanceof Error?L.message:"An error occurred")}},N=()=>{p(l),S(null),e()},v=x?f.trim().length>0:!0;return r.jsx(Ge,{isOpen:t,onClose:N,size:"small","aria-labelledby":"text-input-modal-title","aria-describedby":"text-input-modal-description",closeOnEscape:!i,closeOnOverlayClick:!i,children:r.jsxs("form",{onSubmit:k,children:[r.jsxs(Ke,{variant:"padded",children:[r.jsx("h3",{id:"text-input-modal-title",className:T.heading.h4(),children:o}),r.jsx("p",{id:"text-input-modal-description",className:`${T.body.md()} mt-2 mb-4`,children:n}),r.jsx(Ce,{type:"text",value:f,onChange:w=>p(w.target.value),placeholder:s,maxLength:b,disabled:i,autoFocus:!0,"aria-invalid":!!C,"aria-describedby":C?"text-input-error":void 0}),C&&r.jsx("p",{id:"text-input-error",className:`${T.body.sm()} text-red-600 dark:text-red-400 mt-2`,role:"alert",children:C})]}),r.jsxs(Ye,{children:[r.jsx(J,{type:"button",variant:"outline",onClick:N,disabled:i,children:g}),r.jsx(J,{type:"submit",variant:"default",disabled:!v||i,children:i?h:c})]})]})})},Hs=({isOpen:t,onClose:e,children:a,side:o="right",size:n="md",showCloseButton:s=!0,title:l,footer:g,className:c})=>{if(y.useEffect(()=>{const x=m=>{m.key==="Escape"&&t&&e()};if(t)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[t,e]),!t)return null;const i={left:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},right:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},top:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"},bottom:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"}},h={left:"left-0 top-0 h-full",right:"right-0 top-0 h-full",top:"top-0 left-0 w-full",bottom:"bottom-0 left-0 w-full"},b={left:t?"translate-x-0":"-translate-x-full",right:t?"translate-x-0":"translate-x-full",top:t?"translate-y-0":"-translate-y-full",bottom:t?"translate-y-0":"translate-y-full"};return r.jsxs(ee,{children:[r.jsx(ke,{isOpen:t,onClose:e,opacity:"medium"}),r.jsxs("div",{className:u("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","transition-transform duration-300 ease-in-out",h[o],i[o][n],b[o],c),children:[(l||s)&&r.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[l&&r.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:l}),s&&r.jsx("button",{onClick:e,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors","aria-label":"Close drawer",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:a}),g&&r.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:g})]})]})},qs=({isOpen:t,onClose:e,children:a,title:o,description:n,footer:s,side:l="bottom",size:g="md",showHandle:c=!0,showCloseButton:i=!0,className:h})=>{if(y.useEffect(()=>{if(!t)return;const f=p=>{p.key==="Escape"&&e()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[t,e]),!t)return null;const b={bottom:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},top:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},left:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"},right:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"}},x={bottom:"bottom-0 left-0 right-0 rounded-t-2xl",top:"top-0 left-0 right-0 rounded-b-2xl",left:"left-0 top-0 bottom-0 rounded-r-2xl",right:"right-0 top-0 bottom-0 rounded-l-2xl"},m={bottom:"animate-in slide-in-from-bottom duration-300",top:"animate-in slide-in-from-top duration-300",left:"animate-in slide-in-from-left duration-300",right:"animate-in slide-in-from-right duration-300"};return r.jsxs(ee,{children:[r.jsx(ke,{isOpen:t,onClose:e,opacity:"dark"}),r.jsxs("div",{className:u("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","flex flex-col",x[l],b[l][g],m[l],h),children:[c&&(l==="bottom"||l==="top")&&r.jsx("div",{className:u("flex items-center justify-center",l==="bottom"?"pt-3 pb-2":"pb-3 pt-2"),children:r.jsx("div",{className:"w-12 h-1.5 bg-gray-300 dark:bg-gray-700 rounded-full"})}),(o||n||i)&&r.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{className:"flex-1",children:[o&&r.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o}),n&&r.jsx("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-400",children:n})]}),i&&r.jsx("button",{onClick:e,className:"ml-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close sheet",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),r.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:a}),s&&r.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:s})]})]})},_s=({trigger:t,children:e,placement:a="bottom",isOpen:o,onOpenChange:n,trigger_action:s="click",showArrow:l=!0,className:g})=>{const[c,i]=y.useState(!1),h=o!==void 0?o:c,b=y.useCallback(w=>{o===void 0&&i(w),n?.(w)},[o,n]),x=y.useRef(null),m=y.useRef(null),[f,p]=y.useState({top:0,left:0});y.useEffect(()=>{if(!h||!x.current)return;const w=()=>{const L=x.current.getBoundingClientRect(),M=8;let I=0,$=0;switch(a){case"top":I=L.top-M,$=L.left+L.width/2;break;case"top-start":I=L.top-M,$=L.left;break;case"top-end":I=L.top-M,$=L.right;break;case"bottom":I=L.bottom+M,$=L.left+L.width/2;break;case"bottom-start":I=L.bottom+M,$=L.left;break;case"bottom-end":I=L.bottom+M,$=L.right;break;case"left":I=L.top+L.height/2,$=L.left-M;break;case"right":I=L.top+L.height/2,$=L.right+M;break}p({top:I,left:$})};return w(),window.addEventListener("scroll",w),window.addEventListener("resize",w),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",w)}},[h,a]),y.useEffect(()=>{if(!h)return;const w=L=>{x.current&&!x.current.contains(L.target)&&m.current&&!m.current.contains(L.target)&&b(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[h,b]),y.useEffect(()=>{if(!h)return;const w=L=>{L.key==="Escape"&&b(!1)};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[h,b]);const C=()=>{s==="click"&&b(!h)},S=()=>{s==="hover"&&b(!0)},k=()=>{s==="hover"&&b(!1)},N={top:"origin-bottom","top-start":"origin-bottom-left","top-end":"origin-bottom-right",bottom:"origin-top","bottom-start":"origin-top-left","bottom-end":"origin-top-right",left:"origin-right",right:"origin-left"},v={top:"-translate-x-1/2 -translate-y-full","top-start":"-translate-y-full","top-end":"-translate-x-full -translate-y-full",bottom:"-translate-x-1/2","bottom-start":"","bottom-end":"-translate-x-full",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return r.jsxs("div",{className:u("relative inline-block",g),children:[r.jsx("div",{ref:x,onClick:C,onMouseEnter:S,onMouseLeave:k,className:"inline-block",children:t}),h&&r.jsxs("div",{ref:m,className:u("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",N[a],v[a]),style:{position:"fixed",top:f.top+"px",left:f.left+"px"},onMouseEnter:s==="hover"?()=>b(!0):void 0,onMouseLeave:s==="hover"?()=>b(!1):void 0,children:[e,l&&r.jsx("div",{className:u("arrow absolute w-2 h-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 transform rotate-45",a.startsWith("top")&&"bottom-[-5px] border-t-0 border-l-0",a.startsWith("bottom")&&"top-[-5px] border-b-0 border-r-0",a==="left"&&"right-[-5px] border-l-0 border-b-0",a==="right"&&"left-[-5px] border-r-0 border-t-0",(a==="top"||a==="bottom")&&"left-1/2 -translate-x-1/2",(a==="left"||a==="right")&&"top-1/2 -translate-y-1/2")})]})]})},Gs=({trigger:t,children:e,placement:a="bottom",openDelay:o=200,closeDelay:n=300,className:s})=>{const[l,g]=y.useState(!1),[c,i]=y.useState({top:0,left:0}),h=y.useRef(null),b=y.useRef(null),x=y.useRef(void 0),m=y.useRef(void 0);y.useEffect(()=>{if(!l||!h.current)return;const k=()=>{const N=h.current.getBoundingClientRect(),v=8;let w=0,L=0;switch(a){case"top":w=N.top-v,L=N.left+N.width/2;break;case"bottom":w=N.bottom+v,L=N.left+N.width/2;break;case"left":w=N.top+N.height/2,L=N.left-v;break;case"right":w=N.top+N.height/2,L=N.right+v;break}i({top:w,left:L})};return k(),window.addEventListener("scroll",k),window.addEventListener("resize",k),()=>{window.removeEventListener("scroll",k),window.removeEventListener("resize",k)}},[l,a]);const f=()=>{m.current&&clearTimeout(m.current),x.current=setTimeout(()=>{g(!0)},o)},p=()=>{x.current&&clearTimeout(x.current),m.current=setTimeout(()=>{g(!1)},n)},C={top:"origin-bottom",bottom:"origin-top",left:"origin-right",right:"origin-left"},S={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:h,onMouseEnter:f,onMouseLeave:p,className:"inline-block",children:t}),l&&r.jsx(ee,{children:r.jsx("div",{ref:b,className:u("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",C[a],S[a],s),style:{top:c.top+"px",left:c.left+"px"},onMouseEnter:()=>{m.current&&clearTimeout(m.current)},onMouseLeave:p,children:e})})]})},Ks=({content:t,children:e,placement:a="top",delayShow:o=0,delayHide:n=0,className:s,disabled:l=!1,showArrow:g=!0,variant:c="default",trigger:i="hover",isOpen:h,onVisibilityChange:b})=>{const[x,m]=y.useState(!1),f=y.useRef(void 0),p=y.useRef(void 0),C=y.useRef(null),S=y.useRef(null),k=h!==void 0,N=k?h:x,v=y.useCallback(()=>{l||k||(p.current&&(clearTimeout(p.current),p.current=void 0),o>0?f.current=setTimeout(()=>{m(!0),b?.(!0)},o):(m(!0),b?.(!0)))},[l,k,o,b]),w=y.useCallback(()=>{k||(f.current&&(clearTimeout(f.current),f.current=void 0),n>0?p.current=setTimeout(()=>{m(!1),b?.(!1)},n):(m(!1),b?.(!1)))},[k,n,b]);y.useEffect(()=>()=>{f.current&&clearTimeout(f.current),p.current&&clearTimeout(p.current)},[]),y.useEffect(()=>{if(i!=="click"||!N)return;const F=q=>{C.current&&!C.current.contains(q.target)&&S.current&&!S.current.contains(q.target)&&w()};return document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}},[i,N,w]);const L=()=>{i==="hover"&&v()},M=()=>{i==="hover"&&w()},I=()=>{i==="hover"&&v()},$=()=>{i==="hover"&&w()},A=()=>{i==="click"&&!k&&(N?(m(!1),b?.(!1)):(m(!0),b?.(!0)))},z={top:"bottom-full left-1/2 -translate-x-1/2 -translate-y-2",bottom:"top-full left-1/2 -translate-x-1/2 translate-y-2",left:"right-full top-1/2 -translate-x-2 -translate-y-1/2",right:"left-full top-1/2 translate-x-2 -translate-y-1/2"},P={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"},W={default:"bg-gray-900 dark:bg-gray-700 text-white",info:"bg-blue-600 dark:bg-blue-500 text-white",success:"bg-green-600 dark:bg-green-500 text-white",warning:"bg-yellow-600 dark:bg-yellow-500 text-white",error:"bg-red-600 dark:bg-red-500 text-white"},j={default:{top:"border-t-gray-900 dark:border-t-gray-700",bottom:"border-b-gray-900 dark:border-b-gray-700",left:"border-l-gray-900 dark:border-l-gray-700",right:"border-r-gray-900 dark:border-r-gray-700"},info:{top:"border-t-blue-600 dark:border-t-blue-500",bottom:"border-b-blue-600 dark:border-b-blue-500",left:"border-l-blue-600 dark:border-l-blue-500",right:"border-r-blue-600 dark:border-r-blue-500"},success:{top:"border-t-green-600 dark:border-t-green-500",bottom:"border-b-green-600 dark:border-b-green-500",left:"border-l-green-600 dark:border-l-green-500",right:"border-r-green-600 dark:border-r-green-500"},warning:{top:"border-t-yellow-600 dark:border-t-yellow-500",bottom:"border-b-yellow-600 dark:border-b-yellow-500",left:"border-l-yellow-600 dark:border-l-yellow-500",right:"border-r-yellow-600 dark:border-r-yellow-500"},error:{top:"border-t-red-600 dark:border-t-red-500",bottom:"border-b-red-600 dark:border-b-red-500",left:"border-l-red-600 dark:border-l-red-500",right:"border-r-red-600 dark:border-r-red-500"}};return r.jsxs("div",{ref:S,className:"relative inline-block",onMouseEnter:L,onMouseLeave:M,onFocus:I,onBlur:$,onClick:A,children:[e,N&&!l&&r.jsxs("div",{ref:C,className:u("absolute z-50 px-2 py-1 text-xs font-medium rounded shadow-lg whitespace-nowrap pointer-events-none",z[a],W[c],s),role:"tooltip",children:[t,g&&r.jsx("div",{className:u("absolute w-0 h-0 border-4 arrow",P[a],j[c][a])})]})]})},Ys=({children:t,onDrop:e,onDragOver:a,accept:o,showIndicator:n=!0,indicator:s,disabled:l=!1,className:g})=>{const[c,i]=y.useState(!1),[h,b]=y.useState(0),x=S=>{S.preventDefault(),S.stopPropagation(),!l&&(b(k=>k+1),S.dataTransfer.items&&S.dataTransfer.items.length>0&&i(!0))},m=S=>{S.preventDefault(),S.stopPropagation(),!l&&b(k=>{const N=k-1;return N===0&&i(!1),N})},f=S=>{S.preventDefault(),S.stopPropagation(),!l&&a&&a(S)},p=S=>{if(S.preventDefault(),S.stopPropagation(),l)return;if(i(!1),b(0),S.dataTransfer.files&&S.dataTransfer.files.length>0){const N=Array.from(S.dataTransfer.files);let v=N;o&&o.length>0&&(v=N.filter(w=>o.some(L=>{if(L.endsWith("/*")){const M=L.split("/")[0];return w.type.startsWith(M)}return w.type===L}))),e(v);return}const k=S.dataTransfer.getData("text/plain");if(k)try{const N=JSON.parse(k);e(N)}catch{e(k)}},C=r.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-blue-50 dark:bg-blue-900/30 border-2 border-dashed border-blue-500 dark:border-blue-400 rounded-lg z-10",children:[r.jsx("svg",{className:"w-12 h-12 text-blue-600 dark:text-blue-400 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r.jsx("p",{className:"text-blue-700 dark:text-blue-300 font-medium",children:"Drop here"})]});return r.jsxs("div",{onDragEnter:x,onDragLeave:m,onDragOver:f,onDrop:p,className:u("relative",l&&"opacity-50 cursor-not-allowed",g),children:[t,n&&c&&!l&&(s||C)]})},Qs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdragUdropUlist",children:e||"UdragUdropUlist Component"}),Zs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsortableUgrid",children:e||"UsortableUgrid Component"}),Xs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UnestedUdrag",children:e||"UnestedUdrag Component"}),Js=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UgestureUdetector",children:e||"UgestureUdetector Component"}),Rs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UswipeUactions",children:e||"UswipeUactions Component"}),el=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpinchUzoom",children:e||"UpinchUzoom Component"}),rl=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdoubleUtap",children:e||"UdoubleUtap Component"}),tl=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UlongUpress",children:e||"UlongUpress Component"}),al=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UhoverUtooltip",children:e||"UhoverUtooltip Component"}),ol=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UradialUmenu",children:e||"UradialUmenu Component"}),nl=({children:t,active:e=!0,initialFocus:a,returnFocus:o=!0,className:n})=>{const s=y.useRef(null),l=y.useRef(null);return y.useEffect(()=>{if(!e)return;o&&(l.current=document.activeElement);const g=()=>{if(!s.current)return[];const b=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(s.current.querySelectorAll(b))},c=()=>{if(a){const x=s.current?.querySelector(a);if(x){x.focus();return}}const b=g();b.length>0&&b[0].focus()},i=b=>{if(b.key!=="Tab")return;const x=g();if(x.length===0){b.preventDefault();return}const m=x[0],f=x[x.length-1];b.shiftKey?document.activeElement===m&&(b.preventDefault(),f.focus()):document.activeElement===f&&(b.preventDefault(),m.focus())},h=setTimeout(c,0);return document.addEventListener("keydown",i),()=>{clearTimeout(h),document.removeEventListener("keydown",i),o&&l.current&&l.current.focus()}},[e,a,o]),e?r.jsx("div",{ref:s,className:u(n),children:t}):r.jsx(r.Fragment,{children:t})},sl=({sections:t,activeId:e,onActiveChange:a,offset:o=80,container:n,smoothScroll:s=!0,showSubsections:l=!0,className:g})=>{const[c,i]=y.useState(""),h=y.useRef(null),b=e!==void 0?e:c;y.useEffect(()=>{const f=n?document.querySelector(n):window;if(!f)return;const p=k=>k.flatMap(N=>[N.id,...N.subsections?p(N.subsections):[]]),S=p(t).map(k=>document.getElementById(k)).filter(Boolean);if(S.length!==0)return h.current=new IntersectionObserver(k=>{k.forEach(N=>{if(N.isIntersecting){const v=N.target.id;e!==void 0&&a?a(v):i(v)}})},{root:n?f:null,rootMargin:`-${o}px 0px -50% 0px`,threshold:0}),S.forEach(k=>{h.current?.observe(k)}),()=>{h.current?.disconnect()}},[t,n,o,e,a]);const x=f=>{const p=document.getElementById(f);if(!p)return;const C=n?document.querySelector(n):window;if(!C)return;const k=p.offsetTop-o;s?C===window?window.scrollTo({top:k,behavior:"smooth"}):C.scrollTo({top:k,behavior:"smooth"}):C===window?window.scrollTo(0,k):C.scrollTop=k},m=(f,p=0)=>{const C=b===f.id,S=f.subsections?.some(k=>b===k.id)||!1;return r.jsxs("div",{children:[r.jsx("button",{onClick:()=>x(f.id),className:u("w-full text-left px-3 py-1.5 text-sm rounded-md transition-colors",p===0?"font-medium":"pl-6 text-sm",C?"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/30":S?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800"),style:{paddingLeft:`${p*.75+.75}rem`},children:f.label}),l&&f.subsections&&f.subsections.length>0&&r.jsx("div",{className:"ml-2 border-l-2 border-gray-200 dark:border-gray-700",children:f.subsections.map(k=>m(k,p+1))})]},f.id)};return r.jsx("nav",{className:u("space-y-1",g),children:t.map(f=>m(f,0))})},ll=({children:t,onRefresh:e,disabled:a=!1,refreshingText:o="Refreshing...",pullDownText:n="Pull down to refresh",releaseText:s="Release to refresh",threshold:l=80,maxPullDistance:g=120,className:c=""})=>{const[i,h]=y.useState(0),[b,x]=y.useState(!1),[m,f]=y.useState(!1),p=y.useRef(0),C=y.useRef(null);y.useEffect(()=>{const w=C.current;if(!w)return;const L=$=>{if(a||b)return;w.scrollTop<=0&&(p.current=$.touches[0].clientY,f(!0))},M=$=>{if(!m)return;const z=$.touches[0].clientY-p.current;if(z>0&&w.scrollTop<=0){const P=Math.min(z/g,1),W=Math.min(z*(1-P*.5),g);h(W),z>10&&$.preventDefault()}},I=async()=>{if(m)if(f(!1),i>=l&&!b){x(!0);try{await e()}catch{}finally{x(!1),h(0)}}else h(0)};return w.addEventListener("touchstart",L,{passive:!0}),w.addEventListener("touchmove",M,{passive:!1}),w.addEventListener("touchend",I),()=>{w.removeEventListener("touchstart",L),w.removeEventListener("touchmove",M),w.removeEventListener("touchend",I)}},[a,b,m,i,l,g,e]);const S=Math.min(i/l,1),k=m||b,N=m?i:b?l:0,v=()=>b?o:i>=l?s:n;return r.jsxs("div",{ref:C,className:`relative ${c}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[r.jsx("div",{className:"sticky top-0 left-0 right-0 flex items-center justify-center bg-gradient-to-b from-blue-50/90 to-transparent dark:from-blue-900/20 dark:to-transparent backdrop-blur-sm z-10 transition-all duration-300 ease-out",style:{height:`${N}px`,marginTop:m?0:`-${N}px`,opacity:k?1:0,pointerEvents:"none"},children:r.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[r.jsx(U.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${b?"animate-spin":""}`,style:{transform:`rotate(${S*360}deg)`}}),i>20&&r.jsx("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:v()})]})}),r.jsx("div",{style:{paddingTop:m?`${i}px`:0,transition:m?"none":"padding-top 200ms ease-out"},children:t})]})},il=({children:t,onLoadMore:e,loading:a=!1,hasMore:o=!0,threshold:n=100,loader:s,endMessage:l,height:g,scrollDirection:c="vertical",reverse:i=!1,className:h})=>{const b=y.useRef(null),[x,m]=y.useState(!1);y.useEffect(()=>{const S=b.current;if(!S||a||!o)return;const k=()=>{const{scrollTop:N,scrollHeight:v,clientHeight:w,scrollLeft:L,scrollWidth:M,clientWidth:I}=S;c==="vertical"&&m(N>300);let $;c==="vertical"?i?$=N:$=v-N-w:i?$=L:$=M-L-I,$<n&&e()};return S.addEventListener("scroll",k),()=>S.removeEventListener("scroll",k)},[a,o,n,e,c,i]);const f=()=>{b.current?.scrollTo({top:0,behavior:"smooth"})},p=r.jsxs("div",{className:"flex justify-center items-center py-4",children:[r.jsx("div",{className:"w-6 h-6 border-2 border-blue-600 dark:border-blue-400 border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"Loading..."})]}),C=r.jsx("div",{className:"flex justify-center items-center py-4",children:r.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"No more items to load"})});return r.jsxs("div",{className:u("relative",h),children:[r.jsxs("div",{ref:b,className:u(c==="vertical"?"overflow-y-auto":"overflow-x-auto","overflow-auto"),style:{height:c==="vertical"?g:void 0,width:c==="horizontal"?"100%":void 0,display:c==="horizontal"?"flex":void 0,flexDirection:i&&c==="vertical"?"column-reverse":void 0},children:[i&&a&&(s||p),i&&!a&&!o&&l,r.jsx("div",{className:u(c==="horizontal"&&"flex",c==="horizontal"&&i&&"flex-row-reverse"),children:t}),!i&&a&&(s||p),!i&&!a&&!o&&(l||C)]}),c==="vertical"&&!i&&x&&r.jsx("button",{onClick:f,className:u("absolute bottom-4 right-4","p-3 rounded-full","bg-blue-600 dark:bg-blue-500","text-white","shadow-lg","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"),"aria-label":"Scroll to top",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 10l7-7m0 0l7 7m-7-7v18"})})})]})},Y={twitter:(t,e,a)=>{const o=a.length>0?`&hashtags=${a.join(",")}`:"";return`https://twitter.com/intent/tweet?url=${encodeURIComponent(t)}&text=${encodeURIComponent(e)}${o}`},facebook:t=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(t)}`,linkedin:(t,e,a)=>`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(t)}`,reddit:(t,e)=>`https://reddit.com/submit?url=${encodeURIComponent(t)}&title=${encodeURIComponent(e)}`,telegram:(t,e)=>`https://t.me/share/url?url=${encodeURIComponent(t)}&text=${encodeURIComponent(e)}`,whatsapp:(t,e)=>`https://wa.me/?text=${encodeURIComponent(e+" "+t)}`,email:(t,e,a)=>`mailto:?subject=${encodeURIComponent(e)}&body=${encodeURIComponent(a+`
60
36
 
61
- `+e)}`,discord:(e,t)=>`https://discord.com/channels/@me?message=${encodeURIComponent(t+`
62
- `+e)}`,messages:(e,t)=>`sms:?&body=${encodeURIComponent(t+" "+e)}`},jd=({shareConfig:e})=>{const[t,r]=x.useState(!1),[a,o]=x.useState(""),[s,i]=x.useState(!1),[l,c]=x.useState(!1),[d,g]=x.useState(!1);x.useEffect(()=>{const k=e.onBeforeShare;k&&!a&&(async()=>{i(!0);try{const P=typeof window<"u"?window.location.href:"",E=await k(P);o(E)}catch{const P=typeof window<"u"?window.location.href:"";o(P)}finally{i(!1)}})()},[e,a]);const m=a||(typeof window<"u"?window.location.href:""),b=typeof navigator<"u"&&navigator.share!==void 0,f=async()=>{if(!(!b||d)){g(!0);try{await navigator.share({title:e.title,text:e.description,url:m}),r(!1)}catch(k){k instanceof Error&&k.name!=="AbortError"&&(console.error("Share failed:",k),k.name!=="InvalidStateError"&&r(!0))}finally{g(!1)}}},p=async()=>{try{await navigator.clipboard.writeText(m),c(!0),setTimeout(()=>{c(!1),r(!1)},1500)}catch{}},h=()=>{r(!t)},w=k=>{window.open(k,"_blank","noopener,noreferrer,width=600,height=400"),r(!1)},C=[{name:"Twitter",url:ie.twitter(m,e.title,e.hashtags),color:"text-blue-400",svg:n.jsx("path",{d:"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"})},{name:"Facebook",url:ie.facebook(m),color:"text-blue-600",svg:n.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})},{name:"LinkedIn",url:ie.linkedin(m,e.title,e.description),color:"text-blue-700",svg:n.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})},{name:"Reddit",url:ie.reddit(m,e.title),color:"text-orange-600",svg:n.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})},{name:"Telegram",url:ie.telegram(m,e.title),color:"text-blue-500",svg:n.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})},{name:"WhatsApp",url:ie.whatsapp(m,e.title),color:"text-green-600",svg:n.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})},{name:"Discord",url:ie.discord(m,e.title),color:"text-indigo-500",svg:n.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})},{name:"Messages",url:ie.messages(m,e.title),color:"text-green-500",svg:n.jsx("path",{d:"M.05 3.555A3 3 0 013 0h18a3 3 0 012.95 3.555L22 11v8a3 3 0 01-3 3H5a3 3 0 01-3-3v-8l-1.95-7.445zM2 10.938V19a1 1 0 001 1h18a1 1 0 001-1v-8.062L20 19H4l-2-8.062zM3.38 2L5 8h14l1.62-6H3.38z"})},{name:"Email",url:ie.email(m,e.title,e.description),color:"text-gray-600",svg:n.jsx("path",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"})}];return n.jsxs("div",{className:"relative",children:[n.jsx("button",{onClick:h,disabled:s||d,className:"flex items-center justify-center w-8 h-8 bg-blue-50 hover:bg-blue-100 dark:bg-blue-900/30 dark:hover:bg-blue-900/50 text-blue-600 dark:text-blue-400 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Share this page",children:s||d?n.jsx("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}):n.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})})}),t&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"fixed inset-0 z-[999998]",onClick:()=>r(!1)}),n.jsxs("div",{className:"absolute right-0 top-10 z-[999999] w-40 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1",children:[C.map(k=>n.jsxs("button",{onClick:()=>w(k.url),className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[n.jsx("svg",{className:`w-4 h-4 mr-2 ${k.color}`,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:k.svg}),n.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:k.name})]},k.name)),n.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),b&&n.jsxs("button",{onClick:()=>{r(!1),f()},disabled:d,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50",children:[n.jsx("svg",{className:"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})}),n.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"More..."})]}),n.jsxs("button",{onClick:p,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[n.jsx("svg",{className:"w-4 h-4 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})}),n.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:l?"Copied!":"Copy Link"})]})]})]})]})},Ga=({items:e,shareConfig:t,className:r,showHome:a})=>n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("nav",{"aria-label":"Breadcrumb",children:n.jsx("ol",{className:"flex items-center text-sm space-x-2",children:e.map((o,s)=>n.jsxs(x.Fragment,{children:[n.jsx("li",{children:o.current?n.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:o.label}):n.jsx(Ze.Link,{to:o.href||"#",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors",children:o.label})}),s<e.length-1&&n.jsx("li",{children:n.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"/"})})]},s))})}),t&&n.jsx(jd,{shareConfig:t})]}),Fd=({items:e,shareConfig:t})=>n.jsx("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 relative",children:n.jsx(Ga,{items:e,shareConfig:t})})}),_d=({filename:e,code:t,language:r,title:a,className:o="",showCopy:s=!0,showHeader:i=!0})=>{const{t:l}=br.useTranslation("codeBlock"),{code:c,loading:d,error:g}=$r(e||""),[m,b]=x.useState(!1),f=t||c,h=r||(e?(C=>{switch(C.split(".").pop()?.toLowerCase()){case"sol":return"solidity";case"js":case"mjs":return"javascript";case"ts":return"typescript";case"sh":return"bash";case"graphql":return"graphql";case"json":return"json";case"css":return"css";case"html":return"html";case"jsx":return"jsx";case"tsx":return"tsx";case"py":return"python";case"java":return"java";case"cpp":case"c":return"cpp";case"go":return"go";case"rs":return"rust";case"php":return"php";case"rb":return"ruby";default:return"text"}})(e):"text"),w=async()=>{if(f)try{await navigator.clipboard.writeText(f),b(!0),setTimeout(()=>b(!1),2e3)}catch{}};return e&&d?n.jsx("div",{className:`bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${o}`,children:n.jsx("div",{className:"animate-pulse text-gray-500",children:l("loadingCode","Loading code...")})}):e&&g?n.jsxs("div",{className:`bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${o}`,children:[l("error","Error"),": ",g]}):f?n.jsxs("div",{className:`bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${o}`,children:[i&&n.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50",children:[n.jsx("span",{className:"text-sm text-green-400 font-mono",children:a||e||`${h} code`}),s&&n.jsx("button",{onClick:w,className:"p-2 text-gray-400 hover:text-green-400 hover:bg-gray-800 rounded-lg transition-all duration-200 group",title:l("copyCode","Copy code"),children:m?n.jsx(A.CheckIcon,{className:"h-4 w-4 text-green-400"}):n.jsx(A.ClipboardDocumentIcon,{className:"h-4 w-4 group-hover:scale-110 transition-transform"})})]}),n.jsx("div",{className:"p-4 overflow-x-auto text-left",children:n.jsx("pre",{className:`text-sm language-${h}`,children:n.jsx("code",{className:"text-gray-100",children:f})})})]}):n.jsx("div",{className:`bg-gray-900 text-gray-400 rounded-lg p-4 font-mono text-sm ${o}`,children:l("noCode","No code to display")})},Hd=({subsections:e,isExpanded:t,selectedSubsection:r,parentSectionId:a,onSubsectionSelect:o})=>{const s=x.useRef(null),[i,l]=x.useState(void 0);return x.useLayoutEffect(()=>{if(s.current){const c=s.current.scrollHeight;l(t?c+16:0)}},[t,e]),n.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:i!==void 0?`${i}px`:"auto"},children:n.jsx("div",{ref:s,className:"ml-6 mt-1 mb-1 space-y-1",children:e.map(c=>n.jsxs("div",{className:"relative group",children:[r===c.id&&n.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),r!==c.id&&n.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),n.jsx("button",{onClick:()=>o?.(c.id,a),className:`relative z-10 block w-full text-left pl-4 pr-3 py-2 rounded-md text-sm transition-all duration-200 ${r===c.id?"text-blue-700 dark:text-blue-300":"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"}`,children:c.title})]},c.id))})})},Ud=({id:e,title:t,content:r,subsections:a,isSelected:o=!1,selectedSubsection:s=null,onSectionSelect:i,onSubsectionSelect:l,className:c=""})=>{const[d,g]=x.useState(!1),m=()=>{g(!d)},b=()=>{i?.(e)},f=a&&a.length>0;return n.jsxs("div",{className:c,children:[n.jsxs("div",{className:"relative flex items-center group",children:[o&&!s&&n.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),!(o&&!s)&&n.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),n.jsx("button",{onClick:b,className:`relative z-10 flex-1 text-left pl-5 pr-3 py-4 text-base font-medium transition-all duration-200 ${o&&!s?"text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100"}`,children:t}),f&&n.jsx("button",{onClick:m,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200","aria-label":d?"Collapse section":"Expand section",children:n.jsx(A.ChevronRightIcon,{className:`h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${d?"rotate-90":"rotate-0"}`})})]}),f&&n.jsx(Hd,{subsections:a,isExpanded:d,selectedSubsection:s,parentSectionId:e,onSubsectionSelect:l})]})},Vd=({title:e,subtitle:t,buttonText:r,buttonIcon:a="envelope",variant:o="default",badgeText:s="FREE",prominentBadgeText:i="100% Free",onButtonClick:l,className:c=""})=>{const d=()=>a==="envelope"||a==="both"?n.jsx(A.EnvelopeIcon,{className:o==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1"}):a==="none"?null:n.jsx("svg",{className:o==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})}),g=()=>a==="arrow"||a==="both"?n.jsx(A.ArrowRightIcon,{className:"h-4 w-4 ml-2"}):null,m=()=>o==="prominent"?"border-b-2 border-green-200 dark:border-green-700":"border-b border-green-200 dark:border-green-700",b=()=>{const h="bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white rounded-lg font-bold transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-green-500/25 inline-flex items-center whitespace-nowrap cursor-pointer";return o==="prominent"?`${h} px-8 py-3 text-base`:`${h} px-6 py-2 text-sm`},f=()=>o==="prominent"?"text-green-800 dark:text-green-200 font-semibold text-lg":"text-green-800 dark:text-green-200 font-semibold",p=o==="prominent"?i:s;return n.jsx("div",{className:`bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${m()} ${c}`,children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:n.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[n.jsxs("div",{className:`flex items-center ${o==="prominent"?"text-center sm:text-left":""}`,children:[n.jsx("div",{className:"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse",children:p}),n.jsxs("div",{children:[n.jsx("span",{className:f(),children:e}),t&&n.jsx("span",{className:"text-green-700 dark:text-green-300 text-sm block",children:t})]})]}),n.jsxs("button",{onClick:l,className:b(),children:[d(),r,g()]})]})})})},qd=({children:e,onClick:t,variant:r,size:a,disabled:o,className:s,type:i,trackingLabel:l,actionType:c,componentName:d,onTrack:g,trackingParams:m={},...b})=>{const f=p=>{if(g){const h=l||(typeof e=="string"?e:"")||"Unknown Button",C=r&&["default","primary","secondary","outline","ghost","destructive","link"].includes(r)?r:"default";g({button_text:h,button_type:C,component_name:d,action_type:c,...m})}t&&t(p)};return n.jsx(de,{...b,variant:r,size:a,disabled:o,className:s,type:i,onClick:f,children:e})},Gd=({children:e,onClick:t,to:r,href:a,trackingLabel:o,componentName:s,onTrack:i,trackingParams:l={},LinkComponent:c,linkProps:d={},...g})=>{const m=f=>{if(i){const p=o||(typeof e=="string"?e:"")||"Unknown Link",h=r?typeof r=="string"?r:r.pathname||"":a||"";i({link_text:p,link_url:h,to_page:h,navigation_type:c?"router_link":"anchor_link",component_name:s,...l})}t&&t(f)};if(c&&r!==void 0)return n.jsx(c,{...d,to:r,onClick:m,...g,children:e});const b=r?typeof r=="string"?r:r.pathname||"#":a;return n.jsx("a",{...g,href:b,onClick:m,children:e})},Ka={en:{name:"English",flag:"🇺🇸"},ar:{name:"العربية",flag:"🇸🇦"},de:{name:"Deutsch",flag:"🇩🇪"},es:{name:"Español",flag:"🇪🇸"},fr:{name:"Français",flag:"🇫🇷"},it:{name:"Italiano",flag:"🇮🇹"},ja:{name:"日本語",flag:"🇯🇵"},ko:{name:"한국어",flag:"🇰🇷"},pt:{name:"Português",flag:"🇵🇹"},ru:{name:"Русский",flag:"🇷🇺"},sv:{name:"Svenska",flag:"🇸🇪"},th:{name:"ไทย",flag:"🇹🇭"},uk:{name:"Українська",flag:"🇺🇦"},vi:{name:"Tiếng Việt",flag:"🇻🇳"},zh:{name:"简体中文",flag:"🇨🇳"}},Kd=({variant:e="compact",className:t=""})=>{const{i18n:r,t:a}=br.useTranslation("languageSelector"),[o,s]=x.useState(r.language),i=x.useMemo(()=>r.options.supportedLngs?r.options.supportedLngs.filter(d=>d!=="cimode").map(d=>({code:d,name:Ka[d]?.name||d.toUpperCase(),flag:Ka[d]?.flag||"🌐"})).sort((d,g)=>d.name.localeCompare(g.name)):[],[r.options.supportedLngs]),l=i.find(d=>d.code===o||d.code.toLowerCase()===o.toLowerCase());x.useEffect(()=>{s(r.language)},[r.language]);const c=d=>{localStorage.setItem("language",d),r.changeLanguage(d).then(()=>{s(r.language),setTimeout(()=>{window.dispatchEvent(new Event("languagechange"))},100)}).catch(()=>{})};return e==="compact"?n.jsx("div",{className:`relative ${t}`,children:n.jsxs(Ot,{value:o,onValueChange:c,children:[n.jsx(et,{className:"h-10 w-auto px-3 border-0 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-0 focus:ring-offset-0",children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-lg leading-none",children:l?.flag}),n.jsx("span",{className:"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300",children:l?.name})]})}),n.jsx(tt,{children:i.map(d=>n.jsx(rt,{value:d.code,className:"cursor-pointer",children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-lg leading-none",children:d.flag}),n.jsx("span",{className:"text-sm",children:d.name})]})},d.code))})]})}):n.jsxs("div",{className:`space-y-2 ${t}`,children:[n.jsxs("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2",children:[n.jsx(A.LanguageIcon,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"}),n.jsx("span",{children:a("language","Language")})]}),n.jsxs(Ot,{value:o,onValueChange:c,children:[n.jsx(et,{children:n.jsx(Dr,{placeholder:a("selectLanguage","Select language")})}),n.jsx(tt,{children:i.map(d=>n.jsx(rt,{value:d.code,className:"cursor-pointer",children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-lg leading-none",children:d.flag}),n.jsx("span",{children:d.name})]})},d.code))})]}),n.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:a("selectPreferredLanguage","Select your preferred language")})]})},Yd=({items:e,type:t="ordered",variant:r="default",className:a,itemClassName:o})=>{const s=()=>{const d="space-y-2",g={ordered:t==="ordered"?"list-decimal":"",unordered:t==="unordered"?"list-disc":""},m={default:"list-inside",enhanced:"list-inside space-y-3",minimal:"list-none space-y-1"};return y(d,g[t],m[r])},i=d=>{const g="text-gray-600 dark:text-gray-400";return r==="enhanced"?y(g,"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700",d===e.length-1&&"border-l-transparent"):r==="minimal"?y(g,"flex items-start"):g},l=d=>r==="enhanced"&&t==="ordered"?n.jsx("div",{className:"absolute -left-4 -top-1 w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-medium",children:d+1}):null,c=(d,g)=>{const m=typeof d=="object",b=m?d.content:d,f=m?d.subItems:void 0;return n.jsxs("li",{className:y(i(g),o),children:[l(g),r==="minimal"&&t==="ordered"&&n.jsx("span",{className:"inline-block w-6 h-6 bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 rounded-full text-sm font-medium text-center leading-6 mr-3 flex-shrink-0",children:g+1}),r==="minimal"&&t==="unordered"&&n.jsx("span",{className:"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0"}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{children:b}),f&&f.length>0&&n.jsx("ul",{className:"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500",children:f.map((p,h)=>n.jsx("li",{children:p},h))})]})]},g)};return n.jsx("ul",{className:y(s(),a),children:e.map(c)})};class Qd extends x.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("ErrorBoundary caught an error:",t,r),this.props.onError?.(t,r)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:n.jsxs("div",{style:{padding:"20px",border:"1px solid red",margin:"10px"},children:[n.jsx("h2",{children:"Something went wrong"}),n.jsxs("p",{children:["Error: ",this.state.error?.message||"Unknown error"]}),n.jsx("button",{onClick:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}}class Xd extends x.Component{constructor(t){super(t),this.retryTimer=null,this.sendErrorToMonitoring=(r,a)=>{try{typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(r,{contexts:{react:{componentStack:a.componentStack}},tags:{errorBoundary:!0,componentName:this.props.componentName||"unknown",lazyLoading:!0}}),typeof window<"u"&&window.gtag&&window.gtag?.("event","exception",{description:r.message,fatal:!1,custom_map:{component:this.props.componentName||"unknown"}})}catch{}},this.handleRetry=()=>{const{maxRetries:r=3,retryDelay:a=1e3}=this.props,{retryCount:o}=this.state;if(o>=r)return;this.setState({isRetrying:!0}),this.retryTimer&&clearTimeout(this.retryTimer);const s=a*Math.pow(2,o);this.retryTimer=setTimeout(()=>{this.setState({hasError:!1,error:null,errorInfo:null,retryCount:o+1,isRetrying:!1})},s)},this.handleReload=()=>{window.location.reload()},this.state={hasError:!1,error:null,errorInfo:null,retryCount:0,isRetrying:!1,lastErrorTime:0}}static getDerivedStateFromError(t){return{hasError:!0,error:t,lastErrorTime:Date.now()}}componentDidCatch(t,r){const{onError:a,componentName:o}=this.props;this.setState({error:t,errorInfo:r}),console.error(`LazyErrorBoundary caught an error in ${o||"Unknown Component"}:`,t,r),a?.(t,r),this.sendErrorToMonitoring(t,r)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{children:t,fallback:r,componentName:a,showRetryButton:o=!0,maxRetries:s=3}=this.props,{hasError:i,error:l,isRetrying:c,retryCount:d}=this.state;return i&&l?r||n.jsx("div",{className:"lazy-error-boundary error-boundary-container",children:n.jsxs("div",{className:"error-content",children:[n.jsx("div",{className:"error-icon",children:"⚠️"}),n.jsxs("h3",{className:"error-title",children:["Something went wrong loading ",a||"this component"]}),n.jsxs("div",{className:"error-details",children:[n.jsx("p",{className:"error-message",children:l.message}),process.env.NODE_ENV==="development"&&n.jsxs("details",{className:"error-stack",children:[n.jsx("summary",{children:"Error Details (Development)"}),n.jsx("pre",{children:l.stack})]})]}),n.jsxs("div",{className:"error-actions",children:[o&&d<s&&n.jsx("button",{onClick:this.handleRetry,disabled:c,className:"retry-button",children:c?"Retrying...":`Retry (${d}/${s})`}),d>=s&&n.jsx("button",{onClick:this.handleReload,className:"reload-button",children:"Reload Page"})]}),n.jsxs("div",{className:"error-help",children:[n.jsx("p",{children:"This might be a temporary issue. Try refreshing the page."}),navigator.onLine===!1&&n.jsx("p",{className:"offline-notice",children:"You appear to be offline. Check your connection and try again."})]})]})}):t}}const Zd=({children:e})=>n.jsx(n.Fragment,{children:e}),Jd=({children:e})=>n.jsx(n.Fragment,{children:e}),Rd=(e,t,r)=>{const a=x.memo(e,t);return r&&(a.displayName=`Memo(${r})`),process.env.NODE_ENV==="development"?o=>(x.useMemo(()=>{let i=0;return()=>++i},[])(),n.jsx(a,{...o})):a},e0=(e,t)=>x.memo(e,(r,a)=>t.every(o=>r[o]===a[o])),t0=x.memo(({children:e,compute:t,deps:r})=>{const a=x.useRef(r),o=x.useRef(t),s=x.useRef(void 0),i=x.useMemo(()=>{const l=r.length!==a.current.length||r.some((d,g)=>d!==a.current[g]),c=t!==o.current;if(l||c||s.current===void 0){let d;return process.env.NODE_ENV==="development"?(performance.now(),d=t(),performance.now()):d=t(),a.current=r,o.current=t,s.current=d,d}return s.current},[t,r]);return n.jsx(n.Fragment,{children:e(i)})}),r0=x.memo(({item:e,index:t,style:r,renderItem:a})=>n.jsx("div",{style:r,children:a(e,t)}),(e,t)=>e.index===t.index&&e.item===t.item&&e.style.height===t.style.height&&e.style.top===t.style.top),a0=x.memo(({condition:e,children:t,fallback:r=null})=>e?n.jsx(n.Fragment,{children:t}):n.jsx(n.Fragment,{children:r})),n0=({children:e,threshold:t=.1,rootMargin:r="50px",fallback:a=null})=>{const[o,s]=x.useState(!1),i=x.useRef(null);return x.useEffect(()=>{const l=new IntersectionObserver(([c])=>{c.isIntersecting&&(s(!0),l.disconnect())},{threshold:t,rootMargin:r});return i.current&&l.observe(i.current),()=>l.disconnect()},[t,r]),n.jsx("div",{ref:i,children:o?e:a})},o0=({children:e,maxRenderTime:t=16,onSlowRender:r})=>{const a=x.useRef(0);return x.useLayoutEffect(()=>{a.current=performance.now()}),x.useEffect(()=>{const o=performance.now()-a.current;o>t&&r?.(o)}),n.jsx(n.Fragment,{children:e})},s0=({children:e,batchSize:t=5,delay:r=0})=>{const[a,o]=x.useState(t);return x.useEffect(()=>{if(a<e.length){const s=setTimeout(()=>{o(i=>Math.min(i+t,e.length))},r);return()=>clearTimeout(s)}},[a,e.length,t,r]),n.jsx(n.Fragment,{children:e.slice(0,a)})},i0=({src:e,alt:t,placeholder:r,lowQualitySrc:a,aspectRatio:o="16/9",eager:s=!1,className:i="",...l})=>{const[c,d]=x.useState(!1),[g,m]=x.useState(s),[b,f]=x.useState(!1),p=x.useRef(null),h=x.useRef(null);x.useEffect(()=>{if(s){m(!0);return}return h.current=new IntersectionObserver(k=>{k.forEach(N=>{N.isIntersecting&&(m(!0),h.current&&p.current&&h.current.unobserve(p.current))})},{rootMargin:"50px",threshold:.01}),p.current&&h.current.observe(p.current),()=>{h.current&&h.current.disconnect()}},[s]);const w=()=>{d(!0)},C=()=>{f(!0)};return n.jsxs("div",{className:`relative overflow-hidden ${i}`,style:{aspectRatio:o},children:[a&&!c&&n.jsx("img",{src:a,alt:"",className:"absolute inset-0 w-full h-full object-cover blur-sm","aria-hidden":"true"}),!a&&!c&&n.jsx("div",{className:"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse","aria-hidden":"true"}),g&&!b&&n.jsx("img",{ref:p,src:e,alt:t,onLoad:w,onError:C,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${c?"opacity-100":"opacity-0"}`,loading:s?"eager":"lazy",...l}),b&&n.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800",children:n.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[n.jsx("svg",{className:"mx-auto h-12 w-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),n.jsx("p",{className:"text-sm",children:"Failed to load image"})]})})]})},l0=({title:e,description:t,primaryButton:r,secondaryButton:a,gradient:o={from:"blue-600",to:"purple-600"},textColor:s="light",className:i="",size:l="lg"})=>{const d=(()=>{const h=o.via?`${o.from}-${o.via}-${o.to}`:`${o.from}-${o.to}`;return{"blue-600-purple-600":"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700","orange-900-red-900":"bg-gradient-to-r from-orange-600 to-red-600 dark:from-orange-700 dark:to-red-700","green-600-blue-600":"bg-gradient-to-r from-green-600 to-blue-600 dark:from-green-700 dark:to-blue-700","purple-600-pink-600":"bg-gradient-to-r from-purple-600 to-pink-600 dark:from-purple-700 dark:to-pink-700"}[h]||"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"})(),g=s==="light"?"text-white":"text-gray-900 dark:text-gray-100",m={sm:"py-12",md:"py-16",lg:"py-20"},b={sm:"text-2xl md:text-3xl",md:"text-3xl md:text-4xl",lg:"text-4xl md:text-5xl"},f={sm:"text-base md:text-lg",md:"text-lg md:text-xl",lg:"text-xl md:text-2xl"},p=(h,w=!1)=>{const C=()=>h.variant==="primary"||w?"gradient":(h.variant==="secondary","outline"),k=n.jsx(de,{variant:C(),size:"lg",className:w?"":"bg-white/10 hover:bg-white/20 backdrop-blur-sm border-white/30",children:h.label});return h.external?n.jsx("a",{href:h.href,target:"_blank",rel:"noopener noreferrer",children:k}):n.jsx(Ze.Link,{to:h.href,children:k})};return n.jsxs("section",{className:`${d} ${m[l]} relative overflow-hidden ${i}`,children:[n.jsx("div",{className:"absolute inset-0 bg-black/20"}),n.jsxs("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 w-full h-full",children:[n.jsx("div",{className:"absolute top-10 left-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"}),n.jsx("div",{className:"absolute bottom-10 right-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"})]}),n.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[n.jsx("h2",{className:`${b[l]} font-bold ${g} mb-6`,children:e}),n.jsx("p",{className:`${f[l]} ${g}/90 mb-8 max-w-2xl mx-auto`,children:t}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[p(r,!0),a&&p(a,!1)]})]})]})},c0=({children:e,backgroundClassName:t="",contentClassName:r=""})=>n.jsx("div",{className:t,children:n.jsx("div",{className:r,children:e})}),d0=({title:e,description:t})=>n.jsxs("div",{className:"mb-8",children:[n.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:e}),t&&n.jsx("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:t})]}),u0=({isSelected:e,onClick:t,icon:r,label:a,description:o,className:s=""})=>n.jsxs("div",{onClick:t,className:`relative flex items-start p-4 cursor-pointer transition-all border-b border-gray-200 dark:border-gray-700 last:border-b-0 group ${s}`,children:[e&&n.jsx("div",{className:"absolute inset-1 bg-blue-500/10 dark:bg-blue-400/10 rounded-lg pointer-events-none"}),n.jsxs("div",{className:"relative z-10 flex items-start w-full",children:[r&&n.jsx(r,{className:`h-5 w-5 mt-0.5 mr-3 flex-shrink-0 transition-colors ${e?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:`font-medium transition-colors ${e?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-gray-100 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`,children:a}),o&&n.jsx("div",{className:`text-xs mt-0.5 transition-colors ${e?"text-blue-500 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}`,children:o})]})]})]}),g0=({masterTitle:e,masterSubtitle:t,backButtonText:r,masterContent:a,detailContent:o,detailTitle:s,mobileView:i="navigation",onBackToNavigation:l,masterClassName:c="",detailClassName:d="",detailTitleClassName:g="",masterWidth:m=320,stickyMaster:b=!0,stickyTopOffset:f=96,desktopGap:p=32,showMasterBackground:h=!0,enableAnimations:w=!0,animationDuration:C=300,animationRef:k})=>{const N=`gap-${Math.round(p/4)}`||"gap-8",P=V=>V?V.split("-")[0].trim():"Back",E=r?P(r):e?P(e):"Back",[L,I]=x.useState(!1),[z,D]=x.useState("auto"),O=x.useRef(null),B=x.useRef(null);x.useEffect(()=>(k&&(k.current={triggerTransition:V=>{if(!w){V();return}if(O.current){const F=O.current.scrollHeight;D(F)}I(!0),B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{V(),setTimeout(()=>{if(O.current){const F=O.current.scrollHeight;D(F),setTimeout(()=>{D("auto"),I(!1)},C)}},50)},C/2)}}),()=>{B.current&&clearTimeout(B.current)}),[w,C,k]);const U=w?{height:z==="auto"?"auto":`${z}px`,transition:`height ${C}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},W=w?`${L?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",j=w?{transition:`opacity ${C}ms ease-in-out, transform ${C}ms ease-in-out`}:{};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`md:hidden ${i==="navigation"?"block":"hidden"} flex-1`,children:n.jsxs("div",{className:h?"bg-white dark:bg-gray-800 p-6":"p-6",children:[e&&n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:e}),t&&n.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:t})]}),n.jsx("div",{className:c,children:a})]})}),n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[n.jsxs("div",{className:`md:hidden ${i==="content"?"block":"hidden"}`,children:[i==="content"&&l&&n.jsxs("button",{onClick:l,className:"mb-4 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:["← ",E]}),n.jsx("div",{ref:O,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${d}`,style:U,children:n.jsxs("div",{className:W,style:j,children:[s&&n.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),o]})})]}),n.jsxs("div",{className:`hidden md:flex min-h-full ${N}`,style:{width:"100%"},children:[n.jsx("aside",{className:"flex-shrink-0",style:{width:`${m}px`,minWidth:`${m}px`},children:n.jsxs("div",{className:b?"sticky":"",style:b?{top:`${f}px`}:void 0,children:[e&&n.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:e}),t&&n.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:t}),n.jsx("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${b?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${c}`,children:a})]})}),n.jsx("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${m+p}px)`},children:n.jsx("div",{ref:O,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${d}`,style:U,children:n.jsxs("div",{className:W,style:j,children:[s&&n.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),o]})})})]})]})]})},m0=({children:e,appName:t,appUrl:r,apiUrl:a})=>(x.useEffect(()=>{const o=()=>{[].forEach(p=>{const h=document.createElement("link");h.rel="preload",h.href=p.href,h.as=p.as,p.type&&(h.type=p.type),p.crossorigin&&(h.crossOrigin=""),document.head.appendChild(h)})},s=()=>{document.querySelectorAll('img[data-priority="high"]').forEach(h=>{h.fetchPriority="high"});const p=document.querySelector("[data-hero]");if(p){const h=p.getAttribute("data-bg-image");if(h){const w=document.createElement("link");w.rel="preload",w.href=h,w.as="image",document.head.appendChild(w)}}},i=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(h=>{const w=h;w.naturalWidth&&w.naturalHeight&&(w.width=w.naturalWidth,w.height=w.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(h=>{h.getAttribute("style")?.includes("min-height")||(h.style.minHeight="200px")})},l=()=>{const f=()=>{document.querySelectorAll("script[data-defer]").forEach(w=>{w.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{f()}):setTimeout(f,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(w=>{document.addEventListener(w,()=>{},{passive:!0})})})()},c=()=>{},d=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},...a?[{rel:"dns-prefetch",href:`//${a.replace(/^https?:\/\//,"")}`}]:[],{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},...a?[{rel:"preconnect",href:a}]:[]].forEach(p=>{const h=document.createElement("link");h.rel=p.rel,h.href=p.href,p.crossorigin&&(h.crossOrigin=""),document.head.appendChild(h)})},g=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(p=>{p.loading="lazy"}),"IntersectionObserver"in window){const p=new IntersectionObserver(w=>{w.forEach(C=>{if(C.isIntersecting){const k=C.target;k.dataset.src&&(k.src=k.dataset.src,k.removeAttribute("data-src")),p.unobserve(k)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(w=>p.observe(w))}},m=()=>{[{name:"ai-content-type",content:"web3-email-platform"},{name:"ai-primary-function",content:"wallet-based-email"},{name:"ai-supported-chains",content:"ethereum,solana,polygon,arbitrum,optimism"},{name:"ai-complexity-level",content:"beginner-to-advanced"},{name:"ai-target-users",content:"web3-users,crypto-enthusiasts,developers"},{name:"machine-readable",content:"true"},{name:"structured-data",content:"json-ld"},{name:"content-category",content:"technology,blockchain,communication"},{name:"interaction-model",content:"wallet-authentication"}].forEach(({name:w,content:C})=>{if(!document.querySelector(`meta[name="${w}"]`)){const k=document.createElement("meta");k.name=w,k.content=C,document.head.appendChild(k)}});const p={"@context":"https://schema.org","@type":"WebApplication",name:t,description:"Web3 email platform using blockchain wallet authentication",url:r,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},featureList:["Wallet-based authentication","ENS domain email support","SNS domain email support","Multi-chain compatibility","Smart contract integration","Web2/Web3 bridge"],audience:{"@type":"Audience",audienceType:"Web3 Users"}},h=document.createElement("script");h.type="application/ld+json",h.textContent=JSON.stringify(p),document.head.appendChild(h)},b=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(p=>{const h=p.cloneNode(!0);h.rel="preload",h.as="style",h.onload=()=>{h.onload=null,h.rel="stylesheet"},document.head.appendChild(h),p.remove()})};return o(),s(),i(),l(),d(),g(),m(),b(),setTimeout(c,2e3),()=>{}},[a,t,r]),n.jsx(n.Fragment,{children:e})),f0=()=>(x.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const e=()=>{if("IntersectionObserver"in window){const l=new IntersectionObserver(c=>{c.forEach(d=>{if(d.isIntersecting){const g=d.target;g.dataset.src&&(g.src=g.dataset.src,g.removeAttribute("data-src"),l.unobserve(g))}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(c=>{l.observe(c)})}const o=()=>{["/connect","/mail","/settings"].forEach(c=>{const d=document.createElement("link");d.rel="prefetch",d.href=c,document.head.appendChild(d)})},s=()=>{if(!document.querySelector("script[data-wallet-detection]")){const l=document.createElement("script");l.dataset.walletDetection="true",l.innerHTML='(function() { window.walletPreload = { hasMetaMask: typeof window.ethereum !== "undefined", hasPhantom: typeof window.solana !== "undefined", hasWalletConnect: true }; })();',document.head.appendChild(l)}},i=()=>{document.querySelectorAll("img[data-hero]").forEach(l=>{const c=l;c.loading="eager","fetchPriority"in c&&(c.fetchPriority="high")}),document.querySelectorAll('img[data-priority="low"]').forEach(l=>{const c=l;c.loading="lazy","fetchPriority"in c&&(c.fetchPriority="low")})};requestIdleCallback(()=>{o(),s(),i()},{timeout:2e3})},t=()=>{if("PerformanceObserver"in window){const o=new PerformanceObserver(i=>{const l=i.getEntries(),c=l[l.length-1];c&&c.startTime>2500&&(document.documentElement.style.setProperty("--animation-duration","0s"),localStorage.setItem("reduce-image-quality","true"))});try{o.observe({entryTypes:["largest-contentful-paint"]})}catch{}const s=new PerformanceObserver(i=>{let l=0;for(const c of i.getEntries())c.hadRecentInput||(l+=c.value);l>.1&&document.querySelectorAll("img:not([width]):not([height])").forEach(c=>{const d=c;d.style.aspectRatio="16/9"})});try{s.observe({entryTypes:["layout-shift"]})}catch{}}},r=()=>{if("connection"in navigator&&typeof document<"u"&&document.documentElement){const o=navigator.connection;if(o){const s=o.effectiveType;s==="slow-2g"||s==="2g"?(document.documentElement.classList.add("slow-connection"),document.querySelectorAll('link[rel="prefetch"]').forEach(i=>{i.getAttribute("data-critical")||i.remove()}),localStorage.setItem("use-low-quality-images","true")):s==="3g"?document.documentElement.classList.add("moderate-connection"):document.documentElement.classList.add("fast-connection")}}};return(()=>{e(),t(),r()})(),()=>{if("PerformanceObserver"in window)try{PerformanceObserver.supportedEntryTypes.forEach(()=>{})}catch{}}},[]),null),p0=({children:e})=>n.jsx(n.Fragment,{children:e}),h0={user:{duration:300*1e3,maxSize:100,staleWhileRevalidate:!0},mailboxes:{duration:120*1e3,maxSize:50,staleWhileRevalidate:!0},addresses:{duration:600*1e3,maxSize:50,staleWhileRevalidate:!0},messages:{duration:30*1e3,maxSize:200,staleWhileRevalidate:!0},messageDetails:{duration:120*1e3,maxSize:100,staleWhileRevalidate:!1},messageCount:{duration:10*1e3,maxSize:20,staleWhileRevalidate:!0}};class b0{constructor(){this.cache=new Map}set(t,r,a){if(this.cache.size>=a.maxSize){const o=this.cache.keys().next().value;o&&this.cache.delete(o)}this.cache.set(t,{data:r,timestamp:Date.now(),isStale:!1})}get(t,r){const a=this.cache.get(t);if(!a)return null;const s=Date.now()-a.timestamp>r.duration;return s&&!r.staleWhileRevalidate?(this.cache.delete(t),null):{data:a.data,isStale:s}}invalidate(t){for(const r of this.cache.keys())r.includes(t)&&this.cache.delete(r)}clear(){this.cache.clear()}getStats(){return{size:this.cache.size,keys:Array.from(this.cache.keys()),memory:this.estimateMemoryUsage()}}estimateMemoryUsage(){return Array.from(this.cache.values()).reduce((t,r)=>t+JSON.stringify(r).length*2,0)}}const $e=new b0,we=new Map,Ya=async(e,t,r="messages")=>{const a=h0[r],o=$e.get(e,a);if(o&&!o.isStale)return o.data;const s=we.get(e);if(s)return s;if(o&&o.isStale&&a.staleWhileRevalidate){const l=t().then(c=>($e.set(e,c,a),we.delete(e),c)).catch(c=>{throw we.delete(e),c});return we.set(e,l),o.data}const i=t().then(l=>($e.set(e,l,a),we.delete(e),l)).catch(l=>{throw we.delete(e),l});return we.set(e,i),i};class y0{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(t,r){return new Promise((a,o)=>{this.queue.push({key:t,fetcher:r,resolve:a,reject:o}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.processBatch()},this.batchDelay)})}async processBatch(){const t=[...this.queue];this.queue.length=0,this.timer=null;const r=this.groupRequests(t);for(const a of r)await Promise.allSettled(a.map(async o=>{try{const s=await o.fetcher();o.resolve(s)}catch(s){o.reject(s)}}))}groupRequests(t){const r=[];for(let o=0;o<t.length;o+=5)r.push(t.slice(o,o+5));return r}}const x0=new y0;class v0{constructor(t,r={}){this.requestInterceptors=[],this.responseInterceptors=[],this.baseURL=t,this.defaultHeaders=r}addRequestInterceptor(t){this.requestInterceptors.push(t)}addResponseInterceptor(t){this.responseInterceptors.push(t)}async request(t,r={},a,o="messages"){const s=`${this.baseURL}${t}`,i=a||`${r.method||"GET"}:${s}`,l=async()=>{let c={...r,headers:{...this.defaultHeaders,...r.headers}};for(const g of this.requestInterceptors)c=g(c);let d=await fetch(s,c);for(const g of this.responseInterceptors)d=await g(d);if(!d.ok)throw new Error(`API Error: ${d.status} ${d.statusText}`);return d.json()};return r.method==="GET"&&this.shouldBatch(t)?x0.add(i,l):Ya(i,l,o)}shouldBatch(t){return t.includes("/messages/")&&!t.includes("/messages?")}async get(t,r){return this.request(t,{method:"GET"},void 0,r)}async post(t,r){return this.request(t,{method:"POST",body:JSON.stringify(r)})}async put(t,r){return this.request(t,{method:"PUT",body:JSON.stringify(r)})}async delete(t){return this.request(t,{method:"DELETE"})}}const w0=async(e,t=3,r=1e3)=>{let a;for(let o=0;o<=t;o++)try{return await e()}catch(s){if(a=s,o===t)throw a;const i=r*Math.pow(2,o)+Math.random()*1e3;await new Promise(l=>setTimeout(l,i))}throw a};class k0{constructor(){this.abortController=new AbortController}async request(t,r={}){const a=await fetch(t,{...r,signal:this.abortController.signal});if(!a.ok)throw new Error(`HTTP ${a.status}: ${a.statusText}`);return a.json()}cancel(){this.abortController.abort()}}const C0={invalidate:e=>$e.invalidate(e),clear:()=>$e.clear(),getStats:()=>$e.getStats(),warmUp:async e=>{await Promise.allSettled(e.map(t=>t()))},prefetch:async e=>{"requestIdleCallback"in window?window.requestIdleCallback(async()=>{await Promise.allSettled(e.map(t=>t()))}):setTimeout(async()=>{await Promise.allSettled(e.map(t=>t()))},100)}};function Qa(){if(typeof window>"u")return!1;const e=window.navigator.userAgent.toLowerCase();return["metamask","trustwallet","coinbase","rainbow","phantom","solflare","exodus","ledger","binance","okx"].some(r=>e.includes(r))}function Xa(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function Za(){if(typeof window>"u")return!1;const e=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(e)}function Ja(){return Xa()?"localhost":Qa()?"wallet-browser":Za()?"network":"production"}function S0(){const e=Ja();return e==="localhost"||e==="wallet-browser"}function N0(e){}function Ra(){return typeof window<"u"}function E0(){return typeof window<"u"}function A0(e,t){if(Ra())e();else return t}const or=e=>({"default-src":["'self'"],"script-src":["'self'","'unsafe-inline'","'unsafe-eval'","https://fonts.googleapis.com","https://www.googletagmanager.com","https://www.google-analytics.com"],"style-src":["'self'","'unsafe-inline'","https://fonts.googleapis.com","https://fonts.gstatic.com"],"font-src":["'self'","https://fonts.gstatic.com","data:"],"img-src":["'self'","data:","https:","blob:"],"connect-src":["'self'",...e?.apiUrls||[],...e?.appUrls||[],"https://*.walletconnect.com","https://*.walletconnect.org","https://registry.walletconnect.com","https://relay.walletconnect.com","wss://*.walletconnect.com","wss://*.walletconnect.org","https://keys.coinbase.com","https://api.coinbase.com","https://www.walletlink.org","https://mainnet.infura.io","https://polygon-rpc.com","https://rpc.ankr.com","https://cloudflare-eth.com","https://eth-mainnet.alchemyapi.io","https://api.phantom.app","https://solana-api.projectserum.com","https://api.mainnet-beta.solana.com","https://api.devnet.solana.com","wss://api.phantom.app","wss://api.devnet.solana.com","wss://api.mainnet-beta.solana.com","https://bridge.arbitrum.io","https://polygon-mainnet.infura.io","https://optimism-mainnet.infura.io"],"frame-src":["'self'","https://verify.walletconnect.com","https://verify.walletconnect.org"],"worker-src":["'self'","blob:"],"child-src":["'self'","https://verify.walletconnect.com"],"object-src":["'none'"],"base-uri":["'self'"],"form-action":["'self'"]}),P0=or(),en=e=>{const t=or(e);return Object.entries(t).map(([r,a])=>`${r} ${a.join(" ")}`).join("; ")},tn=e=>({"X-Frame-Options":"DENY","X-Content-Type-Options":"nosniff","X-XSS-Protection":"1; mode=block","Referrer-Policy":"strict-origin-when-cross-origin","Permissions-Policy":"camera=(), microphone=(), geolocation=(), interest-cohort=()","Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","Cross-Origin-Embedder-Policy":"credentialless","Cross-Origin-Opener-Policy":"same-origin-allow-popups","Cross-Origin-Resource-Policy":"cross-origin","Content-Security-Policy":en(e)}),T0=tn(),I0={fonts:"public, max-age=31536000, immutable",images:"public, max-age=31536000, immutable",js:"public, max-age=31536000, immutable",css:"public, max-age=31536000, immutable",serviceWorker:"public, max-age=0, must-revalidate",manifest:"public, max-age=86400",api:"no-cache, no-store, must-revalidate"},$0=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",()=>{})},L0={walletConnections:"Always verify wallet signatures and never trust client-side data",rpcEndpoints:"Use reputable RPC providers and consider rate limiting",contractInteractions:"Validate all smart contract interactions on the backend",userInput:"Sanitize all user inputs, especially wallet addresses and transaction data",privateKeys:"Never log, store, or transmit private keys - they should remain in wallets only",phishing:"Implement strict CSP to prevent injection of malicious scripts that could steal wallet access"},le=new Map,Fe=new Map,vt=new Set;let _e="medium",sr=!1;function M0(){if("connection"in navigator){const r=navigator.connection;r&&(_e=r.effectiveType==="4g"?"fast":r.effectiveType==="3g"?"medium":"slow")}const e=navigator.deviceMemory,t=navigator.hardwareConcurrency;sr=e&&e<4||t&&t<4}M0();function O0(e,t,r={}){const{retries:a=3,timeout:o=1e4,fallback:s,preloadCondition:i,cacheStrategy:l="memory",priority:c="medium",onLoad:d,onError:g}=r;if(le.has(t))return le.get(t).component;const m=x.lazy(async()=>{const f=performance.now();if(Fe.has(t))return Fe.get(t).then(h=>({default:h}));const p=z0(e,a,o);Fe.set(t,p.then(h=>h.default));try{const h=await p,w=performance.now()-f;if(l!=="none"){const C={component:h.default,timestamp:Date.now(),loadTime:w};if(le.set(t,C),l==="session")try{sessionStorage.setItem(`lazy_${t}`,JSON.stringify({timestamp:C.timestamp,loadTime:w}))}catch{}}return Fe.delete(t),d?.(h.default),h}catch(h){throw Fe.delete(t),g?.(h),h}}),b=f=>{const[p,h]=x.useState(!0);x.useEffect(()=>{if(i&&!le.has(t)&&i()&&!vt.has(t)){vt.add(t);const k=D0(c,_e);setTimeout(()=>{e().catch(()=>{})},k)}},[]);const w=s||n.jsxs("div",{className:"flex items-center justify-center p-4",children:[n.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),n.jsxs("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",t.replace(/([A-Z])/g," $1").trim(),"..."]})]});return!p&&sr&&_e==="slow"?n.jsx("div",{className:"lazy-placeholder",children:n.jsxs("button",{onClick:()=>h(!0),className:"load-component-btn",children:["Load ",t]})}):n.jsx(x.Suspense,{fallback:w,children:n.jsx(m,{...f})})};return b.displayName=`AdvancedLazy(${t})`,b}async function z0(e,t,r){let a;for(let o=0;o<t;o++)try{const s=new Promise((l,c)=>{setTimeout(()=>c(new Error("Load timeout")),r)});return await Promise.race([e(),s])}catch(s){if(a=s,o<t-1){const i=Math.pow(2,o)*1e3,l=Math.random()*1e3;await new Promise(c=>setTimeout(c,i+l))}}throw a}function D0(e,t){const r={critical:0,high:500,medium:2e3,low:5e3},a={fast:.5,medium:1,slow:2},o=r[e]||2e3,s=a[t]||1;return o*s}const Ge=class Ge{static registerRoute(t,r){this.routeMap.set(t,r),this.routeUsageStats.set(t,0)}static setCurrentRoute(t){this.currentRoute=t;const r=this.routeUsageStats.get(t)||0;this.routeUsageStats.set(t,r+1),this.preloadLikelyRoutes(t)}static preloadLikelyRoutes(t){this.getRouteTransitionProbability(t).forEach(({route:a,probability:o})=>{o>.3&&!le.has(a)&&setTimeout(()=>{this.routeMap.get(a)},_e==="fast"?1e3:3e3)})}static getRouteTransitionProbability(t){const r=[];switch(t){case"/":r.push({route:"/connect",probability:.7},{route:"/about",probability:.2},{route:"/document",probability:.1});break;case"/connect":r.push({route:"/mail",probability:.8},{route:"/settings",probability:.1});break;case"/mail":r.push({route:"/compose",probability:.4},{route:"/settings",probability:.2});break;default:r.push({route:"/",probability:.1})}return r}static getStats(){return{routeCount:this.routeMap.size,cacheSize:le.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};Ge.routeMap=new Map,Ge.routeUsageStats=new Map,Ge.currentRoute="";let ir=Ge;const B0=({src:e,alt:t,className:r,placeholder:a,priority:o="medium"})=>{const[s,i]=x.useState(!1),[l,c]=x.useState(!1),d=x.useRef(null);x.useEffect(()=>{if(!d.current)return;if(o==="high"){c(!0);return}const m=new IntersectionObserver(([b])=>{b.isIntersecting&&(c(!0),m.unobserve(b.target))},{rootMargin:o==="low"?"100px":"200px",threshold:.1});return m.observe(d.current),()=>m.disconnect()},[o]);const g=()=>{i(!0)};return n.jsxs("div",{className:`lazy-image-container ${r}`,children:[n.jsx("img",{ref:d,src:l?e:a||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:t,className:`transition-opacity duration-300 ${s?"opacity-100":"opacity-0"}`,onLoad:g,loading:o==="high"?"eager":"lazy",fetchPriority:o==="high"?"high":"low"}),!s&&l&&n.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"})]})};function W0(){le.clear(),vt.clear()}function j0(){return{cachedComponents:le.size,preloadQueue:vt.size,networkSpeed:_e,isLowEndDevice:sr,cacheEntries:Array.from(le.entries()).map(([e,t])=>({name:e,loadTime:t.loadTime,age:Date.now()-t.timestamp}))}}const F0=({message:e})=>n.jsxs("div",{className:"flex items-center justify-center p-4",children:[n.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),n.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),_0=e=>{if(typeof e=="function"||typeof e=="object")return e;switch(e){case"minimal":return()=>n.jsx("div",{className:"flex justify-center items-center p-4",children:"Loading..."});case"skeleton":return()=>n.jsxs("div",{className:"animate-pulse",children:[n.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]});case"default":default:return()=>n.jsx(F0,{message:"Loading component..."})}},rn=(e,t="default",r=3)=>{const a=x.lazy(async()=>{let s=null;for(let i=0;i<r;i++)try{return await e()}catch(l){s=l,i<r-1&&await new Promise(c=>setTimeout(c,Math.pow(2,i)*1e3))}throw s}),o=_0(t);return s=>n.jsx(x.Suspense,{fallback:n.jsx(o,{}),children:n.jsx(a,{...s})})},H0=async e=>{try{await e()}catch{}},U0=e=>{const t={};return Object.entries(e).forEach(([r,a])=>{t[r]=rn(a,"skeleton")}),t},V0=e=>e,an={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},Ke=class Ke{static add(t,r){this.preloadedComponents.has(t)||(this.preloadQueue.push({name:t,loader:r}),this.processQueue())}static async processQueue(){this.isPreloading||this.preloadQueue.length===0||(this.isPreloading=!0,"requestIdleCallback"in window?window.requestIdleCallback(async()=>{const t=this.preloadQueue.shift();if(t)try{await t.loader(),this.preloadedComponents.add(t.name)}catch{}this.isPreloading=!1,this.processQueue()}):setTimeout(async()=>{const t=this.preloadQueue.shift();if(t)try{await t.loader(),this.preloadedComponents.add(t.name)}catch{}this.isPreloading=!1,this.processQueue()},100))}static isPreloaded(t){return this.preloadedComponents.has(t)}static clear(){this.preloadedComponents.clear(),this.preloadQueue=[],this.isPreloading=!1}};Ke.preloadedComponents=new Set,Ke.preloadQueue=[],Ke.isPreloading=!1;let lr=Ke;const q0=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{an.secondary.forEach(e=>{})})},nn=({message:e})=>n.jsxs("div",{className:"flex items-center justify-center p-4",children:[n.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),n.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),He=new Map;function G0(e,t){const{condition:r,fallback:a,retries:o=3,timeout:s=1e4,priority:i="medium",cacheKey:l=`conditional-${Math.random()}`}=t,c=d=>{const[g,m]=x.useState(!1),[b,f]=x.useState(null);return x.useEffect(()=>{const w=setTimeout(async()=>{const C=He.get(l);if(C&&C.isValid&&Date.now()-C.lastCheck<3e5)try{if(await C.condition()){f(()=>C.component),m(!0);return}}catch{}try{if(await r()){const N=await Q0(e,o,s);He.set(l,{component:N.default,condition:r,lastCheck:Date.now(),isValid:!0}),f(()=>N.default),m(!0)}}catch{}},i==="high"?0:i==="medium"?100:500);return()=>clearTimeout(w)},[]),g?b?n.jsx(x.Suspense,{fallback:a||n.jsx(nn,{message:"Loading component..."}),children:n.jsx(b,{...d})}):null:a||n.jsx(nn,{message:"Checking conditions..."})};return c.displayName=`ConditionalLazy(${l})`,c}const K0={},Y0={};async function Q0(e,t,r){let a;for(let o=0;o<t;o++)try{const s=new Promise((i,l)=>{setTimeout(()=>l(new Error("Import timeout")),r)});return await Promise.race([e(),s])}catch(s){if(a=s,o<t-1){const i=Math.pow(2,o)*1e3;await new Promise(l=>setTimeout(l,i))}}throw a}function X0(){He.clear()}function Z0(){return{cachedComponents:He.size,cacheEntries:Array.from(He.entries()).map(([e,t])=>({key:e,lastCheck:t.lastCheck,isValid:t.isValid,age:Date.now()-t.lastCheck}))}}const on=[{name:"react-router",path:"/assets/react-router-*.js",size:12,config:{priority:"critical",condition:()=>!0}},{name:"app-core",path:"/assets/app-core-*.js",size:25,config:{priority:"high",condition:()=>window.location.pathname==="/",delay:1e3,onIdle:!0}},{name:"wagmi",path:"/assets/wagmi-*.js",size:15,config:{priority:"high",condition:()=>!!(window.ethereum||localStorage.getItem("walletconnect")),onIdle:!0}},{name:"wc-ethereum",path:"/assets/wc-ethereum-*.js",size:273,config:{priority:"medium",condition:()=>!!window.ethereum,delay:2e3,onHover:!0}},{name:"solana-core",path:"/assets/solana-core-*.js",size:29,config:{priority:"medium",condition:()=>!!(window.solana||window.phantom),delay:1500}},{name:"mail-features",path:"/assets/mail-features-*.js",size:10,config:{priority:"medium",condition:()=>window.location.pathname.includes("/connect")||localStorage.getItem("wallet-connected")==="true",onScroll:20}},{name:"coinbase",path:"/assets/coinbase-*.js",size:75,config:{priority:"low",condition:()=>!!window.ethereum,delay:5e3,onIdle:!0}},{name:"design-system",path:"/assets/design-system-*.js",size:112,config:{priority:"low",condition:()=>window.location.pathname.includes("/internal"),delay:3e3}}];class J0{constructor(){this.preloaded=new Set,this.networkSpeedEstimate="medium",this.isLowEndDevice=!1,this.userActivityScore=0,this.detectNetworkSpeed(),this.detectDeviceCapability(),this.startUserActivityTracking()}detectNetworkSpeed(){if("connection"in navigator){const r=navigator.connection;if(r){const a=r.effectiveType;a==="4g"?this.networkSpeedEstimate="fast":a==="3g"?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}}const t=performance.now();fetch("/favicon.ico",{method:"HEAD"}).then(()=>{const r=performance.now()-t;r<100?this.networkSpeedEstimate="fast":r<300?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}).catch(()=>{this.networkSpeedEstimate="slow"})}detectDeviceCapability(){const t=navigator.deviceMemory,r=navigator.hardwareConcurrency;t&&t<4&&(this.isLowEndDevice=!0),r&&r<4&&(this.isLowEndDevice=!0),"getBattery"in navigator&&navigator.getBattery?.().then(a=>{a.level&&a.level<.2&&(this.isLowEndDevice=!0)})}startUserActivityTracking(){let t;const r=()=>{this.userActivityScore=Math.min(this.userActivityScore+1,100),clearTimeout(t),t=setTimeout(()=>{this.userActivityScore=Math.max(this.userActivityScore-1,0)},5e3)};["click","scroll","keydown","mousemove"].forEach(a=>{document.addEventListener(a,r,{passive:!0})})}shouldPreload(t){return this.networkSpeedEstimate==="slow"&&t.size>50||this.isLowEndDevice&&t.size>30?!1:t.config.condition()}async preloadChunk(t){if(!this.preloaded.has(t.name))try{if(document.querySelectorAll('script[src*="'+t.name+'"]').length===0&&document.querySelectorAll('link[href*="'+t.name+'"]').length>0)return;const a=document.createElement("link");a.rel="modulepreload",a.href=t.path.replace("*",this.getChunkHash(t.name)),a.crossOrigin="","fetchPriority"in a&&(a.fetchPriority=t.config.priority==="critical"?"high":"low"),document.head.appendChild(a),this.preloaded.add(t.name)}catch{}}getChunkHash(t){const r=Array.from(document.querySelectorAll("script[src]"));for(const a of r){const o=a.src;if(o.includes(t)){const s=o.match(new RegExp(`${t}-([A-Za-z0-9_-]+)\\.js`));if(s)return s[1]}}return"unknown"}async schedulePreload(t){const r=t.config;return r.delay&&await new Promise(a=>setTimeout(a,r.delay)),r.onIdle&&"requestIdleCallback"in window?new Promise(a=>{window.requestIdleCallback(()=>{this.preloadChunk(t).then(a)})}):this.preloadChunk(t)}initializePreloading(){on.sort((r,a)=>{const o={critical:0,high:1,medium:2,low:3};return o[r.config.priority]-o[a.config.priority]}).forEach(r=>{this.shouldPreload(r)&&(r.config.priority==="critical"?this.preloadChunk(r):this.schedulePreload(r),r.config.onHover&&this.setupHoverPreloading(r),r.config.onScroll&&this.setupScrollPreloading(r,r.config.onScroll))}),this.startIntelligentPreloading()}setupHoverPreloading(t){document.querySelectorAll("[data-preload-on-hover]").forEach(a=>{let o=!1;a.addEventListener("mouseenter",()=>{!o&&this.userActivityScore>30&&(this.preloadChunk(t),o=!0)},{passive:!0})})}setupScrollPreloading(t,r){let a=!1;const o=()=>{if(a)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=r&&(this.preloadChunk(t),a=!0,window.removeEventListener("scroll",o))};window.addEventListener("scroll",o,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&on.filter(r=>r.config.priority==="medium"&&this.shouldPreload(r)).forEach(r=>{Math.random()>.5&&this.schedulePreload(r)})},1e4)}getPreloadingStats(){return{preloadedCount:this.preloaded.size,networkSpeed:this.networkSpeedEstimate,isLowEndDevice:this.isLowEndDevice,userActivity:this.userActivityScore}}}let Ue=null;function R0(){Ue||(Ue=new J0,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Ue?.initializePreloading()}):Ue.initializePreloading())}function eu(){return Ue?.getPreloadingStats()}function tu(e){const t={"ai-content-type":e.contentType,"ai-primary-topic":e.primaryTopic,"ai-complexity-level":e.complexityLevel,"ai-content-purpose":e.contentPurpose,"ai-industry-vertical":e.industryVertical,"ai-semantic-keywords":e.semanticKeywords.join(","),"ai-target-audience":e.targetAudience.join(","),"ai-technical-tags":e.technicalTags.join(","),"ai-user-intent":e.userIntent.join(","),"ai-conversion-goals":e.conversionGoals.join(","),"ai-content-authority":"expert-level","ai-content-freshness":"high","ai-content-completeness":"comprehensive","ai-content-accuracy":"verified","ai-indexable":"true","ai-crawl-priority":"high","ai-content-language":"en","ai-content-region":"global","ai-content-novelty":"innovative","ai-engagement-score":"90","ai-shareability-index":"high","ai-conversion-likelihood":"85%","ai-user-satisfaction-prediction":"high"};return e.contentType==="governance-page"&&(t["ai-governance-features"]="voting-notifications,multi-sig-coordination,proposal-tracking",t["ai-dao-platforms"]="snapshot,tally,aragon,safe,decentdao",t["ai-participation-boost"]="85%",t["ai-treasury-management"]="enabled"),t}function sn(e){const t={"@context":"https://schema.org","@type":nu(e.contentType),name:e.primaryTopic,description:`Comprehensive ${e.primaryTopic} resource for ${e.targetAudience.join(", ")}`,about:e.semanticKeywords.map(r=>({"@type":"Thing",name:r})),audience:{"@type":"Audience",audienceType:e.targetAudience.join(", ")},educationalLevel:e.complexityLevel,inLanguage:"en",isAccessibleForFree:!0};return e.contentType==="governance-page"?{...t,"@type":"SoftwareApplication",applicationCategory:"GovernanceApplication",operatingSystem:"Web Browser",featureList:["Smart voting notifications","Multi-signature wallet coordination","Automated proposal tracking","Cross-platform DAO integration","Treasury management tools"],isRelatedTo:[{"@type":"SoftwareApplication",name:"Snapshot"},{"@type":"SoftwareApplication",name:"Tally"},{"@type":"SoftwareApplication",name:"Aragon"},{"@type":"SoftwareApplication",name:"Safe"}]}:t}function ru(e,t){return t.map(r=>({type:"related-content",target:r.url,strength:r.relevance}))}function ln(e){const t=["Web3 Email Platform","Web3","blockchain","email","wallet","cryptocurrency"],r=["DAO","governance","voting","multi-sig","Snapshot","Tally","Aragon","Safe","proposal","community"];return e.contentType==="governance-page"?[...t,...r]:t}function cn(e){const t=["web3-infrastructure","email-technology","blockchain-applications"],r=["dao-governance-tools","voting-notification-systems","community-management-platforms","multi-signature-coordination","treasury-management-solutions"];return e.contentType==="governance-page"?[...t,...r]:t}function au(e,t){return{contentClassification:{type:e.contentType,topic:e.primaryTopic,audience:e.targetAudience.join(","),complexity:e.complexityLevel,purpose:e.contentPurpose,vertical:e.industryVertical},semanticMarkup:sn(e),entityRecognition:ln(e),topicClustering:cn(e),contentRelationships:t?.contentRelationships||[],...t}}function nu(e){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[e]||"WebPage"}function ou(e){return{"@context":"https://schema.org","@type":"MonitorAction",name:`AI Performance Tracking - ${e}`,instrument:{"@type":"SoftwareApplication",name:"AI Analytics Platform"},measurementTechnique:["User Engagement Metrics","AI Content Understanding Score","Semantic Relevance Analysis","Conversion Optimization Tracking"],result:{"@type":"Dataset",name:`${e} Performance Data`,description:"AI-optimized performance metrics and user interaction data"}}}const su={governancePage:{contentType:"governance-page",primaryTopic:"DAO Governance Communication Platform",semanticKeywords:["DAO governance","voting notifications","multi-sig coordination","proposal tracking","community engagement","treasury management"],targetAudience:["DAO members","governance participants","multi-sig signers","protocol teams","community managers"],complexityLevel:"intermediate",contentPurpose:"commercial",industryVertical:"blockchain-governance",technicalTags:["snapshot","tally","aragon","safe","multi-sig","voting","proposals","treasury"],userIntent:["improve-governance","increase-participation","coordinate-multi-sig","track-proposals","engage-community"],conversionGoals:["dao-integration","governance-setup","multi-sig-connection","notification-activation"]},landingPage:{contentType:"landing-page",primaryTopic:"Web3 Email Platform",semanticKeywords:["Web3 email","wallet authentication","ENS email","SNS email","blockchain email","decentralized communication"],targetAudience:["Web3 users","crypto enthusiasts","blockchain developers","DeFi users"],complexityLevel:"beginner",contentPurpose:"commercial",industryVertical:"web3-communication",technicalTags:["ethereum","solana","ens","sns","wallet-connect","metamask","phantom"],userIntent:["create-web3-email","connect-wallet","secure-communication","eliminate-passwords"],conversionGoals:["wallet-connection","email-creation","first-email-sent","premium-upgrade"]}},iu=({message:e,className:t})=>n.jsxs("div",{className:`flex items-center justify-center p-4 ${t||""}`,children:[n.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),n.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),cr=new Map,Ve=new Set;function dr(){const e=[];return!!window.ethereum?.isMetaMask&&(Ve.add("metamask"),e.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(Ve.add("coinbase"),e.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(Ve.add("phantom"),e.push({name:"Phantom",detected:!0,priority:3})),e.push({name:"WalletConnect",detected:!0,priority:4}),e.sort((o,s)=>o.priority-s.priority)}function ur(e){const t=`wallet-${e.toLowerCase()}`;if(cr.has(t))return cr.get(t);const r=()=>Promise.resolve({default:()=>x.createElement("div",{},`${e} Provider Placeholder`)}),a=x.lazy(r),o=s=>n.jsx(x.Suspense,{fallback:n.jsx(iu,{message:`Loading ${e} wallet...`,className:"wallet-loading"}),children:n.jsx(a,{...s})});return o.displayName=`Lazy${e}Provider`,cr.set(t,o),o}function lu({children:e}){const t=dr();return t.filter(r=>r.priority<=2&&r.detected).forEach(r=>{setTimeout(()=>{},1e3)}),n.jsxs(n.Fragment,{children:[t.map(r=>{const a=ur(r.name);return n.jsx(a,{},r.name)}),e]})}const pr=class pr{static preloadWallet(t){const r=t.toLowerCase();this.preloadedWallets.has(r)||(this.preloadedWallets.add(r),setTimeout(()=>{ur(t)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((r,a)=>{setTimeout(()=>{this.preloadWallet(r)},a*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};pr.preloadedWallets=new Set;let qe=pr;function cu(){return{availableWallets:dr(),preloadWallet:a=>{qe.preloadWallet(a)},getDetectedWallets:()=>Array.from(Ve),hasWallet:a=>Ve.has(a.toLowerCase())}}function du({walletName:e,onConnect:t,disabled:r=!1}){const a=()=>{qe.preloadWallet(e),setTimeout(t,100)};return n.jsxs("button",{onClick:a,disabled:r,className:"wallet-connect-btn","data-wallet":e.toLowerCase(),children:["Connect ",e]})}class uu{constructor(){this.criticalResources=[],this.observedMetrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0},this.defineCriticalResources(),this.startPerformanceObservation()}defineCriticalResources(){this.criticalResources=[{url:"/assets/index-*.css",type:"style",priority:"critical",preload:!0},{url:"/assets/index-*.js",type:"script",priority:"critical"},{url:"/assets/react-core-*.js",type:"script",priority:"high",preload:!0},{url:"https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2",type:"font",priority:"critical",preload:!0},{url:"/logo.png",type:"image",priority:"high",preload:!0}]}startPerformanceObservation(){if("PerformanceObserver"in window)try{new PerformanceObserver(s=>{for(const i of s.getEntries())i.name==="first-contentful-paint"&&(this.observedMetrics.fcp=i.startTime,this.optimizeBasedOnFCP(i.startTime))}).observe({entryTypes:["paint"]}),new PerformanceObserver(s=>{for(const i of s.getEntries())this.observedMetrics.lcp=i.startTime,this.optimizeBasedOnLCP(i.startTime)}).observe({entryTypes:["largest-contentful-paint"]});let a=0;new PerformanceObserver(s=>{for(const i of s.getEntries())i.hadRecentInput||(a+=i.value);this.observedMetrics.cls=a}).observe({entryTypes:["layout-shift"]})}catch{}window.addEventListener("load",()=>{setTimeout(()=>{const t=performance.getEntriesByType("navigation")[0];t&&(this.observedMetrics.ttfb=t.responseStart-t.requestStart,this.optimizeBasedOnTTFB(this.observedMetrics.ttfb))},0)})}optimizeBasedOnFCP(t){t>2e3?this.applyEmergencyOptimizations():t>1500&&this.applyMediumOptimizations()}optimizeBasedOnLCP(t){t>2500&&this.optimizeLCPElements()}optimizeBasedOnTTFB(t){t>600&&this.enableAggressiveCaching()}applyEmergencyOptimizations(){document.querySelectorAll('img[data-priority="low"]').forEach(a=>{a.loading="lazy",a.style.display="none",setTimeout(()=>{a.style.display=""},3e3)}),document.querySelectorAll('script[data-priority="low"]').forEach(a=>{a.setAttribute("defer","")})}applyMediumOptimizations(){["/assets/app-core-*.js","/assets/react-router-*.js"].forEach(r=>{this.preloadResource(r,"script")})}optimizeLCPElements(){document.querySelectorAll("img[data-hero], [data-lcp-element]").forEach(a=>{a instanceof HTMLImageElement&&(a.fetchPriority="high",a.loading="eager")});const r=document.querySelector("img[data-hero]")?.getAttribute("src");r&&this.preloadResource(r,"image")}enableAggressiveCaching(){const t=document.createElement("meta");t.httpEquiv="Cache-Control",t.content="public, max-age=31536000, immutable",document.head.appendChild(t)}preloadResource(t,r){if(document.querySelector(`link[href*="${t}"]`))return;const o=document.createElement("link");switch(o.rel="preload",o.href=t,r){case"script":o.as="script";break;case"style":o.as="style";break;case"font":o.as="font",o.type="font/woff2",o.crossOrigin="";break;case"image":o.as="image";break}document.head.appendChild(o)}optimizeCriticalPath(){this.criticalResources.filter(t=>t.priority==="critical"&&t.preload).forEach(t=>{this.preloadResource(t.url,t.type)}),this.inlineCriticalCSS(),this.optimizeFontLoading(),this.removeRenderBlocking(),this.setupProgressiveLoading()}inlineCriticalCSS(){const t=document.querySelector('link[rel="stylesheet"][data-critical]');t&&this.isSmallResource(t.getAttribute("href")||"")&&fetch(t.getAttribute("href")||"").then(r=>r.text()).then(r=>{if(r.length<1e4){const a=document.createElement("style");a.textContent=r,document.head.appendChild(a),t.remove()}}).catch(()=>{})}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(r=>{const a=r.getAttribute("href")||"";if(!a.includes("display=swap")){const o=a.includes("?")?"&":"?";r.setAttribute("href",`${a}${o}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(r=>{const a=r.cloneNode(!0);a.rel="preload",a.as="style",a.onload=()=>{a.onload=null,a.rel="stylesheet"};const o=document.createElement("noscript"),s=r.cloneNode(!0);o.appendChild(s),document.head.appendChild(a),document.head.appendChild(o),r.remove()})}setupProgressiveLoading(){const t=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const r=new IntersectionObserver(a=>{a.forEach(o=>{if(o.isIntersecting){const s=o.target;s.src=s.dataset.src||"",s.removeAttribute("data-src"),r.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});t.forEach(a=>r.observe(a))}else t.forEach(r=>{const a=r;a.src=a.dataset.src||""})}isSmallResource(t){return t.includes("critical")||t.includes("inline")}getPerformanceMetrics(){return{...this.observedMetrics,score:this.calculatePerformanceScore()}}calculatePerformanceScore(){let t=100;return this.observedMetrics.fcp>2e3?t-=20:this.observedMetrics.fcp>1500&&(t-=10),this.observedMetrics.lcp>2500?t-=25:this.observedMetrics.lcp>2e3&&(t-=15),this.observedMetrics.cls>.1?t-=15:this.observedMetrics.cls>.05&&(t-=8),this.observedMetrics.ttfb>600?t-=10:this.observedMetrics.ttfb>400&&(t-=5),Math.max(t,0)}}const wt={mark:e=>{typeof performance<"u"&&performance.mark&&performance.mark(e)},measure:(e,t,r)=>{if(typeof performance<"u"&&performance.measure)try{performance.measure(e,t,r);const a=performance.getEntriesByName(e);return a[a.length-1]?.duration||0}catch{return 0}return 0},getEntries:e=>typeof performance<"u"&&performance.getEntriesByName?e?performance.getEntriesByName(e):performance.getEntries():[],clearEntries:e=>{typeof performance<"u"&&(e?(performance.clearMeasures?.(e),performance.clearMarks?.(e)):(performance.clearMeasures?.(),performance.clearMarks?.()))}},gu=(e,t=[])=>{x.useEffect(()=>(wt.mark(`${e}-start`),()=>{wt.mark(`${e}-end`),wt.measure(e,`${e}-start`,`${e}-end`)}),[e,t])},mu=e=>{const t=x.useRef(e);return t.current=e,x.useCallback((...r)=>t.current(...r),[])},fu=(e,t,r)=>{const a=x.useRef(t),o=x.useRef(void 0);return x.useMemo(()=>(r&&process.env.NODE_ENV==="development"&&t.some((s,i)=>s!==a.current[i]),a.current=t,o.current=e(),o.current),[e,r,t])},kt=new Map,pu=e=>{const t=kt.get(e)||0;kt.set(e,t+1),x.useEffect(()=>{process.env.NODE_ENV})},hu=()=>Object.fromEntries(kt),bu=()=>kt.clear(),yu=e=>x.lazy(e),xu=(e=.1)=>{const[t,r]=x.useState(new Set),a=x.useRef(null);x.useEffect(()=>(a.current=new IntersectionObserver(s=>{s.forEach(i=>{if(i.isIntersecting){const l=i.target,c=l.dataset.src;c&&(l.src=c,l.onload=()=>{r(d=>new Set(d).add(c))},a.current?.unobserve(l))}})},{threshold:e}),()=>a.current?.disconnect()),[e]);const o=x.useCallback(s=>{s&&a.current&&a.current.observe(s)},[]);return{loadedImages:t,observeImage:o}},vu=e=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{e().catch(()=>{})}):setTimeout(()=>{e().catch(()=>{})},100)},dn={},wu=e=>{dn[e.name]=e.value,process.env.NODE_ENV},ku=()=>dn,Cu=(e,t="script")=>{if(typeof document<"u"){const r=document.createElement("link");r.rel="prefetch",r.href=e,r.as=t,document.head.appendChild(r)}},Su=(e,t="script",r)=>{if(typeof document<"u"){const a=document.createElement("link");a.rel="preload",a.href=e,a.as=t,r&&(a.crossOrigin="anonymous"),document.head.appendChild(a)}},Nu=e=>{const t=x.useRef(new Set),r=x.useRef(new Set),a=x.useCallback((s,i)=>{const l=setTimeout(()=>{t.current.delete(l),s()},i);return t.current.add(l),l},[]),o=x.useCallback((s,i)=>{const l=setInterval(s,i);return r.current.add(l),l},[]);return x.useEffect(()=>{const s=t.current,i=r.current;return()=>{s.forEach(l=>clearTimeout(l)),i.forEach(l=>clearInterval(l)),process.env.NODE_ENV}},[e]),{createTimer:a,createInterval:o}},ce={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:e=>{const t=[];return e.FCP&&e.FCP>ce.maxFCP&&t.push(`FCP (${e.FCP}ms) exceeds budget (${ce.maxFCP}ms)`),e.LCP&&e.LCP>ce.maxLCP&&t.push(`LCP (${e.LCP}ms) exceeds budget (${ce.maxLCP}ms)`),e.FID&&e.FID>ce.maxFID&&t.push(`FID (${e.FID}ms) exceeds budget (${ce.maxFID}ms)`),e.CLS&&e.CLS>ce.maxCLS&&t.push(`CLS (${e.CLS}) exceeds budget (${ce.maxCLS})`),t}},Eu=({contentType:e,aiSummary:t,technicalComplexity:r="intermediate"})=>n.jsxs(yn.Helmet,{children:[n.jsx("meta",{name:"ai:content-type",content:e}),n.jsx("meta",{name:"ai:summary",content:t}),n.jsx("meta",{name:"ai:complexity",content:r})]}),Au=({children:e,className:t,...r})=>n.jsx("main",{className:t,...r,role:"main",children:e}),Pu=({children:e})=>n.jsx(n.Fragment,{children:e}),Le=e=>Array.isArray(e)?e:typeof e=="string"?e.split(",").map(t=>t.trim()).filter(Boolean):[],ke=e=>({appName:e.appName,baseUrl:e.baseUrl,twitterHandle:e.twitterHandle||"",emailDomain:e.emailDomain||"example.com"}),gr=e=>{const t=Le(e.audience),r=ke(e.branding);return{"@context":"https://schema.org","@type":"SoftwareApplication",name:r.appName,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",description:e.description,url:r.baseUrl,downloadUrl:`${r.baseUrl}/connect`,installUrl:`${r.baseUrl}/connect`,screenshot:`${r.baseUrl}/screenshots/app-preview.jpg`,aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"2500",bestRating:"5",worstRating:"1"},offers:[{"@type":"Offer",name:"Free Web3 Email",description:"Basic wallet-based email with unlimited sending",price:"0",priceCurrency:"USD",availability:"https://schema.org/InStock"},{"@type":"Offer",name:"Premium Web3 Email",description:"Advanced features with ENS/SNS domains and priority support",price:"2.00",priceCurrency:"USD",billingIncrement:"month",availability:"https://schema.org/InStock"}],featureList:["Passwordless wallet authentication","ENS domain email support (.eth)","Solana Name Service support (.sol)","Smart contract email integration","Multi-chain wallet compatibility","Cross-chain email addresses","DAO email delegation","Encrypted communication","Web2/Web3 bridge functionality","Point-based reward system"],applicationSubCategory:"Web3 Email Platform",audience:{"@type":"Audience",audienceType:t.join(", "),geographicArea:"Worldwide"},creator:{"@type":"Organization",name:r.appName,url:r.baseUrl},datePublished:"2024-01-01",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),version:"1.0",softwareRequirements:"Web3 Wallet (MetaMask, Phantom, etc.)",storageRequirements:"5MB",memoryRequirements:"512MB RAM",supportingData:{blockchainNetworks:["Ethereum","Solana","Polygon","Arbitrum","Optimism"],supportedWallets:["MetaMask","Phantom","WalletConnect","Coinbase Wallet"],smartContractSupport:!0,ensCompatible:!0,snsCompatible:!0}}},mr=e=>{const t=Le(e.keywords),r=Le(e.audience),a=ke(e.branding);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:e.title,description:e.description,author:{"@type":"Organization",name:a.appName,url:a.baseUrl,logo:{"@type":"ImageObject",url:`${a.baseUrl}/logo.png`}},publisher:{"@type":"Organization",name:a.appName,logo:{"@type":"ImageObject",url:`${a.baseUrl}/logo.png`,width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`${a.baseUrl}${location.pathname}`},image:{"@type":"ImageObject",url:`${a.baseUrl}/og-images/technical-guide.jpg`,width:1200,height:630},keywords:t.join(", "),about:[{"@type":"Thing",name:"Web3 Email Platform"},{"@type":"Thing",name:"Blockchain Technology"},{"@type":"Thing",name:"Decentralized Communication"}],audience:{"@type":"Audience",audienceType:r.join(", "),educationalLevel:e.complexity},educationalLevel:e.complexity,proficiencyLevel:e.complexity,learningResourceType:e.contentType,timeRequired:e.readingTime?`PT${e.readingTime}M`:"PT5M",inLanguage:"en",isAccessibleForFree:!0,license:"https://creativecommons.org/licenses/by/4.0/",teaches:e.relatedTopics||["Web3 email setup","Wallet connection process","Blockchain authentication","Smart contract integration"]}},Tu=(e,t)=>{const r=ke(t);return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(a=>({"@type":"Question",name:a.question,acceptedAnswer:{"@type":"Answer",text:a.answer,dateCreated:new Date().toISOString(),upvoteCount:Math.floor(Math.random()*50)+10,author:{"@type":"Organization",name:r.appName}},answerCount:1,upvoteCount:Math.floor(Math.random()*100)+20,dateCreated:"2024-01-01T00:00:00Z",category:a.category||"General"}))}},fr=e=>{const t=ke(e.branding);return{"@context":"https://schema.org","@type":"WebPage",name:e.title,description:e.description,url:`${t.baseUrl}${location.pathname}`,primaryImageOfPage:{"@type":"ImageObject",url:`${t.baseUrl}/og-images/ai-optimized.jpg`},significantLink:[`${t.baseUrl}/document`,`${t.baseUrl}/web3-users`,`${t.baseUrl}/web3-projects`,`${t.baseUrl}/connect`],relatedLink:e.relatedTopics?.map(r=>`${t.baseUrl}/search?q=${encodeURIComponent(r)}`)||[],about:{"@type":"Thing",name:"Web3 Email Communication",description:"Blockchain-based email platform using wallet authentication",sameAs:["https://en.wikipedia.org/wiki/Web3","https://en.wikipedia.org/wiki/Blockchain","https://en.wikipedia.org/wiki/Cryptocurrency_wallet"]},mentions:[{"@type":"SoftwareApplication",name:"MetaMask"},{"@type":"SoftwareApplication",name:"Phantom Wallet"},{"@type":"Thing",name:"Ethereum Name Service"},{"@type":"Thing",name:"Solana Name Service"}],isPartOf:{"@type":"WebSite","@id":t.baseUrl,name:t.appName},potentialAction:{"@type":"InteractAction",target:{"@type":"EntryPoint",urlTemplate:`${t.baseUrl}/connect`,actionPlatform:["https://schema.org/DesktopWebPlatform","https://schema.org/MobileWebPlatform"]},name:"Connect Web3 Wallet"}}},un=e=>{const t=Le(e.keywords),r=ke(e.branding);return{"og:title":e.title,"og:description":e.description,"og:type":"website","og:url":`${r.baseUrl}${location.pathname}`,"og:image":`${r.baseUrl}/og-images/${e.category}.jpg`,"og:image:width":"1200","og:image:height":"630","og:image:alt":`${e.title} - ${r.appName}`,"og:site_name":r.appName,"og:locale":"en_US","article:author":`${r.baseUrl}/about`,"article:section":e.category,"article:tag":t.join(","),"article:published_time":"2024-01-01T00:00:00Z","article:modified_time":e.lastUpdated?.toISOString()||new Date().toISOString()}},gn=e=>{const t=ke(e.branding);return{"twitter:card":"summary_large_image","twitter:site":t.twitterHandle||"","twitter:creator":t.twitterHandle||"","twitter:title":e.title,"twitter:description":e.description,"twitter:image":`${t.baseUrl}/twitter-cards/${e.category}.jpg`,"twitter:image:alt":`${e.title} - ${t.appName}`,"twitter:label1":"Category","twitter:data1":e.category,"twitter:label2":"Reading Time","twitter:data2":e.readingTime?`${e.readingTime} min`:"5 min"}},mn=e=>{const t=Le(e.keywords),r=Le(e.audience),a=ke(e.branding);return{"ai:content-type":e.contentType,"ai:complexity":e.complexity,"ai:category":e.category,"ai:audience":r.join(","),"ai:keywords":t.join(","),"ai:reading-time":e.readingTime?.toString()||"5","web3:platform":"Email","web3:networks":"ethereum,solana,polygon","web3:wallets":"metamask,phantom,walletconnect","web3:features":"ens,sns,smart-contracts,multi-chain","llm:context":"Web3 email platform documentation and user guides","llm:domain":"blockchain,cryptocurrency,decentralized-communication","llm:use-case":"email,authentication,wallet-integration,smart-contracts","semantic:topic":e.category,"semantic:intent":"inform,guide,educate","semantic:entities":`${a.appName},Web3,blockchain,email,wallet`,"content:freshness":e.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},Iu=e=>({structuredData:{product:gr(e),article:mr(e),aiOptimized:fr(e)},openGraph:un(e),twitterCard:gn(e),aiMetaTags:mn(e),jsonLD:[gr(e),mr(e),fr(e)]}),$u={homepage:{title:"Revolutionary Web3 Email Platform | Wallet-Based Authentication",description:"Transform your email experience - the first Web3 email platform using wallet authentication. No passwords, enhanced security, ENS/SNS domain support, and smart contract integration.",keywords:["Web3 email","blockchain email","wallet authentication","ENS email","SNS email","decentralized email","smart contract integration"],category:"Web3 Platform",audience:["Crypto Users","Web3 Developers","DeFi Users","DAO Members"],complexity:"beginner",contentType:"overview",readingTime:3,relatedTopics:["Web3 authentication","Blockchain communication","Decentralized identity"]},documentation:{title:"Documentation - Complete Web3 Email Setup Guide",description:"Comprehensive documentation for Web3 email platform. Learn wallet connection, ENS/SNS setup, smart contract integration, and advanced features.",keywords:["Web3 email guide","wallet connection","ENS setup","SNS configuration","smart contract email","blockchain documentation"],category:"Technical Documentation",audience:["Developers","Technical Users","Web3 Enthusiasts"],complexity:"intermediate",contentType:"guide",readingTime:15,relatedTopics:["Wallet integration","Blockchain protocols","Email security"]},earnPoints:{title:"How to Earn Points - Web3 Email Rewards Guide",description:"Master the points system. Earn rewards through email activities, referrals, smart contract interactions, and prepare for future token distribution.",keywords:["Web3 rewards","email points","blockchain rewards","referral program","token preparation","crypto incentives"],category:"Rewards Guide",audience:["Token Farmers","Crypto Users","Web3 Users"],complexity:"beginner",contentType:"tutorial",readingTime:8,relatedTopics:["Token economics","Reward systems","Referral marketing"]}},Lu=e=>{const{level:t,text:r,className:a="",id:o,semanticContext:s="section"}=e,i=`h${t}`,l={1:"text-4xl md:text-5xl lg:text-6xl font-bold leading-tight",2:"text-3xl md:text-4xl font-bold leading-tight",3:"text-2xl md:text-3xl font-bold leading-tight",4:"text-xl md:text-2xl font-semibold leading-tight",5:"text-lg md:text-xl font-semibold leading-tight",6:"text-base md:text-lg font-medium leading-tight"},c={"page-title":"text-gray-900 dark:text-white mb-6",section:"text-gray-900 dark:text-white mb-4",subsection:"text-gray-900 dark:text-white mb-3",feature:"text-gray-900 dark:text-white mb-2",benefit:"text-blue-600 dark:text-blue-400 mb-2",step:"text-green-600 dark:text-green-400 mb-2"},d=[l[t],c[s],a].filter(Boolean).join(" "),g=o||r.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return x.createElement(i,{id:g,className:d,"aria-level":t},r)},re={pageTitle:(e,t)=>({level:1,text:e,className:t,semanticContext:"page-title"}),majorSection:(e,t)=>({level:2,text:e,className:t,semanticContext:"section"}),feature:(e,t)=>({level:3,text:e,className:t,semanticContext:"feature"}),benefit:(e,t)=>({level:3,text:e,className:t,semanticContext:"benefit"}),step:(e,t,r)=>({level:3,text:t?`Step ${t}: ${e}`:e,className:r,semanticContext:"step"}),subFeature:(e,t)=>({level:4,text:e,className:t,semanticContext:"feature"})},Mu=e=>{const t=[],r=[],a=e.filter(o=>o.level===1).length;a===0?t.push("Missing H1 tag - every page should have exactly one H1"):a>1&&t.push(`Multiple H1 tags found (${a}) - use only one H1 per page`);for(let o=1;o<e.length;o++){const s=e[o],i=e[o-1];s.level>i.level+1&&t.push(`Heading level jump from H${i.level} to H${s.level} - avoid skipping levels`)}return e.forEach((o,s)=>{o.text.length<3&&t.push(`Heading ${s+1} is too short - use descriptive text`),o.text.length>70&&r.push(`Heading "${o.text.substring(0,30)}..." is long - consider shortening for better SEO`)}),{isValid:t.length===0,errors:t,suggestions:r}},Ou={walletConnection:re.pageTitle("Connect Your Web3 Wallet"),emailBenefits:re.majorSection("Why Choose Web3 Email?"),securityFeature:re.feature("Secure & Private"),ensIntegration:re.feature("ENS Domain Support"),multiChain:re.feature("Multi-Chain Compatibility"),passwordless:re.benefit("No Passwords Required"),setupStep1:re.step("Connect Your Wallet",1),setupStep2:re.step("Verify Your Identity",2),setupStep3:re.step("Access Your Emails",3)},zu=[{term:"Web3 Email",definition:"Email system that uses blockchain wallet addresses as authentication instead of traditional passwords",category:"Web3 Communication",synonyms:["blockchain email","decentralized email","crypto email"],relatedTerms:["wallet authentication","ENS email","SNS email"],examples:["vitalik.eth@example.com","alice.sol@example.com"],context:"Web3 email revolutionizes digital communication by eliminating passwords and using cryptographic signatures for authentication"},{term:"Wallet Authentication",definition:"Authentication method using cryptographic signatures from blockchain wallets instead of passwords",category:"Security",synonyms:["wallet-based auth","signature authentication","passwordless authentication"],relatedTerms:["EIP-712","SIWE","message signing"],examples:["MetaMask signature","Phantom wallet auth","WalletConnect login"],context:"Wallet authentication provides superior security through cryptographic proofs that cannot be phished or stolen like passwords"},{term:"ENS Email",definition:"Email addresses using Ethereum Name Service domains (.eth) as identifiers",category:"Naming Systems",synonyms:["Ethereum name email",".eth email"],relatedTerms:["ENS","Ethereum domains","blockchain domains"],examples:["vitalik.eth","ethereum.eth"],context:"ENS emails provide human-readable addresses that resolve to Ethereum wallet addresses"},{term:"SNS Email",definition:"Email addresses using Solana Name Service domains (.sol) as identifiers",category:"Naming Systems",synonyms:["Solana name email",".sol email"],relatedTerms:["SNS","Solana domains","SPL domains"],examples:["anatoly.sol","solana.sol"],context:"SNS emails provide human-readable addresses for Solana ecosystem users"},{term:"Smart Contract Integration",definition:"Ability to send and receive emails triggered by blockchain smart contract events",category:"Blockchain Integration",synonyms:["contract notifications","on-chain email triggers"],relatedTerms:["event listeners","webhooks","contract automation"],examples:["DAO proposal notifications","DeFi alert emails","NFT sale confirmations"],context:"Smart contract integration enables automated communication based on blockchain events"},{term:"Multi-Chain Support",definition:"Compatibility with multiple blockchain networks for wallet authentication and email services",category:"Interoperability",synonyms:["cross-chain support","blockchain agnostic"],relatedTerms:["EVM chains","Solana","Layer 2"],examples:["Ethereum, Polygon, Arbitrum, Solana support"],context:"Multi-chain support ensures users from any blockchain ecosystem can use the email service"},{term:"DAO Email Delegation",definition:"System allowing DAOs to manage email communications through delegated authorities",category:"Governance",synonyms:["governance email","multi-sig email"],relatedTerms:["DAO governance","multi-signature","delegation"],examples:["Treasury notifications","Proposal alerts","Voting reminders"],context:"DAO email delegation enables decentralized organizations to manage communications efficiently"},{term:"Web2/Web3 Bridge",definition:"Technology enabling communication between traditional email systems and blockchain-based email",category:"Interoperability",synonyms:["email bridge","legacy integration"],relatedTerms:["SMTP gateway","email forwarding","protocol bridge"],examples:["Gmail to Web3 email","Outlook integration"],context:"Web2/Web3 bridge ensures compatibility with existing email infrastructure"}],Du=e=>({"@context":"https://schema.org","@type":"LearningResource",educationalLevel:e.difficulty,learningResourceType:"Technical Documentation",timeRequired:e.estimatedTime?`PT${e.estimatedTime}M`:void 0,teaches:e.learningObjectives,requires:e.prerequisites,about:{"@type":"Thing",name:e.domain,category:e.category,subcategory:e.subcategory},keywords:e.concepts,applicationExample:e.practicalApplications,isRelatedTo:e.relatedConcepts}),Bu=e=>{const t={nodes:e.map(r=>({id:r.term,label:r.term,category:r.category,definition:r.definition})),edges:[]};return e.forEach(r=>{r.relatedTerms?.forEach(a=>{e.find(s=>s.term===a)&&t.edges.push({source:r.term,target:a,relationship:"related_to"})}),r.synonyms?.forEach(a=>{t.edges.push({source:r.term,target:a,relationship:"synonym_of"})})}),t},Wu=e=>{const t=[];return e.examples?.forEach(r=>{t.push({text:r,label:e.term,type:"positive",confidence:1})}),e.context&&t.push({text:e.context,label:e.term,type:"contextual",confidence:.8}),t.push({text:`${e.term} is ${e.definition}`,label:e.term,type:"definition",confidence:1}),t},ju=e=>{const t=[];return e.forEach(r=>{t.push({question:`What is ${r.term}?`,answer:r.definition,category:r.category,difficulty:"basic"}),r.context&&t.push({question:`How does ${r.term} work?`,answer:r.context,category:r.category,difficulty:"intermediate"}),r.examples&&r.examples.length>0&&t.push({question:`What are examples of ${r.term}?`,answer:r.examples.join(", "),category:r.category,difficulty:"basic"}),r.relatedTerms&&r.relatedTerms.length>0&&t.push({question:`What is ${r.term} related to?`,answer:`${r.term} is related to ${r.relatedTerms.join(", ")}`,category:r.category,difficulty:"intermediate"})}),t},Fu={homepage:{domain:"Web3 Email Platform",category:"Web3 Communication",concepts:["Web3 email","wallet authentication","passwordless login","blockchain messaging"],prerequisites:["Basic blockchain knowledge","Understanding of crypto wallets"],learningObjectives:["Understand Web3 email concepts","Learn wallet authentication","Explore blockchain communication"],difficulty:"beginner",estimatedTime:5,practicalApplications:["Secure email communication","DAO governance","DeFi notifications"]},documentation:{domain:"Web3 Email Technical Documentation",category:"Technical Guide",concepts:["API integration","smart contracts","wallet connection","email protocols"],prerequisites:["JavaScript/TypeScript","Web3 development basics","REST APIs"],learningObjectives:["Implement Web3 email","Integrate wallet authentication","Build on email API"],difficulty:"intermediate",estimatedTime:30,practicalApplications:["dApp integration","Email automation","Smart contract notifications"]},governance:{domain:"DAO Governance Communication",category:"Governance Tools",concepts:["DAO email","voting notifications","proposal tracking","multi-sig coordination"],prerequisites:["DAO basics","Governance understanding","Multi-signature wallets"],learningObjectives:["Setup DAO email","Configure voting alerts","Manage team communication"],difficulty:"advanced",estimatedTime:20,practicalApplications:["DAO operations","Treasury management","Governance participation"]}};/**
63
- * @johnqh/mail-box-components
37
+ `+t)}`,discord:(t,e)=>`https://discord.com/channels/@me?message=${encodeURIComponent(e+`
38
+ `+t)}`,messages:(t,e)=>`sms:?&body=${encodeURIComponent(e+" "+t)}`},dl=({shareConfig:t})=>{const[e,a]=y.useState(!1),[o,n]=y.useState(""),[s,l]=y.useState(!1),[g,c]=y.useState(!1),[i,h]=y.useState(!1);y.useEffect(()=>{const k=t.onBeforeShare;k&&!o&&(async()=>{l(!0);try{const v=typeof window<"u"?window.location.href:"",w=await k(v);n(w)}catch{const v=typeof window<"u"?window.location.href:"";n(v)}finally{l(!1)}})()},[t,o]);const b=o||(typeof window<"u"?window.location.href:""),x=typeof navigator<"u"&&navigator.share!==void 0,m=async()=>{if(!(!x||i)){h(!0);try{await navigator.share({title:t.title,text:t.description,url:b}),a(!1)}catch(k){k instanceof Error&&k.name!=="AbortError"&&(console.error("Share failed:",k),k.name!=="InvalidStateError"&&a(!0))}finally{h(!1)}}},f=async()=>{try{await navigator.clipboard.writeText(b),c(!0),setTimeout(()=>{c(!1),a(!1)},1500)}catch{}},p=()=>{a(!e)},C=k=>{window.open(k,"_blank","noopener,noreferrer,width=600,height=400"),a(!1)},S=[{name:"Twitter",url:Y.twitter(b,t.title,t.hashtags),color:"text-blue-400",svg:r.jsx("path",{d:"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"})},{name:"Facebook",url:Y.facebook(b),color:"text-blue-600",svg:r.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})},{name:"LinkedIn",url:Y.linkedin(b,t.title,t.description),color:"text-blue-700",svg:r.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})},{name:"Reddit",url:Y.reddit(b,t.title),color:"text-orange-600",svg:r.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})},{name:"Telegram",url:Y.telegram(b,t.title),color:"text-blue-500",svg:r.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})},{name:"WhatsApp",url:Y.whatsapp(b,t.title),color:"text-green-600",svg:r.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})},{name:"Discord",url:Y.discord(b,t.title),color:"text-indigo-500",svg:r.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})},{name:"Messages",url:Y.messages(b,t.title),color:"text-green-500",svg:r.jsx("path",{d:"M.05 3.555A3 3 0 013 0h18a3 3 0 012.95 3.555L22 11v8a3 3 0 01-3 3H5a3 3 0 01-3-3v-8l-1.95-7.445zM2 10.938V19a1 1 0 001 1h18a1 1 0 001-1v-8.062L20 19H4l-2-8.062zM3.38 2L5 8h14l1.62-6H3.38z"})},{name:"Email",url:Y.email(b,t.title,t.description),color:"text-gray-600",svg:r.jsx("path",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"})}];return r.jsxs("div",{className:"relative",children:[r.jsx("button",{onClick:p,disabled:s||i,className:"flex items-center justify-center w-8 h-8 bg-blue-50 hover:bg-blue-100 dark:bg-blue-900/30 dark:hover:bg-blue-900/50 text-blue-600 dark:text-blue-400 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Share this page",children:s||i?r.jsx("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}):r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})})}),e&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-[999998]",onClick:()=>a(!1)}),r.jsxs("div",{className:"absolute right-0 top-10 z-[999999] w-40 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1",children:[S.map(k=>r.jsxs("button",{onClick:()=>C(k.url),className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[r.jsx("svg",{className:`w-4 h-4 mr-2 ${k.color}`,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:k.svg}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:k.name})]},k.name)),r.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),x&&r.jsxs("button",{onClick:()=>{a(!1),m()},disabled:i,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50",children:[r.jsx("svg",{className:"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"More..."})]}),r.jsxs("button",{onClick:f,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[r.jsx("svg",{className:"w-4 h-4 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:g?"Copied!":"Copy Link"})]})]})]})]})},Dr=({items:t,shareConfig:e,className:a,showHome:o})=>r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("nav",{"aria-label":"Breadcrumb",children:r.jsx("ol",{className:"flex items-center text-sm space-x-2",children:t.map((n,s)=>r.jsxs(y.Fragment,{children:[r.jsx("li",{children:n.current?r.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:n.label}):r.jsx(Ue.Link,{to:n.href||"#",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors",children:n.label})}),s<t.length-1&&r.jsx("li",{children:r.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"/"})})]},s))})}),e&&r.jsx(dl,{shareConfig:e})]}),cl=({items:t,shareConfig:e})=>r.jsx("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50",children:r.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 relative",children:r.jsx(Dr,{items:t,shareConfig:e})})}),jr=t=>{const[e,a]=y.useState(""),[o,n]=y.useState(!0),[s,l]=y.useState(null);return y.useEffect(()=>{t&&(async()=>{try{n(!0),l(null);const c=await fetch(`/code/${t}`);if(!c.ok)throw new Error(`Failed to load code file: ${t}`);const i=await c.text();a(i)}catch(c){l(c instanceof Error?c.message:"Unknown error"),a("// Error loading code file")}finally{n(!1)}})()},[t]),{code:e,loading:o,error:s}},gl=({filename:t,code:e,language:a,title:o,className:n="",showCopy:s=!0,showHeader:l=!0})=>{const{t:g}=ur.useTranslation("codeBlock"),{code:c,loading:i,error:h}=jr(t||""),[b,x]=y.useState(!1),m=e||c,p=a||(t?(S=>{switch(S.split(".").pop()?.toLowerCase()){case"sol":return"solidity";case"js":case"mjs":return"javascript";case"ts":return"typescript";case"sh":return"bash";case"graphql":return"graphql";case"json":return"json";case"css":return"css";case"html":return"html";case"jsx":return"jsx";case"tsx":return"tsx";case"py":return"python";case"java":return"java";case"cpp":case"c":return"cpp";case"go":return"go";case"rs":return"rust";case"php":return"php";case"rb":return"ruby";default:return"text"}})(t):"text"),C=async()=>{if(m)try{await navigator.clipboard.writeText(m),x(!0),setTimeout(()=>x(!1),2e3)}catch{}};return t&&i?r.jsx("div",{className:`bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${n}`,children:r.jsx("div",{className:"animate-pulse text-gray-500",children:g("loadingCode","Loading code...")})}):t&&h?r.jsxs("div",{className:`bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${n}`,children:[g("error","Error"),": ",h]}):m?r.jsxs("div",{className:`bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${n}`,children:[l&&r.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50",children:[r.jsx("span",{className:"text-sm text-green-400 font-mono",children:o||t||`${p} code`}),s&&r.jsx("button",{onClick:C,className:"p-2 text-gray-400 hover:text-green-400 hover:bg-gray-800 rounded-lg transition-all duration-200 group",title:g("copyCode","Copy code"),children:b?r.jsx(U.CheckIcon,{className:"h-4 w-4 text-green-400"}):r.jsx(U.ClipboardDocumentIcon,{className:"h-4 w-4 group-hover:scale-110 transition-transform"})})]}),r.jsx("div",{className:"p-4 overflow-x-auto text-left",children:r.jsx("pre",{className:`text-sm language-${p}`,children:r.jsx("code",{className:"text-gray-100",children:m})})})]}):r.jsx("div",{className:`bg-gray-900 text-gray-400 rounded-lg p-4 font-mono text-sm ${n}`,children:g("noCode","No code to display")})},ul=({subsections:t,isExpanded:e,selectedSubsection:a,parentSectionId:o,onSubsectionSelect:n})=>{const s=y.useRef(null),[l,g]=y.useState(void 0);return y.useLayoutEffect(()=>{if(s.current){const c=s.current.scrollHeight;g(e?c+16:0)}},[e,t]),r.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:l!==void 0?`${l}px`:"auto"},children:r.jsx("div",{ref:s,className:"ml-6 mt-1 mb-1 space-y-1",children:t.map(c=>r.jsxs("div",{className:"relative group",children:[a===c.id&&r.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),a!==c.id&&r.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),r.jsx("button",{onClick:()=>n?.(c.id,o),className:`relative z-10 block w-full text-left pl-4 pr-3 py-2 rounded-md text-sm transition-all duration-200 ${a===c.id?"text-blue-700 dark:text-blue-300":"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"}`,children:c.title})]},c.id))})})},hl=({id:t,title:e,content:a,subsections:o,isSelected:n=!1,selectedSubsection:s=null,onSectionSelect:l,onSubsectionSelect:g,className:c=""})=>{const[i,h]=y.useState(!1),b=()=>{h(!i)},x=()=>{l?.(t)},m=o&&o.length>0;return r.jsxs("div",{className:c,children:[r.jsxs("div",{className:"relative flex items-center group",children:[n&&!s&&r.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),!(n&&!s)&&r.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),r.jsx("button",{onClick:x,className:`relative z-10 flex-1 text-left pl-5 pr-3 py-4 text-base font-medium transition-all duration-200 ${n&&!s?"text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100"}`,children:e}),m&&r.jsx("button",{onClick:b,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200","aria-label":i?"Collapse section":"Expand section",children:r.jsx(U.ChevronRightIcon,{className:`h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${i?"rotate-90":"rotate-0"}`})})]}),m&&r.jsx(ul,{subsections:o,isExpanded:i,selectedSubsection:s,parentSectionId:t,onSubsectionSelect:g})]})},bl=({title:t,subtitle:e,buttonText:a,buttonIcon:o="envelope",variant:n="default",badgeText:s="FREE",prominentBadgeText:l="100% Free",onButtonClick:g,className:c=""})=>{const i=()=>o==="envelope"||o==="both"?r.jsx(U.EnvelopeIcon,{className:n==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1"}):o==="none"?null:r.jsx("svg",{className:n==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})}),h=()=>o==="arrow"||o==="both"?r.jsx(U.ArrowRightIcon,{className:"h-4 w-4 ml-2"}):null,b=()=>n==="prominent"?"border-b-2 border-green-200 dark:border-green-700":"border-b border-green-200 dark:border-green-700",x=()=>{const p="bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white rounded-lg font-bold transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-green-500/25 inline-flex items-center whitespace-nowrap cursor-pointer";return n==="prominent"?`${p} px-8 py-3 text-base`:`${p} px-6 py-2 text-sm`},m=()=>n==="prominent"?"text-green-800 dark:text-green-200 font-semibold text-lg":"text-green-800 dark:text-green-200 font-semibold",f=n==="prominent"?l:s;return r.jsx("div",{className:`bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${b()} ${c}`,children:r.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:r.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[r.jsxs("div",{className:`flex items-center ${n==="prominent"?"text-center sm:text-left":""}`,children:[r.jsx("div",{className:"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse",children:f}),r.jsxs("div",{children:[r.jsx("span",{className:m(),children:t}),e&&r.jsx("span",{className:"text-green-700 dark:text-green-300 text-sm block",children:e})]})]}),r.jsxs("button",{onClick:g,className:x(),children:[i(),a,h()]})]})})})},fl=({children:t,onClick:e,variant:a,size:o,disabled:n,className:s,type:l,trackingLabel:g,actionType:c,componentName:i,onTrack:h,trackingParams:b={},...x})=>{const m=f=>{if(h){const p=g||(typeof t=="string"?t:"")||"Unknown Button",S=a&&["default","primary","secondary","outline","ghost","destructive","link"].includes(a)?a:"default";h({button_text:p,button_type:S,component_name:i,action_type:c,...b})}e&&e(f)};return r.jsx(J,{...x,variant:a,size:o,disabled:n,className:s,type:l,onClick:m,children:t})},Br={en:{name:"English",flag:"🇺🇸"},ar:{name:"العربية",flag:"🇸🇦"},de:{name:"Deutsch",flag:"🇩🇪"},es:{name:"Español",flag:"🇪🇸"},fr:{name:"Français",flag:"🇫🇷"},it:{name:"Italiano",flag:"🇮🇹"},ja:{name:"日本語",flag:"🇯🇵"},ko:{name:"한국어",flag:"🇰🇷"},pt:{name:"Português",flag:"🇵🇹"},ru:{name:"Русский",flag:"🇷🇺"},sv:{name:"Svenska",flag:"🇸🇪"},th:{name:"ไทย",flag:"🇹🇭"},uk:{name:"Українська",flag:"🇺🇦"},vi:{name:"Tiếng Việt",flag:"🇻🇳"},zh:{name:"简体中文",flag:"🇨🇳"}},pl=({variant:t="compact",className:e=""})=>{const{i18n:a,t:o}=ur.useTranslation("languageSelector"),[n,s]=y.useState(a.language),l=y.useMemo(()=>a.options.supportedLngs?a.options.supportedLngs.filter(i=>i!=="cimode").map(i=>({code:i,name:Br[i]?.name||i.toUpperCase(),flag:Br[i]?.flag||"🌐"})).sort((i,h)=>i.name.localeCompare(h.name)):[],[a.options.supportedLngs]),g=l.find(i=>i.code===n||i.code.toLowerCase()===n.toLowerCase());y.useEffect(()=>{s(a.language)},[a.language]);const c=i=>{localStorage.setItem("language",i),a.changeLanguage(i).then(()=>{s(a.language),setTimeout(()=>{window.dispatchEvent(new Event("languagechange"))},100)}).catch(()=>{})};return t==="compact"?r.jsx("div",{className:`relative ${e}`,children:r.jsxs(Tr,{value:n,onValueChange:c,children:[r.jsx(Fe,{className:"h-10 w-auto px-3 border-0 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-0 focus:ring-offset-0",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-lg leading-none",children:g?.flag}),r.jsx("span",{className:"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300",children:g?.name})]})}),r.jsx(Ve,{children:l.map(i=>r.jsx(He,{value:i.code,className:"cursor-pointer",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-lg leading-none",children:i.flag}),r.jsx("span",{className:"text-sm",children:i.name})]})},i.code))})]})}):r.jsxs("div",{className:`space-y-2 ${e}`,children:[r.jsxs("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2",children:[r.jsx(U.LanguageIcon,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"}),r.jsx("span",{children:o("language","Language")})]}),r.jsxs(Tr,{value:n,onValueChange:c,children:[r.jsx(Fe,{children:r.jsx(kn,{placeholder:o("selectLanguage","Select language")})}),r.jsx(Ve,{children:l.map(i=>r.jsx(He,{value:i.code,className:"cursor-pointer",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-lg leading-none",children:i.flag}),r.jsx("span",{children:i.name})]})},i.code))})]}),r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:o("selectPreferredLanguage","Select your preferred language")})]})},yl=({items:t,type:e="ordered",variant:a="default",className:o,itemClassName:n})=>{const s=()=>{const i="space-y-2",h={ordered:e==="ordered"?"list-decimal":"",unordered:e==="unordered"?"list-disc":""},b={default:"list-inside",enhanced:"list-inside space-y-3",minimal:"list-none space-y-1"};return u(i,h[e],b[a])},l=i=>{const h="text-gray-600 dark:text-gray-400";return a==="enhanced"?u(h,"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700",i===t.length-1&&"border-l-transparent"):a==="minimal"?u(h,"flex items-start"):h},g=i=>a==="enhanced"&&e==="ordered"?r.jsx("div",{className:"absolute -left-4 -top-1 w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-medium",children:i+1}):null,c=(i,h)=>{const b=typeof i=="object",x=b?i.content:i,m=b?i.subItems:void 0;return r.jsxs("li",{className:u(l(h),n),children:[g(h),a==="minimal"&&e==="ordered"&&r.jsx("span",{className:"inline-block w-6 h-6 bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 rounded-full text-sm font-medium text-center leading-6 mr-3 flex-shrink-0",children:h+1}),a==="minimal"&&e==="unordered"&&r.jsx("span",{className:"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{children:x}),m&&m.length>0&&r.jsx("ul",{className:"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500",children:m.map((f,p)=>r.jsx("li",{children:f},p))})]})]},h)};return r.jsx("ul",{className:u(s(),o),children:t.map(c)})};class ml extends y.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,a){console.error("ErrorBoundary caught an error:",e,a),this.props.onError?.(e,a)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:r.jsxs("div",{style:{padding:"20px",border:"1px solid red",margin:"10px"},children:[r.jsx("h2",{children:"Something went wrong"}),r.jsxs("p",{children:["Error: ",this.state.error?.message||"Unknown error"]}),r.jsx("button",{onClick:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}}class vl extends y.Component{constructor(e){super(e),this.retryTimer=null,this.sendErrorToMonitoring=(a,o)=>{try{typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(a,{contexts:{react:{componentStack:o.componentStack}},tags:{errorBoundary:!0,componentName:this.props.componentName||"unknown",lazyLoading:!0}}),typeof window<"u"&&window.gtag&&window.gtag?.("event","exception",{description:a.message,fatal:!1,custom_map:{component:this.props.componentName||"unknown"}})}catch{}},this.handleRetry=()=>{const{maxRetries:a=3,retryDelay:o=1e3}=this.props,{retryCount:n}=this.state;if(n>=a)return;this.setState({isRetrying:!0}),this.retryTimer&&clearTimeout(this.retryTimer);const s=o*Math.pow(2,n);this.retryTimer=setTimeout(()=>{this.setState({hasError:!1,error:null,errorInfo:null,retryCount:n+1,isRetrying:!1})},s)},this.handleReload=()=>{window.location.reload()},this.state={hasError:!1,error:null,errorInfo:null,retryCount:0,isRetrying:!1,lastErrorTime:0}}static getDerivedStateFromError(e){return{hasError:!0,error:e,lastErrorTime:Date.now()}}componentDidCatch(e,a){const{onError:o,componentName:n}=this.props;this.setState({error:e,errorInfo:a}),console.error(`LazyErrorBoundary caught an error in ${n||"Unknown Component"}:`,e,a),o?.(e,a),this.sendErrorToMonitoring(e,a)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{children:e,fallback:a,componentName:o,showRetryButton:n=!0,maxRetries:s=3}=this.props,{hasError:l,error:g,isRetrying:c,retryCount:i}=this.state;return l&&g?a||r.jsx("div",{className:"lazy-error-boundary error-boundary-container",children:r.jsxs("div",{className:"error-content",children:[r.jsx("div",{className:"error-icon",children:"⚠️"}),r.jsxs("h3",{className:"error-title",children:["Something went wrong loading ",o||"this component"]}),r.jsxs("div",{className:"error-details",children:[r.jsx("p",{className:"error-message",children:g.message}),process.env.NODE_ENV==="development"&&r.jsxs("details",{className:"error-stack",children:[r.jsx("summary",{children:"Error Details (Development)"}),r.jsx("pre",{children:g.stack})]})]}),r.jsxs("div",{className:"error-actions",children:[n&&i<s&&r.jsx("button",{onClick:this.handleRetry,disabled:c,className:"retry-button",children:c?"Retrying...":`Retry (${i}/${s})`}),i>=s&&r.jsx("button",{onClick:this.handleReload,className:"reload-button",children:"Reload Page"})]}),r.jsxs("div",{className:"error-help",children:[r.jsx("p",{children:"This might be a temporary issue. Try refreshing the page."}),navigator.onLine===!1&&r.jsx("p",{className:"offline-notice",children:"You appear to be offline. Check your connection and try again."})]})]})}):e}}const xl=({children:t})=>r.jsx(r.Fragment,{children:t}),kl=({children:t})=>r.jsx(r.Fragment,{children:t}),wl=(t,e,a)=>{const o=y.memo(t,e);return a&&(o.displayName=`Memo(${a})`),process.env.NODE_ENV==="development"?n=>(y.useMemo(()=>{let l=0;return()=>++l},[])(),r.jsx(o,{...n})):o},Cl=(t,e)=>y.memo(t,(a,o)=>e.every(n=>a[n]===o[n])),Nl=y.memo(({children:t,compute:e,deps:a})=>{const o=y.useRef(a),n=y.useRef(e),s=y.useRef(void 0),l=y.useMemo(()=>{const g=a.length!==o.current.length||a.some((i,h)=>i!==o.current[h]),c=e!==n.current;if(g||c||s.current===void 0){let i;return process.env.NODE_ENV==="development"?(performance.now(),i=e(),performance.now()):i=e(),o.current=a,n.current=e,s.current=i,i}return s.current},[e,a]);return r.jsx(r.Fragment,{children:t(l)})}),Sl=y.memo(({item:t,index:e,style:a,renderItem:o})=>r.jsx("div",{style:a,children:o(t,e)}),(t,e)=>t.index===e.index&&t.item===e.item&&t.style.height===e.style.height&&t.style.top===e.style.top),El=y.memo(({condition:t,children:e,fallback:a=null})=>t?r.jsx(r.Fragment,{children:e}):r.jsx(r.Fragment,{children:a})),Ll=({children:t,threshold:e=.1,rootMargin:a="50px",fallback:o=null})=>{const[n,s]=y.useState(!1),l=y.useRef(null);return y.useEffect(()=>{const g=new IntersectionObserver(([c])=>{c.isIntersecting&&(s(!0),g.disconnect())},{threshold:e,rootMargin:a});return l.current&&g.observe(l.current),()=>g.disconnect()},[e,a]),r.jsx("div",{ref:l,children:n?t:o})},Il=({children:t,maxRenderTime:e=16,onSlowRender:a})=>{const o=y.useRef(0);return y.useLayoutEffect(()=>{o.current=performance.now()}),y.useEffect(()=>{const n=performance.now()-o.current;n>e&&a?.(n)}),r.jsx(r.Fragment,{children:t})},Ml=({children:t,batchSize:e=5,delay:a=0})=>{const[o,n]=y.useState(e);return y.useEffect(()=>{if(o<t.length){const s=setTimeout(()=>{n(l=>Math.min(l+e,t.length))},a);return()=>clearTimeout(s)}},[o,t.length,e,a]),r.jsx(r.Fragment,{children:t.slice(0,o)})},$l=({src:t,alt:e,placeholder:a,lowQualitySrc:o,aspectRatio:n="16/9",eager:s=!1,className:l="",...g})=>{const[c,i]=y.useState(!1),[h,b]=y.useState(s),[x,m]=y.useState(!1),f=y.useRef(null),p=y.useRef(null);y.useEffect(()=>{if(s){b(!0);return}return p.current=new IntersectionObserver(k=>{k.forEach(N=>{N.isIntersecting&&(b(!0),p.current&&f.current&&p.current.unobserve(f.current))})},{rootMargin:"50px",threshold:.01}),f.current&&p.current.observe(f.current),()=>{p.current&&p.current.disconnect()}},[s]);const C=()=>{i(!0)},S=()=>{m(!0)};return r.jsxs("div",{className:`relative overflow-hidden ${l}`,style:{aspectRatio:n},children:[o&&!c&&r.jsx("img",{src:o,alt:"",className:"absolute inset-0 w-full h-full object-cover blur-sm","aria-hidden":"true"}),!o&&!c&&r.jsx("div",{className:"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse","aria-hidden":"true"}),h&&!x&&r.jsx("img",{ref:f,src:t,alt:e,onLoad:C,onError:S,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${c?"opacity-100":"opacity-0"}`,loading:s?"eager":"lazy",...g}),x&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800",children:r.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[r.jsx("svg",{className:"mx-auto h-12 w-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r.jsx("p",{className:"text-sm",children:"Failed to load image"})]})})]})},Ul=({children:t,backgroundClassName:e="",contentClassName:a=""})=>r.jsx("div",{className:e,children:r.jsx("div",{className:a,children:t})}),Tl=({title:t,description:e})=>r.jsxs("div",{className:"mb-8",children:[r.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:t}),e&&r.jsx("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:e})]}),Al=({isSelected:t,onClick:e,icon:a,label:o,description:n,className:s=""})=>r.jsxs("div",{onClick:e,className:`relative flex items-start p-4 cursor-pointer transition-all border-b border-gray-200 dark:border-gray-700 last:border-b-0 group ${s}`,children:[t&&r.jsx("div",{className:"absolute inset-1 bg-blue-500/10 dark:bg-blue-400/10 rounded-lg pointer-events-none"}),r.jsxs("div",{className:"relative z-10 flex items-start w-full",children:[a&&r.jsx(a,{className:`h-5 w-5 mt-0.5 mr-3 flex-shrink-0 transition-colors ${t?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:`font-medium transition-colors ${t?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-gray-100 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`,children:o}),n&&r.jsx("div",{className:`text-xs mt-0.5 transition-colors ${t?"text-blue-500 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}`,children:n})]})]})]}),Pl=({masterTitle:t,masterSubtitle:e,backButtonText:a,masterContent:o,detailContent:n,detailTitle:s,mobileView:l="navigation",onBackToNavigation:g,masterClassName:c="",detailClassName:i="",detailTitleClassName:h="",masterWidth:b=320,stickyMaster:x=!0,stickyTopOffset:m=96,desktopGap:f=32,showMasterBackground:p=!0,enableAnimations:C=!0,animationDuration:S=300,animationRef:k})=>{const N=`gap-${Math.round(f/4)}`||"gap-8",v=F=>F?F.split("-")[0].trim():"Back",w=a?v(a):t?v(t):"Back",[L,M]=y.useState(!1),[I,$]=y.useState("auto"),A=y.useRef(null),z=y.useRef(null);y.useEffect(()=>(k&&(k.current={triggerTransition:F=>{if(!C){F();return}if(A.current){const q=A.current.scrollHeight;$(q)}M(!0),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{F(),setTimeout(()=>{if(A.current){const q=A.current.scrollHeight;$(q),setTimeout(()=>{$("auto"),M(!1)},S)}},50)},S/2)}}),()=>{z.current&&clearTimeout(z.current)}),[C,S,k]);const P=C?{height:I==="auto"?"auto":`${I}px`,transition:`height ${S}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},W=C?`${L?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",j=C?{transition:`opacity ${S}ms ease-in-out, transform ${S}ms ease-in-out`}:{};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`md:hidden ${l==="navigation"?"block":"hidden"} flex-1`,children:r.jsxs("div",{className:p?"bg-white dark:bg-gray-800 p-6":"p-6",children:[t&&r.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[r.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:t}),e&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:e})]}),r.jsx("div",{className:c,children:o})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[r.jsxs("div",{className:`md:hidden ${l==="content"?"block":"hidden"}`,children:[l==="content"&&g&&r.jsxs("button",{onClick:g,className:"mb-4 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:["← ",w]}),r.jsx("div",{ref:A,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${i}`,style:P,children:r.jsxs("div",{className:W,style:j,children:[s&&r.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${h}`,children:s}),n]})})]}),r.jsxs("div",{className:`hidden md:flex min-h-full ${N}`,style:{width:"100%"},children:[r.jsx("aside",{className:"flex-shrink-0",style:{width:`${b}px`,minWidth:`${b}px`},children:r.jsxs("div",{className:x?"sticky":"",style:x?{top:`${m}px`}:void 0,children:[t&&r.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:t}),e&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:e}),r.jsx("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${x?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${c}`,children:o})]})}),r.jsx("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${b+f}px)`},children:r.jsx("div",{ref:A,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${i}`,style:P,children:r.jsxs("div",{className:W,style:j,children:[s&&r.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${h}`,children:s}),n]})})})]})]})]})},zl=({contentType:t,aiSummary:e,technicalComplexity:a="intermediate"})=>r.jsxs(mt.Helmet,{children:[r.jsx("meta",{name:"ai:content-type",content:t}),r.jsx("meta",{name:"ai:summary",content:e}),r.jsx("meta",{name:"ai:complexity",content:a})]}),Dl=({children:t,className:e,...a})=>r.jsx("main",{className:e,...a,role:"main",children:t}),jl=({children:t})=>r.jsx(r.Fragment,{children:t}),se=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(e=>e.trim()).filter(Boolean):[],re=t=>({appName:t.appName,baseUrl:t.baseUrl,twitterHandle:t.twitterHandle||"",emailDomain:t.emailDomain||"example.com"}),Qe=t=>{const e=se(t.audience),a=re(t.branding);return{"@context":"https://schema.org","@type":"SoftwareApplication",name:a.appName,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",description:t.description,url:a.baseUrl,downloadUrl:`${a.baseUrl}/connect`,installUrl:`${a.baseUrl}/connect`,screenshot:`${a.baseUrl}/screenshots/app-preview.jpg`,aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"2500",bestRating:"5",worstRating:"1"},offers:[{"@type":"Offer",name:"Free Web3 Email",description:"Basic wallet-based email with unlimited sending",price:"0",priceCurrency:"USD",availability:"https://schema.org/InStock"},{"@type":"Offer",name:"Premium Web3 Email",description:"Advanced features with ENS/SNS domains and priority support",price:"2.00",priceCurrency:"USD",billingIncrement:"month",availability:"https://schema.org/InStock"}],featureList:["Passwordless wallet authentication","ENS domain email support (.eth)","Solana Name Service support (.sol)","Smart contract email integration","Multi-chain wallet compatibility","Cross-chain email addresses","DAO email delegation","Encrypted communication","Web2/Web3 bridge functionality","Point-based reward system"],applicationSubCategory:"Web3 Email Platform",audience:{"@type":"Audience",audienceType:e.join(", "),geographicArea:"Worldwide"},creator:{"@type":"Organization",name:a.appName,url:a.baseUrl},datePublished:"2024-01-01",dateModified:t.lastUpdated?.toISOString()||new Date().toISOString(),version:"1.0",softwareRequirements:"Web3 Wallet (MetaMask, Phantom, etc.)",storageRequirements:"5MB",memoryRequirements:"512MB RAM",supportingData:{blockchainNetworks:["Ethereum","Solana","Polygon","Arbitrum","Optimism"],supportedWallets:["MetaMask","Phantom","WalletConnect","Coinbase Wallet"],smartContractSupport:!0,ensCompatible:!0,snsCompatible:!0}}},Ze=t=>{const e=se(t.keywords),a=se(t.audience),o=re(t.branding);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:t.title,description:t.description,author:{"@type":"Organization",name:o.appName,url:o.baseUrl,logo:{"@type":"ImageObject",url:`${o.baseUrl}/logo.png`}},publisher:{"@type":"Organization",name:o.appName,logo:{"@type":"ImageObject",url:`${o.baseUrl}/logo.png`,width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:t.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`${o.baseUrl}${location.pathname}`},image:{"@type":"ImageObject",url:`${o.baseUrl}/og-images/technical-guide.jpg`,width:1200,height:630},keywords:e.join(", "),about:[{"@type":"Thing",name:"Web3 Email Platform"},{"@type":"Thing",name:"Blockchain Technology"},{"@type":"Thing",name:"Decentralized Communication"}],audience:{"@type":"Audience",audienceType:a.join(", "),educationalLevel:t.complexity},educationalLevel:t.complexity,proficiencyLevel:t.complexity,learningResourceType:t.contentType,timeRequired:t.readingTime?`PT${t.readingTime}M`:"PT5M",inLanguage:"en",isAccessibleForFree:!0,license:"https://creativecommons.org/licenses/by/4.0/",teaches:t.relatedTopics||["Web3 email setup","Wallet connection process","Blockchain authentication","Smart contract integration"]}},Bl=(t,e)=>{const a=re(e);return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:t.map(o=>({"@type":"Question",name:o.question,acceptedAnswer:{"@type":"Answer",text:o.answer,dateCreated:new Date().toISOString(),upvoteCount:Math.floor(Math.random()*50)+10,author:{"@type":"Organization",name:a.appName}},answerCount:1,upvoteCount:Math.floor(Math.random()*100)+20,dateCreated:"2024-01-01T00:00:00Z",category:o.category||"General"}))}},Xe=t=>{const e=re(t.branding);return{"@context":"https://schema.org","@type":"WebPage",name:t.title,description:t.description,url:`${e.baseUrl}${location.pathname}`,primaryImageOfPage:{"@type":"ImageObject",url:`${e.baseUrl}/og-images/ai-optimized.jpg`},significantLink:[`${e.baseUrl}/document`,`${e.baseUrl}/web3-users`,`${e.baseUrl}/web3-projects`,`${e.baseUrl}/connect`],relatedLink:t.relatedTopics?.map(a=>`${e.baseUrl}/search?q=${encodeURIComponent(a)}`)||[],about:{"@type":"Thing",name:"Web3 Email Communication",description:"Blockchain-based email platform using wallet authentication",sameAs:["https://en.wikipedia.org/wiki/Web3","https://en.wikipedia.org/wiki/Blockchain","https://en.wikipedia.org/wiki/Cryptocurrency_wallet"]},mentions:[{"@type":"SoftwareApplication",name:"MetaMask"},{"@type":"SoftwareApplication",name:"Phantom Wallet"},{"@type":"Thing",name:"Ethereum Name Service"},{"@type":"Thing",name:"Solana Name Service"}],isPartOf:{"@type":"WebSite","@id":e.baseUrl,name:e.appName},potentialAction:{"@type":"InteractAction",target:{"@type":"EntryPoint",urlTemplate:`${e.baseUrl}/connect`,actionPlatform:["https://schema.org/DesktopWebPlatform","https://schema.org/MobileWebPlatform"]},name:"Connect Web3 Wallet"}}},Wr=t=>{const e=se(t.keywords),a=re(t.branding);return{"og:title":t.title,"og:description":t.description,"og:type":"website","og:url":`${a.baseUrl}${location.pathname}`,"og:image":`${a.baseUrl}/og-images/${t.category}.jpg`,"og:image:width":"1200","og:image:height":"630","og:image:alt":`${t.title} - ${a.appName}`,"og:site_name":a.appName,"og:locale":"en_US","article:author":`${a.baseUrl}/about`,"article:section":t.category,"article:tag":e.join(","),"article:published_time":"2024-01-01T00:00:00Z","article:modified_time":t.lastUpdated?.toISOString()||new Date().toISOString()}},Or=t=>{const e=re(t.branding);return{"twitter:card":"summary_large_image","twitter:site":e.twitterHandle||"","twitter:creator":e.twitterHandle||"","twitter:title":t.title,"twitter:description":t.description,"twitter:image":`${e.baseUrl}/twitter-cards/${t.category}.jpg`,"twitter:image:alt":`${t.title} - ${e.appName}`,"twitter:label1":"Category","twitter:data1":t.category,"twitter:label2":"Reading Time","twitter:data2":t.readingTime?`${t.readingTime} min`:"5 min"}},Fr=t=>{const e=se(t.keywords),a=se(t.audience),o=re(t.branding);return{"ai:content-type":t.contentType,"ai:complexity":t.complexity,"ai:category":t.category,"ai:audience":a.join(","),"ai:keywords":e.join(","),"ai:reading-time":t.readingTime?.toString()||"5","web3:platform":"Email","web3:networks":"ethereum,solana,polygon","web3:wallets":"metamask,phantom,walletconnect","web3:features":"ens,sns,smart-contracts,multi-chain","llm:context":"Web3 email platform documentation and user guides","llm:domain":"blockchain,cryptocurrency,decentralized-communication","llm:use-case":"email,authentication,wallet-integration,smart-contracts","semantic:topic":t.category,"semantic:intent":"inform,guide,educate","semantic:entities":`${o.appName},Web3,blockchain,email,wallet`,"content:freshness":t.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},Wl=t=>({structuredData:{product:Qe(t),article:Ze(t),aiOptimized:Xe(t)},openGraph:Wr(t),twitterCard:Or(t),aiMetaTags:Fr(t),jsonLD:[Qe(t),Ze(t),Xe(t)]}),Ol={homepage:{title:"Revolutionary Web3 Email Platform | Wallet-Based Authentication",description:"Transform your email experience - the first Web3 email platform using wallet authentication. No passwords, enhanced security, ENS/SNS domain support, and smart contract integration.",keywords:["Web3 email","blockchain email","wallet authentication","ENS email","SNS email","decentralized email","smart contract integration"],category:"Web3 Platform",audience:["Crypto Users","Web3 Developers","DeFi Users","DAO Members"],complexity:"beginner",contentType:"overview",readingTime:3,relatedTopics:["Web3 authentication","Blockchain communication","Decentralized identity"]},documentation:{title:"Documentation - Complete Web3 Email Setup Guide",description:"Comprehensive documentation for Web3 email platform. Learn wallet connection, ENS/SNS setup, smart contract integration, and advanced features.",keywords:["Web3 email guide","wallet connection","ENS setup","SNS configuration","smart contract email","blockchain documentation"],category:"Technical Documentation",audience:["Developers","Technical Users","Web3 Enthusiasts"],complexity:"intermediate",contentType:"guide",readingTime:15,relatedTopics:["Wallet integration","Blockchain protocols","Email security"]},earnPoints:{title:"How to Earn Points - Web3 Email Rewards Guide",description:"Master the points system. Earn rewards through email activities, referrals, smart contract interactions, and prepare for future token distribution.",keywords:["Web3 rewards","email points","blockchain rewards","referral program","token preparation","crypto incentives"],category:"Rewards Guide",audience:["Token Farmers","Crypto Users","Web3 Users"],complexity:"beginner",contentType:"tutorial",readingTime:8,relatedTopics:["Token economics","Reward systems","Referral marketing"]}},Fl=t=>{const{level:e,text:a,className:o="",id:n,semanticContext:s="section"}=t,l=`h${e}`,g={1:"text-4xl md:text-5xl lg:text-6xl font-bold leading-tight",2:"text-3xl md:text-4xl font-bold leading-tight",3:"text-2xl md:text-3xl font-bold leading-tight",4:"text-xl md:text-2xl font-semibold leading-tight",5:"text-lg md:text-xl font-semibold leading-tight",6:"text-base md:text-lg font-medium leading-tight"},c={"page-title":"text-gray-900 dark:text-white mb-6",section:"text-gray-900 dark:text-white mb-4",subsection:"text-gray-900 dark:text-white mb-3",feature:"text-gray-900 dark:text-white mb-2",benefit:"text-blue-600 dark:text-blue-400 mb-2",step:"text-green-600 dark:text-green-400 mb-2"},i=[g[e],c[s],o].filter(Boolean).join(" "),h=n||a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return y.createElement(l,{id:h,className:i,"aria-level":e},a)},_={pageTitle:(t,e)=>({level:1,text:t,className:e,semanticContext:"page-title"}),majorSection:(t,e)=>({level:2,text:t,className:e,semanticContext:"section"}),feature:(t,e)=>({level:3,text:t,className:e,semanticContext:"feature"}),benefit:(t,e)=>({level:3,text:t,className:e,semanticContext:"benefit"}),step:(t,e,a)=>({level:3,text:e?`Step ${e}: ${t}`:t,className:a,semanticContext:"step"}),subFeature:(t,e)=>({level:4,text:t,className:e,semanticContext:"feature"})},Vl=t=>{const e=[],a=[],o=t.filter(n=>n.level===1).length;o===0?e.push("Missing H1 tag - every page should have exactly one H1"):o>1&&e.push(`Multiple H1 tags found (${o}) - use only one H1 per page`);for(let n=1;n<t.length;n++){const s=t[n],l=t[n-1];s.level>l.level+1&&e.push(`Heading level jump from H${l.level} to H${s.level} - avoid skipping levels`)}return t.forEach((n,s)=>{n.text.length<3&&e.push(`Heading ${s+1} is too short - use descriptive text`),n.text.length>70&&a.push(`Heading "${n.text.substring(0,30)}..." is long - consider shortening for better SEO`)}),{isValid:e.length===0,errors:e,suggestions:a}},Hl={walletConnection:_.pageTitle("Connect Your Web3 Wallet"),emailBenefits:_.majorSection("Why Choose Web3 Email?"),securityFeature:_.feature("Secure & Private"),ensIntegration:_.feature("ENS Domain Support"),multiChain:_.feature("Multi-Chain Compatibility"),passwordless:_.benefit("No Passwords Required"),setupStep1:_.step("Connect Your Wallet",1),setupStep2:_.step("Verify Your Identity",2),setupStep3:_.step("Access Your Emails",3)},ql=[{term:"Web3 Email",definition:"Email system that uses blockchain wallet addresses as authentication instead of traditional passwords",category:"Web3 Communication",synonyms:["blockchain email","decentralized email","crypto email"],relatedTerms:["wallet authentication","ENS email","SNS email"],examples:["vitalik.eth@example.com","alice.sol@example.com"],context:"Web3 email revolutionizes digital communication by eliminating passwords and using cryptographic signatures for authentication"},{term:"Wallet Authentication",definition:"Authentication method using cryptographic signatures from blockchain wallets instead of passwords",category:"Security",synonyms:["wallet-based auth","signature authentication","passwordless authentication"],relatedTerms:["EIP-712","SIWE","message signing"],examples:["MetaMask signature","Phantom wallet auth","WalletConnect login"],context:"Wallet authentication provides superior security through cryptographic proofs that cannot be phished or stolen like passwords"},{term:"ENS Email",definition:"Email addresses using Ethereum Name Service domains (.eth) as identifiers",category:"Naming Systems",synonyms:["Ethereum name email",".eth email"],relatedTerms:["ENS","Ethereum domains","blockchain domains"],examples:["vitalik.eth","ethereum.eth"],context:"ENS emails provide human-readable addresses that resolve to Ethereum wallet addresses"},{term:"SNS Email",definition:"Email addresses using Solana Name Service domains (.sol) as identifiers",category:"Naming Systems",synonyms:["Solana name email",".sol email"],relatedTerms:["SNS","Solana domains","SPL domains"],examples:["anatoly.sol","solana.sol"],context:"SNS emails provide human-readable addresses for Solana ecosystem users"},{term:"Smart Contract Integration",definition:"Ability to send and receive emails triggered by blockchain smart contract events",category:"Blockchain Integration",synonyms:["contract notifications","on-chain email triggers"],relatedTerms:["event listeners","webhooks","contract automation"],examples:["DAO proposal notifications","DeFi alert emails","NFT sale confirmations"],context:"Smart contract integration enables automated communication based on blockchain events"},{term:"Multi-Chain Support",definition:"Compatibility with multiple blockchain networks for wallet authentication and email services",category:"Interoperability",synonyms:["cross-chain support","blockchain agnostic"],relatedTerms:["EVM chains","Solana","Layer 2"],examples:["Ethereum, Polygon, Arbitrum, Solana support"],context:"Multi-chain support ensures users from any blockchain ecosystem can use the email service"},{term:"DAO Email Delegation",definition:"System allowing DAOs to manage email communications through delegated authorities",category:"Governance",synonyms:["governance email","multi-sig email"],relatedTerms:["DAO governance","multi-signature","delegation"],examples:["Treasury notifications","Proposal alerts","Voting reminders"],context:"DAO email delegation enables decentralized organizations to manage communications efficiently"},{term:"Web2/Web3 Bridge",definition:"Technology enabling communication between traditional email systems and blockchain-based email",category:"Interoperability",synonyms:["email bridge","legacy integration"],relatedTerms:["SMTP gateway","email forwarding","protocol bridge"],examples:["Gmail to Web3 email","Outlook integration"],context:"Web2/Web3 bridge ensures compatibility with existing email infrastructure"}],_l=t=>({"@context":"https://schema.org","@type":"LearningResource",educationalLevel:t.difficulty,learningResourceType:"Technical Documentation",timeRequired:t.estimatedTime?`PT${t.estimatedTime}M`:void 0,teaches:t.learningObjectives,requires:t.prerequisites,about:{"@type":"Thing",name:t.domain,category:t.category,subcategory:t.subcategory},keywords:t.concepts,applicationExample:t.practicalApplications,isRelatedTo:t.relatedConcepts}),Gl=t=>{const e={nodes:t.map(a=>({id:a.term,label:a.term,category:a.category,definition:a.definition})),edges:[]};return t.forEach(a=>{a.relatedTerms?.forEach(o=>{t.find(s=>s.term===o)&&e.edges.push({source:a.term,target:o,relationship:"related_to"})}),a.synonyms?.forEach(o=>{e.edges.push({source:a.term,target:o,relationship:"synonym_of"})})}),e},Kl=t=>{const e=[];return t.examples?.forEach(a=>{e.push({text:a,label:t.term,type:"positive",confidence:1})}),t.context&&e.push({text:t.context,label:t.term,type:"contextual",confidence:.8}),e.push({text:`${t.term} is ${t.definition}`,label:t.term,type:"definition",confidence:1}),e},Yl=t=>{const e=[];return t.forEach(a=>{e.push({question:`What is ${a.term}?`,answer:a.definition,category:a.category,difficulty:"basic"}),a.context&&e.push({question:`How does ${a.term} work?`,answer:a.context,category:a.category,difficulty:"intermediate"}),a.examples&&a.examples.length>0&&e.push({question:`What are examples of ${a.term}?`,answer:a.examples.join(", "),category:a.category,difficulty:"basic"}),a.relatedTerms&&a.relatedTerms.length>0&&e.push({question:`What is ${a.term} related to?`,answer:`${a.term} is related to ${a.relatedTerms.join(", ")}`,category:a.category,difficulty:"intermediate"})}),e},Ql={homepage:{domain:"Web3 Email Platform",category:"Web3 Communication",concepts:["Web3 email","wallet authentication","passwordless login","blockchain messaging"],prerequisites:["Basic blockchain knowledge","Understanding of crypto wallets"],learningObjectives:["Understand Web3 email concepts","Learn wallet authentication","Explore blockchain communication"],difficulty:"beginner",estimatedTime:5,practicalApplications:["Secure email communication","DAO governance","DeFi notifications"]},documentation:{domain:"Web3 Email Technical Documentation",category:"Technical Guide",concepts:["API integration","smart contracts","wallet connection","email protocols"],prerequisites:["JavaScript/TypeScript","Web3 development basics","REST APIs"],learningObjectives:["Implement Web3 email","Integrate wallet authentication","Build on email API"],difficulty:"intermediate",estimatedTime:30,practicalApplications:["dApp integration","Email automation","Smart contract notifications"]},governance:{domain:"DAO Governance Communication",category:"Governance Tools",concepts:["DAO email","voting notifications","proposal tracking","multi-sig coordination"],prerequisites:["DAO basics","Governance understanding","Multi-signature wallets"],learningObjectives:["Setup DAO email","Configure voting alerts","Manage team communication"],difficulty:"advanced",estimatedTime:20,practicalApplications:["DAO operations","Treasury management","Governance participation"]}},Zl=({children:t,appName:e,appUrl:a,apiUrl:o})=>(y.useEffect(()=>{const n=()=>{[].forEach(f=>{const p=document.createElement("link");p.rel="preload",p.href=f.href,p.as=f.as,f.type&&(p.type=f.type),f.crossorigin&&(p.crossOrigin=""),document.head.appendChild(p)})},s=()=>{document.querySelectorAll('img[data-priority="high"]').forEach(p=>{p.fetchPriority="high"});const f=document.querySelector("[data-hero]");if(f){const p=f.getAttribute("data-bg-image");if(p){const C=document.createElement("link");C.rel="preload",C.href=p,C.as="image",document.head.appendChild(C)}}},l=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(p=>{const C=p;C.naturalWidth&&C.naturalHeight&&(C.width=C.naturalWidth,C.height=C.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(p=>{p.getAttribute("style")?.includes("min-height")||(p.style.minHeight="200px")})},g=()=>{const m=()=>{document.querySelectorAll("script[data-defer]").forEach(C=>{C.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{m()}):setTimeout(m,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(C=>{document.addEventListener(C,()=>{},{passive:!0})})})()},c=()=>{},i=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},...o?[{rel:"dns-prefetch",href:`//${o.replace(/^https?:\/\//,"")}`}]:[],{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},...o?[{rel:"preconnect",href:o}]:[]].forEach(f=>{const p=document.createElement("link");p.rel=f.rel,p.href=f.href,f.crossorigin&&(p.crossOrigin=""),document.head.appendChild(p)})},h=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(f=>{f.loading="lazy"}),"IntersectionObserver"in window){const f=new IntersectionObserver(C=>{C.forEach(S=>{if(S.isIntersecting){const k=S.target;k.dataset.src&&(k.src=k.dataset.src,k.removeAttribute("data-src")),f.unobserve(k)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(C=>f.observe(C))}},b=()=>{[{name:"ai-content-type",content:"web3-email-platform"},{name:"ai-primary-function",content:"wallet-based-email"},{name:"ai-supported-chains",content:"ethereum,solana,polygon,arbitrum,optimism"},{name:"ai-complexity-level",content:"beginner-to-advanced"},{name:"ai-target-users",content:"web3-users,crypto-enthusiasts,developers"},{name:"machine-readable",content:"true"},{name:"structured-data",content:"json-ld"},{name:"content-category",content:"technology,blockchain,communication"},{name:"interaction-model",content:"wallet-authentication"}].forEach(({name:C,content:S})=>{if(!document.querySelector(`meta[name="${C}"]`)){const k=document.createElement("meta");k.name=C,k.content=S,document.head.appendChild(k)}});const f={"@context":"https://schema.org","@type":"WebApplication",name:e,description:"Web3 email platform using blockchain wallet authentication",url:a,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},featureList:["Wallet-based authentication","ENS domain email support","SNS domain email support","Multi-chain compatibility","Smart contract integration","Web2/Web3 bridge"],audience:{"@type":"Audience",audienceType:"Web3 Users"}},p=document.createElement("script");p.type="application/ld+json",p.textContent=JSON.stringify(f),document.head.appendChild(p)},x=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(f=>{const p=f.cloneNode(!0);p.rel="preload",p.as="style",p.onload=()=>{p.onload=null,p.rel="stylesheet"},document.head.appendChild(p),f.remove()})};return n(),s(),l(),g(),i(),h(),b(),x(),setTimeout(c,2e3),()=>{}},[o,e,a]),r.jsx(r.Fragment,{children:t})),Xl=()=>(y.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const t=()=>{if("IntersectionObserver"in window){const g=new IntersectionObserver(c=>{c.forEach(i=>{if(i.isIntersecting){const h=i.target;h.dataset.src&&(h.src=h.dataset.src,h.removeAttribute("data-src"),g.unobserve(h))}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(c=>{g.observe(c)})}const n=()=>{["/connect","/mail","/settings"].forEach(c=>{const i=document.createElement("link");i.rel="prefetch",i.href=c,document.head.appendChild(i)})},s=()=>{if(!document.querySelector("script[data-wallet-detection]")){const g=document.createElement("script");g.dataset.walletDetection="true",g.innerHTML='(function() { window.walletPreload = { hasMetaMask: typeof window.ethereum !== "undefined", hasPhantom: typeof window.solana !== "undefined", hasWalletConnect: true }; })();',document.head.appendChild(g)}},l=()=>{document.querySelectorAll("img[data-hero]").forEach(g=>{const c=g;c.loading="eager","fetchPriority"in c&&(c.fetchPriority="high")}),document.querySelectorAll('img[data-priority="low"]').forEach(g=>{const c=g;c.loading="lazy","fetchPriority"in c&&(c.fetchPriority="low")})};requestIdleCallback(()=>{n(),s(),l()},{timeout:2e3})},e=()=>{if("PerformanceObserver"in window){const n=new PerformanceObserver(l=>{const g=l.getEntries(),c=g[g.length-1];c&&c.startTime>2500&&(document.documentElement.style.setProperty("--animation-duration","0s"),localStorage.setItem("reduce-image-quality","true"))});try{n.observe({entryTypes:["largest-contentful-paint"]})}catch{}const s=new PerformanceObserver(l=>{let g=0;for(const c of l.getEntries())c.hadRecentInput||(g+=c.value);g>.1&&document.querySelectorAll("img:not([width]):not([height])").forEach(c=>{const i=c;i.style.aspectRatio="16/9"})});try{s.observe({entryTypes:["layout-shift"]})}catch{}}},a=()=>{if("connection"in navigator&&typeof document<"u"&&document.documentElement){const n=navigator.connection;if(n){const s=n.effectiveType;s==="slow-2g"||s==="2g"?(document.documentElement.classList.add("slow-connection"),document.querySelectorAll('link[rel="prefetch"]').forEach(l=>{l.getAttribute("data-critical")||l.remove()}),localStorage.setItem("use-low-quality-images","true")):s==="3g"?document.documentElement.classList.add("moderate-connection"):document.documentElement.classList.add("fast-connection")}}};return(()=>{t(),e(),a()})(),()=>{if("PerformanceObserver"in window)try{PerformanceObserver.supportedEntryTypes.forEach(()=>{})}catch{}}},[]),null),Jl=({children:t})=>r.jsx(r.Fragment,{children:t}),Rl={user:{duration:300*1e3,maxSize:100,staleWhileRevalidate:!0},mailboxes:{duration:120*1e3,maxSize:50,staleWhileRevalidate:!0},addresses:{duration:600*1e3,maxSize:50,staleWhileRevalidate:!0},messages:{duration:30*1e3,maxSize:200,staleWhileRevalidate:!0},messageDetails:{duration:120*1e3,maxSize:100,staleWhileRevalidate:!1},messageCount:{duration:10*1e3,maxSize:20,staleWhileRevalidate:!0}};class ei{constructor(){this.cache=new Map}set(e,a,o){if(this.cache.size>=o.maxSize){const n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(e,{data:a,timestamp:Date.now(),isStale:!1})}get(e,a){const o=this.cache.get(e);if(!o)return null;const s=Date.now()-o.timestamp>a.duration;return s&&!a.staleWhileRevalidate?(this.cache.delete(e),null):{data:o.data,isStale:s}}invalidate(e){for(const a of this.cache.keys())a.includes(e)&&this.cache.delete(a)}clear(){this.cache.clear()}getStats(){return{size:this.cache.size,keys:Array.from(this.cache.keys()),memory:this.estimateMemoryUsage()}}estimateMemoryUsage(){return Array.from(this.cache.values()).reduce((e,a)=>e+JSON.stringify(a).length*2,0)}}const le=new ei,te=new Map,Vr=async(t,e,a="messages")=>{const o=Rl[a],n=le.get(t,o);if(n&&!n.isStale)return n.data;const s=te.get(t);if(s)return s;if(n&&n.isStale&&o.staleWhileRevalidate){const g=e().then(c=>(le.set(t,c,o),te.delete(t),c)).catch(c=>{throw te.delete(t),c});return te.set(t,g),n.data}const l=e().then(g=>(le.set(t,g,o),te.delete(t),g)).catch(g=>{throw te.delete(t),g});return te.set(t,l),l};class ri{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(e,a){return new Promise((o,n)=>{this.queue.push({key:e,fetcher:a,resolve:o,reject:n}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.processBatch()},this.batchDelay)})}async processBatch(){const e=[...this.queue];this.queue.length=0,this.timer=null;const a=this.groupRequests(e);for(const o of a)await Promise.allSettled(o.map(async n=>{try{const s=await n.fetcher();n.resolve(s)}catch(s){n.reject(s)}}))}groupRequests(e){const a=[];for(let n=0;n<e.length;n+=5)a.push(e.slice(n,n+5));return a}}const ti=new ri;class ai{constructor(e,a={}){this.requestInterceptors=[],this.responseInterceptors=[],this.baseURL=e,this.defaultHeaders=a}addRequestInterceptor(e){this.requestInterceptors.push(e)}addResponseInterceptor(e){this.responseInterceptors.push(e)}async request(e,a={},o,n="messages"){const s=`${this.baseURL}${e}`,l=o||`${a.method||"GET"}:${s}`,g=async()=>{let c={...a,headers:{...this.defaultHeaders,...a.headers}};for(const h of this.requestInterceptors)c=h(c);let i=await fetch(s,c);for(const h of this.responseInterceptors)i=await h(i);if(!i.ok)throw new Error(`API Error: ${i.status} ${i.statusText}`);return i.json()};return a.method==="GET"&&this.shouldBatch(e)?ti.add(l,g):Vr(l,g,n)}shouldBatch(e){return e.includes("/messages/")&&!e.includes("/messages?")}async get(e,a){return this.request(e,{method:"GET"},void 0,a)}async post(e,a){return this.request(e,{method:"POST",body:JSON.stringify(a)})}async put(e,a){return this.request(e,{method:"PUT",body:JSON.stringify(a)})}async delete(e){return this.request(e,{method:"DELETE"})}}const oi=async(t,e=3,a=1e3)=>{let o;for(let n=0;n<=e;n++)try{return await t()}catch(s){if(o=s,n===e)throw o;const l=a*Math.pow(2,n)+Math.random()*1e3;await new Promise(g=>setTimeout(g,l))}throw o};class ni{constructor(){this.abortController=new AbortController}async request(e,a={}){const o=await fetch(e,{...a,signal:this.abortController.signal});if(!o.ok)throw new Error(`HTTP ${o.status}: ${o.statusText}`);return o.json()}cancel(){this.abortController.abort()}}const si={invalidate:t=>le.invalidate(t),clear:()=>le.clear(),getStats:()=>le.getStats(),warmUp:async t=>{await Promise.allSettled(t.map(e=>e()))},prefetch:async t=>{"requestIdleCallback"in window?window.requestIdleCallback(async()=>{await Promise.allSettled(t.map(e=>e()))}):setTimeout(async()=>{await Promise.allSettled(t.map(e=>e()))},100)}};function Hr(){if(typeof window>"u")return!1;const t=window.navigator.userAgent.toLowerCase();return["metamask","trustwallet","coinbase","rainbow","phantom","solflare","exodus","ledger","binance","okx"].some(a=>t.includes(a))}function qr(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function _r(){if(typeof window>"u")return!1;const t=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(t)}function Gr(){return qr()?"localhost":Hr()?"wallet-browser":_r()?"network":"production"}function li(){const t=Gr();return t==="localhost"||t==="wallet-browser"}function ii(t){}function Kr(){return typeof window<"u"}function di(){return typeof window<"u"}function ci(t,e){if(Kr())t();else return e}const Je=t=>({"default-src":["'self'"],"script-src":["'self'","'unsafe-inline'","'unsafe-eval'","https://fonts.googleapis.com","https://www.googletagmanager.com","https://www.google-analytics.com"],"style-src":["'self'","'unsafe-inline'","https://fonts.googleapis.com","https://fonts.gstatic.com"],"font-src":["'self'","https://fonts.gstatic.com","data:"],"img-src":["'self'","data:","https:","blob:"],"connect-src":["'self'",...t?.apiUrls||[],...t?.appUrls||[],"https://*.walletconnect.com","https://*.walletconnect.org","https://registry.walletconnect.com","https://relay.walletconnect.com","wss://*.walletconnect.com","wss://*.walletconnect.org","https://keys.coinbase.com","https://api.coinbase.com","https://www.walletlink.org","https://mainnet.infura.io","https://polygon-rpc.com","https://rpc.ankr.com","https://cloudflare-eth.com","https://eth-mainnet.alchemyapi.io","https://api.phantom.app","https://solana-api.projectserum.com","https://api.mainnet-beta.solana.com","https://api.devnet.solana.com","wss://api.phantom.app","wss://api.devnet.solana.com","wss://api.mainnet-beta.solana.com","https://bridge.arbitrum.io","https://polygon-mainnet.infura.io","https://optimism-mainnet.infura.io"],"frame-src":["'self'","https://verify.walletconnect.com","https://verify.walletconnect.org"],"worker-src":["'self'","blob:"],"child-src":["'self'","https://verify.walletconnect.com"],"object-src":["'none'"],"base-uri":["'self'"],"form-action":["'self'"]}),gi=Je(),Yr=t=>{const e=Je(t);return Object.entries(e).map(([a,o])=>`${a} ${o.join(" ")}`).join("; ")},Qr=t=>({"X-Frame-Options":"DENY","X-Content-Type-Options":"nosniff","X-XSS-Protection":"1; mode=block","Referrer-Policy":"strict-origin-when-cross-origin","Permissions-Policy":"camera=(), microphone=(), geolocation=(), interest-cohort=()","Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","Cross-Origin-Embedder-Policy":"credentialless","Cross-Origin-Opener-Policy":"same-origin-allow-popups","Cross-Origin-Resource-Policy":"cross-origin","Content-Security-Policy":Yr(t)}),ui=Qr(),hi={fonts:"public, max-age=31536000, immutable",images:"public, max-age=31536000, immutable",js:"public, max-age=31536000, immutable",css:"public, max-age=31536000, immutable",serviceWorker:"public, max-age=0, must-revalidate",manifest:"public, max-age=86400",api:"no-cache, no-store, must-revalidate"},bi=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",()=>{})},fi={walletConnections:"Always verify wallet signatures and never trust client-side data",rpcEndpoints:"Use reputable RPC providers and consider rate limiting",contractInteractions:"Validate all smart contract interactions on the backend",userInput:"Sanitize all user inputs, especially wallet addresses and transaction data",privateKeys:"Never log, store, or transmit private keys - they should remain in wallets only",phishing:"Implement strict CSP to prevent injection of malicious scripts that could steal wallet access"},Q=new Map,ue=new Map,Ee=new Set;let he="medium",Re=!1;function pi(){if("connection"in navigator){const a=navigator.connection;a&&(he=a.effectiveType==="4g"?"fast":a.effectiveType==="3g"?"medium":"slow")}const t=navigator.deviceMemory,e=navigator.hardwareConcurrency;Re=t&&t<4||e&&e<4}pi();function yi(t,e,a={}){const{retries:o=3,timeout:n=1e4,fallback:s,preloadCondition:l,cacheStrategy:g="memory",priority:c="medium",onLoad:i,onError:h}=a;if(Q.has(e))return Q.get(e).component;const b=y.lazy(async()=>{const m=performance.now();if(ue.has(e))return ue.get(e).then(p=>({default:p}));const f=mi(t,o,n);ue.set(e,f.then(p=>p.default));try{const p=await f,C=performance.now()-m;if(g!=="none"){const S={component:p.default,timestamp:Date.now(),loadTime:C};if(Q.set(e,S),g==="session")try{sessionStorage.setItem(`lazy_${e}`,JSON.stringify({timestamp:S.timestamp,loadTime:C}))}catch{}}return ue.delete(e),i?.(p.default),p}catch(p){throw ue.delete(e),h?.(p),p}}),x=m=>{const[f,p]=y.useState(!0);y.useEffect(()=>{if(l&&!Q.has(e)&&l()&&!Ee.has(e)){Ee.add(e);const k=vi(c,he);setTimeout(()=>{t().catch(()=>{})},k)}},[]);const C=s||r.jsxs("div",{className:"flex items-center justify-center p-4",children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsxs("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",e.replace(/([A-Z])/g," $1").trim(),"..."]})]});return!f&&Re&&he==="slow"?r.jsx("div",{className:"lazy-placeholder",children:r.jsxs("button",{onClick:()=>p(!0),className:"load-component-btn",children:["Load ",e]})}):r.jsx(y.Suspense,{fallback:C,children:r.jsx(b,{...m})})};return x.displayName=`AdvancedLazy(${e})`,x}async function mi(t,e,a){let o;for(let n=0;n<e;n++)try{const s=new Promise((g,c)=>{setTimeout(()=>c(new Error("Load timeout")),a)});return await Promise.race([t(),s])}catch(s){if(o=s,n<e-1){const l=Math.pow(2,n)*1e3,g=Math.random()*1e3;await new Promise(c=>setTimeout(c,l+g))}}throw o}function vi(t,e){const a={critical:0,high:500,medium:2e3,low:5e3},o={fast:.5,medium:1,slow:2},n=a[t]||2e3,s=o[e]||1;return n*s}const me=class me{static registerRoute(e,a){this.routeMap.set(e,a),this.routeUsageStats.set(e,0)}static setCurrentRoute(e){this.currentRoute=e;const a=this.routeUsageStats.get(e)||0;this.routeUsageStats.set(e,a+1),this.preloadLikelyRoutes(e)}static preloadLikelyRoutes(e){this.getRouteTransitionProbability(e).forEach(({route:o,probability:n})=>{n>.3&&!Q.has(o)&&setTimeout(()=>{this.routeMap.get(o)},he==="fast"?1e3:3e3)})}static getRouteTransitionProbability(e){const a=[];switch(e){case"/":a.push({route:"/connect",probability:.7},{route:"/about",probability:.2},{route:"/document",probability:.1});break;case"/connect":a.push({route:"/mail",probability:.8},{route:"/settings",probability:.1});break;case"/mail":a.push({route:"/compose",probability:.4},{route:"/settings",probability:.2});break;default:a.push({route:"/",probability:.1})}return a}static getStats(){return{routeCount:this.routeMap.size,cacheSize:Q.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};me.routeMap=new Map,me.routeUsageStats=new Map,me.currentRoute="";let er=me;const xi=({src:t,alt:e,className:a,placeholder:o,priority:n="medium"})=>{const[s,l]=y.useState(!1),[g,c]=y.useState(!1),i=y.useRef(null);y.useEffect(()=>{if(!i.current)return;if(n==="high"){c(!0);return}const b=new IntersectionObserver(([x])=>{x.isIntersecting&&(c(!0),b.unobserve(x.target))},{rootMargin:n==="low"?"100px":"200px",threshold:.1});return b.observe(i.current),()=>b.disconnect()},[n]);const h=()=>{l(!0)};return r.jsxs("div",{className:`lazy-image-container ${a}`,children:[r.jsx("img",{ref:i,src:g?t:o||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:e,className:`transition-opacity duration-300 ${s?"opacity-100":"opacity-0"}`,onLoad:h,loading:n==="high"?"eager":"lazy",fetchPriority:n==="high"?"high":"low"}),!s&&g&&r.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"})]})};function ki(){Q.clear(),Ee.clear()}function wi(){return{cachedComponents:Q.size,preloadQueue:Ee.size,networkSpeed:he,isLowEndDevice:Re,cacheEntries:Array.from(Q.entries()).map(([t,e])=>({name:t,loadTime:e.loadTime,age:Date.now()-e.timestamp}))}}const Ci=({message:t})=>r.jsxs("div",{className:"flex items-center justify-center p-4",children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),Ni=t=>{if(typeof t=="function"||typeof t=="object")return t;switch(t){case"minimal":return()=>r.jsx("div",{className:"flex justify-center items-center p-4",children:"Loading..."});case"skeleton":return()=>r.jsxs("div",{className:"animate-pulse",children:[r.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"}),r.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]});case"default":default:return()=>r.jsx(Ci,{message:"Loading component..."})}},Zr=(t,e="default",a=3)=>{const o=y.lazy(async()=>{let s=null;for(let l=0;l<a;l++)try{return await t()}catch(g){s=g,l<a-1&&await new Promise(c=>setTimeout(c,Math.pow(2,l)*1e3))}throw s}),n=Ni(e);return s=>r.jsx(y.Suspense,{fallback:r.jsx(n,{}),children:r.jsx(o,{...s})})},Si=async t=>{try{await t()}catch{}},Ei=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[a]=Zr(o,"skeleton")}),e},Li=t=>t,Xr={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},ve=class ve{static add(e,a){this.preloadedComponents.has(e)||(this.preloadQueue.push({name:e,loader:a}),this.processQueue())}static async processQueue(){this.isPreloading||this.preloadQueue.length===0||(this.isPreloading=!0,"requestIdleCallback"in window?window.requestIdleCallback(async()=>{const e=this.preloadQueue.shift();if(e)try{await e.loader(),this.preloadedComponents.add(e.name)}catch{}this.isPreloading=!1,this.processQueue()}):setTimeout(async()=>{const e=this.preloadQueue.shift();if(e)try{await e.loader(),this.preloadedComponents.add(e.name)}catch{}this.isPreloading=!1,this.processQueue()},100))}static isPreloaded(e){return this.preloadedComponents.has(e)}static clear(){this.preloadedComponents.clear(),this.preloadQueue=[],this.isPreloading=!1}};ve.preloadedComponents=new Set,ve.preloadQueue=[],ve.isPreloading=!1;let rr=ve;const Ii=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{Xr.secondary.forEach(t=>{})})},Jr=({message:t})=>r.jsxs("div",{className:"flex items-center justify-center p-4",children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),be=new Map;function Mi(t,e){const{condition:a,fallback:o,retries:n=3,timeout:s=1e4,priority:l="medium",cacheKey:g=`conditional-${Math.random()}`}=e,c=i=>{const[h,b]=y.useState(!1),[x,m]=y.useState(null);return y.useEffect(()=>{const C=setTimeout(async()=>{const S=be.get(g);if(S&&S.isValid&&Date.now()-S.lastCheck<3e5)try{if(await S.condition()){m(()=>S.component),b(!0);return}}catch{}try{if(await a()){const N=await Ti(t,n,s);be.set(g,{component:N.default,condition:a,lastCheck:Date.now(),isValid:!0}),m(()=>N.default),b(!0)}}catch{}},l==="high"?0:l==="medium"?100:500);return()=>clearTimeout(C)},[]),h?x?r.jsx(y.Suspense,{fallback:o||r.jsx(Jr,{message:"Loading component..."}),children:r.jsx(x,{...i})}):null:o||r.jsx(Jr,{message:"Checking conditions..."})};return c.displayName=`ConditionalLazy(${g})`,c}const $i={},Ui={};async function Ti(t,e,a){let o;for(let n=0;n<e;n++)try{const s=new Promise((l,g)=>{setTimeout(()=>g(new Error("Import timeout")),a)});return await Promise.race([t(),s])}catch(s){if(o=s,n<e-1){const l=Math.pow(2,n)*1e3;await new Promise(g=>setTimeout(g,l))}}throw o}function Ai(){be.clear()}function Pi(){return{cachedComponents:be.size,cacheEntries:Array.from(be.entries()).map(([t,e])=>({key:t,lastCheck:e.lastCheck,isValid:e.isValid,age:Date.now()-e.lastCheck}))}}const Rr=[{name:"react-router",path:"/assets/react-router-*.js",size:12,config:{priority:"critical",condition:()=>!0}},{name:"app-core",path:"/assets/app-core-*.js",size:25,config:{priority:"high",condition:()=>window.location.pathname==="/",delay:1e3,onIdle:!0}},{name:"wagmi",path:"/assets/wagmi-*.js",size:15,config:{priority:"high",condition:()=>!!(window.ethereum||localStorage.getItem("walletconnect")),onIdle:!0}},{name:"wc-ethereum",path:"/assets/wc-ethereum-*.js",size:273,config:{priority:"medium",condition:()=>!!window.ethereum,delay:2e3,onHover:!0}},{name:"solana-core",path:"/assets/solana-core-*.js",size:29,config:{priority:"medium",condition:()=>!!(window.solana||window.phantom),delay:1500}},{name:"mail-features",path:"/assets/mail-features-*.js",size:10,config:{priority:"medium",condition:()=>window.location.pathname.includes("/connect")||localStorage.getItem("wallet-connected")==="true",onScroll:20}},{name:"coinbase",path:"/assets/coinbase-*.js",size:75,config:{priority:"low",condition:()=>!!window.ethereum,delay:5e3,onIdle:!0}},{name:"design-system",path:"/assets/design-system-*.js",size:112,config:{priority:"low",condition:()=>window.location.pathname.includes("/internal"),delay:3e3}}];class zi{constructor(){this.preloaded=new Set,this.networkSpeedEstimate="medium",this.isLowEndDevice=!1,this.userActivityScore=0,this.detectNetworkSpeed(),this.detectDeviceCapability(),this.startUserActivityTracking()}detectNetworkSpeed(){if("connection"in navigator){const a=navigator.connection;if(a){const o=a.effectiveType;o==="4g"?this.networkSpeedEstimate="fast":o==="3g"?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}}const e=performance.now();fetch("/favicon.ico",{method:"HEAD"}).then(()=>{const a=performance.now()-e;a<100?this.networkSpeedEstimate="fast":a<300?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}).catch(()=>{this.networkSpeedEstimate="slow"})}detectDeviceCapability(){const e=navigator.deviceMemory,a=navigator.hardwareConcurrency;e&&e<4&&(this.isLowEndDevice=!0),a&&a<4&&(this.isLowEndDevice=!0),"getBattery"in navigator&&navigator.getBattery?.().then(o=>{o.level&&o.level<.2&&(this.isLowEndDevice=!0)})}startUserActivityTracking(){let e;const a=()=>{this.userActivityScore=Math.min(this.userActivityScore+1,100),clearTimeout(e),e=setTimeout(()=>{this.userActivityScore=Math.max(this.userActivityScore-1,0)},5e3)};["click","scroll","keydown","mousemove"].forEach(o=>{document.addEventListener(o,a,{passive:!0})})}shouldPreload(e){return this.networkSpeedEstimate==="slow"&&e.size>50||this.isLowEndDevice&&e.size>30?!1:e.config.condition()}async preloadChunk(e){if(!this.preloaded.has(e.name))try{if(document.querySelectorAll('script[src*="'+e.name+'"]').length===0&&document.querySelectorAll('link[href*="'+e.name+'"]').length>0)return;const o=document.createElement("link");o.rel="modulepreload",o.href=e.path.replace("*",this.getChunkHash(e.name)),o.crossOrigin="","fetchPriority"in o&&(o.fetchPriority=e.config.priority==="critical"?"high":"low"),document.head.appendChild(o),this.preloaded.add(e.name)}catch{}}getChunkHash(e){const a=Array.from(document.querySelectorAll("script[src]"));for(const o of a){const n=o.src;if(n.includes(e)){const s=n.match(new RegExp(`${e}-([A-Za-z0-9_-]+)\\.js`));if(s)return s[1]}}return"unknown"}async schedulePreload(e){const a=e.config;return a.delay&&await new Promise(o=>setTimeout(o,a.delay)),a.onIdle&&"requestIdleCallback"in window?new Promise(o=>{window.requestIdleCallback(()=>{this.preloadChunk(e).then(o)})}):this.preloadChunk(e)}initializePreloading(){Rr.sort((a,o)=>{const n={critical:0,high:1,medium:2,low:3};return n[a.config.priority]-n[o.config.priority]}).forEach(a=>{this.shouldPreload(a)&&(a.config.priority==="critical"?this.preloadChunk(a):this.schedulePreload(a),a.config.onHover&&this.setupHoverPreloading(a),a.config.onScroll&&this.setupScrollPreloading(a,a.config.onScroll))}),this.startIntelligentPreloading()}setupHoverPreloading(e){document.querySelectorAll("[data-preload-on-hover]").forEach(o=>{let n=!1;o.addEventListener("mouseenter",()=>{!n&&this.userActivityScore>30&&(this.preloadChunk(e),n=!0)},{passive:!0})})}setupScrollPreloading(e,a){let o=!1;const n=()=>{if(o)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=a&&(this.preloadChunk(e),o=!0,window.removeEventListener("scroll",n))};window.addEventListener("scroll",n,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&Rr.filter(a=>a.config.priority==="medium"&&this.shouldPreload(a)).forEach(a=>{Math.random()>.5&&this.schedulePreload(a)})},1e4)}getPreloadingStats(){return{preloadedCount:this.preloaded.size,networkSpeed:this.networkSpeedEstimate,isLowEndDevice:this.isLowEndDevice,userActivity:this.userActivityScore}}}let fe=null;function Di(){fe||(fe=new zi,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{fe?.initializePreloading()}):fe.initializePreloading())}function ji(){return fe?.getPreloadingStats()}function Bi(t){const e={"ai-content-type":t.contentType,"ai-primary-topic":t.primaryTopic,"ai-complexity-level":t.complexityLevel,"ai-content-purpose":t.contentPurpose,"ai-industry-vertical":t.industryVertical,"ai-semantic-keywords":t.semanticKeywords.join(","),"ai-target-audience":t.targetAudience.join(","),"ai-technical-tags":t.technicalTags.join(","),"ai-user-intent":t.userIntent.join(","),"ai-conversion-goals":t.conversionGoals.join(","),"ai-content-authority":"expert-level","ai-content-freshness":"high","ai-content-completeness":"comprehensive","ai-content-accuracy":"verified","ai-indexable":"true","ai-crawl-priority":"high","ai-content-language":"en","ai-content-region":"global","ai-content-novelty":"innovative","ai-engagement-score":"90","ai-shareability-index":"high","ai-conversion-likelihood":"85%","ai-user-satisfaction-prediction":"high"};return t.contentType==="governance-page"&&(e["ai-governance-features"]="voting-notifications,multi-sig-coordination,proposal-tracking",e["ai-dao-platforms"]="snapshot,tally,aragon,safe,decentdao",e["ai-participation-boost"]="85%",e["ai-treasury-management"]="enabled"),e}function et(t){const e={"@context":"https://schema.org","@type":Fi(t.contentType),name:t.primaryTopic,description:`Comprehensive ${t.primaryTopic} resource for ${t.targetAudience.join(", ")}`,about:t.semanticKeywords.map(a=>({"@type":"Thing",name:a})),audience:{"@type":"Audience",audienceType:t.targetAudience.join(", ")},educationalLevel:t.complexityLevel,inLanguage:"en",isAccessibleForFree:!0};return t.contentType==="governance-page"?{...e,"@type":"SoftwareApplication",applicationCategory:"GovernanceApplication",operatingSystem:"Web Browser",featureList:["Smart voting notifications","Multi-signature wallet coordination","Automated proposal tracking","Cross-platform DAO integration","Treasury management tools"],isRelatedTo:[{"@type":"SoftwareApplication",name:"Snapshot"},{"@type":"SoftwareApplication",name:"Tally"},{"@type":"SoftwareApplication",name:"Aragon"},{"@type":"SoftwareApplication",name:"Safe"}]}:e}function Wi(t,e){return e.map(a=>({type:"related-content",target:a.url,strength:a.relevance}))}function rt(t){const e=["Web3 Email Platform","Web3","blockchain","email","wallet","cryptocurrency"],a=["DAO","governance","voting","multi-sig","Snapshot","Tally","Aragon","Safe","proposal","community"];return t.contentType==="governance-page"?[...e,...a]:e}function tt(t){const e=["web3-infrastructure","email-technology","blockchain-applications"],a=["dao-governance-tools","voting-notification-systems","community-management-platforms","multi-signature-coordination","treasury-management-solutions"];return t.contentType==="governance-page"?[...e,...a]:e}function Oi(t,e){return{contentClassification:{type:t.contentType,topic:t.primaryTopic,audience:t.targetAudience.join(","),complexity:t.complexityLevel,purpose:t.contentPurpose,vertical:t.industryVertical},semanticMarkup:et(t),entityRecognition:rt(t),topicClustering:tt(t),contentRelationships:e?.contentRelationships||[],...e}}function Fi(t){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[t]||"WebPage"}function Vi(t){return{"@context":"https://schema.org","@type":"MonitorAction",name:`AI Performance Tracking - ${t}`,instrument:{"@type":"SoftwareApplication",name:"AI Analytics Platform"},measurementTechnique:["User Engagement Metrics","AI Content Understanding Score","Semantic Relevance Analysis","Conversion Optimization Tracking"],result:{"@type":"Dataset",name:`${t} Performance Data`,description:"AI-optimized performance metrics and user interaction data"}}}const Hi={governancePage:{contentType:"governance-page",primaryTopic:"DAO Governance Communication Platform",semanticKeywords:["DAO governance","voting notifications","multi-sig coordination","proposal tracking","community engagement","treasury management"],targetAudience:["DAO members","governance participants","multi-sig signers","protocol teams","community managers"],complexityLevel:"intermediate",contentPurpose:"commercial",industryVertical:"blockchain-governance",technicalTags:["snapshot","tally","aragon","safe","multi-sig","voting","proposals","treasury"],userIntent:["improve-governance","increase-participation","coordinate-multi-sig","track-proposals","engage-community"],conversionGoals:["dao-integration","governance-setup","multi-sig-connection","notification-activation"]},landingPage:{contentType:"landing-page",primaryTopic:"Web3 Email Platform",semanticKeywords:["Web3 email","wallet authentication","ENS email","SNS email","blockchain email","decentralized communication"],targetAudience:["Web3 users","crypto enthusiasts","blockchain developers","DeFi users"],complexityLevel:"beginner",contentPurpose:"commercial",industryVertical:"web3-communication",technicalTags:["ethereum","solana","ens","sns","wallet-connect","metamask","phantom"],userIntent:["create-web3-email","connect-wallet","secure-communication","eliminate-passwords"],conversionGoals:["wallet-connection","email-creation","first-email-sent","premium-upgrade"]}},qi=({message:t,className:e})=>r.jsxs("div",{className:`flex items-center justify-center p-4 ${e||""}`,children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),tr=new Map,pe=new Set;function ar(){const t=[];return!!window.ethereum?.isMetaMask&&(pe.add("metamask"),t.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(pe.add("coinbase"),t.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(pe.add("phantom"),t.push({name:"Phantom",detected:!0,priority:3})),t.push({name:"WalletConnect",detected:!0,priority:4}),t.sort((n,s)=>n.priority-s.priority)}function or(t){const e=`wallet-${t.toLowerCase()}`;if(tr.has(e))return tr.get(e);const a=()=>Promise.resolve({default:()=>y.createElement("div",{},`${t} Provider Placeholder`)}),o=y.lazy(a),n=s=>r.jsx(y.Suspense,{fallback:r.jsx(qi,{message:`Loading ${t} wallet...`,className:"wallet-loading"}),children:r.jsx(o,{...s})});return n.displayName=`Lazy${t}Provider`,tr.set(e,n),n}function _i({children:t}){const e=ar();return e.filter(a=>a.priority<=2&&a.detected).forEach(a=>{setTimeout(()=>{},1e3)}),r.jsxs(r.Fragment,{children:[e.map(a=>{const o=or(a.name);return r.jsx(o,{},a.name)}),t]})}const ir=class ir{static preloadWallet(e){const a=e.toLowerCase();this.preloadedWallets.has(a)||(this.preloadedWallets.add(a),setTimeout(()=>{or(e)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((a,o)=>{setTimeout(()=>{this.preloadWallet(a)},o*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};ir.preloadedWallets=new Set;let ye=ir;function Gi(){return{availableWallets:ar(),preloadWallet:o=>{ye.preloadWallet(o)},getDetectedWallets:()=>Array.from(pe),hasWallet:o=>pe.has(o.toLowerCase())}}function Ki({walletName:t,onConnect:e,disabled:a=!1}){const o=()=>{ye.preloadWallet(t),setTimeout(e,100)};return r.jsxs("button",{onClick:o,disabled:a,className:"wallet-connect-btn","data-wallet":t.toLowerCase(),children:["Connect ",t]})}class Yi{constructor(){this.criticalResources=[],this.observedMetrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0},this.defineCriticalResources(),this.startPerformanceObservation()}defineCriticalResources(){this.criticalResources=[{url:"/assets/index-*.css",type:"style",priority:"critical",preload:!0},{url:"/assets/index-*.js",type:"script",priority:"critical"},{url:"/assets/react-core-*.js",type:"script",priority:"high",preload:!0},{url:"https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2",type:"font",priority:"critical",preload:!0},{url:"/logo.png",type:"image",priority:"high",preload:!0}]}startPerformanceObservation(){if("PerformanceObserver"in window)try{new PerformanceObserver(s=>{for(const l of s.getEntries())l.name==="first-contentful-paint"&&(this.observedMetrics.fcp=l.startTime,this.optimizeBasedOnFCP(l.startTime))}).observe({entryTypes:["paint"]}),new PerformanceObserver(s=>{for(const l of s.getEntries())this.observedMetrics.lcp=l.startTime,this.optimizeBasedOnLCP(l.startTime)}).observe({entryTypes:["largest-contentful-paint"]});let o=0;new PerformanceObserver(s=>{for(const l of s.getEntries())l.hadRecentInput||(o+=l.value);this.observedMetrics.cls=o}).observe({entryTypes:["layout-shift"]})}catch{}window.addEventListener("load",()=>{setTimeout(()=>{const e=performance.getEntriesByType("navigation")[0];e&&(this.observedMetrics.ttfb=e.responseStart-e.requestStart,this.optimizeBasedOnTTFB(this.observedMetrics.ttfb))},0)})}optimizeBasedOnFCP(e){e>2e3?this.applyEmergencyOptimizations():e>1500&&this.applyMediumOptimizations()}optimizeBasedOnLCP(e){e>2500&&this.optimizeLCPElements()}optimizeBasedOnTTFB(e){e>600&&this.enableAggressiveCaching()}applyEmergencyOptimizations(){document.querySelectorAll('img[data-priority="low"]').forEach(o=>{o.loading="lazy",o.style.display="none",setTimeout(()=>{o.style.display=""},3e3)}),document.querySelectorAll('script[data-priority="low"]').forEach(o=>{o.setAttribute("defer","")})}applyMediumOptimizations(){["/assets/app-core-*.js","/assets/react-router-*.js"].forEach(a=>{this.preloadResource(a,"script")})}optimizeLCPElements(){document.querySelectorAll("img[data-hero], [data-lcp-element]").forEach(o=>{o instanceof HTMLImageElement&&(o.fetchPriority="high",o.loading="eager")});const a=document.querySelector("img[data-hero]")?.getAttribute("src");a&&this.preloadResource(a,"image")}enableAggressiveCaching(){const e=document.createElement("meta");e.httpEquiv="Cache-Control",e.content="public, max-age=31536000, immutable",document.head.appendChild(e)}preloadResource(e,a){if(document.querySelector(`link[href*="${e}"]`))return;const n=document.createElement("link");switch(n.rel="preload",n.href=e,a){case"script":n.as="script";break;case"style":n.as="style";break;case"font":n.as="font",n.type="font/woff2",n.crossOrigin="";break;case"image":n.as="image";break}document.head.appendChild(n)}optimizeCriticalPath(){this.criticalResources.filter(e=>e.priority==="critical"&&e.preload).forEach(e=>{this.preloadResource(e.url,e.type)}),this.inlineCriticalCSS(),this.optimizeFontLoading(),this.removeRenderBlocking(),this.setupProgressiveLoading()}inlineCriticalCSS(){const e=document.querySelector('link[rel="stylesheet"][data-critical]');e&&this.isSmallResource(e.getAttribute("href")||"")&&fetch(e.getAttribute("href")||"").then(a=>a.text()).then(a=>{if(a.length<1e4){const o=document.createElement("style");o.textContent=a,document.head.appendChild(o),e.remove()}}).catch(()=>{})}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(a=>{const o=a.getAttribute("href")||"";if(!o.includes("display=swap")){const n=o.includes("?")?"&":"?";a.setAttribute("href",`${o}${n}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(a=>{const o=a.cloneNode(!0);o.rel="preload",o.as="style",o.onload=()=>{o.onload=null,o.rel="stylesheet"};const n=document.createElement("noscript"),s=a.cloneNode(!0);n.appendChild(s),document.head.appendChild(o),document.head.appendChild(n),a.remove()})}setupProgressiveLoading(){const e=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const a=new IntersectionObserver(o=>{o.forEach(n=>{if(n.isIntersecting){const s=n.target;s.src=s.dataset.src||"",s.removeAttribute("data-src"),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});e.forEach(o=>a.observe(o))}else e.forEach(a=>{const o=a;o.src=o.dataset.src||""})}isSmallResource(e){return e.includes("critical")||e.includes("inline")}getPerformanceMetrics(){return{...this.observedMetrics,score:this.calculatePerformanceScore()}}calculatePerformanceScore(){let e=100;return this.observedMetrics.fcp>2e3?e-=20:this.observedMetrics.fcp>1500&&(e-=10),this.observedMetrics.lcp>2500?e-=25:this.observedMetrics.lcp>2e3&&(e-=15),this.observedMetrics.cls>.1?e-=15:this.observedMetrics.cls>.05&&(e-=8),this.observedMetrics.ttfb>600?e-=10:this.observedMetrics.ttfb>400&&(e-=5),Math.max(e,0)}}const Le={mark:t=>{typeof performance<"u"&&performance.mark&&performance.mark(t)},measure:(t,e,a)=>{if(typeof performance<"u"&&performance.measure)try{performance.measure(t,e,a);const o=performance.getEntriesByName(t);return o[o.length-1]?.duration||0}catch{return 0}return 0},getEntries:t=>typeof performance<"u"&&performance.getEntriesByName?t?performance.getEntriesByName(t):performance.getEntries():[],clearEntries:t=>{typeof performance<"u"&&(t?(performance.clearMeasures?.(t),performance.clearMarks?.(t)):(performance.clearMeasures?.(),performance.clearMarks?.()))}},Qi=(t,e=[])=>{y.useEffect(()=>(Le.mark(`${t}-start`),()=>{Le.mark(`${t}-end`),Le.measure(t,`${t}-start`,`${t}-end`)}),[t,e])},Zi=t=>{const e=y.useRef(t);return e.current=t,y.useCallback((...a)=>e.current(...a),[])},Xi=(t,e,a)=>{const o=y.useRef(e),n=y.useRef(void 0);return y.useMemo(()=>(a&&process.env.NODE_ENV==="development"&&e.some((s,l)=>s!==o.current[l]),o.current=e,n.current=t(),n.current),[t,a,e])},Ie=new Map,Ji=t=>{const e=Ie.get(t)||0;Ie.set(t,e+1),y.useEffect(()=>{process.env.NODE_ENV})},Ri=()=>Object.fromEntries(Ie),ed=()=>Ie.clear(),rd=t=>y.lazy(t),td=(t=.1)=>{const[e,a]=y.useState(new Set),o=y.useRef(null);y.useEffect(()=>(o.current=new IntersectionObserver(s=>{s.forEach(l=>{if(l.isIntersecting){const g=l.target,c=g.dataset.src;c&&(g.src=c,g.onload=()=>{a(i=>new Set(i).add(c))},o.current?.unobserve(g))}})},{threshold:t}),()=>o.current?.disconnect()),[t]);const n=y.useCallback(s=>{s&&o.current&&o.current.observe(s)},[]);return{loadedImages:e,observeImage:n}},ad=t=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{t().catch(()=>{})}):setTimeout(()=>{t().catch(()=>{})},100)},at={},od=t=>{at[t.name]=t.value,process.env.NODE_ENV},nd=()=>at,sd=(t,e="script")=>{if(typeof document<"u"){const a=document.createElement("link");a.rel="prefetch",a.href=t,a.as=e,document.head.appendChild(a)}},ld=(t,e="script",a)=>{if(typeof document<"u"){const o=document.createElement("link");o.rel="preload",o.href=t,o.as=e,a&&(o.crossOrigin="anonymous"),document.head.appendChild(o)}},id=t=>{const e=y.useRef(new Set),a=y.useRef(new Set),o=y.useCallback((s,l)=>{const g=setTimeout(()=>{e.current.delete(g),s()},l);return e.current.add(g),g},[]),n=y.useCallback((s,l)=>{const g=setInterval(s,l);return a.current.add(g),g},[]);return y.useEffect(()=>{const s=e.current,l=a.current;return()=>{s.forEach(g=>clearTimeout(g)),l.forEach(g=>clearInterval(g)),process.env.NODE_ENV}},[t]),{createTimer:o,createInterval:n}},Z={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:t=>{const e=[];return t.FCP&&t.FCP>Z.maxFCP&&e.push(`FCP (${t.FCP}ms) exceeds budget (${Z.maxFCP}ms)`),t.LCP&&t.LCP>Z.maxLCP&&e.push(`LCP (${t.LCP}ms) exceeds budget (${Z.maxLCP}ms)`),t.FID&&t.FID>Z.maxFID&&e.push(`FID (${t.FID}ms) exceeds budget (${Z.maxFID}ms)`),t.CLS&&t.CLS>Z.maxCLS&&e.push(`CLS (${t.CLS}) exceeds budget (${Z.maxCLS})`),e}};class dd{constructor(e){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=e,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){ge.onCLS(e=>{this.metrics.CLS=e.value,this.reportMetric("CLS",e.value)}),ge.onINP(e=>{this.metrics.INP=e.value,this.reportMetric("INP",e.value)}),ge.onFCP(e=>{this.metrics.FCP=e.value,this.reportMetric("FCP",e.value)}),ge.onLCP(e=>{this.metrics.LCP=e.value,this.reportMetric("LCP",e.value)}),ge.onTTFB(e=>{this.metrics.TTFB=e.value,this.reportMetric("TTFB",e.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const e=new PerformanceObserver(o=>{o.getEntries().forEach(s=>{if(s.entryType==="navigation"){const l=s;this.metrics.bundleLoadTime=l.loadEventEnd-l.fetchStart}})});try{e.observe({entryTypes:["navigation"]}),this.observers.push(e)}catch{}const a=new PerformanceObserver(o=>{o.getEntries().forEach(s=>{(s.name.includes(".js")||s.name.includes(".css"))&&this.trackResourceLoad(s.name,s.duration)})});try{a.observe({entryTypes:["resource"]}),this.observers.push(a)}catch{}}}collectDeviceInfo(){if(typeof window<"u"){const e=navigator;e.connection&&(this.metrics.connection=e.connection.effectiveType||e.connection.type),e.deviceMemory&&(this.metrics.deviceMemory=e.deviceMemory),e.hardwareConcurrency&&(this.metrics.hardwareConcurrency=e.hardwareConcurrency),this.metrics.viewport={width:window.innerWidth,height:window.innerHeight}}}reportMetric(e,a){this.reportCallback&&this.reportCallback({...this.metrics,timestamp:Date.now()}),process.env.NODE_ENV}trackResourceLoad(e,a){const o=e.includes(".js"),n=e.includes(".css");if(o||n){const s=o?"JavaScript":"CSS";this.reportMetric(`${s} Load`,a)}}measureComponentRender(e,a){this.metrics.componentRenderTime=a,this.reportMetric(`Component Render (${e})`,a)}measureAPICall(e,a){this.metrics.apiResponseTime=a,this.reportMetric(`API Call (${e})`,a)}measureRouteChange(e,a){this.metrics.routeChangeTime=a,this.reportMetric(`Route Change (${e})`,a)}markStart(e){this.performanceMarks.set(e,performance.now())}markEnd(e){const a=this.performanceMarks.get(e);if(a){const o=performance.now()-a;this.reportMetric(`Mark (${e})`,o),this.performanceMarks.delete(e)}}trackRouteChange(e,a,o){typeof a=="string"?this.measureRouteChange(a,o||performance.now()):this.measureRouteChange(e,a)}getSummary(){return{coreWebVitals:{score:this.calculateScore(),LCP:this.metrics.LCP,INP:this.metrics.INP,CLS:this.metrics.CLS},loadingPerformance:{FCP:this.metrics.FCP,TTFB:this.metrics.TTFB,bundleLoadTime:this.metrics.bundleLoadTime},runtime:{routeChangeTime:this.metrics.routeChangeTime,apiResponseTime:this.metrics.apiResponseTime,componentRenderTime:this.metrics.componentRenderTime},device:{connection:this.metrics.connection,deviceMemory:this.metrics.deviceMemory,hardwareConcurrency:this.metrics.hardwareConcurrency}}}calculateScore(){let e=100;return this.metrics.LCP&&this.metrics.LCP>2500?e-=25:this.metrics.LCP&&this.metrics.LCP>2e3&&(e-=15),this.metrics.INP&&this.metrics.INP>200?e-=20:this.metrics.INP&&this.metrics.INP>100&&(e-=10),this.metrics.CLS&&this.metrics.CLS>.1?e-=15:this.metrics.CLS&&this.metrics.CLS>.05&&(e-=8),Math.max(e,0)}getMetrics(){return{...this.metrics}}cleanup(){this.observers.forEach(e=>e.disconnect()),this.observers=[]}}let Me=null;const cd=t=>(Me||(Me=new dd(t)),Me),$e=()=>Me,ot=t=>{const e=y.useRef(performance.now());y.useEffect(()=>{const a=performance.now()-e.current,o=$e();o&&o.measureComponentRender(t,a)},[t])},gd=(t,e)=>y.forwardRef((a,o)=>(ot(e),y.createElement(t,{...a,ref:o}))),ud=async(t,e)=>{const a=performance.now(),o=await t(),n=performance.now()-a,s=$e();return s&&s.measureAPICall(e,n),o},nt={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},hd=(t,e=nt)=>{const a=[];return e.LCP&&t.LCP&&t.LCP>e.LCP&&a.push(`LCP: ${t.LCP.toFixed(0)}ms (budget: ${e.LCP}ms)`),e.INP&&t.INP&&t.INP>e.INP&&a.push(`INP: ${t.INP.toFixed(0)}ms (budget: ${e.INP}ms)`),e.CLS&&t.CLS&&t.CLS>e.CLS&&a.push(`CLS: ${t.CLS.toFixed(3)} (budget: ${e.CLS})`),e.FCP&&t.FCP&&t.FCP>e.FCP&&a.push(`FCP: ${t.FCP.toFixed(0)}ms (budget: ${e.FCP}ms)`),e.TTFB&&t.TTFB&&t.TTFB>e.TTFB&&a.push(`TTFB: ${t.TTFB.toFixed(0)}ms (budget: ${e.TTFB}ms)`),{passed:a.length===0,violations:a}},bd=t=>{const e=t||$e()?.getMetrics()||{timestamp:Date.now()},a={timestamp:new Date().toISOString(),metrics:e,environment:{userAgent:typeof window<"u"?window.navigator.userAgent:"unknown",url:typeof window<"u"?window.location.href:"unknown",referrer:typeof document<"u"?document.referrer:"unknown",viewport:e.viewport,connection:e.connection,deviceMemory:e.deviceMemory,hardwareConcurrency:e.hardwareConcurrency}};return JSON.stringify(a,null,2)},fd=(t={})=>{const{successMessage:e="",successDuration:a=3e3,errorPrefix:o="",onSuccess:n,onError:s}=t,[l,g]=y.useState(!1),[c,i]=y.useState(""),[h,b]=y.useState(""),x=y.useCallback(()=>{i(""),b("")},[]),m=y.useCallback(()=>{i("")},[]),f=y.useCallback(()=>{b("")},[]),p=y.useCallback(async C=>{g(!0),x();try{await C(),e&&(i(e),a>0&&setTimeout(()=>{i("")},a)),n&&n()}catch(S){const k=S instanceof Error?S.message:"An error occurred";throw b(o?`${o}: ${k}`:k),s&&S instanceof Error&&s(S),S}finally{g(!1)}},[e,a,o,n,s,x]);return{isSubmitting:l,successMessage:c,errorMessage:h,submit:p,clearMessages:x,clearSuccess:m,clearError:f}},pd=(t=!1)=>{const[e,a]=y.useState(t),o=y.useCallback(()=>a(!0),[]),n=y.useCallback(()=>a(!1),[]),s=y.useCallback(()=>a(l=>!l),[]);return{value:e,setTrue:o,setFalse:n,toggle:s,setValue:a}},yd=t=>{if(t===0)return"0 Bytes";const e=1024,a=["Bytes","KB","MB","GB","TB"],o=Math.floor(Math.log(t)/Math.log(e)),n=Math.min(o,a.length-1);return parseFloat((t/Math.pow(e,n)).toFixed(2))+" "+a[n]},md=(t,e,a)=>{const o={bytes:0,kb:1,mb:2,gb:3,tb:4},n=1024,l=t*Math.pow(n,o[e])/Math.pow(n,o[a]);return Math.round(l*100)/100},vd=t=>{const e=t.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!e)return null;const a=parseFloat(e[1]),o=e[2].toLowerCase(),s={bytes:1,byte:1,kb:1024,mb:1024*1024,gb:1024*1024*1024,tb:1024*1024*1024*1024}[o];return s?Math.round(a*s):null},xd=t=>t,kd=t=>{if(typeof document>"u")return;const e=document.createElement("style");e.textContent=t,e.setAttribute("data-critical","true"),document.head.appendChild(e)},wd=t=>{if(typeof document>"u")return;const e=document.createElement("link");e.rel="preload",e.as="style",e.href=t,e.onload=()=>{e.rel="stylesheet"},document.head.appendChild(e);const a=document.createElement("noscript");a.innerHTML=`<link rel="stylesheet" href="${t}">`,document.head.appendChild(a)},Cd=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[`--${a}`]=typeof o=="number"?`${o}px`:o}),e},Nd={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Sd=(t,e=Nd)=>{const[a,o]=y.useState("base");return y.useEffect(()=>{const n=()=>{const s=window.innerWidth;s>=e["2xl"]?o("2xl"):s>=e.xl?o("xl"):s>=e.lg?o("lg"):s>=e.md?o("md"):s>=e.sm?o("sm"):s>=e.xs?o("xs"):o("base")};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),t[a]||t.base||{}},st=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,Ed=()=>{const[t,e]=y.useState(st);return y.useEffect(()=>{const a=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{e(a.matches)};return a.addEventListener?a.addEventListener("change",o):a.addListener(o),()=>{a.removeEventListener?a.removeEventListener("change",o):a.removeListener(o)}},[]),t},Ld=(t,e=["layout","paint"])=>{t&&(t.style.contain=e.join(" "))},Id=(t,e)=>t?(t.style.willChange=e.join(", "),()=>{t.style.willChange="auto"}):void 0,Md=t=>{typeof window>"u"||requestAnimationFrame(()=>{t.forEach(e=>e())})},$d=(...t)=>t.filter(Boolean).join(" "),Ud=t=>{const e={},a=["display","position","width","height","margin","padding","fontSize","fontFamily","color","backgroundColor"];return Object.entries(t).forEach(([o,n])=>{a.includes(o)&&(e[o]=n)}),e},Td=(t,e=[])=>{const[a,o]=y.useState(null),[n,s]=y.useState(!0);return y.useEffect(()=>{let l=!0;return t().then(g=>{l&&(o(g.default),s(!1))}),()=>{l=!1}},[t,...e]),{styles:a,loading:n}},Ad=(t,e="1rem")=>({display:"grid",gridTemplateColumns:`repeat(${t}, minmax(0, 1fr))`,gap:e,contain:"layout",willChange:"transform"}),Pd=(t="row",e="center",a="flex-start")=>({display:"flex",flexDirection:t,alignItems:e,justifyContent:a,contain:"layout"}),zd=t=>{const[e,a]=y.useState(!1);return y.useEffect(()=>{const o=window.matchMedia(t);a(o.matches);const n=()=>a(o.matches);return o.addEventListener?o.addEventListener("change",n):o.addListener(n),()=>{o.removeEventListener?o.removeEventListener("change",n):o.removeListener(n)}},[t]),e},Dd=(t,e)=>{const[a,o]=y.useState("light");return y.useEffect(()=>{const n=window.matchMedia("(prefers-color-scheme: dark)");o(n.matches?"dark":"light");const s=()=>{o(n.matches?"dark":"light")};return n.addEventListener?n.addEventListener("change",s):n.addListener(s),()=>{n.removeEventListener?n.removeEventListener("change",s):n.removeListener(s)}},[]),a==="dark"?e:t},jd=t=>{const e={src:t.src,alt:t.alt,loading:t.loading||"lazy"};return t.title&&(e.title=t.title),t.width&&(e.width=t.width),t.height&&(e.height=t.height),t.sizes&&(e.sizes=t.sizes),t.srcSet&&(e.srcSet=t.srcSet),e.itemProp="image",e},Bd=(t,e=[320,640,768,1024,1280,1920])=>e.map(a=>`${t.replace(/\{width\}/g,a.toString())} ${a}w`).join(", "),Wd=t=>t.map(e=>e.maxWidth?`(max-width: ${e.maxWidth}px) ${e.size}`:e.size).join(", "),Od=(t,e="openGraph")=>{const a={};return e==="openGraph"?(a["og:image"]=t.url,t.width&&(a["og:image:width"]=t.width.toString()),t.height&&(a["og:image:height"]=t.height.toString()),t.alt&&(a["og:image:alt"]=t.alt),t.type&&(a["og:image:type"]=t.type)):(a["twitter:image"]=t.url,t.alt&&(a["twitter:image:alt"]=t.alt)),a},Fd=(t='img[loading="lazy"]')=>{if(typeof window>"u"||!("IntersectionObserver"in window))return;const e=document.querySelectorAll(t);if("loading"in HTMLImageElement.prototype){e.forEach(o=>{o.dataset.src&&(o.src=o.dataset.src)});return}const a=new IntersectionObserver(o=>{o.forEach(n=>{if(n.isIntersecting){const s=n.target;s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});return e.forEach(o=>a.observe(o)),()=>{e.forEach(o=>a.unobserve(o))}},lt=()=>typeof window>"u"?Promise.resolve(!1):new Promise(t=>{const e=new Image;e.onload=e.onerror=function(){t(e.height===2)},e.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}),it=()=>typeof window>"u"?Promise.resolve(!1):new Promise(t=>{const e=new Image;e.onload=()=>t(!0),e.onerror=()=>t(!1),e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="}),Vd=async(t="jpg")=>{const[e,a]=await Promise.all([lt(),it()]);return a?"avif":e?"webp":t},Hd=(t,e,a,o)=>`
39
+ <picture>
40
+ ${t.map(s=>{const l=[`srcset="${s.srcSet}"`];return s.type&&l.push(`type="${s.type}"`),s.media&&l.push(`media="${s.media}"`),s.sizes&&l.push(`sizes="${s.sizes}"`),`<source ${l.join(" ")}>`}).join(`
41
+ `)}
42
+ <img src="${e}" alt="${a}"${o?` class="${o}"`:""} loading="lazy">
43
+ </picture>`.trim(),qd=(t,e="image")=>{if(typeof document>"u")return;const a=document.createElement("link");a.rel="preload",a.as=e,a.href=t,t.includes(".webp")?a.type="image/webp":t.includes(".avif")&&(a.type="image/avif"),document.head.appendChild(a)},_d=(t,e,a)=>{if(typeof window>"u")return;const o=new Image;o.src=t,o.classList.add("progressive-image-placeholder"),a.appendChild(o);const n=new Image;n.src=e,n.classList.add("progressive-image-main"),n.style.opacity="0",n.onload=()=>{a.appendChild(n),requestAnimationFrame(()=>{n.style.transition="opacity 0.3s",n.style.opacity="1",setTimeout(()=>{o.remove()},300)})}},Gd=t=>new Promise(e=>{const a=performance.now();t.complete?e({loadTime:0,size:0,format:t.src.split(".").pop()||"unknown",dimensions:{width:t.naturalWidth,height:t.naturalHeight},isLazyLoaded:t.loading==="lazy",isOptimized:t.srcset!==""||t.sizes!==""}):t.addEventListener("load",()=>{const o=performance.now()-a;e({loadTime:o,size:0,format:t.src.split(".").pop()||"unknown",dimensions:{width:t.naturalWidth,height:t.naturalHeight},isLazyLoaded:t.loading==="lazy",isOptimized:t.srcset!==""||t.sizes!==""})})}),Kd=(t,e,a="#e0e0e0")=>{const o=`
44
+ <svg width="${t}" height="${e}" xmlns="http://www.w3.org/2000/svg">
45
+ <rect width="100%" height="100%" fill="${a}"/>
46
+ </svg>
47
+ `;return`data:image/svg+xml;base64,${btoa(o)}`},Yd=(t,e)=>{const a=1/e*100;t.style.position="relative",t.style.paddingTop=`${a}%`;const o=t.querySelector("img");o&&(o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.style.objectFit="cover")},ie={createPureFunction:t=>t,isDevelopment:process.env.NODE_ENV==="development",isProduction:process.env.NODE_ENV==="production",isTest:process.env.NODE_ENV==="test",createFeatureFlags:(t={})=>({enableAnalytics:process.env.VITE_ENABLE_ANALYTICS==="true",enableDebugTools:process.env.NODE_ENV==="development",enablePerformanceMonitoring:process.env.VITE_ENABLE_PERF_MONITORING!=="false",...t})},Qd=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[a]=()=>{try{return o()}catch{return Promise.resolve({default:null})}}}),e},dt={createDebounce:t=>e=>{let a;return((...o)=>{clearTimeout(a),a=setTimeout(()=>e(...o),t)})},memoize:t=>{const e=new Map;return((...a)=>{const o=JSON.stringify(a);if(e.has(o))return e.get(o);const n=t(...a);return e.set(o,n),n})},isDeepEqual:(t,e)=>{if(t===e)return!0;if(t==null||e==null||typeof t!="object"||typeof e!="object")return!1;const a=Object.keys(t),o=Object.keys(e);if(a.length!==o.length)return!1;for(const n of a)if(!o.includes(n)||!dt.isDeepEqual(t[n],e[n]))return!1;return!0},createThrottle:t=>e=>{let a=0;return((...o)=>{const n=Date.now();if(n-a>=t)return a=n,e(...o)})}},Zd=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[a]={},Object.entries(o).forEach(([n,s])=>{e[a][n]=()=>import(s).then(l=>({[n]:l[n]}))})}),e},de={getModuleSize:t=>new Promise(e=>{if(typeof window<"u"&&"performance"in window){const o=performance.getEntriesByType("resource").find(n=>n.name.includes(t));e(o?.transferSize||0)}else e(0)}),usageTracker:new Set,trackUsage:t=>{ie.isDevelopment&&de.usageTracker.add(t)},getUsageReport:()=>ie.isDevelopment?Array.from(de.usageTracker).sort():[],estimateImpact:t=>{const e=t.map(a=>de.getModuleSize(a).then(o=>[a,o]));return Promise.all(e).then(a=>{const o={};let n=0;return a.forEach(([s,l])=>{o[s]=l,n+=l}),{total:n,modules:o}})}},ct={inlineCriticalCSS:t=>{if(typeof document<"u"){const e=document.createElement("style");e.textContent=t,document.head.appendChild(e)}},loadAsyncCSS:t=>{if(typeof document<"u"){const e=document.createElement("link");e.rel="stylesheet",e.href=t,e.media="print",e.onload=()=>{e.media="all"},document.head.appendChild(e)}},removeUnusedCSS:t=>{if(typeof document>"u")return;const e=new Set;return t.forEach(a=>{try{document.querySelector(a)&&e.add(a)}catch{}}),{used:Array.from(e),unused:t.filter(a=>!e.has(a))}}},Xd=(t={})=>{const{features:e={},criticalCSS:a="",enableUsageTracking:o=ie.isDevelopment}=t;return{features:ie.createFeatureFlags(e),initialize:()=>{a&&typeof document<"u"&&ct.inlineCriticalCSS(a)},cleanup:()=>{de.usageTracker.clear()},getReport:()=>({usage:de.getUsageReport(),features:ie.createFeatureFlags(e)})}};let nr;function Jd(t){throw typeof window<"u"?new Error("Web navigation service not implemented in shared library"):new Error("React Native navigation service not implemented in shared library")}function G(t){return nr||(nr=Jd()),nr}function Rd(){const t=G(),e=t.getCurrentState();return{navigate:(a,o)=>{t.navigate(a,o)},goBack:a=>{t.goBack(a)},replace:(a,o)=>{t.replace(a,o)},currentPath:e.currentPath,searchParams:e.searchParams,params:e.params,canGoBack:t.canGoBack(),isSupported:t.isSupported()}}function ec(){const e=G().getCurrentState(),a=Object.keys(e.searchParams).length>0?"?"+new URLSearchParams(e.searchParams).toString():"";return{pathname:e.currentPath,search:a,searchParams:e.searchParams,hash:"",state:{},key:e.currentPath}}function rc(){const t=G(),e=t.getCurrentState();return[new URLSearchParams(e.searchParams),n=>{const s=n instanceof URLSearchParams?Object.fromEntries(n.entries()):n,l=new URLSearchParams(s).toString(),g=e.currentPath+(l?`?${l}`:"");t.replace(g)}]}const ae={navigate:(t,e)=>{G().navigate(t,e)},goBack:t=>{G().goBack(t)},replace:(t,e)=>{G().replace(t,e)},getCurrentPath:()=>G().getCurrentPath(),getSearchParams:()=>G().getSearchParams(),goToMail:()=>{ae.navigate("/mail")},goToPreferences:()=>{ae.navigate("/preferences")},goToCompose:(t,e)=>{const a=new URLSearchParams;t&&a.set("type",t),e&&Object.entries(e).forEach(([n,s])=>{a.set(n,s)});const o=a.toString();ae.navigate(`/mail/compose${o?`?${o}`:""}`)},goToConnect:()=>{ae.navigate("/connect")},goToDelegate:()=>{ae.navigate("/admin/delegate")},goToHome:()=>{ae.navigate("/")},canGoBack:()=>G().canGoBack()};function tc(t,e=3,a=1e3){return y.lazy(()=>new Promise((o,n)=>{const s=l=>{t().then(o).catch(g=>{l>0?setTimeout(()=>{s(l-1)},a):n(g)})};s(e)}))}function ac(t){let e=null;const a=()=>(e||(e=t()),e.then(()=>{}));return{Component:y.lazy(()=>e||t()),preload:a}}function oc(t,e={}){const{fallback:a=r.jsx("div",{children:"Loading..."}),errorFallback:o=r.jsx("div",{children:"Failed to load component"}),loadingDelay:n=200,minimumLoadingTime:s=500}=e,l=y.lazy(async()=>{const c=Date.now();try{const i=await t(),h=Date.now()-c;return h<s&&await new Promise(b=>setTimeout(b,s-h)),i}catch{return{default:(()=>o)}}}),g=()=>{const[c,i]=y.useState(!1);return y.useEffect(()=>{const h=setTimeout(()=>{i(!0)},n);return()=>clearTimeout(h)},[]),c?r.jsx(r.Fragment,{children:a}):null};return y.forwardRef((c,i)=>r.jsx(y.Suspense,{fallback:r.jsx(g,{}),children:r.jsx(l,{...c,ref:i})}))}function gt(t,e={}){const[a,o]=y.useState(!1),[n,s]=y.useState(!1);return y.useEffect(()=>{const l=t.current;if(!l||n)return;const g=new IntersectionObserver(([c])=>{c.isIntersecting&&(o(!0),s(!0),g.disconnect())},{rootMargin:"50px",threshold:.01,...e});return g.observe(l),()=>{g.disconnect()}},[t,e,n]),a}const nc=({children:t,fallback:e=r.jsx("div",{children:"Loading..."}),threshold:a=.01,rootMargin:o="50px",placeholder:n})=>{const s=y.useRef(null),l=gt(s,{threshold:a,rootMargin:o});return r.jsx("div",{ref:s,children:l?t:n||e})};function sc(t){const{importFn:e,preloadOnHover:a=!0,preloadOnFocus:o=!0,prefetchDelay:n=50}=t;let s=null,l=null;const g=()=>(l||(l=e()),l),c=()=>{s&&clearTimeout(s),s=setTimeout(()=>{g()},n)};return{Component:y.lazy(()=>l||e()),preload:g,linkProps:{...a&&{onMouseEnter:c,onMouseLeave:()=>{s&&clearTimeout(s)}},...o&&{onFocus:c}}}}function lc(t,e=[]){const[a,o]=y.useState(null),[n,s]=y.useState(!0),[l,g]=y.useState(null);return y.useEffect(()=>{let c=!0;return s(!0),g(null),t().then(i=>{c&&(o(i),s(!1))}).catch(i=>{c&&(g(i),s(!1))}),()=>{c=!1}},[t,...e]),{module:a,loading:n,error:l}}class ut{constructor(e=3,a=100){this.queue=new Set,this.isProcessing=!1,this.batchSize=e,this.delay=a}add(e){this.queue.add(e),this.process()}async process(){if(this.isProcessing||this.queue.size===0)return;this.isProcessing=!0;const e=Array.from(this.queue).slice(0,this.batchSize);e.forEach(a=>this.queue.delete(a)),await Promise.all(e.map(a=>a().catch(()=>{}))),this.queue.size>0&&await new Promise(a=>setTimeout(a,this.delay)),this.isProcessing=!1,this.queue.size>0&&this.process()}}function ic(t,e,a){if(typeof document>"u")return;const o=document.createElement("link");o.rel=e,o.href=t,a&&(e==="preload"||e==="prefetch")&&(o.as=a),document.head.appendChild(o)}var sr=(t=>(t[t.HIGH=0]="HIGH",t[t.MEDIUM=1]="MEDIUM",t[t.LOW=2]="LOW",t[t.IDLE=3]="IDLE",t))(sr||{});class ht{constructor(){this.queues=new Map,this.isProcessing=!1,Object.values(sr).filter(e=>typeof e=="number").forEach(e=>{this.queues.set(e,[])})}load(e,a=1){const o=this.queues.get(a);o&&o.push(e),this.process()}async process(){if(!this.isProcessing){this.isProcessing=!0;for(const[e,a]of this.queues)for(;a.length>0;){const o=a.shift();if(o)try{await o()}catch{}e>=2&&await new Promise(n=>setTimeout(n,50))}this.isProcessing=!1}}}const dc=new ut,cc=new ht;class lr{constructor(e={}){this.prefix=e.prefix||"mailbox",this.defaultTTL=e.ttl,this.platformStorage=e.platformStorage||this.createFallbackStorage()}createFallbackStorage(){const e=new Map;return{getItem:a=>e.get(a)||null,setItem:(a,o)=>{e.set(a,o)},removeItem:a=>{e.delete(a)},clear:()=>{e.clear()},getAllKeys:()=>Array.from(e.keys())}}getKey(e){return`${this.prefix}-${e}`}isExpired(e){return e.ttl?Date.now()-e.timestamp>e.ttl:!1}set(e,a,o){try{const n={value:a,timestamp:Date.now(),ttl:o||this.defaultTTL};this.platformStorage.setItem(this.getKey(e),JSON.stringify(n))}catch{}}get(e,a){try{const o=this.platformStorage.getItem(this.getKey(e));if(!o)return a;const n=JSON.parse(o);return this.isExpired(n)?(this.remove(e),a):n.value}catch{return a}}remove(e){try{this.platformStorage.removeItem(this.getKey(e))}catch{}}clear(e){try{if(this.platformStorage.getAllKeys){const a=this.platformStorage.getAllKeys(),o=this.getKey(e||""),n=a.filter(s=>s.startsWith(o));for(const s of n)this.platformStorage.removeItem(s)}else this.platformStorage.clear?.()}catch(a){console.error("Failed to clear storage:",a)}}has(e){try{return this.platformStorage.getItem(this.getKey(e))!==null}catch(a){return console.error(`Failed to check item ${e}:`,a),!1}}getAllKeys(){try{if(this.platformStorage.getAllKeys){const e=this.platformStorage.getAllKeys(),a=`${this.prefix}-`;return e.filter(o=>o.startsWith(a)).map(o=>o.substring(a.length))}return[]}catch(e){return console.error("Failed to get all keys:",e),[]}}}const gc=new lr,uc=new lr({prefix:"mailbox-theme"}),hc=new lr({prefix:"walletUser",ttl:10080*60*1e3}),bc=t=>{if(!t)throw new Error("PlatformStorage must be provided to createSimpleStorage");return{setItem:(e,a)=>{try{t.setItem(e,a)}catch{}},getItem:e=>{try{return t.getItem(e)}catch{return null}},removeItem:e=>{try{t.removeItem(e)}catch{}}}};function bt(){const t={isWalletBrowser:!1,walletType:"unknown",hasEthereum:!1,hasSolana:!1,provider:null};if(typeof window>"u")return t;try{const e=navigator.userAgent.toLowerCase();let a="unknown",o=!1;e.includes("metamask")?(a="metamask",o=!0):e.includes("trustwallet")?(a="trustwallet",o=!0):e.includes("coinbase")?(a="coinbase",o=!0):e.includes("rainbow")?(a="rainbow",o=!0):e.includes("phantom")?(a="phantom",o=!0):e.includes("solflare")?(a="solflare",o=!0):e.includes("exodus")&&(a="exodus",o=!0);const n=!!window.ethereum,s=!!window.solana||!!window.phantom?.solana;(n||s)&&!o&&(o=!0,window.ethereum?.isMetaMask?a="metamask":window.ethereum?.isCoinbaseWallet?a="coinbase":window.ethereum?.isRainbow?a="rainbow":window.phantom?a="phantom":window.solflare&&(a="solflare"));const l=n?window.ethereum:s?window.solana||window.phantom?.solana:null;return{isWalletBrowser:o,walletType:a,hasEthereum:n,hasSolana:s,provider:l}}catch{return t}}async function fc(){const t=bt();if(!t.isWalletBrowser)return{success:!1,error:"Not running in a wallet browser"};try{if(t.hasEthereum&&t.provider)try{const e=await t.provider.request({method:"eth_requestAccounts"});if(e&&e.length>0)return{success:!0,address:e[0]}}catch{}if(t.hasSolana&&t.provider)try{const e=await t.provider.connect();if(e.publicKey)return{success:!0,address:e.publicKey.toString()}}catch{}return{success:!1,error:"Failed to connect to wallet provider"}}catch(e){return{success:!1,error:e instanceof Error?e.message:"Unknown connection error"}}}/**
48
+ * @sudobility/components v3.0.0
64
49
  *
65
50
  * A comprehensive React component library and design system.
51
+ * MAJOR VERSION: Reorganized structure for better maintainability.
66
52
  *
67
- * @version 1.4.0
68
53
  * @author John Qiu Huang
69
54
  * @license MIT
70
- */const _u={utils:{cn:y}};Object.defineProperty(u,"ArrowLeftIcon",{enumerable:!0,get:()=>A.ArrowLeftIcon}),Object.defineProperty(u,"ArrowRightIcon",{enumerable:!0,get:()=>A.ArrowRightIcon}),Object.defineProperty(u,"Bars3Icon",{enumerable:!0,get:()=>A.Bars3Icon}),Object.defineProperty(u,"BellIcon",{enumerable:!0,get:()=>A.BellIcon}),Object.defineProperty(u,"BellSlashIcon",{enumerable:!0,get:()=>A.BellSlashIcon}),Object.defineProperty(u,"ChartBarIcon",{enumerable:!0,get:()=>A.ChartBarIcon}),Object.defineProperty(u,"CheckCircleIcon",{enumerable:!0,get:()=>A.CheckCircleIcon}),Object.defineProperty(u,"CheckIcon",{enumerable:!0,get:()=>A.CheckIcon}),Object.defineProperty(u,"ChevronDownIcon",{enumerable:!0,get:()=>A.ChevronDownIcon}),Object.defineProperty(u,"ChevronLeftIcon",{enumerable:!0,get:()=>A.ChevronLeftIcon}),Object.defineProperty(u,"ChevronRightIcon",{enumerable:!0,get:()=>A.ChevronRightIcon}),Object.defineProperty(u,"ChevronUpIcon",{enumerable:!0,get:()=>A.ChevronUpIcon}),Object.defineProperty(u,"ClockIcon",{enumerable:!0,get:()=>A.ClockIcon}),Object.defineProperty(u,"CodeBracketIcon",{enumerable:!0,get:()=>A.CodeBracketIcon}),Object.defineProperty(u,"Cog6ToothIcon",{enumerable:!0,get:()=>A.Cog6ToothIcon}),Object.defineProperty(u,"CreditCardIcon",{enumerable:!0,get:()=>A.CreditCardIcon}),Object.defineProperty(u,"DocumentTextIcon",{enumerable:!0,get:()=>A.DocumentTextIcon}),Object.defineProperty(u,"EnvelopeIcon",{enumerable:!0,get:()=>A.EnvelopeIcon}),Object.defineProperty(u,"ExclamationTriangleIcon",{enumerable:!0,get:()=>A.ExclamationTriangleIcon}),Object.defineProperty(u,"EyeSlashIcon",{enumerable:!0,get:()=>A.EyeSlashIcon}),Object.defineProperty(u,"GlobeAltIcon",{enumerable:!0,get:()=>A.GlobeAltIcon}),Object.defineProperty(u,"HomeIcon",{enumerable:!0,get:()=>A.HomeIcon}),Object.defineProperty(u,"InboxIcon",{enumerable:!0,get:()=>A.InboxIcon}),Object.defineProperty(u,"InformationCircleIcon",{enumerable:!0,get:()=>A.InformationCircleIcon}),Object.defineProperty(u,"KeyIcon",{enumerable:!0,get:()=>A.KeyIcon}),Object.defineProperty(u,"MegaphoneIcon",{enumerable:!0,get:()=>A.MegaphoneIcon}),Object.defineProperty(u,"MinusIcon",{enumerable:!0,get:()=>A.MinusIcon}),Object.defineProperty(u,"PaperAirplaneIcon",{enumerable:!0,get:()=>A.PaperAirplaneIcon}),Object.defineProperty(u,"PaperClipIcon",{enumerable:!0,get:()=>A.PaperClipIcon}),Object.defineProperty(u,"PlusIcon",{enumerable:!0,get:()=>A.PlusIcon}),Object.defineProperty(u,"RocketLaunchIcon",{enumerable:!0,get:()=>A.RocketLaunchIcon}),Object.defineProperty(u,"ShieldCheckIcon",{enumerable:!0,get:()=>A.ShieldCheckIcon}),Object.defineProperty(u,"SparklesIcon",{enumerable:!0,get:()=>A.SparklesIcon}),Object.defineProperty(u,"StarIcon",{enumerable:!0,get:()=>A.StarIcon}),Object.defineProperty(u,"TrashIcon",{enumerable:!0,get:()=>A.TrashIcon}),Object.defineProperty(u,"UserGroupIcon",{enumerable:!0,get:()=>A.UserGroupIcon}),Object.defineProperty(u,"XMarkIcon",{enumerable:!0,get:()=>A.XMarkIcon}),Object.defineProperty(u,"CheckCircleIconSolid",{enumerable:!0,get:()=>he.CheckCircleIcon}),Object.defineProperty(u,"CheckIconSolid",{enumerable:!0,get:()=>he.CheckIcon}),Object.defineProperty(u,"ExclamationTriangleIconSolid",{enumerable:!0,get:()=>he.ExclamationTriangleIcon}),Object.defineProperty(u,"StarIconSolid",{enumerable:!0,get:()=>he.StarIcon}),u.AIMeta=Eu,u.AITrainingEnhancer=Pu,u.AI_TRAINING_CONFIGS=Fu,u.AddressLabel=Wo,u.AddressLink=Ko,u.Alert=Zo,u.AlertDescription=Xo,u.AlertTitle=Qo,u.AnimatedSection=ye,u.Avatar=Sd,u.Backdrop=Md,u.Badge=Cd,u.BatchRender=s0,u.BodyText=Wc,u.BorderAccent=fd,u.Breadcrumb=Ga,u.BreadcrumbSection=Fd,u.Button=de,u.CTASection=l0,u.CalloutBox=ds,u.CancellableRequest=k0,u.Card=It,u.CardContent=is,u.CardFooter=ls,u.CardHeader=ss,u.ChainBadge=Fr,u.CodeBlock=_d,u.CodeDisplay=pd,u.CollapsibleDocumentationTopic=Ud,u.CollapsibleEmailField=Wt,u.ComparisonSection=hs,u.ComponentPreloader=lr,u.ConditionalRender=a0,u.ConfirmationDialog=Yc,u.ContentContainer=xs,u.CopyButton=wd,u.DataTable=vs,u.Divider=xd,u.Dropdown=ws,u.EmailAccountsList=Us,u.EmailInputField=Bt,u.EmailInputGroup=si,u.EmptyState=qr,u.ErrorBoundary=Qd,u.ErrorBoundaryLazy=Xd,u.ExpensiveComponent=t0,u.ExternalLink=Pd,u.FadeInScale=rs,u.FadeInUp=ts,u.FeatureBlock=dd,u.FeatureCard=ks,u.FeatureGrid=As,u.FileIcon=Id,u.FlexContainer=Rs,u.FloatingElement=as,u.FormFieldGroup=nt,u.FormSection=ld,u.FreeEmailBanner=nd,u.GradientBanner=gd,u.GradientIconContainer=ud,u.HeroBannerWithBadge=Ts,u.IconButton=Td,u.IconContainer=ed,u.IconText=vd,u.InfoBox=md,u.InfoCard=cs,u.Input=zr,u.KYCLevelCard=Do,u.KYCStatusBadge=Mo,u.KeyValuePair=Ed,u.Label=Mt,u.LanguageSelector=Kd,u.LazyComponent=n0,u.LazyImage=B0,u.LazyLoadQueue=Nr,u.LazyWalletButton=du,u.LazyWrapper=io,u.LoadPriority=Pt,u.LoadingOptimizer=f0,u.LoadingOverlay=zd,u.LoadingState=ni,u.Logo=Wd,u.MasterDetailLayout=g0,u.MasterListItem=u0,u.MenuItem=Od,u.MetricsGrid=$s,u.Modal=Ua,u.ModalContent=Va,u.ModalFooter=qa,u.ModalHeader=Vc,u.NoContent=oi,u.OptimizedAPIClient=v0,u.OptimizedImage=i0,u.OptimizedRoutePreloader=p0,u.PageContainer=ti,u.PageHeader=d0,u.PageSectionHeader=kd,u.PageTitle=Oc,u.Pagination=$d,u.PerformanceBoundary=o0,u.PerformanceOptimizer=m0,u.PlatformSpecificComponents=Y0,u.PriorityLoader=Er,u.ProcessSteps=Ls,u.ProgressBar=yd,u.PromotionalBanner=Vd,u.PullToRefresh=Ms,u.RouteBasedLazyLoader=ir,u.SafeAppWrapper=Zd,u.Section=ai,u.SectionBadge=Lc,u.SectionHeader=zs,u.SectionTitle=Dc,u.SecurityProvider=Jd,u.Select=Ot,u.SelectContent=tt,u.SelectField=ci,u.SelectGroup=Os,u.SelectItem=rt,u.SelectLabel=Br,u.SelectScrollDownButton=Dt,u.SelectScrollUpButton=zt,u.SelectSeparator=Wr,u.SelectTrigger=et,u.SelectValue=Dr,u.SemanticHTML=Au,u.Separator=Dd,u.SettingsList=qs,u.SkeletonLoader=hd,u.SmartContent=Uc,u.SmartLink=nr,u.SmartWalletProviders=lu,u.Spinner=at,u.StandardPageLayout=c0,u.StatCard=sd,u.StatDisplay=bd,u.StatusBadge=Fs,u.StatusIndicator=ui,u.StepIndicator=Nd,u.StepList=Yd,u.SubscriptionGatedComponents=K0,u.SumsubWebSDK=Oo,u.Switch=jr,u.SystemStatusIndicator=Ic,u.TableOfContents=Bs,u.Tabs=Gs,u.TabsContent=Vr,u.TabsList=Hr,u.TabsTrigger=Ur,u.Tag=Ld,u.TextAreaField=li,u.TextField=ii,u.TextLink=Fc,u.Tooltip=Ad,u.TrackedButton=qd,u.TrackedLink=Gd,u.UseCaseGrid=Ks,u.VirtualListItem=r0,u.WEB3_CONCEPTS=zu,u.WEB3_EMAIL_HEADINGS=Ou,u.WEB3_HEADING_PATTERNS=re,u.WalletIcon=Bd,u.WalletPreloader=qe,u.addResourceHint=uo,u.aiOptimizationPresets=su,u.appStorage=fo,u.autoConnectWalletBrowser=yo,u.batchDOMUpdates=Pn,u.bundleAnalysis=Se,u.buttonVariants=Or,u.cacheHeaders=I0,u.cacheUtils=C0,u.checkPerformanceBudget=Co,u.clearComponentCache=W0,u.clearConditionalCache=X0,u.clearRenderCounts=bu,u.cn=y,u.combineClassNames=y,u.conditionalCSS=A0,u.convertFileSize=Eo,u.createAIMetaTags=mn,u.createAIOptimizedSchema=fr,u.createAdvancedLazyComponent=O0,u.createBreadcrumb=ro,u.createCSSVariables=kn,u.createComparisonData=$t,u.createConditionalImports=Yn,u.createConditionalLazyComponent=G0,u.createEmailComparisonData=bs,u.createEnhancedFAQSchema=Tu,u.createEnhancedOpenGraph=un,u.createEnhancedTwitterCard=gn,u.createFeature=Lt,u.createLazyComponent=rn,u.createLazyComponentFactory=yu,u.createLazyRoute=lo,u.createLazyWalletProvider=ur,u.createLibraryImports=V0,u.createMemoComponent=Rd,u.createOptimizedStyles=xn,u.createProgressiveComponent=so,u.createSecurityFeatures=Ps,u.createSelectiveExports=Qn,u.createSelectiveMemoComponent=e0,u.createSemanticHeading=Lu,u.createSimpleStorage=bo,u.createTechnicalArticleSchema=mr,u.createTreeShakingConfig=Xn,u.createUIComponents=U0,u.createWeb3ProductSchema=gr,u.criticalPathOptimizer=uu,u.cspDirectives=P0,u.cssOptimization=Cr,u.deadCodeElimination=Ce,u.default=_u,u.defaultPerformanceBudget=Tr,u.detectAvailableWallets=dr,u.detectWalletBrowser=Ar,u.exportPerformanceData=So,u.formatFileSize=No,u.generateAIMetaTags=tu,u.generateAIMetadata=Du,u.generateAIStructuredData=au,u.generateAdvancedSEO=Iu,u.generateCSP=en,u.generateCSPDirectives=or,u.generateConceptGraph=Bu,u.generateContentRelationships=ru,u.generateEntityRecognition=ln,u.generateImageSEO=Dn,u.generatePerformanceTrackingSchema=ou,u.generatePictureElement=Hn,u.generatePlaceholder=Gn,u.generateQAPairs=ju,u.generateSemanticMarkup=sn,u.generateSizes=Wn,u.generateSocialImageMeta=jn,u.generateSrcSet=Bn,u.generateTopicClustering=cn,u.generateTrainingExamples=Wu,u.getActiveNavItem=to,u.getConditionalStats=Z0,u.getEnvironmentType=Ja,u.getLazyLoadingStats=j0,u.getOptimalImageFormat=_n,u.getPerformanceMonitor=Re,u.getPreloadingStats=eu,u.getRenderCounts=hu,u.getSecurityHeaders=tn,u.getUINavigationService=Z,u.getWebVitals=ku,u.initializeAdvancedPreloading=R0,u.initializePerformanceMonitoring=vo,u.initializePreloading=q0,u.inlineCriticalStyles=In,u.isLocalhost=Xa,u.isNetworkAccess=Za,u.isWalletBrowser=Qa,u.isWebEnvironment=Ra,u.lazyLoadQueue=go,u.lazyWithPreload=oo,u.lazyWithRetry=no,u.loadCSS=N0,u.loadCriticalCSS=vn,u.loadNonCriticalCSS=wn,u.measureAsyncOperation=ko,u.measureImagePerformance=qn,u.navigationHelper=be,u.navigationUtils=ao,u.optimizeClassNames=Tn,u.optimizeContainment=En,u.optimizeFlex=Mn,u.optimizeGrid=Ln,u.optimizeWillChange=An,u.optimizedFetch=Ya,u.pageSEOConfigs=$u,u.parseFileSize=Ao,u.performanceBudget=ce,u.performanceUtils=wt,u.prefersReducedMotion=xr,u.prefetchResource=Cu,u.preloadComponent=H0,u.preloadImage=Un,u.preloadResource=Su,u.preloadRoute=vu,u.preserveAspectRatio=Kn,u.priorityLoader=mo,u.reportWebVitals=wu,u.routeConfig=an,u.securityHeaders=T0,u.setupCSPReporting=$0,u.setupLazyLoading=Fn,u.setupProgressiveLoading=Vn,u.shouldEnableWallet=S0,u.smartLinkVariants=xt,u.supportsAVIF=wr,u.supportsCSSImports=E0,u.supportsWebP=vr,u.themeStorage=po,u.useClickOutside=Ir,u.useCodeLoader=$r,u.useComponentPerformance=Pr,u.useCopyToClipboard=Lr,u.useDebugMemo=fu,u.useDynamicImport=co,u.useFormSubmission=Po,u.useImageLazyLoading=xu,u.useLazyLoad=Sr,u.useLazyStyles=$n,u.useLocation=Rn,u.useMediaQuery=On,u.useMemoryLeakDetection=Nu,u.useMultipleCopyToClipboard=Io,u.useNavigation=Jn,u.useOptimizedTheme=zn,u.useOptimizedWallets=cu,u.usePerformanceMark=gu,u.useReducedMotion=Nn,u.useRenderCount=pu,u.useResponsiveStyles=Sn,u.useSearchParams=eo,u.useSmartLinks=_c,u.useStableCallback=mu,u.useToggle=To,u.utils=kr,u.validateHeadingStructure=Mu,u.walletStorage=ho,u.web3SecurityNotes=L0,u.withPerformanceTracking=wo,u.withRetry=w0,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
55
+ */const pc={utils:{cn:u}};Object.defineProperty(d,"ArrowLeftIcon",{enumerable:!0,get:()=>U.ArrowLeftIcon}),Object.defineProperty(d,"ArrowRightIcon",{enumerable:!0,get:()=>U.ArrowRightIcon}),Object.defineProperty(d,"Bars3Icon",{enumerable:!0,get:()=>U.Bars3Icon}),Object.defineProperty(d,"BellIcon",{enumerable:!0,get:()=>U.BellIcon}),Object.defineProperty(d,"BellSlashIcon",{enumerable:!0,get:()=>U.BellSlashIcon}),Object.defineProperty(d,"ChartBarIcon",{enumerable:!0,get:()=>U.ChartBarIcon}),Object.defineProperty(d,"CheckCircleIcon",{enumerable:!0,get:()=>U.CheckCircleIcon}),Object.defineProperty(d,"CheckIcon",{enumerable:!0,get:()=>U.CheckIcon}),Object.defineProperty(d,"ChevronDownIcon",{enumerable:!0,get:()=>U.ChevronDownIcon}),Object.defineProperty(d,"ChevronLeftIcon",{enumerable:!0,get:()=>U.ChevronLeftIcon}),Object.defineProperty(d,"ChevronRightIcon",{enumerable:!0,get:()=>U.ChevronRightIcon}),Object.defineProperty(d,"ChevronUpIcon",{enumerable:!0,get:()=>U.ChevronUpIcon}),Object.defineProperty(d,"ClockIcon",{enumerable:!0,get:()=>U.ClockIcon}),Object.defineProperty(d,"CodeBracketIcon",{enumerable:!0,get:()=>U.CodeBracketIcon}),Object.defineProperty(d,"Cog6ToothIcon",{enumerable:!0,get:()=>U.Cog6ToothIcon}),Object.defineProperty(d,"CreditCardIcon",{enumerable:!0,get:()=>U.CreditCardIcon}),Object.defineProperty(d,"DocumentTextIcon",{enumerable:!0,get:()=>U.DocumentTextIcon}),Object.defineProperty(d,"EnvelopeIcon",{enumerable:!0,get:()=>U.EnvelopeIcon}),Object.defineProperty(d,"ExclamationTriangleIcon",{enumerable:!0,get:()=>U.ExclamationTriangleIcon}),Object.defineProperty(d,"EyeSlashIcon",{enumerable:!0,get:()=>U.EyeSlashIcon}),Object.defineProperty(d,"GlobeAltIcon",{enumerable:!0,get:()=>U.GlobeAltIcon}),Object.defineProperty(d,"HomeIcon",{enumerable:!0,get:()=>U.HomeIcon}),Object.defineProperty(d,"InboxIcon",{enumerable:!0,get:()=>U.InboxIcon}),Object.defineProperty(d,"InformationCircleIcon",{enumerable:!0,get:()=>U.InformationCircleIcon}),Object.defineProperty(d,"KeyIcon",{enumerable:!0,get:()=>U.KeyIcon}),Object.defineProperty(d,"MegaphoneIcon",{enumerable:!0,get:()=>U.MegaphoneIcon}),Object.defineProperty(d,"MinusIcon",{enumerable:!0,get:()=>U.MinusIcon}),Object.defineProperty(d,"PaperAirplaneIcon",{enumerable:!0,get:()=>U.PaperAirplaneIcon}),Object.defineProperty(d,"PaperClipIcon",{enumerable:!0,get:()=>U.PaperClipIcon}),Object.defineProperty(d,"PlusIcon",{enumerable:!0,get:()=>U.PlusIcon}),Object.defineProperty(d,"RocketLaunchIcon",{enumerable:!0,get:()=>U.RocketLaunchIcon}),Object.defineProperty(d,"ShieldCheckIcon",{enumerable:!0,get:()=>U.ShieldCheckIcon}),Object.defineProperty(d,"SparklesIcon",{enumerable:!0,get:()=>U.SparklesIcon}),Object.defineProperty(d,"StarIcon",{enumerable:!0,get:()=>U.StarIcon}),Object.defineProperty(d,"TrashIcon",{enumerable:!0,get:()=>U.TrashIcon}),Object.defineProperty(d,"UserGroupIcon",{enumerable:!0,get:()=>U.UserGroupIcon}),Object.defineProperty(d,"XMarkIcon",{enumerable:!0,get:()=>U.XMarkIcon}),Object.defineProperty(d,"CheckCircleIconSolid",{enumerable:!0,get:()=>R.CheckCircleIcon}),Object.defineProperty(d,"CheckIconSolid",{enumerable:!0,get:()=>R.CheckIcon}),Object.defineProperty(d,"ExclamationTriangleIconSolid",{enumerable:!0,get:()=>R.ExclamationTriangleIcon}),Object.defineProperty(d,"StarIconSolid",{enumerable:!0,get:()=>R.StarIcon}),d.AIMeta=zl,d.AITrainingEnhancer=jl,d.AI_TRAINING_CONFIGS=Ql,d.ActionButton=ko,d.Alert=Ae,d.AlertBanner=ka,d.AlertDescription=xa,d.AlertTitle=va,d.AreaChart=es,d.AspectRatio=Dt,d.AudioPlayer=Ls,d.Avatar=_n,d.Badge=Ia,d.BarChart=Xn,d.BatchRender=Ml,d.Blockquote=ia,d.BodyText=ta,d.BorderAccent=Vt,d.Box=br,d.Breadcrumb=Dr,d.BreadcrumbNav=Jo,d.BreadcrumbSection=cl,d.BurndownChart=ds,d.Calendar=Lr,d.CalloutBox=Hn,d.CancellableRequest=ni,d.Card=_e,d.CardContent=On,d.CardFooter=Fn,d.CardHeader=Wn,d.Center=$t,d.ChainBadge=Ta,d.Checkbox=Ka,d.Code=na,d.CodeBlock=gl,d.CodeDisplay=sa,d.CollapsibleDocumentationTopic=hl,d.CollapsibleEmailField=ze,d.ColorPicker=Io,d.ColorPickerAdvanced=Mo,d.ColorSwatch=$o,d.Combobox=Ra,d.ComponentPreloader=rr,d.ConditionalRender=El,d.ConfirmationDialog=Fs,d.Container=Et,d.CreditCardInput=Do,d.CurrencyInput=jo,d.DashboardStatCard=qn,d.DataTable=gn,d.DateInput=Ba,d.DateRangePicker=Eo,d.DateTimePicker=So,d.Dialog=js,d.Divider=Ot,d.DragDrop=Ys,d.Drawer=Hs,d.Dropdown=eo,d.EmailInputField=Pe,d.EmailInputGroup=Ga,d.EmptyState=zr,d.ErrorBoundary=ml,d.ErrorBoundaryLazy=vl,d.ExpensiveComponent=Nl,d.ExternalLink=Xo,d.FileIcon=no,d.FileInput=oo,d.Flex=vt,d.FlexContainer=St,d.FloatingPanel=Ht,d.FocusTrap=nl,d.FormAlerts=yo,d.FormField=ho,d.FormFieldGroup=Ne,d.FormattedNumber=ua,d.Gauge=us,d.Grid=Lt,d.HStack=Mt,d.Heading=Zt,d.HelperText=da,d.HoverCard=Gs,d.Image=ys,d.ImageCropper=xs,d.ImageGallery=ms,d.InfiniteScroll=il,d.InfoCard=Vn,d.Input=Ce,d.Kbd=la,d.KeyValuePair=Yn,d.Label=We,d.LanguageSelector=pl,d.LazyComponent=Ll,d.LazyImage=xi,d.LazyLoadQueue=ut,d.LazyWalletButton=Ki,d.LazyWrapper=nc,d.Lightbox=ks,d.LineChart=Jn,d.Link=Zo,d.List=mn,d.ListItem=vn,d.ListItemWithAction=Un,d.LiveStream=Es,d.LoadPriority=sr,d.LoadingDots=fa,d.LoadingOptimizer=Xl,d.LoadingOverlay=ba,d.LoadingState=pa,d.Masonry=Yt,d.MasterDetailLayout=Pl,d.MasterListItem=Al,d.MediaUploader=Ts,d.MentionInput=go,d.Modal=Ge,d.ModalContent=Ke,d.ModalFooter=Ye,d.ModalHeader=Ds,d.MultiSelect=Ja,d.NavigationList=rn,d.NavigationMenu=en,d.NoContent=Zn,d.NotificationBadge=Ea,d.NotificationPanel=La,d.NumberInput=Da,d.OptimizedAPIClient=ai,d.OptimizedImage=$l,d.OptimizedRoutePreloader=Jl,d.OtpInput=Ha,d.Overlay=ke,d.PageContainer=zt,d.PageHeader=Tl,d.PageTitle=Jt,d.Pagination=an,d.PaginationNav=on,d.PasswordInput=Oa,d.PerformanceBoundary=Il,d.PerformanceOptimizer=Zl,d.PhoneDirectory=mo,d.PhoneInput=Va,d.PieChart=Rn,d.PlatformSpecificComponents=Ui,d.PlaylistManager=Ps,d.PodcastPlayer=Us,d.Popover=_s,d.Portal=ee,d.PriorityLoader=ht,d.Progress=bs,d.ProgressBar=hs,d.ProgressCircle=fs,d.PromotionalBanner=bl,d.PullToRefresh=ll,d.QRCodeDisplay=zs,d.QuizBuilder=Go,d.RadioGroup=Ya,d.RelativeTime=ha,d.Resizable=_t,d.RouteBasedLazyLoader=er,d.SafeAppWrapper=xl,d.ScrollArea=Kt,d.ScrollSpy=sl,d.SearchInput=ja,d.Section=At,d.SectionTitle=ea,d.SecurityProvider=kl,d.Select=Qa,d.SelectContent=kr,d.SelectField=po,d.SelectGroup=Za,d.SelectItem=Cr,d.SelectLabel=wr,d.SelectScrollDownButton=je,d.SelectScrollUpButton=De,d.SelectSeparator=Nr,d.SelectTrigger=xr,d.SelectValue=Xa,d.SemanticHTML=Dl,d.Separator=Ft,d.Sheet=qs,d.SideNav=tn,d.SignaturePad=Uo,d.SignatureRequest=To,d.SkeletonLoader=ya,d.Slider=to,d.SliderInput=ao,d.SmartContent=Qo,d.SmartLink=Oe,d.SmartWalletProviders=_i,d.Spacer=Ut,d.Sparkline=ss,d.Spinner=we,d.SplitPane=qt,d.Stack=Te,d.StandardPageLayout=Ul,d.StatDisplay=Qn,d.StatusBadge=Ua,d.StatusIndicator=Pa,d.StepList=yl,d.Stepper=nn,d.StepperNav=sn,d.SubscriptionGatedComponents=$i,d.Switch=vr,d.Table=cn,d.TableOfContents=dn,d.Tabs=Ro,d.TabsContent=Ur,d.TabsList=Mr,d.TabsTrigger=$r,d.TagInput=co,d.Text=Qt,d.TextArea=za,d.TextAreaField=fo,d.TextField=bo,d.TextInputModal=Vs,d.TextLink=oa,d.TimePicker=yr,d.Toast=pr,d.ToastNotification=Sa,d.ToastProvider=Na,d.ToggleGroup=ro,d.Tooltip=Ks,d.TrackedButton=fl,d.TransferList=An,d.TreeView=zn,d.TruncatedText=ga,d.UaudioUwaveform=Is,d.UavatarUgroup=Gn,d.UbubbleUchart=ts,d.UcellUeditor=pn,d.UcodeUhighlighter=zo,d.UcolumnUresize=fn,d.UcurrencyUconverter=Bo,d.UcurrencyUrates=Wo,d.UdataUgrid=un,d.UdoubleUtap=rl,d.UdragUdropUlist=Qs,d.UfieldUmapper=qo,d.UfileUbrowser=so,d.UfileUpreview=lo,d.UfileUtree=io,d.UformUbuilder=Oo,d.UformUtemplate=Vo,d.UformUvalidator=Fo,d.UfunnelUchart=is,d.UgestureUdetector=Js,d.Uheatmap=ls,d.UhoverUtooltip=al,d.UimageUcomparison=vs,d.UinlineUedit=wo,d.UlistingUform=Dn,d.UlongUpress=tl,d.UmarkdownUrenderer=Po,d.UmediaUplaylist=As,d.UmetricUcomparison=gs,d.UnestedUdrag=Xs,d.UpasswordUstrength=No,d.UperformanceUchart=cs,d.UpinchUzoom=el,d.UpivotUtable=hn,d.UprivacyUtoggle=Co,d.UprofileUheader=Kn,d.UprogressUtracker=ps,d.UradarUchart=rs,d.UradialUmenu=ol,d.UresizableUpanels=Gt,d.UsankeyUdiagram=ns,d.UscatterUplot=as,d.UschemaUvalidator=Ho,d.UscreenUreaderUtext=ca,d.UsortableUgrid=Zs,d.UspreadsheetUgrid=bn,d.UsurveyUbuilder=_o,d.UswipeUactions=Rs,d.UtableUreservation=yn,d.UtimeUslotUpicker=Lo,d.UtreeUmap=os,d.UtwoUfactorUinput=qa,d.UuserUtable=Tn,d.UvideoUcall=Ss,d.UvideoUthumbnail=Cs,d.UvoiceUrecorder=$s,d.VStack=It,d.VideoEditor=Ns,d.VideoPlayer=ws,d.VirtualList=Pn,d.VirtualListItem=Sl,d.WEB3_CONCEPTS=ql,d.WEB3_EMAIL_HEADINGS=Hl,d.WEB3_HEADING_PATTERNS=_,d.WalletPreloader=ye,d.WaveForm=Ms,d.WysiwygEditor=Ao,d.addResourceHint=ic,d.aiOptimizationPresets=Hi,d.appStorage=gc,d.autoConnectWalletBrowser=fc,d.batchDOMUpdates=Md,d.bundleAnalysis=de,d.cacheHeaders=hi,d.cacheUtils=si,d.checkPerformanceBudget=hd,d.clearComponentCache=ki,d.clearConditionalCache=Ai,d.clearRenderCounts=ed,d.cn=u,d.conditionalCSS=ci,d.convertFileSize=md,d.createAIMetaTags=Fr,d.createAIOptimizedSchema=Xe,d.createAdvancedLazyComponent=yi,d.createCSSVariables=Cd,d.createConditionalImports=Qd,d.createConditionalLazyComponent=Mi,d.createEnhancedFAQSchema=Bl,d.createEnhancedOpenGraph=Wr,d.createEnhancedTwitterCard=Or,d.createLazyComponent=Zr,d.createLazyComponentFactory=rd,d.createLazyRoute=sc,d.createLazyWalletProvider=or,d.createLibraryImports=Li,d.createMemoComponent=wl,d.createOptimizedStyles=xd,d.createProgressiveComponent=oc,d.createSelectiveExports=Zd,d.createSelectiveMemoComponent=Cl,d.createSemanticHeading=Fl,d.createSimpleStorage=bc,d.createTechnicalArticleSchema=Ze,d.createTreeShakingConfig=Xd,d.createUIComponents=Ei,d.createWeb3ProductSchema=Qe,d.criticalPathOptimizer=Yi,d.cspDirectives=gi,d.cssOptimization=ct,d.deadCodeElimination=ie,d.default=pc,d.defaultPerformanceBudget=nt,d.detectAvailableWallets=ar,d.detectWalletBrowser=bt,d.exportPerformanceData=bd,d.formatFileSize=yd,d.generateAIMetaTags=Bi,d.generateAIMetadata=_l,d.generateAIStructuredData=Oi,d.generateAdvancedSEO=Wl,d.generateCSP=Yr,d.generateCSPDirectives=Je,d.generateConceptGraph=Gl,d.generateContentRelationships=Wi,d.generateEntityRecognition=rt,d.generateImageSEO=jd,d.generatePerformanceTrackingSchema=Vi,d.generatePictureElement=Hd,d.generatePlaceholder=Kd,d.generateQAPairs=Yl,d.generateSemanticMarkup=et,d.generateSizes=Wd,d.generateSocialImageMeta=Od,d.generateSrcSet=Bd,d.generateTopicClustering=tt,d.generateTrainingExamples=Kl,d.getConditionalStats=Pi,d.getEnvironmentType=Gr,d.getLazyLoadingStats=wi,d.getOptimalImageFormat=Vd,d.getPerformanceMonitor=$e,d.getPreloadingStats=ji,d.getRenderCounts=Ri,d.getSecurityHeaders=Qr,d.getUINavigationService=G,d.getWebVitals=nd,d.initializeAdvancedPreloading=Di,d.initializePerformanceMonitoring=cd,d.initializePreloading=Ii,d.inlineCriticalStyles=Ud,d.isLocalhost=qr,d.isNetworkAccess=_r,d.isWalletBrowser=Hr,d.isWebEnvironment=Kr,d.lazyLoadQueue=dc,d.lazyWithPreload=ac,d.lazyWithRetry=tc,d.loadCSS=ii,d.loadCriticalCSS=kd,d.loadNonCriticalCSS=wd,d.measureAsyncOperation=ud,d.measureImagePerformance=Gd,d.navigationHelper=ae,d.optimizeClassNames=$d,d.optimizeContainment=Ld,d.optimizeFlex=Pd,d.optimizeGrid=Ad,d.optimizeWillChange=Id,d.optimizedFetch=Vr,d.pageSEOConfigs=Ol,d.parseFileSize=vd,d.performanceBudget=Z,d.performanceUtils=Le,d.prefersReducedMotion=st,d.prefetchResource=sd,d.preloadComponent=Si,d.preloadImage=qd,d.preloadResource=ld,d.preloadRoute=ad,d.preserveAspectRatio=Yd,d.priorityLoader=cc,d.reportWebVitals=od,d.routeConfig=Xr,d.securityHeaders=ui,d.setupCSPReporting=bi,d.setupLazyLoading=Fd,d.setupProgressiveLoading=_d,d.shouldEnableWallet=li,d.smartLinkVariants=Se,d.supportsAVIF=it,d.supportsCSSImports=di,d.supportsWebP=lt,d.themeStorage=uc,d.useClickOutside=Sr,d.useCodeLoader=jr,d.useComponentPerformance=ot,d.useCopyToClipboard=Mn,d.useDebugMemo=Xi,d.useDynamicImport=lc,d.useFormSubmission=fd,d.useImageLazyLoading=td,d.useLazyLoad=gt,d.useLazyStyles=Td,d.useLocation=ec,d.useMediaQuery=zd,d.useMemoryLeakDetection=id,d.useMultipleCopyToClipboard=$n,d.useNavigation=Rd,d.useOptimizedTheme=Dd,d.useOptimizedWallets=Gi,d.usePerformanceMark=Qi,d.useReducedMotion=Ed,d.useRenderCount=Ji,d.useResponsiveStyles=Sd,d.useSearchParams=rc,d.useSmartLinks=Ko,d.useStableCallback=Zi,d.useToast=wa,d.useToggle=pd,d.utils=dt,d.validateHeadingStructure=Vl,d.walletStorage=hc,d.web3SecurityNotes=fi,d.withPerformanceTracking=gd,d.withRetry=oi,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));