@app-studio/components 0.11.6 → 0.11.8

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 (785) hide show
  1. package/dist/files/media/BlockEditor-drag-and-drop.md +61 -0
  2. package/dist/files/media/BlockEditor.mdx +106 -0
  3. package/dist/files/media/Button.mdx +1 -1
  4. package/dist/files/media/Checkbox.mdx +1 -1
  5. package/dist/files/media/ColorInput.mdx +1 -1
  6. package/dist/files/media/ColorPicker.mdx +1 -1
  7. package/dist/files/media/CountryPicker.mdx +1 -1
  8. package/dist/files/media/DatePicker.mdx +1 -1
  9. package/dist/files/media/EmojiPicker.mdx +22 -1
  10. package/dist/files/media/Markdown.mdx +99 -0
  11. package/dist/files/media/OTPInput.mdx +2 -2
  12. package/dist/files/media/Select.mdx +1 -1
  13. package/dist/files/media/Switch.mdx +2 -2
  14. package/dist/files/media/TextArea.mdx +8 -8
  15. package/dist/files/media/TextField.mdx +9 -9
  16. package/dist/index.d.ts +649 -511
  17. package/dist/native/components/Accordion/Accordion/Accordion.props.d.ts +1 -1
  18. package/dist/native/components/Accordion/Accordion/Accordion.state.js +1 -1
  19. package/dist/native/components/Accordion/Accordion/Accordion.view.d.ts +1 -1
  20. package/dist/native/components/Accordion/Accordion/Accordion.view.js +1 -1
  21. package/dist/native/components/Accordion/Accordion/Accordion.view.native.d.ts +1 -1
  22. package/dist/native/components/Accordion/Accordion/Accordion.view.native.js +1 -1
  23. package/dist/native/components/Accordion/Accordion.js +1 -1
  24. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.props.d.ts +1 -1
  25. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.state.js +1 -1
  26. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.type.d.ts +1 -1
  27. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.d.ts +1 -1
  28. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.js +1 -1
  29. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.d.ts +1 -1
  30. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.js +1 -1
  31. package/dist/native/components/ActionSheet/ActionSheet.d.ts +1 -1
  32. package/dist/native/components/ActionSheet/ActionSheet.js +1 -1
  33. package/dist/native/components/Alert/Alert/Alert.props.d.ts +1 -1
  34. package/dist/native/components/Alert/Alert/Alert.state.d.ts +1 -1
  35. package/dist/native/components/Alert/Alert/Alert.state.js +1 -1
  36. package/dist/native/components/Alert/Alert/Alert.view.d.ts +1 -1
  37. package/dist/native/components/Alert/Alert/Alert.view.js +1 -1
  38. package/dist/native/components/Alert/Alert/Alert.view.native.d.ts +1 -1
  39. package/dist/native/components/Alert/Alert/Alert.view.native.js +1 -1
  40. package/dist/native/components/Alert/Alert.d.ts +1 -1
  41. package/dist/native/components/Alert/Alert.js +1 -1
  42. package/dist/native/components/AppRoot/AppRoot.d.ts +1 -1
  43. package/dist/native/components/AppRoot/AppRoot.js +1 -1
  44. package/dist/native/components/AppRoot/AppRoot.native.d.ts +1 -1
  45. package/dist/native/components/AppRoot/AppRoot.native.js +1 -1
  46. package/dist/native/components/AppRoot/AppRoot.types.d.ts +1 -1
  47. package/dist/native/components/AspectRatio/AspectRatio/AspectRatio.view.d.ts +1 -1
  48. package/dist/native/components/AspectRatio/AspectRatio/AspectRatio.view.js +1 -1
  49. package/dist/native/components/AspectRatio/AspectRatio.d.ts +1 -1
  50. package/dist/native/components/AspectRatio/AspectRatio.js +1 -1
  51. package/dist/native/components/AttachmentGroup/AttachmentGroup/AttachmentGroup.d.ts +1 -1
  52. package/dist/native/components/AttachmentGroup/AttachmentGroup/AttachmentGroup.js +1 -1
  53. package/dist/native/components/AudioInput/AudioInput/AudioInput.state.js +1 -1
  54. package/dist/native/components/AudioInput/AudioInput/AudioInput.view.d.ts +1 -1
  55. package/dist/native/components/AudioInput/AudioInput/AudioInput.view.js +1 -1
  56. package/dist/native/components/AudioInput/AudioInput.d.ts +1 -1
  57. package/dist/native/components/AudioInput/AudioInput.js +1 -1
  58. package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.d.ts +1 -1
  59. package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.js +1 -1
  60. package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.view.d.ts +1 -1
  61. package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.view.js +1 -1
  62. package/dist/native/components/AudioInput/useAudioRecording.js +1 -1
  63. package/dist/native/components/AudioInput/useAudioRecording.native.js +1 -1
  64. package/dist/native/components/Avatar/Avatar/Avatar.props.d.ts +1 -1
  65. package/dist/native/components/Avatar/Avatar/Avatar.state.d.ts +1 -1
  66. package/dist/native/components/Avatar/Avatar/Avatar.state.js +1 -1
  67. package/dist/native/components/Avatar/Avatar/Avatar.view.d.ts +1 -1
  68. package/dist/native/components/Avatar/Avatar/Avatar.view.js +1 -1
  69. package/dist/native/components/Avatar/Avatar.d.ts +1 -1
  70. package/dist/native/components/Avatar/Avatar.js +1 -1
  71. package/dist/native/components/Background/Background/Background.props.d.ts +1 -1
  72. package/dist/native/components/Background/Background/Background.view.d.ts +1 -1
  73. package/dist/native/components/Background/Background/Background.view.js +1 -1
  74. package/dist/native/components/Background/Background/Background.view.native.d.ts +1 -1
  75. package/dist/native/components/Background/Background/Background.view.native.js +1 -1
  76. package/dist/native/components/Background/Background.d.ts +1 -1
  77. package/dist/native/components/Background/Background.js +1 -1
  78. package/dist/native/components/Badge/Badge/Badge.view.d.ts +1 -1
  79. package/dist/native/components/Badge/Badge/Badge.view.js +1 -1
  80. package/dist/native/components/Badge/Badge.d.ts +1 -1
  81. package/dist/native/components/Badge/Badge.js +1 -1
  82. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.content.d.ts +16 -0
  83. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.content.js +197 -0
  84. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.content.js.map +1 -0
  85. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.controls.d.ts +14 -0
  86. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.controls.js +119 -0
  87. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.controls.js.map +1 -0
  88. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.dom.d.ts +9 -0
  89. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.dom.js +247 -0
  90. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.dom.js.map +1 -0
  91. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.keyboard.d.ts +16 -0
  92. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.keyboard.js +397 -0
  93. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.keyboard.js.map +1 -0
  94. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.model.d.ts +47 -0
  95. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.model.js +504 -0
  96. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.model.js.map +1 -0
  97. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.navigation.d.ts +6 -0
  98. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.navigation.js +198 -0
  99. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.navigation.js.map +1 -0
  100. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.props.d.ts +74 -0
  101. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.props.js +51 -0
  102. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.props.js.map +1 -0
  103. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.selection.d.ts +13 -0
  104. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.selection.js +33 -0
  105. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.selection.js.map +1 -0
  106. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.state.d.ts +117 -0
  107. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.state.js +405 -0
  108. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.state.js.map +1 -0
  109. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.transactions.d.ts +8 -0
  110. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.transactions.js +177 -0
  111. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.transactions.js.map +1 -0
  112. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.d.ts +6 -0
  113. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.js +493 -0
  114. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.js.map +1 -0
  115. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.native.d.ts +6 -0
  116. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.native.js +150 -0
  117. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.native.js.map +1 -0
  118. package/dist/native/components/BlockEditor/BlockEditor.d.ts +3 -0
  119. package/dist/native/components/BlockEditor/BlockEditor.js +8 -0
  120. package/dist/native/components/BlockEditor/BlockEditor.js.map +1 -0
  121. package/dist/native/components/Button/Button/Button.props.d.ts +1 -1
  122. package/dist/native/components/Button/Button/Button.state.d.ts +1 -1
  123. package/dist/native/components/Button/Button/Button.state.js +1 -1
  124. package/dist/native/components/Button/Button/Button.view.d.ts +1 -1
  125. package/dist/native/components/Button/Button/Button.view.js +1 -1
  126. package/dist/native/components/Button/Button/Button.view.native.d.ts +1 -1
  127. package/dist/native/components/Button/Button/Button.view.native.js +1 -1
  128. package/dist/native/components/Button/Button.d.ts +1 -1
  129. package/dist/native/components/Button/Button.js +1 -1
  130. package/dist/native/components/Card/Card/Card.context.d.ts +1 -1
  131. package/dist/native/components/Card/Card/Card.context.js +1 -1
  132. package/dist/native/components/Card/Card/Card.state.d.ts +1 -1
  133. package/dist/native/components/Card/Card/Card.state.js +1 -1
  134. package/dist/native/components/Card/Card/Card.view.d.ts +1 -1
  135. package/dist/native/components/Card/Card/Card.view.js +1 -1
  136. package/dist/native/components/Card/Card.js +1 -1
  137. package/dist/native/components/Carousel/Carousel/Carousel.context.d.ts +1 -1
  138. package/dist/native/components/Carousel/Carousel/Carousel.context.js +1 -1
  139. package/dist/native/components/Carousel/Carousel/Carousel.state.js +1 -1
  140. package/dist/native/components/Carousel/Carousel/Carousel.view.d.ts +1 -1
  141. package/dist/native/components/Carousel/Carousel/Carousel.view.js +1 -1
  142. package/dist/native/components/Carousel/Carousel/Carousel.view.native.d.ts +1 -1
  143. package/dist/native/components/Carousel/Carousel/Carousel.view.native.js +1 -1
  144. package/dist/native/components/Carousel/Carousel.js +1 -1
  145. package/dist/native/components/Chart/Chart/BarChart.d.ts +1 -1
  146. package/dist/native/components/Chart/Chart/BarChart.js +1 -1
  147. package/dist/native/components/Chart/Chart/BarChart.native.d.ts +1 -1
  148. package/dist/native/components/Chart/Chart/BarChart.native.js +1 -1
  149. package/dist/native/components/Chart/Chart/Chart.state.d.ts +2 -2
  150. package/dist/native/components/Chart/Chart/Chart.state.js +1 -1
  151. package/dist/native/components/Chart/Chart/Chart.view.d.ts +1 -1
  152. package/dist/native/components/Chart/Chart/Chart.view.js +1 -1
  153. package/dist/native/components/Chart/Chart/ChartTooltip.d.ts +1 -1
  154. package/dist/native/components/Chart/Chart/ChartTooltip.js +1 -1
  155. package/dist/native/components/Chart/Chart/LineChart.d.ts +1 -1
  156. package/dist/native/components/Chart/Chart/LineChart.js +1 -1
  157. package/dist/native/components/Chart/Chart/LineChart.native.d.ts +1 -1
  158. package/dist/native/components/Chart/Chart/LineChart.native.js +1 -1
  159. package/dist/native/components/Chart/Chart/PieChart.d.ts +1 -1
  160. package/dist/native/components/Chart/Chart/PieChart.js +1 -1
  161. package/dist/native/components/Chart/Chart/PieChart.native.d.ts +1 -1
  162. package/dist/native/components/Chart/Chart/PieChart.native.js +1 -1
  163. package/dist/native/components/Chart/Chart.d.ts +1 -1
  164. package/dist/native/components/Chart/Chart.js +1 -1
  165. package/dist/native/components/ChatInput/AttachmentGroup.d.ts +1 -1
  166. package/dist/native/components/ChatInput/AttachmentGroup.js +1 -1
  167. package/dist/native/components/ChatInput/AudioRecorder.d.ts +1 -1
  168. package/dist/native/components/ChatInput/AudioRecorder.js +1 -1
  169. package/dist/native/components/ChatInput/ChatInput/ChatInput.state.d.ts +7 -7
  170. package/dist/native/components/ChatInput/ChatInput/ChatInput.state.js +1 -1
  171. package/dist/native/components/ChatInput/ChatInput/ChatInput.view.d.ts +1 -1
  172. package/dist/native/components/ChatInput/ChatInput/ChatInput.view.js +1 -1
  173. package/dist/native/components/ChatInput/ChatInput.d.ts +1 -1
  174. package/dist/native/components/ChatInput/ChatInput.js +1 -1
  175. package/dist/native/components/ChatInput/ChatUploader.d.ts +1 -1
  176. package/dist/native/components/ChatInput/ChatUploader.js +1 -1
  177. package/dist/native/components/ChatInput/EditableInput.d.ts +1 -1
  178. package/dist/native/components/ChatInput/EditableInput.js +1 -1
  179. package/dist/native/components/ChatInput/EditableInput.native.d.ts +1 -1
  180. package/dist/native/components/ChatInput/EditableInput.native.js +1 -1
  181. package/dist/native/components/ChatInput/GuideTip.d.ts +1 -1
  182. package/dist/native/components/ChatInput/GuideTip.js +1 -1
  183. package/dist/native/components/ChatInput/MessageInput.d.ts +1 -1
  184. package/dist/native/components/ChatInput/MessageInput.js +2 -2
  185. package/dist/native/components/ChatInput/MessageInput.js.map +1 -1
  186. package/dist/native/components/ChatInput/MessageInput.native.d.ts +1 -1
  187. package/dist/native/components/ChatInput/MessageInput.native.js +1 -1
  188. package/dist/native/components/ChatInput/PromptExamples.d.ts +1 -1
  189. package/dist/native/components/ChatInput/PromptExamples.js +1 -1
  190. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.state.d.ts +2 -2
  191. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.state.js +1 -1
  192. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.style.d.ts +1 -1
  193. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.d.ts +1 -1
  194. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.js +2 -2
  195. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.js.map +1 -1
  196. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.native.d.ts +1 -1
  197. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.native.js +1 -1
  198. package/dist/native/components/ChatWidget/ChatWidget.d.ts +1 -1
  199. package/dist/native/components/ChatWidget/ChatWidget.js +1 -1
  200. package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.d.ts +1 -1
  201. package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.js +1 -1
  202. package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.native.d.ts +1 -1
  203. package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.native.js +1 -1
  204. package/dist/native/components/ChatWidget/Widget/useContextSelector.d.ts +1 -1
  205. package/dist/native/components/ChatWidget/Widget/useContextSelector.js +1 -1
  206. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.state.d.ts +2 -2
  207. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.state.js +1 -1
  208. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.d.ts +1 -1
  209. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.js +1 -1
  210. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.native.d.ts +1 -1
  211. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.native.js +1 -1
  212. package/dist/native/components/ColorPicker/ColorPicker.d.ts +1 -1
  213. package/dist/native/components/ColorPicker/ColorPicker.js +1 -1
  214. package/dist/native/components/Command/Command/Command.props.d.ts +1 -1
  215. package/dist/native/components/Command/Command/Command.state.d.ts +3 -3
  216. package/dist/native/components/Command/Command/Command.state.js +1 -1
  217. package/dist/native/components/Command/Command/Command.type.d.ts +1 -1
  218. package/dist/native/components/Command/Command/Command.view.d.ts +1 -1
  219. package/dist/native/components/Command/Command/Command.view.js +1 -1
  220. package/dist/native/components/Command/Command/Command.view.native.d.ts +1 -1
  221. package/dist/native/components/Command/Command/Command.view.native.js +1 -1
  222. package/dist/native/components/Command/Command/CommandOverlay.d.ts +1 -1
  223. package/dist/native/components/Command/Command/CommandOverlay.js +1 -1
  224. package/dist/native/components/Command/Command/CommandOverlay.native.d.ts +1 -1
  225. package/dist/native/components/Command/Command/CommandOverlay.native.js +1 -1
  226. package/dist/native/components/Command/Command/CommandTextInput.d.ts +1 -1
  227. package/dist/native/components/Command/Command/CommandTextInput.js +1 -1
  228. package/dist/native/components/Command/Command/CommandTextInput.native.d.ts +1 -1
  229. package/dist/native/components/Command/Command/CommandTextInput.native.js +1 -1
  230. package/dist/native/components/Command/Command.js +1 -1
  231. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.props.d.ts +1 -1
  232. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.state.d.ts +1 -1
  233. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.state.js +1 -1
  234. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.type.d.ts +1 -1
  235. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.d.ts +1 -1
  236. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.js +1 -1
  237. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.d.ts +1 -1
  238. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.js +1 -1
  239. package/dist/native/components/ContextMenu/ContextMenu.js +1 -1
  240. package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.state.d.ts +1 -1
  241. package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.state.js +1 -1
  242. package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.view.d.ts +1 -1
  243. package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.view.js +1 -1
  244. package/dist/native/components/CookieConsent/CookieConsent.d.ts +1 -1
  245. package/dist/native/components/CookieConsent/CookieConsent.js +1 -1
  246. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.d.ts +1 -1
  247. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.js +1 -1
  248. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.native.d.ts +1 -1
  249. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.native.js +1 -1
  250. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.d.ts +1 -1
  251. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.js +1 -1
  252. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.native.d.ts +1 -1
  253. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.native.js +1 -1
  254. package/dist/native/components/DragAndDrop/DragAndDrop.d.ts +1 -1
  255. package/dist/native/components/DragAndDrop/DragAndDrop.js +1 -1
  256. package/dist/native/components/Drawer/Drawer/Drawer.layout.d.ts +1 -1
  257. package/dist/native/components/Drawer/Drawer/Drawer.layout.js +1 -1
  258. package/dist/native/components/Drawer/Drawer/Drawer.props.d.ts +1 -1
  259. package/dist/native/components/Drawer/Drawer/Drawer.view.d.ts +1 -1
  260. package/dist/native/components/Drawer/Drawer/Drawer.view.js +1 -1
  261. package/dist/native/components/Drawer/Drawer/Drawer.view.native.d.ts +1 -1
  262. package/dist/native/components/Drawer/Drawer/Drawer.view.native.js +1 -1
  263. package/dist/native/components/Drawer/Drawer.js +1 -1
  264. package/dist/native/components/DropZone/DropZone/DropZone.state.js +1 -1
  265. package/dist/native/components/DropZone/DropZone/DropZone.view.d.ts +1 -1
  266. package/dist/native/components/DropZone/DropZone/DropZone.view.js +1 -1
  267. package/dist/native/components/DropZone/DropZone/DropZone.view.native.d.ts +1 -1
  268. package/dist/native/components/DropZone/DropZone/DropZone.view.native.js +1 -1
  269. package/dist/native/components/DropZone/DropZone.d.ts +1 -1
  270. package/dist/native/components/DropZone/DropZone.js +1 -1
  271. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.props.d.ts +1 -1
  272. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.state.d.ts +2 -2
  273. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.state.js +1 -1
  274. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.type.d.ts +1 -1
  275. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.d.ts +1 -1
  276. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.js +1 -1
  277. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.d.ts +1 -1
  278. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.js +1 -1
  279. package/dist/native/components/DropdownMenu/DropdownMenu.js +1 -1
  280. package/dist/native/components/EditComponent/EditComponent.d.ts +1 -1
  281. package/dist/native/components/EditComponent/EditComponent.js +1 -1
  282. package/dist/native/components/EditComponent/EditPanel.d.ts +1 -1
  283. package/dist/native/components/EditComponent/EditPanel.js +1 -1
  284. package/dist/native/components/EditComponent/EditToolbar.d.ts +1 -1
  285. package/dist/native/components/EditComponent/EditToolbar.js +1 -1
  286. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.data.d.ts +3 -0
  287. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.data.js +3011 -0
  288. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.data.js.map +1 -0
  289. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.props.d.ts +30 -2
  290. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.props.js +18 -1
  291. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.props.js.map +1 -1
  292. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.state.d.ts +24 -3
  293. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.state.js +147 -113
  294. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.state.js.map +1 -1
  295. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.style.d.ts +2 -2
  296. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.style.js +1 -2211
  297. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.style.js.map +1 -1
  298. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.d.ts +1 -1
  299. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js +160 -90
  300. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js.map +1 -1
  301. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.d.ts +1 -1
  302. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.js +61 -85
  303. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.js.map +1 -1
  304. package/dist/native/components/EmojiPicker/EmojiPicker.d.ts +1 -1
  305. package/dist/native/components/EmojiPicker/EmojiPicker.js +1 -1
  306. package/dist/native/components/File/File.d.ts +1 -1
  307. package/dist/native/components/File/File.js +1 -1
  308. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.props.d.ts +1 -1
  309. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.state.d.ts +1 -1
  310. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.state.js +1 -1
  311. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.d.ts +1 -1
  312. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.js +1 -1
  313. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.d.ts +1 -1
  314. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.js +1 -1
  315. package/dist/native/components/Form/Checkbox/Checkbox.d.ts +1 -1
  316. package/dist/native/components/Form/Checkbox/Checkbox.js +1 -1
  317. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.props.d.ts +1 -1
  318. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.state.d.ts +4 -4
  319. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.state.js +1 -1
  320. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.d.ts +1 -1
  321. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.js +1 -1
  322. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.native.d.ts +1 -1
  323. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.native.js +1 -1
  324. package/dist/native/components/Form/ColorInput/ColorInput.d.ts +1 -1
  325. package/dist/native/components/Form/ColorInput/ColorInput.js +1 -1
  326. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.context.d.ts +1 -1
  327. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.context.js +1 -1
  328. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.props.d.ts +1 -1
  329. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.provider.d.ts +1 -1
  330. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.provider.js +1 -1
  331. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.state.js +1 -1
  332. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.d.ts +1 -1
  333. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.js +1 -1
  334. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.native.d.ts +1 -1
  335. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.native.js +1 -1
  336. package/dist/native/components/Form/ComboBox/ComboBox.d.ts +1 -1
  337. package/dist/native/components/Form/ComboBox/ComboBox.js +1 -1
  338. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.state.d.ts +1 -1
  339. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.state.js +1 -1
  340. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.d.ts +1 -1
  341. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js +1 -1
  342. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.native.d.ts +1 -1
  343. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.native.js +1 -1
  344. package/dist/native/components/Form/CountryPicker/CountryPicker.d.ts +1 -1
  345. package/dist/native/components/Form/CountryPicker/CountryPicker.js +1 -1
  346. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.state.d.ts +1 -1
  347. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.state.js +1 -1
  348. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.d.ts +1 -1
  349. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.js +1 -1
  350. package/dist/native/components/Form/DatePicker/DatePicker.d.ts +1 -1
  351. package/dist/native/components/Form/DatePicker/DatePicker.js +1 -1
  352. package/dist/native/components/Form/Label/Label/Label.view.d.ts +1 -1
  353. package/dist/native/components/Form/Label/Label/Label.view.js +1 -1
  354. package/dist/native/components/Form/Label/Label/Label.view.native.d.ts +1 -1
  355. package/dist/native/components/Form/Label/Label/Label.view.native.js +1 -1
  356. package/dist/native/components/Form/Label/Label.d.ts +1 -1
  357. package/dist/native/components/Form/Label/Label.js +1 -1
  358. package/dist/native/components/Form/Password/Password/Password.props.d.ts +1 -1
  359. package/dist/native/components/Form/Password/Password/Password.state.d.ts +1 -1
  360. package/dist/native/components/Form/Password/Password/Password.state.js +1 -1
  361. package/dist/native/components/Form/Password/Password/Password.type.d.ts +1 -1
  362. package/dist/native/components/Form/Password/Password.d.ts +1 -1
  363. package/dist/native/components/Form/Password/Password.js +1 -1
  364. package/dist/native/components/Form/Password/example/Default.d.ts +1 -1
  365. package/dist/native/components/Form/Password/example/Default.js +1 -1
  366. package/dist/native/components/Form/Password/example/DisabledInput.d.ts +1 -1
  367. package/dist/native/components/Form/Password/example/DisabledInput.js +1 -1
  368. package/dist/native/components/Form/Password/example/ErrorInput.d.ts +1 -1
  369. package/dist/native/components/Form/Password/example/ErrorInput.js +3 -5
  370. package/dist/native/components/Form/Password/example/ErrorInput.js.map +1 -1
  371. package/dist/native/components/Form/Password/example/HelperText.d.ts +1 -1
  372. package/dist/native/components/Form/Password/example/HelperText.js +2 -4
  373. package/dist/native/components/Form/Password/example/HelperText.js.map +1 -1
  374. package/dist/native/components/Form/Radio/Radio/Radio.props.d.ts +1 -1
  375. package/dist/native/components/Form/Radio/Radio/Radio.state.d.ts +1 -1
  376. package/dist/native/components/Form/Radio/Radio/Radio.state.js +1 -1
  377. package/dist/native/components/Form/Radio/Radio/Radio.view.d.ts +1 -1
  378. package/dist/native/components/Form/Radio/Radio/Radio.view.js +1 -1
  379. package/dist/native/components/Form/Radio/Radio/Radio.view.native.d.ts +1 -1
  380. package/dist/native/components/Form/Radio/Radio/Radio.view.native.js +1 -1
  381. package/dist/native/components/Form/Radio/Radio.d.ts +1 -1
  382. package/dist/native/components/Form/Radio/Radio.js +1 -1
  383. package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.props.d.ts +1 -1
  384. package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.state.js +1 -1
  385. package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.view.d.ts +1 -1
  386. package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.view.js +1 -1
  387. package/dist/native/components/Form/Radio/RadioGroup.d.ts +1 -1
  388. package/dist/native/components/Form/Radio/RadioGroup.js +1 -1
  389. package/dist/native/components/Form/Select/Select/Select.state.d.ts +1 -1
  390. package/dist/native/components/Form/Select/Select/Select.state.js +1 -1
  391. package/dist/native/components/Form/Select/Select/Select.view.d.ts +1 -1
  392. package/dist/native/components/Form/Select/Select/Select.view.js +1 -1
  393. package/dist/native/components/Form/Select/Select/Select.view.native.d.ts +1 -1
  394. package/dist/native/components/Form/Select/Select/Select.view.native.js +1 -1
  395. package/dist/native/components/Form/Select/Select.d.ts +1 -1
  396. package/dist/native/components/Form/Select/Select.js +1 -1
  397. package/dist/native/components/Form/Selector/Selector/Selector.state.d.ts +1 -1
  398. package/dist/native/components/Form/Selector/Selector/Selector.state.js +1 -1
  399. package/dist/native/components/Form/Selector/Selector/Selector.view.d.ts +1 -1
  400. package/dist/native/components/Form/Selector/Selector/Selector.view.js +1 -1
  401. package/dist/native/components/Form/Selector/Selector/Selector.view.native.d.ts +1 -1
  402. package/dist/native/components/Form/Selector/Selector/Selector.view.native.js +1 -1
  403. package/dist/native/components/Form/Selector/Selector.d.ts +1 -1
  404. package/dist/native/components/Form/Selector/Selector.js +1 -1
  405. package/dist/native/components/Form/Switch/Switch/Switch.state.d.ts +1 -1
  406. package/dist/native/components/Form/Switch/Switch/Switch.state.js +1 -1
  407. package/dist/native/components/Form/Switch/Switch/Switch.view.d.ts +1 -1
  408. package/dist/native/components/Form/Switch/Switch/Switch.view.js +1 -1
  409. package/dist/native/components/Form/Switch/Switch/Switch.view.native.d.ts +1 -1
  410. package/dist/native/components/Form/Switch/Switch/Switch.view.native.js +1 -1
  411. package/dist/native/components/Form/Switch/Switch.d.ts +1 -1
  412. package/dist/native/components/Form/Switch/Switch.js +1 -1
  413. package/dist/native/components/Form/TagInput/TagInput/TagInput.props.d.ts +1 -1
  414. package/dist/native/components/Form/TagInput/TagInput/TagInput.state.d.ts +4 -4
  415. package/dist/native/components/Form/TagInput/TagInput/TagInput.state.js +1 -1
  416. package/dist/native/components/Form/TagInput/TagInput/TagInput.view.d.ts +1 -1
  417. package/dist/native/components/Form/TagInput/TagInput/TagInput.view.js +1 -1
  418. package/dist/native/components/Form/TagInput/TagInput.d.ts +1 -1
  419. package/dist/native/components/Form/TagInput/TagInput.js +1 -1
  420. package/dist/native/components/Form/TextArea/TextArea/TextArea.state.d.ts +4 -4
  421. package/dist/native/components/Form/TextArea/TextArea/TextArea.state.js +1 -1
  422. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.d.ts +1 -1
  423. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.js +1 -1
  424. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.native.d.ts +1 -1
  425. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.native.js +3 -3
  426. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.native.js.map +1 -1
  427. package/dist/native/components/Form/TextArea/TextArea.d.ts +1 -1
  428. package/dist/native/components/Form/TextArea/TextArea.js +1 -1
  429. package/dist/native/components/Form/TextField/TextField/TextField.props.d.ts +1 -1
  430. package/dist/native/components/Form/TextField/TextField/TextField.state.d.ts +4 -4
  431. package/dist/native/components/Form/TextField/TextField/TextField.state.js +1 -1
  432. package/dist/native/components/Form/TextField/TextField/TextField.view.d.ts +1 -1
  433. package/dist/native/components/Form/TextField/TextField/TextField.view.js +1 -1
  434. package/dist/native/components/Form/TextField/TextField/TextField.view.native.d.ts +1 -1
  435. package/dist/native/components/Form/TextField/TextField/TextField.view.native.js +1 -1
  436. package/dist/native/components/Form/TextField/TextField.d.ts +1 -1
  437. package/dist/native/components/Form/TextField/TextField.js +1 -1
  438. package/dist/native/components/Formik/AttachmentPreview.d.ts +1 -1
  439. package/dist/native/components/Formik/AttachmentPreview.js +1 -1
  440. package/dist/native/components/Formik/Formik.ChatInput.d.ts +1 -1
  441. package/dist/native/components/Formik/Formik.ChatInput.js +1 -1
  442. package/dist/native/components/Formik/Formik.Checkbox.d.ts +1 -1
  443. package/dist/native/components/Formik/Formik.Checkbox.js +1 -1
  444. package/dist/native/components/Formik/Formik.ColorInput.d.ts +1 -1
  445. package/dist/native/components/Formik/Formik.ColorInput.js +1 -1
  446. package/dist/native/components/Formik/Formik.ComboBox.d.ts +1 -1
  447. package/dist/native/components/Formik/Formik.ComboBox.js +1 -1
  448. package/dist/native/components/Formik/Formik.CountryPicker.d.ts +1 -1
  449. package/dist/native/components/Formik/Formik.CountryPicker.js +1 -1
  450. package/dist/native/components/Formik/Formik.DatePicker.d.ts +1 -1
  451. package/dist/native/components/Formik/Formik.DatePicker.js +1 -1
  452. package/dist/native/components/Formik/Formik.EmojiPicker.d.ts +1 -1
  453. package/dist/native/components/Formik/Formik.EmojiPicker.js +2 -3
  454. package/dist/native/components/Formik/Formik.EmojiPicker.js.map +1 -1
  455. package/dist/native/components/Formik/Formik.Form.d.ts +1 -1
  456. package/dist/native/components/Formik/Formik.Form.js +1 -1
  457. package/dist/native/components/Formik/Formik.IconPicker.d.ts +1 -1
  458. package/dist/native/components/Formik/Formik.IconPicker.js +1 -1
  459. package/dist/native/components/Formik/Formik.OTPInput.d.ts +1 -1
  460. package/dist/native/components/Formik/Formik.OTPInput.js +1 -1
  461. package/dist/native/components/Formik/Formik.Password.d.ts +1 -1
  462. package/dist/native/components/Formik/Formik.Password.js +1 -1
  463. package/dist/native/components/Formik/Formik.Radio.d.ts +1 -1
  464. package/dist/native/components/Formik/Formik.Radio.js +1 -1
  465. package/dist/native/components/Formik/Formik.Select.d.ts +1 -1
  466. package/dist/native/components/Formik/Formik.Select.js +1 -1
  467. package/dist/native/components/Formik/Formik.Selector.d.ts +1 -1
  468. package/dist/native/components/Formik/Formik.Selector.js +1 -1
  469. package/dist/native/components/Formik/Formik.Slider.d.ts +1 -1
  470. package/dist/native/components/Formik/Formik.Slider.js +1 -1
  471. package/dist/native/components/Formik/Formik.Switch.d.ts +1 -1
  472. package/dist/native/components/Formik/Formik.Switch.js +1 -1
  473. package/dist/native/components/Formik/Formik.TagInput.d.ts +1 -1
  474. package/dist/native/components/Formik/Formik.TagInput.js +1 -1
  475. package/dist/native/components/Formik/Formik.TextArea.d.ts +1 -1
  476. package/dist/native/components/Formik/Formik.TextArea.js +1 -1
  477. package/dist/native/components/Formik/Formik.TextField.d.ts +1 -1
  478. package/dist/native/components/Formik/Formik.TextField.js +1 -1
  479. package/dist/native/components/Formik/Formik.Toggle.d.ts +1 -1
  480. package/dist/native/components/Formik/Formik.Toggle.js +1 -1
  481. package/dist/native/components/Formik/Formik.ToggleGroup.d.ts +1 -1
  482. package/dist/native/components/Formik/Formik.ToggleGroup.js +1 -1
  483. package/dist/native/components/Formik/Formik.Uploader.d.ts +1 -1
  484. package/dist/native/components/Formik/Formik.Uploader.js +1 -1
  485. package/dist/native/components/Gradient/Gradient/Gradient.view.d.ts +1 -1
  486. package/dist/native/components/Gradient/Gradient/Gradient.view.js +1 -1
  487. package/dist/native/components/Gradient/Gradient/Gradient.view.native.d.ts +1 -1
  488. package/dist/native/components/Gradient/Gradient/Gradient.view.native.js +1 -1
  489. package/dist/native/components/Gradient/Gradient.d.ts +1 -1
  490. package/dist/native/components/Gradient/Gradient.js +1 -1
  491. package/dist/native/components/HoverCard/HoverCard/HoverCard.props.d.ts +1 -1
  492. package/dist/native/components/HoverCard/HoverCard/HoverCard.state.d.ts +2 -2
  493. package/dist/native/components/HoverCard/HoverCard/HoverCard.state.js +1 -1
  494. package/dist/native/components/HoverCard/HoverCard/HoverCard.style.d.ts +1 -1
  495. package/dist/native/components/HoverCard/HoverCard/HoverCard.view.d.ts +1 -1
  496. package/dist/native/components/HoverCard/HoverCard/HoverCard.view.js +1 -1
  497. package/dist/native/components/HoverCard/HoverCard/HoverCard.view.native.d.ts +1 -1
  498. package/dist/native/components/HoverCard/HoverCard/HoverCard.view.native.js +1 -1
  499. package/dist/native/components/HoverCard/HoverCard.js +1 -1
  500. package/dist/native/components/Icon/Icon.d.ts +1 -1
  501. package/dist/native/components/Icon/Icon.js +1 -1
  502. package/dist/native/components/Icon/Icon.native.d.ts +1 -1
  503. package/dist/native/components/Icon/Icon.native.js +1 -1
  504. package/dist/native/components/IconPicker/IconPicker/IconPicker.state.d.ts +2 -2
  505. package/dist/native/components/IconPicker/IconPicker/IconPicker.state.js +1 -1
  506. package/dist/native/components/IconPicker/IconPicker/IconPicker.view.d.ts +1 -1
  507. package/dist/native/components/IconPicker/IconPicker/IconPicker.view.js +1 -1
  508. package/dist/native/components/IconPicker/IconPicker/IconPicker.view.native.d.ts +1 -1
  509. package/dist/native/components/IconPicker/IconPicker/IconPicker.view.native.js +1 -1
  510. package/dist/native/components/IconPicker/IconPicker.d.ts +1 -1
  511. package/dist/native/components/IconPicker/IconPicker.js +1 -1
  512. package/dist/native/components/Input/FieldContainer/FieldContainer/FieldContainer.props.d.ts +1 -1
  513. package/dist/native/components/Input/FieldContainer/FieldContainer.d.ts +1 -1
  514. package/dist/native/components/Input/FieldContainer/FieldContainer.js +1 -1
  515. package/dist/native/components/Input/FieldContent/FieldContent/FieldContent.props.d.ts +1 -1
  516. package/dist/native/components/Input/FieldContent/FieldContent.d.ts +1 -1
  517. package/dist/native/components/Input/FieldContent/FieldContent.js +1 -1
  518. package/dist/native/components/Input/FieldIcons/FieldIcons.d.ts +1 -1
  519. package/dist/native/components/Input/FieldIcons/FieldIcons.js +1 -1
  520. package/dist/native/components/Input/FieldLabel/FieldLabel/FieldLabel.props.d.ts +1 -1
  521. package/dist/native/components/Input/FieldLabel/FieldLabel.d.ts +1 -1
  522. package/dist/native/components/Input/FieldLabel/FieldLabel.js +1 -1
  523. package/dist/native/components/Input/FieldLayout/FieldLayout/FieldLayout.props.d.ts +1 -1
  524. package/dist/native/components/Input/FieldLayout/FieldLayout.d.ts +1 -1
  525. package/dist/native/components/Input/FieldLayout/FieldLayout.js +1 -1
  526. package/dist/native/components/Input/FieldWrapper/FieldWrapper.d.ts +1 -1
  527. package/dist/native/components/Input/FieldWrapper/FieldWrapper.js +1 -1
  528. package/dist/native/components/Input/HelperText/HelperText.d.ts +1 -1
  529. package/dist/native/components/Input/HelperText/HelperText.js +1 -1
  530. package/dist/native/components/Input/HelperText/HelperText.props.d.ts +1 -1
  531. package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.d.ts +1 -1
  532. package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.js +1 -1
  533. package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts +1 -1
  534. package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.native.js +1 -1
  535. package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.types.d.ts +1 -1
  536. package/dist/native/components/Link/Link/Link.props.d.ts +1 -1
  537. package/dist/native/components/Link/Link/Link.state.d.ts +1 -1
  538. package/dist/native/components/Link/Link/Link.state.js +1 -1
  539. package/dist/native/components/Link/Link/Link.view.d.ts +1 -1
  540. package/dist/native/components/Link/Link/Link.view.js +1 -1
  541. package/dist/native/components/Link/Link/Link.view.native.d.ts +1 -1
  542. package/dist/native/components/Link/Link/Link.view.native.js +1 -1
  543. package/dist/native/components/Link/Link.d.ts +1 -1
  544. package/dist/native/components/Link/Link.js +1 -1
  545. package/dist/native/components/Loader/Loader/Loader.props.d.ts +1 -1
  546. package/dist/native/components/Loader/Loader/Loader.view.d.ts +1 -1
  547. package/dist/native/components/Loader/Loader/Loader.view.js +1 -1
  548. package/dist/native/components/Loader/Loader/Loader.view.native.d.ts +1 -1
  549. package/dist/native/components/Loader/Loader/Loader.view.native.js +1 -1
  550. package/dist/native/components/Loader/Loader.d.ts +1 -1
  551. package/dist/native/components/Loader/Loader.js +1 -1
  552. package/dist/native/components/Markdown/Markdown/Markdown.content.d.ts +6 -0
  553. package/dist/native/components/Markdown/Markdown/Markdown.content.js +29 -0
  554. package/dist/native/components/Markdown/Markdown/Markdown.content.js.map +1 -0
  555. package/dist/native/components/Markdown/Markdown/Markdown.props.d.ts +16 -0
  556. package/dist/native/components/Markdown/Markdown/Markdown.props.js +2 -0
  557. package/dist/native/components/Markdown/Markdown/Markdown.props.js.map +1 -0
  558. package/dist/native/components/Markdown/Markdown/Markdown.view.d.ts +1 -0
  559. package/dist/native/components/Markdown/Markdown/Markdown.view.js +2 -0
  560. package/dist/native/components/Markdown/Markdown/Markdown.view.js.map +1 -0
  561. package/dist/native/components/Markdown/Markdown/Markdown.view.native.d.ts +3 -0
  562. package/dist/native/components/Markdown/Markdown/Markdown.view.native.js +8 -0
  563. package/dist/native/components/Markdown/Markdown/Markdown.view.native.js.map +1 -0
  564. package/dist/native/components/Markdown/Markdown.d.ts +3 -0
  565. package/dist/native/components/Markdown/Markdown.js +4 -0
  566. package/dist/native/components/Markdown/Markdown.js.map +1 -0
  567. package/dist/native/components/MediaPreview.d.ts +1 -1
  568. package/dist/native/components/MediaPreview.js +1 -1
  569. package/dist/native/components/Menubar/Menubar/Menubar.props.d.ts +1 -1
  570. package/dist/native/components/Menubar/Menubar/Menubar.state.d.ts +2 -2
  571. package/dist/native/components/Menubar/Menubar/Menubar.state.js +1 -1
  572. package/dist/native/components/Menubar/Menubar/Menubar.type.d.ts +1 -1
  573. package/dist/native/components/Menubar/Menubar/Menubar.view.d.ts +1 -1
  574. package/dist/native/components/Menubar/Menubar/Menubar.view.js +1 -1
  575. package/dist/native/components/Menubar/Menubar/Menubar.view.native.d.ts +1 -1
  576. package/dist/native/components/Menubar/Menubar/Menubar.view.native.js +1 -1
  577. package/dist/native/components/Menubar/Menubar.js +1 -1
  578. package/dist/native/components/Message/Message/Message.layout.d.ts +1 -1
  579. package/dist/native/components/Message/Message/Message.layout.js +1 -1
  580. package/dist/native/components/Message/Message/Message.layout.native.d.ts +1 -1
  581. package/dist/native/components/Message/Message/Message.layout.native.js +1 -1
  582. package/dist/native/components/Message/Message/Message.view.d.ts +1 -1
  583. package/dist/native/components/Message/Message/Message.view.js +1 -1
  584. package/dist/native/components/Modal/Modal/Modal.layout.d.ts +1 -1
  585. package/dist/native/components/Modal/Modal/Modal.layout.js +1 -1
  586. package/dist/native/components/Modal/Modal/Modal.props.d.ts +1 -1
  587. package/dist/native/components/Modal/Modal/Modal.view.d.ts +1 -1
  588. package/dist/native/components/Modal/Modal/Modal.view.js +1 -1
  589. package/dist/native/components/Modal/Modal/Modal.view.native.d.ts +1 -1
  590. package/dist/native/components/Modal/Modal/Modal.view.native.js +1 -1
  591. package/dist/native/components/Modal/Modal.js +1 -1
  592. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.props.d.ts +1 -1
  593. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.state.d.ts +2 -2
  594. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.state.js +1 -1
  595. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.type.d.ts +1 -1
  596. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.d.ts +1 -1
  597. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.js +1 -1
  598. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.native.d.ts +1 -1
  599. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.native.js +1 -1
  600. package/dist/native/components/NavigationMenu/NavigationMenu.js +1 -1
  601. package/dist/native/components/OTPInput/OTPInput/OTPInput.state.d.ts +7 -7
  602. package/dist/native/components/OTPInput/OTPInput/OTPInput.state.js +1 -1
  603. package/dist/native/components/OTPInput/OTPInput/OTPInput.view.d.ts +1 -1
  604. package/dist/native/components/OTPInput/OTPInput/OTPInput.view.js +1 -1
  605. package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.d.ts +1 -1
  606. package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.js +1 -1
  607. package/dist/native/components/OTPInput/OTPInput.d.ts +1 -1
  608. package/dist/native/components/OTPInput/OTPInput.js +1 -1
  609. package/dist/native/components/PageLayout/PageLayout.d.ts +1 -1
  610. package/dist/native/components/PageLayout/PageLayout.js +1 -1
  611. package/dist/native/components/PageLayout/PageLayout.types.d.ts +1 -1
  612. package/dist/native/components/Pagination/Pagination/Pagination.state.js +1 -1
  613. package/dist/native/components/Pagination/Pagination/Pagination.view.d.ts +1 -1
  614. package/dist/native/components/Pagination/Pagination/Pagination.view.js +1 -1
  615. package/dist/native/components/Pagination/Pagination/Pagination.view.native.d.ts +1 -1
  616. package/dist/native/components/Pagination/Pagination/Pagination.view.native.js +1 -1
  617. package/dist/native/components/Pagination/Pagination.d.ts +1 -1
  618. package/dist/native/components/Pagination/Pagination.js +1 -1
  619. package/dist/native/components/Portal/Portal.d.ts +1 -1
  620. package/dist/native/components/Portal/Portal.js +1 -1
  621. package/dist/native/components/Portal/Portal.native.d.ts +1 -1
  622. package/dist/native/components/Portal/Portal.native.js +1 -1
  623. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.d.ts +1 -1
  624. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.js +1 -1
  625. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.d.ts +1 -1
  626. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.js +1 -1
  627. package/dist/native/components/ProgressBar/ProgressBar.d.ts +1 -1
  628. package/dist/native/components/ProgressBar/ProgressBar.js +1 -1
  629. package/dist/native/components/Resizable/Resizable/Resizable.props.d.ts +1 -1
  630. package/dist/native/components/Resizable/Resizable/Resizable.state.d.ts +2 -2
  631. package/dist/native/components/Resizable/Resizable/Resizable.state.js +1 -1
  632. package/dist/native/components/Resizable/Resizable/Resizable.view.d.ts +1 -1
  633. package/dist/native/components/Resizable/Resizable/Resizable.view.js +1 -1
  634. package/dist/native/components/Resizable/Resizable/Resizable.view.native.d.ts +1 -1
  635. package/dist/native/components/Resizable/Resizable/Resizable.view.native.js +1 -1
  636. package/dist/native/components/Resizable/Resizable.js +1 -1
  637. package/dist/native/components/Router/Router.d.ts +1 -1
  638. package/dist/native/components/Router/Router.js +1 -1
  639. package/dist/native/components/Router/Router.match.d.ts +1 -1
  640. package/dist/native/components/Router/Router.match.js +1 -1
  641. package/dist/native/components/Router/Router.native.d.ts +1 -1
  642. package/dist/native/components/Router/Router.native.js +1 -1
  643. package/dist/native/components/Router/Router.types.d.ts +1 -1
  644. package/dist/native/components/Separator/Separator/Separator.view.d.ts +1 -1
  645. package/dist/native/components/Separator/Separator/Separator.view.js +1 -1
  646. package/dist/native/components/Separator/Separator/Separator.view.native.d.ts +1 -1
  647. package/dist/native/components/Separator/Separator/Separator.view.native.js +1 -1
  648. package/dist/native/components/Separator/Separator.d.ts +1 -1
  649. package/dist/native/components/Separator/Separator.js +1 -1
  650. package/dist/native/components/ShareButton/ShareButton/ShareButton.props.d.ts +1 -1
  651. package/dist/native/components/ShareButton/ShareButton/ShareButton.state.js +1 -1
  652. package/dist/native/components/ShareButton/ShareButton/ShareButton.state.native.js +1 -1
  653. package/dist/native/components/ShareButton/ShareButton/ShareButton.view.d.ts +1 -1
  654. package/dist/native/components/ShareButton/ShareButton/ShareButton.view.js +1 -1
  655. package/dist/native/components/ShareButton/ShareButton.d.ts +1 -1
  656. package/dist/native/components/ShareButton/ShareButton.js +1 -1
  657. package/dist/native/components/Sidebar/Sidebar/Sidebar.props.d.ts +1 -1
  658. package/dist/native/components/Sidebar/Sidebar/Sidebar.state.js +1 -1
  659. package/dist/native/components/Sidebar/Sidebar/Sidebar.view.d.ts +1 -1
  660. package/dist/native/components/Sidebar/Sidebar/Sidebar.view.js +1 -1
  661. package/dist/native/components/Sidebar/Sidebar/Sidebar.view.native.d.ts +1 -1
  662. package/dist/native/components/Sidebar/Sidebar/Sidebar.view.native.js +1 -1
  663. package/dist/native/components/Sidebar/Sidebar.js +1 -1
  664. package/dist/native/components/Slider/Slider/Slider.state.d.ts +1 -1
  665. package/dist/native/components/Slider/Slider/Slider.state.js +1 -1
  666. package/dist/native/components/Slider/Slider/Slider.view.d.ts +1 -1
  667. package/dist/native/components/Slider/Slider/Slider.view.js +1 -1
  668. package/dist/native/components/Slider/Slider/Slider.view.native.d.ts +1 -1
  669. package/dist/native/components/Slider/Slider/Slider.view.native.js +1 -1
  670. package/dist/native/components/Slider/Slider.d.ts +1 -1
  671. package/dist/native/components/Slider/Slider.js +1 -1
  672. package/dist/native/components/SplashScreen/SplashScreen.d.ts +1 -1
  673. package/dist/native/components/SplashScreen/SplashScreen.js +1 -1
  674. package/dist/native/components/SplashScreen/SplashScreen.types.d.ts +1 -1
  675. package/dist/native/components/StatusIndicator/StatusIndicator/StatusIndicator.view.d.ts +1 -1
  676. package/dist/native/components/StatusIndicator/StatusIndicator/StatusIndicator.view.js +1 -1
  677. package/dist/native/components/StatusIndicator/StatusIndicator.d.ts +1 -1
  678. package/dist/native/components/StatusIndicator/StatusIndicator.js +1 -1
  679. package/dist/native/components/Table/Table/Table.context.d.ts +1 -1
  680. package/dist/native/components/Table/Table/Table.context.js +1 -1
  681. package/dist/native/components/Table/Table/Table.props.d.ts +1 -1
  682. package/dist/native/components/Table/Table/Table.state.d.ts +1 -1
  683. package/dist/native/components/Table/Table/Table.state.js +1 -1
  684. package/dist/native/components/Table/Table/Table.view.d.ts +1 -1
  685. package/dist/native/components/Table/Table/Table.view.js +1 -1
  686. package/dist/native/components/Table/Table/TableScroll.d.ts +1 -1
  687. package/dist/native/components/Table/Table/TableScroll.js +1 -1
  688. package/dist/native/components/Table/Table/TableScroll.native.d.ts +1 -1
  689. package/dist/native/components/Table/Table/TableScroll.native.js +1 -1
  690. package/dist/native/components/Table/Table.d.ts +1 -1
  691. package/dist/native/components/Table/Table.js +1 -1
  692. package/dist/native/components/Tabs/Tabs/TabHeader.d.ts +1 -1
  693. package/dist/native/components/Tabs/Tabs/TabHeader.js +1 -1
  694. package/dist/native/components/Tabs/Tabs/Tabs.props.d.ts +1 -1
  695. package/dist/native/components/Tabs/Tabs/Tabs.state.js +1 -1
  696. package/dist/native/components/Tabs/Tabs/Tabs.type.d.ts +1 -1
  697. package/dist/native/components/Tabs/Tabs/Tabs.view.d.ts +1 -1
  698. package/dist/native/components/Tabs/Tabs/Tabs.view.js +1 -1
  699. package/dist/native/components/Tabs/Tabs/Tabs.view.native.d.ts +1 -1
  700. package/dist/native/components/Tabs/Tabs/Tabs.view.native.js +1 -1
  701. package/dist/native/components/Tabs/Tabs.d.ts +1 -1
  702. package/dist/native/components/Tabs/Tabs.js +1 -1
  703. package/dist/native/components/TextArea/TextArea.d.ts +1 -1
  704. package/dist/native/components/TextArea/TextArea.js +1 -1
  705. package/dist/native/components/TextArea/TextArea.native.d.ts +1 -1
  706. package/dist/native/components/TextArea/TextArea.native.js +1 -1
  707. package/dist/native/components/Title/Title/SlideEffect.d.ts +1 -1
  708. package/dist/native/components/Title/Title/SlideEffect.js +1 -1
  709. package/dist/native/components/Title/Title/SlideEffect.native.d.ts +1 -1
  710. package/dist/native/components/Title/Title/SlideEffect.native.js +1 -1
  711. package/dist/native/components/Title/Title/Title.state.d.ts +1 -1
  712. package/dist/native/components/Title/Title/Title.state.js +1 -1
  713. package/dist/native/components/Title/Title/Title.view.d.ts +1 -1
  714. package/dist/native/components/Title/Title/Title.view.js +1 -1
  715. package/dist/native/components/Title/Title/Title.view.native.d.ts +1 -1
  716. package/dist/native/components/Title/Title/Title.view.native.js +1 -1
  717. package/dist/native/components/Title/Title/TypewriterEffect.d.ts +1 -1
  718. package/dist/native/components/Title/Title/TypewriterEffect.js +1 -1
  719. package/dist/native/components/Title/Title/TypewriterEffect.native.d.ts +1 -1
  720. package/dist/native/components/Title/Title/TypewriterEffect.native.js +1 -1
  721. package/dist/native/components/Title/Title.d.ts +1 -1
  722. package/dist/native/components/Title/Title.js +1 -1
  723. package/dist/native/components/Toast/Toast/Toast.view.d.ts +1 -1
  724. package/dist/native/components/Toast/Toast/Toast.view.js +1 -1
  725. package/dist/native/components/Toast/Toast/Toast.view.native.d.ts +1 -1
  726. package/dist/native/components/Toast/Toast/Toast.view.native.js +1 -1
  727. package/dist/native/components/Toast/Toast.d.ts +1 -1
  728. package/dist/native/components/Toast/Toast.js +1 -1
  729. package/dist/native/components/Toggle/Toggle/Toggle.state.d.ts +2 -2
  730. package/dist/native/components/Toggle/Toggle/Toggle.state.js +1 -1
  731. package/dist/native/components/Toggle/Toggle/Toggle.view.d.ts +1 -1
  732. package/dist/native/components/Toggle/Toggle/Toggle.view.js +1 -1
  733. package/dist/native/components/Toggle/Toggle/Toggle.view.native.d.ts +1 -1
  734. package/dist/native/components/Toggle/Toggle/Toggle.view.native.js +1 -1
  735. package/dist/native/components/Toggle/Toggle.d.ts +1 -1
  736. package/dist/native/components/Toggle/Toggle.js +1 -1
  737. package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.state.d.ts +1 -1
  738. package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.state.js +1 -1
  739. package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.view.d.ts +1 -1
  740. package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.view.js +1 -1
  741. package/dist/native/components/ToggleGroup/ToggleGroup.d.ts +1 -1
  742. package/dist/native/components/ToggleGroup/ToggleGroup.js +1 -1
  743. package/dist/native/components/Tooltip/Tooltip/Tooltip.props.d.ts +1 -1
  744. package/dist/native/components/Tooltip/Tooltip/Tooltip.state.d.ts +2 -2
  745. package/dist/native/components/Tooltip/Tooltip/Tooltip.state.js +1 -1
  746. package/dist/native/components/Tooltip/Tooltip/Tooltip.view.d.ts +1 -1
  747. package/dist/native/components/Tooltip/Tooltip/Tooltip.view.js +1 -1
  748. package/dist/native/components/Tooltip/Tooltip/Tooltip.view.native.d.ts +1 -1
  749. package/dist/native/components/Tooltip/Tooltip/Tooltip.view.native.js +1 -1
  750. package/dist/native/components/Tooltip/Tooltip.js +1 -1
  751. package/dist/native/components/Uploader/Uploader/Uploader.state.d.ts +1 -1
  752. package/dist/native/components/Uploader/Uploader/Uploader.state.js +1 -1
  753. package/dist/native/components/Uploader/Uploader/Uploader.view.d.ts +1 -1
  754. package/dist/native/components/Uploader/Uploader/Uploader.view.js +1 -1
  755. package/dist/native/components/Uploader/Uploader.d.ts +1 -1
  756. package/dist/native/components/Uploader/Uploader.js +1 -1
  757. package/dist/native/components/index.d.ts +7 -0
  758. package/dist/native/components/index.js +5 -0
  759. package/dist/native/components/index.js.map +1 -1
  760. package/dist/native/design-system/DesignSystemProvider.d.ts +1 -1
  761. package/dist/native/design-system/DesignSystemProvider.js +1 -1
  762. package/dist/native/pages/designSystem.page.d.ts +1 -1
  763. package/dist/native/pages/designSystem.page.js +1 -1
  764. package/dist/web.cjs.js +55 -11
  765. package/dist/web.cjs.js.map +1 -1
  766. package/dist/web.esm.js +15921 -12341
  767. package/dist/web.esm.js.map +1 -1
  768. package/dist/web.umd.js +55 -11
  769. package/dist/web.umd.js.map +1 -1
  770. package/docs/app-studio/README.md +1 -1
  771. package/docs/components/BlockEditor-drag-and-drop.md +61 -0
  772. package/docs/components/BlockEditor.mdx +106 -0
  773. package/docs/components/ColorInput.mdx +1 -1
  774. package/docs/components/EmojiPicker.mdx +20 -0
  775. package/docs/components/Form.mdx +5 -5
  776. package/docs/components/Formik.mdx +23 -23
  777. package/docs/components/Markdown.mdx +99 -0
  778. package/docs/components/OTPInput.mdx +1 -1
  779. package/docs/components/TagInput.mdx +1 -1
  780. package/docs/components/TextArea.mdx +2 -2
  781. package/docs/components/TextField.mdx +3 -3
  782. package/docs/getting-started/component-usage.md +2 -2
  783. package/docs/getting-started/react-native.md +13 -2
  784. package/docs/tutorials/basic/creating-a-simple-form.md +4 -4
  785. package/package.json +1 -2
package/dist/web.cjs.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";var Ds=Object.create;var it=Object.defineProperty;var $s=Object.getOwnPropertyDescriptor;var Ls=Object.getOwnPropertyNames;var _s=Object.getPrototypeOf,Bs=Object.prototype.hasOwnProperty;var Os=(e,o,t)=>o in e?it(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var Ns=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of Ls(o))!Bs.call(e,a)&&a!==t&&it(e,a,{get:()=>o[a],enumerable:!(n=$s(o,a))||n.enumerable});return e};var qs=(e,o,t)=>(t=e!=null?Ds(_s(e)):{},Ns(o||!e||!e.__esModule?it(t,"default",{value:e,enumerable:!0}):t,e));var Ue=(e,o,t)=>Os(e,typeof o!="symbol"?o+"":o,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("react"),i=require("app-studio"),Us=require("react-dom"),Oo=require("zustand"),Tt=require("react-router-dom"),De=require("formik"),Ot=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,Gs=({type:e="single",value:o,defaultValue:t,onValueChange:n,collapsible:a=!1})=>{const l=o!==void 0,s=o??t,c=()=>e==="multiple"?Array.isArray(s)?s:s?[s]:[]:Array.isArray(s)?s[0]:s,[d,u]=p.useState(c()),g=p.useMemo(()=>Ot("accordion"),[]),m=l?o:d,h=p.useMemo(()=>m===void 0?[]:Array.isArray(m)?m:[m],[m]);p.useEffect(()=>{l&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),u(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),u(o.length>0?o[0]:void 0)):u(o))},[o,l,e]);const f=p.useCallback(k=>{let b;if(e==="single")m===k&&a?b=void 0:m!==k?b=k:b=m;else{const C=Array.isArray(m)?m:[];C.includes(k)?b=C.filter(j=>j!==k):b=[...C,k],Array.isArray(b)&&b.length===0&&(b=[])}l||u(b),n&&n(b)},[e,m,a,l,n]),y=p.useCallback(k=>h.includes(k),[h]);return{expandedItems:h,toggleItem:f,isItemExpanded:y,type:e,collapsible:a,baseId:g}},Ys={square:{borderRadius:0},rounded:{borderRadius:8}},Ks={default:{borderWidth:0,style:{backgroundColor:"transparent"},transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.15s ease, background-color 0.15s ease",_hover:{borderColor:"color-gray-300"}},filled:{backgroundColor:"color-gray-50",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-100"}}},Xs={id:"default",label:"Default",sourcePath:"",sourceTitle:"Default adaptive design system (light + dark)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},Js={primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626",onPrimary:"#ffffff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200"},Qs={rawCssVars:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626"},colors:[{name:"primary",value:"#2563eb",role:"primary"},{name:"secondary",value:"#7c3aed",role:"secondary"},{name:"success",value:"#16a34a",role:"success"},{name:"warning",value:"#d97706",role:"warning"},{name:"error",value:"#dc2626",role:"error"}],typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace",fontSizes:["12px","13px","14px","16px","18px","22px","28px","36px","48px","64px"],fontWeights:["400","500","600","700","800"],lineHeights:["1.0","1.1","1.2","1.4","1.5","1.6"]},spacing:["2px","4px","8px","12px","16px","24px","32px","48px","64px"],radii:["2px","4px","6px","8px","12px","16px","9999px"],shadows:["0 1px 2px rgba(0,0,0,0.04)","0 4px 12px rgba(0,0,0,0.08)","0 12px 32px rgba(0,0,0,0.12)"]},Zs={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:8,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:600,fontStyle:"normal"},text:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 2px rgba(0,0,0,0.04)"},header:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"9999px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},ec={cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral-clear"},oc={metadata:Xs,theme:Js,tokens:Qs,components:Zs,personality:ec},rc={id:"airbnb",label:"Airbnb",sourcePath:"design.md/html/airbnb.html",sourceTitle:"Design System Inspiration of Airbnb",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},tc={primary:"#ff385c",secondary:"#222222",success:"#428bff",warning:"#460479",error:"#c13515",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},nc={rawCssVars:{primary:"#ff385c","primary-active":"#e00b41","primary-disabled":"#ffd1da",error:"#c13515",luxe:"#460479",plus:"#92174d",ink:"#222222",body:"#3f3f3f",muted:"#6a6a6a","muted-soft":"#929292",hairline:"#dddddd","hairline-soft":"#ebebeb","border-strong":"#c1c1c1",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#f2f2f2","on-primary":"#ffffff","legal-link":"#428bff",shadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",display:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",text:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, sans-serif"},colors:[{name:"primary",value:"#ff385c",role:"primary"},{name:"primary-active",value:"#e00b41",role:"primary active"},{name:"primary-disabled",value:"#ffd1da",role:"primary disabled"},{name:"error",value:"#c13515",role:"error"},{name:"luxe",value:"#460479",role:"luxe"},{name:"plus",value:"#92174d",role:"plus"},{name:"ink",value:"#222222",role:"ink"},{name:"body",value:"#3f3f3f",role:"body"},{name:"muted",value:"#6a6a6a",role:"muted"},{name:"muted-soft",value:"#929292",role:"muted soft"},{name:"hairline",value:"#dddddd",role:"hairline"},{name:"hairline-soft",value:"#ebebeb",role:"hairline soft"},{name:"border-strong",value:"#c1c1c1",role:"border strong"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#f2f2f2",role:"surface strong"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"legal-link",value:"#428bff",role:"legal link"},{name:"shadow",value:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",role:"shadow"}],typography:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","48px","18px","20px","11px","28px","13px","12px","8px","64px","21px","10px","24px","36px","15px"],fontWeights:["400","600","700","500"],lineHeights:["1.5","1.1","1.43","1.25","2","1","1.2","1.35","1.4"]},spacing:["2px","4px","5px","6px","7px","8px","10px","11px","12px","13px","14px","16px","20px","23px","24px","28px","32px","40px","48px","56px"],radii:["9999px","8px","14px","4px","6px","3px"],shadows:["rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0","var(--shadow)"]},ac={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},header:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"14px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:16},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:16},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"14px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"14px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},lc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:16,pillRadius:9999,badgeRadius:6,voice:"warm-welcoming"},ic={metadata:rc,theme:tc,tokens:nc,components:ac,personality:lc},sc={id:"apple",label:"Apple",sourcePath:"design.md/html/apple.html",sourceTitle:"Design System Inspiration of Apple",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},cc={primary:"#0071E3",secondary:"#1d1d1f",success:"#0071e3",warning:"#272729",error:"#2997ff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},dc={rawCssVars:{primary:"#0066cc","primary-focus":"#0071e3","primary-on-dark":"#2997ff",ink:"#1d1d1f",body:"#1d1d1f","body-on-dark":"#ffffff","body-muted":"#cccccc","ink-muted-80":"#333333","ink-muted-48":"#7a7a7a","divider-soft":"#f0f0f0",hairline:"#e0e0e0",canvas:"#ffffff","canvas-parchment":"#f5f5f7","surface-pearl":"#fafafc","surface-tile-1":"#272729","surface-tile-2":"#2a2a2c","surface-tile-3":"#252527","surface-black":"#000000","surface-chip-translucent":"rgba(210, 210, 215, 0.64)","on-primary":"#ffffff","on-dark":"#ffffff",display:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",text:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#0071E3",role:"primary"},{name:"primary-focus",value:"#0071e3",role:"primary focus"},{name:"primary-on-dark",value:"#2997ff",role:"primary on dark"},{name:"ink",value:"#1d1d1f",role:"ink"},{name:"body",value:"#1d1d1f",role:"body"},{name:"body-on-dark",value:"#ffffff",role:"body on dark"},{name:"body-muted",value:"#cccccc",role:"body muted"},{name:"ink-muted-80",value:"#333333",role:"ink muted 80"},{name:"ink-muted-48",value:"#7a7a7a",role:"ink muted 48"},{name:"divider-soft",value:"#f0f0f0",role:"divider soft"},{name:"hairline",value:"#e0e0e0",role:"hairline"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"canvas-parchment",value:"#f5f5f7",role:"canvas parchment"},{name:"surface-pearl",value:"#fafafc",role:"surface pearl"},{name:"surface-tile-1",value:"#272729",role:"surface tile 1"},{name:"surface-tile-2",value:"#2a2a2c",role:"surface tile 2"},{name:"surface-tile-3",value:"#252527",role:"surface tile 3"},{name:"surface-black",value:"#000000",role:"surface black"},{name:"surface-chip-translucent",value:"rgba(210, 210, 215, 0.64)",role:"surface chip translucent"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"}],typography:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["17px","14px","56px","21px","12px","40px","24px","13px","18px","28px","11px","34px","44px","32px","19px"],fontWeights:["400","600","300","700"],lineHeights:["1.47","1.07","1.19","1.1","1.43","1.5","1","1.14","2.0","2.41","1.2","1.35"]},spacing:["5px","6px","7px","8px","10px","11px","12px","14px","15px","16px","18px","20px","21px","22px","24px","28px","32px","44px","48px","50px"],radii:["9999px","18px","28px","24px","8px","11px","50%","12px","4px","6px","3px"],shadows:["0 5px 30px rgba(0, 0, 0, 0.22)"]},uc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:8,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:18,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 5px 30px rgba(0, 0, 0, 0.22)"},header:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"18px"},trigger:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:18},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:18},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"18px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"18px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},pc={cornerStyle:"soft",typeWeight:"light",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"flat",signatureMotif:"◯",density:"spacious",surfaceTone:"paper",cardRadius:18,pillRadius:9999,badgeRadius:8,voice:"minimal-precise"},mc={metadata:sc,theme:cc,tokens:dc,components:uc,personality:pc},gc={id:"coinbase",label:"Coinbase",sourcePath:"design.md/html/coinbase.html",sourceTitle:"Design System Inspiration of Coinbase",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap"]},hc={primary:"#0052ff",secondary:"#0a0b0d",success:"#16a34a",warning:"#003ecc",error:"#dc2626",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},fc={rawCssVars:{primary:"#0052ff","primary-active":"#003ecc","primary-disabled":"#a8b8cc",ink:"#0a0b0d",body:"#5b616e",muted:"#7c828a","muted-soft":"#a8acb3",hairline:"#dee1e6","hairline-soft":"#eef0f3",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#eef0f3","surface-dark":"#0a0b0d","surface-dark-elevated":"#16181c","on-primary":"#ffffff","on-dark":"#ffffff","on-dark-soft":"#a8acb3","semantic-up":"#05b169","semantic-down":"#cf202f","accent-yellow":"#f4b000",display:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",text:"'Inter', 'Coinbase Sans', sans-serif",mono:"'JetBrains Mono', 'Coinbase Mono', monospace"},colors:[{name:"primary",value:"#0052ff",role:"primary"},{name:"primary-active",value:"#003ecc",role:"primary active"},{name:"primary-disabled",value:"#a8b8cc",role:"primary disabled"},{name:"ink",value:"#0a0b0d",role:"ink"},{name:"body",value:"#5b616e",role:"body"},{name:"muted",value:"#7c828a",role:"muted"},{name:"muted-soft",value:"#a8acb3",role:"muted soft"},{name:"hairline",value:"#dee1e6",role:"hairline"},{name:"hairline-soft",value:"#eef0f3",role:"hairline soft"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#eef0f3",role:"surface strong"},{name:"surface-dark",value:"#0a0b0d",role:"surface dark"},{name:"surface-dark-elevated",value:"#16181c",role:"surface dark elevated"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-soft",value:"#a8acb3",role:"on dark soft"},{name:"semantic-up",value:"#05b169",role:"semantic up"},{name:"semantic-down",value:"#cf202f",role:"semantic down"},{name:"accent-yellow",value:"#f4b000",role:"accent yellow"}],typography:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",monoFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontSizes:["16px","14px","72px","18px","13px","36px","12px","44px","11px","52px","28px","40px","32px","48px","26px"],fontWeights:["500","600","400","700"],lineHeights:["1.5","1.2","1.05","1.15","1.0","1.09","1","1.35","1.4"]},spacing:["4px","5px","6px","8px","10px","11px","12px","13px","14px","15px","16px","19px","20px","24px","28px","32px","40px","44px","48px","56px"],radii:["100px","24px","20px","16px","9999px","14px","12px","8px","6px","3px"],shadows:["0 16px 40px rgba(0,0,0,0.5)","0 16px 40px rgba(0,0,0,0.4)","0 4px 12px rgba(0,0,0,0.04)"]},yc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 16px 40px rgba(0,0,0,0.5)"},header:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"16px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"16px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},xc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"◆",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"trustworthy-financial"},bc={metadata:gc,theme:hc,tokens:fc,components:yc,personality:xc},kc={id:"figma",label:"Figma",sourcePath:"design.md/html/figma.html",sourceTitle:"Design System Inspiration of Figma",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300..700&family=JetBrains+Mono:wght@400;500&display=swap"]},Cc={primary:"#F24E1E",secondary:"#A259FF",success:"#0ACF83",warning:"#FFC700",error:"#FF7262",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Sc={rawCssVars:{primary:"#000000","on-primary":"#ffffff",ink:"#000000",canvas:"#ffffff","inverse-canvas":"#000000","inverse-ink":"#ffffff",hairline:"#e6e6e6","hairline-soft":"#f1f1f1","surface-soft":"#f7f7f5","block-lime":"#dceeb1","block-lilac":"#c5b0f4","block-cream":"#f4ecd6","block-pink":"#efd4d4","block-mint":"#c8e6cd","block-coral":"#f3c9b6","block-navy":"#1f1d3d","accent-magenta":"#ff3d8b","semantic-success":"#1ea64a",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",mono:"'JetBrains Mono', 'SF Mono', Menlo, monospace"},colors:[{name:"primary",value:"#F24E1E",role:"primary"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#000000",role:"ink"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"inverse-canvas",value:"#000000",role:"inverse canvas"},{name:"inverse-ink",value:"#ffffff",role:"inverse ink"},{name:"hairline",value:"#e6e6e6",role:"hairline"},{name:"hairline-soft",value:"#f1f1f1",role:"hairline soft"},{name:"surface-soft",value:"#f7f7f5",role:"surface soft"},{name:"block-lime",value:"#dceeb1",role:"block lime"},{name:"block-lilac",value:"#c5b0f4",role:"block lilac"},{name:"block-cream",value:"#f4ecd6",role:"block cream"},{name:"block-pink",value:"#efd4d4",role:"block pink"},{name:"block-mint",value:"#c8e6cd",role:"block mint"},{name:"block-coral",value:"#f3c9b6",role:"block coral"},{name:"block-navy",value:"#1f1d3d",role:"block navy"},{name:"accent-magenta",value:"#ff3d8b",role:"accent magenta"},{name:"semantic-success",value:"#1ea64a",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",monoFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontSizes:["18px","16px","80px","20px","12px","40px","14px","11px","26px","24px","32px","13px","10px","56px","36px"],fontWeights:["320","330","480","600","500","700"],lineHeights:["1.45","1.0","1.4","1.1","1.6","1.35","1","1.2"]},spacing:["5px","6px","8px","10px","12px","14px","16px","20px","22px","24px","28px","32px","36px","40px","44px","48px","56px","64px","96px","100px"],radii:["50px","8px","9999px","24px","6px","2px","3px"],shadows:["0 0 0 2px rgba(0,0,0,0.08)","none","0 4px 16px rgba(0,0,0,0.06)","0 12px 32px rgba(0,0,0,0.18)"]},jc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 2px rgba(0,0,0,0.08)"},header:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"12px"},trigger:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},wc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"✦",density:"comfortable",surfaceTone:"paper",cardRadius:8,pillRadius:9999,badgeRadius:4,voice:"playful-creative"},vc={metadata:kc,theme:Cc,tokens:Sc,components:jc,personality:wc},Tc={id:"linear",label:"Linear",sourcePath:"design.md/html/linear.html",sourceTitle:"Design System Inspiration of Linear",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap"]},Ic={primary:"#5e6ad2",secondary:"#828fff",success:"#27a644",warning:"#5e69d1",error:"#828fff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Rc={rawCssVars:{primary:"#5e6ad2","primary-hover":"#828fff","primary-focus":"#5e69d1","on-primary":"#ffffff",ink:"#f7f8f8","ink-muted":"#d0d6e0","ink-subtle":"#8a8f98","ink-tertiary":"#62666d",canvas:"#010102","surface-1":"#0f1011","surface-2":"#141516","surface-3":"#18191a","surface-4":"#191a1b",hairline:"#23252a","hairline-strong":"#34343a","hairline-tertiary":"#3e3e44","semantic-success":"#27a644",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",mono:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace"},colors:[{name:"primary",value:"#5e6ad2",role:"primary"},{name:"primary-hover",value:"#828fff",role:"primary hover"},{name:"primary-focus",value:"#5e69d1",role:"primary focus"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#f7f8f8",role:"ink"},{name:"ink-muted",value:"#d0d6e0",role:"ink muted"},{name:"ink-subtle",value:"#8a8f98",role:"ink subtle"},{name:"ink-tertiary",value:"#62666d",role:"ink tertiary"},{name:"canvas",value:"#08090A",role:"canvas"},{name:"surface-1",value:"#0f1011",role:"surface 1"},{name:"surface-2",value:"#141516",role:"surface 2"},{name:"surface-3",value:"#18191a",role:"surface 3"},{name:"surface-4",value:"#191a1b",role:"surface 4"},{name:"hairline",value:"#23252a",role:"hairline"},{name:"hairline-strong",value:"#34343a",role:"hairline strong"},{name:"hairline-tertiary",value:"#3e3e44",role:"hairline tertiary"},{name:"semantic-success",value:"#27a644",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",monoFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontSizes:["16px","14px","80px","18px","13px","56px","15px","12px","11px","28px","40px","22px","10px","36px"],fontWeights:["400","500","600","700"],lineHeights:["1.50","1.05","1.20","1.10","1.5","1.6","1.25","1","1.2","1.35","1.4"]},spacing:["2px","5px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","48px","56px","64px","80px","96px","120px"],radii:["8px","12px","9999px","16px","4px","2px","6px","3px"],shadows:["rgba(255,255,255,0.05) 0 0.5px 0 0.5px","0 0 0 2px rgba(94,105,209,0.25)"]},Fc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-on-primary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"theme-on-primary",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",letterSpacing:"-0.025em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(255,255,255,0.05) 0 0.5px 0 0.5px"},header:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.025em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.025em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.025em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},zc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.025em",accentTreatment:"gradient",signatureMotif:"↗",density:"tight",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"speed-clarity"},Mc={metadata:Tc,theme:Ic,tokens:Rc,components:Fc,personality:zc},Wc={id:"nike",label:"Nike",sourcePath:"design.md/html/nike.html",sourceTitle:"Design System Inspiration of Nike",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},Hc={primary:"color-black",secondary:"#FA5400",success:"#76E0B5",warning:"#1151ff",error:"#d30005",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Vc={rawCssVars:{ink:"#111111","on-primary":"#ffffff",canvas:"#ffffff","soft-cloud":"#f5f5f5",charcoal:"#39393b",ash:"#4b4b4d",mute:"#707072",stone:"#9e9ea0",hairline:"#cacacb","hairline-soft":"#e5e5e5",sale:"#d30005","sale-deep":"#780700",success:"#007d48","success-bright":"#1eaa52",info:"#1151ff","info-deep":"#0034e3","accent-pink":"#ed1aa0","accent-pink-soft":"#ffb0dd","accent-purple-soft":"#beaffd","accent-purple-pale":"#d6d1ff","accent-teal":"#0a7281","accent-pink-deep":"#4c012d","font-display":"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif","font-ui":"'Inter', 'Helvetica Now Text Medium', Helvetica, Arial, sans-serif","font-body":"'Inter', 'Helvetica Now Text', Helvetica, Arial, sans-serif"},colors:[{name:"ink",value:"#111111",role:"ink"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"soft-cloud",value:"#f5f5f5",role:"soft cloud"},{name:"charcoal",value:"#39393b",role:"charcoal"},{name:"ash",value:"#4b4b4d",role:"ash"},{name:"mute",value:"#707072",role:"mute"},{name:"stone",value:"#9e9ea0",role:"stone"},{name:"hairline",value:"#cacacb",role:"hairline"},{name:"hairline-soft",value:"#e5e5e5",role:"hairline soft"},{name:"sale",value:"#d30005",role:"sale"},{name:"sale-deep",value:"#780700",role:"sale deep"},{name:"success",value:"#76E0B5",role:"success"},{name:"success-bright",value:"#1eaa52",role:"success bright"},{name:"info",value:"#1151ff",role:"info"},{name:"info-deep",value:"#0034e3",role:"info deep"},{name:"accent-pink",value:"#ed1aa0",role:"accent pink"},{name:"accent-pink-soft",value:"#ffb0dd",role:"accent pink soft"},{name:"accent-purple-soft",value:"#beaffd",role:"accent purple soft"},{name:"accent-purple-pale",value:"#d6d1ff",role:"accent purple pale"},{name:"accent-teal",value:"#0a7281",role:"accent teal"},{name:"accent-pink-deep",value:"#4c012d",role:"accent pink deep"}],typography:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","15px","14px","96px","18px","12px","56px","13px","11px","24px","40px","64px","48px","32px"],fontWeights:["700","500","600"],lineHeights:["1.5","0.92","1","1.4","1.6","0.9","1.2","1.75","1.7","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","12px","14px","16px","18px","20px","24px","28px","30px","32px","36px","40px","44px","48px","56px"],radii:["9999px","24px","14px","6px","3px"],shadows:["0 0 0 12px var(--soft-cloud)","0 20px 30px -10px rgba(0,0,0,0.18)","0 0 0 2px var(--canvas), 0 0 0 4px var(--ink)","inset 0 -1px 0 var(--hairline-soft)"]},Ac={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"},content:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"italic"},text:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 12px var(--soft-cloud)"},header:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"italic"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"theme-secondary",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"theme-secondary",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"italic"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},description:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary"}}}},Pc={cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"italic",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"athletic-bold"},Ec={metadata:Wc,theme:Hc,tokens:Vc,components:Ac,personality:Pc},Dc={id:"notion",label:"Notion",sourcePath:"design.md/html/notion.html",sourceTitle:"Design System Inspiration of Notion",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},$c={primary:"#5645d4",secondary:"#ff64c8",success:"#1aae39",warning:"#dd5b00",error:"#ff64c8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Lc={rawCssVars:{primary:"#5645d4","primary-pressed":"#4534b3","primary-deep":"#3a2a99","on-primary":"#ffffff","brand-navy":"#0a1530","brand-navy-deep":"#070f24","link-blue":"#0075de","brand-pink":"#ff64c8","brand-orange":"#dd5b00","brand-purple":"#7b3ff2","brand-purple-800":"#391c57","brand-orange-deep":"#793400","brand-green":"#1aae39","brand-yellow":"#f5d75e","brand-teal":"#2a9d99","tint-peach":"#ffe8d4","tint-rose":"#fde0ec","tint-mint":"#d9f3e1","tint-lavender":"#e6e0f5","tint-sky":"#dcecfa","tint-yellow":"#fef7d6","tint-yellow-bold":"#f9e79f","tint-cream":"#f8f5e8",canvas:"#ffffff",surface:"#f6f5f4","surface-soft":"#fafaf9",hairline:"#e5e3df","hairline-soft":"#ede9e4","hairline-strong":"#c8c4be","hairline-dark":"rgba(255,255,255,0.16)","ink-deep":"#000000",ink:"#1a1a1a",charcoal:"#37352f",slate:"#5d5b54",steel:"#787671",stone:"#a4a097",muted:"#bbb8b1","on-dark":"#ffffff","on-dark-muted":"#a4a097"},colors:[{name:"primary",value:"#5645d4",role:"primary"},{name:"primary-pressed",value:"#4534b3",role:"primary pressed"},{name:"primary-deep",value:"#3a2a99",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"brand-navy",value:"#0a1530",role:"brand navy"},{name:"brand-navy-deep",value:"#070f24",role:"brand navy deep"},{name:"link-blue",value:"#0075de",role:"link blue"},{name:"brand-pink",value:"#ff64c8",role:"brand pink"},{name:"brand-orange",value:"#dd5b00",role:"brand orange"},{name:"brand-purple",value:"#7b3ff2",role:"brand purple"},{name:"brand-purple-800",value:"#391c57",role:"brand purple 800"},{name:"brand-orange-deep",value:"#793400",role:"brand orange deep"},{name:"brand-green",value:"#1aae39",role:"brand green"},{name:"brand-yellow",value:"#f5d75e",role:"brand yellow"},{name:"brand-teal",value:"#2a9d99",role:"brand teal"},{name:"tint-peach",value:"#ffe8d4",role:"tint peach"},{name:"tint-rose",value:"#fde0ec",role:"tint rose"},{name:"tint-mint",value:"#d9f3e1",role:"tint mint"},{name:"tint-lavender",value:"#e6e0f5",role:"tint lavender"},{name:"tint-sky",value:"#dcecfa",role:"tint sky"},{name:"tint-yellow",value:"#fef7d6",role:"tint yellow"},{name:"tint-yellow-bold",value:"#f9e79f",role:"tint yellow bold"},{name:"tint-cream",value:"#f8f5e8",role:"tint cream"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface",value:"#f6f5f4",role:"surface"},{name:"surface-soft",value:"#fafaf9",role:"surface soft"},{name:"hairline",value:"#e5e3df",role:"hairline"},{name:"hairline-soft",value:"#ede9e4",role:"hairline soft"},{name:"hairline-strong",value:"#c8c4be",role:"hairline strong"},{name:"hairline-dark",value:"rgba(255,255,255,0.16)",role:"hairline dark"},{name:"ink-deep",value:"#000000",role:"ink deep"},{name:"ink",value:"#1a1a1a",role:"ink"},{name:"charcoal",value:"#37352f",role:"charcoal"},{name:"slate",value:"#5d5b54",role:"slate"},{name:"steel",value:"#787671",role:"steel"},{name:"stone",value:"#a4a097",role:"stone"},{name:"muted",value:"#bbb8b1",role:"muted"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-muted",value:"#a4a097",role:"on dark muted"}],typography:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","15px","12px","80px","18px","48px","16px","13px","22px","11px","56px","36px","10px","20px","28px"],fontWeights:["500","600","400","700"],lineHeights:["1.55","1","1.05","1.15","1.4","1.3","1.5","1.1","1.2","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","11px","12px","14px","15px","16px","18px","20px","24px","31px","32px","40px","44px","48px","56px"],radii:["6px","8px","16px","50%","12px","9999px","4px","3px"],shadows:["rgba(15, 15, 15, 0.20) 0px 24px 48px -8px","rgba(15,15,15,0.04) 0px 1px 2px 0px","rgba(15,15,15,0.08) 0px 4px 12px 0px","rgba(15,15,15,0.20) 0px 24px 48px -8px","rgba(15,15,15,0.16) 0px 16px 48px -8px"]},_c={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",letterSpacing:"0em",textTransform:"none",fontWeight:400,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(15, 15, 15, 0.20) 0px 24px 48px -8px"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:10},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:10},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Bc={cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"0em",accentTreatment:"flat",signatureMotif:"◇",density:"comfortable",surfaceTone:"paper",cardRadius:10,pillRadius:9999,badgeRadius:4,voice:"thoughtful-quiet"},Oc={metadata:Dc,theme:$c,tokens:Lc,components:_c,personality:Bc},Nc={id:"revolut",label:"Revolut",sourcePath:"design.md/html/revolut.html",sourceTitle:"Design System Inspiration of Revolut",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},qc={primary:"#1361F0",secondary:"#101D31",success:"#16a34a",warning:"#d97706",error:"#e61e49",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Uc={rawCssVars:{primary:"#494fdf","primary-bright":"#4f55f1","primary-deep":"#3a40c4","on-primary":"#ffffff",ink:"#191c1f",body:"#1f2226",charcoal:"#3a3d40",mute:"#505a63",ash:"#5c5e60",stone:"#8d969e",faint:"#c9c9cd","on-dark":"#ffffff","on-dark-mute":"rgba(255,255,255,0.72)","canvas-light":"#ffffff","canvas-dark":"#000000","surface-soft":"#f4f4f4","surface-card":"#ffffff","surface-deep":"#0a0a0a","surface-elevated":"#16181a","hairline-light":"#e2e2e7","hairline-dark":"rgba(255,255,255,0.12)","hairline-strong":"#191c1f","divider-soft":"rgba(255,255,255,0.06)",teal:"#00a87e","light-blue":"#007bc2","blue-link":"#376cd5","light-green":"#428619","green-text":"#006400",yellow:"#b09000",warning:"#ec7e00",pink:"#e61e49",danger:"#e23b4a","deep-red":"#8b0000",brown:"#936d62","font-display":"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif","font-ui":"'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#1361F0",role:"primary"},{name:"primary-bright",value:"#4f55f1",role:"primary bright"},{name:"primary-deep",value:"#3a40c4",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#191c1f",role:"ink"},{name:"body",value:"#1f2226",role:"body"},{name:"charcoal",value:"#3a3d40",role:"charcoal"},{name:"mute",value:"#505a63",role:"mute"},{name:"ash",value:"#5c5e60",role:"ash"},{name:"stone",value:"#8d969e",role:"stone"},{name:"faint",value:"#c9c9cd",role:"faint"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-mute",value:"rgba(255,255,255,0.72)",role:"on dark mute"},{name:"canvas-light",value:"#ffffff",role:"canvas light"},{name:"canvas-dark",value:"#000000",role:"canvas dark"},{name:"surface-soft",value:"#f4f4f4",role:"surface soft"},{name:"surface-card",value:"#ffffff",role:"surface card"},{name:"surface-deep",value:"#0a0a0a",role:"surface deep"},{name:"surface-elevated",value:"#16181a",role:"surface elevated"},{name:"hairline-light",value:"#e2e2e7",role:"hairline light"},{name:"hairline-dark",value:"rgba(255,255,255,0.12)",role:"hairline dark"},{name:"hairline-strong",value:"#191c1f",role:"hairline strong"},{name:"divider-soft",value:"rgba(255,255,255,0.06)",role:"divider soft"},{name:"teal",value:"#00a87e",role:"teal"},{name:"light-blue",value:"#007bc2",role:"light blue"},{name:"blue-link",value:"#376cd5",role:"blue link"},{name:"light-green",value:"#428619",role:"light green"},{name:"green-text",value:"#006400",role:"green text"},{name:"yellow",value:"#b09000",role:"yellow"},{name:"warning",value:"#d97706",role:"warning"},{name:"pink",value:"#e61e49",role:"pink"},{name:"danger",value:"#e23b4a",role:"danger"},{name:"deep-red",value:"#8b0000",role:"deep red"},{name:"brown",value:"#936d62",role:"brown"}],typography:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","18px","12px","96px","56px","24px","13px","32px","11px","64px","44px"],fontWeights:["600","500","700"],lineHeights:["1.5","1.0","1.56","1.4","1.33","1.19","1.6","1.2","1.35"]},spacing:["4px","6px","8px","10px","12px","13px","14px","16px","20px","24px","27px","28px","32px","36px","40px","48px","56px","64px","80px","88px"],radii:["9999px","20px","28px","36px","24px","12px","3px"],shadows:[]},Gc={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:20,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:20},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:20},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"24px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Yc={cornerStyle:"pill",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"gradient",signatureMotif:"★",density:"comfortable",surfaceTone:"glass",cardRadius:20,pillRadius:9999,badgeRadius:9999,voice:"bold-fintech"},Kc={metadata:Nc,theme:qc,tokens:Uc,components:Gc,personality:Yc},Xc={id:"shopify",label:"Shopify",sourcePath:"design.md/html/shopify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},Jc={primary:"#008060",secondary:"#202223",success:"#008060",warning:"#FFC453",error:"#D72C0D",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},Qc={rawCssVars:{white:"#FFFFFF",black:"#000000","neon-green":"#36F4A4",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"neon-green",value:"#36F4A4",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},Zc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"color-aloe",color:"color-white",borderColor:"color-aloe",borderRadius:6,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-muted",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-muted"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-muted",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-muted"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-muted"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},ed={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"commerce-friendly"},od={metadata:Xc,theme:Jc,tokens:Qc,components:Zc,personality:ed},rd={id:"spacex",label:"SpaceX",sourcePath:"design.md/html/spaceX.html",sourceTitle:"Design System Preview: SpaceX (Light)",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Share+Tech&display=swap"]},td={primary:"color-black",secondary:"#a3a3a3",success:"#4ade80",warning:"#fbbf24",error:"#ef4444",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},nd={rawCssVars:{black:"#000000",spectral:"#f0f0fa","ghost-bg":"rgba(240,240,250,0.1)","ghost-border":"rgba(240,240,250,0.35)",overlay:"rgba(0,0,0,0.5)",font:"'Share Tech', Arial, Verdana, sans-serif"},colors:[{name:"black",value:"#000000",role:"black"},{name:"spectral",value:"#f0f0fa",role:"spectral"},{name:"ghost-bg",value:"rgba(240,240,250,0.1)",role:"ghost bg"},{name:"ghost-border",value:"rgba(240,240,250,0.35)",role:"ghost border"},{name:"overlay",value:"rgba(0,0,0,0.5)",role:"overlay"}],typography:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","13px","12px","48px","10px","32px","11px","9px","14px"],fontWeights:["700","400","600"],lineHeights:["1.50","1.00","1.70","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","18px","20px","24px","28px","32px","48px","60px","64px","72px","80px","120px"],radii:["32px","4px","2px","3px"],shadows:[]},ad={button:{config:{variants:{ghost:{backgroundColor:"color-gray-50",borderColor:"color-gray-200"}}},variant:"ghost",size:"md",shape:"square",color:"theme-primary",textColor:"theme-primary",views:{container:{borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",color:"color-white",borderColor:"color-gray-50",borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.06em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-200"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-200",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"32px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},content:{color:"color-gray-200"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:2},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-200",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.06em",fontStyle:"normal"},caption:{color:"color-gray-200",fontStyle:"italic",letterSpacing:"0.06em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:2},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-200"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},eyebrow:{color:"color-gray-200"},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},description:{color:"color-gray-200"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},ld={cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.06em",accentTreatment:"glow",signatureMotif:"⚡",density:"tight",surfaceTone:"mono",cardRadius:2,pillRadius:0,badgeRadius:0,voice:"technical-mission"},id={metadata:rd,theme:td,tokens:nd,components:ad,personality:ld},sd={id:"spotify",label:"Spotify",sourcePath:"design.md/html/spotify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},cd={primary:"#1DB954",secondary:"#C1FBD4",success:"#1DB954",warning:"#D4F9E0",error:"#D4D4D8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#000000"},dd={rawCssVars:{white:"#FFFFFF",black:"#000000","spotify-green":"#1DB954",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"spotify-green",value:"#1DB954",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},ud={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},pd={cornerStyle:"pill",typeWeight:"black",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"matte",cardRadius:8,pillRadius:9999,badgeRadius:9999,voice:"rhythmic-vibrant"},md={metadata:sd,theme:cd,tokens:dd,components:ud,personality:pd},gd={id:"stripe",label:"Stripe",sourcePath:"design.md/html/stripe.html",sourceTitle:"Design System Preview: Stripe (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500;700&display=swap"]},hd={primary:"#635BFF",secondary:"#f96bee",success:"#15be53",warning:"#9b6829",error:"#ea2261",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},fd={rawCssVars:{purple:"#533afd","purple-hover":"#4434d4","purple-deep":"#2e2b8c","purple-light":"#b9b9f9","purple-mid":"#665efd",navy:"#061b31","dark-navy":"#0d253d","brand-dark":"#1c1e54",white:"#ffffff",ruby:"#ea2261",magenta:"#f96bee","magenta-light":"#ffd7ef",success:"#15be53","success-text":"#108c3d",lemon:"#9b6829",slate:"#64748d","dark-slate":"#273951",border:"#e5edf5","border-purple":"#b9b9f9","border-soft":"#d6d9fc","shadow-blue":"rgba(50,50,93,0.25)","shadow-dark-blue":"rgba(3,3,39,0.25)","shadow-black":"rgba(0,0,0,0.1)","shadow-ambient":"rgba(23,23,23,0.08)","shadow-soft":"rgba(23,23,23,0.06)","shadow-card":"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","shadow-ambient-card":"rgba(23,23,23,0.08) 0px 15px 35px 0px","shadow-subtle":"rgba(23,23,23,0.06) 0px 3px 6px 0px","font-primary":"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif","font-mono":"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace"},colors:[{name:"purple",value:"#533afd",role:"purple"},{name:"purple-hover",value:"#4434d4",role:"purple hover"},{name:"purple-deep",value:"#2e2b8c",role:"purple deep"},{name:"purple-light",value:"#b9b9f9",role:"purple light"},{name:"purple-mid",value:"#665efd",role:"purple mid"},{name:"navy",value:"#061b31",role:"navy"},{name:"dark-navy",value:"#0d253d",role:"dark navy"},{name:"brand-dark",value:"#1c1e54",role:"brand dark"},{name:"white",value:"#ffffff",role:"white"},{name:"ruby",value:"#ea2261",role:"ruby"},{name:"magenta",value:"#f96bee",role:"magenta"},{name:"magenta-light",value:"#ffd7ef",role:"magenta light"},{name:"success",value:"#15be53",role:"success"},{name:"success-text",value:"#108c3d",role:"success text"},{name:"lemon",value:"#9b6829",role:"lemon"},{name:"slate",value:"#64748d",role:"slate"},{name:"dark-slate",value:"#273951",role:"dark slate"},{name:"border",value:"#e5edf5",role:"border"},{name:"border-purple",value:"#b9b9f9",role:"border purple"},{name:"border-soft",value:"#d6d9fc",role:"border soft"},{name:"shadow-blue",value:"rgba(50,50,93,0.25)",role:"shadow blue"},{name:"shadow-dark-blue",value:"rgba(3,3,39,0.25)",role:"shadow dark blue"},{name:"shadow-black",value:"rgba(0,0,0,0.1)",role:"shadow black"},{name:"shadow-ambient",value:"rgba(23,23,23,0.08)",role:"shadow ambient"},{name:"shadow-soft",value:"rgba(23,23,23,0.06)",role:"shadow soft"},{name:"shadow-card",value:"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px",role:"shadow card"},{name:"shadow-ambient-card",value:"rgba(23,23,23,0.08) 0px 15px 35px 0px",role:"shadow ambient card"},{name:"shadow-subtle",value:"rgba(23,23,23,0.06) 0px 3px 6px 0px",role:"shadow subtle"}],typography:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",monoFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontSizes:["16px","14px","48px","18px","12px","32px","13px","11px","10px","22px"],fontWeights:["100 900","300","400","500","700","600"],lineHeights:["1.40","1.15","1.10","1.50","1.2","1.35","1.4"]},spacing:["1px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["0 0 6px 6px","4px","6px","2px","3px"],shadows:["rgba(50,50,93,0.25)","rgba(3,3,39,0.25)","rgba(0,0,0,0.1)","rgba(23,23,23,0.08)","rgba(23,23,23,0.06)","rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","rgba(23,23,23,0.08) 0px 15px 35px 0px","rgba(23,23,23,0.06) 0px 3px 6px 0px","var(--shadow-subtle)","var(--shadow-card)","0 0 0 1px theme-primary","0 0 0 1px var(--ruby)"]},yd={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(23,23,23,0.06) 0px 3px 6px 0px"},header:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"6px"},trigger:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},xd={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"gradient",signatureMotif:"↗",density:"comfortable",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"refined-fintech"},bd={metadata:gd,theme:hd,tokens:fd,components:yd,personality:xd},kd={id:"tesla",label:"Tesla",sourcePath:"design.md/html/tesla.html",sourceTitle:"Design System Inspired by Tesla",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"]},Cd={primary:"#3E6AE1",secondary:"#171A20",success:"#3E6AE1",warning:"#5C5E62",error:"#171A20",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},Sd={rawCssVars:{"electric-blue":"#3E6AE1","pure-white":"#FFFFFF","carbon-dark":"#171A20",graphite:"#393C41",pewter:"#5C5E62","silver-fog":"#8E8E8E","cloud-gray":"#EEEEEE","pale-silver":"#D0D1D2","light-ash":"#F4F4F4","frosted-glass":"rgba(255,255,255,0.75)",overlay:"rgba(128,128,128,0.65)","subtle-shadow":"rgba(0,0,0,0.05)","font-display":"'Inter', -apple-system, Arial, sans-serif","font-text":"'Inter', -apple-system, Arial, sans-serif"},colors:[{name:"electric-blue",value:"#3E6AE1",role:"electric blue"},{name:"pure-white",value:"#FFFFFF",role:"pure white"},{name:"carbon-dark",value:"#171A20",role:"carbon dark"},{name:"graphite",value:"#393C41",role:"graphite"},{name:"pewter",value:"#5C5E62",role:"pewter"},{name:"silver-fog",value:"#8E8E8E",role:"silver fog"},{name:"cloud-gray",value:"#EEEEEE",role:"cloud gray"},{name:"pale-silver",value:"#D0D1D2",role:"pale silver"},{name:"light-ash",value:"#F4F4F4",role:"light ash"},{name:"frosted-glass",value:"rgba(255,255,255,0.75)",role:"frosted glass"},{name:"overlay",value:"rgba(128,128,128,0.65)",role:"overlay"},{name:"subtle-shadow",value:"rgba(0,0,0,0.05)",role:"subtle shadow"}],typography:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","40px","28px","13px","12px","11px","17px","16px"],fontWeights:["400","500","700","600"],lineHeights:["1.43","48px","20px","1.2","1.3","36px","1.35","1.4"]},spacing:["4px","6px","8px","10px","12px","14px","16px","20px","24px","32px","40px","48px","56px","60px","64px","80px","100px"],radii:["4px","4px 4px 0 0","0 0 4px 4px","12px","3px"],shadows:["rgba(0,0,0,0.05)","0 1px 0 var(--pewter)"]},jd={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:0,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.05)"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"theme-warning"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"theme-warning",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, Arial, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:0},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},content:{color:"theme-warning"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:0},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"theme-warning",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"normal"},caption:{color:"theme-warning",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:0},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"4px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:0},item:{color:"theme-warning"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},eyebrow:{color:"theme-warning"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},description:{color:"theme-warning"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},wd={cornerStyle:"sharp",typeWeight:"light",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▲",density:"spacious",surfaceTone:"mono",cardRadius:0,pillRadius:0,badgeRadius:0,voice:"futurist-clean"},vd={metadata:kd,theme:Cd,tokens:Sd,components:jd,personality:wd},Td={id:"uber",label:"Uber",sourcePath:"design.md/html/uber.html",sourceTitle:"Design System Preview: Uber (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700&display=swap"]},Id={primary:"color-black",secondary:"#efefef",success:"#06C167",warning:"#e2e2e2",error:"#000000",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Rd={rawCssVars:{"color-black":"#000000","color-white":"#ffffff","color-hover-gray":"#e2e2e2","color-hover-light":"#f3f3f3","color-chip-gray":"#efefef","color-body-gray":"#4b4b4b","color-muted-gray":"#afafaf","shadow-card":"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","shadow-medium":"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","shadow-float":"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","shadow-press":"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","font-display":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","font-body":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","bg-page":"#ffffff","bg-card":"#ffffff","bg-nav":"rgba(255,255,255,0.92)","text-primary":"#000000","text-secondary":"#4b4b4b","text-tertiary":"#afafaf","border-color":"#efefef","section-label-color":"#000000"},colors:[{name:"color-black",value:"#000000",role:"color black"},{name:"color-white",value:"#ffffff",role:"color white"},{name:"color-hover-gray",value:"#e2e2e2",role:"color hover gray"},{name:"color-hover-light",value:"#f3f3f3",role:"color hover light"},{name:"color-chip-gray",value:"#efefef",role:"color chip gray"},{name:"color-body-gray",value:"#4b4b4b",role:"color body gray"},{name:"color-muted-gray",value:"#afafaf",role:"color muted gray"},{name:"shadow-card",value:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px",role:"shadow card"},{name:"shadow-medium",value:"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px",role:"shadow medium"},{name:"shadow-float",value:"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px",role:"shadow float"},{name:"shadow-press",value:"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset",role:"shadow press"},{name:"bg-page",value:"#ffffff",role:"bg page"},{name:"bg-card",value:"#ffffff",role:"bg card"},{name:"bg-nav",value:"rgba(255,255,255,0.92)",role:"bg nav"},{name:"text-primary",value:"#000000",role:"text primary"},{name:"text-secondary",value:"#4b4b4b",role:"text secondary"},{name:"text-tertiary",value:"#afafaf",role:"text tertiary"},{name:"border-color",value:"#efefef",role:"border color"},{name:"section-label-color",value:"#000000",role:"section label color"}],typography:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","18px","14px","64px","20px","12px","36px","13px","24px","28px"],fontWeights:["700","500","400","600"],lineHeights:["1.50","1.10","1.22","1.33","2.0","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","50px","60px","64px","80px","100px","120px","140px"],radii:["8px","999px","12px","16px","4px","3px"],shadows:["rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","var(--shadow-card)","var(--shadow-float)","var(--shadow-medium)","0 0 0 1px color-black","rgba(0,0,0,0.12) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 2px 8px 0px","rgba(0,0,0,0.08) 0px 0px 0px 999px inset"]},Fd={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px"},header:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"theme-warning"},content:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-warning"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"theme-warning",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-warning",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-warning"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"theme-warning"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-warning"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-warning",backgroundColor:"color-white",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"theme-warning",borderRadius:4},thead:{backgroundColor:"color-white",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"theme-warning",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-warning"},td:{color:"theme-primary",borderColor:"theme-warning",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",borderRadius:4},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-warning",radius:"8px",views:{container:{backgroundColor:"theme-warning",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-warning",views:{container:{borderColor:"theme-warning"},label:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"theme-warning"},surface:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary"}}}},zd={cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"motion-utility"},Md={metadata:Td,theme:Id,tokens:Rd,components:Fd,personality:zd},Wd={id:"vercel",label:"Vercel",sourcePath:"design.md/html/vercel.html",sourceTitle:"Design System Preview: Vercel (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap"]},Hd={primary:"color-black",secondary:"#0072f5",success:"#0a72ef",warning:"#de1d8d",error:"#ff5b4f",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Vd={rawCssVars:{black:"#171717",white:"#ffffff","gray-50":"#fafafa","gray-100":"#ebebeb","gray-400":"#808080","gray-500":"#666666","gray-600":"#4d4d4d","link-blue":"#0072f5","focus-blue":"hsl(212,100%,48%)","ship-red":"#ff5b4f","preview-pink":"#de1d8d","develop-blue":"#0a72ef","console-blue":"#0070f3","console-purple":"#7928ca","console-pink":"#eb367f","badge-bg":"#ebf5ff","badge-text":"#0068d6","shadow-ring":"rgba(0,0,0,0.08) 0px 0px 0px 1px","shadow-ring-light":"rgb(235,235,235) 0px 0px 0px 1px","shadow-subtle":"rgba(0,0,0,0.04) 0px 2px 2px 0px","shadow-card":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","shadow-card-full":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","font-sans":"'Geist', system-ui, -apple-system, Arial, sans-serif","font-mono":"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace"},colors:[{name:"black",value:"#171717",role:"black"},{name:"white",value:"#ffffff",role:"white"},{name:"gray-50",value:"#fafafa",role:"gray 50"},{name:"gray-100",value:"#ebebeb",role:"gray 100"},{name:"gray-400",value:"#808080",role:"gray 400"},{name:"gray-500",value:"#666666",role:"gray 500"},{name:"gray-600",value:"#4d4d4d",role:"gray 600"},{name:"link-blue",value:"#0072f5",role:"link blue"},{name:"focus-blue",value:"hsl(212,100%,48%)",role:"focus blue"},{name:"ship-red",value:"#ff5b4f",role:"ship red"},{name:"preview-pink",value:"#de1d8d",role:"preview pink"},{name:"develop-blue",value:"#0a72ef",role:"develop blue"},{name:"console-blue",value:"#0070f3",role:"console blue"},{name:"console-purple",value:"#7928ca",role:"console purple"},{name:"console-pink",value:"#eb367f",role:"console pink"},{name:"badge-bg",value:"#ebf5ff",role:"badge bg"},{name:"badge-text",value:"#0068d6",role:"badge text"},{name:"shadow-ring",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px",role:"shadow ring"},{name:"shadow-ring-light",value:"rgb(235,235,235) 0px 0px 0px 1px",role:"shadow ring light"},{name:"shadow-subtle",value:"rgba(0,0,0,0.04) 0px 2px 2px 0px",role:"shadow subtle"},{name:"shadow-card",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card"},{name:"shadow-card-full",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card full"}],typography:{fontFamily:"var(--font-sans)",monoFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontSizes:["16px","14px","48px","20px","12px","32px","13px","11px","10px","36px"],fontWeights:["400","600","500","700"],lineHeights:["1.50","1.00","1.80","1.25","1.2","1.35","1.4"]},spacing:["2px","4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["6px","8px","9999px","3px"],shadows:["rgba(0,0,0,0.08) 0px 0px 0px 1px","rgb(235,235,235) 0px 0px 0px 1px","rgba(0,0,0,0.04) 0px 2px 2px 0px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","var(--shadow-ring)","var(--shadow-ring-light)","var(--shadow-card)","var(--shadow-card-full)","0 0 0 2px var(--focus-blue)","0 0 0 2px var(--ship-red)"]},Ad={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:4,fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"var(--font-sans)",letterSpacing:"-0.04em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"var(--font-sans)",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},header:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"var(--font-sans)"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.04em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"var(--font-sans)"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"6px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"6px"},trigger:{color:"theme-primary",fontFamily:"var(--font-sans)"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.04em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.04em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"var(--font-sans)"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"var(--font-sans)"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"var(--font-sans)"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},Pd={cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.04em",accentTreatment:"flat",signatureMotif:"▲",density:"comfortable",surfaceTone:"mono",cardRadius:4,pillRadius:4,badgeRadius:4,voice:"deploy-geometric"},Ed={metadata:Wd,theme:Hd,tokens:Vd,components:Ad,personality:Pd},Nt={airbnb:ic,apple:mc,coinbase:bc,figma:vc,linear:Mc,nike:Ec,notion:Oc,revolut:Kc,shopify:od,spacex:id,spotify:md,stripe:bd,tesla:vd,uber:Md,vercel:Ed},Dd=Object.values(Nt),_a=oc,Ao=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",qt=e=>e,Be=(...e)=>{const o={};return e.forEach(t=>{Ao(t)&&Object.entries(t).forEach(([n,a])=>{if(a!=null){if(Ao(a)&&Ao(o[n])){o[n]=Be(o[n],a);return}o[n]=a}})}),o},Ba=e=>{if(Array.isArray(e)||!Ao(e))return e;const o={};for(const[t,n]of Object.entries(e))n!==null&&(o[t]=Ao(n)?Ba(n):n);return o},$d=new Set(["button"]),Ld=["backgroundColor","background","borderColor","color"],En=new Set,_d=(e,o)=>{if(process.env.NODE_ENV!=="production"&&!(!o||!$d.has(e))&&!En.has(e))for(const[t,n]of Object.entries(o)){if(!Ao(n))continue;const a=Ld.filter(l=>n[l]!=null);if(a.length>0){En.add(e),console.warn(`[design-system] components.${e}.views.${t} sets ${a.join(", ")} — view styles apply above every variant, so this flattens ghost/outline/subtle into solid blocks. Move colors to components.${e}.config.variants.<variant> (merged under each variant); keep views to shape and typography.`);return}}},Ut=(e,o)=>{if(!o)return{};const t=o.components[e]||{},n=qt(Ba(t));return _d(e,n.views),n},Oa=(e,o,t)=>{const{config:n,...a}=o,l=Ut(e,t),s=Be(l,n||{});return qt(Be(s,a))},Na=p.createContext({isEnabled:!1}),Gt=({children:e,config:o,configId:t,mode:n})=>{const a=o||(t?Nt[t]:null)||_a,{themeMode:l}=i.useTheme(),s=n??l??a.metadata.defaultAppearance,c=p.useMemo(()=>({config:a,configId:a.metadata.id,isEnabled:!0}),[a]);return r.jsx(Na.Provider,{value:c,children:r.jsx(i.ThemeProvider,{theme:a.theme,mode:s,transparentWrapper:!0,children:r.jsx("div",{"data-design-system":a.metadata.id,"data-appearance":s,style:{display:"contents"},children:e})})})},qr=()=>p.useContext(Na),No=e=>{const{config:o}=qr();return Ut(e,o)},fe=(e,o)=>{const{config:t}=qr();return Oa(e,o,t)},qa=p.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),Bd=({children:e,value:o})=>r.jsx(qa.Provider,{value:o,children:e}),Ua=()=>{const e=p.useContext(qa);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},Od=({value:e,children:o,isDisabled:t=!1,views:n,...a})=>{var h;const{isItemExpanded:l,baseId:s}=Ua(),c=No("accordion"),d=Be({item:(h=c.views)==null?void 0:h.container},n),u=l(e),g=`${s}-trigger-${e}`,m=`${s}-content-${e}`;return r.jsx(i.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:t?.5:1,pointerEvents:t?"none":"auto","data-state":u?"open":"closed","data-disabled":t?"":void 0,...d==null?void 0:d.item,...a,children:p.Children.map(o,f=>p.isValidElement(f)?p.cloneElement(f,{...f.props,value:e,isExpanded:u,isDisabled:t,triggerId:g,contentId:m}):f)})},Nd=({children:e,value:o,isExpanded:t,isDisabled:n,triggerId:a,contentId:l,views:s,asChild:c=!1,...d})=>{var y;const{toggleItem:u}=Ua(),g=No("accordion"),m=Be({container:(y=g.views)==null?void 0:y.trigger},s),f={id:a,"aria-expanded":t,"aria-controls":l,"aria-disabled":n,"data-state":t?"open":"closed","data-disabled":n?"":void 0,onClick:()=>{o&&!n&&u(o)},padding:16,cursor:n?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...m==null?void 0:m.container,...d};if(c&&p.isValidElement(e)){const k=p.Children.only(e);return p.cloneElement(k,{...f,...k.props})}return r.jsxs(i.Horizontal,{...f,children:[e,r.jsx(i.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:t?"rotate(180deg)":"rotate(0deg)",...m==null?void 0:m.icon,children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},qd=({children:e,isExpanded:o,isDisabled:t,triggerId:n,contentId:a,views:l,...s})=>{var j;const c=No("accordion"),d=Be({container:(j=c.views)==null?void 0:j.content},l),u=260,g=p.useRef(null),m=p.useRef(null),[h,f]=p.useState(!!o),[y,k]=p.useState(o?"none":"0px"),[b,C]=p.useState(o?1:0);return p.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]),p.useEffect(()=>{var w;if(m.current&&(clearTimeout(m.current),m.current=null),o){f(!0),requestAnimationFrame(()=>{var T;const x=((T=g.current)==null?void 0:T.scrollHeight)??0;k(`${x}px`),C(1)});return}const S=((w=g.current)==null?void 0:w.scrollHeight)??0;k(`${S}px`),C(1),requestAnimationFrame(()=>{k("0px"),C(0)}),m.current=setTimeout(()=>{f(!1)},u)},[o,e]),p.useEffect(()=>{var w;if(!o||!h)return;const S=((w=g.current)==null?void 0:w.scrollHeight)??0;k(`${S}px`)},[e,o,h]),h?r.jsx(i.View,{id:a,role:"region","aria-labelledby":n,overflow:"hidden",maxHeight:y,opacity:b,transition:`max-height ${u}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${u}ms ease`,"data-state":o?"open":"closed","data-disabled":t?"":void 0,style:{backgroundColor:"transparent"},...d==null?void 0:d.container,...s,children:r.jsx(i.View,{ref:g,padding:16,children:e})}):null},Ud=({children:e,shape:o="rounded",variant:t="default",views:n,baseId:a,type:l,collapsible:s,themeMode:c,...d})=>r.jsx(i.Vertical,{width:"100%","data-orientation":"vertical",...Ys[o],...Ks[t],...n==null?void 0:n.container,...d,children:e}),Gd=e=>{const o=fe("accordion",e),{children:t,type:n="single",value:a,defaultValue:l,onValueChange:s,collapsible:c=!1,shape:d="rounded",variant:u="default",views:g,...m}=o,h=Array.isArray(l)?l:l?[l]:void 0,f=Gs({type:n,value:a,defaultValue:l??h,onValueChange:s,collapsible:c});return r.jsx(Bd,{value:{expandedItems:f.expandedItems,toggleItem:f.toggleItem,isItemExpanded:f.isItemExpanded,type:f.type,collapsible:f.collapsible,baseId:f.baseId},children:r.jsx(Ud,{shape:d,variant:u,views:g,baseId:f.baseId,type:f.type,collapsible:f.collapsible,...m,children:t})})},Pe=Gd;Pe.Item=Od;Pe.Trigger=Nd;Pe.Content=qd;const Yd=({isOpen:e,defaultOpen:o=!1,value:t,defaultValue:n,isMulti:a=!1,onOpenChange:l,onClose:s})=>{const c=typeof e=="boolean",d=t!==void 0,u=n??(a?[]:""),[g,m]=p.useState(o),[h,f]=p.useState(u),y=c?!!e:g,k=d?t:h,b=p.useCallback(S=>{c||m(S),l==null||l(S),S||s==null||s()},[c,s,l]),C=p.useCallback(()=>{b(!1)},[b]),j=p.useCallback(S=>{d||f(S)},[d]);return{isSheetOpen:y,selectedValue:k,setSelectedValue:j,closeSheet:C}},Yt=({children:e,containerId:o="portal-root"})=>{const[t,n]=p.useState(null);return p.useEffect(()=>{let a=document.getElementById(o),l=!1;return a||(l=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{l&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),t?Us.createPortal(e,t):null},st=new Map,Kd=(e,o,t)=>(st.has(e)||st.set(e,p.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>r.jsx(r.Fragment,{children:o||t})}}))),st.get(e)),Dn=p.memo(({widthHeight:e,color:o="currentColor",transform:t,orientation:n="up",children:a,...l})=>r.jsx(i.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:t||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...l,children:a})),Vr=p.memo(({name:e="circle",widthHeight:o=24,color:t="currentColor",filled:n=!1,strokeWidth:a=1,size:l,children:s,fallback:c,...d})=>{const{getColor:u}=i.useTheme(),g=l||o,m=p.useMemo(()=>{const y=u(t);return{fill:n?y:"none",stroke:y,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,t,a,u]);if(!e)return r.jsx(Dn,{widthHeight:o,color:t,...d,children:s});const h=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),f=Kd(h,c,s);return r.jsx(Dn,{widthHeight:g,color:t,...d,children:r.jsx(p.Suspense,{fallback:c||null,children:r.jsx(f,{size:g,...m})})})}),q=(e,o={})=>{const t=n=>r.jsx(Vr,{name:e,...o,...n});return t.displayName=`${e}Icon`,t},Xd=q("user",{filled:!1}),Jd=q("circle-help",{filled:!1}),Qd=q("folder",{filled:!1}),ue=q("chevron-up",{filled:!1}),Zd=q("grip-vertical",{filled:!1}),ho=q("file",{filled:!1}),eu=q("video",{filled:!1}),ou=q("image",{filled:!1}),$o=q("volume",{filled:!1}),ru=q("twitter",{filled:!1}),tu=q("x",{filled:!1}),nu=q("twitch",{filled:!1}),We=q("x",{filled:!1,strokeWidth:2}),au=q("instagram",{filled:!1}),lu=q("youtube",{filled:!1}),iu=q("facebook",{filled:!1}),su=q("linkedin",{filled:!1}),cu=q("at-sign",{filled:!1}),Ga=q("minus",{filled:!1}),ro=q("info",{filled:!1}),Ya=q("play",{filled:!1}),du=q("pause",{filled:!1}),uu=q("heart",{filled:!1}),pu=q("star",{filled:!1}),mu=q("save",{filled:!1}),Kt=q("triangle-alert",{filled:!1}),gu=q("battery",{filled:!1}),hu=q("bookmark",{filled:!1}),fu=q("cloud",{filled:!1}),yu=q("copy",{filled:!1}),Ur=q("trash",{filled:!1}),xu=Ur,bu=q("edit",{filled:!1}),Xt=q("mic",{filled:!1}),Gr=q("square",{filled:!1}),Jt=q("send",{filled:!1}),Qt=q("loader",{filled:!1}),sr=q("paperclip",{filled:!1}),Ar=q("search",{filled:!1}),ku=q("home",{filled:!1}),Ka=q("settings",{filled:!1}),Cu=q("download",{filled:!1}),Xa=q("share",{filled:!1}),cr=q("check",{filled:!1}),Su=q("plus",{filled:!1}),Zt=q("eye-off",{filled:!1}),en=q("eye",{filled:!1}),ju=q("lock",{filled:!1}),wu=q("user",{filled:!1}),Ja=q("external-link",{filled:!1}),on=q("check-circle",{filled:!1}),Yr=q("alert-circle",{filled:!1}),vu=q("bell",{filled:!1}),Tu=q("file-text",{filled:!1}),Iu=q("bar-chart",{filled:!1}),Ru=q("moon",{filled:!1}),Qa=q("panel-left",{filled:!1}),rn=q("upload",{filled:!1}),Fu=cr,zu=e=>r.jsx(ue,{orientation:"left",...e}),Mu=q("zoom-out",{filled:!1}),Wu=q("type",{filled:!1}),Hu=q("shapes",{filled:!1}),Vu=q("rotate-cw",{filled:!1}),Au=q("gift",{filled:!1}),Pu=q("shield",{filled:!1}),Eu=q("log-out",{filled:!1}),Du=q("power",{filled:!1}),$u=q("link",{filled:!1}),Lu=q("layout",{filled:!1}),_u=q("zap",{filled:!1}),Bu=q("credit-card",{filled:!1}),Ou=q("more-horizontal",{filled:!1}),Nu=Ur,qu=q("filter",{filled:!1}),Uu=q("calendar",{filled:!1}),Gu=q("clock",{filled:!1}),Yu=q("map-pin",{filled:!1}),Ku=q("menu",{filled:!1}),Xu=q("refresh-cw",{filled:!1}),Ju=q("printer",{filled:!1}),Qu=q("wand",{filled:!1}),Zu=q("thumbs-down",{filled:!1}),ep=q("thumbs-up",{filled:!1}),op=q("camera",{filled:!1}),rp=q("bluetooth",{filled:!1}),tp=q("unlock",{filled:!1}),np=q("wifi",{filled:!1}),ap=q("arrow-right",{filled:!1}),lp=q("arrow-up",{filled:!1}),ip=q("loader",{filled:!1}),sp=q("sliders-horizontal",{filled:!1}),cp=q("crop",{filled:!1}),dp=q("zoom-in",{filled:!1}),up=q("grip-horizontal",{filled:!1}),Za=q("mouse-pointer-2",{filled:!1}),pp={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},wo={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},$n=(e,o)=>e.id??e.value??`action-sheet-item-${o}`,el=e=>e.value??e.id,Ln=e=>e.disabled||e.isDisabled||e.divider,mp=(e,o)=>{if(typeof e.selected=="boolean")return e.selected;const t=el(e);return t?Array.isArray(o)?o.includes(t):o===t:!1},gp=({isSheetOpen:e,closeSheet:o,selectedValue:t,setSelectedValue:n,isClosePrevented:a=!1,dismissOnBackdropPress:l=!0,title:s,description:c,header:d,children:u,items:g=[],isMulti:m=!1,closeOnSelect:h,onSelect:f,onChange:y,showCancel:k=!1,cancelLabel:b="Cancel",onCancel:C,showHandle:j=!0,size:S="md",maxHeight:w="88vh",views:x,animationType:T,...v})=>{if(!e)return null;const M=()=>{a||o()},A=()=>{l&&M()},P=()=>{C==null||C(),M()},F=V=>{var H;if(Ln(V))return;const z=el(V);let I=t;if(z){if(m){const R=Array.isArray(t)?t:t?[t]:[];I=R.includes(z)?R.filter(D=>D!==z):[...R,z]}else I=z;n(I),f==null||f(z,V),y==null||y(I,V)}(H=V.onPress)==null||H.call(V,V),(V.closeOnSelect??h??!m)&&M()};return r.jsx(Yt,{children:r.jsx(i.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-dark-50-360",display:"flex",justifyContent:"flex-end",onClick:A,...x==null?void 0:x.overlay,children:r.jsxs(i.Vertical,{width:"100%",maxWidth:520,maxHeight:w,marginHorizontal:"auto",backgroundColor:"color-white",borderTopLeftRadius:24,borderTopRightRadius:24,paddingTop:8,paddingBottom:12,overflow:"hidden",boxShadow:"0 -18px 48px rgba(15, 23, 42, 0.18)",onClick:V=>V.stopPropagation(),...x==null?void 0:x.container,...x==null?void 0:x.sheet,...v,children:[j&&r.jsx(i.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...x==null?void 0:x.handle}),(s||c)&&r.jsxs(i.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...x==null?void 0:x.header,children:[s&&r.jsx(i.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...x==null?void 0:x.title,children:s}),c&&r.jsx(i.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...x==null?void 0:x.description,children:c})]}),d,r.jsxs(i.Vertical,{overflowY:"auto",paddingBottom:4,...x==null?void 0:x.content,children:[g.map((V,z)=>{if(V.divider)return r.jsx(i.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...x==null?void 0:x.divider},$n(V,z));const I=mp(V,t),W=Ln(V),H=W?"color-gray-400":V.destructive?"color-red-600":I?"theme-primary":"color-gray-900";return r.jsxs(i.Horizontal,{alignItems:"center",gap:12,opacity:W?.5:1,cursor:W?"not-allowed":"pointer",onClick:()=>F(V),...pp[S],...x==null?void 0:x.item,children:[V.icon&&r.jsx(i.View,{flexShrink:0,...x==null?void 0:x.itemIcon,children:V.icon}),r.jsxs(i.Vertical,{flex:1,gap:2,children:[typeof V.label=="string"?r.jsx(i.Text,{fontSize:wo[S].label,lineHeight:wo[S].label+6,fontWeight:I?"600":"400",color:H,...x==null?void 0:x.itemLabel,children:V.label}):V.label,V.description&&r.jsx(i.Text,{fontSize:wo[S].description,lineHeight:wo[S].description+5,color:"color-gray-500",...x==null?void 0:x.itemDescription,children:V.description})]}),I&&r.jsx(cr,{widthHeight:18,color:"theme-primary",...x==null?void 0:x.itemIndicator})]},$n(V,z))}),u]}),k&&r.jsx(i.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:r.jsx(i.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:P,...x==null?void 0:x.cancelButton,children:r.jsx(i.Text,{fontSize:wo[S].label,lineHeight:wo[S].label+6,fontWeight:"600",color:"color-gray-900",...x==null?void 0:x.cancelLabel,children:b})})})]})})})},hp=e=>{const o=Yd(e);return r.jsx(gp,{...e,...o})},fp=hp,yp=e=>{const o=e==="dark";return{default:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",boxShadow:o?"0 1px 3px rgba(0, 0, 0, 0.3)":"0 1px 2px rgba(0, 0, 0, 0.05)"},content:{color:"color-gray-700"},icon:{color:"color-gray-500"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:o?"0 1px 3px rgba(29, 78, 216, 0.25)":"0 1px 2px rgba(59, 130, 246, 0.05)"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",borderColor:"color-green-200",boxShadow:o?"0 1px 3px rgba(34, 197, 94, 0.2)":"0 1px 2px rgba(34, 197, 94, 0.05)"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},error:{container:{backgroundColor:"color-red-50",borderColor:"color-red-200",boxShadow:o?"0 1px 3px rgba(239, 68, 68, 0.2)":"0 1px 2px rgba(239, 68, 68, 0.05)"},content:{color:"color-red-700"},icon:{color:"color-red-500"}},warning:{container:{backgroundColor:"color-orange-50",borderColor:"color-orange-200",boxShadow:o?"0 1px 3px rgba(249, 115, 22, 0.2)":"0 1px 2px rgba(249, 115, 22, 0.05)"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}}}},xp={default:"alert",info:"status",success:"status",error:"alert",warning:"alert"},bp=p.memo(({icon:e,title:o="",views:t,description:n="",variant:a="default",themeMode:l,children:s,...c})=>{const{themeMode:d}=i.useTheme(),u=l||d,g=p.useMemo(()=>yp(u),[u]),m=()=>{var y;if(e)return e;const f={size:20,color:((y=t==null?void 0:t.icon)==null?void 0:y.color)??g[a].icon.color};switch(a){case"info":return r.jsx(ro,{...f});case"success":return r.jsx(on,{...f});case"error":return r.jsx(Yr,{...f});case"warning":default:return r.jsx(Kt,{...f})}};return r.jsxs(i.Horizontal,{role:xp[a],gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:g[a].container.borderColor,backgroundColor:g[a].container.backgroundColor,boxShadow:g[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...t==null?void 0:t.container,...c,children:[r.jsx(i.View,{alignSelf:"flex-start",marginTop:"2px",...t==null?void 0:t.icon,children:m()}),r.jsxs(i.Vertical,{gap:4,children:[o?r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:g[a].content.color,...t==null?void 0:t.title,children:o}):null,r.jsx(i.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:g[a].content.color,...t==null?void 0:t.description,children:n||s})]})]})}),kp=e=>{const o=fe("alert",e);return r.jsx(bp,{...o})},tn=kp,Cp=({ratio:e=16/9,children:o,views:t,...n})=>r.jsx(i.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...t==null?void 0:t.center,children:r.jsx(i.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...t==null?void 0:t.view,children:o})}),Sp=({ratio:e,children:o,...t})=>r.jsx(Cp,{ratio:e,...t,children:o}),ol=Sp;function jp(e,o,t){return Math.min(Math.max(e,o),t)}const wp=({bars:e,isPaused:o,...t})=>{const a=[6,16,23,24,18,9,14,22,24,20,11,12,20,24,21,13,9,19,24,23,16,7,17,23,23,18,8,15,22,24,20,10];return r.jsx(i.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...t,children:e.map((l,s)=>r.jsx(i.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":l>=0?"theme-primary":"color-gray-300",style:{height:`${l>=0?jp(l*300,6,24):a[s%a.length]}px`}},s))})},nn=({analyserNode:e,isPaused:o,...t})=>{const n=p.useRef(null),a=60,l=32,[s,c]=p.useState([]);return p.useEffect(()=>{if(!e){c(Array(a).fill(-1));return}const d=e.frequencyBinCount,u=new Uint8Array(d),g=()=>{e.getByteTimeDomainData(u);let m=0;for(let f=0;f<d;f++){const y=(u[f]-128)/128;m+=y*y}const h=Math.sqrt(m/d);p.startTransition(()=>{c(f=>{const k=[...f,h].slice(-a);return k.length<a?[...Array(a-k.length).fill(-1),...k]:k})})};return n.current=setInterval(g,l),()=>{n.current&&clearInterval(n.current)}},[e]),r.jsx(wp,{bars:s,isPaused:o,...t})},Kr=Oo.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,t="",n="",a,l,s,c,d,u)=>e({visible:!0,variant:o,title:t,subtitle:n,isClosable:a,views:l,action:s,actionText:c,showIcon:d,timeout:u}),hide:()=>e({visible:!1})})),rl=(e,o,t,n)=>{Kr.getState().show(e,o,t,n==null?void 0:n.isClosable,n==null?void 0:n.views,n==null?void 0:n.action,n==null?void 0:n.actionText,n==null?void 0:n.showIcon,n==null?void 0:n.timeout)},tl=()=>{Kr.getState().hide()},vp={info:{container:{backgroundColor:"color-white",border:"rgba(191, 219, 254, 0.95)"},icon:{color:"theme-primary",name:"InformationIcon"},content:{color:"color-gray-900"},close:{color:"color-gray-500",name:"CloseIcon"}},success:{container:{backgroundColor:"#F0FDF4",border:"#BBF7D0"},icon:{color:"#16A34A",name:"SuccessIcon"},content:{color:"#14532D"},close:{color:"#15803D",name:"CloseIcon"}},error:{container:{backgroundColor:"#FEF2F2",border:"#FECACA"},icon:{color:"#DC2626",name:"ErrorIcon"},content:{color:"#7F1D1D"},close:{color:"#B91C1C",name:"CloseIcon"}},warning:{container:{backgroundColor:"#FFF7ED",border:"#FED7AA"},icon:{color:"#EA580C",name:"WarningIcon"},content:{color:"#9A3412"},close:{color:"#C2410C",name:"CloseIcon"}}},nl=({variant:e,hide:o,title:t,subtitle:n,theme:a,action:l,actionText:s,showIcon:c=!1,isClosable:d=!1,timeout:u=3e3,views:g})=>{var C,j;p.useEffect(()=>{if(u&&!d){const S=setTimeout(()=>{o()},u);return()=>{clearTimeout(S)}}},[]);const m=a??vp,h=!!(l&&s),f={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${m[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},y={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],k={info:r.jsx(ro,{widthHeight:24,color:y,...g==null?void 0:g.icon}),success:r.jsx(on,{widthHeight:24,color:y,...g==null?void 0:g.icon}),warning:r.jsx(Kt,{widthHeight:24,color:y,...g==null?void 0:g.icon}),error:r.jsx(Yr,{widthHeight:24,color:y,...g==null?void 0:g.icon})}[e],b=c&&k;return r.jsxs(i.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${m[e].content.color}`,backgroundColor:`${m[e].container.backgroundColor}`,onClick:d?()=>{}:()=>{o()},...f,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...g==null?void 0:g.container,children:[b&&k,r.jsxs(i.Vertical,{gap:4,width:"100%",children:[r.jsx(i.Text,{size:"md",weight:"semiBold",...g==null?void 0:g.title,children:t}),n&&r.jsx(i.Text,{size:"sm",lineHeight:"20px",color:m[e].content.color,...g==null?void 0:g.subtitle,children:n})]}),h&&r.jsx(i.View,{as:"button",type:"button",onClick:l,backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:m[e].container.border,borderRadius:"9999px",padding:"6px 12px",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",...g==null?void 0:g.actionText,children:r.jsx(i.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:m[e].content.color,children:s})}),d&&r.jsx(i.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(C=g==null?void 0:g.closingIcon)==null?void 0:C.container,children:r.jsx(We,{widthHeight:16,color:m[e].close.color,...(j=g==null?void 0:g.closingIcon)==null?void 0:j.icon})})]})},Tp=({container:e,theme:o,position:t="topRight"})=>{const{visible:n,title:a,variant:l,subtitle:s,isClosable:c,views:d,action:u,actionText:g,showIcon:m,timeout:h}=Kr(),f={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[t],y=()=>r.jsx(nl,{variant:l,subtitle:s,show:n,title:a,theme:o,isClosable:c,views:d,action:u,actionText:g,showIcon:m,timeout:h,hide:()=>tl()}),k=e?p.cloneElement(e,{},y()):r.jsx(i.View,{position:"absolute",zIndex:1e4,...f,children:y()});return n?k:null},Ip=(e,o)=>{if(typeof document>"u")return;const t=document.createElement("video");t.preload="metadata",t.onloadedmetadata=()=>{t.currentTime=1},t.oncanplay=()=>{const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(t,0,0,n.width,n.height);const l=n.toDataURL("image/jpeg");o(l)}URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(e)},Rp=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:t,validateFile:n,thumbnail:a,multiple:l=!1,onError:s=c=>{rl("error","Error",c)}})=>{const c=p.useRef(null),d=p.useRef(null),[u,g]=p.useState(null),[m,h]=p.useState([]),[f,y]=p.useState(null),[k,b]=p.useState(null),[C,j]=p.useState(a||null),S=p.useCallback(x=>{const T=x.target.files;if(y(null),!T||T.length===0){s("No file selected"),y("No file selected");return}if(l){const v=Array.from(T),M=[];for(const A of v){if(A.size>e){s(`File ${A.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${A.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const P=n(A);if(P){s(`${A.name}: ${P}`),y(`${A.name}: ${P}`);continue}}M.push(A)}M.length>0&&(h(M),t&&t(M))}else{const v=T[0];if(v.size>e){s(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const M=n(v);if(M){s(M),y(M);return}}b(URL.createObjectURL(v)),v.type.startsWith("video/")&&Ip(v,j),o&&(g(v),o(v))}},[e,o,t,n,l]),w=()=>{const x=c.current;x&&typeof x.click=="function"&&x.click()};return p.useEffect(()=>()=>{typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&(k&&URL.revokeObjectURL(k),C&&URL.revokeObjectURL(C))},[k,C]),{previewUrl:k,thumbnailUrl:C,errorMessage:f,fileInputRef:c,videoRef:d,selectedFile:u,selectedFiles:m,handleFileChange:S,handleClick:w}},Fp=({accept:e,isLoading:o=!1,progress:t=0,icon:n,text:a,previewUrl:l,thumbnailUrl:s,errorMessage:c,fileInputRef:d,videoRef:u,selectedFile:g,selectedFiles:m,handleFileChange:h,handleClick:f,multiple:y=!1,containerProps:k,errorMessageProps:b,progressProps:C,videoProps:j,imageProps:S,iconProps:w,textProps:x,fileType:T,previewUrl:v,renderError:M=({errorMessage:W,errorMessageProps:H,themeMode:R})=>r.jsx(i.Text,{color:"red",fontSize:12,marginTop:8,...H,...I==null?void 0:I.text,children:W}),renderText:A=({text:W,textProps:H})=>r.jsx(i.Text,{marginTop:8,...H,...I==null?void 0:I.text,children:W}),renderFile:P=({selectedFile:W,textProps:H})=>W?r.jsxs(i.Center,{marginTop:8,gap:10,flexDirection:"column",...I==null?void 0:I.container,children:[r.jsx(i.Text,{maxLines:2,...H,...I==null?void 0:I.text,children:W.name}),r.jsxs(i.Text,{...H,...I==null?void 0:I.text,children:["(",Math.round(W.size/1024)," KB)"]})]}):null,renderVideo:F=({selectedFile:W,videoRef:H,videoProps:R})=>r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...I==null?void 0:I.view,children:r.jsx(i.View,{as:"video",width:"100%",height:"100%",src:W?URL.createObjectURL(W):void 0,style:{objectFit:"cover"},ref:H,...R,...I==null?void 0:I.view})}),renderImage:V=({previewUrl:W,imageProps:H})=>(console.log("Rendering image with URL:",W),r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...I==null?void 0:I.view,children:r.jsx(i.Image,{src:W,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...H,...I==null?void 0:I.image})})),renderProgress:z=({progress:W,progressProps:H})=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",...H,...I==null?void 0:I.horizontal,children:[r.jsx(i.View,{height:4,backgroundColor:"color-black-100",width:"100%",borderRadius:2,...I==null?void 0:I.view,children:r.jsx(i.View,{height:4,width:`${W}%`,borderRadius:2,backgroundColor:"color-dark-50",...I==null?void 0:I.view})}),r.jsxs(i.Text,{fontSize:12,...I==null?void 0:I.text,children:[W,"%"]})]}),views:I={}})=>{const W=v||l;return r.jsxs(i.Center,{onClick:f,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:g&&t===100?"200px":"auto",...k,...I==null?void 0:I.container,children:[t===100&&T==="image"&&W&&V({previewUrl:W,imageProps:S}),t===100&&T==="video"&&s&&F({selectedFile:g,thumbnailUrl:s,videoRef:u,videoProps:j,imageProps:S}),t===100&&T==="file"&&g&&P({selectedFile:g,textProps:x}),t<100&&(n||r.jsx(rn,{widthHeight:32,...w})),!o&&!g&&a&&A({text:a,textProps:x}),o&&z({progress:t,progressProps:C}),!o&&c&&M({errorMessage:c,errorMessageProps:b}),r.jsx(i.Input,{type:"file",ref:d,onChange:h,accept:e,multiple:y,style:{display:"none"},...I==null?void 0:I.view})]})},Xr=({accept:e="*/*",icon:o,text:t,maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:s,isLoading:c=!1,progress:d=0,fileType:u,multiple:g=!1,...m})=>{const{previewUrl:h,thumbnailUrl:f,errorMessage:y,videoRef:k,fileInputRef:b,selectedFile:C,selectedFiles:j,handleFileChange:S,handleClick:w}=Rp({maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:s,multiple:g}),T=(()=>{if(u)return u;if(C)return C.type.startsWith("image/")?"image":C.type.startsWith("video/")?"video":"file"})();return r.jsx(Fp,{handleClick:w,accept:e,isLoading:c,progress:d,icon:o,text:t,maxSize:n,onFileSelect:a,validateFile:s,errorMessage:y,handleFileChange:S,selectedFile:C,selectedFiles:j,videoRef:k,fileInputRef:b,previewUrl:h,thumbnailUrl:f,fileType:T,multiple:g,...m})};function zp(e){const o=Math.floor(e/60),t=e%60;return`${o}:${t.toString().padStart(2,"0")}`}function Mp({onAudio:e,recording:o,paused:t,audioBlob:n,analyserNode:a,duration:l,error:s,startRecording:c,stopRecording:d,pauseRecording:u,resumeRecording:g,resetRecording:m,handleFileChange:h,...f}){const[y,k]=p.useState(null);p.useEffect(()=>{if(n){const j=URL.createObjectURL(n);return k({url:j,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(j)}}return()=>{}},[n]);const b=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),k(null),m()},C=j=>{e(j),y!=null&&y.url&&URL.revokeObjectURL(y.url),k({url:URL.createObjectURL(j),label:j.name})};return r.jsxs(i.Vertical,{gap:"10px",width:"100%",...f,children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsx(Xr,{accept:"audio/*",icon:r.jsx(sr,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:C,fileType:"file",multiple:!1,renderError:({errorMessage:j})=>null,views:{container:{width:"36px",height:"36px",cursor:"pointer",border:"1px solid color-gray-200",borderRadius:"10px",backgroundColor:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"}}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"10px",width:"36px",height:"36px"},validateFile:j=>j.size>100*1024*1024?"File size exceeds 100MB limit":j.type.startsWith("audio/")?null:"Only audio files are allowed"}),r.jsx(i.View,{as:"button",type:"button",onClick:o?d:c,width:"36px",height:"36px",minWidth:"36px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"theme-primary",color:"color-white",borderRadius:"999px",border:"0",cursor:"pointer",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.92},children:o?r.jsx(Gr,{widthHeight:14,color:"color-white",filled:!1}):r.jsx(Xt,{widthHeight:18,color:"color-white",filled:!1})}),r.jsx(i.View,{flex:1,minWidth:120,children:r.jsx(nn,{analyserNode:o?a:null,isPaused:!o||t})}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:zp(l)})]}),y&&!o&&r.jsxs(i.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:y.label}),r.jsx(i.View,{as:"button",type:"button",onClick:b,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:r.jsx(We,{widthHeight:14,color:"currentColor"})})]}),r.jsx(i.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),s&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:s})]})}function al(){const[e,o]=p.useState(!1),[t,n]=p.useState(!1),[a,l]=p.useState(0),[s,c]=p.useState(null),[d,u]=p.useState(null),[g,m]=p.useState(null),h=p.useRef(null),f=p.useRef(null),y=p.useRef(null),k=p.useRef(null),b=p.useRef([]),C=p.useRef(null),j=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",S=p.useCallback(()=>{h.current&&(h.current.state!=="inactive"&&h.current.stop(),h.current=null),k.current&&(k.current.getTracks().forEach(A=>A.stop()),k.current=null),f.current&&(f.current.close(),f.current=null),y.current&&(y.current.disconnect(),y.current=null),u(null),C.current&&(clearInterval(C.current),C.current=null)},[]),w=p.useCallback(async()=>{S(),c(null),l(0),b.current=[];try{const A=await navigator.mediaDevices.getUserMedia({audio:!0});k.current=A;const P=MediaRecorder.isTypeSupported(j)?j:void 0,F=new MediaRecorder(A,P?{mimeType:P}:void 0);h.current=F;const V=new(window.AudioContext||window.webkitAudioContext);f.current=V;const z=V.createMediaStreamSource(A),I=V.createAnalyser();I.fftSize=256,I.smoothingTimeConstant=.8,z.connect(I),y.current=I,u(I),F.ondataavailable=W=>{W.data.size>0&&b.current.push(W.data)},F.onstop=()=>{const W=new Blob(b.current,{type:F.mimeType||j});m(W),S()},F.start(),o(!0),n(!1),C.current=setInterval(()=>{l(W=>W+1)},1e3)}catch{c("Microphone access denied or unavailable."),S()}},[S]),x=p.useCallback(()=>{h.current&&h.current.state!=="inactive"&&h.current.stop(),o(!1),n(!1),C.current&&(clearInterval(C.current),C.current=null)},[]),T=p.useCallback(()=>{h.current&&h.current.state==="recording"&&(h.current.pause(),n(!0),C.current&&(clearInterval(C.current),C.current=null))},[]),v=p.useCallback(()=>{h.current&&h.current.state==="paused"&&(h.current.resume(),n(!1),C.current||(C.current=setInterval(()=>{l(A=>A+1)},1e3)))},[]),M=p.useCallback(()=>{S(),o(!1),n(!1),m(null),l(0),c(null),b.current=[]},[S]);return p.useEffect(()=>()=>S(),[S]),{recording:e,paused:t,audioBlob:g,analyserNode:d,duration:a,error:s,startRecording:w,stopRecording:x,pauseRecording:T,resumeRecording:v,resetRecording:M}}function Wp(e){const{onAudio:o}=e,{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:s,error:c,startRecording:d,stopRecording:u,pauseRecording:g,resumeRecording:m,resetRecording:h}=al();return p.useEffect(()=>{if(a&&o){const y=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(y)}},[a,o]),{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:s,error:c,startRecording:d,stopRecording:u,pauseRecording:g,resumeRecording:m,resetRecording:h,handleFileChange:y=>{var b;const k=(b=y.target.files)==null?void 0:b[0];k&&o&&o(k)}}}function Hp(e){const o=Wp(e);return r.jsx(Mp,{...e,...o})}const Vp=()=>{const[e,o]=p.useState(!1);return{imageError:e,setImageError:o}},Ap={xs:24,sm:32,md:44,lg:56,xl:72},ct={container:{borderRadius:"50%",overflow:"hidden",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"theme-primary",transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},fallback:{fontWeight:"600",color:"color-white",letterSpacing:"-0.02em"},image:{objectFit:"cover",transition:"opacity 0.2s ease"}},Pp=({src:e,size:o="md",fallback:t="IM",views:n,imageError:a,setImageError:l,onClick:s=()=>{},children:c})=>{const d=Ap[o],u={...ct.image,...(n==null?void 0:n.image)||{}};return r.jsxs(i.Center,{"data-role":"avatar",width:d,height:d,...ct.container,borderColor:a?"color-gray-400":"transparent",onClick:s,...n==null?void 0:n.container,children:[!a&&e?r.jsx(i.Image,{alt:"",src:e,style:u,width:d,height:d,onError:()=>l(!0)}):r.jsx(i.Text,{size:o,...ct.fallback,...n==null?void 0:n.fallback,children:t}),c]})},Ep=e=>{const o=fe("avatar",e),{src:t,size:n,views:a,fallback:l,onClick:s,children:c}=o,{imageError:d,setImageError:u}=Vp();return r.jsx(Pp,{src:t,size:n,views:a,fallback:l,imageError:d,setImageError:u,onClick:s,children:c})},ll=Ep,Dp={xs:{minWidth:"16px",height:"16px",padding:"0 4px",fontSize:"9px",fontWeight:"600",lineHeight:"12px",letterSpacing:"-0.01em"},sm:{minWidth:"20px",height:"20px",padding:"0 6px",fontSize:"10px",fontWeight:"600",lineHeight:"14px",letterSpacing:"-0.01em"},md:{minWidth:"24px",height:"24px",padding:"0 8px",fontSize:"12px",fontWeight:"600",lineHeight:"16px",letterSpacing:"-0.01em"},lg:{minWidth:"28px",height:"28px",padding:"0 10px",fontSize:"14px",fontWeight:"600",lineHeight:"20px",letterSpacing:"-0.01em"},xl:{minWidth:"32px",height:"32px",padding:"0 12px",fontSize:"16px",fontWeight:"600",lineHeight:"24px",letterSpacing:"-0.01em"}},$p={xs:{gap:"6px",padding:"3px 8px 3px 3px"},sm:{gap:"8px",padding:"4px 10px 4px 4px"},md:{gap:"12px",padding:"6px 16px 6px 6px"},lg:{gap:"12px",padding:"7px 18px 7px 7px"},xl:{gap:"14px",padding:"8px 20px 8px 8px"}},Lp={xs:{padding:"2px 6px",fontSize:"9px",lineHeight:"12px"},sm:{padding:"3px 8px",fontSize:"10px",lineHeight:"14px"},md:{padding:"6px 12px",fontSize:"11px",lineHeight:"14px"},lg:{padding:"7px 14px",fontSize:"12px",lineHeight:"16px"},xl:{padding:"8px 16px",fontSize:"13px",lineHeight:"18px"}},_n={xs:{fontSize:"11px",lineHeight:"14px"},sm:{fontSize:"12px",lineHeight:"16px"},md:{fontSize:"13px",lineHeight:"18px"},lg:{fontSize:"14px",lineHeight:"20px"},xl:{fontSize:"15px",lineHeight:"22px"}},_p={square:0,rounded:"8px",pill:"9999px"},Bp={"top-right":{top:"4px",right:"4px",position:"absolute"},"top-left":{top:"4px",left:"4px",position:"absolute"},"bottom-right":{bottom:"4px",right:"4px",position:"absolute"},"bottom-left":{bottom:"4px",left:"4px",position:"absolute"}},Op=e=>({display:"inline-flex",height:"auto",minWidth:"auto",backgroundColor:"color-white-600",color:"color-gray-900",borderWidth:"1px",borderStyle:"solid",borderColor:"color-white",backdropFilter:"blur(12px)",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.08)",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",_hover:{backgroundColor:"color-white-800",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.1)"}}),Np=e=>({filled:{backgroundColor:"theme-primary",color:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",color:"theme-primary",style:{backgroundColor:"transparent"},transition:"border-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},link:{borderWidth:0,borderStyle:"none",borderColor:"theme-primary",color:"theme-primary",textDecoration:"underline",style:{backgroundColor:"transparent",textUnderlineOffset:"2px",textDecorationThickness:"1px"},transition:"opacity 0.2s ease",_hover:{opacity:.8}},ghost:{color:"color-gray-500",borderWidth:0,borderStyle:"solid",borderColor:"color-gray-500",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-100"}}}),il=e=>({default:{indicator:{backgroundColor:"color-gray-400"},label:{color:"inherit"}},info:{indicator:{backgroundColor:"color-blue-500"},label:{color:"inherit"}},success:{indicator:{backgroundColor:"color-green-500"},label:{color:"inherit"}},warning:{indicator:{backgroundColor:"color-orange-500"},label:{color:"inherit"}},error:{indicator:{backgroundColor:"color-red-500"},label:{color:"inherit"}}}),qp=p.memo(({content:e,children:o,icon:t,pastil:n,pastilContent:a,action:l,position:s,shape:c="pill",variant:d="filled",size:u="md",isAuto:g=!1,views:m,themeMode:h,backgroundColor:f,color:y,borderColor:k,...b})=>{const{themeMode:C}=i.useTheme(),j=h||C,S=p.useMemo(()=>Np()[d],[j,d]),w=p.useMemo(()=>Op(),[j]),x=p.useMemo(()=>il(),[j]),T=a!=null,v=l!=null,M=T||v,A=o??e,P=A!=null,F=g&&typeof A=="string"&&/^(color|theme|light|dark)-/.test(A)?A:void 0,V=p.useMemo(()=>{const I={width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:_p[c],...Dp[u],...S,...M?$p[u]:{},...M?w:{},...s?Bp[s]:{},...m==null?void 0:m.container};return d!=="filled"&&!M&&(S.color!==void 0&&(I.color=S.color),S.borderColor!==void 0&&(I.borderColor=S.borderColor),S.backgroundColor!==void 0&&(I.backgroundColor=S.backgroundColor),S&&S.style&&(I.style={...I.style||{},...S.style})),v||b.onClick!==void 0||(delete I._hover,delete I._active),f!==void 0&&(I.backgroundColor=f,k===void 0&&(I.borderColor=f)),k!==void 0&&(I.borderColor=k),y!==void 0&&(I.color=y),F&&(I.backgroundColor=F,I.borderColor=F,I.color="color-white"),I},[v,b.onClick,f,y,k,c,u,d,S,M,w,s,F,m==null?void 0:m.container]);let z="currentColor";return typeof n=="string"?n in x?z=x[n].indicator.backgroundColor:z=n:n===!0&&(z="color-green-500",d==="filled"&&(z="color-white")),r.jsxs(i.Center,{"data-role":"badge",...V,...b,children:[t&&r.jsx(i.View,{"data-role":"badge-icon",...m==null?void 0:m.icon,children:t}),T&&r.jsx(i.Text,{"data-role":"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...Lp[u],...m==null?void 0:m.pastilContent,children:a}),n&&r.jsx(i.View,{"data-role":"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:z,...m==null?void 0:m.pastil}),P&&r.jsx(i.Text,{"data-role":"badge-text",color:M?"color-gray-900":V.color,fontWeight:M?"700":"600",textAlign:"center",letterSpacing:M?0:"0.02em",whiteSpace:"nowrap",...M?_n[u]:{},...m==null?void 0:m.text,children:A}),v&&r.jsx(i.Text,{"data-role":"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",..._n[u],...m==null?void 0:m.action,children:l})]})}),Ie=e=>{const o=fe("badge",e);return r.jsx(qp,{...o})},Up={xs:12,sm:14,md:16,lg:18,xl:20},Gp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,an=p.forwardRef(({children:e,href:o,iconSize:t="sm",underline:n="default",isExternal:a=!1,views:l={},to:s,isHovered:c,setIsHovered:d,_hover:u,...g},m)=>r.jsxs(i.Element,{as:"a",ref:m,href:o,display:"inline-flex",gap:3,alignItems:"center",flexWrap:"nowrap",color:"inherit",textDecoration:n==="underline"?"underline":"none",_hover:n==="hover"?{textDecoration:"underline",...u}:u,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...l.text,...g,children:[e,a&&r.jsx(Ja,{widthHeight:Up[t]})]}));an.displayName="LinkAnchor";const sl=p.forwardRef(({to:e="/",onClick:o,...t},n)=>{const a=Tt.useHref(e),l=Tt.useNavigate(),s=c=>{o==null||o(c),!(c.defaultPrevented||c.button!==0||t.target&&t.target!=="_self"||c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)&&(c.preventDefault(),l(e))};return r.jsx(an,{...t,to:e,href:a,onClick:s,ref:n})});sl.displayName="RouterLinkAnchor";const cl=p.forwardRef((e,o)=>{const t=Tt.useInRouterContext(),{href:n,to:a="/",isExternal:l}=e;return t&&!l&&n==null&&!Gp.test(a)?r.jsx(sl,{...e,ref:o}):r.jsx(an,{...e,href:n??a,ref:o})});cl.displayName="LinkView";const dl=p.forwardRef((e,o)=>r.jsx(cl,{ref:o,...e}));dl.displayName="Link";const ln=dl,sn={xs:14,sm:18,md:22,lg:26,xl:30},cn={fast:50,normal:100,slow:300},Yp=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Kp=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:s}=i.useTheme(),c=l(t,{themeMode:n||s}),d=typeof e=="number"?e:sn[e],[u,g]=p.useState(0);return p.useEffect(()=>{const m=setInterval(()=>{g(h=>h+45)},cn[o]);return()=>clearInterval(m)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${d}px`,height:`${d}px`,viewBox:"0 0 24 24",fill:"none",stroke:c,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${u}deg)`},...a,children:[r.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),r.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("g",{id:"SVGRepo_iconCarrier",children:r.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},Xp=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:s}=i.useTheme(),c=l(t,{themeMode:n||s}),d=typeof e=="number"?e:sn[e],[u,g]=p.useState(0);return p.useEffect(()=>{const m=setInterval(()=>{g(h=>h+45)},cn[o]);return()=>clearInterval(m)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${u}deg)`},...a,children:[r.jsx("circle",{cx:"10",cy:"25",r:"4",fill:c}),r.jsx("circle",{cx:"25",cy:"25",r:"4",fill:c}),r.jsx("circle",{cx:"40",cy:"25",r:"4",fill:c})]})},Jp=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:s}=i.useTheme(),c=l(t,{themeMode:n||s}),d=typeof e=="number"?e:sn[e],[u,g]=p.useState(0);return p.useEffect(()=>{const m=setInterval(()=>{g(h=>h+45)},cn[o]);return()=>clearInterval(m)},[o]),r.jsx(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${u}deg)`},...a,children:r.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:c,strokeWidth:"5",strokeDasharray:"1,10"})})},Qp=({size:e,children:o,textColor:t,loaderColor:n,type:a="default",speed:l="normal",textPosition:s="right",views:c,...d})=>{const{getColor:u}=i.useTheme(),g=f=>Yp(f)?f:u(f||"theme-loading");n=g(n||d.color||"theme-loading"),t=g(t||d.color||"theme-loading");const m={size:e,speed:l,color:n},h={default:r.jsx(Kp,{...m}),dotted:r.jsx(Xp,{...m}),quarter:r.jsx(Jp,{...m})};return r.jsxs(i.Center,{gap:10,flexDirection:s==="top"||s==="bottom"?"column":"row",...d,...c==null?void 0:c.container,children:[(s==="left"||s==="top")&&o&&r.jsx(i.View,{color:t,...c==null?void 0:c.text,children:o}),h[a],(s==="right"||s==="bottom")&&o&&r.jsx(i.View,{color:t,...c==null?void 0:c.text,children:o})]})},Zp=e=>{const o=fe("loader",e);return r.jsx(Qp,{...o})},ao=Zp,em=/^(color|theme|light|dark)-/,om=e=>em.test(e),rm=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},vo=(e,o)=>om(e)?`${rm(e)}-${o}`:`color-mix(in srgb, ${e} ${Math.round(o/10)}%, transparent)`,ul={xs:{minHeight:24,paddingHorizontal:12,paddingVertical:5,fontSize:10,fontWeight:500,lineHeight:12,letterSpacing:"-0.01em"},sm:{minHeight:32,paddingHorizontal:16,paddingVertical:7,fontSize:12,fontWeight:500,lineHeight:16,letterSpacing:"-0.01em"},md:{minHeight:40,paddingHorizontal:20,paddingVertical:9,fontSize:14,fontWeight:500,lineHeight:20,letterSpacing:"-0.01em"},lg:{minHeight:48,paddingHorizontal:24,paddingVertical:11,fontSize:16,fontWeight:500,lineHeight:24,letterSpacing:"-0.01em"},xl:{minHeight:56,paddingHorizontal:28,paddingVertical:13,fontSize:20,fontWeight:500,lineHeight:28,letterSpacing:"-0.01em"}},ar={square:0,rounded:8,pill:999},tm={xs:{width:16,height:16,padding:6},sm:{width:20,height:20,padding:6},md:{width:24,height:24,padding:8},lg:{width:24,height:24,padding:12},xl:{width:28,height:28,padding:14}},Le=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,nm=(e,o,t=!1,n)=>{const a=t?o:e,l=t?e:o,s=t?o:e,d=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:l,u=`0 0 0 2px ${Le("color-white")}, 0 0 0 4px ${Le(s)}`;return{filled:{backgroundColor:a,color:d,borderWidth:1,borderStyle:"solid",borderColor:a,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:s,borderWidth:1,borderStyle:"solid",borderColor:vo(s,t?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:s,borderWidth:1,borderStyle:"solid",borderColor:vo(s,t?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:s,borderWidth:0,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:s,borderWidth:0,borderStyle:"none",borderColor:s,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Le(s)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:u},transition:"opacity 0.2s ease"},subtle:{backgroundColor:vo(s,t?200:100),color:s,borderWidth:1,borderStyle:"solid",borderColor:vo(s,t?400:250),_hover:{backgroundColor:vo(s,t?300:180)},_active:{backgroundColor:vo(s,t?380:240)},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},am=p.memo(({children:e,icon:o,leftIcon:t,rightIcon:n,isLoading:a,iconPosition:l="left",loaderPosition:s="left",size:c="md",resolvedTextColor:d,isIconRounded:u,loaderProps:g,views:m})=>{const h=["left","right"].includes(l)?i.Horizontal:i.Vertical,f=ul[c];return r.jsxs(h,{gap:8,alignItems:"center",justifyContent:"center",fontSize:f.fontSize,fontWeight:f.fontWeight,lineHeight:f.lineHeight,letterSpacing:f.letterSpacing,whiteSpace:"nowrap",color:d,...m==null?void 0:m.content,children:[a&&s==="left"&&r.jsx(ao,{size:c==="xs"||c==="sm"?"sm":"md",color:d,...g,...m==null?void 0:m.loader}),t&&r.jsx(i.View,{color:d,...m==null?void 0:m.icon,children:t}),o&&["left","top"].includes(l)&&!a&&r.jsx(i.View,{color:d,...m==null?void 0:m.icon,children:o}),e,o&&["right","bottom"].includes(l)&&!a&&r.jsx(i.View,{color:d,...m==null?void 0:m.icon,children:o}),n&&r.jsx(i.View,{color:d,...m==null?void 0:m.icon,children:n}),a&&s==="right"&&r.jsx(ao,{size:c==="xs"||c==="sm"?"sm":"md",color:d,...g,...m==null?void 0:m.loader})]})}),lm=e=>{const o=ar[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},im=({asComponent:e,isDisabled:o,isLoading:t,isWrapped:n=!1,borderRadius:a,width:l,height:s,baseStyles:c,sizeStyles:d,iconPad:u,mainTone:g,resolvedTextColor:m,children:h,borderWidth:f=0,...y})=>r.jsx(i.Element,{as:e,disabled:!!(o||t),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:l,height:s,...c,...d,...u,backgroundColor:(c==null?void 0:c.backgroundColor)||(n?g:void 0),color:m,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...y,children:h}),sm=({shape:e,isDisabled:o,onClick:t,shadow:n,borderWidth:a,isAuto:l,isFilled:s,views:c,children:d,...u})=>r.jsx(i.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:ar[e],cursor:o?"default":"pointer",onClick:t,boxShadow:n,padding:a,width:s?"100%":l?"fit-content":void 0,...c==null?void 0:c.container,...u,children:d}),cm=({variant:e,animation:o,to:t,isDisabled:n,isLoading:a,isAuto:l,isFilled:s,isExternal:c,shape:d="rounded",shadow:u,onClick:g,views:m,baseStyles:h,sizeStyles:f,iconPad:y,containerRef:k,resolvedTextColor:b,content:C,size:j,mainTone:S,borderMovingDuration:w=2,borderMovingGradientColors:x=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:T="#705CFF",animatedStrokeTextColor:v="color-gray-900",...M})=>{var V;const A=lm(d),P=t?r.jsx(ln,{to:t,isExternal:c,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...m==null?void 0:m.link,children:C}):C,F={isDisabled:n,isLoading:a,baseStyles:h,sizeStyles:f,iconPad:y,resolvedTextColor:b,mainTone:S,children:P};if(o==="borderMoving"&&x){const I={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${w}s`,timingFunction:"linear",iterationCount:"infinite"};return r.jsx(sm,{shape:d,isDisabled:n,onClick:g,shadow:u,borderWidth:3,isAuto:l,isFilled:s,views:m,background:`linear-gradient(90deg, ${Le(x[0])}, ${Le(x[1])}, ${Le(x[2])}, ${Le(x[0])})`,backgroundSize:"200% 100%",animate:I,...M,children:r.jsx(im,{asComponent:t?"div":"button",isWrapped:!0,borderRadius:Math.max(0,A-3),width:"100%",height:"100%",...F})})}if(o==="animatedStroke"){const z=Le(T),I=Le(v),W=1e3,H={from:{strokeWidth:"8px",strokeDasharray:`0 ${W}`,strokeDashoffset:-Math.round(W*.63)},to:{strokeWidth:"3px",strokeDasharray:`${W}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},R=["group",(V=m==null?void 0:m.container)==null?void 0:V.className,M==null?void 0:M.className].filter(Boolean).join(" ");return r.jsxs(i.Element,{ref:k,as:t?"div":"button",type:t?void 0:"button",disabled:!!(!t&&(n||a)),onClick:g,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:s?"100%":l?"fit-content":void 0,borderRadius:ar[d],boxShadow:u,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",color:I,backgroundColor:"transparent",borderWidth:0,...m==null?void 0:m.container,...M,className:R,children:[r.jsx(i.View,{as:"svg",position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",pointerEvents:"none",zIndex:1,"aria-hidden":"true",children:r.jsx(i.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:A,ry:A,fill:"transparent",stroke:z,strokeWidth:"8px",strokeDasharray:`0 ${W}`,strokeDashoffset:-Math.round(W*.63),pathLength:W,on:{groupHover:{animate:H}}})}),r.jsx(i.View,{position:"relative",zIndex:0,children:P})]})}if(o==="borderReveal"){const I=Le((x==null?void 0:x[0])||S||"#000000"),H=w*.75/4,R=`linear-gradient(90deg, ${I} 50%, transparent 50%)`,D=`linear-gradient(180deg, ${I} 50%, transparent 50%)`,$=`linear-gradient(270deg, ${I} 50%, transparent 50%)`,_=`linear-gradient(0deg, ${I} 50%, transparent 50%)`,B="100% 0, 100% 100%, 0 100%, 0 0",N="0 0, 100% 0, 100% 100%, 0 100%",Y=`0s, ${H}s, ${H*2}s, ${H*2}s`,ee=`${H*2}s, ${H*2}s, ${H}s, 0s`,L=4;return r.jsx(i.Element,{ref:k,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:ar[d],cursor:n?"default":"pointer",onClick:g,boxShadow:u,padding:3,background:`
2
- ${R} no-repeat,
3
- ${D} no-repeat,
4
- ${$} no-repeat,
1
+ "use strict";var fc=Object.create;var Tr=Object.defineProperty;var yc=Object.getOwnPropertyDescriptor;var xc=Object.getOwnPropertyNames;var bc=Object.getPrototypeOf,kc=Object.prototype.hasOwnProperty;var Cc=(e,o,r)=>o in e?Tr(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r;var Sc=(e,o,r,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of xc(o))!kc.call(e,a)&&a!==r&&Tr(e,a,{get:()=>o[a],enumerable:!(n=yc(o,a))||n.enumerable});return e};var wc=(e,o,r)=>(r=e!=null?fc(bc(e)):{},Sc(o||!e||!e.__esModule?Tr(r,"default",{value:e,enumerable:!0}):r,e));var Je=(e,o,r)=>Cc(e,typeof o!="symbol"?o+"":o,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),m=require("react"),s=require("app-studio"),jc=require("react-dom"),Qo=require("zustand"),qr=require("react-router-dom"),qe=require("formik"),Oo=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,vc=({type:e="single",value:o,defaultValue:r,onValueChange:n,collapsible:a=!1})=>{const l=o!==void 0,i=o??r,u=()=>e==="multiple"?Array.isArray(i)?i:i?[i]:[]:Array.isArray(i)?i[0]:i,[c,d]=m.useState(u()),g=m.useMemo(()=>Oo("accordion"),[]),p=l?o:c,h=m.useMemo(()=>p===void 0?[]:Array.isArray(p)?p:[p],[p]);m.useEffect(()=>{l&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),d(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),d(o.length>0?o[0]:void 0)):d(o))},[o,l,e]);const f=m.useCallback(b=>{let x;if(e==="single")p===b&&a?x=void 0:p!==b?x=b:x=p;else{const C=Array.isArray(p)?p:[];C.includes(b)?x=C.filter(k=>k!==b):x=[...C,b],Array.isArray(x)&&x.length===0&&(x=[])}l||d(x),n&&n(x)},[e,p,a,l,n]),y=m.useCallback(b=>h.includes(b),[h]);return{expandedItems:h,toggleItem:f,isItemExpanded:y,type:e,collapsible:a,baseId:g}},Tc={square:{borderRadius:0},rounded:{borderRadius:8}},Ic={default:{borderWidth:0,style:{backgroundColor:"transparent"},transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.15s ease, background-color 0.15s ease",_hover:{borderColor:"color-gray-300"}},filled:{backgroundColor:"color-gray-50",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-100"}}},Rc={id:"default",label:"Default",sourcePath:"",sourceTitle:"Default adaptive design system (light + dark)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},Fc={primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626",onPrimary:"#ffffff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200"},zc={rawCssVars:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626"},colors:[{name:"primary",value:"#2563eb",role:"primary"},{name:"secondary",value:"#7c3aed",role:"secondary"},{name:"success",value:"#16a34a",role:"success"},{name:"warning",value:"#d97706",role:"warning"},{name:"error",value:"#dc2626",role:"error"}],typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace",fontSizes:["12px","13px","14px","16px","18px","22px","28px","36px","48px","64px"],fontWeights:["400","500","600","700","800"],lineHeights:["1.0","1.1","1.2","1.4","1.5","1.6"]},spacing:["2px","4px","8px","12px","16px","24px","32px","48px","64px"],radii:["2px","4px","6px","8px","12px","16px","9999px"],shadows:["0 1px 2px rgba(0,0,0,0.04)","0 4px 12px rgba(0,0,0,0.08)","0 12px 32px rgba(0,0,0,0.12)"]},Mc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:8,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:600,fontStyle:"normal"},text:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 2px rgba(0,0,0,0.04)"},header:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"9999px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Wc={cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral-clear"},Ec={metadata:Rc,theme:Fc,tokens:zc,components:Mc,personality:Wc},Ac={id:"airbnb",label:"Airbnb",sourcePath:"design.md/html/airbnb.html",sourceTitle:"Design System Inspiration of Airbnb",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},Hc={primary:"#ff385c",secondary:"#222222",success:"#428bff",warning:"#460479",error:"#c13515",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Vc={rawCssVars:{primary:"#ff385c","primary-active":"#e00b41","primary-disabled":"#ffd1da",error:"#c13515",luxe:"#460479",plus:"#92174d",ink:"#222222",body:"#3f3f3f",muted:"#6a6a6a","muted-soft":"#929292",hairline:"#dddddd","hairline-soft":"#ebebeb","border-strong":"#c1c1c1",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#f2f2f2","on-primary":"#ffffff","legal-link":"#428bff",shadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",display:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",text:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, sans-serif"},colors:[{name:"primary",value:"#ff385c",role:"primary"},{name:"primary-active",value:"#e00b41",role:"primary active"},{name:"primary-disabled",value:"#ffd1da",role:"primary disabled"},{name:"error",value:"#c13515",role:"error"},{name:"luxe",value:"#460479",role:"luxe"},{name:"plus",value:"#92174d",role:"plus"},{name:"ink",value:"#222222",role:"ink"},{name:"body",value:"#3f3f3f",role:"body"},{name:"muted",value:"#6a6a6a",role:"muted"},{name:"muted-soft",value:"#929292",role:"muted soft"},{name:"hairline",value:"#dddddd",role:"hairline"},{name:"hairline-soft",value:"#ebebeb",role:"hairline soft"},{name:"border-strong",value:"#c1c1c1",role:"border strong"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#f2f2f2",role:"surface strong"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"legal-link",value:"#428bff",role:"legal link"},{name:"shadow",value:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",role:"shadow"}],typography:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","48px","18px","20px","11px","28px","13px","12px","8px","64px","21px","10px","24px","36px","15px"],fontWeights:["400","600","700","500"],lineHeights:["1.5","1.1","1.43","1.25","2","1","1.2","1.35","1.4"]},spacing:["2px","4px","5px","6px","7px","8px","10px","11px","12px","13px","14px","16px","20px","23px","24px","28px","32px","40px","48px","56px"],radii:["9999px","8px","14px","4px","6px","3px"],shadows:["rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0","var(--shadow)"]},Pc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},header:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"14px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:16},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:16},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"14px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"14px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Dc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:16,pillRadius:9999,badgeRadius:6,voice:"warm-welcoming"},$c={metadata:Ac,theme:Hc,tokens:Vc,components:Pc,personality:Dc},Lc={id:"apple",label:"Apple",sourcePath:"design.md/html/apple.html",sourceTitle:"Design System Inspiration of Apple",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},Bc={primary:"#0071E3",secondary:"#1d1d1f",success:"#0071e3",warning:"#272729",error:"#2997ff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},_c={rawCssVars:{primary:"#0066cc","primary-focus":"#0071e3","primary-on-dark":"#2997ff",ink:"#1d1d1f",body:"#1d1d1f","body-on-dark":"#ffffff","body-muted":"#cccccc","ink-muted-80":"#333333","ink-muted-48":"#7a7a7a","divider-soft":"#f0f0f0",hairline:"#e0e0e0",canvas:"#ffffff","canvas-parchment":"#f5f5f7","surface-pearl":"#fafafc","surface-tile-1":"#272729","surface-tile-2":"#2a2a2c","surface-tile-3":"#252527","surface-black":"#000000","surface-chip-translucent":"rgba(210, 210, 215, 0.64)","on-primary":"#ffffff","on-dark":"#ffffff",display:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",text:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#0071E3",role:"primary"},{name:"primary-focus",value:"#0071e3",role:"primary focus"},{name:"primary-on-dark",value:"#2997ff",role:"primary on dark"},{name:"ink",value:"#1d1d1f",role:"ink"},{name:"body",value:"#1d1d1f",role:"body"},{name:"body-on-dark",value:"#ffffff",role:"body on dark"},{name:"body-muted",value:"#cccccc",role:"body muted"},{name:"ink-muted-80",value:"#333333",role:"ink muted 80"},{name:"ink-muted-48",value:"#7a7a7a",role:"ink muted 48"},{name:"divider-soft",value:"#f0f0f0",role:"divider soft"},{name:"hairline",value:"#e0e0e0",role:"hairline"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"canvas-parchment",value:"#f5f5f7",role:"canvas parchment"},{name:"surface-pearl",value:"#fafafc",role:"surface pearl"},{name:"surface-tile-1",value:"#272729",role:"surface tile 1"},{name:"surface-tile-2",value:"#2a2a2c",role:"surface tile 2"},{name:"surface-tile-3",value:"#252527",role:"surface tile 3"},{name:"surface-black",value:"#000000",role:"surface black"},{name:"surface-chip-translucent",value:"rgba(210, 210, 215, 0.64)",role:"surface chip translucent"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"}],typography:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["17px","14px","56px","21px","12px","40px","24px","13px","18px","28px","11px","34px","44px","32px","19px"],fontWeights:["400","600","300","700"],lineHeights:["1.47","1.07","1.19","1.1","1.43","1.5","1","1.14","2.0","2.41","1.2","1.35"]},spacing:["5px","6px","7px","8px","10px","11px","12px","14px","15px","16px","18px","20px","21px","22px","24px","28px","32px","44px","48px","50px"],radii:["9999px","18px","28px","24px","8px","11px","50%","12px","4px","6px","3px"],shadows:["0 5px 30px rgba(0, 0, 0, 0.22)"]},Oc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:8,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:18,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 5px 30px rgba(0, 0, 0, 0.22)"},header:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"18px"},trigger:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:18},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:18},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"18px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"18px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Nc={cornerStyle:"soft",typeWeight:"light",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"flat",signatureMotif:"◯",density:"spacious",surfaceTone:"paper",cardRadius:18,pillRadius:9999,badgeRadius:8,voice:"minimal-precise"},qc={metadata:Lc,theme:Bc,tokens:_c,components:Oc,personality:Nc},Uc={id:"coinbase",label:"Coinbase",sourcePath:"design.md/html/coinbase.html",sourceTitle:"Design System Inspiration of Coinbase",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap"]},Gc={primary:"#0052ff",secondary:"#0a0b0d",success:"#16a34a",warning:"#003ecc",error:"#dc2626",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Yc={rawCssVars:{primary:"#0052ff","primary-active":"#003ecc","primary-disabled":"#a8b8cc",ink:"#0a0b0d",body:"#5b616e",muted:"#7c828a","muted-soft":"#a8acb3",hairline:"#dee1e6","hairline-soft":"#eef0f3",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#eef0f3","surface-dark":"#0a0b0d","surface-dark-elevated":"#16181c","on-primary":"#ffffff","on-dark":"#ffffff","on-dark-soft":"#a8acb3","semantic-up":"#05b169","semantic-down":"#cf202f","accent-yellow":"#f4b000",display:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",text:"'Inter', 'Coinbase Sans', sans-serif",mono:"'JetBrains Mono', 'Coinbase Mono', monospace"},colors:[{name:"primary",value:"#0052ff",role:"primary"},{name:"primary-active",value:"#003ecc",role:"primary active"},{name:"primary-disabled",value:"#a8b8cc",role:"primary disabled"},{name:"ink",value:"#0a0b0d",role:"ink"},{name:"body",value:"#5b616e",role:"body"},{name:"muted",value:"#7c828a",role:"muted"},{name:"muted-soft",value:"#a8acb3",role:"muted soft"},{name:"hairline",value:"#dee1e6",role:"hairline"},{name:"hairline-soft",value:"#eef0f3",role:"hairline soft"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#eef0f3",role:"surface strong"},{name:"surface-dark",value:"#0a0b0d",role:"surface dark"},{name:"surface-dark-elevated",value:"#16181c",role:"surface dark elevated"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-soft",value:"#a8acb3",role:"on dark soft"},{name:"semantic-up",value:"#05b169",role:"semantic up"},{name:"semantic-down",value:"#cf202f",role:"semantic down"},{name:"accent-yellow",value:"#f4b000",role:"accent yellow"}],typography:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",monoFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontSizes:["16px","14px","72px","18px","13px","36px","12px","44px","11px","52px","28px","40px","32px","48px","26px"],fontWeights:["500","600","400","700"],lineHeights:["1.5","1.2","1.05","1.15","1.0","1.09","1","1.35","1.4"]},spacing:["4px","5px","6px","8px","10px","11px","12px","13px","14px","15px","16px","19px","20px","24px","28px","32px","40px","44px","48px","56px"],radii:["100px","24px","20px","16px","9999px","14px","12px","8px","6px","3px"],shadows:["0 16px 40px rgba(0,0,0,0.5)","0 16px 40px rgba(0,0,0,0.4)","0 4px 12px rgba(0,0,0,0.04)"]},Kc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 16px 40px rgba(0,0,0,0.5)"},header:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"16px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"16px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Xc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"◆",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"trustworthy-financial"},Jc={metadata:Uc,theme:Gc,tokens:Yc,components:Kc,personality:Xc},Qc={id:"figma",label:"Figma",sourcePath:"design.md/html/figma.html",sourceTitle:"Design System Inspiration of Figma",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300..700&family=JetBrains+Mono:wght@400;500&display=swap"]},Zc={primary:"#F24E1E",secondary:"#A259FF",success:"#0ACF83",warning:"#FFC700",error:"#FF7262",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},ed={rawCssVars:{primary:"#000000","on-primary":"#ffffff",ink:"#000000",canvas:"#ffffff","inverse-canvas":"#000000","inverse-ink":"#ffffff",hairline:"#e6e6e6","hairline-soft":"#f1f1f1","surface-soft":"#f7f7f5","block-lime":"#dceeb1","block-lilac":"#c5b0f4","block-cream":"#f4ecd6","block-pink":"#efd4d4","block-mint":"#c8e6cd","block-coral":"#f3c9b6","block-navy":"#1f1d3d","accent-magenta":"#ff3d8b","semantic-success":"#1ea64a",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",mono:"'JetBrains Mono', 'SF Mono', Menlo, monospace"},colors:[{name:"primary",value:"#F24E1E",role:"primary"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#000000",role:"ink"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"inverse-canvas",value:"#000000",role:"inverse canvas"},{name:"inverse-ink",value:"#ffffff",role:"inverse ink"},{name:"hairline",value:"#e6e6e6",role:"hairline"},{name:"hairline-soft",value:"#f1f1f1",role:"hairline soft"},{name:"surface-soft",value:"#f7f7f5",role:"surface soft"},{name:"block-lime",value:"#dceeb1",role:"block lime"},{name:"block-lilac",value:"#c5b0f4",role:"block lilac"},{name:"block-cream",value:"#f4ecd6",role:"block cream"},{name:"block-pink",value:"#efd4d4",role:"block pink"},{name:"block-mint",value:"#c8e6cd",role:"block mint"},{name:"block-coral",value:"#f3c9b6",role:"block coral"},{name:"block-navy",value:"#1f1d3d",role:"block navy"},{name:"accent-magenta",value:"#ff3d8b",role:"accent magenta"},{name:"semantic-success",value:"#1ea64a",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",monoFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontSizes:["18px","16px","80px","20px","12px","40px","14px","11px","26px","24px","32px","13px","10px","56px","36px"],fontWeights:["320","330","480","600","500","700"],lineHeights:["1.45","1.0","1.4","1.1","1.6","1.35","1","1.2"]},spacing:["5px","6px","8px","10px","12px","14px","16px","20px","22px","24px","28px","32px","36px","40px","44px","48px","56px","64px","96px","100px"],radii:["50px","8px","9999px","24px","6px","2px","3px"],shadows:["0 0 0 2px rgba(0,0,0,0.08)","none","0 4px 16px rgba(0,0,0,0.06)","0 12px 32px rgba(0,0,0,0.18)"]},od={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 2px rgba(0,0,0,0.08)"},header:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"12px"},trigger:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},td={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"✦",density:"comfortable",surfaceTone:"paper",cardRadius:8,pillRadius:9999,badgeRadius:4,voice:"playful-creative"},rd={metadata:Qc,theme:Zc,tokens:ed,components:od,personality:td},nd={id:"linear",label:"Linear",sourcePath:"design.md/html/linear.html",sourceTitle:"Design System Inspiration of Linear",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap"]},ad={primary:"#5e6ad2",secondary:"#828fff",success:"#27a644",warning:"#5e69d1",error:"#828fff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},ld={rawCssVars:{primary:"#5e6ad2","primary-hover":"#828fff","primary-focus":"#5e69d1","on-primary":"#ffffff",ink:"#f7f8f8","ink-muted":"#d0d6e0","ink-subtle":"#8a8f98","ink-tertiary":"#62666d",canvas:"#010102","surface-1":"#0f1011","surface-2":"#141516","surface-3":"#18191a","surface-4":"#191a1b",hairline:"#23252a","hairline-strong":"#34343a","hairline-tertiary":"#3e3e44","semantic-success":"#27a644",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",mono:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace"},colors:[{name:"primary",value:"#5e6ad2",role:"primary"},{name:"primary-hover",value:"#828fff",role:"primary hover"},{name:"primary-focus",value:"#5e69d1",role:"primary focus"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#f7f8f8",role:"ink"},{name:"ink-muted",value:"#d0d6e0",role:"ink muted"},{name:"ink-subtle",value:"#8a8f98",role:"ink subtle"},{name:"ink-tertiary",value:"#62666d",role:"ink tertiary"},{name:"canvas",value:"#08090A",role:"canvas"},{name:"surface-1",value:"#0f1011",role:"surface 1"},{name:"surface-2",value:"#141516",role:"surface 2"},{name:"surface-3",value:"#18191a",role:"surface 3"},{name:"surface-4",value:"#191a1b",role:"surface 4"},{name:"hairline",value:"#23252a",role:"hairline"},{name:"hairline-strong",value:"#34343a",role:"hairline strong"},{name:"hairline-tertiary",value:"#3e3e44",role:"hairline tertiary"},{name:"semantic-success",value:"#27a644",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",monoFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontSizes:["16px","14px","80px","18px","13px","56px","15px","12px","11px","28px","40px","22px","10px","36px"],fontWeights:["400","500","600","700"],lineHeights:["1.50","1.05","1.20","1.10","1.5","1.6","1.25","1","1.2","1.35","1.4"]},spacing:["2px","5px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","48px","56px","64px","80px","96px","120px"],radii:["8px","12px","9999px","16px","4px","2px","6px","3px"],shadows:["rgba(255,255,255,0.05) 0 0.5px 0 0.5px","0 0 0 2px rgba(94,105,209,0.25)"]},id={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-on-primary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"theme-on-primary",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",letterSpacing:"-0.025em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(255,255,255,0.05) 0 0.5px 0 0.5px"},header:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.025em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.025em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.025em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},sd={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.025em",accentTreatment:"gradient",signatureMotif:"↗",density:"tight",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"speed-clarity"},cd={metadata:nd,theme:ad,tokens:ld,components:id,personality:sd},dd={id:"nike",label:"Nike",sourcePath:"design.md/html/nike.html",sourceTitle:"Design System Inspiration of Nike",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},ud={primary:"color-black",secondary:"#FA5400",success:"#76E0B5",warning:"#1151ff",error:"#d30005",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},pd={rawCssVars:{ink:"#111111","on-primary":"#ffffff",canvas:"#ffffff","soft-cloud":"#f5f5f5",charcoal:"#39393b",ash:"#4b4b4d",mute:"#707072",stone:"#9e9ea0",hairline:"#cacacb","hairline-soft":"#e5e5e5",sale:"#d30005","sale-deep":"#780700",success:"#007d48","success-bright":"#1eaa52",info:"#1151ff","info-deep":"#0034e3","accent-pink":"#ed1aa0","accent-pink-soft":"#ffb0dd","accent-purple-soft":"#beaffd","accent-purple-pale":"#d6d1ff","accent-teal":"#0a7281","accent-pink-deep":"#4c012d","font-display":"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif","font-ui":"'Inter', 'Helvetica Now Text Medium', Helvetica, Arial, sans-serif","font-body":"'Inter', 'Helvetica Now Text', Helvetica, Arial, sans-serif"},colors:[{name:"ink",value:"#111111",role:"ink"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"soft-cloud",value:"#f5f5f5",role:"soft cloud"},{name:"charcoal",value:"#39393b",role:"charcoal"},{name:"ash",value:"#4b4b4d",role:"ash"},{name:"mute",value:"#707072",role:"mute"},{name:"stone",value:"#9e9ea0",role:"stone"},{name:"hairline",value:"#cacacb",role:"hairline"},{name:"hairline-soft",value:"#e5e5e5",role:"hairline soft"},{name:"sale",value:"#d30005",role:"sale"},{name:"sale-deep",value:"#780700",role:"sale deep"},{name:"success",value:"#76E0B5",role:"success"},{name:"success-bright",value:"#1eaa52",role:"success bright"},{name:"info",value:"#1151ff",role:"info"},{name:"info-deep",value:"#0034e3",role:"info deep"},{name:"accent-pink",value:"#ed1aa0",role:"accent pink"},{name:"accent-pink-soft",value:"#ffb0dd",role:"accent pink soft"},{name:"accent-purple-soft",value:"#beaffd",role:"accent purple soft"},{name:"accent-purple-pale",value:"#d6d1ff",role:"accent purple pale"},{name:"accent-teal",value:"#0a7281",role:"accent teal"},{name:"accent-pink-deep",value:"#4c012d",role:"accent pink deep"}],typography:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","15px","14px","96px","18px","12px","56px","13px","11px","24px","40px","64px","48px","32px"],fontWeights:["700","500","600"],lineHeights:["1.5","0.92","1","1.4","1.6","0.9","1.2","1.75","1.7","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","12px","14px","16px","18px","20px","24px","28px","30px","32px","36px","40px","44px","48px","56px"],radii:["9999px","24px","14px","6px","3px"],shadows:["0 0 0 12px var(--soft-cloud)","0 20px 30px -10px rgba(0,0,0,0.18)","0 0 0 2px var(--canvas), 0 0 0 4px var(--ink)","inset 0 -1px 0 var(--hairline-soft)"]},md={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"},content:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"italic"},text:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 12px var(--soft-cloud)"},header:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"italic"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"theme-secondary",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"theme-secondary",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"italic"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},description:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary"}}}},gd={cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"italic",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"athletic-bold"},hd={metadata:dd,theme:ud,tokens:pd,components:md,personality:gd},fd={id:"notion",label:"Notion",sourcePath:"design.md/html/notion.html",sourceTitle:"Design System Inspiration of Notion",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},yd={primary:"#5645d4",secondary:"#ff64c8",success:"#1aae39",warning:"#dd5b00",error:"#ff64c8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},xd={rawCssVars:{primary:"#5645d4","primary-pressed":"#4534b3","primary-deep":"#3a2a99","on-primary":"#ffffff","brand-navy":"#0a1530","brand-navy-deep":"#070f24","link-blue":"#0075de","brand-pink":"#ff64c8","brand-orange":"#dd5b00","brand-purple":"#7b3ff2","brand-purple-800":"#391c57","brand-orange-deep":"#793400","brand-green":"#1aae39","brand-yellow":"#f5d75e","brand-teal":"#2a9d99","tint-peach":"#ffe8d4","tint-rose":"#fde0ec","tint-mint":"#d9f3e1","tint-lavender":"#e6e0f5","tint-sky":"#dcecfa","tint-yellow":"#fef7d6","tint-yellow-bold":"#f9e79f","tint-cream":"#f8f5e8",canvas:"#ffffff",surface:"#f6f5f4","surface-soft":"#fafaf9",hairline:"#e5e3df","hairline-soft":"#ede9e4","hairline-strong":"#c8c4be","hairline-dark":"rgba(255,255,255,0.16)","ink-deep":"#000000",ink:"#1a1a1a",charcoal:"#37352f",slate:"#5d5b54",steel:"#787671",stone:"#a4a097",muted:"#bbb8b1","on-dark":"#ffffff","on-dark-muted":"#a4a097"},colors:[{name:"primary",value:"#5645d4",role:"primary"},{name:"primary-pressed",value:"#4534b3",role:"primary pressed"},{name:"primary-deep",value:"#3a2a99",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"brand-navy",value:"#0a1530",role:"brand navy"},{name:"brand-navy-deep",value:"#070f24",role:"brand navy deep"},{name:"link-blue",value:"#0075de",role:"link blue"},{name:"brand-pink",value:"#ff64c8",role:"brand pink"},{name:"brand-orange",value:"#dd5b00",role:"brand orange"},{name:"brand-purple",value:"#7b3ff2",role:"brand purple"},{name:"brand-purple-800",value:"#391c57",role:"brand purple 800"},{name:"brand-orange-deep",value:"#793400",role:"brand orange deep"},{name:"brand-green",value:"#1aae39",role:"brand green"},{name:"brand-yellow",value:"#f5d75e",role:"brand yellow"},{name:"brand-teal",value:"#2a9d99",role:"brand teal"},{name:"tint-peach",value:"#ffe8d4",role:"tint peach"},{name:"tint-rose",value:"#fde0ec",role:"tint rose"},{name:"tint-mint",value:"#d9f3e1",role:"tint mint"},{name:"tint-lavender",value:"#e6e0f5",role:"tint lavender"},{name:"tint-sky",value:"#dcecfa",role:"tint sky"},{name:"tint-yellow",value:"#fef7d6",role:"tint yellow"},{name:"tint-yellow-bold",value:"#f9e79f",role:"tint yellow bold"},{name:"tint-cream",value:"#f8f5e8",role:"tint cream"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface",value:"#f6f5f4",role:"surface"},{name:"surface-soft",value:"#fafaf9",role:"surface soft"},{name:"hairline",value:"#e5e3df",role:"hairline"},{name:"hairline-soft",value:"#ede9e4",role:"hairline soft"},{name:"hairline-strong",value:"#c8c4be",role:"hairline strong"},{name:"hairline-dark",value:"rgba(255,255,255,0.16)",role:"hairline dark"},{name:"ink-deep",value:"#000000",role:"ink deep"},{name:"ink",value:"#1a1a1a",role:"ink"},{name:"charcoal",value:"#37352f",role:"charcoal"},{name:"slate",value:"#5d5b54",role:"slate"},{name:"steel",value:"#787671",role:"steel"},{name:"stone",value:"#a4a097",role:"stone"},{name:"muted",value:"#bbb8b1",role:"muted"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-muted",value:"#a4a097",role:"on dark muted"}],typography:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","15px","12px","80px","18px","48px","16px","13px","22px","11px","56px","36px","10px","20px","28px"],fontWeights:["500","600","400","700"],lineHeights:["1.55","1","1.05","1.15","1.4","1.3","1.5","1.1","1.2","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","11px","12px","14px","15px","16px","18px","20px","24px","31px","32px","40px","44px","48px","56px"],radii:["6px","8px","16px","50%","12px","9999px","4px","3px"],shadows:["rgba(15, 15, 15, 0.20) 0px 24px 48px -8px","rgba(15,15,15,0.04) 0px 1px 2px 0px","rgba(15,15,15,0.08) 0px 4px 12px 0px","rgba(15,15,15,0.20) 0px 24px 48px -8px","rgba(15,15,15,0.16) 0px 16px 48px -8px"]},bd={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",letterSpacing:"0em",textTransform:"none",fontWeight:400,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(15, 15, 15, 0.20) 0px 24px 48px -8px"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:10},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:10},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},kd={cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"0em",accentTreatment:"flat",signatureMotif:"◇",density:"comfortable",surfaceTone:"paper",cardRadius:10,pillRadius:9999,badgeRadius:4,voice:"thoughtful-quiet"},Cd={metadata:fd,theme:yd,tokens:xd,components:bd,personality:kd},Sd={id:"revolut",label:"Revolut",sourcePath:"design.md/html/revolut.html",sourceTitle:"Design System Inspiration of Revolut",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},wd={primary:"#1361F0",secondary:"#101D31",success:"#16a34a",warning:"#d97706",error:"#e61e49",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},jd={rawCssVars:{primary:"#494fdf","primary-bright":"#4f55f1","primary-deep":"#3a40c4","on-primary":"#ffffff",ink:"#191c1f",body:"#1f2226",charcoal:"#3a3d40",mute:"#505a63",ash:"#5c5e60",stone:"#8d969e",faint:"#c9c9cd","on-dark":"#ffffff","on-dark-mute":"rgba(255,255,255,0.72)","canvas-light":"#ffffff","canvas-dark":"#000000","surface-soft":"#f4f4f4","surface-card":"#ffffff","surface-deep":"#0a0a0a","surface-elevated":"#16181a","hairline-light":"#e2e2e7","hairline-dark":"rgba(255,255,255,0.12)","hairline-strong":"#191c1f","divider-soft":"rgba(255,255,255,0.06)",teal:"#00a87e","light-blue":"#007bc2","blue-link":"#376cd5","light-green":"#428619","green-text":"#006400",yellow:"#b09000",warning:"#ec7e00",pink:"#e61e49",danger:"#e23b4a","deep-red":"#8b0000",brown:"#936d62","font-display":"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif","font-ui":"'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#1361F0",role:"primary"},{name:"primary-bright",value:"#4f55f1",role:"primary bright"},{name:"primary-deep",value:"#3a40c4",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#191c1f",role:"ink"},{name:"body",value:"#1f2226",role:"body"},{name:"charcoal",value:"#3a3d40",role:"charcoal"},{name:"mute",value:"#505a63",role:"mute"},{name:"ash",value:"#5c5e60",role:"ash"},{name:"stone",value:"#8d969e",role:"stone"},{name:"faint",value:"#c9c9cd",role:"faint"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-mute",value:"rgba(255,255,255,0.72)",role:"on dark mute"},{name:"canvas-light",value:"#ffffff",role:"canvas light"},{name:"canvas-dark",value:"#000000",role:"canvas dark"},{name:"surface-soft",value:"#f4f4f4",role:"surface soft"},{name:"surface-card",value:"#ffffff",role:"surface card"},{name:"surface-deep",value:"#0a0a0a",role:"surface deep"},{name:"surface-elevated",value:"#16181a",role:"surface elevated"},{name:"hairline-light",value:"#e2e2e7",role:"hairline light"},{name:"hairline-dark",value:"rgba(255,255,255,0.12)",role:"hairline dark"},{name:"hairline-strong",value:"#191c1f",role:"hairline strong"},{name:"divider-soft",value:"rgba(255,255,255,0.06)",role:"divider soft"},{name:"teal",value:"#00a87e",role:"teal"},{name:"light-blue",value:"#007bc2",role:"light blue"},{name:"blue-link",value:"#376cd5",role:"blue link"},{name:"light-green",value:"#428619",role:"light green"},{name:"green-text",value:"#006400",role:"green text"},{name:"yellow",value:"#b09000",role:"yellow"},{name:"warning",value:"#d97706",role:"warning"},{name:"pink",value:"#e61e49",role:"pink"},{name:"danger",value:"#e23b4a",role:"danger"},{name:"deep-red",value:"#8b0000",role:"deep red"},{name:"brown",value:"#936d62",role:"brown"}],typography:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","18px","12px","96px","56px","24px","13px","32px","11px","64px","44px"],fontWeights:["600","500","700"],lineHeights:["1.5","1.0","1.56","1.4","1.33","1.19","1.6","1.2","1.35"]},spacing:["4px","6px","8px","10px","12px","13px","14px","16px","20px","24px","27px","28px","32px","36px","40px","48px","56px","64px","80px","88px"],radii:["9999px","20px","28px","36px","24px","12px","3px"],shadows:[]},vd={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:20,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:20},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:20},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"24px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Td={cornerStyle:"pill",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"gradient",signatureMotif:"★",density:"comfortable",surfaceTone:"glass",cardRadius:20,pillRadius:9999,badgeRadius:9999,voice:"bold-fintech"},Id={metadata:Sd,theme:wd,tokens:jd,components:vd,personality:Td},Rd={id:"shopify",label:"Shopify",sourcePath:"design.md/html/shopify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},Fd={primary:"#008060",secondary:"#202223",success:"#008060",warning:"#FFC453",error:"#D72C0D",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},zd={rawCssVars:{white:"#FFFFFF",black:"#000000","neon-green":"#36F4A4",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"neon-green",value:"#36F4A4",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},Md={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"color-aloe",color:"color-white",borderColor:"color-aloe",borderRadius:6,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-muted",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-muted"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-muted",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-muted"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-muted"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},Wd={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"commerce-friendly"},Ed={metadata:Rd,theme:Fd,tokens:zd,components:Md,personality:Wd},Ad={id:"spacex",label:"SpaceX",sourcePath:"design.md/html/spaceX.html",sourceTitle:"Design System Preview: SpaceX (Light)",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Share+Tech&display=swap"]},Hd={primary:"color-black",secondary:"#a3a3a3",success:"#4ade80",warning:"#fbbf24",error:"#ef4444",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Vd={rawCssVars:{black:"#000000",spectral:"#f0f0fa","ghost-bg":"rgba(240,240,250,0.1)","ghost-border":"rgba(240,240,250,0.35)",overlay:"rgba(0,0,0,0.5)",font:"'Share Tech', Arial, Verdana, sans-serif"},colors:[{name:"black",value:"#000000",role:"black"},{name:"spectral",value:"#f0f0fa",role:"spectral"},{name:"ghost-bg",value:"rgba(240,240,250,0.1)",role:"ghost bg"},{name:"ghost-border",value:"rgba(240,240,250,0.35)",role:"ghost border"},{name:"overlay",value:"rgba(0,0,0,0.5)",role:"overlay"}],typography:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","13px","12px","48px","10px","32px","11px","9px","14px"],fontWeights:["700","400","600"],lineHeights:["1.50","1.00","1.70","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","18px","20px","24px","28px","32px","48px","60px","64px","72px","80px","120px"],radii:["32px","4px","2px","3px"],shadows:[]},Pd={button:{config:{variants:{ghost:{backgroundColor:"color-gray-50",borderColor:"color-gray-200"}}},variant:"ghost",size:"md",shape:"square",color:"theme-primary",textColor:"theme-primary",views:{container:{borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",color:"color-white",borderColor:"color-gray-50",borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.06em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-200"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-200",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"32px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},content:{color:"color-gray-200"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:2},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-200",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.06em",fontStyle:"normal"},caption:{color:"color-gray-200",fontStyle:"italic",letterSpacing:"0.06em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:2},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-200"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},eyebrow:{color:"color-gray-200"},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},description:{color:"color-gray-200"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},Dd={cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.06em",accentTreatment:"glow",signatureMotif:"⚡",density:"tight",surfaceTone:"mono",cardRadius:2,pillRadius:0,badgeRadius:0,voice:"technical-mission"},$d={metadata:Ad,theme:Hd,tokens:Vd,components:Pd,personality:Dd},Ld={id:"spotify",label:"Spotify",sourcePath:"design.md/html/spotify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},Bd={primary:"#1DB954",secondary:"#C1FBD4",success:"#1DB954",warning:"#D4F9E0",error:"#D4D4D8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#000000"},_d={rawCssVars:{white:"#FFFFFF",black:"#000000","spotify-green":"#1DB954",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"spotify-green",value:"#1DB954",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},Od={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Nd={cornerStyle:"pill",typeWeight:"black",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"matte",cardRadius:8,pillRadius:9999,badgeRadius:9999,voice:"rhythmic-vibrant"},qd={metadata:Ld,theme:Bd,tokens:_d,components:Od,personality:Nd},Ud={id:"stripe",label:"Stripe",sourcePath:"design.md/html/stripe.html",sourceTitle:"Design System Preview: Stripe (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500;700&display=swap"]},Gd={primary:"#635BFF",secondary:"#f96bee",success:"#15be53",warning:"#9b6829",error:"#ea2261",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Yd={rawCssVars:{purple:"#533afd","purple-hover":"#4434d4","purple-deep":"#2e2b8c","purple-light":"#b9b9f9","purple-mid":"#665efd",navy:"#061b31","dark-navy":"#0d253d","brand-dark":"#1c1e54",white:"#ffffff",ruby:"#ea2261",magenta:"#f96bee","magenta-light":"#ffd7ef",success:"#15be53","success-text":"#108c3d",lemon:"#9b6829",slate:"#64748d","dark-slate":"#273951",border:"#e5edf5","border-purple":"#b9b9f9","border-soft":"#d6d9fc","shadow-blue":"rgba(50,50,93,0.25)","shadow-dark-blue":"rgba(3,3,39,0.25)","shadow-black":"rgba(0,0,0,0.1)","shadow-ambient":"rgba(23,23,23,0.08)","shadow-soft":"rgba(23,23,23,0.06)","shadow-card":"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","shadow-ambient-card":"rgba(23,23,23,0.08) 0px 15px 35px 0px","shadow-subtle":"rgba(23,23,23,0.06) 0px 3px 6px 0px","font-primary":"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif","font-mono":"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace"},colors:[{name:"purple",value:"#533afd",role:"purple"},{name:"purple-hover",value:"#4434d4",role:"purple hover"},{name:"purple-deep",value:"#2e2b8c",role:"purple deep"},{name:"purple-light",value:"#b9b9f9",role:"purple light"},{name:"purple-mid",value:"#665efd",role:"purple mid"},{name:"navy",value:"#061b31",role:"navy"},{name:"dark-navy",value:"#0d253d",role:"dark navy"},{name:"brand-dark",value:"#1c1e54",role:"brand dark"},{name:"white",value:"#ffffff",role:"white"},{name:"ruby",value:"#ea2261",role:"ruby"},{name:"magenta",value:"#f96bee",role:"magenta"},{name:"magenta-light",value:"#ffd7ef",role:"magenta light"},{name:"success",value:"#15be53",role:"success"},{name:"success-text",value:"#108c3d",role:"success text"},{name:"lemon",value:"#9b6829",role:"lemon"},{name:"slate",value:"#64748d",role:"slate"},{name:"dark-slate",value:"#273951",role:"dark slate"},{name:"border",value:"#e5edf5",role:"border"},{name:"border-purple",value:"#b9b9f9",role:"border purple"},{name:"border-soft",value:"#d6d9fc",role:"border soft"},{name:"shadow-blue",value:"rgba(50,50,93,0.25)",role:"shadow blue"},{name:"shadow-dark-blue",value:"rgba(3,3,39,0.25)",role:"shadow dark blue"},{name:"shadow-black",value:"rgba(0,0,0,0.1)",role:"shadow black"},{name:"shadow-ambient",value:"rgba(23,23,23,0.08)",role:"shadow ambient"},{name:"shadow-soft",value:"rgba(23,23,23,0.06)",role:"shadow soft"},{name:"shadow-card",value:"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px",role:"shadow card"},{name:"shadow-ambient-card",value:"rgba(23,23,23,0.08) 0px 15px 35px 0px",role:"shadow ambient card"},{name:"shadow-subtle",value:"rgba(23,23,23,0.06) 0px 3px 6px 0px",role:"shadow subtle"}],typography:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",monoFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontSizes:["16px","14px","48px","18px","12px","32px","13px","11px","10px","22px"],fontWeights:["100 900","300","400","500","700","600"],lineHeights:["1.40","1.15","1.10","1.50","1.2","1.35","1.4"]},spacing:["1px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["0 0 6px 6px","4px","6px","2px","3px"],shadows:["rgba(50,50,93,0.25)","rgba(3,3,39,0.25)","rgba(0,0,0,0.1)","rgba(23,23,23,0.08)","rgba(23,23,23,0.06)","rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","rgba(23,23,23,0.08) 0px 15px 35px 0px","rgba(23,23,23,0.06) 0px 3px 6px 0px","var(--shadow-subtle)","var(--shadow-card)","0 0 0 1px theme-primary","0 0 0 1px var(--ruby)"]},Kd={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(23,23,23,0.06) 0px 3px 6px 0px"},header:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"6px"},trigger:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},Xd={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"gradient",signatureMotif:"↗",density:"comfortable",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"refined-fintech"},Jd={metadata:Ud,theme:Gd,tokens:Yd,components:Kd,personality:Xd},Qd={id:"tesla",label:"Tesla",sourcePath:"design.md/html/tesla.html",sourceTitle:"Design System Inspired by Tesla",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"]},Zd={primary:"#3E6AE1",secondary:"#171A20",success:"#3E6AE1",warning:"#5C5E62",error:"#171A20",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},eu={rawCssVars:{"electric-blue":"#3E6AE1","pure-white":"#FFFFFF","carbon-dark":"#171A20",graphite:"#393C41",pewter:"#5C5E62","silver-fog":"#8E8E8E","cloud-gray":"#EEEEEE","pale-silver":"#D0D1D2","light-ash":"#F4F4F4","frosted-glass":"rgba(255,255,255,0.75)",overlay:"rgba(128,128,128,0.65)","subtle-shadow":"rgba(0,0,0,0.05)","font-display":"'Inter', -apple-system, Arial, sans-serif","font-text":"'Inter', -apple-system, Arial, sans-serif"},colors:[{name:"electric-blue",value:"#3E6AE1",role:"electric blue"},{name:"pure-white",value:"#FFFFFF",role:"pure white"},{name:"carbon-dark",value:"#171A20",role:"carbon dark"},{name:"graphite",value:"#393C41",role:"graphite"},{name:"pewter",value:"#5C5E62",role:"pewter"},{name:"silver-fog",value:"#8E8E8E",role:"silver fog"},{name:"cloud-gray",value:"#EEEEEE",role:"cloud gray"},{name:"pale-silver",value:"#D0D1D2",role:"pale silver"},{name:"light-ash",value:"#F4F4F4",role:"light ash"},{name:"frosted-glass",value:"rgba(255,255,255,0.75)",role:"frosted glass"},{name:"overlay",value:"rgba(128,128,128,0.65)",role:"overlay"},{name:"subtle-shadow",value:"rgba(0,0,0,0.05)",role:"subtle shadow"}],typography:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","40px","28px","13px","12px","11px","17px","16px"],fontWeights:["400","500","700","600"],lineHeights:["1.43","48px","20px","1.2","1.3","36px","1.35","1.4"]},spacing:["4px","6px","8px","10px","12px","14px","16px","20px","24px","32px","40px","48px","56px","60px","64px","80px","100px"],radii:["4px","4px 4px 0 0","0 0 4px 4px","12px","3px"],shadows:["rgba(0,0,0,0.05)","0 1px 0 var(--pewter)"]},ou={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:0,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.05)"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"theme-warning"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"theme-warning",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, Arial, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:0},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},content:{color:"theme-warning"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:0},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"theme-warning",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"normal"},caption:{color:"theme-warning",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:0},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"4px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:0},item:{color:"theme-warning"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},eyebrow:{color:"theme-warning"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},description:{color:"theme-warning"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},tu={cornerStyle:"sharp",typeWeight:"light",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▲",density:"spacious",surfaceTone:"mono",cardRadius:0,pillRadius:0,badgeRadius:0,voice:"futurist-clean"},ru={metadata:Qd,theme:Zd,tokens:eu,components:ou,personality:tu},nu={id:"uber",label:"Uber",sourcePath:"design.md/html/uber.html",sourceTitle:"Design System Preview: Uber (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700&display=swap"]},au={primary:"color-black",secondary:"#efefef",success:"#06C167",warning:"#e2e2e2",error:"#000000",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},lu={rawCssVars:{"color-black":"#000000","color-white":"#ffffff","color-hover-gray":"#e2e2e2","color-hover-light":"#f3f3f3","color-chip-gray":"#efefef","color-body-gray":"#4b4b4b","color-muted-gray":"#afafaf","shadow-card":"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","shadow-medium":"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","shadow-float":"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","shadow-press":"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","font-display":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","font-body":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","bg-page":"#ffffff","bg-card":"#ffffff","bg-nav":"rgba(255,255,255,0.92)","text-primary":"#000000","text-secondary":"#4b4b4b","text-tertiary":"#afafaf","border-color":"#efefef","section-label-color":"#000000"},colors:[{name:"color-black",value:"#000000",role:"color black"},{name:"color-white",value:"#ffffff",role:"color white"},{name:"color-hover-gray",value:"#e2e2e2",role:"color hover gray"},{name:"color-hover-light",value:"#f3f3f3",role:"color hover light"},{name:"color-chip-gray",value:"#efefef",role:"color chip gray"},{name:"color-body-gray",value:"#4b4b4b",role:"color body gray"},{name:"color-muted-gray",value:"#afafaf",role:"color muted gray"},{name:"shadow-card",value:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px",role:"shadow card"},{name:"shadow-medium",value:"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px",role:"shadow medium"},{name:"shadow-float",value:"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px",role:"shadow float"},{name:"shadow-press",value:"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset",role:"shadow press"},{name:"bg-page",value:"#ffffff",role:"bg page"},{name:"bg-card",value:"#ffffff",role:"bg card"},{name:"bg-nav",value:"rgba(255,255,255,0.92)",role:"bg nav"},{name:"text-primary",value:"#000000",role:"text primary"},{name:"text-secondary",value:"#4b4b4b",role:"text secondary"},{name:"text-tertiary",value:"#afafaf",role:"text tertiary"},{name:"border-color",value:"#efefef",role:"border color"},{name:"section-label-color",value:"#000000",role:"section label color"}],typography:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","18px","14px","64px","20px","12px","36px","13px","24px","28px"],fontWeights:["700","500","400","600"],lineHeights:["1.50","1.10","1.22","1.33","2.0","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","50px","60px","64px","80px","100px","120px","140px"],radii:["8px","999px","12px","16px","4px","3px"],shadows:["rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","var(--shadow-card)","var(--shadow-float)","var(--shadow-medium)","0 0 0 1px color-black","rgba(0,0,0,0.12) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 2px 8px 0px","rgba(0,0,0,0.08) 0px 0px 0px 999px inset"]},iu={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px"},header:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"theme-warning"},content:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-warning"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"theme-warning",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-warning",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-warning"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"theme-warning"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-warning"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-warning",backgroundColor:"color-white",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"theme-warning",borderRadius:4},thead:{backgroundColor:"color-white",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"theme-warning",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-warning"},td:{color:"theme-primary",borderColor:"theme-warning",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",borderRadius:4},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-warning",radius:"8px",views:{container:{backgroundColor:"theme-warning",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-warning",views:{container:{borderColor:"theme-warning"},label:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"theme-warning"},surface:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary"}}}},su={cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"motion-utility"},cu={metadata:nu,theme:au,tokens:lu,components:iu,personality:su},du={id:"vercel",label:"Vercel",sourcePath:"design.md/html/vercel.html",sourceTitle:"Design System Preview: Vercel (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap"]},uu={primary:"color-black",secondary:"#0072f5",success:"#0a72ef",warning:"#de1d8d",error:"#ff5b4f",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},pu={rawCssVars:{black:"#171717",white:"#ffffff","gray-50":"#fafafa","gray-100":"#ebebeb","gray-400":"#808080","gray-500":"#666666","gray-600":"#4d4d4d","link-blue":"#0072f5","focus-blue":"hsl(212,100%,48%)","ship-red":"#ff5b4f","preview-pink":"#de1d8d","develop-blue":"#0a72ef","console-blue":"#0070f3","console-purple":"#7928ca","console-pink":"#eb367f","badge-bg":"#ebf5ff","badge-text":"#0068d6","shadow-ring":"rgba(0,0,0,0.08) 0px 0px 0px 1px","shadow-ring-light":"rgb(235,235,235) 0px 0px 0px 1px","shadow-subtle":"rgba(0,0,0,0.04) 0px 2px 2px 0px","shadow-card":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","shadow-card-full":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","font-sans":"'Geist', system-ui, -apple-system, Arial, sans-serif","font-mono":"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace"},colors:[{name:"black",value:"#171717",role:"black"},{name:"white",value:"#ffffff",role:"white"},{name:"gray-50",value:"#fafafa",role:"gray 50"},{name:"gray-100",value:"#ebebeb",role:"gray 100"},{name:"gray-400",value:"#808080",role:"gray 400"},{name:"gray-500",value:"#666666",role:"gray 500"},{name:"gray-600",value:"#4d4d4d",role:"gray 600"},{name:"link-blue",value:"#0072f5",role:"link blue"},{name:"focus-blue",value:"hsl(212,100%,48%)",role:"focus blue"},{name:"ship-red",value:"#ff5b4f",role:"ship red"},{name:"preview-pink",value:"#de1d8d",role:"preview pink"},{name:"develop-blue",value:"#0a72ef",role:"develop blue"},{name:"console-blue",value:"#0070f3",role:"console blue"},{name:"console-purple",value:"#7928ca",role:"console purple"},{name:"console-pink",value:"#eb367f",role:"console pink"},{name:"badge-bg",value:"#ebf5ff",role:"badge bg"},{name:"badge-text",value:"#0068d6",role:"badge text"},{name:"shadow-ring",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px",role:"shadow ring"},{name:"shadow-ring-light",value:"rgb(235,235,235) 0px 0px 0px 1px",role:"shadow ring light"},{name:"shadow-subtle",value:"rgba(0,0,0,0.04) 0px 2px 2px 0px",role:"shadow subtle"},{name:"shadow-card",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card"},{name:"shadow-card-full",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card full"}],typography:{fontFamily:"var(--font-sans)",monoFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontSizes:["16px","14px","48px","20px","12px","32px","13px","11px","10px","36px"],fontWeights:["400","600","500","700"],lineHeights:["1.50","1.00","1.80","1.25","1.2","1.35","1.4"]},spacing:["2px","4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["6px","8px","9999px","3px"],shadows:["rgba(0,0,0,0.08) 0px 0px 0px 1px","rgb(235,235,235) 0px 0px 0px 1px","rgba(0,0,0,0.04) 0px 2px 2px 0px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","var(--shadow-ring)","var(--shadow-ring-light)","var(--shadow-card)","var(--shadow-card-full)","0 0 0 2px var(--focus-blue)","0 0 0 2px var(--ship-red)"]},mu={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:4,fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"var(--font-sans)",letterSpacing:"-0.04em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"var(--font-sans)",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},header:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"var(--font-sans)"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.04em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"var(--font-sans)"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"6px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"6px"},trigger:{color:"theme-primary",fontFamily:"var(--font-sans)"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.04em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.04em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"var(--font-sans)"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"var(--font-sans)"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"var(--font-sans)"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},gu={cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.04em",accentTreatment:"flat",signatureMotif:"▲",density:"comfortable",surfaceTone:"mono",cardRadius:4,pillRadius:4,badgeRadius:4,voice:"deploy-geometric"},hu={metadata:du,theme:uu,tokens:pu,components:mu,personality:gu},mn={airbnb:$c,apple:qc,coinbase:Jc,figma:rd,linear:cd,nike:hd,notion:Cd,revolut:Id,shopify:Ed,spacex:$d,spotify:qd,stripe:Jd,tesla:ru,uber:cu,vercel:hu},fu=Object.values(mn),cl=Ec,No=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",gn=e=>e,Ke=(...e)=>{const o={};return e.forEach(r=>{No(r)&&Object.entries(r).forEach(([n,a])=>{if(a!=null){if(No(a)&&No(o[n])){o[n]=Ke(o[n],a);return}o[n]=a}})}),o},dl=e=>{if(Array.isArray(e)||!No(e))return e;const o={};for(const[r,n]of Object.entries(e))n!==null&&(o[r]=No(n)?dl(n):n);return o},yu=new Set(["button"]),xu=["backgroundColor","background","borderColor","color"],oa=new Set,bu=(e,o)=>{if(process.env.NODE_ENV!=="production"&&!(!o||!yu.has(e))&&!oa.has(e))for(const[r,n]of Object.entries(o)){if(!No(n))continue;const a=xu.filter(l=>n[l]!=null);if(a.length>0){oa.add(e),console.warn(`[design-system] components.${e}.views.${r} sets ${a.join(", ")} — view styles apply above every variant, so this flattens ghost/outline/subtle into solid blocks. Move colors to components.${e}.config.variants.<variant> (merged under each variant); keep views to shape and typography.`);return}}},hn=(e,o)=>{if(!o)return{};const r=o.components[e]||{},n=gn(dl(r));return bu(e,n.views),n},ul=(e,o,r)=>{const{config:n,...a}=o,l=hn(e,r),i=Ke(l,n||{});return gn(Ke(i,a))},pl=m.createContext({isEnabled:!1}),fn=({children:e,config:o,configId:r,mode:n})=>{const a=o||(r?mn[r]:null)||cl,{themeMode:l}=s.useTheme(),i=n??l??a.metadata.defaultAppearance,u=m.useMemo(()=>({config:a,configId:a.metadata.id,isEnabled:!0}),[a]);return t.jsx(pl.Provider,{value:u,children:t.jsx(s.ThemeProvider,{theme:a.theme,mode:i,transparentWrapper:!0,children:t.jsx("div",{"data-design-system":a.metadata.id,"data-appearance":i,style:{display:"contents"},children:e})})})},cr=()=>m.useContext(pl),Zo=e=>{const{config:o}=cr();return hn(e,o)},ve=(e,o)=>{const{config:r}=cr();return ul(e,o,r)},ml=m.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),ku=({children:e,value:o})=>t.jsx(ml.Provider,{value:o,children:e}),gl=()=>{const e=m.useContext(ml);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},Cu=({value:e,children:o,isDisabled:r=!1,views:n,...a})=>{var h;const{isItemExpanded:l,baseId:i}=gl(),u=Zo("accordion"),c=Ke({item:(h=u.views)==null?void 0:h.container},n),d=l(e),g=`${i}-trigger-${e}`,p=`${i}-content-${e}`;return t.jsx(s.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:r?.5:1,pointerEvents:r?"none":"auto","data-state":d?"open":"closed","data-disabled":r?"":void 0,...c==null?void 0:c.item,...a,children:m.Children.map(o,f=>m.isValidElement(f)?m.cloneElement(f,{...f.props,value:e,isExpanded:d,isDisabled:r,triggerId:g,contentId:p}):f)})},Su=({children:e,value:o,isExpanded:r,isDisabled:n,triggerId:a,contentId:l,views:i,asChild:u=!1,...c})=>{var y;const{toggleItem:d}=gl(),g=Zo("accordion"),p=Ke({container:(y=g.views)==null?void 0:y.trigger},i),f={id:a,"aria-expanded":r,"aria-controls":l,"aria-disabled":n,"data-state":r?"open":"closed","data-disabled":n?"":void 0,onClick:()=>{o&&!n&&d(o)},padding:16,cursor:n?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...p==null?void 0:p.container,...c};if(u&&m.isValidElement(e)){const b=m.Children.only(e);return m.cloneElement(b,{...f,...b.props})}return t.jsxs(s.Horizontal,{...f,children:[e,t.jsx(s.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:r?"rotate(180deg)":"rotate(0deg)",...p==null?void 0:p.icon,children:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},wu=({children:e,isExpanded:o,isDisabled:r,triggerId:n,contentId:a,views:l,...i})=>{var k;const u=Zo("accordion"),c=Ke({container:(k=u.views)==null?void 0:k.content},l),d=260,g=m.useRef(null),p=m.useRef(null),[h,f]=m.useState(!!o),[y,b]=m.useState(o?"none":"0px"),[x,C]=m.useState(o?1:0);return m.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]),m.useEffect(()=>{var v;if(p.current&&(clearTimeout(p.current),p.current=null),o){f(!0),requestAnimationFrame(()=>{var I;const S=((I=g.current)==null?void 0:I.scrollHeight)??0;b(`${S}px`),C(1)});return}const w=((v=g.current)==null?void 0:v.scrollHeight)??0;b(`${w}px`),C(1),requestAnimationFrame(()=>{b("0px"),C(0)}),p.current=setTimeout(()=>{f(!1)},d)},[o,e]),m.useEffect(()=>{var v;if(!o||!h)return;const w=((v=g.current)==null?void 0:v.scrollHeight)??0;b(`${w}px`)},[e,o,h]),h?t.jsx(s.View,{id:a,role:"region","aria-labelledby":n,overflow:"hidden",maxHeight:y,opacity:x,transition:`max-height ${d}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${d}ms ease`,"data-state":o?"open":"closed","data-disabled":r?"":void 0,style:{backgroundColor:"transparent"},...c==null?void 0:c.container,...i,children:t.jsx(s.View,{ref:g,padding:16,children:e})}):null},ju=({children:e,shape:o="rounded",variant:r="default",views:n,baseId:a,type:l,collapsible:i,themeMode:u,...c})=>t.jsx(s.Vertical,{width:"100%","data-orientation":"vertical",...Tc[o],...Ic[r],...n==null?void 0:n.container,...c,children:e}),vu=e=>{const o=ve("accordion",e),{children:r,type:n="single",value:a,defaultValue:l,onValueChange:i,collapsible:u=!1,shape:c="rounded",variant:d="default",views:g,...p}=o,h=Array.isArray(l)?l:l?[l]:void 0,f=vc({type:n,value:a,defaultValue:l??h,onValueChange:i,collapsible:u});return t.jsx(ku,{value:{expandedItems:f.expandedItems,toggleItem:f.toggleItem,isItemExpanded:f.isItemExpanded,type:f.type,collapsible:f.collapsible,baseId:f.baseId},children:t.jsx(ju,{shape:c,variant:d,views:g,baseId:f.baseId,type:f.type,collapsible:f.collapsible,...p,children:r})})},Oe=vu;Oe.Item=Cu;Oe.Trigger=Su;Oe.Content=wu;const Tu=({isOpen:e,defaultOpen:o=!1,value:r,defaultValue:n,isMulti:a=!1,onOpenChange:l,onClose:i})=>{const u=typeof e=="boolean",c=r!==void 0,d=n??(a?[]:""),[g,p]=m.useState(o),[h,f]=m.useState(d),y=u?!!e:g,b=c?r:h,x=m.useCallback(w=>{u||p(w),l==null||l(w),w||i==null||i()},[u,i,l]),C=m.useCallback(()=>{x(!1)},[x]),k=m.useCallback(w=>{c||f(w)},[c]);return{isSheetOpen:y,selectedValue:b,setSelectedValue:k,closeSheet:C}},Ct=({children:e,containerId:o="portal-root"})=>{const[r,n]=m.useState(null);return m.useEffect(()=>{let a=document.getElementById(o),l=!1;return a||(l=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{l&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),r?jc.createPortal(e,r):null},Ir=new Map,Iu=(e,o,r)=>(Ir.has(e)||Ir.set(e,m.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>t.jsx(t.Fragment,{children:o||r})}}))),Ir.get(e)),ta=m.memo(({widthHeight:e,color:o="currentColor",transform:r,orientation:n="up",children:a,...l})=>t.jsx(s.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:r||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...l,children:a})),bt=m.memo(({name:e="circle",widthHeight:o=24,color:r="currentColor",filled:n=!1,strokeWidth:a=1,size:l,children:i,fallback:u,...c})=>{const{getColor:d}=s.useTheme(),g=l||o,p=m.useMemo(()=>{const y=d(r);return{fill:n?y:"none",stroke:y,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,r,a,d]);if(!e)return t.jsx(ta,{widthHeight:o,color:r,...c,children:i});const h=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),f=Iu(h,u,i);return t.jsx(ta,{widthHeight:g,color:r,...c,children:t.jsx(m.Suspense,{fallback:u||null,children:t.jsx(f,{size:g,...p})})})}),Z=(e,o={})=>{const r=n=>t.jsx(bt,{name:e,...o,...n});return r.displayName=`${e}Icon`,r},Ru=Z("user",{filled:!1}),Fu=Z("circle-help",{filled:!1}),zu=Z("folder",{filled:!1}),Se=Z("chevron-up",{filled:!1}),hl=Z("grip-vertical",{filled:!1}),ko=Z("file",{filled:!1}),Mu=Z("video",{filled:!1}),Wu=Z("image",{filled:!1}),Yo=Z("volume",{filled:!1}),Eu=Z("twitter",{filled:!1}),Au=Z("x",{filled:!1}),Hu=Z("twitch",{filled:!1}),$e=Z("x",{filled:!1,strokeWidth:2}),Vu=Z("instagram",{filled:!1}),Pu=Z("youtube",{filled:!1}),Du=Z("facebook",{filled:!1}),$u=Z("linkedin",{filled:!1}),Lu=Z("at-sign",{filled:!1}),fl=Z("minus",{filled:!1}),io=Z("info",{filled:!1}),yl=Z("play",{filled:!1}),Bu=Z("pause",{filled:!1}),_u=Z("heart",{filled:!1}),Ou=Z("star",{filled:!1}),Nu=Z("save",{filled:!1}),yn=Z("triangle-alert",{filled:!1}),qu=Z("battery",{filled:!1}),Uu=Z("bookmark",{filled:!1}),Gu=Z("cloud",{filled:!1}),Yu=Z("copy",{filled:!1}),dr=Z("trash",{filled:!1}),Ku=dr,Xu=Z("edit",{filled:!1}),xn=Z("mic",{filled:!1}),ur=Z("square",{filled:!1}),bn=Z("send",{filled:!1}),kn=Z("loader",{filled:!1}),St=Z("paperclip",{filled:!1}),Qt=Z("search",{filled:!1}),Ju=Z("home",{filled:!1}),xl=Z("settings",{filled:!1}),Qu=Z("download",{filled:!1}),bl=Z("share",{filled:!1}),wt=Z("check",{filled:!1}),Zu=Z("plus",{filled:!1}),Cn=Z("eye-off",{filled:!1}),Sn=Z("eye",{filled:!1}),ep=Z("lock",{filled:!1}),op=Z("user",{filled:!1}),kl=Z("external-link",{filled:!1}),wn=Z("check-circle",{filled:!1}),pr=Z("alert-circle",{filled:!1}),tp=Z("bell",{filled:!1}),rp=Z("file-text",{filled:!1}),np=Z("bar-chart",{filled:!1}),ap=Z("moon",{filled:!1}),Cl=Z("panel-left",{filled:!1}),jn=Z("upload",{filled:!1}),lp=wt,ip=e=>t.jsx(Se,{orientation:"left",...e}),sp=Z("zoom-out",{filled:!1}),cp=Z("type",{filled:!1}),dp=Z("shapes",{filled:!1}),up=Z("rotate-cw",{filled:!1}),pp=Z("gift",{filled:!1}),mp=Z("shield",{filled:!1}),gp=Z("log-out",{filled:!1}),hp=Z("power",{filled:!1}),fp=Z("link",{filled:!1}),yp=Z("layout",{filled:!1}),xp=Z("zap",{filled:!1}),bp=Z("credit-card",{filled:!1}),kp=Z("more-horizontal",{filled:!1}),Cp=dr,Sp=Z("filter",{filled:!1}),wp=Z("calendar",{filled:!1}),jp=Z("clock",{filled:!1}),vp=Z("map-pin",{filled:!1}),Tp=Z("menu",{filled:!1}),Ip=Z("refresh-cw",{filled:!1}),Rp=Z("printer",{filled:!1}),Fp=Z("wand",{filled:!1}),zp=Z("thumbs-down",{filled:!1}),Mp=Z("thumbs-up",{filled:!1}),Wp=Z("camera",{filled:!1}),Ep=Z("bluetooth",{filled:!1}),Ap=Z("unlock",{filled:!1}),Hp=Z("wifi",{filled:!1}),Vp=Z("arrow-right",{filled:!1}),Pp=Z("arrow-up",{filled:!1}),Dp=Z("loader",{filled:!1}),$p=Z("sliders-horizontal",{filled:!1}),Lp=Z("crop",{filled:!1}),Bp=Z("zoom-in",{filled:!1}),_p=Z("grip-horizontal",{filled:!1}),Sl=Z("mouse-pointer-2",{filled:!1}),Op={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},Wo={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},ra=(e,o)=>e.id??e.value??`action-sheet-item-${o}`,wl=e=>e.value??e.id,na=e=>e.disabled||e.isDisabled||e.divider,Np=(e,o)=>{if(typeof e.selected=="boolean")return e.selected;const r=wl(e);return r?Array.isArray(o)?o.includes(r):o===r:!1},qp=({isSheetOpen:e,closeSheet:o,selectedValue:r,setSelectedValue:n,isClosePrevented:a=!1,dismissOnBackdropPress:l=!0,title:i,description:u,header:c,children:d,items:g=[],isMulti:p=!1,closeOnSelect:h,onSelect:f,onChange:y,showCancel:b=!1,cancelLabel:x="Cancel",onCancel:C,showHandle:k=!0,size:w="md",maxHeight:v="88vh",views:S,animationType:I,...j})=>{if(!e)return null;const R=()=>{a||o()},z=()=>{l&&R()},E=()=>{C==null||C(),R()},W=F=>{var A;if(na(F))return;const T=wl(F);let M=r;if(T){if(p){const H=Array.isArray(r)?r:r?[r]:[];M=H.includes(T)?H.filter(L=>L!==T):[...H,T]}else M=T;n(M),f==null||f(T,F),y==null||y(M,F)}(A=F.onPress)==null||A.call(F,F),(F.closeOnSelect??h??!p)&&R()};return t.jsx(Ct,{children:t.jsx(s.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-dark-50-360",display:"flex",justifyContent:"flex-end",onClick:z,...S==null?void 0:S.overlay,children:t.jsxs(s.Vertical,{width:"100%",maxWidth:520,maxHeight:v,marginHorizontal:"auto",backgroundColor:"color-white",borderTopLeftRadius:24,borderTopRightRadius:24,paddingTop:8,paddingBottom:12,overflow:"hidden",boxShadow:"0 -18px 48px rgba(15, 23, 42, 0.18)",onClick:F=>F.stopPropagation(),...S==null?void 0:S.container,...S==null?void 0:S.sheet,...j,children:[k&&t.jsx(s.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...S==null?void 0:S.handle}),(i||u)&&t.jsxs(s.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...S==null?void 0:S.header,children:[i&&t.jsx(s.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...S==null?void 0:S.title,children:i}),u&&t.jsx(s.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...S==null?void 0:S.description,children:u})]}),c,t.jsxs(s.Vertical,{overflowY:"auto",paddingBottom:4,...S==null?void 0:S.content,children:[g.map((F,T)=>{if(F.divider)return t.jsx(s.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...S==null?void 0:S.divider},ra(F,T));const M=Np(F,r),V=na(F),A=V?"color-gray-400":F.destructive?"color-red-600":M?"theme-primary":"color-gray-900";return t.jsxs(s.Horizontal,{alignItems:"center",gap:12,opacity:V?.5:1,cursor:V?"not-allowed":"pointer",onClick:()=>W(F),...Op[w],...S==null?void 0:S.item,children:[F.icon&&t.jsx(s.View,{flexShrink:0,...S==null?void 0:S.itemIcon,children:F.icon}),t.jsxs(s.Vertical,{flex:1,gap:2,children:[typeof F.label=="string"?t.jsx(s.Text,{fontSize:Wo[w].label,lineHeight:Wo[w].label+6,fontWeight:M?"600":"400",color:A,...S==null?void 0:S.itemLabel,children:F.label}):F.label,F.description&&t.jsx(s.Text,{fontSize:Wo[w].description,lineHeight:Wo[w].description+5,color:"color-gray-500",...S==null?void 0:S.itemDescription,children:F.description})]}),M&&t.jsx(wt,{widthHeight:18,color:"theme-primary",...S==null?void 0:S.itemIndicator})]},ra(F,T))}),d]}),b&&t.jsx(s.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:t.jsx(s.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:E,...S==null?void 0:S.cancelButton,children:t.jsx(s.Text,{fontSize:Wo[w].label,lineHeight:Wo[w].label+6,fontWeight:"600",color:"color-gray-900",...S==null?void 0:S.cancelLabel,children:x})})})]})})})},Up=e=>{const o=Tu(e);return t.jsx(qp,{...e,...o})},Gp=Up,Yp=e=>{const o=e==="dark";return{default:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",boxShadow:o?"0 1px 3px rgba(0, 0, 0, 0.3)":"0 1px 2px rgba(0, 0, 0, 0.05)"},content:{color:"color-gray-700"},icon:{color:"color-gray-500"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:o?"0 1px 3px rgba(29, 78, 216, 0.25)":"0 1px 2px rgba(59, 130, 246, 0.05)"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",borderColor:"color-green-200",boxShadow:o?"0 1px 3px rgba(34, 197, 94, 0.2)":"0 1px 2px rgba(34, 197, 94, 0.05)"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},error:{container:{backgroundColor:"color-red-50",borderColor:"color-red-200",boxShadow:o?"0 1px 3px rgba(239, 68, 68, 0.2)":"0 1px 2px rgba(239, 68, 68, 0.05)"},content:{color:"color-red-700"},icon:{color:"color-red-500"}},warning:{container:{backgroundColor:"color-orange-50",borderColor:"color-orange-200",boxShadow:o?"0 1px 3px rgba(249, 115, 22, 0.2)":"0 1px 2px rgba(249, 115, 22, 0.05)"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}}}},Kp={default:"alert",info:"status",success:"status",error:"alert",warning:"alert"},Xp=m.memo(({icon:e,title:o="",views:r,description:n="",variant:a="default",themeMode:l,children:i,...u})=>{const{themeMode:c}=s.useTheme(),d=l||c,g=m.useMemo(()=>Yp(d),[d]),p=()=>{var y;if(e)return e;const f={size:20,color:((y=r==null?void 0:r.icon)==null?void 0:y.color)??g[a].icon.color};switch(a){case"info":return t.jsx(io,{...f});case"success":return t.jsx(wn,{...f});case"error":return t.jsx(pr,{...f});case"warning":default:return t.jsx(yn,{...f})}};return t.jsxs(s.Horizontal,{role:Kp[a],gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:g[a].container.borderColor,backgroundColor:g[a].container.backgroundColor,boxShadow:g[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...r==null?void 0:r.container,...u,children:[t.jsx(s.View,{alignSelf:"flex-start",marginTop:"2px",...r==null?void 0:r.icon,children:p()}),t.jsxs(s.Vertical,{gap:4,children:[o?t.jsx(s.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:g[a].content.color,...r==null?void 0:r.title,children:o}):null,t.jsx(s.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:g[a].content.color,...r==null?void 0:r.description,children:n||i})]})]})}),Jp=e=>{const o=ve("alert",e);return t.jsx(Xp,{...o})},vn=Jp,Qp=({ratio:e=16/9,children:o,views:r,...n})=>t.jsx(s.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...r==null?void 0:r.center,children:t.jsx(s.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...r==null?void 0:r.view,children:o})}),Zp=({ratio:e,children:o,...r})=>t.jsx(Qp,{ratio:e,...r,children:o}),jl=Zp;function em(e,o,r){return Math.min(Math.max(e,o),r)}const om=({bars:e,isPaused:o,...r})=>{const a=[6,16,23,24,18,9,14,22,24,20,11,12,20,24,21,13,9,19,24,23,16,7,17,23,23,18,8,15,22,24,20,10];return t.jsx(s.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...r,children:e.map((l,i)=>t.jsx(s.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":l>=0?"theme-primary":"color-gray-300",style:{height:`${l>=0?em(l*300,6,24):a[i%a.length]}px`}},i))})},Tn=({analyserNode:e,isPaused:o,...r})=>{const n=m.useRef(null),a=60,l=32,[i,u]=m.useState([]);return m.useEffect(()=>{if(!e){u(Array(a).fill(-1));return}const c=e.frequencyBinCount,d=new Uint8Array(c),g=()=>{e.getByteTimeDomainData(d);let p=0;for(let f=0;f<c;f++){const y=(d[f]-128)/128;p+=y*y}const h=Math.sqrt(p/c);m.startTransition(()=>{u(f=>{const b=[...f,h].slice(-a);return b.length<a?[...Array(a-b.length).fill(-1),...b]:b})})};return n.current=setInterval(g,l),()=>{n.current&&clearInterval(n.current)}},[e]),t.jsx(om,{bars:i,isPaused:o,...r})},mr=Qo.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,r="",n="",a,l,i,u,c,d)=>e({visible:!0,variant:o,title:r,subtitle:n,isClosable:a,views:l,action:i,actionText:u,showIcon:c,timeout:d}),hide:()=>e({visible:!1})})),vl=(e,o,r,n)=>{mr.getState().show(e,o,r,n==null?void 0:n.isClosable,n==null?void 0:n.views,n==null?void 0:n.action,n==null?void 0:n.actionText,n==null?void 0:n.showIcon,n==null?void 0:n.timeout)},Tl=()=>{mr.getState().hide()},tm={info:{container:{backgroundColor:"color-white",border:"rgba(191, 219, 254, 0.95)"},icon:{color:"theme-primary",name:"InformationIcon"},content:{color:"color-gray-900"},close:{color:"color-gray-500",name:"CloseIcon"}},success:{container:{backgroundColor:"#F0FDF4",border:"#BBF7D0"},icon:{color:"#16A34A",name:"SuccessIcon"},content:{color:"#14532D"},close:{color:"#15803D",name:"CloseIcon"}},error:{container:{backgroundColor:"#FEF2F2",border:"#FECACA"},icon:{color:"#DC2626",name:"ErrorIcon"},content:{color:"#7F1D1D"},close:{color:"#B91C1C",name:"CloseIcon"}},warning:{container:{backgroundColor:"#FFF7ED",border:"#FED7AA"},icon:{color:"#EA580C",name:"WarningIcon"},content:{color:"#9A3412"},close:{color:"#C2410C",name:"CloseIcon"}}},Il=({variant:e,hide:o,title:r,subtitle:n,theme:a,action:l,actionText:i,showIcon:u=!1,isClosable:c=!1,timeout:d=3e3,views:g})=>{var C,k;m.useEffect(()=>{if(d&&!c){const w=setTimeout(()=>{o()},d);return()=>{clearTimeout(w)}}},[]);const p=a??tm,h=!!(l&&i),f={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${p[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},y={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],b={info:t.jsx(io,{widthHeight:24,color:y,...g==null?void 0:g.icon}),success:t.jsx(wn,{widthHeight:24,color:y,...g==null?void 0:g.icon}),warning:t.jsx(yn,{widthHeight:24,color:y,...g==null?void 0:g.icon}),error:t.jsx(pr,{widthHeight:24,color:y,...g==null?void 0:g.icon})}[e],x=u&&b;return t.jsxs(s.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${p[e].content.color}`,backgroundColor:`${p[e].container.backgroundColor}`,onClick:c?()=>{}:()=>{o()},...f,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...g==null?void 0:g.container,children:[x&&b,t.jsxs(s.Vertical,{gap:4,width:"100%",children:[t.jsx(s.Text,{size:"md",weight:"semiBold",...g==null?void 0:g.title,children:r}),n&&t.jsx(s.Text,{size:"sm",lineHeight:"20px",color:p[e].content.color,...g==null?void 0:g.subtitle,children:n})]}),h&&t.jsx(s.View,{as:"button",type:"button",onClick:l,backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:p[e].container.border,borderRadius:"9999px",padding:"6px 12px",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",...g==null?void 0:g.actionText,children:t.jsx(s.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:p[e].content.color,children:i})}),c&&t.jsx(s.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(C=g==null?void 0:g.closingIcon)==null?void 0:C.container,children:t.jsx($e,{widthHeight:16,color:p[e].close.color,...(k=g==null?void 0:g.closingIcon)==null?void 0:k.icon})})]})},rm=({container:e,theme:o,position:r="topRight"})=>{const{visible:n,title:a,variant:l,subtitle:i,isClosable:u,views:c,action:d,actionText:g,showIcon:p,timeout:h}=mr(),f={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[r],y=()=>t.jsx(Il,{variant:l,subtitle:i,show:n,title:a,theme:o,isClosable:u,views:c,action:d,actionText:g,showIcon:p,timeout:h,hide:()=>Tl()}),b=e?m.cloneElement(e,{},y()):t.jsx(s.View,{position:"absolute",zIndex:1e4,...f,children:y()});return n?b:null},nm=(e,o)=>{if(typeof document>"u")return;const r=document.createElement("video");r.preload="metadata",r.onloadedmetadata=()=>{r.currentTime=1},r.oncanplay=()=>{const n=document.createElement("canvas");n.width=r.videoWidth,n.height=r.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(r,0,0,n.width,n.height);const l=n.toDataURL("image/jpeg");o(l)}URL.revokeObjectURL(r.src)},r.src=URL.createObjectURL(e)},am=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:r,validateFile:n,thumbnail:a,multiple:l=!1,onError:i=u=>{vl("error","Error",u)}})=>{const u=m.useRef(null),c=m.useRef(null),[d,g]=m.useState(null),[p,h]=m.useState([]),[f,y]=m.useState(null),[b,x]=m.useState(null),[C,k]=m.useState(a||null),w=m.useCallback(S=>{const I=S.target.files;if(y(null),!I||I.length===0){i("No file selected"),y("No file selected");return}if(l){const j=Array.from(I),R=[];for(const z of j){if(z.size>e){i(`File ${z.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${z.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const E=n(z);if(E){i(`${z.name}: ${E}`),y(`${z.name}: ${E}`);continue}}R.push(z)}R.length>0&&(h(R),r&&r(R))}else{const j=I[0];if(j.size>e){i(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const R=n(j);if(R){i(R),y(R);return}}x(URL.createObjectURL(j)),j.type.startsWith("video/")&&nm(j,k),o&&(g(j),o(j))}},[e,o,r,n,l]),v=()=>{const S=u.current;S&&typeof S.click=="function"&&S.click()};return m.useEffect(()=>()=>{typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&(b&&URL.revokeObjectURL(b),C&&URL.revokeObjectURL(C))},[b,C]),{previewUrl:b,thumbnailUrl:C,errorMessage:f,fileInputRef:u,videoRef:c,selectedFile:d,selectedFiles:p,handleFileChange:w,handleClick:v}},lm=({accept:e,isLoading:o=!1,progress:r=0,icon:n,text:a,previewUrl:l,thumbnailUrl:i,errorMessage:u,fileInputRef:c,videoRef:d,selectedFile:g,selectedFiles:p,handleFileChange:h,handleClick:f,multiple:y=!1,containerProps:b,errorMessageProps:x,progressProps:C,videoProps:k,imageProps:w,iconProps:v,textProps:S,fileType:I,previewUrl:j,renderError:R=({errorMessage:V,errorMessageProps:A,themeMode:H})=>t.jsx(s.Text,{color:"red",fontSize:12,marginTop:8,...A,...M==null?void 0:M.text,children:V}),renderText:z=({text:V,textProps:A})=>t.jsx(s.Text,{marginTop:8,...A,...M==null?void 0:M.text,children:V}),renderFile:E=({selectedFile:V,textProps:A})=>V?t.jsxs(s.Center,{marginTop:8,gap:10,flexDirection:"column",...M==null?void 0:M.container,children:[t.jsx(s.Text,{maxLines:2,...A,...M==null?void 0:M.text,children:V.name}),t.jsxs(s.Text,{...A,...M==null?void 0:M.text,children:["(",Math.round(V.size/1024)," KB)"]})]}):null,renderVideo:W=({selectedFile:V,videoRef:A,videoProps:H})=>t.jsx(s.View,{width:"100%",height:"100%",position:"relative",...M==null?void 0:M.view,children:t.jsx(s.View,{as:"video",width:"100%",height:"100%",src:V?URL.createObjectURL(V):void 0,style:{objectFit:"cover"},ref:A,...H,...M==null?void 0:M.view})}),renderImage:F=({previewUrl:V,imageProps:A})=>(console.log("Rendering image with URL:",V),t.jsx(s.View,{width:"100%",height:"100%",position:"relative",...M==null?void 0:M.view,children:t.jsx(s.Image,{src:V,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...A,...M==null?void 0:M.image})})),renderProgress:T=({progress:V,progressProps:A})=>t.jsxs(s.Horizontal,{gap:8,alignItems:"center",...A,...M==null?void 0:M.horizontal,children:[t.jsx(s.View,{height:4,backgroundColor:"color-black-100",width:"100%",borderRadius:2,...M==null?void 0:M.view,children:t.jsx(s.View,{height:4,width:`${V}%`,borderRadius:2,backgroundColor:"color-dark-50",...M==null?void 0:M.view})}),t.jsxs(s.Text,{fontSize:12,...M==null?void 0:M.text,children:[V,"%"]})]}),views:M={}})=>{const V=j||l;return t.jsxs(s.Center,{onClick:f,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:g&&r===100?"200px":"auto",...b,...M==null?void 0:M.container,children:[r===100&&I==="image"&&V&&F({previewUrl:V,imageProps:w}),r===100&&I==="video"&&i&&W({selectedFile:g,thumbnailUrl:i,videoRef:d,videoProps:k,imageProps:w}),r===100&&I==="file"&&g&&E({selectedFile:g,textProps:S}),r<100&&(n||t.jsx(jn,{widthHeight:32,...v})),!o&&!g&&a&&z({text:a,textProps:S}),o&&T({progress:r,progressProps:C}),!o&&u&&R({errorMessage:u,errorMessageProps:x}),t.jsx(s.Input,{type:"file",ref:c,onChange:h,accept:e,multiple:y,style:{display:"none"},...M==null?void 0:M.view})]})},gr=({accept:e="*/*",icon:o,text:r,maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:i,isLoading:u=!1,progress:c=0,fileType:d,multiple:g=!1,...p})=>{const{previewUrl:h,thumbnailUrl:f,errorMessage:y,videoRef:b,fileInputRef:x,selectedFile:C,selectedFiles:k,handleFileChange:w,handleClick:v}=am({maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:i,multiple:g}),I=(()=>{if(d)return d;if(C)return C.type.startsWith("image/")?"image":C.type.startsWith("video/")?"video":"file"})();return t.jsx(lm,{handleClick:v,accept:e,isLoading:u,progress:c,icon:o,text:r,maxSize:n,onFileSelect:a,validateFile:i,errorMessage:y,handleFileChange:w,selectedFile:C,selectedFiles:k,videoRef:b,fileInputRef:x,previewUrl:h,thumbnailUrl:f,fileType:I,multiple:g,...p})};function im(e){const o=Math.floor(e/60),r=e%60;return`${o}:${r.toString().padStart(2,"0")}`}function sm({onAudio:e,recording:o,paused:r,audioBlob:n,analyserNode:a,duration:l,error:i,startRecording:u,stopRecording:c,pauseRecording:d,resumeRecording:g,resetRecording:p,handleFileChange:h,...f}){const[y,b]=m.useState(null);m.useEffect(()=>{if(n){const k=URL.createObjectURL(n);return b({url:k,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(k)}}return()=>{}},[n]);const x=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),b(null),p()},C=k=>{e(k),y!=null&&y.url&&URL.revokeObjectURL(y.url),b({url:URL.createObjectURL(k),label:k.name})};return t.jsxs(s.Vertical,{gap:"10px",width:"100%",...f,children:[t.jsxs(s.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[t.jsx(gr,{accept:"audio/*",icon:t.jsx(St,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:C,fileType:"file",multiple:!1,renderError:({errorMessage:k})=>null,views:{container:{width:"36px",height:"36px",cursor:"pointer",border:"1px solid color-gray-200",borderRadius:"10px",backgroundColor:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"}}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"10px",width:"36px",height:"36px"},validateFile:k=>k.size>100*1024*1024?"File size exceeds 100MB limit":k.type.startsWith("audio/")?null:"Only audio files are allowed"}),t.jsx(s.View,{as:"button",type:"button",onClick:o?c:u,width:"36px",height:"36px",minWidth:"36px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"theme-primary",color:"color-white",borderRadius:"999px",border:"0",cursor:"pointer",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.92},children:o?t.jsx(ur,{widthHeight:14,color:"color-white",filled:!1}):t.jsx(xn,{widthHeight:18,color:"color-white",filled:!1})}),t.jsx(s.View,{flex:1,minWidth:120,children:t.jsx(Tn,{analyserNode:o?a:null,isPaused:!o||r})}),t.jsx(s.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:im(l)})]}),y&&!o&&t.jsxs(s.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[t.jsx(s.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:y.label}),t.jsx(s.View,{as:"button",type:"button",onClick:x,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:t.jsx($e,{widthHeight:14,color:"currentColor"})})]}),t.jsx(s.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),i&&t.jsx(s.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:i})]})}function Rl(){const[e,o]=m.useState(!1),[r,n]=m.useState(!1),[a,l]=m.useState(0),[i,u]=m.useState(null),[c,d]=m.useState(null),[g,p]=m.useState(null),h=m.useRef(null),f=m.useRef(null),y=m.useRef(null),b=m.useRef(null),x=m.useRef([]),C=m.useRef(null),k=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",w=m.useCallback(()=>{h.current&&(h.current.state!=="inactive"&&h.current.stop(),h.current=null),b.current&&(b.current.getTracks().forEach(z=>z.stop()),b.current=null),f.current&&(f.current.close(),f.current=null),y.current&&(y.current.disconnect(),y.current=null),d(null),C.current&&(clearInterval(C.current),C.current=null)},[]),v=m.useCallback(async()=>{w(),u(null),l(0),x.current=[];try{const z=await navigator.mediaDevices.getUserMedia({audio:!0});b.current=z;const E=MediaRecorder.isTypeSupported(k)?k:void 0,W=new MediaRecorder(z,E?{mimeType:E}:void 0);h.current=W;const F=new(window.AudioContext||window.webkitAudioContext);f.current=F;const T=F.createMediaStreamSource(z),M=F.createAnalyser();M.fftSize=256,M.smoothingTimeConstant=.8,T.connect(M),y.current=M,d(M),W.ondataavailable=V=>{V.data.size>0&&x.current.push(V.data)},W.onstop=()=>{const V=new Blob(x.current,{type:W.mimeType||k});p(V),w()},W.start(),o(!0),n(!1),C.current=setInterval(()=>{l(V=>V+1)},1e3)}catch{u("Microphone access denied or unavailable."),w()}},[w]),S=m.useCallback(()=>{h.current&&h.current.state!=="inactive"&&h.current.stop(),o(!1),n(!1),C.current&&(clearInterval(C.current),C.current=null)},[]),I=m.useCallback(()=>{h.current&&h.current.state==="recording"&&(h.current.pause(),n(!0),C.current&&(clearInterval(C.current),C.current=null))},[]),j=m.useCallback(()=>{h.current&&h.current.state==="paused"&&(h.current.resume(),n(!1),C.current||(C.current=setInterval(()=>{l(z=>z+1)},1e3)))},[]),R=m.useCallback(()=>{w(),o(!1),n(!1),p(null),l(0),u(null),x.current=[]},[w]);return m.useEffect(()=>()=>w(),[w]),{recording:e,paused:r,audioBlob:g,analyserNode:c,duration:a,error:i,startRecording:v,stopRecording:S,pauseRecording:I,resumeRecording:j,resetRecording:R}}function cm(e){const{onAudio:o}=e,{recording:r,paused:n,audioBlob:a,analyserNode:l,duration:i,error:u,startRecording:c,stopRecording:d,pauseRecording:g,resumeRecording:p,resetRecording:h}=Rl();return m.useEffect(()=>{if(a&&o){const y=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(y)}},[a,o]),{recording:r,paused:n,audioBlob:a,analyserNode:l,duration:i,error:u,startRecording:c,stopRecording:d,pauseRecording:g,resumeRecording:p,resetRecording:h,handleFileChange:y=>{var x;const b=(x=y.target.files)==null?void 0:x[0];b&&o&&o(b)}}}function dm(e){const o=cm(e);return t.jsx(sm,{...e,...o})}const um=()=>{const[e,o]=m.useState(!1);return{imageError:e,setImageError:o}},pm={xs:24,sm:32,md:44,lg:56,xl:72},Rr={container:{borderRadius:"50%",overflow:"hidden",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"theme-primary",transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},fallback:{fontWeight:"600",color:"color-white",letterSpacing:"-0.02em"},image:{objectFit:"cover",transition:"opacity 0.2s ease"}},mm=({src:e,size:o="md",fallback:r="IM",views:n,imageError:a,setImageError:l,onClick:i=()=>{},children:u})=>{const c=pm[o],d={...Rr.image,...(n==null?void 0:n.image)||{}};return t.jsxs(s.Center,{"data-role":"avatar",width:c,height:c,...Rr.container,borderColor:a?"color-gray-400":"transparent",onClick:i,...n==null?void 0:n.container,children:[!a&&e?t.jsx(s.Image,{alt:"",src:e,style:d,width:c,height:c,onError:()=>l(!0)}):t.jsx(s.Text,{size:o,...Rr.fallback,...n==null?void 0:n.fallback,children:r}),u]})},gm=e=>{const o=ve("avatar",e),{src:r,size:n,views:a,fallback:l,onClick:i,children:u}=o,{imageError:c,setImageError:d}=um();return t.jsx(mm,{src:r,size:n,views:a,fallback:l,imageError:c,setImageError:d,onClick:i,children:u})},Fl=gm,hm={xs:{minWidth:"16px",height:"16px",padding:"0 4px",fontSize:"9px",fontWeight:"600",lineHeight:"12px",letterSpacing:"-0.01em"},sm:{minWidth:"20px",height:"20px",padding:"0 6px",fontSize:"10px",fontWeight:"600",lineHeight:"14px",letterSpacing:"-0.01em"},md:{minWidth:"24px",height:"24px",padding:"0 8px",fontSize:"12px",fontWeight:"600",lineHeight:"16px",letterSpacing:"-0.01em"},lg:{minWidth:"28px",height:"28px",padding:"0 10px",fontSize:"14px",fontWeight:"600",lineHeight:"20px",letterSpacing:"-0.01em"},xl:{minWidth:"32px",height:"32px",padding:"0 12px",fontSize:"16px",fontWeight:"600",lineHeight:"24px",letterSpacing:"-0.01em"}},fm={xs:{gap:"6px",padding:"3px 8px 3px 3px"},sm:{gap:"8px",padding:"4px 10px 4px 4px"},md:{gap:"12px",padding:"6px 16px 6px 6px"},lg:{gap:"12px",padding:"7px 18px 7px 7px"},xl:{gap:"14px",padding:"8px 20px 8px 8px"}},ym={xs:{padding:"2px 6px",fontSize:"9px",lineHeight:"12px"},sm:{padding:"3px 8px",fontSize:"10px",lineHeight:"14px"},md:{padding:"6px 12px",fontSize:"11px",lineHeight:"14px"},lg:{padding:"7px 14px",fontSize:"12px",lineHeight:"16px"},xl:{padding:"8px 16px",fontSize:"13px",lineHeight:"18px"}},aa={xs:{fontSize:"11px",lineHeight:"14px"},sm:{fontSize:"12px",lineHeight:"16px"},md:{fontSize:"13px",lineHeight:"18px"},lg:{fontSize:"14px",lineHeight:"20px"},xl:{fontSize:"15px",lineHeight:"22px"}},xm={square:0,rounded:"8px",pill:"9999px"},bm={"top-right":{top:"4px",right:"4px",position:"absolute"},"top-left":{top:"4px",left:"4px",position:"absolute"},"bottom-right":{bottom:"4px",right:"4px",position:"absolute"},"bottom-left":{bottom:"4px",left:"4px",position:"absolute"}},km=e=>({display:"inline-flex",height:"auto",minWidth:"auto",backgroundColor:"color-white-600",color:"color-gray-900",borderWidth:"1px",borderStyle:"solid",borderColor:"color-white",backdropFilter:"blur(12px)",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.08)",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",_hover:{backgroundColor:"color-white-800",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.1)"}}),Cm=e=>({filled:{backgroundColor:"theme-primary",color:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",color:"theme-primary",style:{backgroundColor:"transparent"},transition:"border-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},link:{borderWidth:0,borderStyle:"none",borderColor:"theme-primary",color:"theme-primary",textDecoration:"underline",style:{backgroundColor:"transparent",textUnderlineOffset:"2px",textDecorationThickness:"1px"},transition:"opacity 0.2s ease",_hover:{opacity:.8}},ghost:{color:"color-gray-500",borderWidth:0,borderStyle:"solid",borderColor:"color-gray-500",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-100"}}}),zl=e=>({default:{indicator:{backgroundColor:"color-gray-400"},label:{color:"inherit"}},info:{indicator:{backgroundColor:"color-blue-500"},label:{color:"inherit"}},success:{indicator:{backgroundColor:"color-green-500"},label:{color:"inherit"}},warning:{indicator:{backgroundColor:"color-orange-500"},label:{color:"inherit"}},error:{indicator:{backgroundColor:"color-red-500"},label:{color:"inherit"}}}),Sm=m.memo(({content:e,children:o,icon:r,pastil:n,pastilContent:a,action:l,position:i,shape:u="pill",variant:c="filled",size:d="md",isAuto:g=!1,views:p,themeMode:h,backgroundColor:f,color:y,borderColor:b,...x})=>{const{themeMode:C}=s.useTheme(),k=h||C,w=m.useMemo(()=>Cm()[c],[k,c]),v=m.useMemo(()=>km(),[k]),S=m.useMemo(()=>zl(),[k]),I=a!=null,j=l!=null,R=I||j,z=o??e,E=z!=null,W=g&&typeof z=="string"&&/^(color|theme|light|dark)-/.test(z)?z:void 0,F=m.useMemo(()=>{const M={width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:xm[u],...hm[d],...w,...R?fm[d]:{},...R?v:{},...i?bm[i]:{},...p==null?void 0:p.container};return c!=="filled"&&!R&&(w.color!==void 0&&(M.color=w.color),w.borderColor!==void 0&&(M.borderColor=w.borderColor),w.backgroundColor!==void 0&&(M.backgroundColor=w.backgroundColor),w&&w.style&&(M.style={...M.style||{},...w.style})),j||x.onClick!==void 0||(delete M._hover,delete M._active),f!==void 0&&(M.backgroundColor=f,b===void 0&&(M.borderColor=f)),b!==void 0&&(M.borderColor=b),y!==void 0&&(M.color=y),W&&(M.backgroundColor=W,M.borderColor=W,M.color="color-white"),M},[j,x.onClick,f,y,b,u,d,c,w,R,v,i,W,p==null?void 0:p.container]);let T="currentColor";return typeof n=="string"?n in S?T=S[n].indicator.backgroundColor:T=n:n===!0&&(T="color-green-500",c==="filled"&&(T="color-white")),t.jsxs(s.Center,{"data-role":"badge",...F,...x,children:[r&&t.jsx(s.View,{"data-role":"badge-icon",...p==null?void 0:p.icon,children:r}),I&&t.jsx(s.Text,{"data-role":"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...ym[d],...p==null?void 0:p.pastilContent,children:a}),n&&t.jsx(s.View,{"data-role":"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:T,...p==null?void 0:p.pastil}),E&&t.jsx(s.Text,{"data-role":"badge-text",color:R?"color-gray-900":F.color,fontWeight:R?"700":"600",textAlign:"center",letterSpacing:R?0:"0.02em",whiteSpace:"nowrap",...R?aa[d]:{},...p==null?void 0:p.text,children:z}),j&&t.jsx(s.Text,{"data-role":"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...aa[d],...p==null?void 0:p.action,children:l})]})}),Ae=e=>{const o=ve("badge",e);return t.jsx(Sm,{...o})},wm={xs:12,sm:14,md:16,lg:18,xl:20},jm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,In=m.forwardRef(({children:e,href:o,iconSize:r="sm",underline:n="default",isExternal:a=!1,views:l={},to:i,isHovered:u,setIsHovered:c,_hover:d,...g},p)=>t.jsxs(s.Element,{as:"a",ref:p,href:o,display:"inline-flex",gap:3,alignItems:"center",flexWrap:"nowrap",color:"inherit",textDecoration:n==="underline"?"underline":"none",_hover:n==="hover"?{textDecoration:"underline",...d}:d,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...l.text,...g,children:[e,a&&t.jsx(kl,{widthHeight:wm[r]})]}));In.displayName="LinkAnchor";const Ml=m.forwardRef(({to:e="/",onClick:o,...r},n)=>{const a=qr.useHref(e),l=qr.useNavigate(),i=u=>{o==null||o(u),!(u.defaultPrevented||u.button!==0||r.target&&r.target!=="_self"||u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)&&(u.preventDefault(),l(e))};return t.jsx(In,{...r,to:e,href:a,onClick:i,ref:n})});Ml.displayName="RouterLinkAnchor";const Wl=m.forwardRef((e,o)=>{const r=qr.useInRouterContext(),{href:n,to:a="/",isExternal:l}=e;return r&&!l&&n==null&&!jm.test(a)?t.jsx(Ml,{...e,ref:o}):t.jsx(In,{...e,href:n??a,ref:o})});Wl.displayName="LinkView";const El=m.forwardRef((e,o)=>t.jsx(Wl,{ref:o,...e}));El.displayName="Link";const hr=El,Rn={xs:14,sm:18,md:22,lg:26,xl:30},Fn={fast:50,normal:100,slow:300},vm=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Tm=({size:e="md",speed:o="normal",color:r="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:i}=s.useTheme(),u=l(r,{themeMode:n||i}),c=typeof e=="number"?e:Rn[e],[d,g]=m.useState(0);return m.useEffect(()=>{const p=setInterval(()=>{g(h=>h+45)},Fn[o]);return()=>clearInterval(p)},[o]),t.jsxs(s.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${c}px`,height:`${c}px`,viewBox:"0 0 24 24",fill:"none",stroke:u,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${d}deg)`},...a,children:[t.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),t.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("g",{id:"SVGRepo_iconCarrier",children:t.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},Im=({size:e="md",speed:o="normal",color:r="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:i}=s.useTheme(),u=l(r,{themeMode:n||i}),c=typeof e=="number"?e:Rn[e],[d,g]=m.useState(0);return m.useEffect(()=>{const p=setInterval(()=>{g(h=>h+45)},Fn[o]);return()=>clearInterval(p)},[o]),t.jsxs(s.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${c}px`,height:`${c}px`,style:{transform:`rotate(${d}deg)`},...a,children:[t.jsx("circle",{cx:"10",cy:"25",r:"4",fill:u}),t.jsx("circle",{cx:"25",cy:"25",r:"4",fill:u}),t.jsx("circle",{cx:"40",cy:"25",r:"4",fill:u})]})},Rm=({size:e="md",speed:o="normal",color:r="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:i}=s.useTheme(),u=l(r,{themeMode:n||i}),c=typeof e=="number"?e:Rn[e],[d,g]=m.useState(0);return m.useEffect(()=>{const p=setInterval(()=>{g(h=>h+45)},Fn[o]);return()=>clearInterval(p)},[o]),t.jsx(s.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${c}px`,height:`${c}px`,style:{transform:`rotate(${d}deg)`},...a,children:t.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:u,strokeWidth:"5",strokeDasharray:"1,10"})})},Fm=({size:e,children:o,textColor:r,loaderColor:n,type:a="default",speed:l="normal",textPosition:i="right",views:u,...c})=>{const{getColor:d}=s.useTheme(),g=f=>vm(f)?f:d(f||"theme-loading");n=g(n||c.color||"theme-loading"),r=g(r||c.color||"theme-loading");const p={size:e,speed:l,color:n},h={default:t.jsx(Tm,{...p}),dotted:t.jsx(Im,{...p}),quarter:t.jsx(Rm,{...p})};return t.jsxs(s.Center,{gap:10,flexDirection:i==="top"||i==="bottom"?"column":"row",...c,...u==null?void 0:u.container,children:[(i==="left"||i==="top")&&o&&t.jsx(s.View,{color:r,...u==null?void 0:u.text,children:o}),h[a],(i==="right"||i==="bottom")&&o&&t.jsx(s.View,{color:r,...u==null?void 0:u.text,children:o})]})},zm=e=>{const o=ve("loader",e);return t.jsx(Fm,{...o})},uo=zm,Mm=/^(color|theme|light|dark)-/,Wm=e=>Mm.test(e),Em=e=>{const o=e.split("-"),r=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(r)&&r>=0&&r<=1e3?o.slice(0,-1).join("-"):e},Eo=(e,o)=>Wm(e)?`${Em(e)}-${o}`:`color-mix(in srgb, ${e} ${Math.round(o/10)}%, transparent)`,Al={xs:{minHeight:24,paddingHorizontal:12,paddingVertical:5,fontSize:10,fontWeight:500,lineHeight:12,letterSpacing:"-0.01em"},sm:{minHeight:32,paddingHorizontal:16,paddingVertical:7,fontSize:12,fontWeight:500,lineHeight:16,letterSpacing:"-0.01em"},md:{minHeight:40,paddingHorizontal:20,paddingVertical:9,fontSize:14,fontWeight:500,lineHeight:20,letterSpacing:"-0.01em"},lg:{minHeight:48,paddingHorizontal:24,paddingVertical:11,fontSize:16,fontWeight:500,lineHeight:24,letterSpacing:"-0.01em"},xl:{minHeight:56,paddingHorizontal:28,paddingVertical:13,fontSize:20,fontWeight:500,lineHeight:28,letterSpacing:"-0.01em"}},gt={square:0,rounded:8,pill:999},Am={xs:{width:16,height:16,padding:6},sm:{width:20,height:20,padding:6},md:{width:24,height:24,padding:8},lg:{width:24,height:24,padding:12},xl:{width:28,height:28,padding:14}},Ge=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Hm=(e,o,r=!1,n)=>{const a=r?o:e,l=r?e:o,i=r?o:e,c=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:l,d=`0 0 0 2px ${Ge("color-white")}, 0 0 0 4px ${Ge(i)}`;return{filled:{backgroundColor:a,color:c,borderWidth:1,borderStyle:"solid",borderColor:a,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:i,borderWidth:1,borderStyle:"solid",borderColor:Eo(i,r?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:i,borderWidth:1,borderStyle:"solid",borderColor:Eo(i,r?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:i,borderWidth:0,borderStyle:"solid",borderColor:i,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:i,borderWidth:0,borderStyle:"none",borderColor:i,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Ge(i)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:d},transition:"opacity 0.2s ease"},subtle:{backgroundColor:Eo(i,r?200:100),color:i,borderWidth:1,borderStyle:"solid",borderColor:Eo(i,r?400:250),_hover:{backgroundColor:Eo(i,r?300:180)},_active:{backgroundColor:Eo(i,r?380:240)},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},Vm=m.memo(({children:e,icon:o,leftIcon:r,rightIcon:n,isLoading:a,iconPosition:l="left",loaderPosition:i="left",size:u="md",resolvedTextColor:c,isIconRounded:d,loaderProps:g,views:p})=>{const h=["left","right"].includes(l)?s.Horizontal:s.Vertical,f=Al[u];return t.jsxs(h,{gap:8,alignItems:"center",justifyContent:"center",fontSize:f.fontSize,fontWeight:f.fontWeight,lineHeight:f.lineHeight,letterSpacing:f.letterSpacing,whiteSpace:"nowrap",color:c,...p==null?void 0:p.content,children:[a&&i==="left"&&t.jsx(uo,{size:u==="xs"||u==="sm"?"sm":"md",color:c,...g,...p==null?void 0:p.loader}),r&&t.jsx(s.View,{color:c,...p==null?void 0:p.icon,children:r}),o&&["left","top"].includes(l)&&!a&&t.jsx(s.View,{color:c,...p==null?void 0:p.icon,children:o}),e,o&&["right","bottom"].includes(l)&&!a&&t.jsx(s.View,{color:c,...p==null?void 0:p.icon,children:o}),n&&t.jsx(s.View,{color:c,...p==null?void 0:p.icon,children:n}),a&&i==="right"&&t.jsx(uo,{size:u==="xs"||u==="sm"?"sm":"md",color:c,...g,...p==null?void 0:p.loader})]})}),Pm=e=>{const o=gt[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},Dm=({asComponent:e,isDisabled:o,isLoading:r,isWrapped:n=!1,borderRadius:a,width:l,height:i,baseStyles:u,sizeStyles:c,iconPad:d,mainTone:g,resolvedTextColor:p,children:h,borderWidth:f=0,...y})=>t.jsx(s.Element,{as:e,disabled:!!(o||r),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:l,height:i,...u,...c,...d,backgroundColor:(u==null?void 0:u.backgroundColor)||(n?g:void 0),color:p,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...y,children:h}),$m=({shape:e,isDisabled:o,onClick:r,shadow:n,borderWidth:a,isAuto:l,isFilled:i,views:u,children:c,...d})=>t.jsx(s.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:gt[e],cursor:o?"default":"pointer",onClick:r,boxShadow:n,padding:a,width:i?"100%":l?"fit-content":void 0,...u==null?void 0:u.container,...d,children:c}),Lm=({variant:e,animation:o,to:r,isDisabled:n,isLoading:a,isAuto:l,isFilled:i,isExternal:u,shape:c="rounded",shadow:d,onClick:g,views:p,baseStyles:h,sizeStyles:f,iconPad:y,containerRef:b,resolvedTextColor:x,content:C,size:k,mainTone:w,borderMovingDuration:v=2,borderMovingGradientColors:S=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:I="#705CFF",animatedStrokeTextColor:j="color-gray-900",...R})=>{var F;const z=Pm(c),E=r?t.jsx(hr,{to:r,isExternal:u,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...p==null?void 0:p.link,children:C}):C,W={isDisabled:n,isLoading:a,baseStyles:h,sizeStyles:f,iconPad:y,resolvedTextColor:x,mainTone:w,children:E};if(o==="borderMoving"&&S){const M={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${v}s`,timingFunction:"linear",iterationCount:"infinite"};return t.jsx($m,{shape:c,isDisabled:n,onClick:g,shadow:d,borderWidth:3,isAuto:l,isFilled:i,views:p,background:`linear-gradient(90deg, ${Ge(S[0])}, ${Ge(S[1])}, ${Ge(S[2])}, ${Ge(S[0])})`,backgroundSize:"200% 100%",animate:M,...R,children:t.jsx(Dm,{asComponent:r?"div":"button",isWrapped:!0,borderRadius:Math.max(0,z-3),width:"100%",height:"100%",...W})})}if(o==="animatedStroke"){const T=Ge(I),M=Ge(j),V=1e3,A={from:{strokeWidth:"8px",strokeDasharray:`0 ${V}`,strokeDashoffset:-Math.round(V*.63)},to:{strokeWidth:"3px",strokeDasharray:`${V}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},H=["group",(F=p==null?void 0:p.container)==null?void 0:F.className,R==null?void 0:R.className].filter(Boolean).join(" ");return t.jsxs(s.Element,{ref:b,as:r?"div":"button",type:r?void 0:"button",disabled:!!(!r&&(n||a)),onClick:g,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:i?"100%":l?"fit-content":void 0,borderRadius:gt[c],boxShadow:d,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",color:M,backgroundColor:"transparent",borderWidth:0,...p==null?void 0:p.container,...R,className:H,children:[t.jsx(s.View,{as:"svg",position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",pointerEvents:"none",zIndex:1,"aria-hidden":"true",children:t.jsx(s.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:z,ry:z,fill:"transparent",stroke:T,strokeWidth:"8px",strokeDasharray:`0 ${V}`,strokeDashoffset:-Math.round(V*.63),pathLength:V,on:{groupHover:{animate:A}}})}),t.jsx(s.View,{position:"relative",zIndex:0,children:E})]})}if(o==="borderReveal"){const M=Ge((S==null?void 0:S[0])||w||"#000000"),A=v*.75/4,H=`linear-gradient(90deg, ${M} 50%, transparent 50%)`,L=`linear-gradient(180deg, ${M} 50%, transparent 50%)`,O=`linear-gradient(270deg, ${M} 50%, transparent 50%)`,_=`linear-gradient(0deg, ${M} 50%, transparent 50%)`,q="100% 0, 100% 100%, 0 100%, 0 0",Y="0 0, 100% 0, 100% 100%, 0 100%",P=`0s, ${A}s, ${A*2}s, ${A*2}s`,B=`${A*2}s, ${A*2}s, ${A}s, 0s`,$=4;return t.jsx(s.Element,{ref:b,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:gt[c],cursor:n?"default":"pointer",onClick:g,boxShadow:d,padding:3,background:`
2
+ ${H} no-repeat,
3
+ ${L} no-repeat,
4
+ ${O} no-repeat,
5
5
  ${_} no-repeat
6
- `,backgroundSize:`200% ${L}px, ${L}px 200%, 200% ${L}px, ${L}px 200%`,backgroundPosition:B,transitionProperty:"background-position",transitionDuration:`${H}s`,transitionTimingFunction:"linear",transitionDelay:ee,_hover:{backgroundPosition:N,transitionDelay:Y},width:s?"100%":l?"fit-content":void 0,...m==null?void 0:m.container,...M,children:r.jsx(i.View,{as:t?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,A-3),width:"100%",height:"100%",...h,...f,...y,backgroundColor:(h==null?void 0:h.backgroundColor)||S,color:b,borderWidth:0,cursor:n?"default":"pointer",children:P})})}return r.jsx(i.Element,{ref:k,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(n||a),...f,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:s?"100%":l?"fit-content":void 0,borderRadius:ar[d],boxShadow:u,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:g,...h,...m==null?void 0:m.container,...M,children:P})},dm=p.memo(p.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:l,color:s,textColor:c,explicitTextColor:d,reversed:u=!1,isAuto:g=!0,isFilled:m,isDisabled:h,isLoading:f,isIconRounded:y,isIcon:k,isHovered:b,icon:C,leftIcon:j,rightIcon:S,startIcon:w,endIcon:x,children:T,to:v,isExternal:M,shadow:A,onClick:P,views:F={},animation:V,loaderProps:z,config:I,ariaLabel:W,borderMovingDuration:H=2,borderMovingGradientColors:R=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:D="#705CFF",animatedStrokeTextColor:$="color-gray-900",..._},B)=>{const Y=h?"theme-disabled":f?"theme-loading":l??s??"theme-primary",ee=d??c??"color-white",{config:L}=qr(),E=L==null?void 0:L.theme,O=p.useMemo(()=>{const oe=nm(Y,ee,u,E);return I!=null&&I.variants&&Object.keys(I.variants).forEach(le=>{oe[le]&&(oe[le]=Be(oe[le],I.variants[le]))}),oe},[Y,ee,u,E,I==null?void 0:I.variants]),K=O[e]??O.filled,U=d?{...K,color:d}:K,J=(U==null?void 0:U.color)??ee,Z=r.jsx(am,{icon:C,leftIcon:j??w,rightIcon:S??x,isLoading:f,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:J,isIconRounded:y,loaderProps:z,views:F,children:T}),te=ul[o],G=y||k?tm[o]:{};return r.jsx(cm,{variant:e,animation:V,to:v,isDisabled:h,isLoading:f,isAuto:g,isFilled:m,isExternal:M,shape:t,shadow:A,onClick:P,views:F,baseStyles:U,sizeStyles:te,iconPad:G,resolvedTextColor:J,content:Z,size:o,mainTone:Y,borderMovingDuration:H,borderMovingGradientColors:R,animatedStrokeAccentColor:D,animatedStrokeTextColor:$,containerRef:B,...W!==void 0?{"aria-label":W}:{},..._})})),um=e=>{const[o,t]=i.useHover(),n=fe("button",e),a=e.textColor??(e.backgroundColor!=null&&e.color!=null?e.color:void 0);return r.jsx(dm,{isHovered:t,...n,explicitTextColor:a})},ce=um,pm={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},mm={square:0,rounded:"8px",pill:"24px"},gm=e=>{const o=e==="dark";return{default:{backgroundColor:"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:"color-gray-300",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.05)"}},elevated:{backgroundColor:"color-white",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.35), 0px 1px 2px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.08), 0px 1px 2px rgba(0, 0, 0, 0.06)",border:"none",transition:"box-shadow 0.2s ease",_hover:{boxShadow:o?"0px 4px 6px rgba(0, 0, 0, 0.4), 0px 2px 4px rgba(0, 0, 0, 0.35)":"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.06)"}}}},Jr=e=>(e.themeMode,{container:{backgroundColor:"color-white",color:"color-gray-900",borderRadius:"8px",overflow:"hidden",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},header:{padding:"16px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"theme-primary",fontWeight:600,fontSize:14},content:{padding:"16px",color:"color-gray-600",fontSize:12,lineHeight:"18px"},footer:{padding:"16px",borderTop:"1px solid",borderColor:"color-gray-100",justifyContent:"flex-end",gap:8}}),pl=p.createContext({}),dn=()=>p.useContext(pl),It=({children:e,views:o,style:t,themeMode:n,...a})=>{var u;const l=i.useTheme(),{styles:s}=dn(),c=Jr(l).header,d={...c,...s==null?void 0:s.header,...a,style:{...c==null?void 0:c.style,...(u=s==null?void 0:s.header)==null?void 0:u.style,...t}};return r.jsx(i.Vertical,{gap:8,...d,children:e})},Rt=({children:e,views:o,style:t,themeMode:n,...a})=>{var u;const l=i.useTheme(),{styles:s}=dn(),c=Jr(l).content,d={...c,...s==null?void 0:s.content,...a,style:{...c==null?void 0:c.style,...(u=s==null?void 0:s.content)==null?void 0:u.style,...t}};return r.jsx(i.Vertical,{gap:12,...d,children:e})},Ft=({children:e,views:o,style:t,themeMode:n,...a})=>{var u;const l=i.useTheme(),{styles:s}=dn(),c=Jr(l).footer,d={...c,...s==null?void 0:s.footer,...a,style:{...c==null?void 0:c.style,...(u=s==null?void 0:s.footer)==null?void 0:u.style,...t}};return r.jsx(i.Vertical,{gap:8,...d,children:e})},hm=({variant:e="default",size:o="md",shape:t="rounded",children:n,header:a,footer:l,isFullWidth:s=!1,views:c,style:d,themeMode:u,config:g,...m})=>{var x,T;const h=i.useTheme(),f=Jr(h),y=((x=pm[o])==null?void 0:x.padding)||"16px",k=p.useMemo(()=>({styles:{container:{...f.container,borderRadius:mm[t],...c==null?void 0:c.container},header:{...f.header,padding:y,...c==null?void 0:c.header},content:{...f.content,padding:y,...c==null?void 0:c.content},footer:{...f.footer,padding:y,...c==null?void 0:c.footer}}}),[f,c,y,t]),b=p.Children.toArray(n).some(v=>p.isValidElement(v)&&(v.type===It||v.type===Rt||v.type===Ft)),{themeMode:C}=h,S=gm(u||C)[e],w={width:s?"100%":"auto",overflow:"hidden",...S,...k.styles.container,...m,style:{...(T=k.styles.container)==null?void 0:T.style,...d}};return r.jsx(pl.Provider,{value:k,children:r.jsx(i.View,{...w,children:b?n:r.jsxs(i.Vertical,{width:"100%",children:[a&&r.jsx(It,{children:a}),r.jsx(Rt,{children:n}),l&&r.jsx(Ft,{children:l})]})})})},fm=e=>{const o=fe("card",e);return r.jsx(hm,{...o})},Se=fm;Se.Header=It;Se.Content=Rt;Se.Footer=Ft;const ym=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:l=!0,infinite:s=!0,totalSlides:c,stepIndices:d})=>{const u=p.useRef(c||0),[g,m]=p.useState(c||0),h=p.useRef(new Set),f=p.useRef(0),y=p.useMemo(()=>Ot("carousel-content"),[]),[k,b]=p.useState(o!==void 0?o:e),[C,j]=p.useState(!1),[S,w]=p.useState(!1),[x,T]=p.useState(0),[v,M]=p.useState(0),A=p.useRef(null);p.useEffect(()=>{o!==void 0&&b(o)},[o]);const P=p.useCallback(N=>{let Y=N;s?N<0?Y=g-1:N>=g&&(Y=0):Y=Math.max(0,Math.min(N,g-1)),d&&d.length>0&&(d.includes(Y)||(Y=d.reduce((L,E)=>Math.abs(E-Y)<Math.abs(L-Y)?E:L))),o===void 0&&b(Y),t&&t(Y)},[o,s,t,g]),F=p.useCallback(()=>{P(k+1)},[k,P]),V=p.useCallback(()=>{P(k-1)},[k,P]);p.useEffect(()=>(n&&!C&&!S&&(A.current=setInterval(()=>{F()},a)),()=>{A.current&&clearInterval(A.current)}),[n,a,C,S,F,l]);const z=p.useCallback(()=>{l&&j(!0)},[l]),I=p.useCallback(()=>{j(!1)},[]),W=p.useCallback(N=>{w(!0),"touches"in N?(T(N.touches[0].clientX),M(N.touches[0].clientY)):(T(N.clientX),M(N.clientY))},[]),H=p.useCallback(N=>{if(!S)return;let Y,ee;"touches"in N?(Y=N.touches[0].clientX,ee=N.touches[0].clientY):(Y=N.clientX,ee=N.clientY);const L=Y-x,E=ee-v;Math.abs(L)>Math.abs(E)&&Math.abs(L)>50&&(L>0?V():F(),w(!1))},[S,x,v,F,V]),R=p.useCallback(()=>{w(!1)},[]),D=p.useCallback(()=>{const N=f.current++;h.current.add(N);const Y=h.current.size;return u.current=Y,m(Y),N},[]),$=p.useCallback(N=>{h.current.delete(N);const Y=h.current.size;if(u.current=Y,m(Y),Y>0&&k>=Y){const ee=Math.max(0,Y-1);o===void 0&&b(ee),t&&t(ee)}},[k,o,t]),_=s||k>0,B=s||k<g-1;return{activeIndex:k,totalSlides:g,goToSlide:P,nextSlide:F,prevSlide:V,canGoNext:B,canGoPrevious:_,handleMouseEnter:z,handleMouseLeave:I,handleDragStart:W,handleDragMove:H,handleDragEnd:R,registerSlide:D,unregisterSlide:$,contentId:y,infinite:s}},xm={dot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},line:{width:"20px",height:"4px",borderRadius:"2px",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},number:{minWidth:"24px",height:"24px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",transition:"background-color 0.3s ease"}},bm={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},Pr={width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"color-white",color:"color-gray-800",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 5px rgba(0, 0, 0, 0.1)",zIndex:1,transition:"background-color 0.3s ease",_hover:{backgroundColor:"color-gray-100"}},dr=()=>({container:{position:"relative",overflow:"hidden"},content:{overflow:"hidden",width:"100%",height:"100%"},innerContainer:{display:"flex",transitionProperty:"transform",transitionDuration:"300ms",transitionTimingFunction:"ease-in-out",height:"100%"},item:{flex:"0 0 100%",minWidth:0,position:"relative",height:"100%"},prevButton:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)",zIndex:10,...Pr},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...Pr}}),ml=p.createContext(null),Qr=()=>{const e=p.useContext(ml);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},gl=({children:e,isActive:o,index:t,views:n,...a})=>r.jsx(i.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),hl=({views:e,children:o,...t})=>{const{goToPrevious:n,canGoPrevious:a,styles:l}=Qr(),c={...dr().prevButton,...l==null?void 0:l.prevButton,...e==null?void 0:e.prevButton};return r.jsx(ce,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...c,...t,children:o??r.jsx(ue,{orientation:"left",widthHeight:16})})},fl=({views:e,children:o,...t})=>{const{goToNext:n,canGoNext:a,styles:l}=Qr(),c={...dr().nextButton,...l==null?void 0:l.nextButton,...e==null?void 0:e.nextButton};return r.jsx(ce,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...c,...t,children:o??r.jsx(ue,{orientation:"right",widthHeight:16})})},yl=({children:e,views:o,...t})=>{const{registerSlide:n,unregisterSlide:a,styles:l}=Qr(),s=p.useRef(null);p.useEffect(()=>{const u=n();return s.current=u,()=>{s.current!==null&&a(s.current)}},[n,a]);const d={...dr().item,...l==null?void 0:l.item,...o==null?void 0:o.item};return r.jsx(i.View,{role:"group","aria-roledescription":"slide",...d,...t,children:e})},xl=({children:e,views:o,style:t,...n})=>{const{currentIndex:a,styles:l,contentId:s}=Qr(),c=dr(),d={...c.content,...l==null?void 0:l.content,...o==null?void 0:o.content},u={...c.innerContainer,...l==null?void 0:l.innerContainer,...o==null?void 0:o.innerContainer},g=`-${a*100}%`;return r.jsx(i.View,{...d,...n,style:{...d==null?void 0:d.style,...t},id:s,"aria-live":"polite",children:r.jsx(i.View,{...u,style:{...u==null?void 0:u.style,transform:`translateX(${g})`},children:e})})},km=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:n,showNavigation:a=!0,navigationPosition:l="inside",prevButton:s,nextButton:c,showIndicators:d=!0,indicatorPosition:u="bottom",indicatorVariant:g="dot",autoPlay:m=!1,autoPlayInterval:h=3e3,pauseOnHover:f=!0,infinite:y=!0,direction:k="horizontal",transitionDuration:b=300,views:C,stepIndices:j,themeMode:S,...w})=>{const x=p.useMemo(()=>p.Children.toArray(e),[e]),T=ym({defaultActiveIndex:o,activeIndex:t,onChange:n,autoPlay:m,autoPlayInterval:h,pauseOnHover:f,infinite:y,totalSlides:x.length}),{activeIndex:v,totalSlides:M,goToSlide:A,nextSlide:P,prevSlide:F,handleMouseEnter:V,handleMouseLeave:z,handleDragStart:I,handleDragMove:W,handleDragEnd:H}=T,R=()=>{if(!a)return null;const _=s||r.jsx(i.View,{as:"button","aria-label":"Previous slide",...Pr,...C==null?void 0:C.prevButton,children:"❮"}),B=c||r.jsx(i.View,{as:"button","aria-label":"Next slide",...Pr,...C==null?void 0:C.nextButton,children:"❯"});return r.jsxs(r.Fragment,{children:[r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:l==="inside"?"10px":"-40px",onClick:F,cursor:!y&&v===0?"not-allowed":"pointer",opacity:!y&&v===0?.5:1,children:_}),r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:l==="inside"?"10px":"-40px",onClick:P,cursor:!y&&v===x.length-1?"not-allowed":"pointer",opacity:!y&&v===x.length-1?.5:1,children:B})]})},D=()=>d?r.jsx(i.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...u==="top"?{top:"10px"}:{bottom:"10px"},...C==null?void 0:C.indicators,children:x.map((_,B)=>r.jsx(i.View,{onClick:()=>A(B),cursor:"pointer",...xm[g],...B===v?{...bm[g]}:{},...C==null?void 0:C.indicator,...B===v?C==null?void 0:C.activeIndicator:{},children:g==="number"&&B+1},B))}):null;return p.useMemo(()=>p.Children.toArray(e).some(_=>p.isValidElement(_)&&(_.type===xl||_.type===yl||_.type===hl||_.type===fl)),[e])?r.jsx(ml.Provider,{value:{currentIndex:v,totalSlides:M,goToSlide:A,goToNext:P,goToPrevious:F,canGoNext:T.canGoNext,canGoPrevious:T.canGoPrevious,registerSlide:T.registerSlide,unregisterSlide:T.unregisterSlide,styles:{...dr(),...C},contentId:T.contentId,infinite:y},children:r.jsx(i.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...C==null?void 0:C.container,...w,children:e})}):r.jsxs(i.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:V,onMouseLeave:z,onTouchStart:I,onTouchMove:W,onTouchEnd:H,onMouseDown:I,onMouseMove:W,onMouseUp:H,...C==null?void 0:C.container,...w,children:[r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...C==null?void 0:C.slideWrapper,children:x.map((_,B)=>r.jsx(gl,{isActive:B===v,index:B,views:C==null?void 0:C.slide,children:_},B))}),R(),D()]})},Cm=e=>r.jsx(km,{...e}),Ee=Cm;Ee.Slide=gl;Ee.Content=xl;Ee.Item=yl;Ee.Previous=hl;Ee.Next=fl;const Ae={blue:"color-blue-500",green:"color-green-500",purple:"color-purple-500",orange:"color-orange-500",red:"color-red-500",teal:"color-teal-500",pink:"color-pink-500",indigo:"color-indigo-500",yellow:"color-yellow-500",cyan:"color-cyan-500"},bl=[Ae.blue,Ae.green,Ae.purple,Ae.orange,Ae.red,Ae.teal,Ae.pink,Ae.indigo,Ae.yellow,Ae.cyan],Ho=bl,Sm={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},jm={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},wm={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},vm={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},Tm={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},Im={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},xr={position:"absolute",backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:100},kl={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},Er={stroke:"color-gray-200",strokeWidth:"1px"},Dr={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},Rm={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},Fm={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},zm={r:"5px",strokeWidth:"2.5px",stroke:"color-white",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{r:"7px"}},br={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},un={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-white-800",borderRadius:"4px",zIndex:10,padding:"24px",textAlign:"center"},Mm={...un},Wm={...un,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},Hm={...un,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},Vm=({data:e,dataPoints:o,animated:t=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[l,s]=p.useState(t?0:1),[c,d]=p.useState({visible:!1,x:0,y:0,content:null}),u=p.useRef(null),g=p.useRef(null);p.useEffect(()=>{if(!t){s(1);return}const j=Date.now(),S=()=>{const w=Date.now()-j,x=Math.min(w/n,1);s(x),x<1&&(u.current=requestAnimationFrame(S))};return u.current=requestAnimationFrame(S),()=>{u.current&&cancelAnimationFrame(u.current)}},[t,n]);const[m,h]=p.useState(new Set),f=p.useCallback(j=>{h(S=>{const w=new Set(S);return w.has(j)?w.delete(j):w.add(j),w})},[]),y=p.useCallback(()=>e?{...e,series:e.series.map((j,S)=>({...j,color:j.color||Ho[S%Ho.length],hidden:m.has(j.name)}))}:o?o.map((j,S)=>({...j,color:j.color||Ho[S%Ho.length],hidden:m.has(j.label)})):null,[e,o,m]),k=p.useCallback((j,S,w)=>{a&&d({visible:!0,x:j,y:S,content:w})},[a]),b=p.useCallback(()=>{d(j=>({...j,visible:!1}))},[]),C=p.useCallback(()=>{if(!g.current)return{width:0,height:0};const{width:j,height:S}=g.current.getBoundingClientRect();return{width:j,height:S}},[]);return{animationProgress:l,tooltip:c,containerRef:g,processedData:y,showTooltip:k,hideTooltip:b,getChartDimensions:C,toggleSeries:f}},Am=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onBarClick:l,showTooltip:s,hideTooltip:c,views:d})=>{const{getColor:u}=i.useTheme(),g={top:20,right:20,bottom:40,left:50},m=o-g.left-g.right,h=t-g.top-g.bottom,f=p.useMemo(()=>{let x=0;return e.series.forEach(T=>{T.data.forEach(v=>{x=Math.max(x,v)})}),x},[e]),y=e.labels.length,k=e.series.length,b=m/y,C=b*.8/k,j=b*.2/(k+1),S=f||10,w=p.useMemo(()=>{const T=[];for(let v=0;v<=5;v++){const M=S/5*v;T.push(M)}return T},[f]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((x,T)=>{const v=x.color?u(x.color):"black";return r.jsxs("linearGradient",{id:`bar-gradient-${T}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:v,stopOpacity:1}),r.jsx("stop",{offset:"100%",stopColor:v,stopOpacity:.7})]},`bar-gradient-${T}`)})}),r.jsx("line",{x1:g.left,y1:t-g.bottom,x2:o-g.right,y2:t-g.bottom,...Er,...d==null?void 0:d.axis}),r.jsx("line",{x1:g.left,y1:g.top,x2:g.left,y2:t-g.bottom,...Er,...d==null?void 0:d.axis}),e.labels.map((x,T)=>{const v=g.left+(T+.5)*b,M=t-g.bottom+20;return r.jsx("text",{x:v,y:M,textAnchor:"middle",...Dr,...d==null?void 0:d.axisLabel,children:x},`x-label-${T}`)}),w.map((x,T)=>{const v=t-g.bottom-x/S*h;return r.jsxs(p.Fragment,{children:[r.jsx("text",{x:g.left-10,y:v,textAnchor:"end",dominantBaseline:"middle",...Dr,...d==null?void 0:d.axisLabel,children:x.toFixed(0)}),a&&r.jsx("line",{x1:g.left,y1:v,x2:o-g.right,y2:v,...kl,...d==null?void 0:d.grid})]},`y-tick-${T}`)}),e.series.map((x,T)=>x.hidden?null:r.jsx(p.Fragment,{children:x.data.map((v,M)=>{const A=v/S*h*n,P=g.left+M*b+j*(T+1)+C*T,F=t-g.bottom-A,V=e.labels[M],z=e.series.reduce((D,$)=>{const _=$.data[M];return D+(typeof _=="number"?_:0)},0),I=z>0?(v/z*100).toFixed(1):null,W=x.color?u(x.color):"black",H=D=>{const $=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:x.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:W})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:V}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:v.toLocaleString()})]}),I!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${I}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:z.toLocaleString()})]})]})]}),_=D.currentTarget.getBoundingClientRect(),B=_.left+_.width/2,N=_.top;s(B,N,$)},R=()=>{l&&l(x.name,M)};return r.jsx("rect",{x:P,y:F,width:C,height:A,fill:`url(#bar-gradient-${T})`,onMouseEnter:H,onMouseMove:H,onMouseLeave:c,onClick:R,...Rm,...d==null?void 0:d.bar},`bar-${T}-${M}`)})},`series-${T}`))]})},Pm=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onPointClick:l,showTooltip:s,hideTooltip:c,views:d})=>{const{getColor:u}=i.useTheme(),g={top:20,right:20,bottom:40,left:40},m=o-g.left-g.right,h=t-g.top-g.bottom,f=p.useMemo(()=>{let j=0;return e.series.forEach(S=>{S.data.forEach(w=>{j=Math.max(j,w)})}),j},[e]),y=f||10,k=p.useMemo(()=>{const S=[];for(let w=0;w<=5;w++){const x=y/5*w;S.push(x)}return S},[f]),b=j=>{if(j.length<2)return"";const S=j.map((x,T)=>({x:g.left+T/(e.labels.length-1)*m,y:t-g.bottom-x/y*h*n}));let w=`M ${S[0].x},${S[0].y}`;for(let x=0;x<S.length-1;x++){const T=S[x===0?x:x-1],v=S[x],M=S[x+1],A=S[x+2===S.length?x+1:x+2],P=v.x+(M.x-T.x)/6,F=v.y+(M.y-T.y)/6,V=M.x-(A.x-v.x)/6,z=M.y-(A.y-v.y)/6;w+=` C ${P},${F} ${V},${z} ${M.x},${M.y}`}return w},C=j=>{if(j.length<2)return"";const S=b(j),w=g.left,x=g.left+m,T=t-g.bottom;return`${S} L ${x},${T} L ${w},${T} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((j,S)=>{const w=j.color?u(j.color):"black";return r.jsxs("linearGradient",{id:`gradient-${S}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:w,stopOpacity:.3}),r.jsx("stop",{offset:"100%",stopColor:w,stopOpacity:0})]},`gradient-${S}`)})}),r.jsx("line",{x1:g.left,y1:t-g.bottom,x2:o-g.right,y2:t-g.bottom,...Er,...d==null?void 0:d.axis}),r.jsx("line",{x1:g.left,y1:g.top,x2:g.left,y2:t-g.bottom,...Er,...d==null?void 0:d.axis}),e.labels.map((j,S)=>{const w=g.left+S/(e.labels.length-1)*m,x=t-g.bottom+20;return r.jsx("text",{x:w,y:x,textAnchor:"middle",...Dr,...d==null?void 0:d.axisLabel,children:j},`x-label-${S}`)}),k.map((j,S)=>{const w=t-g.bottom-j/y*h;return r.jsxs(p.Fragment,{children:[r.jsx("text",{x:g.left-10,y:w,textAnchor:"end",dominantBaseline:"middle",...Dr,...d==null?void 0:d.axisLabel,children:j.toFixed(0)}),a&&r.jsx("line",{x1:g.left,y1:w,x2:o-g.right,y2:w,...kl,...d==null?void 0:d.grid})]},`y-tick-${S}`)}),e.series.map((j,S)=>{if(j.hidden)return null;const w=j.color?u(j.color):"black";return r.jsxs(p.Fragment,{children:[r.jsx("path",{d:C(j.data),fill:`url(#gradient-${S})`,...d==null?void 0:d.area}),r.jsx("path",{d:b(j.data),stroke:w,...Fm,...d==null?void 0:d.line}),j.data.map((x,T)=>{const v=g.left+T/(e.labels.length-1)*m,M=t-g.bottom-x/y*h*n,A=e.labels[T],P=e.series.reduce((R,D)=>{const $=D.data[T];return R+(typeof $=="number"?$:0)},0),F=P>0?(x/P*100).toFixed(1):null,V=T>0&&typeof j.data[T-1]=="number"?j.data[T-1]:null,z=typeof V=="number"?x-V:null,I=typeof z=="number"?`${z>=0?"+":""}${z.toLocaleString()}`:null,W=R=>{const D=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:j.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:w})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:A}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:x.toLocaleString()})]}),I!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Change"}),r.jsx(i.Text,{fontWeight:"medium",children:I})]}),F!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${F}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:P.toLocaleString()})]})]})]}),$=R.currentTarget.getBoundingClientRect(),_=$.left+$.width/2,B=$.top+$.height/2;s(_,B,D)},H=()=>{l&&l(j.name,T)};return r.jsx("circle",{cx:v,cy:M,fill:w,onMouseEnter:W,onMouseMove:W,onMouseLeave:c,onClick:H,...zm,...d==null?void 0:d.point},`point-${S}-${T}`)})]},`series-${S}`)})]})},Em=({dataPoints:e,width:o,height:t,animationProgress:n,isDonut:a=!1,onSliceClick:l,showTooltip:s,hideTooltip:c,views:d})=>{const{getColor:u}=i.useTheme(),{ref:g,relation:m}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),h=p.useRef(null);p.useEffect(()=>{h.current&&g&&(g.current=h.current)},[h,g]);const y=Math.min(o,t)/2*.8,k=o/2,b=t/2,C=a?y*.6:0,j=p.useMemo(()=>e.filter(x=>!x.hidden),[e]),S=p.useMemo(()=>j.reduce((x,T)=>x+T.value,0),[j]),w=p.useMemo(()=>{if(S===0)return[{path:a?[`M ${k} ${b-y}`,`A ${y} ${y} 0 1 1 ${k} ${b+y}`,`A ${y} ${y} 0 1 1 ${k} ${b-y}`,`M ${k} ${b-C}`,`A ${C} ${C} 0 1 0 ${k} ${b+C}`,`A ${C} ${C} 0 1 0 ${k} ${b-C}`,"Z"].join(" "):[`M ${k} ${b}`,`M ${k} ${b-y}`,`A ${y} ${y} 0 1 1 ${k} ${b+y}`,`A ${y} ${y} 0 1 1 ${k} ${b-y}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:k,labelY:b,startAngle:0,endAngle:Math.PI*2,index:-1}];const x=[];let T=-Math.PI/2;for(let v=0;v<j.length;v++){const A=j[v].value/S,P=A*2*Math.PI*n,V=Math.max(0,P-.02),z=T+V,I=k+Math.cos(T)*y,W=b+Math.sin(T)*y,H=k+Math.cos(z)*y,R=b+Math.sin(z)*y,D=k+Math.cos(T)*C,$=b+Math.sin(T)*C,_=k+Math.cos(z)*C,B=b+Math.sin(z)*C,N=V>Math.PI?1:0;let Y;a?Y=[`M ${I} ${W}`,`A ${y} ${y} 0 ${N} 1 ${H} ${R}`,`L ${_} ${B}`,`A ${C} ${C} 0 ${N} 0 ${D} ${$}`,"Z"].join(" "):Y=[`M ${k} ${b}`,`L ${I} ${W}`,`A ${y} ${y} 0 ${N} 1 ${H} ${R}`,"Z"].join(" ");const ee=T+V/2,L=a?(y+C)/2:y*.7,E=k+Math.cos(ee)*L,O=b+Math.sin(ee)*L,K=`${(A*100).toFixed(1)}%`,U=j[v].color||Ho[v%Ho.length],J=u(U);x.push({path:Y,color:J,label:j[v].label,value:j[v].value,percentage:K,labelX:E,labelY:O,startAngle:T,endAngle:z,index:v,originalIndex:e.findIndex(Z=>Z.label===j[v].label)}),T=z}return x},[j,S,y,k,b,C,n,a,e]);return r.jsxs("svg",{ref:h,width:o,height:t,style:{overflow:"visible"},children:[a&&r.jsxs("g",{pointerEvents:"none",children:[r.jsx("circle",{cx:k,cy:b,r:C,fill:"white"}),r.jsx("text",{x:k,y:b-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),r.jsx("text",{x:k,y:b+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:S.toLocaleString()})]}),w.map((x,T)=>{const v=P=>{const F=S>0?x.value/S*100:0,V=S>0?Math.max(0,100-F):null,z=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:x.label}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:x.color})]}),r.jsxs(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",x.index+1," of ",j.length]}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:x.value.toLocaleString()})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:x.percentage})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Total"}),r.jsx(i.Text,{fontWeight:"medium",children:S.toLocaleString()})]}),V!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Remaining"}),r.jsx(i.Text,{fontWeight:"medium",children:`${V.toFixed(1)}%`})]})]})]});let I=P.clientX,W=P.clientY;if(h.current){const H=h.current.getBoundingClientRect();I=H.left+x.labelX,W=H.top+x.labelY}s(I,W,z)},M=()=>{x.index!==-1&&l&&l(e[x.index],x.index)},A=x.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:x.path,fill:x.color,onMouseEnter:A?void 0:v,onMouseMove:A?void 0:v,onMouseLeave:A?void 0:c,onClick:M,...br,style:{...br==null?void 0:br.style,cursor:A?"default":"pointer"},...d==null?void 0:d.pie}),!A&&x.endAngle-x.startAngle>.25&&r.jsx("text",{x:x.labelX,y:x.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"11px",fontWeight:"800",pointerEvents:"none",paintOrder:"stroke",stroke:"rgba(0,0,0,0.2)",strokeWidth:"2px",children:x.percentage})]},`slice-${T}`)})]})},Dm=({visible:e,x:o,y:t,content:n,maxDistance:a=100,views:l})=>{const s=p.useRef(null),[c,d]=p.useState({left:0,top:0});return p.useEffect(()=>{if(!e||!s.current||typeof window>"u"||typeof s.current.getBoundingClientRect!="function")return;const g=s.current.getBoundingClientRect(),m=g.width||200,h=g.height||100,f=20,y=16;let k=o-m/2,b=t-h-f;b<y&&(b=t+f),k+m>window.innerWidth-y?k=window.innerWidth-m-y:k<y&&(k=y),b=Math.max(y,Math.min(b,window.innerHeight-h-y)),d({left:k,top:b})},[e,o,t]),e?r.jsx(i.View,{ref:s,position:"fixed",left:`${c.left}px`,top:`${c.top}px`,...xr,...l==null?void 0:l.tooltip,style:{...xr==null?void 0:xr.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},$m=({type:e,data:o,dataPoints:t,title:n,showLegend:a=!0,legendPosition:l="bottom",showGrid:s=!0,showTooltips:c=!0,animated:d=!0,animationDuration:u=500,responsive:g=!0,aspectRatio:m=16/9,width:h=200,height:f=200,views:y,onDataPointClick:k,onSeriesClick:b,isLoading:C=!1,error:j,noData:S,loadingIndicator:w,errorIndicator:x,noDataIndicator:T,"aria-label":v,themeMode:M,...A})=>{const{animationProgress:P,tooltip:F,containerRef:V,processedData:z,showTooltip:I,hideTooltip:W,getChartDimensions:H,toggleSeries:R}=Vm({data:o,dataPoints:t,animated:d,animationDuration:u,showTooltips:c}),D=z(),{width:$,height:_}=H(),B=h||$,N=f||(g?$/m:_),Y=()=>{if(!a||!D)return null;let J=[];return e==="pie"||e==="donut"?Array.isArray(D)&&(J=D):D&&D.series&&(J=D.series),!J||J.length===0?null:r.jsx(i.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:l==="bottom"?"16px":0,marginBottom:l==="top"?"16px":0,...wm,...y==null?void 0:y.legend,children:J.map((Z,te)=>{const G=Z.hidden,oe=Z.name||Z.label;return r.jsxs(i.View,{...vm,onClick:()=>R(oe),opacity:G?.4:1,...y==null?void 0:y.legendItem,children:[r.jsx(i.View,{backgroundColor:Z.color,...Tm,opacity:G?.3:1}),r.jsx(i.Text,{...Im,textDecoration:G?"line-through":"none",children:oe})]},`legend-${te}`)})})},ee=()=>{if(!D)return null;switch(e){case"bar":return r.jsx(Am,{data:D,width:B,height:N,animationProgress:P,showGrid:s,onBarClick:b,showTooltip:I,hideTooltip:W,views:y});case"line":case"area":return r.jsx(Pm,{data:D,width:B,height:N,animationProgress:P,showGrid:s,onPointClick:b,showTooltip:I,hideTooltip:W,views:y});case"pie":case"donut":return r.jsx(Em,{dataPoints:D,width:B,height:N,animationProgress:P,isDonut:e==="donut",onSliceClick:k,showTooltip:I,hideTooltip:W,views:y});default:return null}},L=()=>C?r.jsx(i.View,{...Mm,...y==null?void 0:y.loadingOverlay,children:w||r.jsx(i.Center,{children:r.jsx(ao,{size:"lg"})})}):null,E=()=>j?r.jsx(i.View,{...Wm,...y==null?void 0:y.errorOverlay,children:x||r.jsx(i.Text,{fontWeight:"medium",children:typeof j=="string"?j:"An error occurred"})}):null,O=()=>S?r.jsx(i.View,{...Hm,...y==null?void 0:y.noDataOverlay,children:T||r.jsx(i.Text,{children:typeof S=="string"?S:"No data available"})}):null,K=v??(typeof n=="string"?n:"Chart"),U=!j&&!C&&!S;return r.jsxs(i.View,{ref:V,role:"region","aria-label":K,"aria-busy":C,...Sm,...y==null?void 0:y.container,...A,children:[n&&r.jsx(i.Text,{...jm,children:n}),U&&l==="top"&&Y(),r.jsxs(i.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[U&&ee(),L(),E(),O(),r.jsx(Dm,{visible:c&&F.visible,x:F.x,y:F.y,content:F.content,maxDistance:100,views:y})]}),U&&l==="bottom"&&Y()]})},Lm=e=>r.jsx($m,{...e}),_m=Lm,Bm=(e=365)=>{const[o,t]=p.useState(!1),[n,a]=p.useState(null),l="app-studio-cookie-consent";p.useEffect(()=>{if(typeof localStorage>"u")return;const u=localStorage.getItem(l);a(u!==null?u==="true":!1)},[]);const s=u=>{if(typeof localStorage<"u"){localStorage.setItem(l,String(u));const g=new Date;g.setDate(g.getDate()+e),localStorage.setItem(`${l}-expires`,g.toISOString())}a(u)};return{isHovered:o,setIsHovered:t,hasConsent:n,acceptCookies:()=>{s(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(l),localStorage.removeItem(`${l}-expires`)),a(!1)}}},Om=e=>({default:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-gray-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-gray-600",borderColor:"color-gray-300",hoverBackgroundColor:"color-gray-100"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-800",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}},primary:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-700"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-700",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}}}),Nm=({title:e="Nous utilisons des cookies",description:o="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:t="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:l="default",onAccept:s,onCustomize:c,views:d,showCustomizeButton:u=!0,cookieExpiration:g=365,themeMode:m,...h})=>{const{themeMode:f}=i.useTheme(),{hasConsent:y,acceptCookies:k}=Bm(g),C=Om()[l];if(y)return null;const j=()=>{k(),s&&s()},S=()=>{c&&c()};return r.jsx(i.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...a==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...C.container,...d==null?void 0:d.container,...h,children:r.jsxs(i.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&r.jsx(i.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...d==null?void 0:d.title,children:e}),o&&r.jsx(i.Text,{fontSize:14,color:"color-black",...d==null?void 0:d.description,children:o}),r.jsxs(i.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...d==null?void 0:d.buttonGroup,children:[u&&r.jsx(ce,{variant:"outline",onClick:S,size:"sm",...d==null?void 0:d.customizeButton,children:n}),r.jsx(ce,{variant:"filled",onClick:j,size:"sm",...d==null?void 0:d.acceptButton,children:t})]})]})})},qm=e=>r.jsx(Nm,{...e}),Um=qm,Gm=e=>{const{size:o,variant:t,onOpenChange:n}=e||{},[a,l]=p.useState(!1),[s,c]=p.useState({x:0,y:0}),[d,u]=p.useState(null),g=p.useRef(null),m=p.useRef(null),h=p.useMemo(()=>Ot("contextmenu-content"),[]),f=p.useCallback(k=>{c({x:k.clientX,y:k.clientY}),l(!0),n==null||n(!0)},[n]),y=p.useCallback(()=>{l(!1),u(null),n==null||n(!1)},[n]);return p.useEffect(()=>{const k=j=>{m.current&&!m.current.contains(j.target)&&y()},b=()=>{a&&y()},C=j=>{j.key==="Escape"&&a&&y()};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",k),window.addEventListener("resize",b),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",k),window.removeEventListener("resize",b),document.removeEventListener("keydown",C)}},[a,y]),{isOpen:a,setIsOpen:l,position:s,setPosition:c,activeSubmenuId:d,setActiveSubmenuId:u,size:o,variant:t,triggerRef:g,contentRef:m,contentId:h,openMenu:f,closeMenu:y}},Bn={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},Ym={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},On={hover:{backgroundColor:"color-gray-100"}},Cl=p.createContext({isOpen:!1,setIsOpen:()=>{},position:{x:0,y:0},setPosition:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null},contentRef:{current:null},contentId:"contextmenu-content",closeMenu:()=>{},openMenu:()=>{}}),Km=({children:e,value:o})=>r.jsx(Cl.Provider,{value:o,children:e}),$r=()=>{const e=p.useContext(Cl);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Sl=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:n=!1,views:a,...l})=>{const{triggerRef:s,contentId:c,openMenu:d}=$r(),g={ref:s,onContextMenu:m=>{if(!n)if(o&&m.preventDefault(),d)d(m);else{const{setIsOpen:h,setPosition:f}=$r();f({x:m.clientX,y:m.clientY}),h(!0)}},"aria-controls":c,"aria-haspopup":"menu","data-disabled":n?"":void 0,...t&&p.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...l};if(t&&p.isValidElement(e)){const m=p.Children.only(e);return p.cloneElement(m,{...g,...m.props})}return r.jsx(i.View,{...g,children:e})},pn=({items:e,children:o,position:t,side:n="right",align:a="start",views:l,style:s,...c})=>{const{isOpen:d,position:u,contentRef:g,contentId:m,variant:h}=$r(),f=p.useRef(null),y=g||f,{ref:k,relation:b}=i.useElementPosition({}),[C,j]=p.useState({x:0,y:0});if(p.useEffect(()=>{if(d&&y.current){const w=t||u,x=y.current.offsetWidth,T=y.current.offsetHeight,v=window.innerWidth,M=window.innerHeight;let A=w.x,P=w.y;b&&(b.space.horizontal==="left"?A=w.x-x:A=w.x,b.space.vertical==="top"?P=w.y-T:P=w.y),A+x>v&&(A=v-x-8),A<8&&(A=8),P+T>M&&(P=M-T-8),P<8&&(P=8),j({x:A,y:P})}},[d,u,t,n,a,y,b]),!d)return null;const S={position:"fixed",top:`${C.y}px`,left:`${C.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(i.View,{id:m||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...S,...s},...Ym[h],...l==null?void 0:l.menu,...l==null?void 0:l.content,...c,children:[e&&e.map((w,x)=>w.divider?r.jsx(wl,{views:l},`divider-${x}`):r.jsx(jl,{item:w,views:l},w.id)),o]})},jl=({item:e,children:o,onSelect:t,isDisabled:n=!1,views:a,variant:l,shape:s,isLoading:c,loaderProps:d,loaderPosition:u,icon:g,iconPosition:m,isFilled:h,isAuto:f,isIconRounded:y,isHovered:k,shadow:b,ariaLabel:C,animation:j,textColor:S,reversed:w,borderMovingDuration:x,borderMovingGradientColors:T,animatedStrokeAccentColor:v,animatedStrokeTextColor:M,to:A,isExternal:P,config:F,...V})=>{const{activeSubmenuId:z,setActiveSubmenuId:I,size:W,closeMenu:H}=$r();if(e){const[$,_]=p.useState(!1),B=e.items&&e.items.length>0,N=z===e.id,[Y,ee]=p.useState({x:0,y:0}),L=e.disabled||n,E=()=>{_(!0),B&&I(e.id)},O=()=>{_(!1)},K=()=>{L||!B&&e.onClick&&(e.onClick(),H&&H())},{ref:U,relation:J}=i.useElementPosition({});return p.useEffect(()=>{if(N&&U.current){const Z=U.current.getBoundingClientRect(),te=window.innerWidth,G=200;let oe=!1;if(J)oe=J.space.horizontal==="left";else{const le=te-Z.right,de=Z.left;oe=le<G&&de>le}ee({x:oe?Z.left-G:Z.right,y:Z.top})}},[N,e.items,J]),r.jsxs(i.View,{ref:U,role:"menuitem",display:"flex",alignItems:"center",cursor:L?"not-allowed":"pointer",opacity:L?.5:1,position:"relative","aria-disabled":L,"data-disabled":L?"":void 0,...Bn[W],_hover:L?{}:On.hover,backgroundColor:$&&!L?"color-gray-100":"transparent",onMouseEnter:E,onMouseLeave:O,onClick:K,...a==null?void 0:a.item,...V,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),B&&r.jsx(i.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:r.jsx(ue,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),N&&B&&r.jsx(pn,{items:e.items||[],position:Y,side:"right",align:"start",views:a})]})}const R=$=>{n||(t==null||t($),H&&H())},D=A?{as:"a",href:A,color:"inherit",textDecoration:"none",...P?{target:"_blank",rel:"noopener noreferrer"}:{}}:{};return r.jsx(i.View,{role:"menuitem",onClick:R,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...Bn[W],_hover:n?{}:On.hover,...D,...a==null?void 0:a.item,...V,children:o})},wl=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),Xm=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),Jm=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,views:l,themeMode:s,onOpenChange:c,...d})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(Sl,{disableNativeContextMenu:a,views:l,...d,children:e}),r.jsx(pn,{items:o,views:l})]}),Qm=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:l,views:s,...c})=>{const d=Gm({size:t,variant:n,onOpenChange:l}),{isOpen:u,setIsOpen:g,position:m,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,triggerRef:k,contentRef:b,contentId:C,openMenu:j,closeMenu:S}=d;return r.jsx(Km,{value:{isOpen:u,setIsOpen:g,position:m,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,size:t,variant:n,triggerRef:k,contentRef:b,contentId:C,openMenu:j,closeMenu:S,styles:s},children:r.jsx(Jm,{items:o,size:t,variant:n,disableNativeContextMenu:a,views:s,...c,children:e})})},qo=Qm;qo.Trigger=Sl;qo.Content=pn;qo.Item=jl;qo.Divider=wl;qo.Separator=Xm;const Zm=({src:e,color:o,views:t,themeMode:n,...a})=>{const{getColor:l,themeMode:s}=i.useTheme(),c=o?{fill:l(o,{themeMode:s}),stroke:l(o,{themeMode:s})}:{};return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...t==null?void 0:t.container,children:r.jsx(i.Image,{...c,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},e0=({path:e,...o})=>r.jsx(i.Image,{src:e,...o}),Nn=(e,o)=>o?Array.isArray(e)?e:e===""?[]:[e]:Array.isArray(e)?e[0]??"":e,vl=({placeholder:e,isMulti:o,options:t,value:n,defaultValue:a,id:l})=>{const s=p.useId().replace(/[^a-zA-Z0-9_-]/g,""),c=l??`select-${s}`,d=n!==void 0,[u,g]=p.useState(!1),[m,h]=p.useState(!1),[f,y]=p.useState(()=>a!==void 0?Nn(a,o):o?[]:e?"":Array.isArray(t)&&t.length>0?t[0].value:""),k=d?Nn(n,o):f,b=p.useCallback(x=>{d||y(x)},[d]),[C,j]=p.useState(0),[S,w]=p.useState(!0);return{id:c,value:k,setValue:b,hide:S,setHide:w,isHovered:u,setIsHovered:g,isFocused:m,setIsFocused:h,highlightedIndex:C,setHighlightedIndex:j}},zt=({children:e,views:o={helperText:{}},...t})=>r.jsx(i.Text,{fontSize:"11px",fontWeight:"400",letterSpacing:"-0.01em",lineHeight:"16px",marginVertical:0,marginHorizontal:0,color:"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...o.helperText,...t,children:e}),Je=p.forwardRef(({children:e,helperText:o,error:t=!1,views:n,...a},l)=>r.jsxs(i.Vertical,{ref:l,gap:4,position:"relative",width:"100%",boxSizing:"border-box",marginVertical:0,...a,...n==null?void 0:n.container,children:[e,!t&&o&&r.jsx(zt,{marginTop:0,...n==null?void 0:n.helperText,children:o}),t&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",marginTop:0,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"color 0.2s ease, opacity 0.2s ease",...n==null?void 0:n.error,children:t})]}));Je.displayName="FieldContainer";const o0={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},r0={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},t0={outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},default:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},none:{border:"none",style:{backgroundColor:"transparent"},color:"inherit",transition:"background-color 0.2s ease"}},n0={xs:{minHeight:24,paddingVertical:4,paddingHorizontal:10},sm:{minHeight:32,paddingVertical:7,paddingHorizontal:10},md:{minHeight:40,paddingVertical:9,paddingHorizontal:12},lg:{minHeight:48,paddingVertical:11,paddingHorizontal:14},xl:{minHeight:56,paddingVertical:13,paddingHorizontal:16}},a0=e=>{const{minHeight:o,paddingVertical:t,paddingHorizontal:n}=n0[e];return{minHeight:`${o}px`,paddingTop:`${t}px`,paddingBottom:`${t}px`,paddingLeft:`${n}px`,paddingRight:`${n}px`}},io=({label:e,shadow:o,children:t,value:n,size:a="md",shape:l="default",variant:s="default",error:c=!1,showLabel:d=!1,isFocused:u=!1,isHovered:g=!1,isDisabled:m=!1,isReadOnly:h=!1,views:f={pickerBox:{}},...y})=>{const{themeMode:k}=i.useTheme(),b=k==="dark",j=c?"color-red-500":(g||u)&&!m?"theme-primary":"color-gray-200";return r.jsx(i.Horizontal,{gap:8,width:"100%",boxSizing:"border-box",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:j,backgroundColor:b?"color-gray-900":"color-white",fontSize:i.Typography.fontSizes[a],cursor:m?"not-allowed":h?"auto":"text",opacity:m?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...a0(a),...typeof o=="object"&&o!==null?o:{},...o0[l],...t0[s],...f==null?void 0:f.container,...y,children:t})},lr=({children:e,...o})=>r.jsx(i.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),l0={h1:{fontSize:96,letterSpacing:-1.5},h2:{fontSize:60,letterSpacing:-.5},h3:{fontSize:48,letterSpacing:0},h4:{fontSize:34,letterSpacing:.25},h5:{fontSize:24,letterSpacing:0},h6:{fontSize:20,letterSpacing:.15}},i0=({children:e,heading:o,isItalic:t=!1,isUnderlined:n=!1,isStriked:a=!1,weight:l="normal",size:s="sm",dropDown:c,error:d,isDisabled:u,helperText:g,views:m,...h})=>{const f=o?l0[o]:{};return r.jsx(i.Element,{as:"label",width:"100%",fontSize:s,fontStyle:t?"italic":"normal",fontWeight:i.Typography.fontWeights[l],textDecoration:a?"line-through":n?"underline":"none",...d?{color:"color-red-500"}:u?{color:"color-gray-400"}:{},...u?{cursor:"not-allowed"}:{},...f,...h,children:e})},s0=e=>r.jsx(i0,{...e}),ur=s0,yo=({children:e,size:o="md",error:t=!1,color:n="theme-primary",views:a={label:{}},helperText:l,...s})=>r.jsx(ur,{position:"static",fontSize:r0[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,color:t?"color-red-500":"inherit",transition:"color 0.2s ease",...a.label,...s,children:e}),Uo=({children:e,...o})=>r.jsx(i.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",boxSizing:"border-box",...o,children:e}),Tl={xs:12,sm:14,md:16,lg:18,xl:20},c0={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},d0={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},u0={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},kr={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},qn={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},p0={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},m0={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},g0=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},h0=({isHovered:e,setIsHovered:o=()=>{},option:t,size:n="md",callback:a=()=>{},style:l,isSelected:s=!1,...c})=>{const d=(m,h)=>{m.stopPropagation(),m.preventDefault(),typeof a=="function"&&a(h)},u=()=>o(!e),g=()=>s&&e?kr.selectedHighlighted:s?kr.selected:e?kr.highlighted:kr.default;return r.jsxs(i.Element,{as:"li",role:"option","aria-selected":s,display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...u0,...g(),onMouseEnter:u,onMouseLeave:u,onClick:m=>d(m,t.value),...c,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[n],fontWeight:s?"500":"400",lineHeight:"14px",color:s?"color-gray-900":"color-gray-700",...l,children:t.label}),s&&r.jsx(i.Element,{as:"span","aria-hidden":"true",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},f0=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:n,placeholder:a,removeOption:l=()=>{},options:s})=>{const c=(o==null?void 0:o.field)||{},d=(o==null?void 0:o.text)||{},u=Array.isArray(t)&&t.length>0,g={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:0,paddingHorizontal:0,fontSize:i.Typography.fontSizes[e],fontWeight:"400",letterSpacing:"-0.01em",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease-in-out",...u?{}:{maxLines:1,minWidth:0},...c,...d,style:{backgroundColor:"transparent",...c.style,...d.style}},m=s.length>0&&s.find(h=>h.value===t);return r.jsx(i.Text,{...g,children:(t===""||Array.isArray(t)&&t.length===0)&&a?a:r.jsx(r.Fragment,{children:typeof t=="string"?(m&&m.label)??t:Array.isArray(t)&&t.length>0?r.jsx(i.Horizontal,{gap:6,children:t.map(h=>r.jsx(b0,{option:h,removeOption:l},h))}):r.jsx("span",{children:t})})})},y0=({id:e,name:o,value:t,onChange:n,isMulti:a=!1,isDisabled:l=!1,isReadOnly:s=!1,options:c=[],defaultValue:d,...u})=>{const g=m=>{n&&n(a?Array.from(m.target.selectedOptions,h=>h.value):m.target.value)};return r.jsx(i.Element,{id:e,name:o,as:"select",opacity:0,width:1,height:1,overflow:"hidden",position:"absolute",pointerEvents:"none",tabIndex:-1,"aria-hidden":"true",value:t,disabled:l,readOnly:s,onChange:g,multiple:a,...u,children:c.length>0&&c.map(m=>r.jsx("option",{value:m.value,children:m.label},m.value))})},x0=({size:e,views:o={},options:t,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:l=()=>{},selectedValue:s,listboxId:c,getOptionId:d})=>{const u=m=>n(m),g=m=>Array.isArray(s)?s.includes(m):s===m;return r.jsx(i.Element,{as:"ul",role:"listbox",id:c,display:"flex",flexDirection:"column",margin:0,padding:"4px",...c0,style:m0,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((m,h)=>r.jsx(h0,{id:d?d(h):void 0,size:e,style:o.text,option:m,callback:u,isSelected:g(m.value),isHovered:h===a,setIsHovered:()=>{},onMouseEnter:()=>l(h)},m.value))})},b0=({option:e,size:o="md",removeOption:t=()=>{},...n})=>{const a=()=>t(e);return r.jsxs(i.Horizontal,{gap:6,alignItems:"center",onClick:l=>l.stopPropagation(),...p0,_hover:{backgroundColor:"color-gray-200"},...n,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(i.Element,{as:"button",type:"button","aria-label":`Remove ${e}`,onClick:a,display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",transition:"all 0.2s ease-in-out",_hover:{color:"color-gray-700"},children:r.jsx(We,{color:"inherit",widthHeight:Tl[o]})})]})},Il=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:s=!1,error:c=!1,isMulti:d=!1,isFocused:u=!1,isHovered:g=!1,isDisabled:m=!1,isReadOnly:h=!1,isRequired:f=!1,isAutoFocus:y=!1,options:k=[],shadow:b={},size:C="md",shape:j="default",variant:S="default",views:w={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:x=()=>{},setHide:T=()=>{},setValue:v=()=>{},setIsHovered:M=()=>{},setIsFocused:A=()=>{},setHighlightedIndex:P,highlightedIndex:F,isScrollable:V,"aria-label":z,...I})=>{const W=p.useId(),H=e??`select-${W.replace(/[^a-zA-Z0-9_-]/g,"")}`,R=`${H}-native`,D=`${H}-label`,$=`${H}-listbox`,_=G=>`${H}-option-${G}`,{ref:B,relation:N,updateRelation:Y}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),ee=p.useRef(null),L=()=>{var de;if(!B.current)return{};const G=B.current.getBoundingClientRect(),oe={position:"fixed",left:G.left,width:G.width,zIndex:1e4};return((de=N==null?void 0:N.space)==null?void 0:de.vertical)==="top"?{...oe,bottom:window.innerHeight-G.top+8}:{...oe,top:G.bottom+8}};p.useEffect(()=>{const G=()=>T(!0);return document.addEventListener("closeAllSelects",G),()=>document.removeEventListener("closeAllSelects",G)},[T]),p.useEffect(()=>{var G;y&&!m&&!h&&((G=B.current)==null||G.focus())},[]),p.useEffect(()=>{const G=oe=>{!oe.target.closest(`#${H}`)&&!s&&T(!0)};return document.addEventListener("click",G),()=>{document.removeEventListener("click",G)}},[H,s,T]);const E=()=>M(!g),O=()=>A(!0),K=G=>{document.dispatchEvent(new Event("closeAllSelects")),G&&G.stopPropagation&&G.stopPropagation();const oe=!s;T(oe),A(!oe)},U=p.useCallback(G=>{if(T(!0),document.dispatchEvent(new Event("closeAllSelects")),d&&Array.isArray(n)){if(!n.includes(G)){const oe=[...n,G];v(oe),x&&x(oe)}}else v(G),x&&x(G);A(!0)},[d,n,T,v,x,A]),J=G=>{if(Array.isArray(n)&&n.includes(G)){const oe=n.filter(le=>le!==G);v(oe),x&&x(oe)}},Z=!!t,te=g0(w);return r.jsx(Je,{ref:B,position:"relative",width:"100%",display:"inline-block",id:H,role:"combobox","aria-haspopup":"listbox","aria-expanded":!s,"aria-labelledby":!z&&Z?D:void 0,"aria-label":z,"aria-controls":$,"aria-activedescendant":!s&&k.length>0?_(F??0):void 0,"aria-disabled":m||void 0,"aria-required":f||void 0,tabIndex:m||h?-1:0,helperText:l,error:c,views:te,onKeyDown:G=>{if(m||h||G.target!==G.currentTarget)return;if(s){(G.key==="Enter"||G.key===" "||G.key==="ArrowDown")&&(G.preventDefault(),document.dispatchEvent(new Event("closeAllSelects")),T(!1),A(!0));return}const oe=F??0;if(G.key==="ArrowDown")G.preventDefault(),P==null||P(Math.min(oe+1,k.length-1));else if(G.key==="ArrowUp")G.preventDefault(),P==null||P(Math.max(oe-1,0));else if(G.key==="Enter"){G.preventDefault();const le=k[oe];le&&U(le.value)}else G.key==="Escape"&&(G.preventDefault(),T(!0))},onClick:G=>{G.stopPropagation(),m||h||K(G)},children:r.jsxs(io,{label:t,size:C,error:c,shape:j,views:w,shadow:b,variant:S,value:n,color:"theme-primary",isHovered:g,isDisabled:m,isReadOnly:h,isFocused:u,showLabel:Z,onMouseEnter:E,onMouseLeave:E,position:"relative",...w==null?void 0:w.content,children:[r.jsxs(Uo,{children:[Z&&r.jsx(yo,{id:D,htmlFor:R,color:"theme-primary",error:c,...w==null?void 0:w.label,children:t}),r.jsx(y0,{id:R,name:o,options:k,onChange:x,value:n,isDisabled:m,isReadOnly:h,isMulti:d,required:f||void 0,onFocus:O,...I}),r.jsx(f0,{options:k,size:C,views:w,value:n,isDisabled:m,placeholder:a,removeOption:J})]}),r.jsx(lr,{children:!h&&!m&&r.jsx(i.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:s?qn.closed:qn.open,children:r.jsx(ue,{color:"inherit",widthHeight:Tl[C],style:w.icon,orientation:"down"})})}),!s&&k.length>0&&r.jsx(Yt,{children:r.jsx(i.Element,{ref:ee,onClick:G=>G.stopPropagation(),style:{...L(),...d0.enter},children:r.jsx(x0,{size:C,views:w,options:k,callback:U,highlightedIndex:F,setHighlightedIndex:P,selectedValue:n,listboxId:$,getOptionId:_})})})]})})},k0=e=>{const o=fe("select",e),t={...o,options:o.options||[]},n=vl(t);return r.jsx(Il,{...n,...t,value:n.value,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},ir=k0,Rl=({isDisabled:e,isChecked:o})=>{const[t,n]=p.useState(!1),[a,l]=p.useState(o||!1),[s,c]=p.useState(o||!1);return p.useEffect(()=>{o!==void 0&&(l(o),c(o))},[o]),{isHovered:t,setIsHovered:n,on:a,setOn:l,value:s,setValue:c}},Un={xs:{height:"10px",width:"10px"},sm:{height:"14px",width:"14px"},md:{height:"18px",width:"18px"},lg:{height:"22px",width:"22px"},xl:{height:"26px",width:"26px"}},C0={xs:{height:"20px",width:"40px"},sm:{height:"24px",width:"48px"},md:{height:"28px",width:"56px"},lg:{height:"32px",width:"64px"},xl:{height:"36px",width:"72px"}},S0={xs:{height:"22px",width:"52px"},sm:{height:"26px",width:"62px"},md:{height:"30px",width:"72px"},lg:{height:"34px",width:"84px"},xl:{height:"38px",width:"96px"}},j0={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},Cr={xs:{paddingVertical:5,paddingHorizontal:3},sm:{paddingVertical:5,paddingHorizontal:3},md:{paddingVertical:5,paddingHorizontal:5},lg:{paddingVertical:5,paddingHorizontal:5},xl:{paddingVertical:5,paddingHorizontal:5}},Ge={default:{active:"theme-primary",inactive:"color-gray-300",knob:"color-white",disabled:"color-gray-200"},states:{hover:{active:"theme-primary",inactive:"color-gray-400",activeOpacity:.9},focus:{active:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},inactive:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px color-gray-200"}}}},Gn={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},w0=e=>r.jsx(i.Input,{type:"checkbox",...e}),Fl=({id:e,name:o,label:t,inActiveChild:n,isChecked:a,activeChild:l,labelPosition:s="right",shadow:c={},size:d="sm",value:u=!1,isHovered:g=!1,isDisabled:m=!1,isReadOnly:h=!1,on:f,setOn:y=()=>{},onChange:k,setValue:b=()=>{},setIsHovered:C=()=>{},helperText:j,description:S,views:w={slider:{},circle:{},label:{}},...x})=>{const T=p.useId(),v=e??T,[M,A]=p.useState(!1),P=typeof a=="boolean"?a:u,V=!!(l||n)?S0[d]:C0[d],z=`${Cr[d].paddingHorizontal}px`,I=`${Cr[d].paddingHorizontal+2}px`,W=`calc(${Un[d].width} + ${Cr[d].paddingHorizontal}px + 4px)`,H=j0[d],R=L=>{if(!h&&!m){const E=L.target.checked;b(E),y(E),k&&k(E)}},D=()=>C(!0),$=()=>C(!1),_=L=>{let E=!0;try{E=L.target.matches(":focus-visible")}catch{}A(E)},B=()=>A(!1),N=`${v}-description`,Y={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:m?"not-allowed":h?"default":"pointer",opacity:m?.6:1,transition:"all 0.2s ease-in-out",...w.label}},ee=r.jsxs(ur,{htmlFor:v,onMouseEnter:D,onMouseLeave:$,...Y.container,children:[s==="left"&&t&&r.jsx(i.Text,{fontWeight:"500",color:m?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:t}),r.jsxs(i.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:m?Ge.default.disabled:P?g?Ge.states.hover.active:Ge.default.active:g?Ge.states.hover.inactive:Ge.default.inactive,opacity:!m&&P&&g?Ge.states.hover.activeOpacity:1,cursor:"pointer",...Gn.slider,...c,...Cr[d],...V,...w.slider,...M?P?Ge.states.focus.active:Ge.states.focus.inactive:{},children:[r.jsx(w0,{id:v,name:o,role:"switch","aria-checked":P,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:2,cursor:m?"not-allowed":h?"default":"pointer",checked:P,onChange:R,onFocus:_,onBlur:B,disabled:m,readOnly:h,"aria-describedby":S?N:void 0,...x}),l&&P&&r.jsx(i.View,{marginLeft:I,marginRight:W,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:H,color:"color-white",fontWeight:600,children:l}),r.jsx(i.View,{position:"absolute",top:"50%",left:P?void 0:z,right:P?z:void 0,borderRadius:"50%",backgroundColor:Ge.default.knob,boxShadow:g?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${g?"scale(1.05)":"scale(1)"}`,...Gn.knob,zIndex:1,...Un[d],...w.circle}),n&&!P&&r.jsx(i.View,{marginLeft:W,marginRight:I,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:H,color:"color-white",fontWeight:600,children:n})]}),s==="right"&&t&&r.jsx(i.Text,{fontWeight:"500",color:m?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:t})]});return S?r.jsxs(i.Vertical,{gap:4,width:"fit-content",children:[ee,r.jsx(i.Text,{id:N,color:"color-gray-500",fontSize:"14px",lineHeight:"20px",children:S})]}):ee},v0=e=>{const o=fe("switch",e),t=Rl(o);return r.jsx(Fl,{...t,...o})},mn=v0,zl=({placeholder:e,isMulti:o,options:t,id:n})=>{const a=p.useId().replace(/[^a-zA-Z0-9_-]/g,""),l=n??`selector-${a}`,s=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[c,d]=p.useState(!1),[u,g]=p.useState(!1),[m,h]=p.useState(s),[f,y]=p.useState(!0);return{id:l,value:m,setValue:h,hide:f,setHide:y,isHovered:c,setIsHovered:d,isFocused:u,setIsFocused:g}},Ml=({id:e,name:o,label:t,value:n,views:a={},options:l=[],helperText:s,error:c=!1,isDisabled:d=!1,isReadOnly:u=!1,onChange:g=()=>{},setValue:m=()=>{},hide:h,setHide:f,isHovered:y,setIsHovered:k,isFocused:b,setIsFocused:C,placeholder:j,isMulti:S,shape:w,variant:x,size:T,shadow:v,isScrollable:M,"aria-label":A,...P})=>{const F=p.useId(),V=e??F,z=`${V}-label`,I=`${V}-helper-text`,W=!!s,H=p.useCallback(R=>{d||u||(m(R.value),g&&g(R.value))},[m,g,d,u]);return r.jsxs(Je,{id:V,width:"100%",views:a,...P,children:[t&&r.jsxs(i.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[r.jsx(ro,{widthHeight:14})," ",r.jsx(i.Text,{id:z,children:t})]}),r.jsx(i.Horizontal,{gap:0,role:"radiogroup","aria-labelledby":!A&&t?z:void 0,"aria-label":A,"aria-describedby":W?I:void 0,"aria-readonly":u||void 0,"aria-invalid":c?!0:void 0,children:l.map((R,D,$)=>{const _=n===R.value,B=R.color??"theme-primary",N=_?B:"color-gray-200",Y=_?B:"color-gray-500",ee=D===0,L=D===$.length-1,E=L||_;return r.jsx(i.View,{as:"button",type:"button",role:"radio","aria-checked":_,disabled:d,onClick:()=>H(R),flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:_?"bold":"normal",cursor:d?"not-allowed":u?"default":"pointer",backgroundColor:"transparent",color:Y,borderStyle:"solid",borderColor:N,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:E?1:0,borderRadius:ee?"6px 0 0 6px":L?"0 6px 6px 0":"0",zIndex:_?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:R.label},R.value)})}),r.jsx("input",{type:"hidden",id:`${V}-input`,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}}),W&&r.jsx(i.Text,{id:I,fontSize:"11px",lineHeight:"16px",marginTop:0,fontWeight:c?"500":"400",color:c?"color-red-500":"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...a.helperText,children:s})]})},T0=e=>{const o={...e,options:e.options||[]},t=zl(o);return r.jsx(Ml,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},I0=T0,Wl=({label:e,placeholder:o,value:t})=>{const[n,a]=p.useState(e??o),[l,s]=p.useState(!1),[c,d]=p.useState(t||""),[u,g]=p.useState(!1);return p.useMemo(()=>{a(u&&!c?o??"":e??o)},[c,u,e,o]),{hint:n,setHint:a,isHovered:l,setIsHovered:s,value:c,setValue:d,isFocused:u,setIsFocused:g}},R0=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},F0=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const t=Number.parseFloat(e);if(Number.isFinite(t)&&e.trim().endsWith("px"))return`${Math.min(t,28)}px`}return"28px"},Hl=({id:e,name:o,hint:t,error:n,value:a,label:l,shadow:s,helperText:c,placeholder:d,size:u="sm",shape:g="default",variant:m="default",isHovered:h=!1,isFocused:f=!1,isEditable:y=!0,isReadOnly:k=!1,isDisabled:b=!1,isAutoFocus:C=!1,isRequired:j,required:S,labelProps:w,maxRows:x=3,maxCols:T=30,onBlur:v=()=>{},onChange:M,onFocus:A,setHint:P=()=>{},setValue:F=()=>{},setIsFocused:V=()=>{},setIsHovered:z=()=>{},onChangeText:I,inputRef:W,views:H={label:{},helperText:{}},...R})=>{const D=p.useId(),$=e??D,_=!!l,B={xs:{minHeight:"72px",shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:"88px",shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:"104px",shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:"120px",shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:"136px",shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},N=(H==null?void 0:H.field)||{},Y=(H==null?void 0:H.container)||{},ee=F0(Y.borderRadius,g),L={...H,container:{...Y,...ee!==void 0?{borderRadius:ee}:{},overflow:"hidden"}},E=R0(H),O={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:B[u].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:B[u].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:b?"color-gray-400":"color-gray-900",cursor:b?"not-allowed":"text",opacity:b?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...N,style:{backgroundColor:"transparent",...N.style}},K=()=>{V(!0),A&&A()},U=Z=>{v(Z),V(!1)},J=Z=>{const te=typeof Z=="string"?Z:Z.target.value;F(te),I&&I(te),M&&M(te)};return r.jsx(Je,{helperText:c,error:n,views:E,children:r.jsx(io,{label:l,size:u,error:n,shape:g,views:L,shadow:s,variant:m,value:a,color:"theme-primary",isHovered:h,isDisabled:b,isReadOnly:k,isFocused:f,showLabel:_,alignItems:"flex-start",minHeight:B[u].minHeight,paddingTop:B[u].shellPaddingY,paddingBottom:B[u].shellPaddingY,paddingLeft:B[u].shellPaddingX,paddingRight:B[u].shellPaddingX,onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),...L==null?void 0:L.content,children:r.jsxs(Uo,{...H==null?void 0:H.warper,children:[_&&r.jsx(yo,{htmlFor:$,color:"theme-primary",error:n,...w,...H==null?void 0:H.label,children:l}),r.jsx(i.Element,{ref:W,as:"textarea",id:$,name:o,rows:x,cols:T,value:a,readOnly:k||!y,disabled:b,autoFocus:C,...j??S?{required:!0,"aria-required":!0}:{},placeholder:d||t,onBlur:U,onFocus:K,onChange:Z=>J(Z),...O,...R,style:{resize:b||k||!y?"none":"vertical",...O.style,...R.style||{}},...H==null?void 0:H.textarea})]})})})},z0=e=>{const o=fe("textarea",e),t=Wl(o);return r.jsx(Hl,{...t,...o})},gn=z0,hn=({label:e,placeholder:o,value:t})=>{const[n,a]=p.useState(e??o),[l,s]=p.useState(!1),[c,d]=p.useState(!1),[u,g]=p.useState(t);return p.useMemo(()=>{a(l&&!u?o??"":e??o)},[u,l,e,o]),{hint:n,setHint:a,isFocused:l,setIsFocused:s,isHovered:c,setIsHovered:d,setValue:g,value:u}},pr=({id:e,name:o,label:t,hint:n,value:a,onChange:l,left:s,right:c,helperText:d,placeholder:u,onChangeText:g,shadow:m={},views:h={container:{},field:{},label:{},helperText:{},text:{}},size:f="md",shape:y="default",variant:k="default",error:b=!1,isFocused:C=!1,isHovered:j=!1,isDisabled:S=!1,isReadOnly:w=!1,isClearable:x=!0,isAutoFocus:T=!1,isRequired:v,required:M,labelProps:A,leftIcon:P,rightIcon:F,setHint:V=()=>{},setIsFocused:z=()=>{},setIsHovered:I=()=>{},setValue:W=()=>{},onClick:H=()=>{},onFocus:R,onBlur:D=()=>{},themeMode:$,inputRef:_,...B})=>{const N=p.useId(),Y=e??N,{getColor:ee,themeMode:L}=i.useTheme(),E=ee(S?"color-gray-400":"color-gray-500",{themeMode:$||L}),O=!!t,K={xs:{minHeight:24,shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:32,shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:40,shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:48,shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:56,shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},U=(h==null?void 0:h.field)||{},J="0 0 0 1000px var(--theme-canvas) inset",Z={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:K[f].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:S?"color-gray-400":"color-gray-900",cursor:S?"not-allowed":"text",opacity:S?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",_focus:{outline:"none",_placeholder:{opacity:.7}},_placeholder:{color:"color-gray-400",opacity:1,transition:"opacity 0.2s ease-out"},_selection:{backgroundColor:"color-mix(in srgb, var(--theme-primary) 20%, transparent)"},_webkitAutofill:{boxShadow:J,WebkitBoxShadow:J,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...U},te=()=>{z(!0),R&&R()},G=()=>I(!0),oe=()=>I(!1),le=ie=>{D&&D(ie),z(!1)},de=ie=>{typeof ie=="string"?(W(ie),g&&g(ie),l&&l(ie)):(W(ie.target.value),g&&g(ie.target.value),l&&l(ie.target.value))},Te=()=>{W(""),g&&g(""),l&&l(""),D({target:{name:o}})},{container:ae,content:re,...ne}=h||{};return r.jsx(Je,{helperText:d,error:b,views:ne,children:r.jsxs(io,{label:t,size:f,error:b,shape:y,views:h,shadow:m,variant:k,value:a,color:"theme-primary",isHovered:j,isDisabled:S,isReadOnly:w,isFocused:C,showLabel:O,onMouseEnter:G,onMouseLeave:oe,children:[s,P&&r.jsx(lr,{children:P}),r.jsxs(Uo,{children:[O&&r.jsx(yo,{htmlFor:Y,color:"theme-primary",error:b,...A,...h==null?void 0:h.label,children:t}),r.jsx(i.Input,{ref:_,type:"text",id:Y,name:o,readOnly:w,disabled:S,autoFocus:T,...v??M?{required:!0,"aria-required":!0}:{},placeholder:u||n,onFocus:te,onBlur:le,autoComplete:"off",...Z,...B,onChange:de,value:a})]}),x&&a&&!w&&!S&&r.jsx(lr,{children:r.jsx(We,{size:20,color:E,onClick:Te,cursor:"pointer",borderRadius:"50%",transition:"background-color 0.2s ease, transform 0.2s ease",_hover:{backgroundColor:"color-gray-100",transform:"scale(1.05)"},_active:{transform:"scale(0.95)"}})}),F&&r.jsx(lr,{children:F}),c]})})},M0=e=>{const o=fe("input",e),t=hn(o);return r.jsx(pr,{...t,...o})},Me=M0,Vl=({defaultIsSelected:e=!1})=>{const[o,t]=p.useState(!1),[n,a]=p.useState(e);return{isHovered:o,setIsHovered:t,isSelected:n,setIsSelected:a}},W0={xs:{height:"12px",width:"12px"},sm:{height:"16px",width:"16px"},md:{height:"20px",width:"20px"},lg:{height:"24px",width:"24px"},xl:{height:"28px",width:"28px"}},Yn={xs:10,sm:14,md:16,lg:20,xl:24},H0={selected:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},unselected:{backgroundColor:"transparent",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",color:"inherit",transition:"all 0.2s ease-in-out"},indeterminate:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},Sr={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},focus:{selected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},unselected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},indeterminate:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}},disabled:{selected:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},unselected:{borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},indeterminate:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"}},error:{selected:{backgroundColor:"color-red-500",borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"},indeterminate:{backgroundColor:"color-red-500",borderColor:"color-red-500"}}},Al=({id:e,icon:o,name:t,label:n,isChecked:a,onChange:l,onValueChange:s,shadow:c={},labelPosition:d="right",size:u="md",error:g=!1,isSelected:m=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:y=!1,isIndeterminate:k=!1,defaultIsSelected:b=!1,setIsSelected:C=()=>{},setIsHovered:j=()=>{},views:S={checkbox:{},label:{}},infoText:w,helperText:x,...T})=>{const v=p.useId(),M=e??v,A=p.useRef(null),[P,F]=p.useState(!1),V=!!(a||m);p.useEffect(()=>{A.current&&(A.current.indeterminate=k)},[k]);const z=()=>j(!h),I=()=>{!y&&!f&&(C&&C(!m),l&&l(!a),s&&s(!a))},W=k?"indeterminate":a||m?"selected":"unselected",H=g?Sr.error[W]:f?Sr.disabled[W]:h?Sr.hover[W]:{},R={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:g?"color-red-600":f?"color-gray-400":"inherit",cursor:f?"not-allowed":y?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease-in-out",...S.label},checkbox:{...H0[W],...H,borderRadius:6,...W0[u],transition:"all 0.2s ease-in-out",...c,...S.checkbox}},D=`${M}-info`,$=`${M}-error`,_=[w?D:"",g?$:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...R.container,children:[r.jsx(ur,{htmlFor:M,onMouseEnter:z,onMouseLeave:z,size:i.Typography.fontSizes[u],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&r.jsx(i.Text,{size:u,fontWeight:"500",...S==null?void 0:S.label,children:n}),r.jsxs(i.Center,{position:"relative",...R.checkbox,...P?Sr.focus[W]:{},children:[r.jsx(i.Input,{ref:A,type:"checkbox",id:M,name:t,checked:V,"aria-checked":k?"mixed":void 0,onChange:I,onFocus:()=>F(!0),onBlur:()=>F(!1),disabled:f,readOnly:y,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:f?"not-allowed":y?"default":"pointer","aria-describedby":_,...T}),k?r.jsx(Ga,{widthHeight:Yn[u],color:"color-white",transition:"opacity 0.2s ease"}):(a||m)&&(o??r.jsx(cr,{widthHeight:Yn[u],color:"color-white",transition:"opacity 0.2s ease"}))]}),d==="right"&&n&&r.jsx(i.Text,{size:u,fontWeight:"500",...S==null?void 0:S.label,children:n})]})}),w&&r.jsx(i.Text,{id:D,marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...S==null?void 0:S.infoText,children:w}),g&&r.jsx(i.Text,{id:$,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:g})]})},V0=e=>{const o=fe("checkbox",e),t=Vl(o);return r.jsx(Al,{...t,...o})},fn=V0,Pl=({defaultIsSelected:e=!1,isChecked:o})=>{const[t,n]=p.useState(!1),[a,l]=p.useState(o!==void 0?o:e);return p.useEffect(()=>{o!==void 0&&l(o)},[o]),{isHovered:t,setIsHovered:n,isSelected:a,setIsSelected:l}},A0={xs:{height:"16px",width:"16px"},sm:{height:"20px",width:"20px"},md:{height:"24px",width:"24px"},lg:{height:"28px",width:"28px"},xl:{height:"32px",width:"32px"}},P0={xs:{height:"8px",width:"8px"},sm:{height:"10px",width:"10px"},md:{height:"12px",width:"12px"},lg:{height:"14px",width:"14px"},xl:{height:"16px",width:"16px"}},E0={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},D0={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},dt={hover:{selected:{borderColor:"color-blue-600"},unselected:{borderColor:"color-gray-400"}},disabled:{selected:{borderColor:"color-gray-300",opacity:.6},unselected:{borderColor:"color-gray-300",opacity:.6}},error:{selected:{borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"}}},ut={hover:{selected:{backgroundColor:"color-blue-600"},unselected:{style:{backgroundColor:"transparent"}}},disabled:{selected:{backgroundColor:"color-gray-300",opacity:.6},unselected:{opacity:.6,style:{backgroundColor:"transparent"}}},error:{selected:{backgroundColor:"color-red-500"},unselected:{style:{backgroundColor:"transparent"}}}},El=({id:e,icon:o,name:t,label:n,value:a,isChecked:l,onChange:s,onValueChange:c,shadow:d={},labelPosition:u="right",size:g="md",error:m=!1,isSelected:h=!1,isHovered:f=!1,isDisabled:y=!1,isReadOnly:k=!1,defaultIsSelected:b=!1,setIsSelected:C=()=>{},setIsHovered:j=()=>{},views:S={radio:{},label:{}},infoText:w,helperText:x,...T})=>{const v=p.useId(),M=e??v,[A,P]=p.useState(!1),F=()=>j(!f),V=()=>{!k&&!y&&(C&&C(!0),s&&s(a??""),c&&c(a??""))},z=l||h?"selected":"unselected",I=m?dt.error[z]:y?dt.disabled[z]:f?dt.hover[z]:{},W=m?ut.error[z]:y?ut.disabled[z]:f?ut.hover[z]:{},H={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:m?"color-red-600":y?"color-gray-400":"inherit",cursor:y?"not-allowed":k?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...S.label},radio:{...E0[z],...I,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...A0[g],transition:"all 0.2s ease-in-out",...d,...S.radio},dot:{...D0[z],...W,borderRadius:"50%",...P0[g],transition:"all 0.2s ease-in-out"}},R=`${M}-info`,D=`${M}-error`,$=[w?R:"",m?D:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...H.container,children:[r.jsx(ur,{htmlFor:M,onMouseEnter:F,onMouseLeave:F,size:i.Typography.fontSizes[g],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",u==="left"&&n&&r.jsx(i.Text,{size:g,fontWeight:"500",...S==null?void 0:S.label,children:n}),r.jsxs(i.Center,{position:"relative",...H.radio,...A?{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}:{},children:[r.jsx(i.Input,{type:"radio",id:M,name:t,value:a??"",checked:!!(l||h),onChange:V,onFocus:()=>P(!0),onBlur:()=>P(!1),disabled:y,readOnly:k,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:y?"not-allowed":k?"default":"pointer","aria-describedby":$,...T}),(l||h)&&r.jsx(i.View,{...H.dot})]}),u==="right"&&n&&r.jsx(i.Text,{size:g,fontWeight:"500",...S==null?void 0:S.label,children:n})]})}),w&&r.jsx(i.Text,{id:R,marginLeft:u==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...S==null?void 0:S.infoText,children:w}),m&&r.jsx(i.Text,{id:D,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:m})]})},$0=e=>{const o=fe("radio",e),t=Pl(o);return r.jsx(El,{...t,...o})},yn=$0,L0=({value:e,defaultValue:o="",onChange:t})=>{const[n,a]=p.useState(e!==void 0?e:o);return p.useEffect(()=>{e!==void 0&&a(e)},[e]),{selectedValue:n,setSelectedValue:s=>{e===void 0&&a(s),t&&t(s)}}},_0=({children:e,name:o,label:t,helperText:n,error:a,selectedValue:l,setSelectedValue:s,direction:c="vertical",spacing:d=8,isDisabled:u=!1,isReadOnly:g=!1,views:m={container:{},label:{},helperText:{}},onChange:h,value:f,defaultValue:y,...k})=>{const b=c==="vertical"?i.Vertical:i.Horizontal,C=p.Children.map(e,T=>{if(p.isValidElement(T)){const v={name:o,isChecked:T.props.value===l,isDisabled:u||T.props.isDisabled,isReadOnly:g||T.props.isReadOnly,onChange:M=>{s(M),T.props.onChange&&T.props.onChange(M)}};return p.cloneElement(T,v)}return T}),j=p.useId(),S=`${j}-label`,w=`${j}-helper`,x=!!(n||a);return r.jsxs(i.Vertical,{gap:d,width:"100%",role:"radiogroup","aria-labelledby":t?S:void 0,"aria-describedby":x?w:void 0,"aria-invalid":a?!0:void 0,...m.container,...k,children:[t&&r.jsx(i.Text,{id:S,fontWeight:"600",fontSize:"14px",color:a?"color-red-600":"inherit",marginBottom:4,...m.label,children:t}),r.jsx(b,{gap:d,children:C}),x&&r.jsx(i.Text,{id:w,fontWeight:a?"500":"400",fontSize:"14px",lineHeight:"20px",color:a?"color-red-500":"color-gray-500",marginTop:4,transition:"color 0.2s ease, opacity 0.2s ease",...m.helperText,children:a||n})]})},B0=e=>{const o=L0(e);return r.jsx(_0,{...o,...e})},O0=B0,go=e=>Math.min(255,Math.max(0,Math.round(e))),N0=e=>{const o=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!o)return null;let t=o[1];return t.length===3&&(t=t.split("").map(n=>n+n).join("")),{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},q0=e=>{const o=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?{r:go(Number(o[1])),g:go(Number(o[2])),b:go(Number(o[3]))}:null},U0=(e,o,t)=>{const n=(e%360+360)%360,a=Math.min(100,Math.max(0,o))/100,l=Math.min(100,Math.max(0,t))/100,s=(1-Math.abs(2*l-1))*a,c=s*(1-Math.abs(n/60%2-1)),d=l-s/2;let u;return n<60?u=[s,c,0]:n<120?u=[c,s,0]:n<180?u=[0,s,c]:n<240?u=[0,c,s]:n<300?u=[c,0,s]:u=[s,0,c],{r:go((u[0]+d)*255),g:go((u[1]+d)*255),b:go((u[2]+d)*255)}},G0=e=>{const o=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?U0(Number(o[1]),Number(o[2]),Number(o[3])):null},Y0=e=>N0(e)??q0(e)??G0(e),K0=({r:e,g:o,b:t})=>{const n=e/255,a=o/255,l=t/255,s=Math.max(n,a,l),c=Math.min(n,a,l),d=s-c,u=(s+c)/2;if(d===0)return{h:0,s:0,l:Math.round(u*100)};const g=d/(1-Math.abs(2*u-1));let m;return s===n?m=(a-l)/d%6:s===a?m=(l-n)/d+2:m=(n-a)/d+4,m=Math.round(m*60),m<0&&(m+=360),{h:m,s:Math.round(g*100),l:Math.round(u*100)}},pt=e=>go(e).toString(16).padStart(2,"0"),Lr=(e,o)=>{if(!o||!e)return e;const t=Y0(e);if(!t)return e;switch(o){case"hex":return`#${pt(t.r)}${pt(t.g)}${pt(t.b)}`;case"rgb":return`rgb(${t.r}, ${t.g}, ${t.b})`;case"hsl":{const{h:n,s:a,l}=K0(t);return`hsl(${n}, ${a}%, ${l}%)`}}},Dl=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,onOpen:l,onClose:s,closeOnSelect:c=!0,maxRecentColors:d=8,showRecentColors:u=!0,isAutoFocus:g=!1,colorFormat:m}=e,[h,f]=p.useState(!1),[y,k]=p.useState(o??t),[b,C]=p.useState(""),[j,S]=p.useState([]),[w,x]=p.useState(!1),[T,v]=p.useState(!1),M=p.useRef(null),A=p.useRef(null);p.useEffect(()=>{o!==void 0&&k(o)},[o]),p.useEffect(()=>{if(u&&typeof localStorage<"u")try{const R=localStorage.getItem("colorInput-recentColors");R&&S(JSON.parse(R))}catch(R){console.warn("Failed to load recent colors from localStorage:",R)}},[u]),p.useEffect(()=>{const R=M.current;g&&R&&typeof R.focus=="function"&&R.focus()},[g]),p.useEffect(()=>{if(typeof document>"u")return;const R=D=>{h&&M.current&&A.current&&!M.current.contains(D.target)&&!A.current.contains(D.target)&&W()};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[h]);const P=p.useCallback(R=>{u&&S(D=>{const $=D.filter(B=>B!==R),_=[R,...$].slice(0,d);try{typeof localStorage<"u"&&localStorage.setItem("colorInput-recentColors",JSON.stringify(_))}catch(B){console.warn("Failed to save recent colors to localStorage:",B)}return _})},[u,d]),F=p.useCallback(()=>{const R=!h;f(R),R?l==null||l():s==null||s()},[h,l,s]),V=p.useCallback(R=>{k(R),P(R);const D=Lr(R,m);n==null||n(D),a==null||a(D),c&&(f(!1),s==null||s())},[n,a,c,s,P,m]),z=p.useCallback(R=>{C(R)},[]),I=p.useCallback(()=>{b&&(V(b),C(""))},[b,V]),W=p.useCallback(()=>{f(!1),s==null||s()},[s]),H=p.useCallback(R=>{k(R),n==null||n(Lr(R,m))},[n,m]);return{isOpen:h,selectedColor:y,recentColors:j,customColor:b,isFocused:w,isHovered:T,handleToggle:F,handleColorSelect:V,handleCustomColorChange:z,handleCustomColorSubmit:I,handleClose:W,setIsFocused:x,setIsHovered:v,setValue:H,triggerRef:M,dropdownRef:A}},Ko={container:{position:"relative",display:"inline-block",width:"fit-content"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300",padding:"8px 12px",borderRadius:8},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"8px"},recentColors:{display:"flex",gap:"4px",flexWrap:"wrap"}},X0={xs:{height:"28px",fontSize:"10px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 16px"},xl:{height:"56px",fontSize:"20px",padding:"16px 20px"}},J0={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Q0={default:{backgroundColor:"color-white",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},outline:{backgroundColor:"transparent",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},none:{backgroundColor:"transparent",borderColor:"transparent",borderWidth:"0px"}},Z0=[{name:"Red 500",value:"color-red-500"},{name:"Orange 500",value:"color-orange-500"},{name:"Yellow 500",value:"color-yellow-500"},{name:"Green 500",value:"color-green-500"},{name:"Blue 500",value:"color-blue-500"},{name:"Indigo 500",value:"color-indigo-500"},{name:"Purple 500",value:"color-purple-500"},{name:"Pink 500",value:"color-pink-500"},{name:"Red 300",value:"color-red-300"},{name:"Orange 300",value:"color-orange-300"},{name:"Yellow 300",value:"color-yellow-300"},{name:"Green 300",value:"color-green-300"},{name:"Blue 300",value:"color-blue-300"},{name:"Indigo 300",value:"color-indigo-300"},{name:"Purple 300",value:"color-purple-300"},{name:"Pink 300",value:"color-pink-300"},{name:"Red 700",value:"color-red-700"},{name:"Orange 700",value:"color-orange-700"},{name:"Yellow 700",value:"color-yellow-700"},{name:"Green 700",value:"color-green-700"},{name:"Blue 700",value:"color-blue-700"},{name:"Indigo 700",value:"color-indigo-700"},{name:"Purple 700",value:"color-purple-700"},{name:"Pink 700",value:"color-pink-700"},{name:"Gray 100",value:"color-gray-100"},{name:"Gray 300",value:"color-gray-300"},{name:"Gray 500",value:"color-gray-500"},{name:"Gray 700",value:"color-gray-700"},{name:"Gray 900",value:"color-gray-900"},{name:"White",value:"color-white"},{name:"Black",value:"color-black"},{name:"Transparent",value:"transparent"}],$l=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:s="md",shape:c="default",variant:d="default",shadow:u,error:g=!1,isDisabled:m=!1,isReadOnly:h=!1,isFocused:f=!1,isHovered:y=!1,predefinedColors:k=Z0,showCustomInput:b=!0,showRecentColors:C=!0,isOpen:j=!1,selectedColor:S="",recentColors:w=[],customColor:x="",handleToggle:T=()=>{},handleColorSelect:v=()=>{},handleCustomColorChange:M=()=>{},handleCustomColorSubmit:A=()=>{},handleClose:P,setIsFocused:F=()=>{},setIsHovered:V=()=>{},setValue:z,triggerRef:I,dropdownRef:W,onChange:H,onChangeComplete:R,onBlur:D,onFocus:$,onOpen:_,onClose:B,colorFormat:N,maxRecentColors:Y,closeOnSelect:ee,value:L,defaultValue:E,"aria-label":O,...K})=>{const{getColor:U}=i.useTheme(),J=p.useId(),Z=e??J,te=`${Z}-label`,G=`${Z}-listbox`,oe=`${Z}-helper-text`,le=`${Z}-error-text`,de=!!g&&typeof g=="string",Te=[a?oe:null,de?le:null].filter(Boolean).join(" ")||void 0,ae={...Ko.container,...l==null?void 0:l.container},re={...Ko.trigger,...X0[s],...J0[c],...Q0[d],...g&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...f&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!m&&{borderColor:"color-gray-400"},...l==null?void 0:l.trigger,...u&&u},ne={...Ko.dropdown,...l==null?void 0:l.dropdown},ie={...Ko.colorGrid,...l==null?void 0:l.colorGrid},ge={...Ko.recentColors,...l==null?void 0:l.recentColors},X=S||"color-gray-200";return r.jsxs(i.View,{...ae,...K,children:[t&&r.jsx(ur,{id:te,htmlFor:Z,size:s,isDisabled:m,error:g,views:l==null?void 0:l.label,children:t}),o&&r.jsx("input",{type:"hidden",name:o,value:Lr(S,N)}),r.jsxs(i.View,{ref:I,id:Z,onClick:m||h?void 0:T,onKeyDown:Q=>{m||h||(Q.key==="Enter"||Q.key===" ")&&(Q.preventDefault(),T())},onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),onFocus:()=>{F(!0),$&&$()},onBlur:Q=>{F(!1),D&&D(Q)},tabIndex:m?-1:0,role:"button","aria-expanded":j,"aria-haspopup":"listbox","aria-controls":j?G:void 0,"aria-labelledby":!O&&t?te:void 0,"aria-label":O??(t?void 0:n),"aria-describedby":Te,"aria-invalid":g?!0:void 0,width:"fit-content",gap:8,...re,children:[r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:X,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!h&&!m&&r.jsx(ue,{widthHeight:16,color:"color-gray-500",orientation:j?"up":"down"})]}),j&&r.jsxs(i.View,{ref:W,...ne,children:[r.jsx(i.View,{id:G,role:"listbox","aria-labelledby":t?te:void 0,"aria-label":t?void 0:"Color options",...ie,children:k.map((Q,ye)=>r.jsx(i.View,{role:"option","aria-selected":S===Q.value,"aria-label":Q.name,tabIndex:0,width:"24px",height:"24px",borderRadius:"8px",backgroundColor:Q.value,borderWidth:"2px",borderStyle:"solid",borderColor:S===Q.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>v(Q.value),onKeyDown:ve=>{(ve.key==="Enter"||ve.key===" ")&&(ve.preventDefault(),v(Q.value))},title:Q.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...l==null?void 0:l.colorSwatch},ye))}),C&&w.length>0&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:4,flexWrap:"wrap",...ge,children:w.map((Q,ye)=>r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:Q,borderWidth:"1px",borderStyle:"solid",borderColor:S===Q?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>v(Q),title:Q,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},ye))})]}),b&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(Me,{value:x,onChange:M,placeholder:"#000000 or rgb(0,0,0)","aria-label":"Custom color",size:"sm",style:{flex:1},views:l==null?void 0:l.customInput}),r.jsx(i.Element,{as:"button",type:"button",padding:"8px 12px",backgroundColor:"theme-primary",border:"none",borderRadius:"8px",cursor:"pointer",onClick:A,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:r.jsx(i.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&r.jsx(i.Text,{id:oe,fontSize:"12px",color:g?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a}),de&&r.jsx(i.Text,{id:le,fontSize:"12px",color:"color-red-500",marginTop:"4px",...l==null?void 0:l.error,children:g})]})},eg=e=>{const o=Dl(e);return r.jsx($l,{...o,...e})},og=eg,Mt=[{name:"Afghanistan",dial_code:"+93",emoji:"🇦🇫",code:"AF"},{name:"Aland Islands",dial_code:"+358",emoji:"🇦🇽",code:"AX"},{name:"Albania",dial_code:"+355",emoji:"🇦🇱",code:"AL"},{name:"Algeria",dial_code:"+213",emoji:"🇩🇿",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1684",emoji:"🇦🇸",code:"AS"},{name:"Andorra",dial_code:"+376",emoji:"🇦🇩",code:"AD"},{name:"Angola",dial_code:"+244",emoji:"🇦🇴",code:"AO"},{name:"Anguilla",dial_code:"+1264",emoji:"🇦🇮",code:"AI"},{name:"Antarctica",dial_code:"+672",emoji:"🇦🇶",code:"AQ"},{name:"Antigua and Barbuda",dial_code:"+1268",emoji:"🇦🇬",code:"AG"},{name:"Argentina",dial_code:"+54",emoji:"🇦🇷",code:"AR"},{name:"Armenia",dial_code:"+374",emoji:"🇦🇲",code:"AM"},{name:"Aruba",dial_code:"+297",emoji:"🇦🇼",code:"AW"},{name:"Australia",dial_code:"+61",emoji:"🇦🇺",code:"AU"},{name:"Austria",dial_code:"+43",emoji:"🇦🇹",code:"AT"},{name:"Azerbaijan",dial_code:"+994",emoji:"🇦🇿",code:"AZ"},{name:"Bahamas",dial_code:"+1242",emoji:"🇧🇸",code:"BS"},{name:"Bahrain",dial_code:"+973",emoji:"🇧🇭",code:"BH"},{name:"Bangladesh",dial_code:"+880",emoji:"🇧🇩",code:"BD"},{name:"Barbados",dial_code:"+1246",emoji:"🇧🇧",code:"BB"},{name:"Belarus",dial_code:"+375",emoji:"🇧🇾",code:"BY"},{name:"Belgium",dial_code:"+32",emoji:"🇧🇪",code:"BE"},{name:"Belize",dial_code:"+501",emoji:"🇧🇿",code:"BZ"},{name:"Benin",dial_code:"+229",emoji:"🇧🇯",code:"BJ"},{name:"Bermuda",dial_code:"+1441",emoji:"🇧🇲",code:"BM"},{name:"Bhutan",dial_code:"+975",emoji:"🇧🇹",code:"BT"},{name:"Bolivia, Plurinational State of",dial_code:"+591",emoji:"🇧🇴",code:"BO"},{name:"Bosnia and Herzegovina",dial_code:"+387",emoji:"🇧🇦",code:"BA"},{name:"Botswana",dial_code:"+267",emoji:"🇧🇼",code:"BW"},{name:"Brazil",dial_code:"+55",emoji:"🇧🇷",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",emoji:"🇮🇴",code:"IO"},{name:"Brunei Darussalam",dial_code:"+673",emoji:"🇧🇳",code:"BN"},{name:"Bulgaria",dial_code:"+359",emoji:"🇧🇬",code:"BG"},{name:"Burkina Faso",dial_code:"+226",emoji:"🇧🇫",code:"BF"},{name:"Burundi",dial_code:"+257",emoji:"🇧🇮",code:"BI"},{name:"Cambodia",dial_code:"+855",emoji:"🇰🇭",code:"KH"},{name:"Cameroon",dial_code:"+237",emoji:"🇨🇲",code:"CM"},{name:"Canada",dial_code:"+1",emoji:"🇨🇦",code:"CA"},{name:"Cape Verde",dial_code:"+238",emoji:"🇨🇻",code:"CV"},{name:"Cayman Islands",dial_code:"+345",emoji:"🇰🇾",code:"KY"},{name:"Central African Republic",dial_code:"+236",emoji:"🇨🇫",code:"CF"},{name:"Chad",dial_code:"+235",emoji:"🇹🇩",code:"TD"},{name:"Chile",dial_code:"+56",emoji:"🇨🇱",code:"CL"},{name:"China",dial_code:"+86",emoji:"🇨🇳",code:"CN"},{name:"Christmas Island",dial_code:"+61",emoji:"🇨🇽",code:"CX"},{name:"Cocos (Keeling) Islands",dial_code:"+61",emoji:"🇨🇨",code:"CC"},{name:"Colombia",dial_code:"+57",emoji:"🇨🇴",code:"CO"},{name:"Comoros",dial_code:"+269",emoji:"🇰🇲",code:"KM"},{name:"Congo",dial_code:"+242",emoji:"🇨🇬",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",emoji:"🇨🇩",code:"CD"},{name:"Cook Islands",dial_code:"+682",emoji:"🇨🇰",code:"CK"},{name:"Costa Rica",dial_code:"+506",emoji:"🇨🇷",code:"CR"},{name:"Cote d'Ivoire",dial_code:"+225",emoji:"🇨🇮",code:"CI"},{name:"Croatia",dial_code:"+385",emoji:"🇭🇷",code:"HR"},{name:"Cuba",dial_code:"+53",emoji:"🇨🇺",code:"CU"},{name:"Cyprus",dial_code:"+357",emoji:"🇨🇾",code:"CY"},{name:"Czech Republic",dial_code:"+420",emoji:"🇨🇿",code:"CZ"},{name:"Denmark",dial_code:"+45",emoji:"🇩🇰",code:"DK"},{name:"Djibouti",dial_code:"+253",emoji:"🇩🇯",code:"DJ"},{name:"Dominica",dial_code:"+1767",emoji:"🇩🇲",code:"DM"},{name:"Dominican Republic",dial_code:"+1849",emoji:"🇩🇴",code:"DO"},{name:"Ecuador",dial_code:"+593",emoji:"🇪🇨",code:"EC"},{name:"Egypt",dial_code:"+20",emoji:"🇪🇬",code:"EG"},{name:"El Salvador",dial_code:"+503",emoji:"🇸🇻",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",emoji:"🇬🇶",code:"GQ"},{name:"Eritrea",dial_code:"+291",emoji:"🇪🇷",code:"ER"},{name:"Estonia",dial_code:"+372",emoji:"🇪🇪",code:"EE"},{name:"Ethiopia",dial_code:"+251",emoji:"🇪🇹",code:"ET"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",emoji:"🇫🇰",code:"FK"},{name:"Faroe Islands",dial_code:"+298",emoji:"🇫🇴",code:"FO"},{name:"Fiji",dial_code:"+679",emoji:"🇫🇯",code:"FJ"},{name:"Finland",dial_code:"+358",emoji:"🇫🇮",code:"FI"},{name:"France",dial_code:"+33",emoji:"🇫🇷",code:"FR"},{name:"French Guiana",dial_code:"+594",emoji:"🇬🇫",code:"GF"},{name:"French Polynesia",dial_code:"+689",emoji:"🇵🇫",code:"PF"},{name:"Gabon",dial_code:"+241",emoji:"🇬🇦",code:"GA"},{name:"Gambia",dial_code:"+220",emoji:"🇬🇲",code:"GM"},{name:"Georgia",dial_code:"+995",emoji:"🇬🇪",code:"GE"},{name:"Germany",dial_code:"+49",emoji:"🇩🇪",code:"DE"},{name:"Ghana",dial_code:"+233",emoji:"🇬🇭",code:"GH"},{name:"Gibraltar",dial_code:"+350",emoji:"🇬🇮",code:"GI"},{name:"Greece",dial_code:"+30",emoji:"🇬🇷",code:"GR"},{name:"Greenland",dial_code:"+299",emoji:"🇬🇱",code:"GL"},{name:"Grenada",dial_code:"+1473",emoji:"🇬🇩",code:"GD"},{name:"Guadeloupe",dial_code:"+590",emoji:"🇬🇵",code:"GP"},{name:"Guam",dial_code:"+1671",emoji:"🇬🇺",code:"GU"},{name:"Guatemala",dial_code:"+502",emoji:"🇬🇹",code:"GT"},{name:"Guernsey",dial_code:"+44",emoji:"🇬🇬",code:"GG"},{name:"Guinea",dial_code:"+224",emoji:"🇬🇳",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",emoji:"🇬🇼",code:"GW"},{name:"Guyana",dial_code:"+595",emoji:"🇬🇾",code:"GY"},{name:"Haiti",dial_code:"+509",emoji:"🇭🇹",code:"HT"},{name:"Holy See (Vatican City State)",dial_code:"+379",emoji:"🇻🇦",code:"VA"},{name:"Honduras",dial_code:"+504",emoji:"🇭🇳",code:"HN"},{name:"Hong Kong",dial_code:"+852",emoji:"🇭🇰",code:"HK"},{name:"Hungary",dial_code:"+36",emoji:"🇭🇺",code:"HU"},{name:"Iceland",dial_code:"+354",emoji:"🇮🇸",code:"IS"},{name:"India",dial_code:"+91",emoji:"🇮🇳",code:"IN"},{name:"Indonesia",dial_code:"+62",emoji:"🇮🇩",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",emoji:"🇮🇷",code:"IR"},{name:"Iraq",dial_code:"+964",emoji:"🇮🇷",code:"IQ"},{name:"Ireland",dial_code:"+353",emoji:"🇮🇪",code:"IE"},{name:"Isle of Man",dial_code:"+44",emoji:"🇮🇲",code:"IM"},{name:"Israel",dial_code:"+972",emoji:"🇮🇱",code:"IL"},{name:"Italy",dial_code:"+39",emoji:"🇮🇹",code:"IT"},{name:"Jamaica",dial_code:"+1876",emoji:"🇯🇲",code:"JM"},{name:"Japan",dial_code:"+81",emoji:"🇯🇵",code:"JP"},{name:"Jersey",dial_code:"+44",emoji:"🇯🇪",code:"JE"},{name:"Jordan",dial_code:"+962",emoji:"🇯🇴",code:"JO"},{name:"Kazakhstan",dial_code:"+77",emoji:"🇰🇿",code:"KZ"},{name:"Kenya",dial_code:"+254",emoji:"🇰🇪",code:"KE"},{name:"Kiribati",dial_code:"+686",emoji:"🇰🇮",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",emoji:"🇰🇵",code:"KP"},{name:"Korea, Republic of South Korea",dial_code:"+82",emoji:"🇰🇷",code:"KR"},{name:"Kuwait",dial_code:"+965",emoji:"🇰🇼",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",emoji:"🇰🇬",code:"KG"},{name:"Laos",dial_code:"+856",emoji:"🇱🇦",code:"LA"},{name:"Latvia",dial_code:"+371",emoji:"🇱🇻",code:"LV"},{name:"Lebanon",dial_code:"+961",emoji:"🇱🇧",code:"LB"},{name:"Lesotho",dial_code:"+266",emoji:"🇱🇸",code:"LS"},{name:"Liberia",dial_code:"+231",emoji:"🇱🇷",code:"LR"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",emoji:"🇱🇾",code:"LY"},{name:"Liechtenstein",dial_code:"+423",emoji:"🇱🇮",code:"LI"},{name:"Lithuania",dial_code:"+370",emoji:"🇱🇹",code:"LT"},{name:"Luxembourg",dial_code:"+352",emoji:"🇱🇺",code:"LU"},{name:"Macao",dial_code:"+853",emoji:"🇲🇴",code:"MO"},{name:"Macedonia",dial_code:"+389",emoji:"🇲🇰",code:"MK"},{name:"Madagascar",dial_code:"+261",emoji:"🇲🇬",code:"MG"},{name:"Malawi",dial_code:"+265",emoji:"🇲🇼",code:"MW"},{name:"Malaysia",dial_code:"+60",emoji:"🇲🇾",code:"MY"},{name:"Maldives",dial_code:"+960",emoji:"🇲🇻",code:"MV"},{name:"Mali",dial_code:"+223",emoji:"🇲🇱",code:"ML"},{name:"Malta",dial_code:"+356",emoji:"🇲🇹",code:"MT"},{name:"Marshall Islands",dial_code:"+692",emoji:"🇲🇭",code:"MH"},{name:"Martinique",dial_code:"+596",emoji:"🇲🇶",code:"MQ"},{name:"Mauritania",dial_code:"+222",emoji:"🇲🇷",code:"MR"},{name:"Mauritius",dial_code:"+230",emoji:"🇲🇺",code:"MU"},{name:"Mayotte",dial_code:"+262",emoji:"🇾🇹",code:"YT"},{name:"Mexico",dial_code:"+52",emoji:"🇲🇽",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",emoji:"🇫🇲",code:"FM"},{name:"Moldova",dial_code:"+373",emoji:"🇲🇩",code:"MD"},{name:"Monaco",dial_code:"+377",emoji:"🇲🇨",code:"MC"},{name:"Mongolia",dial_code:"+976",emoji:"🇲🇳",code:"MN"},{name:"Montenegro",dial_code:"+382",emoji:"🇲🇪",code:"ME"},{name:"Montserrat",dial_code:"+1664",emoji:"🇲🇸",code:"MS"},{name:"Morocco",dial_code:"+212",emoji:"🇲🇦",code:"MA"},{name:"Mozambique",dial_code:"+258",emoji:"🇲🇿",code:"MZ"},{name:"Myanmar",dial_code:"+95",emoji:"🇲🇲",code:"MM"},{name:"Namibia",emoji:"🇳🇦",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",emoji:"🇳🇷",code:"NR"},{name:"Nepal",dial_code:"+977",emoji:"🇳🇵",code:"NP"},{name:"Netherlands",dial_code:"+31",emoji:"🇳🇱",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",emoji:"🇧🇶",code:"AN"},{name:"New Caledonia",dial_code:"+687",emoji:"🇳🇨",code:"NC"},{name:"New Zealand",dial_code:"+64",emoji:"🇳🇿",code:"NZ"},{name:"Nicaragua",dial_code:"+505",emoji:"🇳🇮",code:"NI"},{name:"Niger",dial_code:"+227",emoji:"🇳🇪",code:"NE"},{name:"Nigeria",dial_code:"+234",emoji:"🇳🇬",code:"NG"},{name:"Niue",dial_code:"+683",emoji:"🇳🇺",code:"NU"},{name:"Norfolk Island",dial_code:"+672",emoji:"🇳🇫",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1670",emoji:"🇲🇵",code:"MP"},{name:"Norway",dial_code:"+47",emoji:"🇳🇴",code:"NO"},{name:"Oman",dial_code:"+968",emoji:"🇴🇲",code:"OM"},{name:"Pakistan",dial_code:"+92",emoji:"🇵🇰",code:"PK"},{name:"Palau",dial_code:"+680",emoji:"🇵🇼",code:"PW"},{name:"Palestinian Territory, Occupied",dial_code:"+970",emoji:"🇵🇸",code:"PS"},{name:"Panama",dial_code:"+507",emoji:"🇵🇦",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",emoji:"🇵🇬",code:"PG"},{name:"Paraguay",dial_code:"+595",emoji:"🇵🇾",code:"PY"},{name:"Peru",dial_code:"+51",emoji:"🇵🇪",code:"PE"},{name:"Philippines",dial_code:"+63",emoji:"🇵🇭",code:"PH"},{name:"Pitcairn",dial_code:"+872",emoji:"🇵🇳",code:"PN"},{name:"Poland",dial_code:"+48",emoji:"🇵🇱",code:"PL"},{name:"Portugal",dial_code:"+351",emoji:"🇵🇹",code:"PT"},{name:"Puerto Rico",dial_code:"+1939",emoji:"🇵🇷",code:"PR"},{name:"Qatar",dial_code:"+974",emoji:"🇶🇦",code:"QA"},{name:"Romania",dial_code:"+40",emoji:"🇷🇴",code:"RO"},{name:"Russia",dial_code:"+7",emoji:"🇷🇺",code:"RU"},{name:"Rwanda",dial_code:"+250",emoji:"🇷🇼",code:"RW"},{name:"Reunion",dial_code:"+262",emoji:"🇷🇪",code:"RE"},{name:"Saint Barthelemy",dial_code:"+590",emoji:"🇧🇱",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",emoji:"🇸🇭",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1869",emoji:"🇰🇳",code:"KN"},{name:"Saint Lucia",dial_code:"+1758",emoji:"🇱🇨",code:"LC"},{name:"Saint Martin",dial_code:"+590",emoji:"🇲🇫",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",emoji:"🇵🇲",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",emoji:"🇻🇨",code:"VC"},{name:"Samoa",dial_code:"+685",emoji:"🇼🇸",code:"WS"},{name:"San Marino",dial_code:"+378",emoji:"🇸🇲",code:"SM"},{name:"Sao Tome and Principe",dial_code:"+239",emoji:"🇸🇹",code:"ST"},{name:"Saudi Arabia",dial_code:"+966",emoji:"🇸🇦",code:"SA"},{name:"Senegal",dial_code:"+221",emoji:"🇸🇳",code:"SN"},{name:"Serbia",dial_code:"+381",emoji:"🇷🇸",code:"RS"},{name:"Seychelles",dial_code:"+248",emoji:"🇸🇨",code:"SC"},{name:"Sierra Leone",dial_code:"+232",emoji:"🇸🇱",code:"SL"},{name:"Singapore",dial_code:"+65",emoji:"🇸🇬",code:"SG"},{name:"Slovakia",dial_code:"+421",emoji:"🇸🇰",code:"SK"},{name:"Slovenia",dial_code:"+386",emoji:"🇸🇮",code:"SI"},{name:"Solomon Islands",dial_code:"+677",emoji:"🇸🇧",code:"SB"},{name:"Somalia",dial_code:"+252",emoji:"🇸🇴",code:"SO"},{name:"South Africa",dial_code:"+27",emoji:"🇿🇦",code:"ZA"},{name:"South Sudan",dial_code:"+211",emoji:"🇸🇸",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",emoji:"🇬🇸",code:"GS"},{name:"Spain",dial_code:"+34",emoji:"🇪🇸",code:"ES"},{name:"Sri Lanka",dial_code:"+94",emoji:"🇱🇰",code:"LK"},{name:"Sudan",dial_code:"+249",emoji:"🇸🇩",code:"SD"},{name:"Suriname",dial_code:"+597",emoji:"🇸🇷",code:"SR"},{name:"Svalbard and Jan Mayen",dial_code:"+47",emoji:"🇸🇯",code:"SJ"},{name:"Swaziland",dial_code:"+268",emoji:"🇸🇿",code:"SZ"},{name:"Sweden",dial_code:"+46",emoji:"🇸🇪",code:"SE"},{name:"Switzerland",dial_code:"+41",emoji:"🇨🇭",code:"CH"},{name:"Syrian Arab Republic",dial_code:"+963",emoji:"🇸🇾",code:"SY"},{name:"Taiwan",dial_code:"+886",emoji:"🇹🇼",code:"TW"},{name:"Tajikistan",dial_code:"+992",emoji:"🇹🇯",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",emoji:"🇹🇿",code:"TZ"},{name:"Thailand",dial_code:"+66",emoji:"🇹🇭",code:"TH"},{name:"Timor-Leste",dial_code:"+670",emoji:"🇹🇱",code:"TL"},{name:"Togo",dial_code:"+228",emoji:"🇹🇬",code:"TG"},{name:"Tokelau",dial_code:"+690",emoji:"🇹🇰",code:"TK"},{name:"Tonga",dial_code:"+676",emoji:"🇹🇴",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1868",emoji:"🇹🇹",code:"TT"},{name:"Tunisia",dial_code:"+216",emoji:"🇹🇳",code:"TN"},{name:"Turkey",dial_code:"+90",emoji:"🇹🇷",code:"TR"},{name:"Turkmenistan",dial_code:"+993",emoji:"🇹🇲",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1649",emoji:"🇹🇨",code:"TC"},{name:"Tuvalu",dial_code:"+688",emoji:"🇹🇻",code:"TV"},{name:"Uganda",dial_code:"+256",emoji:"🇺🇬",code:"UG"},{name:"Ukraine",dial_code:"+380",emoji:"🇺🇦",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",emoji:"🇦🇪",code:"AE"},{name:"United Kingdom",dial_code:"+44",emoji:"🇬🇧",code:"GB"},{name:"United States",dial_code:"+1",emoji:"🇺🇸",code:"US"},{name:"Uruguay",dial_code:"+598",emoji:"🇺🇾",code:"UY"},{name:"Uzbekistan",dial_code:"+998",emoji:"🇺🇿",code:"UZ"},{name:"Vanuatu",dial_code:"+678",emoji:"🇻🇺",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",emoji:"🇻🇪",code:"VE"},{name:"Vietnam",dial_code:"+84",emoji:"🇻🇳",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1284",emoji:"🇻🇬",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1340",emoji:"🇻🇮",code:"VI"},{name:"Wallis and Futuna",dial_code:"+681",emoji:"🇼🇫",code:"WF"},{name:"Yemen",dial_code:"+967",emoji:"🇾🇪",code:"YE"},{name:"Zambia",dial_code:"+260",emoji:"🇿🇲",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",emoji:"🇿🇼",code:"ZW"}],Ll=({placeholder:e})=>{const[o,t]=p.useState(Mt),[n,a]=p.useState(e??Mt[0].name),[l,s]=p.useState(!0),[c,d]=p.useState(!1),[u,g]=p.useState(!1);return{hide:l,setHide:s,newOptions:o,setNewOptions:t,isHovered:u,setIsHovered:g,isFocused:c,setIsFocused:d,value:n,setValue:a}},Kn={xs:8,sm:10,md:12,lg:14,xl:16},rg=({size:e,...o})=>r.jsx(i.Element,{as:"ul",...o}),tg=e=>r.jsx(i.Input,{type:"text",...e}),ng=({size:e,...o})=>r.jsx(i.Element,{as:"li",...o}),ag=({id:e,option:o,size:t="md",isSelected:n=!1,isHighlighted:a=!1,callback:l=()=>{},views:s={text:{}}})=>{const c=d=>{d&&d.stopPropagation&&d.stopPropagation(),l(o??"")};return r.jsx(ng,{id:e,margin:0,role:"option","aria-selected":n,listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:c,fontSize:i.Typography.fontSizes[t],backgroundColor:a?"color-gray-100":void 0,_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...s.text,children:o})},lg=({id:e,size:o,views:t={dropDown:{}},options:n=[],selectedOption:a,highlightedIndex:l=-1,callback:s=()=>{}})=>{const c=d=>s(d);return r.jsx(rg,{id:e,role:"listbox",margin:0,padding:0,top:"100%",width:"100%",display:"flex",zIndex:1e3,overflow:"auto",maxHeight:"300px",borderRadius:12,position:"absolute",flexDirection:"column",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",...t.dropDown,children:n.map((d,u)=>r.jsx(ag,{id:e?`${e}-option-${u}`:void 0,size:o,option:d.name,isSelected:d.name===a,isHighlighted:u===l,callback:c,...t.text},d.code))})},_l=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:s=!1,error:c=!1,isHovered:d=!1,isFocused:u=!1,isAutoFocus:g=!1,isDisabled:m=!1,isReadOnly:h=!1,shadow:f={},newOptions:y=[],size:k="md",variant:b="default",shape:C="default",onChange:j,onBlur:S=()=>{},setHide:w=()=>{},setNewOptions:x=()=>{},setIsHovered:T=()=>{},setIsFocused:v=()=>{},setValue:M=()=>{},selected:A,views:P={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:F,...V})=>{const{getColor:z,themeMode:I}=i.useTheme(),W=p.useId(),H=e??W,R=`${H}-listbox`,[D,$]=p.useState(-1),_=z("color-gray-500",{themeMode:F||I}),B=()=>v(!0),N=U=>{w(!s),$(-1),M(U),j&&j(U)},Y=()=>{!m&&!h&&w(!s)},ee=U=>{const J=U.target.value,Z=Mt.filter(te=>te.name.toLowerCase().startsWith(J.toLowerCase()));s&&w(!1),x(Z),$(Z.length>0?0:-1),j&&j(J)},L=U=>{m||h||(U.key==="ArrowDown"?(U.preventDefault(),s?(w(!1),$(y.length>0?0:-1)):$(Math.min(D+1,y.length-1))):U.key==="ArrowUp"?s||(U.preventDefault(),$(Math.max(D-1,0))):U.key==="Enter"?!s&&D>=0&&y[D]&&(U.preventDefault(),N(y[D].name)):U.key==="Escape"&&(s||(w(!0),$(-1))))},E=U=>{S(U),v(!1)},O=!!t,K={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[k],backgroundColor:"transparent",color:m?"color-gray-400":"color-gray-900",cursor:m?"not-allowed":h?"auto":"pointer",...P.field};return r.jsxs(Je,{helperText:l,error:c,views:P,onClick:Y,children:[r.jsxs(io,{label:t,size:k,error:c,shape:C,views:P,shadow:f,variant:b,value:n,color:"theme-primary",isDisabled:m,isReadOnly:h,isFocused:u,showLabel:O,_hover:!m&&!c?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(Uo,{children:[O&&r.jsx(yo,{htmlFor:H,color:"theme-primary",error:c,views:P,children:t}),r.jsx(tg,{id:H,name:o,placeholder:a,readOnly:h,disabled:m,autoFocus:g,role:"combobox","aria-expanded":!s,"aria-controls":s?void 0:R,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":!s&&D>=0?`${R}-option-${D}`:void 0,onBlur:E,onFocus:B,onKeyDown:L,...K,...V,value:n,onChange:ee})]}),r.jsx(lr,{children:s?r.jsx(ue,{orientation:"down",widthHeight:Kn[k],color:_,style:P.icon}):r.jsx(ue,{orientation:"up",widthHeight:Kn[k],color:_,style:P.icon})})]}),!s&&r.jsx(lg,{id:R,size:k,views:P,options:y,selectedOption:n,highlightedIndex:D,callback:N})]})},ig=e=>{const o=Ll(e);return r.jsx(_l,{...o,...e})},sg=ig;function _r(e){"@babel/helpers - typeof";return _r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_r(e)}function Fe(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function cg(e){return Fe(1,arguments),e instanceof Date||_r(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Oe(e){Fe(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||_r(e)==="object"&&o==="[object Date]"?new Date(e.getTime()):typeof e=="number"||o==="[object Number]"?new Date(e):((typeof e=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function dg(e){if(Fe(1,arguments),!cg(e)&&typeof e!="number")return!1;var o=Oe(e);return!isNaN(Number(o))}function fo(e){if(e===null||e===!0||e===!1)return NaN;var o=Number(e);return isNaN(o)?o:o<0?Math.ceil(o):Math.floor(o)}function ug(e,o){Fe(2,arguments);var t=Oe(e).getTime(),n=fo(o);return new Date(t+n)}function pg(e,o){Fe(2,arguments);var t=fo(o);return ug(e,-t)}var mg=864e5;function gg(e){Fe(1,arguments);var o=Oe(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=t-n;return Math.floor(a/mg)+1}function Br(e){Fe(1,arguments);var o=1,t=Oe(e),n=t.getUTCDay(),a=(n<o?7:0)+n-o;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function Bl(e){Fe(1,arguments);var o=Oe(e),t=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var a=Br(n),l=new Date(0);l.setUTCFullYear(t,0,4),l.setUTCHours(0,0,0,0);var s=Br(l);return o.getTime()>=a.getTime()?t+1:o.getTime()>=s.getTime()?t:t-1}function hg(e){Fe(1,arguments);var o=Bl(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var n=Br(t);return n}var fg=6048e5;function yg(e){Fe(1,arguments);var o=Oe(e),t=Br(o).getTime()-hg(o).getTime();return Math.round(t/fg)+1}var xg={};function Zr(){return xg}function Or(e,o){var t,n,a,l,s,c,d,u;Fe(1,arguments);var g=Zr(),m=fo((t=(n=(a=(l=o==null?void 0:o.weekStartsOn)!==null&&l!==void 0?l:o==null||(s=o.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&a!==void 0?a:g.weekStartsOn)!==null&&n!==void 0?n:(d=g.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&t!==void 0?t:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Oe(e),f=h.getUTCDay(),y=(f<m?7:0)+f-m;return h.setUTCDate(h.getUTCDate()-y),h.setUTCHours(0,0,0,0),h}function Ol(e,o){var t,n,a,l,s,c,d,u;Fe(1,arguments);var g=Oe(e),m=g.getUTCFullYear(),h=Zr(),f=fo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(s=o.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:h.firstWeekContainsDate)!==null&&n!==void 0?n:(d=h.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(m+1,0,f),y.setUTCHours(0,0,0,0);var k=Or(y,o),b=new Date(0);b.setUTCFullYear(m,0,f),b.setUTCHours(0,0,0,0);var C=Or(b,o);return g.getTime()>=k.getTime()?m+1:g.getTime()>=C.getTime()?m:m-1}function bg(e,o){var t,n,a,l,s,c,d,u;Fe(1,arguments);var g=Zr(),m=fo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(s=o.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:g.firstWeekContainsDate)!==null&&n!==void 0?n:(d=g.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=Ol(e,o),f=new Date(0);f.setUTCFullYear(h,0,m),f.setUTCHours(0,0,0,0);var y=Or(f,o);return y}var kg=6048e5;function Cg(e,o){Fe(1,arguments);var t=Oe(e),n=Or(t,o).getTime()-bg(t,o).getTime();return Math.round(n/kg)+1}function se(e,o){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return t+n}var eo={y:function(o,t){var n=o.getUTCFullYear(),a=n>0?n:1-n;return se(t==="yy"?a%100:a,t.length)},M:function(o,t){var n=o.getUTCMonth();return t==="M"?String(n+1):se(n+1,2)},d:function(o,t){return se(o.getUTCDate(),t.length)},a:function(o,t){var n=o.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(o,t){return se(o.getUTCHours()%12||12,t.length)},H:function(o,t){return se(o.getUTCHours(),t.length)},m:function(o,t){return se(o.getUTCMinutes(),t.length)},s:function(o,t){return se(o.getUTCSeconds(),t.length)},S:function(o,t){var n=t.length,a=o.getUTCMilliseconds(),l=Math.floor(a*Math.pow(10,n-3));return se(l,t.length)}},To={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Sg={G:function(o,t,n){var a=o.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(o,t,n){if(t==="yo"){var a=o.getUTCFullYear(),l=a>0?a:1-a;return n.ordinalNumber(l,{unit:"year"})}return eo.y(o,t)},Y:function(o,t,n,a){var l=Ol(o,a),s=l>0?l:1-l;if(t==="YY"){var c=s%100;return se(c,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):se(s,t.length)},R:function(o,t){var n=Bl(o);return se(n,t.length)},u:function(o,t){var n=o.getUTCFullYear();return se(n,t.length)},Q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return se(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return se(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(o,t,n){var a=o.getUTCMonth();switch(t){case"M":case"MM":return eo.M(o,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(o,t,n){var a=o.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return se(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(o,t,n,a){var l=Cg(o,a);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):se(l,t.length)},I:function(o,t,n){var a=yg(o);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):se(a,t.length)},d:function(o,t,n){return t==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):eo.d(o,t)},D:function(o,t,n){var a=gg(o);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):se(a,t.length)},E:function(o,t,n){var a=o.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(o,t,n,a){var l=o.getUTCDay(),s=(l-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return se(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(o,t,n,a){var l=o.getUTCDay(),s=(l-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return se(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(o,t,n){var a=o.getUTCDay(),l=a===0?7:a;switch(t){case"i":return String(l);case"ii":return se(l,t.length);case"io":return n.ordinalNumber(l,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(o,t,n){var a=o.getUTCHours(),l=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(o,t,n){var a=o.getUTCHours(),l;switch(a===12?l=To.noon:a===0?l=To.midnight:l=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(o,t,n){var a=o.getUTCHours(),l;switch(a>=17?l=To.evening:a>=12?l=To.afternoon:a>=4?l=To.morning:l=To.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(o,t,n){if(t==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return eo.h(o,t)},H:function(o,t,n){return t==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):eo.H(o,t)},K:function(o,t,n){var a=o.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):se(a,t.length)},k:function(o,t,n){var a=o.getUTCHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):se(a,t.length)},m:function(o,t,n){return t==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):eo.m(o,t)},s:function(o,t,n){return t==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):eo.s(o,t)},S:function(o,t){return eo.S(o,t)},X:function(o,t,n,a){var l=a._originalDate||o,s=l.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return Jn(s);case"XXXX":case"XX":return po(s);case"XXXXX":case"XXX":default:return po(s,":")}},x:function(o,t,n,a){var l=a._originalDate||o,s=l.getTimezoneOffset();switch(t){case"x":return Jn(s);case"xxxx":case"xx":return po(s);case"xxxxx":case"xxx":default:return po(s,":")}},O:function(o,t,n,a){var l=a._originalDate||o,s=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xn(s,":");case"OOOO":default:return"GMT"+po(s,":")}},z:function(o,t,n,a){var l=a._originalDate||o,s=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xn(s,":");case"zzzz":default:return"GMT"+po(s,":")}},t:function(o,t,n,a){var l=a._originalDate||o,s=Math.floor(l.getTime()/1e3);return se(s,t.length)},T:function(o,t,n,a){var l=a._originalDate||o,s=l.getTime();return se(s,t.length)}};function Xn(e,o){var t=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),l=n%60;if(l===0)return t+String(a);var s=o;return t+String(a)+s+se(l,2)}function Jn(e,o){if(e%60===0){var t=e>0?"-":"+";return t+se(Math.abs(e)/60,2)}return po(e,o)}function po(e,o){var t=o||"",n=e>0?"-":"+",a=Math.abs(e),l=se(Math.floor(a/60),2),s=se(a%60,2);return n+l+t+s}var Qn=function(o,t){switch(o){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Nl=function(o,t){switch(o){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},jg=function(o,t){var n=o.match(/(P+)(p+)?/)||[],a=n[1],l=n[2];if(!l)return Qn(o,t);var s;switch(a){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Qn(a,t)).replace("{{time}}",Nl(l,t))},wg={p:Nl,P:jg};function vg(e){var o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),e.getTime()-o.getTime()}var Tg=["D","DD"],Ig=["YY","YYYY"];function Rg(e){return Tg.indexOf(e)!==-1}function Fg(e){return Ig.indexOf(e)!==-1}function Zn(e,o,t){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var zg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Mg=function(o,t,n){var a,l=zg[o];return typeof l=="string"?a=l:t===1?a=l.one:a=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function mt(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var Wg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Hg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Vg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ag={date:mt({formats:Wg,defaultWidth:"full"}),time:mt({formats:Hg,defaultWidth:"full"}),dateTime:mt({formats:Vg,defaultWidth:"full"})},Pg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Eg=function(o,t,n,a){return Pg[o]};function Xo(e){return function(o,t){var n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var l=e.defaultFormattingWidth||e.defaultWidth,s=t!=null&&t.width?String(t.width):l;a=e.formattingValues[s]||e.formattingValues[l]}else{var c=e.defaultWidth,d=t!=null&&t.width?String(t.width):e.defaultWidth;a=e.values[d]||e.values[c]}var u=e.argumentCallback?e.argumentCallback(o):o;return a[u]}}var Dg={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},$g={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_g={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Bg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Og={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ng=function(o,t){var n=Number(o),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},qg={ordinalNumber:Ng,era:Xo({values:Dg,defaultWidth:"wide"}),quarter:Xo({values:$g,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:Xo({values:Lg,defaultWidth:"wide"}),day:Xo({values:_g,defaultWidth:"wide"}),dayPeriod:Xo({values:Bg,defaultWidth:"wide",formattingValues:Og,defaultFormattingWidth:"wide"})};function Jo(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],l=o.match(a);if(!l)return null;var s=l[0],c=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?Gg(c,function(m){return m.test(s)}):Ug(c,function(m){return m.test(s)}),u;u=e.valueCallback?e.valueCallback(d):d,u=t.valueCallback?t.valueCallback(u):u;var g=o.slice(s.length);return{value:u,rest:g}}}function Ug(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function Gg(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function Yg(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],l=o.match(e.parsePattern);if(!l)return null;var s=e.valueCallback?e.valueCallback(l[0]):l[0];s=t.valueCallback?t.valueCallback(s):s;var c=o.slice(a.length);return{value:s,rest:c}}}var Kg=/^(\d+)(th|st|nd|rd)?/i,Xg=/\d+/i,Jg={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Qg={any:[/^b/i,/^(a|c)/i]},Zg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},eh={any:[/1/i,/2/i,/3/i,/4/i]},oh={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rh={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},th={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},nh={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ah={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},lh={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ih={ordinalNumber:Yg({matchPattern:Kg,parsePattern:Xg,valueCallback:function(o){return parseInt(o,10)}}),era:Jo({matchPatterns:Jg,defaultMatchWidth:"wide",parsePatterns:Qg,defaultParseWidth:"any"}),quarter:Jo({matchPatterns:Zg,defaultMatchWidth:"wide",parsePatterns:eh,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:Jo({matchPatterns:oh,defaultMatchWidth:"wide",parsePatterns:rh,defaultParseWidth:"any"}),day:Jo({matchPatterns:th,defaultMatchWidth:"wide",parsePatterns:nh,defaultParseWidth:"any"}),dayPeriod:Jo({matchPatterns:ah,defaultMatchWidth:"any",parsePatterns:lh,defaultParseWidth:"any"})},sh={code:"en-US",formatDistance:Mg,formatLong:Ag,formatRelative:Eg,localize:qg,match:ih,options:{weekStartsOn:0,firstWeekContainsDate:1}},ch=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,uh=/^'([^]*?)'?$/,ph=/''/g,mh=/[a-zA-Z]/;function gh(e,o,t){var n,a,l,s,c,d,u,g,m,h,f,y,k,b;Fe(2,arguments);var C=String(o),j=Zr(),S=(n=(a=void 0)!==null&&a!==void 0?a:j.locale)!==null&&n!==void 0?n:sh,w=fo((l=(s=(c=(d=void 0)!==null&&d!==void 0?d:void 0)!==null&&c!==void 0?c:j.firstWeekContainsDate)!==null&&s!==void 0?s:(u=j.locale)===null||u===void 0||(g=u.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(w>=1&&w<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=fo((m=(h=(f=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&f!==void 0?f:j.weekStartsOn)!==null&&h!==void 0?h:(k=j.locale)===null||k===void 0||(b=k.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&m!==void 0?m:0);if(!(x>=0&&x<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var T=Oe(e);if(!dg(T))throw new RangeError("Invalid time value");var v=vg(T),M=pg(T,v),A={firstWeekContainsDate:w,weekStartsOn:x,locale:S,_originalDate:T},P=C.match(dh).map(function(F){var V=F[0];if(V==="p"||V==="P"){var z=wg[V];return z(F,S.formatLong)}return F}).join("").match(ch).map(function(F){if(F==="''")return"'";var V=F[0];if(V==="'")return hh(F);var z=Sg[V];if(z)return Fg(F)&&Zn(F,o,String(e)),Rg(F)&&Zn(F,o,String(e)),z(M,F,S.localize,A);if(V.match(mh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");return F}).join("");return P}function hh(e){var o=e.match(uh);return o?o[1].replace(ph,"'"):e}const gt=e=>typeof e=="string"?e:void 0,ql=({value:e,defaultValue:o}={})=>{const[t,n]=p.useState(!1),[a,l]=p.useState(!1),[s,c]=p.useState(()=>gt(e)??gt(o)??gh(new Date,"yyyy-MM-dd")),d=gt(e);return p.useEffect(()=>{d!==void 0&&c(d)},[d]),{date:s,setDate:c,isHovered:t,setIsHovered:n,isFocused:a,setIsFocused:l}},fh=e=>r.jsx(i.Input,{type:"date",...e}),Ul=({id:e,name:o,label:t,date:n,children:a,helperText:l,shadow:s={},size:c="md",variant:d="default",shape:u="default",views:g={container:{},label:{},helperText:{},text:{},field:{}},error:m=!1,isHovered:h=!1,isFocused:f=!1,isDisabled:y=!1,isReadOnly:k=!1,setDate:b=()=>{},setIsFocused:C=()=>{},setIsHovered:j=()=>{},onChange:S,onChangeText:w,value:x,defaultValue:T,...v})=>{const{themeMode:M}=i.useTheme(),A=p.useId(),P=e??A,F=!!t,V=()=>j(!h),z=()=>C(!0),I=H=>{typeof H=="string"?(b(H),w&&w(H)):(b(H.target.value),S&&S(H.target.value))},W={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[c],backgroundColor:"transparent",color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":k?"auto":"pointer",...g.field};return r.jsx(Je,{helperText:l,error:m,views:g,children:r.jsx(io,{label:t,size:c,error:m,shape:u,views:g,shadow:s,color:"theme-primary",variant:d,value:n,isHovered:h,isDisabled:y,isReadOnly:k,isFocused:f,showLabel:F,onMouseEnter:V,onMouseLeave:V,children:r.jsxs(Uo,{children:[F&&r.jsx(yo,{htmlFor:P,color:"theme-primary",error:m,views:g,children:t}),r.jsx(fh,{id:P,name:o,role:"textbox","aria-label":!F&&typeof t=="string"?t:void 0,onFocus:z,disabled:y,readOnly:k,...W,...v,...w&&{onChangeText:I},onChange:I,value:n})]})})})},yh=e=>{const o=ql(e);return r.jsx(Ul,{...o,...e})},xh=yh,Gl=e=>{const o=hn(e),[t,n]=p.useState(!1);return{isVisible:t,setIsVisible:n,...e,...o}},ea={xs:14,sm:16,md:16,lg:18,xl:20},bh=({visibleIcon:e,hiddenIcon:o,...t})=>{const{isVisible:n,setIsVisible:a,...l}=Gl(t),s=ea[t.size??"md"]??ea.md,c=s-2;return r.jsx(pr,{...l,type:n?"text":"password",isClearable:!1,right:r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${s}px`,height:`${s}px`,minWidth:`${s}px`,color:"color-gray-500",cursor:t.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{t.isDisabled||a(!n)},children:n?e??r.jsx(en,{widthHeight:c}):o??r.jsx(Zt,{widthHeight:c})})})},kh=bh,Yl=(e,o,t)=>{const[n,a]=p.useState(e),[l,s]=p.useState(o?{value:o,label:o}:e[0]),[c,d]=p.useState([]),[u,g]=p.useState(0),[m,h]=p.useState(t??""),[f,y]=p.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:l,setSelectedItem:s,selectedItems:c,setSelectedItems:d,highlightedIndex:u,setHighlightedIndex:g,searchQuery:m,setSearchQuery:h,isDropdownVisible:f,setIsDropdownVisible:y}},Ch={xs:12,sm:14,md:16,lg:20,xl:24},Sh={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},oa={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},jh={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},wh={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},vh={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},ra={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},Th={display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"color-gray-100",borderRadius:8,fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},Kl=({placeholder:e,items:o,showTick:t=!0,onSelect:n,searchEnabled:a=!0,left:l,right:s,label:c,filteredItems:d,setSelectedItem:u,selectedItem:g,selectedItems:m,setSelectedItems:h,highlightedIndex:f,setHighlightedIndex:y,searchQuery:k,setSearchQuery:b,setFilteredItems:C,views:j,isDropdownVisible:S,setIsDropdownVisible:w,isMulti:x=!1,searchPlaceholder:T,size:v="md",...M})=>{const A=p.useId(),P=M.id??A,F=`${P}-dropdown`,V=`${P}-label`,{ref:z,relation:I}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),W=p.useRef(null),[H,R]=p.useState(!1),[D,$]=p.useState(!1),_=()=>{var U;const L=D?oa.enter:oa.initial;if(!z.current)return{};const E=z.current.getBoundingClientRect(),O={position:"fixed",left:E.left,width:E.width,zIndex:1e4,...L};return((U=I==null?void 0:I.space)==null?void 0:U.vertical)==="top"?{...O,bottom:window.innerHeight-E.top+6}:{...O,top:E.bottom+6}};p.useEffect(()=>{if(S){const L=setTimeout(()=>$(!0),10);return()=>clearTimeout(L)}$(!1)},[S]),p.useEffect(()=>{const L=E=>{!E.composedPath().some(U=>(U==null?void 0:U.id)===F)&&z.current&&!z.current.contains(E.target)&&w(!1)};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[]);const B=L=>{if(b(L),L==="")C(o);else{const E=o.filter(O=>O.label.toLowerCase().includes(L.toLowerCase()));C(E)}y(0)},N=L=>{if(x){const E=m.some(K=>K.value===L.value);let O;E?O=m.filter(K=>K.value!==L.value):O=[...m,L],h(O),n==null||n(O)}else u(L),n==null||n(L),w(!1)},Y=(L,E)=>{L.stopPropagation();const O=m.filter(K=>K.value!==E.value);h(O),n==null||n(O)},ee=L=>x?m.some(E=>E.value===L.value):L.value===g.value;return r.jsxs(i.Horizontal,{flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...M,children:[c&&r.jsx(i.Text,{id:V,views:j==null?void 0:j.label,children:c}),r.jsxs(i.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:z,role:"combobox",tabIndex:0,"aria-expanded":S,"aria-haspopup":"listbox","aria-controls":S?F:void 0,"aria-labelledby":c?V:void 0,onClick:()=>w(!S),onKeyDown:L=>{L.key==="Enter"||L.key===" "||L.key==="ArrowDown"?(L.preventDefault(),w(!0)):L.key==="Escape"&&w(!1)},style:{width:"100%"},children:r.jsxs(io,{size:v,isHovered:H,isFocused:S,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),cursor:"pointer",views:{container:j==null?void 0:j.container},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",flex:1,minWidth:0,flexWrap:x?"wrap":"nowrap",...j==null?void 0:j.labelContainer,children:[l,x?m.length>0?r.jsx(i.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:m.map(L=>r.jsxs(i.Horizontal,{...Th,_hover:{backgroundColor:"color-gray-200"},children:[L.icon&&r.jsx(i.View,{flexShrink:0,children:L.icon}),r.jsx(i.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:L.label}),r.jsx(We,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:E=>Y(E,L)})]},L.value))}):r.jsx(i.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...j==null?void 0:j.label,children:e}):r.jsxs(r.Fragment,{children:[g.icon&&g.label!==e&&r.jsx(i.View,{children:g.icon}),r.jsx(i.Text,{weight:"medium",flexGrow:1,color:g.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...j==null?void 0:j.label,children:g.label})]})]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",flexShrink:0,children:[s,r.jsx(i.View,{style:S?ra.open:ra.closed,children:r.jsx(ue,{widthHeight:Ch[v],orientation:"down",color:S?"color-gray-700":"color-gray-400"})})]})]})}),S&&r.jsx(Yt,{children:r.jsxs(i.View,{ref:W,id:F,role:"listbox","aria-labelledby":c?V:void 0,...Sh,style:_(),...j==null?void 0:j.dropdown,children:[a&&r.jsx(i.View,{...jh,children:r.jsx(pr,{id:`${P}-search`,name:`${M.name??P}-search`,width:"100%",type:"search",autoFocus:!0,value:k,onChange:L=>B(L),hint:T||e||"Search...","aria-label":T||"Search",isClearable:!1,left:r.jsx(Ar,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...j==null?void 0:j.text},field:{fontSize:"13px"}}})}),d.length>0&&r.jsx(i.View,{margin:0,padding:"4px",children:d.map((L,E)=>{const O=ee(L),K=E===f;return r.jsxs(i.Horizontal,{role:"option","aria-selected":O,justifyContent:"space-between",alignItems:"center",...wh,backgroundColor:O&&K?"color-blue-100":O?"color-blue-50":K?"color-gray-100":"transparent",onMouseEnter:()=>y(E),onClick:()=>N(L),...j==null?void 0:j.item,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[L.icon&&r.jsx(i.View,{flexShrink:0,children:L.icon}),r.jsx(i.Text,{size:"sm",color:O?"theme-primary":"color-gray-800",weight:O?"medium":"normal",children:L.label})]}),O&&t&&r.jsx(cr,{widthHeight:16,color:"theme-primary"})]},L.value)})}),d.length===0&&r.jsxs(i.Vertical,{...vh,children:[r.jsx(Ar,{widthHeight:24,color:"color-gray-300"}),r.jsx(i.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),r.jsx(i.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},Ih=({id:e,name:o,items:t,placeholder:n,searchPlaceholder:a,...l})=>{const s=Yl(t,n,a);return r.jsx(Kl,{id:e,name:o,items:t,searchPlaceholder:a,...s,...l})},Rh=Ih,Xl=e=>{const{tags:o,defaultTags:t=[],onTagsChange:n,onTagAdd:a,onTagRemove:l,maxTags:s,minTagLength:c=1,maxTagLength:d=50,allowDuplicates:u=!1,separators:g=["enter","comma"],isDisabled:m=!1,isReadOnly:h=!1}=e,[f,y]=p.useState(""),[k,b]=p.useState(()=>(o||t||[]).map((I,W)=>({id:`tag-${W}-${Date.now()}`,value:I}))),[C,j]=p.useState(!1),[S,w]=p.useState(!1),x=o&&Array.isArray(o)?o.map((z,I)=>({id:`tag-${I}-${Date.now()}`,value:z})):k;p.useEffect(()=>{o&&Array.isArray(o)&&b(o.map((z,I)=>({id:`tag-${I}-${Date.now()}`,value:z})))},[o]);const T=p.useCallback(z=>{const I=z.trim();return!(I.length<c||I.length>d||!u&&x.map(H=>H.value.toLowerCase()).includes(I.toLowerCase())||s&&x.length>=s)},[x,c,d,u,s]),v=p.useCallback(z=>{if(m||h)return;const I=z.trim();if(!I||!T(I))return;const W={id:`tag-${Date.now()}-${Math.random()}`,value:I},H=[...x,W],R=H.map(D=>D.value);o||b(H),n==null||n(R),a==null||a(I),y("")},[x,T,n,a,m,h,o]),M=p.useCallback(z=>{if(m||h)return;const I=x[z];if(!I)return;const W=x.filter((R,D)=>D!==z),H=W.map(R=>R.value);o||b(W),n==null||n(H),l==null||l(I.value,z)},[x,n,l,m,h,o]),A=p.useCallback(z=>{if(m||h)return;const I=z.target.value;if(g.includes("comma")&&I.includes(",")){const W=I.split(","),H=W[0],R=W.slice(1).join(",");H.trim()&&v(H),y(R);return}y(I)},[v,g,m,h]),P=p.useCallback(z=>{if(m||h)return;const{key:I}=z;if(g.includes("enter")&&I==="Enter"){z.preventDefault(),f.trim()&&v(f);return}if(g.includes("tab")&&I==="Tab"&&f.trim()){z.preventDefault(),v(f);return}if(g.includes("space")&&I===" "&&f.trim()){z.preventDefault(),v(f);return}if(I==="Backspace"&&!f&&x.length>0){z.preventDefault(),M(x.length-1);return}},[v,M,f,x,g,m,h]),F=p.useCallback(()=>{var z;j(!0),(z=e.onFocus)==null||z.call(e)},[e.onFocus]),V=p.useCallback(()=>{var z;j(!1),f.trim()&&v(f),(z=e.onBlur)==null||z.call(e)},[v,f,e.onBlur]);return{inputValue:f,setInputValue:y,tags:x,setTags:b,isFocused:C,setIsFocused:j,isHovered:S,setIsHovered:w,addTag:v,removeTag:M,handleInputChange:A,handleKeyDown:P,handleFocus:F,handleBlur:V,validateTag:T}},Fh=({tag:e,onRemove:o,isRemovable:t,size:n,views:a,isDisabled:l,isReadOnly:s})=>{const[c,d]=p.useState(!1),u={xs:{padding:"2px 8px",fontSize:"10px",iconSize:10},sm:{padding:"4px 10px",fontSize:"12px",iconSize:12},md:{padding:"6px 14px",fontSize:"14px",iconSize:14},lg:{padding:"8px 16px",fontSize:"16px",iconSize:16},xl:{padding:"10px 18px",fontSize:"18px",iconSize:18}}[n]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return r.jsxs(i.Horizontal,{alignItems:"center",gap:6,padding:u.padding,backgroundColor:"theme-primary-100",borderRadius:"9999px",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary-250",transition:"all 0.15s ease-in-out",opacity:l?.6:1,maxWidth:"100%",minWidth:0,_hover:!l&&!s?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[r.jsx(i.Text,{fontSize:u.fontSize,color:l?"color-gray-400":"theme-primary",maxLines:1,minWidth:0,...a==null?void 0:a.tagText,children:e}),t&&!l&&!s&&r.jsx(i.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:c?"color-red-100":"transparent",opacity:c?1:.7,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:g=>{g.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:r.jsx(We,{widthHeight:u.iconSize,color:c?"color-red-500":"color-gray-400"})})]})},Jl=({id:e,name:o,label:t,placeholder:n="Type and press Enter to add tags...",helperText:a,error:l=!1,inputValue:s="",tags:c=[],left:d,right:u,shadow:g={},views:m={},size:h="md",shape:f="default",variant:y="default",isDisabled:k=!1,isReadOnly:b=!1,isAutoFocus:C=!1,isRemovable:j=!0,isFocused:S=!1,isHovered:w=!1,maxTags:x,handleInputChange:T,handleKeyDown:v,handleFocus:M,handleBlur:A,removeTag:P,setIsHovered:F,onClick:V,setInputValue:z,setIsFocused:I,addTag:W,defaultTags:H,onTagsChange:R,onTagAdd:D,onTagRemove:$,minTagLength:_,maxTagLength:B,allowDuplicates:N,separators:Y,menuItems:ee,onMenuItemSelect:L,onFocus:E,onBlur:O,validateTag:K,...U})=>{const{getColor:J,themeMode:Z}=i.useTheme(),te=!!(t&&(S||c.length>0||s)),G=x&&c.length>=x,oe={border:"none",outline:"none",backgroundColor:"transparent",fontSize:i.Typography.fontSizes[h],color:k?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...m==null?void 0:m.input};return r.jsx(Je,{error:!!l,helperText:typeof l=="string"?l:a,views:m,...U,children:r.jsxs(io,{label:t,shadow:g,value:c.length>0||s?"has-content":"",size:h,shape:f,variant:y,error:!!l,showLabel:te,isFocused:S,isHovered:w,isDisabled:k,isReadOnly:b,views:{...m,container:{...m==null?void 0:m.container,...m==null?void 0:m.inputContainer}},onClick:V,onMouseEnter:()=>F==null?void 0:F(!0),onMouseLeave:()=>F==null?void 0:F(!1),children:[d,r.jsxs(Uo,{children:[t&&r.jsx(yo,{size:h,error:!!l,views:m,children:t}),r.jsxs(i.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:i.Typography.fontSizes[h],padding:"0",...m==null?void 0:m.tagsContainer,children:[c.map((le,de)=>r.jsx(Fh,{tag:le.value,onRemove:()=>P==null?void 0:P(de),isRemovable:j,size:h,views:m,isDisabled:k,isReadOnly:b},le.id)),!G&&r.jsx(i.Input,{id:e,name:o,type:"text",value:s,placeholder:c.length===0?n:"",disabled:k,readOnly:b,autoFocus:C,onChange:T,onKeyDown:v,onFocus:M,onBlur:A,autoComplete:"off",...oe}),G&&r.jsxs(i.Text,{fontSize:i.Typography.fontSizes[h],color:"color-gray-500",fontStyle:"italic",...m==null?void 0:m.placeholder,children:["Maximum ",x," tags reached"]})]})]}),u]})})},zh=e=>{const o=Xl(e),{tags:t,...n}=e,{setTags:a,...l}=o;return r.jsx(Jl,{...l,...n})},Mh=zh;function Wh(e){const o=setTimeout(e,0),t=setTimeout(e,10),n=setTimeout(e,50);return[o,t,n]}const Ql=({value:e,defaultValue:o="",length:t=6,onChange:n,onChangeText:a,onComplete:l,onKeyDown:s,onKeyPress:c,onBlur:d,onFocus:u,isReadOnly:g,isDisabled:m,pattern:h,stepValues:f,pasteTransformer:y})=>{var ee,L;const k=e!==void 0,b=k?e:o,[C,j]=p.useState(String(b??"").slice(0,t)||""),[S,w]=p.useState(!1),[x,T]=p.useState(!1),[v,M]=p.useState(null),[A,P]=p.useState(null),F=p.useRef(null),V=p.useRef(null),z=p.useRef({value:C,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((L=(ee=window==null?void 0:window.CSS)==null?void 0:ee.supports)==null?void 0:L.call(ee,"-webkit-touch-callout","none"))}),I=p.useRef({prev:[null,null,"none"]}),W=h?typeof h=="string"?new RegExp(h):h:null;p.useEffect(()=>{if(k&&e!==C){const E=String(e??"").slice(0,t)||"";j(E)}},[k,e,t,C]);const H=p.useCallback(E=>{let O=E;if(f&&f.length>0&&E){const K=parseInt(E,10);if(!isNaN(K)){let U=f[0],J=Math.abs(K-U);for(let Z=1;Z<f.length;Z++){const te=Math.abs(K-f[Z]);te<J&&(J=te,U=f[Z])}O=U.toString()}}j(O),n&&n(O),a&&a(O),l&&O.length===t&&l(O)},[n,a,l,t,f,k]),R=p.useCallback(E=>{E&&F.current!==E&&Object.defineProperty(F,"current",{value:E,writable:!0})},[]),D=p.useCallback(E=>{var U,J,Z,te;const O=typeof E=="string"?E:((U=E==null?void 0:E.currentTarget)==null?void 0:U.value)??((J=E==null?void 0:E.target)==null?void 0:J.value)??((Z=E==null?void 0:E.nativeEvent)==null?void 0:Z.text)??"",K=String(O).slice(0,t);if(K.length>0&&W&&!W.test(K)){(te=E==null?void 0:E.preventDefault)==null||te.call(E);return}H(K),F.current&&(F.current.value=K)},[t,W,H,F]),$=p.useCallback(()=>{const E=F.current;if(E&&typeof E.setSelectionRange=="function"){const O=typeof E.value=="string"?E.value.length:0,K=Math.min(O,t-1),U=O;E.setSelectionRange(K,U),M(K),P(U)}w(!0),u&&u()},[t,u]),_=p.useCallback(E=>{w(!1),d&&d(E)},[d]),B=p.useCallback(E=>{s&&s(E)},[]),N=p.useCallback(E=>{c&&c(E)},[]),Y=p.useCallback(E=>{const O=F.current;if(!E.clipboardData||!O)return;const K=E.clipboardData.getData("text/plain"),U=y?y(K):K;E.preventDefault();const J=O.selectionStart||0,Z=O.selectionEnd||0,oe=(J!==Z?C.slice(0,J)+U+C.slice(Z):C.slice(0,J)+U+C.slice(J)).slice(0,t);if(oe.length>0&&W&&!W.test(oe))return;O.value=oe,H(oe),j(oe);const le=Math.min(oe.length,t-1),de=oe.length;O.setSelectionRange(le,de),M(le),P(de)},[t,y,W,H,C,j]);return p.useEffect(()=>{const E=F.current,O=V.current;if(!E||!O||typeof document>"u")return;z.current.value!==E.value&&z.current.onChange&&z.current.onChange(E.value),I.current.prev=[E.selectionStart,E.selectionEnd,E.selectionDirection];function K(){if(document.activeElement!==E){M(null),P(null);return}const G=(E==null?void 0:E.selectionStart)??null,oe=(E==null?void 0:E.selectionEnd)??null,le=(E==null?void 0:E.selectionDirection)??null,de=(E==null?void 0:E.maxLength)??0,Te=(E==null?void 0:E.value)??"",ae=I.current.prev;let re=-1,ne=-1,ie="none";if(Te.length!==0&&G!==null&&oe!==null){const ye=G===oe,ve=G===Te.length&&Te.length<de;if(ye&&!ve){const Ce=G;if(Ce===0)re=0,ne=1,ie="forward";else if(Ce===de)re=Ce-1,ne=Ce,ie="backward";else if(de>1&&Te.length>1){let Ne=0;if(ae[0]!==null&&ae[1]!==null){ie=Ce<ae[1]?"backward":"forward";const Qe=ae[0]===ae[1]&&ae[0]<de;ie==="backward"&&!Qe&&(Ne=-1)}re=Ne+Ce,ne=Ne+Ce+1}}re!==-1&&ne!==-1&&re!==ne&&F.current&&F.current.setSelectionRange(re,ne,ie)}const ge=re!==-1?re:G,X=ne!==-1?ne:oe,Q=ie!=="none"?ie:le;M(ge),P(X),I.current.prev=[ge,X,Q]}document.addEventListener("selectionchange",K,{capture:!0}),K(),document.activeElement===E&&w(!0);const U=O,J=()=>{var G;U&&typeof((G=U.style)==null?void 0:G.setProperty)=="function"&&U.style.setProperty("--root-height",`${E.clientHeight}px`)};J();const Z=typeof window<"u"?window.ResizeObserver:void 0,te=typeof Z=="function"?new Z(J):null;return te==null||te.observe(E),()=>{document.removeEventListener("selectionchange",K,{capture:!0}),te==null||te.disconnect()}},[]),p.useEffect(()=>{if(typeof Event>"u")return;const E=Wh(()=>{var Z,te,G;const O=F.current;O&&typeof O.dispatchEvent=="function"&&O.dispatchEvent(new Event("input"));const K=(Z=F.current)==null?void 0:Z.selectionStart,U=(te=F.current)==null?void 0:te.selectionEnd,J=(G=F.current)==null?void 0:G.selectionDirection;K!==null&&U!==null&&K!==void 0&&U!==void 0&&(M(K),P(U),I.current.prev=[K,U,J||"none"])});return()=>E.forEach(clearTimeout)},[C,S]),{value:C,setValue:H,isFocused:S,setIsFocused:w,isHovered:x,setIsHovered:T,inputRef:F,containerRef:V,mirrorSelectionStart:v,mirrorSelectionEnd:A,setMirrorSelectionStart:M,setMirrorSelectionEnd:P,setInputRef:R,handleChange:D,handleFocus:$,handleBlur:_,handleKeyDown:B,handleKeyPress:N,handlePaste:Y}},Hh=p.createContext({slots:[],isFocused:!1,isHovering:!1}),Vh=`
6
+ `,backgroundSize:`200% ${$}px, ${$}px 200%, 200% ${$}px, ${$}px 200%`,backgroundPosition:q,transitionProperty:"background-position",transitionDuration:`${A}s`,transitionTimingFunction:"linear",transitionDelay:B,_hover:{backgroundPosition:Y,transitionDelay:P},width:i?"100%":l?"fit-content":void 0,...p==null?void 0:p.container,...R,children:t.jsx(s.View,{as:r?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,z-3),width:"100%",height:"100%",...h,...f,...y,backgroundColor:(h==null?void 0:h.backgroundColor)||w,color:x,borderWidth:0,cursor:n?"default":"pointer",children:E})})}return t.jsx(s.Element,{ref:b,as:e==="link"&&r?"div":"button",type:e==="link"&&r?void 0:"button",disabled:!!(n||a),...f,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:i?"100%":l?"fit-content":void 0,borderRadius:gt[c],boxShadow:d,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:g,...h,...p==null?void 0:p.container,...R,children:E})},Bm=m.memo(m.forwardRef(({variant:e="filled",size:o="md",shape:r="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:l,color:i,textColor:u,explicitTextColor:c,reversed:d=!1,isAuto:g=!0,isFilled:p,isDisabled:h,isLoading:f,isIconRounded:y,isIcon:b,isHovered:x,icon:C,leftIcon:k,rightIcon:w,startIcon:v,endIcon:S,children:I,to:j,isExternal:R,shadow:z,onClick:E,views:W={},animation:F,loaderProps:T,config:M,ariaLabel:V,borderMovingDuration:A=2,borderMovingGradientColors:H=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:L="#705CFF",animatedStrokeTextColor:O="color-gray-900",..._},q)=>{const P=h?"theme-disabled":f?"theme-loading":l??i??"theme-primary",B=c??u??"color-white",{config:$}=cr(),D=$==null?void 0:$.theme,N=m.useMemo(()=>{const ae=Hm(P,B,d,D);return M!=null&&M.variants&&Object.keys(M.variants).forEach(pe=>{ae[pe]&&(ae[pe]=Ke(ae[pe],M.variants[pe]))}),ae},[P,B,d,D,M==null?void 0:M.variants]),G=N[e]??N.filled,K=c?{...G,color:c}:G,re=(K==null?void 0:K.color)??B,oe=t.jsx(Vm,{icon:C,leftIcon:k??v,rightIcon:w??S,isLoading:f,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:re,isIconRounded:y,loaderProps:T,views:W,children:I}),ie=Al[o],X=y||b?Am[o]:{};return t.jsx(Lm,{variant:e,animation:F,to:j,isDisabled:h,isLoading:f,isAuto:g,isFilled:p,isExternal:R,shape:r,shadow:z,onClick:E,views:W,baseStyles:K,sizeStyles:ie,iconPad:X,resolvedTextColor:re,content:oe,size:o,mainTone:P,borderMovingDuration:A,borderMovingGradientColors:H,animatedStrokeAccentColor:L,animatedStrokeTextColor:O,containerRef:q,...V!==void 0?{"aria-label":V}:{},..._})})),_m=e=>{const[o,r]=s.useHover(),n=ve("button",e),a=e.textColor??(e.backgroundColor!=null&&e.color!=null?e.color:void 0);return t.jsx(Bm,{isHovered:r,...n,explicitTextColor:a})},fe=_m,Om={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},Nm={square:0,rounded:"8px",pill:"24px"},qm=e=>{const o=e==="dark";return{default:{backgroundColor:"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:"color-gray-300",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.05)"}},elevated:{backgroundColor:"color-white",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.35), 0px 1px 2px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.08), 0px 1px 2px rgba(0, 0, 0, 0.06)",border:"none",transition:"box-shadow 0.2s ease",_hover:{boxShadow:o?"0px 4px 6px rgba(0, 0, 0, 0.4), 0px 2px 4px rgba(0, 0, 0, 0.35)":"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.06)"}}}},fr=e=>(e.themeMode,{container:{backgroundColor:"color-white",color:"color-gray-900",borderRadius:"8px",overflow:"hidden",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},header:{padding:"16px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"theme-primary",fontWeight:600,fontSize:14},content:{padding:"16px",color:"color-gray-600",fontSize:12,lineHeight:"18px"},footer:{padding:"16px",borderTop:"1px solid",borderColor:"color-gray-100",justifyContent:"flex-end",gap:8}}),Hl=m.createContext({}),zn=()=>m.useContext(Hl),Ur=({children:e,views:o,style:r,themeMode:n,...a})=>{var d;const l=s.useTheme(),{styles:i}=zn(),u=fr(l).header,c={...u,...i==null?void 0:i.header,...a,style:{...u==null?void 0:u.style,...(d=i==null?void 0:i.header)==null?void 0:d.style,...r}};return t.jsx(s.Vertical,{gap:8,...c,children:e})},Gr=({children:e,views:o,style:r,themeMode:n,...a})=>{var d;const l=s.useTheme(),{styles:i}=zn(),u=fr(l).content,c={...u,...i==null?void 0:i.content,...a,style:{...u==null?void 0:u.style,...(d=i==null?void 0:i.content)==null?void 0:d.style,...r}};return t.jsx(s.Vertical,{gap:12,...c,children:e})},Yr=({children:e,views:o,style:r,themeMode:n,...a})=>{var d;const l=s.useTheme(),{styles:i}=zn(),u=fr(l).footer,c={...u,...i==null?void 0:i.footer,...a,style:{...u==null?void 0:u.style,...(d=i==null?void 0:i.footer)==null?void 0:d.style,...r}};return t.jsx(s.Vertical,{gap:8,...c,children:e})},Um=({variant:e="default",size:o="md",shape:r="rounded",children:n,header:a,footer:l,isFullWidth:i=!1,views:u,style:c,themeMode:d,config:g,...p})=>{var S,I;const h=s.useTheme(),f=fr(h),y=((S=Om[o])==null?void 0:S.padding)||"16px",b=m.useMemo(()=>({styles:{container:{...f.container,borderRadius:Nm[r],...u==null?void 0:u.container},header:{...f.header,padding:y,...u==null?void 0:u.header},content:{...f.content,padding:y,...u==null?void 0:u.content},footer:{...f.footer,padding:y,...u==null?void 0:u.footer}}}),[f,u,y,r]),x=m.Children.toArray(n).some(j=>m.isValidElement(j)&&(j.type===Ur||j.type===Gr||j.type===Yr)),{themeMode:C}=h,w=qm(d||C)[e],v={width:i?"100%":"auto",overflow:"hidden",...w,...b.styles.container,...p,style:{...(I=b.styles.container)==null?void 0:I.style,...c}};return t.jsx(Hl.Provider,{value:b,children:t.jsx(s.View,{...v,children:x?n:t.jsxs(s.Vertical,{width:"100%",children:[a&&t.jsx(Ur,{children:a}),t.jsx(Gr,{children:n}),l&&t.jsx(Yr,{children:l})]})})})},Gm=e=>{const o=ve("card",e);return t.jsx(Um,{...o})},Me=Gm;Me.Header=Ur;Me.Content=Gr;Me.Footer=Yr;const Ym=({defaultActiveIndex:e=0,activeIndex:o,onChange:r,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:l=!0,infinite:i=!0,totalSlides:u,stepIndices:c})=>{const d=m.useRef(u||0),[g,p]=m.useState(u||0),h=m.useRef(new Set),f=m.useRef(0),y=m.useMemo(()=>Oo("carousel-content"),[]),[b,x]=m.useState(o!==void 0?o:e),[C,k]=m.useState(!1),[w,v]=m.useState(!1),[S,I]=m.useState(0),[j,R]=m.useState(0),z=m.useRef(null);m.useEffect(()=>{o!==void 0&&x(o)},[o]);const E=m.useCallback(Y=>{let P=Y;i?Y<0?P=g-1:Y>=g&&(P=0):P=Math.max(0,Math.min(Y,g-1)),c&&c.length>0&&(c.includes(P)||(P=c.reduce(($,D)=>Math.abs(D-P)<Math.abs($-P)?D:$))),o===void 0&&x(P),r&&r(P)},[o,i,r,g]),W=m.useCallback(()=>{E(b+1)},[b,E]),F=m.useCallback(()=>{E(b-1)},[b,E]);m.useEffect(()=>(n&&!C&&!w&&(z.current=setInterval(()=>{W()},a)),()=>{z.current&&clearInterval(z.current)}),[n,a,C,w,W,l]);const T=m.useCallback(()=>{l&&k(!0)},[l]),M=m.useCallback(()=>{k(!1)},[]),V=m.useCallback(Y=>{v(!0),"touches"in Y?(I(Y.touches[0].clientX),R(Y.touches[0].clientY)):(I(Y.clientX),R(Y.clientY))},[]),A=m.useCallback(Y=>{if(!w)return;let P,B;"touches"in Y?(P=Y.touches[0].clientX,B=Y.touches[0].clientY):(P=Y.clientX,B=Y.clientY);const $=P-S,D=B-j;Math.abs($)>Math.abs(D)&&Math.abs($)>50&&($>0?F():W(),v(!1))},[w,S,j,W,F]),H=m.useCallback(()=>{v(!1)},[]),L=m.useCallback(()=>{const Y=f.current++;h.current.add(Y);const P=h.current.size;return d.current=P,p(P),Y},[]),O=m.useCallback(Y=>{h.current.delete(Y);const P=h.current.size;if(d.current=P,p(P),P>0&&b>=P){const B=Math.max(0,P-1);o===void 0&&x(B),r&&r(B)}},[b,o,r]),_=i||b>0,q=i||b<g-1;return{activeIndex:b,totalSlides:g,goToSlide:E,nextSlide:W,prevSlide:F,canGoNext:q,canGoPrevious:_,handleMouseEnter:T,handleMouseLeave:M,handleDragStart:V,handleDragMove:A,handleDragEnd:H,registerSlide:L,unregisterSlide:O,contentId:y,infinite:i}},Km={dot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},line:{width:"20px",height:"4px",borderRadius:"2px",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},number:{minWidth:"24px",height:"24px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",transition:"background-color 0.3s ease"}},Xm={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},Zt={width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"color-white",color:"color-gray-800",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 5px rgba(0, 0, 0, 0.1)",zIndex:1,transition:"background-color 0.3s ease",_hover:{backgroundColor:"color-gray-100"}},jt=()=>({container:{position:"relative",overflow:"hidden"},content:{overflow:"hidden",width:"100%",height:"100%"},innerContainer:{display:"flex",transitionProperty:"transform",transitionDuration:"300ms",transitionTimingFunction:"ease-in-out",height:"100%"},item:{flex:"0 0 100%",minWidth:0,position:"relative",height:"100%"},prevButton:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)",zIndex:10,...Zt},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...Zt}}),Vl=m.createContext(null),yr=()=>{const e=m.useContext(Vl);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},Pl=({children:e,isActive:o,index:r,views:n,...a})=>t.jsx(s.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),Dl=({views:e,children:o,...r})=>{const{goToPrevious:n,canGoPrevious:a,styles:l}=yr(),u={...jt().prevButton,...l==null?void 0:l.prevButton,...e==null?void 0:e.prevButton};return t.jsx(fe,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...u,...r,children:o??t.jsx(Se,{orientation:"left",widthHeight:16})})},$l=({views:e,children:o,...r})=>{const{goToNext:n,canGoNext:a,styles:l}=yr(),u={...jt().nextButton,...l==null?void 0:l.nextButton,...e==null?void 0:e.nextButton};return t.jsx(fe,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...u,...r,children:o??t.jsx(Se,{orientation:"right",widthHeight:16})})},Ll=({children:e,views:o,...r})=>{const{registerSlide:n,unregisterSlide:a,styles:l}=yr(),i=m.useRef(null);m.useEffect(()=>{const d=n();return i.current=d,()=>{i.current!==null&&a(i.current)}},[n,a]);const c={...jt().item,...l==null?void 0:l.item,...o==null?void 0:o.item};return t.jsx(s.View,{role:"group","aria-roledescription":"slide",...c,...r,children:e})},Bl=({children:e,views:o,style:r,...n})=>{const{currentIndex:a,styles:l,contentId:i}=yr(),u=jt(),c={...u.content,...l==null?void 0:l.content,...o==null?void 0:o.content},d={...u.innerContainer,...l==null?void 0:l.innerContainer,...o==null?void 0:o.innerContainer},g=`-${a*100}%`;return t.jsx(s.View,{...c,...n,style:{...c==null?void 0:c.style,...r},id:i,"aria-live":"polite",children:t.jsx(s.View,{...d,style:{...d==null?void 0:d.style,transform:`translateX(${g})`},children:e})})},Jm=({children:e,defaultActiveIndex:o=0,activeIndex:r,onChange:n,showNavigation:a=!0,navigationPosition:l="inside",prevButton:i,nextButton:u,showIndicators:c=!0,indicatorPosition:d="bottom",indicatorVariant:g="dot",autoPlay:p=!1,autoPlayInterval:h=3e3,pauseOnHover:f=!0,infinite:y=!0,direction:b="horizontal",transitionDuration:x=300,views:C,stepIndices:k,themeMode:w,...v})=>{const S=m.useMemo(()=>m.Children.toArray(e),[e]),I=Ym({defaultActiveIndex:o,activeIndex:r,onChange:n,autoPlay:p,autoPlayInterval:h,pauseOnHover:f,infinite:y,totalSlides:S.length}),{activeIndex:j,totalSlides:R,goToSlide:z,nextSlide:E,prevSlide:W,handleMouseEnter:F,handleMouseLeave:T,handleDragStart:M,handleDragMove:V,handleDragEnd:A}=I,H=()=>{if(!a)return null;const _=i||t.jsx(s.View,{as:"button","aria-label":"Previous slide",...Zt,...C==null?void 0:C.prevButton,children:"❮"}),q=u||t.jsx(s.View,{as:"button","aria-label":"Next slide",...Zt,...C==null?void 0:C.nextButton,children:"❯"});return t.jsxs(t.Fragment,{children:[t.jsx(s.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:l==="inside"?"10px":"-40px",onClick:W,cursor:!y&&j===0?"not-allowed":"pointer",opacity:!y&&j===0?.5:1,children:_}),t.jsx(s.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:l==="inside"?"10px":"-40px",onClick:E,cursor:!y&&j===S.length-1?"not-allowed":"pointer",opacity:!y&&j===S.length-1?.5:1,children:q})]})},L=()=>c?t.jsx(s.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...d==="top"?{top:"10px"}:{bottom:"10px"},...C==null?void 0:C.indicators,children:S.map((_,q)=>t.jsx(s.View,{onClick:()=>z(q),cursor:"pointer",...Km[g],...q===j?{...Xm[g]}:{},...C==null?void 0:C.indicator,...q===j?C==null?void 0:C.activeIndicator:{},children:g==="number"&&q+1},q))}):null;return m.useMemo(()=>m.Children.toArray(e).some(_=>m.isValidElement(_)&&(_.type===Bl||_.type===Ll||_.type===Dl||_.type===$l)),[e])?t.jsx(Vl.Provider,{value:{currentIndex:j,totalSlides:R,goToSlide:z,goToNext:E,goToPrevious:W,canGoNext:I.canGoNext,canGoPrevious:I.canGoPrevious,registerSlide:I.registerSlide,unregisterSlide:I.unregisterSlide,styles:{...jt(),...C},contentId:I.contentId,infinite:y},children:t.jsx(s.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...C==null?void 0:C.container,...v,children:e})}):t.jsxs(s.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:F,onMouseLeave:T,onTouchStart:M,onTouchMove:V,onTouchEnd:A,onMouseDown:M,onMouseMove:V,onMouseUp:A,...C==null?void 0:C.container,...v,children:[t.jsx(s.View,{width:"100%",height:"100%",position:"relative",...C==null?void 0:C.slideWrapper,children:S.map((_,q)=>t.jsx(Pl,{isActive:q===j,index:q,views:C==null?void 0:C.slide,children:_},q))}),H(),L()]})},Qm=e=>t.jsx(Jm,{...e}),Ne=Qm;Ne.Slide=Pl;Ne.Content=Bl;Ne.Item=Ll;Ne.Previous=Dl;Ne.Next=$l;const _e={blue:"color-blue-500",green:"color-green-500",purple:"color-purple-500",orange:"color-orange-500",red:"color-red-500",teal:"color-teal-500",pink:"color-pink-500",indigo:"color-indigo-500",yellow:"color-yellow-500",cyan:"color-cyan-500"},_l=[_e.blue,_e.green,_e.purple,_e.orange,_e.red,_e.teal,_e.pink,_e.indigo,_e.yellow,_e.cyan],Bo=_l,Zm={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},e0={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},o0={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},t0={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},r0={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},n0={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},At={position:"absolute",backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:100},Ol={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},er={stroke:"color-gray-200",strokeWidth:"1px"},or={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},a0={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},l0={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},i0={r:"5px",strokeWidth:"2.5px",stroke:"color-white",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{r:"7px"}},Ht={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},Mn={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-white-800",borderRadius:"4px",zIndex:10,padding:"24px",textAlign:"center"},s0={...Mn},c0={...Mn,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},d0={...Mn,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},u0=({data:e,dataPoints:o,animated:r=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[l,i]=m.useState(r?0:1),[u,c]=m.useState({visible:!1,x:0,y:0,content:null}),d=m.useRef(null),g=m.useRef(null);m.useEffect(()=>{if(!r){i(1);return}const k=Date.now(),w=()=>{const v=Date.now()-k,S=Math.min(v/n,1);i(S),S<1&&(d.current=requestAnimationFrame(w))};return d.current=requestAnimationFrame(w),()=>{d.current&&cancelAnimationFrame(d.current)}},[r,n]);const[p,h]=m.useState(new Set),f=m.useCallback(k=>{h(w=>{const v=new Set(w);return v.has(k)?v.delete(k):v.add(k),v})},[]),y=m.useCallback(()=>e?{...e,series:e.series.map((k,w)=>({...k,color:k.color||Bo[w%Bo.length],hidden:p.has(k.name)}))}:o?o.map((k,w)=>({...k,color:k.color||Bo[w%Bo.length],hidden:p.has(k.label)})):null,[e,o,p]),b=m.useCallback((k,w,v)=>{a&&c({visible:!0,x:k,y:w,content:v})},[a]),x=m.useCallback(()=>{c(k=>({...k,visible:!1}))},[]),C=m.useCallback(()=>{if(!g.current)return{width:0,height:0};const{width:k,height:w}=g.current.getBoundingClientRect();return{width:k,height:w}},[]);return{animationProgress:l,tooltip:u,containerRef:g,processedData:y,showTooltip:b,hideTooltip:x,getChartDimensions:C,toggleSeries:f}},p0=({data:e,width:o,height:r,animationProgress:n,showGrid:a=!0,onBarClick:l,showTooltip:i,hideTooltip:u,views:c})=>{const{getColor:d}=s.useTheme(),g={top:20,right:20,bottom:40,left:50},p=o-g.left-g.right,h=r-g.top-g.bottom,f=m.useMemo(()=>{let S=0;return e.series.forEach(I=>{I.data.forEach(j=>{S=Math.max(S,j)})}),S},[e]),y=e.labels.length,b=e.series.length,x=p/y,C=x*.8/b,k=x*.2/(b+1),w=f||10,v=m.useMemo(()=>{const I=[];for(let j=0;j<=5;j++){const R=w/5*j;I.push(R)}return I},[f]);return t.jsxs("svg",{width:o,height:r,children:[t.jsx("defs",{children:e.series.map((S,I)=>{const j=S.color?d(S.color):"black";return t.jsxs("linearGradient",{id:`bar-gradient-${I}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:j,stopOpacity:1}),t.jsx("stop",{offset:"100%",stopColor:j,stopOpacity:.7})]},`bar-gradient-${I}`)})}),t.jsx("line",{x1:g.left,y1:r-g.bottom,x2:o-g.right,y2:r-g.bottom,...er,...c==null?void 0:c.axis}),t.jsx("line",{x1:g.left,y1:g.top,x2:g.left,y2:r-g.bottom,...er,...c==null?void 0:c.axis}),e.labels.map((S,I)=>{const j=g.left+(I+.5)*x,R=r-g.bottom+20;return t.jsx("text",{x:j,y:R,textAnchor:"middle",...or,...c==null?void 0:c.axisLabel,children:S},`x-label-${I}`)}),v.map((S,I)=>{const j=r-g.bottom-S/w*h;return t.jsxs(m.Fragment,{children:[t.jsx("text",{x:g.left-10,y:j,textAnchor:"end",dominantBaseline:"middle",...or,...c==null?void 0:c.axisLabel,children:S.toFixed(0)}),a&&t.jsx("line",{x1:g.left,y1:j,x2:o-g.right,y2:j,...Ol,...c==null?void 0:c.grid})]},`y-tick-${I}`)}),e.series.map((S,I)=>S.hidden?null:t.jsx(m.Fragment,{children:S.data.map((j,R)=>{const z=j/w*h*n,E=g.left+R*x+k*(I+1)+C*I,W=r-g.bottom-z,F=e.labels[R],T=e.series.reduce((L,O)=>{const _=O.data[R];return L+(typeof _=="number"?_:0)},0),M=T>0?(j/T*100).toFixed(1):null,V=S.color?d(S.color):"black",A=L=>{const O=t.jsxs(s.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(s.Text,{fontWeight:"semibold",children:S.name}),t.jsx(s.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:V})]}),t.jsx(s.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:F}),t.jsxs(s.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Value"}),t.jsx(s.Text,{fontWeight:"medium",children:j.toLocaleString()})]}),M!==null&&t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Share"}),t.jsx(s.Text,{fontWeight:"medium",children:`${M}%`})]}),t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Category total"}),t.jsx(s.Text,{fontWeight:"medium",children:T.toLocaleString()})]})]})]}),_=L.currentTarget.getBoundingClientRect(),q=_.left+_.width/2,Y=_.top;i(q,Y,O)},H=()=>{l&&l(S.name,R)};return t.jsx("rect",{x:E,y:W,width:C,height:z,fill:`url(#bar-gradient-${I})`,onMouseEnter:A,onMouseMove:A,onMouseLeave:u,onClick:H,...a0,...c==null?void 0:c.bar},`bar-${I}-${R}`)})},`series-${I}`))]})},m0=({data:e,width:o,height:r,animationProgress:n,showGrid:a=!0,onPointClick:l,showTooltip:i,hideTooltip:u,views:c})=>{const{getColor:d}=s.useTheme(),g={top:20,right:20,bottom:40,left:40},p=o-g.left-g.right,h=r-g.top-g.bottom,f=m.useMemo(()=>{let k=0;return e.series.forEach(w=>{w.data.forEach(v=>{k=Math.max(k,v)})}),k},[e]),y=f||10,b=m.useMemo(()=>{const w=[];for(let v=0;v<=5;v++){const S=y/5*v;w.push(S)}return w},[f]),x=k=>{if(k.length<2)return"";const w=k.map((S,I)=>({x:g.left+I/(e.labels.length-1)*p,y:r-g.bottom-S/y*h*n}));let v=`M ${w[0].x},${w[0].y}`;for(let S=0;S<w.length-1;S++){const I=w[S===0?S:S-1],j=w[S],R=w[S+1],z=w[S+2===w.length?S+1:S+2],E=j.x+(R.x-I.x)/6,W=j.y+(R.y-I.y)/6,F=R.x-(z.x-j.x)/6,T=R.y-(z.y-j.y)/6;v+=` C ${E},${W} ${F},${T} ${R.x},${R.y}`}return v},C=k=>{if(k.length<2)return"";const w=x(k),v=g.left,S=g.left+p,I=r-g.bottom;return`${w} L ${S},${I} L ${v},${I} Z`};return t.jsxs("svg",{width:o,height:r,children:[t.jsx("defs",{children:e.series.map((k,w)=>{const v=k.color?d(k.color):"black";return t.jsxs("linearGradient",{id:`gradient-${w}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:v,stopOpacity:.3}),t.jsx("stop",{offset:"100%",stopColor:v,stopOpacity:0})]},`gradient-${w}`)})}),t.jsx("line",{x1:g.left,y1:r-g.bottom,x2:o-g.right,y2:r-g.bottom,...er,...c==null?void 0:c.axis}),t.jsx("line",{x1:g.left,y1:g.top,x2:g.left,y2:r-g.bottom,...er,...c==null?void 0:c.axis}),e.labels.map((k,w)=>{const v=g.left+w/(e.labels.length-1)*p,S=r-g.bottom+20;return t.jsx("text",{x:v,y:S,textAnchor:"middle",...or,...c==null?void 0:c.axisLabel,children:k},`x-label-${w}`)}),b.map((k,w)=>{const v=r-g.bottom-k/y*h;return t.jsxs(m.Fragment,{children:[t.jsx("text",{x:g.left-10,y:v,textAnchor:"end",dominantBaseline:"middle",...or,...c==null?void 0:c.axisLabel,children:k.toFixed(0)}),a&&t.jsx("line",{x1:g.left,y1:v,x2:o-g.right,y2:v,...Ol,...c==null?void 0:c.grid})]},`y-tick-${w}`)}),e.series.map((k,w)=>{if(k.hidden)return null;const v=k.color?d(k.color):"black";return t.jsxs(m.Fragment,{children:[t.jsx("path",{d:C(k.data),fill:`url(#gradient-${w})`,...c==null?void 0:c.area}),t.jsx("path",{d:x(k.data),stroke:v,...l0,...c==null?void 0:c.line}),k.data.map((S,I)=>{const j=g.left+I/(e.labels.length-1)*p,R=r-g.bottom-S/y*h*n,z=e.labels[I],E=e.series.reduce((H,L)=>{const O=L.data[I];return H+(typeof O=="number"?O:0)},0),W=E>0?(S/E*100).toFixed(1):null,F=I>0&&typeof k.data[I-1]=="number"?k.data[I-1]:null,T=typeof F=="number"?S-F:null,M=typeof T=="number"?`${T>=0?"+":""}${T.toLocaleString()}`:null,V=H=>{const L=t.jsxs(s.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(s.Text,{fontWeight:"semibold",children:k.name}),t.jsx(s.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:v})]}),t.jsx(s.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:z}),t.jsxs(s.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Value"}),t.jsx(s.Text,{fontWeight:"medium",children:S.toLocaleString()})]}),M!==null&&t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Change"}),t.jsx(s.Text,{fontWeight:"medium",children:M})]}),W!==null&&t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Share"}),t.jsx(s.Text,{fontWeight:"medium",children:`${W}%`})]}),t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Category total"}),t.jsx(s.Text,{fontWeight:"medium",children:E.toLocaleString()})]})]})]}),O=H.currentTarget.getBoundingClientRect(),_=O.left+O.width/2,q=O.top+O.height/2;i(_,q,L)},A=()=>{l&&l(k.name,I)};return t.jsx("circle",{cx:j,cy:R,fill:v,onMouseEnter:V,onMouseMove:V,onMouseLeave:u,onClick:A,...i0,...c==null?void 0:c.point},`point-${w}-${I}`)})]},`series-${w}`)})]})},g0=({dataPoints:e,width:o,height:r,animationProgress:n,isDonut:a=!1,onSliceClick:l,showTooltip:i,hideTooltip:u,views:c})=>{const{getColor:d}=s.useTheme(),{ref:g,relation:p}=s.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),h=m.useRef(null);m.useEffect(()=>{h.current&&g&&(g.current=h.current)},[h,g]);const y=Math.min(o,r)/2*.8,b=o/2,x=r/2,C=a?y*.6:0,k=m.useMemo(()=>e.filter(S=>!S.hidden),[e]),w=m.useMemo(()=>k.reduce((S,I)=>S+I.value,0),[k]),v=m.useMemo(()=>{if(w===0)return[{path:a?[`M ${b} ${x-y}`,`A ${y} ${y} 0 1 1 ${b} ${x+y}`,`A ${y} ${y} 0 1 1 ${b} ${x-y}`,`M ${b} ${x-C}`,`A ${C} ${C} 0 1 0 ${b} ${x+C}`,`A ${C} ${C} 0 1 0 ${b} ${x-C}`,"Z"].join(" "):[`M ${b} ${x}`,`M ${b} ${x-y}`,`A ${y} ${y} 0 1 1 ${b} ${x+y}`,`A ${y} ${y} 0 1 1 ${b} ${x-y}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:b,labelY:x,startAngle:0,endAngle:Math.PI*2,index:-1}];const S=[];let I=-Math.PI/2;for(let j=0;j<k.length;j++){const z=k[j].value/w,E=z*2*Math.PI*n,F=Math.max(0,E-.02),T=I+F,M=b+Math.cos(I)*y,V=x+Math.sin(I)*y,A=b+Math.cos(T)*y,H=x+Math.sin(T)*y,L=b+Math.cos(I)*C,O=x+Math.sin(I)*C,_=b+Math.cos(T)*C,q=x+Math.sin(T)*C,Y=F>Math.PI?1:0;let P;a?P=[`M ${M} ${V}`,`A ${y} ${y} 0 ${Y} 1 ${A} ${H}`,`L ${_} ${q}`,`A ${C} ${C} 0 ${Y} 0 ${L} ${O}`,"Z"].join(" "):P=[`M ${b} ${x}`,`L ${M} ${V}`,`A ${y} ${y} 0 ${Y} 1 ${A} ${H}`,"Z"].join(" ");const B=I+F/2,$=a?(y+C)/2:y*.7,D=b+Math.cos(B)*$,N=x+Math.sin(B)*$,G=`${(z*100).toFixed(1)}%`,K=k[j].color||Bo[j%Bo.length],re=d(K);S.push({path:P,color:re,label:k[j].label,value:k[j].value,percentage:G,labelX:D,labelY:N,startAngle:I,endAngle:T,index:j,originalIndex:e.findIndex(oe=>oe.label===k[j].label)}),I=T}return S},[k,w,y,b,x,C,n,a,e]);return t.jsxs("svg",{ref:h,width:o,height:r,style:{overflow:"visible"},children:[a&&t.jsxs("g",{pointerEvents:"none",children:[t.jsx("circle",{cx:b,cy:x,r:C,fill:"white"}),t.jsx("text",{x:b,y:x-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),t.jsx("text",{x:b,y:x+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:w.toLocaleString()})]}),v.map((S,I)=>{const j=E=>{const W=w>0?S.value/w*100:0,F=w>0?Math.max(0,100-W):null,T=t.jsxs(s.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(s.Text,{fontWeight:"semibold",children:S.label}),t.jsx(s.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:S.color})]}),t.jsxs(s.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",S.index+1," of ",k.length]}),t.jsxs(s.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Value"}),t.jsx(s.Text,{fontWeight:"medium",children:S.value.toLocaleString()})]}),t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Share"}),t.jsx(s.Text,{fontWeight:"medium",children:S.percentage})]}),t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Total"}),t.jsx(s.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),F!==null&&t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Remaining"}),t.jsx(s.Text,{fontWeight:"medium",children:`${F.toFixed(1)}%`})]})]})]});let M=E.clientX,V=E.clientY;if(h.current){const A=h.current.getBoundingClientRect();M=A.left+S.labelX,V=A.top+S.labelY}i(M,V,T)},R=()=>{S.index!==-1&&l&&l(e[S.index],S.index)},z=S.index===-1;return t.jsxs("g",{children:[t.jsx("path",{d:S.path,fill:S.color,onMouseEnter:z?void 0:j,onMouseMove:z?void 0:j,onMouseLeave:z?void 0:u,onClick:R,...Ht,style:{...Ht==null?void 0:Ht.style,cursor:z?"default":"pointer"},...c==null?void 0:c.pie}),!z&&S.endAngle-S.startAngle>.25&&t.jsx("text",{x:S.labelX,y:S.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"11px",fontWeight:"800",pointerEvents:"none",paintOrder:"stroke",stroke:"rgba(0,0,0,0.2)",strokeWidth:"2px",children:S.percentage})]},`slice-${I}`)})]})},h0=({visible:e,x:o,y:r,content:n,maxDistance:a=100,views:l})=>{const i=m.useRef(null),[u,c]=m.useState({left:0,top:0});return m.useEffect(()=>{if(!e||!i.current||typeof window>"u"||typeof i.current.getBoundingClientRect!="function")return;const g=i.current.getBoundingClientRect(),p=g.width||200,h=g.height||100,f=20,y=16;let b=o-p/2,x=r-h-f;x<y&&(x=r+f),b+p>window.innerWidth-y?b=window.innerWidth-p-y:b<y&&(b=y),x=Math.max(y,Math.min(x,window.innerHeight-h-y)),c({left:b,top:x})},[e,o,r]),e?t.jsx(s.View,{ref:i,position:"fixed",left:`${u.left}px`,top:`${u.top}px`,...At,...l==null?void 0:l.tooltip,style:{...At==null?void 0:At.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},f0=({type:e,data:o,dataPoints:r,title:n,showLegend:a=!0,legendPosition:l="bottom",showGrid:i=!0,showTooltips:u=!0,animated:c=!0,animationDuration:d=500,responsive:g=!0,aspectRatio:p=16/9,width:h=200,height:f=200,views:y,onDataPointClick:b,onSeriesClick:x,isLoading:C=!1,error:k,noData:w,loadingIndicator:v,errorIndicator:S,noDataIndicator:I,"aria-label":j,themeMode:R,...z})=>{const{animationProgress:E,tooltip:W,containerRef:F,processedData:T,showTooltip:M,hideTooltip:V,getChartDimensions:A,toggleSeries:H}=u0({data:o,dataPoints:r,animated:c,animationDuration:d,showTooltips:u}),L=T(),{width:O,height:_}=A(),q=h||O,Y=f||(g?O/p:_),P=()=>{if(!a||!L)return null;let re=[];return e==="pie"||e==="donut"?Array.isArray(L)&&(re=L):L&&L.series&&(re=L.series),!re||re.length===0?null:t.jsx(s.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:l==="bottom"?"16px":0,marginBottom:l==="top"?"16px":0,...o0,...y==null?void 0:y.legend,children:re.map((oe,ie)=>{const X=oe.hidden,ae=oe.name||oe.label;return t.jsxs(s.View,{...t0,onClick:()=>H(ae),opacity:X?.4:1,...y==null?void 0:y.legendItem,children:[t.jsx(s.View,{backgroundColor:oe.color,...r0,opacity:X?.3:1}),t.jsx(s.Text,{...n0,textDecoration:X?"line-through":"none",children:ae})]},`legend-${ie}`)})})},B=()=>{if(!L)return null;switch(e){case"bar":return t.jsx(p0,{data:L,width:q,height:Y,animationProgress:E,showGrid:i,onBarClick:x,showTooltip:M,hideTooltip:V,views:y});case"line":case"area":return t.jsx(m0,{data:L,width:q,height:Y,animationProgress:E,showGrid:i,onPointClick:x,showTooltip:M,hideTooltip:V,views:y});case"pie":case"donut":return t.jsx(g0,{dataPoints:L,width:q,height:Y,animationProgress:E,isDonut:e==="donut",onSliceClick:b,showTooltip:M,hideTooltip:V,views:y});default:return null}},$=()=>C?t.jsx(s.View,{...s0,...y==null?void 0:y.loadingOverlay,children:v||t.jsx(s.Center,{children:t.jsx(uo,{size:"lg"})})}):null,D=()=>k?t.jsx(s.View,{...c0,...y==null?void 0:y.errorOverlay,children:S||t.jsx(s.Text,{fontWeight:"medium",children:typeof k=="string"?k:"An error occurred"})}):null,N=()=>w?t.jsx(s.View,{...d0,...y==null?void 0:y.noDataOverlay,children:I||t.jsx(s.Text,{children:typeof w=="string"?w:"No data available"})}):null,G=j??(typeof n=="string"?n:"Chart"),K=!k&&!C&&!w;return t.jsxs(s.View,{ref:F,role:"region","aria-label":G,"aria-busy":C,...Zm,...y==null?void 0:y.container,...z,children:[n&&t.jsx(s.Text,{...e0,children:n}),K&&l==="top"&&P(),t.jsxs(s.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[K&&B(),$(),D(),N(),t.jsx(h0,{visible:u&&W.visible,x:W.x,y:W.y,content:W.content,maxDistance:100,views:y})]}),K&&l==="bottom"&&P()]})},y0=e=>t.jsx(f0,{...e}),x0=y0,b0=(e=365)=>{const[o,r]=m.useState(!1),[n,a]=m.useState(null),l="app-studio-cookie-consent";m.useEffect(()=>{if(typeof localStorage>"u")return;const d=localStorage.getItem(l);a(d!==null?d==="true":!1)},[]);const i=d=>{if(typeof localStorage<"u"){localStorage.setItem(l,String(d));const g=new Date;g.setDate(g.getDate()+e),localStorage.setItem(`${l}-expires`,g.toISOString())}a(d)};return{isHovered:o,setIsHovered:r,hasConsent:n,acceptCookies:()=>{i(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(l),localStorage.removeItem(`${l}-expires`)),a(!1)}}},k0=e=>({default:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-gray-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-gray-600",borderColor:"color-gray-300",hoverBackgroundColor:"color-gray-100"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-800",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}},primary:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-700"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-700",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}}}),C0=({title:e="Nous utilisons des cookies",description:o="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:r="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:l="default",onAccept:i,onCustomize:u,views:c,showCustomizeButton:d=!0,cookieExpiration:g=365,themeMode:p,...h})=>{const{themeMode:f}=s.useTheme(),{hasConsent:y,acceptCookies:b}=b0(g),C=k0()[l];if(y)return null;const k=()=>{b(),i&&i()},w=()=>{u&&u()};return t.jsx(s.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...a==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...C.container,...c==null?void 0:c.container,...h,children:t.jsxs(s.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&t.jsx(s.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...c==null?void 0:c.title,children:e}),o&&t.jsx(s.Text,{fontSize:14,color:"color-black",...c==null?void 0:c.description,children:o}),t.jsxs(s.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...c==null?void 0:c.buttonGroup,children:[d&&t.jsx(fe,{variant:"outline",onClick:w,size:"sm",...c==null?void 0:c.customizeButton,children:n}),t.jsx(fe,{variant:"filled",onClick:k,size:"sm",...c==null?void 0:c.acceptButton,children:r})]})]})})},S0=e=>t.jsx(C0,{...e}),w0=S0,j0=e=>{const{size:o,variant:r,onOpenChange:n}=e||{},[a,l]=m.useState(!1),[i,u]=m.useState({x:0,y:0}),[c,d]=m.useState(null),g=m.useRef(null),p=m.useRef(null),h=m.useMemo(()=>Oo("contextmenu-content"),[]),f=m.useCallback(b=>{u({x:b.clientX,y:b.clientY}),l(!0),n==null||n(!0)},[n]),y=m.useCallback(()=>{l(!1),d(null),n==null||n(!1)},[n]);return m.useEffect(()=>{const b=k=>{p.current&&!p.current.contains(k.target)&&y()},x=()=>{a&&y()},C=k=>{k.key==="Escape"&&a&&y()};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",b),window.addEventListener("resize",x),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",b),window.removeEventListener("resize",x),document.removeEventListener("keydown",C)}},[a,y]),{isOpen:a,setIsOpen:l,position:i,setPosition:u,activeSubmenuId:c,setActiveSubmenuId:d,size:o,variant:r,triggerRef:g,contentRef:p,contentId:h,openMenu:f,closeMenu:y}},la={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},v0={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},ia={hover:{backgroundColor:"color-gray-100"}},Nl=m.createContext({isOpen:!1,setIsOpen:()=>{},position:{x:0,y:0},setPosition:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null},contentRef:{current:null},contentId:"contextmenu-content",closeMenu:()=>{},openMenu:()=>{}}),T0=({children:e,value:o})=>t.jsx(Nl.Provider,{value:o,children:e}),tr=()=>{const e=m.useContext(Nl);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},ql=({children:e,disableNativeContextMenu:o=!0,asChild:r=!1,isDisabled:n=!1,views:a,...l})=>{const{triggerRef:i,contentId:u,openMenu:c}=tr(),g={ref:i,onContextMenu:p=>{if(!n)if(o&&p.preventDefault(),c)c(p);else{const{setIsOpen:h,setPosition:f}=tr();f({x:p.clientX,y:p.clientY}),h(!0)}},"aria-controls":u,"aria-haspopup":"menu","data-disabled":n?"":void 0,...r&&m.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...l};if(r&&m.isValidElement(e)){const p=m.Children.only(e);return m.cloneElement(p,{...g,...p.props})}return t.jsx(s.View,{...g,children:e})},Wn=({items:e,children:o,position:r,side:n="right",align:a="start",views:l,style:i,...u})=>{const{isOpen:c,position:d,contentRef:g,contentId:p,variant:h}=tr(),f=m.useRef(null),y=g||f,{ref:b,relation:x}=s.useElementPosition({}),[C,k]=m.useState({x:0,y:0});if(m.useEffect(()=>{if(c&&y.current){const v=r||d,S=y.current.offsetWidth,I=y.current.offsetHeight,j=window.innerWidth,R=window.innerHeight;let z=v.x,E=v.y;x&&(x.space.horizontal==="left"?z=v.x-S:z=v.x,x.space.vertical==="top"?E=v.y-I:E=v.y),z+S>j&&(z=j-S-8),z<8&&(z=8),E+I>R&&(E=R-I-8),E<8&&(E=8),k({x:z,y:E})}},[c,d,r,n,a,y,x]),!c)return null;const w={position:"fixed",top:`${C.y}px`,left:`${C.x}px`,zIndex:1e3,transformOrigin:"top left"};return t.jsxs(s.View,{id:p||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...w,...i},...v0[h],...l==null?void 0:l.menu,...l==null?void 0:l.content,...u,children:[e&&e.map((v,S)=>v.divider?t.jsx(Gl,{views:l},`divider-${S}`):t.jsx(Ul,{item:v,views:l},v.id)),o]})},Ul=({item:e,children:o,onSelect:r,isDisabled:n=!1,views:a,variant:l,shape:i,isLoading:u,loaderProps:c,loaderPosition:d,icon:g,iconPosition:p,isFilled:h,isAuto:f,isIconRounded:y,isHovered:b,shadow:x,ariaLabel:C,animation:k,textColor:w,reversed:v,borderMovingDuration:S,borderMovingGradientColors:I,animatedStrokeAccentColor:j,animatedStrokeTextColor:R,to:z,isExternal:E,config:W,...F})=>{const{activeSubmenuId:T,setActiveSubmenuId:M,size:V,closeMenu:A}=tr();if(e){const[O,_]=m.useState(!1),q=e.items&&e.items.length>0,Y=T===e.id,[P,B]=m.useState({x:0,y:0}),$=e.disabled||n,D=()=>{_(!0),q&&M(e.id)},N=()=>{_(!1)},G=()=>{$||!q&&e.onClick&&(e.onClick(),A&&A())},{ref:K,relation:re}=s.useElementPosition({});return m.useEffect(()=>{if(Y&&K.current){const oe=K.current.getBoundingClientRect(),ie=window.innerWidth,X=200;let ae=!1;if(re)ae=re.space.horizontal==="left";else{const pe=ie-oe.right,ue=oe.left;ae=pe<X&&ue>pe}B({x:ae?oe.left-X:oe.right,y:oe.top})}},[Y,e.items,re]),t.jsxs(s.View,{ref:K,role:"menuitem",display:"flex",alignItems:"center",cursor:$?"not-allowed":"pointer",opacity:$?.5:1,position:"relative","aria-disabled":$,"data-disabled":$?"":void 0,...la[V],_hover:$?{}:ia.hover,backgroundColor:O&&!$?"color-gray-100":"transparent",onMouseEnter:D,onMouseLeave:N,onClick:G,...a==null?void 0:a.item,...F,children:[e.icon&&t.jsx(s.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),t.jsx(s.View,{flexGrow:1,children:e.label}),q&&t.jsx(s.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:t.jsx(Se,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),Y&&q&&t.jsx(Wn,{items:e.items||[],position:P,side:"right",align:"start",views:a})]})}const H=O=>{n||(r==null||r(O),A&&A())},L=z?{as:"a",href:z,color:"inherit",textDecoration:"none",...E?{target:"_blank",rel:"noopener noreferrer"}:{}}:{};return t.jsx(s.View,{role:"menuitem",onClick:H,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...la[V],_hover:n?{}:ia.hover,...L,...a==null?void 0:a.item,...F,children:o})},Gl=({views:e,...o})=>t.jsx(s.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),I0=({views:e,...o})=>t.jsx(s.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),R0=({children:e,items:o,size:r="md",variant:n="default",disableNativeContextMenu:a=!0,views:l,themeMode:i,onOpenChange:u,...c})=>!o||o.length===0?t.jsx(t.Fragment,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(ql,{disableNativeContextMenu:a,views:l,...c,children:e}),t.jsx(Wn,{items:o,views:l})]}),F0=({children:e,items:o,size:r="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:l,views:i,...u})=>{const c=j0({size:r,variant:n,onOpenChange:l}),{isOpen:d,setIsOpen:g,position:p,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,triggerRef:b,contentRef:x,contentId:C,openMenu:k,closeMenu:w}=c;return t.jsx(T0,{value:{isOpen:d,setIsOpen:g,position:p,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,size:r,variant:n,triggerRef:b,contentRef:x,contentId:C,openMenu:k,closeMenu:w,styles:i},children:t.jsx(R0,{items:o,size:r,variant:n,disableNativeContextMenu:a,views:i,...u,children:e})})},et=F0;et.Trigger=ql;et.Content=Wn;et.Item=Ul;et.Divider=Gl;et.Separator=I0;const z0=({src:e,color:o,views:r,themeMode:n,...a})=>{const{getColor:l,themeMode:i}=s.useTheme(),u=o?{fill:l(o,{themeMode:i}),stroke:l(o,{themeMode:i})}:{};return t.jsx(s.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...r==null?void 0:r.container,children:t.jsx(s.Image,{...u,content:'url("'+e+'")',width:"100%",height:"100%",...r==null?void 0:r.image})})},M0=({path:e,...o})=>t.jsx(s.Image,{src:e,...o}),sa=(e,o)=>o?Array.isArray(e)?e:e===""?[]:[e]:Array.isArray(e)?e[0]??"":e,Yl=({placeholder:e,isMulti:o,options:r,value:n,defaultValue:a,id:l})=>{const i=m.useId().replace(/[^a-zA-Z0-9_-]/g,""),u=l??`select-${i}`,c=n!==void 0,[d,g]=m.useState(!1),[p,h]=m.useState(!1),[f,y]=m.useState(()=>a!==void 0?sa(a,o):o?[]:e?"":Array.isArray(r)&&r.length>0?r[0].value:""),b=c?sa(n,o):f,x=m.useCallback(S=>{c||y(S)},[c]),[C,k]=m.useState(0),[w,v]=m.useState(!0);return{id:u,value:b,setValue:x,hide:w,setHide:v,isHovered:d,setIsHovered:g,isFocused:p,setIsFocused:h,highlightedIndex:C,setHighlightedIndex:k}},Kr=({children:e,views:o={helperText:{}},...r})=>t.jsx(s.Text,{fontSize:"11px",fontWeight:"400",letterSpacing:"-0.01em",lineHeight:"16px",marginVertical:0,marginHorizontal:0,color:"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...o.helperText,...r,children:e}),no=m.forwardRef(({children:e,helperText:o,error:r=!1,views:n,...a},l)=>t.jsxs(s.Vertical,{ref:l,gap:4,position:"relative",width:"100%",boxSizing:"border-box",marginVertical:0,...a,...n==null?void 0:n.container,children:[e,!r&&o&&t.jsx(Kr,{marginTop:0,...n==null?void 0:n.helperText,children:o}),r&&t.jsx(s.Text,{fontSize:"11px",lineHeight:"16px",marginTop:0,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"color 0.2s ease, opacity 0.2s ease",...n==null?void 0:n.error,children:r})]}));no.displayName="FieldContainer";const W0={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},E0={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},A0={outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},default:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},none:{border:"none",style:{backgroundColor:"transparent"},color:"inherit",transition:"background-color 0.2s ease"}},H0={xs:{minHeight:24,paddingVertical:4,paddingHorizontal:10},sm:{minHeight:32,paddingVertical:7,paddingHorizontal:10},md:{minHeight:40,paddingVertical:9,paddingHorizontal:12},lg:{minHeight:48,paddingVertical:11,paddingHorizontal:14},xl:{minHeight:56,paddingVertical:13,paddingHorizontal:16}},V0=e=>{const{minHeight:o,paddingVertical:r,paddingHorizontal:n}=H0[e];return{minHeight:`${o}px`,paddingTop:`${r}px`,paddingBottom:`${r}px`,paddingLeft:`${n}px`,paddingRight:`${n}px`}},mo=({label:e,shadow:o,children:r,value:n,size:a="md",shape:l="default",variant:i="default",error:u=!1,showLabel:c=!1,isFocused:d=!1,isHovered:g=!1,isDisabled:p=!1,isReadOnly:h=!1,views:f={pickerBox:{}},...y})=>{const{themeMode:b}=s.useTheme(),x=b==="dark",k=u?"color-red-500":(g||d)&&!p?"theme-primary":"color-gray-200";return t.jsx(s.Horizontal,{gap:8,width:"100%",boxSizing:"border-box",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:k,backgroundColor:x?"color-gray-900":"color-white",fontSize:s.Typography.fontSizes[a],cursor:p?"not-allowed":h?"auto":"text",opacity:p?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...V0(a),...typeof o=="object"&&o!==null?o:{},...W0[l],...A0[i],...f==null?void 0:f.container,...y,children:r})},ht=({children:e,...o})=>t.jsx(s.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),P0={h1:{fontSize:96,letterSpacing:-1.5},h2:{fontSize:60,letterSpacing:-.5},h3:{fontSize:48,letterSpacing:0},h4:{fontSize:34,letterSpacing:.25},h5:{fontSize:24,letterSpacing:0},h6:{fontSize:20,letterSpacing:.15}},D0=({children:e,heading:o,isItalic:r=!1,isUnderlined:n=!1,isStriked:a=!1,weight:l="normal",size:i="sm",dropDown:u,error:c,isDisabled:d,helperText:g,views:p,...h})=>{const f=o?P0[o]:{};return t.jsx(s.Element,{as:"label",width:"100%",fontSize:i,fontStyle:r?"italic":"normal",fontWeight:s.Typography.fontWeights[l],textDecoration:a?"line-through":n?"underline":"none",...c?{color:"color-red-500"}:d?{color:"color-gray-400"}:{},...d?{cursor:"not-allowed"}:{},...f,...h,children:e})},$0=e=>t.jsx(D0,{...e}),vt=$0,wo=({children:e,size:o="md",error:r=!1,color:n="theme-primary",views:a={label:{}},helperText:l,...i})=>t.jsx(vt,{position:"static",fontSize:E0[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,color:r?"color-red-500":"inherit",transition:"color 0.2s ease",...a.label,...i,children:e}),ot=({children:e,...o})=>t.jsx(s.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",boxSizing:"border-box",...o,children:e}),Kl={xs:12,sm:14,md:16,lg:18,xl:20},L0={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},B0={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},_0={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},Vt={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},ca={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},O0={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},N0={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},q0=e=>{if(!e)return{};const{container:o,content:r,...n}=e;return n},U0=({isHovered:e,setIsHovered:o=()=>{},option:r,size:n="md",callback:a=()=>{},style:l,isSelected:i=!1,...u})=>{const c=(p,h)=>{p.stopPropagation(),p.preventDefault(),typeof a=="function"&&a(h)},d=()=>o(!e),g=()=>i&&e?Vt.selectedHighlighted:i?Vt.selected:e?Vt.highlighted:Vt.default;return t.jsxs(s.Element,{as:"li",role:"option","aria-selected":i,display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",..._0,...g(),onMouseEnter:d,onMouseLeave:d,onClick:p=>c(p,r.value),...u,children:[t.jsx(s.Text,{fontSize:s.Typography.fontSizes[n],fontWeight:i?"500":"400",lineHeight:"14px",color:i?"color-gray-900":"color-gray-700",...l,children:r.label}),i&&t.jsx(s.Element,{as:"span","aria-hidden":"true",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},G0=({size:e="md",views:o={field:{},text:{}},value:r,isDisabled:n,placeholder:a,removeOption:l=()=>{},options:i})=>{const u=(o==null?void 0:o.field)||{},c=(o==null?void 0:o.text)||{},d=Array.isArray(r)&&r.length>0,g={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:0,paddingHorizontal:0,fontSize:s.Typography.fontSizes[e],fontWeight:"400",letterSpacing:"-0.01em",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease-in-out",...d?{}:{maxLines:1,minWidth:0},...u,...c,style:{backgroundColor:"transparent",...u.style,...c.style}},p=i.length>0&&i.find(h=>h.value===r);return t.jsx(s.Text,{...g,children:(r===""||Array.isArray(r)&&r.length===0)&&a?a:t.jsx(t.Fragment,{children:typeof r=="string"?(p&&p.label)??r:Array.isArray(r)&&r.length>0?t.jsx(s.Horizontal,{gap:6,children:r.map(h=>t.jsx(X0,{option:h,removeOption:l},h))}):t.jsx("span",{children:r})})})},Y0=({id:e,name:o,value:r,onChange:n,isMulti:a=!1,isDisabled:l=!1,isReadOnly:i=!1,options:u=[],defaultValue:c,...d})=>{const g=p=>{n&&n(a?Array.from(p.target.selectedOptions,h=>h.value):p.target.value)};return t.jsx(s.Element,{id:e,name:o,as:"select",opacity:0,width:1,height:1,overflow:"hidden",position:"absolute",pointerEvents:"none",tabIndex:-1,"aria-hidden":"true",value:r,disabled:l,readOnly:i,onChange:g,multiple:a,...d,children:u.length>0&&u.map(p=>t.jsx("option",{value:p.value,children:p.label},p.value))})},K0=({size:e,views:o={},options:r,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:l=()=>{},selectedValue:i,listboxId:u,getOptionId:c})=>{const d=p=>n(p),g=p=>Array.isArray(i)?i.includes(p):i===p;return t.jsx(s.Element,{as:"ul",role:"listbox",id:u,display:"flex",flexDirection:"column",margin:0,padding:"4px",...L0,style:N0,...o==null?void 0:o.dropDown,children:r&&r.length>0&&r.map((p,h)=>t.jsx(U0,{id:c?c(h):void 0,size:e,style:o.text,option:p,callback:d,isSelected:g(p.value),isHovered:h===a,setIsHovered:()=>{},onMouseEnter:()=>l(h)},p.value))})},X0=({option:e,size:o="md",removeOption:r=()=>{},...n})=>{const a=()=>r(e);return t.jsxs(s.Horizontal,{gap:6,alignItems:"center",onClick:l=>l.stopPropagation(),...O0,_hover:{backgroundColor:"color-gray-200"},...n,children:[t.jsx(s.Text,{fontSize:s.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),t.jsx(s.Element,{as:"button",type:"button","aria-label":`Remove ${e}`,onClick:a,display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",transition:"all 0.2s ease-in-out",_hover:{color:"color-gray-700"},children:t.jsx($e,{color:"inherit",widthHeight:Kl[o]})})]})},Xl=({id:e,name:o,label:r,value:n,placeholder:a,helperText:l,hide:i=!1,error:u=!1,isMulti:c=!1,isFocused:d=!1,isHovered:g=!1,isDisabled:p=!1,isReadOnly:h=!1,isRequired:f=!1,isAutoFocus:y=!1,options:b=[],shadow:x={},size:C="md",shape:k="default",variant:w="default",views:v={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:S=()=>{},setHide:I=()=>{},setValue:j=()=>{},setIsHovered:R=()=>{},setIsFocused:z=()=>{},setHighlightedIndex:E,highlightedIndex:W,isScrollable:F,"aria-label":T,...M})=>{const V=m.useId(),A=e??`select-${V.replace(/[^a-zA-Z0-9_-]/g,"")}`,H=`${A}-native`,L=`${A}-label`,O=`${A}-listbox`,_=X=>`${A}-option-${X}`,{ref:q,relation:Y,updateRelation:P}=s.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),B=m.useRef(null),$=()=>{var ue;if(!q.current)return{};const X=q.current.getBoundingClientRect(),ae={position:"fixed",left:X.left,width:X.width,zIndex:1e4};return((ue=Y==null?void 0:Y.space)==null?void 0:ue.vertical)==="top"?{...ae,bottom:window.innerHeight-X.top+8}:{...ae,top:X.bottom+8}};m.useEffect(()=>{const X=()=>I(!0);return document.addEventListener("closeAllSelects",X),()=>document.removeEventListener("closeAllSelects",X)},[I]),m.useEffect(()=>{var X;y&&!p&&!h&&((X=q.current)==null||X.focus())},[]),m.useEffect(()=>{const X=ae=>{!ae.target.closest(`#${A}`)&&!i&&I(!0)};return document.addEventListener("click",X),()=>{document.removeEventListener("click",X)}},[A,i,I]);const D=()=>R(!g),N=()=>z(!0),G=X=>{document.dispatchEvent(new Event("closeAllSelects")),X&&X.stopPropagation&&X.stopPropagation();const ae=!i;I(ae),z(!ae)},K=m.useCallback(X=>{if(I(!0),document.dispatchEvent(new Event("closeAllSelects")),c&&Array.isArray(n)){if(!n.includes(X)){const ae=[...n,X];j(ae),S&&S(ae)}}else j(X),S&&S(X);z(!0)},[c,n,I,j,S,z]),re=X=>{if(Array.isArray(n)&&n.includes(X)){const ae=n.filter(pe=>pe!==X);j(ae),S&&S(ae)}},oe=!!r,ie=q0(v);return t.jsx(no,{ref:q,position:"relative",width:"100%",display:"inline-block",id:A,role:"combobox","aria-haspopup":"listbox","aria-expanded":!i,"aria-labelledby":!T&&oe?L:void 0,"aria-label":T,"aria-controls":O,"aria-activedescendant":!i&&b.length>0?_(W??0):void 0,"aria-disabled":p||void 0,"aria-required":f||void 0,tabIndex:p||h?-1:0,helperText:l,error:u,views:ie,onKeyDown:X=>{if(p||h||X.target!==X.currentTarget)return;if(i){(X.key==="Enter"||X.key===" "||X.key==="ArrowDown")&&(X.preventDefault(),document.dispatchEvent(new Event("closeAllSelects")),I(!1),z(!0));return}const ae=W??0;if(X.key==="ArrowDown")X.preventDefault(),E==null||E(Math.min(ae+1,b.length-1));else if(X.key==="ArrowUp")X.preventDefault(),E==null||E(Math.max(ae-1,0));else if(X.key==="Enter"){X.preventDefault();const pe=b[ae];pe&&K(pe.value)}else X.key==="Escape"&&(X.preventDefault(),I(!0))},onClick:X=>{X.stopPropagation(),p||h||G(X)},children:t.jsxs(mo,{label:r,size:C,error:u,shape:k,views:v,shadow:x,variant:w,value:n,color:"theme-primary",isHovered:g,isDisabled:p,isReadOnly:h,isFocused:d,showLabel:oe,onMouseEnter:D,onMouseLeave:D,position:"relative",...v==null?void 0:v.content,children:[t.jsxs(ot,{children:[oe&&t.jsx(wo,{id:L,htmlFor:H,color:"theme-primary",error:u,...v==null?void 0:v.label,children:r}),t.jsx(Y0,{id:H,name:o,options:b,onChange:S,value:n,isDisabled:p,isReadOnly:h,isMulti:c,required:f||void 0,onFocus:N,...M}),t.jsx(G0,{options:b,size:C,views:v,value:n,isDisabled:p,placeholder:a,removeOption:re})]}),t.jsx(ht,{children:!h&&!p&&t.jsx(s.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:i?ca.closed:ca.open,children:t.jsx(Se,{color:"inherit",widthHeight:Kl[C],style:v.icon,orientation:"down"})})}),!i&&b.length>0&&t.jsx(Ct,{children:t.jsx(s.Element,{ref:B,onClick:X=>X.stopPropagation(),style:{...$(),...B0.enter},children:t.jsx(K0,{size:C,views:v,options:b,callback:K,highlightedIndex:W,setHighlightedIndex:E,selectedValue:n,listboxId:O,getOptionId:_})})})]})})},J0=e=>{const o=ve("select",e),r={...o,options:o.options||[]},n=Yl(r);return t.jsx(Xl,{...n,...r,value:n.value,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},ft=J0,Jl=({isDisabled:e,isChecked:o})=>{const[r,n]=m.useState(!1),[a,l]=m.useState(o||!1),[i,u]=m.useState(o||!1);return m.useEffect(()=>{o!==void 0&&(l(o),u(o))},[o]),{isHovered:r,setIsHovered:n,on:a,setOn:l,value:i,setValue:u}},da={xs:{height:"10px",width:"10px"},sm:{height:"14px",width:"14px"},md:{height:"18px",width:"18px"},lg:{height:"22px",width:"22px"},xl:{height:"26px",width:"26px"}},Q0={xs:{height:"20px",width:"40px"},sm:{height:"24px",width:"48px"},md:{height:"28px",width:"56px"},lg:{height:"32px",width:"64px"},xl:{height:"36px",width:"72px"}},Z0={xs:{height:"22px",width:"52px"},sm:{height:"26px",width:"62px"},md:{height:"30px",width:"72px"},lg:{height:"34px",width:"84px"},xl:{height:"38px",width:"96px"}},eg={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},Pt={xs:{paddingVertical:5,paddingHorizontal:3},sm:{paddingVertical:5,paddingHorizontal:3},md:{paddingVertical:5,paddingHorizontal:5},lg:{paddingVertical:5,paddingHorizontal:5},xl:{paddingVertical:5,paddingHorizontal:5}},Qe={default:{active:"theme-primary",inactive:"color-gray-300",knob:"color-white",disabled:"color-gray-200"},states:{hover:{active:"theme-primary",inactive:"color-gray-400",activeOpacity:.9},focus:{active:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},inactive:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px color-gray-200"}}}},ua={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},og=e=>t.jsx(s.Input,{type:"checkbox",...e}),Ql=({id:e,name:o,label:r,inActiveChild:n,isChecked:a,activeChild:l,labelPosition:i="right",shadow:u={},size:c="sm",value:d=!1,isHovered:g=!1,isDisabled:p=!1,isReadOnly:h=!1,on:f,setOn:y=()=>{},onChange:b,setValue:x=()=>{},setIsHovered:C=()=>{},helperText:k,description:w,views:v={slider:{},circle:{},label:{}},...S})=>{const I=m.useId(),j=e??I,[R,z]=m.useState(!1),E=typeof a=="boolean"?a:d,F=!!(l||n)?Z0[c]:Q0[c],T=`${Pt[c].paddingHorizontal}px`,M=`${Pt[c].paddingHorizontal+2}px`,V=`calc(${da[c].width} + ${Pt[c].paddingHorizontal}px + 4px)`,A=eg[c],H=$=>{if(!h&&!p){const D=$.target.checked;x(D),y(D),b&&b(D)}},L=()=>C(!0),O=()=>C(!1),_=$=>{let D=!0;try{D=$.target.matches(":focus-visible")}catch{}z(D)},q=()=>z(!1),Y=`${j}-description`,P={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:p?"not-allowed":h?"default":"pointer",opacity:p?.6:1,transition:"all 0.2s ease-in-out",...v.label}},B=t.jsxs(vt,{htmlFor:j,onMouseEnter:L,onMouseLeave:O,...P.container,children:[i==="left"&&r&&t.jsx(s.Text,{fontWeight:"500",color:p?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:r}),t.jsxs(s.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:p?Qe.default.disabled:E?g?Qe.states.hover.active:Qe.default.active:g?Qe.states.hover.inactive:Qe.default.inactive,opacity:!p&&E&&g?Qe.states.hover.activeOpacity:1,cursor:"pointer",...ua.slider,...u,...Pt[c],...F,...v.slider,...R?E?Qe.states.focus.active:Qe.states.focus.inactive:{},children:[t.jsx(og,{id:j,name:o,role:"switch","aria-checked":E,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:2,cursor:p?"not-allowed":h?"default":"pointer",checked:E,onChange:H,onFocus:_,onBlur:q,disabled:p,readOnly:h,"aria-describedby":w?Y:void 0,...S}),l&&E&&t.jsx(s.View,{marginLeft:M,marginRight:V,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:A,color:"color-white",fontWeight:600,children:l}),t.jsx(s.View,{position:"absolute",top:"50%",left:E?void 0:T,right:E?T:void 0,borderRadius:"50%",backgroundColor:Qe.default.knob,boxShadow:g?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${g?"scale(1.05)":"scale(1)"}`,...ua.knob,zIndex:1,...da[c],...v.circle}),n&&!E&&t.jsx(s.View,{marginLeft:V,marginRight:M,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:A,color:"color-white",fontWeight:600,children:n})]}),i==="right"&&r&&t.jsx(s.Text,{fontWeight:"500",color:p?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:r})]});return w?t.jsxs(s.Vertical,{gap:4,width:"fit-content",children:[B,t.jsx(s.Text,{id:Y,color:"color-gray-500",fontSize:"14px",lineHeight:"20px",children:w})]}):B},tg=e=>{const o=ve("switch",e),r=Jl(o);return t.jsx(Ql,{...r,...o})},En=tg,Zl=({placeholder:e,isMulti:o,options:r,id:n})=>{const a=m.useId().replace(/[^a-zA-Z0-9_-]/g,""),l=n??`selector-${a}`,i=e?o?[]:"":Array.isArray(r)&&r.length>0?r[0].value:o?[]:"",[u,c]=m.useState(!1),[d,g]=m.useState(!1),[p,h]=m.useState(i),[f,y]=m.useState(!0);return{id:l,value:p,setValue:h,hide:f,setHide:y,isHovered:u,setIsHovered:c,isFocused:d,setIsFocused:g}},ei=({id:e,name:o,label:r,value:n,views:a={},options:l=[],helperText:i,error:u=!1,isDisabled:c=!1,isReadOnly:d=!1,onChange:g=()=>{},setValue:p=()=>{},hide:h,setHide:f,isHovered:y,setIsHovered:b,isFocused:x,setIsFocused:C,placeholder:k,isMulti:w,shape:v,variant:S,size:I,shadow:j,isScrollable:R,"aria-label":z,...E})=>{const W=m.useId(),F=e??W,T=`${F}-label`,M=`${F}-helper-text`,V=!!i,A=m.useCallback(H=>{c||d||(p(H.value),g&&g(H.value))},[p,g,c,d]);return t.jsxs(no,{id:F,width:"100%",views:a,...E,children:[r&&t.jsxs(s.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[t.jsx(io,{widthHeight:14})," ",t.jsx(s.Text,{id:T,children:r})]}),t.jsx(s.Horizontal,{gap:0,role:"radiogroup","aria-labelledby":!z&&r?T:void 0,"aria-label":z,"aria-describedby":V?M:void 0,"aria-readonly":d||void 0,"aria-invalid":u?!0:void 0,children:l.map((H,L,O)=>{const _=n===H.value,q=H.color??"theme-primary",Y=_?q:"color-gray-200",P=_?q:"color-gray-500",B=L===0,$=L===O.length-1,D=$||_;return t.jsx(s.View,{as:"button",type:"button",role:"radio","aria-checked":_,disabled:c,onClick:()=>A(H),flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:_?"bold":"normal",cursor:c?"not-allowed":d?"default":"pointer",backgroundColor:"transparent",color:P,borderStyle:"solid",borderColor:Y,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:D?1:0,borderRadius:B?"6px 0 0 6px":$?"0 6px 6px 0":"0",zIndex:_?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:H.label},H.value)})}),t.jsx("input",{type:"hidden",id:`${F}-input`,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}}),V&&t.jsx(s.Text,{id:M,fontSize:"11px",lineHeight:"16px",marginTop:0,fontWeight:u?"500":"400",color:u?"color-red-500":"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...a.helperText,children:i})]})},rg=e=>{const o={...e,options:e.options||[]},r=Zl(o);return t.jsx(ei,{...r,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},ng=rg,oi=({label:e,placeholder:o,value:r})=>{const[n,a]=m.useState(e??o),[l,i]=m.useState(!1),[u,c]=m.useState(r||""),[d,g]=m.useState(!1);return m.useMemo(()=>{a(d&&!u?o??"":e??o)},[u,d,e,o]),{hint:n,setHint:a,isHovered:l,setIsHovered:i,value:u,setValue:c,isFocused:d,setIsFocused:g}},ag=e=>{if(!e)return{};const{container:o,content:r,...n}=e;return n},lg=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const r=Number.parseFloat(e);if(Number.isFinite(r)&&e.trim().endsWith("px"))return`${Math.min(r,28)}px`}return"28px"},ti=({id:e,name:o,hint:r,error:n,value:a,label:l,shadow:i,helperText:u,placeholder:c,size:d="sm",shape:g="default",variant:p="default",isHovered:h=!1,isFocused:f=!1,isEditable:y=!0,isReadOnly:b=!1,isDisabled:x=!1,isAutoFocus:C=!1,isRequired:k,required:w,labelProps:v,maxRows:S=3,maxCols:I=30,onBlur:j=()=>{},onChange:R,onFocus:z,setHint:E=()=>{},setValue:W=()=>{},setIsFocused:F=()=>{},setIsHovered:T=()=>{},onChangeText:M,inputRef:V,views:A={label:{},helperText:{}},...H})=>{const L=m.useId(),O=e??L,_=!!l,q={xs:{minHeight:"72px",shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:"88px",shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:"104px",shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:"120px",shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:"136px",shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},Y=(A==null?void 0:A.field)||{},P=(A==null?void 0:A.container)||{},B=lg(P.borderRadius,g),$={...A,container:{...P,...B!==void 0?{borderRadius:B}:{},overflow:"hidden"}},D=ag(A),N={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:q[d].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:q[d].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:x?"color-gray-400":"color-gray-900",cursor:x?"not-allowed":"text",opacity:x?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...Y,style:{backgroundColor:"transparent",...Y.style}},G=()=>{F(!0),z&&z()},K=oe=>{j(oe),F(!1)},re=oe=>{const ie=typeof oe=="string"?oe:oe.target.value;W(ie),M&&M(ie),R&&R(ie)};return t.jsx(no,{helperText:u,error:n,views:D,children:t.jsx(mo,{label:l,size:d,error:n,shape:g,views:$,shadow:i,variant:p,value:a,color:"theme-primary",isHovered:h,isDisabled:x,isReadOnly:b,isFocused:f,showLabel:_,alignItems:"flex-start",minHeight:q[d].minHeight,paddingTop:q[d].shellPaddingY,paddingBottom:q[d].shellPaddingY,paddingLeft:q[d].shellPaddingX,paddingRight:q[d].shellPaddingX,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),...$==null?void 0:$.content,children:t.jsxs(ot,{...A==null?void 0:A.warper,children:[_&&t.jsx(wo,{htmlFor:O,color:"theme-primary",error:n,...v,...A==null?void 0:A.label,children:l}),t.jsx(s.Element,{ref:V,as:"textarea",id:O,name:o,rows:S,cols:I,value:a,readOnly:b||!y,disabled:x,autoFocus:C,...k??w?{required:!0,"aria-required":!0}:{},placeholder:c||r,onBlur:K,onFocus:G,onChange:oe=>re(oe),...N,...H,style:{resize:x||b||!y?"none":"vertical",...N.style,...H.style||{}},...A==null?void 0:A.textarea})]})})})},ig=e=>{const o=ve("textarea",e),r=oi(o);return t.jsx(ti,{...r,...o})},Tt=ig,An=({label:e,placeholder:o,value:r})=>{const[n,a]=m.useState(e??o),[l,i]=m.useState(!1),[u,c]=m.useState(!1),[d,g]=m.useState(r);return m.useMemo(()=>{a(l&&!d?o??"":e??o)},[d,l,e,o]),{hint:n,setHint:a,isFocused:l,setIsFocused:i,isHovered:u,setIsHovered:c,setValue:g,value:d}},It=({id:e,name:o,label:r,hint:n,value:a,onChange:l,left:i,right:u,helperText:c,placeholder:d,onChangeText:g,shadow:p={},views:h={container:{},field:{},label:{},helperText:{},text:{}},size:f="md",shape:y="default",variant:b="default",error:x=!1,isFocused:C=!1,isHovered:k=!1,isDisabled:w=!1,isReadOnly:v=!1,isClearable:S=!0,isAutoFocus:I=!1,isRequired:j,required:R,labelProps:z,leftIcon:E,rightIcon:W,setHint:F=()=>{},setIsFocused:T=()=>{},setIsHovered:M=()=>{},setValue:V=()=>{},onClick:A=()=>{},onFocus:H,onBlur:L=()=>{},themeMode:O,inputRef:_,...q})=>{const Y=m.useId(),P=e??Y,{getColor:B,themeMode:$}=s.useTheme(),D=B(w?"color-gray-400":"color-gray-500",{themeMode:O||$}),N=!!r,G={xs:{minHeight:24,shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:32,shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:40,shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:48,shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:56,shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},K=(h==null?void 0:h.field)||{},re="0 0 0 1000px var(--theme-canvas) inset",oe={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:G[f].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:w?"color-gray-400":"color-gray-900",cursor:w?"not-allowed":"text",opacity:w?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",_focus:{outline:"none",_placeholder:{opacity:.7}},_placeholder:{color:"color-gray-400",opacity:1,transition:"opacity 0.2s ease-out"},_selection:{backgroundColor:"color-mix(in srgb, var(--theme-primary) 20%, transparent)"},_webkitAutofill:{boxShadow:re,WebkitBoxShadow:re,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...K},ie=()=>{T(!0),H&&H()},X=()=>M(!0),ae=()=>M(!1),pe=ee=>{L&&L(ee),T(!1)},ue=ee=>{typeof ee=="string"?(V(ee),g&&g(ee),l&&l(ee)):(V(ee.target.value),g&&g(ee.target.value),l&&l(ee.target.value))},ke=()=>{V(""),g&&g(""),l&&l(""),L({target:{name:o}})},{container:ce,content:le,...de}=h||{};return t.jsx(no,{helperText:c,error:x,views:de,children:t.jsxs(mo,{label:r,size:f,error:x,shape:y,views:h,shadow:p,variant:b,value:a,color:"theme-primary",isHovered:k,isDisabled:w,isReadOnly:v,isFocused:C,showLabel:N,onMouseEnter:X,onMouseLeave:ae,children:[i,E&&t.jsx(ht,{children:E}),t.jsxs(ot,{children:[N&&t.jsx(wo,{htmlFor:P,color:"theme-primary",error:x,...z,...h==null?void 0:h.label,children:r}),t.jsx(s.Input,{ref:_,type:"text",id:P,name:o,readOnly:v,disabled:w,autoFocus:I,...j??R?{required:!0,"aria-required":!0}:{},placeholder:d||n,onFocus:ie,onBlur:pe,autoComplete:"off",...oe,...q,onChange:ue,value:a})]}),S&&a&&!v&&!w&&t.jsx(ht,{children:t.jsx($e,{size:20,color:D,onClick:ke,cursor:"pointer",borderRadius:"50%",transition:"background-color 0.2s ease, transform 0.2s ease",_hover:{backgroundColor:"color-gray-100",transform:"scale(1.05)"},_active:{transform:"scale(0.95)"}})}),W&&t.jsx(ht,{children:W}),u]})})},sg=e=>{const o=ve("input",e),r=An(o);return t.jsx(It,{...r,...o})},Pe=sg,ri=({defaultIsSelected:e=!1})=>{const[o,r]=m.useState(!1),[n,a]=m.useState(e);return{isHovered:o,setIsHovered:r,isSelected:n,setIsSelected:a}},cg={xs:{height:"12px",width:"12px"},sm:{height:"16px",width:"16px"},md:{height:"20px",width:"20px"},lg:{height:"24px",width:"24px"},xl:{height:"28px",width:"28px"}},pa={xs:10,sm:14,md:16,lg:20,xl:24},dg={selected:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},unselected:{backgroundColor:"transparent",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",color:"inherit",transition:"all 0.2s ease-in-out"},indeterminate:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},Dt={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},focus:{selected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},unselected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},indeterminate:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}},disabled:{selected:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},unselected:{borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},indeterminate:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"}},error:{selected:{backgroundColor:"color-red-500",borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"},indeterminate:{backgroundColor:"color-red-500",borderColor:"color-red-500"}}},ni=({id:e,icon:o,name:r,label:n,isChecked:a,onChange:l,onValueChange:i,shadow:u={},labelPosition:c="right",size:d="md",error:g=!1,isSelected:p=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:y=!1,isIndeterminate:b=!1,defaultIsSelected:x=!1,setIsSelected:C=()=>{},setIsHovered:k=()=>{},views:w={checkbox:{},label:{}},infoText:v,helperText:S,...I})=>{const j=m.useId(),R=e??j,z=m.useRef(null),[E,W]=m.useState(!1),F=!!(a||p);m.useEffect(()=>{z.current&&(z.current.indeterminate=b)},[b]);const T=()=>k(!h),M=()=>{!y&&!f&&(C&&C(!p),l&&l(!a),i&&i(!a))},V=b?"indeterminate":a||p?"selected":"unselected",A=g?Dt.error[V]:f?Dt.disabled[V]:h?Dt.hover[V]:{},H={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:g?"color-red-600":f?"color-gray-400":"inherit",cursor:f?"not-allowed":y?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease-in-out",...w.label},checkbox:{...dg[V],...A,borderRadius:6,...cg[d],transition:"all 0.2s ease-in-out",...u,...w.checkbox}},L=`${R}-info`,O=`${R}-error`,_=[v?L:"",g?O:""].filter(Boolean).join(" ")||void 0;return t.jsxs(s.Vertical,{...H.container,children:[t.jsx(vt,{htmlFor:R,onMouseEnter:T,onMouseLeave:T,size:s.Typography.fontSizes[d],cursor:"inherit",children:t.jsxs(s.Horizontal,{gap:12,alignItems:"center",children:[" ",c==="left"&&n&&t.jsx(s.Text,{size:d,fontWeight:"500",...w==null?void 0:w.label,children:n}),t.jsxs(s.Center,{position:"relative",...H.checkbox,...E?Dt.focus[V]:{},children:[t.jsx(s.Input,{ref:z,type:"checkbox",id:R,name:r,checked:F,"aria-checked":b?"mixed":void 0,onChange:M,onFocus:()=>W(!0),onBlur:()=>W(!1),disabled:f,readOnly:y,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:f?"not-allowed":y?"default":"pointer","aria-describedby":_,...I}),b?t.jsx(fl,{widthHeight:pa[d],color:"color-white",transition:"opacity 0.2s ease"}):(a||p)&&(o??t.jsx(wt,{widthHeight:pa[d],color:"color-white",transition:"opacity 0.2s ease"}))]}),c==="right"&&n&&t.jsx(s.Text,{size:d,fontWeight:"500",...w==null?void 0:w.label,children:n})]})}),v&&t.jsx(s.Text,{id:L,marginLeft:c==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:v}),g&&t.jsx(s.Text,{id:O,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:g})]})},ug=e=>{const o=ve("checkbox",e),r=ri(o);return t.jsx(ni,{...r,...o})},Hn=ug,ai=({defaultIsSelected:e=!1,isChecked:o})=>{const[r,n]=m.useState(!1),[a,l]=m.useState(o!==void 0?o:e);return m.useEffect(()=>{o!==void 0&&l(o)},[o]),{isHovered:r,setIsHovered:n,isSelected:a,setIsSelected:l}},pg={xs:{height:"16px",width:"16px"},sm:{height:"20px",width:"20px"},md:{height:"24px",width:"24px"},lg:{height:"28px",width:"28px"},xl:{height:"32px",width:"32px"}},mg={xs:{height:"8px",width:"8px"},sm:{height:"10px",width:"10px"},md:{height:"12px",width:"12px"},lg:{height:"14px",width:"14px"},xl:{height:"16px",width:"16px"}},gg={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},hg={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},Fr={hover:{selected:{borderColor:"color-blue-600"},unselected:{borderColor:"color-gray-400"}},disabled:{selected:{borderColor:"color-gray-300",opacity:.6},unselected:{borderColor:"color-gray-300",opacity:.6}},error:{selected:{borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"}}},zr={hover:{selected:{backgroundColor:"color-blue-600"},unselected:{style:{backgroundColor:"transparent"}}},disabled:{selected:{backgroundColor:"color-gray-300",opacity:.6},unselected:{opacity:.6,style:{backgroundColor:"transparent"}}},error:{selected:{backgroundColor:"color-red-500"},unselected:{style:{backgroundColor:"transparent"}}}},li=({id:e,icon:o,name:r,label:n,value:a,isChecked:l,onChange:i,onValueChange:u,shadow:c={},labelPosition:d="right",size:g="md",error:p=!1,isSelected:h=!1,isHovered:f=!1,isDisabled:y=!1,isReadOnly:b=!1,defaultIsSelected:x=!1,setIsSelected:C=()=>{},setIsHovered:k=()=>{},views:w={radio:{},label:{}},infoText:v,helperText:S,...I})=>{const j=m.useId(),R=e??j,[z,E]=m.useState(!1),W=()=>k(!f),F=()=>{!b&&!y&&(C&&C(!0),i&&i(a??""),u&&u(a??""))},T=l||h?"selected":"unselected",M=p?Fr.error[T]:y?Fr.disabled[T]:f?Fr.hover[T]:{},V=p?zr.error[T]:y?zr.disabled[T]:f?zr.hover[T]:{},A={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:p?"color-red-600":y?"color-gray-400":"inherit",cursor:y?"not-allowed":b?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...w.label},radio:{...gg[T],...M,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...pg[g],transition:"all 0.2s ease-in-out",...c,...w.radio},dot:{...hg[T],...V,borderRadius:"50%",...mg[g],transition:"all 0.2s ease-in-out"}},H=`${R}-info`,L=`${R}-error`,O=[v?H:"",p?L:""].filter(Boolean).join(" ")||void 0;return t.jsxs(s.Vertical,{...A.container,children:[t.jsx(vt,{htmlFor:R,onMouseEnter:W,onMouseLeave:W,size:s.Typography.fontSizes[g],cursor:"inherit",children:t.jsxs(s.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&t.jsx(s.Text,{size:g,fontWeight:"500",...w==null?void 0:w.label,children:n}),t.jsxs(s.Center,{position:"relative",...A.radio,...z?{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}:{},children:[t.jsx(s.Input,{type:"radio",id:R,name:r,value:a??"",checked:!!(l||h),onChange:F,onFocus:()=>E(!0),onBlur:()=>E(!1),disabled:y,readOnly:b,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:y?"not-allowed":b?"default":"pointer","aria-describedby":O,...I}),(l||h)&&t.jsx(s.View,{...A.dot})]}),d==="right"&&n&&t.jsx(s.Text,{size:g,fontWeight:"500",...w==null?void 0:w.label,children:n})]})}),v&&t.jsx(s.Text,{id:H,marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:v}),p&&t.jsx(s.Text,{id:L,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:p})]})},fg=e=>{const o=ve("radio",e),r=ai(o);return t.jsx(li,{...r,...o})},Vn=fg,yg=({value:e,defaultValue:o="",onChange:r})=>{const[n,a]=m.useState(e!==void 0?e:o);return m.useEffect(()=>{e!==void 0&&a(e)},[e]),{selectedValue:n,setSelectedValue:i=>{e===void 0&&a(i),r&&r(i)}}},xg=({children:e,name:o,label:r,helperText:n,error:a,selectedValue:l,setSelectedValue:i,direction:u="vertical",spacing:c=8,isDisabled:d=!1,isReadOnly:g=!1,views:p={container:{},label:{},helperText:{}},onChange:h,value:f,defaultValue:y,...b})=>{const x=u==="vertical"?s.Vertical:s.Horizontal,C=m.Children.map(e,I=>{if(m.isValidElement(I)){const j={name:o,isChecked:I.props.value===l,isDisabled:d||I.props.isDisabled,isReadOnly:g||I.props.isReadOnly,onChange:R=>{i(R),I.props.onChange&&I.props.onChange(R)}};return m.cloneElement(I,j)}return I}),k=m.useId(),w=`${k}-label`,v=`${k}-helper`,S=!!(n||a);return t.jsxs(s.Vertical,{gap:c,width:"100%",role:"radiogroup","aria-labelledby":r?w:void 0,"aria-describedby":S?v:void 0,"aria-invalid":a?!0:void 0,...p.container,...b,children:[r&&t.jsx(s.Text,{id:w,fontWeight:"600",fontSize:"14px",color:a?"color-red-600":"inherit",marginBottom:4,...p.label,children:r}),t.jsx(x,{gap:c,children:C}),S&&t.jsx(s.Text,{id:v,fontWeight:a?"500":"400",fontSize:"14px",lineHeight:"20px",color:a?"color-red-500":"color-gray-500",marginTop:4,transition:"color 0.2s ease, opacity 0.2s ease",...p.helperText,children:a||n})]})},bg=e=>{const o=yg(e);return t.jsx(xg,{...o,...e})},kg=bg,bo=e=>Math.min(255,Math.max(0,Math.round(e))),Cg=e=>{const o=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!o)return null;let r=o[1];return r.length===3&&(r=r.split("").map(n=>n+n).join("")),{r:parseInt(r.slice(0,2),16),g:parseInt(r.slice(2,4),16),b:parseInt(r.slice(4,6),16)}},Sg=e=>{const o=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?{r:bo(Number(o[1])),g:bo(Number(o[2])),b:bo(Number(o[3]))}:null},wg=(e,o,r)=>{const n=(e%360+360)%360,a=Math.min(100,Math.max(0,o))/100,l=Math.min(100,Math.max(0,r))/100,i=(1-Math.abs(2*l-1))*a,u=i*(1-Math.abs(n/60%2-1)),c=l-i/2;let d;return n<60?d=[i,u,0]:n<120?d=[u,i,0]:n<180?d=[0,i,u]:n<240?d=[0,u,i]:n<300?d=[u,0,i]:d=[i,0,u],{r:bo((d[0]+c)*255),g:bo((d[1]+c)*255),b:bo((d[2]+c)*255)}},jg=e=>{const o=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?wg(Number(o[1]),Number(o[2]),Number(o[3])):null},vg=e=>Cg(e)??Sg(e)??jg(e),Tg=({r:e,g:o,b:r})=>{const n=e/255,a=o/255,l=r/255,i=Math.max(n,a,l),u=Math.min(n,a,l),c=i-u,d=(i+u)/2;if(c===0)return{h:0,s:0,l:Math.round(d*100)};const g=c/(1-Math.abs(2*d-1));let p;return i===n?p=(a-l)/c%6:i===a?p=(l-n)/c+2:p=(n-a)/c+4,p=Math.round(p*60),p<0&&(p+=360),{h:p,s:Math.round(g*100),l:Math.round(d*100)}},Mr=e=>bo(e).toString(16).padStart(2,"0"),rr=(e,o)=>{if(!o||!e)return e;const r=vg(e);if(!r)return e;switch(o){case"hex":return`#${Mr(r.r)}${Mr(r.g)}${Mr(r.b)}`;case"rgb":return`rgb(${r.r}, ${r.g}, ${r.b})`;case"hsl":{const{h:n,s:a,l}=Tg(r);return`hsl(${n}, ${a}%, ${l}%)`}}},ii=e=>{const{value:o,defaultValue:r="",onChange:n,onChangeComplete:a,onOpen:l,onClose:i,closeOnSelect:u=!0,maxRecentColors:c=8,showRecentColors:d=!0,isAutoFocus:g=!1,colorFormat:p}=e,[h,f]=m.useState(!1),[y,b]=m.useState(o??r),[x,C]=m.useState(""),[k,w]=m.useState([]),[v,S]=m.useState(!1),[I,j]=m.useState(!1),R=m.useRef(null),z=m.useRef(null);m.useEffect(()=>{o!==void 0&&b(o)},[o]),m.useEffect(()=>{if(d&&typeof localStorage<"u")try{const H=localStorage.getItem("colorInput-recentColors");H&&w(JSON.parse(H))}catch(H){console.warn("Failed to load recent colors from localStorage:",H)}},[d]),m.useEffect(()=>{const H=R.current;g&&H&&typeof H.focus=="function"&&H.focus()},[g]),m.useEffect(()=>{if(typeof document>"u")return;const H=L=>{h&&R.current&&z.current&&!R.current.contains(L.target)&&!z.current.contains(L.target)&&V()};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[h]);const E=m.useCallback(H=>{d&&w(L=>{const O=L.filter(q=>q!==H),_=[H,...O].slice(0,c);try{typeof localStorage<"u"&&localStorage.setItem("colorInput-recentColors",JSON.stringify(_))}catch(q){console.warn("Failed to save recent colors to localStorage:",q)}return _})},[d,c]),W=m.useCallback(()=>{const H=!h;f(H),H?l==null||l():i==null||i()},[h,l,i]),F=m.useCallback(H=>{b(H),E(H);const L=rr(H,p);n==null||n(L),a==null||a(L),u&&(f(!1),i==null||i())},[n,a,u,i,E,p]),T=m.useCallback(H=>{C(H)},[]),M=m.useCallback(()=>{x&&(F(x),C(""))},[x,F]),V=m.useCallback(()=>{f(!1),i==null||i()},[i]),A=m.useCallback(H=>{b(H),n==null||n(rr(H,p))},[n,p]);return{isOpen:h,selectedColor:y,recentColors:k,customColor:x,isFocused:v,isHovered:I,handleToggle:W,handleColorSelect:F,handleCustomColorChange:T,handleCustomColorSubmit:M,handleClose:V,setIsFocused:S,setIsHovered:j,setValue:A,triggerRef:R,dropdownRef:z}},rt={container:{position:"relative",display:"inline-block",width:"fit-content"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300",padding:"8px 12px",borderRadius:8},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"8px"},recentColors:{display:"flex",gap:"4px",flexWrap:"wrap"}},Ig={xs:{height:"28px",fontSize:"10px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 16px"},xl:{height:"56px",fontSize:"20px",padding:"16px 20px"}},Rg={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Fg={default:{backgroundColor:"color-white",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},outline:{backgroundColor:"transparent",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},none:{backgroundColor:"transparent",borderColor:"transparent",borderWidth:"0px"}},zg=[{name:"Red 500",value:"color-red-500"},{name:"Orange 500",value:"color-orange-500"},{name:"Yellow 500",value:"color-yellow-500"},{name:"Green 500",value:"color-green-500"},{name:"Blue 500",value:"color-blue-500"},{name:"Indigo 500",value:"color-indigo-500"},{name:"Purple 500",value:"color-purple-500"},{name:"Pink 500",value:"color-pink-500"},{name:"Red 300",value:"color-red-300"},{name:"Orange 300",value:"color-orange-300"},{name:"Yellow 300",value:"color-yellow-300"},{name:"Green 300",value:"color-green-300"},{name:"Blue 300",value:"color-blue-300"},{name:"Indigo 300",value:"color-indigo-300"},{name:"Purple 300",value:"color-purple-300"},{name:"Pink 300",value:"color-pink-300"},{name:"Red 700",value:"color-red-700"},{name:"Orange 700",value:"color-orange-700"},{name:"Yellow 700",value:"color-yellow-700"},{name:"Green 700",value:"color-green-700"},{name:"Blue 700",value:"color-blue-700"},{name:"Indigo 700",value:"color-indigo-700"},{name:"Purple 700",value:"color-purple-700"},{name:"Pink 700",value:"color-pink-700"},{name:"Gray 100",value:"color-gray-100"},{name:"Gray 300",value:"color-gray-300"},{name:"Gray 500",value:"color-gray-500"},{name:"Gray 700",value:"color-gray-700"},{name:"Gray 900",value:"color-gray-900"},{name:"White",value:"color-white"},{name:"Black",value:"color-black"},{name:"Transparent",value:"transparent"}],si=({id:e,name:o,label:r,placeholder:n="Select a color",helperText:a,views:l={},size:i="md",shape:u="default",variant:c="default",shadow:d,error:g=!1,isDisabled:p=!1,isReadOnly:h=!1,isFocused:f=!1,isHovered:y=!1,predefinedColors:b=zg,showCustomInput:x=!0,showRecentColors:C=!0,isOpen:k=!1,selectedColor:w="",recentColors:v=[],customColor:S="",handleToggle:I=()=>{},handleColorSelect:j=()=>{},handleCustomColorChange:R=()=>{},handleCustomColorSubmit:z=()=>{},handleClose:E,setIsFocused:W=()=>{},setIsHovered:F=()=>{},setValue:T,triggerRef:M,dropdownRef:V,onChange:A,onChangeComplete:H,onBlur:L,onFocus:O,onOpen:_,onClose:q,colorFormat:Y,maxRecentColors:P,closeOnSelect:B,value:$,defaultValue:D,"aria-label":N,...G})=>{const{getColor:K}=s.useTheme(),re=m.useId(),oe=e??re,ie=`${oe}-label`,X=`${oe}-listbox`,ae=`${oe}-helper-text`,pe=`${oe}-error-text`,ue=!!g&&typeof g=="string",ke=[a?ae:null,ue?pe:null].filter(Boolean).join(" ")||void 0,ce={...rt.container,...l==null?void 0:l.container},le={...rt.trigger,...Ig[i],...Rg[u],...Fg[c],...g&&{borderColor:"color-red-500"},...p&&{opacity:.6,cursor:"not-allowed"},...f&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!p&&{borderColor:"color-gray-400"},...l==null?void 0:l.trigger,...d&&d},de={...rt.dropdown,...l==null?void 0:l.dropdown},ee={...rt.colorGrid,...l==null?void 0:l.colorGrid},me={...rt.recentColors,...l==null?void 0:l.recentColors},J=w||"color-gray-200";return t.jsxs(s.View,{...ce,...G,children:[r&&t.jsx(vt,{id:ie,htmlFor:oe,size:i,isDisabled:p,error:g,views:l==null?void 0:l.label,children:r}),o&&t.jsx("input",{type:"hidden",name:o,value:rr(w,Y)}),t.jsxs(s.View,{ref:M,id:oe,onClick:p||h?void 0:I,onKeyDown:te=>{p||h||(te.key==="Enter"||te.key===" ")&&(te.preventDefault(),I())},onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),onFocus:()=>{W(!0),O&&O()},onBlur:te=>{W(!1),L&&L(te)},tabIndex:p?-1:0,role:"button","aria-expanded":k,"aria-haspopup":"listbox","aria-controls":k?X:void 0,"aria-labelledby":!N&&r?ie:void 0,"aria-label":N??(r?void 0:n),"aria-describedby":ke,"aria-invalid":g?!0:void 0,width:"fit-content",gap:8,...le,children:[t.jsx(s.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:J,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!h&&!p&&t.jsx(Se,{widthHeight:16,color:"color-gray-500",orientation:k?"up":"down"})]}),k&&t.jsxs(s.View,{ref:V,...de,children:[t.jsx(s.View,{id:X,role:"listbox","aria-labelledby":r?ie:void 0,"aria-label":r?void 0:"Color options",...ee,children:b.map((te,U)=>t.jsx(s.View,{role:"option","aria-selected":w===te.value,"aria-label":te.name,tabIndex:0,width:"24px",height:"24px",borderRadius:"8px",backgroundColor:te.value,borderWidth:"2px",borderStyle:"solid",borderColor:w===te.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>j(te.value),onKeyDown:Q=>{(Q.key==="Enter"||Q.key===" ")&&(Q.preventDefault(),j(te.value))},title:te.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...l==null?void 0:l.colorSwatch},U))}),C&&v.length>0&&t.jsxs(s.Vertical,{gap:8,marginTop:"16px",children:[t.jsx(s.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),t.jsx(s.Horizontal,{gap:4,flexWrap:"wrap",...me,children:v.map((te,U)=>t.jsx(s.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:te,borderWidth:"1px",borderStyle:"solid",borderColor:w===te?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>j(te),title:te,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},U))})]}),x&&t.jsxs(s.Vertical,{gap:8,marginTop:"16px",children:[t.jsx(s.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),t.jsxs(s.Horizontal,{gap:8,children:[t.jsx(Pe,{value:S,onChange:R,placeholder:"#000000 or rgb(0,0,0)","aria-label":"Custom color",size:"sm",style:{flex:1},views:l==null?void 0:l.customInput}),t.jsx(s.Element,{as:"button",type:"button",padding:"8px 12px",backgroundColor:"theme-primary",border:"none",borderRadius:"8px",cursor:"pointer",onClick:z,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:t.jsx(s.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&t.jsx(s.Text,{id:ae,fontSize:"12px",color:g?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a}),ue&&t.jsx(s.Text,{id:pe,fontSize:"12px",color:"color-red-500",marginTop:"4px",...l==null?void 0:l.error,children:g})]})},Mg=e=>{const o=ii(e);return t.jsx(si,{...o,...e})},Wg=Mg,Xr=[{name:"Afghanistan",dial_code:"+93",emoji:"🇦🇫",code:"AF"},{name:"Aland Islands",dial_code:"+358",emoji:"🇦🇽",code:"AX"},{name:"Albania",dial_code:"+355",emoji:"🇦🇱",code:"AL"},{name:"Algeria",dial_code:"+213",emoji:"🇩🇿",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1684",emoji:"🇦🇸",code:"AS"},{name:"Andorra",dial_code:"+376",emoji:"🇦🇩",code:"AD"},{name:"Angola",dial_code:"+244",emoji:"🇦🇴",code:"AO"},{name:"Anguilla",dial_code:"+1264",emoji:"🇦🇮",code:"AI"},{name:"Antarctica",dial_code:"+672",emoji:"🇦🇶",code:"AQ"},{name:"Antigua and Barbuda",dial_code:"+1268",emoji:"🇦🇬",code:"AG"},{name:"Argentina",dial_code:"+54",emoji:"🇦🇷",code:"AR"},{name:"Armenia",dial_code:"+374",emoji:"🇦🇲",code:"AM"},{name:"Aruba",dial_code:"+297",emoji:"🇦🇼",code:"AW"},{name:"Australia",dial_code:"+61",emoji:"🇦🇺",code:"AU"},{name:"Austria",dial_code:"+43",emoji:"🇦🇹",code:"AT"},{name:"Azerbaijan",dial_code:"+994",emoji:"🇦🇿",code:"AZ"},{name:"Bahamas",dial_code:"+1242",emoji:"🇧🇸",code:"BS"},{name:"Bahrain",dial_code:"+973",emoji:"🇧🇭",code:"BH"},{name:"Bangladesh",dial_code:"+880",emoji:"🇧🇩",code:"BD"},{name:"Barbados",dial_code:"+1246",emoji:"🇧🇧",code:"BB"},{name:"Belarus",dial_code:"+375",emoji:"🇧🇾",code:"BY"},{name:"Belgium",dial_code:"+32",emoji:"🇧🇪",code:"BE"},{name:"Belize",dial_code:"+501",emoji:"🇧🇿",code:"BZ"},{name:"Benin",dial_code:"+229",emoji:"🇧🇯",code:"BJ"},{name:"Bermuda",dial_code:"+1441",emoji:"🇧🇲",code:"BM"},{name:"Bhutan",dial_code:"+975",emoji:"🇧🇹",code:"BT"},{name:"Bolivia, Plurinational State of",dial_code:"+591",emoji:"🇧🇴",code:"BO"},{name:"Bosnia and Herzegovina",dial_code:"+387",emoji:"🇧🇦",code:"BA"},{name:"Botswana",dial_code:"+267",emoji:"🇧🇼",code:"BW"},{name:"Brazil",dial_code:"+55",emoji:"🇧🇷",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",emoji:"🇮🇴",code:"IO"},{name:"Brunei Darussalam",dial_code:"+673",emoji:"🇧🇳",code:"BN"},{name:"Bulgaria",dial_code:"+359",emoji:"🇧🇬",code:"BG"},{name:"Burkina Faso",dial_code:"+226",emoji:"🇧🇫",code:"BF"},{name:"Burundi",dial_code:"+257",emoji:"🇧🇮",code:"BI"},{name:"Cambodia",dial_code:"+855",emoji:"🇰🇭",code:"KH"},{name:"Cameroon",dial_code:"+237",emoji:"🇨🇲",code:"CM"},{name:"Canada",dial_code:"+1",emoji:"🇨🇦",code:"CA"},{name:"Cape Verde",dial_code:"+238",emoji:"🇨🇻",code:"CV"},{name:"Cayman Islands",dial_code:"+345",emoji:"🇰🇾",code:"KY"},{name:"Central African Republic",dial_code:"+236",emoji:"🇨🇫",code:"CF"},{name:"Chad",dial_code:"+235",emoji:"🇹🇩",code:"TD"},{name:"Chile",dial_code:"+56",emoji:"🇨🇱",code:"CL"},{name:"China",dial_code:"+86",emoji:"🇨🇳",code:"CN"},{name:"Christmas Island",dial_code:"+61",emoji:"🇨🇽",code:"CX"},{name:"Cocos (Keeling) Islands",dial_code:"+61",emoji:"🇨🇨",code:"CC"},{name:"Colombia",dial_code:"+57",emoji:"🇨🇴",code:"CO"},{name:"Comoros",dial_code:"+269",emoji:"🇰🇲",code:"KM"},{name:"Congo",dial_code:"+242",emoji:"🇨🇬",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",emoji:"🇨🇩",code:"CD"},{name:"Cook Islands",dial_code:"+682",emoji:"🇨🇰",code:"CK"},{name:"Costa Rica",dial_code:"+506",emoji:"🇨🇷",code:"CR"},{name:"Cote d'Ivoire",dial_code:"+225",emoji:"🇨🇮",code:"CI"},{name:"Croatia",dial_code:"+385",emoji:"🇭🇷",code:"HR"},{name:"Cuba",dial_code:"+53",emoji:"🇨🇺",code:"CU"},{name:"Cyprus",dial_code:"+357",emoji:"🇨🇾",code:"CY"},{name:"Czech Republic",dial_code:"+420",emoji:"🇨🇿",code:"CZ"},{name:"Denmark",dial_code:"+45",emoji:"🇩🇰",code:"DK"},{name:"Djibouti",dial_code:"+253",emoji:"🇩🇯",code:"DJ"},{name:"Dominica",dial_code:"+1767",emoji:"🇩🇲",code:"DM"},{name:"Dominican Republic",dial_code:"+1849",emoji:"🇩🇴",code:"DO"},{name:"Ecuador",dial_code:"+593",emoji:"🇪🇨",code:"EC"},{name:"Egypt",dial_code:"+20",emoji:"🇪🇬",code:"EG"},{name:"El Salvador",dial_code:"+503",emoji:"🇸🇻",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",emoji:"🇬🇶",code:"GQ"},{name:"Eritrea",dial_code:"+291",emoji:"🇪🇷",code:"ER"},{name:"Estonia",dial_code:"+372",emoji:"🇪🇪",code:"EE"},{name:"Ethiopia",dial_code:"+251",emoji:"🇪🇹",code:"ET"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",emoji:"🇫🇰",code:"FK"},{name:"Faroe Islands",dial_code:"+298",emoji:"🇫🇴",code:"FO"},{name:"Fiji",dial_code:"+679",emoji:"🇫🇯",code:"FJ"},{name:"Finland",dial_code:"+358",emoji:"🇫🇮",code:"FI"},{name:"France",dial_code:"+33",emoji:"🇫🇷",code:"FR"},{name:"French Guiana",dial_code:"+594",emoji:"🇬🇫",code:"GF"},{name:"French Polynesia",dial_code:"+689",emoji:"🇵🇫",code:"PF"},{name:"Gabon",dial_code:"+241",emoji:"🇬🇦",code:"GA"},{name:"Gambia",dial_code:"+220",emoji:"🇬🇲",code:"GM"},{name:"Georgia",dial_code:"+995",emoji:"🇬🇪",code:"GE"},{name:"Germany",dial_code:"+49",emoji:"🇩🇪",code:"DE"},{name:"Ghana",dial_code:"+233",emoji:"🇬🇭",code:"GH"},{name:"Gibraltar",dial_code:"+350",emoji:"🇬🇮",code:"GI"},{name:"Greece",dial_code:"+30",emoji:"🇬🇷",code:"GR"},{name:"Greenland",dial_code:"+299",emoji:"🇬🇱",code:"GL"},{name:"Grenada",dial_code:"+1473",emoji:"🇬🇩",code:"GD"},{name:"Guadeloupe",dial_code:"+590",emoji:"🇬🇵",code:"GP"},{name:"Guam",dial_code:"+1671",emoji:"🇬🇺",code:"GU"},{name:"Guatemala",dial_code:"+502",emoji:"🇬🇹",code:"GT"},{name:"Guernsey",dial_code:"+44",emoji:"🇬🇬",code:"GG"},{name:"Guinea",dial_code:"+224",emoji:"🇬🇳",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",emoji:"🇬🇼",code:"GW"},{name:"Guyana",dial_code:"+595",emoji:"🇬🇾",code:"GY"},{name:"Haiti",dial_code:"+509",emoji:"🇭🇹",code:"HT"},{name:"Holy See (Vatican City State)",dial_code:"+379",emoji:"🇻🇦",code:"VA"},{name:"Honduras",dial_code:"+504",emoji:"🇭🇳",code:"HN"},{name:"Hong Kong",dial_code:"+852",emoji:"🇭🇰",code:"HK"},{name:"Hungary",dial_code:"+36",emoji:"🇭🇺",code:"HU"},{name:"Iceland",dial_code:"+354",emoji:"🇮🇸",code:"IS"},{name:"India",dial_code:"+91",emoji:"🇮🇳",code:"IN"},{name:"Indonesia",dial_code:"+62",emoji:"🇮🇩",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",emoji:"🇮🇷",code:"IR"},{name:"Iraq",dial_code:"+964",emoji:"🇮🇷",code:"IQ"},{name:"Ireland",dial_code:"+353",emoji:"🇮🇪",code:"IE"},{name:"Isle of Man",dial_code:"+44",emoji:"🇮🇲",code:"IM"},{name:"Israel",dial_code:"+972",emoji:"🇮🇱",code:"IL"},{name:"Italy",dial_code:"+39",emoji:"🇮🇹",code:"IT"},{name:"Jamaica",dial_code:"+1876",emoji:"🇯🇲",code:"JM"},{name:"Japan",dial_code:"+81",emoji:"🇯🇵",code:"JP"},{name:"Jersey",dial_code:"+44",emoji:"🇯🇪",code:"JE"},{name:"Jordan",dial_code:"+962",emoji:"🇯🇴",code:"JO"},{name:"Kazakhstan",dial_code:"+77",emoji:"🇰🇿",code:"KZ"},{name:"Kenya",dial_code:"+254",emoji:"🇰🇪",code:"KE"},{name:"Kiribati",dial_code:"+686",emoji:"🇰🇮",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",emoji:"🇰🇵",code:"KP"},{name:"Korea, Republic of South Korea",dial_code:"+82",emoji:"🇰🇷",code:"KR"},{name:"Kuwait",dial_code:"+965",emoji:"🇰🇼",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",emoji:"🇰🇬",code:"KG"},{name:"Laos",dial_code:"+856",emoji:"🇱🇦",code:"LA"},{name:"Latvia",dial_code:"+371",emoji:"🇱🇻",code:"LV"},{name:"Lebanon",dial_code:"+961",emoji:"🇱🇧",code:"LB"},{name:"Lesotho",dial_code:"+266",emoji:"🇱🇸",code:"LS"},{name:"Liberia",dial_code:"+231",emoji:"🇱🇷",code:"LR"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",emoji:"🇱🇾",code:"LY"},{name:"Liechtenstein",dial_code:"+423",emoji:"🇱🇮",code:"LI"},{name:"Lithuania",dial_code:"+370",emoji:"🇱🇹",code:"LT"},{name:"Luxembourg",dial_code:"+352",emoji:"🇱🇺",code:"LU"},{name:"Macao",dial_code:"+853",emoji:"🇲🇴",code:"MO"},{name:"Macedonia",dial_code:"+389",emoji:"🇲🇰",code:"MK"},{name:"Madagascar",dial_code:"+261",emoji:"🇲🇬",code:"MG"},{name:"Malawi",dial_code:"+265",emoji:"🇲🇼",code:"MW"},{name:"Malaysia",dial_code:"+60",emoji:"🇲🇾",code:"MY"},{name:"Maldives",dial_code:"+960",emoji:"🇲🇻",code:"MV"},{name:"Mali",dial_code:"+223",emoji:"🇲🇱",code:"ML"},{name:"Malta",dial_code:"+356",emoji:"🇲🇹",code:"MT"},{name:"Marshall Islands",dial_code:"+692",emoji:"🇲🇭",code:"MH"},{name:"Martinique",dial_code:"+596",emoji:"🇲🇶",code:"MQ"},{name:"Mauritania",dial_code:"+222",emoji:"🇲🇷",code:"MR"},{name:"Mauritius",dial_code:"+230",emoji:"🇲🇺",code:"MU"},{name:"Mayotte",dial_code:"+262",emoji:"🇾🇹",code:"YT"},{name:"Mexico",dial_code:"+52",emoji:"🇲🇽",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",emoji:"🇫🇲",code:"FM"},{name:"Moldova",dial_code:"+373",emoji:"🇲🇩",code:"MD"},{name:"Monaco",dial_code:"+377",emoji:"🇲🇨",code:"MC"},{name:"Mongolia",dial_code:"+976",emoji:"🇲🇳",code:"MN"},{name:"Montenegro",dial_code:"+382",emoji:"🇲🇪",code:"ME"},{name:"Montserrat",dial_code:"+1664",emoji:"🇲🇸",code:"MS"},{name:"Morocco",dial_code:"+212",emoji:"🇲🇦",code:"MA"},{name:"Mozambique",dial_code:"+258",emoji:"🇲🇿",code:"MZ"},{name:"Myanmar",dial_code:"+95",emoji:"🇲🇲",code:"MM"},{name:"Namibia",emoji:"🇳🇦",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",emoji:"🇳🇷",code:"NR"},{name:"Nepal",dial_code:"+977",emoji:"🇳🇵",code:"NP"},{name:"Netherlands",dial_code:"+31",emoji:"🇳🇱",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",emoji:"🇧🇶",code:"AN"},{name:"New Caledonia",dial_code:"+687",emoji:"🇳🇨",code:"NC"},{name:"New Zealand",dial_code:"+64",emoji:"🇳🇿",code:"NZ"},{name:"Nicaragua",dial_code:"+505",emoji:"🇳🇮",code:"NI"},{name:"Niger",dial_code:"+227",emoji:"🇳🇪",code:"NE"},{name:"Nigeria",dial_code:"+234",emoji:"🇳🇬",code:"NG"},{name:"Niue",dial_code:"+683",emoji:"🇳🇺",code:"NU"},{name:"Norfolk Island",dial_code:"+672",emoji:"🇳🇫",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1670",emoji:"🇲🇵",code:"MP"},{name:"Norway",dial_code:"+47",emoji:"🇳🇴",code:"NO"},{name:"Oman",dial_code:"+968",emoji:"🇴🇲",code:"OM"},{name:"Pakistan",dial_code:"+92",emoji:"🇵🇰",code:"PK"},{name:"Palau",dial_code:"+680",emoji:"🇵🇼",code:"PW"},{name:"Palestinian Territory, Occupied",dial_code:"+970",emoji:"🇵🇸",code:"PS"},{name:"Panama",dial_code:"+507",emoji:"🇵🇦",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",emoji:"🇵🇬",code:"PG"},{name:"Paraguay",dial_code:"+595",emoji:"🇵🇾",code:"PY"},{name:"Peru",dial_code:"+51",emoji:"🇵🇪",code:"PE"},{name:"Philippines",dial_code:"+63",emoji:"🇵🇭",code:"PH"},{name:"Pitcairn",dial_code:"+872",emoji:"🇵🇳",code:"PN"},{name:"Poland",dial_code:"+48",emoji:"🇵🇱",code:"PL"},{name:"Portugal",dial_code:"+351",emoji:"🇵🇹",code:"PT"},{name:"Puerto Rico",dial_code:"+1939",emoji:"🇵🇷",code:"PR"},{name:"Qatar",dial_code:"+974",emoji:"🇶🇦",code:"QA"},{name:"Romania",dial_code:"+40",emoji:"🇷🇴",code:"RO"},{name:"Russia",dial_code:"+7",emoji:"🇷🇺",code:"RU"},{name:"Rwanda",dial_code:"+250",emoji:"🇷🇼",code:"RW"},{name:"Reunion",dial_code:"+262",emoji:"🇷🇪",code:"RE"},{name:"Saint Barthelemy",dial_code:"+590",emoji:"🇧🇱",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",emoji:"🇸🇭",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1869",emoji:"🇰🇳",code:"KN"},{name:"Saint Lucia",dial_code:"+1758",emoji:"🇱🇨",code:"LC"},{name:"Saint Martin",dial_code:"+590",emoji:"🇲🇫",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",emoji:"🇵🇲",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",emoji:"🇻🇨",code:"VC"},{name:"Samoa",dial_code:"+685",emoji:"🇼🇸",code:"WS"},{name:"San Marino",dial_code:"+378",emoji:"🇸🇲",code:"SM"},{name:"Sao Tome and Principe",dial_code:"+239",emoji:"🇸🇹",code:"ST"},{name:"Saudi Arabia",dial_code:"+966",emoji:"🇸🇦",code:"SA"},{name:"Senegal",dial_code:"+221",emoji:"🇸🇳",code:"SN"},{name:"Serbia",dial_code:"+381",emoji:"🇷🇸",code:"RS"},{name:"Seychelles",dial_code:"+248",emoji:"🇸🇨",code:"SC"},{name:"Sierra Leone",dial_code:"+232",emoji:"🇸🇱",code:"SL"},{name:"Singapore",dial_code:"+65",emoji:"🇸🇬",code:"SG"},{name:"Slovakia",dial_code:"+421",emoji:"🇸🇰",code:"SK"},{name:"Slovenia",dial_code:"+386",emoji:"🇸🇮",code:"SI"},{name:"Solomon Islands",dial_code:"+677",emoji:"🇸🇧",code:"SB"},{name:"Somalia",dial_code:"+252",emoji:"🇸🇴",code:"SO"},{name:"South Africa",dial_code:"+27",emoji:"🇿🇦",code:"ZA"},{name:"South Sudan",dial_code:"+211",emoji:"🇸🇸",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",emoji:"🇬🇸",code:"GS"},{name:"Spain",dial_code:"+34",emoji:"🇪🇸",code:"ES"},{name:"Sri Lanka",dial_code:"+94",emoji:"🇱🇰",code:"LK"},{name:"Sudan",dial_code:"+249",emoji:"🇸🇩",code:"SD"},{name:"Suriname",dial_code:"+597",emoji:"🇸🇷",code:"SR"},{name:"Svalbard and Jan Mayen",dial_code:"+47",emoji:"🇸🇯",code:"SJ"},{name:"Swaziland",dial_code:"+268",emoji:"🇸🇿",code:"SZ"},{name:"Sweden",dial_code:"+46",emoji:"🇸🇪",code:"SE"},{name:"Switzerland",dial_code:"+41",emoji:"🇨🇭",code:"CH"},{name:"Syrian Arab Republic",dial_code:"+963",emoji:"🇸🇾",code:"SY"},{name:"Taiwan",dial_code:"+886",emoji:"🇹🇼",code:"TW"},{name:"Tajikistan",dial_code:"+992",emoji:"🇹🇯",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",emoji:"🇹🇿",code:"TZ"},{name:"Thailand",dial_code:"+66",emoji:"🇹🇭",code:"TH"},{name:"Timor-Leste",dial_code:"+670",emoji:"🇹🇱",code:"TL"},{name:"Togo",dial_code:"+228",emoji:"🇹🇬",code:"TG"},{name:"Tokelau",dial_code:"+690",emoji:"🇹🇰",code:"TK"},{name:"Tonga",dial_code:"+676",emoji:"🇹🇴",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1868",emoji:"🇹🇹",code:"TT"},{name:"Tunisia",dial_code:"+216",emoji:"🇹🇳",code:"TN"},{name:"Turkey",dial_code:"+90",emoji:"🇹🇷",code:"TR"},{name:"Turkmenistan",dial_code:"+993",emoji:"🇹🇲",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1649",emoji:"🇹🇨",code:"TC"},{name:"Tuvalu",dial_code:"+688",emoji:"🇹🇻",code:"TV"},{name:"Uganda",dial_code:"+256",emoji:"🇺🇬",code:"UG"},{name:"Ukraine",dial_code:"+380",emoji:"🇺🇦",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",emoji:"🇦🇪",code:"AE"},{name:"United Kingdom",dial_code:"+44",emoji:"🇬🇧",code:"GB"},{name:"United States",dial_code:"+1",emoji:"🇺🇸",code:"US"},{name:"Uruguay",dial_code:"+598",emoji:"🇺🇾",code:"UY"},{name:"Uzbekistan",dial_code:"+998",emoji:"🇺🇿",code:"UZ"},{name:"Vanuatu",dial_code:"+678",emoji:"🇻🇺",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",emoji:"🇻🇪",code:"VE"},{name:"Vietnam",dial_code:"+84",emoji:"🇻🇳",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1284",emoji:"🇻🇬",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1340",emoji:"🇻🇮",code:"VI"},{name:"Wallis and Futuna",dial_code:"+681",emoji:"🇼🇫",code:"WF"},{name:"Yemen",dial_code:"+967",emoji:"🇾🇪",code:"YE"},{name:"Zambia",dial_code:"+260",emoji:"🇿🇲",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",emoji:"🇿🇼",code:"ZW"}],ci=({placeholder:e})=>{const[o,r]=m.useState(Xr),[n,a]=m.useState(e??Xr[0].name),[l,i]=m.useState(!0),[u,c]=m.useState(!1),[d,g]=m.useState(!1);return{hide:l,setHide:i,newOptions:o,setNewOptions:r,isHovered:d,setIsHovered:g,isFocused:u,setIsFocused:c,value:n,setValue:a}},ma={xs:8,sm:10,md:12,lg:14,xl:16},Eg=({size:e,...o})=>t.jsx(s.Element,{as:"ul",...o}),Ag=e=>t.jsx(s.Input,{type:"text",...e}),Hg=({size:e,...o})=>t.jsx(s.Element,{as:"li",...o}),Vg=({id:e,option:o,size:r="md",isSelected:n=!1,isHighlighted:a=!1,callback:l=()=>{},views:i={text:{}}})=>{const u=c=>{c&&c.stopPropagation&&c.stopPropagation(),l(o??"")};return t.jsx(Hg,{id:e,margin:0,role:"option","aria-selected":n,listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:u,fontSize:s.Typography.fontSizes[r],backgroundColor:a?"color-gray-100":void 0,_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...i.text,children:o})},Pg=({id:e,size:o,views:r={dropDown:{}},options:n=[],selectedOption:a,highlightedIndex:l=-1,callback:i=()=>{}})=>{const u=c=>i(c);return t.jsx(Eg,{id:e,role:"listbox",margin:0,padding:0,top:"100%",width:"100%",display:"flex",zIndex:1e3,overflow:"auto",maxHeight:"300px",borderRadius:12,position:"absolute",flexDirection:"column",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",...r.dropDown,children:n.map((c,d)=>t.jsx(Vg,{id:e?`${e}-option-${d}`:void 0,size:o,option:c.name,isSelected:c.name===a,isHighlighted:d===l,callback:u,...r.text},c.code))})},di=({id:e,name:o,label:r,value:n,placeholder:a,helperText:l,hide:i=!1,error:u=!1,isHovered:c=!1,isFocused:d=!1,isAutoFocus:g=!1,isDisabled:p=!1,isReadOnly:h=!1,shadow:f={},newOptions:y=[],size:b="md",variant:x="default",shape:C="default",onChange:k,onBlur:w=()=>{},setHide:v=()=>{},setNewOptions:S=()=>{},setIsHovered:I=()=>{},setIsFocused:j=()=>{},setValue:R=()=>{},selected:z,views:E={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:W,...F})=>{const{getColor:T,themeMode:M}=s.useTheme(),V=m.useId(),A=e??V,H=`${A}-listbox`,[L,O]=m.useState(-1),_=T("color-gray-500",{themeMode:W||M}),q=()=>j(!0),Y=K=>{v(!i),O(-1),R(K),k&&k(K)},P=()=>{!p&&!h&&v(!i)},B=K=>{const re=K.target.value,oe=Xr.filter(ie=>ie.name.toLowerCase().startsWith(re.toLowerCase()));i&&v(!1),S(oe),O(oe.length>0?0:-1),k&&k(re)},$=K=>{p||h||(K.key==="ArrowDown"?(K.preventDefault(),i?(v(!1),O(y.length>0?0:-1)):O(Math.min(L+1,y.length-1))):K.key==="ArrowUp"?i||(K.preventDefault(),O(Math.max(L-1,0))):K.key==="Enter"?!i&&L>=0&&y[L]&&(K.preventDefault(),Y(y[L].name)):K.key==="Escape"&&(i||(v(!0),O(-1))))},D=K=>{w(K),j(!1)},N=!!r,G={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:s.Typography.fontSizes[b],backgroundColor:"transparent",color:p?"color-gray-400":"color-gray-900",cursor:p?"not-allowed":h?"auto":"pointer",...E.field};return t.jsxs(no,{helperText:l,error:u,views:E,onClick:P,children:[t.jsxs(mo,{label:r,size:b,error:u,shape:C,views:E,shadow:f,variant:x,value:n,color:"theme-primary",isDisabled:p,isReadOnly:h,isFocused:d,showLabel:N,_hover:!p&&!u?{borderColor:"theme-primary"}:void 0,children:[t.jsxs(ot,{children:[N&&t.jsx(wo,{htmlFor:A,color:"theme-primary",error:u,views:E,children:r}),t.jsx(Ag,{id:A,name:o,placeholder:a,readOnly:h,disabled:p,autoFocus:g,role:"combobox","aria-expanded":!i,"aria-controls":i?void 0:H,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":!i&&L>=0?`${H}-option-${L}`:void 0,onBlur:D,onFocus:q,onKeyDown:$,...G,...F,value:n,onChange:B})]}),t.jsx(ht,{children:i?t.jsx(Se,{orientation:"down",widthHeight:ma[b],color:_,style:E.icon}):t.jsx(Se,{orientation:"up",widthHeight:ma[b],color:_,style:E.icon})})]}),!i&&t.jsx(Pg,{id:H,size:b,views:E,options:y,selectedOption:n,highlightedIndex:L,callback:Y})]})},Dg=e=>{const o=ci(e);return t.jsx(di,{...o,...e})},$g=Dg;function nr(e){"@babel/helpers - typeof";return nr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},nr(e)}function Ve(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function Lg(e){return Ve(1,arguments),e instanceof Date||nr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Xe(e){Ve(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||nr(e)==="object"&&o==="[object Date]"?new Date(e.getTime()):typeof e=="number"||o==="[object Number]"?new Date(e):((typeof e=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Bg(e){if(Ve(1,arguments),!Lg(e)&&typeof e!="number")return!1;var o=Xe(e);return!isNaN(Number(o))}function Co(e){if(e===null||e===!0||e===!1)return NaN;var o=Number(e);return isNaN(o)?o:o<0?Math.ceil(o):Math.floor(o)}function _g(e,o){Ve(2,arguments);var r=Xe(e).getTime(),n=Co(o);return new Date(r+n)}function Og(e,o){Ve(2,arguments);var r=Co(o);return _g(e,-r)}var Ng=864e5;function qg(e){Ve(1,arguments);var o=Xe(e),r=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=r-n;return Math.floor(a/Ng)+1}function ar(e){Ve(1,arguments);var o=1,r=Xe(e),n=r.getUTCDay(),a=(n<o?7:0)+n-o;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function ui(e){Ve(1,arguments);var o=Xe(e),r=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=ar(n),l=new Date(0);l.setUTCFullYear(r,0,4),l.setUTCHours(0,0,0,0);var i=ar(l);return o.getTime()>=a.getTime()?r+1:o.getTime()>=i.getTime()?r:r-1}function Ug(e){Ve(1,arguments);var o=ui(e),r=new Date(0);r.setUTCFullYear(o,0,4),r.setUTCHours(0,0,0,0);var n=ar(r);return n}var Gg=6048e5;function Yg(e){Ve(1,arguments);var o=Xe(e),r=ar(o).getTime()-Ug(o).getTime();return Math.round(r/Gg)+1}var Kg={};function xr(){return Kg}function lr(e,o){var r,n,a,l,i,u,c,d;Ve(1,arguments);var g=xr(),p=Co((r=(n=(a=(l=o==null?void 0:o.weekStartsOn)!==null&&l!==void 0?l:o==null||(i=o.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&a!==void 0?a:g.weekStartsOn)!==null&&n!==void 0?n:(c=g.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Xe(e),f=h.getUTCDay(),y=(f<p?7:0)+f-p;return h.setUTCDate(h.getUTCDate()-y),h.setUTCHours(0,0,0,0),h}function pi(e,o){var r,n,a,l,i,u,c,d;Ve(1,arguments);var g=Xe(e),p=g.getUTCFullYear(),h=xr(),f=Co((r=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(i=o.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&a!==void 0?a:h.firstWeekContainsDate)!==null&&n!==void 0?n:(c=h.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(p+1,0,f),y.setUTCHours(0,0,0,0);var b=lr(y,o),x=new Date(0);x.setUTCFullYear(p,0,f),x.setUTCHours(0,0,0,0);var C=lr(x,o);return g.getTime()>=b.getTime()?p+1:g.getTime()>=C.getTime()?p:p-1}function Xg(e,o){var r,n,a,l,i,u,c,d;Ve(1,arguments);var g=xr(),p=Co((r=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(i=o.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&a!==void 0?a:g.firstWeekContainsDate)!==null&&n!==void 0?n:(c=g.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&r!==void 0?r:1),h=pi(e,o),f=new Date(0);f.setUTCFullYear(h,0,p),f.setUTCHours(0,0,0,0);var y=lr(f,o);return y}var Jg=6048e5;function Qg(e,o){Ve(1,arguments);var r=Xe(e),n=lr(r,o).getTime()-Xg(r,o).getTime();return Math.round(n/Jg)+1}function ye(e,o){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return r+n}var lo={y:function(o,r){var n=o.getUTCFullYear(),a=n>0?n:1-n;return ye(r==="yy"?a%100:a,r.length)},M:function(o,r){var n=o.getUTCMonth();return r==="M"?String(n+1):ye(n+1,2)},d:function(o,r){return ye(o.getUTCDate(),r.length)},a:function(o,r){var n=o.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(o,r){return ye(o.getUTCHours()%12||12,r.length)},H:function(o,r){return ye(o.getUTCHours(),r.length)},m:function(o,r){return ye(o.getUTCMinutes(),r.length)},s:function(o,r){return ye(o.getUTCSeconds(),r.length)},S:function(o,r){var n=r.length,a=o.getUTCMilliseconds(),l=Math.floor(a*Math.pow(10,n-3));return ye(l,r.length)}},Ao={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Zg={G:function(o,r,n){var a=o.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(o,r,n){if(r==="yo"){var a=o.getUTCFullYear(),l=a>0?a:1-a;return n.ordinalNumber(l,{unit:"year"})}return lo.y(o,r)},Y:function(o,r,n,a){var l=pi(o,a),i=l>0?l:1-l;if(r==="YY"){var u=i%100;return ye(u,2)}return r==="Yo"?n.ordinalNumber(i,{unit:"year"}):ye(i,r.length)},R:function(o,r){var n=ui(o);return ye(n,r.length)},u:function(o,r){var n=o.getUTCFullYear();return ye(n,r.length)},Q:function(o,r,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return ye(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(o,r,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return ye(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(o,r,n){var a=o.getUTCMonth();switch(r){case"M":case"MM":return lo.M(o,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(o,r,n){var a=o.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return ye(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(o,r,n,a){var l=Qg(o,a);return r==="wo"?n.ordinalNumber(l,{unit:"week"}):ye(l,r.length)},I:function(o,r,n){var a=Yg(o);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):ye(a,r.length)},d:function(o,r,n){return r==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):lo.d(o,r)},D:function(o,r,n){var a=qg(o);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):ye(a,r.length)},E:function(o,r,n){var a=o.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(o,r,n,a){var l=o.getUTCDay(),i=(l-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(i);case"ee":return ye(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(o,r,n,a){var l=o.getUTCDay(),i=(l-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(i);case"cc":return ye(i,r.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(o,r,n){var a=o.getUTCDay(),l=a===0?7:a;switch(r){case"i":return String(l);case"ii":return ye(l,r.length);case"io":return n.ordinalNumber(l,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(o,r,n){var a=o.getUTCHours(),l=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(o,r,n){var a=o.getUTCHours(),l;switch(a===12?l=Ao.noon:a===0?l=Ao.midnight:l=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(o,r,n){var a=o.getUTCHours(),l;switch(a>=17?l=Ao.evening:a>=12?l=Ao.afternoon:a>=4?l=Ao.morning:l=Ao.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(o,r,n){if(r==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return lo.h(o,r)},H:function(o,r,n){return r==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):lo.H(o,r)},K:function(o,r,n){var a=o.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):ye(a,r.length)},k:function(o,r,n){var a=o.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):ye(a,r.length)},m:function(o,r,n){return r==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):lo.m(o,r)},s:function(o,r,n){return r==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):lo.s(o,r)},S:function(o,r){return lo.S(o,r)},X:function(o,r,n,a){var l=a._originalDate||o,i=l.getTimezoneOffset();if(i===0)return"Z";switch(r){case"X":return ha(i);case"XXXX":case"XX":return yo(i);case"XXXXX":case"XXX":default:return yo(i,":")}},x:function(o,r,n,a){var l=a._originalDate||o,i=l.getTimezoneOffset();switch(r){case"x":return ha(i);case"xxxx":case"xx":return yo(i);case"xxxxx":case"xxx":default:return yo(i,":")}},O:function(o,r,n,a){var l=a._originalDate||o,i=l.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ga(i,":");case"OOOO":default:return"GMT"+yo(i,":")}},z:function(o,r,n,a){var l=a._originalDate||o,i=l.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ga(i,":");case"zzzz":default:return"GMT"+yo(i,":")}},t:function(o,r,n,a){var l=a._originalDate||o,i=Math.floor(l.getTime()/1e3);return ye(i,r.length)},T:function(o,r,n,a){var l=a._originalDate||o,i=l.getTime();return ye(i,r.length)}};function ga(e,o){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),l=n%60;if(l===0)return r+String(a);var i=o;return r+String(a)+i+ye(l,2)}function ha(e,o){if(e%60===0){var r=e>0?"-":"+";return r+ye(Math.abs(e)/60,2)}return yo(e,o)}function yo(e,o){var r=o||"",n=e>0?"-":"+",a=Math.abs(e),l=ye(Math.floor(a/60),2),i=ye(a%60,2);return n+l+r+i}var fa=function(o,r){switch(o){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},mi=function(o,r){switch(o){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},eh=function(o,r){var n=o.match(/(P+)(p+)?/)||[],a=n[1],l=n[2];if(!l)return fa(o,r);var i;switch(a){case"P":i=r.dateTime({width:"short"});break;case"PP":i=r.dateTime({width:"medium"});break;case"PPP":i=r.dateTime({width:"long"});break;case"PPPP":default:i=r.dateTime({width:"full"});break}return i.replace("{{date}}",fa(a,r)).replace("{{time}}",mi(l,r))},oh={p:mi,P:eh};function th(e){var o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),e.getTime()-o.getTime()}var rh=["D","DD"],nh=["YY","YYYY"];function ah(e){return rh.indexOf(e)!==-1}function lh(e){return nh.indexOf(e)!==-1}function ya(e,o,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ih={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},sh=function(o,r,n){var a,l=ih[o];return typeof l=="string"?a=l:r===1?a=l.one:a=l.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function Wr(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=o.width?String(o.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var ch={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},dh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},uh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ph={date:Wr({formats:ch,defaultWidth:"full"}),time:Wr({formats:dh,defaultWidth:"full"}),dateTime:Wr({formats:uh,defaultWidth:"full"})},mh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gh=function(o,r,n,a){return mh[o]};function nt(e){return function(o,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var l=e.defaultFormattingWidth||e.defaultWidth,i=r!=null&&r.width?String(r.width):l;a=e.formattingValues[i]||e.formattingValues[l]}else{var u=e.defaultWidth,c=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[c]||e.values[u]}var d=e.argumentCallback?e.argumentCallback(o):o;return a[d]}}var hh={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fh={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yh={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},xh={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},bh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},kh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ch=function(o,r){var n=Number(o),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Sh={ordinalNumber:Ch,era:nt({values:hh,defaultWidth:"wide"}),quarter:nt({values:fh,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:nt({values:yh,defaultWidth:"wide"}),day:nt({values:xh,defaultWidth:"wide"}),dayPeriod:nt({values:bh,defaultWidth:"wide",formattingValues:kh,defaultFormattingWidth:"wide"})};function at(e){return function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],l=o.match(a);if(!l)return null;var i=l[0],u=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(u)?jh(u,function(p){return p.test(i)}):wh(u,function(p){return p.test(i)}),d;d=e.valueCallback?e.valueCallback(c):c,d=r.valueCallback?r.valueCallback(d):d;var g=o.slice(i.length);return{value:d,rest:g}}}function wh(e,o){for(var r in e)if(e.hasOwnProperty(r)&&o(e[r]))return r}function jh(e,o){for(var r=0;r<e.length;r++)if(o(e[r]))return r}function vh(e){return function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],l=o.match(e.parsePattern);if(!l)return null;var i=e.valueCallback?e.valueCallback(l[0]):l[0];i=r.valueCallback?r.valueCallback(i):i;var u=o.slice(a.length);return{value:i,rest:u}}}var Th=/^(\d+)(th|st|nd|rd)?/i,Ih=/\d+/i,Rh={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Fh={any:[/^b/i,/^(a|c)/i]},zh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Mh={any:[/1/i,/2/i,/3/i,/4/i]},Wh={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Eh={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ah={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Hh={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Vh={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ph={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Dh={ordinalNumber:vh({matchPattern:Th,parsePattern:Ih,valueCallback:function(o){return parseInt(o,10)}}),era:at({matchPatterns:Rh,defaultMatchWidth:"wide",parsePatterns:Fh,defaultParseWidth:"any"}),quarter:at({matchPatterns:zh,defaultMatchWidth:"wide",parsePatterns:Mh,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:at({matchPatterns:Wh,defaultMatchWidth:"wide",parsePatterns:Eh,defaultParseWidth:"any"}),day:at({matchPatterns:Ah,defaultMatchWidth:"wide",parsePatterns:Hh,defaultParseWidth:"any"}),dayPeriod:at({matchPatterns:Vh,defaultMatchWidth:"any",parsePatterns:Ph,defaultParseWidth:"any"})},$h={code:"en-US",formatDistance:sh,formatLong:ph,formatRelative:gh,localize:Sh,match:Dh,options:{weekStartsOn:0,firstWeekContainsDate:1}},Lh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_h=/^'([^]*?)'?$/,Oh=/''/g,Nh=/[a-zA-Z]/;function qh(e,o,r){var n,a,l,i,u,c,d,g,p,h,f,y,b,x;Ve(2,arguments);var C=String(o),k=xr(),w=(n=(a=void 0)!==null&&a!==void 0?a:k.locale)!==null&&n!==void 0?n:$h,v=Co((l=(i=(u=(c=void 0)!==null&&c!==void 0?c:void 0)!==null&&u!==void 0?u:k.firstWeekContainsDate)!==null&&i!==void 0?i:(d=k.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Co((p=(h=(f=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&f!==void 0?f:k.weekStartsOn)!==null&&h!==void 0?h:(b=k.locale)===null||b===void 0||(x=b.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&p!==void 0?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var I=Xe(e);if(!Bg(I))throw new RangeError("Invalid time value");var j=th(I),R=Og(I,j),z={firstWeekContainsDate:v,weekStartsOn:S,locale:w,_originalDate:I},E=C.match(Bh).map(function(W){var F=W[0];if(F==="p"||F==="P"){var T=oh[F];return T(W,w.formatLong)}return W}).join("").match(Lh).map(function(W){if(W==="''")return"'";var F=W[0];if(F==="'")return Uh(W);var T=Zg[F];if(T)return lh(W)&&ya(W,o,String(e)),ah(W)&&ya(W,o,String(e)),T(R,W,w.localize,z);if(F.match(Nh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+F+"`");return W}).join("");return E}function Uh(e){var o=e.match(_h);return o?o[1].replace(Oh,"'"):e}const Er=e=>typeof e=="string"?e:void 0,gi=({value:e,defaultValue:o}={})=>{const[r,n]=m.useState(!1),[a,l]=m.useState(!1),[i,u]=m.useState(()=>Er(e)??Er(o)??qh(new Date,"yyyy-MM-dd")),c=Er(e);return m.useEffect(()=>{c!==void 0&&u(c)},[c]),{date:i,setDate:u,isHovered:r,setIsHovered:n,isFocused:a,setIsFocused:l}},Gh=e=>t.jsx(s.Input,{type:"date",...e}),hi=({id:e,name:o,label:r,date:n,children:a,helperText:l,shadow:i={},size:u="md",variant:c="default",shape:d="default",views:g={container:{},label:{},helperText:{},text:{},field:{}},error:p=!1,isHovered:h=!1,isFocused:f=!1,isDisabled:y=!1,isReadOnly:b=!1,setDate:x=()=>{},setIsFocused:C=()=>{},setIsHovered:k=()=>{},onChange:w,onChangeText:v,value:S,defaultValue:I,...j})=>{const{themeMode:R}=s.useTheme(),z=m.useId(),E=e??z,W=!!r,F=()=>k(!h),T=()=>C(!0),M=A=>{typeof A=="string"?(x(A),v&&v(A)):(x(A.target.value),w&&w(A.target.value))},V={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},transition:"all 0.2s ease-in-out",fontSize:s.Typography.fontSizes[u],backgroundColor:"transparent",color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":b?"auto":"pointer",...g.field};return t.jsx(no,{helperText:l,error:p,views:g,children:t.jsx(mo,{label:r,size:u,error:p,shape:d,views:g,shadow:i,color:"theme-primary",variant:c,value:n,isHovered:h,isDisabled:y,isReadOnly:b,isFocused:f,showLabel:W,onMouseEnter:F,onMouseLeave:F,children:t.jsxs(ot,{children:[W&&t.jsx(wo,{htmlFor:E,color:"theme-primary",error:p,views:g,children:r}),t.jsx(Gh,{id:E,name:o,role:"textbox","aria-label":!W&&typeof r=="string"?r:void 0,onFocus:T,disabled:y,readOnly:b,...V,...j,...v&&{onChangeText:M},onChange:M,value:n})]})})})},Yh=e=>{const o=gi(e);return t.jsx(hi,{...o,...e})},Kh=Yh,fi=e=>{const o=An(e),[r,n]=m.useState(!1);return{isVisible:r,setIsVisible:n,...e,...o}},xa={xs:14,sm:16,md:16,lg:18,xl:20},Xh=({visibleIcon:e,hiddenIcon:o,...r})=>{const{isVisible:n,setIsVisible:a,...l}=fi(r),i=xa[r.size??"md"]??xa.md,u=i-2;return t.jsx(It,{...l,type:n?"text":"password",isClearable:!1,right:t.jsx(s.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${i}px`,height:`${i}px`,minWidth:`${i}px`,color:"color-gray-500",cursor:r.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{r.isDisabled||a(!n)},children:n?e??t.jsx(Sn,{widthHeight:u}):o??t.jsx(Cn,{widthHeight:u})})})},Jh=Xh,yi=(e,o,r)=>{const[n,a]=m.useState(e),[l,i]=m.useState(o?{value:o,label:o}:e[0]),[u,c]=m.useState([]),[d,g]=m.useState(0),[p,h]=m.useState(r??""),[f,y]=m.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:l,setSelectedItem:i,selectedItems:u,setSelectedItems:c,highlightedIndex:d,setHighlightedIndex:g,searchQuery:p,setSearchQuery:h,isDropdownVisible:f,setIsDropdownVisible:y}},Qh={xs:12,sm:14,md:16,lg:20,xl:24},Zh={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},ba={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},ef={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},of={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},tf={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},ka={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},rf={display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"color-gray-100",borderRadius:8,fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},xi=({placeholder:e,items:o,showTick:r=!0,onSelect:n,searchEnabled:a=!0,left:l,right:i,label:u,filteredItems:c,setSelectedItem:d,selectedItem:g,selectedItems:p,setSelectedItems:h,highlightedIndex:f,setHighlightedIndex:y,searchQuery:b,setSearchQuery:x,setFilteredItems:C,views:k,isDropdownVisible:w,setIsDropdownVisible:v,isMulti:S=!1,searchPlaceholder:I,size:j="md",...R})=>{const z=m.useId(),E=R.id??z,W=`${E}-dropdown`,F=`${E}-label`,{ref:T,relation:M}=s.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),V=m.useRef(null),[A,H]=m.useState(!1),[L,O]=m.useState(!1),_=()=>{var K;const $=L?ba.enter:ba.initial;if(!T.current)return{};const D=T.current.getBoundingClientRect(),N={position:"fixed",left:D.left,width:D.width,zIndex:1e4,...$};return((K=M==null?void 0:M.space)==null?void 0:K.vertical)==="top"?{...N,bottom:window.innerHeight-D.top+6}:{...N,top:D.bottom+6}};m.useEffect(()=>{if(w){const $=setTimeout(()=>O(!0),10);return()=>clearTimeout($)}O(!1)},[w]),m.useEffect(()=>{const $=D=>{!D.composedPath().some(K=>(K==null?void 0:K.id)===W)&&T.current&&!T.current.contains(D.target)&&v(!1)};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[]);const q=$=>{if(x($),$==="")C(o);else{const D=o.filter(N=>N.label.toLowerCase().includes($.toLowerCase()));C(D)}y(0)},Y=$=>{if(S){const D=p.some(G=>G.value===$.value);let N;D?N=p.filter(G=>G.value!==$.value):N=[...p,$],h(N),n==null||n(N)}else d($),n==null||n($),v(!1)},P=($,D)=>{$.stopPropagation();const N=p.filter(G=>G.value!==D.value);h(N),n==null||n(N)},B=$=>S?p.some(D=>D.value===$.value):$.value===g.value;return t.jsxs(s.Horizontal,{flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...R,children:[u&&t.jsx(s.Text,{id:F,views:k==null?void 0:k.label,children:u}),t.jsxs(s.View,{position:"relative",width:"100%",children:[t.jsx("div",{ref:T,role:"combobox",tabIndex:0,"aria-expanded":w,"aria-haspopup":"listbox","aria-controls":w?W:void 0,"aria-labelledby":u?F:void 0,onClick:()=>v(!w),onKeyDown:$=>{$.key==="Enter"||$.key===" "||$.key==="ArrowDown"?($.preventDefault(),v(!0)):$.key==="Escape"&&v(!1)},style:{width:"100%"},children:t.jsxs(mo,{size:j,isHovered:A,isFocused:w,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),cursor:"pointer",views:{container:k==null?void 0:k.container},children:[t.jsxs(s.Horizontal,{gap:10,alignItems:"center",flex:1,minWidth:0,flexWrap:S?"wrap":"nowrap",...k==null?void 0:k.labelContainer,children:[l,S?p.length>0?t.jsx(s.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:p.map($=>t.jsxs(s.Horizontal,{...rf,_hover:{backgroundColor:"color-gray-200"},children:[$.icon&&t.jsx(s.View,{flexShrink:0,children:$.icon}),t.jsx(s.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:$.label}),t.jsx($e,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:D=>P(D,$)})]},$.value))}):t.jsx(s.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...k==null?void 0:k.label,children:e}):t.jsxs(t.Fragment,{children:[g.icon&&g.label!==e&&t.jsx(s.View,{children:g.icon}),t.jsx(s.Text,{weight:"medium",flexGrow:1,color:g.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...k==null?void 0:k.label,children:g.label})]})]}),t.jsxs(s.Horizontal,{gap:8,alignItems:"center",flexShrink:0,children:[i,t.jsx(s.View,{style:w?ka.open:ka.closed,children:t.jsx(Se,{widthHeight:Qh[j],orientation:"down",color:w?"color-gray-700":"color-gray-400"})})]})]})}),w&&t.jsx(Ct,{children:t.jsxs(s.View,{ref:V,id:W,role:"listbox","aria-labelledby":u?F:void 0,...Zh,style:_(),...k==null?void 0:k.dropdown,children:[a&&t.jsx(s.View,{...ef,children:t.jsx(It,{id:`${E}-search`,name:`${R.name??E}-search`,width:"100%",type:"search",autoFocus:!0,value:b,onChange:$=>q($),hint:I||e||"Search...","aria-label":I||"Search",isClearable:!1,left:t.jsx(Qt,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...k==null?void 0:k.text},field:{fontSize:"13px"}}})}),c.length>0&&t.jsx(s.View,{margin:0,padding:"4px",children:c.map(($,D)=>{const N=B($),G=D===f;return t.jsxs(s.Horizontal,{role:"option","aria-selected":N,justifyContent:"space-between",alignItems:"center",...of,backgroundColor:N&&G?"color-blue-100":N?"color-blue-50":G?"color-gray-100":"transparent",onMouseEnter:()=>y(D),onClick:()=>Y($),...k==null?void 0:k.item,children:[t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[$.icon&&t.jsx(s.View,{flexShrink:0,children:$.icon}),t.jsx(s.Text,{size:"sm",color:N?"theme-primary":"color-gray-800",weight:N?"medium":"normal",children:$.label})]}),N&&r&&t.jsx(wt,{widthHeight:16,color:"theme-primary"})]},$.value)})}),c.length===0&&t.jsxs(s.Vertical,{...tf,children:[t.jsx(Qt,{widthHeight:24,color:"color-gray-300"}),t.jsx(s.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),t.jsx(s.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},nf=({id:e,name:o,items:r,placeholder:n,searchPlaceholder:a,...l})=>{const i=yi(r,n,a);return t.jsx(xi,{id:e,name:o,items:r,searchPlaceholder:a,...i,...l})},af=nf,bi=e=>{const{tags:o,defaultTags:r=[],onTagsChange:n,onTagAdd:a,onTagRemove:l,maxTags:i,minTagLength:u=1,maxTagLength:c=50,allowDuplicates:d=!1,separators:g=["enter","comma"],isDisabled:p=!1,isReadOnly:h=!1}=e,[f,y]=m.useState(""),[b,x]=m.useState(()=>(o||r||[]).map((M,V)=>({id:`tag-${V}-${Date.now()}`,value:M}))),[C,k]=m.useState(!1),[w,v]=m.useState(!1),S=o&&Array.isArray(o)?o.map((T,M)=>({id:`tag-${M}-${Date.now()}`,value:T})):b;m.useEffect(()=>{o&&Array.isArray(o)&&x(o.map((T,M)=>({id:`tag-${M}-${Date.now()}`,value:T})))},[o]);const I=m.useCallback(T=>{const M=T.trim();return!(M.length<u||M.length>c||!d&&S.map(A=>A.value.toLowerCase()).includes(M.toLowerCase())||i&&S.length>=i)},[S,u,c,d,i]),j=m.useCallback(T=>{if(p||h)return;const M=T.trim();if(!M||!I(M))return;const V={id:`tag-${Date.now()}-${Math.random()}`,value:M},A=[...S,V],H=A.map(L=>L.value);o||x(A),n==null||n(H),a==null||a(M),y("")},[S,I,n,a,p,h,o]),R=m.useCallback(T=>{if(p||h)return;const M=S[T];if(!M)return;const V=S.filter((H,L)=>L!==T),A=V.map(H=>H.value);o||x(V),n==null||n(A),l==null||l(M.value,T)},[S,n,l,p,h,o]),z=m.useCallback(T=>{if(p||h)return;const M=T.target.value;if(g.includes("comma")&&M.includes(",")){const V=M.split(","),A=V[0],H=V.slice(1).join(",");A.trim()&&j(A),y(H);return}y(M)},[j,g,p,h]),E=m.useCallback(T=>{if(p||h)return;const{key:M}=T;if(g.includes("enter")&&M==="Enter"){T.preventDefault(),f.trim()&&j(f);return}if(g.includes("tab")&&M==="Tab"&&f.trim()){T.preventDefault(),j(f);return}if(g.includes("space")&&M===" "&&f.trim()){T.preventDefault(),j(f);return}if(M==="Backspace"&&!f&&S.length>0){T.preventDefault(),R(S.length-1);return}},[j,R,f,S,g,p,h]),W=m.useCallback(()=>{var T;k(!0),(T=e.onFocus)==null||T.call(e)},[e.onFocus]),F=m.useCallback(()=>{var T;k(!1),f.trim()&&j(f),(T=e.onBlur)==null||T.call(e)},[j,f,e.onBlur]);return{inputValue:f,setInputValue:y,tags:S,setTags:x,isFocused:C,setIsFocused:k,isHovered:w,setIsHovered:v,addTag:j,removeTag:R,handleInputChange:z,handleKeyDown:E,handleFocus:W,handleBlur:F,validateTag:I}},lf=({tag:e,onRemove:o,isRemovable:r,size:n,views:a,isDisabled:l,isReadOnly:i})=>{const[u,c]=m.useState(!1),d={xs:{padding:"2px 8px",fontSize:"10px",iconSize:10},sm:{padding:"4px 10px",fontSize:"12px",iconSize:12},md:{padding:"6px 14px",fontSize:"14px",iconSize:14},lg:{padding:"8px 16px",fontSize:"16px",iconSize:16},xl:{padding:"10px 18px",fontSize:"18px",iconSize:18}}[n]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return t.jsxs(s.Horizontal,{alignItems:"center",gap:6,padding:d.padding,backgroundColor:"theme-primary-100",borderRadius:"9999px",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary-250",transition:"all 0.15s ease-in-out",opacity:l?.6:1,maxWidth:"100%",minWidth:0,_hover:!l&&!i?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[t.jsx(s.Text,{fontSize:d.fontSize,color:l?"color-gray-400":"theme-primary",maxLines:1,minWidth:0,...a==null?void 0:a.tagText,children:e}),r&&!l&&!i&&t.jsx(s.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:u?"color-red-100":"transparent",opacity:u?1:.7,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:g=>{g.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:t.jsx($e,{widthHeight:d.iconSize,color:u?"color-red-500":"color-gray-400"})})]})},ki=({id:e,name:o,label:r,placeholder:n="Type and press Enter to add tags...",helperText:a,error:l=!1,inputValue:i="",tags:u=[],left:c,right:d,shadow:g={},views:p={},size:h="md",shape:f="default",variant:y="default",isDisabled:b=!1,isReadOnly:x=!1,isAutoFocus:C=!1,isRemovable:k=!0,isFocused:w=!1,isHovered:v=!1,maxTags:S,handleInputChange:I,handleKeyDown:j,handleFocus:R,handleBlur:z,removeTag:E,setIsHovered:W,onClick:F,setInputValue:T,setIsFocused:M,addTag:V,defaultTags:A,onTagsChange:H,onTagAdd:L,onTagRemove:O,minTagLength:_,maxTagLength:q,allowDuplicates:Y,separators:P,menuItems:B,onMenuItemSelect:$,onFocus:D,onBlur:N,validateTag:G,...K})=>{const{getColor:re,themeMode:oe}=s.useTheme(),ie=!!(r&&(w||u.length>0||i)),X=S&&u.length>=S,ae={border:"none",outline:"none",backgroundColor:"transparent",fontSize:s.Typography.fontSizes[h],color:b?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...p==null?void 0:p.input};return t.jsx(no,{error:!!l,helperText:typeof l=="string"?l:a,views:p,...K,children:t.jsxs(mo,{label:r,shadow:g,value:u.length>0||i?"has-content":"",size:h,shape:f,variant:y,error:!!l,showLabel:ie,isFocused:w,isHovered:v,isDisabled:b,isReadOnly:x,views:{...p,container:{...p==null?void 0:p.container,...p==null?void 0:p.inputContainer}},onClick:F,onMouseEnter:()=>W==null?void 0:W(!0),onMouseLeave:()=>W==null?void 0:W(!1),children:[c,t.jsxs(ot,{children:[r&&t.jsx(wo,{size:h,error:!!l,views:p,children:r}),t.jsxs(s.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:s.Typography.fontSizes[h],padding:"0",...p==null?void 0:p.tagsContainer,children:[u.map((pe,ue)=>t.jsx(lf,{tag:pe.value,onRemove:()=>E==null?void 0:E(ue),isRemovable:k,size:h,views:p,isDisabled:b,isReadOnly:x},pe.id)),!X&&t.jsx(s.Input,{id:e,name:o,type:"text",value:i,placeholder:u.length===0?n:"",disabled:b,readOnly:x,autoFocus:C,onChange:I,onKeyDown:j,onFocus:R,onBlur:z,autoComplete:"off",...ae}),X&&t.jsxs(s.Text,{fontSize:s.Typography.fontSizes[h],color:"color-gray-500",fontStyle:"italic",...p==null?void 0:p.placeholder,children:["Maximum ",S," tags reached"]})]})]}),d]})})},sf=e=>{const o=bi(e),{tags:r,...n}=e,{setTags:a,...l}=o;return t.jsx(ki,{...l,...n})},cf=sf;function df(e){const o=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[o,r,n]}const Ci=({value:e,defaultValue:o="",length:r=6,onChange:n,onChangeText:a,onComplete:l,onKeyDown:i,onKeyPress:u,onBlur:c,onFocus:d,isReadOnly:g,isDisabled:p,pattern:h,stepValues:f,pasteTransformer:y})=>{var B,$;const b=e!==void 0,x=b?e:o,[C,k]=m.useState(String(x??"").slice(0,r)||""),[w,v]=m.useState(!1),[S,I]=m.useState(!1),[j,R]=m.useState(null),[z,E]=m.useState(null),W=m.useRef(null),F=m.useRef(null),T=m.useRef({value:C,onChange:n||(()=>{}),isIOS:typeof window<"u"&&(($=(B=window==null?void 0:window.CSS)==null?void 0:B.supports)==null?void 0:$.call(B,"-webkit-touch-callout","none"))}),M=m.useRef({prev:[null,null,"none"]}),V=h?typeof h=="string"?new RegExp(h):h:null;m.useEffect(()=>{if(b&&e!==C){const D=String(e??"").slice(0,r)||"";k(D)}},[b,e,r,C]);const A=m.useCallback(D=>{let N=D;if(f&&f.length>0&&D){const G=parseInt(D,10);if(!isNaN(G)){let K=f[0],re=Math.abs(G-K);for(let oe=1;oe<f.length;oe++){const ie=Math.abs(G-f[oe]);ie<re&&(re=ie,K=f[oe])}N=K.toString()}}k(N),n&&n(N),a&&a(N),l&&N.length===r&&l(N)},[n,a,l,r,f,b]),H=m.useCallback(D=>{D&&W.current!==D&&Object.defineProperty(W,"current",{value:D,writable:!0})},[]),L=m.useCallback(D=>{var K,re,oe,ie;const N=typeof D=="string"?D:((K=D==null?void 0:D.currentTarget)==null?void 0:K.value)??((re=D==null?void 0:D.target)==null?void 0:re.value)??((oe=D==null?void 0:D.nativeEvent)==null?void 0:oe.text)??"",G=String(N).slice(0,r);if(G.length>0&&V&&!V.test(G)){(ie=D==null?void 0:D.preventDefault)==null||ie.call(D);return}A(G),W.current&&(W.current.value=G)},[r,V,A,W]),O=m.useCallback(()=>{const D=W.current;if(D&&typeof D.setSelectionRange=="function"){const N=typeof D.value=="string"?D.value.length:0,G=Math.min(N,r-1),K=N;D.setSelectionRange(G,K),R(G),E(K)}v(!0),d&&d()},[r,d]),_=m.useCallback(D=>{v(!1),c&&c(D)},[c]),q=m.useCallback(D=>{i&&i(D)},[]),Y=m.useCallback(D=>{u&&u(D)},[]),P=m.useCallback(D=>{const N=W.current;if(!D.clipboardData||!N)return;const G=D.clipboardData.getData("text/plain"),K=y?y(G):G;D.preventDefault();const re=N.selectionStart||0,oe=N.selectionEnd||0,ae=(re!==oe?C.slice(0,re)+K+C.slice(oe):C.slice(0,re)+K+C.slice(re)).slice(0,r);if(ae.length>0&&V&&!V.test(ae))return;N.value=ae,A(ae),k(ae);const pe=Math.min(ae.length,r-1),ue=ae.length;N.setSelectionRange(pe,ue),R(pe),E(ue)},[r,y,V,A,C,k]);return m.useEffect(()=>{const D=W.current,N=F.current;if(!D||!N||typeof document>"u")return;T.current.value!==D.value&&T.current.onChange&&T.current.onChange(D.value),M.current.prev=[D.selectionStart,D.selectionEnd,D.selectionDirection];function G(){if(document.activeElement!==D){R(null),E(null);return}const X=(D==null?void 0:D.selectionStart)??null,ae=(D==null?void 0:D.selectionEnd)??null,pe=(D==null?void 0:D.selectionDirection)??null,ue=(D==null?void 0:D.maxLength)??0,ke=(D==null?void 0:D.value)??"",ce=M.current.prev;let le=-1,de=-1,ee="none";if(ke.length!==0&&X!==null&&ae!==null){const U=X===ae,Q=X===ke.length&&ke.length<ue;if(U&&!Q){const ne=X;if(ne===0)le=0,de=1,ee="forward";else if(ne===ue)le=ne-1,de=ne,ee="backward";else if(ue>1&&ke.length>1){let se=0;if(ce[0]!==null&&ce[1]!==null){ee=ne<ce[1]?"backward":"forward";const ge=ce[0]===ce[1]&&ce[0]<ue;ee==="backward"&&!ge&&(se=-1)}le=se+ne,de=se+ne+1}}le!==-1&&de!==-1&&le!==de&&W.current&&W.current.setSelectionRange(le,de,ee)}const me=le!==-1?le:X,J=de!==-1?de:ae,te=ee!=="none"?ee:pe;R(me),E(J),M.current.prev=[me,J,te]}document.addEventListener("selectionchange",G,{capture:!0}),G(),document.activeElement===D&&v(!0);const K=N,re=()=>{var X;K&&typeof((X=K.style)==null?void 0:X.setProperty)=="function"&&K.style.setProperty("--root-height",`${D.clientHeight}px`)};re();const oe=typeof window<"u"?window.ResizeObserver:void 0,ie=typeof oe=="function"?new oe(re):null;return ie==null||ie.observe(D),()=>{document.removeEventListener("selectionchange",G,{capture:!0}),ie==null||ie.disconnect()}},[]),m.useEffect(()=>{if(typeof Event>"u")return;const D=df(()=>{var oe,ie,X;const N=W.current;N&&typeof N.dispatchEvent=="function"&&N.dispatchEvent(new Event("input"));const G=(oe=W.current)==null?void 0:oe.selectionStart,K=(ie=W.current)==null?void 0:ie.selectionEnd,re=(X=W.current)==null?void 0:X.selectionDirection;G!==null&&K!==null&&G!==void 0&&K!==void 0&&(R(G),E(K),M.current.prev=[G,K,re||"none"])});return()=>D.forEach(clearTimeout)},[C,w]),{value:C,setValue:A,isFocused:w,setIsFocused:v,isHovered:S,setIsHovered:I,inputRef:W,containerRef:F,mirrorSelectionStart:j,mirrorSelectionEnd:z,setMirrorSelectionStart:R,setMirrorSelectionEnd:E,setInputRef:H,handleChange:L,handleFocus:O,handleBlur:_,handleKeyDown:q,handleKeyPress:Y,handlePaste:P}},uf=m.createContext({slots:[],isFocused:!1,isHovering:!1}),pf=`
7
7
  @keyframes blink {
8
8
  0%, 100% { opacity: 1; }
9
9
  50% { opacity: 0; }
@@ -20,17 +20,61 @@
20
20
  border-radius: 4px !important;
21
21
  width: 100% !important;
22
22
  }
23
- `;function Io(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const Zl=({id:e,name:o,label:t,value:n="",length:a=6,onChange:l,onChangeText:s,onComplete:c,helperText:d,placeholder:u="",shadow:g,views:m={},size:h="md",shape:f="rounded",variant:y="outline",gap:k=8,type:b="text",error:C=!1,isFocused:j=!1,isHovered:S=!1,isDisabled:w=!1,isReadOnly:x=!1,isAutoFocus:T=!1,setValue:v,setIsFocused:M,setIsHovered:A,inputRef:P,containerRef:F,mirrorSelectionStart:V,mirrorSelectionEnd:z,setMirrorSelectionStart:I,setMirrorSelectionEnd:W,handlePaste:H,handleChange:R,handleFocus:D,handleBlur:$,handleKeyDown:_,handleKeyPress:B,secureTextEntry:N,stepValues:Y,setInputRef:ee,onBlur:L=()=>{},onClick:E=()=>{},onFocus:O=()=>{},onKeyPress:K,pattern:U,pasteTransformer:J,...Z})=>{i.useTheme();const te=p.useId(),G=e??o??te,oe=!!t,le=p.useMemo(()=>({slots:Array.from({length:a}).map((ae,re)=>{const ne=j&&V!==null&&z!==null&&(V===z&&re===V||re>=V&&re<z),ie=n[re]!==void 0?n[re]:null,ge=n[0]!==void 0?null:(u==null?void 0:u[re])??null;return{char:ie,placeholderChar:ge,isActive:ne,hasFakeCaret:ne&&ie===null}}),isFocused:j,isHovering:!w&&S}),[j,S,w,a,z,V,u,n]);p.useEffect(()=>{T&&P.current&&P.current.focus()},[T,P]),p.useEffect(()=>{if(!document.getElementById("input-otp-style")){const ae=document.createElement("style");if(ae.id="input-otp-style",document.head.appendChild(ae),ae.sheet){const re="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Io(ae.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),Io(ae.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Io(ae.sheet,`[data-input-otp]:autofill { ${re} }`),Io(ae.sheet,`[data-input-otp]:-webkit-autofill { ${re} }`),Io(ae.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Io(ae.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const de=()=>r.jsx(i.Horizontal,{gap:k,width:"100%",justifyContent:"center",minHeight:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...m.container,children:le.slots.map((ae,re)=>r.jsxs(io,{size:h,error:C,shape:f,views:m,variant:y,value:ae.char||"",color:"theme-primary",isHovered:S,isDisabled:w,isReadOnly:x,isFocused:ae.isActive,showLabel:!1,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...m.container,children:[ae.char?r.jsx(i.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",fontWeight:"medium",...m.text,children:b==="password"?"•":ae.char}):ae.placeholderChar?r.jsx(i.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...m.text,children:ae.placeholderChar}):null,ae.hasFakeCaret&&r.jsx(i.View,{position:"absolute",width:"2px",height:"60%",backgroundColor:"theme-primary",animation:"blink 1s step-start infinite",style:{animationName:"blink",animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"step-start"}})]},`${e||o}-${re}`))}),Te={position:"absolute",inset:0,width:"100%",height:"100%",display:"flex",textAlign:"center",opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"};return r.jsxs(r.Fragment,{children:[r.jsx("noscript",{children:r.jsx("style",{children:Vh})}),r.jsxs(Je,{helperText:d,error:C,views:m,children:[oe&&r.jsx(yo,{htmlFor:G,color:"theme-primary",error:C,...m.label,children:t}),r.jsxs(i.View,{ref:F,"data-input-otp-container":!0,position:"relative",cursor:w?"default":"text",userSelect:"none",pointerEvents:"none",children:[r.jsx(Hh.Provider,{value:le,children:de()}),r.jsx(i.View,{position:"absolute",inset:0,pointerEvents:"none",children:r.jsx(i.Input,{ref:ae=>ee(ae),"data-input-otp":!0,"data-input-otp-placeholder-shown":n.length===0||void 0,"data-input-otp-mss":V,"data-input-otp-mse":z,id:G,name:o,type:b==="password"?"password":"text",inputMode:b!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:a,readOnly:x,disabled:w,placeholder:u,value:n,onChange:R,onKeyDown:_,onPaste:H,onFocus:D,onBlur:$,onClick:E,onMouseOver:()=>A(!0),onMouseLeave:()=>A(!1),autoComplete:"one-time-code","aria-label":oe?void 0:`OTP input with ${a} digits`,style:Te,...Z,...m.input})})]})]})]})},Ah=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},Ph=e=>{const{value:o}=e,{value:t,setValue:n,isFocused:a,setIsFocused:l,isHovered:s,setIsHovered:c,inputRef:d,containerRef:u,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:k,handleFocus:b,handleBlur:C,handleKeyDown:j,handlePaste:S,handleKeyPress:w}=Ql(e),T=Ah(o!==void 0?o:t);return r.jsx(Zl,{...e,value:T,setValue:n,isFocused:a,setIsFocused:l,isHovered:s,setIsHovered:c,inputRef:d,containerRef:u,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:k,handleFocus:b,handleBlur:C,handleKeyDown:j,handleKeyPress:w,handlePaste:S,stepValues:e.stepValues})},ei=Ph,oi=p.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),Eh=()=>p.useContext(oi),Dh=({children:e,autoFocus:o=!1,initFocus:t,onChange:n=()=>{},...a})=>{const l=De.useFormikContext();p.useEffect(()=>{n(l.values)},[l.values]);const s=p.useRef({}),c=p.useRef([]),d=(f,y)=>{s.current[f]=y,y&&!c.current.includes(f)&&c.current.push(f)},u=f=>{var y,k;if(o){const C=c.current.indexOf(f)+1;C<c.current.length?(y=s.current[c.current[C]])==null||y.focus():(k=l.submitForm)==null||k.call(l)}},g={active:o,focusNextInput:u,setInputRef:d,handleSubmitEditing:u,getReturnKeyType:f=>c.current.indexOf(f)===c.current.length-1?"done":"next"};p.useEffect(()=>{var f,y;o&&(t&&s.current[t]?(f=s.current[t])==null||f.focus():c.current[0]&&((y=s.current[c.current[0]])==null||y.focus()))},[o,t]);const h=typeof document<"u"&&typeof document.createElement=="function"?{onSubmit:l.handleSubmit,onReset:l.handleReset}:{};return r.jsx(oi.Provider,{value:g,children:r.jsx(i.Form,{...a,...h,children:e})})},$h=e=>{switch(e){case"email":return{autoCorrect:"off",inputMode:"email",autoCapitalize:"none"};case"password":return{autoCorrect:"off",secureTextEntry:!0,autoCapitalize:"none"};case"digits":return{inputMode:"tel"};case"numeric":return{inputMode:"numeric"};case"name":return{autoCorrect:"off"};default:return{}}},ke=({name:e,type:o,...t},n={})=>{const a=Eh(),{touched:l,errors:s,submitCount:c,values:d,setFieldTouched:u,setFieldValue:g}=De.useFormikContext(),m=x=>{var T;g(e,x),(T=t.onChangeText)==null||T.call(t,x)},h=x=>{var T;g(e,x),(T=t.onChange)==null||T.call(t,x)},f=()=>{u(e,!0)},y=x=>{x.key==="Enter"&&(x.preventDefault(),a.focusNextInput(e))},k=["text","password","email","digits"].includes(o),b=De.getIn(l,e)||c>0?De.getIn(s,e):void 0,C=De.getIn(d,e),j=typeof document<"u"&&typeof document.createElement=="function",S=!!n.focusable&&a.active,w=S?j?{onKeyPress:y}:{returnKeyType:a.getReturnKeyType(e),onSubmitEditing:()=>a.handleSubmitEditing(e),blurOnSubmit:!1}:{};return{...$h(o),...t,value:C,error:b,onBlur:f,...k?{onChangeText:m}:{onChange:h},...w,...S?{inputRef:x=>a.setInputRef(e,x)}:{}}},Lh=e=>{let{value:o,...t}=ke(e);t.isChecked=o;const n=Vl(e);return r.jsx(Al,{...n,...t})},_h=Lh,Bh=e=>{let{value:o,...t}=ke(e);t.isChecked=o===e.value;const n=Pl(e);return r.jsx(El,{...n,...t})},Oh=Bh,ri=e=>{const{value:o,onChange:t,onSubmit:n,autoFocus:a=!0,loading:l=!1,disabled:s=!1,isAgentRunning:c=!1,onStopAgent:d,sandboxId:u,onUploadProgress:g,onUploadSuccess:m,onUploadError:h,onFileUpload:f}=e,y=o!==void 0&&t!==void 0,[k,b]=p.useState(""),C=y?o:k,[j,S]=p.useState([]),[w,x]=p.useState([]),[T,v]=p.useState(!1),[M,A]=p.useState(0),[P,F]=p.useState([]),[V,z]=p.useState(!1),I=p.useRef(null),[W,H]=p.useState(!1),[R,D]=p.useState("gpt-4"),[$]=p.useState([{id:"gpt-3.5-turbo",name:"GPT-3.5"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4-thinking",name:"GPT-4 (Thinking)",isThinking:!0},{id:"claude-3-5-sonnet",name:"Claude 3.5 Sonnet"}]),_=p.useRef(null),B=p.useRef(null),N=p.useRef(null),[Y,ee]=p.useState(e.showGuideTip||!1);p.useEffect(()=>{a&&_.current&&_.current.focus()},[a]),p.useEffect(()=>()=>{j.forEach(re=>{})},[j]);const L=re=>{y&&t?t(re):b(re)},E=re=>{const ne=N.current;if(ne&&typeof Event<"u"){ne.value=re,ne.dispatchEvent(new Event("input",{bubbles:!0}));return}L(re)},O=re=>{if(re.preventDefault(),!C.trim()&&j.length===0||l||s&&!c)return;if(c&&d){d();return}let ne=C;if(j.length>0){const X=j.map(Q=>`[Uploaded File: ${URL.createObjectURL(Q)}}]`).join(`
24
- `);ne=ne?`${ne}
23
+ `;function Ho(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const Si=({id:e,name:o,label:r,value:n="",length:a=6,onChange:l,onChangeText:i,onComplete:u,helperText:c,placeholder:d="",shadow:g,views:p={},size:h="md",shape:f="rounded",variant:y="outline",gap:b=8,type:x="text",error:C=!1,isFocused:k=!1,isHovered:w=!1,isDisabled:v=!1,isReadOnly:S=!1,isAutoFocus:I=!1,setValue:j,setIsFocused:R,setIsHovered:z,inputRef:E,containerRef:W,mirrorSelectionStart:F,mirrorSelectionEnd:T,setMirrorSelectionStart:M,setMirrorSelectionEnd:V,handlePaste:A,handleChange:H,handleFocus:L,handleBlur:O,handleKeyDown:_,handleKeyPress:q,secureTextEntry:Y,stepValues:P,setInputRef:B,onBlur:$=()=>{},onClick:D=()=>{},onFocus:N=()=>{},onKeyPress:G,pattern:K,pasteTransformer:re,...oe})=>{s.useTheme();const ie=m.useId(),X=e??o??ie,ae=!!r,pe=m.useMemo(()=>({slots:Array.from({length:a}).map((ce,le)=>{const de=k&&F!==null&&T!==null&&(F===T&&le===F||le>=F&&le<T),ee=n[le]!==void 0?n[le]:null,me=n[0]!==void 0?null:(d==null?void 0:d[le])??null;return{char:ee,placeholderChar:me,isActive:de,hasFakeCaret:de&&ee===null}}),isFocused:k,isHovering:!v&&w}),[k,w,v,a,T,F,d,n]);m.useEffect(()=>{I&&E.current&&E.current.focus()},[I,E]),m.useEffect(()=>{if(!document.getElementById("input-otp-style")){const ce=document.createElement("style");if(ce.id="input-otp-style",document.head.appendChild(ce),ce.sheet){const le="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Ho(ce.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),Ho(ce.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Ho(ce.sheet,`[data-input-otp]:autofill { ${le} }`),Ho(ce.sheet,`[data-input-otp]:-webkit-autofill { ${le} }`),Ho(ce.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Ho(ce.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const ue=()=>t.jsx(s.Horizontal,{gap:b,width:"100%",justifyContent:"center",minHeight:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...p.container,children:pe.slots.map((ce,le)=>t.jsxs(mo,{size:h,error:C,shape:f,views:p,variant:y,value:ce.char||"",color:"theme-primary",isHovered:w,isDisabled:v,isReadOnly:S,isFocused:ce.isActive,showLabel:!1,onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...p.container,children:[ce.char?t.jsx(s.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",fontWeight:"medium",...p.text,children:x==="password"?"•":ce.char}):ce.placeholderChar?t.jsx(s.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...p.text,children:ce.placeholderChar}):null,ce.hasFakeCaret&&t.jsx(s.View,{position:"absolute",width:"2px",height:"60%",backgroundColor:"theme-primary",animation:"blink 1s step-start infinite",style:{animationName:"blink",animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"step-start"}})]},`${e||o}-${le}`))}),ke={position:"absolute",inset:0,width:"100%",height:"100%",display:"flex",textAlign:"center",opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"};return t.jsxs(t.Fragment,{children:[t.jsx("noscript",{children:t.jsx("style",{children:pf})}),t.jsxs(no,{helperText:c,error:C,views:p,children:[ae&&t.jsx(wo,{htmlFor:X,color:"theme-primary",error:C,...p.label,children:r}),t.jsxs(s.View,{ref:W,"data-input-otp-container":!0,position:"relative",cursor:v?"default":"text",userSelect:"none",pointerEvents:"none",children:[t.jsx(uf.Provider,{value:pe,children:ue()}),t.jsx(s.View,{position:"absolute",inset:0,pointerEvents:"none",children:t.jsx(s.Input,{ref:ce=>B(ce),"data-input-otp":!0,"data-input-otp-placeholder-shown":n.length===0||void 0,"data-input-otp-mss":F,"data-input-otp-mse":T,id:X,name:o,type:x==="password"?"password":"text",inputMode:x!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:a,readOnly:S,disabled:v,placeholder:d,value:n,onChange:H,onKeyDown:_,onPaste:A,onFocus:L,onBlur:O,onClick:D,onMouseOver:()=>z(!0),onMouseLeave:()=>z(!1),autoComplete:"one-time-code","aria-label":ae?void 0:`OTP input with ${a} digits`,style:ke,...oe,...p.input})})]})]})]})},mf=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},gf=e=>{const{value:o}=e,{value:r,setValue:n,isFocused:a,setIsFocused:l,isHovered:i,setIsHovered:u,inputRef:c,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:p,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:b,handleFocus:x,handleBlur:C,handleKeyDown:k,handlePaste:w,handleKeyPress:v}=Ci(e),I=mf(o!==void 0?o:r);return t.jsx(Si,{...e,value:I,setValue:n,isFocused:a,setIsFocused:l,isHovered:i,setIsHovered:u,inputRef:c,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:p,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:b,handleFocus:x,handleBlur:C,handleKeyDown:k,handleKeyPress:v,handlePaste:w,stepValues:e.stepValues})},wi=gf,ji=m.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),hf=()=>m.useContext(ji),ff=({children:e,autoFocus:o=!1,initFocus:r,onChange:n=()=>{},...a})=>{const l=qe.useFormikContext();m.useEffect(()=>{n(l.values)},[l.values]);const i=m.useRef({}),u=m.useRef([]),c=(f,y)=>{i.current[f]=y,y&&!u.current.includes(f)&&u.current.push(f)},d=f=>{var y,b;if(o){const C=u.current.indexOf(f)+1;C<u.current.length?(y=i.current[u.current[C]])==null||y.focus():(b=l.submitForm)==null||b.call(l)}},g={active:o,focusNextInput:d,setInputRef:c,handleSubmitEditing:d,getReturnKeyType:f=>u.current.indexOf(f)===u.current.length-1?"done":"next"};m.useEffect(()=>{var f,y;o&&(r&&i.current[r]?(f=i.current[r])==null||f.focus():u.current[0]&&((y=i.current[u.current[0]])==null||y.focus()))},[o,r]);const h=typeof document<"u"&&typeof document.createElement=="function"?{onSubmit:l.handleSubmit,onReset:l.handleReset}:{};return t.jsx(ji.Provider,{value:g,children:t.jsx(s.Form,{...a,...h,children:e})})},yf=e=>{switch(e){case"email":return{autoCorrect:"off",inputMode:"email",autoCapitalize:"none"};case"password":return{autoCorrect:"off",secureTextEntry:!0,autoCapitalize:"none"};case"digits":return{inputMode:"tel"};case"numeric":return{inputMode:"numeric"};case"name":return{autoCorrect:"off"};default:return{}}},Fe=({name:e,type:o,...r},n={})=>{const a=hf(),{touched:l,errors:i,submitCount:u,values:c,setFieldTouched:d,setFieldValue:g}=qe.useFormikContext(),p=S=>{var I;g(e,S),(I=r.onChangeText)==null||I.call(r,S)},h=S=>{var I;g(e,S),(I=r.onChange)==null||I.call(r,S)},f=()=>{d(e,!0)},y=S=>{S.key==="Enter"&&(S.preventDefault(),a.focusNextInput(e))},b=["text","password","email","digits"].includes(o),x=qe.getIn(l,e)||u>0?qe.getIn(i,e):void 0,C=qe.getIn(c,e),k=typeof document<"u"&&typeof document.createElement=="function",w=!!n.focusable&&a.active,v=w?k?{onKeyPress:y}:{returnKeyType:a.getReturnKeyType(e),onSubmitEditing:()=>a.handleSubmitEditing(e),blurOnSubmit:!1}:{};return{...yf(o),...r,value:C,error:x,onBlur:f,...b?{onChangeText:p}:{onChange:h},...v,...w?{inputRef:S=>a.setInputRef(e,S)}:{}}},xf=e=>{let{value:o,...r}=Fe(e);r.isChecked=o;const n=ri(e);return t.jsx(ni,{...n,...r})},bf=xf,kf=e=>{let{value:o,...r}=Fe(e);r.isChecked=o===e.value;const n=ai(e);return t.jsx(li,{...n,...r})},Cf=kf,vi=e=>{const{value:o,onChange:r,onSubmit:n,autoFocus:a=!0,loading:l=!1,disabled:i=!1,isAgentRunning:u=!1,onStopAgent:c,sandboxId:d,onUploadProgress:g,onUploadSuccess:p,onUploadError:h,onFileUpload:f}=e,y=o!==void 0&&r!==void 0,[b,x]=m.useState(""),C=y?o:b,[k,w]=m.useState([]),[v,S]=m.useState([]),[I,j]=m.useState(!1),[R,z]=m.useState(0),[E,W]=m.useState([]),[F,T]=m.useState(!1),M=m.useRef(null),[V,A]=m.useState(!1),[H,L]=m.useState("gpt-4"),[O]=m.useState([{id:"gpt-3.5-turbo",name:"GPT-3.5"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4-thinking",name:"GPT-4 (Thinking)",isThinking:!0},{id:"claude-3-5-sonnet",name:"Claude 3.5 Sonnet"}]),_=m.useRef(null),q=m.useRef(null),Y=m.useRef(null),[P,B]=m.useState(e.showGuideTip||!1);m.useEffect(()=>{a&&_.current&&_.current.focus()},[a]),m.useEffect(()=>()=>{k.forEach(le=>{})},[k]);const $=le=>{y&&r?r(le):x(le)},D=le=>{const de=Y.current;if(de&&typeof Event<"u"){de.value=le,de.dispatchEvent(new Event("input",{bubbles:!0}));return}$(le)},N=le=>{if(le.preventDefault(),!C.trim()&&k.length===0||l||i&&!u)return;if(u&&c){c();return}let de=C;if(k.length>0){const J=k.map(te=>`[Uploaded File: ${URL.createObjectURL(te)}}]`).join(`
24
+ `);de=de?`${de}
25
25
 
26
- ${X}`:X}let ie=R,ge=!1;R.endsWith("-thinking")&&(ie=R.replace(/-thinking$/,""),ge=!0),n==null||n(ne,{model_name:ie,enable_thinking:ge}),y||b(""),S([]),x([])},K=re=>{S(ne=>ne.filter((ie,ge)=>ge!==re)),!u&&w.length>re&&x(ne=>ne.filter((ie,ge)=>ge!==re))},U=re=>{re.preventDefault(),re.stopPropagation(),H(!0)},J=re=>{re.preventDefault(),re.stopPropagation(),H(!1)},Z=p.useCallback(re=>{!re||re.length===0||(x(ne=>[...ne,...re]),S(ne=>[...ne,...re]),F(ne=>[...ne,...re]),v(!0))},[x,S]),te=p.useCallback(()=>{if(P.length>0&&!V&&f){z(!0);const re=P[0];I.current=re,A(0),g==null||g(0);try{f(re),F(ne=>ne.slice(1)),z(!1),I.current=null,A(100),g==null||g(100),m==null||m({file:re})}catch(ne){F(ie=>ie.slice(1)),z(!1),I.current=null,A(0),v(ie=>P.length-1>0||!1),h==null||h(ne)}}else P.length===0&&T&&(v(!1),A(0))},[P,V,f,T,h,g,m]);p.useEffect(()=>{te()},[P,V,te]);const G="active",oe=re=>!0,le=()=>{ee(!1),e.onGuideClose&&e.onGuideClose()},de=re=>{y&&t?t(re.text):b(re.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(re),_.current&&_.current.focus()},Te=p.useCallback(()=>w,[w]),ae=p.useCallback(()=>x([]),[]);return{onSubmit:n,getPendingFiles:Te,clearPendingFiles:ae,value:C,handleChange:L,setValue:E,handleSubmit:O,editableRef:_,fileInputRef:B,hiddenInputRef:N,isUploading:T,uploadProgress:M,isDraggingOver:W,uploadedFiles:j,pendingFiles:w,removeUploadedFile:K,setPendingFiles:x,setUploadedFiles:S,setIsUploading:v,startUpload:Z,selectedModel:R,handleModelChange:D,modelOptions:$,subscriptionStatus:G,canAccessModel:oe,handleDragOver:U,handleDragLeave:J,isGuideTipShown:Y,hideGuideTip:le,handlePromptExampleSelect:de}},Nh={attachmentRemove:{position:"absolute",top:"2px",right:"2px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"color-black-900",color:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",zIndex:1}},ta={container:{width:"100%",maxWidth:"100%",borderRadius:"12px",backgroundColor:"color-white",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},content:{width:"100%",padding:"12px",borderRadius:"12px",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},qh={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},Uh={xs:{fontSize:"10px",padding:"4px 8px"},sm:{fontSize:"12px",padding:"6px 10px"},md:{fontSize:"14px",padding:"8px 12px"},lg:{fontSize:"16px",padding:"10px 14px"},xl:{fontSize:"20px",padding:"12px 16px"}},Gh={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"},none:{backgroundColor:"transparent",border:"none"}},na=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,Yh=({openDelay:e=200,closeDelay:o=300}={})=>{const[t,n]=p.useState(!1),a=p.useRef(null),l=p.useRef(null),s=p.useRef(null),c=p.useRef(null),d=p.useMemo(()=>na("hovercard-content"),[]),u=p.useMemo(()=>na("hovercard-trigger"),[]),g=p.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),l.current&&(clearTimeout(l.current),l.current=null)},[]),m=p.useCallback(()=>{g(),t||(a.current=setTimeout(()=>{n(!0)},e))},[t,e,g]),h=p.useCallback(()=>{g(),t&&(l.current=setTimeout(()=>{n(!1)},o))},[t,o,g]),f=p.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]);return p.useEffect(()=>()=>g(),[g]),{isOpen:t,openCard:m,closeCard:h,cancelCloseTimer:f,triggerRef:s,contentRef:c,contentId:d,triggerId:u}},ti=p.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),Kh=({children:e,value:o})=>r.jsx(ti.Provider,{value:o,children:e}),ni=()=>{const e=p.useContext(ti);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},Xh=({children:e,views:o,asChild:t=!1,...n})=>{const{openCard:a,closeCard:l,triggerRef:s,contentId:c,triggerId:d}=ni(),f={ref:s,onMouseEnter:()=>a(),onMouseLeave:()=>l(),onFocus:()=>a(),onBlur:()=>l(),id:d,"aria-describedby":c,...o==null?void 0:o.container,...n};if(t&&p.isValidElement(e)){const y=p.Children.only(e);return p.cloneElement(y,{...f,...y.props})}return r.jsx(i.View,{position:"relative",display:"inline-block",...f,children:e})},Jh=({children:e,views:o,side:t="bottom",align:n="center",sideOffset:a=8,style:l,backgroundColor:s="color-white",borderRadius:c="4px",boxShadow:d="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:u="12px",minWidth:g="50px",maxWidth:m="300px",...h})=>{const{isOpen:f,cancelCloseTimer:y,closeCard:k,contentRef:b,triggerRef:C,contentId:j,triggerId:S}=ni(),{ref:w,relation:x}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});p.useEffect(()=>{C!=null&&C.current&&(w==null?void 0:w.current)!==C.current&&w&&(w.current=C.current)},[C,w,f]);const T=()=>y(),v=()=>k();if(!f)return null;const M=()=>{if(!x||!(C!=null&&C.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const F=C.current.getBoundingClientRect();let V=t;t==="bottom"&&x.space.vertical==="top"?V="top":t==="top"&&x.space.vertical==="bottom"?V="bottom":t==="right"&&x.space.horizontal==="left"?V="left":t==="left"&&x.space.horizontal==="right"&&(V="right");let z=0,I=0;switch(V){case"bottom":z=F.left+F.width/2,I=F.bottom+a;break;case"top":z=F.left+F.width/2,I=F.top-a;break;case"right":z=F.right+a,I=F.top+F.height/2;break;case"left":z=F.left-a,I=F.top+F.height/2;break}return{position:"fixed",left:z,top:I,zIndex:1e3,transform:A(V)}},A=F=>{switch(F){case"bottom":return"translate(-50%, 0)";case"top":return"translate(-50%, -100%)";case"right":return"translate(0, -50%)";case"left":return"translate(-100%, -50%)";default:return"translate(-50%, 0)"}},P=M();return r.jsx(i.View,{ref:b,id:j,role:"tooltip","aria-labelledby":S,onMouseEnter:T,onMouseLeave:v,backgroundColor:s,borderRadius:c,boxShadow:d,padding:u,minWidth:g,maxWidth:m,style:{...P,...l},...o==null?void 0:o.container,...h,children:e})},Qh=({children:e,views:o,openDelay:t,closeDelay:n,...a})=>{const l=Yh({openDelay:t,closeDelay:n});return r.jsx(Kh,{value:l,children:r.jsx(i.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})},Re=Qh;Re.Trigger=Xh;Re.Content=Jh;const Zh=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:s={}})=>{if(e.length===0)return null;const c=p.useCallback(u=>u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} KB`:`${(u/(1024*1024)).toFixed(1)} MB`,[]),d=p.useCallback(u=>u.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:u.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:u.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...s==null?void 0:s.container,children:e.map((u,g)=>{const m=(u==null?void 0:u.path)||(u==null?void 0:u.url)||(l?URL.createObjectURL(u):""),h=u.type.startsWith("image/"),f=u.type.startsWith("video/"),y=u.type.startsWith("audio/"),k=d(u);return l?r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:l&&r.jsxs(Re,{children:[r.jsxs(Re.Trigger,{children:[h&&r.jsx(i.Image,{src:m,alt:u.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),f&&r.jsx(i.View,{as:"video",src:m,alt:u.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx($o,{widthHeight:24,color:"color-black"})}),!h&&!f&&!y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(ho,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...Nh.attachmentRemove,onClick:b=>{b.stopPropagation(),t(g)},"aria-label":`Remove ${u.name}`,children:"×"})]}),r.jsxs(Re.Content,{children:[h&&r.jsx(i.Image,{src:m,alt:u.name,maxWidth:"100%"}),f&&r.jsx(i.View,{as:"video",src:m,controls:!0,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"audio",src:m,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...s==null?void 0:s.name,children:[u.name," (",c(u.size),")"]})]})]})},g):r.jsxs(i.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:k.backgroundColor,color:k.color,children:y?r.jsx($o,{widthHeight:12,color:"currentColor"}):r.jsx(ho,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...s==null?void 0:s.name,children:[u.name," · ",c(u.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(g),"aria-label":`Remove ${u.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},g)})})},aa=typeof window<"u"?p.useLayoutEffect:p.useEffect,ai=p.forwardRef(({value:e,onChange:o,placeholder:t="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:l=[],onSuggestionSelect:s,showSuggestions:c=!1,mentionData:d=[],mentionTrigger:u="@",onMentionSelect:g,onKeyDown:m,maxHeight:h="200px",minHeight:f="40px",name:y,id:k,hiddenInput:b=!0,hiddenInputRef:C,views:j={}},S)=>{var ie,ge;const w=p.useRef(e),[x,T]=p.useState(-1),[v,M]=p.useState(!e),A=p.useRef(null),[P,F]=p.useState(!1),[V,z]=p.useState(!1),[I,W]=p.useState(""),[H,R]=p.useState(-1),[D,$]=p.useState(-1),[_,B]=p.useState([]),{ref:N,relation:Y}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[ee,L]=p.useState({x:0,y:0}),[E,O]=p.useState({x:0,y:0}),K=p.useRef(null),U=p.useCallback(X=>{K.current=X,typeof C=="function"?C(X):C&&(C.current=X)},[C]),J=p.useCallback(X=>{K.current&&K.current.value!==X&&(K.current.value=X)},[]);aa(()=>{const X=S;X!=null&&X.current&&e!==w.current&&(X.current.textContent=e,w.current=e,M(!e)),J(e)},[e,S,J]);const Z=p.useCallback(X=>{if(X===w.current)return;const Q=S;Q!=null&&Q.current&&Q.current.textContent!==X&&(Q.current.textContent=X),w.current=X,M(!X),J(X),o(X)},[o,S,J]);aa(()=>{const X=K.current;if(!X)return;const Q=()=>Z(X.value);return X.addEventListener("input",Q),X.addEventListener("change",Q),()=>{X.removeEventListener("input",Q),X.removeEventListener("change",Q)}},[Z,b]),p.useEffect(()=>{a&&S&&typeof S=="object"&&S.current&&S.current.focus()},[a,S]);const te=()=>{const X=window.getSelection();if(!X||X.rangeCount===0)return-1;const Q=X.getRangeAt(0),ye=Q.cloneRange();return ye.selectNodeContents(S&&typeof S=="object"&&S.current?S.current:document.body),ye.setEnd(Q.endContainer,Q.endOffset),ye.toString().length},G=p.useCallback((X,Q)=>{const ye=X.substring(0,Q),ve=ye.lastIndexOf(u);if(ve!==-1){const Ce=ye.substring(ve+1);if(!Ce.includes(" ")){const Qe=Ce.toLowerCase(),Ze=d.filter(qe=>qe.name.toLowerCase().includes(Qe));W(Qe),R(ve),B(Ze),z(Ze.length>0),$(0);const co=oe();L(co);return}}z(!1),W(""),R(-1),$(-1)},[d,u]);p.useEffect(()=>{A.current&&N&&(N.current=A.current)},[A,N]);const oe=p.useCallback((X=200)=>{if(!A.current)return{x:0,y:0};const Q=A.current.getBoundingClientRect();if(Y){const Ne=Y.space.vertical==="top";return{x:Q.left,y:Ne?Q.top-X-8:Q.bottom+8}}const ye=window.innerHeight,ve={top:Q.top,bottom:ye-Q.bottom},Ce=ve.bottom<X+8&&ve.top>ve.bottom;return{x:Q.left,y:Ce?Q.top-X-8:Q.bottom+8}},[Y]),le=p.useCallback(()=>{F(!0);const X=oe();O(X)},[oe]),de=p.useCallback(()=>{setTimeout(()=>{F(!1),T(-1)},150)},[]),Te=X=>{const Q=X.currentTarget.textContent||"";if(Q!==w.current){o(Q),w.current=Q,J(Q),M(!Q);const ye=te();G(Q,ye)}},ae=p.useCallback(X=>{if(S&&typeof S=="object"&&S.current){const Q=S.current.textContent||"",ye=Q.substring(0,H),ve=Q.substring(H+u.length+I.length),Ce=ye+u+X.name+" "+ve;o(Ce),w.current=Ce,J(Ce),S.current.textContent=Ce;const Ne=ye.length+u.length+X.name.length+1;setTimeout(()=>{var Qe;if(S.current){const Ze=document.createRange(),co=window.getSelection(),qe=S.current.firstChild;qe&&co&&(Ze.setStart(qe,Math.min(Ne,((Qe=qe.textContent)==null?void 0:Qe.length)||0)),Ze.collapse(!0),co.removeAllRanges(),co.addRange(Ze))}},0)}z(!1),W(""),R(-1),$(-1),g&&g(X)},[H,u,I,o,g,S,J]),re=p.useCallback(X=>{s&&s(X),T(-1)},[s]),ne=X=>{if(!(m&&(m(X),X.defaultPrevented))){if(V&&_.length>0){if(X.key==="ArrowDown"){X.preventDefault(),$(Q=>Q<_.length-1?Q+1:0);return}if(X.key==="ArrowUp"){X.preventDefault(),$(Q=>Q>0?Q-1:_.length-1);return}if((X.key==="Tab"||X.key==="Enter")&&D>=0){X.preventDefault(),ae(_[D]);return}if(X.key==="Escape"){z(!1),$(-1);return}}if(c&&l.length>0){if(X.key==="ArrowDown"){X.preventDefault(),T(Q=>Q<l.length-1?Q+1:0);return}if(X.key==="ArrowUp"){X.preventDefault(),T(Q=>Q>0?Q-1:l.length-1);return}if(X.key==="Tab"&&x>=0){X.preventDefault(),re(l[x]);return}if(X.key==="Escape"){T(-1);return}}}};return r.jsxs(i.View,{ref:A,width:"100%",position:"relative",...j==null?void 0:j.container,children:[r.jsxs(i.View,{width:"100%",minHeight:f,maxHeight:h,overflowY:"auto",position:"relative",children:[v&&r.jsx(i.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...j==null?void 0:j.placeholder,children:t}),r.jsx(i.View,{as:"div",ref:S,contentEditable:!n,suppressContentEditableWarning:!0,onInput:Te,onKeyDown:ne,onFocus:le,onBlur:de,role:"textbox","aria-multiline":"true","aria-placeholder":t,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...j==null?void 0:j.input})]}),b&&r.jsx(i.View,{as:"textarea",ref:U,id:k,name:y,defaultValue:e,disabled:n,tabIndex:-1,"aria-hidden":"true","data-editable-input-mirror":"true",opacity:0,width:1,height:1,padding:0,border:"none",resize:"none",overflow:"hidden",position:"absolute",bottom:0,left:0,pointerEvents:"none",...j==null?void 0:j.hiddenInput}),V&&_.length>0&&r.jsx(i.View,{position:"fixed",left:ee.x,top:ee.y,width:((ie=A.current)==null?void 0:ie.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-blue-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9999,maxHeight:"200px",overflowY:"auto",...j==null?void 0:j.mentionContainer,children:r.jsxs(i.Vertical,{gap:0,children:[_.map((X,Q)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:Q===D?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>ae(X),onMouseEnter:()=>$(Q),_hover:{backgroundColor:"color-blue-50"},...j==null?void 0:j.mentionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[u,X.name]}),X.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:X.description})]})},X.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",u,")",Y&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",Y.space.vertical,"-",Y.space.horizontal]})]})]})}),c&&l.length>0&&!V&&P&&!e&&r.jsx(i.View,{position:"fixed",left:E.x,top:E.y,width:((ge=A.current)==null?void 0:ge.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-green-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9998,maxHeight:"200px",overflowY:"auto",...j==null?void 0:j.suggestionsContainer,children:r.jsxs(i.Vertical,{gap:0,children:[l.map((X,Q)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:Q===x?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>re(X),onMouseEnter:()=>T(Q),_hover:{backgroundColor:"color-blue-50"},...j==null?void 0:j.suggestionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:X.text}),X.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:X.description})]})},X.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",Y&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",Y.space.vertical,"-",Y.space.horizontal]})]})]})})]})});ai.displayName="EditableInput";const ef=({examples:e,onSelect:o,views:t={}})=>{const{getColor:n}=i.useTheme();return!e||e.length===0?null:r.jsx(i.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...t==null?void 0:t.container,children:e.map(a=>r.jsx(i.View,{as:"button",type:"button",padding:"8px 12px",borderRadius:"9999px",backgroundColor:"color-white",border:"1px solid #E2E8F0",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",onClick:()=>o(a),_hover:{backgroundColor:"#F8FAFC",borderColor:"#CBD5E1"},...t==null?void 0:t.item,children:r.jsx(i.Text,{fontSize:"14px",color:"color-gray-700",...t==null?void 0:t.text,children:a.text})},a.id))})},of=({onRecordingComplete:e,onRecordingStart:o,views:t={}})=>{const{recording:n,paused:a,audioBlob:l,analyserNode:s,startRecording:c,stopRecording:d}=al();p.useEffect(()=>{if(l){const g=new File([l],`recording-${Date.now()}.webm`,{type:l.type||"audio/webm;codecs=opus"});e(g)}},[l]);const u=p.useCallback(()=>{c(),o==null||o()},[]);return r.jsxs(i.Horizontal,{alignItems:"center",gap:4,children:[r.jsx(i.View,{minWidth:90,children:n&&s&&r.jsx(nn,{analyserNode:s,isPaused:a})}),r.jsx(i.View,{as:"button",type:"button",onClick:n?d:u,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n?"theme-error":"color-gray-100",color:n?"color-white":"color-gray-600",borderRadius:"50%",border:"none",cursor:"pointer",_hover:{backgroundColor:n?"color-red-600":"color-gray-200"},...t.button,children:n?r.jsx(Gr,{widthHeight:16,color:"currentColor",filled:!1}):r.jsx(Xt,{widthHeight:16,color:"currentColor",filled:!1})})]})},li=p.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:t=!1,disabled:n=!1,isDisabled:a,rightElement:l,onKeyDown:s,isAgentRunning:c=!1,enableAudioRecording:d=!1,leftButtons:u,rightButtons:g,onStopAgent:m,loadingText:h="Agent is working...",autoFocus:f=!0,sandboxId:y,hideAttachments:k=!1,attachmentText:b="",promptExamples:C=[],suggestions:j=[],errorMessage:S,size:w="md",shape:x="rounded",variant:T="default",views:v={},mentionData:M=[],mentionTrigger:A="@",onMentionSelect:P,onAudioRecordingStart:F,onAudioRecordingStop:V,showGuideTip:z,guideVideoUrl:I,onGuideClose:W,onFileBrowse:H,onUploadProgress:R,onUploadSuccess:D,onUploadError:$,onFileUpload:_,onPromptExampleSelect:B,name:N,hiddenInput:Y=!0,value:ee,handleChange:L,setValue:E,handleSubmit:O,editableRef:K,fileInputRef:U,hiddenInputRef:J,isUploading:Z,uploadProgress:te,isDraggingOver:G,uploadedFiles:oe,pendingFiles:le,getPendingFiles:de,clearPendingFiles:Te,removeUploadedFile:ae,setPendingFiles:re,setUploadedFiles:ne,setIsUploading:ie,startUpload:ge,selectedModel:X,handleModelChange:Q,modelOptions:ye,subscriptionStatus:ve,canAccessModel:Ce,isGuideTipShown:Ne,hideGuideTip:Qe,handlePromptExampleSelect:Ze,handleDragOver:co,handleDragLeave:qe,onChange:qk,...Hs})=>{i.useTheme();const An=p.useMemo(()=>({...ta.container,...qh[x],...v==null?void 0:v.container}),[x,v==null?void 0:v.container]),Vs=p.useMemo(()=>({...ta.content,...Uh[w],...Gh[T],...v==null?void 0:v.content}),[w,T,v==null?void 0:v.content]),Yo=((ee==null?void 0:ee.trim().length)??0)>0||oe.length>0,As=p.useCallback(xe=>{ge([xe]),V==null||V(xe)},[ge,V]),lt=p.useCallback(xe=>{const jo=xe.filter(Pn=>Pn.size>52428800?(console.error(`File size exceeds 50MB limit: ${Pn.name}`),!1):!0);jo.length>0&&ge(jo)},[ge]),Ps=p.useCallback(xe=>{if(xe.preventDefault(),xe.stopPropagation(),qe(xe),xe.dataTransfer.files.length>0){const jo=Array.from(xe.dataTransfer.files);lt(jo)}},[qe,lt]),Es=p.useMemo(()=>[...M||[],...oe.map((xe,jo)=>({id:`file-${jo}`,name:xe.name}))],[M,oe]);return r.jsxs(i.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...An,...Hs,onDragOver:co,onDragLeave:qe,onDrop:Ps,children:[C.length>0&&r.jsx(ef,{examples:C,onSelect:Ze,views:{container:v==null?void 0:v.promptExamples,item:v==null?void 0:v.promptExampleItem}}),c&&r.jsxs(i.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...v==null?void 0:v.loadingIndicator,children:[r.jsx(Qt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",children:h})]}),r.jsx(i.View,{position:"relative",width:"100%",overflow:"visible",children:r.jsxs(i.View,{as:"form",onSubmit:O,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...Vs,...An,paddingHorizontal:16,paddingVertical:10,backgroundColor:G?"color-blue-50":void 0,children:[r.jsx(Zh,{files:oe,sandboxId:y,onRemove:ae,showPreviews:!0,views:{container:v==null?void 0:v.attachments,item:v==null?void 0:v.attachmentItem,name:v==null?void 0:v.attachmentName,size:v==null?void 0:v.attachmentSize,removeButton:v==null?void 0:v.attachmentRemove}}),r.jsx(ai,{ref:K,value:ee||"",onChange:L,placeholder:o,disabled:n&&!c,autoFocus:f,onKeyDown:s,suggestions:j||[],showSuggestions:j&&j.length>0&&!ee,onSuggestionSelect:xe=>{L(xe.text)},mentionData:Es,mentionTrigger:A,onMentionSelect:P,name:N,hiddenInput:Y,hiddenInputRef:J,views:{container:{},input:v==null?void 0:v.editableInput,hiddenInput:v==null?void 0:v.hiddenInput}}),r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[!k&&r.jsx(i.View,{display:"contents",onClickCapture:H?xe=>{xe.target.tagName==="INPUT"&&H()}:void 0,children:r.jsx(Xr,{accept:"*/*",icon:r.jsx(sr,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:lt,isLoading:Z,progress:te||0,text:b,fileType:"file",renderError:({errorMessage:xe})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...v==null?void 0:v.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:x==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:xe=>xe.size>50*1024*1024?"File size exceeds 50MB limit":null})}),u]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[l,d&&r.jsx(of,{onRecordingStart:F,onRecordingComplete:As,views:{button:v==null?void 0:v.recordButton}}),r.jsx(i.View,{as:"button",type:"button",onClick:O,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:c?"theme-error":Yo?"theme-primary":"color-gray-300",color:"color-white",borderRadius:x==="rounded"?"50%":4,border:"none",cursor:Yo?"pointer":"not-allowed",disabled:!Yo||t||n&&!c,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:Yo||c?.9:1},_active:{opacity:Yo||c?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...v==null?void 0:v.submitButton,children:c?r.jsx(Gr,{widthHeight:16,color:"currentColor",filled:!1}):t?r.jsx(ao,{type:"quarter",size:16,color:"color-white"}):r.jsx(Jt,{widthHeight:16,color:"currentColor",filled:!1})}),g]})]})]})}),S&&r.jsx(i.Text,{color:"theme-error",marginTop:"4px",...v==null?void 0:v.bottomTip,children:S})]})}),rf=e=>{const{name:o,onSubmit:t,...n}=e,[a,l]=p.useState([]),s=ke({name:o,type:"text"}),c=h=>{s.onChangeText&&s.onChangeText(h)},d=(h,f)=>{t?t(h,f):c(h)},u=()=>a,g=()=>l([]),m=ri({...n,value:s.value||"",onChange:c,onSubmit:d});return r.jsx(li,{...n,...m,name:o,value:s.value||"",onChange:c,onSubmit:d,error:s.error,getPendingFiles:u,clearPendingFiles:g})},tf=rf,nf=e=>{const o=ke(e),t=Dl(o);return r.jsx($l,{...t,...o})},af=nf,lf=e=>{const o=ke(e),t=ql();return r.jsx(Ul,{...t,...o})},sf=lf,cf=e=>{const o=ke(e),t=Ll(e);return r.jsx(_l,{...t,...o})},df=cf,uf=e=>{let o=ke(e);o.selected=o.value;const t=vl({...e,value:o.value});return r.jsx(Il,{...o,...t})},pf=uf,mf=e=>{const o=ke(e),t=Rl(e);return r.jsx(Fl,{...t,...o})},gf=mf,hf=e=>{const{name:o,...t}=e,{values:n,errors:a,touched:l,submitCount:s,setFieldValue:c,setFieldTouched:d}=De.useFormikContext(),u=De.getIn(n,o)||[],g=De.getIn(l,o)||s>0?De.getIn(a,o):void 0,m=p.useCallback(b=>{var j;const C=Array.isArray(b)?b.filter(S=>typeof S=="string"):[];c(o,C),(j=e.onTagsChange)==null||j.call(e,C)},[o,c,e.onTagsChange]),h=p.useCallback(()=>{var b;d(o,!0),(b=e.onBlur)==null||b.call(e)},[o,d,e.onBlur]),f=Xl({...t,tags:u,onTagsChange:m,onBlur:h}),{tags:y,...k}=f;return r.jsx(Jl,{...k,...t,tags:y,error:g})},ff=hf,yf=e=>{const o=ke(e),t=Wl(e);return r.jsx(Hl,{...t,...o})},xf=yf,bf=e=>{const o=ke(e,{focusable:!0}),{value:t,...n}=hn(e);return r.jsx(pr,{...n,...o})},kf=bf,Cf=({visibleIcon:e=r.jsx(en,{widthHeight:14}),hiddenIcon:o=r.jsx(Zt,{widthHeight:14}),...t})=>{const n=ke(t,{focusable:!0}),{isVisible:a,setIsVisible:l,...s}=Gl(n);return r.jsx(pr,{...s,type:a?"text":"password",isClearable:!1,right:r.jsx(i.View,{onClick:()=>{t.isDisabled||l(!a)},children:a?e:o})})},Sf=Cf,jf=({items:e,placeholder:o,searchPlaceholder:t,isMulti:n=!1,...a})=>{const l=ke(a),s=Yl(e,o,t);p.useEffect(()=>{if(n&&Array.isArray(l.value))s.setSelectedItems(l.value);else if(!n&&l.value){const d=typeof l.value=="object"?l.value:e.find(u=>u.value===l.value);d&&s.setSelectedItem(d)}},[l.value,n,e]);const c=d=>{l.onChange(d)};return r.jsx(Kl,{...s,...l,items:e,placeholder:o,isMulti:n,onSelect:c})},wf=jf,Po=(e,o,t)=>Math.min(Math.max(e,o),t),vf=(e,o,t,n,a,l,s)=>{const c=n-t;let d;if(l==="horizontal"){const u=o.width,g=e-o.left;d=Po(g/u,0,1)}else{const u=o.height,g=o.bottom-e;d=Po(g/u,0,1)}if(s&&s.length>0){const u=t+d*c;let g=s[0],m=Math.abs(u-g);for(let h=1;h<s.length;h++){const f=Math.abs(u-s[h]);f<m&&(m=f,g=s[h])}return g}else{const u=t+d*c,g=Math.round(u/a)*a;return Po(g,t,n)}},ii=({min:e=0,max:o=100,step:t=1,value:n,defaultValue:a,onChange:l,onDrag:s,orientation:c="horizontal",isDisabled:d=!1,stepValues:u})=>{const g=Po(n??a??e,e,o),[m,h]=p.useState(g),[f,y]=p.useState(!1),[k,b]=p.useState(!1),C=p.useRef(null),j=p.useRef(null),S=n!==void 0,w=n!==void 0?n:m;p.useEffect(()=>{n!==void 0&&h(Po(n,e,o))},[n,e,o]);const x=p.useCallback(V=>{const z=Po(V,e,o);S||h(z),l&&z!==w&&l(z),f&&s&&s(z)},[S,e,o,l,w,f,s]),T=p.useCallback(V=>{if(d||!C.current)return;const z=C.current;if(typeof z.getBoundingClientRect!="function")return;const I=z.getBoundingClientRect();let W;"touches"in V?W=c==="horizontal"?V.touches[0].clientX:V.touches[0].clientY:W=c==="horizontal"?V.clientX:V.clientY;const H=vf(W,I,e,o,t,c,u);x(H)},[e,o,t,c,x,d,u]),v=p.useCallback(V=>{if(d)return;V.preventDefault(),y(!0),T(V);const z=W=>{T(W)},I=()=>{y(!1),document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",I),document.removeEventListener("touchmove",z),document.removeEventListener("touchend",I)};typeof document>"u"||(document.addEventListener("mousemove",z),document.addEventListener("mouseup",I),document.addEventListener("touchmove",z),document.addEventListener("touchend",I))},[T,d]),M=p.useCallback(V=>{const z=j.current;z&&typeof z.contains=="function"&&z.contains(V.target)||v(V)},[v]),A=p.useCallback(V=>{if(d)return;let z=w;switch(V.key){case"ArrowLeft":case"ArrowDown":z=w-t;break;case"ArrowRight":case"ArrowUp":z=w+t;break;case"Home":z=e;break;case"End":z=o;break;default:return}V.preventDefault(),x(z)},[w,e,o,t,x,d]),P=o-e,F=P===0?0:(w-e)/P*100;return{currentValue:w,isDragging:f,isHovered:k,setIsHovered:b,trackRef:C,thumbRef:j,handleThumbMouseDown:v,handleTrackMouseDown:M,handleKeyDown:A,thumbPositionPercent:F}},la={xs:{height:4,width:"100%"},sm:{height:6,width:"100%"},md:{height:8,width:"100%"},lg:{height:10,width:"100%"},xl:{height:12,width:"100%"}},ia={xs:{width:12,height:12},sm:{width:16,height:16},md:{width:20,height:20},lg:{width:24,height:24},xl:{width:28,height:28}},sa={square:0,rounded:4,pill:24},Tf=e=>({default:{backgroundColor:"color-gray-200",transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"},transition:"border-color 0.15s ease"}}),ca=Tf(),If={xs:{trackCrossAxisSize:4,thumbSize:12},sm:{trackCrossAxisSize:6,thumbSize:16},md:{trackCrossAxisSize:8,thumbSize:20},lg:{trackCrossAxisSize:10,thumbSize:24},xl:{trackCrossAxisSize:12,thumbSize:28}},Rf={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},Ff=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Qo=(e,o)=>Ff(o)?{style:{[e]:o}}:{[e]:o},si=p.memo(({min:e=0,max:o=100,step:t=1,currentValue:n,stepValues:a,shape:l="rounded",size:s="md",variant:c="default",orientation:d="horizontal",isDisabled:u=!1,showValue:g=!1,showTooltip:m=!1,backgroundColor:h="theme-primary",label:f,helperText:y,themeMode:k,shadow:b={},isDragging:C,isHovered:j,setIsHovered:S,trackRef:w,thumbRef:x,handleThumbMouseDown:T,handleTrackMouseDown:v,handleKeyDown:M,thumbPositionPercent:A,ariaLabel:P="Slider",views:F={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:V,onDrag:z,value:I,defaultValue:W,...H})=>{var E,O;const R=h,D="theme-disabled",$=ca[c].backgroundColor,_=u?D:R,B=d==="vertical",{trackCrossAxisSize:N,thumbSize:Y}=If[s]||{trackCrossAxisSize:la[s].height,thumbSize:ia[s].width||16},ee=r.jsxs(i.Vertical,{width:"100%",gap:8,...F.container,...H,children:[f&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...F.label,children:f}),g&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...F.valueLabel,children:n})]}),r.jsxs(i.View,{ref:w,position:"relative",cursor:u?"not-allowed":"pointer",opacity:u?.6:1,onMouseDown:v,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),...la[s],borderRadius:sa[l],backgroundColor:$,...ca[c],...b,...F.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(K=>{const U=(K-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",top:"50%",left:`${U}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...Qo("backgroundColor",_),...F.stepMarks},K)})}),r.jsx(i.View,{position:"absolute",top:0,left:0,height:"100%",width:`${A}%`,borderRadius:sa[l],transition:"width 0.1s ease-in-out",...Qo("backgroundColor",_),...F.progress,...F.filledTrack}),r.jsx(i.View,{ref:x,role:"slider",tabIndex:u?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":u,"aria-label":P,position:"absolute",top:"50%",left:`${A}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:C?"none":"transform 0.1s ease-in-out",...Qo("borderColor",_),transform:j?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:T,onTouchStart:T,onKeyDown:M,...ia[s],...F.thumb,children:m&&(j||C)&&r.jsx(i.View,{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:8,padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:4,fontSize:12,whiteSpace:"nowrap",zIndex:3,...F.tooltip,children:r.jsx(i.Text,{...(E=F.tooltip)==null?void 0:E.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(zt,{children:y})]}),L=r.jsxs(i.Center,{...Rf[d],position:"relative",onMouseEnter:()=>!u&&S(!0),onMouseLeave:()=>!u&&S(!1),...H,...F==null?void 0:F.container,children:[f&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...F.label,children:f}),g&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...F.valueLabel,children:n})]}),r.jsxs(i.View,{ref:w,position:"relative",borderRadius:N/2,backgroundColor:u?D:$,cursor:u?"not-allowed":"pointer",width:B?`${N}px`:"100%",height:B?"100%":`${N}px`,onMouseDown:v,onTouchStart:v,...F==null?void 0:F.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(K=>{const U=(K-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:_,zIndex:1,...B?{bottom:`${U}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${U}%`,top:"50%",transform:"translate(-50%, -50%)"},...F.stepMarks},K)})}),r.jsx(i.View,{position:"absolute",borderRadius:N/2,...B?{bottom:0,left:0,width:"100%",height:`${A}%`}:{top:0,left:0,height:"100%",width:`${A}%`},...Qo("backgroundColor",_),...F==null?void 0:F.filledTrack,...F==null?void 0:F.progress}),r.jsx(i.View,{ref:x,role:"slider",tabIndex:u?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":u,"aria-label":P,position:"absolute",width:`${Y}px`,height:`${Y}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:u?"not-allowed":"grab",transform:B?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:C?"none":"left 0.1s, bottom 0.1s",...Qo("backgroundColor",_),...B?{left:"50%",bottom:`${A}%`}:{top:"50%",left:`${A}%`},onMouseDown:T,onTouchStart:T,onKeyDown:M,...F==null?void 0:F.thumb,children:m&&(j||C)&&r.jsx(i.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...B?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...F==null?void 0:F.tooltip,children:r.jsx(i.Text,{...(O=F==null?void 0:F.tooltip)==null?void 0:O.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(zt,{marginTop:8,children:y})]});return B||m?L:ee}),zf=e=>{const o=ke(e),t=ii({...e,value:o.value!==void 0?Number(o.value):void 0,onChange:n=>{var a;o.onChange(n),(a=e.onChange)==null||a.call(e,n)}});return r.jsx(si,{...e,...t,...o})},Mf=zf,da=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},ht=(e,o)=>{console.log(`[FormikOTPInput] ${e}`,o)},Wf=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),Hf=e=>{const o=ke(e),t=da(o.value).slice(0,e.length||6);ht("render",{name:e.name,type:e.type,formValue:Wf(o.value),displayValue:t,length:e.length||6,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText});const{isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:s,inputRef:c,containerRef:d,mirrorSelectionStart:u,mirrorSelectionEnd:g,setMirrorSelectionStart:m,setMirrorSelectionEnd:h,setInputRef:f,handleFocus:y,handleBlur:k,handleKeyDown:b,handlePaste:C}=Ql(e),j=p.useCallback(w=>{const x=da(w).slice(0,e.length||6);ht("setValue",{name:e.name,incomingValue:w,nextValue:x,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText}),o.onChange&&o.onChange(x),o.onChangeText&&o.onChangeText(x),e.onComplete&&x.length===(e.length||6)&&e.onComplete(x),c.current&&(c.current.value=x)},[o,e,c]),S=p.useCallback(w=>{var v,M,A;const x=typeof w=="string"?w:((v=w==null?void 0:w.currentTarget)==null?void 0:v.value)??((M=w==null?void 0:w.target)==null?void 0:M.value)??((A=w==null?void 0:w.nativeEvent)==null?void 0:A.text)??"",T=String(x).slice(0,e.length||6);ht("handleChange normalized",{name:e.name,raw:x,newValue:T}),j(T),c.current&&(c.current.value=T)},[e.length,j,c]);return r.jsx(Zl,{...e,...o,value:t,setValue:j,isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:s,inputRef:c,containerRef:d,mirrorSelectionStart:u,mirrorSelectionEnd:g,setMirrorSelectionStart:m,setMirrorSelectionEnd:h,setInputRef:f,handleChange:S,handleFocus:y,handleBlur:k,handleKeyDown:b,handlePaste:C,stepValues:e.stepValues})},Vf=Hf,Af=e=>Array.isArray(e)?e:e==null?[]:[e],ci=({name:e,uploadFile:o,onUploadSuccess:t,onUploadError:n,transformResponse:a,onMultipleFileSelect:l,onFileSelect:s,multiple:c=!0,...d})=>{const{setFieldValue:u,setFieldTouched:g,values:m}=De.useFormikContext(),[h,f]=p.useState(!1),[y,k]=p.useState(0),b=p.useCallback(async S=>{if(!S||S.length===0)return;g(e,!0,!0),f(!0);const w=[];for(const x of S){k(0);try{const T=await o(x,M=>{k(M??0)}),v=a?a(T,x):T;w.push(v),t==null||t(x,v)}catch(T){n==null||n(x,T)}}if(w.length>0){const x=Af(De.getIn(m,e));u(e,[...x,...w],!0),k(100)}else k(0);f(!1)},[e,n,t,g,u,a,o,m]),C=p.useCallback(async S=>{l==null||l(S),await b(S)},[b,l]),j=p.useCallback(async S=>{s==null||s(S),await b([S])},[b,s]);return r.jsx(Xr,{...d,multiple:c,onMultipleFileSelect:c?C:void 0,onFileSelect:c?void 0:j,isLoading:h,progress:y})};ci.displayName="FormikUploader";const Pf=e=>{let o=ke(e);o.selected=o.value;const t=zl(e);return r.jsx(Ml,{...t,...o})},Ef=Pf,di=e=>{const[o,t]=p.useState(!1),[n,a]=p.useState(e);return{isHovered:o,setIsHovered:t,isToggle:n,setIsToggled:a}},Df={square:0,rounded:8,pill:999},$f=(e,o)=>({outline:{backgroundColor:"color-white",color:e,borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{backgroundColor:"transparent",color:e,borderWidth:0,borderStyle:"none",borderColor:"transparent",_hover:{backgroundColor:"color-gray-50"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease"},link:{backgroundColor:"transparent",color:e,borderWidth:1,borderStyle:"solid",borderColor:"transparent",textDecoration:"underline",textUnderlineOffset:"1px",textDecorationThickness:"1px",_hover:{opacity:.8},_active:{opacity:.9},transition:"opacity 0.2s ease"}}),ui=p.memo(({children:e,shape:o="rounded",variant:t="ghost",isHovered:n,setIsHovered:a,isDisabled:l,isToggle:s,setIsToggled:c,onToggle:d,views:u,backgroundColor:g,color:m,themeMode:h,...f})=>{const{getColor:y,themeMode:k}=i.useTheme(),b=h??k,j=y(l?"theme-disabled":g??m??"theme-primary",{themeMode:b}),w=p.useMemo(()=>$f(j),[j,b])[t],x=!!s,T=p.useCallback(()=>a(!0),[a]),v=p.useCallback(()=>{l||c(M=>{const A=!M;return d&&d(A),A})},[l,c,d]);return r.jsx(i.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:l?"not-allowed":"pointer",borderRadius:Df[o],onClick:v,onMouseEnter:T,onMouseLeave:()=>a(!1),...w,...x&&{...t==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:j},...f,...u==null?void 0:u.container,children:e})}),Lf=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...s})=>{const c=ke(s),{isHovered:d,setIsHovered:u,isToggle:g,setIsToggled:m}=di(c.value??a);p.useEffect(()=>{m(c.value??a)},[c.value,a]);const h=f=>{m(f),c.onChange(f),l==null||l(f)};return r.jsx(ui,{shape:o,variant:t,isDisabled:n,isHovered:d,setIsHovered:u,isToggle:g,setIsToggled:m,onToggle:h,...s,children:e})},_f=Lf,pi=()=>{const[e,o]=p.useState([]);return{activeToggles:e,setActiveToggles:o}},Bf=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...s})=>{const{isHovered:c,setIsHovered:d,isToggle:u,setIsToggled:g}=di(a);return p.useEffect(()=>{g(a)},[a]),r.jsx(ui,{shape:o,variant:t,isDisabled:n,isHovered:c,setIsHovered:d,isToggle:u,setIsToggled:g,onToggle:l,...s,children:e})},xn=Bf,mi=({items:e,onToggleChange:o,activeToggles:t,setActiveToggles:n,shape:a="rounded",variant:l="ghost",views:s})=>{const c=p.useCallback((d,u)=>{n(g=>{let m;return u?m=g.includes(d)?g:[...g,d]:m=g.filter(h=>h!==d),o==null||o(m),m})},[o,n]);return r.jsx(i.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...s==null?void 0:s.container,children:e.map(d=>r.jsx(xn,{role:`toggle-${d.id}`,shape:a,variant:l,isToggled:t.includes(d.id)||d.isActive,onToggle:u=>c(d.id,u),isDisabled:d.isDisabled,views:s==null?void 0:s.toggle,children:d.value},d.id))})},Of=({items:e,shape:o,variant:t,onToggleChange:n,...a})=>{const l=ke(a),{activeToggles:s,setActiveToggles:c}=pi();p.useEffect(()=>{Array.isArray(l.value)&&c(l.value)},[l.value]);const d=u=>{c(u),l.onChange(u),n==null||n(u)};return r.jsx(mi,{items:e,shape:o,variant:t,activeToggles:s,setActiveToggles:c,onToggleChange:d,...a})},Nf=Of,ua=["zoom-out","zoom-in","zap","zap-off","youtube","x","wrench","worm","workflow","wine","wine-off","wind","wind-arrow-down","wifi","wifi-zero","wifi-sync","wifi-pen","wifi-off","wifi-low","wifi-high","wifi-cog","whole-word","wheat","wheat-off","weight","weight-tilde","webhook","webhook-off","webcam","waypoints","waves","waves-ladder","waves-arrow-up","waves-arrow-down","watch","washing-machine","warehouse","wand","wand-sparkles","wallpaper","wallet","wallet-minimal","wallet-cards","vote","volume","volume-x","volume-off","volume-2","volume-1","volleyball","voicemail","view","videotape","video","video-off","vibrate","vibrate-off","venus","venus-and-mars","venetian-mask","vegan","vector-square","vault","variable","van","utility-pole","utensils","utensils-crossed","users","users-round","user","user-x","user-star","user-search","user-round","user-round-x","user-round-search","user-round-plus","user-round-pen","user-round-minus","user-round-cog","user-round-check","user-plus","user-pen","user-minus","user-lock","user-cog","user-check","usb","upload","unplug","unlink","unlink-2","university","ungroup","unfold-vertical","unfold-horizontal","undo","undo-dot","undo-2","underline","umbrella","umbrella-off","type","type-outline","twitter","twitch","tv","tv-minimal","tv-minimal-play","turtle","turntable","turkish-lira","truck","truck-electric","trophy","triangle","triangle-right","triangle-dashed","triangle-alert","trending-up","trending-up-down","trending-down","trello","trees","tree-pine","tree-palm","tree-deciduous","trash","trash-2","transgender","tram-front","train-track","train-front","train-front-tunnel","traffic-cone","tractor","toy-brick","tower-control","touchpad","touchpad-off","torus","tornado","toolbox","tool-case","toilet","toggle-right","toggle-left","timer","timer-reset","timer-off","tickets","tickets-plane","ticket","ticket-x","ticket-slash","ticket-plus","ticket-percent","ticket-minus","ticket-check","thumbs-up","thumbs-down","thermometer","thermometer-sun","thermometer-snowflake","theater","text-wrap","text-select","text-search","text-quote","text-initial","text-cursor","text-cursor-input","text-align-start","text-align-justify","text-align-end","text-align-center","test-tubes","test-tube","test-tube-diagonal","terminal","tent","tent-tree","telescope","target","tangent","tally-5","tally-4","tally-3","tally-2","tally-1","tags","tag","tablets","tablet","tablet-smartphone","table","table-rows-split","table-properties","table-of-contents","table-columns-split","table-cells-split","table-cells-merge","table-2","syringe","swords","sword","switch-camera","swiss-franc","swatch-book","superscript","sunset","sunrise","sun","sun-snow","sun-moon","sun-medium","sun-dim","subscript","strikethrough","stretch-vertical","stretch-horizontal","store","stone","sticky-note","sticker","stethoscope","step-forward","step-back","star","star-off","star-half","stamp","squirrel","squircle","squircle-dashed","squares-unite","squares-subtract","squares-intersect","squares-exclude","square","square-x","square-user","square-user-round","square-terminal","square-stop","square-star","square-stack","square-square","square-split-vertical","square-split-horizontal","square-slash","square-sigma","square-scissors","square-round-corner","square-radical","square-power","square-plus","square-play","square-pilcrow","square-pi","square-percent","square-pen","square-pause","square-parking","square-parking-off","square-mouse-pointer","square-minus","square-menu","square-m","square-library","square-kanban","square-function","square-equal","square-dot","square-divide","square-dashed","square-dashed-top-solid","square-dashed-mouse-pointer","square-dashed-kanban","square-dashed-bottom","square-dashed-bottom-code","square-code","square-chevron-up","square-chevron-right","square-chevron-left","square-chevron-down","square-check","square-check-big","square-chart-gantt","square-bottom-dashed-scissors","square-asterisk","square-arrow-up","square-arrow-up-right","square-arrow-up-left","square-arrow-right","square-arrow-out-up-right","square-arrow-out-up-left","square-arrow-out-down-right","square-arrow-out-down-left","square-arrow-left","square-arrow-down","square-arrow-down-right","square-arrow-down-left","square-activity","sprout","spray-can","spotlight","spool","split","spline","spline-pointer","spell-check","spell-check-2","speech","speaker","sparkles","sparkle","spade","space","soup","solar-panel","sofa","soap-dispenser-droplet","snowflake","snail","smile","smile-plus","smartphone","smartphone-nfc","smartphone-charging","sliders-vertical","sliders-horizontal","slice","slash","slack","skull","skip-forward","skip-back","siren","signpost","signpost-big","signature","signal","signal-zero","signal-medium","signal-low","signal-high","sigma","shuffle","shrub","shrink","shrimp","shredder","shower-head","shovel","shopping-cart","shopping-basket","shopping-bag","shirt","ship","ship-wheel","shield","shield-x","shield-user","shield-question-mark","shield-plus","shield-off","shield-minus","shield-half","shield-ellipsis","shield-check","shield-ban","shield-alert","shell","sheet","share","share-2","shapes","settings","settings-2","server","server-off","server-crash","server-cog","separator-vertical","separator-horizontal","send","send-to-back","send-horizontal","section","search","search-x","search-slash","search-code","search-check","search-alert","scroll","scroll-text","screen-share","screen-share-off","scooter","scissors","scissors-line-dashed","school","scan","scan-text","scan-search","scan-qr-code","scan-line","scan-heart","scan-face","scan-eye","scan-barcode","scaling","scale","scale-3d","save","save-off","save-all","saudi-riyal","satellite","satellite-dish","sandwich","salad","sailboat","russian-ruble","ruler","ruler-dimension-line","rss","rows-4","rows-3","rows-2","router","route","route-off","rotate-cw","rotate-cw-square","rotate-ccw","rotate-ccw-square","rotate-ccw-key","rotate-3d","rose","roller-coaster","rocking-chair","rocket","ribbon","rewind","reply","reply-all","replace","replace-all","repeat","repeat-2","repeat-1","remove-formatting","regex","refrigerator","refresh-cw","refresh-cw-off","refresh-ccw","refresh-ccw-dot","redo","redo-dot","redo-2","recycle","rectangle-vertical","rectangle-horizontal","rectangle-goggles","rectangle-ellipsis","rectangle-circle","receipt","receipt-turkish-lira","receipt-text","receipt-swiss-franc","receipt-russian-ruble","receipt-pound-sterling","receipt-japanese-yen","receipt-indian-rupee","receipt-euro","receipt-cent","ratio","rat","rainbow","rail-symbol","radius","radio","radio-tower","radio-receiver","radical","radiation","radar","rabbit","quote","qr-code","pyramid","puzzle","proportions","projector","printer","printer-check","presentation","power","power-off","pound-sterling","popsicle","popcorn","pointer","pointer-off","podcast","pocket","pocket-knife","plus","plug","plug-zap","plug-2","play","plane","plane-takeoff","plane-landing","pizza","pipette","pin","pin-off","pill","pill-bottle","pilcrow","pilcrow-right","pilcrow-left","piggy-bank","picture-in-picture","picture-in-picture-2","pickaxe","piano","pi","phone","phone-outgoing","phone-off","phone-missed","phone-incoming","phone-forwarded","phone-call","philippine-peso","person-standing","percent","pentagon","pencil","pencil-ruler","pencil-off","pencil-line","pen","pen-tool","pen-off","pen-line","pc-case","paw-print","pause","party-popper","parking-meter","parentheses","paperclip","panels-top-left","panels-right-bottom","panels-left-bottom","panel-top","panel-top-open","panel-top-dashed","panel-top-close","panel-top-bottom-dashed","panel-right","panel-right-open","panel-right-dashed","panel-right-close","panel-left","panel-left-right-dashed","panel-left-open","panel-left-dashed","panel-left-close","panel-bottom","panel-bottom-open","panel-bottom-dashed","panel-bottom-close","panda","palette","paintbrush","paintbrush-vertical","paint-roller","paint-bucket","package","package-x","package-search","package-plus","package-open","package-minus","package-check","package-2","origami","orbit","option","omega","octagon","octagon-x","octagon-pause","octagon-minus","octagon-alert","nut","nut-off","notepad-text","notepad-text-dashed","notebook","notebook-text","notebook-tabs","notebook-pen","non-binary","nfc","newspaper","network","navigation","navigation-off","navigation-2","navigation-2-off","music","music-4","music-3","music-2","move","move-vertical","move-up","move-up-right","move-up-left","move-right","move-left","move-horizontal","move-down","move-down-right","move-down-left","move-diagonal","move-diagonal-2","move-3d","mouse","mouse-pointer","mouse-pointer-click","mouse-pointer-ban","mouse-pointer-2","mouse-pointer-2-off","mouse-off","mountain","mountain-snow","motorbike","moon","moon-star","monitor","monitor-x","monitor-up","monitor-stop","monitor-speaker","monitor-smartphone","monitor-play","monitor-pause","monitor-off","monitor-down","monitor-dot","monitor-cog","monitor-cloud","monitor-check","minus","minimize","minimize-2","milk","milk-off","milestone","microwave","microscope","microchip","mic","mic-vocal","mic-off","messages-square","message-square","message-square-x","message-square-warning","message-square-text","message-square-share","message-square-reply","message-square-quote","message-square-plus","message-square-off","message-square-more","message-square-lock","message-square-heart","message-square-dot","message-square-diff","message-square-dashed","message-square-code","message-circle","message-circle-x","message-circle-warning","message-circle-reply","message-circle-question-mark","message-circle-plus","message-circle-off","message-circle-more","message-circle-heart","message-circle-dashed","message-circle-code","merge","menu","memory-stick","meh","megaphone","megaphone-off","medal","maximize","maximize-2","martini","mars","mars-stroke","map","map-plus","map-pinned","map-pin","map-pin-x","map-pin-x-inside","map-pin-plus","map-pin-plus-inside","map-pin-pen","map-pin-off","map-pin-minus","map-pin-minus-inside","map-pin-house","map-pin-check","map-pin-check-inside","map-minus","mails","mailbox","mail","mail-x","mail-warning","mail-search","mail-question-mark","mail-plus","mail-open","mail-minus","mail-check","magnet","luggage","lollipop","logs","log-out","log-in","lock","lock-open","lock-keyhole","lock-keyhole-open","locate","locate-off","locate-fixed","loader","loader-pinwheel","loader-circle","list","list-x","list-video","list-tree","list-todo","list-start","list-restart","list-plus","list-ordered","list-music","list-minus","list-indent-increase","list-indent-decrease","list-filter","list-filter-plus","list-end","list-collapse","list-chevrons-up-down","list-chevrons-down-up","list-checks","list-check","linkedin","link","link-2","link-2-off","line-squiggle","lightbulb","lightbulb-off","ligature","life-buoy","library","library-big","lectern","leafy-green","leaf","layout-template","layout-panel-top","layout-panel-left","layout-list","layout-grid","layout-dashboard","layers","layers-plus","layers-2","laugh","lasso","lasso-select","laptop","laptop-minimal","laptop-minimal-check","languages","landmark","land-plot","lamp","lamp-wall-up","lamp-wall-down","lamp-floor","lamp-desk","lamp-ceiling","keyboard","keyboard-off","keyboard-music","key","key-square","key-round","kayak","kanban","joystick","japanese-yen","iteration-cw","iteration-ccw","italic","instagram","inspection-panel","info","infinity","indian-rupee","inbox","import","images","image","image-upscale","image-up","image-plus","image-play","image-off","image-minus","image-down","id-card","id-card-lanyard","ice-cream-cone","ice-cream-bowl","house","house-wifi","house-plus","house-plug","house-heart","hourglass","hotel","hospital","hop","hop-off","history","highlighter","hexagon","helicopter","heater","heart","heart-pulse","heart-plus","heart-off","heart-minus","heart-handshake","heart-crack","headset","headphones","headphone-off","heading","heading-6","heading-5","heading-4","heading-3","heading-2","heading-1","hdmi-port","hd","haze","hat-glasses","hash","hard-hat","hard-drive","hard-drive-upload","hard-drive-download","handshake","handbag","hand","hand-platter","hand-metal","hand-helping","hand-heart","hand-grab","hand-fist","hand-coins","hammer","hamburger","ham","guitar","group","grip","grip-vertical","grip-horizontal","grid-3x3","grid-3x2","grid-2x2","grid-2x2-x","grid-2x2-plus","grid-2x2-check","grape","graduation-cap","gpu","goal","globe","globe-lock","glasses","glass-water","gitlab","github","git-pull-request","git-pull-request-draft","git-pull-request-create","git-pull-request-create-arrow","git-pull-request-closed","git-pull-request-arrow","git-merge","git-graph","git-fork","git-compare","git-compare-arrows","git-commit-vertical","git-commit-horizontal","git-branch","git-branch-plus","git-branch-minus","gift","ghost","georgian-lari","gem","gavel","gauge","gamepad","gamepad-directional","gamepad-2","gallery-vertical","gallery-vertical-end","gallery-thumbnails","gallery-horizontal","gallery-horizontal-end","funnel","funnel-x","funnel-plus","fullscreen","fuel","frown","framer","frame","forward","form","forklift","footprints","folders","folder","folder-x","folder-up","folder-tree","folder-sync","folder-symlink","folder-search","folder-search-2","folder-root","folder-plus","folder-pen","folder-output","folder-open","folder-open-dot","folder-minus","folder-lock","folder-key","folder-kanban","folder-input","folder-heart","folder-git","folder-git-2","folder-down","folder-dot","folder-cog","folder-code","folder-closed","folder-clock","folder-check","folder-archive","fold-vertical","fold-horizontal","focus","flower","flower-2","flip-vertical","flip-vertical-2","flip-horizontal","flip-horizontal-2","flask-round","flask-conical","flask-conical-off","flashlight","flashlight-off","flame","flame-kindling","flag","flag-triangle-right","flag-triangle-left","flag-off","fishing-hook","fish","fish-symbol","fish-off","fire-extinguisher","fingerprint-pattern","film","files","file","file-x","file-x-corner","file-volume","file-video-camera","file-user","file-up","file-type","file-type-corner","file-text","file-terminal","file-symlink","file-stack","file-spreadsheet","file-sliders","file-signal","file-search","file-search-corner","file-scan","file-question-mark","file-plus","file-plus-corner","file-play","file-pen","file-pen-line","file-output","file-music","file-minus","file-minus-corner","file-lock","file-key","file-input","file-image","file-heart","file-headphone","file-exclamation-point","file-down","file-digit","file-diff","file-cog","file-code","file-code-corner","file-clock","file-check","file-check-corner","file-chart-pie","file-chart-line","file-chart-column","file-chart-column-increasing","file-braces","file-braces-corner","file-box","file-badge","file-axis-3d","file-archive","figma","ferris-wheel","fence","feather","fast-forward","fan","factory","facebook","eye","eye-off","eye-closed","external-link","expand","ev-charger","euro","ethernet-port","eraser","equal","equal-not","equal-approximately","ellipsis","ellipsis-vertical","egg","egg-off","egg-fried","eclipse","earth","earth-lock","ear","ear-off","dumbbell","drumstick","drum","droplets","droplet","droplet-off","drone","drill","dribbble","drama","drafting-compass","download","dot","door-open","door-closed","door-closed-locked","donut","dollar-sign","dog","dock","dna","dna-off","divide","disc","disc-album","disc-3","disc-2","diff","dices","dice-6","dice-5","dice-4","dice-3","dice-2","dice-1","diamond","diamond-plus","diamond-percent","diamond-minus","diameter","dessert","delete","decimals-arrow-right","decimals-arrow-left","database","database-zap","database-backup","dam","cylinder","currency","cup-soda","cuboid","crown","crosshair","cross","crop","croissant","credit-card","creative-commons","cpu","corner-up-right","corner-up-left","corner-right-up","corner-right-down","corner-left-up","corner-left-down","corner-down-right","corner-down-left","copyright","copyleft","copy","copy-x","copy-slash","copy-plus","copy-minus","copy-check","cooking-pot","cookie","contrast","container","contact","contact-round","construction","cone","concierge-bell","computer","component","compass","command","combine","columns-4","columns-3","columns-3-cog","columns-2","coins","cog","coffee","codesandbox","codepen","code","code-xml","club","clover","cloudy","cloud","cloud-upload","cloud-sync","cloud-sun","cloud-sun-rain","cloud-snow","cloud-rain","cloud-rain-wind","cloud-off","cloud-moon","cloud-moon-rain","cloud-lightning","cloud-hail","cloud-fog","cloud-drizzle","cloud-download","cloud-cog","cloud-check","cloud-backup","cloud-alert","closed-caption","clock","clock-plus","clock-fading","clock-check","clock-arrow-up","clock-arrow-down","clock-alert","clock-9","clock-8","clock-7","clock-6","clock-5","clock-4","clock-3","clock-2","clock-12","clock-11","clock-10","clock-1","clipboard","clipboard-x","clipboard-type","clipboard-plus","clipboard-pen","clipboard-pen-line","clipboard-paste","clipboard-minus","clipboard-list","clipboard-copy","clipboard-clock","clipboard-check","clapperboard","citrus","circuit-board","circle","circle-x","circle-user","circle-user-round","circle-stop","circle-star","circle-small","circle-slash","circle-slash-2","circle-question-mark","circle-power","circle-pound-sterling","circle-plus","circle-play","circle-pile","circle-percent","circle-pause","circle-parking","circle-parking-off","circle-off","circle-minus","circle-gauge","circle-fading-plus","circle-fading-arrow-up","circle-equal","circle-ellipsis","circle-dot","circle-dot-dashed","circle-dollar-sign","circle-divide","circle-dashed","circle-chevron-up","circle-chevron-right","circle-chevron-left","circle-chevron-down","circle-check","circle-check-big","circle-arrow-up","circle-arrow-right","circle-arrow-out-up-right","circle-arrow-out-up-left","circle-arrow-out-down-right","circle-arrow-out-down-left","circle-arrow-left","circle-arrow-down","circle-alert","cigarette","cigarette-off","church","chromium","chevrons-up","chevrons-up-down","chevrons-right","chevrons-right-left","chevrons-left","chevrons-left-right","chevrons-left-right-ellipsis","chevrons-down","chevrons-down-up","chevron-up","chevron-right","chevron-left","chevron-last","chevron-first","chevron-down","chess-rook","chess-queen","chess-pawn","chess-knight","chess-king","chess-bishop","cherry","chef-hat","check","check-line","check-check","chart-spline","chart-scatter","chart-pie","chart-no-axes-gantt","chart-no-axes-combined","chart-no-axes-column","chart-no-axes-column-increasing","chart-no-axes-column-decreasing","chart-network","chart-line","chart-gantt","chart-column","chart-column-stacked","chart-column-increasing","chart-column-decreasing","chart-column-big","chart-candlestick","chart-bar","chart-bar-stacked","chart-bar-increasing","chart-bar-decreasing","chart-bar-big","chart-area","cctv","cat","castle","cast","cassette-tape","case-upper","case-sensitive","case-lower","carrot","card-sim","caravan","car","car-taxi-front","car-front","captions","captions-off","cannabis","cannabis-off","candy","candy-off","candy-cane","camera","camera-off","calendars","calendar","calendar-x","calendar-x-2","calendar-sync","calendar-search","calendar-range","calendar-plus","calendar-plus-2","calendar-off","calendar-minus","calendar-minus-2","calendar-heart","calendar-fold","calendar-days","calendar-cog","calendar-clock","calendar-check","calendar-check-2","calendar-arrow-up","calendar-arrow-down","calendar-1","calculator","cake","cake-slice","cable","cable-car","bus","bus-front","building","building-2","bug","bug-play","bug-off","bubbles","brush","brush-cleaning","bring-to-front","briefcase","briefcase-medical","briefcase-conveyor-belt","briefcase-business","brick-wall","brick-wall-shield","brick-wall-fire","brain","brain-cog","brain-circuit","brackets","braces","boxes","box","bow-arrow","bottle-wine","bot","bot-off","bot-message-square","boom-box","bookmark","bookmark-x","bookmark-plus","bookmark-minus","bookmark-check","book","book-x","book-user","book-up","book-up-2","book-type","book-text","book-search","book-plus","book-open","book-open-text","book-open-check","book-minus","book-marked","book-lock","book-key","book-image","book-heart","book-headphones","book-down","book-dashed","book-copy","book-check","book-audio","book-alert","book-a","bone","bomb","bolt","bold","bluetooth","bluetooth-searching","bluetooth-off","bluetooth-connected","blocks","blinds","blend","bitcoin","birdhouse","bird","biohazard","binoculars","binary","bike","biceps-flexed","between-vertical-start","between-vertical-end","between-horizontal-start","between-horizontal-end","bell","bell-ring","bell-plus","bell-off","bell-minus","bell-electric","bell-dot","beer","beer-off","beef","bed","bed-single","bed-double","bean","bean-off","beaker","battery","battery-warning","battery-plus","battery-medium","battery-low","battery-full","battery-charging","bath","baseline","barrel","barcode","banknote","banknote-x","banknote-arrow-up","banknote-arrow-down","bandage","banana","ban","balloon","baggage-claim","badge","badge-x","badge-turkish-lira","badge-swiss-franc","badge-russian-ruble","badge-question-mark","badge-pound-sterling","badge-plus","badge-percent","badge-minus","badge-japanese-yen","badge-info","badge-indian-rupee","badge-euro","badge-dollar-sign","badge-check","badge-cent","badge-alert","backpack","baby","axis-3d","axe","award","audio-waveform","audio-lines","atom","at-sign","asterisk","arrows-up-from-line","arrow-up","arrow-up-z-a","arrow-up-wide-narrow","arrow-up-to-line","arrow-up-right","arrow-up-narrow-wide","arrow-up-left","arrow-up-from-line","arrow-up-from-dot","arrow-up-down","arrow-up-a-z","arrow-up-1-0","arrow-up-0-1","arrow-right","arrow-right-to-line","arrow-right-left","arrow-right-from-line","arrow-left","arrow-left-to-line","arrow-left-right","arrow-left-from-line","arrow-down","arrow-down-z-a","arrow-down-wide-narrow","arrow-down-up","arrow-down-to-line","arrow-down-to-dot","arrow-down-right","arrow-down-narrow-wide","arrow-down-left","arrow-down-from-line","arrow-down-a-z","arrow-down-1-0","arrow-down-0-1","arrow-big-up","arrow-big-up-dash","arrow-big-right","arrow-big-right-dash","arrow-big-left","arrow-big-left-dash","arrow-big-down","arrow-big-down-dash","armchair","archive","archive-x","archive-restore","apple","app-window","app-window-mac","aperture","anvil","antenna","annoyed","angry","anchor","amphora","ampersands","ampersand","ambulance","align-vertical-space-between","align-vertical-space-around","align-vertical-justify-start","align-vertical-justify-end","align-vertical-justify-center","align-vertical-distribute-start","align-vertical-distribute-end","align-vertical-distribute-center","align-start-vertical","align-start-horizontal","align-horizontal-space-between","align-horizontal-space-around","align-horizontal-justify-start","align-horizontal-justify-end","align-horizontal-justify-center","align-horizontal-distribute-start","align-horizontal-distribute-end","align-horizontal-distribute-center","align-end-vertical","align-end-horizontal","align-center-vertical","align-center-horizontal","album","alarm-smoke","alarm-clock","alarm-clock-plus","alarm-clock-off","alarm-clock-minus","alarm-clock-check","airplay","air-vent","activity","accessibility","a-large-small","a-arrow-up","a-arrow-down"],gi=e=>{const{value:o,defaultValue:t,onChange:n,isOpen:a,onOpen:l,onClose:s,closeOnSelect:c=!0}=e,[d,u]=p.useState(a??!1),[g,m]=p.useState(o??t),[h,f]=p.useState(""),y=p.useRef(null),k=p.useRef(null);p.useEffect(()=>{o!==void 0&&m(o)},[o]),p.useEffect(()=>{a!==void 0&&u(a)},[a]);const b=p.useMemo(()=>h?ua.filter(x=>x.toLowerCase().includes(h.toLowerCase())).slice(0,100):ua.slice(0,100),[h]);p.useEffect(()=>{const x=T=>{d&&y.current&&k.current&&!y.current.contains(T.target)&&!k.current.contains(T.target)&&C()};if(!(typeof document>"u"))return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[d]);const C=p.useCallback(()=>{a===void 0&&u(!1),s&&s()},[s,a]),j=p.useCallback(()=>{const x=!d;a===void 0&&u(x),x?(l&&l(),f("")):s&&s()},[d,l,s,a]),S=p.useCallback(x=>{o===void 0&&m(x),n&&n(x),c&&C()},[n,c,C,o]),w=p.useCallback(x=>{f(x)},[]);return{isOpen:d,selectedIcon:g,searchQuery:h,filteredIcons:b,handleToggle:j,handleIconSelect:S,handleSearchChange:w,handleClose:C,triggerRef:y,dropdownRef:k}},Ro={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px",maxHeight:"320px",overflow:"hidden",display:"flex",flexDirection:"column"},searchInput:{marginBottom:"12px",flexShrink:0},iconGrid:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"8px",overflowY:"auto",padding:"4px",color:"color-black",flexGrow:1},iconItem:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:8,transition:"all 0.2s ease-in-out"}},qf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},Uf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Gf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},hi=({label:e,placeholder:o="Select an icon",helperText:t,views:n={},size:a="md",shape:l="default",variant:s="default",error:c=!1,isDisabled:d=!1,isReadOnly:u=!1,showSearch:g=!0,isOpen:m,selectedIcon:h,searchQuery:f,filteredIcons:y,handleToggle:k,handleIconSelect:b,handleSearchChange:C,triggerRef:j,dropdownRef:S,handleClose:w,onChange:x,value:T,defaultValue:v,onOpen:M,onClose:A,closeOnSelect:P,...F})=>{const{getColor:V}=i.useTheme(),z={...Ro.container,...n==null?void 0:n.container},I={...Ro.trigger,...qf[a],...Uf[l],...Gf[s],...c&&{borderColor:"color-red-500"},...d&&{opacity:.6,cursor:"not-allowed"},...!d&&!u&&{_hover:{borderColor:"color-gray-300"}},...n==null?void 0:n.trigger},W={...Ro.dropdown,...n==null?void 0:n.dropdown},H={...Ro.iconGrid,...n==null?void 0:n.iconGrid};return r.jsxs(i.View,{...z,...F,children:[e&&r.jsx(i.Text,{fontSize:a==="xs"?"12px":a==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...n==null?void 0:n.label,children:e}),r.jsxs(i.View,{ref:j,onClick:d||u?void 0:k,...I,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:h?r.jsxs(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[r.jsx(Vr,{name:h,widthHeight:16}),r.jsx(i.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h})]}):r.jsx(i.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!u&&!d&&r.jsx(ue,{widthHeight:16,color:"color-gray-500",orientation:m?"up":"down"})]}),m&&r.jsxs(i.View,{ref:S,...W,children:[g&&r.jsx(i.View,{...Ro.searchInput,...n==null?void 0:n.searchInput,children:r.jsx(Me,{placeholder:"Search icons...",value:f,onChange:R=>C(R),size:"sm",autoFocus:!0})}),r.jsx(i.View,{...H,children:y.length>0?y.map(R=>r.jsx(i.View,{...Ro.iconItem,onClick:()=>b(R),title:R,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:h===R?"#EFF6FF":"transparent",borderWidth:h===R?"1px":"0px",borderStyle:"solid",borderColor:h===R?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:r.jsx(Vr,{name:R,widthHeight:20})},R)):r.jsx(i.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No icons found"})})})]}),t&&r.jsx(i.Text,{color:c?"color-red-500":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:t})]})},Yf=e=>{const o=ke(e),t={...e,value:o.value??e.value??e.defaultValue},n=gi(t),a=l=>{n.handleIconSelect(l),o.onChange(l)};return r.jsx(hi,{...n,...t,handleIconSelect:a})},Kf=Yf,oo={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"320px",maxHeight:"400px",overflow:"hidden"},searchInput:{marginBottom:"12px"},categoryTabs:{display:"flex",flexDirection:"row",flexWrap:"wrap",borderBottom:"1px solid color-gray-100",marginBottom:"12px",overflowX:"auto"},categoryTab:{padding:"8px 12px",cursor:"pointer",borderBottom:"2px solid transparent",transition:"all 0.2s ease-in-out",fontSize:"14px",fontWeight:"500",color:"color-gray-600",whiteSpace:"nowrap",borderRadius:"8px 8px 0 0"},emojiGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"4px",maxHeight:"240px",overflowY:"auto",padding:"4px",color:"color-black"},emoji:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:6,fontSize:"20px",transition:"all 0.2s ease-in-out"}},Xf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},Jf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Qf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Zf={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},ey=[{emoji:"😀",name:"grinning face",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😃",name:"grinning face with big eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😄",name:"grinning face with smiling eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😁",name:"beaming face with smiling eyes",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😆",name:"grinning squinting face",category:"smileys",keywords:["happy","laugh","smile"]},{emoji:"😅",name:"grinning face with sweat",category:"smileys",keywords:["happy","sweat","relief"]},{emoji:"🤣",name:"rolling on the floor laughing",category:"smileys",keywords:["laugh","funny","rofl"]},{emoji:"😂",name:"face with tears of joy",category:"smileys",keywords:["laugh","cry","joy"]},{emoji:"🙂",name:"slightly smiling face",category:"smileys",keywords:["smile","happy"]},{emoji:"🙃",name:"upside-down face",category:"smileys",keywords:["silly","upside down"]},{emoji:"😉",name:"winking face",category:"smileys",keywords:["wink","flirt"]},{emoji:"😊",name:"smiling face with smiling eyes",category:"smileys",keywords:["happy","smile","blush"]},{emoji:"😇",name:"smiling face with halo",category:"smileys",keywords:["angel","innocent"]},{emoji:"🥰",name:"smiling face with hearts",category:"smileys",keywords:["love","hearts","adore"]},{emoji:"😍",name:"smiling face with heart-eyes",category:"smileys",keywords:["love","heart","eyes"]},{emoji:"🤩",name:"star-struck",category:"smileys",keywords:["star","struck","amazed"]},{emoji:"😘",name:"face blowing a kiss",category:"smileys",keywords:["kiss","love","flirt"]},{emoji:"😗",name:"kissing face",category:"smileys",keywords:["kiss","love"]},{emoji:"☺️",name:"smiling face",category:"smileys",keywords:["smile","happy","content"]},{emoji:"😚",name:"kissing face with closed eyes",category:"smileys",keywords:["kiss","love","closed eyes"]},{emoji:"😙",name:"kissing face with smiling eyes",category:"smileys",keywords:["kiss","love","smile"]},{emoji:"🥲",name:"smiling face with tear",category:"smileys",keywords:["happy","cry","tear","bittersweet"]},{emoji:"😋",name:"face savoring food",category:"smileys",keywords:["yum","delicious","food"]},{emoji:"😛",name:"face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"😜",name:"winking face with tongue",category:"smileys",keywords:["wink","tongue","silly"]},{emoji:"🤪",name:"zany face",category:"smileys",keywords:["crazy","silly","wild"]},{emoji:"😝",name:"squinting face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"🤑",name:"money-mouth face",category:"smileys",keywords:["money","rich","greedy"]},{emoji:"🤗",name:"hugging face",category:"smileys",keywords:["hug","love","care"]},{emoji:"🤭",name:"face with hand over mouth",category:"smileys",keywords:["oops","secret","quiet"]},{emoji:"🫢",name:"face with open eyes and hand over mouth",category:"smileys",keywords:["surprise","shock","oops"]},{emoji:"🫣",name:"face with peeking eye",category:"smileys",keywords:["peek","shy","embarrassed"]},{emoji:"🤫",name:"shushing face",category:"smileys",keywords:["quiet","secret","shh"]},{emoji:"🤔",name:"thinking face",category:"smileys",keywords:["think","consider","hmm"]},{emoji:"🫡",name:"saluting face",category:"smileys",keywords:["salute","respect","military"]},{emoji:"🤐",name:"zipper-mouth face",category:"smileys",keywords:["quiet","secret","zip"]},{emoji:"🤨",name:"face with raised eyebrow",category:"smileys",keywords:["suspicious","doubt","skeptical"]},{emoji:"😐",name:"neutral face",category:"smileys",keywords:["neutral","meh","blank"]},{emoji:"😑",name:"expressionless face",category:"smileys",keywords:["blank","deadpan","meh"]},{emoji:"😶",name:"face without mouth",category:"smileys",keywords:["quiet","speechless","silent"]},{emoji:"🫥",name:"dotted line face",category:"smileys",keywords:["invisible","depressed","disappear"]},{emoji:"😏",name:"smirking face",category:"smileys",keywords:["smirk","smug","confident"]},{emoji:"😒",name:"unamused face",category:"smileys",keywords:["unamused","bored","annoyed"]},{emoji:"🙄",name:"face with rolling eyes",category:"smileys",keywords:["eye roll","annoyed","whatever"]},{emoji:"😬",name:"grimacing face",category:"smileys",keywords:["grimace","awkward","oops"]},{emoji:"😮‍💨",name:"face exhaling",category:"smileys",keywords:["sigh","relief","tired"]},{emoji:"🤥",name:"lying face",category:"smileys",keywords:["lie","pinocchio","dishonest"]},{emoji:"😌",name:"relieved face",category:"smileys",keywords:["relief","calm","peaceful"]},{emoji:"😔",name:"pensive face",category:"smileys",keywords:["sad","thoughtful","pensive"]},{emoji:"😪",name:"sleepy face",category:"smileys",keywords:["sleepy","tired","drowsy"]},{emoji:"🤤",name:"drooling face",category:"smileys",keywords:["drool","desire","sleep"]},{emoji:"😴",name:"sleeping face",category:"smileys",keywords:["sleep","tired","zzz"]},{emoji:"😷",name:"face with medical mask",category:"smileys",keywords:["mask","sick","doctor"]},{emoji:"🤒",name:"face with thermometer",category:"smileys",keywords:["sick","fever","ill"]},{emoji:"🤕",name:"face with head-bandage",category:"smileys",keywords:["hurt","injured","bandage"]},{emoji:"🤢",name:"nauseated face",category:"smileys",keywords:["sick","nausea","disgusted"]},{emoji:"🤮",name:"face vomiting",category:"smileys",keywords:["vomit","sick","disgusted"]},{emoji:"🤧",name:"sneezing face",category:"smileys",keywords:["sneeze","sick","gesundheit"]},{emoji:"🥵",name:"hot face",category:"smileys",keywords:["hot","heat","sweat"]},{emoji:"🥶",name:"cold face",category:"smileys",keywords:["cold","freeze","blue"]},{emoji:"🥴",name:"woozy face",category:"smileys",keywords:["dizzy","drunk","confused"]},{emoji:"😵",name:"dizzy face",category:"smileys",keywords:["dizzy","confused","knocked out"]},{emoji:"😵‍💫",name:"face with spiral eyes",category:"smileys",keywords:["dizzy","hypnotized","confused"]},{emoji:"🤯",name:"exploding head",category:"smileys",keywords:["mind blown","shocked","amazed"]},{emoji:"🤠",name:"cowboy hat face",category:"smileys",keywords:["cowboy","hat","western"]},{emoji:"🥳",name:"partying face",category:"smileys",keywords:["party","celebration","birthday"]},{emoji:"🥸",name:"disguised face",category:"smileys",keywords:["disguise","glasses","incognito"]},{emoji:"😎",name:"smiling face with sunglasses",category:"smileys",keywords:["cool","sunglasses","awesome"]},{emoji:"🤓",name:"nerd face",category:"smileys",keywords:["nerd","geek","smart"]},{emoji:"🧐",name:"face with monocle",category:"smileys",keywords:["monocle","fancy","inspection"]},{emoji:"👋",name:"waving hand",category:"people",keywords:["wave","hello","goodbye"]},{emoji:"🤚",name:"raised back of hand",category:"people",keywords:["hand","stop"]},{emoji:"🖐️",name:"hand with fingers splayed",category:"people",keywords:["hand","five"]},{emoji:"✋",name:"raised hand",category:"people",keywords:["hand","stop","high five"]},{emoji:"🖖",name:"vulcan salute",category:"people",keywords:["spock","vulcan"]},{emoji:"👌",name:"OK hand",category:"people",keywords:["ok","perfect"]},{emoji:"🤌",name:"pinched fingers",category:"people",keywords:["italian","chef kiss"]},{emoji:"🤏",name:"pinching hand",category:"people",keywords:["small","tiny"]},{emoji:"✌️",name:"victory hand",category:"people",keywords:["peace","victory"]},{emoji:"🤞",name:"crossed fingers",category:"people",keywords:["luck","hope"]},{emoji:"🤟",name:"love-you gesture",category:"people",keywords:["love","you"]},{emoji:"🤘",name:"sign of the horns",category:"people",keywords:["rock","metal"]},{emoji:"🤙",name:"call me hand",category:"people",keywords:["call","phone"]},{emoji:"👈",name:"backhand index pointing left",category:"people",keywords:["point","left"]},{emoji:"👉",name:"backhand index pointing right",category:"people",keywords:["point","right"]},{emoji:"👆",name:"backhand index pointing up",category:"people",keywords:["point","up"]},{emoji:"🖕",name:"middle finger",category:"people",keywords:["middle finger","rude"]},{emoji:"👇",name:"backhand index pointing down",category:"people",keywords:["point","down"]},{emoji:"☝️",name:"index pointing up",category:"people",keywords:["point","up","one"]},{emoji:"👍",name:"thumbs up",category:"people",keywords:["thumbs up","good","yes"]},{emoji:"👎",name:"thumbs down",category:"people",keywords:["thumbs down","bad","no"]},{emoji:"✊",name:"raised fist",category:"people",keywords:["fist","power","solidarity"]},{emoji:"👊",name:"oncoming fist",category:"people",keywords:["fist","punch","bump"]},{emoji:"🤛",name:"left-facing fist",category:"people",keywords:["fist","bump","left"]},{emoji:"🤜",name:"right-facing fist",category:"people",keywords:["fist","bump","right"]},{emoji:"👏",name:"clapping hands",category:"people",keywords:["clap","applause","bravo"]},{emoji:"🙌",name:"raising hands",category:"people",keywords:["celebration","hooray","praise"]},{emoji:"👐",name:"open hands",category:"people",keywords:["open","hug","jazz hands"]},{emoji:"🤲",name:"palms up together",category:"people",keywords:["prayer","please","hope"]},{emoji:"🤝",name:"handshake",category:"people",keywords:["handshake","deal","agreement"]},{emoji:"🙏",name:"folded hands",category:"people",keywords:["prayer","thanks","please"]},{emoji:"✍️",name:"writing hand",category:"people",keywords:["write","author","signature"]},{emoji:"💅",name:"nail polish",category:"people",keywords:["nails","beauty","manicure"]},{emoji:"🤳",name:"selfie",category:"people",keywords:["selfie","camera","phone"]},{emoji:"💪",name:"flexed biceps",category:"people",keywords:["muscle","strong","flex"]},{emoji:"🦾",name:"mechanical arm",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦿",name:"mechanical leg",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦵",name:"leg",category:"people",keywords:["leg","limb","kick"]},{emoji:"🦶",name:"foot",category:"people",keywords:["foot","kick","stomp"]},{emoji:"👂",name:"ear",category:"people",keywords:["ear","hear","listen"]},{emoji:"🦻",name:"ear with hearing aid",category:"people",keywords:["hearing aid","deaf","accessibility"]},{emoji:"👃",name:"nose",category:"people",keywords:["nose","smell","sniff"]},{emoji:"🧠",name:"brain",category:"people",keywords:["brain","smart","think"]},{emoji:"🫀",name:"anatomical heart",category:"people",keywords:["heart","organ","love"]},{emoji:"🫁",name:"lungs",category:"people",keywords:["lungs","breathe","organ"]},{emoji:"🦷",name:"tooth",category:"people",keywords:["tooth","dental","smile"]},{emoji:"🦴",name:"bone",category:"people",keywords:["bone","skeleton","dog"]},{emoji:"👀",name:"eyes",category:"people",keywords:["eyes","look","see"]},{emoji:"👁️",name:"eye",category:"people",keywords:["eye","see","watch"]},{emoji:"👅",name:"tongue",category:"people",keywords:["tongue","taste","lick"]},{emoji:"👄",name:"mouth",category:"people",keywords:["mouth","lips","kiss"]},{emoji:"🫦",name:"biting lip",category:"people",keywords:["lip","bite","nervous"]},{emoji:"👶",name:"baby",category:"people",keywords:["baby","infant","child"]},{emoji:"🧒",name:"child",category:"people",keywords:["child","kid","young"]},{emoji:"👦",name:"boy",category:"people",keywords:["boy","child","male"]},{emoji:"👧",name:"girl",category:"people",keywords:["girl","child","female"]},{emoji:"🧑",name:"person",category:"people",keywords:["person","adult","human"]},{emoji:"👱",name:"person: blond hair",category:"people",keywords:["blond","hair","person"]},{emoji:"👨",name:"man",category:"people",keywords:["man","male","adult"]},{emoji:"🧔",name:"person: beard",category:"people",keywords:["beard","man","facial hair"]},{emoji:"👩",name:"woman",category:"people",keywords:["woman","female","adult"]},{emoji:"🧓",name:"older person",category:"people",keywords:["old","elderly","senior"]},{emoji:"👴",name:"old man",category:"people",keywords:["old","man","elderly"]},{emoji:"👵",name:"old woman",category:"people",keywords:["old","woman","elderly"]},{emoji:"🐶",name:"dog face",category:"animals",keywords:["dog","pet","animal"]},{emoji:"🐱",name:"cat face",category:"animals",keywords:["cat","pet","animal"]},{emoji:"🐭",name:"mouse face",category:"animals",keywords:["mouse","animal"]},{emoji:"🐹",name:"hamster",category:"animals",keywords:["hamster","pet"]},{emoji:"🐰",name:"rabbit face",category:"animals",keywords:["rabbit","bunny"]},{emoji:"🦊",name:"fox",category:"animals",keywords:["fox","animal"]},{emoji:"🐻",name:"bear",category:"animals",keywords:["bear","animal"]},{emoji:"🐼",name:"panda",category:"animals",keywords:["panda","bear"]},{emoji:"🐨",name:"koala",category:"animals",keywords:["koala","australia","marsupial"]},{emoji:"🐯",name:"tiger face",category:"animals",keywords:["tiger","cat","wild"]},{emoji:"🦁",name:"lion",category:"animals",keywords:["lion","king","cat"]},{emoji:"🐮",name:"cow face",category:"animals",keywords:["cow","moo","farm"]},{emoji:"🐷",name:"pig face",category:"animals",keywords:["pig","oink","farm"]},{emoji:"🐽",name:"pig nose",category:"animals",keywords:["pig","nose","snout"]},{emoji:"🐸",name:"frog",category:"animals",keywords:["frog","amphibian","green"]},{emoji:"🐵",name:"monkey face",category:"animals",keywords:["monkey","primate","banana"]},{emoji:"🙈",name:"see-no-evil monkey",category:"animals",keywords:["monkey","see no evil","eyes"]},{emoji:"🙉",name:"hear-no-evil monkey",category:"animals",keywords:["monkey","hear no evil","ears"]},{emoji:"🙊",name:"speak-no-evil monkey",category:"animals",keywords:["monkey","speak no evil","mouth"]},{emoji:"🐒",name:"monkey",category:"animals",keywords:["monkey","primate","zoo"]},{emoji:"🦍",name:"gorilla",category:"animals",keywords:["gorilla","ape","strong"]},{emoji:"🦧",name:"orangutan",category:"animals",keywords:["orangutan","ape","orange"]},{emoji:"🐺",name:"wolf",category:"animals",keywords:["wolf","howl","wild"]},{emoji:"🐗",name:"boar",category:"animals",keywords:["boar","pig","wild"]},{emoji:"🐴",name:"horse face",category:"animals",keywords:["horse","neigh","ride"]},{emoji:"🐎",name:"horse",category:"animals",keywords:["horse","racing","gallop"]},{emoji:"🦄",name:"unicorn",category:"animals",keywords:["unicorn","magical","horn"]},{emoji:"🦓",name:"zebra",category:"animals",keywords:["zebra","stripes","africa"]},{emoji:"🦌",name:"deer",category:"animals",keywords:["deer","antlers","forest"]},{emoji:"🦏",name:"rhinoceros",category:"animals",keywords:["rhino","horn","africa"]},{emoji:"🦛",name:"hippopotamus",category:"animals",keywords:["hippo","water","africa"]},{emoji:"🐘",name:"elephant",category:"animals",keywords:["elephant","trunk","memory"]},{emoji:"🦒",name:"giraffe",category:"animals",keywords:["giraffe","tall","neck"]},{emoji:"🦘",name:"kangaroo",category:"animals",keywords:["kangaroo","hop","australia"]},{emoji:"🦥",name:"sloth",category:"animals",keywords:["sloth","slow","lazy"]},{emoji:"🦦",name:"otter",category:"animals",keywords:["otter","water","cute"]},{emoji:"🦨",name:"skunk",category:"animals",keywords:["skunk","smell","stripe"]},{emoji:"🦡",name:"badger",category:"animals",keywords:["badger","honey","dig"]},{emoji:"🐾",name:"paw prints",category:"animals",keywords:["paw","prints","tracks"]},{emoji:"🐔",name:"chicken",category:"animals",keywords:["chicken","rooster","farm"]},{emoji:"🐓",name:"rooster",category:"animals",keywords:["rooster","cock","morning"]},{emoji:"🐣",name:"hatching chick",category:"animals",keywords:["chick","hatching","egg"]},{emoji:"🐤",name:"baby chick",category:"animals",keywords:["chick","baby","yellow"]},{emoji:"🐥",name:"front-facing baby chick",category:"animals",keywords:["chick","baby","cute"]},{emoji:"🦆",name:"duck",category:"animals",keywords:["duck","quack","water"]},{emoji:"🦅",name:"eagle",category:"animals",keywords:["eagle","bird","freedom"]},{emoji:"🦉",name:"owl",category:"animals",keywords:["owl","wise","night"]},{emoji:"🦇",name:"bat",category:"animals",keywords:["bat","vampire","night"]},{emoji:"",name:"bug",category:"animals",keywords:["bug","insect","crawl"]},{emoji:"🦋",name:"butterfly",category:"animals",keywords:["butterfly","beautiful","fly"]},{emoji:"🐌",name:"snail",category:"animals",keywords:["snail","slow","shell"]},{emoji:"🐞",name:"lady beetle",category:"animals",keywords:["ladybug","beetle","red"]},{emoji:"🐜",name:"ant",category:"animals",keywords:["ant","work","colony"]},{emoji:"🦟",name:"mosquito",category:"animals",keywords:["mosquito","bite","buzz"]},{emoji:"🕷️",name:"spider",category:"animals",keywords:["spider","web","eight legs"]},{emoji:"🦂",name:"scorpion",category:"animals",keywords:["scorpion","sting","desert"]},{emoji:"🐢",name:"turtle",category:"animals",keywords:["turtle","slow","shell"]},{emoji:"🐍",name:"snake",category:"animals",keywords:["snake","slither","reptile"]},{emoji:"🦎",name:"lizard",category:"animals",keywords:["lizard","gecko","reptile"]},{emoji:"🐙",name:"octopus",category:"animals",keywords:["octopus","tentacles","sea"]},{emoji:"🦑",name:"squid",category:"animals",keywords:["squid","tentacles","ocean"]},{emoji:"🦐",name:"shrimp",category:"animals",keywords:["shrimp","seafood","small"]},{emoji:"🦞",name:"lobster",category:"animals",keywords:["lobster","claws","red"]},{emoji:"🦀",name:"crab",category:"animals",keywords:["crab","claws","beach"]},{emoji:"🐡",name:"blowfish",category:"animals",keywords:["blowfish","puffer","spiky"]},{emoji:"🐠",name:"tropical fish",category:"animals",keywords:["fish","tropical","colorful"]},{emoji:"🐟",name:"fish",category:"animals",keywords:["fish","swim","water"]},{emoji:"🐬",name:"dolphin",category:"animals",keywords:["dolphin","smart","ocean"]},{emoji:"🐳",name:"spouting whale",category:"animals",keywords:["whale","spout","big"]},{emoji:"🐋",name:"whale",category:"animals",keywords:["whale","ocean","huge"]},{emoji:"🦈",name:"shark",category:"animals",keywords:["shark","teeth","dangerous"]},{emoji:"🐊",name:"crocodile",category:"animals",keywords:["crocodile","teeth","swamp"]},{emoji:"🌸",name:"cherry blossom",category:"animals",keywords:["flower","spring","pink"]},{emoji:"💐",name:"bouquet",category:"animals",keywords:["flowers","bouquet","gift"]},{emoji:"🌺",name:"hibiscus",category:"animals",keywords:["flower","tropical","red"]},{emoji:"🌻",name:"sunflower",category:"animals",keywords:["sunflower","yellow","big"]},{emoji:"🌹",name:"rose",category:"animals",keywords:["rose","love","red"]},{emoji:"🥀",name:"wilted flower",category:"animals",keywords:["flower","wilted","sad"]},{emoji:"🌷",name:"tulip",category:"animals",keywords:["tulip","spring","netherlands"]},{emoji:"🌼",name:"daisy",category:"animals",keywords:["daisy","white","simple"]},{emoji:"🌱",name:"seedling",category:"animals",keywords:["plant","grow","green"]},{emoji:"🌿",name:"herb",category:"animals",keywords:["herb","green","leaf"]},{emoji:"🍀",name:"four leaf clover",category:"animals",keywords:["clover","luck","green"]},{emoji:"🌳",name:"deciduous tree",category:"animals",keywords:["tree","nature","green"]},{emoji:"🌲",name:"evergreen tree",category:"animals",keywords:["tree","pine","christmas"]},{emoji:"🌴",name:"palm tree",category:"animals",keywords:["palm","tropical","beach"]},{emoji:"🌵",name:"cactus",category:"animals",keywords:["cactus","desert","spiky"]},{emoji:"🍎",name:"red apple",category:"food",keywords:["apple","fruit"]},{emoji:"🍊",name:"tangerine",category:"food",keywords:["orange","fruit"]},{emoji:"🍋",name:"lemon",category:"food",keywords:["lemon","fruit"]},{emoji:"🍌",name:"banana",category:"food",keywords:["banana","fruit"]},{emoji:"🍉",name:"watermelon",category:"food",keywords:["watermelon","fruit"]},{emoji:"🍇",name:"grapes",category:"food",keywords:["grapes","fruit"]},{emoji:"🍓",name:"strawberry",category:"food",keywords:["strawberry","fruit"]},{emoji:"🫐",name:"blueberries",category:"food",keywords:["blueberry","fruit"]},{emoji:"🥝",name:"kiwi fruit",category:"food",keywords:["kiwi","fruit","green"]},{emoji:"🍅",name:"tomato",category:"food",keywords:["tomato","red","vegetable"]},{emoji:"🫒",name:"olive",category:"food",keywords:["olive","green","oil"]},{emoji:"🥥",name:"coconut",category:"food",keywords:["coconut","tropical","milk"]},{emoji:"🥑",name:"avocado",category:"food",keywords:["avocado","green","healthy"]},{emoji:"🍆",name:"eggplant",category:"food",keywords:["eggplant","purple","vegetable"]},{emoji:"🥔",name:"potato",category:"food",keywords:["potato","vegetable","starch"]},{emoji:"🥕",name:"carrot",category:"food",keywords:["carrot","orange","vegetable"]},{emoji:"🌽",name:"ear of corn",category:"food",keywords:["corn","yellow","vegetable"]},{emoji:"🌶️",name:"hot pepper",category:"food",keywords:["pepper","hot","spicy"]},{emoji:"🫑",name:"bell pepper",category:"food",keywords:["pepper","bell","vegetable"]},{emoji:"🥒",name:"cucumber",category:"food",keywords:["cucumber","green","vegetable"]},{emoji:"🥬",name:"leafy greens",category:"food",keywords:["lettuce","greens","salad"]},{emoji:"🥦",name:"broccoli",category:"food",keywords:["broccoli","green","vegetable"]},{emoji:"🧄",name:"garlic",category:"food",keywords:["garlic","flavor","cooking"]},{emoji:"🧅",name:"onion",category:"food",keywords:["onion","cry","cooking"]},{emoji:"🍄",name:"mushroom",category:"food",keywords:["mushroom","fungi","cooking"]},{emoji:"🥜",name:"peanuts",category:"food",keywords:["peanuts","nuts","snack"]},{emoji:"🌰",name:"chestnut",category:"food",keywords:["chestnut","nut","autumn"]},{emoji:"🍞",name:"bread",category:"food",keywords:["bread","loaf","carbs"]},{emoji:"🥐",name:"croissant",category:"food",keywords:["croissant","french","pastry"]},{emoji:"🥖",name:"baguette bread",category:"food",keywords:["baguette","french","bread"]},{emoji:"🫓",name:"flatbread",category:"food",keywords:["flatbread","bread","thin"]},{emoji:"🥨",name:"pretzel",category:"food",keywords:["pretzel","twisted","snack"]},{emoji:"🥯",name:"bagel",category:"food",keywords:["bagel","round","breakfast"]},{emoji:"🥞",name:"pancakes",category:"food",keywords:["pancakes","breakfast","syrup"]},{emoji:"🧇",name:"waffle",category:"food",keywords:["waffle","breakfast","squares"]},{emoji:"🧀",name:"cheese wedge",category:"food",keywords:["cheese","dairy","yellow"]},{emoji:"🍖",name:"meat on bone",category:"food",keywords:["meat","bone","protein"]},{emoji:"🍗",name:"poultry leg",category:"food",keywords:["chicken","leg","meat"]},{emoji:"🥩",name:"cut of meat",category:"food",keywords:["steak","meat","red"]},{emoji:"🥓",name:"bacon",category:"food",keywords:["bacon","pork","breakfast"]},{emoji:"🍔",name:"hamburger",category:"food",keywords:["burger","hamburger","fast food"]},{emoji:"🍟",name:"french fries",category:"food",keywords:["fries","potato","fast food"]},{emoji:"🍕",name:"pizza",category:"food",keywords:["pizza","slice","italian"]},{emoji:"🌭",name:"hot dog",category:"food",keywords:["hot dog","sausage","fast food"]},{emoji:"🥪",name:"sandwich",category:"food",keywords:["sandwich","bread","lunch"]},{emoji:"🌮",name:"taco",category:"food",keywords:["taco","mexican","shell"]},{emoji:"🌯",name:"burrito",category:"food",keywords:["burrito","wrap","mexican"]},{emoji:"🫔",name:"tamale",category:"food",keywords:["tamale","mexican","corn"]},{emoji:"🥙",name:"stuffed flatbread",category:"food",keywords:["pita","flatbread","stuffed"]},{emoji:"🧆",name:"falafel",category:"food",keywords:["falafel","middle eastern","chickpea"]},{emoji:"🥚",name:"egg",category:"food",keywords:["egg","protein","breakfast"]},{emoji:"🍳",name:"cooking",category:"food",keywords:["cooking","frying pan","egg"]},{emoji:"🥘",name:"shallow pan of food",category:"food",keywords:["paella","pan","cooking"]},{emoji:"🍲",name:"pot of food",category:"food",keywords:["stew","pot","cooking"]},{emoji:"🫕",name:"fondue",category:"food",keywords:["fondue","cheese","pot"]},{emoji:"🥣",name:"bowl with spoon",category:"food",keywords:["bowl","cereal","soup"]},{emoji:"🥗",name:"green salad",category:"food",keywords:["salad","healthy","greens"]},{emoji:"🍿",name:"popcorn",category:"food",keywords:["popcorn","movie","snack"]},{emoji:"🧈",name:"butter",category:"food",keywords:["butter","dairy","spread"]},{emoji:"🧂",name:"salt",category:"food",keywords:["salt","seasoning","white"]},{emoji:"🥫",name:"canned food",category:"food",keywords:["can","canned","preserved"]},{emoji:"🍱",name:"bento box",category:"food",keywords:["bento","japanese","lunch box"]},{emoji:"🍘",name:"rice cracker",category:"food",keywords:["rice","cracker","japanese"]},{emoji:"🍙",name:"rice ball",category:"food",keywords:["rice ball","onigiri","japanese"]},{emoji:"🍚",name:"cooked rice",category:"food",keywords:["rice","cooked","bowl"]},{emoji:"🍛",name:"curry rice",category:"food",keywords:["curry","rice","spicy"]},{emoji:"🍜",name:"steaming bowl",category:"food",keywords:["ramen","noodles","soup"]},{emoji:"🍝",name:"spaghetti",category:"food",keywords:["spaghetti","pasta","italian"]},{emoji:"🍠",name:"roasted sweet potato",category:"food",keywords:["sweet potato","roasted","orange"]},{emoji:"🍢",name:"oden",category:"food",keywords:["oden","japanese","skewer"]},{emoji:"🍣",name:"sushi",category:"food",keywords:["sushi","japanese","fish"]},{emoji:"🍤",name:"fried shrimp",category:"food",keywords:["shrimp","fried","tempura"]},{emoji:"🍥",name:"fish cake with swirl",category:"food",keywords:["fish cake","japanese","swirl"]},{emoji:"🥮",name:"moon cake",category:"food",keywords:["moon cake","chinese","festival"]},{emoji:"🍡",name:"dango",category:"food",keywords:["dango","japanese","sweet"]},{emoji:"🥟",name:"dumpling",category:"food",keywords:["dumpling","chinese","steamed"]},{emoji:"🥠",name:"fortune cookie",category:"food",keywords:["fortune cookie","chinese","luck"]},{emoji:"🥡",name:"takeout box",category:"food",keywords:["takeout","chinese","box"]},{emoji:"🦀",name:"crab",category:"food",keywords:["crab","seafood","claws"]},{emoji:"🦞",name:"lobster",category:"food",keywords:["lobster","seafood","red"]},{emoji:"🦐",name:"shrimp",category:"food",keywords:["shrimp","seafood","small"]},{emoji:"🦑",name:"squid",category:"food",keywords:["squid","seafood","tentacles"]},{emoji:"🦪",name:"oyster",category:"food",keywords:["oyster","seafood","shell"]},{emoji:"🍦",name:"soft ice cream",category:"food",keywords:["ice cream","soft serve","cone"]},{emoji:"🍧",name:"shaved ice",category:"food",keywords:["shaved ice","snow cone","cold"]},{emoji:"🍨",name:"ice cream",category:"food",keywords:["ice cream","dessert","cold"]},{emoji:"🍩",name:"doughnut",category:"food",keywords:["donut","doughnut","sweet"]},{emoji:"🍪",name:"cookie",category:"food",keywords:["cookie","sweet","baked"]},{emoji:"🎂",name:"birthday cake",category:"food",keywords:["cake","birthday","celebration"]},{emoji:"🍰",name:"shortcake",category:"food",keywords:["cake","slice","dessert"]},{emoji:"🧁",name:"cupcake",category:"food",keywords:["cupcake","muffin","sweet"]},{emoji:"🥧",name:"pie",category:"food",keywords:["pie","dessert","slice"]},{emoji:"🍫",name:"chocolate bar",category:"food",keywords:["chocolate","bar","sweet"]},{emoji:"🍬",name:"candy",category:"food",keywords:["candy","sweet","wrapper"]},{emoji:"🍭",name:"lollipop",category:"food",keywords:["lollipop","candy","stick"]},{emoji:"🍮",name:"custard",category:"food",keywords:["custard","pudding","dessert"]},{emoji:"🍯",name:"honey pot",category:"food",keywords:["honey","sweet","bee"]},{emoji:"🍼",name:"baby bottle",category:"food",keywords:["bottle","baby","milk"]},{emoji:"🥛",name:"glass of milk",category:"food",keywords:["milk","glass","dairy"]},{emoji:"☕",name:"hot beverage",category:"food",keywords:["coffee","tea","hot"]},{emoji:"🫖",name:"teapot",category:"food",keywords:["teapot","tea","hot"]},{emoji:"🍵",name:"teacup without handle",category:"food",keywords:["tea","green tea","cup"]},{emoji:"🍶",name:"sake",category:"food",keywords:["sake","japanese","alcohol"]},{emoji:"🍾",name:"bottle with popping cork",category:"food",keywords:["champagne","celebration","cork"]},{emoji:"🍷",name:"wine glass",category:"food",keywords:["wine","glass","alcohol"]},{emoji:"🍸",name:"cocktail glass",category:"food",keywords:["cocktail","martini","alcohol"]},{emoji:"🍹",name:"tropical drink",category:"food",keywords:["tropical","cocktail","umbrella"]},{emoji:"🍺",name:"beer mug",category:"food",keywords:["beer","mug","alcohol"]},{emoji:"🍻",name:"clinking beer mugs",category:"food",keywords:["beer","cheers","celebration"]},{emoji:"🥂",name:"clinking glasses",category:"food",keywords:["champagne","cheers","celebration"]},{emoji:"🥃",name:"tumbler glass",category:"food",keywords:["whiskey","tumbler","alcohol"]},{emoji:"🫗",name:"pouring liquid",category:"food",keywords:["pour","liquid","drink"]},{emoji:"🥤",name:"cup with straw",category:"food",keywords:["soda","straw","drink"]},{emoji:"🧋",name:"bubble tea",category:"food",keywords:["bubble tea","boba","drink"]},{emoji:"🧃",name:"beverage box",category:"food",keywords:["juice box","drink","straw"]},{emoji:"🧉",name:"mate",category:"food",keywords:["mate","tea","south american"]},{emoji:"🧊",name:"ice",category:"food",keywords:["ice","cold","cube"]},{emoji:"⚽",name:"soccer ball",category:"activities",keywords:["soccer","football","sport"]},{emoji:"🏀",name:"basketball",category:"activities",keywords:["basketball","sport"]},{emoji:"🏈",name:"american football",category:"activities",keywords:["football","sport"]},{emoji:"⚾",name:"baseball",category:"activities",keywords:["baseball","sport"]},{emoji:"🥎",name:"softball",category:"activities",keywords:["softball","sport"]},{emoji:"🎾",name:"tennis",category:"activities",keywords:["tennis","sport"]},{emoji:"🚗",name:"automobile",category:"travel",keywords:["car","vehicle"]},{emoji:"🚕",name:"taxi",category:"travel",keywords:["taxi","car"]},{emoji:"🚙",name:"sport utility vehicle",category:"travel",keywords:["suv","car"]},{emoji:"🚌",name:"bus",category:"travel",keywords:["bus","vehicle"]},{emoji:"🚎",name:"trolleybus",category:"travel",keywords:["trolley","bus"]},{emoji:"🏎️",name:"racing car",category:"travel",keywords:["race","car","fast"]},{emoji:"💡",name:"light bulb",category:"objects",keywords:["idea","light","bulb"]},{emoji:"🔋",name:"battery",category:"objects",keywords:["battery","power"]},{emoji:"🖥️",name:"desktop computer",category:"objects",keywords:["computer","desktop"]},{emoji:"💻",name:"laptop",category:"objects",keywords:["laptop","computer"]},{emoji:"📱",name:"mobile phone",category:"objects",keywords:["phone","mobile"]},{emoji:"☎️",name:"telephone",category:"objects",keywords:["phone","telephone"]},{emoji:"❤️",name:"red heart",category:"symbols",keywords:["love","heart"]},{emoji:"🧡",name:"orange heart",category:"symbols",keywords:["love","heart"]},{emoji:"💛",name:"yellow heart",category:"symbols",keywords:["love","heart"]},{emoji:"💚",name:"green heart",category:"symbols",keywords:["love","heart"]},{emoji:"💙",name:"blue heart",category:"symbols",keywords:["love","heart"]},{emoji:"💜",name:"purple heart",category:"symbols",keywords:["love","heart"]},{emoji:"🖤",name:"black heart",category:"symbols",keywords:["love","heart"]},{emoji:"🤍",name:"white heart",category:"symbols",keywords:["love","heart"]},{emoji:"🏁",name:"chequered flag",category:"flags",keywords:["flag","race","finish"]},{emoji:"🚩",name:"triangular flag",category:"flags",keywords:["flag","warning"]},{emoji:"🏳️",name:"white flag",category:"flags",keywords:["flag","surrender"]},{emoji:"🏴",name:"black flag",category:"flags",keywords:["flag","pirate"]},{emoji:"🏳️‍🌈",name:"rainbow flag",category:"flags",keywords:["flag","rainbow","pride"]}],fi=e=>{const{value:o,defaultValue:t="",onChange:n,onEmojiSelect:a,isOpen:l,onOpen:s,onClose:c,closeOnSelect:d=!0,maxRecentEmojis:u=16,showRecentEmojis:g=!0,enabledCategories:m=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],customEmojis:h=[]}=e,[f,y]=p.useState(l??!1),[k,b]=p.useState(o??t),[C,j]=p.useState(""),[S,w]=p.useState("smileys"),[x,T]=p.useState([]),v=p.useRef(null),M=p.useRef(null),A=p.useMemo(()=>[...ey,...h],[h]),P=p.useMemo(()=>{let R=A;if(S!=="recent"?R=R.filter(D=>D.category===S):R=x,C){const D=C.toLowerCase();R=R.filter($=>$.name.toLowerCase().includes(D)||$.keywords.some(_=>_.toLowerCase().includes(D)))}return R},[A,S,x,C]);p.useEffect(()=>{o!==void 0&&b(o)},[o]),p.useEffect(()=>{l!==void 0&&y(l)},[l]),p.useEffect(()=>{if(g&&typeof localStorage<"u"){const R=localStorage.getItem("emojiPicker-recentEmojis");if(R)try{T(JSON.parse(R))}catch{}}},[g]),p.useEffect(()=>{if(typeof document>"u")return;const R=D=>{f&&v.current&&M.current&&!v.current.contains(D.target)&&!M.current.contains(D.target)&&H()};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[f]);const F=p.useCallback(R=>{g&&T(D=>{const $=D.filter(B=>B.emoji!==R.emoji),_=[R,...$].slice(0,u);return typeof localStorage<"u"&&localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(_)),_})},[g,u]),V=p.useCallback(()=>{const R=!f;y(R),R?(s==null||s(),j(""),g&&x.length>0?w("recent"):w("smileys")):c==null||c()},[f,s,c,g,x.length]),z=p.useCallback(R=>{b(R.emoji),F(R),n==null||n(R.emoji),a==null||a(R),d&&(y(!1),c==null||c())},[n,a,d,c,F]),I=p.useCallback(R=>{j(R),R&&S==="recent"&&w("smileys")},[S]),W=p.useCallback(R=>{w(R),j("")},[]),H=p.useCallback(()=>{y(!1),c==null||c()},[c]);return{isOpen:f,selectedEmoji:k,recentEmojis:x,searchQuery:C,activeCategory:S,filteredEmojis:P,handleToggle:V,handleEmojiSelect:z,handleSearchChange:I,handleCategoryChange:W,handleClose:H,triggerRef:v,dropdownRef:M}},yi=({id:e,name:o,label:t,placeholder:n="Select an emoji",helperText:a,views:l={},size:s="md",shape:c="default",variant:d="default",error:u=!1,isDisabled:g=!1,isReadOnly:m=!1,showSearch:h=!0,showCategories:f=!0,showRecentEmojis:y=!0,enabledCategories:k=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:b,selectedEmoji:C,recentEmojis:j,searchQuery:S,activeCategory:w,filteredEmojis:x,handleToggle:T,handleEmojiSelect:v,handleSearchChange:M,handleCategoryChange:A,handleClose:P,triggerRef:F,dropdownRef:V,onChange:z,onOpen:I,onClose:W,onEmojiSelect:H,customEmojis:R,closeOnSelect:D,maxRecentEmojis:$,value:_,defaultValue:B,...N})=>{const{getColor:Y}=i.useTheme(),ee={...oo.container,...l==null?void 0:l.container},L={...oo.trigger,...Xf[s],...Jf[c],...Qf[d],...u&&{borderColor:"color-red-500"},...g&&{opacity:.6,cursor:"not-allowed"},...!g&&!m&&{_hover:{borderColor:"color-gray-300"}},...l==null?void 0:l.trigger},E={...oo.dropdown,...l==null?void 0:l.dropdown},O={...oo.categoryTabs,...l==null?void 0:l.categoryTabs},K={...oo.emojiGrid,...l==null?void 0:l.emojiGrid},U=k.filter(J=>J==="recent"?y&&j.length>0:!0);return r.jsxs(i.View,{id:e,...ee,...N,children:[t&&r.jsx(i.Text,{fontSize:s==="xs"?"12px":s==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:F,onClick:g||m?void 0:T,...L,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,children:r.jsx(i.Text,{color:C?"color-gray-800":"color-gray-500",fontSize:"inherit",children:C||n})}),!m&&!g&&r.jsx(ue,{widthHeight:16,color:"color-gray-500",orientation:b?"up":"down"})]}),b&&r.jsxs(i.View,{ref:V,...E,children:[h&&r.jsx(i.View,{...oo.searchInput,...l==null?void 0:l.searchInput,children:r.jsx(Me,{placeholder:"Search emojis...",value:S,onChange:M,size:"sm"})}),f&&r.jsx(i.View,{...O,children:U.map(J=>r.jsx(i.View,{...oo.categoryTab,...w===J&&{borderBottomColor:"theme-primary",color:"theme-primary",backgroundColor:"color-blue-50"},onClick:()=>A(J),title:J.charAt(0).toUpperCase()+J.slice(1),...l==null?void 0:l.categoryTab,children:Zf[J]},J))}),r.jsx(i.View,{...K,children:x.length>0?x.map((J,Z)=>r.jsx(i.View,{...oo.emoji,onClick:()=>v(J),title:J.name,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},color:"color-gray-800",...l==null?void 0:l.emoji,children:J.emoji},`${J.emoji}-${Z}`)):r.jsx(i.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:S?"No emojis found":"No emojis in this category"})})})]}),a&&r.jsx(i.Text,{color:u?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},oy=e=>{const o=ke(e),t={...e,value:o.value??e.value??e.defaultValue},n=fi(t),a=l=>{var s;n.handleEmojiSelect(l),o.onChange(l.emoji),(s=e.onEmojiSelect)==null||s.call(e,l)};return r.jsx(yi,{...n,...t,handleEmojiSelect:a})},ry=oy,ty=({files:e,onRemove:o,maxHeight:t="120px",views:n={}})=>{if(e.length===0)return null;const a=p.useCallback(l=>l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(1)} KB`:`${(l/(1024*1024)).toFixed(1)} MB`,[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:t,overflowY:"auto",...n==null?void 0:n.container,children:e.map((l,s)=>{const c=l.url||"",d=l.type.startsWith("image/"),u=l.type.startsWith("video/"),g=l.type.startsWith("audio/");return r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",position:"relative",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...n==null?void 0:n.item,children:r.jsxs(Re,{children:[r.jsx(Re.Trigger,{children:r.jsxs(i.View,{position:"relative",children:[d&&c&&r.jsx(i.Image,{src:c,alt:l.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),u&&c&&r.jsx(i.View,{as:"video",src:c,alt:l.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),g&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx($o,{widthHeight:24,color:"color-black"})}),!d&&!u&&!g&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(ho,{widthHeight:24,color:"color-black"})}),o&&r.jsx(i.Button,{position:"absolute",top:"-4px",right:"-4px",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"50%",backgroundColor:"color-red-500",color:"white",fontSize:14,fontWeight:"bold",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"2px solid white",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"#DC2626"},onClick:m=>{m.stopPropagation(),o(s)},"aria-label":`Remove ${l.name}`,children:"×"})]})}),r.jsxs(Re.Content,{children:[d&&c&&r.jsx(i.Image,{src:c,alt:l.name,maxWidth:"300px"}),u&&c&&r.jsx(i.View,{as:"video",src:c,controls:!0,maxWidth:"300px"}),g&&c&&r.jsx(i.View,{as:"audio",src:c,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[l.name," (",a(l.size),")"]})]})]})},s)})})},ny=e=>{const o=fe("slider",e),t=ii(o);return r.jsx(si,{...o,...t})},xi=ny,ay=({url:e,type:o,name:t,onOpen:n})=>{const a=o.toLowerCase(),l=a.startsWith("image"),s=a.startsWith("video"),c=a.startsWith("audio"),d=()=>{n&&n()};return r.jsxs(i.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:d,children:[l&&r.jsx(i.Image,{src:e,alt:t,width:"100%",height:"100%",objectFit:"cover"}),s&&r.jsx(i.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:u=>u.stopPropagation()}),c&&r.jsx(i.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:u=>u.stopPropagation()}),!l&&!s&&!c&&r.jsx(ho,{widthHeight:24,color:"color-gray-600"})]})},to=Oo.create(e=>({modals:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...t,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,modals:t.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),ly=(e,o={},t={})=>{to.getState().show(e,o,t),to.getState().onShow(e,o)},bn=e=>{to.getState().onHide(e),to.getState().hide(typeof e=="string"?e:void 0)},iy={square:{borderRadius:0},rounded:{borderRadius:8}},sy={center:{justifyContent:"center",alignItems:"center"},top:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"flex-end",alignItems:"center"},bottom:{justifyContent:"center",alignItems:"flex-end"},left:{justifyContent:"flex-start",alignItems:"center"}},cy={xs:12,sm:16,md:20,lg:24,xl:28},ft={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},bi=p.memo(({children:e,blur:o,isOpen:t=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:l="center",views:s,...c})=>{const d=p.useCallback(()=>{n||a()},[n,a]);return r.jsx(i.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:d,visibility:t?"visible":"hidden",opacity:t?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...s==null?void 0:s.container,children:r.jsx(i.View,{position:"absolute",top:0,left:0,zIndex:1e3,width:"100vw",height:"100vh",display:"flex",backgroundColor:"color-dark-50-360",backdropFilter:o?`blur(${o}px)`:void 0,transition:"background-color 0.2s ease, backdrop-filter 0.2s ease",onClick:d,...sy[l],...c,...s==null?void 0:s.view,children:e})})}),dy={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},uy={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},py=p.memo(({children:e,shadow:o,isFullScreen:t=!1,shape:n="rounded",views:a,isOpen:l=!0,position:s,...c})=>{const d=typeof document!==void 0?dy:uy,u=p.useCallback(g=>{g&&g.stopPropagation&&g.stopPropagation()},[]);return r.jsx(i.Vertical,{cursor:"default",backgroundColor:"color-white",width:t?"100%":600,height:t?"100%":"fit-content",onClick:u,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:l?1:0,transform:l?"translateY(0)":"translateY(8px)",...o||d,...iy[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...c,...a==null?void 0:a.container,children:e})}),my=p.memo(({children:e,buttonColor:o="theme-primary",iconSize:t="md",buttonSize:n,buttonPosition:a="right",views:l,onClose:s,...c})=>{const d=s||bn,u=r.jsx(i.View,{onClick:()=>d(),children:r.jsx(We,{widthHeight:cy[n??t],color:o})});return r.jsxs(i.Horizontal,{justifyContent:a==="none"?"center":"space-between",alignItems:"center",paddingVertical:16,paddingHorizontal:24,borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",media:{mobile:{paddingVertical:12,paddingHorizontal:16}},...c,...l==null?void 0:l.header,children:[a==="left"&&u,e,a==="right"&&u]})}),gy=p.memo(({children:e,views:o,...t})=>r.jsx(i.View,{paddingVertical:16,paddingHorizontal:24,fontSize:ft.body.fontSize,fontWeight:ft.body.fontWeight,color:ft.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...t,...o==null?void 0:o.view,children:e})),hy=p.memo(({children:e,views:o,...t})=>r.jsx(i.Horizontal,{marginTop:"auto",alignItems:"center",justifyContent:"flex-end",paddingVertical:16,paddingHorizontal:24,borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",gap:12,media:{mobile:{paddingVertical:12,paddingHorizontal:16,gap:8}},...t,...o==null?void 0:o.container,children:e})),kn=({modals:e,onShow:o,onHide:t})=>{const n=to(a=>a.modals);return p.useEffect(()=>{o&&to.getState().setOnShow(o)},[o]),p.useEffect(()=>{t&&to.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(p.Fragment,{children:n.map((a,l)=>{const s=e[a.name];return s?r.jsx(bi,{isOpen:a.props.isVisible,onClose:()=>bn(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+l},children:r.jsx(s,{...a.props})},l):(console.error(`${a.name} modal doesn't exist`),null)})})},xo=({children:e})=>r.jsx(r.Fragment,{children:e});xo.Overlay=bi;xo.Container=py;xo.Header=my;xo.Body=gy;xo.Footer=hy;xo.Layout=kn;const pa={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},fy={left:{top:0,left:0,bottom:0,height:"100vh",borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{top:0,right:0,bottom:0,height:"100vh",borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"},top:{top:0,left:0,right:0,width:"100vw",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},bottom:{bottom:0,left:0,right:0,width:"100vw",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200"}},Cn=({isOpen:e,onClose:o,isClosePrevented:t,blur:n,children:a,...l})=>{const s=()=>{t||o()};return p.useEffect(()=>{const c=d=>{d.key==="Escape"&&e&&!t&&o()};return e&&document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[e,t,o]),r.jsx(i.View,{"data-testid":"drawer-overlay",role:"dialog","aria-modal":"true",position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,visibility:e?"visible":"hidden",onClick:s,opacity:e?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease",backgroundColor:e?"color-dark-50-360":"transparent",backdropFilter:n?`blur(${n}px)`:void 0,pointerEvents:e?"auto":"none",...l,children:a})},Sn=({placement:e="right",size:o="md",isOpen:t=!1,children:n,...a})=>{const l=g=>{g.stopPropagation()},c=e==="top"||e==="bottom"?{height:o==="full"?"100vh":pa[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":pa[o]||o,maxWidth:"100vw"},d=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",u=t?"translate3d(0, 0, 0)":e==="left"?"translate3d(-100%, 0, 0)":e==="right"?"translate3d(100%, 0, 0)":e==="top"?"translate3d(0, -100%, 0)":"translate3d(0, 100%, 0)";return r.jsx(i.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:d,...fy[e],...c,onClick:l,transform:u,willChange:"transform",transition:"transform 0.24s ease, box-shadow 0.2s ease",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",...a,children:n})},yy=({children:e,onClose:o,buttonPosition:t="right",...n})=>{const a=o&&r.jsx(i.View,{onClick:o,cursor:"pointer",padding:8,children:r.jsx(We,{widthHeight:20,color:"color-gray-500"})});return r.jsxs(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:t==="none"?"center":"space-between",...n,children:[t==="left"&&a,e,t==="right"&&a]})},xy=({children:e,...o})=>r.jsx(i.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),by=({children:e,...o})=>r.jsx(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),no=Oo.create(e=>({drawers:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...t,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,drawers:t.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),ky=(e,o={},t={})=>{const n=no.getState();n.hide(e),n.show(e,o,t),n.onShow(e,o),queueMicrotask(()=>{no.setState(a=>({drawers:a.drawers.map(l=>l.name===e?{...l,props:{...l.props,isOpen:!0}}:l)}))})},ki=e=>{no.getState().onHide(e),no.getState().hide(typeof e=="string"?e:void 0)},Cy=({drawers:e,onShow:o,onHide:t})=>{const n=no(a=>a.drawers);return p.useEffect(()=>{o&&no.getState().setOnShow(o)},[o]),p.useEffect(()=>{t&&no.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(p.Fragment,{children:n.map((a,l)=>{var f;const s=e[a.name];if(!s)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:c,size:d,isClosePrevented:u,blur:g,containerProps:m,...h}=a.props||{};return r.jsx(Cn,{isOpen:a.props.isOpen,onClose:()=>ki(a.name),isClosePrevented:u,blur:g,...a.overlayProps,style:{zIndex:1e3+l,...((f=a.overlayProps)==null?void 0:f.style)||{}},children:r.jsx(Sn,{placement:c,size:d,isOpen:a.props.isOpen,...m||{},children:r.jsx(p.Suspense,{fallback:null,children:r.jsx(s,{...h})})})},l)})})},Sy=({isOpen:e,onClose:o,placement:t="right",size:n="md",isClosePrevented:a,children:l,...s})=>r.jsx(Cn,{isOpen:e,onClose:o,isClosePrevented:a,...s,children:r.jsx(Sn,{placement:t,size:n,isOpen:e,children:l})}),bo=Sy;bo.Overlay=Cn;bo.Container=Sn;bo.Header=yy;bo.Body=xy;bo.Footer=by;bo.Layout=Cy;const Ci=({behavior:e,keyboardVerticalOffset:o,dismissOnTap:t,enabled:n,children:a,...l})=>r.jsx(i.View,{flex:1,width:"100%",...l,children:a}),jy=({header:e,footer:o,children:t,isLoading:n=!1,safe:a=!0,scrollable:l=!0,dismissKeyboardOnTap:s=!0,keyboardVerticalOffset:c=0,views:d={},backgroundColor:u="color-white",...g})=>{const m=a?i.SafeArea:i.View,h=i.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},f=n?r.jsx(i.Center,{flex:1,width:"100%",...d.content,children:r.jsx(ao,{})}):l?r.jsx(i.Scroll,{flex:1,width:"100%",...h,...d.content,children:t}):r.jsx(i.View,{flex:1,width:"100%",...d.content,children:t});return r.jsxs(m,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:u,...g,...d.container,children:[e!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...d.header,children:e}),r.jsxs(Ci,{flexDirection:"column",dismissOnTap:s,keyboardVerticalOffset:c,children:[f,o!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...d.footer,children:o})]})]})},et=Oo.create(e=>({started:!1,loaded:!1,setStarted:(o=!0)=>e({started:o}),setLoaded:(o=!0)=>e({loaded:o}),reset:()=>e({started:!1,loaded:!1})})),wy=(e=!0)=>et.getState().setLoaded(e),vy=(e=!0)=>et.getState().setStarted(e),Ty=({logo:e,logoSrc:o,loader:t,showLoader:n=!0,duration:a=600,isLoaded:l,onHidden:s,backgroundColor:c="color-white",children:d,...u})=>{const g=et(S=>S.loaded),m=l!==void 0?l:g,[h,f]=p.useState(!0),[y,k]=p.useState(!1);if(p.useEffect(()=>{if(!m||y)return;k(!0);const S=setTimeout(()=>{f(!1),s==null||s()},a);return()=>clearTimeout(S)},[m,y,a,s]),!h)return null;const b=i.isBrowser()?"fixed":"absolute",C=y?i.Animation.fadeOut({duration:`${a}ms`}):void 0,j=e??(o?r.jsx(i.Image,{src:o,width:120,height:120,alt:"logo"}):null);return r.jsxs(i.Center,{position:b,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:c,animate:C,...u,children:[r.jsxs(i.Vertical,{alignItems:"center",gap:24,children:[j,n&&(t??r.jsx(ao,{}))]}),d]})},_e=Oo.create((e,o)=>({stack:[{path:"/",params:{}}],index:0,push:(t,n={})=>e(a=>{const l=a.stack.slice(0,a.index+1);return l.push({path:t,params:n}),{stack:l,index:l.length-1}}),replace:(t,n={})=>e(a=>{const l=a.stack.slice();return l[a.index]={path:t,params:n},{stack:l}}),back:()=>{const{index:t}=o();return t<=0?!1:(e({index:t-1}),!0)},go:t=>e(n=>({index:Math.min(Math.max(n.index+t,0),n.stack.length-1)})),reset:(t,n={})=>e({stack:[{path:t,params:n}],index:0})})),Iy=(e,o)=>_e.getState().push(e,o),Ry=()=>_e.getState().back(),jn=()=>{const e=_e(d=>d.stack),o=_e(d=>d.index),t=_e(d=>d.push),n=_e(d=>d.replace),a=_e(d=>d.back),l=_e(d=>d.go),s=_e(d=>d.reset),c=e[o]||{path:"/",params:{}};return{path:c.path,params:c.params,stack:e,index:o,canGoBack:o>0,push:t,replace:n,back:a,go:l,reset:s,navigate:t}},Si=(e,o)=>{const t=e.split("/").filter(Boolean),n=o.split("/").filter(Boolean);if(t.length!==n.length)return null;const a={};for(let l=0;l<t.length;l+=1){const s=t[l];if(s.startsWith(":"))a[s.slice(1)]=decodeURIComponent(n[l]);else if(s!==n[l])return null}return a},Fy=e=>Array.isArray(e)?e:Object.entries(e).map(([o,t])=>({path:o,component:t})),zy=({routes:e,notFound:o})=>{const{path:t,params:n}=jn();for(const a of Fy(e)){const l=Si(a.path,t);if(l){const s=a.component;return r.jsx(s,{...n,...l})}}return o?r.jsx(o,{}):null},My=({routes:e,notFound:o,initialPath:t,syncBrowserHistory:n=!1})=>{const{path:a,push:l,back:s,reset:c}=jn(),d=p.useRef(!1);return i.useMount(()=>{t&&c(t)}),p.useEffect(()=>{if(!(!n||typeof window>"u")){if(d.current){d.current=!1;return}try{window.history.pushState({path:a},"",a)}catch{}}},[a,n]),p.useEffect(()=>{if(!n||typeof window>"u")return;const u=()=>{d.current=!0,s()||(d.current=!1)};return window.addEventListener("popstate",u),()=>window.removeEventListener("popstate",u)},[n,s,l]),r.jsx(zy,{routes:e,notFound:o})},Wy=(e=null,o=[])=>{const[t,n]=p.useState(e),[a,l]=p.useState(o),s=p.useRef({});return{activeItemId:t,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:u=>{l(g=>g.includes(u)?g.filter(h=>h!==u):[...g,u])},isItemExpanded:u=>a.includes(u),triggerRefs:s}},Wt={sm:{padding:"8px 12px",fontSize:"12px",fontWeight:"500",media:{mobile:{padding:"6px 10px",fontSize:"11px"}}},md:{padding:"10px 14px",fontSize:"14px",fontWeight:"500",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},lg:{padding:"12px 16px",fontSize:"14px",fontWeight:"600",media:{mobile:{padding:"10px 14px",fontSize:"12px"}}}},Ht={default:{color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"}},ji={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},Vo={active:{backgroundColor:"color-blue-50",color:"color-blue-700",fontWeight:"600",borderLeft:"3px solid",borderColor:"color-blue-600"},hover:{backgroundColor:"color-gray-100",transition:"background-color 0.2s ease"}},wi=p.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),Hy=({children:e,value:o})=>r.jsx(wi.Provider,{value:o,children:e}),mr=()=>{const e=p.useContext(wi);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},wn=({children:e,views:o})=>{const{orientation:t}=mr(),n=t==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(n,{width:"100%",...ji[t],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},vi=p.createContext({itemValue:null,isDisabled:!1}),Vy=()=>{const e=p.useContext(vi);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},vn=({item:e,value:o,isDisabled:t=!1,children:n,views:a})=>{var C;const{activeItemId:l,setActiveItemId:s,orientation:c,size:d,variant:u,onItemActivate:g}=mr(),m=(e==null?void 0:e.id)||o,h=l===m,f=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||t,k=()=>{y||m&&(s(m),g&&g(m))},b=c==="horizontal"?i.Horizontal:i.Vertical;return n?r.jsx(vi.Provider,{value:{itemValue:m||null,isDisabled:y},children:r.jsx(i.View,{width:"100%",cursor:y?"not-allowed":"pointer",opacity:y?.6:1,borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",...Wt[d],...Ht[u],...h?Vo.active:{},_hover:y?{}:Vo.hover,...a==null?void 0:a.item,children:n})}):f&&e?r.jsxs(b,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[r.jsxs(Ti,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),r.jsx(Ii,{itemId:e.id,children:r.jsx(wn,{children:(C=e.items)==null?void 0:C.map(j=>r.jsx(vn,{item:j},j.id))})})]}):e?r.jsxs(i.View,{as:e.href?"a":"div",href:e.href,onClick:k,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.6:1,width:"100%",display:"flex",alignItems:"center",borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",gap:"8px",...Wt[d],...Ht[u],...h?Vo.active:{},_hover:e.disabled?{}:Vo.hover,...a==null?void 0:a.item,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},Ti=({children:e,itemId:o,disabled:t,views:n})=>{const{activeItemId:a,toggleExpandedItem:l,isItemExpanded:s,size:c,variant:d,triggerRefs:u}=mr(),g=p.useRef(null),m=a===o,h=s(o);p.useEffect(()=>(g.current&&o&&(u.current[o]=g.current),()=>{o&&delete u.current[o]}),[o,u]);const f=y=>{y.preventDefault(),!t&&l(o)};return r.jsxs(i.View,{ref:g,onClick:f,cursor:t?"not-allowed":"pointer",opacity:t?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...Wt[c],...Ht[d],...m?Vo.active:{},_hover:t?{}:Vo.hover,...n==null?void 0:n.trigger,children:[r.jsx(i.View,{display:"flex",alignItems:"center",children:e}),r.jsx(i.View,{transition:"transform 0.2s ease",transform:h?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:r.jsx(ue,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},Ii=({children:e,itemId:o,views:t})=>{const{isItemExpanded:n,orientation:a,triggerRefs:l}=mr(),s=p.useRef(null),[c,d]=p.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),u=n(o);if(p.useEffect(()=>{if(u&&s.current&&o&&l.current[o]&&a==="horizontal"){const m=s.current.getBoundingClientRect(),h=l.current[o].getBoundingClientRect(),f=Math.max(m.width||200,200),y=Math.max(m.height||150,150),k=window.innerWidth,b=window.innerHeight,C={top:h.top,right:k-h.right,bottom:b-h.bottom,left:h.left},j=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8}],S=j.find(v=>v.fits);if(S){d({x:S.x,y:S.y,placement:S.placement});return}const w=j.reduce((v,M)=>M.space>v.space?M:v);let x=w.x,T=w.y;x+f>k&&(x=k-f-8),x<8&&(x=8),T+y>b&&(T=b-y-8),T<8&&(T=8),d({x,y:T,placement:w.placement})}},[u,a,o,l]),!u)return null;if(a==="vertical")return r.jsx(i.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...t==null?void 0:t.container,children:e});const g={position:"fixed",left:c.x,top:c.y,zIndex:1e3};return r.jsx(i.View,{ref:s,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:g,...t==null?void 0:t.container,children:e})},Ay=({href:e,children:o,views:t,underline:n,isExternal:a,iconSize:l,...s})=>{const{itemValue:c,isDisabled:d}=Vy(),{activeItemId:u,setActiveItemId:g,onItemActivate:m}=mr(),h=u===c,f=y=>{if(d){y.preventDefault();return}c&&(g(c),m&&m(c)),s.onClick&&s.onClick(y)};return r.jsx(i.View,{as:"a",href:d?void 0:e,onClick:f,cursor:d?"not-allowed":"pointer",opacity:d?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":h?"page":void 0,"aria-disabled":d,"data-active":h?"":void 0,"data-disabled":d?"":void 0,...h?{fontWeight:"bold"}:{},...t==null?void 0:t.container,...s,children:o})},Py=({items:e,orientation:o,views:t,themeMode:n})=>{const a=o==="horizontal"?i.Horizontal:i.Vertical;return!e||e.length===0?null:r.jsx(a,{width:"100%",...ji[o],...t==null?void 0:t.container,children:r.jsx(wn,{views:t,children:e.map(l=>r.jsx(vn,{item:l,views:t},l.id))})})},Ey=e=>{const o=fe("navigation",e),{items:t,children:n,orientation:a="vertical",size:l="md",variant:s="default",defaultActiveItemId:c=null,defaultExpandedItemIds:d=[],onItemActivate:u,views:g,...m}=o,{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:b,triggerRefs:C}=Wy(c,d);return r.jsx(Hy,{value:{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:b,orientation:a,size:l,variant:s,onItemActivate:u,triggerRefs:C},children:t?r.jsx(Py,{items:t,orientation:a,size:l,variant:s,views:g,...m}):n})},ko=Ey;ko.List=wn;ko.Item=vn;ko.Trigger=Ti;ko.Content=Ii;ko.Link=Ay;const Ri={},Fi=p.createContext({views:Ri,onRowClick:()=>{}}),Dy=({children:e,views:o=Ri,onRowClick:t})=>r.jsx(Fi.Provider,{value:{views:o,onRowClick:t},children:e}),so=()=>p.useContext(Fi),be={table:{width:"100%",color:"inherit",borderRadius:"8px",overflow:"hidden",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.06), 0px 1px 2px rgba(0, 0, 0, 0.04)",border:"1px solid",borderColor:"color-gray-200",transition:"box-shadow 0.2s ease",media:{mobile:{overflowX:"auto",display:"block",borderRadius:"4px"}}},thead:{backgroundColor:"color-gray-50",borderBottom:"1px solid",borderColor:"color-gray-200"},th:{padding:"12px 16px",fontWeight:"600",fontSize:"14px",color:"inherit",opacity:.72,textAlign:"left",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},td:{padding:"12px 16px",fontSize:"14px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"inherit",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},tr:{flexDirection:"row",alignItems:"stretch",width:"100%",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-50"},_focus:{outline:"none",backgroundColor:"color-gray-100"}},tfoot:{backgroundColor:"color-gray-50",fontWeight:"600",borderTop:"2px solid",borderColor:"color-gray-200"},caption:{margin:"8px 0",color:"inherit",opacity:.62,fontSize:"14px",fontStyle:"italic",media:{mobile:{fontSize:"12px"}}}};({...be.th},{...be.td});({...be.tr});({...be.td},{...be.th});({...be.table},{...be.th}),{...be.td},{...be.tr},{...be.tfoot},{...be.caption};const $y=({children:e})=>r.jsx(i.View,{width:"100%",style:{overflowX:"auto"},children:e}),zi=e=>{const{views:o}=so();return r.jsx(i.Element,{as:"table",...be.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},Mi=e=>{const{views:o}=so();return r.jsx(i.Element,{as:"thead",textAlign:"left",...be.thead,...o==null?void 0:o.thead,...e})},Wi=e=>{const{views:o}=so();return r.jsx(i.Element,{as:"th",whiteSpace:"nowrap",...be.th,...o==null?void 0:o.th,...e})},Rr=e=>{const{views:o,onRowClick:t}=so();return r.jsx(i.Element,{as:"tr",...be.tr,...o==null?void 0:o.tr,onClick:t,...e})},Vt=({isFirstColumn:e,...o})=>{const{views:t}=so();return r.jsx(i.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...be.td,...t==null?void 0:t.td,...o})},Hi=e=>{const{views:o}=so();return r.jsx(i.Element,{as:"tbody",...be.tbody,...o==null?void 0:o.tbody,...e})},Vi=e=>{const{views:o}=so();return r.jsx(i.Element,{as:"tfoot",...be.tfoot,...o==null?void 0:o.tfoot,...e})},Ai=e=>{const{views:o}=so();return r.jsx(i.Element,{as:"caption",...be.caption,...o==null?void 0:o.caption,...e})},Ly=({data:e,columns:o,footer:t,caption:n,themeMode:a})=>{const l=Math.max(o.length*140,320);return r.jsx($y,{children:r.jsxs(zi,{role:"Table",minWidth:l,children:[n&&r.jsx(Ai,{children:n}),r.jsx(Mi,{children:r.jsx(Rr,{children:o.map(s=>r.jsx(Wi,{children:s.title},s.field))})}),r.jsx(Hi,{children:e.map((s,c)=>r.jsx(Rr,{children:o.map((d,u)=>r.jsx(Vt,{isFirstColumn:u===0,children:s[d.field]},d.field))},c))}),t&&r.jsx(Vi,{children:r.jsx(Rr,{children:t.map((s,c)=>r.jsx(Vt,{...s.props,children:s.value},c))})})]})})},Ve=({children:e,views:o,onClick:t})=>{const n=fe("table",{views:o,onClick:t});return r.jsx(Dy,{views:n.views,onRowClick:n.onClick,children:e})};Ve.Head=Mi;Ve.HeadCell=Wi;Ve.Body=Hi;Ve.Row=Rr;Ve.Cell=Vt;Ve.Footer=Vi;Ve.Caption=Ai;Ve.Container=zi;Ve.Template=Ly;const _y=(e,o,t)=>{const n=u=>u.value!==void 0?u.value:u.title,a=()=>{if(!(!e||e.length===0)){if(o!==void 0){const u=e.find(g=>n(g)===o);if(u)return u}return e[0]}},[l,s]=p.useState(a()),c=t!==void 0?e.find(u=>n(u)===t):l,d=u=>{t===void 0&&s(u)};return p.useEffect(()=>{if(t!==void 0)return;const u=a(),g=l&&e.some(m=>n(m)===n(l));u&&(!g||o!==void 0&&l&&n(l)!==o)?s(u):!u&&l&&s(void 0)},[e,o]),{activeTab:c,setActiveTab:d}},By=(e,o,t)=>{const[n,a]=p.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:c=>{o===void 0&&a(c),t&&t(c)}}},Oy=p.memo(({tab:e,isActive:o,onClick:t,iconPosition:n="left",tabStyles:a,textStyles:l})=>{const s=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},c=()=>["top","bottom"].includes(n)?"4px":"8px",d=e.icon&&p.isValidElement(e.icon)?p.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return r.jsxs(i.Element,{as:"div",role:"tab","aria-selected":o,tabIndex:o?0:-1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...a,flexDirection:s(),gap:c(),onClick:t,"data-state":o?"active":"inactive",children:[d&&r.jsx(i.Element,{children:d},o?"active-icon":"inactive-icon"),r.jsxs(i.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[r.jsx(i.Text,{...l,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),r.jsx(i.Text,{...l,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),Tn=(e,o)=>{const t=o==="dark";return e==="segmented"?{header:{width:"fit-content",alignSelf:"flex-start",gap:6,padding:6,borderRadius:16,backgroundColor:"color-gray-100"},tab:{minHeight:44,padding:"0 22px",borderRadius:12,color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-100",style:{backgroundColor:"transparent"}},activeTab:{backgroundColor:"color-white",color:"color-gray-900",boxShadow:t?"0 1px 3px rgba(0, 0, 0, 0.35)":"0 1px 2px rgba(0, 0, 0, 0.06)"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em"},activeText:{},content:{width:"100%"}}:e==="pill"?{header:{width:"100%",flexWrap:"wrap",gap:12},tab:{minHeight:44,padding:"0 22px",borderRadius:"999px",backgroundColor:"color-white",color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200"},activeTab:{backgroundColor:"theme-primary",color:"color-white",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%"}}:{header:{width:"100%",gap:20,borderBottom:"none"},tab:{minHeight:44,padding:"0 4px",borderRadius:0,color:"color-gray-500",borderBottom:"3px solid",borderColor:"color-white",style:{backgroundColor:"transparent"}},activeTab:{color:"theme-primary",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%",paddingTop:12}}},Ny=({tabs:e=[],activeTab:o,handleTabClick:t,views:n={},renderTab:a,renderContent:l,variant:s="underline",iconPosition:c="left",keepMounted:d=!1})=>{const{themeMode:u}=i.useTheme(),g=Tn(s,u);return o?r.jsxs(i.Vertical,{width:"100%",height:"100%",...n.container,children:[r.jsx(i.Horizontal,{alignItems:"center",...g.header,...n.headerTabs,children:e.map(m=>{const h=(m.value!==void 0?m.value:m.title)===(o.value!==void 0?o.value:o.title),f=()=>t(m);return a?a(m,h,f):r.jsx(Oy,{tab:m,isActive:h,onClick:f,iconPosition:c,tabStyles:{...g.tab,...n.tab,...h?g.activeTab:{},...h?n.activeTab:{}},textStyles:{...g.text,...n.title,...h?g.activeText:{},...h?n.activeText:{}}},m.title)})}),r.jsx(i.View,{height:"100%",...g.content,...n.content,children:l?l(o):d?e.map(m=>{const h=m.value!==void 0?m.value:m.title,f=o.value!==void 0?o.value:o.title;return r.jsx(i.View,{display:h===f?"contents":"none",children:m.content},m.title)}):o.content})]}):null},Pi=p.createContext(null),In=()=>{const e=p.useContext(Pi);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},qy=p.memo(({children:e,views:o})=>{var c;const{themeMode:t}=i.useTheme(),{variant:n="underline"}=In(),a=Tn(n,t),l=No("tabs"),s=Be({container:(c=l.views)==null?void 0:c.headerTabs},o);return r.jsx(i.Horizontal,{alignItems:"center",...a.header,...s==null?void 0:s.container,children:e})}),Uy=p.memo(({value:e,children:o,disabled:t=!1,views:n})=>{var f,y;const{themeMode:a}=i.useTheme(),{activeValue:l,setActiveValue:s,variant:c="underline"}=In(),d=l===e,u=Tn(c,a),g=No("tabs"),m=Be({trigger:(f=g.views)==null?void 0:f.tab,activeState:(y=g.views)==null?void 0:y.activeTab},n),h=p.useCallback(()=>{t||s(e)},[t,e,s]);return r.jsx(i.View,{cursor:t?"not-allowed":"pointer",opacity:t?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...u.tab,...d?u.activeTab:{},_hover:t?{}:c==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:h,...m==null?void 0:m.trigger,...d?m==null?void 0:m.activeState:{},children:r.jsx(i.View,{...u.text,...d?u.activeText:{},children:o})})}),Gy=p.memo(({value:e,children:o,views:t})=>{const{activeValue:n}=In();return n!==e?null:r.jsx(i.View,{width:"100%",padding:"24px",...t==null?void 0:t.content,children:o})}),Yy=e=>{const o=fe("tabs",e),{tabs:t,views:n,defaultValue:a,onTabChange:l,renderTab:s,renderContent:c,variant:d="underline",iconPosition:u="left",keepMounted:g=!1,value:m,onValueChange:h,children:f}=o,y=By(a,m,h),k=_y(t||[],a,m);if(f)return r.jsx(Pi.Provider,{value:{...y,variant:d},children:f});if(t){const b=C=>{const j=S=>S.value!==void 0?S.value:S.title;(!k.activeTab||j(k.activeTab)!==j(C))&&(k.setActiveTab(C),l&&l(C))};return r.jsx(Ny,{tabs:t,views:n,activeTab:k.activeTab,handleTabClick:b,renderTab:s,renderContent:c,variant:d,iconPosition:u,keepMounted:g})}return null},Ky=p.memo(Yy),Lo=Ky;Lo.List=qy;Lo.Trigger=Uy;Lo.Content=Gy;const Xy=e=>{const{children:o,_isInView:t=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:l=3e3,highlightText:s,highlightTypewriter:c=!1,highlightSlide:d=!1,highlightSlideDuration:u=500,highlightSlideStagger:g=50,highlightSlideSequential:m=!0}=e,[h,f]=p.useState(o),[y,k]=p.useState(s);return p.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof o!="string"||!s)return;const b=Array.isArray(s)?s:[s];for(const C of b)typeof C=="string"&&C.length>0&&!o.toLowerCase().includes(C.toLowerCase())&&console.warn(`[Title] highlightText "${C}" is not a substring of \`children\`, so nothing will be highlighted. \`children\` must be the complete sentence including the highlight, e.g. \`<Title highlightText="apps">Build apps fast</Title>\`.`)},[o,s]),p.useEffect(()=>{if(!a||n.length===0||!t||typeof o!="string"||typeof s!="string")return process.env.NODE_ENV!=="production"&&a&&n.length>0&&(typeof o!="string"||typeof s!="string")&&console.warn("[Title] alternateHighlightText requires `children` to be the full sentence as a string and `highlightText` to be the placeholder word inside it. Rotation is disabled."),f(o),k(s),()=>{};const b=o,C=s;if(!b.toLowerCase().includes(C.toLowerCase()))return process.env.NODE_ENV!=="production"&&console.warn(`[Title] \`children\` must contain \`highlightText\` ("${C}") — it is the placeholder the rotating words replace, e.g. \`<Title highlightText="apps" alternateHighlightText={["apps", "sites"]}>Build apps fast</Title>\`. Rotation is disabled.`),f(o),k(s),()=>{};let j=0;const S=x=>{const T=n[x],v=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),M=new RegExp(v,"gi"),A=b.replace(M,T);f(A),k(T)};S(j);const w=setInterval(()=>{j=(j+1)%n.length,S(j)},l);return()=>clearInterval(w)},[a,n,l,s,o,t]),{finalDisplayedText:h,activeHighlightTarget:y,highlightTypewriter:c,highlightSlide:d,highlightSlideDuration:u,highlightSlideStagger:g,highlightSlideSequential:m}},Jy={xs:24,sm:32,md:48,lg:96,xl:110},Qy={xl:{media:{mobile:{fontSize:48},tablet:{fontSize:96},desktop:{fontSize:110}}},lg:{media:{mobile:{fontSize:48},tablet:{fontSize:48},desktop:{fontSize:70}}},md:{media:{mobile:{fontSize:32},tablet:{fontSize:40},desktop:{fontSize:56}}},sm:{media:{mobile:{fontSize:20},tablet:{fontSize:24},desktop:{fontSize:32}}},xs:{media:{mobile:{fontSize:14},tablet:{fontSize:18},desktop:{fontSize:20}}}},Zy={underline:e=>({textDecoration:"underline",textDecorationColor:e,textDecorationThickness:"4px",textUnderlineOffset:"4px"}),background:e=>({backgroundColor:e,color:"color-white",padding:"0 8px",borderRadius:"4px"}),gradient:(e,o)=>({background:`linear-gradient(135deg, ${e}, ${o||e})`,backgroundClip:"text",WebkitBackgroundClip:"text !important",WebkitTextFillColor:"transparent",color:"transparent",display:"inline-block",textShadow:"none"}),outline:e=>({WebkitTextStroke:`1px ${e}`,WebkitTextFillColor:"transparent !important",color:"transparent",textShadow:"none"}),glow:e=>({color:e,textShadow:`0 0 10px ${e}80, 0 0 20px ${e}40, 0 0 30px ${e}20`}),solid:e=>({color:e}),default:()=>({})},ex=({text:e,typingSpeed:o=50,pauseTime:t=500,onComplete:n,showCursor:a=!0,cursorColor:l="currentColor",textStyle:s,textComponent:c,as:d,...u})=>{const g=c||i.Text,m=Array.isArray(e)?e:[e],[h,f]=p.useState(m.map(()=>"")),[y,k]=p.useState(!1),[b,C]=p.useState(0),[j,S]=p.useState(0);p.useEffect(()=>{f(m.map(()=>"")),k(!1),C(0),S(0)},[e]),p.useEffect(()=>{if(y){n&&n();return}const x=m[b];if(j>=x.length){if(b>=m.length-1){k(!0);return}const v=setTimeout(()=>{C(M=>M+1),S(0)},t);return()=>clearTimeout(v)}const T=setTimeout(()=>{f(v=>{const M=[...v];return M[b]=x.substring(0,j+1),M}),S(v=>v+1)},o);return()=>clearTimeout(T)},[m,b,j,y,n,t,o]);const w=x=>{if(!x||typeof x!="string")return x;const T=x.split("|");return T.length===1?x:T.map((v,M)=>r.jsxs(p.Fragment,{children:[v,M<T.length-1&&r.jsx("br",{})]},M))};return r.jsx(r.Fragment,{children:h.map((x,T)=>r.jsxs(p.Fragment,{children:[w(x),a&&T===b&&!y&&r.jsx(g,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:l,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...s})]},T))})},ox=({text:e,duration:o=500,direction:t="up",stagger:n=50,sequential:a=!1,textStyle:l,as:s,wordProps:c,textComponent:d,...u})=>{const[g,m]=p.useState(e),[h,f]=p.useState("entering"),[y,k]=p.useState(0),b=d||i.Text,C=p.useRef(null),j=p.useRef(null);p.useEffect(()=>{e===g&&h==="visible"||e!==g&&(h==="entering"||h==="visible"?(C.current=e,f("exiting")):h==="exiting"&&(C.current=e))},[e,g,h]);const{lines:S,totalWordCount:w}=p.useMemo(()=>{const H=g.split("|").map(D=>D.trim().split(/\s+/).filter($=>$.length>0)),R=H.reduce((D,$)=>D+$.length,0);return{lines:H,totalWordCount:R}},[g]),x=p.useMemo(()=>a?w*(o+n):(w-1)*n+o,[w,o,n,a]),T=p.useMemo(()=>a?w*(o+n):(w-1)*n+o,[w,o,n,a]);p.useEffect(()=>(j.current&&clearTimeout(j.current),h==="entering"?j.current=setTimeout(()=>{f("visible")},x+50):h==="exiting"&&(j.current=setTimeout(()=>{C.current!==null&&(m(C.current),C.current=null),k(W=>W+1),f("entering")},T+50)),()=>{j.current&&clearTimeout(j.current)}),[h,x,T]);const{style:v,...M}=c||{},A=t==="up",P=W=>a?W*(o+n):W*n,F=p.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...l}),[l]),V=p.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),z=p.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let I=0;return r.jsx(i.Element,{as:"span",style:F,...u,children:r.jsx("span",{style:V,children:S.map((W,H)=>r.jsx("span",{style:z,children:W.map((R,D)=>{const $=I++,_=P($),B=D===W.length-1;let N;const Y=`${o}ms`,ee=`${_}ms`;h==="entering"?N=A?i.Animation.slideInUp({duration:Y,delay:ee,timingFunction:"ease-out",fillMode:"both"}):i.Animation.slideInDown({duration:Y,delay:ee,timingFunction:"ease-out",fillMode:"both"}):h==="exiting"&&(N=A?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:Y,delay:ee,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:Y,delay:ee,timingFunction:"ease-in",fillMode:"both"});const L={...v,display:"inline-block",marginRight:B?0:"0.25em",transform:h==="visible"?"translateY(0)":void 0,opacity:h==="visible"?1:void 0};return r.jsx(b,{as:"span",animate:N,...M,...L,children:R},`${y}-${H}-${D}`)})},`line-${H}`))})})};function ma(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const yt=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((t,n)=>r.jsxs(p.Fragment,{children:[t,n<o.length-1&&r.jsx("br",{})]},n))},rx=({children:e,highlightText:o,highlightStyle:t="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:l="lg",views:s,highlightAnimate:c,animate:d,animationLoop:u=1,highlightAnimationLoop:g=1,highlightTypewriter:m=!1,highlightTypewriterDuration:h=3e3,highlightSlide:f=!1,highlightSlideDuration:y=500,highlightSlideStagger:k=50,highlightSlideSequential:b=!0,centered:C=!1,level:j=1,themeMode:S,responsive:w,alternateHighlightText:x,alternateAnimation:T,alternateDuration:v,_isInView:M,...A})=>{const{ref:P,inView:F}=i.useInView(),{finalDisplayedText:V,activeHighlightTarget:z,highlightTypewriter:I,highlightSlide:W,highlightSlideDuration:H,highlightSlideStagger:R,highlightSlideSequential:D}=Xy({children:e,highlightText:o,_isInView:F,highlightTypewriter:m,highlightSlide:f,highlightSlideDuration:y,highlightSlideStagger:k,highlightSlideSequential:b,alternateHighlightText:x,alternateAnimation:T,alternateDuration:v,...A}),$=Jy[l],_={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:l==="xl"?700:600,letterSpacing:l==="xl"?"-1.5px":"-0.01em"},B=Zy[t](n,a),N=(K,U)=>K&&(Array.isArray(K)?K.map(J=>({...J,iterationCount:U.toString()})):{...K,iterationCount:U.toString()}),Y=N(d,u),ee=N(c,g),L=typeof V=="string"?V:typeof e=="string"?e:"",E={ref:P,animate:F?Y:void 0,as:`h${j}`,fontSize:$,...C?{textAlign:"center"}:{},...w?Qy[l]:{},..._},O=K=>!F&&(I||W)?r.jsx("span",{style:{opacity:0},children:K}):I?r.jsx(ex,{text:K,typingSpeed:Math.max(30,h/(K.length*10)),cursorColor:"currentColor",...B}):W?r.jsx(ox,{text:K,duration:H,stagger:R,sequential:D,direction:"up",wordProps:B}):yt(K);if(typeof L=="string"&&z){const K=Array.isArray(z)?new RegExp(`(${z.map(te=>ma(String(te))).join("|")})`,"gi"):new RegExp(`(${ma(String(z))})`,"gi"),U=[];let J=0,Z;for(;Z=K.exec(L);)Z.index>J&&U.push(L.substring(J,Z.index)),U.push({highlight:!0,text:Z[0]}),J=Z.index+Z[0].length;return J<L.length&&U.push(L.substring(J)),r.jsx(i.Element,{...E,...s==null?void 0:s.container,...A,children:U.map((te,G)=>typeof te=="string"?r.jsx(i.Text,{as:"span",display:"inline",...s==null?void 0:s.text,children:yt(te)},`text-${G}`):r.jsx(i.Text,{as:"span",display:"inline",animate:F?ee:void 0,...W?{}:B,...s==null?void 0:s.highlight,children:O(te.text)},`highlight-${G}`))})}return t&&!z?r.jsx(i.Element,{...E,...A,...s==null?void 0:s.container,children:r.jsx(i.Text,{as:"span",display:"inline",animate:F?ee:void 0,...W?{}:B,...s==null?void 0:s.highlight,children:O(L)})}):r.jsx(i.Text,{...E,...A,...s==null?void 0:s.container,...s==null?void 0:s.text,children:yt(L)})},tx=e=>r.jsx(rx,{...e}),Ei=tx,nx=({items:e,shape:o,variant:t,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:l}=pi();return r.jsx(mi,{items:e,shape:o,variant:t,activeToggles:a,setActiveToggles:l,onToggleChange:n})},Di=nx,ax=({items:e,onChange:o})=>{const[t,n]=p.useState(e),[a,l]=p.useState(null),[s,c]=p.useState(null),d=p.useRef({x:0,y:0}),u=p.useRef([]),g=p.useCallback((f,y)=>{f.preventDefault(),document.body.style.cursor="grabbing";const k="touches"in f?f.touches[0].clientX:f.clientX,b="touches"in f?f.touches[0].clientY:f.clientY;d.current={x:k,y:b},c(y),l(t[y])},[t]),m=p.useCallback(f=>{if(s===null)return;const y="touches"in f?f.touches[0].clientX:f.clientX,k="touches"in f?f.touches[0].clientY:f.clientY,b=u.current[s];if(!b)return;const C=y-d.current.x,j=k-d.current.y;b.style.transform=`translate(${C}px, ${j}px)`,b.style.zIndex="1000";const S=u.current.findIndex((w,x)=>{if(!w||x===s)return!1;const T=w.getBoundingClientRect();return k>=T.top&&k<=T.bottom});if(S!==-1&&S!==s){const w=[...t],[x]=w.splice(s,1);w.splice(S,0,x),n(w),c(S),o==null||o(w),d.current={x:y,y:k}}},[s,t,o]),h=p.useCallback(()=>{document.body.style.cursor="",u.current.forEach(f=>{f&&(f.style.transform="",f.style.zIndex="")}),c(null),l(null)},[s]);return p.useEffect(()=>{if(!(typeof window>"u"))return s!==null&&(window.addEventListener("mousemove",m),window.addEventListener("touchmove",m),window.addEventListener("mouseup",h),window.addEventListener("touchend",h)),()=>{window.removeEventListener("mousemove",m),window.removeEventListener("touchmove",m),window.removeEventListener("mouseup",h),window.removeEventListener("touchend",h)}},[s,m,h]),{items:t,draggedItem:a,draggedIndex:s,itemRefs:u,handleDragStart:g}},lx=({items:e,renderItem:o,containerProps:t,itemProps:n,draggedIndex:a,itemRefs:l,handleDragStart:s,views:c,themeMode:d})=>r.jsx(i.View,{overflow:"hidden",position:"relative",...t,...c==null?void 0:c.container,children:e.map((u,g)=>r.jsx(i.View,{ref:m=>{l.current[g]=m},onMouseDown:m=>s(m,g),onTouchStart:m=>s(m,g),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...c==null?void 0:c.item,children:o?o(u,g):u},g))}),$i=e=>{const{items:o,draggedIndex:t,itemRefs:n,handleDragStart:a}=ax(e);return r.jsx(lx,{...e,items:o,draggedIndex:t,itemRefs:n,handleDragStart:a})},ix=$i,sx=({onFileSelect:e,onMultipleFileSelect:o,validateFile:t,accept:n,multiple:a,disabled:l,previewUrl:s})=>{const[c,d]=p.useState(!1),[u,g]=p.useState(null),m=p.useRef(null),h=s!==void 0?s:u;p.useEffect(()=>()=>{u&&URL.revokeObjectURL(u)},[u]);const f=p.useCallback(w=>{w.preventDefault(),w.stopPropagation(),!l&&d(!0)},[l]),y=p.useCallback(w=>{w.preventDefault(),w.stopPropagation(),!l&&d(!1)},[l]),k=p.useCallback(w=>{w.preventDefault(),w.stopPropagation(),!l&&d(!0)},[l]),b=p.useCallback(w=>{if(!w||w.length===0)return;const x=Array.from(w);if(!a&&x.length>0){const T=x[0];if(T.type.startsWith("image/")){const v=URL.createObjectURL(T);g(M=>(M&&URL.revokeObjectURL(M),v))}else g(null)}a?o&&o(x):x.length>0&&e&&e(x[0])},[a,o,e]),C=p.useCallback(w=>{w.preventDefault(),w.stopPropagation(),d(!1),!l&&w.dataTransfer.files&&w.dataTransfer.files.length>0&&(b(w.dataTransfer.files),w.dataTransfer.clearData())},[l,b]),j=p.useCallback(()=>{var w;l||(w=m.current)==null||w.click()},[l]),S=p.useCallback(w=>{b(w.target.files),w.target.value&&(w.target.value="")},[b]);return{isDragActive:c,handleDragEnter:f,handleDragLeave:y,handleDragOver:k,handleDrop:C,handleClick:j,handleFileChange:S,inputRef:m,preview:h}},cx={position:"absolute",top:"-4px",right:"-4px",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"12px",zIndex:10,_hover:{backgroundColor:"rgba(0, 0, 0, 0.7)"}},Li=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:s={}})=>{if(e.length===0)return null;const c=p.useCallback(u=>u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} KB`:`${(u/(1024*1024)).toFixed(1)} MB`,[]),d=p.useCallback(u=>u.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:u.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:u.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...s==null?void 0:s.container,children:e.map((u,g)=>{const m=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&u instanceof Blob,h=(u==null?void 0:u.path)||(u==null?void 0:u.url)||(l&&m?URL.createObjectURL(u):""),f=u.type.startsWith("image/"),y=u.type.startsWith("video/"),k=u.type.startsWith("audio/"),b=d(u);return l?r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:l&&r.jsxs(Re,{children:[r.jsxs(Re.Trigger,{children:[f&&r.jsx(i.Image,{src:h,alt:u.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.View,{as:"video",src:h,alt:u.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx($o,{widthHeight:24,color:"color-black"})}),!f&&!y&&!k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(ho,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...cx,onClick:C=>{C.stopPropagation(),t(g)},"aria-label":`Remove ${u.name}`,children:"×"})]}),r.jsxs(Re.Content,{children:[f&&r.jsx(i.Image,{src:h,alt:u.name,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"video",src:h,controls:!0,maxWidth:"100%"}),k&&r.jsx(i.View,{as:"audio",src:h,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...s==null?void 0:s.name,children:[u.name," (",c(u.size),")"]})]})]})},g):r.jsxs(i.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:b.backgroundColor,color:b.color,children:k?r.jsx($o,{widthHeight:12,color:"currentColor"}):r.jsx(ho,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...s==null?void 0:s.name,children:[u.name," · ",c(u.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(g),"aria-label":`Remove ${u.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},g)})})},dx=({children:e,text:o="Drop files here or click to upload",textProps:t,containerProps:n,disabled:a,accept:l,multiple:s,isDragActive:c,handleDragEnter:d,handleDragLeave:u,handleDragOver:g,handleDrop:m,handleClick:h,handleFileChange:f,inputRef:y,preview:k,imageProps:b,selectedFiles:C,onRemove:j})=>r.jsxs(i.Center,{width:"100%",minHeight:"200px",height:C&&C.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:c?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:c?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:h,onDragEnter:d,onDragLeave:u,onDragOver:g,onDrop:m,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[r.jsx("input",{type:"file",ref:y,onChange:f,accept:l,multiple:s,style:{display:"none"},disabled:a}),k&&!s?r.jsxs(i.View,{width:"100%",height:"200px",position:"relative",children:[r.jsx(i.Image,{src:k,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...b}),r.jsx(i.Center,{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.3)",opacity:0,_hover:{opacity:1},transition:"opacity 0.2s",children:r.jsx(i.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[r.jsx(rn,{widthHeight:40,color:c?"theme-primary":"color-gray-500"}),r.jsx(i.Text,{marginTop:16,color:c?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...t,children:o})]}),s&&C&&C.length>0&&r.jsx(i.View,{marginTop:16,width:"100%",children:r.jsx(Li,{files:C,onRemove:j||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),ux=e=>{const o=sx(e);return r.jsx(dx,{...e,...o})},px=(e=!1)=>{const[o,t]=p.useState(e),[n,a]=p.useState(null);return p.useEffect(()=>{const l=d=>{!d.composedPath().some(m=>(m==null?void 0:m.id)==="dropdown-menu"||(m==null?void 0:m.id)==="dropdown-trigger")&&o&&(t(!1),a(null))},s=()=>{o&&(t(!1),a(null))},c=d=>{d.key==="Escape"&&o&&(t(!1),a(null))};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",l),window.addEventListener("resize",s),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",l),window.removeEventListener("resize",s),document.removeEventListener("keydown",c)}},[o]),{isOpen:o,setIsOpen:t,activeSubmenuId:n,setActiveSubmenuId:a}},mx={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},gx={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},hx={hover:{backgroundColor:"color-gray-100"}},_i=p.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),fx=({children:e,value:o})=>r.jsx(_i.Provider,{value:o,children:e}),Rn=()=>{const e=p.useContext(_i);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},Bi=({children:e,views:o,...t})=>{const{isOpen:n,setIsOpen:a,triggerRef:l}=Rn(),s=c=>{c.stopPropagation(),a(!n)};return r.jsx(i.View,{ref:l,id:"dropdown-trigger",onClick:s,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...t,children:e})},Fn=({items:e,side:o="bottom",align:t="start",views:n,...a})=>{const{isOpen:l,variant:s,triggerRef:c}=Rn(),d=p.useRef(null),{ref:u,relation:g}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[m,h]=p.useState({x:0,y:0,placement:o});if(p.useEffect(()=>{c.current&&u&&(u.current=c.current)},[c,u,l]),p.useEffect(()=>{if(l&&d.current&&c.current){const k=c.current.getBoundingClientRect();let b=o;g&&(o==="bottom"&&g.space.vertical==="top"?b="top":o==="top"&&g.space.vertical==="bottom"?b="bottom":o==="right"&&g.space.horizontal==="left"?b="left":o==="left"&&g.space.horizontal==="right"&&(b="right"));let C=0,j=0;switch(b){case"bottom":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,j=k.bottom+8;break;case"top":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,j=k.top-8;break;case"right":C=k.right+8,j=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break;case"left":C=k.left-8,j=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break}h({x:C,y:j,placement:b})}},[l,o,t,c,g]),!l)return null;const y=(()=>{const k={position:"fixed",left:m.x,top:m.y,zIndex:1e3};switch(m.placement){case"top":return{...k,transform:"translateY(-100%)"};case"left":return{...k,transform:"translateX(-100%)"};case"bottom":case"right":default:return k}})();return r.jsx(i.View,{ref:d,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...gx[s],...n==null?void 0:n.menu,...a,children:e.map((k,b)=>k.divider?r.jsx(Ni,{views:n},`divider-${b}`):r.jsx(Oi,{item:k,views:n},k.id))})},Oi=({item:e,views:o,...t})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:l}=Rn(),[s,c]=p.useState(!1),d=e.items&&e.items.length>0,u=n===e.id,g=p.useRef(null),m=()=>{c(!0),d&&a(e.id)},h=()=>{c(!1)},f=y=>{y.stopPropagation(),!e.disabled&&!d&&e.onClick&&e.onClick()};return r.jsxs(i.View,{ref:g,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...mx[l],_hover:e.disabled?{}:hx.hover,backgroundColor:s&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:m,onMouseLeave:h,onClick:f,...o==null?void 0:o.item,...t,children:[e.icon&&r.jsx(i.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),d&&r.jsx(i.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:r.jsx(ue,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),u&&d&&r.jsx(Fn,{items:e.items||[],side:"right",align:"start",views:o})]})},Ni=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),yx=({trigger:e,items:o,side:t="bottom",align:n="start",views:a,themeMode:l,...s})=>r.jsxs(i.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...s,children:[r.jsx(Bi,{views:a,children:e}),r.jsx(Fn,{items:o,side:t,align:n,views:a})]}),xx=({trigger:e,items:o,size:t="md",variant:n="default",side:a="bottom",align:l="start",defaultOpen:s=!1,views:c,...d})=>{const{isOpen:u,setIsOpen:g,activeSubmenuId:m,setActiveSubmenuId:h}=px(s),f=p.useRef(null);return r.jsx(fx,{value:{isOpen:u,setIsOpen:g,activeSubmenuId:m,setActiveSubmenuId:h,size:t,variant:n,triggerRef:f},children:r.jsx(yx,{trigger:e,items:o,side:a,align:l,views:c,...d})})},gr=xx;gr.Trigger=Bi;gr.Content=Fn;gr.Item=Oi;gr.Divider=Ni;const bx=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,isOpen:l,onOpen:s,onClose:c,closeOnSelect:d=!0,maxRecentColors:u=8,showRecentColors:g=!0,colorFormat:m}=e,[h,f]=p.useState(l??!1),[y,k]=p.useState(o??t),[b,C]=p.useState(""),[j,S]=p.useState([]),w=p.useRef(null),x=p.useRef(null);p.useEffect(()=>{o!==void 0&&k(o)},[o]),p.useEffect(()=>{l!==void 0&&f(l)},[l]),p.useEffect(()=>{if(g&&typeof localStorage<"u"){const V=localStorage.getItem("colorPicker-recentColors");if(V)try{S(JSON.parse(V))}catch{}}},[g]),p.useEffect(()=>{if(typeof document>"u"||typeof document.addEventListener!="function")return;const V=z=>{h&&w.current&&x.current&&!w.current.contains(z.target)&&!x.current.contains(z.target)&&F()};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[h]);const T=p.useCallback(V=>{g&&S(z=>{const I=z.filter(H=>H!==V),W=[V,...I].slice(0,u);return typeof localStorage<"u"&&localStorage.setItem("colorPicker-recentColors",JSON.stringify(W)),W})},[g,u]),v=p.useCallback(()=>{const V=!h;f(V),V?s==null||s():c==null||c()},[h,s,c]),M=p.useCallback(V=>{k(V),T(V);const z=Lr(V,m);n==null||n(z),a==null||a(z),d&&(f(!1),c==null||c())},[n,a,d,c,T,m]),A=p.useCallback(V=>{C(V)},[]),P=p.useCallback(()=>{b&&(M(b),C(""))},[b,M]),F=p.useCallback(()=>{f(!1),c==null||c()},[c]);return{isOpen:h,selectedColor:y,recentColors:j,customColor:b,handleToggle:v,handleColorSelect:M,handleCustomColorChange:A,handleCustomColorSubmit:P,handleClose:F,triggerRef:w,dropdownRef:x}},Fo={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},dropdown:{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.14)",padding:"16px",minWidth:"320px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(6, 36px)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"12px",marginBottom:"16px"},customInput:{marginBottom:"12px"},recentColors:{borderTop:"1px solid color-gray-100",paddingTop:"12px"}},kx={xs:{height:"32px",fontSize:"12px",padding:"4px 8px"},sm:{height:"40px",fontSize:"12px",padding:"8px 10px"},md:{height:"44px",fontSize:"14px",padding:"10px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 14px"},xl:{height:"56px",fontSize:"18px",padding:"14px 16px"}},Cx={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Sx={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"}},jx=[{name:"Blue",value:"#1D4ED8",category:"primary"},{name:"Purple",value:"#A855F7",category:"primary"},{name:"Green",value:"#22C55E",category:"primary"},{name:"Orange",value:"#F97316",category:"primary"},{name:"Red",value:"#EF4444",category:"primary"},{name:"Ink",value:"#111827",category:"neutral"}],wx=typeof navigator<"u"&&navigator.product!=="ReactNative"&&typeof document<"u"&&typeof document.createElement=="function",vx=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:s="md",shape:c="default",variant:d="default",error:u=!1,isDisabled:g=!1,isReadOnly:m=!1,predefinedColors:h=jx,showCustomInput:f=!0,showRecentColors:y=!0,isOpen:k,selectedColor:b,recentColors:C,customColor:j,handleToggle:S,handleColorSelect:w,handleCustomColorChange:x,handleCustomColorSubmit:T,handleClose:v,triggerRef:M,dropdownRef:A,onChange:P,onChangeComplete:F,onOpen:V,onClose:z,colorFormat:I,maxRecentColors:W,closeOnSelect:H,defaultValue:R,value:D,...$})=>{const _={...Fo.container,...l==null?void 0:l.container},B={...Fo.trigger,...kx[s],...Cx[c],...Sx[d],...u&&{borderColor:"color-red-500"},...g&&{opacity:.6,cursor:"not-allowed"},...!g&&!m&&{_hover:{borderColor:"color-gray-400"}},...l==null?void 0:l.trigger},N={...Fo.dropdown,...l==null?void 0:l.dropdown},Y={...Fo.colorGrid,...l==null?void 0:l.colorGrid},ee={...Fo.recentColors,...l==null?void 0:l.recentColors},L=b||"color-gray-200";return r.jsxs(i.View,{id:e,..._,...$,children:[t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:M,onClick:g||m?void 0:S,...B,children:[r.jsxs(i.Horizontal,{alignItems:"center",gap:8,children:[r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:L,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),r.jsx(i.Text,{color:b?"color-gray-900":"color-gray-500",fontSize:"inherit",children:b||n})]}),!m&&!g&&r.jsx(ue,{widthHeight:16,color:"color-gray-500",orientation:k?"up":"down"})]}),k&&r.jsxs(i.View,{ref:A,...N,children:[r.jsx(i.View,{...Y,children:h.map((E,O)=>r.jsx(i.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:E.value,borderWidth:"1px",borderStyle:"solid",borderColor:b===E.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>w(E.value),title:E.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...l==null?void 0:l.colorSwatch},O))}),f&&r.jsxs(i.View,{...Fo.customInput,...l==null?void 0:l.customInput,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[wx&&r.jsx("input",{type:"color",value:j||"#1D4ED8",onChange:E=>{const O=E.target.value;x(O),w(O)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),r.jsx(Me,{placeholder:"#1D4ED8",value:j,onChange:E=>{var O;return x(typeof E=="string"?E:((O=E==null?void 0:E.target)==null?void 0:O.value)??"")},onKeyPress:E=>{E.key==="Enter"&&T()},size:"sm",right:j&&r.jsx(i.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:j,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:T})})]}),y&&C.length>0&&r.jsxs(i.View,{...ee,children:[r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:8,flexWrap:"wrap",children:C.map((E,O)=>r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:E,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>w(E),title:E,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},O))})]})]}),a&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:u?"color-red-500":"color-gray-500",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},Tx=e=>{const o=bx(e);return r.jsx(vx,{...o,...e})},qi=Tx,Ix=e=>{const o=fi(e);return r.jsx(yi,{...o,...e})},Rx=Ix,Fx=e=>{const o=gi(e);return r.jsx(hi,{...o,...e})},zx=Fx,ga={"to-right":"to right","to-left":"to left","to-bottom":"to bottom","to-top":"to top","to-top-right":"to top right","to-top-left":"to top left","to-bottom-right":"to bottom right","to-bottom-left":"to bottom left"},jr={center:"center",top:"top",right:"right",bottom:"bottom",left:"left","top-right":"top right","top-left":"top left","bottom-right":"bottom right","bottom-left":"bottom left"},Mx={linear:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],radial:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],conic:[{color:"color-red-500",position:"0deg"},{color:"color-yellow-500",position:"90deg"},{color:"color-green-500",position:"180deg"},{color:"color-blue-500",position:"270deg"},{color:"color-red-500",position:"360deg"}]},Wx=(e,o,t,n,a)=>{const l=o.map(s=>`${s.color} ${s.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${t&&ga[t]?ga[t]:t||"to right"}, ${l})`;case"radial":const c=a&&jr[a]?jr[a]:a||"center";return`radial-gradient(${n||"circle"} at ${c}, ${l})`;case"conic":return`conic-gradient(from 0deg at ${a&&jr[a]?jr[a]:a||"center"}, ${l})`;default:return`linear-gradient(to right, ${l})`}},Hx={linear:{backgroundSize:"200% 200%",transition:"background-position 3s ease-in-out",animate:{from:{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},to:{backgroundPosition:"0% 50%"}}},radial:{backgroundSize:"100% 100%",transition:"background-position 3s ease-in-out, background-size 3s ease-in-out",animate:{from:{backgroundPosition:"center",backgroundSize:"100% 100%"},"50%":{backgroundSize:"120% 120%"},to:{backgroundPosition:"center",backgroundSize:"100% 100%"}}},conic:{transition:"transform 3s linear",animate:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}},ha={container:{position:"relative",overflow:"hidden",borderRadius:"8px",transition:"border-radius 0.2s ease, opacity 0.2s ease"},content:{position:"relative",zIndex:1,width:"100%",height:"100%",padding:"16px"}},Vx=({type:e="linear",direction:o="to-right",shape:t="circle",position:n="center",from:a,to:l,colors:s,animate:c=!1,animationDuration:d=3,children:u,views:g,themeMode:m,...h})=>{const f=p.useMemo(()=>s&&s.length>0?s:a&&l?[{color:a,position:"0%"},{color:l,position:"100%"}]:Mx[e],[s,a,l,e]),y=p.useMemo(()=>{const b=f.map(C=>({...C,color:C.color}));return Wx(e,b,o,t,n)},[e,f,o,t,n]),k=p.useMemo(()=>{if(!c)return{};const b=Hx[e];return{...b,transition:b.transition.replace("3s",`${d}s`),animationDuration:`${d}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[c,d,e]);return r.jsx(i.View,{background:y,...ha.container,...k,...g==null?void 0:g.container,...h,children:u&&r.jsx(i.View,{...ha.content,...g==null?void 0:g.content,children:u})})},Ui=e=>r.jsx(Vx,{...e}),Ax=(e=null,o=null)=>{const[t,n]=p.useState(e),[a,l]=p.useState(o),s=d=>a===d,c=d=>{l(u=>u===d?null:d)};return p.useEffect(()=>{const d=g=>{!g.composedPath().some(f=>(f==null?void 0:f.id)==="menubar-content"||(f==null?void 0:f.id)==="menubar-trigger")&&a!==null&&l(null)},u=g=>{g.key==="Escape"&&a!==null&&l(null)};if(!(typeof document>"u"))return document.addEventListener("mousedown",d),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",u)}},[a]),{activeMenuId:t,setActiveMenuId:n,openMenuId:a,setOpenMenuId:l,isMenuOpen:s,toggleMenu:c}},Gi={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},Px={default:{backgroundColor:"transparent",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Ex={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},Fr={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},Yi=p.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),ot=()=>p.useContext(Yi),Dx=({value:e,children:o})=>r.jsx(Yi.Provider,{value:e,children:o}),Ki=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",views:a,...l})=>{const s=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(s,{role:"menubar","aria-orientation":o,...Ex[o],...Px[n],...a==null?void 0:a.container,...l,children:e})},Xi=({children:e,id:o,disabled:t=!1,views:n})=>{const{orientation:a}=ot(),l=a==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(l,{role:"none",position:"relative",opacity:t?.5:1,pointerEvents:t?"none":"auto",...n==null?void 0:n.menu,children:p.Children.map(e,s=>p.isValidElement(s)?p.cloneElement(s,{...s.props,menuId:o}):s)})},Ji=({children:e,menuId:o,disabled:t=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:l,toggleMenu:s,isMenuOpen:c,size:d,triggerRefs:u}=ot(),g=p.useRef(null),m=a===o,h=c(o);p.useEffect(()=>(g.current&&o&&(u.current[o]=g.current),()=>{o&&delete u.current[o]}),[o,u]);const f=()=>{t||(l(o),s(o))};return r.jsx(i.View,{ref:g,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":h,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...Gi[d],...m?Fr.active:{},...t?Fr.disabled:{},_hover:t?{}:Fr.hover,onClick:f,...n==null?void 0:n.trigger,children:e})},Qi=({children:e,menuId:o,views:t})=>{const{isMenuOpen:n,orientation:a,triggerRefs:l}=ot(),s=p.useRef(null),[c,d]=p.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),u=n(o);if(p.useEffect(()=>{if(u&&s.current&&o&&l.current[o]){const m=s.current.getBoundingClientRect(),h=l.current[o].getBoundingClientRect(),f=Math.max(m.width||200,200),y=Math.max(m.height||150,150),k=window.innerWidth,b=window.innerHeight,C={top:h.top,right:k-h.right,bottom:b-h.bottom,left:h.left},j=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8}],S=j.find(v=>v.fits);if(S){d({x:S.x,y:S.y,placement:S.placement});return}const w=j.reduce((v,M)=>M.space>v.space?M:v);let x=w.x,T=w.y;x+f>k&&(x=k-f-8),x<8&&(x=8),T+y>b&&(T=b-y-8),T<8&&(T=8),d({x,y:T,placement:w.placement})}},[u,a,o,l]),!u)return null;const g={position:"fixed",left:c.x,top:c.y,zIndex:1e3};return r.jsx(i.View,{ref:s,id:"menubar-content",role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:g,...t==null?void 0:t.content,children:e})},Zi=({children:e,icon:o,disabled:t=!1,onClick:n,views:a})=>{const{size:l}=ot(),s=()=>{t||!n||n()};return r.jsxs(i.View,{role:"menuitem",cursor:t?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:t?.5:1,...Gi[l],_hover:t?{}:Fr.hover,onClick:s,...a==null?void 0:a.item,children:[o&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},es=({views:e})=>r.jsx(i.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),$x=({items:e,orientation:o,size:t,variant:n,views:a,themeMode:l})=>r.jsx(Ki,{orientation:o,size:t,variant:n,views:a,children:e.map(s=>r.jsxs(Xi,{id:s.id,disabled:s.disabled,views:a,children:[r.jsxs(Ji,{menuId:s.id,views:a,children:[s.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:s.icon}),s.label]}),s.items&&s.items.length>0&&r.jsx(Qi,{menuId:s.id,views:a,children:s.items.map((c,d)=>c.separator?r.jsx(es,{views:a},`separator-${d}`):r.jsx(Zi,{id:c.id,icon:c.icon,disabled:c.disabled,onClick:c.onClick,views:a,children:c.label},c.id))})]},s.id))}),Lx=({items:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:l=null,views:s,...c})=>{const{activeMenuId:d,setActiveMenuId:u,openMenuId:g,setOpenMenuId:m,isMenuOpen:h,toggleMenu:f}=Ax(a,l),y=p.useRef({});return r.jsx(Dx,{value:{activeMenuId:d,setActiveMenuId:u,openMenuId:g,setOpenMenuId:m,isMenuOpen:h,toggleMenu:f,orientation:o,size:t,variant:n,triggerRefs:y},children:r.jsx($x,{items:e,orientation:o,size:t,variant:n,views:s,...c})})},Co=Lx;Co.Root=Ki;Co.Menu=Xi;Co.Trigger=Ji;Co.Content=Qi;Co.Item=Zi;Co.Separator=es;const _x=(e,o,t)=>{const[n,a]=p.useState([]);return p.useEffect(()=>{a((()=>{const s=[];if(o<=t)for(let c=1;c<=o;c++)s.push(c);else{s.push(1);let c=Math.max(2,e-Math.floor((t-2)/2)),d=Math.min(o-1,c+t-3);d>=o-1&&(d=o-1,c=Math.max(2,d-(t-3))),c>2&&s.push("...");for(let u=c;u<=d;u++)s.push(u);d<o-1&&s.push("..."),s.push(o)}return s})())},[e,o,t]),{visiblePageNumbers:n}},zo={sm:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px",media:{mobile:{fontSize:"11px",padding:"3px 6px",minWidth:"24px",height:"24px"}}},md:{fontSize:"14px",padding:"6px 10px",minWidth:"32px",height:"32px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}},lg:{fontSize:"14px",padding:"8px 12px",minWidth:"36px",height:"36px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}}},Zo={default:{backgroundColor:"transparent",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-200"}},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}}},er={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},Bx={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},wr={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},Ox=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a=[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"100 / page",value:100}],onPageSizeChange:l,showPageSizeSelector:s=!1,showPageInfo:c=!0,maxPageButtons:d=5,showFirstLastButtons:u=!1,size:g="md",variant:m="default",shape:h="rounded",visiblePageNumbers:f=[],views:y,...k})=>{const b=S=>{S<1||S>o||S===e||t(S)},C=S=>{l&&l(Number(S.target.value))},j=(S,w)=>{if(S==="...")return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...zo[g],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${w}`);const x=S===e;return r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:x?"default":"pointer",...zo[g],...Zo[m],...er[h],...x?Bx:{},onClick:()=>b(S),"aria-label":`Page ${S}`,"aria-current":x?"page":void 0,...x?y==null?void 0:y.activePageButton:y==null?void 0:y.pageButton,children:S},`page-${S}`)};return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,...y==null?void 0:y.container,...k,children:[u&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...zo[g],...Zo[m],...er[h],...e===1?wr:{},onClick:()=>b(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[r.jsx(ue,{orientation:"left",widthHeight:16}),r.jsx(ue,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...zo[g],...Zo[m],...er[h],...e===1?wr:{},onClick:()=>b(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:r.jsx(ue,{orientation:"left",widthHeight:16})}),f.map((S,w)=>j(S,w)),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...zo[g],...Zo[m],...er[h],...e===o?wr:{},onClick:()=>b(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:r.jsx(ue,{orientation:"right",widthHeight:16})}),u&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...zo[g],...Zo[m],...er[h],...e===o?wr:{},onClick:()=>b(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[r.jsx(ue,{orientation:"right",widthHeight:16}),r.jsx(ue,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),c&&r.jsxs(i.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),s&&l&&r.jsx(i.View,{as:"select",marginLeft:16,padding:"4px 8px",borderRadius:"4px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"color-white",cursor:"pointer",value:n,onChange:C,...y==null?void 0:y.pageSizeSelector,children:a.map(S=>r.jsx("option",{value:S.value,children:S.label},S.value))})]})},Nx=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:s=!1,showPageInfo:c=!0,maxPageButtons:d=5,showFirstLastButtons:u=!1,size:g="md",variant:m="default",shape:h="rounded",views:f,...y})=>{const{visiblePageNumbers:k}=_x(e,o,d);return r.jsx(Ox,{currentPage:e,totalPages:o,onPageChange:t,pageSize:n,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:s,showPageInfo:c,maxPageButtons:d,showFirstLastButtons:u,size:g,variant:m,shape:h,visiblePageNumbers:k,views:f,...y})},os=Nx,qx=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Ux=p.memo(({shape:e="linear",value:o=0,max:t=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:l,size:s,radius:c=4,strokeWidth:d=10,showLabel:u=!1,labelColor:g="color-black-primary",animated:m=!0,animationDuration:h="0.5s",views:f,themeMode:y,...k})=>{var P;const{getColor:b,themeMode:C}=i.useTheme(),j=y||C,w=Math.min(t,Math.max(0,o))/t*100,x=F=>qx(F)?F:b(F,{themeMode:j}),T=p.useMemo(()=>x(a),[b,a,j]),v=p.useMemo(()=>x(n),[b,n,j]);if(e==="circle"){const F=s||(typeof l=="number"?l:100),V=(F-d)/2,z=2*Math.PI*V,I=z-w/100*z;return r.jsxs(i.View,{width:F,height:F,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...k,children:[r.jsxs("svg",{width:F,height:F,viewBox:`0 0 ${F} ${F}`,style:{transform:"rotate(-90deg)"},children:[r.jsx("circle",{cx:F/2,cy:F/2,r:V,stroke:T,strokeWidth:d,fill:"transparent",...f==null?void 0:f.track}),r.jsx("circle",{cx:F/2,cy:F/2,r:V,stroke:v,strokeWidth:d,strokeDasharray:z,strokeDashoffset:I,strokeLinecap:"round",fill:"transparent",style:{transition:m?`stroke-dashoffset ${h} ease-in-out`:"none"},...f==null?void 0:f.indicator})]}),u&&r.jsx(i.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:r.jsxs(i.Text,{color:g,fontSize:`${F*.2}px`,fontWeight:"bold",...f==null?void 0:f.text,children:[Math.round(w),"%"]})})]})}const M=l||8,A={backgroundColor:T,...((P=f==null?void 0:f.container)==null?void 0:P.style)||{},...k.style||{}};return r.jsxs(i.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,width:"100%",height:M,borderRadius:c,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...k,style:A,children:[r.jsx("div",{style:{height:"100%",backgroundColor:v,borderRadius:typeof c=="number"?`${c}px`:c,position:"absolute",left:0,top:0,bottom:0,width:`${w}%`,transition:m?`width ${h} ease-in-out`:"none",...f==null?void 0:f.bar}}),u&&r.jsxs(i.Text,{color:g,fontSize:typeof M=="number"&&M>16?`${M*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...f==null?void 0:f.text,children:[Math.round(w),"%"]})]})}),Gx=e=>{const o=fe("progress",e);return r.jsx(Ux,{...o})},rs=Gx,Yx=e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}),Kx=Yx(),Xx={thin:"1px",medium:"2px",thick:"4px"},or={container:{transition:"opacity 0.15s ease"},label:{fontSize:"14px",fontWeight:"500",color:"color-gray-600",paddingHorizontal:"8px",backgroundColor:"color-white",transition:"color 0.15s ease"}},Jx=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Qx=({orientation:e="horizontal",variant:o="solid",thickness:t="thin",color:n,spacing:a="0px",label:l,decorative:s=!1,views:c,themeMode:d,...u})=>{const{themeMode:g}=i.useTheme(),m=n||"color-gray-200",h=Kx[o],f=Xx[t],y=s?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},k=Jx(m)?{style:{borderColor:m}}:{borderColor:m};return l&&e==="horizontal"?r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...y,...u,children:[r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...k,...or.container,...c==null?void 0:c.container}),r.jsx(i.Text,{...or.label,...c==null?void 0:c.label,children:l}),r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...k,...or.container,...c==null?void 0:c.container})]}):e==="horizontal"?r.jsx(i.View,{height:"0px",width:"100%",borderTop:`${f} ${h}`,padding:a,...k,...or.container,...y,...c==null?void 0:c.container,...u}):r.jsx(i.View,{width:"0px",height:"100%",borderLeft:`${f} ${h}`,padding:a,...k,...or.container,...y,...c==null?void 0:c.container,...u})},ts=e=>{const o=fe("separator",e);return r.jsx(Qx,{...o})},Nr=ts,Zx=ts,eb={xs:12,sm:14,md:16,lg:18,xl:20},ob=({isSupported:e,isSharing:o,onShare:t,label:n,children:a,icon:l,size:s,isDisabled:c,isLoading:d,iconPosition:u,disableWhenUnsupported:g=!0,...m})=>{const h=s??"md",f=l??r.jsx(Xa,{widthHeight:eb[h],strokeWidth:1.5,filled:!1}),y=!!c||!e&&g,k=!!d||o;return r.jsx(ce,{...m,size:h,icon:f,iconPosition:u??"left",isDisabled:y,isLoading:k,onClick:t,children:a??n??"Share"})},fa=()=>typeof navigator>"u"?void 0:navigator,rb=(e,o)=>{if(!e||typeof e.share!="function")return!1;if(typeof e.canShare=="function")try{return e.canShare(o)}catch{return!1}return!0},tb=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},nb=e=>{const{shareData:o,onClick:t,onUnsupported:n,onShareStart:a,onShareSuccess:l,onShareCancel:s,onShareError:c}=e,[d,u]=p.useState(!1),g=p.useMemo(()=>rb(fa(),o),[o]),m=p.useCallback((...h)=>{t==null||t(...h);const f=fa();if(!f||typeof f.share!="function"){n==null||n();return}if(!d){if(typeof f.canShare=="function")try{if(!f.canShare(o)){n==null||n();return}}catch(y){c==null||c(y);return}u(!0),a==null||a();try{f.share(o).then(()=>{l==null||l()}).catch(y=>{if(tb(y)==="AbortError"){s==null||s();return}c==null||c(y)}).finally(()=>{u(!1)})}catch(y){u(!1),c==null||c(y)}}},[d,t,s,c,a,l,n,o]);return{isSupported:g,isSharing:d,handleShare:m}},ab=e=>{const{isSupported:o,isSharing:t,handleShare:n}=nb(e),{shareData:a,onShareStart:l,onShareSuccess:s,onShareCancel:c,onShareError:d,onUnsupported:u,onClick:g,...m}=e;return r.jsx(ob,{...m,isSupported:o,isSharing:t,onShare:n})},ns=ab,lb=({label:e,status:o="default",views:t,themeMode:n,...a})=>{const{themeMode:l}=i.useTheme(),s=il();return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,role:"status",...t==null?void 0:t.container,...a,children:[r.jsx(i.View,{"data-role":"status-dot","aria-hidden":"true",width:"8px",height:"8px",borderRadius:"50%",...s[o].indicator,...t==null?void 0:t.indicator}),e&&r.jsx(i.Text,{"data-role":"status-label",fontSize:"14px",lineHeight:"20px",...s[o].label,...t==null?void 0:t.label,children:e})]})},zr=e=>{const o=fe("status",e);return r.jsx(lb,{...o})},ib=(e=!0,o,t,n)=>{const{on:a}=i.useResponsive(),l=a("mobile"),[s,c]=p.useState(o!==void 0?o:e);return p.useEffect(()=>{o!==void 0&&c(o)},[o]),{isExpanded:s,toggleExpanded:()=>{const m=!s;c(m),t&&t(m)},expand:()=>{s||(c(!0),t&&t(!0))},collapse:()=>{s&&(c(!1),t&&t(!1))},isMobile:l}},sb={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},cb=e=>({default:{backgroundColor:"color-white",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},subtle:{backgroundColor:"color-gray-50",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease"},elevated:{backgroundColor:"color-white",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",color:"color-gray-800",transition:"all 0.2s ease-in-out"}}),db=cb(),ub={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},pb={none:{},low:{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},medium:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)"},high:{boxShadow:"0 10px 30px rgba(0, 0, 0, 0.15)"}},mb={fast:"all 0.2s ease-in-out",normal:"all 0.3s ease-in-out",slow:"all 0.5s ease-in-out",bounce:"all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55)"},as=p.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),rt=()=>p.useContext(as),gb=({value:e,children:o})=>r.jsx(as.Provider,{value:e,children:o}),hb=({children:e,showToggleButton:o=!0,views:t,...n})=>{const{isExpanded:a,toggleExpanded:l,position:s}=rt();return r.jsx(i.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...t==null?void 0:t.header,...n,children:a?r.jsxs(i.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(ue,{orientation:s==="left"?"left":"right",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})]}):r.jsx(i.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(ue,{orientation:s==="left"?"right":"left",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})})})},fb=({children:e,views:o,...t})=>{const{isExpanded:n}=rt();return r.jsx(i.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...t,children:e})},yb=({children:e,views:o,...t})=>{const{isExpanded:n}=rt();return r.jsx(i.View,{width:"100%",padding:n?"16px":"8px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...t,children:e})},xb=({children:e,position:o="left",size:t="md",variant:n="default",fixed:a=!1,hasBackdrop:l=!0,expandedWidth:s,collapsedWidth:c,breakpoint:d,breakpointBehavior:u="overlay",elevation:g="none",transitionPreset:m="normal",ariaLabel:h="Sidebar navigation",showToggleButton:f,toggleExpanded:y,expand:k,isExpanded:b,isMobile:C,collapse:j,views:S,themeMode:w,...x})=>{const T=sb[t],v=b?s||T.expandedWidth:c||T.collapsedWidth,M=!C||C&&u!=="hide",A=a||C&&u==="overlay"?"fixed":"relative",P=l&&C&&b&&u==="overlay";return r.jsxs(r.Fragment,{children:[P&&r.jsx(i.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-dark-50-360",zIndex:998,onClick:j,...S==null?void 0:S.backdrop}),M&&r.jsx(i.Vertical,{position:A,top:0,height:"100vh",width:v,zIndex:999,transition:mb[m],transform:C&&u==="overlay"&&!b?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":h,...db[n],...ub[o],...pb[g],...S==null?void 0:S.container,...x,children:p.Children.map(e,F=>F)})]})},bb=({children:e,position:o="left",size:t="md",variant:n="default",defaultExpanded:a=!0,expanded:l,onExpandedChange:s,fixed:c=!1,hasBackdrop:d=!0,showToggleButton:u=!0,expandedWidth:g,collapsedWidth:m,breakpoint:h=768,breakpointBehavior:f="overlay",views:y,...k})=>{const{isExpanded:b,toggleExpanded:C,expand:j,collapse:S,isMobile:w}=ib(a,l,s);return r.jsx(gb,{value:{isExpanded:b,toggleExpanded:C,expand:j,collapse:S,position:o,size:t,variant:n,views:y},children:r.jsx(xb,{position:o,size:t,variant:n,fixed:c,hasBackdrop:d,showToggleButton:u,expandedWidth:g,collapsedWidth:m,breakpoint:h,breakpointBehavior:f,isExpanded:b,isMobile:w,toggleExpanded:C,expand:j,collapse:S,views:y,...k,children:e})})},hr=bb;hr.Header=hb;hr.Content=fb;hr.Footer=yb;hr.useContext=rt;const kb=()=>({getItem:e=>{try{return typeof localStorage>"u"?null:localStorage.getItem(`resizable-${e}`)}catch(o){return console.warn("Failed to access localStorage:",o),null}},setItem:(e,o)=>{try{if(typeof localStorage>"u")return;localStorage.setItem(`resizable-${e}`,o)}catch(t){console.warn("Failed to write to localStorage:",t)}}}),Cb=(e,o,t,n=50,a=1/0,l=!1,s,c,d=10)=>{const[u,g]=p.useState(!1),[m,h]=p.useState([]),f=p.useRef(null),y=p.useRef(null),k=p.useRef(0),b=p.useRef([]),C=p.useRef(c||(typeof window<"u"?kb():null)),j=p.useCallback(()=>f.current?e==="horizontal"?f.current.offsetWidth:f.current.offsetHeight:0,[e]),S=p.useCallback(()=>{if(!s||!C.current)return null;const W=C.current.getItem(s);if(!W)return null;try{const H=JSON.parse(W);return Array.isArray(H.sizes)?H.sizes:null}catch(H){return console.warn("Failed to parse saved panel sizes:",H),null}},[s]),w=p.useCallback(()=>{if(!s||!C.current||m.length===0)return;const W=m.map(H=>({id:H.id,size:H.size,collapsed:H.collapsed||!1}));C.current.setItem(s,JSON.stringify({sizes:W}))},[s,m]),x=p.useCallback((W,H,R,D,$)=>{h(_=>_.some(B=>B.id===W)?_:[..._,{id:W,size:H,minSize:R??n,maxSize:D??a,collapsible:$??l,collapsed:!1}])},[n,a,l]),T=p.useCallback(W=>{h(H=>H.filter(R=>R.id!==W))},[]),v=p.useCallback(W=>{const H=m.find(R=>R.id===W);return H?H.size:0},[m]),M=p.useCallback((W,H)=>{h(R=>R.map(D=>D.id===W?{...D,size:H}:D))},[]),A=p.useCallback(W=>{const H=m.find(R=>R.id===W);return H?!!H.collapsed:!1},[m]),P=p.useCallback(W=>{h(H=>{const R=H.findIndex(B=>B.id===W);if(R===-1)return H;const D=H[R];if(!D.collapsible)return H;const $={...D,collapsed:!D.collapsed},_=[...H];return _[R]=$,_})},[]),F=p.useCallback((W,H)=>{y.current=W,k.current=H,b.current=m.map(R=>R.size),g(!0)},[m]),V=p.useCallback(W=>{if(!u||!y.current)return;const H=y.current,R=W-k.current;let D=-1;const $=H.match(/\d+$/);if($&&(D=parseInt($[0],10)-1),D===-1&&m.length>=2&&(D=0),D<0||D>=m.length-1)return;const _=m[D],B=m[D+1];if(_.collapsed||B.collapsed)return;let N=b.current[D]+R,Y=b.current[D+1]-R;N=Math.max(_.minSize??n,Math.min(_.maxSize??a,N)),Y=Math.max(B.minSize??n,Math.min(B.maxSize??a,Y)),h(ee=>ee.map((L,E)=>E===D?{...L,size:N}:E===D+1?{...L,size:Y}:L))},[u,m,e,n,a]),z=p.useCallback(()=>{u&&t&&t(m.map(W=>W.size)),y.current=null,g(!1),s&&w()},[u,m,t,s,w]),I=p.useCallback(W=>{if(!u||!y.current)return;const H=y.current;let R=-1;const D=H.match(/\d+$/);if(D&&(R=parseInt(D[0],10)-1),R===-1&&m.length>=2&&(R=0),R<0||R>=m.length-1)return;let $=0;e==="horizontal"?(W.key==="ArrowLeft"&&($=-d),W.key==="ArrowRight"&&($=d),W.key==="Home"&&($=-100),W.key==="End"&&($=100)):(W.key==="ArrowUp"&&($=-d),W.key==="ArrowDown"&&($=d),W.key==="Home"&&($=-100),W.key==="End"&&($=100)),$!==0&&(W.preventDefault(),V(k.current+$)),W.key==="Escape"&&(h(_=>_.map((B,N)=>({...B,size:b.current[N]}))),z())},[u,m,e,V,z,d]);return p.useEffect(()=>{if(typeof document>"u")return;const W=D=>{if(!u)return;const $=e==="horizontal"?D.clientX:D.clientY;V($)},H=D=>{if(!u||D.touches.length===0)return;const $=D.touches[0],_=e==="horizontal"?$.clientX:$.clientY;V(_)},R=()=>{u&&z()};return u&&(document.addEventListener("mousemove",W),document.addEventListener("touchmove",H),document.addEventListener("mouseup",R),document.addEventListener("touchend",R),document.addEventListener("keydown",I),document.body.style.cursor=e==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",W),document.removeEventListener("touchmove",H),document.removeEventListener("mouseup",R),document.removeEventListener("touchend",R),document.removeEventListener("keydown",I),document.body.style.cursor="",document.body.style.userSelect=""}},[u,e,V,z,I]),p.useEffect(()=>{if(m.length!==0){if(s){const W=S();if(W){h(H=>H.map(R=>{const D=W.find($=>$.id===R.id);return D?{...R,size:D.size,collapsed:D.collapsed||!1}:R}));return}}if(!o){const H=j()/m.length;h(R=>R.map(D=>({...D,size:H})))}}},[m.length,o,j,s,S]),p.useEffect(()=>{if(!o||o.length===0||m.length===0)return;const W=j(),H=o.map(R=>typeof R=="string"&&R.endsWith("%")?parseFloat(R)/100*W:typeof R=="number"?R:parseFloat(R));h(R=>R.map((D,$)=>({...D,size:$<H.length?H[$]:D.size})))},[o,m.length,j]),p.useEffect(()=>{m.length>0&&s&&!u&&w()},[m,s,u,w]),{isResizing:u,setIsResizing:g,containerRef:f,panels:m,registerPanel:x,unregisterPanel:T,getPanelSize:v,setPanelSize:M,isPanelCollapsed:A,togglePanelCollapse:P,startResize:F,onResize:V,endResize:z}},Sb={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},jb=(e,o)=>({sm:{width:o==="horizontal"?"4px":"100%",height:o==="vertical"?"4px":"100%"},md:{width:o==="horizontal"?"6px":"100%",height:o==="vertical"?"6px":"100%"},lg:{width:o==="horizontal"?"8px":"100%",height:o==="vertical"?"8px":"100%"}})[e],wb=e=>({default:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}},subtle:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-100"},_active:{backgroundColor:"color-gray-200"}},prominent:{backgroundColor:"color-gray-100",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}}}),vb=wb(),vr={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},ls=p.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),is=()=>p.useContext(ls),Tb=({value:e,children:o})=>r.jsx(ls.Provider,{value:e,children:o}),Ib=({children:e,id:o,defaultSize:t,minSize:n,maxSize:a,collapsible:l,defaultCollapsed:s,onCollapseChange:c,views:d,...u})=>{const{orientation:g,registerPanel:m,unregisterPanel:h,getPanelSize:f,isPanelCollapsed:y,togglePanelCollapse:k}=is(),b=typeof t=="string"&&t.endsWith("%")?0:typeof t=="number"?t:0;p.useEffect(()=>(m(o,b,n,a,l),()=>h(o)),[o,b,n,a,l,m,h]);const C=f(o),j=y(o);return p.useEffect(()=>{c&&j!==void 0&&c(j)},[j,c]),p.useEffect(()=>{l&&s&&!j&&k(o)},[o,l,s,j,k]),j?r.jsx(i.View,{flex:"0 0 auto",width:g==="horizontal"?"10px":"100%",height:g==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>k(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...d==null?void 0:d.collapsedPanel,...u}):r.jsx(i.View,{flex:C>0?"0 0 auto":"1",width:g==="horizontal"?`${C}px`:"100%",height:g==="vertical"?`${C}px`:"100%",overflow:"auto",...d==null?void 0:d.panel,...u,children:e})},Rb=({id:e,position:o="both",disabled:t=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:l,views:s,...c})=>{const{orientation:d,size:u,variant:g,startResize:m,isPanelCollapsed:h,togglePanelCollapse:f}=is(),k=(()=>{if(l)return l;const x=e.match(/\d+$/);if(!x)return"";const T=parseInt(x[0],10);return isNaN(T)?"":`panel${T}`})(),b=h(k),C=x=>{if(t)return;x.preventDefault();const T=d==="horizontal"?x.clientX:x.clientY;m(e,T)},j=x=>{if(t||x.touches.length===0)return;x.preventDefault();const T=x.touches[0],v=d==="horizontal"?T.clientX:T.clientY;m(e,v)},S=x=>{t||(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),m(e,0))},w=x=>{x.stopPropagation(),k&&f(k)};return r.jsxs(i.View,{role:"separator","aria-orientation":d,"aria-valuemin":0,"aria-valuemax":100,tabIndex:t?-1:0,cursor:d==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...jb(u,d),...vb[g],onMouseDown:C,onTouchStart:j,onKeyDown:S,opacity:t?.5:1,pointerEvents:t?"none":"auto",...s==null?void 0:s.handle,...c,children:[n&&r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:d==="horizontal"?"100%":"auto",height:d==="vertical"?"100%":"auto",pointerEvents:"none",...s==null?void 0:s.handleIcon,children:d==="horizontal"?r.jsxs(i.Horizontal,{gap:1,children:[r.jsx(i.View,{...vr.horizontal}),r.jsx(i.View,{...vr.horizontal})]}):r.jsxs(i.Vertical,{gap:1,children:[r.jsx(i.View,{...vr.vertical}),r.jsx(i.View,{...vr.vertical})]})}),a&&k&&r.jsx(i.View,{position:"absolute",top:d==="horizontal"?"-20px":"50%",left:d==="horizontal"?"50%":"-20px",transform:d==="horizontal"?"translateX(-50%)":"translateY(-50%)",width:"16px",height:"16px",borderRadius:"full",backgroundColor:"color-gray-100",border:"1px solid",borderColor:"color-gray-300",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:1,onClick:w,"aria-label":b?`Expand panel ${k}`:`Collapse panel ${k}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...s==null?void 0:s.collapseIcon,children:r.jsx(i.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:b?r.jsxs(i.Horizontal,{children:[r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),r.jsx(i.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},Fb=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,minSize:l,maxSize:s,collapsible:c=!1,containerRef:d,autoSaveId:u,keyboardResizeBy:g,onLayout:m,views:h,...f})=>{const y=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(y,{ref:d,width:"100%",height:"100%",position:"relative",overflow:"hidden",...Sb[o],...h==null?void 0:h.container,...f,children:e})},zb=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,onSizesChange:l,minSize:s=50,maxSize:c,collapsible:d=!1,autoSaveId:u,storage:g,keyboardResizeBy:m=10,views:h,...f})=>{const{isResizing:y,setIsResizing:k,containerRef:b,registerPanel:C,unregisterPanel:j,getPanelSize:S,setPanelSize:w,isPanelCollapsed:x,togglePanelCollapse:T,startResize:v,onResize:M,endResize:A}=Cb(o,a,l,s,c,d,u,g,m);return r.jsx(Tb,{value:{orientation:o,size:t,variant:n,isResizing:y,setIsResizing:k,registerPanel:C,unregisterPanel:j,getPanelSize:S,setPanelSize:w,isPanelCollapsed:x,togglePanelCollapse:T,startResize:v,onResize:M,endResize:A},children:r.jsx(Fb,{orientation:o,size:t,variant:n,defaultSizes:a,minSize:s,maxSize:c,collapsible:d,autoSaveId:u,keyboardResizeBy:m,containerRef:b,views:h,...f,children:e})})},zn=zb;zn.Panel=Ib;zn.Handle=Rb;const Tr={info:{container:{backgroundColor:"color-blue-50",border:"color-blue-300"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",border:"color-green-300"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},warning:{container:{backgroundColor:"color-orange-50",border:"color-orange-300"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}},error:{container:{backgroundColor:"color-red-50",border:"color-red-300"},content:{color:"color-red-700"},icon:{color:"color-red-500"}}},Mb={top:{top:"16px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"16px",right:"16px"},"top-left":{top:"16px",left:"16px"},bottom:{bottom:"16px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"16px",right:"16px"},"bottom-left":{bottom:"16px",left:"16px"}},Wb=()=>Math.random().toString(36).substring(2,9);let Mo=new Map;const fr=Oo.create(e=>({toasts:[],add:(o,t,n,a={})=>{const l=a.id||Wb(),s={id:l,variant:o,title:t,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(c=>({toasts:[...c.toasts,s]})),a.duration!==0){const c=a.duration||5e3,d=setTimeout(()=>{fr.getState().remove(l)},c);Mo.set(l,d)}return l},remove:o=>{e(t=>({toasts:t.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),Mo.has(o)&&(clearTimeout(Mo.get(o)),Mo.delete(o)),setTimeout(()=>{e(t=>({toasts:t.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{Mo.forEach(clearTimeout),Mo.clear(),e(o=>({toasts:o.toasts.map(t=>({...t,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),So=(e,o,t,n)=>fr.getState().add(e,o,t,n),ss=(e,o,t)=>So("info",e,o,t),cs=(e,o,t)=>So("success",e,o,t),ds=(e,o,t)=>So("warning",e,o,t),us=(e,o,t)=>So("error",e,o,t),ps=e=>{fr.getState().remove(e)},ms=()=>{fr.getState().removeAll()},gs=({variant:e,title:o,description:t,onClose:n,isClosable:a=!0,action:l,actionText:s,showIcon:c=!0,theme:d,views:u,render:g,icon:m,id:h,isVisible:f=!0,themeMode:y})=>{const k=d??Tr,b=()=>{var w,x;if(m!==void 0)return m;const S=e?(x=(w=Tr[e])==null?void 0:w.icon)==null?void 0:x.color:Tr.info.icon.color;switch(e){case"info":return r.jsx(ro,{widthHeight:20,color:S});case"success":return r.jsx(Ya,{widthHeight:20,color:S});case"warning":return r.jsx(ro,{widthHeight:20,color:S,orientation:"down"});case"error":return r.jsx(Ur,{widthHeight:20,color:S});default:return r.jsx(ro,{widthHeight:20,color:Tr.info.icon.color})}};if(g)return r.jsx(r.Fragment,{children:g({id:h||"",onClose:n})});const C=e==="error"?"alert":"status",j=e==="error"||e==="warning"?"assertive":"polite";return r.jsxs(i.Horizontal,{role:C,"aria-live":j,"aria-atomic":"true","data-state":f?"open":"closed",gap:12,width:"100%",maxWidth:"380px",borderWidth:"1px",borderStyle:"solid",borderRadius:"12px",padding:"12px 14px",alignItems:"flex-start",position:"relative",backgroundColor:k[e].container.backgroundColor,borderColor:k[e].container.border,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",opacity:f?1:0,transform:f?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...u==null?void 0:u.container,children:[c&&r.jsx(i.View,{marginTop:"2px",...u==null?void 0:u.icon,children:b()}),r.jsxs(i.Vertical,{gap:4,flex:"1",children:[r.jsx(i.Text,{fontSize:"14px",lineHeight:"20px",fontWeight:"600",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,...u==null?void 0:u.title,children:o}),t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"18px",color:k[e].content.color,fontWeight:"400",backgroundColor:k[e].container.backgroundColor,...u==null?void 0:u.description,children:t}),l&&s&&r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,onClick:S=>{S.stopPropagation(),l()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...u==null?void 0:u.actionButton,children:s})]}),a&&r.jsx(i.View,{as:"button","aria-label":"Close toast",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:"4px",marginLeft:"8px",marginTop:"-2px",marginRight:"-4px",borderRadius:"9999px",onClick:S=>{S.stopPropagation(),n()},_hover:{backgroundColor:"color-black-900-60"},transition:"background-color 0.2s ease, opacity 0.2s ease",...u==null?void 0:u.closeButton,children:r.jsx(We,{widthHeight:16,color:k[e].content.color})})]})},Hb=({position:e="top-right",gap:o=8,limit:t=5,containerStyle:n})=>{const{toasts:a,remove:l}=fr(),c=p.useMemo(()=>{const d={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(u=>{const g=u.position||e;d[g].push(u)}),Object.keys(d).forEach(u=>{d[u]=d[u].slice(-t)}),d},[a,e,t])[e];return r.jsx(i.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...Mb[e],style:n,children:c.map(d=>r.jsx(i.View,{pointerEvents:"auto",animation:e.includes("right")?"slideInRight 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("left")?"slideInLeft 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("top")?"slideInDown 0.3s ease-out, fadeIn 0.3s ease-out":"slideInUp 0.3s ease-out, fadeIn 0.3s ease-out",children:r.jsx(gs,{id:d.id,variant:d.variant,title:d.title,description:d.description,onClose:()=>l(d.id),isClosable:d.isClosable,action:d.action,actionText:d.actionText,showIcon:d.showIcon,views:d.views,render:d.render,icon:d.icon,isVisible:d.isVisible})},d.id))})},Vb=()=>({toast:(e,o,t,n)=>So(e,o,t,n),info:(e,o,t)=>ss(e,o,t),success:(e,o,t)=>cs(e,o,t),warning:(e,o,t)=>ds(e,o,t),error:(e,o,t)=>us(e,o,t),remove:e=>ps(e),removeAll:()=>ms()}),Ab=e=>r.jsx(gs,{...e}),Pb=Object.assign(Ab,{Container:e=>r.jsx(Hb,{...e}),show:So,info:ss,success:cs,warning:ds,error:us,remove:ps,removeAll:ms}),Eb=Vb,ya=(e,o)=>{var s,c;if(!e)return!0;const t=e.toLowerCase(),n=o.name.toLowerCase().includes(t),a=((s=o.description)==null?void 0:s.toLowerCase().includes(t))||!1,l=((c=o.keywords)==null?void 0:c.some(d=>d.toLowerCase().includes(t)))||!1;return n||a||l},Db=({open:e,onOpenChange:o,groups:t=[],commands:n=[],filter:a})=>{const[l,s]=p.useState(""),[c,d]=p.useState(0),u=p.useRef(null),g=p.useMemo(()=>a||ya,[a]),m=p.useMemo(()=>[...t.flatMap(b=>b.commands),...n],[t,n]),h=p.useMemo(()=>l.trim()?m.filter(k=>g(l,k)):m,[m,l,g]),f=p.useMemo(()=>{if(!l)return t;const k=a||ya;return t.map(b=>({...b,commands:b.commands.filter(C=>k(l,C))})).filter(b=>b.commands.length)},[t,l,a]);p.useEffect(()=>{d(0)},[h.length]);const y=p.useCallback(k=>{if(e)switch(k.key){case"ArrowDown":k.preventDefault(),d(b=>b<h.length-1?b+1:b);break;case"ArrowUp":k.preventDefault(),d(b=>b>0?b-1:b);break;case"Enter":k.preventDefault(),h[c]&&(h[c].onSelect(),o(!1),s(""));break;case"Escape":k.preventDefault(),o(!1),s("");break}},[e,h,c,o]);return p.useEffect(()=>{if(!(typeof document>"u"))return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[y]),p.useEffect(()=>{const k=u.current;if(k&&typeof k.querySelector=="function"&&e){const b=k.querySelector(`[data-index="${c}"]`);b&&typeof b.scrollIntoView=="function"&&b.scrollIntoView({block:"nearest"})}},[c,e]),p.useEffect(()=>{e?d(0):s("")},[e]),{search:l,setSearch:s,selectedIndex:c,setSelectedIndex:d,filteredCommands:h,filteredGroups:f,listRef:u}},$b=({onClose:e,children:o,...t})=>r.jsx(i.View,{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-dark-50-240",zIndex:9999,onClick:n=>{n.target===n.currentTarget&&(e==null||e())},...t,children:o}),hs=p.forwardRef(({value:e,onValueChange:o,...t},n)=>r.jsx(i.Input,{value:e,onChange:a=>{var l,s;return o(typeof a=="string"?a:((l=a==null?void 0:a.target)==null?void 0:l.value)??((s=a==null?void 0:a.nativeEvent)==null?void 0:s.text)??"")},ref:n,...t}));hs.displayName="CommandTextInput";const Lb={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},_b=e=>({default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},outline:{backgroundColor:"color-white",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"}}),Bb=_b(),Ob={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},Nb={overflow:"auto",padding:"8px 0"},qb={marginBottom:"8px"},Ub={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},Gb={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},Yb={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},Kb={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},Xb={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},Jb={display:"flex",flexDirection:"column",flex:1},Qb={fontSize:"14px",fontWeight:"medium"},Zb={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},e1={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},o1={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},r1={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},t1=p.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),n1=({value:e,children:o})=>r.jsx(t1.Provider,{value:e,children:o}),fs=({value:e,onValueChange:o,placeholder:t="Type a command or search...",views:n,...a})=>{const l=p.useRef(null);return p.useEffect(()=>{l.current&&l.current.focus()},[]),r.jsxs(i.View,{...Ob,...n==null?void 0:n.container,...a,children:[r.jsx(Ar,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),r.jsx(hs,{width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",...n==null?void 0:n.input,value:e,onValueChange:o,placeholder:t,ref:l})]})},a1=({children:e,views:o,...t})=>r.jsx(i.View,{...Nb,...o==null?void 0:o.container,...t,children:e}),ys=({heading:e,children:o,views:t,...n})=>r.jsxs(i.View,{...qb,...t==null?void 0:t.container,...n,children:[r.jsx(i.Text,{...Ub,...t==null?void 0:t.heading,children:e}),o]}),At=({item:e,selected:o=!1,onSelect:t,views:n,...a})=>{const l=()=>{!e.disabled&&t&&t()};return r.jsxs(i.Horizontal,{...Gb,...o?Yb:{},...e.disabled?Kb:{},onPress:l,onClick:l,...n==null?void 0:n.container,...a,children:[e.icon&&r.jsx(i.View,{...Xb,...n==null?void 0:n.icon,children:e.icon}),r.jsxs(i.Vertical,{...Jb,...n==null?void 0:n.content,children:[r.jsx(i.Text,{...Qb,...n==null?void 0:n.name,children:e.name}),e.description&&r.jsx(i.Text,{...Zb,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&r.jsx(i.Text,{...e1,...n==null?void 0:n.shortcut,children:e.shortcut})]})},xs=({children:e="No results found.",views:o,...t})=>r.jsx(i.View,{...o1,...o==null?void 0:o.container,...t,children:e}),l1=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:s="default",emptyState:c,footer:d,search:u,setSearch:g,selectedIndex:m,setSelectedIndex:h,filteredCommands:f,filteredGroups:y,listRef:k,views:b,filter:C,...j})=>{if(!e)return null;const S=p.useCallback(v=>{v.disabled||(v.onSelect(),o(!1),g(""))},[o,g]);p.useCallback(v=>v.target===v.currentTarget&&o(!1),[o]);const w=p.useMemo(()=>({search:u,setSearch:g,selectedIndex:m,setSelectedIndex:h,filteredCommands:f,onSelect:S}),[u,m,f,S,g,h]),x=t.length>0,T=f.length===0;return r.jsx($b,{onClose:()=>o(!1),...j,children:r.jsx(n1,{value:w,children:r.jsxs(i.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...Lb[l],...Bb[s],...b==null?void 0:b.container,onClick:v=>v.stopPropagation(),children:[r.jsx(fs,{value:u,onValueChange:g,placeholder:a,views:b==null?void 0:b.searchInput}),r.jsx(i.View,{ref:k,flex:1,overflow:"auto",...b==null?void 0:b.list,children:T?c||r.jsx(xs,{views:b==null?void 0:b.empty}):x?y.map(v=>r.jsx(ys,{heading:v.name,views:b==null?void 0:b.groupHeading,children:v.commands.map(M=>{const A=f.findIndex(P=>P.id===M.id);return r.jsx(At,{item:M,selected:A===m,onSelect:()=>S(M),"data-index":A,views:{container:b==null?void 0:b.item,icon:b==null?void 0:b.icon,content:b==null?void 0:b.content,name:b==null?void 0:b.name,description:b==null?void 0:b.description,shortcut:b==null?void 0:b.shortcut}},M.id)})},v.id)):f.map((v,M)=>r.jsx(At,{item:v,selected:M===m,onSelect:()=>S(v),"data-index":M,views:{container:b==null?void 0:b.item,icon:b==null?void 0:b.icon,content:b==null?void 0:b.content,name:b==null?void 0:b.name,description:b==null?void 0:b.description,shortcut:b==null?void 0:b.shortcut}},v.id))}),d&&r.jsx(i.View,{...r1,...b==null?void 0:b.footer,children:d})]})})})},i1=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:s="default",filter:c,emptyState:d,footer:u,views:g,...m})=>{const{search:h,setSearch:f,selectedIndex:y,setSelectedIndex:k,filteredCommands:b,filteredGroups:C,listRef:j}=Db({open:e,onOpenChange:o,groups:t,commands:n,filter:c});return r.jsx(l1,{open:e,onOpenChange:o,groups:t,commands:n,placeholder:a,size:l,variant:s,emptyState:d,footer:u,search:h,setSearch:f,selectedIndex:y,setSelectedIndex:k,filteredCommands:b,filteredGroups:C,listRef:j,views:g,...m})},Go=i1;Go.Input=fs;Go.List=a1;Go.Group=ys;Go.Item=At;Go.Empty=xs;const xa=()=>Math.random().toString(36).substring(2,11),s1=({defaultOpen:e=!1,openDelay:o=200,closeDelay:t=200,isDisabled:n=!1}={})=>{const[a,l]=p.useState(e),s=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),g=p.useRef(`tooltip-trigger-${xa()}`).current,m=p.useRef(`tooltip-content-${xa()}`).current,h=p.useCallback(()=>{n||(u.current&&(clearTimeout(u.current),u.current=null),!a&&!d.current&&(d.current=setTimeout(()=>{l(!0),d.current=null},o)))},[a,o,n]),f=p.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),a&&!u.current&&(u.current=setTimeout(()=>{l(!1),u.current=null},t))},[a,t]),y=p.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null)},[]);return p.useEffect(()=>()=>{d.current&&clearTimeout(d.current),u.current&&clearTimeout(u.current)},[]),p.useEffect(()=>{if(typeof document>"u")return;const k=b=>{b.key==="Escape"&&a&&l(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[a]),{isOpen:a,openTooltip:h,closeTooltip:f,cancelCloseTimer:y,triggerRef:s,contentRef:c,triggerId:g,contentId:m}},c1={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},d1=e=>({default:{backgroundColor:"color-gray-900",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",transition:"opacity 0.15s ease"},light:{backgroundColor:"color-white",color:"color-gray-800",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.04)",transition:"opacity 0.15s ease"},dark:{backgroundColor:"color-gray-950",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.2), 0px 2px 4px rgba(0, 0, 0, 0.12)",transition:"opacity 0.15s ease"}}),u1=d1(),p1=e=>{const o={position:"absolute",width:"8px",height:"8px",backgroundColor:"inherit",borderStyle:"inherit",borderWidth:"inherit",borderColor:"inherit",transform:"rotate(45deg)"};switch(e){case"top":return{...o,bottom:"-4px",left:"50%",marginLeft:"-4px",borderTop:"none",borderLeft:"none"};case"right":return{...o,left:"-4px",top:"50%",marginTop:"-4px",borderRight:"none",borderTop:"none"};case"bottom":return{...o,top:"-4px",left:"50%",marginLeft:"-4px",borderBottom:"none",borderRight:"none"};case"left":return{...o,right:"-4px",top:"50%",marginTop:"-4px",borderLeft:"none",borderBottom:"none"};default:return o}},bs=p.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),Mn=()=>p.useContext(bs),m1=({value:e,children:o})=>r.jsx(bs.Provider,{value:e,children:o}),ks=p.memo(({children:e,views:o,asChild:t=!1,...n})=>{const{openTooltip:a,closeTooltip:l,triggerRef:s,contentId:c,triggerId:d}=Mn(),u=p.useCallback(()=>a(),[a]),g=p.useCallback(()=>l(),[l]),m=p.useCallback(()=>a(),[a]),h=p.useCallback(()=>l(),[l]),f={ref:s,onMouseEnter:u,onMouseLeave:g,onFocus:m,onBlur:h,id:d,"aria-describedby":c,...o==null?void 0:o.container,...n};return t&&p.isValidElement(e)?p.cloneElement(e,f):r.jsx(i.View,{display:"inline-block",...f,children:e})}),g1=p.memo(({children:e,views:o,...t})=>{const{isOpen:n,contentRef:a,contentId:l,triggerId:s}=Mn();return n?r.jsx(i.View,{ref:a,id:l,role:"tooltip","aria-labelledby":s,...o==null?void 0:o.container,...t,children:e}):null}),h1=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",showArrow:s=!0,views:c,themeMode:d,...u})=>{const{isOpen:g,triggerRef:m,contentRef:h,contentId:f,triggerId:y}=Mn(),{ref:k,relation:b}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[C,j]=p.useState({x:0,y:0,placement:t});p.useEffect(()=>{m!=null&&m.current&&k&&(k.current=m.current)},[m,k,g]),p.useEffect(()=>{if(g&&(h!=null&&h.current)&&(m!=null&&m.current)){const x=m.current.getBoundingClientRect();let T=t;b&&(t==="top"&&b.space.vertical==="bottom"?T="bottom":t==="bottom"&&b.space.vertical==="top"?T="top":t==="right"&&b.space.horizontal==="left"?T="left":t==="left"&&b.space.horizontal==="right"&&(T="right"));let v=0,M=0;switch(T){case"top":v=n==="start"?x.left:n==="end"?x.right-120:x.left+x.width/2-60,M=x.top-8;break;case"bottom":v=n==="start"?x.left:n==="end"?x.right-120:x.left+x.width/2-60,M=x.bottom+8;break;case"right":v=x.right+8,M=n==="start"?x.top:n==="end"?x.bottom-32:x.top+x.height/2-16;break;case"left":v=x.left-8,M=n==="start"?x.top:n==="end"?x.bottom-32:x.top+x.height/2-16;break}j({x:v,y:M,placement:T})}},[g,t,n,m,h,b]);const S=p.useMemo(()=>s?p1(C.placement):{},[s,C.placement]),w=p.useMemo(()=>{const x={position:"fixed",left:C.x,top:C.y,zIndex:1e3};switch(C.placement){case"top":return{...x,transform:"translateY(-100%)"};case"left":return{...x,transform:"translateX(-100%)"};case"bottom":case"right":default:return x}},[C.x,C.y,C.placement]);return r.jsxs(i.View,{position:"relative",display:"inline-block",...c==null?void 0:c.container,...u,children:[r.jsx(ks,{children:o}),g&&r.jsxs(i.View,{ref:h,id:f,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:w,...c1[a],...u1[l],...c==null?void 0:c.content,children:[typeof e=="string"?r.jsx(i.Text,{...c==null?void 0:c.text,children:e}):e,s&&r.jsx(i.View,{...S,...c==null?void 0:c.arrow})]})]})},f1=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",openDelay:s=200,closeDelay:c=200,showArrow:d=!0,defaultOpen:u=!1,isDisabled:g=!1,views:m,...h})=>{const f=s1({defaultOpen:u,openDelay:s,closeDelay:c,isDisabled:g});return r.jsx(m1,{value:f,children:r.jsx(h1,{content:e,position:t,align:n,size:a,variant:l,showArrow:d,views:m,...h,children:o})})},tt=f1;tt.Trigger=ks;tt.Content=g1;const Cs=p.forwardRef((e,o)=>{const t={...e,isAgentRunning:e.isAgentRunning??e.isWorkerRunning,onStopAgent:e.onStopAgent??e.onStopWorker,disabled:e.disabled??e.isDisabled},n=ri(t);return p.useImperativeHandle(o,()=>({getValue:()=>{var a,l;return((a=n.hiddenInputRef.current)==null?void 0:a.value)??((l=n.editableRef.current)==null?void 0:l.textContent)??n.value??""},setValue:n.setValue,clear:()=>n.setValue(""),focus:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.focus()},blur:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.blur()},getElement:()=>n.editableRef.current,getInputElement:()=>n.hiddenInputRef.current})),r.jsx(li,{...t,...n})});Cs.displayName="ChatInput";const y1={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},ba={container:{position:"relative",display:"flex",flexDirection:"column",height:"100vh",alignItems:"center",justifyContent:"center"},gradient:{position:"absolute",inset:"-10px",opacity:.5,pointerEvents:"none",filter:"blur(10px)",backgroundSize:"300% 200%",backgroundPosition:"50% 50%, 50% 50%"}},xt={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},image:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundAttachment:"scroll"},content:{position:"relative",width:"100%",height:"100%",zIndex:2}},bt={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},video:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"},content:{position:"relative",zIndex:2}},x1=p.createContext({}),b1=({children:e,showRadialGradient:o=!0,views:t,themeMode:n,...a})=>{const l={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},s=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],c={...ba.gradient,backgroundImage:`
27
- repeating-linear-gradient(100deg, ${s.join(", ")}),
26
+ ${J}`:J}let ee=H,me=!1;H.endsWith("-thinking")&&(ee=H.replace(/-thinking$/,""),me=!0),n==null||n(de,{model_name:ee,enable_thinking:me}),y||x(""),w([]),S([])},G=le=>{w(de=>de.filter((ee,me)=>me!==le)),!d&&v.length>le&&S(de=>de.filter((ee,me)=>me!==le))},K=le=>{le.preventDefault(),le.stopPropagation(),A(!0)},re=le=>{le.preventDefault(),le.stopPropagation(),A(!1)},oe=m.useCallback(le=>{!le||le.length===0||(S(de=>[...de,...le]),w(de=>[...de,...le]),W(de=>[...de,...le]),j(!0))},[S,w]),ie=m.useCallback(()=>{if(E.length>0&&!F&&f){T(!0);const le=E[0];M.current=le,z(0),g==null||g(0);try{f(le),W(de=>de.slice(1)),T(!1),M.current=null,z(100),g==null||g(100),p==null||p({file:le})}catch(de){W(ee=>ee.slice(1)),T(!1),M.current=null,z(0),j(ee=>E.length-1>0||!1),h==null||h(de)}}else E.length===0&&I&&(j(!1),z(0))},[E,F,f,I,h,g,p]);m.useEffect(()=>{ie()},[E,F,ie]);const X="active",ae=le=>!0,pe=()=>{B(!1),e.onGuideClose&&e.onGuideClose()},ue=le=>{y&&r?r(le.text):x(le.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(le),_.current&&_.current.focus()},ke=m.useCallback(()=>v,[v]),ce=m.useCallback(()=>S([]),[]);return{onSubmit:n,getPendingFiles:ke,clearPendingFiles:ce,value:C,handleChange:$,setValue:D,handleSubmit:N,editableRef:_,fileInputRef:q,hiddenInputRef:Y,isUploading:I,uploadProgress:R,isDraggingOver:V,uploadedFiles:k,pendingFiles:v,removeUploadedFile:G,setPendingFiles:S,setUploadedFiles:w,setIsUploading:j,startUpload:oe,selectedModel:H,handleModelChange:L,modelOptions:O,subscriptionStatus:X,canAccessModel:ae,handleDragOver:K,handleDragLeave:re,isGuideTipShown:P,hideGuideTip:pe,handlePromptExampleSelect:ue}},Sf={attachmentRemove:{position:"absolute",top:"2px",right:"2px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"color-black-900",color:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",zIndex:1}},Ca={container:{width:"100%",maxWidth:"100%",borderRadius:"12px",backgroundColor:"color-white",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},content:{width:"100%",padding:"12px",borderRadius:"12px",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},wf={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},jf={xs:{fontSize:"10px",padding:"4px 8px"},sm:{fontSize:"12px",padding:"6px 10px"},md:{fontSize:"14px",padding:"8px 12px"},lg:{fontSize:"16px",padding:"10px 14px"},xl:{fontSize:"20px",padding:"12px 16px"}},vf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"},none:{backgroundColor:"transparent",border:"none"}},Sa=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,Tf=({openDelay:e=200,closeDelay:o=300}={})=>{const[r,n]=m.useState(!1),a=m.useRef(null),l=m.useRef(null),i=m.useRef(null),u=m.useRef(null),c=m.useMemo(()=>Sa("hovercard-content"),[]),d=m.useMemo(()=>Sa("hovercard-trigger"),[]),g=m.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),l.current&&(clearTimeout(l.current),l.current=null)},[]),p=m.useCallback(()=>{g(),r||(a.current=setTimeout(()=>{n(!0)},e))},[r,e,g]),h=m.useCallback(()=>{g(),r&&(l.current=setTimeout(()=>{n(!1)},o))},[r,o,g]),f=m.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]);return m.useEffect(()=>()=>g(),[g]),{isOpen:r,openCard:p,closeCard:h,cancelCloseTimer:f,triggerRef:i,contentRef:u,contentId:c,triggerId:d}},Ti=m.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),If=({children:e,value:o})=>t.jsx(Ti.Provider,{value:o,children:e}),Ii=()=>{const e=m.useContext(Ti);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},Rf=({children:e,views:o,asChild:r=!1,...n})=>{const{openCard:a,closeCard:l,triggerRef:i,contentId:u,triggerId:c}=Ii(),f={ref:i,onMouseEnter:()=>a(),onMouseLeave:()=>l(),onFocus:()=>a(),onBlur:()=>l(),id:c,"aria-describedby":u,...o==null?void 0:o.container,...n};if(r&&m.isValidElement(e)){const y=m.Children.only(e);return m.cloneElement(y,{...f,...y.props})}return t.jsx(s.View,{position:"relative",display:"inline-block",...f,children:e})},Ff=({children:e,views:o,side:r="bottom",align:n="center",sideOffset:a=8,style:l,backgroundColor:i="color-white",borderRadius:u="4px",boxShadow:c="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:d="12px",minWidth:g="50px",maxWidth:p="300px",...h})=>{const{isOpen:f,cancelCloseTimer:y,closeCard:b,contentRef:x,triggerRef:C,contentId:k,triggerId:w}=Ii(),{ref:v,relation:S}=s.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});m.useEffect(()=>{C!=null&&C.current&&(v==null?void 0:v.current)!==C.current&&v&&(v.current=C.current)},[C,v,f]);const I=()=>y(),j=()=>b();if(!f)return null;const R=()=>{if(!S||!(C!=null&&C.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const W=C.current.getBoundingClientRect();let F=r;r==="bottom"&&S.space.vertical==="top"?F="top":r==="top"&&S.space.vertical==="bottom"?F="bottom":r==="right"&&S.space.horizontal==="left"?F="left":r==="left"&&S.space.horizontal==="right"&&(F="right");let T=0,M=0;switch(F){case"bottom":T=W.left+W.width/2,M=W.bottom+a;break;case"top":T=W.left+W.width/2,M=W.top-a;break;case"right":T=W.right+a,M=W.top+W.height/2;break;case"left":T=W.left-a,M=W.top+W.height/2;break}return{position:"fixed",left:T,top:M,zIndex:1e3,transform:z(F)}},z=W=>{switch(W){case"bottom":return"translate(-50%, 0)";case"top":return"translate(-50%, -100%)";case"right":return"translate(0, -50%)";case"left":return"translate(-100%, -50%)";default:return"translate(-50%, 0)"}},E=R();return t.jsx(s.View,{ref:x,id:k,role:"tooltip","aria-labelledby":w,onMouseEnter:I,onMouseLeave:j,backgroundColor:i,borderRadius:u,boxShadow:c,padding:d,minWidth:g,maxWidth:p,style:{...E,...l},...o==null?void 0:o.container,...h,children:e})},zf=({children:e,views:o,openDelay:r,closeDelay:n,...a})=>{const l=Tf({openDelay:r,closeDelay:n});return t.jsx(If,{value:l,children:t.jsx(s.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})},He=zf;He.Trigger=Rf;He.Content=Ff;const Mf=({files:e,sandboxId:o,onRemove:r,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:i={}})=>{if(e.length===0)return null;const u=m.useCallback(d=>d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/(1024*1024)).toFixed(1)} MB`,[]),c=m.useCallback(d=>d.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:d.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:d.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return t.jsx(s.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...i==null?void 0:i.container,children:e.map((d,g)=>{const p=(d==null?void 0:d.path)||(d==null?void 0:d.url)||(l?URL.createObjectURL(d):""),h=d.type.startsWith("image/"),f=d.type.startsWith("video/"),y=d.type.startsWith("audio/"),b=c(d);return l?t.jsx(s.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...i==null?void 0:i.item,children:l&&t.jsxs(He,{children:[t.jsxs(He.Trigger,{children:[h&&t.jsx(s.Image,{src:p,alt:d.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),f&&t.jsx(s.View,{as:"video",src:p,alt:d.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&t.jsx(s.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(Yo,{widthHeight:24,color:"color-black"})}),!h&&!f&&!y&&t.jsx(s.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(ko,{widthHeight:24,color:"color-black"})}),r&&t.jsx(s.Button,{...Sf.attachmentRemove,onClick:x=>{x.stopPropagation(),r(g)},"aria-label":`Remove ${d.name}`,children:"×"})]}),t.jsxs(He.Content,{children:[h&&t.jsx(s.Image,{src:p,alt:d.name,maxWidth:"100%"}),f&&t.jsx(s.View,{as:"video",src:p,controls:!0,maxWidth:"100%"}),y&&t.jsx(s.View,{as:"audio",src:p,controls:!0,width:"100%"}),t.jsxs(s.Text,{marginTop:"4px",maxLines:1,width:"100%",...i==null?void 0:i.name,children:[d.name," (",u(d.size),")"]})]})]})},g):t.jsxs(s.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...i==null?void 0:i.item,children:[t.jsx(s.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:b.backgroundColor,color:b.color,children:y?t.jsx(Yo,{widthHeight:12,color:"currentColor"}):t.jsx(ko,{widthHeight:12,color:"currentColor"})}),t.jsxs(s.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...i==null?void 0:i.name,children:[d.name," · ",u(d.size)]}),r&&t.jsx(s.View,{as:"button",type:"button",onClick:()=>r(g),"aria-label":`Remove ${d.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},g)})})},wa=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ri=m.forwardRef(({value:e,onChange:o,placeholder:r="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:l=[],onSuggestionSelect:i,showSuggestions:u=!1,mentionData:c=[],mentionTrigger:d="@",onMentionSelect:g,onKeyDown:p,maxHeight:h="200px",minHeight:f="40px",name:y,id:b,hiddenInput:x=!0,hiddenInputRef:C,views:k={}},w)=>{var ee,me;const v=m.useRef(e),[S,I]=m.useState(-1),[j,R]=m.useState(!e),z=m.useRef(null),[E,W]=m.useState(!1),[F,T]=m.useState(!1),[M,V]=m.useState(""),[A,H]=m.useState(-1),[L,O]=m.useState(-1),[_,q]=m.useState([]),{ref:Y,relation:P}=s.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[B,$]=m.useState({x:0,y:0}),[D,N]=m.useState({x:0,y:0}),G=m.useRef(null),K=m.useCallback(J=>{G.current=J,typeof C=="function"?C(J):C&&(C.current=J)},[C]),re=m.useCallback(J=>{G.current&&G.current.value!==J&&(G.current.value=J)},[]);wa(()=>{const J=w;J!=null&&J.current&&e!==v.current&&(J.current.textContent=e,v.current=e,R(!e)),re(e)},[e,w,re]);const oe=m.useCallback(J=>{if(J===v.current)return;const te=w;te!=null&&te.current&&te.current.textContent!==J&&(te.current.textContent=J),v.current=J,R(!J),re(J),o(J)},[o,w,re]);wa(()=>{const J=G.current;if(!J)return;const te=()=>oe(J.value);return J.addEventListener("input",te),J.addEventListener("change",te),()=>{J.removeEventListener("input",te),J.removeEventListener("change",te)}},[oe,x]),m.useEffect(()=>{a&&w&&typeof w=="object"&&w.current&&w.current.focus()},[a,w]);const ie=()=>{const J=window.getSelection();if(!J||J.rangeCount===0)return-1;const te=J.getRangeAt(0),U=te.cloneRange();return U.selectNodeContents(w&&typeof w=="object"&&w.current?w.current:document.body),U.setEnd(te.endContainer,te.endOffset),U.toString().length},X=m.useCallback((J,te)=>{const U=J.substring(0,te),Q=U.lastIndexOf(d);if(Q!==-1){const ne=U.substring(Q+1);if(!ne.includes(" ")){const ge=ne.toLowerCase(),be=c.filter(xe=>xe.name.toLowerCase().includes(ge));V(ge),H(Q),q(be),T(be.length>0),O(0);const he=ae();$(he);return}}T(!1),V(""),H(-1),O(-1)},[c,d]);m.useEffect(()=>{z.current&&Y&&(Y.current=z.current)},[z,Y]);const ae=m.useCallback((J=200)=>{if(!z.current)return{x:0,y:0};const te=z.current.getBoundingClientRect();if(P){const se=P.space.vertical==="top";return{x:te.left,y:se?te.top-J-8:te.bottom+8}}const U=window.innerHeight,Q={top:te.top,bottom:U-te.bottom},ne=Q.bottom<J+8&&Q.top>Q.bottom;return{x:te.left,y:ne?te.top-J-8:te.bottom+8}},[P]),pe=m.useCallback(()=>{W(!0);const J=ae();N(J)},[ae]),ue=m.useCallback(()=>{setTimeout(()=>{W(!1),I(-1)},150)},[]),ke=J=>{const te=J.currentTarget.textContent||"";if(te!==v.current){o(te),v.current=te,re(te),R(!te);const U=ie();X(te,U)}},ce=m.useCallback(J=>{if(w&&typeof w=="object"&&w.current){const te=w.current.textContent||"",U=te.substring(0,A),Q=te.substring(A+d.length+M.length),ne=U+d+J.name+" "+Q;o(ne),v.current=ne,re(ne),w.current.textContent=ne;const se=U.length+d.length+J.name.length+1;setTimeout(()=>{var ge;if(w.current){const be=document.createRange(),he=window.getSelection(),xe=w.current.firstChild;xe&&he&&(be.setStart(xe,Math.min(se,((ge=xe.textContent)==null?void 0:ge.length)||0)),be.collapse(!0),he.removeAllRanges(),he.addRange(be))}},0)}T(!1),V(""),H(-1),O(-1),g&&g(J)},[A,d,M,o,g,w,re]),le=m.useCallback(J=>{i&&i(J),I(-1)},[i]),de=J=>{if(!(p&&(p(J),J.defaultPrevented))){if(F&&_.length>0){if(J.key==="ArrowDown"){J.preventDefault(),O(te=>te<_.length-1?te+1:0);return}if(J.key==="ArrowUp"){J.preventDefault(),O(te=>te>0?te-1:_.length-1);return}if((J.key==="Tab"||J.key==="Enter")&&L>=0){J.preventDefault(),ce(_[L]);return}if(J.key==="Escape"){T(!1),O(-1);return}}if(u&&l.length>0){if(J.key==="ArrowDown"){J.preventDefault(),I(te=>te<l.length-1?te+1:0);return}if(J.key==="ArrowUp"){J.preventDefault(),I(te=>te>0?te-1:l.length-1);return}if(J.key==="Tab"&&S>=0){J.preventDefault(),le(l[S]);return}if(J.key==="Escape"){I(-1);return}}}};return t.jsxs(s.View,{ref:z,width:"100%",position:"relative",...k==null?void 0:k.container,children:[t.jsxs(s.View,{width:"100%",minHeight:f,maxHeight:h,overflowY:"auto",position:"relative",children:[j&&t.jsx(s.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...k==null?void 0:k.placeholder,children:r}),t.jsx(s.View,{as:"div",ref:w,contentEditable:!n,suppressContentEditableWarning:!0,onInput:ke,onKeyDown:de,onFocus:pe,onBlur:ue,role:"textbox","aria-multiline":"true","aria-placeholder":r,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...k==null?void 0:k.input})]}),x&&t.jsx(s.View,{as:"textarea",ref:K,id:b,name:y,defaultValue:e,disabled:n,tabIndex:-1,"aria-hidden":"true","data-editable-input-mirror":"true",opacity:0,width:1,height:1,padding:0,border:"none",resize:"none",overflow:"hidden",position:"absolute",bottom:0,left:0,pointerEvents:"none",...k==null?void 0:k.hiddenInput}),F&&_.length>0&&t.jsx(s.View,{position:"fixed",left:B.x,top:B.y,width:((ee=z.current)==null?void 0:ee.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-blue-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9999,maxHeight:"200px",overflowY:"auto",...k==null?void 0:k.mentionContainer,children:t.jsxs(s.Vertical,{gap:0,children:[_.map((J,te)=>t.jsx(s.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:te===L?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>ce(J),onMouseEnter:()=>O(te),_hover:{backgroundColor:"color-blue-50"},...k==null?void 0:k.mentionItem,children:t.jsxs(s.Vertical,{gap:4,children:[t.jsxs(s.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[d,J.name]}),J.description&&t.jsx(s.Text,{fontSize:"12px",color:"color-gray-600",children:J.description})]})},J.id)),process.env.NODE_ENV==="development"&&t.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",d,")",P&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),"Space: ",P.space.vertical,"-",P.space.horizontal]})]})]})}),u&&l.length>0&&!F&&E&&!e&&t.jsx(s.View,{position:"fixed",left:D.x,top:D.y,width:((me=z.current)==null?void 0:me.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-green-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9998,maxHeight:"200px",overflowY:"auto",...k==null?void 0:k.suggestionsContainer,children:t.jsxs(s.Vertical,{gap:0,children:[l.map((J,te)=>t.jsx(s.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:te===S?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>le(J),onMouseEnter:()=>I(te),_hover:{backgroundColor:"color-blue-50"},...k==null?void 0:k.suggestionItem,children:t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:J.text}),J.description&&t.jsx(s.Text,{fontSize:"12px",color:"color-gray-600",children:J.description})]})},J.id)),process.env.NODE_ENV==="development"&&t.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",P&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),"Space: ",P.space.vertical,"-",P.space.horizontal]})]})]})})]})});Ri.displayName="EditableInput";const Wf=({examples:e,onSelect:o,views:r={}})=>{const{getColor:n}=s.useTheme();return!e||e.length===0?null:t.jsx(s.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...r==null?void 0:r.container,children:e.map(a=>t.jsx(s.View,{as:"button",type:"button",padding:"8px 12px",borderRadius:"9999px",backgroundColor:"color-white",border:"1px solid #E2E8F0",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",onClick:()=>o(a),_hover:{backgroundColor:"#F8FAFC",borderColor:"#CBD5E1"},...r==null?void 0:r.item,children:t.jsx(s.Text,{fontSize:"14px",color:"color-gray-700",...r==null?void 0:r.text,children:a.text})},a.id))})},Ef=({onRecordingComplete:e,onRecordingStart:o,views:r={}})=>{const{recording:n,paused:a,audioBlob:l,analyserNode:i,startRecording:u,stopRecording:c}=Rl();m.useEffect(()=>{if(l){const g=new File([l],`recording-${Date.now()}.webm`,{type:l.type||"audio/webm;codecs=opus"});e(g)}},[l]);const d=m.useCallback(()=>{u(),o==null||o()},[]);return t.jsxs(s.Horizontal,{alignItems:"center",gap:4,children:[t.jsx(s.View,{minWidth:90,children:n&&i&&t.jsx(Tn,{analyserNode:i,isPaused:a})}),t.jsx(s.View,{as:"button",type:"button",onClick:n?c:d,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n?"theme-error":"color-gray-100",color:n?"color-white":"color-gray-600",borderRadius:"50%",border:"none",cursor:"pointer",_hover:{backgroundColor:n?"color-red-600":"color-gray-200"},...r.button,children:n?t.jsx(ur,{widthHeight:16,color:"currentColor",filled:!1}):t.jsx(xn,{widthHeight:16,color:"currentColor",filled:!1})})]})},Fi=m.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:r=!1,disabled:n=!1,isDisabled:a,rightElement:l,onKeyDown:i,isAgentRunning:u=!1,enableAudioRecording:c=!1,leftButtons:d,rightButtons:g,onStopAgent:p,loadingText:h="Agent is working...",autoFocus:f=!0,sandboxId:y,hideAttachments:b=!1,attachmentText:x="",promptExamples:C=[],suggestions:k=[],errorMessage:w,size:v="md",shape:S="rounded",variant:I="default",views:j={},mentionData:R=[],mentionTrigger:z="@",onMentionSelect:E,onAudioRecordingStart:W,onAudioRecordingStop:F,showGuideTip:T,guideVideoUrl:M,onGuideClose:V,onFileBrowse:A,onUploadProgress:H,onUploadSuccess:L,onUploadError:O,onFileUpload:_,onPromptExampleSelect:q,name:Y,hiddenInput:P=!0,value:B,handleChange:$,setValue:D,handleSubmit:N,editableRef:G,fileInputRef:K,hiddenInputRef:re,isUploading:oe,uploadProgress:ie,isDraggingOver:X,uploadedFiles:ae,pendingFiles:pe,getPendingFiles:ue,clearPendingFiles:ke,removeUploadedFile:ce,setPendingFiles:le,setUploadedFiles:de,setIsUploading:ee,startUpload:me,selectedModel:J,handleModelChange:te,modelOptions:U,subscriptionStatus:Q,canAccessModel:ne,isGuideTipShown:se,hideGuideTip:ge,handlePromptExampleSelect:be,handleDragOver:he,handleDragLeave:xe,onChange:ze,...Be})=>{s.useTheme();const zo=m.useMemo(()=>({...Ca.container,...wf[S],...j==null?void 0:j.container}),[S,j==null?void 0:j.container]),Wt=m.useMemo(()=>({...Ca.content,...jf[v],...vf[I],...j==null?void 0:j.content}),[v,I,j==null?void 0:j.content]),ao=((B==null?void 0:B.trim().length)??0)>0||ae.length>0,Et=m.useCallback(Ie=>{me([Ie]),F==null||F(Ie)},[me,F]),vr=m.useCallback(Ie=>{const Mo=Ie.filter(ea=>ea.size>52428800?(console.error(`File size exceeds 50MB limit: ${ea.name}`),!1):!0);Mo.length>0&&me(Mo)},[me]),gc=m.useCallback(Ie=>{if(Ie.preventDefault(),Ie.stopPropagation(),xe(Ie),Ie.dataTransfer.files.length>0){const Mo=Array.from(Ie.dataTransfer.files);vr(Mo)}},[xe,vr]),hc=m.useMemo(()=>[...R||[],...ae.map((Ie,Mo)=>({id:`file-${Mo}`,name:Ie.name}))],[R,ae]);return t.jsxs(s.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...zo,...Be,onDragOver:he,onDragLeave:xe,onDrop:gc,children:[C.length>0&&t.jsx(Wf,{examples:C,onSelect:be,views:{container:j==null?void 0:j.promptExamples,item:j==null?void 0:j.promptExampleItem}}),u&&t.jsxs(s.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...j==null?void 0:j.loadingIndicator,children:[t.jsx(kn,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),t.jsx(s.Text,{color:"color-gray-500",children:h})]}),t.jsx(s.View,{position:"relative",width:"100%",overflow:"visible",children:t.jsxs(s.View,{as:"form",onSubmit:N,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...Wt,...zo,paddingHorizontal:16,paddingVertical:10,backgroundColor:X?"color-blue-50":void 0,children:[t.jsx(Mf,{files:ae,sandboxId:y,onRemove:ce,showPreviews:!0,views:{container:j==null?void 0:j.attachments,item:j==null?void 0:j.attachmentItem,name:j==null?void 0:j.attachmentName,size:j==null?void 0:j.attachmentSize,removeButton:j==null?void 0:j.attachmentRemove}}),t.jsx(Ri,{ref:G,value:B||"",onChange:$,placeholder:o,disabled:n&&!u,autoFocus:f,onKeyDown:i,suggestions:k||[],showSuggestions:k&&k.length>0&&!B,onSuggestionSelect:Ie=>{$(Ie.text)},mentionData:hc,mentionTrigger:z,onMentionSelect:E,name:Y,hiddenInput:P,hiddenInputRef:re,views:{container:{},input:j==null?void 0:j.editableInput,hiddenInput:j==null?void 0:j.hiddenInput}}),t.jsxs(s.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[!b&&t.jsx(s.View,{display:"contents",onClickCapture:A?Ie=>{Ie.target.tagName==="INPUT"&&A()}:void 0,children:t.jsx(gr,{accept:"*/*",icon:t.jsx(St,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:vr,isLoading:oe,progress:ie||0,text:x,fileType:"file",renderError:({errorMessage:Ie})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...j==null?void 0:j.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:S==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:Ie=>Ie.size>50*1024*1024?"File size exceeds 50MB limit":null})}),d]}),t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[l,c&&t.jsx(Ef,{onRecordingStart:W,onRecordingComplete:Et,views:{button:j==null?void 0:j.recordButton}}),t.jsx(s.View,{as:"button",type:"button",onClick:N,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:u?"theme-error":ao?"theme-primary":"color-gray-300",color:"color-white",borderRadius:S==="rounded"?"50%":4,border:"none",cursor:ao?"pointer":"not-allowed",disabled:!ao||r||n&&!u,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:ao||u?.9:1},_active:{opacity:ao||u?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...j==null?void 0:j.submitButton,children:u?t.jsx(ur,{widthHeight:16,color:"currentColor",filled:!1}):r?t.jsx(uo,{type:"quarter",size:16,color:"color-white"}):t.jsx(bn,{widthHeight:16,color:"currentColor",filled:!1})}),g]})]})]})}),w&&t.jsx(s.Text,{color:"theme-error",marginTop:"4px",...j==null?void 0:j.bottomTip,children:w})]})}),Af=e=>{const{name:o,onSubmit:r,...n}=e,[a,l]=m.useState([]),i=Fe({name:o,type:"text"}),u=h=>{i.onChangeText&&i.onChangeText(h)},c=(h,f)=>{r?r(h,f):u(h)},d=()=>a,g=()=>l([]),p=vi({...n,value:i.value||"",onChange:u,onSubmit:c});return t.jsx(Fi,{...n,...p,name:o,value:i.value||"",onChange:u,onSubmit:c,error:i.error,getPendingFiles:d,clearPendingFiles:g})},Hf=Af,Vf=e=>{const o=Fe(e),r=ii(o);return t.jsx(si,{...r,...o})},Pf=Vf,Df=e=>{const o=Fe(e),r=gi();return t.jsx(hi,{...r,...o})},$f=Df,Lf=e=>{const o=Fe(e),r=ci(e);return t.jsx(di,{...r,...o})},Bf=Lf,_f=e=>{let o=Fe(e);o.selected=o.value;const r=Yl({...e,value:o.value});return t.jsx(Xl,{...o,...r})},Of=_f,Nf=e=>{const o=Fe(e),r=Jl(e);return t.jsx(Ql,{...r,...o})},qf=Nf,Uf=e=>{const{name:o,...r}=e,{values:n,errors:a,touched:l,submitCount:i,setFieldValue:u,setFieldTouched:c}=qe.useFormikContext(),d=qe.getIn(n,o)||[],g=qe.getIn(l,o)||i>0?qe.getIn(a,o):void 0,p=m.useCallback(x=>{var k;const C=Array.isArray(x)?x.filter(w=>typeof w=="string"):[];u(o,C),(k=e.onTagsChange)==null||k.call(e,C)},[o,u,e.onTagsChange]),h=m.useCallback(()=>{var x;c(o,!0),(x=e.onBlur)==null||x.call(e)},[o,c,e.onBlur]),f=bi({...r,tags:d,onTagsChange:p,onBlur:h}),{tags:y,...b}=f;return t.jsx(ki,{...b,...r,tags:y,error:g})},Gf=Uf,Yf=e=>{const o=Fe(e),r=oi(e);return t.jsx(ti,{...r,...o})},Kf=Yf,Xf=e=>{const o=Fe(e,{focusable:!0}),{value:r,...n}=An(e);return t.jsx(It,{...n,...o})},Jf=Xf,Qf=({visibleIcon:e=t.jsx(Sn,{widthHeight:14}),hiddenIcon:o=t.jsx(Cn,{widthHeight:14}),...r})=>{const n=Fe(r,{focusable:!0}),{isVisible:a,setIsVisible:l,...i}=fi(n);return t.jsx(It,{...i,type:a?"text":"password",isClearable:!1,right:t.jsx(s.View,{onClick:()=>{r.isDisabled||l(!a)},children:a?e:o})})},Zf=Qf,ey=({items:e,placeholder:o,searchPlaceholder:r,isMulti:n=!1,...a})=>{const l=Fe(a),i=yi(e,o,r);m.useEffect(()=>{if(n&&Array.isArray(l.value))i.setSelectedItems(l.value);else if(!n&&l.value){const c=typeof l.value=="object"?l.value:e.find(d=>d.value===l.value);c&&i.setSelectedItem(c)}},[l.value,n,e]);const u=c=>{l.onChange(c)};return t.jsx(xi,{...i,...l,items:e,placeholder:o,isMulti:n,onSelect:u})},oy=ey,qo=(e,o,r)=>Math.min(Math.max(e,o),r),ty=(e,o,r,n,a,l,i)=>{const u=n-r;let c;if(l==="horizontal"){const d=o.width,g=e-o.left;c=qo(g/d,0,1)}else{const d=o.height,g=o.bottom-e;c=qo(g/d,0,1)}if(i&&i.length>0){const d=r+c*u;let g=i[0],p=Math.abs(d-g);for(let h=1;h<i.length;h++){const f=Math.abs(d-i[h]);f<p&&(p=f,g=i[h])}return g}else{const d=r+c*u,g=Math.round(d/a)*a;return qo(g,r,n)}},zi=({min:e=0,max:o=100,step:r=1,value:n,defaultValue:a,onChange:l,onDrag:i,orientation:u="horizontal",isDisabled:c=!1,stepValues:d})=>{const g=qo(n??a??e,e,o),[p,h]=m.useState(g),[f,y]=m.useState(!1),[b,x]=m.useState(!1),C=m.useRef(null),k=m.useRef(null),w=n!==void 0,v=n!==void 0?n:p;m.useEffect(()=>{n!==void 0&&h(qo(n,e,o))},[n,e,o]);const S=m.useCallback(F=>{const T=qo(F,e,o);w||h(T),l&&T!==v&&l(T),f&&i&&i(T)},[w,e,o,l,v,f,i]),I=m.useCallback(F=>{if(c||!C.current)return;const T=C.current;if(typeof T.getBoundingClientRect!="function")return;const M=T.getBoundingClientRect();let V;"touches"in F?V=u==="horizontal"?F.touches[0].clientX:F.touches[0].clientY:V=u==="horizontal"?F.clientX:F.clientY;const A=ty(V,M,e,o,r,u,d);S(A)},[e,o,r,u,S,c,d]),j=m.useCallback(F=>{if(c)return;F.preventDefault(),y(!0),I(F);const T=V=>{I(V)},M=()=>{y(!1),document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",M),document.removeEventListener("touchmove",T),document.removeEventListener("touchend",M)};typeof document>"u"||(document.addEventListener("mousemove",T),document.addEventListener("mouseup",M),document.addEventListener("touchmove",T),document.addEventListener("touchend",M))},[I,c]),R=m.useCallback(F=>{const T=k.current;T&&typeof T.contains=="function"&&T.contains(F.target)||j(F)},[j]),z=m.useCallback(F=>{if(c)return;let T=v;switch(F.key){case"ArrowLeft":case"ArrowDown":T=v-r;break;case"ArrowRight":case"ArrowUp":T=v+r;break;case"Home":T=e;break;case"End":T=o;break;default:return}F.preventDefault(),S(T)},[v,e,o,r,S,c]),E=o-e,W=E===0?0:(v-e)/E*100;return{currentValue:v,isDragging:f,isHovered:b,setIsHovered:x,trackRef:C,thumbRef:k,handleThumbMouseDown:j,handleTrackMouseDown:R,handleKeyDown:z,thumbPositionPercent:W}},ja={xs:{height:4,width:"100%"},sm:{height:6,width:"100%"},md:{height:8,width:"100%"},lg:{height:10,width:"100%"},xl:{height:12,width:"100%"}},va={xs:{width:12,height:12},sm:{width:16,height:16},md:{width:20,height:20},lg:{width:24,height:24},xl:{width:28,height:28}},Ta={square:0,rounded:4,pill:24},ry=e=>({default:{backgroundColor:"color-gray-200",transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"},transition:"border-color 0.15s ease"}}),Ia=ry(),ny={xs:{trackCrossAxisSize:4,thumbSize:12},sm:{trackCrossAxisSize:6,thumbSize:16},md:{trackCrossAxisSize:8,thumbSize:20},lg:{trackCrossAxisSize:10,thumbSize:24},xl:{trackCrossAxisSize:12,thumbSize:28}},ay={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},ly=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),lt=(e,o)=>ly(o)?{style:{[e]:o}}:{[e]:o},Mi=m.memo(({min:e=0,max:o=100,step:r=1,currentValue:n,stepValues:a,shape:l="rounded",size:i="md",variant:u="default",orientation:c="horizontal",isDisabled:d=!1,showValue:g=!1,showTooltip:p=!1,backgroundColor:h="theme-primary",label:f,helperText:y,themeMode:b,shadow:x={},isDragging:C,isHovered:k,setIsHovered:w,trackRef:v,thumbRef:S,handleThumbMouseDown:I,handleTrackMouseDown:j,handleKeyDown:R,thumbPositionPercent:z,ariaLabel:E="Slider",views:W={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:F,onDrag:T,value:M,defaultValue:V,...A})=>{var D,N;const H=h,L="theme-disabled",O=Ia[u].backgroundColor,_=d?L:H,q=c==="vertical",{trackCrossAxisSize:Y,thumbSize:P}=ny[i]||{trackCrossAxisSize:ja[i].height,thumbSize:va[i].width||16},B=t.jsxs(s.Vertical,{width:"100%",gap:8,...W.container,...A,children:[f&&t.jsxs(s.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[t.jsx(s.Text,{fontSize:14,fontWeight:500,...W.label,children:f}),g&&t.jsx(s.Text,{fontSize:14,color:"color-gray-500",...W.valueLabel,children:n})]}),t.jsxs(s.View,{ref:v,position:"relative",cursor:d?"not-allowed":"pointer",opacity:d?.6:1,onMouseDown:j,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),...ja[i],borderRadius:Ta[l],backgroundColor:O,...Ia[u],...x,...W.track,children:[a&&a.length>0&&t.jsx(t.Fragment,{children:a.map(G=>{const K=(G-e)/(o-e)*100;return t.jsx(s.View,{position:"absolute",top:"50%",left:`${K}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...lt("backgroundColor",_),...W.stepMarks},G)})}),t.jsx(s.View,{position:"absolute",top:0,left:0,height:"100%",width:`${z}%`,borderRadius:Ta[l],transition:"width 0.1s ease-in-out",...lt("backgroundColor",_),...W.progress,...W.filledTrack}),t.jsx(s.View,{ref:S,role:"slider",tabIndex:d?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":c,"aria-disabled":d,"aria-label":E,position:"absolute",top:"50%",left:`${z}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:C?"none":"transform 0.1s ease-in-out",...lt("borderColor",_),transform:k?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:I,onTouchStart:I,onKeyDown:R,...va[i],...W.thumb,children:p&&(k||C)&&t.jsx(s.View,{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:8,padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:4,fontSize:12,whiteSpace:"nowrap",zIndex:3,...W.tooltip,children:t.jsx(s.Text,{...(D=W.tooltip)==null?void 0:D.text,children:n==null?void 0:n.toFixed(r<1?1:0)})})})]}),y&&t.jsx(Kr,{children:y})]}),$=t.jsxs(s.Center,{...ay[c],position:"relative",onMouseEnter:()=>!d&&w(!0),onMouseLeave:()=>!d&&w(!1),...A,...W==null?void 0:W.container,children:[f&&t.jsxs(s.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[t.jsx(s.Text,{fontSize:14,fontWeight:500,...W.label,children:f}),g&&t.jsx(s.Text,{fontSize:14,color:"color-gray-500",...W.valueLabel,children:n})]}),t.jsxs(s.View,{ref:v,position:"relative",borderRadius:Y/2,backgroundColor:d?L:O,cursor:d?"not-allowed":"pointer",width:q?`${Y}px`:"100%",height:q?"100%":`${Y}px`,onMouseDown:j,onTouchStart:j,...W==null?void 0:W.track,children:[a&&a.length>0&&t.jsx(t.Fragment,{children:a.map(G=>{const K=(G-e)/(o-e)*100;return t.jsx(s.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:_,zIndex:1,...q?{bottom:`${K}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${K}%`,top:"50%",transform:"translate(-50%, -50%)"},...W.stepMarks},G)})}),t.jsx(s.View,{position:"absolute",borderRadius:Y/2,...q?{bottom:0,left:0,width:"100%",height:`${z}%`}:{top:0,left:0,height:"100%",width:`${z}%`},...lt("backgroundColor",_),...W==null?void 0:W.filledTrack,...W==null?void 0:W.progress}),t.jsx(s.View,{ref:S,role:"slider",tabIndex:d?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":c,"aria-disabled":d,"aria-label":E,position:"absolute",width:`${P}px`,height:`${P}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:d?"not-allowed":"grab",transform:q?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:C?"none":"left 0.1s, bottom 0.1s",...lt("backgroundColor",_),...q?{left:"50%",bottom:`${z}%`}:{top:"50%",left:`${z}%`},onMouseDown:I,onTouchStart:I,onKeyDown:R,...W==null?void 0:W.thumb,children:p&&(k||C)&&t.jsx(s.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...q?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...W==null?void 0:W.tooltip,children:t.jsx(s.Text,{...(N=W==null?void 0:W.tooltip)==null?void 0:N.text,children:n==null?void 0:n.toFixed(r<1?1:0)})})})]}),y&&t.jsx(Kr,{marginTop:8,children:y})]});return q||p?$:B}),iy=e=>{const o=Fe(e),r=zi({...e,value:o.value!==void 0?Number(o.value):void 0,onChange:n=>{var a;o.onChange(n),(a=e.onChange)==null||a.call(e,n)}});return t.jsx(Mi,{...e,...r,...o})},sy=iy,Ra=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},Ar=(e,o)=>{console.log(`[FormikOTPInput] ${e}`,o)},cy=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),dy=e=>{const o=Fe(e),r=Ra(o.value).slice(0,e.length||6);Ar("render",{name:e.name,type:e.type,formValue:cy(o.value),displayValue:r,length:e.length||6,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText});const{isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:i,inputRef:u,containerRef:c,mirrorSelectionStart:d,mirrorSelectionEnd:g,setMirrorSelectionStart:p,setMirrorSelectionEnd:h,setInputRef:f,handleFocus:y,handleBlur:b,handleKeyDown:x,handlePaste:C}=Ci(e),k=m.useCallback(v=>{const S=Ra(v).slice(0,e.length||6);Ar("setValue",{name:e.name,incomingValue:v,nextValue:S,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText}),o.onChange&&o.onChange(S),o.onChangeText&&o.onChangeText(S),e.onComplete&&S.length===(e.length||6)&&e.onComplete(S),u.current&&(u.current.value=S)},[o,e,u]),w=m.useCallback(v=>{var j,R,z;const S=typeof v=="string"?v:((j=v==null?void 0:v.currentTarget)==null?void 0:j.value)??((R=v==null?void 0:v.target)==null?void 0:R.value)??((z=v==null?void 0:v.nativeEvent)==null?void 0:z.text)??"",I=String(S).slice(0,e.length||6);Ar("handleChange normalized",{name:e.name,raw:S,newValue:I}),k(I),u.current&&(u.current.value=I)},[e.length,k,u]);return t.jsx(Si,{...e,...o,value:r,setValue:k,isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:i,inputRef:u,containerRef:c,mirrorSelectionStart:d,mirrorSelectionEnd:g,setMirrorSelectionStart:p,setMirrorSelectionEnd:h,setInputRef:f,handleChange:w,handleFocus:y,handleBlur:b,handleKeyDown:x,handlePaste:C,stepValues:e.stepValues})},uy=dy,py=e=>Array.isArray(e)?e:e==null?[]:[e],Wi=({name:e,uploadFile:o,onUploadSuccess:r,onUploadError:n,transformResponse:a,onMultipleFileSelect:l,onFileSelect:i,multiple:u=!0,...c})=>{const{setFieldValue:d,setFieldTouched:g,values:p}=qe.useFormikContext(),[h,f]=m.useState(!1),[y,b]=m.useState(0),x=m.useCallback(async w=>{if(!w||w.length===0)return;g(e,!0,!0),f(!0);const v=[];for(const S of w){b(0);try{const I=await o(S,R=>{b(R??0)}),j=a?a(I,S):I;v.push(j),r==null||r(S,j)}catch(I){n==null||n(S,I)}}if(v.length>0){const S=py(qe.getIn(p,e));d(e,[...S,...v],!0),b(100)}else b(0);f(!1)},[e,n,r,g,d,a,o,p]),C=m.useCallback(async w=>{l==null||l(w),await x(w)},[x,l]),k=m.useCallback(async w=>{i==null||i(w),await x([w])},[x,i]);return t.jsx(gr,{...c,multiple:u,onMultipleFileSelect:u?C:void 0,onFileSelect:u?void 0:k,isLoading:h,progress:y})};Wi.displayName="FormikUploader";const my=e=>{let o=Fe(e);o.selected=o.value;const r=Zl(e);return t.jsx(ei,{...r,...o})},gy=my,Ei=e=>{const[o,r]=m.useState(!1),[n,a]=m.useState(e);return{isHovered:o,setIsHovered:r,isToggle:n,setIsToggled:a}},hy={square:0,rounded:8,pill:999},fy=(e,o)=>({outline:{backgroundColor:"color-white",color:e,borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{backgroundColor:"transparent",color:e,borderWidth:0,borderStyle:"none",borderColor:"transparent",_hover:{backgroundColor:"color-gray-50"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease"},link:{backgroundColor:"transparent",color:e,borderWidth:1,borderStyle:"solid",borderColor:"transparent",textDecoration:"underline",textUnderlineOffset:"1px",textDecorationThickness:"1px",_hover:{opacity:.8},_active:{opacity:.9},transition:"opacity 0.2s ease"}}),Ai=m.memo(({children:e,shape:o="rounded",variant:r="ghost",isHovered:n,setIsHovered:a,isDisabled:l,isToggle:i,setIsToggled:u,onToggle:c,views:d,backgroundColor:g,color:p,themeMode:h,...f})=>{const{getColor:y,themeMode:b}=s.useTheme(),x=h??b,k=y(l?"theme-disabled":g??p??"theme-primary",{themeMode:x}),v=m.useMemo(()=>fy(k),[k,x])[r],S=!!i,I=m.useCallback(()=>a(!0),[a]),j=m.useCallback(()=>{l||u(R=>{const z=!R;return c&&c(z),z})},[l,u,c]);return t.jsx(s.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:l?"not-allowed":"pointer",borderRadius:hy[o],onClick:j,onMouseEnter:I,onMouseLeave:()=>a(!1),...v,...S&&{...r==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:k},...f,...d==null?void 0:d.container,children:e})}),yy=({children:e,shape:o,variant:r,isDisabled:n,isToggled:a=!1,onToggle:l,...i})=>{const u=Fe(i),{isHovered:c,setIsHovered:d,isToggle:g,setIsToggled:p}=Ei(u.value??a);m.useEffect(()=>{p(u.value??a)},[u.value,a]);const h=f=>{p(f),u.onChange(f),l==null||l(f)};return t.jsx(Ai,{shape:o,variant:r,isDisabled:n,isHovered:c,setIsHovered:d,isToggle:g,setIsToggled:p,onToggle:h,...i,children:e})},xy=yy,Hi=()=>{const[e,o]=m.useState([]);return{activeToggles:e,setActiveToggles:o}},by=({children:e,shape:o,variant:r,isDisabled:n,isToggled:a=!1,onToggle:l,...i})=>{const{isHovered:u,setIsHovered:c,isToggle:d,setIsToggled:g}=Ei(a);return m.useEffect(()=>{g(a)},[a]),t.jsx(Ai,{shape:o,variant:r,isDisabled:n,isHovered:u,setIsHovered:c,isToggle:d,setIsToggled:g,onToggle:l,...i,children:e})},Pn=by,Vi=({items:e,onToggleChange:o,activeToggles:r,setActiveToggles:n,shape:a="rounded",variant:l="ghost",views:i})=>{const u=m.useCallback((c,d)=>{n(g=>{let p;return d?p=g.includes(c)?g:[...g,c]:p=g.filter(h=>h!==c),o==null||o(p),p})},[o,n]);return t.jsx(s.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...i==null?void 0:i.container,children:e.map(c=>t.jsx(Pn,{role:`toggle-${c.id}`,shape:a,variant:l,isToggled:r.includes(c.id)||c.isActive,onToggle:d=>u(c.id,d),isDisabled:c.isDisabled,views:i==null?void 0:i.toggle,children:c.value},c.id))})},ky=({items:e,shape:o,variant:r,onToggleChange:n,...a})=>{const l=Fe(a),{activeToggles:i,setActiveToggles:u}=Hi();m.useEffect(()=>{Array.isArray(l.value)&&u(l.value)},[l.value]);const c=d=>{u(d),l.onChange(d),n==null||n(d)};return t.jsx(Vi,{items:e,shape:o,variant:r,activeToggles:i,setActiveToggles:u,onToggleChange:c,...a})},Cy=ky,Fa=["zoom-out","zoom-in","zap","zap-off","youtube","x","wrench","worm","workflow","wine","wine-off","wind","wind-arrow-down","wifi","wifi-zero","wifi-sync","wifi-pen","wifi-off","wifi-low","wifi-high","wifi-cog","whole-word","wheat","wheat-off","weight","weight-tilde","webhook","webhook-off","webcam","waypoints","waves","waves-ladder","waves-arrow-up","waves-arrow-down","watch","washing-machine","warehouse","wand","wand-sparkles","wallpaper","wallet","wallet-minimal","wallet-cards","vote","volume","volume-x","volume-off","volume-2","volume-1","volleyball","voicemail","view","videotape","video","video-off","vibrate","vibrate-off","venus","venus-and-mars","venetian-mask","vegan","vector-square","vault","variable","van","utility-pole","utensils","utensils-crossed","users","users-round","user","user-x","user-star","user-search","user-round","user-round-x","user-round-search","user-round-plus","user-round-pen","user-round-minus","user-round-cog","user-round-check","user-plus","user-pen","user-minus","user-lock","user-cog","user-check","usb","upload","unplug","unlink","unlink-2","university","ungroup","unfold-vertical","unfold-horizontal","undo","undo-dot","undo-2","underline","umbrella","umbrella-off","type","type-outline","twitter","twitch","tv","tv-minimal","tv-minimal-play","turtle","turntable","turkish-lira","truck","truck-electric","trophy","triangle","triangle-right","triangle-dashed","triangle-alert","trending-up","trending-up-down","trending-down","trello","trees","tree-pine","tree-palm","tree-deciduous","trash","trash-2","transgender","tram-front","train-track","train-front","train-front-tunnel","traffic-cone","tractor","toy-brick","tower-control","touchpad","touchpad-off","torus","tornado","toolbox","tool-case","toilet","toggle-right","toggle-left","timer","timer-reset","timer-off","tickets","tickets-plane","ticket","ticket-x","ticket-slash","ticket-plus","ticket-percent","ticket-minus","ticket-check","thumbs-up","thumbs-down","thermometer","thermometer-sun","thermometer-snowflake","theater","text-wrap","text-select","text-search","text-quote","text-initial","text-cursor","text-cursor-input","text-align-start","text-align-justify","text-align-end","text-align-center","test-tubes","test-tube","test-tube-diagonal","terminal","tent","tent-tree","telescope","target","tangent","tally-5","tally-4","tally-3","tally-2","tally-1","tags","tag","tablets","tablet","tablet-smartphone","table","table-rows-split","table-properties","table-of-contents","table-columns-split","table-cells-split","table-cells-merge","table-2","syringe","swords","sword","switch-camera","swiss-franc","swatch-book","superscript","sunset","sunrise","sun","sun-snow","sun-moon","sun-medium","sun-dim","subscript","strikethrough","stretch-vertical","stretch-horizontal","store","stone","sticky-note","sticker","stethoscope","step-forward","step-back","star","star-off","star-half","stamp","squirrel","squircle","squircle-dashed","squares-unite","squares-subtract","squares-intersect","squares-exclude","square","square-x","square-user","square-user-round","square-terminal","square-stop","square-star","square-stack","square-square","square-split-vertical","square-split-horizontal","square-slash","square-sigma","square-scissors","square-round-corner","square-radical","square-power","square-plus","square-play","square-pilcrow","square-pi","square-percent","square-pen","square-pause","square-parking","square-parking-off","square-mouse-pointer","square-minus","square-menu","square-m","square-library","square-kanban","square-function","square-equal","square-dot","square-divide","square-dashed","square-dashed-top-solid","square-dashed-mouse-pointer","square-dashed-kanban","square-dashed-bottom","square-dashed-bottom-code","square-code","square-chevron-up","square-chevron-right","square-chevron-left","square-chevron-down","square-check","square-check-big","square-chart-gantt","square-bottom-dashed-scissors","square-asterisk","square-arrow-up","square-arrow-up-right","square-arrow-up-left","square-arrow-right","square-arrow-out-up-right","square-arrow-out-up-left","square-arrow-out-down-right","square-arrow-out-down-left","square-arrow-left","square-arrow-down","square-arrow-down-right","square-arrow-down-left","square-activity","sprout","spray-can","spotlight","spool","split","spline","spline-pointer","spell-check","spell-check-2","speech","speaker","sparkles","sparkle","spade","space","soup","solar-panel","sofa","soap-dispenser-droplet","snowflake","snail","smile","smile-plus","smartphone","smartphone-nfc","smartphone-charging","sliders-vertical","sliders-horizontal","slice","slash","slack","skull","skip-forward","skip-back","siren","signpost","signpost-big","signature","signal","signal-zero","signal-medium","signal-low","signal-high","sigma","shuffle","shrub","shrink","shrimp","shredder","shower-head","shovel","shopping-cart","shopping-basket","shopping-bag","shirt","ship","ship-wheel","shield","shield-x","shield-user","shield-question-mark","shield-plus","shield-off","shield-minus","shield-half","shield-ellipsis","shield-check","shield-ban","shield-alert","shell","sheet","share","share-2","shapes","settings","settings-2","server","server-off","server-crash","server-cog","separator-vertical","separator-horizontal","send","send-to-back","send-horizontal","section","search","search-x","search-slash","search-code","search-check","search-alert","scroll","scroll-text","screen-share","screen-share-off","scooter","scissors","scissors-line-dashed","school","scan","scan-text","scan-search","scan-qr-code","scan-line","scan-heart","scan-face","scan-eye","scan-barcode","scaling","scale","scale-3d","save","save-off","save-all","saudi-riyal","satellite","satellite-dish","sandwich","salad","sailboat","russian-ruble","ruler","ruler-dimension-line","rss","rows-4","rows-3","rows-2","router","route","route-off","rotate-cw","rotate-cw-square","rotate-ccw","rotate-ccw-square","rotate-ccw-key","rotate-3d","rose","roller-coaster","rocking-chair","rocket","ribbon","rewind","reply","reply-all","replace","replace-all","repeat","repeat-2","repeat-1","remove-formatting","regex","refrigerator","refresh-cw","refresh-cw-off","refresh-ccw","refresh-ccw-dot","redo","redo-dot","redo-2","recycle","rectangle-vertical","rectangle-horizontal","rectangle-goggles","rectangle-ellipsis","rectangle-circle","receipt","receipt-turkish-lira","receipt-text","receipt-swiss-franc","receipt-russian-ruble","receipt-pound-sterling","receipt-japanese-yen","receipt-indian-rupee","receipt-euro","receipt-cent","ratio","rat","rainbow","rail-symbol","radius","radio","radio-tower","radio-receiver","radical","radiation","radar","rabbit","quote","qr-code","pyramid","puzzle","proportions","projector","printer","printer-check","presentation","power","power-off","pound-sterling","popsicle","popcorn","pointer","pointer-off","podcast","pocket","pocket-knife","plus","plug","plug-zap","plug-2","play","plane","plane-takeoff","plane-landing","pizza","pipette","pin","pin-off","pill","pill-bottle","pilcrow","pilcrow-right","pilcrow-left","piggy-bank","picture-in-picture","picture-in-picture-2","pickaxe","piano","pi","phone","phone-outgoing","phone-off","phone-missed","phone-incoming","phone-forwarded","phone-call","philippine-peso","person-standing","percent","pentagon","pencil","pencil-ruler","pencil-off","pencil-line","pen","pen-tool","pen-off","pen-line","pc-case","paw-print","pause","party-popper","parking-meter","parentheses","paperclip","panels-top-left","panels-right-bottom","panels-left-bottom","panel-top","panel-top-open","panel-top-dashed","panel-top-close","panel-top-bottom-dashed","panel-right","panel-right-open","panel-right-dashed","panel-right-close","panel-left","panel-left-right-dashed","panel-left-open","panel-left-dashed","panel-left-close","panel-bottom","panel-bottom-open","panel-bottom-dashed","panel-bottom-close","panda","palette","paintbrush","paintbrush-vertical","paint-roller","paint-bucket","package","package-x","package-search","package-plus","package-open","package-minus","package-check","package-2","origami","orbit","option","omega","octagon","octagon-x","octagon-pause","octagon-minus","octagon-alert","nut","nut-off","notepad-text","notepad-text-dashed","notebook","notebook-text","notebook-tabs","notebook-pen","non-binary","nfc","newspaper","network","navigation","navigation-off","navigation-2","navigation-2-off","music","music-4","music-3","music-2","move","move-vertical","move-up","move-up-right","move-up-left","move-right","move-left","move-horizontal","move-down","move-down-right","move-down-left","move-diagonal","move-diagonal-2","move-3d","mouse","mouse-pointer","mouse-pointer-click","mouse-pointer-ban","mouse-pointer-2","mouse-pointer-2-off","mouse-off","mountain","mountain-snow","motorbike","moon","moon-star","monitor","monitor-x","monitor-up","monitor-stop","monitor-speaker","monitor-smartphone","monitor-play","monitor-pause","monitor-off","monitor-down","monitor-dot","monitor-cog","monitor-cloud","monitor-check","minus","minimize","minimize-2","milk","milk-off","milestone","microwave","microscope","microchip","mic","mic-vocal","mic-off","messages-square","message-square","message-square-x","message-square-warning","message-square-text","message-square-share","message-square-reply","message-square-quote","message-square-plus","message-square-off","message-square-more","message-square-lock","message-square-heart","message-square-dot","message-square-diff","message-square-dashed","message-square-code","message-circle","message-circle-x","message-circle-warning","message-circle-reply","message-circle-question-mark","message-circle-plus","message-circle-off","message-circle-more","message-circle-heart","message-circle-dashed","message-circle-code","merge","menu","memory-stick","meh","megaphone","megaphone-off","medal","maximize","maximize-2","martini","mars","mars-stroke","map","map-plus","map-pinned","map-pin","map-pin-x","map-pin-x-inside","map-pin-plus","map-pin-plus-inside","map-pin-pen","map-pin-off","map-pin-minus","map-pin-minus-inside","map-pin-house","map-pin-check","map-pin-check-inside","map-minus","mails","mailbox","mail","mail-x","mail-warning","mail-search","mail-question-mark","mail-plus","mail-open","mail-minus","mail-check","magnet","luggage","lollipop","logs","log-out","log-in","lock","lock-open","lock-keyhole","lock-keyhole-open","locate","locate-off","locate-fixed","loader","loader-pinwheel","loader-circle","list","list-x","list-video","list-tree","list-todo","list-start","list-restart","list-plus","list-ordered","list-music","list-minus","list-indent-increase","list-indent-decrease","list-filter","list-filter-plus","list-end","list-collapse","list-chevrons-up-down","list-chevrons-down-up","list-checks","list-check","linkedin","link","link-2","link-2-off","line-squiggle","lightbulb","lightbulb-off","ligature","life-buoy","library","library-big","lectern","leafy-green","leaf","layout-template","layout-panel-top","layout-panel-left","layout-list","layout-grid","layout-dashboard","layers","layers-plus","layers-2","laugh","lasso","lasso-select","laptop","laptop-minimal","laptop-minimal-check","languages","landmark","land-plot","lamp","lamp-wall-up","lamp-wall-down","lamp-floor","lamp-desk","lamp-ceiling","keyboard","keyboard-off","keyboard-music","key","key-square","key-round","kayak","kanban","joystick","japanese-yen","iteration-cw","iteration-ccw","italic","instagram","inspection-panel","info","infinity","indian-rupee","inbox","import","images","image","image-upscale","image-up","image-plus","image-play","image-off","image-minus","image-down","id-card","id-card-lanyard","ice-cream-cone","ice-cream-bowl","house","house-wifi","house-plus","house-plug","house-heart","hourglass","hotel","hospital","hop","hop-off","history","highlighter","hexagon","helicopter","heater","heart","heart-pulse","heart-plus","heart-off","heart-minus","heart-handshake","heart-crack","headset","headphones","headphone-off","heading","heading-6","heading-5","heading-4","heading-3","heading-2","heading-1","hdmi-port","hd","haze","hat-glasses","hash","hard-hat","hard-drive","hard-drive-upload","hard-drive-download","handshake","handbag","hand","hand-platter","hand-metal","hand-helping","hand-heart","hand-grab","hand-fist","hand-coins","hammer","hamburger","ham","guitar","group","grip","grip-vertical","grip-horizontal","grid-3x3","grid-3x2","grid-2x2","grid-2x2-x","grid-2x2-plus","grid-2x2-check","grape","graduation-cap","gpu","goal","globe","globe-lock","glasses","glass-water","gitlab","github","git-pull-request","git-pull-request-draft","git-pull-request-create","git-pull-request-create-arrow","git-pull-request-closed","git-pull-request-arrow","git-merge","git-graph","git-fork","git-compare","git-compare-arrows","git-commit-vertical","git-commit-horizontal","git-branch","git-branch-plus","git-branch-minus","gift","ghost","georgian-lari","gem","gavel","gauge","gamepad","gamepad-directional","gamepad-2","gallery-vertical","gallery-vertical-end","gallery-thumbnails","gallery-horizontal","gallery-horizontal-end","funnel","funnel-x","funnel-plus","fullscreen","fuel","frown","framer","frame","forward","form","forklift","footprints","folders","folder","folder-x","folder-up","folder-tree","folder-sync","folder-symlink","folder-search","folder-search-2","folder-root","folder-plus","folder-pen","folder-output","folder-open","folder-open-dot","folder-minus","folder-lock","folder-key","folder-kanban","folder-input","folder-heart","folder-git","folder-git-2","folder-down","folder-dot","folder-cog","folder-code","folder-closed","folder-clock","folder-check","folder-archive","fold-vertical","fold-horizontal","focus","flower","flower-2","flip-vertical","flip-vertical-2","flip-horizontal","flip-horizontal-2","flask-round","flask-conical","flask-conical-off","flashlight","flashlight-off","flame","flame-kindling","flag","flag-triangle-right","flag-triangle-left","flag-off","fishing-hook","fish","fish-symbol","fish-off","fire-extinguisher","fingerprint-pattern","film","files","file","file-x","file-x-corner","file-volume","file-video-camera","file-user","file-up","file-type","file-type-corner","file-text","file-terminal","file-symlink","file-stack","file-spreadsheet","file-sliders","file-signal","file-search","file-search-corner","file-scan","file-question-mark","file-plus","file-plus-corner","file-play","file-pen","file-pen-line","file-output","file-music","file-minus","file-minus-corner","file-lock","file-key","file-input","file-image","file-heart","file-headphone","file-exclamation-point","file-down","file-digit","file-diff","file-cog","file-code","file-code-corner","file-clock","file-check","file-check-corner","file-chart-pie","file-chart-line","file-chart-column","file-chart-column-increasing","file-braces","file-braces-corner","file-box","file-badge","file-axis-3d","file-archive","figma","ferris-wheel","fence","feather","fast-forward","fan","factory","facebook","eye","eye-off","eye-closed","external-link","expand","ev-charger","euro","ethernet-port","eraser","equal","equal-not","equal-approximately","ellipsis","ellipsis-vertical","egg","egg-off","egg-fried","eclipse","earth","earth-lock","ear","ear-off","dumbbell","drumstick","drum","droplets","droplet","droplet-off","drone","drill","dribbble","drama","drafting-compass","download","dot","door-open","door-closed","door-closed-locked","donut","dollar-sign","dog","dock","dna","dna-off","divide","disc","disc-album","disc-3","disc-2","diff","dices","dice-6","dice-5","dice-4","dice-3","dice-2","dice-1","diamond","diamond-plus","diamond-percent","diamond-minus","diameter","dessert","delete","decimals-arrow-right","decimals-arrow-left","database","database-zap","database-backup","dam","cylinder","currency","cup-soda","cuboid","crown","crosshair","cross","crop","croissant","credit-card","creative-commons","cpu","corner-up-right","corner-up-left","corner-right-up","corner-right-down","corner-left-up","corner-left-down","corner-down-right","corner-down-left","copyright","copyleft","copy","copy-x","copy-slash","copy-plus","copy-minus","copy-check","cooking-pot","cookie","contrast","container","contact","contact-round","construction","cone","concierge-bell","computer","component","compass","command","combine","columns-4","columns-3","columns-3-cog","columns-2","coins","cog","coffee","codesandbox","codepen","code","code-xml","club","clover","cloudy","cloud","cloud-upload","cloud-sync","cloud-sun","cloud-sun-rain","cloud-snow","cloud-rain","cloud-rain-wind","cloud-off","cloud-moon","cloud-moon-rain","cloud-lightning","cloud-hail","cloud-fog","cloud-drizzle","cloud-download","cloud-cog","cloud-check","cloud-backup","cloud-alert","closed-caption","clock","clock-plus","clock-fading","clock-check","clock-arrow-up","clock-arrow-down","clock-alert","clock-9","clock-8","clock-7","clock-6","clock-5","clock-4","clock-3","clock-2","clock-12","clock-11","clock-10","clock-1","clipboard","clipboard-x","clipboard-type","clipboard-plus","clipboard-pen","clipboard-pen-line","clipboard-paste","clipboard-minus","clipboard-list","clipboard-copy","clipboard-clock","clipboard-check","clapperboard","citrus","circuit-board","circle","circle-x","circle-user","circle-user-round","circle-stop","circle-star","circle-small","circle-slash","circle-slash-2","circle-question-mark","circle-power","circle-pound-sterling","circle-plus","circle-play","circle-pile","circle-percent","circle-pause","circle-parking","circle-parking-off","circle-off","circle-minus","circle-gauge","circle-fading-plus","circle-fading-arrow-up","circle-equal","circle-ellipsis","circle-dot","circle-dot-dashed","circle-dollar-sign","circle-divide","circle-dashed","circle-chevron-up","circle-chevron-right","circle-chevron-left","circle-chevron-down","circle-check","circle-check-big","circle-arrow-up","circle-arrow-right","circle-arrow-out-up-right","circle-arrow-out-up-left","circle-arrow-out-down-right","circle-arrow-out-down-left","circle-arrow-left","circle-arrow-down","circle-alert","cigarette","cigarette-off","church","chromium","chevrons-up","chevrons-up-down","chevrons-right","chevrons-right-left","chevrons-left","chevrons-left-right","chevrons-left-right-ellipsis","chevrons-down","chevrons-down-up","chevron-up","chevron-right","chevron-left","chevron-last","chevron-first","chevron-down","chess-rook","chess-queen","chess-pawn","chess-knight","chess-king","chess-bishop","cherry","chef-hat","check","check-line","check-check","chart-spline","chart-scatter","chart-pie","chart-no-axes-gantt","chart-no-axes-combined","chart-no-axes-column","chart-no-axes-column-increasing","chart-no-axes-column-decreasing","chart-network","chart-line","chart-gantt","chart-column","chart-column-stacked","chart-column-increasing","chart-column-decreasing","chart-column-big","chart-candlestick","chart-bar","chart-bar-stacked","chart-bar-increasing","chart-bar-decreasing","chart-bar-big","chart-area","cctv","cat","castle","cast","cassette-tape","case-upper","case-sensitive","case-lower","carrot","card-sim","caravan","car","car-taxi-front","car-front","captions","captions-off","cannabis","cannabis-off","candy","candy-off","candy-cane","camera","camera-off","calendars","calendar","calendar-x","calendar-x-2","calendar-sync","calendar-search","calendar-range","calendar-plus","calendar-plus-2","calendar-off","calendar-minus","calendar-minus-2","calendar-heart","calendar-fold","calendar-days","calendar-cog","calendar-clock","calendar-check","calendar-check-2","calendar-arrow-up","calendar-arrow-down","calendar-1","calculator","cake","cake-slice","cable","cable-car","bus","bus-front","building","building-2","bug","bug-play","bug-off","bubbles","brush","brush-cleaning","bring-to-front","briefcase","briefcase-medical","briefcase-conveyor-belt","briefcase-business","brick-wall","brick-wall-shield","brick-wall-fire","brain","brain-cog","brain-circuit","brackets","braces","boxes","box","bow-arrow","bottle-wine","bot","bot-off","bot-message-square","boom-box","bookmark","bookmark-x","bookmark-plus","bookmark-minus","bookmark-check","book","book-x","book-user","book-up","book-up-2","book-type","book-text","book-search","book-plus","book-open","book-open-text","book-open-check","book-minus","book-marked","book-lock","book-key","book-image","book-heart","book-headphones","book-down","book-dashed","book-copy","book-check","book-audio","book-alert","book-a","bone","bomb","bolt","bold","bluetooth","bluetooth-searching","bluetooth-off","bluetooth-connected","blocks","blinds","blend","bitcoin","birdhouse","bird","biohazard","binoculars","binary","bike","biceps-flexed","between-vertical-start","between-vertical-end","between-horizontal-start","between-horizontal-end","bell","bell-ring","bell-plus","bell-off","bell-minus","bell-electric","bell-dot","beer","beer-off","beef","bed","bed-single","bed-double","bean","bean-off","beaker","battery","battery-warning","battery-plus","battery-medium","battery-low","battery-full","battery-charging","bath","baseline","barrel","barcode","banknote","banknote-x","banknote-arrow-up","banknote-arrow-down","bandage","banana","ban","balloon","baggage-claim","badge","badge-x","badge-turkish-lira","badge-swiss-franc","badge-russian-ruble","badge-question-mark","badge-pound-sterling","badge-plus","badge-percent","badge-minus","badge-japanese-yen","badge-info","badge-indian-rupee","badge-euro","badge-dollar-sign","badge-check","badge-cent","badge-alert","backpack","baby","axis-3d","axe","award","audio-waveform","audio-lines","atom","at-sign","asterisk","arrows-up-from-line","arrow-up","arrow-up-z-a","arrow-up-wide-narrow","arrow-up-to-line","arrow-up-right","arrow-up-narrow-wide","arrow-up-left","arrow-up-from-line","arrow-up-from-dot","arrow-up-down","arrow-up-a-z","arrow-up-1-0","arrow-up-0-1","arrow-right","arrow-right-to-line","arrow-right-left","arrow-right-from-line","arrow-left","arrow-left-to-line","arrow-left-right","arrow-left-from-line","arrow-down","arrow-down-z-a","arrow-down-wide-narrow","arrow-down-up","arrow-down-to-line","arrow-down-to-dot","arrow-down-right","arrow-down-narrow-wide","arrow-down-left","arrow-down-from-line","arrow-down-a-z","arrow-down-1-0","arrow-down-0-1","arrow-big-up","arrow-big-up-dash","arrow-big-right","arrow-big-right-dash","arrow-big-left","arrow-big-left-dash","arrow-big-down","arrow-big-down-dash","armchair","archive","archive-x","archive-restore","apple","app-window","app-window-mac","aperture","anvil","antenna","annoyed","angry","anchor","amphora","ampersands","ampersand","ambulance","align-vertical-space-between","align-vertical-space-around","align-vertical-justify-start","align-vertical-justify-end","align-vertical-justify-center","align-vertical-distribute-start","align-vertical-distribute-end","align-vertical-distribute-center","align-start-vertical","align-start-horizontal","align-horizontal-space-between","align-horizontal-space-around","align-horizontal-justify-start","align-horizontal-justify-end","align-horizontal-justify-center","align-horizontal-distribute-start","align-horizontal-distribute-end","align-horizontal-distribute-center","align-end-vertical","align-end-horizontal","align-center-vertical","align-center-horizontal","album","alarm-smoke","alarm-clock","alarm-clock-plus","alarm-clock-off","alarm-clock-minus","alarm-clock-check","airplay","air-vent","activity","accessibility","a-large-small","a-arrow-up","a-arrow-down"],Pi=e=>{const{value:o,defaultValue:r,onChange:n,isOpen:a,onOpen:l,onClose:i,closeOnSelect:u=!0}=e,[c,d]=m.useState(a??!1),[g,p]=m.useState(o??r),[h,f]=m.useState(""),y=m.useRef(null),b=m.useRef(null);m.useEffect(()=>{o!==void 0&&p(o)},[o]),m.useEffect(()=>{a!==void 0&&d(a)},[a]);const x=m.useMemo(()=>h?Fa.filter(S=>S.toLowerCase().includes(h.toLowerCase())).slice(0,100):Fa.slice(0,100),[h]);m.useEffect(()=>{const S=I=>{c&&y.current&&b.current&&!y.current.contains(I.target)&&!b.current.contains(I.target)&&C()};if(!(typeof document>"u"))return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[c]);const C=m.useCallback(()=>{a===void 0&&d(!1),i&&i()},[i,a]),k=m.useCallback(()=>{const S=!c;a===void 0&&d(S),S?(l&&l(),f("")):i&&i()},[c,l,i,a]),w=m.useCallback(S=>{o===void 0&&p(S),n&&n(S),u&&C()},[n,u,C,o]),v=m.useCallback(S=>{f(S)},[]);return{isOpen:c,selectedIcon:g,searchQuery:h,filteredIcons:x,handleToggle:k,handleIconSelect:w,handleSearchChange:v,handleClose:C,triggerRef:y,dropdownRef:b}},Vo={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px",maxHeight:"320px",overflow:"hidden",display:"flex",flexDirection:"column"},searchInput:{marginBottom:"12px",flexShrink:0},iconGrid:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"8px",overflowY:"auto",padding:"4px",color:"color-black",flexGrow:1},iconItem:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:8,transition:"all 0.2s ease-in-out"}},Sy={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},wy={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},jy={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Di=({label:e,placeholder:o="Select an icon",helperText:r,views:n={},size:a="md",shape:l="default",variant:i="default",error:u=!1,isDisabled:c=!1,isReadOnly:d=!1,showSearch:g=!0,isOpen:p,selectedIcon:h,searchQuery:f,filteredIcons:y,handleToggle:b,handleIconSelect:x,handleSearchChange:C,triggerRef:k,dropdownRef:w,handleClose:v,onChange:S,value:I,defaultValue:j,onOpen:R,onClose:z,closeOnSelect:E,...W})=>{const{getColor:F}=s.useTheme(),T={...Vo.container,...n==null?void 0:n.container},M={...Vo.trigger,...Sy[a],...wy[l],...jy[i],...u&&{borderColor:"color-red-500"},...c&&{opacity:.6,cursor:"not-allowed"},...!c&&!d&&{_hover:{borderColor:"color-gray-300"}},...n==null?void 0:n.trigger},V={...Vo.dropdown,...n==null?void 0:n.dropdown},A={...Vo.iconGrid,...n==null?void 0:n.iconGrid};return t.jsxs(s.View,{...T,...W,children:[e&&t.jsx(s.Text,{fontSize:a==="xs"?"12px":a==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...n==null?void 0:n.label,children:e}),t.jsxs(s.View,{ref:k,onClick:c||d?void 0:b,...M,children:[t.jsx(s.Horizontal,{alignItems:"center",gap:8,width:"100%",children:h?t.jsxs(s.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[t.jsx(bt,{name:h,widthHeight:16}),t.jsx(s.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h})]}):t.jsx(s.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!d&&!c&&t.jsx(Se,{widthHeight:16,color:"color-gray-500",orientation:p?"up":"down"})]}),p&&t.jsxs(s.View,{ref:w,...V,children:[g&&t.jsx(s.View,{...Vo.searchInput,...n==null?void 0:n.searchInput,children:t.jsx(Pe,{placeholder:"Search icons...",value:f,onChange:H=>C(H),size:"sm",autoFocus:!0})}),t.jsx(s.View,{...A,children:y.length>0?y.map(H=>t.jsx(s.View,{...Vo.iconItem,onClick:()=>x(H),title:H,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:h===H?"#EFF6FF":"transparent",borderWidth:h===H?"1px":"0px",borderStyle:"solid",borderColor:h===H?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:t.jsx(bt,{name:H,widthHeight:20})},H)):t.jsx(s.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:t.jsx(s.Text,{fontSize:"14px",children:"No icons found"})})})]}),r&&t.jsx(s.Text,{color:u?"color-red-500":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:r})]})},vy=e=>{const o=Fe(e),r={...e,value:o.value??e.value??e.defaultValue},n=Pi(r),a=l=>{n.handleIconSelect(l),o.onChange(l)};return t.jsx(Di,{...n,...r,handleIconSelect:a})},Ty=vy,$i={select:"Select an emoji",reaction:"Add reaction",search:"Search emojis…",more:"More emojis",empty:"No emojis found",categoryEmpty:"No emojis in this category",recent:"Recent",smileys:"Smileys",people:"People",animals:"Animals",food:"Food",activities:"Activities",travel:"Travel",objects:"Objects",symbols:"Symbols",flags:"Flags"},Li=["👍","❤️","🙌","😂","😢","😮"],Iy=[{emoji:"😀",name:"grinning face",category:"smileys",keywords:["happy","smile","grin","heureux","sourire"]},{emoji:"😃",name:"grinning face with big eyes",category:"smileys",keywords:["happy","smile","joy","heureux","sourire","joie"]},{emoji:"😄",name:"grinning face with smiling eyes",category:"smileys",keywords:["happy","smile","joy","heureux","sourire","joie"]},{emoji:"😁",name:"beaming face with smiling eyes",category:"smileys",keywords:["happy","smile","grin","heureux","sourire"]},{emoji:"😆",name:"grinning squinting face",category:"smileys",keywords:["happy","laugh","smile","heureux","rire","sourire"]},{emoji:"😅",name:"grinning face with sweat",category:"smileys",keywords:["happy","sweat","relief","heureux"]},{emoji:"🤣",name:"rolling on the floor laughing",category:"smileys",keywords:["laugh","funny","rofl","rire"]},{emoji:"😂",name:"face with tears of joy",category:"smileys",keywords:["laugh","cry","joy","rire","pleurer","joie"]},{emoji:"🙂",name:"slightly smiling face",category:"smileys",keywords:["smile","happy","sourire","heureux"]},{emoji:"🙃",name:"upside-down face",category:"smileys",keywords:["silly","upside down"]},{emoji:"😉",name:"winking face",category:"smileys",keywords:["wink","flirt"]},{emoji:"😊",name:"smiling face with smiling eyes",category:"smileys",keywords:["happy","smile","blush","heureux","sourire"]},{emoji:"😇",name:"smiling face with halo",category:"smileys",keywords:["angel","innocent"]},{emoji:"🥰",name:"smiling face with hearts",category:"smileys",keywords:["love","hearts","adore","amour"]},{emoji:"😍",name:"smiling face with heart-eyes",category:"smileys",keywords:["love","heart","eyes","amour","cœur","yeux"]},{emoji:"🤩",name:"star-struck",category:"smileys",keywords:["star","struck","amazed","étoile"]},{emoji:"😘",name:"face blowing a kiss",category:"smileys",keywords:["kiss","love","flirt","bisou","amour"]},{emoji:"😗",name:"kissing face",category:"smileys",keywords:["kiss","love","bisou","amour"]},{emoji:"☺️",name:"smiling face",category:"smileys",keywords:["smile","happy","content","sourire","heureux"]},{emoji:"😚",name:"kissing face with closed eyes",category:"smileys",keywords:["kiss","love","closed eyes","bisou","amour","yeux"]},{emoji:"😙",name:"kissing face with smiling eyes",category:"smileys",keywords:["kiss","love","smile","bisou","amour","sourire"]},{emoji:"🥲",name:"smiling face with tear",category:"smileys",keywords:["happy","cry","tear","bittersweet","heureux","pleurer"]},{emoji:"😋",name:"face savoring food",category:"smileys",keywords:["yum","delicious","food","nourriture"]},{emoji:"😛",name:"face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"😜",name:"winking face with tongue",category:"smileys",keywords:["wink","tongue","silly"]},{emoji:"🤪",name:"zany face",category:"smileys",keywords:["crazy","silly","wild"]},{emoji:"😝",name:"squinting face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"🤑",name:"money-mouth face",category:"smileys",keywords:["money","rich","greedy"]},{emoji:"🤗",name:"hugging face",category:"smileys",keywords:["hug","love","care","amour"]},{emoji:"🤭",name:"face with hand over mouth",category:"smileys",keywords:["oops","secret","quiet"]},{emoji:"🫢",name:"face with open eyes and hand over mouth",category:"smileys",keywords:["surprise","shock","oops"]},{emoji:"🫣",name:"face with peeking eye",category:"smileys",keywords:["peek","shy","embarrassed"]},{emoji:"🤫",name:"shushing face",category:"smileys",keywords:["quiet","secret","shh"]},{emoji:"🤔",name:"thinking face",category:"smileys",keywords:["think","consider","hmm","réfléchir"]},{emoji:"🫡",name:"saluting face",category:"smileys",keywords:["salute","respect","military"]},{emoji:"🤐",name:"zipper-mouth face",category:"smileys",keywords:["quiet","secret","zip"]},{emoji:"🤨",name:"face with raised eyebrow",category:"smileys",keywords:["suspicious","doubt","skeptical"]},{emoji:"😐",name:"neutral face",category:"smileys",keywords:["neutral","meh","blank","neutre"]},{emoji:"😑",name:"expressionless face",category:"smileys",keywords:["blank","deadpan","meh"]},{emoji:"😶",name:"face without mouth",category:"smileys",keywords:["quiet","speechless","silent"]},{emoji:"🫥",name:"dotted line face",category:"smileys",keywords:["invisible","depressed","disappear"]},{emoji:"😏",name:"smirking face",category:"smileys",keywords:["smirk","smug","confident"]},{emoji:"😒",name:"unamused face",category:"smileys",keywords:["unamused","bored","annoyed"]},{emoji:"🙄",name:"face with rolling eyes",category:"smileys",keywords:["eye roll","annoyed","whatever"]},{emoji:"😬",name:"grimacing face",category:"smileys",keywords:["grimace","awkward","oops"]},{emoji:"😮‍💨",name:"face exhaling",category:"smileys",keywords:["sigh","relief","tired","fatigué"]},{emoji:"🤥",name:"lying face",category:"smileys",keywords:["lie","pinocchio","dishonest"]},{emoji:"😌",name:"relieved face",category:"smileys",keywords:["relief","calm","peaceful"]},{emoji:"😔",name:"pensive face",category:"smileys",keywords:["sad","thoughtful","pensive","triste"]},{emoji:"😪",name:"sleepy face",category:"smileys",keywords:["sleepy","tired","drowsy","fatigué"]},{emoji:"🤤",name:"drooling face",category:"smileys",keywords:["drool","desire","sleep","dormir"]},{emoji:"😴",name:"sleeping face",category:"smileys",keywords:["sleep","tired","zzz","dormir","fatigué"]},{emoji:"😷",name:"face with medical mask",category:"smileys",keywords:["mask","sick","doctor"]},{emoji:"🤒",name:"face with thermometer",category:"smileys",keywords:["sick","fever","ill"]},{emoji:"🤕",name:"face with head-bandage",category:"smileys",keywords:["hurt","injured","bandage"]},{emoji:"🤢",name:"nauseated face",category:"smileys",keywords:["sick","nausea","disgusted"]},{emoji:"🤮",name:"face vomiting",category:"smileys",keywords:["vomit","sick","disgusted"]},{emoji:"🤧",name:"sneezing face",category:"smileys",keywords:["sneeze","sick","gesundheit"]},{emoji:"🥵",name:"hot face",category:"smileys",keywords:["hot","heat","sweat"]},{emoji:"🥶",name:"cold face",category:"smileys",keywords:["cold","freeze","blue","bleu"]},{emoji:"🥴",name:"woozy face",category:"smileys",keywords:["dizzy","drunk","confused","confus"]},{emoji:"😵",name:"dizzy face",category:"smileys",keywords:["dizzy","confused","knocked out","confus"]},{emoji:"😵‍💫",name:"face with spiral eyes",category:"smileys",keywords:["dizzy","hypnotized","confused","confus"]},{emoji:"🤯",name:"exploding head",category:"smileys",keywords:["mind blown","shocked","amazed"]},{emoji:"🤠",name:"cowboy hat face",category:"smileys",keywords:["cowboy","hat","western"]},{emoji:"🥳",name:"partying face",category:"smileys",keywords:["party","celebration","birthday","fête"]},{emoji:"🥸",name:"disguised face",category:"smileys",keywords:["disguise","glasses","incognito"]},{emoji:"😎",name:"smiling face with sunglasses",category:"smileys",keywords:["cool","sunglasses","awesome"]},{emoji:"🤓",name:"nerd face",category:"smileys",keywords:["nerd","geek","smart"]},{emoji:"🧐",name:"face with monocle",category:"smileys",keywords:["monocle","fancy","inspection"]},{emoji:"👋",name:"waving hand",category:"people",keywords:["wave","hello","goodbye"]},{emoji:"🤚",name:"raised back of hand",category:"people",keywords:["hand","stop","main"]},{emoji:"🖐️",name:"hand with fingers splayed",category:"people",keywords:["hand","five","main"]},{emoji:"✋",name:"raised hand",category:"people",keywords:["hand","stop","high five","main"]},{emoji:"🖖",name:"vulcan salute",category:"people",keywords:["spock","vulcan"]},{emoji:"👌",name:"OK hand",category:"people",keywords:["ok","perfect"]},{emoji:"🤌",name:"pinched fingers",category:"people",keywords:["italian","chef kiss","bisou"]},{emoji:"🤏",name:"pinching hand",category:"people",keywords:["small","tiny"]},{emoji:"✌️",name:"victory hand",category:"people",keywords:["peace","victory","victoire"]},{emoji:"🤞",name:"crossed fingers",category:"people",keywords:["luck","hope"]},{emoji:"🤟",name:"love-you gesture",category:"people",keywords:["love","you","amour"]},{emoji:"🤘",name:"sign of the horns",category:"people",keywords:["rock","metal"]},{emoji:"🤙",name:"call me hand",category:"people",keywords:["call","phone"]},{emoji:"👈",name:"backhand index pointing left",category:"people",keywords:["point","left"]},{emoji:"👉",name:"backhand index pointing right",category:"people",keywords:["point","right"]},{emoji:"👆",name:"backhand index pointing up",category:"people",keywords:["point","up"]},{emoji:"🖕",name:"middle finger",category:"people",keywords:["middle finger","rude"]},{emoji:"👇",name:"backhand index pointing down",category:"people",keywords:["point","down"]},{emoji:"☝️",name:"index pointing up",category:"people",keywords:["point","up","one"]},{emoji:"👍",name:"thumbs up",category:"people",keywords:["thumbs up","good","yes","pouce"]},{emoji:"👎",name:"thumbs down",category:"people",keywords:["thumbs down","bad","no","pouce"]},{emoji:"✊",name:"raised fist",category:"people",keywords:["fist","power","solidarity"]},{emoji:"👊",name:"oncoming fist",category:"people",keywords:["fist","punch","bump"]},{emoji:"🤛",name:"left-facing fist",category:"people",keywords:["fist","bump","left"]},{emoji:"🤜",name:"right-facing fist",category:"people",keywords:["fist","bump","right"]},{emoji:"👏",name:"clapping hands",category:"people",keywords:["clap","applause","bravo"]},{emoji:"🙌",name:"raising hands",category:"people",keywords:["celebration","hooray","praise","fête"]},{emoji:"👐",name:"open hands",category:"people",keywords:["open","hug","jazz hands"]},{emoji:"🤲",name:"palms up together",category:"people",keywords:["prayer","please","hope"]},{emoji:"🤝",name:"handshake",category:"people",keywords:["handshake","deal","agreement"]},{emoji:"🙏",name:"folded hands",category:"people",keywords:["prayer","thanks","please","merci"]},{emoji:"✍️",name:"writing hand",category:"people",keywords:["write","author","signature"]},{emoji:"💅",name:"nail polish",category:"people",keywords:["nails","beauty","manicure"]},{emoji:"🤳",name:"selfie",category:"people",keywords:["selfie","camera","phone"]},{emoji:"💪",name:"flexed biceps",category:"people",keywords:["muscle","strong","flex","force"]},{emoji:"🦾",name:"mechanical arm",category:"people",keywords:["robot","prosthetic","cyborg","ia"]},{emoji:"🦿",name:"mechanical leg",category:"people",keywords:["robot","prosthetic","cyborg","ia"]},{emoji:"🦵",name:"leg",category:"people",keywords:["leg","limb","kick"]},{emoji:"🦶",name:"foot",category:"people",keywords:["foot","kick","stomp"]},{emoji:"👂",name:"ear",category:"people",keywords:["ear","hear","listen"]},{emoji:"🦻",name:"ear with hearing aid",category:"people",keywords:["hearing aid","deaf","accessibility"]},{emoji:"👃",name:"nose",category:"people",keywords:["nose","smell","sniff"]},{emoji:"🧠",name:"brain",category:"people",keywords:["brain","smart","think","cerveau","réfléchir"]},{emoji:"🫀",name:"anatomical heart",category:"people",keywords:["heart","organ","love","cœur","amour"]},{emoji:"🫁",name:"lungs",category:"people",keywords:["lungs","breathe","organ"]},{emoji:"🦷",name:"tooth",category:"people",keywords:["tooth","dental","smile","sourire"]},{emoji:"🦴",name:"bone",category:"people",keywords:["bone","skeleton","dog","chien"]},{emoji:"👀",name:"eyes",category:"people",keywords:["eyes","look","see","yeux"]},{emoji:"👁️",name:"eye",category:"people",keywords:["eye","see","watch"]},{emoji:"👅",name:"tongue",category:"people",keywords:["tongue","taste","lick"]},{emoji:"👄",name:"mouth",category:"people",keywords:["mouth","lips","kiss","bisou"]},{emoji:"🫦",name:"biting lip",category:"people",keywords:["lip","bite","nervous"]},{emoji:"👶",name:"baby",category:"people",keywords:["baby","infant","child"]},{emoji:"🧒",name:"child",category:"people",keywords:["child","kid","young"]},{emoji:"👦",name:"boy",category:"people",keywords:["boy","child","male"]},{emoji:"👧",name:"girl",category:"people",keywords:["girl","child","female"]},{emoji:"🧑",name:"person",category:"people",keywords:["person","adult","human"]},{emoji:"👱",name:"person: blond hair",category:"people",keywords:["blond","hair","person"]},{emoji:"👨",name:"man",category:"people",keywords:["man","male","adult"]},{emoji:"🧔",name:"person: beard",category:"people",keywords:["beard","man","facial hair"]},{emoji:"👩",name:"woman",category:"people",keywords:["woman","female","adult"]},{emoji:"🧓",name:"older person",category:"people",keywords:["old","elderly","senior"]},{emoji:"👴",name:"old man",category:"people",keywords:["old","man","elderly"]},{emoji:"👵",name:"old woman",category:"people",keywords:["old","woman","elderly"]},{emoji:"🐶",name:"dog face",category:"animals",keywords:["dog","pet","animal","chien"]},{emoji:"🐱",name:"cat face",category:"animals",keywords:["cat","pet","animal","chat"]},{emoji:"🐭",name:"mouse face",category:"animals",keywords:["mouse","animal"]},{emoji:"🐹",name:"hamster",category:"animals",keywords:["hamster","pet"]},{emoji:"🐰",name:"rabbit face",category:"animals",keywords:["rabbit","bunny"]},{emoji:"🦊",name:"fox",category:"animals",keywords:["fox","animal"]},{emoji:"🐻",name:"bear",category:"animals",keywords:["bear","animal"]},{emoji:"🐼",name:"panda",category:"animals",keywords:["panda","bear"]},{emoji:"🐨",name:"koala",category:"animals",keywords:["koala","australia","marsupial"]},{emoji:"🐯",name:"tiger face",category:"animals",keywords:["tiger","cat","wild","chat"]},{emoji:"🦁",name:"lion",category:"animals",keywords:["lion","king","cat","chat"]},{emoji:"🐮",name:"cow face",category:"animals",keywords:["cow","moo","farm"]},{emoji:"🐷",name:"pig face",category:"animals",keywords:["pig","oink","farm"]},{emoji:"🐽",name:"pig nose",category:"animals",keywords:["pig","nose","snout"]},{emoji:"🐸",name:"frog",category:"animals",keywords:["frog","amphibian","green","vert"]},{emoji:"🐵",name:"monkey face",category:"animals",keywords:["monkey","primate","banana"]},{emoji:"🙈",name:"see-no-evil monkey",category:"animals",keywords:["monkey","see no evil","eyes","yeux"]},{emoji:"🙉",name:"hear-no-evil monkey",category:"animals",keywords:["monkey","hear no evil","ears"]},{emoji:"🙊",name:"speak-no-evil monkey",category:"animals",keywords:["monkey","speak no evil","mouth"]},{emoji:"🐒",name:"monkey",category:"animals",keywords:["monkey","primate","zoo"]},{emoji:"🦍",name:"gorilla",category:"animals",keywords:["gorilla","ape","strong","force"]},{emoji:"🦧",name:"orangutan",category:"animals",keywords:["orangutan","ape","orange"]},{emoji:"🐺",name:"wolf",category:"animals",keywords:["wolf","howl","wild"]},{emoji:"🐗",name:"boar",category:"animals",keywords:["boar","pig","wild"]},{emoji:"🐴",name:"horse face",category:"animals",keywords:["horse","neigh","ride"]},{emoji:"🐎",name:"horse",category:"animals",keywords:["horse","racing","gallop"]},{emoji:"🦄",name:"unicorn",category:"animals",keywords:["unicorn","magical","horn"]},{emoji:"🦓",name:"zebra",category:"animals",keywords:["zebra","stripes","africa"]},{emoji:"🦌",name:"deer",category:"animals",keywords:["deer","antlers","forest"]},{emoji:"🦏",name:"rhinoceros",category:"animals",keywords:["rhino","horn","africa"]},{emoji:"🦛",name:"hippopotamus",category:"animals",keywords:["hippo","water","africa"]},{emoji:"🐘",name:"elephant",category:"animals",keywords:["elephant","trunk","memory"]},{emoji:"🦒",name:"giraffe",category:"animals",keywords:["giraffe","tall","neck"]},{emoji:"🦘",name:"kangaroo",category:"animals",keywords:["kangaroo","hop","australia"]},{emoji:"🦥",name:"sloth",category:"animals",keywords:["sloth","slow","lazy"]},{emoji:"🦦",name:"otter",category:"animals",keywords:["otter","water","cute"]},{emoji:"🦨",name:"skunk",category:"animals",keywords:["skunk","smell","stripe"]},{emoji:"🦡",name:"badger",category:"animals",keywords:["badger","honey","dig"]},{emoji:"🐾",name:"paw prints",category:"animals",keywords:["paw","prints","tracks"]},{emoji:"🐔",name:"chicken",category:"animals",keywords:["chicken","rooster","farm"]},{emoji:"🐓",name:"rooster",category:"animals",keywords:["rooster","cock","morning"]},{emoji:"🐣",name:"hatching chick",category:"animals",keywords:["chick","hatching","egg"]},{emoji:"🐤",name:"baby chick",category:"animals",keywords:["chick","baby","yellow","jaune"]},{emoji:"🐥",name:"front-facing baby chick",category:"animals",keywords:["chick","baby","cute"]},{emoji:"🦆",name:"duck",category:"animals",keywords:["duck","quack","water"]},{emoji:"🦅",name:"eagle",category:"animals",keywords:["eagle","bird","freedom"]},{emoji:"🦉",name:"owl",category:"animals",keywords:["owl","wise","night"]},{emoji:"🦇",name:"bat",category:"animals",keywords:["bat","vampire","night"]},{emoji:"",name:"bug",category:"animals",keywords:["bug","insect","crawl"]},{emoji:"🦋",name:"butterfly",category:"animals",keywords:["butterfly","beautiful","fly"]},{emoji:"🐌",name:"snail",category:"animals",keywords:["snail","slow","shell"]},{emoji:"🐞",name:"lady beetle",category:"animals",keywords:["ladybug","beetle","red","rouge"]},{emoji:"🐜",name:"ant",category:"animals",keywords:["ant","work","colony"]},{emoji:"🦟",name:"mosquito",category:"animals",keywords:["mosquito","bite","buzz"]},{emoji:"🕷️",name:"spider",category:"animals",keywords:["spider","web","eight legs"]},{emoji:"🦂",name:"scorpion",category:"animals",keywords:["scorpion","sting","desert"]},{emoji:"🐢",name:"turtle",category:"animals",keywords:["turtle","slow","shell"]},{emoji:"🐍",name:"snake",category:"animals",keywords:["snake","slither","reptile"]},{emoji:"🦎",name:"lizard",category:"animals",keywords:["lizard","gecko","reptile"]},{emoji:"🐙",name:"octopus",category:"animals",keywords:["octopus","tentacles","sea"]},{emoji:"🦑",name:"squid",category:"animals",keywords:["squid","tentacles","ocean"]},{emoji:"🦐",name:"shrimp",category:"animals",keywords:["shrimp","seafood","small"]},{emoji:"🦞",name:"lobster",category:"animals",keywords:["lobster","claws","red","rouge"]},{emoji:"🦀",name:"crab",category:"animals",keywords:["crab","claws","beach"]},{emoji:"🐡",name:"blowfish",category:"animals",keywords:["blowfish","puffer","spiky"]},{emoji:"🐠",name:"tropical fish",category:"animals",keywords:["fish","tropical","colorful"]},{emoji:"🐟",name:"fish",category:"animals",keywords:["fish","swim","water"]},{emoji:"🐬",name:"dolphin",category:"animals",keywords:["dolphin","smart","ocean"]},{emoji:"🐳",name:"spouting whale",category:"animals",keywords:["whale","spout","big"]},{emoji:"🐋",name:"whale",category:"animals",keywords:["whale","ocean","huge"]},{emoji:"🦈",name:"shark",category:"animals",keywords:["shark","teeth","dangerous"]},{emoji:"🐊",name:"crocodile",category:"animals",keywords:["crocodile","teeth","swamp"]},{emoji:"🌸",name:"cherry blossom",category:"animals",keywords:["flower","spring","pink","rose"]},{emoji:"💐",name:"bouquet",category:"animals",keywords:["flowers","bouquet","gift","cadeau"]},{emoji:"🌺",name:"hibiscus",category:"animals",keywords:["flower","tropical","red","rouge"]},{emoji:"🌻",name:"sunflower",category:"animals",keywords:["sunflower","yellow","big","jaune"]},{emoji:"🌹",name:"rose",category:"animals",keywords:["rose","love","red","amour","rouge"]},{emoji:"🥀",name:"wilted flower",category:"animals",keywords:["flower","wilted","sad","triste"]},{emoji:"🌷",name:"tulip",category:"animals",keywords:["tulip","spring","netherlands"]},{emoji:"🌼",name:"daisy",category:"animals",keywords:["daisy","white","simple","blanc"]},{emoji:"🌱",name:"seedling",category:"animals",keywords:["plant","grow","green","plante","vert"]},{emoji:"🌿",name:"herb",category:"animals",keywords:["herb","green","leaf","vert"]},{emoji:"🍀",name:"four leaf clover",category:"animals",keywords:["clover","luck","green","vert"]},{emoji:"🌳",name:"deciduous tree",category:"animals",keywords:["tree","nature","green","vert"]},{emoji:"🌲",name:"evergreen tree",category:"animals",keywords:["tree","pine","christmas"]},{emoji:"🌴",name:"palm tree",category:"animals",keywords:["palm","tropical","beach"]},{emoji:"🌵",name:"cactus",category:"animals",keywords:["cactus","desert","spiky"]},{emoji:"🍎",name:"red apple",category:"food",keywords:["apple","fruit"]},{emoji:"🍊",name:"tangerine",category:"food",keywords:["orange","fruit"]},{emoji:"🍋",name:"lemon",category:"food",keywords:["lemon","fruit"]},{emoji:"🍌",name:"banana",category:"food",keywords:["banana","fruit"]},{emoji:"🍉",name:"watermelon",category:"food",keywords:["watermelon","fruit"]},{emoji:"🍇",name:"grapes",category:"food",keywords:["grapes","fruit"]},{emoji:"🍓",name:"strawberry",category:"food",keywords:["strawberry","fruit"]},{emoji:"🫐",name:"blueberries",category:"food",keywords:["blueberry","fruit"]},{emoji:"🥝",name:"kiwi fruit",category:"food",keywords:["kiwi","fruit","green","vert"]},{emoji:"🍅",name:"tomato",category:"food",keywords:["tomato","red","vegetable","rouge"]},{emoji:"🫒",name:"olive",category:"food",keywords:["olive","green","oil","vert"]},{emoji:"🥥",name:"coconut",category:"food",keywords:["coconut","tropical","milk"]},{emoji:"🥑",name:"avocado",category:"food",keywords:["avocado","green","healthy","vert"]},{emoji:"🍆",name:"eggplant",category:"food",keywords:["eggplant","purple","vegetable","violet"]},{emoji:"🥔",name:"potato",category:"food",keywords:["potato","vegetable","starch"]},{emoji:"🥕",name:"carrot",category:"food",keywords:["carrot","orange","vegetable"]},{emoji:"🌽",name:"ear of corn",category:"food",keywords:["corn","yellow","vegetable","jaune"]},{emoji:"🌶️",name:"hot pepper",category:"food",keywords:["pepper","hot","spicy"]},{emoji:"🫑",name:"bell pepper",category:"food",keywords:["pepper","bell","vegetable","cloche"]},{emoji:"🥒",name:"cucumber",category:"food",keywords:["cucumber","green","vegetable","vert"]},{emoji:"🥬",name:"leafy greens",category:"food",keywords:["lettuce","greens","salad"]},{emoji:"🥦",name:"broccoli",category:"food",keywords:["broccoli","green","vegetable","vert"]},{emoji:"🧄",name:"garlic",category:"food",keywords:["garlic","flavor","cooking"]},{emoji:"🧅",name:"onion",category:"food",keywords:["onion","cry","cooking","pleurer"]},{emoji:"🍄",name:"mushroom",category:"food",keywords:["mushroom","fungi","cooking"]},{emoji:"🥜",name:"peanuts",category:"food",keywords:["peanuts","nuts","snack"]},{emoji:"🌰",name:"chestnut",category:"food",keywords:["chestnut","nut","autumn"]},{emoji:"🍞",name:"bread",category:"food",keywords:["bread","loaf","carbs"]},{emoji:"🥐",name:"croissant",category:"food",keywords:["croissant","french","pastry"]},{emoji:"🥖",name:"baguette bread",category:"food",keywords:["baguette","french","bread"]},{emoji:"🫓",name:"flatbread",category:"food",keywords:["flatbread","bread","thin"]},{emoji:"🥨",name:"pretzel",category:"food",keywords:["pretzel","twisted","snack"]},{emoji:"🥯",name:"bagel",category:"food",keywords:["bagel","round","breakfast"]},{emoji:"🥞",name:"pancakes",category:"food",keywords:["pancakes","breakfast","syrup"]},{emoji:"🧇",name:"waffle",category:"food",keywords:["waffle","breakfast","squares"]},{emoji:"🧀",name:"cheese wedge",category:"food",keywords:["cheese","dairy","yellow","jaune"]},{emoji:"🍖",name:"meat on bone",category:"food",keywords:["meat","bone","protein"]},{emoji:"🍗",name:"poultry leg",category:"food",keywords:["chicken","leg","meat"]},{emoji:"🥩",name:"cut of meat",category:"food",keywords:["steak","meat","red","rouge"]},{emoji:"🥓",name:"bacon",category:"food",keywords:["bacon","pork","breakfast"]},{emoji:"🍔",name:"hamburger",category:"food",keywords:["burger","hamburger","fast food","nourriture"]},{emoji:"🍟",name:"french fries",category:"food",keywords:["fries","potato","fast food","nourriture"]},{emoji:"🍕",name:"pizza",category:"food",keywords:["pizza","slice","italian"]},{emoji:"🌭",name:"hot dog",category:"food",keywords:["hot dog","sausage","fast food","chien","nourriture"]},{emoji:"🥪",name:"sandwich",category:"food",keywords:["sandwich","bread","lunch"]},{emoji:"🌮",name:"taco",category:"food",keywords:["taco","mexican","shell"]},{emoji:"🌯",name:"burrito",category:"food",keywords:["burrito","wrap","mexican"]},{emoji:"🫔",name:"tamale",category:"food",keywords:["tamale","mexican","corn"]},{emoji:"🥙",name:"stuffed flatbread",category:"food",keywords:["pita","flatbread","stuffed"]},{emoji:"🧆",name:"falafel",category:"food",keywords:["falafel","middle eastern","chickpea"]},{emoji:"🥚",name:"egg",category:"food",keywords:["egg","protein","breakfast"]},{emoji:"🍳",name:"cooking",category:"food",keywords:["cooking","frying pan","egg"]},{emoji:"🥘",name:"shallow pan of food",category:"food",keywords:["paella","pan","cooking"]},{emoji:"🍲",name:"pot of food",category:"food",keywords:["stew","pot","cooking"]},{emoji:"🫕",name:"fondue",category:"food",keywords:["fondue","cheese","pot"]},{emoji:"🥣",name:"bowl with spoon",category:"food",keywords:["bowl","cereal","soup"]},{emoji:"🥗",name:"green salad",category:"food",keywords:["salad","healthy","greens"]},{emoji:"🍿",name:"popcorn",category:"food",keywords:["popcorn","movie","snack"]},{emoji:"🧈",name:"butter",category:"food",keywords:["butter","dairy","spread"]},{emoji:"🧂",name:"salt",category:"food",keywords:["salt","seasoning","white","blanc"]},{emoji:"🥫",name:"canned food",category:"food",keywords:["can","canned","preserved"]},{emoji:"🍱",name:"bento box",category:"food",keywords:["bento","japanese","lunch box"]},{emoji:"🍘",name:"rice cracker",category:"food",keywords:["rice","cracker","japanese"]},{emoji:"🍙",name:"rice ball",category:"food",keywords:["rice ball","onigiri","japanese"]},{emoji:"🍚",name:"cooked rice",category:"food",keywords:["rice","cooked","bowl"]},{emoji:"🍛",name:"curry rice",category:"food",keywords:["curry","rice","spicy"]},{emoji:"🍜",name:"steaming bowl",category:"food",keywords:["ramen","noodles","soup"]},{emoji:"🍝",name:"spaghetti",category:"food",keywords:["spaghetti","pasta","italian"]},{emoji:"🍠",name:"roasted sweet potato",category:"food",keywords:["sweet potato","roasted","orange"]},{emoji:"🍢",name:"oden",category:"food",keywords:["oden","japanese","skewer"]},{emoji:"🍣",name:"sushi",category:"food",keywords:["sushi","japanese","fish"]},{emoji:"🍤",name:"fried shrimp",category:"food",keywords:["shrimp","fried","tempura"]},{emoji:"🍥",name:"fish cake with swirl",category:"food",keywords:["fish cake","japanese","swirl"]},{emoji:"🥮",name:"moon cake",category:"food",keywords:["moon cake","chinese","festival","lune"]},{emoji:"🍡",name:"dango",category:"food",keywords:["dango","japanese","sweet"]},{emoji:"🥟",name:"dumpling",category:"food",keywords:["dumpling","chinese","steamed"]},{emoji:"🥠",name:"fortune cookie",category:"food",keywords:["fortune cookie","chinese","luck"]},{emoji:"🥡",name:"takeout box",category:"food",keywords:["takeout","chinese","box"]},{emoji:"🦀",name:"crab",category:"food",keywords:["crab","seafood","claws"]},{emoji:"🦞",name:"lobster",category:"food",keywords:["lobster","seafood","red","rouge"]},{emoji:"🦐",name:"shrimp",category:"food",keywords:["shrimp","seafood","small"]},{emoji:"🦑",name:"squid",category:"food",keywords:["squid","seafood","tentacles"]},{emoji:"🦪",name:"oyster",category:"food",keywords:["oyster","seafood","shell"]},{emoji:"🍦",name:"soft ice cream",category:"food",keywords:["ice cream","soft serve","cone"]},{emoji:"🍧",name:"shaved ice",category:"food",keywords:["shaved ice","snow cone","cold"]},{emoji:"🍨",name:"ice cream",category:"food",keywords:["ice cream","dessert","cold"]},{emoji:"🍩",name:"doughnut",category:"food",keywords:["donut","doughnut","sweet"]},{emoji:"🍪",name:"cookie",category:"food",keywords:["cookie","sweet","baked"]},{emoji:"🎂",name:"birthday cake",category:"food",keywords:["cake","birthday","celebration","fête"]},{emoji:"🍰",name:"shortcake",category:"food",keywords:["cake","slice","dessert"]},{emoji:"🧁",name:"cupcake",category:"food",keywords:["cupcake","muffin","sweet"]},{emoji:"🥧",name:"pie",category:"food",keywords:["pie","dessert","slice"]},{emoji:"🍫",name:"chocolate bar",category:"food",keywords:["chocolate","bar","sweet"]},{emoji:"🍬",name:"candy",category:"food",keywords:["candy","sweet","wrapper"]},{emoji:"🍭",name:"lollipop",category:"food",keywords:["lollipop","candy","stick"]},{emoji:"🍮",name:"custard",category:"food",keywords:["custard","pudding","dessert"]},{emoji:"🍯",name:"honey pot",category:"food",keywords:["honey","sweet","bee"]},{emoji:"🍼",name:"baby bottle",category:"food",keywords:["bottle","baby","milk"]},{emoji:"🥛",name:"glass of milk",category:"food",keywords:["milk","glass","dairy"]},{emoji:"☕",name:"hot beverage",category:"food",keywords:["coffee","tea","hot","café"]},{emoji:"🫖",name:"teapot",category:"food",keywords:["teapot","tea","hot"]},{emoji:"🍵",name:"teacup without handle",category:"food",keywords:["tea","green tea","cup","vert"]},{emoji:"🍶",name:"sake",category:"food",keywords:["sake","japanese","alcohol"]},{emoji:"🍾",name:"bottle with popping cork",category:"food",keywords:["champagne","celebration","cork","fête"]},{emoji:"🍷",name:"wine glass",category:"food",keywords:["wine","glass","alcohol"]},{emoji:"🍸",name:"cocktail glass",category:"food",keywords:["cocktail","martini","alcohol"]},{emoji:"🍹",name:"tropical drink",category:"food",keywords:["tropical","cocktail","umbrella"]},{emoji:"🍺",name:"beer mug",category:"food",keywords:["beer","mug","alcohol"]},{emoji:"🍻",name:"clinking beer mugs",category:"food",keywords:["beer","cheers","celebration","fête"]},{emoji:"🥂",name:"clinking glasses",category:"food",keywords:["champagne","cheers","celebration","fête"]},{emoji:"🥃",name:"tumbler glass",category:"food",keywords:["whiskey","tumbler","alcohol"]},{emoji:"🫗",name:"pouring liquid",category:"food",keywords:["pour","liquid","drink","boisson"]},{emoji:"🥤",name:"cup with straw",category:"food",keywords:["soda","straw","drink","boisson"]},{emoji:"🧋",name:"bubble tea",category:"food",keywords:["bubble tea","boba","drink","boisson"]},{emoji:"🧃",name:"beverage box",category:"food",keywords:["juice box","drink","straw","boisson"]},{emoji:"🧉",name:"mate",category:"food",keywords:["mate","tea","south american"]},{emoji:"🧊",name:"ice",category:"food",keywords:["ice","cold","cube"]},{emoji:"⚽",name:"soccer ball",category:"activities",keywords:["soccer","football","sport"]},{emoji:"🏀",name:"basketball",category:"activities",keywords:["basketball","sport"]},{emoji:"🏈",name:"american football",category:"activities",keywords:["football","sport"]},{emoji:"⚾",name:"baseball",category:"activities",keywords:["baseball","sport"]},{emoji:"🥎",name:"softball",category:"activities",keywords:["softball","sport"]},{emoji:"🎾",name:"tennis",category:"activities",keywords:["tennis","sport"]},{emoji:"🚗",name:"automobile",category:"travel",keywords:["car","vehicle"]},{emoji:"🚕",name:"taxi",category:"travel",keywords:["taxi","car"]},{emoji:"🚙",name:"sport utility vehicle",category:"travel",keywords:["suv","car"]},{emoji:"🚌",name:"bus",category:"travel",keywords:["bus","vehicle"]},{emoji:"🚎",name:"trolleybus",category:"travel",keywords:["trolley","bus"]},{emoji:"🏎️",name:"racing car",category:"travel",keywords:["race","car","fast"]},{emoji:"💡",name:"light bulb",category:"objects",keywords:["idea","light","bulb","lumière"]},{emoji:"🔋",name:"battery",category:"objects",keywords:["battery","power"]},{emoji:"🖥️",name:"desktop computer",category:"objects",keywords:["computer","desktop","ordinateur"]},{emoji:"💻",name:"laptop",category:"objects",keywords:["laptop","computer","ordinateur"]},{emoji:"📱",name:"mobile phone",category:"objects",keywords:["phone","mobile"]},{emoji:"☎️",name:"telephone",category:"objects",keywords:["phone","telephone"]},{emoji:"❤️",name:"red heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🧡",name:"orange heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💛",name:"yellow heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💚",name:"green heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💙",name:"blue heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💜",name:"purple heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🖤",name:"black heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🤍",name:"white heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🏁",name:"chequered flag",category:"flags",keywords:["flag","race","finish","drapeau"]},{emoji:"🚩",name:"triangular flag",category:"flags",keywords:["flag","warning","drapeau","attention"]},{emoji:"🏳️",name:"white flag",category:"flags",keywords:["flag","surrender","drapeau"]},{emoji:"🏴",name:"black flag",category:"flags",keywords:["flag","pirate","drapeau"]},{emoji:"🏳️‍🌈",name:"rainbow flag",category:"flags",keywords:["flag","rainbow","pride","drapeau","arc-en-ciel"]},{emoji:"🔥",name:"fire",category:"symbols",keywords:["fire","feu"]},{emoji:"✨",name:"sparkles",category:"symbols",keywords:["sparkle","étoile"]},{emoji:"⭐",name:"white medium star",category:"travel",keywords:["star","étoile"]},{emoji:"🎯",name:"direct hit",category:"symbols",keywords:["target","cible","objectif"]},{emoji:"🚀",name:"rocket",category:"symbols",keywords:["rocket","fusée","lancement"]},{emoji:"✅",name:"white heavy check mark",category:"symbols",keywords:["check","done","terminé"]},{emoji:"❌",name:"cross mark",category:"symbols",keywords:["cross","erreur"]},{emoji:"⚠️",name:"warning sign",category:"symbols",keywords:["warning","attention"]},{emoji:"📌",name:"pushpin",category:"objects",keywords:["pin","épingle"]},{emoji:"📝",name:"memo",category:"objects",keywords:["note","texte","écrire"]},{emoji:"📁",name:"file folder",category:"objects",keywords:["folder","dossier"]},{emoji:"📅",name:"calendar",category:"objects",keywords:["calendar","calendrier"]},{emoji:"📊",name:"bar chart",category:"objects",keywords:["chart","graphique"]},{emoji:"🔗",name:"link symbol",category:"objects",keywords:["link","lien"]},{emoji:"🔒",name:"lock",category:"objects",keywords:["lock","verrou"]},{emoji:"💬",name:"speech balloon",category:"activities",keywords:["chat","discussion"]},{emoji:"🤖",name:"robot face",category:"smileys",keywords:["robot","ai","ia"]},{emoji:"🌍",name:"earth globe europe-africa",category:"travel",keywords:["world","monde"]},{emoji:"🎉",name:"party popper",category:"activities",keywords:["party","fête"]},{emoji:"🏆",name:"trophy",category:"activities",keywords:["trophy","trophée","victoire"]},{emoji:"🫠",name:"melting face",category:"smileys",keywords:["melting","face","visage"]},{emoji:"😕",name:"confused face",category:"smileys",keywords:["confused","face","confus","visage"]},{emoji:"🫤",name:"face with diagonal mouth",category:"smileys",keywords:["face","with","diagonal","mouth","visage"]},{emoji:"😟",name:"worried face",category:"smileys",keywords:["worried","face","inquiet","visage"]},{emoji:"🙁",name:"slightly frowning face",category:"smileys",keywords:["slightly","frowning","face","visage"]},{emoji:"☹️",name:"white frowning face",category:"smileys",keywords:["white","frowning","face","blanc","visage"]},{emoji:"😮",name:"face with open mouth",category:"smileys",keywords:["face","with","open","mouth","visage"]},{emoji:"😯",name:"hushed face",category:"smileys",keywords:["hushed","face","visage"]},{emoji:"😲",name:"astonished face",category:"smileys",keywords:["astonished","face","visage"]},{emoji:"😳",name:"flushed face",category:"smileys",keywords:["flushed","face","visage"]},{emoji:"🥺",name:"face with pleading eyes",category:"smileys",keywords:["face","with","pleading","eyes","visage","supplier","yeux"]},{emoji:"🥹",name:"face holding back tears",category:"smileys",keywords:["face","holding","back","tears","visage"]},{emoji:"😦",name:"frowning face with open mouth",category:"smileys",keywords:["frowning","face","with","open","mouth","visage"]},{emoji:"😧",name:"anguished face",category:"smileys",keywords:["anguished","face","visage"]},{emoji:"😨",name:"fearful face",category:"smileys",keywords:["fearful","face","effrayé","visage"]},{emoji:"😰",name:"face with open mouth and cold sweat",category:"smileys",keywords:["face","with","open","mouth","and","cold","sweat","visage"]},{emoji:"😥",name:"disappointed but relieved face",category:"smileys",keywords:["disappointed","but","relieved","face","visage"]},{emoji:"😢",name:"crying face",category:"smileys",keywords:["crying","face","visage"]},{emoji:"😭",name:"loudly crying face",category:"smileys",keywords:["loudly","crying","face","visage"]},{emoji:"😱",name:"face screaming in fear",category:"smileys",keywords:["face","screaming","in","fear","visage"]},{emoji:"😖",name:"confounded face",category:"smileys",keywords:["confounded","face","visage"]},{emoji:"😣",name:"persevering face",category:"smileys",keywords:["persevering","face","visage"]},{emoji:"😞",name:"disappointed face",category:"smileys",keywords:["disappointed","face","visage"]},{emoji:"😓",name:"face with cold sweat",category:"smileys",keywords:["face","with","cold","sweat","visage"]},{emoji:"😩",name:"weary face",category:"smileys",keywords:["weary","face","fatigué","visage"]},{emoji:"😫",name:"tired face",category:"smileys",keywords:["tired","face","fatigué","visage"]},{emoji:"🥱",name:"yawning face",category:"smileys",keywords:["yawning","face","visage"]},{emoji:"😤",name:"face with look of triumph",category:"smileys",keywords:["face","with","look","of","triumph","visage"]},{emoji:"😡",name:"pouting face",category:"smileys",keywords:["pouting","face","visage"]},{emoji:"😠",name:"angry face",category:"smileys",keywords:["angry","face","colère","visage"]},{emoji:"🤬",name:"serious face with symbols covering mouth",category:"smileys",keywords:["serious","face","with","symbols","covering","mouth","visage"]},{emoji:"😈",name:"smiling face with horns",category:"smileys",keywords:["smiling","face","with","horns","visage"]},{emoji:"👿",name:"imp",category:"smileys",keywords:["imp"]},{emoji:"💀",name:"skull",category:"smileys",keywords:["skull","crâne"]},{emoji:"☠️",name:"skull and crossbones",category:"smileys",keywords:["skull","and","crossbones","crâne"]},{emoji:"💩",name:"pile of poo",category:"smileys",keywords:["pile","of","poo"]},{emoji:"🤡",name:"clown face",category:"smileys",keywords:["clown","face","visage"]},{emoji:"👻",name:"ghost",category:"smileys",keywords:["ghost","fantôme"]},{emoji:"👽",name:"extraterrestrial alien",category:"symbols",keywords:["extraterrestrial","alien"]},{emoji:"👾",name:"alien monster",category:"symbols",keywords:["alien","monster"]},{emoji:"😺",name:"smiling cat face with open mouth",category:"smileys",keywords:["smiling","cat","face","with","open","mouth","chat","visage"]},{emoji:"😸",name:"grinning cat face with smiling eyes",category:"smileys",keywords:["grinning","cat","face","with","smiling","eyes","chat","visage","yeux"]},{emoji:"😹",name:"cat face with tears of joy",category:"smileys",keywords:["cat","face","with","tears","of","joy","chat","visage","joie"]},{emoji:"😻",name:"smiling cat face with heart-shaped eyes",category:"smileys",keywords:["smiling","cat","face","with","heart-shaped","eyes","chat","visage","yeux"]},{emoji:"😼",name:"cat face with wry smile",category:"smileys",keywords:["cat","face","with","wry","smile","chat","visage","sourire"]},{emoji:"😽",name:"kissing cat face with closed eyes",category:"smileys",keywords:["kissing","cat","face","with","closed","eyes","chat","visage","yeux"]},{emoji:"🙀",name:"weary cat face",category:"smileys",keywords:["weary","cat","face","fatigué","chat","visage"]},{emoji:"😿",name:"crying cat face",category:"smileys",keywords:["crying","cat","face","chat","visage"]},{emoji:"😾",name:"pouting cat face",category:"smileys",keywords:["pouting","cat","face","chat","visage"]},{emoji:"💋",name:"kiss mark",category:"symbols",keywords:["kiss","mark","bisou"]},{emoji:"💌",name:"love letter",category:"symbols",keywords:["love","letter","amour"]},{emoji:"💘",name:"heart with arrow",category:"smileys",keywords:["heart","with","arrow","cœur"]},{emoji:"💝",name:"heart with ribbon",category:"smileys",keywords:["heart","with","ribbon","cœur"]},{emoji:"💖",name:"sparkling heart",category:"smileys",keywords:["sparkling","heart","cœur"]},{emoji:"💗",name:"growing heart",category:"smileys",keywords:["growing","heart","cœur"]},{emoji:"💓",name:"beating heart",category:"smileys",keywords:["beating","heart","cœur"]},{emoji:"💞",name:"revolving hearts",category:"smileys",keywords:["revolving","hearts"]},{emoji:"💕",name:"two hearts",category:"smileys",keywords:["two","hearts"]},{emoji:"💟",name:"heart decoration",category:"smileys",keywords:["heart","decoration","cœur"]},{emoji:"❣️",name:"heavy heart exclamation mark ornament",category:"smileys",keywords:["heavy","heart","exclamation","mark","ornament","cœur"]},{emoji:"💔",name:"broken heart",category:"smileys",keywords:["broken","heart","cœur"]},{emoji:"❤️‍🔥",name:"heavy black heart fire",category:"smileys",keywords:["heavy","black","heart","fire","noir","cœur","feu"]},{emoji:"❤️‍🩹",name:"heavy black heart adhesive bandage",category:"smileys",keywords:["heavy","black","heart","adhesive","bandage","noir","cœur"]},{emoji:"🩷",name:"pink heart",category:"smileys",keywords:["pink","heart","rose","cœur"]},{emoji:"🩵",name:"light blue heart",category:"smileys",keywords:["light","blue","heart","lumière","bleu","cœur"]},{emoji:"🤎",name:"brown heart",category:"smileys",keywords:["brown","heart","marron","cœur"]},{emoji:"🩶",name:"grey heart",category:"smileys",keywords:["grey","heart","gris","cœur"]},{emoji:"💯",name:"hundred points symbol",category:"symbols",keywords:["hundred","points","symbol"]},{emoji:"💢",name:"anger symbol",category:"symbols",keywords:["anger","symbol"]},{emoji:"💥",name:"collision symbol",category:"symbols",keywords:["collision","symbol"]},{emoji:"💫",name:"dizzy symbol",category:"symbols",keywords:["dizzy","symbol"]},{emoji:"💦",name:"splashing sweat symbol",category:"symbols",keywords:["splashing","sweat","symbol"]},{emoji:"💨",name:"dash symbol",category:"symbols",keywords:["dash","symbol"]},{emoji:"💭",name:"thought balloon",category:"activities",keywords:["thought","balloon","ballon"]},{emoji:"💤",name:"sleeping symbol",category:"symbols",keywords:["sleeping","symbol","dormir"]},{emoji:"🫶",name:"heart hands",category:"smileys",keywords:["heart","hands","cœur"]},{emoji:"🫰",name:"hand with index finger and thumb crossed",category:"people",keywords:["hand","with","index","finger","and","thumb","crossed","main","pouce"]},{emoji:"🎊",name:"confetti ball",category:"activities",keywords:["confetti","ball"]},{emoji:"🎈",name:"balloon",category:"activities",keywords:["balloon","ballon"]},{emoji:"🎁",name:"wrapped present",category:"symbols",keywords:["wrapped","present"]},{emoji:"🥇",name:"first place medal",category:"activities",keywords:["first","place","medal"]},{emoji:"🌟",name:"glowing star",category:"travel",keywords:["glowing","star","étoile"]},{emoji:"⚡",name:"high voltage sign",category:"symbols",keywords:["high","voltage","sign"]},{emoji:"🌈",name:"rainbow",category:"travel",keywords:["rainbow","arc-en-ciel"]},{emoji:"☀️",name:"black sun with rays",category:"travel",keywords:["black","sun","with","rays","noir","soleil"]},{emoji:"🌙",name:"crescent moon",category:"travel",keywords:["crescent","moon","lune"]},{emoji:"🎵",name:"musical note",category:"symbols",keywords:["musical","note","musique"]},{emoji:"🎶",name:"multiple musical notes",category:"symbols",keywords:["multiple","musical","notes","musique"]},{emoji:"🎨",name:"artist palette",category:"activities",keywords:["artist","palette"]},{emoji:"🎮",name:"video game",category:"activities",keywords:["video","game"]},{emoji:"📚",name:"books",category:"objects",keywords:["books","livres"]},{emoji:"🔑",name:"key",category:"objects",keywords:["key","clé"]},{emoji:"❓",name:"black question mark ornament",category:"symbols",keywords:["black","question","mark","ornament","noir"]},{emoji:"❗",name:"heavy exclamation mark symbol",category:"symbols",keywords:["heavy","exclamation","mark","symbol"]},{emoji:"🔔",name:"bell",category:"objects",keywords:["bell","cloche"]},{emoji:"♻️",name:"black universal recycling symbol",category:"symbols",keywords:["black","universal","recycling","symbol","noir"]},{emoji:"💎",name:"gem stone",category:"symbols",keywords:["gem","stone"]}],Bi=Array.from(Iy.reduce((e,o)=>{const r=e.get(o.emoji);return e.set(o.emoji,{...o,keywords:Array.from(new Set([...(r==null?void 0:r.keywords)||[],...o.keywords]))}),e},new Map).values()),_i=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],za=e=>e.toLowerCase().replace(/œ/g,"oe").replace(/æ/g,"ae").normalize("NFD").replace(/[\u0300-\u036f]/g,""),Ry=e=>e&&typeof e.emoji=="string"&&typeof e.name=="string"&&_i.includes(e.category)&&Array.isArray(e.keywords)&&e.keywords.every(o=>typeof o=="string"),Oi=e=>{const{value:o,defaultValue:r="",onChange:n,onEmojiSelect:a,isOpen:l,onOpen:i,onClose:u,closeOnSelect:c=!0,maxRecentEmojis:d=16,mode:g="picker",showRecentEmojis:p=g!=="reaction",enabledCategories:h=_i,customEmojis:f=[],isDisabled:y,isReadOnly:b}=e,[x,C]=m.useState(!1),k=l??x,[w,v]=m.useState(r),S=o??w,[I,j]=m.useState(""),[R,z]=m.useState(h.find(P=>P!=="recent")||"recent"),[E,W]=m.useState([]),[F,T]=m.useState(g!=="reaction"),M=m.useRef(null),V=m.useRef(null),A={...$i,...e.labels},H=m.useMemo(()=>Array.from(new Map([...Bi,...f].map(P=>[P.emoji,P])).values()),[f]),L=m.useMemo(()=>(e.quickEmojis??Li).map(P=>H.find(B=>B.emoji===P)??{emoji:P,name:P,category:"symbols",keywords:[]}),[H,e.quickEmojis]),O=m.useMemo(()=>{const P=H.filter(B=>h.includes(B.category));if(I.trim()){const B=za(I.trim());return P.filter($=>za(`${$.emoji} ${$.name} ${$.keywords.join(" ")}`).includes(B))}return R==="recent"?E.filter(B=>h.includes(B.category)):P.filter(B=>B.category===R)},[H,R,E,I,h]);m.useEffect(()=>{if(!(!p||typeof localStorage>"u"))try{const P=JSON.parse(localStorage.getItem("emojiPicker-recentEmojis")||"[]");Array.isArray(P)&&W(P.filter(Ry).slice(0,d))}catch{}},[p,d]),m.useEffect(()=>{h.includes(R)||z(h.find(P=>P!=="recent")||"recent")},[h,R]);const _=m.useCallback(()=>{C(!1),u==null||u()},[u]),q=m.useCallback(()=>{if(!(y||b)){if(k){_();return}C(!0),j(""),T(g!=="reaction"),z(p&&E.length&&h.includes("recent")?"recent":h.find(P=>P!=="recent")||"recent"),i==null||i()}},[k,y,b,_,g,p,E.length,h,i]),Y=m.useCallback(P=>{if(!(y||b)){if(v(P.emoji),p){const B=[P,...E.filter($=>$.emoji!==P.emoji)].slice(0,Math.max(0,d));if(W(B),typeof localStorage<"u")try{localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(B))}catch{}}n==null||n(P.emoji),a==null||a(P),c&&_()}},[y,b,p,E,d,n,a,c,_]);return m.useEffect(()=>{if(!k||typeof document>"u"||typeof document.addEventListener!="function")return;const P=B=>{var $,D;($=V.current)!=null&&$.contains&&((D=M.current)!=null&&D.contains)&&!V.current.contains(B.target)&&!M.current.contains(B.target)&&_()};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[k,_]),{isOpen:k,selectedEmoji:S,recentEmojis:E,searchQuery:I,activeCategory:R,filteredEmojis:O,handleToggle:q,handleEmojiSelect:Y,handleSearchChange:j,handleCategoryChange:P=>{z(P),j("")},handleClose:_,triggerRef:M,dropdownRef:V,expanded:F,setExpanded:T,quickEmojiData:L,text:A}},ho={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"320px",maxHeight:"400px",overflow:"hidden"},categoryTabs:{display:"flex",flexDirection:"row",flexWrap:"wrap",borderBottom:"1px solid color-gray-100",marginBottom:"12px",overflowX:"auto"},categoryTab:{padding:"8px 12px",cursor:"pointer",borderBottom:"2px solid transparent",transition:"all 0.2s ease-in-out",fontSize:"14px",fontWeight:"500",color:"color-gray-600",whiteSpace:"nowrap",borderRadius:"8px 8px 0 0"},emojiGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"4px",maxHeight:"240px",overflowY:"auto",padding:"4px",color:"color-black"},emoji:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:6,fontSize:"20px",transition:"all 0.2s ease-in-out"}},Fy={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},zy={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},My={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Wy={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},Ni=({id:e,name:o,label:r,placeholder:n,helperText:a,views:l={},size:i="md",shape:u="default",variant:c="default",error:d=!1,isDisabled:g=!1,isReadOnly:p=!1,showSearch:h=!0,showCategories:f=!0,showRecentEmojis:y=!0,enabledCategories:b=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:x,selectedEmoji:C,recentEmojis:k,searchQuery:w,activeCategory:v,filteredEmojis:S,handleToggle:I,handleEmojiSelect:j,handleSearchChange:R,handleCategoryChange:z,handleClose:E,triggerRef:W,dropdownRef:F,mode:T="picker",trigger:M,quickEmojis:V,selectedEmojis:A=[],expanded:H,setExpanded:L,quickEmojiData:O,text:_,labels:q,onChange:Y,onOpen:P,onClose:B,onEmojiSelect:$,customEmojis:D,closeOnSelect:N,maxRecentEmojis:G,value:K,defaultValue:re,...oe})=>{const ie=m.useId(),X=`${e||ie}-panel`,ae=m.useRef(!1),pe=m.useCallback(ee=>{var me;F.current=ee,(me=ee==null?void 0:ee.querySelector("input,button"))==null||me.focus({preventScroll:!0})},[F]),[ue,ke]=m.useState({top:0,left:0,width:320,maxHeight:400}),ce=b.filter(ee=>ee!=="recent"||y&&k.length>0);m.useLayoutEffect(()=>{var me,J,te,U,Q;if(!x){ae.current&&(document.activeElement===document.body||(me=F.current)!=null&&me.contains(document.activeElement))&&((J=W.current)==null||J.focus({preventScroll:!0})),ae.current=!1;return}const ee=()=>{var Et;const ne=(Et=W.current)==null?void 0:Et.getBoundingClientRect();if(!ne)return;const se=window.visualViewport,ge=Math.min(320,((se==null?void 0:se.width)??window.innerWidth)-16),be=(se==null?void 0:se.offsetLeft)??0,he=(se==null?void 0:se.offsetTop)??0,xe=he+((se==null?void 0:se.height)??window.innerHeight)-8;if(ne.bottom<he||ne.top>xe){E();return}const ze=H?400:64,Be=ne.top-he-16,zo=xe-ne.bottom-8,Wt=zo<ze&&Be>zo,ao=Math.min(ze,Math.max(64,Wt?Be:zo));ke({width:ge,maxHeight:ao,left:Math.max(be+8,Math.min(ne.left,be+((se==null?void 0:se.width)??window.innerWidth)-ge-8)),top:Wt?Math.max(he+8,ne.top-ao-8):ne.bottom+8})};return ee(),ae.current||(U=(te=F.current)==null?void 0:te.querySelector("input,button"))==null||U.focus({preventScroll:!0}),ae.current=!0,window.addEventListener("scroll",ee,!0),window.addEventListener("resize",ee),(Q=window.visualViewport)==null||Q.addEventListener("resize",ee),()=>{var ne;window.removeEventListener("scroll",ee,!0),window.removeEventListener("resize",ee),(ne=window.visualViewport)==null||ne.removeEventListener("resize",ee)}},[x,H]);const le=ee=>j(ee),de=(ee,me=!1)=>t.jsx(s.View,{as:"button",type:"button","data-emoji-choice":ee.emoji,"aria-label":ee.name,"aria-pressed":T==="reaction"?A.includes(ee.emoji):C===ee.emoji,disabled:g||p,...ho.emoji,width:40,height:44,flex:me?1:void 0,borderWidth:0,backgroundColor:A.includes(ee.emoji)?"color-blue-50":"transparent",_hover:{backgroundColor:"color-gray-100"},_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"},...l.emoji,onClick:()=>le(ee),title:ee.name,children:ee.emoji},ee.emoji);return t.jsxs(s.View,{id:e,...ho.container,...l.container,...oe,children:[r&&t.jsx(s.Text,{marginBottom:4,...l.label,children:r}),t.jsx(s.View,{ref:W,as:"button",type:"button",name:o,disabled:g||p,"aria-label":oe["aria-label"]||r||(T==="reaction"?_.reaction:_.select),"aria-haspopup":"dialog","aria-expanded":x,"aria-controls":x?X:void 0,...ho.trigger,...Fy[i],...zy[u],...My[c],borderColor:d?"theme-error":"color-gray-200",opacity:g?.6:1,_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"},...l.trigger,onClick:I,children:M??t.jsxs(s.Horizontal,{gap:8,children:[t.jsx(s.Text,{children:T==="reaction"?"☺ +":C||n||_.select}),T!=="reaction"&&t.jsx(s.Text,{"aria-hidden":"true",children:x?"▴":"▾"})]})}),x&&t.jsx(Ct,{children:t.jsxs(s.View,{ref:pe,id:X,role:"dialog","aria-label":T==="reaction"?_.reaction:_.select,...ho.dropdown,...l.dropdown,position:"fixed",top:ue.top,left:ue.left,right:"auto",width:ue.width,minWidth:0,maxHeight:ue.maxHeight,overflowY:"auto",padding:T==="reaction"&&!H?8:12,zIndex:1100,onKeyDown:ee=>{var ne,se,ge,be,he,xe;if(ee.key==="Escape"){ee.preventDefault(),ee.stopPropagation(),E(),(ne=W.current)==null||ne.focus();return}const me=Array.from(((se=F.current)==null?void 0:se.querySelectorAll("button:not(:disabled)"))||[]),J=me.indexOf(document.activeElement);if(ee.key==="Tab"){(ee.shiftKey&&J<=0||!ee.shiftKey&&J===me.length-1)&&E();return}if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(ee.key)||!me.length||ee.target.tagName==="INPUT"&&ee.key!=="ArrowDown")return;ee.preventDefault();const te=(ge=document.activeElement)==null?void 0:ge.closest("[data-emoji-grid]"),U=["ArrowUp","ArrowDown"].includes(ee.key)&&te?8:1,Q=ee.key==="Home"?0:ee.key==="End"?me.length-1:(J+(["ArrowLeft","ArrowUp"].includes(ee.key)?-U:U)+me.length)%me.length;(be=me[Q])==null||be.focus(),(xe=(he=me[Q])==null?void 0:he.scrollIntoView)==null||xe.call(he,{block:"nearest"})},children:[T==="reaction"&&t.jsxs(s.Horizontal,{gap:2,children:[O.map(ee=>de(ee,!0)),t.jsx(s.View,{as:"button",type:"button",disabled:g||p,"aria-label":_.more,"aria-expanded":H,minWidth:40,minHeight:44,borderWidth:0,borderRadius:8,onClick:()=>L(!H),children:"+"})]}),H&&t.jsxs(t.Fragment,{children:[h&&t.jsx(s.View,{marginBottom:8,...l.searchInput,children:t.jsx(Pe,{value:w,onChange:R,placeholder:_.search,"aria-label":_.search,isDisabled:g||p,size:"sm"})}),f&&t.jsx(s.View,{role:"tablist","aria-label":_.select,...ho.categoryTabs,...l.categoryTabs,children:ce.map(ee=>t.jsx(s.View,{as:"button",type:"button",role:"tab","aria-label":_[ee],"aria-selected":ee===v,disabled:g||p,title:_[ee],...ho.categoryTab,borderWidth:0,minHeight:44,padding:8,backgroundColor:ee===v?"color-blue-50":"transparent",...l.categoryTab,onClick:()=>z(ee),children:Wy[ee]},ee))}),t.jsxs(s.View,{"data-emoji-grid":"true",role:"group","aria-label":_.select,...ho.emojiGrid,gridTemplateColumns:"repeat(8, minmax(0, 1fr))",...l.emojiGrid,children:[S.map(ee=>de(ee)),!S.length&&t.jsx(s.Text,{gridColumn:"1 / -1",children:w?_.empty:_.categoryEmpty})]})]})]})}),a&&t.jsx(s.Text,{color:d?"theme-error":"theme-muted",...l.helperText,children:a})]})},Ey=e=>{const o=Fe(e),r={...e,value:o.value??e.value??e.defaultValue,onChange:o.onChange},n=Oi(r),a=l=>{n.handleEmojiSelect(l)};return t.jsx(Ni,{...n,...r,handleEmojiSelect:a})},Ay=Ey,Hy=({files:e,onRemove:o,maxHeight:r="120px",views:n={}})=>{if(e.length===0)return null;const a=m.useCallback(l=>l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(1)} KB`:`${(l/(1024*1024)).toFixed(1)} MB`,[]);return t.jsx(s.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:r,overflowY:"auto",...n==null?void 0:n.container,children:e.map((l,i)=>{const u=l.url||"",c=l.type.startsWith("image/"),d=l.type.startsWith("video/"),g=l.type.startsWith("audio/");return t.jsx(s.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",position:"relative",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...n==null?void 0:n.item,children:t.jsxs(He,{children:[t.jsx(He.Trigger,{children:t.jsxs(s.View,{position:"relative",children:[c&&u&&t.jsx(s.Image,{src:u,alt:l.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),d&&u&&t.jsx(s.View,{as:"video",src:u,alt:l.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),g&&t.jsx(s.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:t.jsx(Yo,{widthHeight:24,color:"color-black"})}),!c&&!d&&!g&&t.jsx(s.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:t.jsx(ko,{widthHeight:24,color:"color-black"})}),o&&t.jsx(s.Button,{position:"absolute",top:"-4px",right:"-4px",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"50%",backgroundColor:"color-red-500",color:"white",fontSize:14,fontWeight:"bold",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"2px solid white",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"#DC2626"},onClick:p=>{p.stopPropagation(),o(i)},"aria-label":`Remove ${l.name}`,children:"×"})]})}),t.jsxs(He.Content,{children:[c&&u&&t.jsx(s.Image,{src:u,alt:l.name,maxWidth:"300px"}),d&&u&&t.jsx(s.View,{as:"video",src:u,controls:!0,maxWidth:"300px"}),g&&u&&t.jsx(s.View,{as:"audio",src:u,controls:!0,width:"100%"}),t.jsxs(s.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[l.name," (",a(l.size),")"]})]})]})},i)})})},Vy=e=>{const o=ve("slider",e),r=zi(o);return t.jsx(Mi,{...o,...r})},qi=Vy,Py=({url:e,type:o,name:r,onOpen:n})=>{const a=o.toLowerCase(),l=a.startsWith("image"),i=a.startsWith("video"),u=a.startsWith("audio"),c=()=>{n&&n()};return t.jsxs(s.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:c,children:[l&&t.jsx(s.Image,{src:e,alt:r,width:"100%",height:"100%",objectFit:"cover"}),i&&t.jsx(s.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:d=>d.stopPropagation()}),u&&t.jsx(s.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:d=>d.stopPropagation()}),!l&&!i&&!u&&t.jsx(ko,{widthHeight:24,color:"color-gray-600"})]})},so=Qo.create(e=>({modals:[],onHide:o=>o,onShow:(o,r)=>({name:o,props:r}),show:(o,r={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...r,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(r=>o?{...r,modals:r.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(r=>({...r,onHide:o}))},setOnShow:o=>{e(r=>({...r,onShow:o}))}})),Dy=(e,o={},r={})=>{so.getState().show(e,o,r),so.getState().onShow(e,o)},Dn=e=>{so.getState().onHide(e),so.getState().hide(typeof e=="string"?e:void 0)},$y={square:{borderRadius:0},rounded:{borderRadius:8}},Ly={center:{justifyContent:"center",alignItems:"center"},top:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"flex-end",alignItems:"center"},bottom:{justifyContent:"center",alignItems:"flex-end"},left:{justifyContent:"flex-start",alignItems:"center"}},By={xs:12,sm:16,md:20,lg:24,xl:28},Hr={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},Ui=m.memo(({children:e,blur:o,isOpen:r=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:l="center",views:i,...u})=>{const c=m.useCallback(()=>{n||a()},[n,a]);return t.jsx(s.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:c,visibility:r?"visible":"hidden",opacity:r?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...i==null?void 0:i.container,children:t.jsx(s.View,{position:"absolute",top:0,left:0,zIndex:1e3,width:"100vw",height:"100vh",display:"flex",backgroundColor:"color-dark-50-360",backdropFilter:o?`blur(${o}px)`:void 0,transition:"background-color 0.2s ease, backdrop-filter 0.2s ease",onClick:c,...Ly[l],...u,...i==null?void 0:i.view,children:e})})}),_y={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},Oy={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},Ny=m.memo(({children:e,shadow:o,isFullScreen:r=!1,shape:n="rounded",views:a,isOpen:l=!0,position:i,...u})=>{const c=typeof document!==void 0?_y:Oy,d=m.useCallback(g=>{g&&g.stopPropagation&&g.stopPropagation()},[]);return t.jsx(s.Vertical,{cursor:"default",backgroundColor:"color-white",width:r?"100%":600,height:r?"100%":"fit-content",onClick:d,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:l?1:0,transform:l?"translateY(0)":"translateY(8px)",...o||c,...$y[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...u,...a==null?void 0:a.container,children:e})}),qy=m.memo(({children:e,buttonColor:o="theme-primary",iconSize:r="md",buttonSize:n,buttonPosition:a="right",views:l,onClose:i,...u})=>{const c=i||Dn,d=t.jsx(s.View,{onClick:()=>c(),children:t.jsx($e,{widthHeight:By[n??r],color:o})});return t.jsxs(s.Horizontal,{justifyContent:a==="none"?"center":"space-between",alignItems:"center",paddingVertical:16,paddingHorizontal:24,borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",media:{mobile:{paddingVertical:12,paddingHorizontal:16}},...u,...l==null?void 0:l.header,children:[a==="left"&&d,e,a==="right"&&d]})}),Uy=m.memo(({children:e,views:o,...r})=>t.jsx(s.View,{paddingVertical:16,paddingHorizontal:24,fontSize:Hr.body.fontSize,fontWeight:Hr.body.fontWeight,color:Hr.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...r,...o==null?void 0:o.view,children:e})),Gy=m.memo(({children:e,views:o,...r})=>t.jsx(s.Horizontal,{marginTop:"auto",alignItems:"center",justifyContent:"flex-end",paddingVertical:16,paddingHorizontal:24,borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",gap:12,media:{mobile:{paddingVertical:12,paddingHorizontal:16,gap:8}},...r,...o==null?void 0:o.container,children:e})),$n=({modals:e,onShow:o,onHide:r})=>{const n=so(a=>a.modals);return m.useEffect(()=>{o&&so.getState().setOnShow(o)},[o]),m.useEffect(()=>{r&&so.getState().setOnHide(r)},[r]),n.length===0?null:t.jsx(m.Fragment,{children:n.map((a,l)=>{const i=e[a.name];return i?t.jsx(Ui,{isOpen:a.props.isVisible,onClose:()=>Dn(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+l},children:t.jsx(i,{...a.props})},l):(console.error(`${a.name} modal doesn't exist`),null)})})},jo=({children:e})=>t.jsx(t.Fragment,{children:e});jo.Overlay=Ui;jo.Container=Ny;jo.Header=qy;jo.Body=Uy;jo.Footer=Gy;jo.Layout=$n;const Ma={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},Yy={left:{top:0,left:0,bottom:0,height:"100vh",borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{top:0,right:0,bottom:0,height:"100vh",borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"},top:{top:0,left:0,right:0,width:"100vw",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},bottom:{bottom:0,left:0,right:0,width:"100vw",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200"}},Ln=({isOpen:e,onClose:o,isClosePrevented:r,blur:n,children:a,...l})=>{const i=()=>{r||o()};return m.useEffect(()=>{const u=c=>{c.key==="Escape"&&e&&!r&&o()};return e&&document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}},[e,r,o]),t.jsx(s.View,{"data-testid":"drawer-overlay",role:"dialog","aria-modal":"true",position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,visibility:e?"visible":"hidden",onClick:i,opacity:e?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease",backgroundColor:e?"color-dark-50-360":"transparent",backdropFilter:n?`blur(${n}px)`:void 0,pointerEvents:e?"auto":"none",...l,children:a})},Bn=({placement:e="right",size:o="md",isOpen:r=!1,children:n,...a})=>{const l=g=>{g.stopPropagation()},u=e==="top"||e==="bottom"?{height:o==="full"?"100vh":Ma[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":Ma[o]||o,maxWidth:"100vw"},c=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",d=r?"translate3d(0, 0, 0)":e==="left"?"translate3d(-100%, 0, 0)":e==="right"?"translate3d(100%, 0, 0)":e==="top"?"translate3d(0, -100%, 0)":"translate3d(0, 100%, 0)";return t.jsx(s.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:c,...Yy[e],...u,onClick:l,transform:d,willChange:"transform",transition:"transform 0.24s ease, box-shadow 0.2s ease",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",...a,children:n})},Ky=({children:e,onClose:o,buttonPosition:r="right",...n})=>{const a=o&&t.jsx(s.View,{onClick:o,cursor:"pointer",padding:8,children:t.jsx($e,{widthHeight:20,color:"color-gray-500"})});return t.jsxs(s.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:r==="none"?"center":"space-between",...n,children:[r==="left"&&a,e,r==="right"&&a]})},Xy=({children:e,...o})=>t.jsx(s.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),Jy=({children:e,...o})=>t.jsx(s.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),co=Qo.create(e=>({drawers:[],onHide:o=>o,onShow:(o,r)=>({name:o,props:r}),show:(o,r={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...r,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(r=>o?{...r,drawers:r.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(r=>({...r,onHide:o}))},setOnShow:o=>{e(r=>({...r,onShow:o}))}})),Qy=(e,o={},r={})=>{const n=co.getState();n.hide(e),n.show(e,o,r),n.onShow(e,o),queueMicrotask(()=>{co.setState(a=>({drawers:a.drawers.map(l=>l.name===e?{...l,props:{...l.props,isOpen:!0}}:l)}))})},Gi=e=>{co.getState().onHide(e),co.getState().hide(typeof e=="string"?e:void 0)},Zy=({drawers:e,onShow:o,onHide:r})=>{const n=co(a=>a.drawers);return m.useEffect(()=>{o&&co.getState().setOnShow(o)},[o]),m.useEffect(()=>{r&&co.getState().setOnHide(r)},[r]),n.length===0?null:t.jsx(m.Fragment,{children:n.map((a,l)=>{var f;const i=e[a.name];if(!i)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:u,size:c,isClosePrevented:d,blur:g,containerProps:p,...h}=a.props||{};return t.jsx(Ln,{isOpen:a.props.isOpen,onClose:()=>Gi(a.name),isClosePrevented:d,blur:g,...a.overlayProps,style:{zIndex:1e3+l,...((f=a.overlayProps)==null?void 0:f.style)||{}},children:t.jsx(Bn,{placement:u,size:c,isOpen:a.props.isOpen,...p||{},children:t.jsx(m.Suspense,{fallback:null,children:t.jsx(i,{...h})})})},l)})})},ex=({isOpen:e,onClose:o,placement:r="right",size:n="md",isClosePrevented:a,children:l,...i})=>t.jsx(Ln,{isOpen:e,onClose:o,isClosePrevented:a,...i,children:t.jsx(Bn,{placement:r,size:n,isOpen:e,children:l})}),vo=ex;vo.Overlay=Ln;vo.Container=Bn;vo.Header=Ky;vo.Body=Xy;vo.Footer=Jy;vo.Layout=Zy;const Yi=({behavior:e,keyboardVerticalOffset:o,dismissOnTap:r,enabled:n,children:a,...l})=>t.jsx(s.View,{flex:1,width:"100%",...l,children:a}),ox=({header:e,footer:o,children:r,isLoading:n=!1,safe:a=!0,scrollable:l=!0,dismissKeyboardOnTap:i=!0,keyboardVerticalOffset:u=0,views:c={},backgroundColor:d="color-white",...g})=>{const p=a?s.SafeArea:s.View,h=s.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},f=n?t.jsx(s.Center,{flex:1,width:"100%",...c.content,children:t.jsx(uo,{})}):l?t.jsx(s.Scroll,{flex:1,width:"100%",...h,...c.content,children:r}):t.jsx(s.View,{flex:1,width:"100%",...c.content,children:r});return t.jsxs(p,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:d,...g,...c.container,children:[e!=null&&t.jsx(s.View,{width:"100%",flexShrink:0,...c.header,children:e}),t.jsxs(Yi,{flexDirection:"column",dismissOnTap:i,keyboardVerticalOffset:u,children:[f,o!=null&&t.jsx(s.View,{width:"100%",flexShrink:0,...c.footer,children:o})]})]})},br=Qo.create(e=>({started:!1,loaded:!1,setStarted:(o=!0)=>e({started:o}),setLoaded:(o=!0)=>e({loaded:o}),reset:()=>e({started:!1,loaded:!1})})),tx=(e=!0)=>br.getState().setLoaded(e),rx=(e=!0)=>br.getState().setStarted(e),nx=({logo:e,logoSrc:o,loader:r,showLoader:n=!0,duration:a=600,isLoaded:l,onHidden:i,backgroundColor:u="color-white",children:c,...d})=>{const g=br(w=>w.loaded),p=l!==void 0?l:g,[h,f]=m.useState(!0),[y,b]=m.useState(!1);if(m.useEffect(()=>{if(!p||y)return;b(!0);const w=setTimeout(()=>{f(!1),i==null||i()},a);return()=>clearTimeout(w)},[p,y,a,i]),!h)return null;const x=s.isBrowser()?"fixed":"absolute",C=y?s.Animation.fadeOut({duration:`${a}ms`}):void 0,k=e??(o?t.jsx(s.Image,{src:o,width:120,height:120,alt:"logo"}):null);return t.jsxs(s.Center,{position:x,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:u,animate:C,...d,children:[t.jsxs(s.Vertical,{alignItems:"center",gap:24,children:[k,n&&(r??t.jsx(uo,{}))]}),c]})},Ye=Qo.create((e,o)=>({stack:[{path:"/",params:{}}],index:0,push:(r,n={})=>e(a=>{const l=a.stack.slice(0,a.index+1);return l.push({path:r,params:n}),{stack:l,index:l.length-1}}),replace:(r,n={})=>e(a=>{const l=a.stack.slice();return l[a.index]={path:r,params:n},{stack:l}}),back:()=>{const{index:r}=o();return r<=0?!1:(e({index:r-1}),!0)},go:r=>e(n=>({index:Math.min(Math.max(n.index+r,0),n.stack.length-1)})),reset:(r,n={})=>e({stack:[{path:r,params:n}],index:0})})),ax=(e,o)=>Ye.getState().push(e,o),lx=()=>Ye.getState().back(),_n=()=>{const e=Ye(c=>c.stack),o=Ye(c=>c.index),r=Ye(c=>c.push),n=Ye(c=>c.replace),a=Ye(c=>c.back),l=Ye(c=>c.go),i=Ye(c=>c.reset),u=e[o]||{path:"/",params:{}};return{path:u.path,params:u.params,stack:e,index:o,canGoBack:o>0,push:r,replace:n,back:a,go:l,reset:i,navigate:r}},Ki=(e,o)=>{const r=e.split("/").filter(Boolean),n=o.split("/").filter(Boolean);if(r.length!==n.length)return null;const a={};for(let l=0;l<r.length;l+=1){const i=r[l];if(i.startsWith(":"))a[i.slice(1)]=decodeURIComponent(n[l]);else if(i!==n[l])return null}return a},ix=e=>Array.isArray(e)?e:Object.entries(e).map(([o,r])=>({path:o,component:r})),sx=({routes:e,notFound:o})=>{const{path:r,params:n}=_n();for(const a of ix(e)){const l=Ki(a.path,r);if(l){const i=a.component;return t.jsx(i,{...n,...l})}}return o?t.jsx(o,{}):null},cx=({routes:e,notFound:o,initialPath:r,syncBrowserHistory:n=!1})=>{const{path:a,push:l,back:i,reset:u}=_n(),c=m.useRef(!1);return s.useMount(()=>{r&&u(r)}),m.useEffect(()=>{if(!(!n||typeof window>"u")){if(c.current){c.current=!1;return}try{window.history.pushState({path:a},"",a)}catch{}}},[a,n]),m.useEffect(()=>{if(!n||typeof window>"u")return;const d=()=>{c.current=!0,i()||(c.current=!1)};return window.addEventListener("popstate",d),()=>window.removeEventListener("popstate",d)},[n,i,l]),t.jsx(sx,{routes:e,notFound:o})},dx=(e=null,o=[])=>{const[r,n]=m.useState(e),[a,l]=m.useState(o),i=m.useRef({});return{activeItemId:r,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:d=>{l(g=>g.includes(d)?g.filter(h=>h!==d):[...g,d])},isItemExpanded:d=>a.includes(d),triggerRefs:i}},Jr={sm:{padding:"8px 12px",fontSize:"12px",fontWeight:"500",media:{mobile:{padding:"6px 10px",fontSize:"11px"}}},md:{padding:"10px 14px",fontSize:"14px",fontWeight:"500",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},lg:{padding:"12px 16px",fontSize:"14px",fontWeight:"600",media:{mobile:{padding:"10px 14px",fontSize:"12px"}}}},Qr={default:{color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"}},Xi={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},_o={active:{backgroundColor:"color-blue-50",color:"color-blue-700",fontWeight:"600",borderLeft:"3px solid",borderColor:"color-blue-600"},hover:{backgroundColor:"color-gray-100",transition:"background-color 0.2s ease"}},Ji=m.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),ux=({children:e,value:o})=>t.jsx(Ji.Provider,{value:o,children:e}),Rt=()=>{const e=m.useContext(Ji);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},On=({children:e,views:o})=>{const{orientation:r}=Rt(),n=r==="horizontal"?s.Horizontal:s.Vertical;return t.jsx(n,{width:"100%",...Xi[r],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},Qi=m.createContext({itemValue:null,isDisabled:!1}),px=()=>{const e=m.useContext(Qi);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},Nn=({item:e,value:o,isDisabled:r=!1,children:n,views:a})=>{var C;const{activeItemId:l,setActiveItemId:i,orientation:u,size:c,variant:d,onItemActivate:g}=Rt(),p=(e==null?void 0:e.id)||o,h=l===p,f=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||r,b=()=>{y||p&&(i(p),g&&g(p))},x=u==="horizontal"?s.Horizontal:s.Vertical;return n?t.jsx(Qi.Provider,{value:{itemValue:p||null,isDisabled:y},children:t.jsx(s.View,{width:"100%",cursor:y?"not-allowed":"pointer",opacity:y?.6:1,borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",...Jr[c],...Qr[d],...h?_o.active:{},_hover:y?{}:_o.hover,...a==null?void 0:a.item,children:n})}):f&&e?t.jsxs(x,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[t.jsxs(Zi,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&t.jsx(s.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),t.jsx(es,{itemId:e.id,children:t.jsx(On,{children:(C=e.items)==null?void 0:C.map(k=>t.jsx(Nn,{item:k},k.id))})})]}):e?t.jsxs(s.View,{as:e.href?"a":"div",href:e.href,onClick:b,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.6:1,width:"100%",display:"flex",alignItems:"center",borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",gap:"8px",...Jr[c],...Qr[d],...h?_o.active:{},_hover:e.disabled?{}:_o.hover,...a==null?void 0:a.item,children:[e.icon&&t.jsx(s.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},Zi=({children:e,itemId:o,disabled:r,views:n})=>{const{activeItemId:a,toggleExpandedItem:l,isItemExpanded:i,size:u,variant:c,triggerRefs:d}=Rt(),g=m.useRef(null),p=a===o,h=i(o);m.useEffect(()=>(g.current&&o&&(d.current[o]=g.current),()=>{o&&delete d.current[o]}),[o,d]);const f=y=>{y.preventDefault(),!r&&l(o)};return t.jsxs(s.View,{ref:g,onClick:f,cursor:r?"not-allowed":"pointer",opacity:r?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...Jr[u],...Qr[c],...p?_o.active:{},_hover:r?{}:_o.hover,...n==null?void 0:n.trigger,children:[t.jsx(s.View,{display:"flex",alignItems:"center",children:e}),t.jsx(s.View,{transition:"transform 0.2s ease",transform:h?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:t.jsx(Se,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},es=({children:e,itemId:o,views:r})=>{const{isItemExpanded:n,orientation:a,triggerRefs:l}=Rt(),i=m.useRef(null),[u,c]=m.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),d=n(o);if(m.useEffect(()=>{if(d&&i.current&&o&&l.current[o]&&a==="horizontal"){const p=i.current.getBoundingClientRect(),h=l.current[o].getBoundingClientRect(),f=Math.max(p.width||200,200),y=Math.max(p.height||150,150),b=window.innerWidth,x=window.innerHeight,C={top:h.top,right:b-h.right,bottom:x-h.bottom,left:h.left},k=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8}],w=k.find(j=>j.fits);if(w){c({x:w.x,y:w.y,placement:w.placement});return}const v=k.reduce((j,R)=>R.space>j.space?R:j);let S=v.x,I=v.y;S+f>b&&(S=b-f-8),S<8&&(S=8),I+y>x&&(I=x-y-8),I<8&&(I=8),c({x:S,y:I,placement:v.placement})}},[d,a,o,l]),!d)return null;if(a==="vertical")return t.jsx(s.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...r==null?void 0:r.container,children:e});const g={position:"fixed",left:u.x,top:u.y,zIndex:1e3};return t.jsx(s.View,{ref:i,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:g,...r==null?void 0:r.container,children:e})},mx=({href:e,children:o,views:r,underline:n,isExternal:a,iconSize:l,...i})=>{const{itemValue:u,isDisabled:c}=px(),{activeItemId:d,setActiveItemId:g,onItemActivate:p}=Rt(),h=d===u,f=y=>{if(c){y.preventDefault();return}u&&(g(u),p&&p(u)),i.onClick&&i.onClick(y)};return t.jsx(s.View,{as:"a",href:c?void 0:e,onClick:f,cursor:c?"not-allowed":"pointer",opacity:c?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":h?"page":void 0,"aria-disabled":c,"data-active":h?"":void 0,"data-disabled":c?"":void 0,...h?{fontWeight:"bold"}:{},...r==null?void 0:r.container,...i,children:o})},gx=({items:e,orientation:o,views:r,themeMode:n})=>{const a=o==="horizontal"?s.Horizontal:s.Vertical;return!e||e.length===0?null:t.jsx(a,{width:"100%",...Xi[o],...r==null?void 0:r.container,children:t.jsx(On,{views:r,children:e.map(l=>t.jsx(Nn,{item:l,views:r},l.id))})})},hx=e=>{const o=ve("navigation",e),{items:r,children:n,orientation:a="vertical",size:l="md",variant:i="default",defaultActiveItemId:u=null,defaultExpandedItemIds:c=[],onItemActivate:d,views:g,...p}=o,{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:b,isItemExpanded:x,triggerRefs:C}=dx(u,c);return t.jsx(ux,{value:{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:b,isItemExpanded:x,orientation:a,size:l,variant:i,onItemActivate:d,triggerRefs:C},children:r?t.jsx(gx,{items:r,orientation:a,size:l,variant:i,views:g,...p}):n})},To=hx;To.List=On;To.Item=Nn;To.Trigger=Zi;To.Content=es;To.Link=mx;const os={},ts=m.createContext({views:os,onRowClick:()=>{}}),fx=({children:e,views:o=os,onRowClick:r})=>t.jsx(ts.Provider,{value:{views:o,onRowClick:r},children:e}),go=()=>m.useContext(ts),Re={table:{width:"100%",color:"inherit",borderRadius:"8px",overflow:"hidden",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.06), 0px 1px 2px rgba(0, 0, 0, 0.04)",border:"1px solid",borderColor:"color-gray-200",transition:"box-shadow 0.2s ease",media:{mobile:{overflowX:"auto",display:"block",borderRadius:"4px"}}},thead:{backgroundColor:"color-gray-50",borderBottom:"1px solid",borderColor:"color-gray-200"},th:{padding:"12px 16px",fontWeight:"600",fontSize:"14px",color:"inherit",opacity:.72,textAlign:"left",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},td:{padding:"12px 16px",fontSize:"14px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"inherit",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},tr:{flexDirection:"row",alignItems:"stretch",width:"100%",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-50"},_focus:{outline:"none",backgroundColor:"color-gray-100"}},tfoot:{backgroundColor:"color-gray-50",fontWeight:"600",borderTop:"2px solid",borderColor:"color-gray-200"},caption:{margin:"8px 0",color:"inherit",opacity:.62,fontSize:"14px",fontStyle:"italic",media:{mobile:{fontSize:"12px"}}}};({...Re.th},{...Re.td});({...Re.tr});({...Re.td},{...Re.th});({...Re.table},{...Re.th}),{...Re.td},{...Re.tr},{...Re.tfoot},{...Re.caption};const rs=({children:e})=>t.jsx(s.View,{width:"100%",style:{overflowX:"auto"},children:e}),ns=e=>{const{views:o}=go();return t.jsx(s.Element,{as:"table",...Re.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},as=e=>{const{views:o}=go();return t.jsx(s.Element,{as:"thead",textAlign:"left",...Re.thead,...o==null?void 0:o.thead,...e})},ls=e=>{const{views:o}=go();return t.jsx(s.Element,{as:"th",whiteSpace:"nowrap",...Re.th,...o==null?void 0:o.th,...e})},Ut=e=>{const{views:o,onRowClick:r}=go();return t.jsx(s.Element,{as:"tr",...Re.tr,...o==null?void 0:o.tr,onClick:r,...e})},Zr=({isFirstColumn:e,...o})=>{const{views:r}=go();return t.jsx(s.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...Re.td,...r==null?void 0:r.td,...o})},is=e=>{const{views:o}=go();return t.jsx(s.Element,{as:"tbody",...Re.tbody,...o==null?void 0:o.tbody,...e})},ss=e=>{const{views:o}=go();return t.jsx(s.Element,{as:"tfoot",...Re.tfoot,...o==null?void 0:o.tfoot,...e})},cs=e=>{const{views:o}=go();return t.jsx(s.Element,{as:"caption",...Re.caption,...o==null?void 0:o.caption,...e})},yx=({data:e,columns:o,footer:r,caption:n,themeMode:a})=>{const l=Math.max(o.length*140,320);return t.jsx(rs,{children:t.jsxs(ns,{role:"Table",minWidth:l,children:[n&&t.jsx(cs,{children:n}),t.jsx(as,{children:t.jsx(Ut,{children:o.map(i=>t.jsx(ls,{children:i.title},i.field))})}),t.jsx(is,{children:e.map((i,u)=>t.jsx(Ut,{children:o.map((c,d)=>t.jsx(Zr,{isFirstColumn:d===0,children:i[c.field]},c.field))},u))}),r&&t.jsx(ss,{children:t.jsx(Ut,{children:r.map((i,u)=>t.jsx(Zr,{...i.props,children:i.value},u))})})]})})},Te=({children:e,views:o,onClick:r})=>{const n=ve("table",{views:o,onClick:r});return t.jsx(fx,{views:n.views,onRowClick:n.onClick,children:e})};Te.Head=as;Te.HeadCell=ls;Te.Body=is;Te.Row=Ut;Te.Cell=Zr;Te.Footer=ss;Te.Caption=cs;Te.Container=ns;Te.Template=yx;const xx=(e,o,r)=>{const n=d=>d.value!==void 0?d.value:d.title,a=()=>{if(!(!e||e.length===0)){if(o!==void 0){const d=e.find(g=>n(g)===o);if(d)return d}return e[0]}},[l,i]=m.useState(a()),u=r!==void 0?e.find(d=>n(d)===r):l,c=d=>{r===void 0&&i(d)};return m.useEffect(()=>{if(r!==void 0)return;const d=a(),g=l&&e.some(p=>n(p)===n(l));d&&(!g||o!==void 0&&l&&n(l)!==o)?i(d):!d&&l&&i(void 0)},[e,o]),{activeTab:u,setActiveTab:c}},bx=(e,o,r)=>{const[n,a]=m.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:u=>{o===void 0&&a(u),r&&r(u)}}},kx=m.memo(({tab:e,isActive:o,onClick:r,iconPosition:n="left",tabStyles:a,textStyles:l})=>{const i=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},u=()=>["top","bottom"].includes(n)?"4px":"8px",c=e.icon&&m.isValidElement(e.icon)?m.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return t.jsxs(s.Element,{as:"div",role:"tab","aria-selected":o,tabIndex:o?0:-1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...a,flexDirection:i(),gap:u(),onClick:r,"data-state":o?"active":"inactive",children:[c&&t.jsx(s.Element,{children:c},o?"active-icon":"inactive-icon"),t.jsxs(s.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[t.jsx(s.Text,{...l,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),t.jsx(s.Text,{...l,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),qn=(e,o)=>{const r=o==="dark";return e==="segmented"?{header:{width:"fit-content",alignSelf:"flex-start",gap:6,padding:6,borderRadius:16,backgroundColor:"color-gray-100"},tab:{minHeight:44,padding:"0 22px",borderRadius:12,color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-100",style:{backgroundColor:"transparent"}},activeTab:{backgroundColor:"color-white",color:"color-gray-900",boxShadow:r?"0 1px 3px rgba(0, 0, 0, 0.35)":"0 1px 2px rgba(0, 0, 0, 0.06)"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em"},activeText:{},content:{width:"100%"}}:e==="pill"?{header:{width:"100%",flexWrap:"wrap",gap:12},tab:{minHeight:44,padding:"0 22px",borderRadius:"999px",backgroundColor:"color-white",color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200"},activeTab:{backgroundColor:"theme-primary",color:"color-white",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%"}}:{header:{width:"100%",gap:20,borderBottom:"none"},tab:{minHeight:44,padding:"0 4px",borderRadius:0,color:"color-gray-500",borderBottom:"3px solid",borderColor:"color-white",style:{backgroundColor:"transparent"}},activeTab:{color:"theme-primary",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%",paddingTop:12}}},Cx=({tabs:e=[],activeTab:o,handleTabClick:r,views:n={},renderTab:a,renderContent:l,variant:i="underline",iconPosition:u="left",keepMounted:c=!1})=>{const{themeMode:d}=s.useTheme(),g=qn(i,d);return o?t.jsxs(s.Vertical,{width:"100%",height:"100%",...n.container,children:[t.jsx(s.Horizontal,{alignItems:"center",...g.header,...n.headerTabs,children:e.map(p=>{const h=(p.value!==void 0?p.value:p.title)===(o.value!==void 0?o.value:o.title),f=()=>r(p);return a?a(p,h,f):t.jsx(kx,{tab:p,isActive:h,onClick:f,iconPosition:u,tabStyles:{...g.tab,...n.tab,...h?g.activeTab:{},...h?n.activeTab:{}},textStyles:{...g.text,...n.title,...h?g.activeText:{},...h?n.activeText:{}}},p.title)})}),t.jsx(s.View,{height:"100%",...g.content,...n.content,children:l?l(o):c?e.map(p=>{const h=p.value!==void 0?p.value:p.title,f=o.value!==void 0?o.value:o.title;return t.jsx(s.View,{display:h===f?"contents":"none",children:p.content},p.title)}):o.content})]}):null},ds=m.createContext(null),Un=()=>{const e=m.useContext(ds);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},Sx=m.memo(({children:e,views:o})=>{var u;const{themeMode:r}=s.useTheme(),{variant:n="underline"}=Un(),a=qn(n,r),l=Zo("tabs"),i=Ke({container:(u=l.views)==null?void 0:u.headerTabs},o);return t.jsx(s.Horizontal,{alignItems:"center",...a.header,...i==null?void 0:i.container,children:e})}),wx=m.memo(({value:e,children:o,disabled:r=!1,views:n})=>{var f,y;const{themeMode:a}=s.useTheme(),{activeValue:l,setActiveValue:i,variant:u="underline"}=Un(),c=l===e,d=qn(u,a),g=Zo("tabs"),p=Ke({trigger:(f=g.views)==null?void 0:f.tab,activeState:(y=g.views)==null?void 0:y.activeTab},n),h=m.useCallback(()=>{r||i(e)},[r,e,i]);return t.jsx(s.View,{cursor:r?"not-allowed":"pointer",opacity:r?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...d.tab,...c?d.activeTab:{},_hover:r?{}:u==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:h,...p==null?void 0:p.trigger,...c?p==null?void 0:p.activeState:{},children:t.jsx(s.View,{...d.text,...c?d.activeText:{},children:o})})}),jx=m.memo(({value:e,children:o,views:r})=>{const{activeValue:n}=Un();return n!==e?null:t.jsx(s.View,{width:"100%",padding:"24px",...r==null?void 0:r.content,children:o})}),vx=e=>{const o=ve("tabs",e),{tabs:r,views:n,defaultValue:a,onTabChange:l,renderTab:i,renderContent:u,variant:c="underline",iconPosition:d="left",keepMounted:g=!1,value:p,onValueChange:h,children:f}=o,y=bx(a,p,h),b=xx(r||[],a,p);if(f)return t.jsx(ds.Provider,{value:{...y,variant:c},children:f});if(r){const x=C=>{const k=w=>w.value!==void 0?w.value:w.title;(!b.activeTab||k(b.activeTab)!==k(C))&&(b.setActiveTab(C),l&&l(C))};return t.jsx(Cx,{tabs:r,views:n,activeTab:b.activeTab,handleTabClick:x,renderTab:i,renderContent:u,variant:c,iconPosition:d,keepMounted:g})}return null},Tx=m.memo(vx),Ko=Tx;Ko.List=Sx;Ko.Trigger=wx;Ko.Content=jx;const Ix=e=>{const{children:o,_isInView:r=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:l=3e3,highlightText:i,highlightTypewriter:u=!1,highlightSlide:c=!1,highlightSlideDuration:d=500,highlightSlideStagger:g=50,highlightSlideSequential:p=!0}=e,[h,f]=m.useState(o),[y,b]=m.useState(i);return m.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof o!="string"||!i)return;const x=Array.isArray(i)?i:[i];for(const C of x)typeof C=="string"&&C.length>0&&!o.toLowerCase().includes(C.toLowerCase())&&console.warn(`[Title] highlightText "${C}" is not a substring of \`children\`, so nothing will be highlighted. \`children\` must be the complete sentence including the highlight, e.g. \`<Title highlightText="apps">Build apps fast</Title>\`.`)},[o,i]),m.useEffect(()=>{if(!a||n.length===0||!r||typeof o!="string"||typeof i!="string")return process.env.NODE_ENV!=="production"&&a&&n.length>0&&(typeof o!="string"||typeof i!="string")&&console.warn("[Title] alternateHighlightText requires `children` to be the full sentence as a string and `highlightText` to be the placeholder word inside it. Rotation is disabled."),f(o),b(i),()=>{};const x=o,C=i;if(!x.toLowerCase().includes(C.toLowerCase()))return process.env.NODE_ENV!=="production"&&console.warn(`[Title] \`children\` must contain \`highlightText\` ("${C}") — it is the placeholder the rotating words replace, e.g. \`<Title highlightText="apps" alternateHighlightText={["apps", "sites"]}>Build apps fast</Title>\`. Rotation is disabled.`),f(o),b(i),()=>{};let k=0;const w=S=>{const I=n[S],j=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),R=new RegExp(j,"gi"),z=x.replace(R,I);f(z),b(I)};w(k);const v=setInterval(()=>{k=(k+1)%n.length,w(k)},l);return()=>clearInterval(v)},[a,n,l,i,o,r]),{finalDisplayedText:h,activeHighlightTarget:y,highlightTypewriter:u,highlightSlide:c,highlightSlideDuration:d,highlightSlideStagger:g,highlightSlideSequential:p}},Rx={xs:24,sm:32,md:48,lg:96,xl:110},Fx={xl:{media:{mobile:{fontSize:48},tablet:{fontSize:96},desktop:{fontSize:110}}},lg:{media:{mobile:{fontSize:48},tablet:{fontSize:48},desktop:{fontSize:70}}},md:{media:{mobile:{fontSize:32},tablet:{fontSize:40},desktop:{fontSize:56}}},sm:{media:{mobile:{fontSize:20},tablet:{fontSize:24},desktop:{fontSize:32}}},xs:{media:{mobile:{fontSize:14},tablet:{fontSize:18},desktop:{fontSize:20}}}},zx={underline:e=>({textDecoration:"underline",textDecorationColor:e,textDecorationThickness:"4px",textUnderlineOffset:"4px"}),background:e=>({backgroundColor:e,color:"color-white",padding:"0 8px",borderRadius:"4px"}),gradient:(e,o)=>({background:`linear-gradient(135deg, ${e}, ${o||e})`,backgroundClip:"text",WebkitBackgroundClip:"text !important",WebkitTextFillColor:"transparent",color:"transparent",display:"inline-block",textShadow:"none"}),outline:e=>({WebkitTextStroke:`1px ${e}`,WebkitTextFillColor:"transparent !important",color:"transparent",textShadow:"none"}),glow:e=>({color:e,textShadow:`0 0 10px ${e}80, 0 0 20px ${e}40, 0 0 30px ${e}20`}),solid:e=>({color:e}),default:()=>({})},Mx=({text:e,typingSpeed:o=50,pauseTime:r=500,onComplete:n,showCursor:a=!0,cursorColor:l="currentColor",textStyle:i,textComponent:u,as:c,...d})=>{const g=u||s.Text,p=Array.isArray(e)?e:[e],[h,f]=m.useState(p.map(()=>"")),[y,b]=m.useState(!1),[x,C]=m.useState(0),[k,w]=m.useState(0);m.useEffect(()=>{f(p.map(()=>"")),b(!1),C(0),w(0)},[e]),m.useEffect(()=>{if(y){n&&n();return}const S=p[x];if(k>=S.length){if(x>=p.length-1){b(!0);return}const j=setTimeout(()=>{C(R=>R+1),w(0)},r);return()=>clearTimeout(j)}const I=setTimeout(()=>{f(j=>{const R=[...j];return R[x]=S.substring(0,k+1),R}),w(j=>j+1)},o);return()=>clearTimeout(I)},[p,x,k,y,n,r,o]);const v=S=>{if(!S||typeof S!="string")return S;const I=S.split("|");return I.length===1?S:I.map((j,R)=>t.jsxs(m.Fragment,{children:[j,R<I.length-1&&t.jsx("br",{})]},R))};return t.jsx(t.Fragment,{children:h.map((S,I)=>t.jsxs(m.Fragment,{children:[v(S),a&&I===x&&!y&&t.jsx(g,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:l,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...i})]},I))})},Wx=({text:e,duration:o=500,direction:r="up",stagger:n=50,sequential:a=!1,textStyle:l,as:i,wordProps:u,textComponent:c,...d})=>{const[g,p]=m.useState(e),[h,f]=m.useState("entering"),[y,b]=m.useState(0),x=c||s.Text,C=m.useRef(null),k=m.useRef(null);m.useEffect(()=>{e===g&&h==="visible"||e!==g&&(h==="entering"||h==="visible"?(C.current=e,f("exiting")):h==="exiting"&&(C.current=e))},[e,g,h]);const{lines:w,totalWordCount:v}=m.useMemo(()=>{const A=g.split("|").map(L=>L.trim().split(/\s+/).filter(O=>O.length>0)),H=A.reduce((L,O)=>L+O.length,0);return{lines:A,totalWordCount:H}},[g]),S=m.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]),I=m.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]);m.useEffect(()=>(k.current&&clearTimeout(k.current),h==="entering"?k.current=setTimeout(()=>{f("visible")},S+50):h==="exiting"&&(k.current=setTimeout(()=>{C.current!==null&&(p(C.current),C.current=null),b(V=>V+1),f("entering")},I+50)),()=>{k.current&&clearTimeout(k.current)}),[h,S,I]);const{style:j,...R}=u||{},z=r==="up",E=V=>a?V*(o+n):V*n,W=m.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...l}),[l]),F=m.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),T=m.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let M=0;return t.jsx(s.Element,{as:"span",style:W,...d,children:t.jsx("span",{style:F,children:w.map((V,A)=>t.jsx("span",{style:T,children:V.map((H,L)=>{const O=M++,_=E(O),q=L===V.length-1;let Y;const P=`${o}ms`,B=`${_}ms`;h==="entering"?Y=z?s.Animation.slideInUp({duration:P,delay:B,timingFunction:"ease-out",fillMode:"both"}):s.Animation.slideInDown({duration:P,delay:B,timingFunction:"ease-out",fillMode:"both"}):h==="exiting"&&(Y=z?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:P,delay:B,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:P,delay:B,timingFunction:"ease-in",fillMode:"both"});const $={...j,display:"inline-block",marginRight:q?0:"0.25em",transform:h==="visible"?"translateY(0)":void 0,opacity:h==="visible"?1:void 0};return t.jsx(x,{as:"span",animate:Y,...R,...$,children:H},`${y}-${A}-${L}`)})},`line-${A}`))})})};function Wa(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Vr=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((r,n)=>t.jsxs(m.Fragment,{children:[r,n<o.length-1&&t.jsx("br",{})]},n))},Ex=({children:e,highlightText:o,highlightStyle:r="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:l="lg",views:i,highlightAnimate:u,animate:c,animationLoop:d=1,highlightAnimationLoop:g=1,highlightTypewriter:p=!1,highlightTypewriterDuration:h=3e3,highlightSlide:f=!1,highlightSlideDuration:y=500,highlightSlideStagger:b=50,highlightSlideSequential:x=!0,centered:C=!1,level:k=1,themeMode:w,responsive:v,alternateHighlightText:S,alternateAnimation:I,alternateDuration:j,_isInView:R,...z})=>{const{ref:E,inView:W}=s.useInView(),{finalDisplayedText:F,activeHighlightTarget:T,highlightTypewriter:M,highlightSlide:V,highlightSlideDuration:A,highlightSlideStagger:H,highlightSlideSequential:L}=Ix({children:e,highlightText:o,_isInView:W,highlightTypewriter:p,highlightSlide:f,highlightSlideDuration:y,highlightSlideStagger:b,highlightSlideSequential:x,alternateHighlightText:S,alternateAnimation:I,alternateDuration:j,...z}),O=Rx[l],_={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:l==="xl"?700:600,letterSpacing:l==="xl"?"-1.5px":"-0.01em"},q=zx[r](n,a),Y=(G,K)=>G&&(Array.isArray(G)?G.map(re=>({...re,iterationCount:K.toString()})):{...G,iterationCount:K.toString()}),P=Y(c,d),B=Y(u,g),$=typeof F=="string"?F:typeof e=="string"?e:"",D={ref:E,animate:W?P:void 0,as:`h${k}`,fontSize:O,...C?{textAlign:"center"}:{},...v?Fx[l]:{},..._},N=G=>!W&&(M||V)?t.jsx("span",{style:{opacity:0},children:G}):M?t.jsx(Mx,{text:G,typingSpeed:Math.max(30,h/(G.length*10)),cursorColor:"currentColor",...q}):V?t.jsx(Wx,{text:G,duration:A,stagger:H,sequential:L,direction:"up",wordProps:q}):Vr(G);if(typeof $=="string"&&T){const G=Array.isArray(T)?new RegExp(`(${T.map(ie=>Wa(String(ie))).join("|")})`,"gi"):new RegExp(`(${Wa(String(T))})`,"gi"),K=[];let re=0,oe;for(;oe=G.exec($);)oe.index>re&&K.push($.substring(re,oe.index)),K.push({highlight:!0,text:oe[0]}),re=oe.index+oe[0].length;return re<$.length&&K.push($.substring(re)),t.jsx(s.Element,{...D,...i==null?void 0:i.container,...z,children:K.map((ie,X)=>typeof ie=="string"?t.jsx(s.Text,{as:"span",display:"inline",...i==null?void 0:i.text,children:Vr(ie)},`text-${X}`):t.jsx(s.Text,{as:"span",display:"inline",animate:W?B:void 0,...V?{}:q,...i==null?void 0:i.highlight,children:N(ie.text)},`highlight-${X}`))})}return r&&!T?t.jsx(s.Element,{...D,...z,...i==null?void 0:i.container,children:t.jsx(s.Text,{as:"span",display:"inline",animate:W?B:void 0,...V?{}:q,...i==null?void 0:i.highlight,children:N($)})}):t.jsx(s.Text,{...D,...z,...i==null?void 0:i.container,...i==null?void 0:i.text,children:Vr($)})},Ax=e=>t.jsx(Ex,{...e}),us=Ax,Hx=({items:e,shape:o,variant:r,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:l}=Hi();return t.jsx(Vi,{items:e,shape:o,variant:r,activeToggles:a,setActiveToggles:l,onToggleChange:n})},ps=Hx,Vx=({items:e,onChange:o})=>{const[r,n]=m.useState(e),[a,l]=m.useState(null),[i,u]=m.useState(null),c=m.useRef({x:0,y:0}),d=m.useRef([]),g=m.useCallback((f,y)=>{f.preventDefault(),document.body.style.cursor="grabbing";const b="touches"in f?f.touches[0].clientX:f.clientX,x="touches"in f?f.touches[0].clientY:f.clientY;c.current={x:b,y:x},u(y),l(r[y])},[r]),p=m.useCallback(f=>{if(i===null)return;const y="touches"in f?f.touches[0].clientX:f.clientX,b="touches"in f?f.touches[0].clientY:f.clientY,x=d.current[i];if(!x)return;const C=y-c.current.x,k=b-c.current.y;x.style.transform=`translate(${C}px, ${k}px)`,x.style.zIndex="1000";const w=d.current.findIndex((v,S)=>{if(!v||S===i)return!1;const I=v.getBoundingClientRect();return b>=I.top&&b<=I.bottom});if(w!==-1&&w!==i){const v=[...r],[S]=v.splice(i,1);v.splice(w,0,S),n(v),u(w),o==null||o(v),c.current={x:y,y:b}}},[i,r,o]),h=m.useCallback(()=>{document.body.style.cursor="",d.current.forEach(f=>{f&&(f.style.transform="",f.style.zIndex="")}),u(null),l(null)},[i]);return m.useEffect(()=>{if(!(typeof window>"u"))return i!==null&&(window.addEventListener("mousemove",p),window.addEventListener("touchmove",p),window.addEventListener("mouseup",h),window.addEventListener("touchend",h)),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("touchmove",p),window.removeEventListener("mouseup",h),window.removeEventListener("touchend",h)}},[i,p,h]),{items:r,draggedItem:a,draggedIndex:i,itemRefs:d,handleDragStart:g}},Px=({items:e,renderItem:o,containerProps:r,itemProps:n,draggedIndex:a,itemRefs:l,handleDragStart:i,views:u,themeMode:c})=>t.jsx(s.View,{overflow:"hidden",position:"relative",...r,...u==null?void 0:u.container,children:e.map((d,g)=>t.jsx(s.View,{ref:p=>{l.current[g]=p},onMouseDown:p=>i(p,g),onTouchStart:p=>i(p,g),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...u==null?void 0:u.item,children:o?o(d,g):d},g))}),ms=e=>{const{items:o,draggedIndex:r,itemRefs:n,handleDragStart:a}=Vx(e);return t.jsx(Px,{...e,items:o,draggedIndex:r,itemRefs:n,handleDragStart:a})},Dx=ms,$x=({onFileSelect:e,onMultipleFileSelect:o,validateFile:r,accept:n,multiple:a,disabled:l,previewUrl:i})=>{const[u,c]=m.useState(!1),[d,g]=m.useState(null),p=m.useRef(null),h=i!==void 0?i:d;m.useEffect(()=>()=>{d&&URL.revokeObjectURL(d)},[d]);const f=m.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&c(!0)},[l]),y=m.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&c(!1)},[l]),b=m.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&c(!0)},[l]),x=m.useCallback(v=>{if(!v||v.length===0)return;const S=Array.from(v);if(!a&&S.length>0){const I=S[0];if(I.type.startsWith("image/")){const j=URL.createObjectURL(I);g(R=>(R&&URL.revokeObjectURL(R),j))}else g(null)}a?o&&o(S):S.length>0&&e&&e(S[0])},[a,o,e]),C=m.useCallback(v=>{v.preventDefault(),v.stopPropagation(),c(!1),!l&&v.dataTransfer.files&&v.dataTransfer.files.length>0&&(x(v.dataTransfer.files),v.dataTransfer.clearData())},[l,x]),k=m.useCallback(()=>{var v;l||(v=p.current)==null||v.click()},[l]),w=m.useCallback(v=>{x(v.target.files),v.target.value&&(v.target.value="")},[x]);return{isDragActive:u,handleDragEnter:f,handleDragLeave:y,handleDragOver:b,handleDrop:C,handleClick:k,handleFileChange:w,inputRef:p,preview:h}},Lx={position:"absolute",top:"-4px",right:"-4px",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"12px",zIndex:10,_hover:{backgroundColor:"rgba(0, 0, 0, 0.7)"}},gs=({files:e,sandboxId:o,onRemove:r,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:i={}})=>{if(e.length===0)return null;const u=m.useCallback(d=>d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/(1024*1024)).toFixed(1)} MB`,[]),c=m.useCallback(d=>d.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:d.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:d.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return t.jsx(s.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...i==null?void 0:i.container,children:e.map((d,g)=>{const p=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&d instanceof Blob,h=(d==null?void 0:d.path)||(d==null?void 0:d.url)||(l&&p?URL.createObjectURL(d):""),f=d.type.startsWith("image/"),y=d.type.startsWith("video/"),b=d.type.startsWith("audio/"),x=c(d);return l?t.jsx(s.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...i==null?void 0:i.item,children:l&&t.jsxs(He,{children:[t.jsxs(He.Trigger,{children:[f&&t.jsx(s.Image,{src:h,alt:d.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&t.jsx(s.View,{as:"video",src:h,alt:d.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),b&&t.jsx(s.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(Yo,{widthHeight:24,color:"color-black"})}),!f&&!y&&!b&&t.jsx(s.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(ko,{widthHeight:24,color:"color-black"})}),r&&t.jsx(s.Button,{...Lx,onClick:C=>{C.stopPropagation(),r(g)},"aria-label":`Remove ${d.name}`,children:"×"})]}),t.jsxs(He.Content,{children:[f&&t.jsx(s.Image,{src:h,alt:d.name,maxWidth:"100%"}),y&&t.jsx(s.View,{as:"video",src:h,controls:!0,maxWidth:"100%"}),b&&t.jsx(s.View,{as:"audio",src:h,controls:!0,width:"100%"}),t.jsxs(s.Text,{marginTop:"4px",maxLines:1,width:"100%",...i==null?void 0:i.name,children:[d.name," (",u(d.size),")"]})]})]})},g):t.jsxs(s.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...i==null?void 0:i.item,children:[t.jsx(s.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:x.backgroundColor,color:x.color,children:b?t.jsx(Yo,{widthHeight:12,color:"currentColor"}):t.jsx(ko,{widthHeight:12,color:"currentColor"})}),t.jsxs(s.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...i==null?void 0:i.name,children:[d.name," · ",u(d.size)]}),r&&t.jsx(s.View,{as:"button",type:"button",onClick:()=>r(g),"aria-label":`Remove ${d.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},g)})})},Bx=({children:e,text:o="Drop files here or click to upload",textProps:r,containerProps:n,disabled:a,accept:l,multiple:i,isDragActive:u,handleDragEnter:c,handleDragLeave:d,handleDragOver:g,handleDrop:p,handleClick:h,handleFileChange:f,inputRef:y,preview:b,imageProps:x,selectedFiles:C,onRemove:k})=>t.jsxs(s.Center,{width:"100%",minHeight:"200px",height:C&&C.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:u?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:u?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:h,onDragEnter:c,onDragLeave:d,onDragOver:g,onDrop:p,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[t.jsx("input",{type:"file",ref:y,onChange:f,accept:l,multiple:i,style:{display:"none"},disabled:a}),b&&!i?t.jsxs(s.View,{width:"100%",height:"200px",position:"relative",children:[t.jsx(s.Image,{src:b,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...x}),t.jsx(s.Center,{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.3)",opacity:0,_hover:{opacity:1},transition:"opacity 0.2s",children:t.jsx(s.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):t.jsxs(s.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||t.jsxs(s.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[t.jsx(jn,{widthHeight:40,color:u?"theme-primary":"color-gray-500"}),t.jsx(s.Text,{marginTop:16,color:u?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...r,children:o})]}),i&&C&&C.length>0&&t.jsx(s.View,{marginTop:16,width:"100%",children:t.jsx(gs,{files:C,onRemove:k||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),_x=e=>{const o=$x(e);return t.jsx(Bx,{...e,...o})},Ox=(e=!1)=>{const[o,r]=m.useState(e),[n,a]=m.useState(null);return m.useEffect(()=>{const l=c=>{!c.composedPath().some(p=>(p==null?void 0:p.id)==="dropdown-menu"||(p==null?void 0:p.id)==="dropdown-trigger")&&o&&(r(!1),a(null))},i=()=>{o&&(r(!1),a(null))},u=c=>{c.key==="Escape"&&o&&(r(!1),a(null))};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",l),window.addEventListener("resize",i),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",l),window.removeEventListener("resize",i),document.removeEventListener("keydown",u)}},[o]),{isOpen:o,setIsOpen:r,activeSubmenuId:n,setActiveSubmenuId:a}},Nx={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},qx={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Ux={hover:{backgroundColor:"color-gray-100"}},hs=m.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),Gx=({children:e,value:o})=>t.jsx(hs.Provider,{value:o,children:e}),Gn=()=>{const e=m.useContext(hs);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},fs=({children:e,views:o,...r})=>{const{isOpen:n,setIsOpen:a,triggerRef:l}=Gn(),i=u=>{u.stopPropagation(),a(!n)};return t.jsx(s.View,{ref:l,id:"dropdown-trigger",onClick:i,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...r,children:e})},Yn=({items:e,side:o="bottom",align:r="start",views:n,...a})=>{const{isOpen:l,variant:i,triggerRef:u}=Gn(),c=m.useRef(null),{ref:d,relation:g}=s.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[p,h]=m.useState({x:0,y:0,placement:o});if(m.useEffect(()=>{u.current&&d&&(d.current=u.current)},[u,d,l]),m.useEffect(()=>{if(l&&c.current&&u.current){const b=u.current.getBoundingClientRect();let x=o;g&&(o==="bottom"&&g.space.vertical==="top"?x="top":o==="top"&&g.space.vertical==="bottom"?x="bottom":o==="right"&&g.space.horizontal==="left"?x="left":o==="left"&&g.space.horizontal==="right"&&(x="right"));let C=0,k=0;switch(x){case"bottom":C=r==="start"?b.left:r==="end"?b.right-180:b.left+b.width/2-90,k=b.bottom+8;break;case"top":C=r==="start"?b.left:r==="end"?b.right-180:b.left+b.width/2-90,k=b.top-8;break;case"right":C=b.right+8,k=r==="start"?b.top:r==="end"?b.bottom-100:b.top+b.height/2-50;break;case"left":C=b.left-8,k=r==="start"?b.top:r==="end"?b.bottom-100:b.top+b.height/2-50;break}h({x:C,y:k,placement:x})}},[l,o,r,u,g]),!l)return null;const y=(()=>{const b={position:"fixed",left:p.x,top:p.y,zIndex:1e3};switch(p.placement){case"top":return{...b,transform:"translateY(-100%)"};case"left":return{...b,transform:"translateX(-100%)"};case"bottom":case"right":default:return b}})();return t.jsx(s.View,{ref:c,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...qx[i],...n==null?void 0:n.menu,...a,children:e.map((b,x)=>b.divider?t.jsx(xs,{views:n},`divider-${x}`):t.jsx(ys,{item:b,views:n},b.id))})},ys=({item:e,views:o,...r})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:l}=Gn(),[i,u]=m.useState(!1),c=e.items&&e.items.length>0,d=n===e.id,g=m.useRef(null),p=()=>{u(!0),c&&a(e.id)},h=()=>{u(!1)},f=y=>{y.stopPropagation(),!e.disabled&&!c&&e.onClick&&e.onClick()};return t.jsxs(s.View,{ref:g,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...Nx[l],_hover:e.disabled?{}:Ux.hover,backgroundColor:i&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:p,onMouseLeave:h,onClick:f,...o==null?void 0:o.item,...r,children:[e.icon&&t.jsx(s.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),t.jsx(s.View,{flexGrow:1,children:e.label}),c&&t.jsx(s.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:t.jsx(Se,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),d&&c&&t.jsx(Yn,{items:e.items||[],side:"right",align:"start",views:o})]})},xs=({views:e,...o})=>t.jsx(s.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),Yx=({trigger:e,items:o,side:r="bottom",align:n="start",views:a,themeMode:l,...i})=>t.jsxs(s.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...i,children:[t.jsx(fs,{views:a,children:e}),t.jsx(Yn,{items:o,side:r,align:n,views:a})]}),Kx=({trigger:e,items:o,size:r="md",variant:n="default",side:a="bottom",align:l="start",defaultOpen:i=!1,views:u,...c})=>{const{isOpen:d,setIsOpen:g,activeSubmenuId:p,setActiveSubmenuId:h}=Ox(i),f=m.useRef(null);return t.jsx(Gx,{value:{isOpen:d,setIsOpen:g,activeSubmenuId:p,setActiveSubmenuId:h,size:r,variant:n,triggerRef:f},children:t.jsx(Yx,{trigger:e,items:o,side:a,align:l,views:u,...c})})},tt=Kx;tt.Trigger=fs;tt.Content=Yn;tt.Item=ys;tt.Divider=xs;const Xx=e=>{const{value:o,defaultValue:r="",onChange:n,onChangeComplete:a,isOpen:l,onOpen:i,onClose:u,closeOnSelect:c=!0,maxRecentColors:d=8,showRecentColors:g=!0,colorFormat:p}=e,[h,f]=m.useState(l??!1),[y,b]=m.useState(o??r),[x,C]=m.useState(""),[k,w]=m.useState([]),v=m.useRef(null),S=m.useRef(null);m.useEffect(()=>{o!==void 0&&b(o)},[o]),m.useEffect(()=>{l!==void 0&&f(l)},[l]),m.useEffect(()=>{if(g&&typeof localStorage<"u"){const F=localStorage.getItem("colorPicker-recentColors");if(F)try{w(JSON.parse(F))}catch{}}},[g]),m.useEffect(()=>{if(typeof document>"u"||typeof document.addEventListener!="function")return;const F=T=>{h&&v.current&&S.current&&!v.current.contains(T.target)&&!S.current.contains(T.target)&&W()};return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[h]);const I=m.useCallback(F=>{g&&w(T=>{const M=T.filter(A=>A!==F),V=[F,...M].slice(0,d);return typeof localStorage<"u"&&localStorage.setItem("colorPicker-recentColors",JSON.stringify(V)),V})},[g,d]),j=m.useCallback(()=>{const F=!h;f(F),F?i==null||i():u==null||u()},[h,i,u]),R=m.useCallback(F=>{b(F),I(F);const T=rr(F,p);n==null||n(T),a==null||a(T),c&&(f(!1),u==null||u())},[n,a,c,u,I,p]),z=m.useCallback(F=>{C(F)},[]),E=m.useCallback(()=>{x&&(R(x),C(""))},[x,R]),W=m.useCallback(()=>{f(!1),u==null||u()},[u]);return{isOpen:h,selectedColor:y,recentColors:k,customColor:x,handleToggle:j,handleColorSelect:R,handleCustomColorChange:z,handleCustomColorSubmit:E,handleClose:W,triggerRef:v,dropdownRef:S}},Po={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},dropdown:{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.14)",padding:"16px",minWidth:"320px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(6, 36px)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"12px",marginBottom:"16px"},customInput:{marginBottom:"12px"},recentColors:{borderTop:"1px solid color-gray-100",paddingTop:"12px"}},Jx={xs:{height:"32px",fontSize:"12px",padding:"4px 8px"},sm:{height:"40px",fontSize:"12px",padding:"8px 10px"},md:{height:"44px",fontSize:"14px",padding:"10px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 14px"},xl:{height:"56px",fontSize:"18px",padding:"14px 16px"}},Qx={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Zx={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"}},eb=[{name:"Blue",value:"#1D4ED8",category:"primary"},{name:"Purple",value:"#A855F7",category:"primary"},{name:"Green",value:"#22C55E",category:"primary"},{name:"Orange",value:"#F97316",category:"primary"},{name:"Red",value:"#EF4444",category:"primary"},{name:"Ink",value:"#111827",category:"neutral"}],ob=typeof navigator<"u"&&navigator.product!=="ReactNative"&&typeof document<"u"&&typeof document.createElement=="function",tb=({id:e,name:o,label:r,placeholder:n="Select a color",helperText:a,views:l={},size:i="md",shape:u="default",variant:c="default",error:d=!1,isDisabled:g=!1,isReadOnly:p=!1,predefinedColors:h=eb,showCustomInput:f=!0,showRecentColors:y=!0,isOpen:b,selectedColor:x,recentColors:C,customColor:k,handleToggle:w,handleColorSelect:v,handleCustomColorChange:S,handleCustomColorSubmit:I,handleClose:j,triggerRef:R,dropdownRef:z,onChange:E,onChangeComplete:W,onOpen:F,onClose:T,colorFormat:M,maxRecentColors:V,closeOnSelect:A,defaultValue:H,value:L,...O})=>{const _={...Po.container,...l==null?void 0:l.container},q={...Po.trigger,...Jx[i],...Qx[u],...Zx[c],...d&&{borderColor:"color-red-500"},...g&&{opacity:.6,cursor:"not-allowed"},...!g&&!p&&{_hover:{borderColor:"color-gray-400"}},...l==null?void 0:l.trigger},Y={...Po.dropdown,...l==null?void 0:l.dropdown},P={...Po.colorGrid,...l==null?void 0:l.colorGrid},B={...Po.recentColors,...l==null?void 0:l.recentColors},$=x||"color-gray-200";return t.jsxs(s.View,{id:e,..._,...O,children:[r&&t.jsx(s.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...l==null?void 0:l.label,children:r}),t.jsxs(s.View,{ref:R,onClick:g||p?void 0:w,...q,children:[t.jsxs(s.Horizontal,{alignItems:"center",gap:8,children:[t.jsx(s.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:$,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),t.jsx(s.Text,{color:x?"color-gray-900":"color-gray-500",fontSize:"inherit",children:x||n})]}),!p&&!g&&t.jsx(Se,{widthHeight:16,color:"color-gray-500",orientation:b?"up":"down"})]}),b&&t.jsxs(s.View,{ref:z,...Y,children:[t.jsx(s.View,{...P,children:h.map((D,N)=>t.jsx(s.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:D.value,borderWidth:"1px",borderStyle:"solid",borderColor:x===D.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>v(D.value),title:D.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...l==null?void 0:l.colorSwatch},N))}),f&&t.jsxs(s.View,{...Po.customInput,...l==null?void 0:l.customInput,children:[t.jsxs(s.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[ob&&t.jsx("input",{type:"color",value:k||"#1D4ED8",onChange:D=>{const N=D.target.value;S(N),v(N)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),t.jsx(s.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),t.jsx(Pe,{placeholder:"#1D4ED8",value:k,onChange:D=>{var N;return S(typeof D=="string"?D:((N=D==null?void 0:D.target)==null?void 0:N.value)??"")},onKeyPress:D=>{D.key==="Enter"&&I()},size:"sm",right:k&&t.jsx(s.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:k,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:I})})]}),y&&C.length>0&&t.jsxs(s.View,{...B,children:[t.jsx(s.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),t.jsx(s.Horizontal,{gap:8,flexWrap:"wrap",children:C.map((D,N)=>t.jsx(s.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:D,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>v(D),title:D,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},N))})]})]}),a&&t.jsx(s.Text,{fontSize:"11px",lineHeight:"16px",color:d?"color-red-500":"color-gray-500",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},rb=e=>{const o=Xx(e);return t.jsx(tb,{...o,...e})},bs=rb,nb=e=>{const o=Oi(e);return t.jsx(Ni,{...o,...e})},ks=nb,ab=["paragraph","h1","h2","h3","bullet","number","quote","codeBlock","table"];function yt(e){const o=e.trim();return!!o&&!/[\u0000-\u0020\u007f\\]/.test(o)&&(!/^[a-z][a-z\d+.-]*:/i.test(o)||/^(https?:|mailto:|tel:)/i.test(o))}function So(e,o=0,r=0){var i;if(r>20)return[{kind:"text",text:e,start:o,end:o+e.length}];const n=[];let a=0;const l=(u,c,d)=>n.push({kind:"text",text:u,start:o+c,end:o+d});for(;a<e.length;){if(e[a]==="\\"&&/[\\`*{}\[\]()#+.!_>~|]/.test(e[a+1]||"")){l(e[a+1],a+1,a+2),a+=2;continue}const u=/^<br\s*\/?\s*>/i.exec(e.slice(a));if(u){n.push({kind:"break",start:o+a,end:o+a+u[0].length}),a+=u[0].length;continue}const c=/^`+/.exec(e.slice(a));if(c){const h=e.indexOf(c[0],a+c[0].length);if(h>=0){n.push({kind:"code",text:e.slice(a+c[0].length,h),start:o+a,end:o+h+c[0].length,contentStart:o+a+c[0].length}),a=h+c[0].length;continue}}const d=/^\[([^\]\n]+)\]\(([^\s()]*)\)/.exec(e.slice(a));if(d){n.push({kind:"link",start:o+a,end:o+a+d[0].length,url:d[2],children:So(d[1],o+a+1,r+1)}),a+=d[0].length;continue}const g=[["***","***","bold"],["**","**","bold"],["__","__","bold"],["~~","~~","strikethrough"],["<u>","</u>","underline"],["`","`","code"],["*","*","italic"],["_","_","italic"]];let p=!1;for(const[h,f,y]of g){if(!e.startsWith(h,a))continue;let b=e.indexOf(f,a+h.length);for(;b>=0&&e[b-1]==="\\";)b=e.indexOf(f,b+f.length);if((h==="*"||h==="_")&&e.startsWith(h+h,b)){const k=e.indexOf(h+h,b+2);k>=0&&(b=e.indexOf(h,k+2))}if((h==="**"||h==="__")&&e[b+2]===h[0]&&(((i=e.slice(a+2,b).match(new RegExp(`\\${h[0]}(?!\\${h[0]})`,"g")))==null?void 0:i.length)||0)%2===1&&b++,b<=a+h.length||h==="_"&&/\w/.test(e[a-1]||"")&&/\w/.test(e[b+1]||""))continue;const x=e.slice(a+h.length,b);let C=y==="code"?void 0:So(x,o+a+h.length,r+1);h==="***"&&(C=[{kind:"italic",start:o+a+2,end:o+b+1,children:C}]),n.push({kind:y,start:o+a,end:o+b+f.length,text:y==="code"?x:void 0,children:C}),p=!0,a=b+f.length;break}p||(l(e[a],a,a+1),a++)}return n.reduce((u,c)=>{const d=u[u.length-1];return(d==null?void 0:d.kind)==="text"&&c.kind==="text"&&d.end===c.start?(d.text+=c.text,d.end=c.end):u.push(c),u},[])}function ir(e,o=[],r){var f,y,b;const n=e.replace(/^ {0,3}(`{3,}|~{3,})[^\n]*\n[\s\S]*?^ {0,3}\1\s*$/gm,"").replace(/`[^`\n]*`/g,""),a=/^(?:import |export |-{3,}\s*$|\+\+\+\s*$|\s*:::|\s*\[.+\]:|\s*#{4,}\s|\s*(?:\*\s*){3,}$|\s*(?:-\s*){3,}$|\s*(?:_\s*){3,}$|\s*={3,}\s*$)|!\[|\[\^[^\]]+\]|\$\$|\{[^}\n]*\}|<(?!(?:\/?u>|br\s*\/?>))\/?[A-Za-z!]|&(?:#\w+|\w+);/m.test(n)||/^[ \t]{2,}(?:`{3,}|~{3,})/m.test(e)||/^(?:>[ \t]*>| {1,3}#{1,6}\s|#{1,6}\t|[ \t]{2,}(?:>|#{1,6}\s|\|)|[ \t]*(?:[-*+] |\d+[.)] )\[[ xX]\])|(?: {2,}|\\)\r?$/m.test(n)||Array.from(n.matchAll(/\[[^\]\n]+\]\(([^)\n]*)\)/g)).some(x=>/[\s(]/.test(x[1])||!yt(x[1])),l=[],i=/[^\r\n]+|\r\n|\n|\r/g;let u=0;for(const x of e.matchAll(i))/^[\r\n]/.test(x[0])&&(l.push({text:e.slice(u,x.index),start:u,end:x.index}),u=x.index+x[0].length);(u<e.length||!l.length)&&l.push({text:e.slice(u),start:u,end:e.length});const c=[],d=new Set;let g=a;const p=/^\s*(?:[-*+] |\d+[.)] )/,h=/^\s*\|?\s*:?-{3,}:?\s*(?:\|\s*:?-{3,}:?\s*)+\|?\s*$/;for(let x=0;x<l.length;){if(!l[x].text.trim()){const M=x;for(;x<l.length&&!l[x].text.trim();)x++;const V=x-M,A=!c.length,H=A?Math.floor(V/2)+(x===l.length?1:0):x===l.length?Math.ceil(V/2):Math.floor(V/2);for(let L=0;L<H;L++){const O=((f=l[M+L*2+(A?0:1)])==null?void 0:f.start)??e.length,_=((y=o.find(q=>!q.raw&&!d.has(q.id)))==null?void 0:y.id)||Oo("block");d.add(_),c.push({id:_,kind:"paragraph",raw:"",body:"",start:O,end:O,bodyStart:O})}continue}const C=l[x];let k=x,w="paragraph",v=0,S;const I=/^(#{1,3}) (.*)$/.exec(C.text),j=/^ {0,3}(`{3,}|~{3,})([\w+-]*)\s*$/.exec(C.text);if(I)w=`h${I[1].length}`,v=I[1].length+1;else if(j){for(w="codeBlock",S=j[2],k++;k<l.length&&!new RegExp(`^ {0,3}${j[1][0]}{${j[1].length},}\\s*$`).test(l[k].text);)k++;k>=l.length&&(g=!0,k=l.length-1),v=C.end-C.start+(e.slice(C.end,C.end+2)===`\r
27
+ `?2:1)}else if(x+1<l.length&&C.text.includes("|")&&h.test(l[x+1].text))for(w="table",k=x+1;k+1<l.length&&l[k+1].text.trim()&&l[k+1].text.includes("|");)k++;else if(p.test(C.text)){for(w=/^\s*\d/.test(C.text)?"number":"bullet";k+1<l.length&&l[k+1].text.trim()&&(p.test(l[k+1].text)||/^\s{2,}\S/.test(l[k+1].text));)k++;v=C.text.match(p)[0].length}else if(/^> ?/.test(C.text))for(w="quote",v=C.text.match(/^> ?/)[0].length;k+1<l.length&&/^> ?/.test(l[k+1].text);)k++;else{for(;k+1<l.length&&l[k+1].text.trim()&&!/^(?:#{1,6} |>|`{3}|~{3})/.test(l[k+1].text)&&!p.test(l[k+1].text);)k++;/^ {4}\S/.test(C.text)&&(g=!0)}const R=e.slice(C.start,l[k].end),z=o.find(M=>M.id===r&&M.start===C.start&&!d.has(M.id)),E=o[c.length],W=z||o.find(M=>M.raw===R&&!d.has(M.id))||(E&&!d.has(E.id)&&e.indexOf(E.raw,l[k].end)<0?E:void 0),F=(W==null?void 0:W.id)||Oo("block");d.add(F);let T=R.slice(v);w==="codeBlock"&&(T=e.slice(C.start+v,l[k].start).replace(/\r?\n$/,"")),c.push({id:F,kind:w,raw:R,start:C.start,end:l[k].end,body:T,bodyStart:C.start+v,language:S}),x=k+1}return c.length||c.push({id:((b=o[0])==null?void 0:b.id)||Oo("block"),kind:"paragraph",raw:"",body:"",start:e.length,end:e.length,bodyStart:e.length}),{blocks:c,sourceMode:g}}function to(e,o,r){const n=Math.max(0,Math.min(o.start,e.length)),a=Math.max(n,Math.min(o.end,e.length));return e.slice(0,n)+r+e.slice(a)}function lb(e,o){const r=e.kind==="codeBlock"?e.body:e.raw.replace(/^(?:#{1,3} |\s*[-*+] |\s*\d+[.)] |> ?)/gm,"");if(o==="codeBlock"){const a="`".repeat(Math.max(3,...Array.from(r.matchAll(/`+/g),l=>l[0].length+1)));return`${a}
28
+ ${r}
29
+ ${a}`}if(o==="table")return`| Column 1 | Column 2 | Column 3 |
30
+ | --- | --- | --- |
31
+ | `+r.replace(/\|/g,"\\|").replace(/\r?\n/g," ")+" | | |";const n={paragraph:"",h1:"# ",h2:"## ",h3:"### ",bullet:"- ",number:"1. ",quote:"> "}[o];return r.split(/\r?\n/).map((a,l)=>o==="number"?`${l+1}. ${a}`:n+a).join(`
32
+ `)}function Ea(e,o){const r={...o},n=a=>{var d,g,p,h;(d=a.children)==null||d.forEach(n);const l=(g=a.children)==null?void 0:g[0],i=(p=a.children)==null?void 0:p[a.children.length-1],u=a.kind==="code"?a.contentStart:l==null?void 0:l.start,c=a.kind==="code"?a.contentStart+(((h=a.text)==null?void 0:h.length)||0):i==null?void 0:i.end;u!==void 0&&c!==void 0&&r.start<=u&&r.end>=c&&(r.start=Math.min(r.start,a.start),r.end=Math.max(r.end,a.end))};return e.filter(a=>a.kind!=="codeBlock"&&o.start<a.end&&o.end>a.start).forEach(a=>So(a.raw,a.start).forEach(n)),r}function ib(e,o,r,n,a){const l=[];for(const d of o){if(d.kind==="codeBlock"||d.end<=r.start||d.start>=r.end)continue;let g=d.start;d.raw.split(/\r?\n/).forEach((p,h)=>{var b;const f=g;g+=p.length+(d.raw.includes(`\r
33
+ `)?2:1);const y=(x,C)=>{const k={start:Math.max(r.start,x),end:Math.min(r.end,C)};k.end>k.start&&l.push(k)};if(d.kind==="table"){if(h===1)return;let x=p.startsWith("|")?1:0;for(let C=x;C<=p.length;C++)if(C===p.length||p[C]==="|"&&p[C-1]!=="\\"){const k=p.slice(x,C),w=k.trim(),v=f+x+k.indexOf(w);y(v,v+w.length),x=C+1}}else{const x=((b=p.match(/^(?:#{1,3} |\s*(?:[-*+] |\d+[.)] )|> ?)/))==null?void 0:b[0].length)||0;y(f+x,f+p.length)}})}let i=e;const u={...r},c=l.length>0&&l.every(d=>en(e,d,n,a).removed);for(const d of l.reverse()){const g=en(i,d,n,a);!c&&g.removed||(u.end=d.end===r.end?g.selection.end:u.end+g.value.length-i.length,d.start===r.start&&(u.start=g.selection.start),i=g.value)}return{value:i,selection:u}}function en(e,o,r,n){const a={bold:["**","**"],italic:["*","*"],underline:["<u>","</u>"],strikethrough:["~~","~~"],code:["`","`"]};let[l,i]=r==="link"?["[",`](${n})`]:a[r]||["",""];const u=e.slice(o.start,o.end)||r==="link"&&n||"",c=So(u);if(r!=="link"&&c.length===1&&c[0].kind===r&&c[0].end===u.length){const h=r==="code"?c[0].contentStart:l.length,f=r==="code"?h:i.length,y=u.slice(h,u.length-f);return{removed:!0,value:to(e,o,y),selection:{start:o.start,end:o.start+y.length}}}if(r==="code"&&(l=i="`".repeat(Math.max(1,...Array.from(u.matchAll(/`+/g),h=>h[0].length+1)))),e.slice(o.start-l.length,o.start)===l&&e.slice(o.end,o.end+i.length)===i)return{removed:!0,value:to(e,{start:o.start-l.length,end:o.end+i.length},u),selection:{start:o.start-l.length,end:o.end-l.length}};const d=[],g=h=>{var y;if((y=h.children)==null||y.forEach(g),h.kind!==r)return;const f=r==="code"?h.contentStart-h.start:l.length;d.push({start:h.start,end:h.start+f},{start:r==="link"?h.children[h.children.length-1].end:h.end-(r==="code"?f:i.length),end:h.end})};c.forEach(g);let p=u;return d.sort((h,f)=>f.start-h.start).forEach(h=>{p=p.slice(0,h.start)+p.slice(h.end)}),{value:to(e,o,l+p+i),selection:{start:o.start+l.length,end:o.start+l.length+p.length}}}const on=/^(\s*)([-*+] |\d+[.)] )/;function mt(e,o){var r,n,a,l;for(const i of So(e)){const u=((n=(r=i.children)==null?void 0:r[0])==null?void 0:n.start)??i.contentStart,c=((l=(a=i.children)==null?void 0:a[i.children.length-1])==null?void 0:l.end)??(u===void 0?void 0:i.end-(u-i.start));if(u!==void 0&&c!==void 0&&o>=u&&o<=c){const[d,g]=mt(e.slice(u,c),o-u),p=h=>h?e.slice(i.start,u)+h+e.slice(c,i.end):"";return[e.slice(0,i.start)+p(d),p(g)+e.slice(i.end)]}i.kind==="text"&&o===i.start&&e[o-1]==="\\"&&o--}return[e.slice(0,o),e.slice(o)]}function eo(e,o,r,n){return{value:to(e,o,r),selection:{start:n,end:n}}}function Cs(e,o,r,n=!1){var h,f,y;const a=o.find(b=>r.start>=b.start&&r.end<=b.end);if(!a)return null;const l=a.raw.includes(`\r
34
+ `)||e.includes(`\r
35
+ `)?`\r
36
+ `:`
37
+ `;if(a.kind==="codeBlock"||a.kind==="table"||n){if(a.kind==="table"&&/[|\r\n]/.test(e.slice(r.start,r.end)))return null;const b=a.kind==="codeBlock"?l:"<br>";return eo(e,r,b,r.start+b.length)}const i=r.start-a.start,u=r.end-a.start;let c,d;if(a.kind==="bullet"||a.kind==="number"){const b=a.raw.lastIndexOf(`
38
+ `,Math.max(0,i-1))+1,x=a.raw.indexOf(`
39
+ `,u),C=x<0?a.raw.length:x,k=a.raw.slice(b,a.raw.indexOf(`
40
+ `,i)<0?a.raw.length:a.raw.indexOf(`
41
+ `,i)).replace(/\r$/,""),w=((h=k.match(on))==null?void 0:h[0])||"",v=a.raw.lastIndexOf(`
42
+ `,Math.max(0,u-1))+1,S=a.raw.slice(v,C).replace(/\r$/,""),I=((f=S.match(on))==null?void 0:f[0])||"";c=mt(k.slice(w.length),Math.max(0,i-b-w.length))[0],d=mt(S.slice(I.length),Math.max(0,u-v-I.length))[1];const j=a.raw.slice(0,b).replace(/\r?\n$/,"");let R=a.raw.slice(C).replace(/^\r?\n/,"");if(!c&&!d){if(/^\s/.test(w)){const F=w.replace(/^(?: {1,2}|\t)/,""),T=[j,F,R].filter((M,V)=>M||V===1).join(l);return eo(e,a,T,a.start+(j?j.length+l.length:0)+F.length)}const W=[j,"",R].filter((F,T)=>F||T===1).join(l+l);return eo(e,a,W,a.start+(j?j.length+l.length*2:0))}const z=w.replace(/(\d+)([.)] )$/,(W,F,T)=>`${Number(F)+1}${T}`);if(/\d+[.)] $/.test(w)){const W=((y=w.match(/^\s*/))==null?void 0:y[0])||"";R=R.split(l).map(F=>F.replace(/^(\s*)(\d+)([.)] )/,(T,M,V,A)=>M===W?M+(Number(V)+1)+A:T)).join(l)}const E=[j,w+c,z+d,R].filter((W,F)=>W||F===1||F===2).join(l);return eo(e,a,E,a.start+(j?j.length+l.length:0)+w.length+c.length+l.length+z.length)}const g=a.raw.slice(0,a.bodyStart-a.start);c=mt(a.body,Math.max(0,i-g.length))[0],d=mt(a.body,Math.max(0,u-g.length))[1],!c&&d?d=g+d:(c=g+c,a.kind==="quote"&&d&&(d="> "+d));const p=c+l+l+d;return eo(e,a,p,a.start+c.length+l.length*2+(!c&&d?g.length:a.kind==="quote"&&d?2:0))}function sb(e){return e.kind==="codeBlock"?e.body.split(/\r?\n/).map(o=>{if(!o)return"";const r="`".repeat(Math.max(1,...Array.from(o.matchAll(/`+/g),n=>n[0].length+1)));return r+o+r}).join("<br>"):(e.kind==="quote"?e.raw.replace(/^> ?/gm,""):e.kind==="bullet"||e.kind==="number"?e.raw.replace(/^(\s*)([-*+] |\d+[.)] )/gm,""):e.body).replace(/\r?\n/g,"<br>")}function Ss(e,o,r,n){var d,g;const a=o.findIndex(p=>p.id===r),l=o[a],i=o[a-1];if(l&&n!==void 0&&(l.kind==="bullet"||l.kind==="number")){const p=l.raw.lastIndexOf(`
43
+ `,n-l.start-1)+1,h=(d=l.raw.slice(p).match(on))==null?void 0:d[0];if(!p||!h)return null;const f=p-(l.raw[p-2]==="\r"?2:1);let y=l.raw.slice(p+h.length);if(/\d+[.)] $/.test(h)){const b=((g=h.match(/^\s*/))==null?void 0:g[0])||"";y=y.replace(/(\r?\n)([ \t]*)(\d+)([.)] )/g,(x,C,k,w,v)=>k===b?C+k+Math.max(1,Number(w)-1)+v:x)}return eo(e,l,l.raw.slice(0,f)+y,l.start+f)}if(!l||!i||l.kind==="table"||i.kind==="table")return null;if(!i.raw)return eo(e,{start:i.start,end:l.end},l.raw,i.start+l.bodyStart-l.start);let u=sb(l);const c=i.kind==="codeBlock"?i.bodyStart+i.body.length:i.end;if(i.kind==="codeBlock"){const p=f=>f.map(y=>y.children?p(y.children):y.kind==="break"?`
44
+ `:y.text||"").join("");u=l.kind==="codeBlock"?l.body:p(So(u));const h=to(i.raw,{start:c-i.start,end:c-i.start},u);return eo(e,{start:i.start,end:l.end},h,c)}return eo(e,{start:i.end,end:l.end},u,c)}const ws={document:"Document",paragraph:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",bullet:"Bulleted list",number:"Numbered list",quote:"Quote",codeBlock:"Code block",table:"Table",blocks:"Blocks /",below:"Insert below",duplicate:"Duplicate",delete:"Delete",up:"Move up",down:"Move down",drag:"Drag block",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code",link:"Link",linkUrl:"Link address",invalidLink:"Enter an http, https, mailto, tel or relative link.",undo:"Undo",redo:"Redo",source:"Markdown source",visual:"Visual editor",emoji:"Insert emoji",sourceFallback:"This Markdown contains syntax that visual editing cannot preserve. Edit its source instead.",selectionToolbar:"Selection actions",askSelection:"Edit selection with AI",askSection:"Edit document with AI",aiPanel:"AI proposal",instruction:"Describe the change",generating:"Preparing proposal…",aiError:"Generation failed. Your text is unchanged.",proposal:"Proposal",apply:"Apply",discard:"Discard",cancel:"Close",retry:"Retry",generate:"Generate",stale:"The document has changed. Select the text again before generating a proposal.",selectionRequired:"Select text inside this editor first.",save:"Save",empty:"Write something…"};function cb(e){const o=e.value??e.defaultValue??"",r=m.useId(),[n,a]=m.useState(o),[l,i]=m.useState(()=>{const U=ir(o);return U.blocks.forEach((Q,ne)=>{Q.id=`${r}-block-${ne}`}),U}),[u,c]=m.useState({start:0,end:0}),[d,g]=m.useState(0),[p,h]=m.useState(!1),[f,y]=m.useState(null),[b,x]=m.useState(null),[C,k]=m.useState(!1),[w,v]=m.useState(""),[S,I]=m.useState(""),[j,R]=m.useState(null),[z,E]=m.useState(0),W={...ws,...e.labels},F=!!(e.isDisabled||e.isReadOnly),T=m.useRef({value:o,selection:u}),M=m.useRef(l),V=m.useRef({undo:[],redo:[],lastInput:0}),A=m.useRef(0),H=m.useRef(!1),L=m.useRef(!1),O=m.useRef(null),_=m.useRef(0),q=m.useRef(e);q.current=e;const Y=m.useRef(j);Y.current=j;const P=m.useRef(!0);m.useEffect(()=>(P.current=!0,()=>{P.current=!1,_.current++}),[]);const B=U=>{const Q={start:Math.max(0,Math.min(U.start,T.current.value.length)),end:Math.max(0,Math.min(U.end,T.current.value.length)),...U.backward?{backward:!0}:{}};Q.end<Q.start&&([Q.start,Q.end]=[Q.end,Q.start]),!(Q.start===T.current.selection.start&&Q.end===T.current.selection.end&&!!Q.backward==!!T.current.selection.backward)&&(V.current.lastInput=0,T.current.selection=Q,c(Q))},$=(U=T.current.selection)=>{B(U),H.current=!0,g(Q=>Q+1)},D=(U,Q=!0,ne)=>{const se=ir(U.value,M.current.blocks,ne);M.current=se,T.current=U,A.current++,i(se),a(U.value),c(U.selection),Q&&(H.current=!0,g(ge=>ge+1))};m.useEffect(()=>{e.value===void 0||e.value===T.current.value||(D({value:e.value,selection:{start:0,end:0}},!1),L.current=!1,H.current=!1,g(U=>U+1),V.current={undo:[],redo:[],lastInput:0},_.current++,R(null),x(null),k(!1),O.current=null,y(null),E(U=>U+1))},[e.value]),m.useEffect(()=>{F&&(L.current=!1,O.current=null,_.current++,R(null),x(null),k(!1))},[F]);const N=(U,Q=T.current.selection,ne=!1,se=!0,ge)=>{var xe,ze;if(F||U===T.current.value)return;const be=Date.now(),he=V.current;(!ne||be-he.lastInput>750||!he.undo.length)&&(he.undo.push({value:T.current.value,selection:{...T.current.selection}}),he.undo.length>100&&he.undo.shift()),he.lastInput=ne?be:0,he.redo=[],D({value:U,selection:Q},se,ge),E(Be=>Be+1),(ze=(xe=q.current).onChange)==null||ze.call(xe,U)},G=(U,Q=T.current.selection,ne=!1)=>{const se=to(T.current.value,Q,U);N(se,{start:Q.start+U.length,end:Q.start+U.length},ne)},K=(U,Q,ne,se=!0,ge=!1)=>{N(to(T.current.value,{start:U.start,end:U.end},Q),{start:U.start+ne.start,end:U.start+ne.end},se,ge,U.id)},re=(U=!1)=>{if(F||p||M.current.sourceMode)return!1;const Q=Cs(T.current.value,M.current.blocks,T.current.selection,U);return Q?(N(Q.value,Q.selection),!0):!1},oe=U=>{if(F||p||M.current.sourceMode)return!1;const Q=Ss(T.current.value,M.current.blocks,U);return Q?(N(Q.value,Q.selection),!0):!1},ie=(U=!1)=>{var be,he;if(F)return;const Q=V.current,ne=U?Q.redo:Q.undo,se=U?Q.undo:Q.redo,ge=ne.pop();if(!ge){$();return}se.push({value:T.current.value,selection:{...T.current.selection}}),Q.lastInput=0,D(ge),E(xe=>xe+1),(he=(be=q.current).onChange)==null||he.call(be,ge.value)},X=(U,Q)=>{if(F)return;const ne=M.current.blocks,se=ne.findIndex(ze=>ze.id===U);if(se<0||Q<0||Q>=ne.length||se===Q)return;const ge=[...ne],[be]=ge.splice(se,1);ge.splice(Q,0,be);let he=T.current.value.slice(0,ne[0].start),xe=0;ge.forEach((ze,Be)=>{ze.id===U&&(xe=he.length+be.bodyStart-be.start),he+=ze.raw+(Be+1<ne.length?T.current.value.slice(ne[Be].end,ne[Be+1].start):T.current.value.slice(ne[Be].end))}),M.current={...M.current,blocks:ge},N(he,{start:xe,end:xe})},ae=(U,Q)=>{var he,xe;if(F)return;const ne=M.current.blocks,se=ne.findIndex(ze=>ze.id===U),ge=ne[se];if(!ge)return;if(Q==="up"||Q==="down"){X(U,se+(Q==="up"?-1:1));return}if(Q==="delete"){const ze={start:se===ne.length-1&&se>0?ne[se-1].end:ge.start,end:((he=ne[se+1])==null?void 0:he.start)??ge.end};G("",ze);return}const be=`
45
+
46
+ `+(Q==="duplicate"?ge.raw:"");G(be,{start:ge.end,end:ge.end}),Q==="below"&&x(((xe=M.current.blocks.find(ze=>!ze.raw&&ze.start>=ge.end))==null?void 0:xe.id)||null)},pe=(U,Q)=>{const ne=M.current.blocks.find(ge=>ge.id===U);if(!ne)return;const se=lb(ne,Q);N(to(T.current.value,{start:ne.start,end:ne.end},se),{start:ne.start+se.length,end:ne.start+se.length}),x(null)},ue=()=>{F||(O.current={value:T.current.value,selection:{...T.current.selection}},L.current=!0,v(""),I(""),k(!0))},ke=(U=!0)=>{const Q=O.current;O.current=null,L.current=!1,k(!1),I(""),U&&(Q==null?void 0:Q.value)===T.current.value&&$(Q.selection)},ce=(U,Q)=>{if(F||U!=="link"&&T.current.selection.start===T.current.selection.end)return;if(U==="link"&&O.current){if(O.current.value!==T.current.value){ke(!1);return}B(O.current.selection)}if(U==="link"&&!yt(Q||"")){I(W.invalidLink);return}const ne=p||M.current.sourceMode||T.current.selection.start===T.current.selection.end?en(T.current.value,T.current.selection,U,Q):ib(T.current.value,M.current.blocks,T.current.selection,U,Q);N(ne.value,ne.selection),U==="link"&&ke(!1),I("")},le=U=>{if(F||!q.current.generate)return;const Q=U==="section"?{start:0,end:T.current.value.length}:T.current.selection;if(U==="selection"&&Q.start===Q.end){I(W.selectionRequired);return}_.current++,R({scope:U,target:{value:T.current.value,selection:{...Q}},revision:A.current,fragment:T.current.value.slice(Q.start,Q.end),prompt:"",state:"prompt"})},de=()=>{_.current++,R(null),H.current=!0,g(U=>U+1)},ee=async()=>{const U=Y.current;if(F||!(U!=null&&U.prompt.trim())||U.state==="loading"||U.revision!==A.current||!q.current.generate)return;const Q=++_.current;Y.current={...U,state:"loading"},R(Y.current);try{const ne=await q.current.generate(U.prompt.trim(),U.fragment,U.scope);if(!P.current||Q!==_.current)return;if(!ne.trim())throw new Error("empty-proposal");R({...U,result:ne,state:"proposal"})}catch{P.current&&Q===_.current&&R({...U,state:"error"})}},me=()=>{const U=Y.current;F||!(U!=null&&U.result)||U.revision!==A.current||U.target.value!==T.current.value||(G(U.result,U.target.selection),de())},J=()=>{h(U=>!U),H.current=!0,g(U=>U+1)},te=()=>{x(null),H.current=!0,g(U=>U+1)};return{value:n,document:l,selection:u,restoreVersion:d,restoreRequested:H,manualSource:p,toggleSource:J,source:p||l.sourceMode,activeId:f,setActiveId:y,commandId:b,setCommandId:x,closeCommand:te,linkOpen:C,openLink:ue,closeLink:ke,link:w,setLink:v,message:S,setMessage:I,labels:W,locked:F,capture:B,restoreSelection:$,holdSelection:L,current:T,commit:N,replace:G,editBlock:K,breakBlock:re,mergeBackward:oe,undo:ie,move:X,action:ae,transform:pe,format:ce,ai:j,setAi:R,openAi:le,closeAi:de,runAi:ee,applyAi:me,stale:!!j&&j.revision!==A.current,canUndo:!!V.current.undo.length,canRedo:!!V.current.redo.length,historyVersion:z}}const Aa=(e,o)=>{var i,u;if(!e)return!0;const r=e.toLowerCase(),n=o.name.toLowerCase().includes(r),a=((i=o.description)==null?void 0:i.toLowerCase().includes(r))||!1,l=((u=o.keywords)==null?void 0:u.some(c=>c.toLowerCase().includes(r)))||!1;return n||a||l},db=({open:e,onOpenChange:o,groups:r=[],commands:n=[],filter:a})=>{const[l,i]=m.useState(""),[u,c]=m.useState(0),d=m.useRef(null),g=m.useMemo(()=>a||Aa,[a]),p=m.useMemo(()=>[...r.flatMap(x=>x.commands),...n],[r,n]),h=m.useMemo(()=>l.trim()?p.filter(b=>g(l,b)):p,[p,l,g]),f=m.useMemo(()=>{if(!l)return r;const b=a||Aa;return r.map(x=>({...x,commands:x.commands.filter(C=>b(l,C))})).filter(x=>x.commands.length)},[r,l,a]);m.useEffect(()=>{c(0)},[h.length]);const y=m.useCallback(b=>{if(e)switch(b.key){case"ArrowDown":b.preventDefault(),c(x=>x<h.length-1?x+1:x);break;case"ArrowUp":b.preventDefault(),c(x=>x>0?x-1:x);break;case"Enter":b.preventDefault(),h[u]&&(h[u].onSelect(),o(!1),i(""));break;case"Escape":b.preventDefault(),o(!1),i("");break}},[e,h,u,o]);return m.useEffect(()=>{if(!(typeof document>"u"))return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[y]),m.useEffect(()=>{const b=d.current;if(b&&typeof b.querySelector=="function"&&e){const x=b.querySelector(`[data-index="${u}"]`);x&&typeof x.scrollIntoView=="function"&&x.scrollIntoView({block:"nearest"})}},[u,e]),m.useEffect(()=>{e?c(0):i("")},[e]),{search:l,setSearch:i,selectedIndex:u,setSelectedIndex:c,filteredCommands:h,filteredGroups:f,listRef:d}},ub=({onClose:e,children:o,...r})=>t.jsx(s.View,{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-dark-50-240",zIndex:9999,onClick:n=>{n.target===n.currentTarget&&(e==null||e())},...r,children:o}),js=m.forwardRef(({value:e,onValueChange:o,...r},n)=>t.jsx(s.Input,{value:e,onChange:a=>{var l,i;return o(typeof a=="string"?a:((l=a==null?void 0:a.target)==null?void 0:l.value)??((i=a==null?void 0:a.nativeEvent)==null?void 0:i.text)??"")},ref:n,...r}));js.displayName="CommandTextInput";const pb={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},mb=e=>({default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},outline:{backgroundColor:"color-white",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"}}),gb=mb(),hb={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},fb={overflow:"auto",padding:"8px 0"},yb={marginBottom:"8px"},xb={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},bb={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},kb={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},Cb={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},Sb={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},wb={display:"flex",flexDirection:"column",flex:1},jb={fontSize:"14px",fontWeight:"medium"},vb={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},Tb={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},Ib={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},Rb={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},Fb=m.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),zb=({value:e,children:o})=>t.jsx(Fb.Provider,{value:e,children:o}),vs=({value:e,onValueChange:o,placeholder:r="Type a command or search...",views:n,...a})=>{const l=m.useRef(null);return m.useEffect(()=>{l.current&&l.current.focus()},[]),t.jsxs(s.View,{...hb,...n==null?void 0:n.container,...a,children:[t.jsx(Qt,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),t.jsx(js,{width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",...n==null?void 0:n.input,value:e,onValueChange:o,placeholder:r,ref:l})]})},Mb=({children:e,views:o,...r})=>t.jsx(s.View,{...fb,...o==null?void 0:o.container,...r,children:e}),Ts=({heading:e,children:o,views:r,...n})=>t.jsxs(s.View,{...yb,...r==null?void 0:r.container,...n,children:[t.jsx(s.Text,{...xb,...r==null?void 0:r.heading,children:e}),o]}),tn=({item:e,selected:o=!1,onSelect:r,views:n,...a})=>{const l=()=>{!e.disabled&&r&&r()};return t.jsxs(s.Horizontal,{...bb,...o?kb:{},...e.disabled?Cb:{},onPress:l,onClick:l,...n==null?void 0:n.container,...a,children:[e.icon&&t.jsx(s.View,{...Sb,...n==null?void 0:n.icon,children:e.icon}),t.jsxs(s.Vertical,{...wb,...n==null?void 0:n.content,children:[t.jsx(s.Text,{...jb,...n==null?void 0:n.name,children:e.name}),e.description&&t.jsx(s.Text,{...vb,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&t.jsx(s.Text,{...Tb,...n==null?void 0:n.shortcut,children:e.shortcut})]})},Is=({children:e="No results found.",views:o,...r})=>t.jsx(s.View,{...Ib,...o==null?void 0:o.container,...r,children:e}),Wb=({open:e,onOpenChange:o,groups:r=[],commands:n=[],placeholder:a,size:l="md",variant:i="default",emptyState:u,footer:c,search:d,setSearch:g,selectedIndex:p,setSelectedIndex:h,filteredCommands:f,filteredGroups:y,listRef:b,views:x,filter:C,...k})=>{if(!e)return null;const w=m.useCallback(j=>{j.disabled||(j.onSelect(),o(!1),g(""))},[o,g]);m.useCallback(j=>j.target===j.currentTarget&&o(!1),[o]);const v=m.useMemo(()=>({search:d,setSearch:g,selectedIndex:p,setSelectedIndex:h,filteredCommands:f,onSelect:w}),[d,p,f,w,g,h]),S=r.length>0,I=f.length===0;return t.jsx(ub,{onClose:()=>o(!1),...k,children:t.jsx(zb,{value:v,children:t.jsxs(s.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...pb[l],...gb[i],...x==null?void 0:x.container,onClick:j=>j.stopPropagation(),children:[t.jsx(vs,{value:d,onValueChange:g,placeholder:a,views:x==null?void 0:x.searchInput}),t.jsx(s.View,{ref:b,flex:1,overflow:"auto",...x==null?void 0:x.list,children:I?u||t.jsx(Is,{views:x==null?void 0:x.empty}):S?y.map(j=>t.jsx(Ts,{heading:j.name,views:x==null?void 0:x.groupHeading,children:j.commands.map(R=>{const z=f.findIndex(E=>E.id===R.id);return t.jsx(tn,{item:R,selected:z===p,onSelect:()=>w(R),"data-index":z,views:{container:x==null?void 0:x.item,icon:x==null?void 0:x.icon,content:x==null?void 0:x.content,name:x==null?void 0:x.name,description:x==null?void 0:x.description,shortcut:x==null?void 0:x.shortcut}},R.id)})},j.id)):f.map((j,R)=>t.jsx(tn,{item:j,selected:R===p,onSelect:()=>w(j),"data-index":R,views:{container:x==null?void 0:x.item,icon:x==null?void 0:x.icon,content:x==null?void 0:x.content,name:x==null?void 0:x.name,description:x==null?void 0:x.description,shortcut:x==null?void 0:x.shortcut}},j.id))}),c&&t.jsx(s.View,{...Rb,...x==null?void 0:x.footer,children:c})]})})})},Eb=({open:e,onOpenChange:o,groups:r=[],commands:n=[],placeholder:a,size:l="md",variant:i="default",filter:u,emptyState:c,footer:d,views:g,...p})=>{const{search:h,setSearch:f,selectedIndex:y,setSelectedIndex:b,filteredCommands:x,filteredGroups:C,listRef:k}=db({open:e,onOpenChange:o,groups:r,commands:n,filter:u});return t.jsx(Wb,{open:e,onOpenChange:o,groups:r,commands:n,placeholder:a,size:l,variant:i,emptyState:c,footer:d,search:h,setSearch:f,selectedIndex:y,setSelectedIndex:b,filteredCommands:x,filteredGroups:C,listRef:k,views:g,...p})},Io=Eb;Io.Input=vs;Io.List=Mb;Io.Group=Ts;Io.Item=tn;Io.Empty=Is;function Ab({nodes:e,native:o=!1,codeFontFamily:r="monospace",isDisplay:n=!1,onLinkPress:a}){const l=(i,u)=>{var d,g,p,h;if(o){const f={bold:{fontWeight:"700"},italic:{fontStyle:"italic"},underline:{textDecorationLine:"underline"},strikethrough:{textDecorationLine:"line-through"},code:{fontFamily:r,backgroundColor:"color-gray-100"},link:{color:"theme-primary",textDecorationLine:"underline"},text:{},break:{}};return t.jsx(s.Text,{...f[i.kind],...n&&i.kind==="link"&&yt(i.url||"")?{accessibilityRole:"link",onPress:()=>a==null?void 0:a(i.url)}:{},children:i.kind==="break"?`
47
+ `:i.children?i.children.map(l):i.text},u)}if(i.kind==="text")return t.jsx("span",{"data-source-start":i.start,"data-source-end":i.end,children:i.text},u);if(i.kind==="break")return t.jsx("br",{"data-source-start":i.start,"data-source-end":i.end},u);if(i.kind==="code")return t.jsx("code",{children:t.jsx("span",{"data-source-start":i.contentStart??i.start+1,"data-source-end":(i.contentStart??i.start+1)+(((d=i.text)==null?void 0:d.length)||0),children:i.text})},u);if(i.kind==="link")return n&&yt(i.url||"")?t.jsx(hr,{href:i.url,display:"inline",color:"theme-primary",underline:"underline",_focusVisible:{outline:"2px solid currentColor",outlineOffset:2},onClick:a?f=>{f.preventDefault(),a(i.url)}:void 0,children:(g=i.children)==null?void 0:g.map(l)},u):t.jsx("a",{href:yt(i.url||"")?i.url:void 0,onClick:f=>f.preventDefault(),children:(p=i.children)==null?void 0:p.map(l)},u);const c={bold:"strong",italic:"em",underline:"u",strikethrough:"s"}[i.kind];return m.createElement(c,{key:u},(h=i.children)==null?void 0:h.map(l))};return t.jsx(t.Fragment,{children:e.map(l)})}function Rs({block:e,native:o=!1,codeFontFamily:r="monospace",isDisplay:n=!1,onLinkPress:a}){var u,c;const l=(d,g)=>!d&&!o&&!n?t.jsx("span",{"data-source-start":g,"data-source-end":g,children:t.jsx("br",{})}):t.jsx(Ab,{nodes:So(d,g),native:o,codeFontFamily:r,isDisplay:n,onLinkPress:a});if(e.kind==="codeBlock")return o?t.jsx(s.Text,{fontFamily:r,style:o?void 0:{whiteSpace:"pre-wrap"},children:e.body}):t.jsx(s.Element,{as:"pre",margin:0,padding:12,borderRadius:8,backgroundColor:"color-gray-100",fontFamily:r,style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:n?t.jsx("code",{children:e.body}):t.jsx("span",{"data-source-start":e.bodyStart,"data-source-end":e.bodyStart+e.body.length,children:e.body||t.jsx("br",{})})});if(e.kind==="table"){const d=e.raw.split(/\r?\n/)[1],g=d.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(y=>/:\s*$/.test(y)?/^\s*:/.test(y)?"center":"right":"left");let p=e.start;const h=e.raw.split(/\r?\n/).map(y=>{const b=p;p+=y.length+(e.raw.includes(`\r
48
+ `)?2:1);const x=[];let C=y.startsWith("|")?1:0;for(let k=C;k<=y.length;k++)if(k===y.length||y[k]==="|"&&y[k-1]!=="\\"){const w=y.slice(C,k),v=w.trim();(k!==y.length||v||y[y.length-1]!=="|")&&x.push({text:v,start:b+C+w.indexOf(v)}),C=k+1}return x}).filter((y,b)=>b!==1),f=t.jsx(Te,{children:t.jsxs(Te.Container,{"data-table-separator":o?void 0:d,minWidth:n?Math.max((((u=h[0])==null?void 0:u.length)||0)*140,320):void 0,children:[t.jsx(Te.Head,{children:t.jsx(Te.Row,{children:(c=h[0])==null?void 0:c.map((y,b)=>t.jsx(Te.HeadCell,{textAlign:g[b],children:l(y.text,y.start)},b))})}),t.jsx(Te.Body,{children:h.slice(1).map((y,b)=>t.jsx(Te.Row,{children:y.map((x,C)=>t.jsx(Te.Cell,{textAlign:g[C],children:l(x.text,x.start)},C))},b))})]})});return n?t.jsx(rs,{children:f}):f}if(e.kind==="bullet"||e.kind==="number"){let d=e.start;const g=e.raw.split(/\r?\n/).map((p,h)=>{var x;const f=d;d+=p.length+(e.raw.includes(`\r
49
+ `)?2:1);const y=/^(\s*)([-*+] |\d+[.)] )?(.*)$/.exec(p),b=l(y[3],f+y[1].length+(((x=y[2])==null?void 0:x.length)||0));return o?t.jsx(s.View,{paddingLeft:y[1].length*8,children:t.jsxs(s.Text,{children:[y[2]?/\d/.test(y[2])?y[2]:"• ":"",b]})},h):t.jsxs("li",{"data-list-indent":y[1],"data-list-marker":y[2]||"",style:{marginLeft:y[1].length*8,listStyleType:"none"},children:[y[2]&&t.jsx("span",{contentEditable:!1,"aria-hidden":"true",style:{display:"inline-block",marginLeft:-20,width:20},children:/\d/.test(y[2])?y[2]:"• "}),b]},h)});return o?t.jsx(s.View,{children:g}):e.kind==="number"?t.jsx("ol",{style:{margin:0,paddingLeft:24},children:g}):t.jsx("ul",{style:{margin:0,paddingLeft:24},children:g})}if(e.kind==="quote"){let d=e.start;const g=e.raw.split(/\r?\n/).map((p,h)=>{var b;const f=d;d+=p.length+(e.raw.includes(`\r
50
+ `)?2:1);const y=((b=p.match(/^> ?/))==null?void 0:b[0].length)||0;return t.jsxs(m.Fragment,{children:[h>0&&(o?`
51
+ `:t.jsx("br",{})),l(p.slice(y),f+y)]},h)});return o?t.jsx(s.View,{borderLeftWidth:3,borderColor:"color-gray-300",paddingLeft:12,children:t.jsx(s.Text,{children:g})}):t.jsx("blockquote",{style:{margin:0,borderLeft:"3px solid #d1d5db",paddingLeft:12},children:g})}if(o)return t.jsx(s.Text,{fontSize:e.kind==="h1"?28:e.kind==="h2"?24:e.kind==="h3"?20:16,fontWeight:e.kind==="paragraph"?"400":"700",children:l(e.body,e.bodyStart)});const i=e.kind==="paragraph"?"p":e.kind;return m.createElement(i,{style:{margin:0,minHeight:24}},e.body?l(e.body,e.bodyStart):t.jsx("span",{"data-source-start":e.bodyStart,"data-source-end":e.bodyStart,children:t.jsx("br",{})}))}function rn({state:e,props:o,preserve:r,formatting:n=!1}){var u;const a=e.selection.start!==e.selection.end,l=r?36:44,i=(c,d,g=!1,p)=>t.jsx(fe,{type:"button",size:"sm",variant:"outline",minWidth:l,minHeight:l,paddingHorizontal:10,views:{content:{fontSize:14,fontWeight:c==="bold"?"700":"600",fontStyle:c==="italic"?"italic":"normal",textDecoration:c==="underline"?"underline":c==="strikethrough"?"line-through":void 0}},"aria-label":c==="source"&&e.source?e.labels.visual:e.labels[c],title:e.labels[c],isDisabled:e.locked||g,onPointerDown:r,onMouseDown:r?h=>h.preventDefault():void 0,onClick:d,children:p||e.labels[c]},c);return t.jsxs(s.Horizontal,{role:"toolbar","aria-label":e.labels.selectionToolbar,gap:4,flexWrap:"wrap",alignItems:"center",...(u=o.views)==null?void 0:u.toolbar,children:[n?t.jsxs(t.Fragment,{children:[[["bold","B"],["italic","I"],["underline","U"],["strikethrough","S"],["code","</>"]].map(([c,d])=>i(c,()=>e.format(c),!a,d)),i("link",e.openLink),o.generate&&i("askSelection",()=>e.openAi("selection"),!a)]}):t.jsxs(t.Fragment,{children:[i("undo",()=>e.undo(),!e.canUndo),i("redo",()=>e.undo(!0),!e.canRedo),i("source",e.toggleSource,e.document.sourceMode,e.source?e.labels.visual:e.labels.source),o.generate&&i("askSection",()=>e.openAi("section")),o.onSave&&i("save",()=>{var c;return(c=o.onSave)==null?void 0:c.call(o)})]}),t.jsx(ks,{trigger:t.jsx(bt,{name:"smile",widthHeight:18,strokeWidth:2}),"aria-label":e.labels.emoji,isDisabled:e.locked,onPointerDown:r,onMouseDown:r?c=>c.preventDefault():void 0,onOpen:()=>{e.holdSelection.current=!0},onClose:()=>{e.holdSelection.current=!1},showRecentEmojis:!1,onChange:c=>e.replace(c),views:{container:{width:"auto"},trigger:{width:l,height:l,minHeight:l,boxSizing:"border-box",padding:0,justifyContent:"center",alignItems:"center"}}})]})}function Fs({state:e,views:o,floating:r=!1}){return!e.ai&&!e.linkOpen?null:t.jsxs(s.Vertical,{padding:16,gap:12,borderWidth:r?0:1,borderColor:"color-gray-200",borderRadius:12,...o==null?void 0:o.panel,children:[e.linkOpen&&t.jsxs(s.Vertical,{as:r?"form":void 0,role:"group","aria-label":e.labels.link,gap:8,minWidth:r?260:void 0,onSubmit:r?n=>{n.preventDefault(),e.format("link",e.link.trim())}:void 0,children:[t.jsx(Pe,{label:e.labels.linkUrl,value:e.link,isAutoFocus:!0,onChange:e.setLink}),e.message&&t.jsx(s.Text,{role:"alert",children:e.message}),t.jsxs(s.Horizontal,{gap:8,children:[t.jsx(fe,{type:r?"submit":"button",isDisabled:e.locked,onClick:r?void 0:()=>e.format("link",e.link.trim()),children:e.labels.apply}),t.jsx(fe,{type:"button",variant:"ghost",onClick:()=>{e.closeLink()},children:e.labels.cancel})]})]}),e.ai&&t.jsxs(s.Vertical,{role:"region","aria-label":e.labels.aiPanel,gap:8,children:[t.jsx(s.Text,{children:e.ai.scope==="section"?e.labels.askSection:e.labels.askSelection}),t.jsx(s.Text,{children:e.ai.fragment}),t.jsx(Tt,{label:e.labels.instruction,value:e.ai.prompt,isAutoFocus:!0,isDisabled:e.locked||e.ai.state==="loading",onChange:n=>e.setAi(a=>a&&{...a,prompt:n})}),e.ai.state==="loading"&&t.jsx(s.Text,{role:"status",children:e.labels.generating}),e.ai.state==="error"&&t.jsx(s.Text,{role:"alert",children:e.labels.aiError}),e.ai.state==="proposal"&&t.jsxs(s.Vertical,{gap:8,children:[t.jsx(s.Text,{fontWeight:"700",children:e.labels.proposal}),t.jsx(s.Text,{children:e.ai.result})]}),e.stale&&t.jsx(s.Text,{role:"status",children:e.labels.stale}),t.jsxs(s.Horizontal,{gap:8,flexWrap:"wrap",children:[e.ai.state==="proposal"&&t.jsx(fe,{type:"button",isDisabled:e.locked||e.stale,onClick:e.applyAi,children:e.labels.apply}),t.jsx(fe,{type:"button",isDisabled:e.locked||e.stale||e.ai.state==="loading"||!e.ai.prompt.trim(),onClick:()=>void e.runAi(),children:e.ai.state==="proposal"||e.ai.state==="error"?e.labels.retry:e.labels.generate}),t.jsx(fe,{type:"button",variant:"ghost",onClick:e.closeAi,children:e.labels.discard})]})]})]})}const nn=new WeakMap;function kt(e,o=!1){const r=e.ownerDocument.getSelection();if(!(r!=null&&r.anchorNode)||!r.focusNode||!e.contains(r.anchorNode)||!e.contains(r.focusNode))return null;const n=xt(e,r.anchorNode,r.anchorOffset),a=xt(e,r.focusNode,r.focusOffset);return n===null||a===null?null:{start:Math.min(n,a),end:Math.max(n,a),...o&&a<n?{backward:!0}:{}}}function xt(e,o,r){var c,d;const n=o.nodeType===1?o:o.parentElement,a=n==null?void 0:n.closest("[data-block-start]"),l=nn.get(o);if((l==null?void 0:l[r])!==void 0)return Number((a==null?void 0:a.dataset.blockStart)||0)+l[r];const i=n==null?void 0:n.closest("[data-source-start]");if(i&&e.contains(i)){if(o.nodeType===3&&i.childNodes.length===1)return Number(i.dataset.sourceStart)+r;const g=e.ownerDocument.createRange();return g.selectNodeContents(i),g.setEnd(o,r),Number(i.dataset.sourceStart)+g.toString().length}if(!a)return null;if(o.nodeType===1){const g=o.childNodes[r]||o.childNodes[r-1];if((g==null?void 0:g.nodeType)===1){const p=g,h=p.matches("[data-source-start]")?[p]:Array.from(p.querySelectorAll("[data-source-start]")),f=r===o.childNodes.length,y=f?h[h.length-1]:h[0];if(y)return Number(f?y.dataset.sourceEnd:y.dataset.sourceStart)}}const u=Array.from(a.querySelectorAll("[data-source-start]"));return Number(r===0?((c=u[0])==null?void 0:c.dataset.sourceStart)??a.dataset.blockStart:((d=u[u.length-1])==null?void 0:d.dataset.sourceEnd)??a.dataset.blockStart)}function zs(e,o){var c,d;const r=Array.from(e.querySelectorAll("[data-source-start]")),n=g=>{var y;let p,h=1/0;for(const b of r){const x=Number(b.dataset.sourceStart),C=Number(b.dataset.sourceEnd),k=g<x?x-g:g>C?g-C:0;k<h&&(p=b,h=k)}if(!p)return null;if(p.tagName==="BR"&&p.parentNode){const b=Array.from(p.parentNode.childNodes).indexOf(p);return[p.parentNode,b+(g>=Number(p.dataset.sourceEnd)?1:0)]}const f=p.firstChild;return(f==null?void 0:f.nodeType)===3?[f,Math.max(0,Math.min(g-Number(p.dataset.sourceStart),((y=f.textContent)==null?void 0:y.length)||0))]:[p,0]},a=n(o.start),l=n(o.end);if(!a||!l)return!1;const i=e.ownerDocument.createRange();i.setStart(...a),i.setEnd(...l),(d=(c=(o.backward?a:l)[0].parentElement)==null?void 0:c.closest('[contenteditable="true"]'))==null||d.focus({preventScroll:!0});const u=e.ownerDocument.getSelection();if(u!=null&&u.setBaseAndExtent){const g=o.backward?l:a,p=o.backward?a:l;u.setBaseAndExtent(...g,...p)}else u==null||u.removeAllRanges(),u==null||u.addRange(i),o.backward&&(u!=null&&u.extend)&&(u.collapse(...l),u.extend(...a));return!0}function Hb(e){const o=e.ownerDocument.getSelection();let r="",n,a;const l=(c,d)=>{const g=nn.get(c)||[];g[d]=r.length,nn.set(c,g),(o==null?void 0:o.anchorNode)===c&&o.anchorOffset===d&&(n=r.length),(o==null?void 0:o.focusNode)===c&&o.focusOffset===d&&(a=r.length)},i=c=>{r+=c},u=(c,d="",g=!1,p=!1)=>{var C;if(c.nodeType===3){const k=c.textContent||"";for(let w=0;w<=k.length;w++)l(c,w),w<k.length&&i(g?k[w]:k[w]===`
52
+ `&&p?`
53
+ > `:/[\\`*_[\]<>~|#+]/.test(k[w])?"\\"+k[w]:k[w]);return}if(c.nodeType!==1)return;const h=c,f=h.tagName.toLowerCase();if(["script","style","iframe","object","embed"].includes(f)||h.contentEditable==="false")return;const y={strong:["**","**"],b:["**","**"],em:["*","*"],i:["*","*"],u:["<u>","</u>"],s:["~~","~~"],del:["~~","~~"],strike:["~~","~~"],code:["`","`"],a:["[",`](${h.getAttribute("href")||""})`]};if(f==="code"){const k="`".repeat(Math.max(1,...Array.from((h.textContent||"").matchAll(/`+/g),w=>w[0].length+1)));y.code=[k,k]}if(f==="br"){l(c,0),i(p?`
54
+ > `:h.hasAttribute("data-source-start")?"<br>":`
55
+ `);return}if(["p","div","h1","h2","h3","blockquote","ul","ol","table"].includes(f)&&c!==e&&r&&!r.endsWith(g?`
56
+ `:`
57
+
58
+ `)&&i(g||r.endsWith(`
59
+ `)?`
60
+ `:`
61
+
62
+ `),/^h[123]$/.test(f)&&i("#".repeat(Number(f[1]))+" "),f==="blockquote"&&i("> "),f==="li"){r&&!r.endsWith(`
63
+ `)&&i(`
64
+ `);const k=((C=h.parentElement)==null?void 0:C.tagName)==="OL",w=h.parentElement?Array.from(h.parentElement.children).indexOf(h)+1:1;i((h.dataset.listIndent??d)+(h.dataset.listMarker??(k?`${w}. `:"- ")))}if(f==="table"){Array.from(h.querySelectorAll("tr")).forEach((w,v)=>{v&&i(`
65
+ `),i("| "),Array.from(w.children).forEach(S=>{u(S,d),i(" | ")}),v===0&&i(`
66
+ `+(h.dataset.tableSeparator||"| "+Array.from(w.children).map(()=>"---").join(" | ")+" |"))});return}!g&&y[f]&&h.textContent&&i(y[f][0]);const x=Array.from(c.childNodes);x.forEach((k,w)=>{l(c,w),u(k,f==="li"?d+" ":d,g||f==="code",p||f==="blockquote")}),l(c,x.length),!g&&y[f]&&h.textContent&&i(y[f][1])};return u(e,"",e.hasAttribute("data-code-block")),{text:r,selection:{start:Math.min(n??r.length,a??r.length),end:Math.max(n??r.length,a??r.length)}}}let Ha;function $t(e){var a,l,i;Ha??(Ha=new Intl.Segmenter(void 0,{granularity:"grapheme"}));const o=[],r=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT);let n;for(;n=r.nextNode();){if((a=n.parentElement)!=null&&a.closest('[contenteditable="false"]'))continue;if(n.nodeType===1){if(n.tagName!=="BR")continue;const d=n.parentNode,g=Array.from(d.childNodes).indexOf(n),p=d;if(p.dataset.sourceStart!==void 0&&p.dataset.sourceStart===p.dataset.sourceEnd&&!p.textContent){o.push({node:d,offset:0,source:Number(p.dataset.sourceStart)});continue}const h=n.dataset.sourceEnd!==void 0?Number(n.dataset.sourceEnd):xt(e,d,g+1);if(!o.length){const f=xt(e,d,g);f!==null&&o.push({node:d,offset:g,source:f})}h!==null&&Number.isFinite(h)&&((l=o[o.length-1])==null?void 0:l.source)!==h&&o.push({node:d,offset:g+1,source:h});continue}const u=n.textContent||"",c=[0,...Array.from(Ha.segment(u),d=>d.index+d.segment.length)];for(const d of c){const g=xt(e,n,d);g!==null&&((i=o[o.length-1])==null?void 0:i.source)!==g&&o.push({node:n,offset:d,source:g})}}if(!o.length){const u=e.querySelector("[data-source-start]");u&&o.push({node:u,offset:0,source:Number(u.dataset.sourceStart)})}return o}function Lt(e){var n,a;const o=e.node.ownerDocument.createRange();o.setStart(e.node,e.offset),o.collapse(!0);const r=(n=o.getBoundingClientRect)==null?void 0:n.call(o);return r!=null&&r.height?r:(a=e.node.nodeType===1?e.node:e.node.parentElement)==null?void 0:a.getBoundingClientRect()}function Va(e,o){var n,a,l;const r="p,h1,h2,h3,li,td,th,pre,blockquote,div";return e.node!==o.node&&e.offset===((n=e.node.textContent)==null?void 0:n.length)&&o.offset===0&&((a=e.node.parentElement)==null?void 0:a.closest(r))===((l=o.node.parentElement)==null?void 0:l.closest(r))}function Vb(e,o,r,n){var w,v,S,I,j;if(typeof Intl.Segmenter!="function")return null;const a=e.ownerDocument.getSelection(),l=kt(e,!0);if(!l||!(a!=null&&a.focusNode)||!a.anchorNode)return null;const i=Array.from(e.querySelectorAll("[data-block-id]")),u=o==="ArrowLeft"||o==="ArrowUp",c=o==="ArrowUp"||o==="ArrowDown",d=a.focusNode.nodeType===1?a.focusNode:a.focusNode.parentElement;let g=i.indexOf(d==null?void 0:d.closest("[data-block-id]"));if(g<0)return null;let p=$t(i[g]);if(!p.length)return null;const h=l.backward?l.start:l.end;let f=p.findIndex(R=>R.node===a.focusNode&&R.offset===a.focusOffset);f<0&&(f=p.reduce((R,z,E)=>Math.abs(z.source-h)<Math.abs(p[R].source-h)?E:R,0));let y=p[f],b=c?n??((w=Lt(y))==null?void 0:w.left)??0:null;if(!r&&l.start!==l.end&&!c){const R=u?l.start:l.end,z=i.find(W=>{const F=W.querySelectorAll("[data-source-start]");return F.length&&R>=Number(F[0].dataset.sourceStart)&&R<=Number(F[F.length-1].dataset.sourceEnd)});y=(z?$t(z):p).reduce((W,F)=>Math.abs(F.source-R)<Math.abs(W.source-R)?F:W)}else if(c){const R=Lt(y),z=(W,F)=>{const T=W.map(A=>({point:A,rect:Lt(A)})).filter(A=>A.rect&&(!F||!R||(u?A.rect.bottom<R.bottom-R.height/2:A.rect.top>R.top+R.height/2)));if(!T.length)return null;const M=u?Math.max(...T.map(A=>A.rect.top)):Math.min(...T.map(A=>A.rect.top));return T.filter(A=>Math.abs(A.rect.top-M)<Math.max(1,A.rect.height/2)).reduce((A,H)=>Math.abs(H.rect.left-b)<Math.abs(A.rect.left-b)?H:A).point},E=z(p,!0);E?y=E:(g+=u?-1:1,i[g]&&(y=z($t(i[g]),!1)??y))}else{const R=u?-1:1;let z=f+R;z>=0&&z<p.length&&(u?Va(p[z],p[f]):Va(p[f],p[z]))&&(z+=R),z>=0&&z<p.length?y=p[z]:(p=i[g+R]?$t(i[g+R]):[],p.length&&(y=p[u?p.length-1:0]))}const x=r?{node:a.anchorNode,offset:a.anchorOffset,source:l.backward?l.end:l.start}:y,C=(v=y.node.nodeType===1?y.node:y.node.parentElement)==null?void 0:v.closest("[data-editor-input]");C==null||C.focus({preventScroll:!0}),a.setBaseAndExtent(x.node,x.offset,y.node,y.offset);const k=Lt(y);return k&&(k.top<0||k.bottom>(((S=e.ownerDocument.defaultView)==null?void 0:S.innerHeight)??1/0))&&((j=(I=y.node.parentElement)==null?void 0:I.scrollIntoView)==null||j.call(I,{block:"nearest"})),{selection:{start:Math.min(x.source,y.source),end:Math.max(x.source,y.source),...y.source<x.source?{backward:!0}:{}},x:b}}function Pb(e,o,r,n,a=!1){const l=m.useRef(!1),i=m.useRef(null),[u,c]=m.useState(!1),d=m.useRef(null),g=m.useRef(null),p=m.useRef(null),h=()=>{l.current=!1,c(!1)};m.useEffect(()=>{const j=e.current.current.selection;!e.source&&!e.locked&&j.start===0&&j.end===e.value.length&&e.value.length>0&&(l.current=!0,c(!0)),(e.source||e.locked||e.current.current.selection.start===e.current.current.selection.end)&&h(),i.current=null,d.current=null,g.current=null,p.current=null},[e.value,e.source,e.locked]);const f=j=>{var z;const R=j instanceof Element?j.closest("[data-editor-input]"):null;return R&&((z=o.current)!=null&&z.contains(R))?R:null},y=j=>{if(l.current)return{start:0,end:e.current.current.value.length,...e.current.current.selection.backward?{backward:!0}:{}};if((j==null?void 0:j.tagName)==="TEXTAREA"){const R=j,z=Number(R.dataset.editorOffset||0);return{start:z+R.selectionStart,end:z+R.selectionEnd}}return o.current?kt(o.current,!0):null},b=j=>l.current||e.document.blocks.filter(R=>j.start<R.end&&j.end>R.start).length>1,x=(j,R,z)=>{if(e.source||j.tagName==="TEXTAREA")return null;if(R==="insertParagraph"||R==="insertLineBreak")return Cs(e.current.current.value,e.document.blocks,z,R==="insertLineBreak");const E=j.querySelector("[data-source-start]");if(R==="deleteContentBackward"&&z.start===z.end){const W=Array.from(j.querySelectorAll("li")).find(F=>{var T;return Number((T=F.querySelector("[data-source-start]"))==null?void 0:T.dataset.sourceStart)===z.start});if(z.start===Number(E==null?void 0:E.dataset.sourceStart)||W)return Ss(e.current.current.value,e.document.blocks,j.dataset.blockId||"",W&&z.start!==Number(E==null?void 0:E.dataset.sourceStart)?z.start:void 0)??{value:e.current.current.value,selection:z}}return null},C=()=>{var E,W,F;const j=(E=o.current)==null?void 0:E.ownerDocument.activeElement;if((j==null?void 0:j.tagName)==="INPUT"||(j==null?void 0:j.tagName)==="TEXTAREA"){const T=f(j);if(T){const M=y(T);M&&e.capture(M)}return null}const R=(W=o.current)==null?void 0:W.ownerDocument.getSelection();if(!(R!=null&&R.anchorNode)||!R.focusNode||!((F=o.current)!=null&&F.contains(R.anchorNode))||!o.current.contains(R.focusNode))return l.current&&h(),null;const z=y();return z&&e.capture(z),z},k=(j,R=!1)=>{const z=f(j.target);if(!z||z.tagName==="TEXTAREA")return;const E=y(z);!E||E.start===E.end||(j.clipboardData.setData("text/plain",e.current.current.value.slice(E.start,E.end)),j.preventDefault(),R&&!e.locked&&(e.capture(E),e.replace("",Ea(e.document.blocks,E)),h()))},w=j=>{if(j.defaultPrevented||j.nativeEvent.isComposing)return;const R=f(j.target);if(!R)return;const z=y(R);z&&e.capture(z);const E=j.key.toLowerCase();E==="tab"&&h();const W=(j.ctrlKey||j.metaKey)&&!j.altKey;if(W&&E==="a"&&!j.shiftKey&&R.tagName!=="TEXTAREA"){j.preventDefault();const F=R.ownerDocument.createRange();F.selectNodeContents(r.current);const T=R.ownerDocument.getSelection();T==null||T.removeAllRanges(),T==null||T.addRange(F),l.current=!0,c(!0),e.capture({start:0,end:e.current.current.value.length});return}if(l.current&&["arrowleft","arrowright","arrowup","arrowdown","home","end","escape"].includes(E)){if(j.shiftKey&&o.current&&zs(o.current,{start:0,end:e.current.current.value.length,...e.current.current.selection.backward?{backward:!0}:{}}),h(),!j.shiftKey){j.preventDefault();const F=e.document.blocks[0],T=e.document.blocks[e.document.blocks.length-1],M=["arrowleft","arrowup","home"].includes(E)?F.bodyStart:T.kind==="codeBlock"?T.bodyStart+T.body.length:T.end;e.restoreSelection({start:M,end:M})}if(!j.shiftKey)return}if(!e.source&&!e.locked&&!W&&!j.altKey&&R.tagName!=="TEXTAREA"&&["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(j.key)&&o.current){const F=Vb(o.current,j.key,j.shiftKey,i.current);if(F){j.preventDefault(),i.current=F.x,e.capture(F.selection);return}}else i.current=null;if(!e.locked){if(W){E==="z"||E==="y"?(j.preventDefault(),h(),e.undo(E==="y"||j.shiftKey)):E==="s"&&n?(j.preventDefault(),n()):E==="a"&&j.shiftKey&&a?(j.preventDefault(),e.openAi("selection")):["b","i","u"].includes(E)?(j.preventDefault(),e.format({b:"bold",i:"italic",u:"underline"}[E])):E==="k"&&(j.preventDefault(),e.openLink());return}if(!j.altKey&&z&&["enter","backspace"].includes(E)){const F=x(R,E==="enter"?j.shiftKey?"insertLineBreak":"insertParagraph":"deleteContentBackward",z);if(F){j.preventDefault(),e.commit(F.value,F.selection),h();return}}if(R.tagName!=="TEXTAREA"&&z&&z.start!==z.end&&["backspace","delete"].includes(E)){j.preventDefault(),e.replace("",Ea(e.document.blocks,z)),h();return}if(z&&b(z)){const F=E==="backspace"||E==="delete"?"":E==="enter"?`
67
+
68
+ `:j.key.length===1&&!j.altKey?j.key:null;if(F!==null){j.preventDefault(),e.replace(F,z,j.key.length===1),h();return}}}},v=j=>{var W;const R=f(j.target);if(!R||e.locked||j.isComposing||d.current)return;if(j.inputType==="historyUndo"||j.inputType==="historyRedo"){j.cancelable&&(j.preventDefault(),e.undo(j.inputType==="historyRedo"));return}const z=y(R);if(z){const F=x(R,j.inputType,z);if(F){e.capture(z),j.cancelable?(j.preventDefault(),e.commit(F.value,F.selection),h()):p.current=F;return}}if(!z||!b(z))return;const E=(W=j.inputType)!=null&&W.startsWith("delete")?"":["insertParagraph","insertLineBreak"].includes(j.inputType)?`
69
+
70
+ `:j.data;E!=null&&(j.cancelable?(j.preventDefault(),e.replace(E,z),h()):g.current={target:z,text:E})},S=m.useRef(v);return S.current=v,m.useEffect(()=>{const j=o.current,R=z=>S.current(z);return j==null||j.addEventListener("beforeinput",R,!0),()=>j==null?void 0:j.removeEventListener("beforeinput",R,!0)},[o]),{capture:C,selectedDocument:u,onKeyDown:w,onInputCapture:j=>{var W,F;const R=f(j.target),z=j.nativeEvent;if(!R||e.locked||z.isComposing||d.current)return;const E=p.current??x(R,z.inputType,e.current.current.selection);if(E){j.stopPropagation(),p.current=null,E.value===e.current.current.value?e.restoreSelection(E.selection):e.commit(E.value,E.selection),h();return}if(z.inputType==="historyUndo"||z.inputType==="historyRedo")j.stopPropagation(),e.undo(z.inputType==="historyRedo");else if(g.current||R.tagName!=="TEXTAREA"&&b(e.current.current.selection)&&(z.data!=null||(W=z.inputType)!=null&&W.startsWith("delete"))){j.stopPropagation();const{target:T,text:M}=g.current??{target:e.current.current.selection,text:(F=z.inputType)!=null&&F.startsWith("delete")?"":z.data};g.current=null,e.replace(M,T),h()}},onCopy:j=>k(j),onCut:j=>k(j,!0),onPaste:j=>{const R=f(j.target);if(!R||R.tagName==="TEXTAREA"||e.locked)return;const z=y(R);if(!z)return;j.preventDefault();const E=j.clipboardData.getData("text/plain");!E&&!Array.from(j.clipboardData.types||[]).includes("text/plain")||(e.capture(z),e.replace(E,z),h())},onPointerDownCapture:j=>{i.current=null,f(j.target)&&h()},onCompositionStartCapture:j=>{const R=f(j.target),z=R&&y(R);z&&b(z)&&!e.locked&&(d.current=z)},onCompositionEndCapture:j=>{const R=d.current;R&&(j.stopPropagation(),d.current=null,j.data?e.replace(j.data,R):e.restoreSelection(R),h())}}}function Db({rect:e,state:o,props:r,preserve:n}){const a=m.useRef(null),{themeMode:l}=s.useTheme(),[i,u]=m.useState({top:8,left:8});return m.useLayoutEffect(()=>{var d;const c=(d=a.current)==null?void 0:d.getBoundingClientRect();c&&u({left:Math.max(8,Math.min(e.left,window.innerWidth-c.width-8)),top:Math.max(8,Math.min(e.top-c.height-8>=8?e.top-c.height-8:e.bottom+8,window.innerHeight-c.height-8))})},[e,o.linkOpen,o.message]),m.useEffect(()=>{if(!o.linkOpen)return;const c=d=>{var g;d.target instanceof Node&&!((g=a.current)!=null&&g.contains(d.target))&&o.closeLink(!1)};return document.addEventListener("pointerdown",c,!0),()=>document.removeEventListener("pointerdown",c,!0)},[o.linkOpen]),t.jsx(s.View,{ref:a,"data-editor-selection-toolbar":"true","data-editor-link-popover":o.linkOpen?"true":void 0,role:o.linkOpen?"dialog":void 0,"aria-label":o.linkOpen?o.labels.link:void 0,position:"fixed",top:i.top,left:i.left,maxWidth:"calc(100vw - 16px)",maxHeight:"calc(100vh - 16px)",overflow:"auto",backgroundColor:l==="dark"?"color-gray-900":"color-white",borderWidth:1,borderStyle:"solid",borderColor:l==="dark"?"color-gray-600":"color-gray-300",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.18)",borderRadius:10,padding:6,zIndex:1e3,children:o.linkOpen?t.jsx(Fs,{state:o,views:r.views,floating:!0}):t.jsx(rn,{state:o,props:r,formatting:!0,preserve:n})})}function $b({block:e,state:o,label:r,views:n}){const a=m.useRef(null),l=m.useRef(!1),i=m.useMemo(()=>t.jsx(Rs,{block:e}),[e.id,e.start,o.restoreVersion]),u=()=>{if(!a.current||l.current||o.locked)return;const c=Hb(a.current);if(e.kind==="codeBlock"){const g=e.bodyStart-e.start;o.editBlock(e,to(e.raw,{start:g,end:g+e.body.length},c.text),{start:g+c.selection.start,end:g+c.selection.end},!0,!1);return}const d=ir(c.text);o.editBlock(e,c.text,c.selection,!0,d.blocks.length!==1||d.blocks[0].kind!==e.kind)};return t.jsx(s.View,{ref:a,"data-block-id":e.id,"data-block-start":e.kind==="codeBlock"?e.bodyStart:e.start,"data-code-block":e.kind==="codeBlock"?e.id:void 0,"data-editor-input":"true",contentEditable:!o.locked,suppressContentEditableWarning:!0,role:"textbox","aria-label":r,"aria-multiline":"true","aria-readonly":o.locked,minHeight:24,flex:1,outline:"none",...n==null?void 0:n.content,onFocus:()=>o.setActiveId(e.id),onBeforeInput:c=>{if(c.defaultPrevented)return;const d=a.current&&kt(a.current,!0);d&&o.capture(d)},onInput:c=>{u()},onCompositionStart:()=>{l.current=!0},onCompositionEnd:()=>{l.current=!1,u()},onKeyDown:c=>{if(c.nativeEvent.isComposing||o.locked)return;const d=a.current&&kt(a.current,!0);d&&o.capture(d),c.key==="/"&&!c.metaKey&&!c.ctrlKey&&!e.body.trim()&&(c.preventDefault(),o.setCommandId(e.id))},children:i},o.restoreVersion)}function Lb({state:e,...o}){const{value:r,defaultValue:n,onChange:a,generate:l,onSave:i,label:u=e.labels.document,isDisabled:c,isReadOnly:d,labels:g,views:p={},status:h,...f}=o,y=m.useRef(null),{themeMode:b}=s.useTheme(),[x,C]=m.useState(null),[k,w]=m.useState(null),v=m.useRef(null),S=m.useRef(null),I=Pb(e,y,v,i,!!o.generate);m.useLayoutEffect(()=>{if(!e.linkOpen||!y.current){w(null);return}const P=y.current.ownerDocument.getSelection(),B=P!=null&&P.rangeCount&&P.anchorNode&&y.current.contains(P.anchorNode)?P.getRangeAt(0).cloneRange():null,$=S.current??y.current.querySelector(`[data-block-id="${e.activeId}"]`)??v.current??y.current,D=()=>{const N=B==null?void 0:B.getBoundingClientRect(),G=N!=null&&N.height?N:$.getBoundingClientRect();w({top:G.top,bottom:G.bottom,left:G.left})};return D(),window.addEventListener("scroll",D,!0),window.addEventListener("resize",D),()=>{window.removeEventListener("scroll",D,!0),window.removeEventListener("resize",D)}},[e.linkOpen]);const j=m.useRef(null),R=m.useRef(null),z=m.useRef(null),E=m.useRef(null),W=m.useRef([]),F=m.useRef(null),[T,M]=m.useState(null),V=P=>{P.preventDefault()},A=()=>{var P;return Array.from(((P=v.current)==null?void 0:P.querySelectorAll("[data-editor-row]"))||[])},H=()=>{var P;z.current!==null&&window.cancelAnimationFrame(z.current),z.current=null,j.current=null,(P=R.current)==null||P.remove(),R.current=null,F.current=null,M(null)},L=(P,B)=>P>B.from&&P<=B.to?-B.extent:P>=B.to&&P<B.from?B.extent:0,O=(P,B)=>{const $=A()[P];return $?$.offsetTop+(P>B.from?$.offsetHeight-B.height:0):B.top},_=P=>{const B=F.current;if(!B||B.to===P)return;const $={...B,to:P,top:O(P,B)};F.current=$,M($)},q=P=>{const B=F.current;if(!B||!v.current)return null;const $=P-v.current.getBoundingClientRect().top;if($>=B.top&&$<=B.top+B.height)return B.to;const D=A();let N=0;return D.forEach((G,K)=>{K!==B.from&&$>=G.offsetTop+L(K,B)+G.offsetHeight/2&&N++}),N};m.useEffect(()=>{H()},[e.value,e.locked,e.source]),m.useEffect(()=>{if(T!=null&&T.id)return window.addEventListener("resize",H),()=>window.removeEventListener("resize",H)},[T==null?void 0:T.id]),m.useEffect(()=>()=>{var P;z.current!==null&&window.cancelAnimationFrame(z.current),(P=R.current)==null||P.remove(),W.current.forEach(B=>B.cancel())},[]),m.useLayoutEffect(()=>{var B;const P=E.current;P&&(E.current=null,W.current.forEach($=>$.cancel()),W.current=[],!((B=window.matchMedia)!=null&&B.call(window,"(prefers-reduced-motion: reduce)").matches)&&A().forEach($=>{const D=P.get($.dataset.editorRow),N=D===void 0?0:D-$.getBoundingClientRect().top;Math.abs(N)<1||!$.animate||W.current.push($.animate([{transform:`translateY(${N}px)`},{transform:"translateY(0)"}],{duration:180,easing:"cubic-bezier(0.2, 0, 0, 1)"}))}))}),m.useEffect(()=>{const P=()=>{var re;const B=y.current;if(!B||e.holdSelection.current||e.linkOpen)return;if(j.current){C(null);return}const $=B.ownerDocument.activeElement,D=I.capture()??kt(B),N=B.ownerDocument.getSelection(),G=$==null?void 0:$.matches("input[data-editor-input],textarea[data-editor-input]");if(D&&D.start!==D.end&&(N!=null&&N.rangeCount)&&!G&&!e.locked){const oe=N.getRangeAt(0).getBoundingClientRect();if(oe.bottom>0&&oe.top<window.innerHeight){C({top:oe.top,bottom:oe.bottom,left:oe.left});return}}C(null);const K=B.ownerDocument.getSelection();if(K&&!K.isCollapsed&&K.anchorNode&&!B.contains(K.anchorNode)&&!((re=K.anchorNode.parentElement)!=null&&re.closest("[data-editor-block-list]"))){const oe=e.current.current.selection.end;e.capture({start:oe,end:oe})}};return document.addEventListener("selectionchange",P),window.addEventListener("scroll",P,!0),window.addEventListener("resize",P),()=>{document.removeEventListener("selectionchange",P),window.removeEventListener("scroll",P,!0),window.removeEventListener("resize",P)}},[e.locked,e.source,e.linkOpen]),m.useLayoutEffect(()=>{!e.restoreVersion||!y.current||!e.restoreRequested.current||(e.restoreRequested.current=!1,e.source&&S.current?(S.current.focus({preventScroll:!0}),S.current.setSelectionRange(e.selection.start,e.selection.end,e.selection.backward?"backward":"forward")):zs(y.current,e.selection))},[e.restoreVersion,e.source]);const Y=()=>{S.current&&e.capture({start:S.current.selectionStart,end:S.current.selectionEnd,...S.current.selectionDirection==="backward"?{backward:!0}:{}})};return t.jsxs(s.Vertical,{ref:y,gap:12,minWidth:0,"aria-label":u,"aria-disabled":c,...f,...p.container,onCopy:I.onCopy,onCut:I.onCut,onPaste:I.onPaste,onPointerDownCapture:I.onPointerDownCapture,onInputCapture:I.onInputCapture,onCompositionStartCapture:I.onCompositionStartCapture,onCompositionEndCapture:I.onCompositionEndCapture,onDragOver:P=>{if(!j.current||e.locked)return;P.preventDefault(),P.dataTransfer.dropEffect="move";const B=q(P.clientY);B!==null&&_(B)},onDragLeave:P=>{const B=P.currentTarget.getBoundingClientRect();(P.clientX<B.left||P.clientX>B.right||P.clientY<B.top||P.clientY>B.bottom)&&F.current&&_(F.current.from)},onDrop:P=>{var $;if(!j.current||e.locked)return;P.preventDefault();const B=q(P.clientY);if(B!==null&&(($=e.document.blocks[B])==null?void 0:$.id)!==j.current){E.current=new Map(A().map(N=>[N.dataset.editorRow,N.getBoundingClientRect().top]));const D=F.current;D&&v.current&&E.current.set(D.id,v.current.getBoundingClientRect().top+O(B,D)),e.move(j.current,B)}H()},onKeyDown:P=>{P.nativeEvent.isComposing||(P.key==="Escape"&&(H(),e.setCommandId(null),e.linkOpen&&e.closeLink(),e.ai&&e.closeAi(),C(null)),I.onKeyDown(P))},children:[!d&&t.jsxs(s.Vertical,{position:"sticky",top:0,zIndex:10,backgroundColor:b==="dark"?"color-gray-900":"color-white",borderWidth:1,borderColor:"color-gray-200",borderStyle:"solid",borderRadius:8,padding:8,gap:4,children:[t.jsx(rn,{state:e,props:o,preserve:V}),e.source&&t.jsx(rn,{state:e,props:o,formatting:!0,preserve:V})]}),e.document.sourceMode&&t.jsx(s.Text,{role:"status",...p.notice,children:e.labels.sourceFallback}),e.message&&!e.linkOpen&&t.jsx(s.Text,{role:"status",...p.notice,children:e.message}),e.source?t.jsx(Tt,{value:e.value,"data-editor-input":"true","data-editor-offset":0,label:u,isDisabled:c,isReadOnly:d,inputRef:P=>{S.current=P},onSelect:Y,onFocus:Y,onChange:P=>e.commit(P,S.current?{start:S.current.selectionStart,end:S.current.selectionEnd}:e.selection,!0,!1),views:{textarea:{minHeight:240,fontFamily:"monospace",...p.source}}}):t.jsxs(s.Vertical,{ref:v,position:"relative",gap:12,"data-editor-block-list":"true",children:[T&&t.jsx(s.View,{"data-editor-drop-placeholder":T.to,"aria-hidden":"true",position:"absolute",left:0,right:0,top:0,height:T.height,borderWidth:1,borderStyle:"dashed",boxSizing:"border-box",borderColor:"theme-primary",borderRadius:8,backgroundColor:"theme-primary",opacity:.14,pointerEvents:"none",style:{transform:`translateY(${T.top}px)`,transition:T.reducedMotion?"none":"transform 180ms cubic-bezier(0.2, 0, 0, 1)"}}),e.document.blocks.map((P,B)=>{var $,D;return t.jsxs(s.Horizontal,{gap:8,alignItems:"flex-start",position:"relative",borderRadius:6,backgroundColor:I.selectedDocument?"theme-primary-100":e.activeId===P.id?"color-gray-50":void 0,_hover:{backgroundColor:"color-gray-50"},"data-editor-row":P.id,...p.block,opacity:(T==null?void 0:T.id)===P.id?0:(($=p.block)==null?void 0:$.opacity)??1,style:{...(D=p.block)==null?void 0:D.style,...T?{transform:`translateY(${L(B,T)}px)`,transition:T.reducedMotion?"none":"transform 180ms cubic-bezier(0.2, 0, 0, 1)"}:{}},children:[!d&&t.jsx(tt,{views:{menu:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",backgroundColor:b==="dark"?"color-gray-900":"color-white",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.18)"},item:{as:"button",type:"button",width:"100%",textAlign:"left",borderWidth:0,_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"}}},trigger:t.jsx(fe,{type:"button",size:"sm",variant:"ghost",isIcon:!0,minWidth:36,width:36,minHeight:36,padding:4,title:`${e.labels.drag} · ${e.labels.blocks}`,style:{userSelect:"none"},draggable:!e.locked,isDisabled:e.locked,cursor:T?"grabbing":"grab","aria-label":e.labels.drag,onDragStart:N=>{var K;if(e.locked){N.preventDefault();return}j.current=P.id,W.current.forEach(re=>re.cancel()),W.current=[];const G=N.currentTarget.closest("[data-editor-row]");if(G){const re=G.getBoundingClientRect(),oe=A(),ie=oe[B+1],X=oe[B-1],ae=ie?ie.offsetTop-G.offsetTop-G.offsetHeight:X?G.offsetTop-X.offsetTop-X.offsetHeight:0,pe={id:P.id,from:B,to:B,height:G.offsetHeight,extent:G.offsetHeight+Math.max(0,ae),top:G.offsetTop,reducedMotion:!!((K=window.matchMedia)!=null&&K.call(window,"(prefers-reduced-motion: reduce)").matches)};F.current=pe,z.current=window.requestAnimationFrame(()=>{z.current=null,F.current&&M(F.current)});const ue=G.cloneNode(!0);let ke="Canvas";for(let ce=G;ce;ce=ce.parentElement){const le=window.getComputedStyle(ce).backgroundColor;if(le!=="transparent"&&le!=="rgba(0, 0, 0, 0)"){ke=le;break}}Object.assign(ue.style,{position:"fixed",left:"-10000px",top:"0",width:`${re.width}px`,padding:"8px",boxSizing:"border-box",borderRadius:"8px",backgroundColor:ke,boxShadow:"0 8px 24px rgba(0,0,0,0.18)",opacity:"1"}),ue.dataset.editorDragPreview="true",ue.setAttribute("aria-hidden","true"),ue.inert=!0,ue.querySelectorAll("[contenteditable]").forEach(ce=>{ce.style.outline="none"}),G.ownerDocument.body.appendChild(ue),R.current=ue,N.dataTransfer.setDragImage(ue,N.clientX-re.left+8,N.clientY-re.top+8)}N.dataTransfer.setData("application/x-app-studio-block",P.id),N.dataTransfer.effectAllowed="move"},onDragEnd:H,children:t.jsx(hl,{widthHeight:18,strokeWidth:2})}),items:[{id:"transform",label:e.labels.blocks,disabled:e.locked,onClick:()=>e.setCommandId(P.id)},...["below","duplicate","up","down","delete"].map(N=>({id:N,label:e.labels[N],disabled:e.locked||N==="up"&&B===0||N==="down"&&B===e.document.blocks.length-1,onClick:()=>e.action(P.id,N)}))]},`${e.restoreVersion}-${e.commandId??""}`),t.jsx($b,{block:P,state:e,label:P.kind==="codeBlock"?e.labels.codeBlock:u,views:p})]},P.id)})]}),(e.linkOpen?k:!e.source&&x)&&!e.locked&&!e.ai&&t.jsx(Ct,{children:t.jsx(Db,{rect:e.linkOpen?k:x,state:e,props:o,preserve:V})}),t.jsx(Io,{open:!!e.commandId&&!e.locked,onOpenChange:P=>{P||e.closeCommand()},placeholder:e.labels.blocks,commands:ab.map(P=>({id:P,name:e.labels[P],onSelect:()=>{e.commandId&&e.transform(e.commandId,P)}}))}),e.ai&&t.jsx(Fs,{state:e,views:p}),h]})}const Bb=e=>{const o=cb(e);return t.jsx(Lb,{...e,state:o})};function _b({value:e,label:o,onLinkPress:r,labels:n,views:a={},native:l=!1,codeFontFamily:i="monospace",...u}){const c=m.useMemo(()=>ir(e),[e]);return t.jsx(s.Vertical,{gap:12,minWidth:0,...l?{accessibilityLabel:o}:{role:o?"region":void 0,"aria-label":o},...u,...a.container,children:c.sourceMode?t.jsxs(t.Fragment,{children:[t.jsx(s.Text,{...a.notice,children:(n==null?void 0:n.sourceFallback)??"This Markdown contains unsupported syntax. Its source is shown as plain text."}),t.jsx(s.Text,{fontFamily:i,...l?{selectable:!0}:{style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"}},...a.source,children:e})]}):c.blocks.filter(d=>d.raw).map(d=>t.jsx(s.View,{minWidth:0,...a.block,children:t.jsx(Rs,{block:d,native:l,codeFontFamily:i,isDisplay:!0,onLinkPress:r})},d.id))})}const Ob=e=>t.jsx(_b,{...e}),Nb=e=>{const o=Pi(e);return t.jsx(Di,{...o,...e})},qb=Nb,Pa={"to-right":"to right","to-left":"to left","to-bottom":"to bottom","to-top":"to top","to-top-right":"to top right","to-top-left":"to top left","to-bottom-right":"to bottom right","to-bottom-left":"to bottom left"},Bt={center:"center",top:"top",right:"right",bottom:"bottom",left:"left","top-right":"top right","top-left":"top left","bottom-right":"bottom right","bottom-left":"bottom left"},Ub={linear:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],radial:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],conic:[{color:"color-red-500",position:"0deg"},{color:"color-yellow-500",position:"90deg"},{color:"color-green-500",position:"180deg"},{color:"color-blue-500",position:"270deg"},{color:"color-red-500",position:"360deg"}]},Gb=(e,o,r,n,a)=>{const l=o.map(i=>`${i.color} ${i.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${r&&Pa[r]?Pa[r]:r||"to right"}, ${l})`;case"radial":const u=a&&Bt[a]?Bt[a]:a||"center";return`radial-gradient(${n||"circle"} at ${u}, ${l})`;case"conic":return`conic-gradient(from 0deg at ${a&&Bt[a]?Bt[a]:a||"center"}, ${l})`;default:return`linear-gradient(to right, ${l})`}},Yb={linear:{backgroundSize:"200% 200%",transition:"background-position 3s ease-in-out",animate:{from:{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},to:{backgroundPosition:"0% 50%"}}},radial:{backgroundSize:"100% 100%",transition:"background-position 3s ease-in-out, background-size 3s ease-in-out",animate:{from:{backgroundPosition:"center",backgroundSize:"100% 100%"},"50%":{backgroundSize:"120% 120%"},to:{backgroundPosition:"center",backgroundSize:"100% 100%"}}},conic:{transition:"transform 3s linear",animate:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}},Da={container:{position:"relative",overflow:"hidden",borderRadius:"8px",transition:"border-radius 0.2s ease, opacity 0.2s ease"},content:{position:"relative",zIndex:1,width:"100%",height:"100%",padding:"16px"}},Kb=({type:e="linear",direction:o="to-right",shape:r="circle",position:n="center",from:a,to:l,colors:i,animate:u=!1,animationDuration:c=3,children:d,views:g,themeMode:p,...h})=>{const f=m.useMemo(()=>i&&i.length>0?i:a&&l?[{color:a,position:"0%"},{color:l,position:"100%"}]:Ub[e],[i,a,l,e]),y=m.useMemo(()=>{const x=f.map(C=>({...C,color:C.color}));return Gb(e,x,o,r,n)},[e,f,o,r,n]),b=m.useMemo(()=>{if(!u)return{};const x=Yb[e];return{...x,transition:x.transition.replace("3s",`${c}s`),animationDuration:`${c}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[u,c,e]);return t.jsx(s.View,{background:y,...Da.container,...b,...g==null?void 0:g.container,...h,children:d&&t.jsx(s.View,{...Da.content,...g==null?void 0:g.content,children:d})})},Ms=e=>t.jsx(Kb,{...e}),Xb=(e=null,o=null)=>{const[r,n]=m.useState(e),[a,l]=m.useState(o),i=c=>a===c,u=c=>{l(d=>d===c?null:c)};return m.useEffect(()=>{const c=g=>{!g.composedPath().some(f=>(f==null?void 0:f.id)==="menubar-content"||(f==null?void 0:f.id)==="menubar-trigger")&&a!==null&&l(null)},d=g=>{g.key==="Escape"&&a!==null&&l(null)};if(!(typeof document>"u"))return document.addEventListener("mousedown",c),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",d)}},[a]),{activeMenuId:r,setActiveMenuId:n,openMenuId:a,setOpenMenuId:l,isMenuOpen:i,toggleMenu:u}},Ws={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},Jb={default:{backgroundColor:"transparent",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Qb={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},Gt={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},Es=m.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),kr=()=>m.useContext(Es),Zb=({value:e,children:o})=>t.jsx(Es.Provider,{value:e,children:o}),As=({children:e,orientation:o="horizontal",size:r="md",variant:n="default",views:a,...l})=>{const i=o==="horizontal"?s.Horizontal:s.Vertical;return t.jsx(i,{role:"menubar","aria-orientation":o,...Qb[o],...Jb[n],...a==null?void 0:a.container,...l,children:e})},Hs=({children:e,id:o,disabled:r=!1,views:n})=>{const{orientation:a}=kr(),l=a==="horizontal"?s.Horizontal:s.Vertical;return t.jsx(l,{role:"none",position:"relative",opacity:r?.5:1,pointerEvents:r?"none":"auto",...n==null?void 0:n.menu,children:m.Children.map(e,i=>m.isValidElement(i)?m.cloneElement(i,{...i.props,menuId:o}):i)})},Vs=({children:e,menuId:o,disabled:r=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:l,toggleMenu:i,isMenuOpen:u,size:c,triggerRefs:d}=kr(),g=m.useRef(null),p=a===o,h=u(o);m.useEffect(()=>(g.current&&o&&(d.current[o]=g.current),()=>{o&&delete d.current[o]}),[o,d]);const f=()=>{r||(l(o),i(o))};return t.jsx(s.View,{ref:g,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":h,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...Ws[c],...p?Gt.active:{},...r?Gt.disabled:{},_hover:r?{}:Gt.hover,onClick:f,...n==null?void 0:n.trigger,children:e})},Ps=({children:e,menuId:o,views:r})=>{const{isMenuOpen:n,orientation:a,triggerRefs:l}=kr(),i=m.useRef(null),[u,c]=m.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),d=n(o);if(m.useEffect(()=>{if(d&&i.current&&o&&l.current[o]){const p=i.current.getBoundingClientRect(),h=l.current[o].getBoundingClientRect(),f=Math.max(p.width||200,200),y=Math.max(p.height||150,150),b=window.innerWidth,x=window.innerHeight,C={top:h.top,right:b-h.right,bottom:x-h.bottom,left:h.left},k=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8}],w=k.find(j=>j.fits);if(w){c({x:w.x,y:w.y,placement:w.placement});return}const v=k.reduce((j,R)=>R.space>j.space?R:j);let S=v.x,I=v.y;S+f>b&&(S=b-f-8),S<8&&(S=8),I+y>x&&(I=x-y-8),I<8&&(I=8),c({x:S,y:I,placement:v.placement})}},[d,a,o,l]),!d)return null;const g={position:"fixed",left:u.x,top:u.y,zIndex:1e3};return t.jsx(s.View,{ref:i,id:"menubar-content",role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:g,...r==null?void 0:r.content,children:e})},Ds=({children:e,icon:o,disabled:r=!1,onClick:n,views:a})=>{const{size:l}=kr(),i=()=>{r||!n||n()};return t.jsxs(s.View,{role:"menuitem",cursor:r?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:r?.5:1,...Ws[l],_hover:r?{}:Gt.hover,onClick:i,...a==null?void 0:a.item,children:[o&&t.jsx(s.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},$s=({views:e})=>t.jsx(s.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),ek=({items:e,orientation:o,size:r,variant:n,views:a,themeMode:l})=>t.jsx(As,{orientation:o,size:r,variant:n,views:a,children:e.map(i=>t.jsxs(Hs,{id:i.id,disabled:i.disabled,views:a,children:[t.jsxs(Vs,{menuId:i.id,views:a,children:[i.icon&&t.jsx(s.View,{marginRight:8,...a==null?void 0:a.icon,children:i.icon}),i.label]}),i.items&&i.items.length>0&&t.jsx(Ps,{menuId:i.id,views:a,children:i.items.map((u,c)=>u.separator?t.jsx($s,{views:a},`separator-${c}`):t.jsx(Ds,{id:u.id,icon:u.icon,disabled:u.disabled,onClick:u.onClick,views:a,children:u.label},u.id))})]},i.id))}),ok=({items:e,orientation:o="horizontal",size:r="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:l=null,views:i,...u})=>{const{activeMenuId:c,setActiveMenuId:d,openMenuId:g,setOpenMenuId:p,isMenuOpen:h,toggleMenu:f}=Xb(a,l),y=m.useRef({});return t.jsx(Zb,{value:{activeMenuId:c,setActiveMenuId:d,openMenuId:g,setOpenMenuId:p,isMenuOpen:h,toggleMenu:f,orientation:o,size:r,variant:n,triggerRefs:y},children:t.jsx(ek,{items:e,orientation:o,size:r,variant:n,views:i,...u})})},Ro=ok;Ro.Root=As;Ro.Menu=Hs;Ro.Trigger=Vs;Ro.Content=Ps;Ro.Item=Ds;Ro.Separator=$s;const tk=(e,o,r)=>{const[n,a]=m.useState([]);return m.useEffect(()=>{a((()=>{const i=[];if(o<=r)for(let u=1;u<=o;u++)i.push(u);else{i.push(1);let u=Math.max(2,e-Math.floor((r-2)/2)),c=Math.min(o-1,u+r-3);c>=o-1&&(c=o-1,u=Math.max(2,c-(r-3))),u>2&&i.push("...");for(let d=u;d<=c;d++)i.push(d);c<o-1&&i.push("..."),i.push(o)}return i})())},[e,o,r]),{visiblePageNumbers:n}},Do={sm:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px",media:{mobile:{fontSize:"11px",padding:"3px 6px",minWidth:"24px",height:"24px"}}},md:{fontSize:"14px",padding:"6px 10px",minWidth:"32px",height:"32px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}},lg:{fontSize:"14px",padding:"8px 12px",minWidth:"36px",height:"36px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}}},it={default:{backgroundColor:"transparent",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-200"}},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}}},st={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},rk={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},_t={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},nk=({currentPage:e,totalPages:o,onPageChange:r,pageSize:n=10,pageSizeOptions:a=[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"100 / page",value:100}],onPageSizeChange:l,showPageSizeSelector:i=!1,showPageInfo:u=!0,maxPageButtons:c=5,showFirstLastButtons:d=!1,size:g="md",variant:p="default",shape:h="rounded",visiblePageNumbers:f=[],views:y,...b})=>{const x=w=>{w<1||w>o||w===e||r(w)},C=w=>{l&&l(Number(w.target.value))},k=(w,v)=>{if(w==="...")return t.jsx(s.View,{display:"flex",alignItems:"center",justifyContent:"center",...Do[g],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${v}`);const S=w===e;return t.jsx(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:S?"default":"pointer",...Do[g],...it[p],...st[h],...S?rk:{},onClick:()=>x(w),"aria-label":`Page ${w}`,"aria-current":S?"page":void 0,...S?y==null?void 0:y.activePageButton:y==null?void 0:y.pageButton,children:w},`page-${w}`)};return t.jsxs(s.Horizontal,{alignItems:"center",gap:8,...y==null?void 0:y.container,...b,children:[d&&t.jsxs(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Do[g],...it[p],...st[h],...e===1?_t:{},onClick:()=>x(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[t.jsx(Se,{orientation:"left",widthHeight:16}),t.jsx(Se,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),t.jsx(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Do[g],...it[p],...st[h],...e===1?_t:{},onClick:()=>x(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:t.jsx(Se,{orientation:"left",widthHeight:16})}),f.map((w,v)=>k(w,v)),t.jsx(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Do[g],...it[p],...st[h],...e===o?_t:{},onClick:()=>x(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:t.jsx(Se,{orientation:"right",widthHeight:16})}),d&&t.jsxs(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Do[g],...it[p],...st[h],...e===o?_t:{},onClick:()=>x(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[t.jsx(Se,{orientation:"right",widthHeight:16}),t.jsx(Se,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),u&&t.jsxs(s.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),i&&l&&t.jsx(s.View,{as:"select",marginLeft:16,padding:"4px 8px",borderRadius:"4px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"color-white",cursor:"pointer",value:n,onChange:C,...y==null?void 0:y.pageSizeSelector,children:a.map(w=>t.jsx("option",{value:w.value,children:w.label},w.value))})]})},ak=({currentPage:e,totalPages:o,onPageChange:r,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:i=!1,showPageInfo:u=!0,maxPageButtons:c=5,showFirstLastButtons:d=!1,size:g="md",variant:p="default",shape:h="rounded",views:f,...y})=>{const{visiblePageNumbers:b}=tk(e,o,c);return t.jsx(nk,{currentPage:e,totalPages:o,onPageChange:r,pageSize:n,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:i,showPageInfo:u,maxPageButtons:c,showFirstLastButtons:d,size:g,variant:p,shape:h,visiblePageNumbers:b,views:f,...y})},Ls=ak,lk=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),ik=m.memo(({shape:e="linear",value:o=0,max:r=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:l,size:i,radius:u=4,strokeWidth:c=10,showLabel:d=!1,labelColor:g="color-black-primary",animated:p=!0,animationDuration:h="0.5s",views:f,themeMode:y,...b})=>{var E;const{getColor:x,themeMode:C}=s.useTheme(),k=y||C,v=Math.min(r,Math.max(0,o))/r*100,S=W=>lk(W)?W:x(W,{themeMode:k}),I=m.useMemo(()=>S(a),[x,a,k]),j=m.useMemo(()=>S(n),[x,n,k]);if(e==="circle"){const W=i||(typeof l=="number"?l:100),F=(W-c)/2,T=2*Math.PI*F,M=T-v/100*T;return t.jsxs(s.View,{width:W,height:W,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...b,children:[t.jsxs("svg",{width:W,height:W,viewBox:`0 0 ${W} ${W}`,style:{transform:"rotate(-90deg)"},children:[t.jsx("circle",{cx:W/2,cy:W/2,r:F,stroke:I,strokeWidth:c,fill:"transparent",...f==null?void 0:f.track}),t.jsx("circle",{cx:W/2,cy:W/2,r:F,stroke:j,strokeWidth:c,strokeDasharray:T,strokeDashoffset:M,strokeLinecap:"round",fill:"transparent",style:{transition:p?`stroke-dashoffset ${h} ease-in-out`:"none"},...f==null?void 0:f.indicator})]}),d&&t.jsx(s.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:t.jsxs(s.Text,{color:g,fontSize:`${W*.2}px`,fontWeight:"bold",...f==null?void 0:f.text,children:[Math.round(v),"%"]})})]})}const R=l||8,z={backgroundColor:I,...((E=f==null?void 0:f.container)==null?void 0:E.style)||{},...b.style||{}};return t.jsxs(s.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":r,width:"100%",height:R,borderRadius:u,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...b,style:z,children:[t.jsx("div",{style:{height:"100%",backgroundColor:j,borderRadius:typeof u=="number"?`${u}px`:u,position:"absolute",left:0,top:0,bottom:0,width:`${v}%`,transition:p?`width ${h} ease-in-out`:"none",...f==null?void 0:f.bar}}),d&&t.jsxs(s.Text,{color:g,fontSize:typeof R=="number"&&R>16?`${R*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...f==null?void 0:f.text,children:[Math.round(v),"%"]})]})}),sk=e=>{const o=ve("progress",e);return t.jsx(ik,{...o})},Bs=sk,ck=e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}),dk=ck(),uk={thin:"1px",medium:"2px",thick:"4px"},ct={container:{transition:"opacity 0.15s ease"},label:{fontSize:"14px",fontWeight:"500",color:"color-gray-600",paddingHorizontal:"8px",backgroundColor:"color-white",transition:"color 0.15s ease"}},pk=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),mk=({orientation:e="horizontal",variant:o="solid",thickness:r="thin",color:n,spacing:a="0px",label:l,decorative:i=!1,views:u,themeMode:c,...d})=>{const{themeMode:g}=s.useTheme(),p=n||"color-gray-200",h=dk[o],f=uk[r],y=i?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},b=pk(p)?{style:{borderColor:p}}:{borderColor:p};return l&&e==="horizontal"?t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...y,...d,children:[t.jsx(s.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...b,...ct.container,...u==null?void 0:u.container}),t.jsx(s.Text,{...ct.label,...u==null?void 0:u.label,children:l}),t.jsx(s.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...b,...ct.container,...u==null?void 0:u.container})]}):e==="horizontal"?t.jsx(s.View,{height:"0px",width:"100%",borderTop:`${f} ${h}`,padding:a,...b,...ct.container,...y,...u==null?void 0:u.container,...d}):t.jsx(s.View,{width:"0px",height:"100%",borderLeft:`${f} ${h}`,padding:a,...b,...ct.container,...y,...u==null?void 0:u.container,...d})},_s=e=>{const o=ve("separator",e);return t.jsx(mk,{...o})},sr=_s,gk=_s,hk={xs:12,sm:14,md:16,lg:18,xl:20},fk=({isSupported:e,isSharing:o,onShare:r,label:n,children:a,icon:l,size:i,isDisabled:u,isLoading:c,iconPosition:d,disableWhenUnsupported:g=!0,...p})=>{const h=i??"md",f=l??t.jsx(bl,{widthHeight:hk[h],strokeWidth:1.5,filled:!1}),y=!!u||!e&&g,b=!!c||o;return t.jsx(fe,{...p,size:h,icon:f,iconPosition:d??"left",isDisabled:y,isLoading:b,onClick:r,children:a??n??"Share"})},$a=()=>typeof navigator>"u"?void 0:navigator,yk=(e,o)=>{if(!e||typeof e.share!="function")return!1;if(typeof e.canShare=="function")try{return e.canShare(o)}catch{return!1}return!0},xk=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},bk=e=>{const{shareData:o,onClick:r,onUnsupported:n,onShareStart:a,onShareSuccess:l,onShareCancel:i,onShareError:u}=e,[c,d]=m.useState(!1),g=m.useMemo(()=>yk($a(),o),[o]),p=m.useCallback((...h)=>{r==null||r(...h);const f=$a();if(!f||typeof f.share!="function"){n==null||n();return}if(!c){if(typeof f.canShare=="function")try{if(!f.canShare(o)){n==null||n();return}}catch(y){u==null||u(y);return}d(!0),a==null||a();try{f.share(o).then(()=>{l==null||l()}).catch(y=>{if(xk(y)==="AbortError"){i==null||i();return}u==null||u(y)}).finally(()=>{d(!1)})}catch(y){d(!1),u==null||u(y)}}},[c,r,i,u,a,l,n,o]);return{isSupported:g,isSharing:c,handleShare:p}},kk=e=>{const{isSupported:o,isSharing:r,handleShare:n}=bk(e),{shareData:a,onShareStart:l,onShareSuccess:i,onShareCancel:u,onShareError:c,onUnsupported:d,onClick:g,...p}=e;return t.jsx(fk,{...p,isSupported:o,isSharing:r,onShare:n})},Os=kk,Ck=({label:e,status:o="default",views:r,themeMode:n,...a})=>{const{themeMode:l}=s.useTheme(),i=zl();return t.jsxs(s.Horizontal,{alignItems:"center",gap:8,role:"status",...r==null?void 0:r.container,...a,children:[t.jsx(s.View,{"data-role":"status-dot","aria-hidden":"true",width:"8px",height:"8px",borderRadius:"50%",...i[o].indicator,...r==null?void 0:r.indicator}),e&&t.jsx(s.Text,{"data-role":"status-label",fontSize:"14px",lineHeight:"20px",...i[o].label,...r==null?void 0:r.label,children:e})]})},Yt=e=>{const o=ve("status",e);return t.jsx(Ck,{...o})},Sk=(e=!0,o,r,n)=>{const{on:a}=s.useResponsive(),l=a("mobile"),[i,u]=m.useState(o!==void 0?o:e);return m.useEffect(()=>{o!==void 0&&u(o)},[o]),{isExpanded:i,toggleExpanded:()=>{const p=!i;u(p),r&&r(p)},expand:()=>{i||(u(!0),r&&r(!0))},collapse:()=>{i&&(u(!1),r&&r(!1))},isMobile:l}},wk={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},jk=e=>({default:{backgroundColor:"color-white",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},subtle:{backgroundColor:"color-gray-50",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease"},elevated:{backgroundColor:"color-white",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",color:"color-gray-800",transition:"all 0.2s ease-in-out"}}),vk=jk(),Tk={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},Ik={none:{},low:{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},medium:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)"},high:{boxShadow:"0 10px 30px rgba(0, 0, 0, 0.15)"}},Rk={fast:"all 0.2s ease-in-out",normal:"all 0.3s ease-in-out",slow:"all 0.5s ease-in-out",bounce:"all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55)"},Ns=m.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),Cr=()=>m.useContext(Ns),Fk=({value:e,children:o})=>t.jsx(Ns.Provider,{value:e,children:o}),zk=({children:e,showToggleButton:o=!0,views:r,...n})=>{const{isExpanded:a,toggleExpanded:l,position:i}=Cr();return t.jsx(s.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...r==null?void 0:r.header,...n,children:a?t.jsxs(s.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&t.jsx(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...r==null?void 0:r.toggleButton,children:t.jsx(Se,{orientation:i==="left"?"left":"right",widthHeight:16,...r==null?void 0:r.toggleButtonIcon})})]}):t.jsx(s.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&t.jsx(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...r==null?void 0:r.toggleButton,children:t.jsx(Se,{orientation:i==="left"?"right":"left",widthHeight:16,...r==null?void 0:r.toggleButtonIcon})})})})},Mk=({children:e,views:o,...r})=>{const{isExpanded:n}=Cr();return t.jsx(s.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...r,children:e})},Wk=({children:e,views:o,...r})=>{const{isExpanded:n}=Cr();return t.jsx(s.View,{width:"100%",padding:n?"16px":"8px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...r,children:e})},Ek=({children:e,position:o="left",size:r="md",variant:n="default",fixed:a=!1,hasBackdrop:l=!0,expandedWidth:i,collapsedWidth:u,breakpoint:c,breakpointBehavior:d="overlay",elevation:g="none",transitionPreset:p="normal",ariaLabel:h="Sidebar navigation",showToggleButton:f,toggleExpanded:y,expand:b,isExpanded:x,isMobile:C,collapse:k,views:w,themeMode:v,...S})=>{const I=wk[r],j=x?i||I.expandedWidth:u||I.collapsedWidth,R=!C||C&&d!=="hide",z=a||C&&d==="overlay"?"fixed":"relative",E=l&&C&&x&&d==="overlay";return t.jsxs(t.Fragment,{children:[E&&t.jsx(s.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-dark-50-360",zIndex:998,onClick:k,...w==null?void 0:w.backdrop}),R&&t.jsx(s.Vertical,{position:z,top:0,height:"100vh",width:j,zIndex:999,transition:Rk[p],transform:C&&d==="overlay"&&!x?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":h,...vk[n],...Tk[o],...Ik[g],...w==null?void 0:w.container,...S,children:m.Children.map(e,W=>W)})]})},Ak=({children:e,position:o="left",size:r="md",variant:n="default",defaultExpanded:a=!0,expanded:l,onExpandedChange:i,fixed:u=!1,hasBackdrop:c=!0,showToggleButton:d=!0,expandedWidth:g,collapsedWidth:p,breakpoint:h=768,breakpointBehavior:f="overlay",views:y,...b})=>{const{isExpanded:x,toggleExpanded:C,expand:k,collapse:w,isMobile:v}=Sk(a,l,i);return t.jsx(Fk,{value:{isExpanded:x,toggleExpanded:C,expand:k,collapse:w,position:o,size:r,variant:n,views:y},children:t.jsx(Ek,{position:o,size:r,variant:n,fixed:u,hasBackdrop:c,showToggleButton:d,expandedWidth:g,collapsedWidth:p,breakpoint:h,breakpointBehavior:f,isExpanded:x,isMobile:v,toggleExpanded:C,expand:k,collapse:w,views:y,...b,children:e})})},Ft=Ak;Ft.Header=zk;Ft.Content=Mk;Ft.Footer=Wk;Ft.useContext=Cr;const Hk=()=>({getItem:e=>{try{return typeof localStorage>"u"?null:localStorage.getItem(`resizable-${e}`)}catch(o){return console.warn("Failed to access localStorage:",o),null}},setItem:(e,o)=>{try{if(typeof localStorage>"u")return;localStorage.setItem(`resizable-${e}`,o)}catch(r){console.warn("Failed to write to localStorage:",r)}}}),Vk=(e,o,r,n=50,a=1/0,l=!1,i,u,c=10)=>{const[d,g]=m.useState(!1),[p,h]=m.useState([]),f=m.useRef(null),y=m.useRef(null),b=m.useRef(0),x=m.useRef([]),C=m.useRef(u||(typeof window<"u"?Hk():null)),k=m.useCallback(()=>f.current?e==="horizontal"?f.current.offsetWidth:f.current.offsetHeight:0,[e]),w=m.useCallback(()=>{if(!i||!C.current)return null;const V=C.current.getItem(i);if(!V)return null;try{const A=JSON.parse(V);return Array.isArray(A.sizes)?A.sizes:null}catch(A){return console.warn("Failed to parse saved panel sizes:",A),null}},[i]),v=m.useCallback(()=>{if(!i||!C.current||p.length===0)return;const V=p.map(A=>({id:A.id,size:A.size,collapsed:A.collapsed||!1}));C.current.setItem(i,JSON.stringify({sizes:V}))},[i,p]),S=m.useCallback((V,A,H,L,O)=>{h(_=>_.some(q=>q.id===V)?_:[..._,{id:V,size:A,minSize:H??n,maxSize:L??a,collapsible:O??l,collapsed:!1}])},[n,a,l]),I=m.useCallback(V=>{h(A=>A.filter(H=>H.id!==V))},[]),j=m.useCallback(V=>{const A=p.find(H=>H.id===V);return A?A.size:0},[p]),R=m.useCallback((V,A)=>{h(H=>H.map(L=>L.id===V?{...L,size:A}:L))},[]),z=m.useCallback(V=>{const A=p.find(H=>H.id===V);return A?!!A.collapsed:!1},[p]),E=m.useCallback(V=>{h(A=>{const H=A.findIndex(q=>q.id===V);if(H===-1)return A;const L=A[H];if(!L.collapsible)return A;const O={...L,collapsed:!L.collapsed},_=[...A];return _[H]=O,_})},[]),W=m.useCallback((V,A)=>{y.current=V,b.current=A,x.current=p.map(H=>H.size),g(!0)},[p]),F=m.useCallback(V=>{if(!d||!y.current)return;const A=y.current,H=V-b.current;let L=-1;const O=A.match(/\d+$/);if(O&&(L=parseInt(O[0],10)-1),L===-1&&p.length>=2&&(L=0),L<0||L>=p.length-1)return;const _=p[L],q=p[L+1];if(_.collapsed||q.collapsed)return;let Y=x.current[L]+H,P=x.current[L+1]-H;Y=Math.max(_.minSize??n,Math.min(_.maxSize??a,Y)),P=Math.max(q.minSize??n,Math.min(q.maxSize??a,P)),h(B=>B.map(($,D)=>D===L?{...$,size:Y}:D===L+1?{...$,size:P}:$))},[d,p,e,n,a]),T=m.useCallback(()=>{d&&r&&r(p.map(V=>V.size)),y.current=null,g(!1),i&&v()},[d,p,r,i,v]),M=m.useCallback(V=>{if(!d||!y.current)return;const A=y.current;let H=-1;const L=A.match(/\d+$/);if(L&&(H=parseInt(L[0],10)-1),H===-1&&p.length>=2&&(H=0),H<0||H>=p.length-1)return;let O=0;e==="horizontal"?(V.key==="ArrowLeft"&&(O=-c),V.key==="ArrowRight"&&(O=c),V.key==="Home"&&(O=-100),V.key==="End"&&(O=100)):(V.key==="ArrowUp"&&(O=-c),V.key==="ArrowDown"&&(O=c),V.key==="Home"&&(O=-100),V.key==="End"&&(O=100)),O!==0&&(V.preventDefault(),F(b.current+O)),V.key==="Escape"&&(h(_=>_.map((q,Y)=>({...q,size:x.current[Y]}))),T())},[d,p,e,F,T,c]);return m.useEffect(()=>{if(typeof document>"u")return;const V=L=>{if(!d)return;const O=e==="horizontal"?L.clientX:L.clientY;F(O)},A=L=>{if(!d||L.touches.length===0)return;const O=L.touches[0],_=e==="horizontal"?O.clientX:O.clientY;F(_)},H=()=>{d&&T()};return d&&(document.addEventListener("mousemove",V),document.addEventListener("touchmove",A),document.addEventListener("mouseup",H),document.addEventListener("touchend",H),document.addEventListener("keydown",M),document.body.style.cursor=e==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",V),document.removeEventListener("touchmove",A),document.removeEventListener("mouseup",H),document.removeEventListener("touchend",H),document.removeEventListener("keydown",M),document.body.style.cursor="",document.body.style.userSelect=""}},[d,e,F,T,M]),m.useEffect(()=>{if(p.length!==0){if(i){const V=w();if(V){h(A=>A.map(H=>{const L=V.find(O=>O.id===H.id);return L?{...H,size:L.size,collapsed:L.collapsed||!1}:H}));return}}if(!o){const A=k()/p.length;h(H=>H.map(L=>({...L,size:A})))}}},[p.length,o,k,i,w]),m.useEffect(()=>{if(!o||o.length===0||p.length===0)return;const V=k(),A=o.map(H=>typeof H=="string"&&H.endsWith("%")?parseFloat(H)/100*V:typeof H=="number"?H:parseFloat(H));h(H=>H.map((L,O)=>({...L,size:O<A.length?A[O]:L.size})))},[o,p.length,k]),m.useEffect(()=>{p.length>0&&i&&!d&&v()},[p,i,d,v]),{isResizing:d,setIsResizing:g,containerRef:f,panels:p,registerPanel:S,unregisterPanel:I,getPanelSize:j,setPanelSize:R,isPanelCollapsed:z,togglePanelCollapse:E,startResize:W,onResize:F,endResize:T}},Pk={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},Dk=(e,o)=>({sm:{width:o==="horizontal"?"4px":"100%",height:o==="vertical"?"4px":"100%"},md:{width:o==="horizontal"?"6px":"100%",height:o==="vertical"?"6px":"100%"},lg:{width:o==="horizontal"?"8px":"100%",height:o==="vertical"?"8px":"100%"}})[e],$k=e=>({default:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}},subtle:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-100"},_active:{backgroundColor:"color-gray-200"}},prominent:{backgroundColor:"color-gray-100",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}}}),Lk=$k(),Ot={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},qs=m.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),Us=()=>m.useContext(qs),Bk=({value:e,children:o})=>t.jsx(qs.Provider,{value:e,children:o}),_k=({children:e,id:o,defaultSize:r,minSize:n,maxSize:a,collapsible:l,defaultCollapsed:i,onCollapseChange:u,views:c,...d})=>{const{orientation:g,registerPanel:p,unregisterPanel:h,getPanelSize:f,isPanelCollapsed:y,togglePanelCollapse:b}=Us(),x=typeof r=="string"&&r.endsWith("%")?0:typeof r=="number"?r:0;m.useEffect(()=>(p(o,x,n,a,l),()=>h(o)),[o,x,n,a,l,p,h]);const C=f(o),k=y(o);return m.useEffect(()=>{u&&k!==void 0&&u(k)},[k,u]),m.useEffect(()=>{l&&i&&!k&&b(o)},[o,l,i,k,b]),k?t.jsx(s.View,{flex:"0 0 auto",width:g==="horizontal"?"10px":"100%",height:g==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>b(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...c==null?void 0:c.collapsedPanel,...d}):t.jsx(s.View,{flex:C>0?"0 0 auto":"1",width:g==="horizontal"?`${C}px`:"100%",height:g==="vertical"?`${C}px`:"100%",overflow:"auto",...c==null?void 0:c.panel,...d,children:e})},Ok=({id:e,position:o="both",disabled:r=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:l,views:i,...u})=>{const{orientation:c,size:d,variant:g,startResize:p,isPanelCollapsed:h,togglePanelCollapse:f}=Us(),b=(()=>{if(l)return l;const S=e.match(/\d+$/);if(!S)return"";const I=parseInt(S[0],10);return isNaN(I)?"":`panel${I}`})(),x=h(b),C=S=>{if(r)return;S.preventDefault();const I=c==="horizontal"?S.clientX:S.clientY;p(e,I)},k=S=>{if(r||S.touches.length===0)return;S.preventDefault();const I=S.touches[0],j=c==="horizontal"?I.clientX:I.clientY;p(e,j)},w=S=>{r||(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),p(e,0))},v=S=>{S.stopPropagation(),b&&f(b)};return t.jsxs(s.View,{role:"separator","aria-orientation":c,"aria-valuemin":0,"aria-valuemax":100,tabIndex:r?-1:0,cursor:c==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...Dk(d,c),...Lk[g],onMouseDown:C,onTouchStart:k,onKeyDown:w,opacity:r?.5:1,pointerEvents:r?"none":"auto",...i==null?void 0:i.handle,...u,children:[n&&t.jsx(s.View,{display:"flex",alignItems:"center",justifyContent:"center",width:c==="horizontal"?"100%":"auto",height:c==="vertical"?"100%":"auto",pointerEvents:"none",...i==null?void 0:i.handleIcon,children:c==="horizontal"?t.jsxs(s.Horizontal,{gap:1,children:[t.jsx(s.View,{...Ot.horizontal}),t.jsx(s.View,{...Ot.horizontal})]}):t.jsxs(s.Vertical,{gap:1,children:[t.jsx(s.View,{...Ot.vertical}),t.jsx(s.View,{...Ot.vertical})]})}),a&&b&&t.jsx(s.View,{position:"absolute",top:c==="horizontal"?"-20px":"50%",left:c==="horizontal"?"50%":"-20px",transform:c==="horizontal"?"translateX(-50%)":"translateY(-50%)",width:"16px",height:"16px",borderRadius:"full",backgroundColor:"color-gray-100",border:"1px solid",borderColor:"color-gray-300",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:1,onClick:v,"aria-label":x?`Expand panel ${b}`:`Collapse panel ${b}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...i==null?void 0:i.collapseIcon,children:t.jsx(s.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:x?t.jsxs(s.Horizontal,{children:[t.jsx(s.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),t.jsx(s.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):t.jsx(s.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},Nk=({children:e,orientation:o="horizontal",size:r="md",variant:n="default",defaultSizes:a,minSize:l,maxSize:i,collapsible:u=!1,containerRef:c,autoSaveId:d,keyboardResizeBy:g,onLayout:p,views:h,...f})=>{const y=o==="horizontal"?s.Horizontal:s.Vertical;return t.jsx(y,{ref:c,width:"100%",height:"100%",position:"relative",overflow:"hidden",...Pk[o],...h==null?void 0:h.container,...f,children:e})},qk=({children:e,orientation:o="horizontal",size:r="md",variant:n="default",defaultSizes:a,onSizesChange:l,minSize:i=50,maxSize:u,collapsible:c=!1,autoSaveId:d,storage:g,keyboardResizeBy:p=10,views:h,...f})=>{const{isResizing:y,setIsResizing:b,containerRef:x,registerPanel:C,unregisterPanel:k,getPanelSize:w,setPanelSize:v,isPanelCollapsed:S,togglePanelCollapse:I,startResize:j,onResize:R,endResize:z}=Vk(o,a,l,i,u,c,d,g,p);return t.jsx(Bk,{value:{orientation:o,size:r,variant:n,isResizing:y,setIsResizing:b,registerPanel:C,unregisterPanel:k,getPanelSize:w,setPanelSize:v,isPanelCollapsed:S,togglePanelCollapse:I,startResize:j,onResize:R,endResize:z},children:t.jsx(Nk,{orientation:o,size:r,variant:n,defaultSizes:a,minSize:i,maxSize:u,collapsible:c,autoSaveId:d,keyboardResizeBy:p,containerRef:x,views:h,...f,children:e})})},Kn=qk;Kn.Panel=_k;Kn.Handle=Ok;const Nt={info:{container:{backgroundColor:"color-blue-50",border:"color-blue-300"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",border:"color-green-300"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},warning:{container:{backgroundColor:"color-orange-50",border:"color-orange-300"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}},error:{container:{backgroundColor:"color-red-50",border:"color-red-300"},content:{color:"color-red-700"},icon:{color:"color-red-500"}}},Uk={top:{top:"16px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"16px",right:"16px"},"top-left":{top:"16px",left:"16px"},bottom:{bottom:"16px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"16px",right:"16px"},"bottom-left":{bottom:"16px",left:"16px"}},Gk=()=>Math.random().toString(36).substring(2,9);let $o=new Map;const zt=Qo.create(e=>({toasts:[],add:(o,r,n,a={})=>{const l=a.id||Gk(),i={id:l,variant:o,title:r,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(u=>({toasts:[...u.toasts,i]})),a.duration!==0){const u=a.duration||5e3,c=setTimeout(()=>{zt.getState().remove(l)},u);$o.set(l,c)}return l},remove:o=>{e(r=>({toasts:r.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),$o.has(o)&&(clearTimeout($o.get(o)),$o.delete(o)),setTimeout(()=>{e(r=>({toasts:r.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{$o.forEach(clearTimeout),$o.clear(),e(o=>({toasts:o.toasts.map(r=>({...r,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),Fo=(e,o,r,n)=>zt.getState().add(e,o,r,n),Gs=(e,o,r)=>Fo("info",e,o,r),Ys=(e,o,r)=>Fo("success",e,o,r),Ks=(e,o,r)=>Fo("warning",e,o,r),Xs=(e,o,r)=>Fo("error",e,o,r),Js=e=>{zt.getState().remove(e)},Qs=()=>{zt.getState().removeAll()},Zs=({variant:e,title:o,description:r,onClose:n,isClosable:a=!0,action:l,actionText:i,showIcon:u=!0,theme:c,views:d,render:g,icon:p,id:h,isVisible:f=!0,themeMode:y})=>{const b=c??Nt,x=()=>{var v,S;if(p!==void 0)return p;const w=e?(S=(v=Nt[e])==null?void 0:v.icon)==null?void 0:S.color:Nt.info.icon.color;switch(e){case"info":return t.jsx(io,{widthHeight:20,color:w});case"success":return t.jsx(yl,{widthHeight:20,color:w});case"warning":return t.jsx(io,{widthHeight:20,color:w,orientation:"down"});case"error":return t.jsx(dr,{widthHeight:20,color:w});default:return t.jsx(io,{widthHeight:20,color:Nt.info.icon.color})}};if(g)return t.jsx(t.Fragment,{children:g({id:h||"",onClose:n})});const C=e==="error"?"alert":"status",k=e==="error"||e==="warning"?"assertive":"polite";return t.jsxs(s.Horizontal,{role:C,"aria-live":k,"aria-atomic":"true","data-state":f?"open":"closed",gap:12,width:"100%",maxWidth:"380px",borderWidth:"1px",borderStyle:"solid",borderRadius:"12px",padding:"12px 14px",alignItems:"flex-start",position:"relative",backgroundColor:b[e].container.backgroundColor,borderColor:b[e].container.border,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",opacity:f?1:0,transform:f?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...d==null?void 0:d.container,children:[u&&t.jsx(s.View,{marginTop:"2px",...d==null?void 0:d.icon,children:x()}),t.jsxs(s.Vertical,{gap:4,flex:"1",children:[t.jsx(s.Text,{fontSize:"14px",lineHeight:"20px",fontWeight:"600",color:b[e].content.color,backgroundColor:b[e].container.backgroundColor,...d==null?void 0:d.title,children:o}),r&&t.jsx(s.Text,{fontSize:"12px",lineHeight:"18px",color:b[e].content.color,fontWeight:"400",backgroundColor:b[e].container.backgroundColor,...d==null?void 0:d.description,children:r}),l&&i&&t.jsx(s.Text,{fontSize:"14px",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:b[e].content.color,backgroundColor:b[e].container.backgroundColor,onClick:w=>{w.stopPropagation(),l()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...d==null?void 0:d.actionButton,children:i})]}),a&&t.jsx(s.View,{as:"button","aria-label":"Close toast",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:"4px",marginLeft:"8px",marginTop:"-2px",marginRight:"-4px",borderRadius:"9999px",onClick:w=>{w.stopPropagation(),n()},_hover:{backgroundColor:"color-black-900-60"},transition:"background-color 0.2s ease, opacity 0.2s ease",...d==null?void 0:d.closeButton,children:t.jsx($e,{widthHeight:16,color:b[e].content.color})})]})},Yk=({position:e="top-right",gap:o=8,limit:r=5,containerStyle:n})=>{const{toasts:a,remove:l}=zt(),u=m.useMemo(()=>{const c={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(d=>{const g=d.position||e;c[g].push(d)}),Object.keys(c).forEach(d=>{c[d]=c[d].slice(-r)}),c},[a,e,r])[e];return t.jsx(s.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...Uk[e],style:n,children:u.map(c=>t.jsx(s.View,{pointerEvents:"auto",animation:e.includes("right")?"slideInRight 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("left")?"slideInLeft 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("top")?"slideInDown 0.3s ease-out, fadeIn 0.3s ease-out":"slideInUp 0.3s ease-out, fadeIn 0.3s ease-out",children:t.jsx(Zs,{id:c.id,variant:c.variant,title:c.title,description:c.description,onClose:()=>l(c.id),isClosable:c.isClosable,action:c.action,actionText:c.actionText,showIcon:c.showIcon,views:c.views,render:c.render,icon:c.icon,isVisible:c.isVisible})},c.id))})},Kk=()=>({toast:(e,o,r,n)=>Fo(e,o,r,n),info:(e,o,r)=>Gs(e,o,r),success:(e,o,r)=>Ys(e,o,r),warning:(e,o,r)=>Ks(e,o,r),error:(e,o,r)=>Xs(e,o,r),remove:e=>Js(e),removeAll:()=>Qs()}),Xk=e=>t.jsx(Zs,{...e}),Jk=Object.assign(Xk,{Container:e=>t.jsx(Yk,{...e}),show:Fo,info:Gs,success:Ys,warning:Ks,error:Xs,remove:Js,removeAll:Qs}),Qk=Kk,La=()=>Math.random().toString(36).substring(2,11),Zk=({defaultOpen:e=!1,openDelay:o=200,closeDelay:r=200,isDisabled:n=!1}={})=>{const[a,l]=m.useState(e),i=m.useRef(null),u=m.useRef(null),c=m.useRef(null),d=m.useRef(null),g=m.useRef(`tooltip-trigger-${La()}`).current,p=m.useRef(`tooltip-content-${La()}`).current,h=m.useCallback(()=>{n||(d.current&&(clearTimeout(d.current),d.current=null),!a&&!c.current&&(c.current=setTimeout(()=>{l(!0),c.current=null},o)))},[a,o,n]),f=m.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),a&&!d.current&&(d.current=setTimeout(()=>{l(!1),d.current=null},r))},[a,r]),y=m.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]);return m.useEffect(()=>()=>{c.current&&clearTimeout(c.current),d.current&&clearTimeout(d.current)},[]),m.useEffect(()=>{if(typeof document>"u")return;const b=x=>{x.key==="Escape"&&a&&l(!1)};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[a]),{isOpen:a,openTooltip:h,closeTooltip:f,cancelCloseTimer:y,triggerRef:i,contentRef:u,triggerId:g,contentId:p}},e1={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},o1=e=>({default:{backgroundColor:"color-gray-900",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",transition:"opacity 0.15s ease"},light:{backgroundColor:"color-white",color:"color-gray-800",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.04)",transition:"opacity 0.15s ease"},dark:{backgroundColor:"color-gray-950",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.2), 0px 2px 4px rgba(0, 0, 0, 0.12)",transition:"opacity 0.15s ease"}}),t1=o1(),r1=e=>{const o={position:"absolute",width:"8px",height:"8px",backgroundColor:"inherit",borderStyle:"inherit",borderWidth:"inherit",borderColor:"inherit",transform:"rotate(45deg)"};switch(e){case"top":return{...o,bottom:"-4px",left:"50%",marginLeft:"-4px",borderTop:"none",borderLeft:"none"};case"right":return{...o,left:"-4px",top:"50%",marginTop:"-4px",borderRight:"none",borderTop:"none"};case"bottom":return{...o,top:"-4px",left:"50%",marginLeft:"-4px",borderBottom:"none",borderRight:"none"};case"left":return{...o,right:"-4px",top:"50%",marginTop:"-4px",borderLeft:"none",borderBottom:"none"};default:return o}},ec=m.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),Xn=()=>m.useContext(ec),n1=({value:e,children:o})=>t.jsx(ec.Provider,{value:e,children:o}),oc=m.memo(({children:e,views:o,asChild:r=!1,...n})=>{const{openTooltip:a,closeTooltip:l,triggerRef:i,contentId:u,triggerId:c}=Xn(),d=m.useCallback(()=>a(),[a]),g=m.useCallback(()=>l(),[l]),p=m.useCallback(()=>a(),[a]),h=m.useCallback(()=>l(),[l]),f={ref:i,onMouseEnter:d,onMouseLeave:g,onFocus:p,onBlur:h,id:c,"aria-describedby":u,...o==null?void 0:o.container,...n};return r&&m.isValidElement(e)?m.cloneElement(e,f):t.jsx(s.View,{display:"inline-block",...f,children:e})}),a1=m.memo(({children:e,views:o,...r})=>{const{isOpen:n,contentRef:a,contentId:l,triggerId:i}=Xn();return n?t.jsx(s.View,{ref:a,id:l,role:"tooltip","aria-labelledby":i,...o==null?void 0:o.container,...r,children:e}):null}),l1=({content:e,children:o,position:r="top",align:n="center",size:a="md",variant:l="default",showArrow:i=!0,views:u,themeMode:c,...d})=>{const{isOpen:g,triggerRef:p,contentRef:h,contentId:f,triggerId:y}=Xn(),{ref:b,relation:x}=s.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[C,k]=m.useState({x:0,y:0,placement:r});m.useEffect(()=>{p!=null&&p.current&&b&&(b.current=p.current)},[p,b,g]),m.useEffect(()=>{if(g&&(h!=null&&h.current)&&(p!=null&&p.current)){const S=p.current.getBoundingClientRect();let I=r;x&&(r==="top"&&x.space.vertical==="bottom"?I="bottom":r==="bottom"&&x.space.vertical==="top"?I="top":r==="right"&&x.space.horizontal==="left"?I="left":r==="left"&&x.space.horizontal==="right"&&(I="right"));let j=0,R=0;switch(I){case"top":j=n==="start"?S.left:n==="end"?S.right-120:S.left+S.width/2-60,R=S.top-8;break;case"bottom":j=n==="start"?S.left:n==="end"?S.right-120:S.left+S.width/2-60,R=S.bottom+8;break;case"right":j=S.right+8,R=n==="start"?S.top:n==="end"?S.bottom-32:S.top+S.height/2-16;break;case"left":j=S.left-8,R=n==="start"?S.top:n==="end"?S.bottom-32:S.top+S.height/2-16;break}k({x:j,y:R,placement:I})}},[g,r,n,p,h,x]);const w=m.useMemo(()=>i?r1(C.placement):{},[i,C.placement]),v=m.useMemo(()=>{const S={position:"fixed",left:C.x,top:C.y,zIndex:1e3};switch(C.placement){case"top":return{...S,transform:"translateY(-100%)"};case"left":return{...S,transform:"translateX(-100%)"};case"bottom":case"right":default:return S}},[C.x,C.y,C.placement]);return t.jsxs(s.View,{position:"relative",display:"inline-block",...u==null?void 0:u.container,...d,children:[t.jsx(oc,{children:o}),g&&t.jsxs(s.View,{ref:h,id:f,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:v,...e1[a],...t1[l],...u==null?void 0:u.content,children:[typeof e=="string"?t.jsx(s.Text,{...u==null?void 0:u.text,children:e}):e,i&&t.jsx(s.View,{...w,...u==null?void 0:u.arrow})]})]})},i1=({content:e,children:o,position:r="top",align:n="center",size:a="md",variant:l="default",openDelay:i=200,closeDelay:u=200,showArrow:c=!0,defaultOpen:d=!1,isDisabled:g=!1,views:p,...h})=>{const f=Zk({defaultOpen:d,openDelay:i,closeDelay:u,isDisabled:g});return t.jsx(n1,{value:f,children:t.jsx(l1,{content:e,position:r,align:n,size:a,variant:l,showArrow:c,views:p,...h,children:o})})},Sr=i1;Sr.Trigger=oc;Sr.Content=a1;const tc=m.forwardRef((e,o)=>{const r={...e,isAgentRunning:e.isAgentRunning??e.isWorkerRunning,onStopAgent:e.onStopAgent??e.onStopWorker,disabled:e.disabled??e.isDisabled},n=vi(r);return m.useImperativeHandle(o,()=>({getValue:()=>{var a,l;return((a=n.hiddenInputRef.current)==null?void 0:a.value)??((l=n.editableRef.current)==null?void 0:l.textContent)??n.value??""},setValue:n.setValue,clear:()=>n.setValue(""),focus:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.focus()},blur:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.blur()},getElement:()=>n.editableRef.current,getInputElement:()=>n.hiddenInputRef.current})),t.jsx(Fi,{...r,...n})});tc.displayName="ChatInput";const s1={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},Ba={container:{position:"relative",display:"flex",flexDirection:"column",height:"100vh",alignItems:"center",justifyContent:"center"},gradient:{position:"absolute",inset:"-10px",opacity:.5,pointerEvents:"none",filter:"blur(10px)",backgroundSize:"300% 200%",backgroundPosition:"50% 50%, 50% 50%"}},Pr={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},image:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundAttachment:"scroll"},content:{position:"relative",width:"100%",height:"100%",zIndex:2}},Dr={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},video:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"},content:{position:"relative",zIndex:2}},c1=m.createContext({}),d1=({children:e,showRadialGradient:o=!0,views:r,themeMode:n,...a})=>{const l={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},i=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],u={...Ba.gradient,backgroundImage:`
71
+ repeating-linear-gradient(100deg, ${i.join(", ")}),
28
72
  repeating-linear-gradient(100deg, ${l.white} 0%, ${l.white} 7%, ${l.transparent} 10%, ${l.transparent} 12%, ${l.white} 16%)
29
- `,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return r.jsxs(i.View,{...ba.container,...t==null?void 0:t.container,...a,children:[r.jsx(i.View,{style:c}),e,r.jsx("style",{children:`
73
+ `,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return t.jsxs(s.View,{...Ba.container,...r==null?void 0:r.container,...a,children:[t.jsx(s.View,{style:u}),e,t.jsx("style",{children:`
30
74
  @keyframes aurora {
31
75
  0% { background-position: 0% 50%; }
32
76
  50% { background-position: 100% 50%; }
33
77
  100% { background-position: 0% 50%; }
34
78
  }
35
- `})]})},k1=({number:e=20,children:o,...t})=>{const n=Array.from({length:e},(a,l)=>l);return r.jsxs(i.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...t,children:[n.map(a=>{const l=a*37%200-100+"px",s=.2+a*13%6*.1+"s",c=(1+a*7%9)/2+"s",d=300+a*17%100+"px";return r.jsx(i.View,{position:"absolute",top:"0px",left:l,width:"2px",height:"2px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)",transform:"rotate(215deg)",zIndex:0,animate:{from:{transform:"translateX(-100%) translateY(-100%)"},to:{transform:`translateX(${d}) translateY(${d})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:c,delay:s},children:r.jsx(i.View,{position:"absolute",top:"-1px",left:"-1px",width:"1px",height:"1px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 10px 0 1px rgba(255, 255, 255, 0.1)"})},a)}),o&&r.jsx(i.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},ka=["rgb(186, 230, 253)","rgb(249, 168, 212)","rgb(134, 239, 172)","rgb(253, 224, 71)","rgb(252, 165, 165)","rgb(216, 180, 254)","rgb(147, 197, 253)","rgb(165, 180, 252)","rgb(196, 181, 253)"],C1=()=>ka[Math.floor(Math.random()*ka.length)],S1=({rows:e=15,cols:o=10,squareSize:t=40,...n})=>{const a=Array(e).fill(1),l=Array(o).fill(1);return r.jsx(i.View,{padding:16,width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-50",zIndex:0,transform:"skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)",...n,children:a.map((s,c)=>r.jsx(i.Horizontal,{gap:0,children:l.map((d,u)=>r.jsx(i.View,{height:t/3,width:t,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:C1(),transition:"background-color 0.2s ease"}}},`col-${u}`))},`row-${c}`))})},j1=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],w1=({count:e=50,colors:o=j1,speed:t="medium",shapes:n=["circle"],...a})=>{const l=Array.from({length:e},(u,g)=>g),s=()=>{switch(t){case"slow":return .5;case"fast":return 2;default:return 1}},c=()=>n[Math.floor(Math.random()*n.length)],d=()=>o[Math.floor(Math.random()*o.length)];return r.jsx(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:l.map(u=>{const g=Math.random()*8+4,m=Math.random()*400,h=Math.random()*300,f=Math.random()*400,y=Math.random()*300,k=(Math.random()*10+5)/s(),b=Math.random()*5,C=c(),j=d(),S={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return r.jsx(i.View,{position:"absolute",width:g,height:g,backgroundColor:j,opacity:.7,style:{left:m,top:h,...S[C]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${f-m}px, ${y-h}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${k}s`,delay:`${b}s`}},u)})})},v1=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:t="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const l=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},s=Math.floor(400/e),c=Math.floor(300/e),d=s*c,u=Array.from({length:d},(g,m)=>m);return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:s+1},(g,m)=>r.jsx(i.View,{position:"absolute",left:m*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${m}`)),Array.from({length:c+1},(g,m)=>r.jsx(i.View,{position:"absolute",left:0,top:m*e,width:"100%",height:1,backgroundColor:o},`h-line-${m}`)),u.map(g=>{const m=g%s,h=Math.floor(g/s),f=(m+h)*.1;return r.jsx(i.View,{position:"absolute",left:m*e+1,top:h*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:t},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${l()}s`,delay:`${f}s`}},g)})]})},T1=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],I1=({rippleCount:e=5,colors:o=T1,maxSize:t=200,frequency:n=3,...a})=>{const l=Array.from({length:e},(s,c)=>({id:c,x:Math.random()*400,y:Math.random()*300,color:o[c%o.length],delay:c*(n/e),duration:3+Math.random()*2}));return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[l.map(s=>r.jsx(i.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:s.x-10,top:s.y-10,border:`2px solid ${s.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${t/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${s.duration}s`,delay:`${s.delay}s`}},s.id)),l.map(s=>r.jsx(i.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:s.x-5,top:s.y-5,backgroundColor:s.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${t/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${s.duration*1.2}s`,delay:`${s.delay+.5}s`}},`secondary-${s.id}`))]})},R1=({children:e,src:o,backgroundSize:t="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:l="scroll",imageOpacity:s=1,overlay:c=null,blendMode:d="normal",views:u,themeMode:g,...m})=>{const h={...xt.image,backgroundImage:`url(${o})`,backgroundSize:t,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:l,opacity:s,mixBlendMode:d};return r.jsxs(i.View,{...xt.container,...u==null?void 0:u.container,...m,children:[r.jsx(i.View,{style:h,...u==null?void 0:u.image}),c,e&&r.jsx(i.View,{...xt.content,...u==null?void 0:u.content,children:e})]})},F1=({children:e,src:o,autoPlay:t=!0,loop:n=!0,muted:a=!0,playsInline:l=!0,overlay:s=null,blendMode:c="normal",views:d,themeMode:u,...g})=>r.jsxs(i.View,{...bt.container,...d==null?void 0:d.container,...g,children:[r.jsx(i.View,{as:"video",src:o,autoPlay:t,loop:n,muted:a,playsInline:l,style:{...bt.video,mixBlendMode:c},...d==null?void 0:d.video}),s,e&&r.jsx(i.View,{...bt.content,...d==null?void 0:d.content,children:e})]}),z1=({children:e,...o})=>r.jsx(Ui,{...o,children:e}),M1=/^(color|theme|light|dark)-/,W1=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},H1=({contentPosition:e,backgroundColor:o="color-black-900",...t})=>{const n=M1.test(o),a=n?W1(o):o,s=(()=>{let c=`${a}-100`,d=`${a}-900`,u=`${a}-600`,g=`${a}-400`;switch(n||(c=`color-mix(in srgb, ${a} 10%, transparent)`,d=`color-mix(in srgb, ${a} 90%, transparent)`,u=`color-mix(in srgb, ${a} 70%, transparent)`,g=`color-mix(in srgb, ${a} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${c} 0%, ${c} 100%), linear-gradient(to right, ${d} 0%, ${u} 65%, ${c} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${c} 0%, ${c} 100%), linear-gradient(to left, ${d} 0%, ${u} 65%, ${c} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${c} 0%, ${c} 100%), linear-gradient(to bottom, ${d} 0%, ${u} 60%, ${c} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${c} 0%, ${c} 100%), linear-gradient(to top, ${d} 0%, ${u} 60%, ${c} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${d} 0%, ${c} 100%)`;default:return g}})();return r.jsx(i.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:s,pointerEvents:"none",zIndex:1,...t})},V1=({children:e,views:o,...t})=>r.jsx(x1.Provider,{value:{},children:r.jsx(i.View,{...y1.container,...o==null?void 0:o.container,...t,children:e})}),Ss=p.forwardRef(({children:e,shape:o="rounded",decorationRotation:t=5,decorationScale:n=1,decorationOpacity:a=.8,views:l,...s},c)=>{const u=(k=>{switch(k){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(o),g=Math.abs(t)*(Math.PI/180),m=Math.sin(g)*100,h=(n-1)*100/2,f=Math.ceil(m+h),y=s.backgroundColor??"theme-primary";return r.jsx(i.View,{...s,ref:c,backgroundColor:"transparent",position:"relative",overflow:"visible",...l==null?void 0:l.container,children:r.jsxs(i.View,{padding:s.padding??`${96+f}px ${f}px`,position:"relative",overflow:"visible",children:[r.jsx(i.View,{position:"absolute",top:f,left:f,right:f,bottom:f,backgroundColor:y,borderRadius:u,opacity:a/1.5,transform:`scale(${n})`,pointerEvents:"none",zIndex:1,...l==null?void 0:l.back}),r.jsx(i.View,{position:"absolute",top:f,left:f,right:f,bottom:f,transform:`rotate(${t}deg) scale(${n})`,opacity:a/1.2,backgroundColor:y,borderRadius:u,pointerEvents:"none",zIndex:2,...l==null?void 0:l.front}),r.jsx(i.View,{margin:"0 auto",position:"relative",zIndex:3,...l==null?void 0:l.content,children:e})]})})});Ss.displayName="Background.Layout";const pe=V1;pe.Aurora=b1;pe.Meteors=k1;pe.Wall=S1;pe.Particles=w1;pe.Grid=v1;pe.Ripples=I1;pe.Image=R1;pe.Video=F1;pe.Gradient=z1;pe.Overlay=H1;pe.Layout=Ss;const js=p.forwardRef((e,o)=>r.jsx(pe,{...e,ref:o}));js.displayName="Background";const ws=Object.assign(js,{Layout:pe.Layout,Aurora:pe.Aurora,Meteors:pe.Meteors,Wall:pe.Wall,Particles:pe.Particles,Grid:pe.Grid,Ripples:pe.Ripples,Image:pe.Image,Video:pe.Video,Gradient:pe.Gradient,Overlay:pe.Overlay});ws.displayName="Background";function A1(e){const{inputValue:o,onInputChange:t,onSubmit:n,messages:a=[]}=e,[l,s]=p.useState(""),c=p.useRef(null),d=p.useRef(null),u=o!==void 0,g=o!==void 0?o:l,m=p.useCallback(f=>{u?t==null||t(f):s(f)},[u,t]),h=p.useCallback(f=>{f&&f.preventDefault();const y=g.trim();y&&n&&(n(y),u||s(""),c.current&&(c.current.style.height="auto"))},[g,n,u]);return p.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[a.length]),{internalInputValue:g,handleInputChange:m,handleSubmit:h,inputRef:c,messagesRef:d}}const P1={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},E1={default:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},glassy:{backgroundColor:"color-white-900",backdropFilter:"blur(10px)",border:"1px solid rgba(226, 232, 240, 0.9)",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},minimal:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px"}},D1={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},$1={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},L1={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},_1={position:"relative",backgroundColor:"color-white",borderTop:"1px solid color-gray-200",padding:"12px",display:"flex",alignItems:"flex-end",gap:"8px",transition:"background-color 0.2s ease, border-color 0.2s ease"},Ye={container:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden"},messagesContainer:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px",padding:"16px",backgroundColor:"color-gray-50"},inputContainer:_1,bubble:{maxWidth:"80%",position:"relative",wordWrap:"break-word",animation:"chatBubbleAppear 0.25s ease-out"},timestamp:{position:"absolute",top:"-24px",fontSize:"12px",color:"color-gray-500",backgroundColor:"color-white-900",padding:"2px 8px",borderRadius:"9999px",opacity:0,transition:"opacity 0.15s ease-out",border:"1px solid color-gray-200"},input:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",resize:"none",fontFamily:"inherit",fontSize:"14px",minHeight:"24px",maxHeight:"120px"},sendButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease, opacity 0.2s ease",flexShrink:0},attachmentButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",transition:"background-color 0.2s ease",flexShrink:0}},B1=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:t=!1,variant:n="default",size:a="md",showTimestamps:l=!0,enableAttachments:s=!1,enableContextPicker:c=!1,selectedContextElements:d=[],onContextPickerClick:u,onRemoveContextElement:g,isLoading:m=!1,loadingText:h="Loading...",styles:f={},maxHeight:y="600px",internalInputValue:k,handleInputChange:b,handleSubmit:C,inputRef:j,messagesRef:S,inputValue:w,onInputChange:x,...T})=>{var H;const v={...Ye.container,...E1[n],...f.container},M={...Ye.messagesContainer,maxHeight:y,...f.messagesContainer},A={...Ye.inputContainer,...f.inputContainer},P={...Ye.input,...P1[a],...f.input},F=p.useCallback(R=>{b(R.target.value),R.target.style.height="auto",R.target.style.height=`${R.target.scrollHeight}px`},[b]),V=p.useCallback(R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),C())},[C]),z=k.trim().length>0,{onSubmit:I,...W}=T;return r.jsxs(i.View,{...v,...W,children:[r.jsxs(i.View,{ref:S,...M,children:[e.length===0?r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(R=>r.jsx(O1,{message:R,size:a,showTimestamp:l,styles:{bubble:f.bubble,userBubble:f.userBubble,assistantBubble:f.assistantBubble,timestamp:f.timestamp,reasoningContainer:f.reasoningContainer,reasoningContent:f.reasoningContent,errorMessage:f.errorMessage,systemMessage:f.systemMessage,toolMessage:f.toolMessage}},R.id)),m&&r.jsxs(i.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...f.loadingIndicator,children:[r.jsx(Qt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",fontSize:"14px",children:h})]})]}),r.jsxs(i.View,{children:[d.length>0&&r.jsx(i.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...f.contextChipsContainer,children:d.map(R=>r.jsxs(i.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[r.jsx(i.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:R.name}),r.jsx(i.View,{as:"button",type:"button",onClick:()=>g==null?void 0:g(R.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:r.jsx(We,{widthHeight:12,color:"color-blue-700"})})]},R.id))}),r.jsxs(i.View,{as:"form",onSubmit:C,...A,children:[s&&r.jsx(i.View,{as:"button",type:"button",...Ye.attachmentButton,...f.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:r.jsx(sr,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"textarea",ref:j,value:k,onChange:F,onKeyDown:V,placeholder:o,disabled:t||m,...P,style:{...P,opacity:t||m?.5:1}}),r.jsxs(i.Vertical,{gap:4,alignItems:"center",children:[c&&r.jsx(i.View,{as:"button",type:"button",onClick:u,...Ye.attachmentButton,...f.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(H=f.contextPickerButton)==null?void 0:H._hover},title:"Select element from page",children:r.jsx(Za,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"button",type:"submit",disabled:!z||t||m,...Ye.sendButton,backgroundColor:z?"theme-primary":"color-gray-300",_hover:{backgroundColor:z?"theme-primary":"color-gray-300"},...f.sendButton,style:{cursor:z?"pointer":"not-allowed",opacity:!z||t||m?.6:1},children:r.jsx(Jt,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},O1=({message:e,size:o,showTimestamp:t,styles:n})=>{const[a,l]=p.useState(!1),[s,c]=p.useState(!1),d=e.role==="user",u=e.messageType==="system",g=e.messageType==="error",m=e.messageType==="tool";if(u)return r.jsx(i.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[r.jsx(ro,{widthHeight:12,color:"color-gray-600"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(m)return r.jsx(i.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:r.jsxs(i.Horizontal,{gap:8,alignItems:"center",backgroundColor:"color-gray-50",padding:"8px 10px",borderRadius:"8px",width:"100%",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(Ka,{widthHeight:14,color:"color-gray-600"}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const h={...Ye.bubble,...D1[o],...d?$1:L1,...g?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...d?n.userBubble:n.assistantBubble,...g?n.errorMessage:{}},f={...Ye.timestamp,[d?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return r.jsx(i.View,{position:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),display:"flex",justifyContent:d?"flex-end":"flex-start",children:r.jsxs(i.View,{...h,children:[t&&r.jsx(i.View,{...f,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),g&&r.jsxs(i.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[r.jsx(Yr,{widthHeight:14,color:"color-red-700"}),r.jsx(i.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&r.jsxs(i.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[r.jsxs(i.Horizontal,{as:"button",onClick:()=>c(!s),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[r.jsx(i.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),r.jsx(ue,{orientation:s?"down":"right",widthHeight:10,color:"color-gray-500"})]}),s&&r.jsx(i.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),r.jsx(i.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&r.jsx(i.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(y=>r.jsxs(i.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(sr,{widthHeight:14}),r.jsx(i.Text,{children:y.name})]},y.id))}),e.contextElements&&e.contextElements.length>0&&r.jsxs(i.Vertical,{gap:4,marginTop:"8px",children:[r.jsx(i.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(y=>r.jsx(i.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:r.jsx(i.Text,{color:"color-blue-700",fontWeight:"500",children:y.name})},y.id))]})]})})},Wn=e=>{const o=A1(e);return r.jsx(B1,{...e,...o})};Wn.displayName="ChatWidget";const vs=Wn;function N1({onSelect:e,onCancel:o,active:t}){const[n,a]=p.useState(null);p.useRef(null);const l=p.useCallback(d=>{var f;if(!t)return;const u=document.elementFromPoint(d.clientX,d.clientY);if(!u||u===document.body||u.closest('[data-chatwidget-ignore="true"]')||u.closest("#chatwidget-overlay")){a(null);return}const g=u.getBoundingClientRect();let m=u.tagName.toLowerCase();if(u.id)m+=`#${u.id}`;else if(u.className&&typeof u.className=="string"){const y=u.className.split(" ")[0];y&&(m+=`.${y}`)}const h=(f=u.innerText)==null?void 0:f.slice(0,20);h&&(m+=` ("${h}...")`),a({id:u.id||`el-${Date.now()}`,name:m,tagName:u.tagName.toLowerCase(),rect:g})},[t]),s=p.useCallback(d=>{!t||d.target.closest('[data-chatwidget-ignore="true"]')||(d.preventDefault(),d.stopPropagation(),n&&e(n))},[t,n,e]),c=p.useCallback(d=>{t&&d.key==="Escape"&&o()},[t,o]);return p.useEffect(()=>{if(!(typeof document>"u"))return t?(document.addEventListener("mousemove",l),document.addEventListener("click",s,!0),document.addEventListener("keydown",c),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",l),document.removeEventListener("click",s,!0),document.removeEventListener("keydown",c),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("click",s,!0),document.removeEventListener("keydown",c),document.body.style.cursor=""}},[t,l,s,c]),{highlightedElement:n}}function q1({element:e}){return e?r.jsx("div",{id:"chatwidget-overlay",style:{position:"fixed",top:e.rect.top,left:e.rect.left,width:e.rect.width,height:e.rect.height,border:"2px solid #1D4ED8",backgroundColor:"rgba(29, 78, 216, 0.08)",pointerEvents:"none",zIndex:99999,transition:"top 0.1s ease-out, left 0.1s ease-out, width 0.1s ease-out, height 0.1s ease-out",borderRadius:"8px"},children:r.jsx("div",{style:{position:"absolute",top:"-24px",left:"0",backgroundColor:"#1D4ED8",color:"white",padding:"2px 8px",borderRadius:"9999px",fontSize:"12px",fontWeight:"bold",whiteSpace:"nowrap"},children:e.name})}):null}const U1=({initialMessages:e=[],onSendMessage:o,bubbleSize:t="md"})=>{const[n,a]=p.useState(!1),[l,s]=p.useState(!1),[c,d]=p.useState(e),[u,g]=p.useState([]),{highlightedElement:m}=N1({active:l,onSelect:b=>{g(C=>[...C,b]),s(!1),a(!0)},onCancel:()=>{s(!1),a(!0)}}),h=()=>a(!n),f=()=>{s(!0),a(!1)},y=b=>{g(C=>C.filter(j=>j.id!==b))},k=b=>{const C={id:Date.now().toString(),role:"user",content:b,timestamp:new Date,contextElements:[...u]};d(j=>[...j,C]),o==null||o(b,u),g([]),setTimeout(()=>{var x;const j=Math.random()>.7,S=Math.random()>.4,w={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:j?"I will highlight the selected element.":`I received your message regarding: ${((x=C.contextElements)==null?void 0:x.map(T=>T.name).join(", "))||"general context"}. How can I assist you further?`,messageType:j?"tool":"text",reasoning:S?"Analyzing the user input and context... The user seems to be asking about specific elements. I should tailor my response to the selected context.":void 0};d(T=>[...T,w]),j&&setTimeout(()=>{d(T=>[...T,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return r.jsxs(i.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[r.jsx(q1,{element:m}),l&&r.jsx(i.View,{position:"fixed",top:24,left:"50%",transform:"translateX(-50%)",backgroundColor:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"24px",zIndex:1e4,boxShadow:"0 4px 6px rgba(0,0,0,0.1)",children:r.jsx(i.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&r.jsxs(i.View,{position:"absolute",bottom:60,right:0,width:"400px",height:"600px",marginBottom:"16px",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(20px)",borderRadius:"24px",border:"1px solid rgba(255, 255, 255, 0.4)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",overflow:"hidden",animation:"slideUp 0.3s ease-out",style:{animation:"fadeIn 0.2s ease-out",transformOrigin:"bottom right"},children:[r.jsxs(i.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),r.jsx(i.View,{as:"button",onClick:()=>a(!1),cursor:"pointer",padding:"4px",borderRadius:"50%",border:"none",backgroundColor:"transparent",_hover:{backgroundColor:"rgba(0,0,0,0.05)"},children:r.jsx(We,{widthHeight:16,color:"color-gray-500"})})]}),r.jsx(vs,{messages:c,onSubmit:k,size:t,variant:"minimal",enableContextPicker:!0,selectedContextElements:u,onContextPickerClick:f,onRemoveContextElement:y,styles:{container:{height:"calc(100% - 60px)",backgroundColor:"transparent"},inputContainer:{backgroundColor:"white",margin:"0 16px 16px 16px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"}}})]}),!l&&r.jsx(i.View,{as:"button",onClick:h,width:"56px",height:"56px",borderRadius:"50%",backgroundColor:"theme-primary",border:"none",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",_hover:{transform:"scale(1.05)"},_active:{transform:"scale(0.95)"},"data-chatwidget-ignore":"true",children:n?r.jsx(We,{widthHeight:24,color:"white"}):r.jsx(Qa,{widthHeight:24,color:"white"})})]})};function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G1=typeof Element<"u",Y1=typeof Map=="function",K1=typeof Set=="function",X1=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Mr(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var t,n,a;if(Array.isArray(e)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(!Mr(e[n],o[n]))return!1;return!0}var l;if(Y1&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;for(l=e.entries();!(n=l.next()).done;)if(!Mr(n.value[1],o.get(n.value[0])))return!1;return!0}if(K1&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(X1&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(e[n]!==o[n])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof o.valueOf=="function")return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof o.toString=="function")return e.toString()===o.toString();if(a=Object.keys(e),t=a.length,t!==Object.keys(o).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(G1&&e instanceof Element)return!1;for(n=t;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!Mr(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var J1=function(o,t){try{return Mr(o,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const Q1=Hn(J1);var Z1=function(e,o,t,n,a,l,s,c){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var d;if(o===void 0)d=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[t,n,a,l,s,c],g=0;d=new Error(o.replace(/%s/g,function(){return u[g++]})),d.name="Invariant Violation"}throw d.framesToPop=1,d}},ek=Z1;const Ca=Hn(ek);var ok=function(o,t,n,a){var l=n?n.call(a,o,t):void 0;if(l!==void 0)return!!l;if(o===t)return!0;if(typeof o!="object"||!o||typeof t!="object"||!t)return!1;var s=Object.keys(o),c=Object.keys(t);if(s.length!==c.length)return!1;for(var d=Object.prototype.hasOwnProperty.bind(t),u=0;u<s.length;u++){var g=s[u];if(!d(g))return!1;var m=o[g],h=t[g];if(l=n?n.call(a,m,h,g):void 0,l===!1||l===void 0&&m!==h)return!1}return!0};const rk=Hn(ok);var Ts=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Ts||{}),kt={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Sa=Object.values(Ts),nt={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Is=Object.entries(nt).reduce((e,[o,t])=>(e[t]=o,e),{}),$e="data-rh",Eo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Do=(e,o)=>{for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},tk=e=>{let o=Do(e,"title");const t=Do(e,Eo.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),t&&o)return t.replace(/%s/g,()=>o);const n=Do(e,Eo.DEFAULT_TITLE);return o||n||void 0},nk=e=>Do(e,Eo.ON_CHANGE_CLIENT_STATE)||(()=>{}),Ct=(e,o)=>o.filter(t=>typeof t[e]<"u").map(t=>t[e]).reduce((t,n)=>({...t,...n}),{}),ak=(e,o)=>o.filter(t=>typeof t.base<"u").map(t=>t.base).reverse().reduce((t,n)=>{if(!t.length){const a=Object.keys(n);for(let l=0;l<a.length;l+=1){const c=a[l].toLowerCase();if(e.indexOf(c)!==-1&&n[c])return t.concat(n)}}return t},[]),lk=e=>console&&typeof console.warn=="function"&&console.warn(e),rr=(e,o,t)=>{const n={};return t.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&lk(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,l)=>{const s={};l.filter(d=>{let u;const g=Object.keys(d);for(let h=0;h<g.length;h+=1){const f=g[h],y=f.toLowerCase();o.indexOf(y)!==-1&&!(u==="rel"&&d[u].toLowerCase()==="canonical")&&!(y==="rel"&&d[y].toLowerCase()==="stylesheet")&&(u=y),o.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(u=f)}if(!u||!d[u])return!1;const m=d[u].toLowerCase();return n[u]||(n[u]={}),s[u]||(s[u]={}),n[u][m]?!1:(s[u][m]=!0,!0)}).reverse().forEach(d=>a.push(d));const c=Object.keys(s);for(let d=0;d<c.length;d+=1){const u=c[d],g={...n[u],...s[u]};n[u]=g}return a},[]).reverse()},ik=(e,o)=>{if(Array.isArray(e)&&e.length){for(let t=0;t<e.length;t+=1)if(e[t][o])return!0}return!1},sk=e=>({baseTag:ak(["href"],e),bodyAttributes:Ct("bodyAttributes",e),defer:Do(e,Eo.DEFER),encode:Do(e,Eo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Ct("htmlAttributes",e),linkTags:rr("link",["rel","href"],e),metaTags:rr("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:rr("noscript",["innerHTML"],e),onChangeClientState:nk(e),scriptTags:rr("script",["src","innerHTML"],e),styleTags:rr("style",["cssText"],e),title:tk(e),titleAttributes:Ct("titleAttributes",e),prioritizeSeoTags:ik(e,Eo.PRIORITIZE_SEO_TAGS)}),Rs=e=>Array.isArray(e)?e.join(""):e,ck=(e,o)=>{const t=Object.keys(e);for(let n=0;n<t.length;n+=1)if(o[t[n]]&&o[t[n]].includes(e[t[n]]))return!0;return!1},St=(e,o)=>Array.isArray(e)?e.reduce((t,n)=>(ck(n,o)?t.priority.push(n):t.default.push(n),t),{priority:[],default:[]}):{default:e,priority:[]},ja=(e,o)=>({...e,[o]:void 0}),dk=["noscript","script","style"],Pt=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),Fs=e=>Object.keys(e).reduce((o,t)=>{const n=typeof e[t]<"u"?`${t}="${e[t]}"`:`${t}`;return o?`${o} ${n}`:n},""),uk=(e,o,t,n)=>{const a=Fs(t),l=Rs(o);return a?`<${e} ${$e}="true" ${a}>${Pt(l,n)}</${e}>`:`<${e} ${$e}="true">${Pt(l,n)}</${e}>`},pk=(e,o,t=!0)=>o.reduce((n,a)=>{const l=a,s=Object.keys(l).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,g)=>{const m=typeof l[g]>"u"?g:`${g}="${Pt(l[g],t)}"`;return u?`${u} ${m}`:m},""),c=l.innerHTML||l.cssText||"",d=dk.indexOf(e)===-1;return`${n}<${e} ${$e}="true" ${s}${d?"/>":`>${c}</${e}>`}`},""),zs=(e,o={})=>Object.keys(e).reduce((t,n)=>{const a=nt[n];return t[a||n]=e[n],t},o),mk=(e,o,t)=>{const n={key:o,[$e]:!0},a=zs(t,n);return[p.createElement("title",a,o)]},Wr=(e,o)=>o.map((t,n)=>{const a={key:n,[$e]:!0};return Object.keys(t).forEach(l=>{const c=nt[l]||l;if(c==="innerHTML"||c==="cssText"){const d=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:d}}else a[c]=t[l]}),p.createElement(e,a)}),He=(e,o,t=!0)=>{switch(e){case"title":return{toComponent:()=>mk(e,o.title,o.titleAttributes),toString:()=>uk(e,o.title,o.titleAttributes,t)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>zs(o),toString:()=>Fs(o)};default:return{toComponent:()=>Wr(e,o),toString:()=>pk(e,o,t)}}},gk=({metaTags:e,linkTags:o,scriptTags:t,encode:n})=>{const a=St(e,kt.meta),l=St(o,kt.link),s=St(t,kt.script);return{priorityMethods:{toComponent:()=>[...Wr("meta",a.priority),...Wr("link",l.priority),...Wr("script",s.priority)],toString:()=>`${He("meta",a.priority,n)} ${He("link",l.priority,n)} ${He("script",s.priority,n)}`},metaTags:a.default,linkTags:l.default,scriptTags:s.default}},hk=e=>{const{baseTag:o,bodyAttributes:t,encode:n=!0,htmlAttributes:a,noscriptTags:l,styleTags:s,title:c="",titleAttributes:d,prioritizeSeoTags:u}=e;let{linkTags:g,metaTags:m,scriptTags:h}=e,f={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:f,linkTags:g,metaTags:m,scriptTags:h}=gk(e)),{priority:f,base:He("base",o,n),bodyAttributes:He("bodyAttributes",t,n),htmlAttributes:He("htmlAttributes",a,n),link:He("link",g,n),meta:He("meta",m,n),noscript:He("noscript",l,n),script:He("script",h,n),style:He("style",s,n),title:He("title",{title:c,titleAttributes:d},n)}},Et=hk,Ir=[],Vn=!!(typeof window<"u"&&window.document&&window.document.createElement),Dt=class{constructor(e,o){Ue(this,"instances",[]);Ue(this,"canUseDOM",Vn);Ue(this,"context");Ue(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Ir:this.instances,add:e=>{(this.canUseDOM?Ir:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?Ir:this.instances).indexOf(e);(this.canUseDOM?Ir:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=Et({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},fk=parseInt(p.version.split(".")[0],10),$t=fk>=19,yk={},Ms=p.createContext(yk),mo,xk=(mo=class extends p.Component{constructor(t){super(t);Ue(this,"helmetData");$t?this.helmetData=null:this.helmetData=new Dt(this.props.context||{},mo.canUseDOM)}render(){return $t?p.createElement(p.Fragment,null,this.props.children):p.createElement(Ms.Provider,{value:this.helmetData.value},this.props.children)}},Ue(mo,"canUseDOM",Vn),mo),Wo=(e,o)=>{const t=document.head||document.querySelector("head"),n=t.querySelectorAll(`${e}[${$e}]`),a=[].slice.call(n),l=[];let s;return o&&o.length&&o.forEach(c=>{const d=document.createElement(e);for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u))if(u==="innerHTML")d.innerHTML=c.innerHTML;else if(u==="cssText"){const g=c.cssText;d.appendChild(document.createTextNode(g))}else{const g=u,m=typeof c[g]>"u"?"":c[g];d.setAttribute(u,m)}d.setAttribute($e,"true"),a.some((u,g)=>(s=g,d.isEqualNode(u)))?a.splice(s,1):l.push(d)}),a.forEach(c=>{var d;return(d=c.parentNode)==null?void 0:d.removeChild(c)}),l.forEach(c=>t.appendChild(c)),{oldTags:a,newTags:l}},Lt=(e,o)=>{const t=document.getElementsByTagName(e)[0];if(!t)return;const n=t.getAttribute($e),a=n?n.split(","):[],l=[...a],s=Object.keys(o);for(const c of s){const d=o[c]||"";t.getAttribute(c)!==d&&t.setAttribute(c,d),a.indexOf(c)===-1&&a.push(c);const u=l.indexOf(c);u!==-1&&l.splice(u,1)}for(let c=l.length-1;c>=0;c-=1)t.removeAttribute(l[c]);a.length===l.length?t.removeAttribute($e):t.getAttribute($e)!==s.join(",")&&t.setAttribute($e,s.join(","))},bk=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=Rs(e)),Lt("title",o)},wa=(e,o)=>{const{baseTag:t,bodyAttributes:n,htmlAttributes:a,linkTags:l,metaTags:s,noscriptTags:c,onChangeClientState:d,scriptTags:u,styleTags:g,title:m,titleAttributes:h}=e;Lt("body",n),Lt("html",a),bk(m,h);const f={baseTag:Wo("base",t),linkTags:Wo("link",l),metaTags:Wo("meta",s),noscriptTags:Wo("noscript",c),scriptTags:Wo("script",u),styleTags:Wo("style",g)},y={},k={};Object.keys(f).forEach(b=>{const{newTags:C,oldTags:j}=f[b];C.length&&(y[b]=C),j.length&&(k[b]=f[b].oldTags)}),o&&o(),d(e,y,k)},tr=null,kk=e=>{tr&&cancelAnimationFrame(tr),e.defer?tr=requestAnimationFrame(()=>{wa(e,()=>{tr=null})}):(wa(e),tr=null)},Ck=kk,va=class extends p.Component{constructor(){super(...arguments);Ue(this,"rendered",!1)}shouldComponentUpdate(o){return!rk(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:t}=this.props.context;let n=null;const a=sk(o.get().map(l=>{const{context:s,...c}=l.props;return c}));xk.canUseDOM?Ck(a):Et&&(n=Et(a)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:o}=this.props.context;o.add(this),this.emitChange()}render(){return this.init(),null}},Hr=[],Ta=e=>{const o={};for(const t of Object.keys(e))o[Is[t]||t]=e[t];return o},uo=e=>{const o={};for(const t of Object.keys(e)){const n=nt[t];o[n||t]=e[t]}return o},Ia=(e,o)=>{if(!Vn)return;const t=document.getElementsByTagName(e)[0];if(!t)return;const n="data-rh-managed",a=t.getAttribute(n),l=a?a.split(","):[],s=Object.keys(o);for(const c of l)s.includes(c)||t.removeAttribute(c);for(const c of s){const d=o[c];d==null||d===!1?t.removeAttribute(c):d===!0?t.setAttribute(c,""):t.setAttribute(c,String(d))}s.length>0?t.setAttribute(n,s.join(",")):t.removeAttribute(n)},jt=()=>{const e={},o={};for(const t of Hr){const{htmlAttributes:n,bodyAttributes:a}=t.props;n&&Object.assign(e,Ta(n)),a&&Object.assign(o,Ta(a))}Ia("html",e),Ia("body",o)},Sk=class extends p.Component{componentDidMount(){Hr.push(this),jt()}componentDidUpdate(){jt()}componentWillUnmount(){const e=Hr.indexOf(this);e!==-1&&Hr.splice(e,1),jt()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:t}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||t||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return p.createElement("title",uo(o),e)}renderBase(){const{base:e}=this.props;return e?p.createElement("base",uo(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>p.createElement("meta",{key:t,...uo(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>p.createElement("link",{key:t,...uo(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=uo(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),p.createElement("script",{key:t,...l})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{cssText:n,...a}=o,l=uo(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),p.createElement("style",{key:t,...l})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=uo(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),p.createElement("noscript",{key:t,...l})})}render(){return p.createElement(p.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},vt,jk=(vt=class extends p.Component{shouldComponentUpdate(e){return!Q1(ja(this.props,"helmetData"),ja(e,"helmetData"))}mapNestedChildrenToProps(e,o){if(!o)return null;switch(e.type){case"script":case"noscript":return{innerHTML:o};case"style":return{cssText:o};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,o,t,n){return{...o,[e.type]:[...o[e.type]||[],{...t,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,t,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...t}};case"body":return{...o,bodyAttributes:{...t}};case"html":return{...o,htmlAttributes:{...t}};default:return{...o,[e.type]:{...t}}}}mapArrayTypeChildrenToProps(e,o){let t={...o};return Object.keys(e).forEach(n=>{t={...t,[n]:e[n]}}),t}warnOnInvalidChildren(e,o){return Ca(Sa.some(t=>e.type===t),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Sa.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Ca(!o||typeof o=="string"||Array.isArray(o)&&!o.some(t=>typeof t!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,o){let t={};return p.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...l}=n.props,s=Object.keys(l).reduce((d,u)=>(d[Is[u]||u]=l[u],d),{});let{type:c}=n;switch(typeof c=="symbol"?c=c.toString():this.warnOnInvalidChildren(n,a),c){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":t=this.flattenArrayTypeChildren(n,t,s,a);break;default:o=this.mapObjectTypeChildren(n,o,s,a);break}}),this.mapArrayTypeChildrenToProps(t,o)}render(){const{children:e,...o}=this.props;let t={...o},{helmetData:n}=o;if(e&&(t=this.mapChildrenToProps(e,t)),n&&!(n instanceof Dt)){const a=n;n=new Dt(a.context,!0),delete t.helmetData}return $t?p.createElement(Sk,{...t}):n?p.createElement(va,{...t,context:n.value}):p.createElement(Ms.Consumer,null,a=>p.createElement(va,{...t,context:a}))}},Ue(vt,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),vt);const wk={airbnb:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},apple:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.03em"},coinbase:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.02em"},figma:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontWeight:700},linear:{highlightStyle:"gradient",fontWeight:600,letterSpacing:"-0.03em"},nike:{highlightStyle:"underline",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",highlightFontStyle:"italic",highlightFontWeight:900},notion:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontStyle:"italic"},revolut:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},shopify:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},spacex:{highlightStyle:"glow",fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",highlightLetterSpacing:"0.06em"},spotify:{highlightStyle:"background",fontWeight:800,letterSpacing:"-0.03em"},stripe:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},tesla:{highlightStyle:"solid",fontWeight:500,letterSpacing:"-0.01em",textTransform:"uppercase"},uber:{highlightStyle:"underline",fontWeight:700,letterSpacing:"-0.02em"},vercel:{highlightStyle:"outline",fontWeight:700,letterSpacing:"-0.04em"}},vk={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},Tk=e=>wk[e.metadata.id]??vk,Ws=(e,o)=>{const t=e.theme;return{canvas:we(t.canvas),surface:we(t.surface),text:we(t.text),muted:we(t.muted),border:we(t.border),primary:we(t.primary),secondary:we(t.secondary),success:we(t.success),warning:we(t.warning),error:we(t.error),onPrimary:we(t.onPrimary),appearance:o}},Ik=e=>Ws(e,"light"),Rk=e=>Ws(e,"dark"),me=({palette:e,label:o,config:t,children:n})=>r.jsxs(i.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),r.jsx(i.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),r.jsx(Gt,{config:t,mode:e.appearance,children:r.jsx(i.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",children:n})})]}),we=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Ke=(e,o)=>`color-mix(in srgb, ${we(e)} ${o}%, transparent)`,Fk=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,zk={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral"},Mk=e=>e.personality||zk,Xe=(e,o="normal")=>{let n={light:300,regular:400,bold:700,black:800}[e.typeWeight];return o==="light"&&(n=Math.max(300,n-200)),o==="heavy"&&(n=Math.min(900,n+100)),n},yr=e=>{switch(e.density){case"tight":return{padding:16,gap:10,large:20};case"spacious":return{padding:28,gap:18,large:36};case"comfortable":default:return{padding:22,gap:14,large:28}}},Wk=e=>e.typeCase==="uppercase"?"uppercase":"none",at=(e,o)=>{switch(e.surfaceTone){case"glass":return{backgroundColor:o.appearance==="dark"?"rgba(255,255,255,0.04)":"rgba(255,255,255,0.65)",backdropFilter:"blur(14px)"};case"mono":return{backgroundColor:o.appearance==="dark"?"#0a0a0a":we(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:we(o.surface)}}},_o=(e,o)=>{const t=we(o.primary),n=we(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${t} 0%, ${n} 100%)`;case"glow":return t;case"stripe":return`repeating-linear-gradient(45deg, ${t} 0 8px, ${n} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${t} 0%, ${n} 70%)`;case"flat":default:return t}},Bo=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${Ke(o.primary,40)}, 0 0 4px ${we(o.primary)}`},lo=e=>({letterSpacing:e.letterSpacing,textTransform:Wk(e),fontStyle:e.typeStyle,fontWeight:Xe(e,"heavy")}),je=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:Xe(e,"normal")}),Hk=(e,o)=>{var n,a,l;const t=(n=e.components)==null?void 0:n[o];return(l=(a=t==null?void 0:t.views)==null?void 0:a.container)==null?void 0:l.borderRadius},Vk=e=>{const o=e.tokens.rawCssVars||{},t=e.theme.border,n=e.theme.surface,a=e.theme.primary,l=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",s=o["shadow-ring-light"]||`${t} 0px 0px 0px 1px`,c=o["shadow-card"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, ${n} 0px 0px 0px 1px`,d=o["shadow-card-full"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, ${n} 0px 0px 0px 1px`;return[{name:"Level 0",label:"Flat",description:"No shadow",shadow:"none"},{name:"Level 1",label:"Ring",description:"Shadow-as-border",shadow:l},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:s},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:c},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:d},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${a}`}]},nr=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const l=Hk(e,a);if(l!==void 0)return l}return"12px"},wt=({glyph:e,badge:o})=>r.jsxs(i.View,{position:"relative",display:"inline-flex",children:[r.jsx(i.View,{width:32,height:32,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{backgroundColor:"rgba(0,0,0,0.06)",fontSize:18,lineHeight:"20px"},children:e}),o?r.jsx(i.View,{position:"absolute",top:-10,right:-18,paddingHorizontal:6,paddingVertical:2,borderRadius:9999,style:{backgroundColor:"#ffffff",color:"#222222",fontSize:9,fontWeight:700,letterSpacing:"0.04em",boxShadow:"0 1px 3px rgba(0,0,0,0.18)"},children:o}):null]}),Ak=[{title:"Homes",value:"homes",icon:r.jsx(wt,{glyph:"🏠"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:r.jsx(wt,{glyph:"🎈",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:r.jsx(wt,{glyph:"🛎️",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],Pk=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],Ek=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],Dk=({color:e,name:o,role:t,border:n})=>r.jsxs(i.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[r.jsx(i.View,{height:76,backgroundColor:e}),r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:t})]})]}),he=({title:e,children:o,config:t})=>r.jsxs(i.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,backgroundColor:t.theme.canvas,borderColor:t.theme.border,children:[r.jsx(i.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:t.theme.text,children:e}),o]}),$k=({config:e})=>{const o=Tk(e),t=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return r.jsx(i.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,backgroundColor:e.theme.surface,children:r.jsxs(i.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[r.jsxs(i.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[r.jsx(Ie,{variant:"outline",content:`${e.metadata.label} hero`}),r.jsx(Ei,{size:"xl",responsive:!0,highlightText:"design system",highlightStyle:o.highlightStyle,highlightColor:e.theme.primary,highlightSecondaryColor:o.highlightStyle==="gradient"?e.theme.secondary:e.theme.onPrimary,views:{container:{color:e.theme.text},text:{color:e.theme.text,fontFamily:e.tokens.typography.fontFamily,fontWeight:o.fontWeight,style:{letterSpacing:o.letterSpacing,fontStyle:o.fontStyle??"normal",textTransform:o.textTransform??"none"}},highlight:{color:t,fontWeight:o.highlightFontWeight??o.fontWeight,style:{fontStyle:o.highlightFontStyle??o.fontStyle??"normal",letterSpacing:o.highlightLetterSpacing??o.letterSpacing,textTransform:o.textTransform??"none"}}},children:"Build a beautiful design system in minutes"},`${e.metadata.id}-${o.highlightStyle}`),r.jsxs(i.Text,{color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,style:{fontSize:16,lineHeight:"24px",maxWidth:520},children:["Each brand defines its own highlight treatment —"," ",r.jsx(i.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",r.jsx(i.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",children:[r.jsx(ce,{color:"theme-primary",size:"md",children:"Get started"}),r.jsx(ce,{variant:"outline",color:"theme-primary",size:"md",children:"View docs"})]})]}),r.jsxs(i.View,{flex:"1 1 320px",minWidth:0,minHeight:260,position:"relative",overflow:"hidden",style:{backgroundImage:`linear-gradient(135deg, ${e.theme.primary}, ${e.theme.secondary||e.theme.primary})`},children:[r.jsx(i.View,{position:"absolute",top:"50%",left:"50%",width:180,height:180,borderRadius:9999,style:{transform:"translate(-50%, -50%)",backgroundColor:"rgba(255,255,255,0.18)",filter:"blur(40px)"}}),r.jsxs(i.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},Lk=({config:e})=>{var t,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(he,{title:"Color",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>r.jsx(Dk,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),r.jsx(he,{title:"Typography",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:16,lineHeight:"1.7",fontWeight:"400",children:"SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded to revolutionize space technology."}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),r.jsx(i.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>r.jsx(Ie,{variant:"outline",content:a},a))})]})}),r.jsx(he,{title:"Spacing, Radius, Shadow",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:r.jsx(Ve,{views:(n=(t=e.components)==null?void 0:t.table)==null?void 0:n.views,children:r.jsx(Ve.Template,{caption:"First extracted color tokens",columns:Pk,data:o})})})]})})]})},Ra=({palette:e})=>r.jsxs(Se,{width:"min(100%, 420px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(Se.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),r.jsx(i.Text,{fontSize:14,color:e.muted,children:"night"})]}),r.jsx(Ie,{variant:"filled",content:"Best value"})]})}),r.jsx(Se.Content,{children:r.jsxs(i.Vertical,{gap:12,children:[r.jsxs(i.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),r.jsxs(i.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),r.jsx(ce,{isFilled:!0,size:"lg",children:"Reserve"}),r.jsx(Nr,{}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$48"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Service fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),r.jsx(Nr,{}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),Fa=[{name:"Starter",tagline:"For solo makers shipping their first project.",price:"$0",period:"/ month",features:["1 workspace","Up to 3 projects","Community support"],ctaLabel:"Get started"},{name:"Pro",tagline:"For growing teams that need more room to build.",price:"$24",period:"/ month",features:["Unlimited projects","Advanced analytics","Priority email support","Custom domains"],ctaLabel:"Start free trial",featured:!0},{name:"Enterprise",tagline:"For organizations with security and scale needs.",price:"Custom",period:"",features:["SSO & SCIM","Audit logs","Dedicated success manager","99.99% uptime SLA"],ctaLabel:"Contact sales"}],za=({palette:e,tier:o,personality:t})=>{const n=yr(t),a=at(t,e),l=_o(t,e),s=Bo(t,e);return r.jsx(i.View,{width:"min(100%, 280px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:l,boxShadow:s}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:je(t),children:o.name}),o.featured?r.jsx(i.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,backgroundColor:Ke(e.onPrimary,22),children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:je(t),children:t.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:o.featured?Ke(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.tagline})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",gap:4,children:[r.jsx(i.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:lo(t),children:o.price}),o.period?r.jsx(i.Text,{fontSize:14,color:o.featured?Ke(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.period}):null]}),r.jsx(i.Vertical,{gap:8,children:o.features.map(c=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:18,height:18,borderRadius:t.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?Ke(e.onPrimary,22):e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(t,"heavy")},children:t.cornerStyle==="sharp"?"+":"✓"})}),r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:t.typeCase==="uppercase"?"uppercase":"none",letterSpacing:t.typeCase==="uppercase"?"0.04em":"normal",fontStyle:t.typeStyle},children:c})]},c))}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:t.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?e.onPrimary:e.text},children:r.jsx(i.Text,{fontSize:14,color:o.featured?e.primary:e.canvas,style:{...je(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},Ma=({palette:e,personality:o})=>{const t=yr(o),n=at(o,e),a=o.voice.includes("athletic")||o.voice.includes("motion")?"Aero Runner GT":o.voice.includes("mission")||o.voice.includes("futurist")?"Module-04 Insulated Jacket":"Linen Throw Pillow",l=o.voice.includes("athletic")||o.voice.includes("motion")?"Court Black · Mens":o.voice.includes("mission")||o.voice.includes("futurist")?"Carbon · Standard fit":"Stonewashed · Sand";return r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ke(e.primary,20)} 0%, ${Ke(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,color:e.text,style:lo(o),children:a}),r.jsx(i.View,{paddingHorizontal:10,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(i.Text,{fontSize:10,color:e.text,style:je(o),children:"IN STOCK"})})]}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:l})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,color:e.text,style:lo(o),children:"$42"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),r.jsx(i.Text,{fontSize:12,color:e.success||e.muted,style:je(o),children:"FREE SHIPPING"})]}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:_o(o,e),boxShadow:Bo(o,e)},children:r.jsx(i.Text,{fontSize:14,color:e.onPrimary,style:{...je(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},Wa=({palette:e,personality:o})=>{const t=yr(o),n=at(o,e),a=o.signatureMotif,l=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",s=o.voice.includes("athletic")?"Velocity AirFlow 7":o.voice.includes("mission")||o.voice.includes("futurist")?"Sentinel Pro Headset":o.voice.includes("refined")?"Pulse Studio Monitor":"Aurora Wireless Headphones",c=o.voice.includes("athletic")?"Lightweight knit · 280g":o.voice.includes("mission")||o.voice.includes("futurist")?"Mil-spec audio · 60h endurance":"Active noise cancelling · 40h battery",d=o.voice.includes("mission")?"MISSION PICK":o.voice.includes("athletic")?"TEAM PICK":o.voice.includes("futurist")?"SIGNATURE":"BEST SELLER";return r.jsxs(i.View,{position:"relative",width:"min(100%, 320px)",children:[r.jsx(i.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:_o(o,e),boxShadow:Bo(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(o,"heavy")},children:a}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:je(o),children:d})]})}),r.jsx(i.View,{position:"absolute",top:12,right:12,width:36,height:36,borderRadius:o.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",zIndex:2,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(i.Text,{fontSize:16,color:l==="♥"&&e.error||e.primary,style:{lineHeight:1},children:l})}),r.jsx(i.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ke(e.primary,20)} 0%, ${Ke(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),r.jsx(i.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),r.jsx(i.Text,{fontSize:18,color:e.text,style:lo(o),children:s}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:c})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:26,color:e.text,style:lo(o),children:"$189"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),r.jsx(i.View,{paddingHorizontal:8,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(i.Text,{fontSize:10,color:e.text,style:je(o),children:"–24%"})})]}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(i.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:_o(o,e),boxShadow:Bo(o,e)},children:r.jsx(i.Text,{fontSize:13,color:e.onPrimary,style:{...je(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),r.jsx(i.View,{paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",borderColor:e.border},children:r.jsx(i.Text,{fontSize:13,color:e.text,style:{...je(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},_k=[{slug:"PRIMARY-TINT",source:"primary",intensity:"tint",heading:"Bring everyone together with systems that scale",body:"Signature primary ground for systems, FAQ, and the contact form.",cta:"Get started"},{slug:"SECONDARY-TINT",source:"secondary",intensity:"tint",heading:"A faster, more efficient way of working",body:"Secondary ground for hero moments and supporting narrative.",cta:"Explore"},{slug:"WARNING-TINT",source:"warning",intensity:"tint",heading:"Designed for the way ideas actually move",body:"Warm tint for product storytelling and brand moments.",cta:"See the story"},{slug:"SUCCESS-TINT",source:"success",intensity:"tint",heading:"Ship with confidence, every single release",body:"Cool tint for changelogs, releases, and reliability notes.",cta:"Read changelog"},{slug:"ERROR-TINT",source:"error",intensity:"tint",heading:"Built for teams who care about the details",body:"Saturated tint for community stories and testimonials.",cta:"Meet the makers"},{slug:"INK-INVERTED",source:"ink",intensity:"inverted",heading:"Go deeper. Go further. Go all-in.",body:"Inverted ground for premium tiers and developer surfaces.",cta:"Open the docs"}],_t=(e,o)=>{const t=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),l=parseInt(t.slice(4,6),16);return[n,a,l].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${l}, ${o})`},Bt=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),ze=(e,o,t)=>Bt(e)?_t(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(s=>s.trim()).join(", ")}, ${o})`):t==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,Bk=({block:e,palette:o,personality:t})=>{const n=yr(t);let a,l;if(e.source==="ink")a=o.text,l=o.canvas;else{const g=o[e.source]||o.primary;e.intensity==="solid"?(a=g,l=o.onPrimary):(a=ze(g,.32,o.appearance),l=(o.appearance==="dark",o.text))}if(t.accentTreatment==="gradient"&&e.intensity==="tint"){const g=o[e.source],m=o.secondary;Bt(g)&&Bt(m)&&(a=`linear-gradient(135deg, ${_t(g,.32)} 0%, ${_t(m,.32)} 100%)`)}if(t.accentTreatment==="stripe"&&e.intensity==="tint"){const g=ze(o[e.source],.32,o.appearance),m=ze(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${g} 0 18px, ${m} 18px 36px)`}const s=ze(l,.72,o.appearance),c=ze(l,.55,o.appearance),d=l,u=l===o.canvas?o.text:o.canvas;return r.jsx(i.View,{width:"min(100%, 460px)",borderRadius:t.cardRadius*2,padding:n.large,style:{background:a},children:r.jsxs(i.Vertical,{gap:n.gap+6,children:[r.jsxs(i.Text,{fontSize:11,color:c,style:{...je(t),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[t.signatureMotif," ",e.slug]}),r.jsxs(i.Vertical,{gap:14,children:[r.jsx(i.Text,{fontSize:32,lineHeight:"36px",color:l,style:lo(t),children:e.heading}),r.jsx(i.Text,{fontSize:16,lineHeight:"22px",color:s,style:{fontStyle:t.typeStyle},children:e.body})]}),r.jsx(i.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:t.pillRadius,style:{backgroundColor:d,cursor:"pointer"},children:r.jsx(i.Text,{fontSize:15,color:u,style:{...je(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:t.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},Ha=[{id:"design-tokens",badge:"NEW",badgeTone:"success",favorite:"♥",category:"Design systems",title:"Design tokens that survive a redesign",excerpt:"Why semantic naming beats raw values — and how to migrate a token set without breaking every consumer.",author:"Léa Martin",meta:"6 min read · Mar 10",imageTone:"warm"},{id:"shipping-faster",badge:"FEATURED",badgeTone:"primary",favorite:"★",category:"Engineering",title:"Shipping faster without skipping review",excerpt:"Three async patterns we use to keep PR cycle time under 24h while still catching the regressions that matter.",author:"Jordan Reyes",meta:"9 min read · Mar 04",imageTone:"cool"},{id:"a11y-audit",badge:"TRENDING",badgeTone:"warning",favorite:"⛉",category:"Accessibility",title:"The accessibility audit nobody asked for",excerpt:"A walkthrough of the 12 issues we found on our own marketing site — and the four-week fix plan that followed.",author:"Ines Okafor",meta:"12 min read · Feb 27",imageTone:"mono"}],Va=({palette:e,article:o,personality:t})=>{const n=yr(t),a=at(t,e),l=e[o.badgeTone]||e.primary,s=e.secondary||e.primary,c=t.accentTreatment==="gradient"?`linear-gradient(135deg, ${ze(l,.55,e.appearance)} 0%, ${ze(s,.55,e.appearance)} 100%)`:t.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${ze(l,.45,e.appearance)} 0 16px, ${ze(s,.25,e.appearance)} 16px 32px)`:t.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${ze(l,.55,e.appearance)} 0%, ${ze(s,.35,e.appearance)} 70%)`:t.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${ze(l,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:ze(l,.32,e.appearance),d=t.voice.includes("mission")||t.voice.includes("futurist")?"◉":o.favorite,u=d==="♥"?e.error||e.primary:d==="★"&&e.warning||e.primary;return r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.View,{position:"relative",height:160,borderRadius:t.cardRadius,overflow:"hidden",style:{background:c},children:[r.jsx(i.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,style:{background:_o(t,{...e,primary:l}),boxShadow:Bo(t,e)},children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(t,"heavy")},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:je(t),children:o.badge})]})}),r.jsx(i.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:t.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(i.Text,{fontSize:16,color:u,style:{lineHeight:1},children:d})})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:je(t),children:o.category}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:lo(t),children:o.title}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:t.typeStyle},children:o.excerpt})]}),r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:28,height:28,borderRadius:t.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:12,color:e.text,style:{fontWeight:Xe(t,"normal"),fontStyle:t.typeStyle},children:o.author}),r.jsx(i.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},Aa=({palette:e,personality:o,config:t})=>{var m,h,f,y;const n=o.signatureMotif,a=e.primary,l=_o(o,e),s=Bo(o,e),c=((h=(m=t.tokens)==null?void 0:m.typography)==null?void 0:h.fontFamily)||((y=(f=t.tokens)==null?void 0:f.rawCssVars)==null?void 0:y.display)||"inherit",d=o.voice.includes("mission")?"MAKING LIFE MULTIPLANETARY":o.voice.includes("athletic")?"JUST DO IT":o.voice.includes("refined")?"A new standard in payments":o.voice.includes("speed")?"Built for the makers":o.voice.includes("rhythmic")?"Music for everyone":o.voice.includes("thoughtful")?"The connected workspace":o.voice.includes("warm")?"Belong anywhere":o.voice.includes("minimal")?"Think different":o.voice.includes("commerce")?"The platform commerce is built on":o.voice.includes("bold-fintech")?"Money for the next generation":o.voice.includes("trustworthy")?"The future of money":o.voice.includes("playful")?"Nothing great is made alone":o.voice.includes("motion")?"Get there":o.voice.includes("deploy")?"Develop. Preview. Ship.":o.voice.includes("futurist")?"Accelerating the world to sustainable energy":`${t.metadata.label}`,u=o.typeCase==="uppercase"?"EXPLORE":"Get started",g=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return r.jsxs(i.View,{width:"100%",borderRadius:o.cardRadius*2,padding:o.density==="spacious"?56:o.density==="tight"?28:40,style:{backgroundColor:e.canvas,color:e.text,fontFamily:c,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&r.jsx(i.View,{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:9999,style:{background:`radial-gradient(circle, ${a}40 0%, transparent 70%)`,pointerEvents:"none"}}),o.accentTreatment==="halftone"&&r.jsx(i.View,{position:"absolute",top:0,right:0,width:300,height:300,style:{background:`radial-gradient(circle at 70% 30%, ${a}30 0%, transparent 60%)`,pointerEvents:"none"}}),r.jsxs(i.Vertical,{gap:24,style:{position:"relative"},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:l,boxShadow:s},children:r.jsx(i.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(o,"heavy")},children:n})}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{...je(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:t.metadata.label})]}),r.jsx(i.Text,{fontSize:o.density==="spacious"?56:o.density==="tight"?40:48,lineHeight:o.density==="spacious"?"60px":o.density==="tight"?"44px":"52px",color:e.text,style:{...lo(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:c},children:d}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(i.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:l,boxShadow:s},children:r.jsx(i.Text,{fontSize:15,color:e.onPrimary,style:{...je(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Xe(o,"heavy"),fontFamily:c},children:u})}),r.jsx(i.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:r.jsx(i.Text,{fontSize:15,color:e.text,style:{...je(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Xe(o,"heavy"),fontFamily:c},children:g})})]}),r.jsx(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"center",marginTop:8,children:[{label:"Primary",value:e.primary},{label:"Surface",value:e.surface},{label:"Text",value:e.text},{label:"Success",value:e.success}].map(k=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:20,height:20,borderRadius:o.cornerStyle==="sharp"?0:o.cornerStyle==="pill"?9999:4,borderWidth:1,borderStyle:"solid",style:{backgroundColor:k.value,borderColor:e.border}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:je(o),children:k.label}),r.jsx(i.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:Fk(k.value)})]})]},k.label))})]})]})},Pa=({palette:e,config:o})=>r.jsxs(i.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[r.jsx(Ie,{variant:"outline",content:"New release"}),r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsxs(i.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[r.jsx(ce,{shape:"pill",size:"md",children:"Learn more"}),r.jsx(ce,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),r.jsx(i.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),Ea=({palette:e,config:o})=>r.jsxs(Se,{width:"min(100%, 320px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(Se.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Ie,{variant:"filled",content:"New"})]})}),r.jsx(Se.Content,{children:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",color:e.text,children:o.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(Se.Footer,{children:r.jsx(ce,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),Da=({palette:e})=>r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(ce,{color:"theme-primary",children:"Primary"}),r.jsx(ce,{color:"theme-secondary",children:"Secondary"}),r.jsx(ce,{color:"color-black",children:"Black"}),r.jsx(ce,{color:"color-white",textColor:"color-black",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(ce,{variant:"outline",color:"theme-primary",children:"Primary"}),r.jsx(ce,{variant:"outline",color:"theme-secondary",children:"Secondary"}),r.jsx(ce,{variant:"outline",color:"color-black",children:"Black"}),r.jsx(ce,{variant:"outline",color:"color-white",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(ce,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),r.jsx(ce,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),r.jsx(ce,{isDisabled:!0,children:"Disabled"}),r.jsx(ce,{isLoading:!0,children:"Loading"})]})]}),$a=({palette:e,config:o})=>r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Ie,{content:"Badge"}),r.jsx(Ie,{variant:"outline",content:"Outline"}),r.jsx(Ie,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),r.jsx(Ie,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),r.jsx(Ie,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),r.jsx(Ie,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(zr,{status:"success",label:"Operational"}),r.jsx(zr,{status:"warning",label:"Degraded"}),r.jsx(zr,{status:"error",label:"Outage"}),r.jsx(ao,{size:"sm",loaderColor:o.theme.primary})]}),r.jsx(tn,{title:"Heads up",description:"Brand styling cascades through every alert.",variant:"info",views:{container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},title:{color:e.text},description:{color:e.muted}}}),r.jsx(rs,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),La=({palette:e,config:o,mode:t})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:16,children:[r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(Me,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),r.jsx(ir,{id:`forms-${o.metadata.id}-${t}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{container:n.container,field:{fontSize:14,lineHeight:"20px",color:e.text},text:{fontSize:14,lineHeight:"20px",color:e.text}}}),r.jsx(gn,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(fn,{label:"Email updates",defaultIsSelected:!0}),r.jsx(yn,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(mn,{label:"Enabled",isChecked:!0})]})]})})},Ok=({config:e})=>{const[o,t]=p.useState(1),n=Ik(e),a=Rk(e),l=Mk(e);return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(he,{title:"Brand Snapshot (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Aa,{palette:n,personality:l,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Aa,{palette:a,personality:l,config:e})})]})}),r.jsx(he,{title:"Buttons — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Da,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Da,{palette:a})})]})}),r.jsx(he,{title:"Status & Feedback — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx($a,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx($a,{palette:a,config:e})})]})}),r.jsx(he,{title:"Forms — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(La,{palette:n,config:e,mode:"light"})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(La,{palette:a,config:e,mode:"dark"})})]})}),r.jsx(he,{title:"Forms (legacy preview)",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[r.jsx(Me,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),r.jsx(ir,{id:`design-system-select-${e.metadata.id}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx(gn,{label:"Notes",placeholder:"Add implementation notes"}),r.jsxs(i.Vertical,{gap:12,children:[r.jsx(fn,{label:"Email updates",defaultIsSelected:!0}),r.jsx(yn,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(mn,{label:"Enabled",isChecked:!0}),r.jsx(xi,{defaultValue:58,showValue:!0}),r.jsx(ei,{length:6,label:"Verification Code"})]})]})}),r.jsx(he,{title:"Form States",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(Me,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),r.jsx(Me,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),r.jsx(Me,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),r.jsx(Me,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),r.jsx(Me,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),r.jsx(Me,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),r.jsx(ir,{id:`design-system-select-error-${e.metadata.id}`,size:"md",label:"Select error",placeholder:"Pick one",error:!0,helperText:"Selection required",options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx(ir,{id:`design-system-select-disabled-${e.metadata.id}`,size:"md",label:"Select disabled",placeholder:"Disabled",isDisabled:!0,options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}})]})}),r.jsx(he,{title:"Elevation & Depth",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:Vk(e).map(s=>r.jsxs(i.Vertical,{gap:12,children:[r.jsx(i.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:s.shadow}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",children:s.name}),r.jsx(i.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:s.label})]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:s.description}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:s.shadow})]})]},s.name))})}),r.jsx(he,{title:"Color Blocks",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:12,children:[["primary","Primary",e.theme.onPrimary],["secondary","Secondary",e.theme.onPrimary],["success","Success","#ffffff"],["warning","Warning","#ffffff"],["error","Error","#ffffff"],["canvas","Canvas",e.theme.text],["surface","Surface",e.theme.text],["text","Text",e.theme.canvas],["muted","Muted",e.theme.canvas],["border","Border",e.theme.text],["onPrimary","On primary",e.theme.text]].map(([s,c,d])=>{const u=e.theme[s];return r.jsxs(i.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[r.jsx(i.View,{height:88,backgroundColor:u}),r.jsxs(i.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[r.jsx(i.Text,{fontSize:13,fontWeight:"700",children:c}),r.jsxs(i.Text,{fontSize:11,color:e.theme.muted,children:["theme.",s]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:u})]})]},s)})})}),r.jsx(he,{title:"Pricing — Booking (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Ra,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ra,{palette:a})})]})}),r.jsx(he,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Fa.map(s=>r.jsx(za,{palette:n,tier:s,personality:l},s.name))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Fa.map(s=>r.jsx(za,{palette:a,tier:s,personality:l},s.name))})})]})}),r.jsx(he,{title:"Pricing — Product (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Ma,{palette:n,personality:l})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ma,{palette:a,personality:l})})]})}),r.jsx(he,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Wa,{palette:n,personality:l})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Wa,{palette:a,personality:l})})]})}),r.jsx(he,{title:"Content — Color Block Cards",config:e,children:r.jsx(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:_k.map(s=>r.jsx(Bk,{block:s,palette:n,personality:l},s.slug))})}),r.jsx(he,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Ha.map(s=>r.jsx(Va,{palette:n,article:s,personality:l},s.id))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Ha.map(s=>r.jsx(Va,{palette:a,article:s,personality:l},s.id))})})]})}),r.jsx(he,{title:"CTA Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Pa,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Pa,{palette:a,config:e})})]})}),r.jsx(he,{title:"Product Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Ea,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ea,{palette:a,config:e})})]})}),r.jsx(he,{title:"Content & Layout",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[r.jsxs(Se,{width:"min(100%, 320px)",children:[r.jsx(Se.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Ie,{variant:"filled",content:"New"})]})}),r.jsx(Se.Content,{children:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:e.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(Se.Footer,{children:r.jsx(ce,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),r.jsxs(Se,{width:"min(100%, 320px)",children:[r.jsx(Se.Header,{children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[r.jsx(ll,{fallback:e.metadata.label.slice(0,2)}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),r.jsx(i.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),r.jsx(Ie,{variant:"outline",content:"Active"})]})}),r.jsx(Se.Content,{children:e.metadata.id==="spacex"?r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):r.jsx(tn,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),r.jsx($k,{config:e}),r.jsx(ol,{ratio:16/9,borderRadius:12,overflow:"hidden",children:r.jsx(i.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:r.jsxs(i.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[r.jsx(i.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),r.jsx(Ie,{content:"Config primary color"})]})})}),r.jsxs(Ee,{children:[r.jsx(Ee.Content,{children:[1,2,3].map(s=>r.jsx(Ee.Item,{children:r.jsx(i.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:r.jsxs(i.Text,{fontSize:24,fontWeight:"700",children:["Slide ",s]})})},s))}),r.jsxs(i.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[r.jsx(Ee.Previous,{}),r.jsx(Ee.Next,{})]})]})]})}),r.jsx(he,{title:"Navigation & Interactive",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsxs(i.Vertical,{gap:20,children:[r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),r.jsx(Lo,{tabs:Ak,defaultValue:"homes",views:{tab:{borderRadius:nr(e,"tabs")},activeTab:{borderRadius:nr(e,"tabs")}}})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),r.jsx(Lo,{defaultValue:"overview",views:{tab:{borderRadius:nr(e,"tabs")},activeTab:{borderRadius:nr(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),r.jsx(ko,{items:Ek,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const s=nr(e,"accordion"),c={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},d={...c,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return r.jsxs(Pe,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:s,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[r.jsxs(Pe.Item,{value:"tokens",...c,views:{item:c,trigger:{borderRadius:0}},children:[r.jsx(Pe.Trigger,{children:"Token extraction"}),r.jsx(Pe.Content,{children:r.jsxs(i.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),r.jsxs(Pe.Item,{value:"overrides",...d,views:{item:d,trigger:{borderRadius:0}},children:[r.jsx(Pe.Trigger,{children:"Override behavior"}),r.jsx(Pe.Content,{children:r.jsx(i.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),r.jsx(Nr,{label:"advanced tools"}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(xn,{color:e.theme.primary,children:"Toggle Button"}),r.jsx(Di,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),r.jsx(tt,{content:"Tooltip message",children:r.jsx(ce,{variant:"outline",children:"Hover for Tooltip"})}),r.jsxs(Re,{children:[r.jsx(Re.Trigger,{children:r.jsx(ce,{variant:"ghost",children:"Hover Card"})}),r.jsx(Re.Content,{children:r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontWeight:"700",children:"Detailed Info"}),r.jsx(i.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),r.jsx(qi,{value:e.theme.primary}),r.jsx(ns,{shareData:{url:"https://example.com",title:"Example"}}),r.jsx(ln,{to:"#",children:"Inline Link component"})]}),r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:r.jsx(os,{currentPage:o,totalPages:10,onPageChange:t})})]})})]})},Nk=({config:e})=>{var o;return r.jsxs(Gt,{config:e,children:[r.jsx(jk,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(t=>r.jsx("link",{rel:"stylesheet",href:t},t))}),r.jsx(i.View,{minHeight:"100vh",padding:28,fontFamily:e.tokens.typography.fontFamily,backgroundColor:e.theme.canvas,color:e.theme.text,style:{textTransform:e.metadata.id==="spacex"?"uppercase":"none"},children:r.jsxs(i.Vertical,{gap:28,children:[r.jsxs(i.Vertical,{gap:12,maxWidth:900,children:[r.jsxs(i.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),r.jsxs(i.Text,{fontSize:16,lineHeight:"24px",color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,children:["Live App Studio components rendered with the"," ",e.metadata.label," config defaults."]})]}),r.jsxs(i.Vertical,{gap:28,children:[r.jsx(Lk,{config:e}),r.jsx(Ok,{config:e})]})]})})]})};exports.Accordion=Pe;exports.ActionSheet=fp;exports.Alert=tn;exports.ArrowIcon=lp;exports.AspectRatio=ol;exports.AttachmentGroup=Li;exports.AttachmentIcon=sr;exports.AttachmentPreview=ty;exports.AudioIcon=$o;exports.AudioInput=Hp;exports.AudioWaveform=nn;exports.Avatar=ll;exports.BackIcon=zu;exports.Background=ws;exports.Badge=Ie;exports.BatteryIcon=gu;exports.BluetoothIcon=rp;exports.BoldArrowIcon=ap;exports.BookmarkIcon=hu;exports.Button=ce;exports.CHART_COLORS=Ae;exports.CalendarIcon=Uu;exports.CameraIcon=op;exports.Card=Se;exports.Carousel=Ee;exports.Chart=_m;exports.ChartIcon=Iu;exports.ChatInput=Cs;exports.ChatWidget=vs;exports.ChatWidgetComponent=Wn;exports.ChatWidgetWidget=U1;exports.CheckIcon=Fu;exports.Checkbox=fn;exports.ChevronIcon=ue;exports.ClockIcon=Gu;exports.CloseEyeIcon=Zt;exports.CloseIcon=We;exports.CloudIcon=fu;exports.ColorInput=og;exports.ColorPicker=qi;exports.ComboBox=Rh;exports.Command=Go;exports.ContextMenu=qo;exports.CookieConsent=Um;exports.CopyIcon=yu;exports.CountryPicker=sg;exports.CreditCardIcon=Bu;exports.CropIcon=cp;exports.DEFAULT_CHART_COLORS=bl;exports.DatePicker=xh;exports.DeleteIcon=xu;exports.DesignSystem=Nk;exports.DesignSystemProvider=Gt;exports.Divider=Zx;exports.DocumentIcon=Tu;exports.DownloadIcon=Cu;exports.DragAndDrop=ix;exports.DragAndDropComponent=$i;exports.DragHandleIcon=Zd;exports.DragHandleLinesIcon=up;exports.Drawer=bo;exports.DropZone=ux;exports.DropdownMenu=gr;exports.DustBinIcon=Ur;exports.EditIcon=bu;exports.EmojiPicker=Rx;exports.ErrorIcon=Yr;exports.ExternalLinkIcon=Ja;exports.FacebookIcon=iu;exports.FileIcon=ho;exports.FileImage=e0;exports.FileSVG=Zm;exports.FilterIcon=qu;exports.FolderIcon=Qd;exports.FormikChatInput=tf;exports.FormikCheckbox=_h;exports.FormikColorInput=af;exports.FormikComboBox=wf;exports.FormikCountryPicker=df;exports.FormikDatePicker=sf;exports.FormikEmojiPicker=ry;exports.FormikForm=Dh;exports.FormikIconPicker=Kf;exports.FormikOTPInput=Vf;exports.FormikPassword=Sf;exports.FormikRadio=Oh;exports.FormikSelect=pf;exports.FormikSelector=Ef;exports.FormikSlider=Mf;exports.FormikSwitch=gf;exports.FormikTagInput=ff;exports.FormikTextArea=xf;exports.FormikTextField=kf;exports.FormikToggle=_f;exports.FormikToggleGroup=Nf;exports.FormikUploader=ci;exports.GiftIcon=Au;exports.Gradient=Ui;exports.HeartIcon=uu;exports.HelpIcon=Jd;exports.HomeIcon=ku;exports.HoverCard=Re;exports.Icon=Vr;exports.IconPicker=zx;exports.ImageIcon=ou;exports.InfoIcon=ro;exports.InstagramIcon=au;exports.KeyboardAvoidingView=Ci;exports.LayoutIcon=Lu;exports.LikeIcon=ep;exports.Link=ln;exports.LinkIcon=$u;exports.LinkedinIcon=su;exports.Loader=ao;exports.LoadingSpinnerIcon=Qt;exports.LockIcon=ju;exports.LogoutIcon=Eu;exports.MagicWandIcon=Qu;exports.MapPinIcon=Yu;exports.MediaPreview=ay;exports.MenuIcon=Ku;exports.Menubar=Co;exports.MessageLayout=Tp;exports.MessageView=nl;exports.MicrophoneIcon=Xt;exports.MinusIcon=Ga;exports.Modal=xo;exports.ModalLayout=kn;exports.ModalRouter=kn;exports.MoonIcon=Ru;exports.MoreIcon=Ou;exports.MousePointerIcon=Za;exports.NavigationMenu=ko;exports.NotificationIcon=vu;exports.OTPInput=ei;exports.OpenEyeIcon=en;exports.PageLayout=jy;exports.Pagination=os;exports.PanelIcon=Qa;exports.Password=kh;exports.PauseIcon=du;exports.PlayIcon=Ya;exports.PlusIcon=Su;exports.PowerOffIcon=Du;exports.PrintIcon=Ju;exports.ProfileIcon=wu;exports.ProgressBar=rs;exports.Radio=yn;exports.RadioGroup=O0;exports.RefreshIcon=Xu;exports.Resizable=zn;exports.RotateIcon=Vu;exports.Router=My;exports.SaveIcon=mu;exports.SearchIcon=Ar;exports.Select=ir;exports.Selector=I0;exports.SendIcon=Jt;exports.Separator=Nr;exports.SettingsIcon=Ka;exports.ShapeIcon=Hu;exports.ShareButton=ns;exports.ShareIcon=Xa;exports.ShieldIcon=Pu;exports.Sidebar=hr;exports.Slider=xi;exports.SliderIcon=sp;exports.SpinnerIcon=ip;exports.SplashScreen=Ty;exports.StarIcon=pu;exports.StatusIndicator=zr;exports.StopIcon=Gr;exports.SuccessIcon=on;exports.Switch=mn;exports.Table=Ve;exports.Tabs=Lo;exports.TagInput=Mh;exports.TextArea=gn;exports.TextField=Me;exports.TextIcon=Wu;exports.ThreadsIcon=cu;exports.TickIcon=cr;exports.Title=Ei;exports.Toast=Pb;exports.Toggle=xn;exports.ToggleGroup=Di;exports.Tooltip=tt;exports.TrashIcon=Nu;exports.TwitchIcon=nu;exports.TwitterIcon=ru;exports.UnLikeIcon=Zu;exports.UnlockIcon=tp;exports.UploadIcon=rn;exports.Uploader=Xr;exports.UserIcon=Xd;exports.VideoIcon=eu;exports.WarningIcon=Kt;exports.WifiIcon=np;exports.XIcon=tu;exports.YoutubeIcon=lu;exports.ZapIcon=_u;exports.ZoomInIcon=dp;exports.ZoomOutIcon=Mu;exports.deepMerge=Be;exports.defaultDesignSystemConfig=_a;exports.designSystemConfigList=Dd;exports.designSystemConfigs=Nt;exports.getDesignSystemComponentProps=Ut;exports.goBack=Ry;exports.hideDrawer=ki;exports.hideMessage=tl;exports.hideModal=bn;exports.matchPath=Si;exports.mergeDesignSystemComponentProps=Oa;exports.navigate=Iy;exports.normalizeDesignSystemComponentProps=qt;exports.setSplashLoaded=wy;exports.setSplashStarted=vy;exports.showDrawer=ky;exports.showMessage=rl;exports.showModal=ly;exports.showToast=So;exports.useDesignSystem=qr;exports.useDesignSystemComponentProps=No;exports.useDrawerStore=no;exports.useHistory=jn;exports.useMergedDesignSystemComponentProps=fe;exports.useMessageStore=Kr;exports.useModalStore=to;exports.useRouterStore=_e;exports.useSplashStore=et;exports.useToast=Eb;
79
+ `})]})},u1=({number:e=20,children:o,...r})=>{const n=Array.from({length:e},(a,l)=>l);return t.jsxs(s.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...r,children:[n.map(a=>{const l=a*37%200-100+"px",i=.2+a*13%6*.1+"s",u=(1+a*7%9)/2+"s",c=300+a*17%100+"px";return t.jsx(s.View,{position:"absolute",top:"0px",left:l,width:"2px",height:"2px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)",transform:"rotate(215deg)",zIndex:0,animate:{from:{transform:"translateX(-100%) translateY(-100%)"},to:{transform:`translateX(${c}) translateY(${c})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:u,delay:i},children:t.jsx(s.View,{position:"absolute",top:"-1px",left:"-1px",width:"1px",height:"1px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 10px 0 1px rgba(255, 255, 255, 0.1)"})},a)}),o&&t.jsx(s.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},_a=["rgb(186, 230, 253)","rgb(249, 168, 212)","rgb(134, 239, 172)","rgb(253, 224, 71)","rgb(252, 165, 165)","rgb(216, 180, 254)","rgb(147, 197, 253)","rgb(165, 180, 252)","rgb(196, 181, 253)"],p1=()=>_a[Math.floor(Math.random()*_a.length)],m1=({rows:e=15,cols:o=10,squareSize:r=40,...n})=>{const a=Array(e).fill(1),l=Array(o).fill(1);return t.jsx(s.View,{padding:16,width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-50",zIndex:0,transform:"skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)",...n,children:a.map((i,u)=>t.jsx(s.Horizontal,{gap:0,children:l.map((c,d)=>t.jsx(s.View,{height:r/3,width:r,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:p1(),transition:"background-color 0.2s ease"}}},`col-${d}`))},`row-${u}`))})},g1=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],h1=({count:e=50,colors:o=g1,speed:r="medium",shapes:n=["circle"],...a})=>{const l=Array.from({length:e},(d,g)=>g),i=()=>{switch(r){case"slow":return .5;case"fast":return 2;default:return 1}},u=()=>n[Math.floor(Math.random()*n.length)],c=()=>o[Math.floor(Math.random()*o.length)];return t.jsx(s.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:l.map(d=>{const g=Math.random()*8+4,p=Math.random()*400,h=Math.random()*300,f=Math.random()*400,y=Math.random()*300,b=(Math.random()*10+5)/i(),x=Math.random()*5,C=u(),k=c(),w={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return t.jsx(s.View,{position:"absolute",width:g,height:g,backgroundColor:k,opacity:.7,style:{left:p,top:h,...w[C]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${f-p}px, ${y-h}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${b}s`,delay:`${x}s`}},d)})})},f1=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:r="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const l=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},i=Math.floor(400/e),u=Math.floor(300/e),c=i*u,d=Array.from({length:c},(g,p)=>p);return t.jsxs(s.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:i+1},(g,p)=>t.jsx(s.View,{position:"absolute",left:p*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${p}`)),Array.from({length:u+1},(g,p)=>t.jsx(s.View,{position:"absolute",left:0,top:p*e,width:"100%",height:1,backgroundColor:o},`h-line-${p}`)),d.map(g=>{const p=g%i,h=Math.floor(g/i),f=(p+h)*.1;return t.jsx(s.View,{position:"absolute",left:p*e+1,top:h*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:r},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${l()}s`,delay:`${f}s`}},g)})]})},y1=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],x1=({rippleCount:e=5,colors:o=y1,maxSize:r=200,frequency:n=3,...a})=>{const l=Array.from({length:e},(i,u)=>({id:u,x:Math.random()*400,y:Math.random()*300,color:o[u%o.length],delay:u*(n/e),duration:3+Math.random()*2}));return t.jsxs(s.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[l.map(i=>t.jsx(s.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:i.x-10,top:i.y-10,border:`2px solid ${i.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${r/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${i.duration}s`,delay:`${i.delay}s`}},i.id)),l.map(i=>t.jsx(s.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:i.x-5,top:i.y-5,backgroundColor:i.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${r/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${i.duration*1.2}s`,delay:`${i.delay+.5}s`}},`secondary-${i.id}`))]})},b1=({children:e,src:o,backgroundSize:r="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:l="scroll",imageOpacity:i=1,overlay:u=null,blendMode:c="normal",views:d,themeMode:g,...p})=>{const h={...Pr.image,backgroundImage:`url(${o})`,backgroundSize:r,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:l,opacity:i,mixBlendMode:c};return t.jsxs(s.View,{...Pr.container,...d==null?void 0:d.container,...p,children:[t.jsx(s.View,{style:h,...d==null?void 0:d.image}),u,e&&t.jsx(s.View,{...Pr.content,...d==null?void 0:d.content,children:e})]})},k1=({children:e,src:o,autoPlay:r=!0,loop:n=!0,muted:a=!0,playsInline:l=!0,overlay:i=null,blendMode:u="normal",views:c,themeMode:d,...g})=>t.jsxs(s.View,{...Dr.container,...c==null?void 0:c.container,...g,children:[t.jsx(s.View,{as:"video",src:o,autoPlay:r,loop:n,muted:a,playsInline:l,style:{...Dr.video,mixBlendMode:u},...c==null?void 0:c.video}),i,e&&t.jsx(s.View,{...Dr.content,...c==null?void 0:c.content,children:e})]}),C1=({children:e,...o})=>t.jsx(Ms,{...o,children:e}),S1=/^(color|theme|light|dark)-/,w1=e=>{const o=e.split("-"),r=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(r)&&r>=0&&r<=1e3?o.slice(0,-1).join("-"):e},j1=({contentPosition:e,backgroundColor:o="color-black-900",...r})=>{const n=S1.test(o),a=n?w1(o):o,i=(()=>{let u=`${a}-100`,c=`${a}-900`,d=`${a}-600`,g=`${a}-400`;switch(n||(u=`color-mix(in srgb, ${a} 10%, transparent)`,c=`color-mix(in srgb, ${a} 90%, transparent)`,d=`color-mix(in srgb, ${a} 70%, transparent)`,g=`color-mix(in srgb, ${a} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${u} 0%, ${u} 100%), linear-gradient(to right, ${c} 0%, ${d} 65%, ${u} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${u} 0%, ${u} 100%), linear-gradient(to left, ${c} 0%, ${d} 65%, ${u} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${u} 0%, ${u} 100%), linear-gradient(to bottom, ${c} 0%, ${d} 60%, ${u} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${u} 0%, ${u} 100%), linear-gradient(to top, ${c} 0%, ${d} 60%, ${u} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${c} 0%, ${u} 100%)`;default:return g}})();return t.jsx(s.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:i,pointerEvents:"none",zIndex:1,...r})},v1=({children:e,views:o,...r})=>t.jsx(c1.Provider,{value:{},children:t.jsx(s.View,{...s1.container,...o==null?void 0:o.container,...r,children:e})}),rc=m.forwardRef(({children:e,shape:o="rounded",decorationRotation:r=5,decorationScale:n=1,decorationOpacity:a=.8,views:l,...i},u)=>{const d=(b=>{switch(b){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(o),g=Math.abs(r)*(Math.PI/180),p=Math.sin(g)*100,h=(n-1)*100/2,f=Math.ceil(p+h),y=i.backgroundColor??"theme-primary";return t.jsx(s.View,{...i,ref:u,backgroundColor:"transparent",position:"relative",overflow:"visible",...l==null?void 0:l.container,children:t.jsxs(s.View,{padding:i.padding??`${96+f}px ${f}px`,position:"relative",overflow:"visible",children:[t.jsx(s.View,{position:"absolute",top:f,left:f,right:f,bottom:f,backgroundColor:y,borderRadius:d,opacity:a/1.5,transform:`scale(${n})`,pointerEvents:"none",zIndex:1,...l==null?void 0:l.back}),t.jsx(s.View,{position:"absolute",top:f,left:f,right:f,bottom:f,transform:`rotate(${r}deg) scale(${n})`,opacity:a/1.2,backgroundColor:y,borderRadius:d,pointerEvents:"none",zIndex:2,...l==null?void 0:l.front}),t.jsx(s.View,{margin:"0 auto",position:"relative",zIndex:3,...l==null?void 0:l.content,children:e})]})})});rc.displayName="Background.Layout";const Ce=v1;Ce.Aurora=d1;Ce.Meteors=u1;Ce.Wall=m1;Ce.Particles=h1;Ce.Grid=f1;Ce.Ripples=x1;Ce.Image=b1;Ce.Video=k1;Ce.Gradient=C1;Ce.Overlay=j1;Ce.Layout=rc;const nc=m.forwardRef((e,o)=>t.jsx(Ce,{...e,ref:o}));nc.displayName="Background";const ac=Object.assign(nc,{Layout:Ce.Layout,Aurora:Ce.Aurora,Meteors:Ce.Meteors,Wall:Ce.Wall,Particles:Ce.Particles,Grid:Ce.Grid,Ripples:Ce.Ripples,Image:Ce.Image,Video:Ce.Video,Gradient:Ce.Gradient,Overlay:Ce.Overlay});ac.displayName="Background";function T1(e){const{inputValue:o,onInputChange:r,onSubmit:n,messages:a=[]}=e,[l,i]=m.useState(""),u=m.useRef(null),c=m.useRef(null),d=o!==void 0,g=o!==void 0?o:l,p=m.useCallback(f=>{d?r==null||r(f):i(f)},[d,r]),h=m.useCallback(f=>{f&&f.preventDefault();const y=g.trim();y&&n&&(n(y),d||i(""),u.current&&(u.current.style.height="auto"))},[g,n,d]);return m.useEffect(()=>{c.current&&(c.current.scrollTop=c.current.scrollHeight)},[a.length]),{internalInputValue:g,handleInputChange:p,handleSubmit:h,inputRef:u,messagesRef:c}}const I1={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},R1={default:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},glassy:{backgroundColor:"color-white-900",backdropFilter:"blur(10px)",border:"1px solid rgba(226, 232, 240, 0.9)",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},minimal:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px"}},F1={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},z1={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},M1={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},W1={position:"relative",backgroundColor:"color-white",borderTop:"1px solid color-gray-200",padding:"12px",display:"flex",alignItems:"flex-end",gap:"8px",transition:"background-color 0.2s ease, border-color 0.2s ease"},Ze={container:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden"},messagesContainer:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px",padding:"16px",backgroundColor:"color-gray-50"},inputContainer:W1,bubble:{maxWidth:"80%",position:"relative",wordWrap:"break-word",animation:"chatBubbleAppear 0.25s ease-out"},timestamp:{position:"absolute",top:"-24px",fontSize:"12px",color:"color-gray-500",backgroundColor:"color-white-900",padding:"2px 8px",borderRadius:"9999px",opacity:0,transition:"opacity 0.15s ease-out",border:"1px solid color-gray-200"},input:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",resize:"none",fontFamily:"inherit",fontSize:"14px",minHeight:"24px",maxHeight:"120px"},sendButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease, opacity 0.2s ease",flexShrink:0},attachmentButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",transition:"background-color 0.2s ease",flexShrink:0}},E1=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:r=!1,variant:n="default",size:a="md",showTimestamps:l=!0,enableAttachments:i=!1,enableContextPicker:u=!1,selectedContextElements:c=[],onContextPickerClick:d,onRemoveContextElement:g,isLoading:p=!1,loadingText:h="Loading...",styles:f={},maxHeight:y="600px",internalInputValue:b,handleInputChange:x,handleSubmit:C,inputRef:k,messagesRef:w,inputValue:v,onInputChange:S,...I})=>{var A;const j={...Ze.container,...R1[n],...f.container},R={...Ze.messagesContainer,maxHeight:y,...f.messagesContainer},z={...Ze.inputContainer,...f.inputContainer},E={...Ze.input,...I1[a],...f.input},W=m.useCallback(H=>{x(H.target.value),H.target.style.height="auto",H.target.style.height=`${H.target.scrollHeight}px`},[x]),F=m.useCallback(H=>{H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),C())},[C]),T=b.trim().length>0,{onSubmit:M,...V}=I;return t.jsxs(s.View,{...j,...V,children:[t.jsxs(s.View,{ref:w,...R,children:[e.length===0?t.jsx(s.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:t.jsx(s.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(H=>t.jsx(A1,{message:H,size:a,showTimestamp:l,styles:{bubble:f.bubble,userBubble:f.userBubble,assistantBubble:f.assistantBubble,timestamp:f.timestamp,reasoningContainer:f.reasoningContainer,reasoningContent:f.reasoningContent,errorMessage:f.errorMessage,systemMessage:f.systemMessage,toolMessage:f.toolMessage}},H.id)),p&&t.jsxs(s.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...f.loadingIndicator,children:[t.jsx(kn,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),t.jsx(s.Text,{color:"color-gray-500",fontSize:"14px",children:h})]})]}),t.jsxs(s.View,{children:[c.length>0&&t.jsx(s.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...f.contextChipsContainer,children:c.map(H=>t.jsxs(s.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[t.jsx(s.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:H.name}),t.jsx(s.View,{as:"button",type:"button",onClick:()=>g==null?void 0:g(H.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:t.jsx($e,{widthHeight:12,color:"color-blue-700"})})]},H.id))}),t.jsxs(s.View,{as:"form",onSubmit:C,...z,children:[i&&t.jsx(s.View,{as:"button",type:"button",...Ze.attachmentButton,...f.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:t.jsx(St,{widthHeight:16,color:"color-gray-600"})}),t.jsx(s.View,{as:"textarea",ref:k,value:b,onChange:W,onKeyDown:F,placeholder:o,disabled:r||p,...E,style:{...E,opacity:r||p?.5:1}}),t.jsxs(s.Vertical,{gap:4,alignItems:"center",children:[u&&t.jsx(s.View,{as:"button",type:"button",onClick:d,...Ze.attachmentButton,...f.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(A=f.contextPickerButton)==null?void 0:A._hover},title:"Select element from page",children:t.jsx(Sl,{widthHeight:16,color:"color-gray-600"})}),t.jsx(s.View,{as:"button",disabled:!T||r||p,...Ze.sendButton,backgroundColor:T?"theme-primary":"color-gray-300",_hover:{backgroundColor:T?"theme-primary":"color-gray-300"},...f.sendButton,style:{cursor:T?"pointer":"not-allowed",opacity:!T||r||p?.6:1},children:t.jsx(bn,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},A1=({message:e,size:o,showTimestamp:r,styles:n})=>{const[a,l]=m.useState(!1),[i,u]=m.useState(!1),c=e.role==="user",d=e.messageType==="system",g=e.messageType==="error",p=e.messageType==="tool";if(d)return t.jsx(s.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:t.jsxs(s.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[t.jsx(io,{widthHeight:12,color:"color-gray-600"}),t.jsx(s.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(p)return t.jsx(s.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:t.jsxs(s.Horizontal,{gap:8,alignItems:"center",backgroundColor:"color-gray-50",padding:"8px 10px",borderRadius:"8px",width:"100%",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[t.jsx(xl,{widthHeight:14,color:"color-gray-600"}),t.jsxs(s.Vertical,{gap:2,children:[t.jsx(s.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),t.jsx(s.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const h={...Ze.bubble,...F1[o],...c?z1:M1,...g?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...c?n.userBubble:n.assistantBubble,...g?n.errorMessage:{}},f={...Ze.timestamp,[c?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return t.jsx(s.View,{position:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),display:"flex",justifyContent:c?"flex-end":"flex-start",children:t.jsxs(s.View,{...h,children:[r&&t.jsx(s.View,{...f,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),g&&t.jsxs(s.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[t.jsx(pr,{widthHeight:14,color:"color-red-700"}),t.jsx(s.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&t.jsxs(s.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[t.jsxs(s.Horizontal,{as:"button",onClick:()=>u(!i),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[t.jsx(s.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),t.jsx(Se,{orientation:i?"down":"right",widthHeight:10,color:"color-gray-500"})]}),i&&t.jsx(s.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:t.jsx(s.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),t.jsx(s.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&t.jsx(s.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(y=>t.jsxs(s.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[t.jsx(St,{widthHeight:14}),t.jsx(s.Text,{children:y.name})]},y.id))}),e.contextElements&&e.contextElements.length>0&&t.jsxs(s.Vertical,{gap:4,marginTop:"8px",children:[t.jsx(s.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(y=>t.jsx(s.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:t.jsx(s.Text,{color:"color-blue-700",fontWeight:"500",children:y.name})},y.id))]})]})})},Jn=e=>{const o=T1(e);return t.jsx(E1,{...e,...o})};Jn.displayName="ChatWidget";const lc=Jn;function H1({onSelect:e,onCancel:o,active:r}){const[n,a]=m.useState(null);m.useRef(null);const l=m.useCallback(c=>{var f;if(!r)return;const d=document.elementFromPoint(c.clientX,c.clientY);if(!d||d===document.body||d.closest('[data-chatwidget-ignore="true"]')||d.closest("#chatwidget-overlay")){a(null);return}const g=d.getBoundingClientRect();let p=d.tagName.toLowerCase();if(d.id)p+=`#${d.id}`;else if(d.className&&typeof d.className=="string"){const y=d.className.split(" ")[0];y&&(p+=`.${y}`)}const h=(f=d.innerText)==null?void 0:f.slice(0,20);h&&(p+=` ("${h}...")`),a({id:d.id||`el-${Date.now()}`,name:p,tagName:d.tagName.toLowerCase(),rect:g})},[r]),i=m.useCallback(c=>{!r||c.target.closest('[data-chatwidget-ignore="true"]')||(c.preventDefault(),c.stopPropagation(),n&&e(n))},[r,n,e]),u=m.useCallback(c=>{r&&c.key==="Escape"&&o()},[r,o]);return m.useEffect(()=>{if(!(typeof document>"u"))return r?(document.addEventListener("mousemove",l),document.addEventListener("click",i,!0),document.addEventListener("keydown",u),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",l),document.removeEventListener("click",i,!0),document.removeEventListener("keydown",u),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("click",i,!0),document.removeEventListener("keydown",u),document.body.style.cursor=""}},[r,l,i,u]),{highlightedElement:n}}function V1({element:e}){return e?t.jsx("div",{id:"chatwidget-overlay",style:{position:"fixed",top:e.rect.top,left:e.rect.left,width:e.rect.width,height:e.rect.height,border:"2px solid #1D4ED8",backgroundColor:"rgba(29, 78, 216, 0.08)",pointerEvents:"none",zIndex:99999,transition:"top 0.1s ease-out, left 0.1s ease-out, width 0.1s ease-out, height 0.1s ease-out",borderRadius:"8px"},children:t.jsx("div",{style:{position:"absolute",top:"-24px",left:"0",backgroundColor:"#1D4ED8",color:"white",padding:"2px 8px",borderRadius:"9999px",fontSize:"12px",fontWeight:"bold",whiteSpace:"nowrap"},children:e.name})}):null}const P1=({initialMessages:e=[],onSendMessage:o,bubbleSize:r="md"})=>{const[n,a]=m.useState(!1),[l,i]=m.useState(!1),[u,c]=m.useState(e),[d,g]=m.useState([]),{highlightedElement:p}=H1({active:l,onSelect:x=>{g(C=>[...C,x]),i(!1),a(!0)},onCancel:()=>{i(!1),a(!0)}}),h=()=>a(!n),f=()=>{i(!0),a(!1)},y=x=>{g(C=>C.filter(k=>k.id!==x))},b=x=>{const C={id:Date.now().toString(),role:"user",content:x,timestamp:new Date,contextElements:[...d]};c(k=>[...k,C]),o==null||o(x,d),g([]),setTimeout(()=>{var S;const k=Math.random()>.7,w=Math.random()>.4,v={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:k?"I will highlight the selected element.":`I received your message regarding: ${((S=C.contextElements)==null?void 0:S.map(I=>I.name).join(", "))||"general context"}. How can I assist you further?`,messageType:k?"tool":"text",reasoning:w?"Analyzing the user input and context... The user seems to be asking about specific elements. I should tailor my response to the selected context.":void 0};c(I=>[...I,v]),k&&setTimeout(()=>{c(I=>[...I,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return t.jsxs(s.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[t.jsx(V1,{element:p}),l&&t.jsx(s.View,{position:"fixed",top:24,left:"50%",transform:"translateX(-50%)",backgroundColor:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"24px",zIndex:1e4,boxShadow:"0 4px 6px rgba(0,0,0,0.1)",children:t.jsx(s.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&t.jsxs(s.View,{position:"absolute",bottom:60,right:0,width:"400px",height:"600px",marginBottom:"16px",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(20px)",borderRadius:"24px",border:"1px solid rgba(255, 255, 255, 0.4)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",overflow:"hidden",animation:"slideUp 0.3s ease-out",style:{animation:"fadeIn 0.2s ease-out",transformOrigin:"bottom right"},children:[t.jsxs(s.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(s.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),t.jsx(s.View,{as:"button",onClick:()=>a(!1),cursor:"pointer",padding:"4px",borderRadius:"50%",border:"none",backgroundColor:"transparent",_hover:{backgroundColor:"rgba(0,0,0,0.05)"},children:t.jsx($e,{widthHeight:16,color:"color-gray-500"})})]}),t.jsx(lc,{messages:u,onSubmit:b,size:r,variant:"minimal",enableContextPicker:!0,selectedContextElements:d,onContextPickerClick:f,onRemoveContextElement:y,styles:{container:{height:"calc(100% - 60px)",backgroundColor:"transparent"},inputContainer:{backgroundColor:"white",margin:"0 16px 16px 16px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"}}})]}),!l&&t.jsx(s.View,{as:"button",onClick:h,width:"56px",height:"56px",borderRadius:"50%",backgroundColor:"theme-primary",border:"none",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",_hover:{transform:"scale(1.05)"},_active:{transform:"scale(0.95)"},"data-chatwidget-ignore":"true",children:n?t.jsx($e,{widthHeight:24,color:"white"}):t.jsx(Cl,{widthHeight:24,color:"white"})})]})};function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var D1=typeof Element<"u",$1=typeof Map=="function",L1=typeof Set=="function",B1=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Kt(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var r,n,a;if(Array.isArray(e)){if(r=e.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!Kt(e[n],o[n]))return!1;return!0}var l;if($1&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;for(l=e.entries();!(n=l.next()).done;)if(!Kt(n.value[1],o.get(n.value[0])))return!1;return!0}if(L1&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(B1&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(r=e.length,r!=o.length)return!1;for(n=r;n--!==0;)if(e[n]!==o[n])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof o.valueOf=="function")return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof o.toString=="function")return e.toString()===o.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(D1&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!Kt(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var _1=function(o,r){try{return Kt(o,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const O1=Qn(_1);var N1=function(e,o,r,n,a,l,i,u){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var c;if(o===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[r,n,a,l,i,u],g=0;c=new Error(o.replace(/%s/g,function(){return d[g++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},q1=N1;const Oa=Qn(q1);var U1=function(o,r,n,a){var l=n?n.call(a,o,r):void 0;if(l!==void 0)return!!l;if(o===r)return!0;if(typeof o!="object"||!o||typeof r!="object"||!r)return!1;var i=Object.keys(o),u=Object.keys(r);if(i.length!==u.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),d=0;d<i.length;d++){var g=i[d];if(!c(g))return!1;var p=o[g],h=r[g];if(l=n?n.call(a,p,h,g):void 0,l===!1||l===void 0&&p!==h)return!1}return!0};const G1=Qn(U1);var ic=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(ic||{}),$r={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Na=Object.values(ic),wr={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},sc=Object.entries(wr).reduce((e,[o,r])=>(e[r]=o,e),{}),Ue="data-rh",Uo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Go=(e,o)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},Y1=e=>{let o=Go(e,"title");const r=Go(e,Uo.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),r&&o)return r.replace(/%s/g,()=>o);const n=Go(e,Uo.DEFAULT_TITLE);return o||n||void 0},K1=e=>Go(e,Uo.ON_CHANGE_CLIENT_STATE)||(()=>{}),Lr=(e,o)=>o.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),X1=(e,o)=>o.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const a=Object.keys(n);for(let l=0;l<a.length;l+=1){const u=a[l].toLowerCase();if(e.indexOf(u)!==-1&&n[u])return r.concat(n)}}return r},[]),J1=e=>console&&typeof console.warn=="function"&&console.warn(e),dt=(e,o,r)=>{const n={};return r.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&J1(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,l)=>{const i={};l.filter(c=>{let d;const g=Object.keys(c);for(let h=0;h<g.length;h+=1){const f=g[h],y=f.toLowerCase();o.indexOf(y)!==-1&&!(d==="rel"&&c[d].toLowerCase()==="canonical")&&!(y==="rel"&&c[y].toLowerCase()==="stylesheet")&&(d=y),o.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(d=f)}if(!d||!c[d])return!1;const p=c[d].toLowerCase();return n[d]||(n[d]={}),i[d]||(i[d]={}),n[d][p]?!1:(i[d][p]=!0,!0)}).reverse().forEach(c=>a.push(c));const u=Object.keys(i);for(let c=0;c<u.length;c+=1){const d=u[c],g={...n[d],...i[d]};n[d]=g}return a},[]).reverse()},Q1=(e,o)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][o])return!0}return!1},Z1=e=>({baseTag:X1(["href"],e),bodyAttributes:Lr("bodyAttributes",e),defer:Go(e,Uo.DEFER),encode:Go(e,Uo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Lr("htmlAttributes",e),linkTags:dt("link",["rel","href"],e),metaTags:dt("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:dt("noscript",["innerHTML"],e),onChangeClientState:K1(e),scriptTags:dt("script",["src","innerHTML"],e),styleTags:dt("style",["cssText"],e),title:Y1(e),titleAttributes:Lr("titleAttributes",e),prioritizeSeoTags:Q1(e,Uo.PRIORITIZE_SEO_TAGS)}),cc=e=>Array.isArray(e)?e.join(""):e,eC=(e,o)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(o[r[n]]&&o[r[n]].includes(e[r[n]]))return!0;return!1},Br=(e,o)=>Array.isArray(e)?e.reduce((r,n)=>(eC(n,o)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},qa=(e,o)=>({...e,[o]:void 0}),oC=["noscript","script","style"],an=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),dc=e=>Object.keys(e).reduce((o,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return o?`${o} ${n}`:n},""),tC=(e,o,r,n)=>{const a=dc(r),l=cc(o);return a?`<${e} ${Ue}="true" ${a}>${an(l,n)}</${e}>`:`<${e} ${Ue}="true">${an(l,n)}</${e}>`},rC=(e,o,r=!0)=>o.reduce((n,a)=>{const l=a,i=Object.keys(l).filter(d=>!(d==="innerHTML"||d==="cssText")).reduce((d,g)=>{const p=typeof l[g]>"u"?g:`${g}="${an(l[g],r)}"`;return d?`${d} ${p}`:p},""),u=l.innerHTML||l.cssText||"",c=oC.indexOf(e)===-1;return`${n}<${e} ${Ue}="true" ${i}${c?"/>":`>${u}</${e}>`}`},""),uc=(e,o={})=>Object.keys(e).reduce((r,n)=>{const a=wr[n];return r[a||n]=e[n],r},o),nC=(e,o,r)=>{const n={key:o,[Ue]:!0},a=uc(r,n);return[m.createElement("title",a,o)]},Xt=(e,o)=>o.map((r,n)=>{const a={key:n,[Ue]:!0};return Object.keys(r).forEach(l=>{const u=wr[l]||l;if(u==="innerHTML"||u==="cssText"){const c=r.innerHTML||r.cssText;a.dangerouslySetInnerHTML={__html:c}}else a[u]=r[l]}),m.createElement(e,a)}),Le=(e,o,r=!0)=>{switch(e){case"title":return{toComponent:()=>nC(e,o.title,o.titleAttributes),toString:()=>tC(e,o.title,o.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>uc(o),toString:()=>dc(o)};default:return{toComponent:()=>Xt(e,o),toString:()=>rC(e,o,r)}}},aC=({metaTags:e,linkTags:o,scriptTags:r,encode:n})=>{const a=Br(e,$r.meta),l=Br(o,$r.link),i=Br(r,$r.script);return{priorityMethods:{toComponent:()=>[...Xt("meta",a.priority),...Xt("link",l.priority),...Xt("script",i.priority)],toString:()=>`${Le("meta",a.priority,n)} ${Le("link",l.priority,n)} ${Le("script",i.priority,n)}`},metaTags:a.default,linkTags:l.default,scriptTags:i.default}},lC=e=>{const{baseTag:o,bodyAttributes:r,encode:n=!0,htmlAttributes:a,noscriptTags:l,styleTags:i,title:u="",titleAttributes:c,prioritizeSeoTags:d}=e;let{linkTags:g,metaTags:p,scriptTags:h}=e,f={toComponent:()=>[],toString:()=>""};return d&&({priorityMethods:f,linkTags:g,metaTags:p,scriptTags:h}=aC(e)),{priority:f,base:Le("base",o,n),bodyAttributes:Le("bodyAttributes",r,n),htmlAttributes:Le("htmlAttributes",a,n),link:Le("link",g,n),meta:Le("meta",p,n),noscript:Le("noscript",l,n),script:Le("script",h,n),style:Le("style",i,n),title:Le("title",{title:u,titleAttributes:c},n)}},ln=lC,qt=[],Zn=!!(typeof window<"u"&&window.document&&window.document.createElement),sn=class{constructor(e,o){Je(this,"instances",[]);Je(this,"canUseDOM",Zn);Je(this,"context");Je(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?qt:this.instances,add:e=>{(this.canUseDOM?qt:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?qt:this.instances).indexOf(e);(this.canUseDOM?qt:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=ln({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},iC=parseInt(m.version.split(".")[0],10),cn=iC>=19,sC={},pc=m.createContext(sC),xo,cC=(xo=class extends m.Component{constructor(r){super(r);Je(this,"helmetData");cn?this.helmetData=null:this.helmetData=new sn(this.props.context||{},xo.canUseDOM)}render(){return cn?m.createElement(m.Fragment,null,this.props.children):m.createElement(pc.Provider,{value:this.helmetData.value},this.props.children)}},Je(xo,"canUseDOM",Zn),xo),Lo=(e,o)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${Ue}]`),a=[].slice.call(n),l=[];let i;return o&&o.length&&o.forEach(u=>{const c=document.createElement(e);for(const d in u)if(Object.prototype.hasOwnProperty.call(u,d))if(d==="innerHTML")c.innerHTML=u.innerHTML;else if(d==="cssText"){const g=u.cssText;c.appendChild(document.createTextNode(g))}else{const g=d,p=typeof u[g]>"u"?"":u[g];c.setAttribute(d,p)}c.setAttribute(Ue,"true"),a.some((d,g)=>(i=g,c.isEqualNode(d)))?a.splice(i,1):l.push(c)}),a.forEach(u=>{var c;return(c=u.parentNode)==null?void 0:c.removeChild(u)}),l.forEach(u=>r.appendChild(u)),{oldTags:a,newTags:l}},dn=(e,o)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(Ue),a=n?n.split(","):[],l=[...a],i=Object.keys(o);for(const u of i){const c=o[u]||"";r.getAttribute(u)!==c&&r.setAttribute(u,c),a.indexOf(u)===-1&&a.push(u);const d=l.indexOf(u);d!==-1&&l.splice(d,1)}for(let u=l.length-1;u>=0;u-=1)r.removeAttribute(l[u]);a.length===l.length?r.removeAttribute(Ue):r.getAttribute(Ue)!==i.join(",")&&r.setAttribute(Ue,i.join(","))},dC=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=cc(e)),dn("title",o)},Ua=(e,o)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:a,linkTags:l,metaTags:i,noscriptTags:u,onChangeClientState:c,scriptTags:d,styleTags:g,title:p,titleAttributes:h}=e;dn("body",n),dn("html",a),dC(p,h);const f={baseTag:Lo("base",r),linkTags:Lo("link",l),metaTags:Lo("meta",i),noscriptTags:Lo("noscript",u),scriptTags:Lo("script",d),styleTags:Lo("style",g)},y={},b={};Object.keys(f).forEach(x=>{const{newTags:C,oldTags:k}=f[x];C.length&&(y[x]=C),k.length&&(b[x]=f[x].oldTags)}),o&&o(),c(e,y,b)},ut=null,uC=e=>{ut&&cancelAnimationFrame(ut),e.defer?ut=requestAnimationFrame(()=>{Ua(e,()=>{ut=null})}):(Ua(e),ut=null)},pC=uC,Ga=class extends m.Component{constructor(){super(...arguments);Je(this,"rendered",!1)}shouldComponentUpdate(o){return!G1(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:r}=this.props.context;let n=null;const a=Z1(o.get().map(l=>{const{context:i,...u}=l.props;return u}));cC.canUseDOM?pC(a):ln&&(n=ln(a)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:o}=this.props.context;o.add(this),this.emitChange()}render(){return this.init(),null}},Jt=[],Ya=e=>{const o={};for(const r of Object.keys(e))o[sc[r]||r]=e[r];return o},fo=e=>{const o={};for(const r of Object.keys(e)){const n=wr[r];o[n||r]=e[r]}return o},Ka=(e,o)=>{if(!Zn)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",a=r.getAttribute(n),l=a?a.split(","):[],i=Object.keys(o);for(const u of l)i.includes(u)||r.removeAttribute(u);for(const u of i){const c=o[u];c==null||c===!1?r.removeAttribute(u):c===!0?r.setAttribute(u,""):r.setAttribute(u,String(c))}i.length>0?r.setAttribute(n,i.join(",")):r.removeAttribute(n)},_r=()=>{const e={},o={};for(const r of Jt){const{htmlAttributes:n,bodyAttributes:a}=r.props;n&&Object.assign(e,Ya(n)),a&&Object.assign(o,Ya(a))}Ka("html",e),Ka("body",o)},mC=class extends m.Component{componentDidMount(){Jt.push(this),_r()}componentDidUpdate(){_r()}componentWillUnmount(){const e=Jt.indexOf(this);e!==-1&&Jt.splice(e,1),_r()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:r}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return m.createElement("title",fo(o),e)}renderBase(){const{base:e}=this.props;return e?m.createElement("base",fo(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>m.createElement("meta",{key:r,...fo(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>m.createElement("link",{key:r,...fo(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>{const{innerHTML:n,...a}=o,l=fo(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),m.createElement("script",{key:r,...l})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>{const{cssText:n,...a}=o,l=fo(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),m.createElement("style",{key:r,...l})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>{const{innerHTML:n,...a}=o,l=fo(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),m.createElement("noscript",{key:r,...l})})}render(){return m.createElement(m.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Nr,gC=(Nr=class extends m.Component{shouldComponentUpdate(e){return!O1(qa(this.props,"helmetData"),qa(e,"helmetData"))}mapNestedChildrenToProps(e,o){if(!o)return null;switch(e.type){case"script":case"noscript":return{innerHTML:o};case"style":return{cssText:o};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,o,r,n){return{...o,[e.type]:[...o[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,r,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...r}};case"body":return{...o,bodyAttributes:{...r}};case"html":return{...o,htmlAttributes:{...r}};default:return{...o,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,o){let r={...o};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,o){return Oa(Na.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Na.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Oa(!o||typeof o=="string"||Array.isArray(o)&&!o.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,o){let r={};return m.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...l}=n.props,i=Object.keys(l).reduce((c,d)=>(c[sc[d]||d]=l[d],c),{});let{type:u}=n;switch(typeof u=="symbol"?u=u.toString():this.warnOnInvalidChildren(n,a),u){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,i,a);break;default:o=this.mapObjectTypeChildren(n,o,i,a);break}}),this.mapArrayTypeChildrenToProps(r,o)}render(){const{children:e,...o}=this.props;let r={...o},{helmetData:n}=o;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof sn)){const a=n;n=new sn(a.context,!0),delete r.helmetData}return cn?m.createElement(mC,{...r}):n?m.createElement(Ga,{...r,context:n.value}):m.createElement(pc.Consumer,null,a=>m.createElement(Ga,{...r,context:a}))}},Je(Nr,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Nr);const hC={airbnb:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},apple:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.03em"},coinbase:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.02em"},figma:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontWeight:700},linear:{highlightStyle:"gradient",fontWeight:600,letterSpacing:"-0.03em"},nike:{highlightStyle:"underline",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",highlightFontStyle:"italic",highlightFontWeight:900},notion:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontStyle:"italic"},revolut:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},shopify:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},spacex:{highlightStyle:"glow",fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",highlightLetterSpacing:"0.06em"},spotify:{highlightStyle:"background",fontWeight:800,letterSpacing:"-0.03em"},stripe:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},tesla:{highlightStyle:"solid",fontWeight:500,letterSpacing:"-0.01em",textTransform:"uppercase"},uber:{highlightStyle:"underline",fontWeight:700,letterSpacing:"-0.02em"},vercel:{highlightStyle:"outline",fontWeight:700,letterSpacing:"-0.04em"}},fC={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},yC=e=>hC[e.metadata.id]??fC,mc=(e,o)=>{const r=e.theme;return{canvas:Ee(r.canvas),surface:Ee(r.surface),text:Ee(r.text),muted:Ee(r.muted),border:Ee(r.border),primary:Ee(r.primary),secondary:Ee(r.secondary),success:Ee(r.success),warning:Ee(r.warning),error:Ee(r.error),onPrimary:Ee(r.onPrimary),appearance:o}},xC=e=>mc(e,"light"),bC=e=>mc(e,"dark"),we=({palette:e,label:o,config:r,children:n})=>t.jsxs(s.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[t.jsx(s.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),t.jsx(s.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),t.jsx(fn,{config:r,mode:e.appearance,children:t.jsx(s.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",children:n})})]}),Ee=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,oo=(e,o)=>`color-mix(in srgb, ${Ee(e)} ${o}%, transparent)`,kC=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,CC={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral"},SC=e=>e.personality||CC,ro=(e,o="normal")=>{let n={light:300,regular:400,bold:700,black:800}[e.typeWeight];return o==="light"&&(n=Math.max(300,n-200)),o==="heavy"&&(n=Math.min(900,n+100)),n},Mt=e=>{switch(e.density){case"tight":return{padding:16,gap:10,large:20};case"spacious":return{padding:28,gap:18,large:36};case"comfortable":default:return{padding:22,gap:14,large:28}}},wC=e=>e.typeCase==="uppercase"?"uppercase":"none",jr=(e,o)=>{switch(e.surfaceTone){case"glass":return{backgroundColor:o.appearance==="dark"?"rgba(255,255,255,0.04)":"rgba(255,255,255,0.65)",backdropFilter:"blur(14px)"};case"mono":return{backgroundColor:o.appearance==="dark"?"#0a0a0a":Ee(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:Ee(o.surface)}}},Xo=(e,o)=>{const r=Ee(o.primary),n=Ee(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${r} 0%, ${n} 100%)`;case"glow":return r;case"stripe":return`repeating-linear-gradient(45deg, ${r} 0 8px, ${n} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${r} 0%, ${n} 70%)`;case"flat":default:return r}},Jo=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${oo(o.primary,40)}, 0 0 4px ${Ee(o.primary)}`},po=e=>({letterSpacing:e.letterSpacing,textTransform:wC(e),fontStyle:e.typeStyle,fontWeight:ro(e,"heavy")}),We=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:ro(e,"normal")}),jC=(e,o)=>{var n,a,l;const r=(n=e.components)==null?void 0:n[o];return(l=(a=r==null?void 0:r.views)==null?void 0:a.container)==null?void 0:l.borderRadius},vC=e=>{const o=e.tokens.rawCssVars||{},r=e.theme.border,n=e.theme.surface,a=e.theme.primary,l=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",i=o["shadow-ring-light"]||`${r} 0px 0px 0px 1px`,u=o["shadow-card"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, ${n} 0px 0px 0px 1px`,c=o["shadow-card-full"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, ${n} 0px 0px 0px 1px`;return[{name:"Level 0",label:"Flat",description:"No shadow",shadow:"none"},{name:"Level 1",label:"Ring",description:"Shadow-as-border",shadow:l},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:i},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:u},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:c},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${a}`}]},pt=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const l=jC(e,a);if(l!==void 0)return l}return"12px"},Or=({glyph:e,badge:o})=>t.jsxs(s.View,{position:"relative",display:"inline-flex",children:[t.jsx(s.View,{width:32,height:32,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{backgroundColor:"rgba(0,0,0,0.06)",fontSize:18,lineHeight:"20px"},children:e}),o?t.jsx(s.View,{position:"absolute",top:-10,right:-18,paddingHorizontal:6,paddingVertical:2,borderRadius:9999,style:{backgroundColor:"#ffffff",color:"#222222",fontSize:9,fontWeight:700,letterSpacing:"0.04em",boxShadow:"0 1px 3px rgba(0,0,0,0.18)"},children:o}):null]}),TC=[{title:"Homes",value:"homes",icon:t.jsx(Or,{glyph:"🏠"}),content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:t.jsx(Or,{glyph:"🎈",badge:"NEW"}),content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:t.jsx(Or,{glyph:"🛎️",badge:"NEW"}),content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],IC=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],RC=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],FC=({color:e,name:o,role:r,border:n})=>t.jsxs(s.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[t.jsx(s.View,{height:76,backgroundColor:e}),t.jsxs(s.Vertical,{gap:4,padding:12,children:[t.jsx(s.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),t.jsx(s.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),t.jsx(s.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:r})]})]}),je=({title:e,children:o,config:r})=>t.jsxs(s.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,backgroundColor:r.theme.canvas,borderColor:r.theme.border,children:[t.jsx(s.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:r.theme.text,children:e}),o]}),zC=({config:e})=>{const o=yC(e),r=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return t.jsx(s.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,backgroundColor:e.theme.surface,children:t.jsxs(s.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[t.jsxs(s.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[t.jsx(Ae,{variant:"outline",content:`${e.metadata.label} hero`}),t.jsx(us,{size:"xl",responsive:!0,highlightText:"design system",highlightStyle:o.highlightStyle,highlightColor:e.theme.primary,highlightSecondaryColor:o.highlightStyle==="gradient"?e.theme.secondary:e.theme.onPrimary,views:{container:{color:e.theme.text},text:{color:e.theme.text,fontFamily:e.tokens.typography.fontFamily,fontWeight:o.fontWeight,style:{letterSpacing:o.letterSpacing,fontStyle:o.fontStyle??"normal",textTransform:o.textTransform??"none"}},highlight:{color:r,fontWeight:o.highlightFontWeight??o.fontWeight,style:{fontStyle:o.highlightFontStyle??o.fontStyle??"normal",letterSpacing:o.highlightLetterSpacing??o.letterSpacing,textTransform:o.textTransform??"none"}}},children:"Build a beautiful design system in minutes"},`${e.metadata.id}-${o.highlightStyle}`),t.jsxs(s.Text,{color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,style:{fontSize:16,lineHeight:"24px",maxWidth:520},children:["Each brand defines its own highlight treatment —"," ",t.jsx(s.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",t.jsx(s.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",children:[t.jsx(fe,{color:"theme-primary",size:"md",children:"Get started"}),t.jsx(fe,{variant:"outline",color:"theme-primary",size:"md",children:"View docs"})]})]}),t.jsxs(s.View,{flex:"1 1 320px",minWidth:0,minHeight:260,position:"relative",overflow:"hidden",style:{backgroundImage:`linear-gradient(135deg, ${e.theme.primary}, ${e.theme.secondary||e.theme.primary})`},children:[t.jsx(s.View,{position:"absolute",top:"50%",left:"50%",width:180,height:180,borderRadius:9999,style:{transform:"translate(-50%, -50%)",backgroundColor:"rgba(255,255,255,0.18)",filter:"blur(40px)"}}),t.jsxs(s.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[t.jsx(s.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),t.jsx(s.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},MC=({config:e})=>{var r,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return t.jsxs(s.Vertical,{gap:24,children:[t.jsx(je,{title:"Color",config:e,children:t.jsx(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>t.jsx(FC,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),t.jsx(je,{title:"Typography",config:e,children:t.jsxs(s.Vertical,{gap:24,children:[t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:16,lineHeight:"1.7",fontWeight:"400",children:"SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded to revolutionize space technology."}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),t.jsx(s.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>t.jsx(Ae,{variant:"outline",content:a},a))})]})}),t.jsx(je,{title:"Spacing, Radius, Shadow",config:e,children:t.jsxs(s.Vertical,{gap:18,children:[t.jsx(s.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>t.jsxs(s.Vertical,{gap:8,alignItems:"center",children:[t.jsx(s.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),t.jsx(s.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),t.jsx(s.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>t.jsxs(s.Vertical,{gap:8,alignItems:"center",children:[t.jsx(s.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),t.jsx(s.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),t.jsx(s.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:t.jsx(Te,{views:(n=(r=e.components)==null?void 0:r.table)==null?void 0:n.views,children:t.jsx(Te.Template,{caption:"First extracted color tokens",columns:IC,data:o})})})]})})]})},Xa=({palette:e})=>t.jsxs(Me,{width:"min(100%, 420px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[t.jsx(Me.Header,{children:t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[t.jsxs(s.Horizontal,{alignItems:"baseline",gap:6,children:[t.jsx(s.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),t.jsx(s.Text,{fontSize:14,color:e.muted,children:"night"})]}),t.jsx(Ae,{variant:"filled",content:"Best value"})]})}),t.jsx(Me.Content,{children:t.jsxs(s.Vertical,{gap:12,children:[t.jsxs(s.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[t.jsxs(s.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[t.jsx(s.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),t.jsxs(s.Vertical,{flex:1,padding:10,gap:2,children:[t.jsx(s.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),t.jsxs(s.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[t.jsx(s.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),t.jsx(fe,{isFilled:!0,size:"lg",children:"Reserve"}),t.jsx(sr,{}),t.jsxs(s.Vertical,{gap:6,children:[t.jsxs(s.Horizontal,{justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),t.jsxs(s.Horizontal,{justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"$48"})]}),t.jsxs(s.Horizontal,{justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:14,color:e.text,children:"Service fee"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),t.jsx(sr,{}),t.jsxs(s.Horizontal,{justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),t.jsx(s.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),Ja=[{name:"Starter",tagline:"For solo makers shipping their first project.",price:"$0",period:"/ month",features:["1 workspace","Up to 3 projects","Community support"],ctaLabel:"Get started"},{name:"Pro",tagline:"For growing teams that need more room to build.",price:"$24",period:"/ month",features:["Unlimited projects","Advanced analytics","Priority email support","Custom domains"],ctaLabel:"Start free trial",featured:!0},{name:"Enterprise",tagline:"For organizations with security and scale needs.",price:"Custom",period:"",features:["SSO & SCIM","Audit logs","Dedicated success manager","99.99% uptime SLA"],ctaLabel:"Contact sales"}],Qa=({palette:e,tier:o,personality:r})=>{const n=Mt(r),a=jr(r,e),l=Xo(r,e),i=Jo(r,e);return t.jsx(s.View,{width:"min(100%, 280px)",borderRadius:r.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:l,boxShadow:i}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:t.jsxs(s.Vertical,{gap:n.gap,padding:n.padding,children:[t.jsxs(s.Vertical,{gap:6,children:[t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:We(r),children:o.name}),o.featured?t.jsx(s.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:r.badgeRadius,backgroundColor:oo(e.onPrimary,22),children:t.jsxs(s.Horizontal,{gap:4,alignItems:"center",children:[t.jsx(s.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:r.signatureMotif}),t.jsx(s.Text,{fontSize:10,color:e.onPrimary,style:We(r),children:r.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),t.jsx(s.Text,{fontSize:13,lineHeight:"18px",color:o.featured?oo(e.onPrimary,85):e.muted,style:{fontStyle:r.typeStyle},children:o.tagline})]}),t.jsxs(s.Horizontal,{alignItems:"baseline",gap:4,children:[t.jsx(s.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:po(r),children:o.price}),o.period?t.jsx(s.Text,{fontSize:14,color:o.featured?oo(e.onPrimary,85):e.muted,style:{fontStyle:r.typeStyle},children:o.period}):null]}),t.jsx(s.Vertical,{gap:8,children:o.features.map(u=>t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[t.jsx(s.View,{width:18,height:18,borderRadius:r.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?oo(e.onPrimary,22):e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:t.jsx(s.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:ro(r,"heavy")},children:r.cornerStyle==="sharp"?"+":"✓"})}),t.jsx(s.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:r.typeCase==="uppercase"?"uppercase":"none",letterSpacing:r.typeCase==="uppercase"?"0.04em":"normal",fontStyle:r.typeStyle},children:u})]},u))}),t.jsx(s.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:r.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?e.onPrimary:e.text},children:t.jsx(s.Text,{fontSize:14,color:o.featured?e.primary:e.canvas,style:{...We(r),letterSpacing:r.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},Za=({palette:e,personality:o})=>{const r=Mt(o),n=jr(o,e),a=o.voice.includes("athletic")||o.voice.includes("motion")?"Aero Runner GT":o.voice.includes("mission")||o.voice.includes("futurist")?"Module-04 Insulated Jacket":"Linen Throw Pillow",l=o.voice.includes("athletic")||o.voice.includes("motion")?"Court Black · Mens":o.voice.includes("mission")||o.voice.includes("futurist")?"Carbon · Standard fit":"Stonewashed · Sand";return t.jsx(s.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:t.jsxs(s.Vertical,{gap:r.gap,padding:r.padding,children:[t.jsx(s.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${oo(e.primary,20)} 0%, ${oo(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),t.jsxs(s.Vertical,{gap:4,children:[t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:15,color:e.text,style:po(o),children:a}),t.jsx(s.View,{paddingHorizontal:10,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:t.jsx(s.Text,{fontSize:10,color:e.text,style:We(o),children:"IN STOCK"})})]}),t.jsx(s.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:l})]}),t.jsxs(s.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[t.jsxs(s.Horizontal,{alignItems:"baseline",gap:6,children:[t.jsx(s.Text,{fontSize:24,color:e.text,style:po(o),children:"$42"}),t.jsx(s.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),t.jsx(s.Text,{fontSize:12,color:e.success||e.muted,style:We(o),children:"FREE SHIPPING"})]}),t.jsx(s.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Xo(o,e),boxShadow:Jo(o,e)},children:t.jsx(s.Text,{fontSize:14,color:e.onPrimary,style:{...We(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},el=({palette:e,personality:o})=>{const r=Mt(o),n=jr(o,e),a=o.signatureMotif,l=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",i=o.voice.includes("athletic")?"Velocity AirFlow 7":o.voice.includes("mission")||o.voice.includes("futurist")?"Sentinel Pro Headset":o.voice.includes("refined")?"Pulse Studio Monitor":"Aurora Wireless Headphones",u=o.voice.includes("athletic")?"Lightweight knit · 280g":o.voice.includes("mission")||o.voice.includes("futurist")?"Mil-spec audio · 60h endurance":"Active noise cancelling · 40h battery",c=o.voice.includes("mission")?"MISSION PICK":o.voice.includes("athletic")?"TEAM PICK":o.voice.includes("futurist")?"SIGNATURE":"BEST SELLER";return t.jsxs(s.View,{position:"relative",width:"min(100%, 320px)",children:[t.jsx(s.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:Xo(o,e),boxShadow:Jo(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:t.jsxs(s.Horizontal,{gap:6,alignItems:"center",children:[t.jsx(s.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:ro(o,"heavy")},children:a}),t.jsx(s.Text,{fontSize:10,color:e.onPrimary,style:We(o),children:c})]})}),t.jsx(s.View,{position:"absolute",top:12,right:12,width:36,height:36,borderRadius:o.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",zIndex:2,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:t.jsx(s.Text,{fontSize:16,color:l==="♥"&&e.error||e.primary,style:{lineHeight:1},children:l})}),t.jsx(s.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:t.jsxs(s.Vertical,{gap:r.gap,padding:r.padding,children:[t.jsx(s.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${oo(e.primary,20)} 0%, ${oo(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),t.jsxs(s.Vertical,{gap:6,children:[t.jsxs(s.Horizontal,{gap:6,alignItems:"center",children:[t.jsx(s.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),t.jsx(s.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),t.jsx(s.Text,{fontSize:18,color:e.text,style:po(o),children:i}),t.jsx(s.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:u})]}),t.jsxs(s.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[t.jsxs(s.Horizontal,{alignItems:"baseline",gap:6,children:[t.jsx(s.Text,{fontSize:26,color:e.text,style:po(o),children:"$189"}),t.jsx(s.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),t.jsx(s.View,{paddingHorizontal:8,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:t.jsx(s.Text,{fontSize:10,color:e.text,style:We(o),children:"–24%"})})]}),t.jsxs(s.Horizontal,{gap:8,children:[t.jsx(s.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Xo(o,e),boxShadow:Jo(o,e)},children:t.jsx(s.Text,{fontSize:13,color:e.onPrimary,style:{...We(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),t.jsx(s.View,{paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",borderColor:e.border},children:t.jsx(s.Text,{fontSize:13,color:e.text,style:{...We(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},WC=[{slug:"PRIMARY-TINT",source:"primary",intensity:"tint",heading:"Bring everyone together with systems that scale",body:"Signature primary ground for systems, FAQ, and the contact form.",cta:"Get started"},{slug:"SECONDARY-TINT",source:"secondary",intensity:"tint",heading:"A faster, more efficient way of working",body:"Secondary ground for hero moments and supporting narrative.",cta:"Explore"},{slug:"WARNING-TINT",source:"warning",intensity:"tint",heading:"Designed for the way ideas actually move",body:"Warm tint for product storytelling and brand moments.",cta:"See the story"},{slug:"SUCCESS-TINT",source:"success",intensity:"tint",heading:"Ship with confidence, every single release",body:"Cool tint for changelogs, releases, and reliability notes.",cta:"Read changelog"},{slug:"ERROR-TINT",source:"error",intensity:"tint",heading:"Built for teams who care about the details",body:"Saturated tint for community stories and testimonials.",cta:"Meet the makers"},{slug:"INK-INVERTED",source:"ink",intensity:"inverted",heading:"Go deeper. Go further. Go all-in.",body:"Inverted ground for premium tiers and developer surfaces.",cta:"Open the docs"}],un=(e,o)=>{const r=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(r.slice(0,2),16),a=parseInt(r.slice(2,4),16),l=parseInt(r.slice(4,6),16);return[n,a,l].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${l}, ${o})`},pn=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),De=(e,o,r)=>pn(e)?un(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(i=>i.trim()).join(", ")}, ${o})`):r==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,EC=({block:e,palette:o,personality:r})=>{const n=Mt(r);let a,l;if(e.source==="ink")a=o.text,l=o.canvas;else{const g=o[e.source]||o.primary;e.intensity==="solid"?(a=g,l=o.onPrimary):(a=De(g,.32,o.appearance),l=(o.appearance==="dark",o.text))}if(r.accentTreatment==="gradient"&&e.intensity==="tint"){const g=o[e.source],p=o.secondary;pn(g)&&pn(p)&&(a=`linear-gradient(135deg, ${un(g,.32)} 0%, ${un(p,.32)} 100%)`)}if(r.accentTreatment==="stripe"&&e.intensity==="tint"){const g=De(o[e.source],.32,o.appearance),p=De(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${g} 0 18px, ${p} 18px 36px)`}const i=De(l,.72,o.appearance),u=De(l,.55,o.appearance),c=l,d=l===o.canvas?o.text:o.canvas;return t.jsx(s.View,{width:"min(100%, 460px)",borderRadius:r.cardRadius*2,padding:n.large,style:{background:a},children:t.jsxs(s.Vertical,{gap:n.gap+6,children:[t.jsxs(s.Text,{fontSize:11,color:u,style:{...We(r),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[r.signatureMotif," ",e.slug]}),t.jsxs(s.Vertical,{gap:14,children:[t.jsx(s.Text,{fontSize:32,lineHeight:"36px",color:l,style:po(r),children:e.heading}),t.jsx(s.Text,{fontSize:16,lineHeight:"22px",color:i,style:{fontStyle:r.typeStyle},children:e.body})]}),t.jsx(s.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:r.pillRadius,style:{backgroundColor:c,cursor:"pointer"},children:t.jsx(s.Text,{fontSize:15,color:d,style:{...We(r),letterSpacing:r.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:r.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},ol=[{id:"design-tokens",badge:"NEW",badgeTone:"success",favorite:"♥",category:"Design systems",title:"Design tokens that survive a redesign",excerpt:"Why semantic naming beats raw values — and how to migrate a token set without breaking every consumer.",author:"Léa Martin",meta:"6 min read · Mar 10",imageTone:"warm"},{id:"shipping-faster",badge:"FEATURED",badgeTone:"primary",favorite:"★",category:"Engineering",title:"Shipping faster without skipping review",excerpt:"Three async patterns we use to keep PR cycle time under 24h while still catching the regressions that matter.",author:"Jordan Reyes",meta:"9 min read · Mar 04",imageTone:"cool"},{id:"a11y-audit",badge:"TRENDING",badgeTone:"warning",favorite:"⛉",category:"Accessibility",title:"The accessibility audit nobody asked for",excerpt:"A walkthrough of the 12 issues we found on our own marketing site — and the four-week fix plan that followed.",author:"Ines Okafor",meta:"12 min read · Feb 27",imageTone:"mono"}],tl=({palette:e,article:o,personality:r})=>{const n=Mt(r),a=jr(r,e),l=e[o.badgeTone]||e.primary,i=e.secondary||e.primary,u=r.accentTreatment==="gradient"?`linear-gradient(135deg, ${De(l,.55,e.appearance)} 0%, ${De(i,.55,e.appearance)} 100%)`:r.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${De(l,.45,e.appearance)} 0 16px, ${De(i,.25,e.appearance)} 16px 32px)`:r.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${De(l,.55,e.appearance)} 0%, ${De(i,.35,e.appearance)} 70%)`:r.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${De(l,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:De(l,.32,e.appearance),c=r.voice.includes("mission")||r.voice.includes("futurist")?"◉":o.favorite,d=c==="♥"?e.error||e.primary:c==="★"&&e.warning||e.primary;return t.jsx(s.View,{width:"min(100%, 320px)",borderRadius:r.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:t.jsxs(s.Vertical,{gap:n.gap,padding:n.padding,children:[t.jsxs(s.View,{position:"relative",height:160,borderRadius:r.cardRadius,overflow:"hidden",style:{background:u},children:[t.jsx(s.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:r.badgeRadius,style:{background:Xo(r,{...e,primary:l}),boxShadow:Jo(r,e)},children:t.jsxs(s.Horizontal,{gap:4,alignItems:"center",children:[t.jsx(s.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:ro(r,"heavy")},children:r.signatureMotif}),t.jsx(s.Text,{fontSize:10,color:e.onPrimary,style:We(r),children:o.badge})]})}),t.jsx(s.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:r.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:t.jsx(s.Text,{fontSize:16,color:d,style:{lineHeight:1},children:c})})]}),t.jsxs(s.Vertical,{gap:8,children:[t.jsx(s.Text,{fontSize:11,color:e.muted,style:We(r),children:o.category}),t.jsx(s.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:po(r),children:o.title}),t.jsx(s.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:r.typeStyle},children:o.excerpt})]}),t.jsxs(s.Horizontal,{gap:10,alignItems:"center",children:[t.jsx(s.View,{width:28,height:28,borderRadius:r.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),t.jsxs(s.Vertical,{gap:0,children:[t.jsx(s.Text,{fontSize:12,color:e.text,style:{fontWeight:ro(r,"normal"),fontStyle:r.typeStyle},children:o.author}),t.jsx(s.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},rl=({palette:e,personality:o,config:r})=>{var p,h,f,y;const n=o.signatureMotif,a=e.primary,l=Xo(o,e),i=Jo(o,e),u=((h=(p=r.tokens)==null?void 0:p.typography)==null?void 0:h.fontFamily)||((y=(f=r.tokens)==null?void 0:f.rawCssVars)==null?void 0:y.display)||"inherit",c=o.voice.includes("mission")?"MAKING LIFE MULTIPLANETARY":o.voice.includes("athletic")?"JUST DO IT":o.voice.includes("refined")?"A new standard in payments":o.voice.includes("speed")?"Built for the makers":o.voice.includes("rhythmic")?"Music for everyone":o.voice.includes("thoughtful")?"The connected workspace":o.voice.includes("warm")?"Belong anywhere":o.voice.includes("minimal")?"Think different":o.voice.includes("commerce")?"The platform commerce is built on":o.voice.includes("bold-fintech")?"Money for the next generation":o.voice.includes("trustworthy")?"The future of money":o.voice.includes("playful")?"Nothing great is made alone":o.voice.includes("motion")?"Get there":o.voice.includes("deploy")?"Develop. Preview. Ship.":o.voice.includes("futurist")?"Accelerating the world to sustainable energy":`${r.metadata.label}`,d=o.typeCase==="uppercase"?"EXPLORE":"Get started",g=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return t.jsxs(s.View,{width:"100%",borderRadius:o.cardRadius*2,padding:o.density==="spacious"?56:o.density==="tight"?28:40,style:{backgroundColor:e.canvas,color:e.text,fontFamily:u,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&t.jsx(s.View,{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:9999,style:{background:`radial-gradient(circle, ${a}40 0%, transparent 70%)`,pointerEvents:"none"}}),o.accentTreatment==="halftone"&&t.jsx(s.View,{position:"absolute",top:0,right:0,width:300,height:300,style:{background:`radial-gradient(circle at 70% 30%, ${a}30 0%, transparent 60%)`,pointerEvents:"none"}}),t.jsxs(s.Vertical,{gap:24,style:{position:"relative"},children:[t.jsxs(s.Horizontal,{gap:10,alignItems:"center",children:[t.jsx(s.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:l,boxShadow:i},children:t.jsx(s.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:ro(o,"heavy")},children:n})}),t.jsx(s.Text,{fontSize:13,color:e.muted,style:{...We(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:r.metadata.label})]}),t.jsx(s.Text,{fontSize:o.density==="spacious"?56:o.density==="tight"?40:48,lineHeight:o.density==="spacious"?"60px":o.density==="tight"?"44px":"52px",color:e.text,style:{...po(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:u},children:c}),t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(s.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:l,boxShadow:i},children:t.jsx(s.Text,{fontSize:15,color:e.onPrimary,style:{...We(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:ro(o,"heavy"),fontFamily:u},children:d})}),t.jsx(s.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:t.jsx(s.Text,{fontSize:15,color:e.text,style:{...We(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:ro(o,"heavy"),fontFamily:u},children:g})})]}),t.jsx(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"center",marginTop:8,children:[{label:"Primary",value:e.primary},{label:"Surface",value:e.surface},{label:"Text",value:e.text},{label:"Success",value:e.success}].map(b=>t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[t.jsx(s.View,{width:20,height:20,borderRadius:o.cornerStyle==="sharp"?0:o.cornerStyle==="pill"?9999:4,borderWidth:1,borderStyle:"solid",style:{backgroundColor:b.value,borderColor:e.border}}),t.jsxs(s.Vertical,{gap:0,children:[t.jsx(s.Text,{fontSize:11,color:e.muted,style:We(o),children:b.label}),t.jsx(s.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:kC(b.value)})]})]},b.label))})]})]})},nl=({palette:e,config:o})=>t.jsxs(s.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[t.jsx(Ae,{variant:"outline",content:"New release"}),t.jsxs(s.Vertical,{gap:8,alignItems:"center",children:[t.jsxs(s.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),t.jsx(s.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[t.jsx(fe,{shape:"pill",size:"md",children:"Learn more"}),t.jsx(fe,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),t.jsx(s.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),al=({palette:e,config:o})=>t.jsxs(Me,{width:"min(100%, 320px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[t.jsx(Me.Header,{children:t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[t.jsx(s.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),t.jsx(Ae,{variant:"filled",content:"New"})]})}),t.jsx(Me.Content,{children:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",color:e.text,children:o.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),t.jsx(Me.Footer,{children:t.jsx(fe,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),ll=({palette:e})=>t.jsxs(s.Vertical,{gap:14,children:[t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(fe,{color:"theme-primary",children:"Primary"}),t.jsx(fe,{color:"theme-secondary",children:"Secondary"}),t.jsx(fe,{color:"color-black",children:"Black"}),t.jsx(fe,{color:"color-white",textColor:"color-black",children:"White"})]}),t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(fe,{variant:"outline",color:"theme-primary",children:"Primary"}),t.jsx(fe,{variant:"outline",color:"theme-secondary",children:"Secondary"}),t.jsx(fe,{variant:"outline",color:"color-black",children:"Black"}),t.jsx(fe,{variant:"outline",color:"color-white",children:"White"})]}),t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(fe,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),t.jsx(fe,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),t.jsx(fe,{isDisabled:!0,children:"Disabled"}),t.jsx(fe,{isLoading:!0,children:"Loading"})]})]}),il=({palette:e,config:o})=>t.jsx(s.View,{style:{color:e.text},children:t.jsxs(s.Vertical,{gap:14,children:[t.jsxs(s.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[t.jsx(Ae,{content:"Badge"}),t.jsx(Ae,{variant:"outline",content:"Outline"}),t.jsx(Ae,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),t.jsx(Ae,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),t.jsx(Ae,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),t.jsx(Ae,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),t.jsxs(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[t.jsx(Yt,{status:"success",label:"Operational"}),t.jsx(Yt,{status:"warning",label:"Degraded"}),t.jsx(Yt,{status:"error",label:"Outage"}),t.jsx(uo,{size:"sm",loaderColor:o.theme.primary})]}),t.jsx(vn,{title:"Heads up",description:"Brand styling cascades through every alert.",variant:"info",views:{container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},title:{color:e.text},description:{color:e.muted}}}),t.jsx(Bs,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),sl=({palette:e,config:o,mode:r})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return t.jsx(s.View,{style:{color:e.text},children:t.jsxs(s.Vertical,{gap:16,children:[t.jsxs(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[t.jsx(Pe,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),t.jsx(ft,{id:`forms-${o.metadata.id}-${r}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{container:n.container,field:{fontSize:14,lineHeight:"20px",color:e.text},text:{fontSize:14,lineHeight:"20px",color:e.text}}}),t.jsx(Tt,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),t.jsxs(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[t.jsx(Hn,{label:"Email updates",defaultIsSelected:!0}),t.jsx(Vn,{label:"Standard",value:"standard",defaultIsSelected:!0}),t.jsx(En,{label:"Enabled",isChecked:!0})]})]})})},AC=({config:e})=>{const[o,r]=m.useState(1),n=xC(e),a=bC(e),l=SC(e);return t.jsxs(s.Vertical,{gap:24,children:[t.jsx(je,{title:"Brand Snapshot (Light & Dark)",config:e,children:t.jsxs(s.Vertical,{gap:20,children:[t.jsx(we,{config:e,palette:n,label:"On light surface",children:t.jsx(rl,{palette:n,personality:l,config:e})}),t.jsx(we,{config:e,palette:a,label:"On dark surface",children:t.jsx(rl,{palette:a,personality:l,config:e})})]})}),t.jsx(je,{title:"Buttons — Light & Dark",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(we,{config:e,palette:n,label:"On light surface",children:t.jsx(ll,{palette:n})}),t.jsx(we,{config:e,palette:a,label:"On dark surface",children:t.jsx(ll,{palette:a})})]})}),t.jsx(je,{title:"Status & Feedback — Light & Dark",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(we,{config:e,palette:n,label:"On light surface",children:t.jsx(il,{palette:n,config:e})}),t.jsx(we,{config:e,palette:a,label:"On dark surface",children:t.jsx(il,{palette:a,config:e})})]})}),t.jsx(je,{title:"Forms — Light & Dark",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(we,{config:e,palette:n,label:"On light surface",children:t.jsx(sl,{palette:n,config:e,mode:"light"})}),t.jsx(we,{config:e,palette:a,label:"On dark surface",children:t.jsx(sl,{palette:a,config:e,mode:"dark"})})]})}),t.jsx(je,{title:"Forms (legacy preview)",config:e,children:t.jsxs(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[t.jsx(Pe,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),t.jsx(ft,{id:`design-system-select-${e.metadata.id}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),t.jsx(Tt,{label:"Notes",placeholder:"Add implementation notes"}),t.jsxs(s.Vertical,{gap:12,children:[t.jsx(Hn,{label:"Email updates",defaultIsSelected:!0}),t.jsx(Vn,{label:"Standard",value:"standard",defaultIsSelected:!0}),t.jsx(En,{label:"Enabled",isChecked:!0}),t.jsx(qi,{defaultValue:58,showValue:!0}),t.jsx(wi,{length:6,label:"Verification Code"})]})]})}),t.jsx(je,{title:"Form States",config:e,children:t.jsxs(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[t.jsx(Pe,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),t.jsx(Pe,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),t.jsx(Pe,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),t.jsx(Pe,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),t.jsx(Pe,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),t.jsx(Pe,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),t.jsx(ft,{id:`design-system-select-error-${e.metadata.id}`,size:"md",label:"Select error",placeholder:"Pick one",error:!0,helperText:"Selection required",options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),t.jsx(ft,{id:`design-system-select-disabled-${e.metadata.id}`,size:"md",label:"Select disabled",placeholder:"Disabled",isDisabled:!0,options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}})]})}),t.jsx(je,{title:"Elevation & Depth",config:e,children:t.jsx(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:vC(e).map(i=>t.jsxs(s.Vertical,{gap:12,children:[t.jsx(s.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:i.shadow}}),t.jsxs(s.Vertical,{gap:4,children:[t.jsxs(s.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[t.jsx(s.Text,{fontSize:12,fontWeight:"700",children:i.name}),t.jsx(s.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:i.label})]}),t.jsx(s.Text,{fontSize:11,color:e.theme.muted,children:i.description}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:i.shadow})]})]},i.name))})}),t.jsx(je,{title:"Color Blocks",config:e,children:t.jsx(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:12,children:[["primary","Primary",e.theme.onPrimary],["secondary","Secondary",e.theme.onPrimary],["success","Success","#ffffff"],["warning","Warning","#ffffff"],["error","Error","#ffffff"],["canvas","Canvas",e.theme.text],["surface","Surface",e.theme.text],["text","Text",e.theme.canvas],["muted","Muted",e.theme.canvas],["border","Border",e.theme.text],["onPrimary","On primary",e.theme.text]].map(([i,u,c])=>{const d=e.theme[i];return t.jsxs(s.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[t.jsx(s.View,{height:88,backgroundColor:d}),t.jsxs(s.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[t.jsx(s.Text,{fontSize:13,fontWeight:"700",children:u}),t.jsxs(s.Text,{fontSize:11,color:e.theme.muted,children:["theme.",i]}),t.jsx(s.Text,{fontSize:11,color:e.theme.muted,children:d})]})]},i)})})}),t.jsx(je,{title:"Pricing — Booking (Light & Dark)",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(we,{config:e,palette:n,label:"On light surface",children:t.jsx(Xa,{palette:n})}),t.jsx(we,{config:e,palette:a,label:"On dark surface",children:t.jsx(Xa,{palette:a})})]})}),t.jsx(je,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:t.jsxs(s.Vertical,{gap:20,children:[t.jsx(we,{config:e,palette:n,label:"On light surface",children:t.jsx(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Ja.map(i=>t.jsx(Qa,{palette:n,tier:i,personality:l},i.name))})}),t.jsx(we,{config:e,palette:a,label:"On dark surface",children:t.jsx(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Ja.map(i=>t.jsx(Qa,{palette:a,tier:i,personality:l},i.name))})})]})}),t.jsx(je,{title:"Pricing — Product (Light & Dark)",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(we,{config:e,palette:n,label:"On light surface",children:t.jsx(Za,{palette:n,personality:l})}),t.jsx(we,{config:e,palette:a,label:"On dark surface",children:t.jsx(Za,{palette:a,personality:l})})]})}),t.jsx(je,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(we,{config:e,palette:n,label:"On light surface",children:t.jsx(el,{palette:n,personality:l})}),t.jsx(we,{config:e,palette:a,label:"On dark surface",children:t.jsx(el,{palette:a,personality:l})})]})}),t.jsx(je,{title:"Content — Color Block Cards",config:e,children:t.jsx(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:WC.map(i=>t.jsx(EC,{block:i,palette:n,personality:l},i.slug))})}),t.jsx(je,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:t.jsxs(s.Vertical,{gap:20,children:[t.jsx(we,{config:e,palette:n,label:"On light surface",children:t.jsx(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:ol.map(i=>t.jsx(tl,{palette:n,article:i,personality:l},i.id))})}),t.jsx(we,{config:e,palette:a,label:"On dark surface",children:t.jsx(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:ol.map(i=>t.jsx(tl,{palette:a,article:i,personality:l},i.id))})})]})}),t.jsx(je,{title:"CTA Card — Light & Dark",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(we,{config:e,palette:n,label:"On light surface",children:t.jsx(nl,{palette:n,config:e})}),t.jsx(we,{config:e,palette:a,label:"On dark surface",children:t.jsx(nl,{palette:a,config:e})})]})}),t.jsx(je,{title:"Product Card — Light & Dark",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(we,{config:e,palette:n,label:"On light surface",children:t.jsx(al,{palette:n,config:e})}),t.jsx(we,{config:e,palette:a,label:"On dark surface",children:t.jsx(al,{palette:a,config:e})})]})}),t.jsx(je,{title:"Content & Layout",config:e,children:t.jsxs(s.Vertical,{gap:24,children:[t.jsxs(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[t.jsxs(Me,{width:"min(100%, 320px)",children:[t.jsx(Me.Header,{children:t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[t.jsx(s.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),t.jsx(Ae,{variant:"filled",content:"New"})]})}),t.jsx(Me.Content,{children:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:e.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),t.jsx(Me.Footer,{children:t.jsx(fe,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),t.jsxs(Me,{width:"min(100%, 320px)",children:[t.jsx(Me.Header,{children:t.jsxs(s.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[t.jsxs(s.Horizontal,{gap:12,alignItems:"center",children:[t.jsx(Fl,{fallback:e.metadata.label.slice(0,2)}),t.jsxs(s.Vertical,{gap:2,children:[t.jsx(s.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),t.jsx(s.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),t.jsx(Ae,{variant:"outline",content:"Active"})]})}),t.jsx(Me.Content,{children:e.metadata.id==="spacex"?t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):t.jsx(vn,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),t.jsx(zC,{config:e}),t.jsx(jl,{ratio:16/9,borderRadius:12,overflow:"hidden",children:t.jsx(s.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:t.jsxs(s.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[t.jsx(s.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),t.jsx(Ae,{content:"Config primary color"})]})})}),t.jsxs(Ne,{children:[t.jsx(Ne.Content,{children:[1,2,3].map(i=>t.jsx(Ne.Item,{children:t.jsx(s.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:t.jsxs(s.Text,{fontSize:24,fontWeight:"700",children:["Slide ",i]})})},i))}),t.jsxs(s.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[t.jsx(Ne.Previous,{}),t.jsx(Ne.Next,{})]})]})]})}),t.jsx(je,{title:"Navigation & Interactive",config:e,children:t.jsxs(s.Vertical,{gap:18,children:[t.jsxs(s.Vertical,{gap:20,children:[t.jsxs(s.Vertical,{gap:8,children:[t.jsx(s.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),t.jsx(Ko,{tabs:TC,defaultValue:"homes",views:{tab:{borderRadius:pt(e,"tabs")},activeTab:{borderRadius:pt(e,"tabs")}}})]}),t.jsxs(s.Vertical,{gap:8,children:[t.jsx(s.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),t.jsx(Ko,{defaultValue:"overview",views:{tab:{borderRadius:pt(e,"tabs")},activeTab:{borderRadius:pt(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),t.jsx(To,{items:RC,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const i=pt(e,"accordion"),u={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},c={...u,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return t.jsxs(Oe,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:i,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[t.jsxs(Oe.Item,{value:"tokens",...u,views:{item:u,trigger:{borderRadius:0}},children:[t.jsx(Oe.Trigger,{children:"Token extraction"}),t.jsx(Oe.Content,{children:t.jsxs(s.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),t.jsxs(Oe.Item,{value:"overrides",...c,views:{item:c,trigger:{borderRadius:0}},children:[t.jsx(Oe.Trigger,{children:"Override behavior"}),t.jsx(Oe.Content,{children:t.jsx(s.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),t.jsx(sr,{label:"advanced tools"}),t.jsxs(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[t.jsx(Pn,{color:e.theme.primary,children:"Toggle Button"}),t.jsx(ps,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),t.jsx(Sr,{content:"Tooltip message",children:t.jsx(fe,{variant:"outline",children:"Hover for Tooltip"})}),t.jsxs(He,{children:[t.jsx(He.Trigger,{children:t.jsx(fe,{variant:"ghost",children:"Hover Card"})}),t.jsx(He.Content,{children:t.jsxs(s.Vertical,{gap:4,padding:12,children:[t.jsx(s.Text,{fontWeight:"700",children:"Detailed Info"}),t.jsx(s.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),t.jsx(bs,{value:e.theme.primary}),t.jsx(Os,{shareData:{url:"https://example.com",title:"Example"}}),t.jsx(hr,{to:"#",children:"Inline Link component"})]}),t.jsx(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:t.jsx(Ls,{currentPage:o,totalPages:10,onPageChange:r})})]})})]})},HC=({config:e})=>{var o;return t.jsxs(fn,{config:e,children:[t.jsx(gC,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(r=>t.jsx("link",{rel:"stylesheet",href:r},r))}),t.jsx(s.View,{minHeight:"100vh",padding:28,fontFamily:e.tokens.typography.fontFamily,backgroundColor:e.theme.canvas,color:e.theme.text,style:{textTransform:e.metadata.id==="spacex"?"uppercase":"none"},children:t.jsxs(s.Vertical,{gap:28,children:[t.jsxs(s.Vertical,{gap:12,maxWidth:900,children:[t.jsxs(s.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),t.jsxs(s.Text,{fontSize:16,lineHeight:"24px",color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,children:["Live App Studio components rendered with the"," ",e.metadata.label," config defaults."]})]}),t.jsxs(s.Vertical,{gap:28,children:[t.jsx(MC,{config:e}),t.jsx(AC,{config:e})]})]})})]})};exports.Accordion=Oe;exports.ActionSheet=Gp;exports.Alert=vn;exports.ArrowIcon=Pp;exports.AspectRatio=jl;exports.AttachmentGroup=gs;exports.AttachmentIcon=St;exports.AttachmentPreview=Hy;exports.AudioIcon=Yo;exports.AudioInput=dm;exports.AudioWaveform=Tn;exports.Avatar=Fl;exports.BackIcon=ip;exports.Background=ac;exports.Badge=Ae;exports.BatteryIcon=qu;exports.BlockEditor=Bb;exports.BluetoothIcon=Ep;exports.BoldArrowIcon=Vp;exports.BookmarkIcon=Uu;exports.Button=fe;exports.CHART_COLORS=_e;exports.CalendarIcon=wp;exports.CameraIcon=Wp;exports.Card=Me;exports.Carousel=Ne;exports.Chart=x0;exports.ChartIcon=np;exports.ChatInput=tc;exports.ChatWidget=lc;exports.ChatWidgetComponent=Jn;exports.ChatWidgetWidget=P1;exports.CheckIcon=lp;exports.Checkbox=Hn;exports.ChevronIcon=Se;exports.ClockIcon=jp;exports.CloseEyeIcon=Cn;exports.CloseIcon=$e;exports.CloudIcon=Gu;exports.ColorInput=Wg;exports.ColorPicker=bs;exports.ComboBox=af;exports.Command=Io;exports.ContextMenu=et;exports.CookieConsent=w0;exports.CopyIcon=Yu;exports.CountryPicker=$g;exports.CreditCardIcon=bp;exports.CropIcon=Lp;exports.DEFAULT_CHART_COLORS=_l;exports.DatePicker=Kh;exports.DefaultEmojiData=Bi;exports.DeleteIcon=Ku;exports.DesignSystem=HC;exports.DesignSystemProvider=fn;exports.Divider=gk;exports.DocumentIcon=rp;exports.DownloadIcon=Qu;exports.DragAndDrop=Dx;exports.DragAndDropComponent=ms;exports.DragHandleIcon=hl;exports.DragHandleLinesIcon=_p;exports.Drawer=vo;exports.DropZone=_x;exports.DropdownMenu=tt;exports.DustBinIcon=dr;exports.EditIcon=Xu;exports.EmojiPicker=ks;exports.ErrorIcon=pr;exports.ExternalLinkIcon=kl;exports.FacebookIcon=Du;exports.FileIcon=ko;exports.FileImage=M0;exports.FileSVG=z0;exports.FilterIcon=Sp;exports.FolderIcon=zu;exports.FormikChatInput=Hf;exports.FormikCheckbox=bf;exports.FormikColorInput=Pf;exports.FormikComboBox=oy;exports.FormikCountryPicker=Bf;exports.FormikDatePicker=$f;exports.FormikEmojiPicker=Ay;exports.FormikForm=ff;exports.FormikIconPicker=Ty;exports.FormikOTPInput=uy;exports.FormikPassword=Zf;exports.FormikRadio=Cf;exports.FormikSelect=Of;exports.FormikSelector=gy;exports.FormikSlider=sy;exports.FormikSwitch=qf;exports.FormikTagInput=Gf;exports.FormikTextArea=Kf;exports.FormikTextField=Jf;exports.FormikToggle=xy;exports.FormikToggleGroup=Cy;exports.FormikUploader=Wi;exports.GiftIcon=pp;exports.Gradient=Ms;exports.HeartIcon=_u;exports.HelpIcon=Fu;exports.HomeIcon=Ju;exports.HoverCard=He;exports.Icon=bt;exports.IconPicker=qb;exports.ImageIcon=Wu;exports.InfoIcon=io;exports.InstagramIcon=Vu;exports.KeyboardAvoidingView=Yi;exports.LayoutIcon=yp;exports.LikeIcon=Mp;exports.Link=hr;exports.LinkIcon=fp;exports.LinkedinIcon=$u;exports.Loader=uo;exports.LoadingSpinnerIcon=kn;exports.LockIcon=ep;exports.LogoutIcon=gp;exports.MagicWandIcon=Fp;exports.MapPinIcon=vp;exports.Markdown=Ob;exports.MediaPreview=Py;exports.MenuIcon=Tp;exports.Menubar=Ro;exports.MessageLayout=rm;exports.MessageView=Il;exports.MicrophoneIcon=xn;exports.MinusIcon=fl;exports.Modal=jo;exports.ModalLayout=$n;exports.ModalRouter=$n;exports.MoonIcon=ap;exports.MoreIcon=kp;exports.MousePointerIcon=Sl;exports.NavigationMenu=To;exports.NotificationIcon=tp;exports.OTPInput=wi;exports.OpenEyeIcon=Sn;exports.PageLayout=ox;exports.Pagination=Ls;exports.PanelIcon=Cl;exports.Password=Jh;exports.PauseIcon=Bu;exports.PlayIcon=yl;exports.PlusIcon=Zu;exports.PowerOffIcon=hp;exports.PrintIcon=Rp;exports.ProfileIcon=op;exports.ProgressBar=Bs;exports.QuickReactionEmojis=Li;exports.Radio=Vn;exports.RadioGroup=kg;exports.RefreshIcon=Ip;exports.Resizable=Kn;exports.RotateIcon=up;exports.Router=cx;exports.SaveIcon=Nu;exports.SearchIcon=Qt;exports.Select=ft;exports.Selector=ng;exports.SendIcon=bn;exports.Separator=sr;exports.SettingsIcon=xl;exports.ShapeIcon=dp;exports.ShareButton=Os;exports.ShareIcon=bl;exports.ShieldIcon=mp;exports.Sidebar=Ft;exports.Slider=qi;exports.SliderIcon=$p;exports.SpinnerIcon=Dp;exports.SplashScreen=nx;exports.StarIcon=Ou;exports.StatusIndicator=Yt;exports.StopIcon=ur;exports.SuccessIcon=wn;exports.Switch=En;exports.Table=Te;exports.Tabs=Ko;exports.TagInput=cf;exports.TextArea=Tt;exports.TextField=Pe;exports.TextIcon=cp;exports.ThreadsIcon=Lu;exports.TickIcon=wt;exports.Title=us;exports.Toast=Jk;exports.Toggle=Pn;exports.ToggleGroup=ps;exports.Tooltip=Sr;exports.TrashIcon=Cp;exports.TwitchIcon=Hu;exports.TwitterIcon=Eu;exports.UnLikeIcon=zp;exports.UnlockIcon=Ap;exports.UploadIcon=jn;exports.Uploader=gr;exports.UserIcon=Ru;exports.VideoIcon=Mu;exports.WarningIcon=yn;exports.WifiIcon=Hp;exports.XIcon=Au;exports.YoutubeIcon=Pu;exports.ZapIcon=xp;exports.ZoomInIcon=Bp;exports.ZoomOutIcon=sp;exports.deepMerge=Ke;exports.defaultBlockEditorLabels=ws;exports.defaultDesignSystemConfig=cl;exports.defaultEmojiPickerLabels=$i;exports.designSystemConfigList=fu;exports.designSystemConfigs=mn;exports.getDesignSystemComponentProps=hn;exports.goBack=lx;exports.hideDrawer=Gi;exports.hideMessage=Tl;exports.hideModal=Dn;exports.matchPath=Ki;exports.mergeDesignSystemComponentProps=ul;exports.navigate=ax;exports.normalizeDesignSystemComponentProps=gn;exports.setSplashLoaded=tx;exports.setSplashStarted=rx;exports.showDrawer=Qy;exports.showMessage=vl;exports.showModal=Dy;exports.showToast=Fo;exports.useDesignSystem=cr;exports.useDesignSystemComponentProps=Zo;exports.useDrawerStore=co;exports.useHistory=_n;exports.useMergedDesignSystemComponentProps=ve;exports.useMessageStore=mr;exports.useModalStore=so;exports.useRouterStore=Ye;exports.useSplashStore=br;exports.useToast=Qk;
36
80
  //# sourceMappingURL=web.cjs.js.map