@omnitron-dev/prism 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (839) hide show
  1. package/dist/accessibility/index.d.ts +7 -151
  2. package/dist/accessibility/index.d.ts.map +1 -0
  3. package/dist/accessibility/index.js +0 -1
  4. package/dist/accessibility/index.js.map +1 -1
  5. package/dist/accessibility/vision-mode.d.ts +154 -0
  6. package/dist/accessibility/vision-mode.d.ts.map +1 -0
  7. package/dist/blocks/auth-block/auth-block.d.ts +107 -0
  8. package/dist/blocks/auth-block/auth-block.d.ts.map +1 -0
  9. package/dist/blocks/auth-block/guards.d.ts +262 -0
  10. package/dist/blocks/auth-block/guards.d.ts.map +1 -0
  11. package/dist/blocks/auth-block/index.d.ts +13 -0
  12. package/dist/blocks/auth-block/index.d.ts.map +1 -0
  13. package/dist/blocks/auth-block/types.d.ts +232 -0
  14. package/dist/blocks/auth-block/types.d.ts.map +1 -0
  15. package/dist/blocks/dashboard-block/dashboard-block.d.ts +53 -0
  16. package/dist/blocks/dashboard-block/dashboard-block.d.ts.map +1 -0
  17. package/dist/blocks/dashboard-block/index.d.ts +12 -0
  18. package/dist/blocks/dashboard-block/index.d.ts.map +1 -0
  19. package/dist/blocks/dashboard-block/types.d.ts +182 -0
  20. package/dist/blocks/dashboard-block/types.d.ts.map +1 -0
  21. package/dist/blocks/dashboard-block/use-dashboard-block.d.ts +95 -0
  22. package/dist/blocks/dashboard-block/use-dashboard-block.d.ts.map +1 -0
  23. package/dist/blocks/data-grid-block/data-grid-block.d.ts +81 -0
  24. package/dist/blocks/data-grid-block/data-grid-block.d.ts.map +1 -0
  25. package/dist/blocks/data-grid-block/index.d.ts +11 -0
  26. package/dist/blocks/data-grid-block/index.d.ts.map +1 -0
  27. package/dist/blocks/data-grid-block/types.d.ts +304 -0
  28. package/dist/blocks/data-grid-block/types.d.ts.map +1 -0
  29. package/dist/blocks/index.d.ts +10 -1235
  30. package/dist/blocks/index.d.ts.map +1 -0
  31. package/dist/blocks/index.js +139 -42
  32. package/dist/blocks/index.js.map +1 -1
  33. package/dist/{chunk-VAAIHNWQ.js → chunk-6AHI4GSV.js} +3 -3
  34. package/dist/chunk-6AHI4GSV.js.map +1 -0
  35. package/dist/{chunk-JDTC2SBY.js → chunk-AD4W7HYC.js} +2 -2
  36. package/dist/chunk-AD4W7HYC.js.map +1 -0
  37. package/dist/{chunk-SNKGGHBT.js → chunk-ADG4HZEP.js} +3 -3
  38. package/dist/chunk-ADG4HZEP.js.map +1 -0
  39. package/dist/{chunk-JNU4QHJK.js → chunk-AYYFMTMI.js} +5 -4
  40. package/dist/{chunk-JNU4QHJK.js.map → chunk-AYYFMTMI.js.map} +1 -1
  41. package/dist/{chunk-HO2GKTWJ.js → chunk-BRDWQVRT.js} +2 -2
  42. package/dist/chunk-BRDWQVRT.js.map +1 -0
  43. package/dist/{chunk-XXP3ZGU6.js → chunk-BZOL7GMU.js} +21 -13
  44. package/dist/chunk-BZOL7GMU.js.map +1 -0
  45. package/dist/{chunk-2FYNRDXR.js → chunk-DRFNMZLG.js} +2 -2
  46. package/dist/chunk-DRFNMZLG.js.map +1 -0
  47. package/dist/{chunk-BV32OJ2A.js → chunk-GUFHFEPZ.js} +2 -2
  48. package/dist/chunk-GUFHFEPZ.js.map +1 -0
  49. package/dist/{chunk-KTCWPGON.js → chunk-OBJ244BO.js} +558 -75
  50. package/dist/chunk-OBJ244BO.js.map +1 -0
  51. package/dist/{chunk-IZOIO7PA.js → chunk-S6SEGBX6.js} +31 -22
  52. package/dist/chunk-S6SEGBX6.js.map +1 -0
  53. package/dist/chunk-SNZK5X6F.js +594 -0
  54. package/dist/chunk-SNZK5X6F.js.map +1 -0
  55. package/dist/{chunk-YJMAQL3S.js → chunk-WFD54GQQ.js} +122 -69
  56. package/dist/chunk-WFD54GQQ.js.map +1 -0
  57. package/dist/{chunk-DDY7TLUI.js → chunk-XIXSSI3B.js} +28 -2
  58. package/dist/chunk-XIXSSI3B.js.map +1 -0
  59. package/dist/{chunk-A2Z7NVGL.js → chunk-YQW43BDH.js} +1274 -792
  60. package/dist/chunk-YQW43BDH.js.map +1 -0
  61. package/dist/{chunk-XWL6J6IO.js → chunk-YSIG2XYH.js} +2 -2
  62. package/dist/chunk-YSIG2XYH.js.map +1 -0
  63. package/dist/chunk-Z5OSPAOC.js +1576 -0
  64. package/dist/chunk-Z5OSPAOC.js.map +1 -0
  65. package/dist/{chunk-MEFT6XPH.js → chunk-ZTATTUH7.js} +170 -85
  66. package/dist/chunk-ZTATTUH7.js.map +1 -0
  67. package/dist/cli/commands/add.d.ts +22 -0
  68. package/dist/cli/commands/add.d.ts.map +1 -0
  69. package/dist/cli/commands/diff.d.ts +13 -0
  70. package/dist/cli/commands/diff.d.ts.map +1 -0
  71. package/dist/cli/commands/doctor.d.ts +13 -0
  72. package/dist/cli/commands/doctor.d.ts.map +1 -0
  73. package/dist/cli/commands/init.d.ts +13 -0
  74. package/dist/cli/commands/init.d.ts.map +1 -0
  75. package/dist/cli/commands/list.d.ts +13 -0
  76. package/dist/cli/commands/list.d.ts.map +1 -0
  77. package/dist/cli/commands/remove.d.ts +13 -0
  78. package/dist/cli/commands/remove.d.ts.map +1 -0
  79. package/dist/cli/commands/update.d.ts +13 -0
  80. package/dist/cli/commands/update.d.ts.map +1 -0
  81. package/dist/cli/config.d.ts +73 -0
  82. package/dist/cli/config.d.ts.map +1 -0
  83. package/dist/cli/constants.d.ts +60 -0
  84. package/dist/cli/constants.d.ts.map +1 -0
  85. package/dist/cli/index.d.ts +27 -0
  86. package/dist/cli/index.d.ts.map +1 -0
  87. package/dist/cli/index.js +31 -37
  88. package/dist/cli/index.js.map +1 -1
  89. package/dist/components/accordion/accordion.d.ts +149 -0
  90. package/dist/components/accordion/accordion.d.ts.map +1 -0
  91. package/dist/components/accordion/index.d.ts +7 -0
  92. package/dist/components/accordion/index.d.ts.map +1 -0
  93. package/dist/components/admin-filters/admin-data-table.d.ts +185 -0
  94. package/dist/components/admin-filters/admin-data-table.d.ts.map +1 -0
  95. package/dist/components/admin-filters/amount-cell.d.ts +39 -0
  96. package/dist/components/admin-filters/amount-cell.d.ts.map +1 -0
  97. package/dist/components/admin-filters/filter-toolbar.d.ts +99 -0
  98. package/dist/components/admin-filters/filter-toolbar.d.ts.map +1 -0
  99. package/dist/components/admin-filters/index.d.ts +13 -0
  100. package/dist/components/admin-filters/index.d.ts.map +1 -0
  101. package/dist/components/admin-filters/status-chip.d.ts +55 -0
  102. package/dist/components/admin-filters/status-chip.d.ts.map +1 -0
  103. package/dist/components/alert/alert.d.ts +159 -0
  104. package/dist/components/alert/alert.d.ts.map +1 -0
  105. package/dist/components/alert/index.d.ts +7 -0
  106. package/dist/components/alert/index.d.ts.map +1 -0
  107. package/dist/components/animate/animate-border.d.ts +33 -0
  108. package/dist/components/animate/animate-border.d.ts.map +1 -0
  109. package/dist/components/animate/index.d.ts +3 -0
  110. package/dist/components/animate/index.d.ts.map +1 -0
  111. package/dist/components/animate/motion-lazy.d.ts +5 -0
  112. package/dist/components/animate/motion-lazy.d.ts.map +1 -0
  113. package/dist/components/avatar/avatar.d.ts +78 -0
  114. package/dist/components/avatar/avatar.d.ts.map +1 -0
  115. package/dist/components/avatar/index.d.ts +7 -0
  116. package/dist/components/avatar/index.d.ts.map +1 -0
  117. package/dist/components/badge/badge.d.ts +102 -0
  118. package/dist/components/badge/badge.d.ts.map +1 -0
  119. package/dist/components/badge/index.d.ts +7 -0
  120. package/dist/components/badge/index.d.ts.map +1 -0
  121. package/dist/components/breadcrumbs/breadcrumbs.d.ts +100 -0
  122. package/dist/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
  123. package/dist/components/breadcrumbs/index.d.ts +7 -0
  124. package/dist/components/breadcrumbs/index.d.ts.map +1 -0
  125. package/dist/components/card/card.d.ts +127 -0
  126. package/dist/components/card/card.d.ts.map +1 -0
  127. package/dist/components/card/index.d.ts +7 -0
  128. package/dist/components/card/index.d.ts.map +1 -0
  129. package/dist/components/carousel/carousel.d.ts +35 -0
  130. package/dist/components/carousel/carousel.d.ts.map +1 -0
  131. package/dist/components/carousel/classes.d.ts +35 -0
  132. package/dist/components/carousel/classes.d.ts.map +1 -0
  133. package/dist/components/carousel/index.d.ts +10 -0
  134. package/dist/components/carousel/index.d.ts.map +1 -0
  135. package/dist/components/carousel/types.d.ts +167 -0
  136. package/dist/components/carousel/types.d.ts.map +1 -0
  137. package/dist/components/carousel/use-carousel.d.ts +51 -0
  138. package/dist/components/carousel/use-carousel.d.ts.map +1 -0
  139. package/dist/components/changelog/changelog-entry.d.ts +10 -0
  140. package/dist/components/changelog/changelog-entry.d.ts.map +1 -0
  141. package/dist/components/changelog/changelog-timeline.d.ts +9 -0
  142. package/dist/components/changelog/changelog-timeline.d.ts.map +1 -0
  143. package/dist/components/changelog/index.d.ts +3 -0
  144. package/dist/components/changelog/index.d.ts.map +1 -0
  145. package/dist/components/chart/chart.d.ts +39 -0
  146. package/dist/components/chart/chart.d.ts.map +1 -0
  147. package/dist/components/chart/classes.d.ts +24 -0
  148. package/dist/components/chart/classes.d.ts.map +1 -0
  149. package/dist/components/chart/components/chart-legends.d.ts +24 -0
  150. package/dist/components/chart/components/chart-legends.d.ts.map +1 -0
  151. package/dist/components/chart/components/chart-loading.d.ts +21 -0
  152. package/dist/components/chart/components/chart-loading.d.ts.map +1 -0
  153. package/dist/components/chart/components/index.d.ts +8 -0
  154. package/dist/components/chart/components/index.d.ts.map +1 -0
  155. package/dist/components/chart/index.d.ts +14 -0
  156. package/dist/components/chart/index.d.ts.map +1 -0
  157. package/dist/components/chart/types.d.ts +264 -0
  158. package/dist/components/chart/types.d.ts.map +1 -0
  159. package/dist/components/chart/use-chart.d.ts +34 -0
  160. package/dist/components/chart/use-chart.d.ts.map +1 -0
  161. package/dist/components/command-palette/command-palette.d.ts +73 -0
  162. package/dist/components/command-palette/command-palette.d.ts.map +1 -0
  163. package/dist/components/command-palette/index.d.ts +7 -0
  164. package/dist/components/command-palette/index.d.ts.map +1 -0
  165. package/dist/components/confirm-dialog/confirm-dialog.d.ts +89 -0
  166. package/dist/components/confirm-dialog/confirm-dialog.d.ts.map +1 -0
  167. package/dist/components/confirm-dialog/index.d.ts +7 -0
  168. package/dist/components/confirm-dialog/index.d.ts.map +1 -0
  169. package/dist/components/content-renderer/classes.d.ts +33 -0
  170. package/dist/components/content-renderer/classes.d.ts.map +1 -0
  171. package/dist/components/content-renderer/content-renderer.d.ts +37 -0
  172. package/dist/components/content-renderer/content-renderer.d.ts.map +1 -0
  173. package/dist/components/content-renderer/html-tags.d.ts +6 -0
  174. package/dist/components/content-renderer/html-tags.d.ts.map +1 -0
  175. package/dist/components/content-renderer/html-to-markdown.d.ts +7 -0
  176. package/dist/components/content-renderer/html-to-markdown.d.ts.map +1 -0
  177. package/dist/components/content-renderer/index.d.ts +7 -0
  178. package/dist/components/content-renderer/index.d.ts.map +1 -0
  179. package/dist/components/content-renderer/markdown.d.ts +23 -0
  180. package/dist/components/content-renderer/markdown.d.ts.map +1 -0
  181. package/dist/components/content-renderer/remark-spoiler.d.ts +9 -0
  182. package/dist/components/content-renderer/remark-spoiler.d.ts.map +1 -0
  183. package/dist/components/content-renderer/styles.d.ts +2 -0
  184. package/dist/components/content-renderer/styles.d.ts.map +1 -0
  185. package/dist/components/country-select/country-select.d.ts +101 -0
  186. package/dist/components/country-select/country-select.d.ts.map +1 -0
  187. package/dist/components/country-select/flag-icon.d.ts +36 -0
  188. package/dist/components/country-select/flag-icon.d.ts.map +1 -0
  189. package/dist/components/country-select/index.d.ts +5 -0
  190. package/dist/components/country-select/index.d.ts.map +1 -0
  191. package/dist/components/date-range-picker/date-range-input.d.ts +48 -0
  192. package/dist/components/date-range-picker/date-range-input.d.ts.map +1 -0
  193. package/dist/components/date-range-picker/date-range-picker.d.ts +39 -0
  194. package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -0
  195. package/dist/components/date-range-picker/index.d.ts +7 -0
  196. package/dist/components/date-range-picker/index.d.ts.map +1 -0
  197. package/dist/components/date-range-picker/use-date-range-picker.d.ts +28 -0
  198. package/dist/components/date-range-picker/use-date-range-picker.d.ts.map +1 -0
  199. package/dist/components/deadline-chip/deadline-chip.d.ts +41 -0
  200. package/dist/components/deadline-chip/deadline-chip.d.ts.map +1 -0
  201. package/dist/components/deadline-chip/index.d.ts +7 -0
  202. package/dist/components/deadline-chip/index.d.ts.map +1 -0
  203. package/dist/components/doc-layout/doc-layout.d.ts +17 -0
  204. package/dist/components/doc-layout/doc-layout.d.ts.map +1 -0
  205. package/dist/components/doc-layout/doc-section-nav.d.ts +16 -0
  206. package/dist/components/doc-layout/doc-section-nav.d.ts.map +1 -0
  207. package/dist/components/doc-layout/doc-sidebar.d.ts +15 -0
  208. package/dist/components/doc-layout/doc-sidebar.d.ts.map +1 -0
  209. package/dist/components/doc-layout/index.d.ts +4 -0
  210. package/dist/components/doc-layout/index.d.ts.map +1 -0
  211. package/dist/components/drawer/drawer.d.ts +65 -0
  212. package/dist/components/drawer/drawer.d.ts.map +1 -0
  213. package/dist/components/drawer/index.d.ts +7 -0
  214. package/dist/components/drawer/index.d.ts.map +1 -0
  215. package/dist/components/duration-picker/duration-picker.d.ts +24 -0
  216. package/dist/components/duration-picker/duration-picker.d.ts.map +1 -0
  217. package/dist/components/duration-picker/index.d.ts +2 -0
  218. package/dist/components/duration-picker/index.d.ts.map +1 -0
  219. package/dist/components/editor/classes.d.ts +52 -0
  220. package/dist/components/editor/classes.d.ts.map +1 -0
  221. package/dist/components/editor/editor.d.ts +15 -0
  222. package/dist/components/editor/editor.d.ts.map +1 -0
  223. package/dist/components/editor/extensions/clear-format.d.ts +3 -0
  224. package/dist/components/editor/extensions/clear-format.d.ts.map +1 -0
  225. package/dist/components/editor/extensions/index.d.ts +3 -0
  226. package/dist/components/editor/extensions/index.d.ts.map +1 -0
  227. package/dist/components/editor/extensions/text-transform.d.ts +20 -0
  228. package/dist/components/editor/extensions/text-transform.d.ts.map +1 -0
  229. package/dist/components/editor/icons/index.d.ts +42 -0
  230. package/dist/components/editor/icons/index.d.ts.map +1 -0
  231. package/dist/components/editor/index.d.ts +41 -104
  232. package/dist/components/editor/index.d.ts.map +1 -0
  233. package/dist/components/editor/index.js +1 -2
  234. package/dist/components/editor/presets.d.ts +3 -0
  235. package/dist/components/editor/presets.d.ts.map +1 -0
  236. package/dist/components/editor/styles.d.ts +2 -0
  237. package/dist/components/editor/styles.d.ts.map +1 -0
  238. package/dist/components/editor/toolbar/bubble-toolbar.d.ts +9 -0
  239. package/dist/components/editor/toolbar/bubble-toolbar.d.ts.map +1 -0
  240. package/dist/components/editor/toolbar/code-highlight-block.d.ts +3 -0
  241. package/dist/components/editor/toolbar/code-highlight-block.d.ts.map +1 -0
  242. package/dist/components/editor/toolbar/heading-block.d.ts +11 -0
  243. package/dist/components/editor/toolbar/heading-block.d.ts.map +1 -0
  244. package/dist/components/editor/toolbar/image-block.d.ts +11 -0
  245. package/dist/components/editor/toolbar/image-block.d.ts.map +1 -0
  246. package/dist/components/editor/toolbar/link-block.d.ts +13 -0
  247. package/dist/components/editor/toolbar/link-block.d.ts.map +1 -0
  248. package/dist/components/editor/toolbar/toolbar-item.d.ts +3 -0
  249. package/dist/components/editor/toolbar/toolbar-item.d.ts.map +1 -0
  250. package/dist/components/editor/toolbar/toolbar.d.ts +3 -0
  251. package/dist/components/editor/toolbar/toolbar.d.ts.map +1 -0
  252. package/dist/components/editor/toolbar/use-toolbar-state.d.ts +24 -0
  253. package/dist/components/editor/toolbar/use-toolbar-state.d.ts.map +1 -0
  254. package/dist/components/editor/types.d.ts +130 -0
  255. package/dist/components/editor/types.d.ts.map +1 -0
  256. package/dist/components/emoji-picker/emoji-picker.d.ts +24 -0
  257. package/dist/components/emoji-picker/emoji-picker.d.ts.map +1 -0
  258. package/dist/components/emoji-picker/emoji-search.d.ts +22 -0
  259. package/dist/components/emoji-picker/emoji-search.d.ts.map +1 -0
  260. package/dist/components/emoji-picker/emoji.d.ts +19 -0
  261. package/dist/components/emoji-picker/emoji.d.ts.map +1 -0
  262. package/dist/components/emoji-picker/index.d.ts +14 -0
  263. package/dist/components/emoji-picker/index.d.ts.map +1 -0
  264. package/dist/components/emoji-picker/index.js +3 -0
  265. package/dist/components/emoji-picker/index.js.map +1 -0
  266. package/dist/components/emoji-picker/twemoji-url.d.ts +26 -0
  267. package/dist/components/emoji-picker/twemoji-url.d.ts.map +1 -0
  268. package/dist/components/emoji-picker/types.d.ts +96 -0
  269. package/dist/components/emoji-picker/types.d.ts.map +1 -0
  270. package/dist/components/emoji-picker/use-emoji-data.d.ts +26 -0
  271. package/dist/components/emoji-picker/use-emoji-data.d.ts.map +1 -0
  272. package/dist/components/emoji-picker/use-recent-emojis.d.ts +16 -0
  273. package/dist/components/emoji-picker/use-recent-emojis.d.ts.map +1 -0
  274. package/dist/components/empty-content/empty-content.d.ts +92 -0
  275. package/dist/components/empty-content/empty-content.d.ts.map +1 -0
  276. package/dist/components/empty-content/index.d.ts +7 -0
  277. package/dist/components/empty-content/index.d.ts.map +1 -0
  278. package/dist/components/error-boundary/error-boundary.d.ts +162 -0
  279. package/dist/components/error-boundary/error-boundary.d.ts.map +1 -0
  280. package/dist/components/error-boundary/index.d.ts +7 -0
  281. package/dist/components/error-boundary/index.d.ts.map +1 -0
  282. package/dist/components/field/field-autocomplete.d.ts +74 -0
  283. package/dist/components/field/field-autocomplete.d.ts.map +1 -0
  284. package/dist/components/field/field-checkbox.d.ts +42 -0
  285. package/dist/components/field/field-checkbox.d.ts.map +1 -0
  286. package/dist/components/field/field-code.d.ts +80 -0
  287. package/dist/components/field/field-code.d.ts.map +1 -0
  288. package/dist/components/field/field-country-select.d.ts +84 -0
  289. package/dist/components/field/field-country-select.d.ts.map +1 -0
  290. package/dist/components/field/field-date-picker.d.ts +58 -0
  291. package/dist/components/field/field-date-picker.d.ts.map +1 -0
  292. package/dist/components/field/field-datetime-picker.d.ts +96 -0
  293. package/dist/components/field/field-datetime-picker.d.ts.map +1 -0
  294. package/dist/components/field/field-editor.d.ts +218 -0
  295. package/dist/components/field/field-editor.d.ts.map +1 -0
  296. package/dist/components/field/field-multi-checkbox.d.ts +91 -0
  297. package/dist/components/field/field-multi-checkbox.d.ts.map +1 -0
  298. package/dist/components/field/field-multi-select.d.ts +85 -0
  299. package/dist/components/field/field-multi-select.d.ts.map +1 -0
  300. package/dist/components/field/field-multi-switch.d.ts +93 -0
  301. package/dist/components/field/field-multi-switch.d.ts.map +1 -0
  302. package/dist/components/field/field-number.d.ts +50 -0
  303. package/dist/components/field/field-number.d.ts.map +1 -0
  304. package/dist/components/field/field-phone.d.ts +82 -0
  305. package/dist/components/field/field-phone.d.ts.map +1 -0
  306. package/dist/components/field/field-radio.d.ts +64 -0
  307. package/dist/components/field/field-radio.d.ts.map +1 -0
  308. package/dist/components/field/field-rating.d.ts +43 -0
  309. package/dist/components/field/field-rating.d.ts.map +1 -0
  310. package/dist/components/field/field-select.d.ts +50 -0
  311. package/dist/components/field/field-select.d.ts.map +1 -0
  312. package/dist/components/field/field-slider.d.ts +56 -0
  313. package/dist/components/field/field-slider.d.ts.map +1 -0
  314. package/dist/components/field/field-switch.d.ts +44 -0
  315. package/dist/components/field/field-switch.d.ts.map +1 -0
  316. package/dist/components/field/field-text.d.ts +38 -0
  317. package/dist/components/field/field-text.d.ts.map +1 -0
  318. package/dist/components/field/field-time-picker.d.ts +79 -0
  319. package/dist/components/field/field-time-picker.d.ts.map +1 -0
  320. package/dist/components/field/field-upload.d.ts +120 -0
  321. package/dist/components/field/field-upload.d.ts.map +1 -0
  322. package/dist/components/field/index.d.ts +149 -0
  323. package/dist/components/field/index.d.ts.map +1 -0
  324. package/dist/components/image/image.d.ts +79 -0
  325. package/dist/components/image/image.d.ts.map +1 -0
  326. package/dist/components/image/index.d.ts +7 -0
  327. package/dist/components/image/index.d.ts.map +1 -0
  328. package/dist/components/index.d.ts +60 -7072
  329. package/dist/components/index.d.ts.map +1 -0
  330. package/dist/components/index.js +11 -11
  331. package/dist/components/label/index.d.ts +7 -0
  332. package/dist/components/label/index.d.ts.map +1 -0
  333. package/dist/components/label/label.d.ts +71 -0
  334. package/dist/components/label/label.d.ts.map +1 -0
  335. package/dist/components/lightbox/classes.d.ts +34 -0
  336. package/dist/components/lightbox/classes.d.ts.map +1 -0
  337. package/dist/components/lightbox/index.d.ts +11 -0
  338. package/dist/components/lightbox/index.d.ts.map +1 -0
  339. package/dist/components/lightbox/lightbox.d.ts +42 -0
  340. package/dist/components/lightbox/lightbox.d.ts.map +1 -0
  341. package/dist/components/lightbox/types.d.ts +233 -0
  342. package/dist/components/lightbox/types.d.ts.map +1 -0
  343. package/dist/components/lightbox/use-lightbox.d.ts +42 -0
  344. package/dist/components/lightbox/use-lightbox.d.ts.map +1 -0
  345. package/dist/components/loading-screen/index.d.ts +8 -0
  346. package/dist/components/loading-screen/index.d.ts.map +1 -0
  347. package/dist/components/loading-screen/loading-screen.d.ts +37 -0
  348. package/dist/components/loading-screen/loading-screen.d.ts.map +1 -0
  349. package/dist/components/loading-screen/splash-screen.d.ts +80 -0
  350. package/dist/components/loading-screen/splash-screen.d.ts.map +1 -0
  351. package/dist/components/map/Map.d.ts +63 -0
  352. package/dist/components/map/Map.d.ts.map +1 -0
  353. package/dist/components/map/MapCoverageLayer.d.ts +25 -0
  354. package/dist/components/map/MapCoverageLayer.d.ts.map +1 -0
  355. package/dist/components/map/MapMarker.d.ts +17 -0
  356. package/dist/components/map/MapMarker.d.ts.map +1 -0
  357. package/dist/components/map/MapPointPicker.d.ts +26 -0
  358. package/dist/components/map/MapPointPicker.d.ts.map +1 -0
  359. package/dist/components/map/index.d.ts +14 -0
  360. package/dist/components/map/index.d.ts.map +1 -0
  361. package/dist/components/mega-menu/index.d.ts +12 -0
  362. package/dist/components/mega-menu/index.d.ts.map +1 -0
  363. package/dist/components/mega-menu/mega-menu-horizontal.d.ts +41 -0
  364. package/dist/components/mega-menu/mega-menu-horizontal.d.ts.map +1 -0
  365. package/dist/components/mega-menu/mega-menu-mobile.d.ts +28 -0
  366. package/dist/components/mega-menu/mega-menu-mobile.d.ts.map +1 -0
  367. package/dist/components/mega-menu/mega-menu-vertical.d.ts +28 -0
  368. package/dist/components/mega-menu/mega-menu-vertical.d.ts.map +1 -0
  369. package/dist/components/mega-menu/styles.d.ts +18 -0
  370. package/dist/components/mega-menu/styles.d.ts.map +1 -0
  371. package/dist/components/mega-menu/types.d.ts +200 -0
  372. package/dist/components/mega-menu/types.d.ts.map +1 -0
  373. package/dist/components/menu/index.d.ts +7 -0
  374. package/dist/components/menu/index.d.ts.map +1 -0
  375. package/dist/components/menu/menu.d.ts +144 -0
  376. package/dist/components/menu/menu.d.ts.map +1 -0
  377. package/dist/components/nav-card/index.d.ts +8 -0
  378. package/dist/components/nav-card/index.d.ts.map +1 -0
  379. package/dist/components/nav-card/nav-card-grid.d.ts +57 -0
  380. package/dist/components/nav-card/nav-card-grid.d.ts.map +1 -0
  381. package/dist/components/nav-card/nav-card.d.ts +69 -0
  382. package/dist/components/nav-card/nav-card.d.ts.map +1 -0
  383. package/dist/components/nav-section/components.d.ts +143 -0
  384. package/dist/components/nav-section/components.d.ts.map +1 -0
  385. package/dist/components/nav-section/index.d.ts +15 -0
  386. package/dist/components/nav-section/index.d.ts.map +1 -0
  387. package/dist/components/nav-section/nav-context.d.ts +80 -0
  388. package/dist/components/nav-section/nav-context.d.ts.map +1 -0
  389. package/dist/components/nav-section/nav-item.d.ts +20 -0
  390. package/dist/components/nav-section/nav-item.d.ts.map +1 -0
  391. package/dist/components/nav-section/nav-list.d.ts +25 -0
  392. package/dist/components/nav-section/nav-list.d.ts.map +1 -0
  393. package/dist/components/nav-section/nav-section-horizontal.d.ts +29 -0
  394. package/dist/components/nav-section/nav-section-horizontal.d.ts.map +1 -0
  395. package/dist/components/nav-section/nav-section-mini.d.ts +30 -0
  396. package/dist/components/nav-section/nav-section-mini.d.ts.map +1 -0
  397. package/dist/components/nav-section/nav-section-vertical.d.ts +37 -0
  398. package/dist/components/nav-section/nav-section-vertical.d.ts.map +1 -0
  399. package/dist/components/nav-section/styles.d.ts +35 -0
  400. package/dist/components/nav-section/styles.d.ts.map +1 -0
  401. package/dist/components/nav-section/types.d.ts +178 -0
  402. package/dist/components/nav-section/types.d.ts.map +1 -0
  403. package/dist/components/navigation-progress/index.d.ts +7 -0
  404. package/dist/components/navigation-progress/index.d.ts.map +1 -0
  405. package/dist/components/navigation-progress/navigation-progress.d.ts +36 -0
  406. package/dist/components/navigation-progress/navigation-progress.d.ts.map +1 -0
  407. package/dist/components/page-content/index.d.ts +7 -0
  408. package/dist/components/page-content/index.d.ts.map +1 -0
  409. package/dist/components/page-content/page-content.d.ts +55 -0
  410. package/dist/components/page-content/page-content.d.ts.map +1 -0
  411. package/dist/components/popover/index.d.ts +7 -0
  412. package/dist/components/popover/index.d.ts.map +1 -0
  413. package/dist/{popover-Dmw7SJLR.d.ts → components/popover/popover.d.ts} +11 -14
  414. package/dist/components/popover/popover.d.ts.map +1 -0
  415. package/dist/components/progress/countdown-ring.d.ts +60 -0
  416. package/dist/components/progress/countdown-ring.d.ts.map +1 -0
  417. package/dist/components/progress/index.d.ts +8 -0
  418. package/dist/components/progress/index.d.ts.map +1 -0
  419. package/dist/components/progress/progress.d.ts +106 -0
  420. package/dist/components/progress/progress.d.ts.map +1 -0
  421. package/dist/components/rail/index.d.ts +7 -0
  422. package/dist/components/rail/index.d.ts.map +1 -0
  423. package/dist/components/rail/rail.d.ts +39 -0
  424. package/dist/components/rail/rail.d.ts.map +1 -0
  425. package/dist/components/scroll-spy/index.d.ts +3 -0
  426. package/dist/components/scroll-spy/index.d.ts.map +1 -0
  427. package/dist/components/scroll-spy/scroll-spy-provider.d.ts +26 -0
  428. package/dist/components/scroll-spy/scroll-spy-provider.d.ts.map +1 -0
  429. package/dist/components/scroll-spy/scroll-spy-section.d.ts +10 -0
  430. package/dist/components/scroll-spy/scroll-spy-section.d.ts.map +1 -0
  431. package/dist/components/scroll-to-top/index.d.ts +7 -0
  432. package/dist/components/scroll-to-top/index.d.ts.map +1 -0
  433. package/dist/components/scroll-to-top/scroll-to-top.d.ts +25 -0
  434. package/dist/components/scroll-to-top/scroll-to-top.d.ts.map +1 -0
  435. package/dist/components/scrollbar/index.d.ts +7 -0
  436. package/dist/components/scrollbar/index.d.ts.map +1 -0
  437. package/dist/components/scrollbar/scrollbar.d.ts +59 -0
  438. package/dist/components/scrollbar/scrollbar.d.ts.map +1 -0
  439. package/dist/components/search-input/index.d.ts +2 -0
  440. package/dist/components/search-input/index.d.ts.map +1 -0
  441. package/dist/components/search-input/search-input.d.ts +46 -0
  442. package/dist/components/search-input/search-input.d.ts.map +1 -0
  443. package/dist/components/settings/index.d.ts +10 -0
  444. package/dist/components/settings/index.d.ts.map +1 -0
  445. package/dist/components/settings/settings-drawer.d.ts +39 -0
  446. package/dist/components/settings/settings-drawer.d.ts.map +1 -0
  447. package/dist/components/settings/settings-provider.d.ts +106 -0
  448. package/dist/components/settings/settings-provider.d.ts.map +1 -0
  449. package/dist/components/skeleton/index.d.ts +7 -0
  450. package/dist/components/skeleton/index.d.ts.map +1 -0
  451. package/dist/components/skeleton/skeleton.d.ts +77 -0
  452. package/dist/components/skeleton/skeleton.d.ts.map +1 -0
  453. package/dist/components/snackbar/index.d.ts +7 -0
  454. package/dist/components/snackbar/index.d.ts.map +1 -0
  455. package/dist/components/snackbar/snackbar.d.ts +120 -0
  456. package/dist/components/snackbar/snackbar.d.ts.map +1 -0
  457. package/dist/components/sponsored-slot/index.d.ts +3 -0
  458. package/dist/components/sponsored-slot/index.d.ts.map +1 -0
  459. package/dist/components/sponsored-slot/sponsored-slot.d.ts +16 -0
  460. package/dist/components/sponsored-slot/sponsored-slot.d.ts.map +1 -0
  461. package/dist/components/sponsored-slot/types.d.ts +45 -0
  462. package/dist/components/sponsored-slot/types.d.ts.map +1 -0
  463. package/dist/components/stepper/index.d.ts +7 -0
  464. package/dist/components/stepper/index.d.ts.map +1 -0
  465. package/dist/components/stepper/stepper.d.ts +145 -0
  466. package/dist/components/stepper/stepper.d.ts.map +1 -0
  467. package/dist/components/svg-color/index.d.ts +7 -0
  468. package/dist/components/svg-color/index.d.ts.map +1 -0
  469. package/dist/components/svg-color/svg-color.d.ts +80 -0
  470. package/dist/components/svg-color/svg-color.d.ts.map +1 -0
  471. package/dist/components/table/index.d.ts +7 -0
  472. package/dist/components/table/index.d.ts.map +1 -0
  473. package/dist/components/table/table.d.ts +184 -0
  474. package/dist/components/table/table.d.ts.map +1 -0
  475. package/dist/components/tabs/index.d.ts +7 -0
  476. package/dist/components/tabs/index.d.ts.map +1 -0
  477. package/dist/components/tabs/tabs.d.ts +146 -0
  478. package/dist/components/tabs/tabs.d.ts.map +1 -0
  479. package/dist/components/tag-cloud/index.d.ts +7 -0
  480. package/dist/components/tag-cloud/index.d.ts.map +1 -0
  481. package/dist/components/tag-cloud/tag-cloud.d.ts +58 -0
  482. package/dist/components/tag-cloud/tag-cloud.d.ts.map +1 -0
  483. package/dist/components/tiptap-renderer/index.d.ts +2 -0
  484. package/dist/components/tiptap-renderer/index.d.ts.map +1 -0
  485. package/dist/components/tiptap-renderer/tiptap-renderer.d.ts +45 -0
  486. package/dist/components/tiptap-renderer/tiptap-renderer.d.ts.map +1 -0
  487. package/dist/components/tooltip/index.d.ts +7 -0
  488. package/dist/components/tooltip/index.d.ts.map +1 -0
  489. package/dist/components/tooltip/tooltip.d.ts +38 -0
  490. package/dist/components/tooltip/tooltip.d.ts.map +1 -0
  491. package/dist/components/virtual-list/index.d.ts +7 -0
  492. package/dist/components/virtual-list/index.d.ts.map +1 -0
  493. package/dist/components/virtual-list/virtual-list.d.ts +64 -0
  494. package/dist/components/virtual-list/virtual-list.d.ts.map +1 -0
  495. package/dist/core/accessibility/index.d.ts +96 -0
  496. package/dist/core/accessibility/index.d.ts.map +1 -0
  497. package/dist/core/accessibility/skip-link.d.ts +31 -0
  498. package/dist/core/accessibility/skip-link.d.ts.map +1 -0
  499. package/dist/core/context.d.ts +99 -0
  500. package/dist/core/context.d.ts.map +1 -0
  501. package/dist/core/hooks/use-boolean.d.ts +54 -0
  502. package/dist/core/hooks/use-boolean.d.ts.map +1 -0
  503. package/dist/core/hooks/use-breakpoints.d.ts +87 -0
  504. package/dist/core/hooks/use-breakpoints.d.ts.map +1 -0
  505. package/dist/core/hooks/use-click-outside.d.ts +26 -0
  506. package/dist/core/hooks/use-click-outside.d.ts.map +1 -0
  507. package/dist/core/hooks/use-copy-to-clipboard.d.ts +66 -0
  508. package/dist/core/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  509. package/dist/core/hooks/use-countdown.d.ts +105 -0
  510. package/dist/core/hooks/use-countdown.d.ts.map +1 -0
  511. package/dist/core/hooks/use-debounce.d.ts +64 -0
  512. package/dist/core/hooks/use-debounce.d.ts.map +1 -0
  513. package/dist/core/hooks/use-event-listener.d.ts +37 -0
  514. package/dist/core/hooks/use-event-listener.d.ts.map +1 -0
  515. package/dist/core/hooks/use-interval.d.ts +30 -0
  516. package/dist/core/hooks/use-interval.d.ts.map +1 -0
  517. package/dist/core/hooks/use-is-client.d.ts +24 -0
  518. package/dist/core/hooks/use-is-client.d.ts.map +1 -0
  519. package/dist/core/hooks/use-local-storage.d.ts +61 -0
  520. package/dist/core/hooks/use-local-storage.d.ts.map +1 -0
  521. package/dist/core/hooks/use-media-query.d.ts +107 -0
  522. package/dist/core/hooks/use-media-query.d.ts.map +1 -0
  523. package/dist/core/hooks/use-mounted.d.ts +33 -0
  524. package/dist/core/hooks/use-mounted.d.ts.map +1 -0
  525. package/dist/core/hooks/use-multi-select.d.ts +113 -0
  526. package/dist/core/hooks/use-multi-select.d.ts.map +1 -0
  527. package/dist/core/hooks/use-previous.d.ts +23 -0
  528. package/dist/core/hooks/use-previous.d.ts.map +1 -0
  529. package/dist/core/hooks/use-set-state.d.ts +56 -0
  530. package/dist/core/hooks/use-set-state.d.ts.map +1 -0
  531. package/dist/core/hooks/use-tabs.d.ts +74 -0
  532. package/dist/core/hooks/use-tabs.d.ts.map +1 -0
  533. package/dist/core/hooks/use-timeout.d.ts +37 -0
  534. package/dist/core/hooks/use-timeout.d.ts.map +1 -0
  535. package/dist/core/index.d.ts +36 -468
  536. package/dist/core/index.d.ts.map +1 -0
  537. package/dist/core/index.js +6 -7
  538. package/dist/core/provider-stack.d.ts +181 -0
  539. package/dist/core/provider-stack.d.ts.map +1 -0
  540. package/dist/core/provider.d.ts +67 -0
  541. package/dist/core/provider.d.ts.map +1 -0
  542. package/dist/forms/index.d.ts +6 -557
  543. package/dist/forms/index.d.ts.map +1 -0
  544. package/dist/forms/index.js +0 -1
  545. package/dist/forms/index.js.map +1 -1
  546. package/dist/forms/schema-provider.d.ts +282 -0
  547. package/dist/forms/schema-provider.d.ts.map +1 -0
  548. package/dist/forms/schema-utils.d.ts +286 -0
  549. package/dist/forms/schema-utils.d.ts.map +1 -0
  550. package/dist/hooks/index.d.ts +38 -8
  551. package/dist/hooks/index.d.ts.map +1 -0
  552. package/dist/hooks/index.js +8 -9
  553. package/dist/hooks/use-array.d.ts +126 -0
  554. package/dist/hooks/use-array.d.ts.map +1 -0
  555. package/dist/hooks/use-async.d.ts +88 -0
  556. package/dist/hooks/use-async.d.ts.map +1 -0
  557. package/dist/hooks/use-back-to-top.d.ts +57 -0
  558. package/dist/hooks/use-back-to-top.d.ts.map +1 -0
  559. package/dist/hooks/use-client-rect.d.ts +67 -0
  560. package/dist/hooks/use-client-rect.d.ts.map +1 -0
  561. package/dist/hooks/use-config-from-query.d.ts +98 -0
  562. package/dist/hooks/use-config-from-query.d.ts.map +1 -0
  563. package/dist/hooks/use-cookies.d.ts +62 -0
  564. package/dist/hooks/use-cookies.d.ts.map +1 -0
  565. package/dist/hooks/use-countdown-date.d.ts +47 -0
  566. package/dist/hooks/use-countdown-date.d.ts.map +1 -0
  567. package/dist/hooks/use-countdown-seconds.d.ts +83 -0
  568. package/dist/hooks/use-countdown-seconds.d.ts.map +1 -0
  569. package/dist/hooks/use-double-click.d.ts +67 -0
  570. package/dist/hooks/use-double-click.d.ts.map +1 -0
  571. package/dist/hooks/use-focus-trap.d.ts +66 -0
  572. package/dist/hooks/use-focus-trap.d.ts.map +1 -0
  573. package/dist/hooks/use-image-dimensions.d.ts +124 -0
  574. package/dist/hooks/use-image-dimensions.d.ts.map +1 -0
  575. package/dist/hooks/use-infinite-scroll.d.ts +204 -0
  576. package/dist/hooks/use-infinite-scroll.d.ts.map +1 -0
  577. package/dist/hooks/use-intersection-observer.d.ts +93 -0
  578. package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
  579. package/dist/hooks/use-isomorphic-layout-effect.d.ts +34 -0
  580. package/dist/hooks/use-isomorphic-layout-effect.d.ts.map +1 -0
  581. package/dist/hooks/use-keyboard-shortcut.d.ts +112 -0
  582. package/dist/hooks/use-keyboard-shortcut.d.ts.map +1 -0
  583. package/dist/hooks/use-lazy-query.d.ts +132 -0
  584. package/dist/hooks/use-lazy-query.d.ts.map +1 -0
  585. package/dist/hooks/use-mutation.d.ts +141 -0
  586. package/dist/hooks/use-mutation.d.ts.map +1 -0
  587. package/dist/hooks/use-online-status.d.ts +56 -0
  588. package/dist/hooks/use-online-status.d.ts.map +1 -0
  589. package/dist/hooks/use-password-visibility.d.ts +83 -0
  590. package/dist/hooks/use-password-visibility.d.ts.map +1 -0
  591. package/dist/hooks/use-popover-hover.d.ts +78 -0
  592. package/dist/hooks/use-popover-hover.d.ts.map +1 -0
  593. package/dist/hooks/use-scroll-offset-top.d.ts +69 -0
  594. package/dist/hooks/use-scroll-offset-top.d.ts.map +1 -0
  595. package/dist/hooks/use-scroll-position.d.ts +96 -0
  596. package/dist/hooks/use-scroll-position.d.ts.map +1 -0
  597. package/dist/hooks/use-session-storage.d.ts +66 -0
  598. package/dist/hooks/use-session-storage.d.ts.map +1 -0
  599. package/dist/hooks/use-throttle.d.ts +67 -0
  600. package/dist/hooks/use-throttle.d.ts.map +1 -0
  601. package/dist/hooks/use-update-effect.d.ts +53 -0
  602. package/dist/hooks/use-update-effect.d.ts.map +1 -0
  603. package/dist/hooks/use-window-size.d.ts +132 -0
  604. package/dist/hooks/use-window-size.d.ts.map +1 -0
  605. package/dist/http/client.d.ts +74 -0
  606. package/dist/http/client.d.ts.map +1 -0
  607. package/dist/http/index.d.ts +6 -229
  608. package/dist/http/index.d.ts.map +1 -0
  609. package/dist/http/index.js +0 -2
  610. package/dist/http/index.js.map +1 -1
  611. package/dist/http/types.d.ts +158 -0
  612. package/dist/http/types.d.ts.map +1 -0
  613. package/dist/index.d.ts +19 -2758
  614. package/dist/index.d.ts.map +1 -0
  615. package/dist/index.js +35 -63
  616. package/dist/index.js.map +1 -1
  617. package/dist/layouts/auth/centered.d.ts +49 -0
  618. package/dist/layouts/auth/centered.d.ts.map +1 -0
  619. package/dist/layouts/auth/index.d.ts +12 -0
  620. package/dist/layouts/auth/index.d.ts.map +1 -0
  621. package/dist/layouts/auth/simple.d.ts +58 -0
  622. package/dist/layouts/auth/simple.d.ts.map +1 -0
  623. package/dist/layouts/auth/split.d.ts +81 -0
  624. package/dist/layouts/auth/split.d.ts.map +1 -0
  625. package/dist/layouts/core/context.d.ts +102 -0
  626. package/dist/layouts/core/context.d.ts.map +1 -0
  627. package/dist/layouts/core/css-vars.d.ts +43 -0
  628. package/dist/layouts/core/css-vars.d.ts.map +1 -0
  629. package/dist/layouts/core/header-section.d.ts +79 -0
  630. package/dist/layouts/core/header-section.d.ts.map +1 -0
  631. package/dist/layouts/core/index.d.ts +18 -0
  632. package/dist/layouts/core/index.d.ts.map +1 -0
  633. package/dist/layouts/core/layout-section.d.ts +64 -0
  634. package/dist/layouts/core/layout-section.d.ts.map +1 -0
  635. package/dist/layouts/core/user-menu.d.ts +88 -0
  636. package/dist/layouts/core/user-menu.d.ts.map +1 -0
  637. package/dist/layouts/dashboard/index.d.ts +10 -0
  638. package/dist/layouts/dashboard/index.d.ts.map +1 -0
  639. package/dist/layouts/dashboard/layout.d.ts +90 -0
  640. package/dist/layouts/dashboard/layout.d.ts.map +1 -0
  641. package/dist/layouts/dashboard/sidenav.d.ts +58 -0
  642. package/dist/layouts/dashboard/sidenav.d.ts.map +1 -0
  643. package/dist/layouts/dashboard/topnav.d.ts +41 -0
  644. package/dist/layouts/dashboard/topnav.d.ts.map +1 -0
  645. package/dist/layouts/index.d.ts +27 -850
  646. package/dist/layouts/index.d.ts.map +1 -0
  647. package/dist/layouts/index.js +3 -4
  648. package/dist/layouts/types.d.ts +317 -0
  649. package/dist/layouts/types.d.ts.map +1 -0
  650. package/dist/netron/context.d.ts +18 -0
  651. package/dist/netron/context.d.ts.map +1 -0
  652. package/dist/netron/hooks.d.ts +10 -0
  653. package/dist/netron/hooks.d.ts.map +1 -0
  654. package/dist/netron/index.d.ts +47 -4
  655. package/dist/netron/index.d.ts.map +1 -0
  656. package/dist/netron/index.js +1 -2
  657. package/dist/netron/types.d.ts +12 -0
  658. package/dist/netron/types.d.ts.map +1 -0
  659. package/dist/registry/index.d.ts +8 -341
  660. package/dist/registry/index.d.ts.map +1 -0
  661. package/dist/registry/index.js +1 -2
  662. package/dist/registry/installer.d.ts +137 -0
  663. package/dist/registry/installer.d.ts.map +1 -0
  664. package/dist/registry/manager.d.ts +196 -0
  665. package/dist/registry/manager.d.ts.map +1 -0
  666. package/dist/state/create-store.d.ts +164 -0
  667. package/dist/state/create-store.d.ts.map +1 -0
  668. package/dist/state/index.d.ts +12 -969
  669. package/dist/state/index.d.ts.map +1 -0
  670. package/dist/state/index.js +2 -3
  671. package/dist/state/settings-version.d.ts +255 -0
  672. package/dist/state/settings-version.d.ts.map +1 -0
  673. package/dist/state/stores/auth.d.ts +155 -0
  674. package/dist/state/stores/auth.d.ts.map +1 -0
  675. package/dist/state/stores/index.d.ts +10 -0
  676. package/dist/state/stores/index.d.ts.map +1 -0
  677. package/dist/state/stores/settings.d.ts +151 -0
  678. package/dist/state/stores/settings.d.ts.map +1 -0
  679. package/dist/state/stores/theme.d.ts +87 -0
  680. package/dist/state/stores/theme.d.ts.map +1 -0
  681. package/dist/state/stores/ui.d.ts +204 -0
  682. package/dist/state/stores/ui.d.ts.map +1 -0
  683. package/dist/theme/colors/base.d.ts +61 -0
  684. package/dist/theme/colors/base.d.ts.map +1 -0
  685. package/dist/theme/colors/index.d.ts +10 -0
  686. package/dist/theme/colors/index.d.ts.map +1 -0
  687. package/dist/theme/colors/luxury.d.ts +49 -0
  688. package/dist/theme/colors/luxury.d.ts.map +1 -0
  689. package/dist/theme/components/Autocomplete.d.ts +9 -0
  690. package/dist/theme/components/Autocomplete.d.ts.map +1 -0
  691. package/dist/theme/components/Button.d.ts +33 -0
  692. package/dist/theme/components/Button.d.ts.map +1 -0
  693. package/dist/theme/components/Card.d.ts +20 -0
  694. package/dist/theme/components/Card.d.ts.map +1 -0
  695. package/dist/theme/components/Chip.d.ts +29 -0
  696. package/dist/theme/components/Chip.d.ts.map +1 -0
  697. package/dist/theme/components/DataGrid.d.ts +15 -0
  698. package/dist/theme/components/DataGrid.d.ts.map +1 -0
  699. package/dist/theme/components/DatePicker.d.ts +19 -0
  700. package/dist/theme/components/DatePicker.d.ts.map +1 -0
  701. package/dist/theme/components/Dialog.d.ts +23 -0
  702. package/dist/theme/components/Dialog.d.ts.map +1 -0
  703. package/dist/theme/components/FormControls.d.ts +53 -0
  704. package/dist/theme/components/FormControls.d.ts.map +1 -0
  705. package/dist/theme/components/Tabs.d.ts +21 -0
  706. package/dist/theme/components/Tabs.d.ts.map +1 -0
  707. package/dist/theme/components/TextField.d.ts +87 -0
  708. package/dist/theme/components/TextField.d.ts.map +1 -0
  709. package/dist/theme/components/index.d.ts +27 -0
  710. package/dist/theme/components/index.d.ts.map +1 -0
  711. package/dist/theme/components/theme-utils.d.ts +42 -0
  712. package/dist/theme/components/theme-utils.d.ts.map +1 -0
  713. package/dist/theme/create-theme.d.ts +131 -0
  714. package/dist/theme/create-theme.d.ts.map +1 -0
  715. package/dist/theme/css-variables.d.ts +42 -0
  716. package/dist/theme/css-variables.d.ts.map +1 -0
  717. package/dist/theme/custom-shadows.d.ts +58 -0
  718. package/dist/theme/custom-shadows.d.ts.map +1 -0
  719. package/dist/theme/index.d.ts +23 -1045
  720. package/dist/theme/index.d.ts.map +1 -0
  721. package/dist/theme/index.js +2 -3
  722. package/dist/theme/mixins.d.ts +332 -0
  723. package/dist/theme/mixins.d.ts.map +1 -0
  724. package/dist/theme/opacity.d.ts +51 -0
  725. package/dist/theme/opacity.d.ts.map +1 -0
  726. package/dist/theme/palette/builder.d.ts +138 -0
  727. package/dist/theme/palette/builder.d.ts.map +1 -0
  728. package/dist/theme/palette/index.d.ts +7 -0
  729. package/dist/theme/palette/index.d.ts.map +1 -0
  730. package/dist/theme/palette.d.ts +43 -0
  731. package/dist/theme/palette.d.ts.map +1 -0
  732. package/dist/theme/presets/arctic.d.ts +13 -0
  733. package/dist/theme/presets/arctic.d.ts.map +1 -0
  734. package/dist/theme/presets/default.d.ts +13 -0
  735. package/dist/theme/presets/default.d.ts.map +1 -0
  736. package/dist/theme/presets/dracula.d.ts +27 -0
  737. package/dist/theme/presets/dracula.d.ts.map +1 -0
  738. package/dist/theme/presets/ember.d.ts +23 -0
  739. package/dist/theme/presets/ember.d.ts.map +1 -0
  740. package/dist/theme/presets/index.d.ts +39 -0
  741. package/dist/theme/presets/index.d.ts.map +1 -0
  742. package/dist/theme/presets/luxury.d.ts +13 -0
  743. package/dist/theme/presets/luxury.d.ts.map +1 -0
  744. package/dist/theme/presets/midnight.d.ts +23 -0
  745. package/dist/theme/presets/midnight.d.ts.map +1 -0
  746. package/dist/theme/presets/minimal.d.ts +23 -0
  747. package/dist/theme/presets/minimal.d.ts.map +1 -0
  748. package/dist/theme/presets/nature.d.ts +14 -0
  749. package/dist/theme/presets/nature.d.ts.map +1 -0
  750. package/dist/theme/presets/retro.d.ts +23 -0
  751. package/dist/theme/presets/retro.d.ts.map +1 -0
  752. package/dist/theme/shadows.d.ts +61 -0
  753. package/dist/theme/shadows.d.ts.map +1 -0
  754. package/dist/theme/typography.d.ts +24 -0
  755. package/dist/theme/typography.d.ts.map +1 -0
  756. package/dist/theme/utils/color.d.ts +295 -0
  757. package/dist/theme/utils/color.d.ts.map +1 -0
  758. package/dist/theme/utils/index.d.ts +7 -0
  759. package/dist/theme/utils/index.d.ts.map +1 -0
  760. package/dist/{registry-DQcIzW2s.d.ts → types/blocks.d.ts} +30 -191
  761. package/dist/types/blocks.d.ts.map +1 -0
  762. package/dist/{components-BCGZ-Rwt.d.ts → types/components.d.ts} +17 -20
  763. package/dist/types/components.d.ts.map +1 -0
  764. package/dist/{config-Pct0n_Kq.d.ts → types/config.d.ts} +14 -16
  765. package/dist/types/config.d.ts.map +1 -0
  766. package/dist/types/index.d.ts +13 -7
  767. package/dist/types/index.d.ts.map +1 -0
  768. package/dist/types/index.js +1 -2
  769. package/dist/types/registry.d.ts +158 -0
  770. package/dist/types/registry.d.ts.map +1 -0
  771. package/dist/{theme-B4Q3Bg5o.d.ts → types/theme.d.ts} +31 -34
  772. package/dist/types/theme.d.ts.map +1 -0
  773. package/dist/utils/async-lock.d.ts +169 -0
  774. package/dist/utils/async-lock.d.ts.map +1 -0
  775. package/dist/utils/cn.d.ts +80 -0
  776. package/dist/utils/cn.d.ts.map +1 -0
  777. package/dist/utils/cookies.d.ts +68 -0
  778. package/dist/utils/cookies.d.ts.map +1 -0
  779. package/dist/utils/create-classes.d.ts +90 -0
  780. package/dist/utils/create-classes.d.ts.map +1 -0
  781. package/dist/utils/errors.d.ts +201 -0
  782. package/dist/utils/errors.d.ts.map +1 -0
  783. package/dist/utils/fetch-interceptor.d.ts +230 -0
  784. package/dist/utils/fetch-interceptor.d.ts.map +1 -0
  785. package/dist/utils/font.d.ts +65 -0
  786. package/dist/utils/font.d.ts.map +1 -0
  787. package/dist/utils/format-crypto.d.ts +312 -0
  788. package/dist/utils/format-crypto.d.ts.map +1 -0
  789. package/dist/utils/format-date.d.ts +240 -0
  790. package/dist/utils/format-date.d.ts.map +1 -0
  791. package/dist/utils/format-number.d.ts +245 -0
  792. package/dist/utils/format-number.d.ts.map +1 -0
  793. package/dist/utils/i18n-text.d.ts +68 -0
  794. package/dist/utils/i18n-text.d.ts.map +1 -0
  795. package/dist/utils/index.d.ts +30 -0
  796. package/dist/utils/index.d.ts.map +1 -0
  797. package/dist/utils/jwt.d.ts +227 -0
  798. package/dist/utils/jwt.d.ts.map +1 -0
  799. package/dist/utils/object.d.ts +96 -0
  800. package/dist/utils/object.d.ts.map +1 -0
  801. package/dist/utils/refs.d.ts +60 -0
  802. package/dist/utils/refs.d.ts.map +1 -0
  803. package/dist/utils/rtl.d.ts +75 -0
  804. package/dist/utils/rtl.d.ts.map +1 -0
  805. package/dist/utils/storage.d.ts +190 -0
  806. package/dist/utils/storage.d.ts.map +1 -0
  807. package/dist/utils/string.d.ts +216 -0
  808. package/dist/utils/string.d.ts.map +1 -0
  809. package/dist/utils/template-resolver.d.ts +12 -0
  810. package/dist/utils/template-resolver.d.ts.map +1 -0
  811. package/dist/utils/toast.d.ts +25 -0
  812. package/dist/utils/toast.d.ts.map +1 -0
  813. package/dist/utils/transform-number.d.ts +108 -0
  814. package/dist/utils/transform-number.d.ts.map +1 -0
  815. package/dist/utils/url.d.ts +198 -0
  816. package/dist/utils/url.d.ts.map +1 -0
  817. package/package.json +69 -59
  818. package/dist/chunk-2FYNRDXR.js.map +0 -1
  819. package/dist/chunk-77KIJLPP.js +0 -37
  820. package/dist/chunk-77KIJLPP.js.map +0 -1
  821. package/dist/chunk-A2Z7NVGL.js.map +0 -1
  822. package/dist/chunk-BV32OJ2A.js.map +0 -1
  823. package/dist/chunk-DDY7TLUI.js.map +0 -1
  824. package/dist/chunk-HO2GKTWJ.js.map +0 -1
  825. package/dist/chunk-IZOIO7PA.js.map +0 -1
  826. package/dist/chunk-JDTC2SBY.js.map +0 -1
  827. package/dist/chunk-KTCWPGON.js.map +0 -1
  828. package/dist/chunk-MEFT6XPH.js.map +0 -1
  829. package/dist/chunk-SNKGGHBT.js.map +0 -1
  830. package/dist/chunk-VAAIHNWQ.js.map +0 -1
  831. package/dist/chunk-XQXGE2PW.js +0 -16793
  832. package/dist/chunk-XQXGE2PW.js.map +0 -1
  833. package/dist/chunk-XWL6J6IO.js.map +0 -1
  834. package/dist/chunk-XXP3ZGU6.js.map +0 -1
  835. package/dist/chunk-YJMAQL3S.js.map +0 -1
  836. package/dist/index-nmJ8Muwg.d.ts +0 -2368
  837. package/dist/settings-CAC0qFjS.d.ts +0 -455
  838. package/dist/text-transform-D6MzzF7V.d.ts +0 -165
  839. package/dist/use-timeout-D7U3EAtH.d.ts +0 -808
@@ -1,8 +1,8 @@
1
- import { PRESET_NAMES, PRESET_DISPLAY_NAMES } from './chunk-MEFT6XPH.js';
2
- import { SearchInput } from './chunk-KTCWPGON.js';
3
- import { useBoolean } from './chunk-HO2GKTWJ.js';
4
- import { useSettingsStore } from './chunk-DDY7TLUI.js';
5
- import { forwardRef, useMemo, useState, useCallback, createContext, lazy, useTransition, useRef, useEffect, useId, Children, Fragment as Fragment$1, useContext, isValidElement, Component, Suspense } from 'react';
1
+ import { PRESET_NAMES, PRESET_DISPLAY_NAMES } from './chunk-ZTATTUH7.js';
2
+ import { SearchInput } from './chunk-OBJ244BO.js';
3
+ import { useBoolean } from './chunk-BRDWQVRT.js';
4
+ import { useSettingsStore } from './chunk-XIXSSI3B.js';
5
+ import { createContext, lazy, forwardRef, useEffect, useMemo, useCallback, useState, useTransition, useRef, Fragment as Fragment$1, useId, Children, useContext, isValidElement, Suspense, useLayoutEffect } from 'react';
6
6
  import Stack from '@mui/material/Stack';
7
7
  import TextField2 from '@mui/material/TextField';
8
8
  import Chip from '@mui/material/Chip';
@@ -14,7 +14,7 @@ import Badge from '@mui/material/Badge';
14
14
  import { styled, alpha, useTheme } from '@mui/material/styles';
15
15
  import dayjs from 'dayjs';
16
16
  import InputAdornment from '@mui/material/InputAdornment';
17
- import IconButton3 from '@mui/material/IconButton';
17
+ import IconButton4 from '@mui/material/IconButton';
18
18
  import Dialog from '@mui/material/Dialog';
19
19
  import DialogTitle from '@mui/material/DialogTitle';
20
20
  import DialogActions from '@mui/material/DialogActions';
@@ -34,16 +34,18 @@ import TableSortLabel from '@mui/material/TableSortLabel';
34
34
  import TablePagination from '@mui/material/TablePagination';
35
35
  import Paper from '@mui/material/Paper';
36
36
  import Checkbox from '@mui/material/Checkbox';
37
- import Skeleton from '@mui/material/Skeleton';
37
+ import Skeleton3 from '@mui/material/Skeleton';
38
38
  import Autocomplete from '@mui/material/Autocomplete';
39
39
  import { LazyMotion, domMax, useMotionValue, useAnimationFrame, useTransform, useMotionTemplate, m } from 'framer-motion';
40
40
  import MuiAvatar from '@mui/material/Avatar';
41
41
  import AvatarGroup from '@mui/material/AvatarGroup';
42
- import MuiCard from '@mui/material/Card';
42
+ import Card2 from '@mui/material/Card';
43
43
  import CardHeader from '@mui/material/CardHeader';
44
44
  import CardContent from '@mui/material/CardContent';
45
45
  import CardActions from '@mui/material/CardActions';
46
46
  import DialogContentText from '@mui/material/DialogContentText';
47
+ import CardActionArea from '@mui/material/CardActionArea';
48
+ import Tooltip2 from '@mui/material/Tooltip';
47
49
  import Grid from '@mui/material/Grid';
48
50
  import Portal from '@mui/material/Portal';
49
51
  import MuiLinearProgress from '@mui/material/LinearProgress';
@@ -65,16 +67,14 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
65
67
  import MuiMenu from '@mui/material/Menu';
66
68
  import ListItemIcon from '@mui/material/ListItemIcon';
67
69
  import NProgress from 'nprogress';
68
- import Collapse from '@mui/material/Collapse';
69
- import ContentCopyIcon from '@mui/icons-material/ContentCopy';
70
70
  import Drawer from '@mui/material/Drawer';
71
- import Tooltip from '@mui/material/Tooltip';
72
71
  import Switch from '@mui/material/Switch';
73
72
  import Slider from '@mui/material/Slider';
74
73
  import ToggleButton from '@mui/material/ToggleButton';
75
74
  import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
76
75
  import FormControlLabel from '@mui/material/FormControlLabel';
77
76
  import AlertTitle from '@mui/material/AlertTitle';
77
+ import { useForkRef } from '@mui/material/utils';
78
78
  import MuiBreadcrumbs from '@mui/material/Breadcrumbs';
79
79
  import Link from '@mui/material/Link';
80
80
  import SvgIcon from '@mui/material/SvgIcon';
@@ -95,13 +95,20 @@ import PlayArrowIcon from '@mui/icons-material/PlayArrow';
95
95
  import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
96
96
  import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
97
97
  import ButtonBase from '@mui/material/ButtonBase';
98
+ import Collapse from '@mui/material/Collapse';
98
99
  import Popover from '@mui/material/Popover';
99
100
  import ReactMarkdown from 'react-markdown';
100
101
  import rehypeRaw from 'rehype-raw';
102
+ import rehypeSanitize, { defaultSchema } from 'rehype-sanitize';
101
103
  import rehypeHighlight from 'rehype-highlight';
102
104
  import remarkGfm from 'remark-gfm';
103
105
  import TurndownService from 'turndown';
104
106
  import Select from '@mui/material/Select';
107
+ import 'maplibre-gl/dist/maplibre-gl.css';
108
+ import { Map as Map$1, NavigationControl, ScaleControl, Marker, Popup, Source, Layer } from 'react-map-gl/maplibre';
109
+ import { addProtocol } from 'maplibre-gl';
110
+ import { Protocol } from 'pmtiles';
111
+ import { Stack as Stack$1, Box, Paper as Paper$1, Typography, CircularProgress as CircularProgress$1 } from '@mui/material';
105
112
 
106
113
  function DateRangePicker({
107
114
  open,
@@ -129,7 +136,7 @@ function DateRangePicker({
129
136
  const txTitle = translations?.title ?? title ?? "Select date range";
130
137
  const txStart = translations?.startDate ?? "Start date";
131
138
  const txEnd = translations?.endDate ?? "End date";
132
- const txErrorRange = translations?.errorRange ?? "End date must be later than start date";
139
+ const txErrorRange = translations?.errorRange ?? "End date cannot be earlier than start date";
133
140
  const txCancel = translations?.cancel ?? "Cancel";
134
141
  const txApply = translations?.apply ?? "Apply";
135
142
  const mdUp = useMediaQuery((theme) => theme.breakpoints.up("md"));
@@ -277,6 +284,7 @@ function DateRangeInput({
277
284
  const txPlaceholder = translations?.placeholder ?? "Select dates...";
278
285
  const txFrom = translations?.from ?? "From";
279
286
  const txTo = translations?.to ?? "To";
287
+ const txClear = translations?.clear ?? "Clear date range";
280
288
  const displayLabel = useMemo(
281
289
  () => formatLabel(startDate, endDate, txFrom, txTo),
282
290
  [startDate, endDate, txFrom, txTo]
@@ -317,7 +325,7 @@ function DateRangeInput({
317
325
  sx: { cursor: "pointer" },
318
326
  startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", sx: { color: "text.disabled" }, children: /* @__PURE__ */ jsx(CalendarIcon, {}) }),
319
327
  ...hasValue && {
320
- endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(IconButton3, { size: "small", onClick: handleClear, sx: { p: 0.25 }, children: /* @__PURE__ */ jsx(ClearIcon, {}) }) })
328
+ endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(IconButton4, { size: "small", onClick: handleClear, "aria-label": txClear, sx: { p: 0.25 }, children: /* @__PURE__ */ jsx(ClearIcon, {}) }) })
321
329
  }
322
330
  },
323
331
  inputLabel: { shrink: true }
@@ -413,6 +421,12 @@ function FilterToolbar({
413
421
  });
414
422
  }
415
423
  }, [debouncedSearch, searchFilter?.key, onChange, values]);
424
+ const searchValue = values[searchFilter?.key ?? "search"] ?? "";
425
+ useEffect(() => {
426
+ if (searchValue === prevDebouncedRef.current) return;
427
+ prevDebouncedRef.current = searchValue;
428
+ setLocalSearch(searchValue);
429
+ }, [searchValue]);
416
430
  const activeCount = useMemo(
417
431
  () => filters.filter((f) => f.type !== "search" && isFilterActive(f, values[f.key])).length,
418
432
  [filters, values]
@@ -476,7 +490,7 @@ function FilterToolbar({
476
490
  size: "small",
477
491
  value: values[key] ?? "",
478
492
  onChange: (e) => handleChange(key, e.target.value),
479
- slotProps: { select: { displayEmpty: true } },
493
+ slotProps: { select: { displayEmpty: true, "aria-label": label } },
480
494
  sx: {
481
495
  minWidth: width ?? 150,
482
496
  "& .MuiOutlinedInput-root": { borderRadius: 1 },
@@ -504,6 +518,10 @@ function FilterToolbar({
504
518
  select: {
505
519
  multiple: true,
506
520
  displayEmpty: true,
521
+ // Same reason as the single select above: the label lives in
522
+ // `renderValue` as placeholder text, leaving the control
523
+ // without an accessible name.
524
+ "aria-label": label,
507
525
  renderValue: (selected) => {
508
526
  const sel = selected;
509
527
  if (sel.length === 0) {
@@ -708,7 +726,11 @@ var StyledTableRow = styled(TableRow)(({ theme }) => ({
708
726
  transition: theme.transitions.create("background-color", {
709
727
  duration: theme.transitions.duration.shortest
710
728
  }),
711
- "&:nth-of-type(even)": {
729
+ // `:nth-child(even)` for zebra-striping — table rows are homogeneous
730
+ // siblings, so child-position is equivalent to of-type but doesn't
731
+ // assume the rendered tag never changes (e.g. a row replaced by a
732
+ // skeleton placeholder still alternates correctly).
733
+ "&:nth-child(even)": {
712
734
  backgroundColor: alpha(theme.palette.grey[500], 0.02)
713
735
  },
714
736
  "&:hover": {
@@ -745,6 +767,7 @@ function AdminDataTable({
745
767
  data,
746
768
  total,
747
769
  loading = false,
770
+ loadingRows = 5,
748
771
  page,
749
772
  pageSize,
750
773
  onPageChange,
@@ -753,12 +776,17 @@ function AdminDataTable({
753
776
  sortOrder = "asc",
754
777
  onSort,
755
778
  emptyMessage = "No data found",
779
+ loadError = null,
780
+ loadErrorLabels,
756
781
  rowKey,
757
782
  onRowClick,
783
+ rowSx,
784
+ renderExpanded,
758
785
  pageSizeOptions = [10, 25, 50, 100],
759
786
  stickyHeader = false,
760
787
  dense = false,
761
788
  maxHeight,
789
+ paginationLabels,
762
790
  sx,
763
791
  selectable = false,
764
792
  selectedKeys,
@@ -770,9 +798,14 @@ function AdminDataTable({
770
798
  if (rowKey) return rowKey(row);
771
799
  const record = row;
772
800
  if (record["id"] !== void 0) return String(record["id"]);
801
+ if (selectable && process.env["NODE_ENV"] !== "production") {
802
+ console.error(
803
+ "[AdminDataTable] `selectable` is on but rows have no stable key: pass `rowKey`, or give each row an `id`. Index-based keys make the selection positional, so sorting or paging silently re-targets it."
804
+ );
805
+ }
773
806
  return String(index);
774
807
  },
775
- [rowKey]
808
+ [rowKey, selectable]
776
809
  );
777
810
  const selection = selectedKeys ?? EMPTY_SELECTION;
778
811
  const pageRowKeys = useMemo(
@@ -820,11 +853,12 @@ function AdminDataTable({
820
853
  },
821
854
  [onPageSizeChange, onPageChange]
822
855
  );
856
+ const skeletonRowCount = Math.max(1, Math.min(pageSize, loadingRows));
823
857
  const skeletonRows = useMemo(
824
- () => Array.from({ length: pageSize }, (_, i) => /* @__PURE__ */ jsxs(TableRow, { children: [
825
- selectable && /* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: /* @__PURE__ */ jsx(Skeleton, { variant: "rectangular", width: 18, height: 18, sx: { borderRadius: 0.5 } }) }),
858
+ () => Array.from({ length: skeletonRowCount }, (_, i) => /* @__PURE__ */ jsxs(TableRow, { children: [
859
+ selectable && /* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: /* @__PURE__ */ jsx(Skeleton3, { variant: "rectangular", width: 18, height: 18, sx: { borderRadius: 0.5 } }) }),
826
860
  columns.map((col) => /* @__PURE__ */ jsx(TableCell, { align: col.align ?? "left", children: /* @__PURE__ */ jsx(
827
- Skeleton,
861
+ Skeleton3,
828
862
  {
829
863
  variant: "text",
830
864
  width: col.align === "right" ? "60%" : "80%",
@@ -835,7 +869,7 @@ function AdminDataTable({
835
869
  }
836
870
  ) }, col.key))
837
871
  ] }, `skeleton-${i}`)),
838
- [pageSize, columns, selectable]
872
+ [skeletonRowCount, columns, selectable]
839
873
  );
840
874
  const showBulkBar = selectable && selection.size > 0 && !!bulkActions;
841
875
  if (!loading && data.length === 0) {
@@ -856,15 +890,41 @@ function AdminDataTable({
856
890
  },
857
891
  children: [
858
892
  /* @__PURE__ */ jsx(EmptyIcon, {}),
859
- /* @__PURE__ */ jsx(Typography5, { variant: "body2", sx: {
860
- color: "text.disabled"
861
- }, children: emptyMessage })
893
+ /* @__PURE__ */ jsx(
894
+ Typography5,
895
+ {
896
+ variant: "body2",
897
+ sx: { color: loadError ? "text.secondary" : "text.disabled" },
898
+ children: loadError ? loadErrorLabels?.empty ?? "Could not load this data" : emptyMessage
899
+ }
900
+ ),
901
+ loadError && /* @__PURE__ */ jsx(Typography5, { variant: "caption", sx: { color: "text.disabled", maxWidth: 420, textAlign: "center" }, children: loadError })
862
902
  ]
863
903
  }
864
904
  )
865
905
  ] });
866
906
  }
867
907
  return /* @__PURE__ */ jsxs(StyledTableContainer, { sx: { maxHeight, ...sx }, children: [
908
+ loadError && /* @__PURE__ */ jsxs(
909
+ Box20,
910
+ {
911
+ role: "status",
912
+ sx: {
913
+ display: "flex",
914
+ alignItems: "center",
915
+ gap: 1,
916
+ px: 2,
917
+ py: 1,
918
+ borderBottom: 1,
919
+ borderColor: "divider",
920
+ bgcolor: (theme) => alpha(theme.palette.warning.main, 0.12)
921
+ },
922
+ children: [
923
+ /* @__PURE__ */ jsx(Typography5, { variant: "body2", sx: { color: "warning.dark", fontWeight: 600 }, children: loadErrorLabels?.partial ?? "Some of this data could not be loaded" }),
924
+ /* @__PURE__ */ jsx(Typography5, { variant: "caption", sx: { color: "text.secondary" }, children: loadError })
925
+ ]
926
+ }
927
+ ),
868
928
  showBulkBar && /* @__PURE__ */ jsxs(
869
929
  Stack,
870
930
  {
@@ -926,13 +986,16 @@ function AdminDataTable({
926
986
  /* @__PURE__ */ jsx(TableBody, { children: loading ? skeletonRows : data.map((row, index) => {
927
987
  const key = getRowKey(row, index);
928
988
  const isSelected = selectable && selection.has(key);
929
- return /* @__PURE__ */ jsxs(
989
+ const body = /* @__PURE__ */ jsxs(
930
990
  StyledTableRow,
931
991
  {
932
992
  hover: true,
933
993
  selected: isSelected,
934
994
  onClick: onRowClick ? () => onRowClick(row) : void 0,
935
- sx: { cursor: onRowClick ? "pointer" : "default" },
995
+ sx: {
996
+ cursor: onRowClick ? "pointer" : "default",
997
+ ...rowSx?.(row, index)
998
+ },
936
999
  children: [
937
1000
  selectable && /* @__PURE__ */ jsx(
938
1001
  TableCell,
@@ -957,6 +1020,19 @@ function AdminDataTable({
957
1020
  },
958
1021
  key
959
1022
  );
1023
+ const detail = renderExpanded?.(row, index);
1024
+ if (detail == null) return body;
1025
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
1026
+ body,
1027
+ /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(
1028
+ TableCell,
1029
+ {
1030
+ colSpan: columns.length + (selectable ? 1 : 0),
1031
+ sx: { py: 0, borderBottom: 0 },
1032
+ children: detail
1033
+ }
1034
+ ) })
1035
+ ] }, `${key}-group`);
960
1036
  }) })
961
1037
  ] }) }),
962
1038
  /* @__PURE__ */ jsx(
@@ -969,6 +1045,8 @@ function AdminDataTable({
969
1045
  rowsPerPageOptions: pageSizeOptions,
970
1046
  onPageChange: handlePageChange,
971
1047
  onRowsPerPageChange: handlePageSizeChange,
1048
+ ...paginationLabels?.rowsPerPage != null && { labelRowsPerPage: paginationLabels.rowsPerPage },
1049
+ ...paginationLabels?.displayedRows != null && { labelDisplayedRows: paginationLabels.displayedRows },
972
1050
  sx: {
973
1051
  borderTop: (theme) => `1px solid ${theme.palette.divider}`,
974
1052
  "& .MuiTablePagination-displayedRows": {
@@ -1011,41 +1089,166 @@ var DEFAULT_COLOR_MAP = {
1011
1089
  new: "info",
1012
1090
  open: "info"
1013
1091
  };
1014
- function StatusChip({ status, colorMap, size = "small", sx }) {
1092
+ function StatusChip({ status, label, colorMap, size = "small", sx, ref, ...other }) {
1015
1093
  const normalizedStatus = status.toLowerCase();
1016
1094
  const mergedMap = colorMap ? { ...DEFAULT_COLOR_MAP, ...colorMap } : DEFAULT_COLOR_MAP;
1017
- const color = mergedMap[normalizedStatus] ?? "default";
1018
- const displayLabel = status.charAt(0).toUpperCase() + status.slice(1).toLowerCase();
1095
+ const mapped = Object.hasOwn(mergedMap, normalizedStatus) ? mergedMap[normalizedStatus] : void 0;
1096
+ const color = mapped ?? "default";
1097
+ const displayLabel = label ?? status.charAt(0).toUpperCase() + status.slice(1).toLowerCase();
1019
1098
  return /* @__PURE__ */ jsx(
1020
1099
  Chip,
1021
1100
  {
1101
+ ref,
1102
+ ...other,
1022
1103
  label: displayLabel,
1023
1104
  size,
1024
- sx: {
1025
- height: size === "small" ? 22 : 28,
1026
- fontSize: size === "small" ? "0.7rem" : "0.775rem",
1027
- fontWeight: 600,
1028
- borderRadius: 0.75,
1029
- letterSpacing: "0.01em",
1030
- ...color !== "default" && {
1031
- color: (theme) => theme.palette[color].main,
1032
- bgcolor: (theme) => alpha(theme.palette[color].main, 0.1),
1033
- border: (theme) => `1px solid ${alpha(theme.palette[color].main, 0.2)}`
1034
- },
1035
- ...color === "default" && {
1036
- color: "text.secondary",
1037
- bgcolor: (theme) => alpha(theme.palette.grey[500], 0.08),
1038
- border: (theme) => `1px solid ${alpha(theme.palette.grey[500], 0.16)}`
1105
+ sx: [
1106
+ {
1107
+ height: size === "small" ? 22 : 28,
1108
+ fontSize: size === "small" ? "0.7rem" : "0.775rem",
1109
+ fontWeight: 600,
1110
+ borderRadius: 0.75,
1111
+ letterSpacing: "0.01em",
1112
+ ...color !== "default" && {
1113
+ color: (theme) => theme.palette[color].main,
1114
+ bgcolor: (theme) => alpha(theme.palette[color].main, 0.1),
1115
+ border: (theme) => `1px solid ${alpha(theme.palette[color].main, 0.2)}`
1116
+ },
1117
+ ...color === "default" && {
1118
+ color: "text.secondary",
1119
+ bgcolor: (theme) => alpha(theme.palette.grey[500], 0.08),
1120
+ border: (theme) => `1px solid ${alpha(theme.palette.grey[500], 0.16)}`
1121
+ }
1039
1122
  },
1040
- ...sx
1041
- }
1123
+ ...Array.isArray(sx) ? sx : sx ? [sx] : []
1124
+ ]
1042
1125
  }
1043
1126
  );
1044
1127
  }
1128
+
1129
+ // src/utils/format-crypto.ts
1130
+ var COIN_DISPLAY_DECIMALS = Object.freeze(
1131
+ // Prototype-free: a plain literal answers `COIN_DISPLAY_DECIMALS['constructor']`
1132
+ // with a function, which `?? FALLBACK_DECIMALS` accepts as a precision. That
1133
+ // produced `toFixed(NaN)` — silently formatting with zero decimals instead
1134
+ // of eight, for any coin code that collides with an Object.prototype key.
1135
+ Object.assign(/* @__PURE__ */ Object.create(null), { btc: 8, xmr: 8 })
1136
+ );
1137
+ var COIN_WIRE_DECIMALS = Object.freeze(
1138
+ Object.assign(/* @__PURE__ */ Object.create(null), { btc: 8, xmr: 12 })
1139
+ );
1140
+ var FALLBACK_DECIMALS = 8;
1141
+ var FALLBACK_WIRE_DECIMALS = 12;
1142
+ var DECIMAL = /^([+-]?)(\d*)(?:\.(\d*))?$/;
1143
+ function getCoinDecimals(coin) {
1144
+ const decimals = COIN_DISPLAY_DECIMALS[coin.toLowerCase()];
1145
+ return typeof decimals === "number" ? decimals : FALLBACK_DECIMALS;
1146
+ }
1147
+ function getCoinWireDecimals(coin) {
1148
+ const decimals = COIN_WIRE_DECIMALS[coin.toLowerCase()];
1149
+ return typeof decimals === "number" ? decimals : FALLBACK_WIRE_DECIMALS;
1150
+ }
1151
+ function formatDecimalString(raw, decimals, rounding = "down") {
1152
+ const scaled = toScaledInteger(raw, decimals, rounding);
1153
+ return scaled === null ? null : fromScaledInteger(scaled, decimals);
1154
+ }
1155
+ function toScaledInteger(raw, decimals, rounding = "half-up") {
1156
+ const match = DECIMAL.exec(raw.trim());
1157
+ if (!match) return null;
1158
+ const [, sign = "", intPart = "", fracPart = ""] = match;
1159
+ if (intPart === "" && fracPart === "") return null;
1160
+ const digits = `${intPart || "0"}${fracPart.slice(0, decimals).padEnd(decimals, "0")}`;
1161
+ const roundUp = rounding === "half-up" && (fracPart[decimals] ?? "0") >= "5";
1162
+ const magnitude = BigInt(digits) + (roundUp ? 1n : 0n);
1163
+ return sign === "-" ? -magnitude : magnitude;
1164
+ }
1165
+ function fromScaledInteger(scaled, decimals) {
1166
+ const negative = scaled < 0n;
1167
+ const asString = (negative ? -scaled : scaled).toString().padStart(decimals + 1, "0");
1168
+ const whole = asString.slice(0, asString.length - decimals) || "0";
1169
+ const fraction = decimals > 0 ? asString.slice(asString.length - decimals) : "";
1170
+ const magnitude = decimals > 0 ? `${whole}.${fraction}` : whole;
1171
+ return `${negative && scaled !== 0n ? "-" : ""}${magnitude}`;
1172
+ }
1173
+ function isNonZeroDecimal(raw) {
1174
+ const match = DECIMAL.exec(raw.trim());
1175
+ if (!match) return false;
1176
+ const [, , intPart = "", fracPart = ""] = match;
1177
+ if (intPart === "" && fracPart === "") return false;
1178
+ return /[1-9]/.test(intPart) || /[1-9]/.test(fracPart);
1179
+ }
1180
+ function sumDecimalStrings(values, decimals, options) {
1181
+ const rounding = options?.rounding ?? "half-up";
1182
+ let total = 0n;
1183
+ for (const value of values) {
1184
+ if (value === null || value === void 0 || value === "") continue;
1185
+ const scaled = toScaledInteger(
1186
+ typeof value === "number" ? String(value) : value,
1187
+ decimals,
1188
+ rounding
1189
+ );
1190
+ if (scaled !== null) total += scaled;
1191
+ }
1192
+ return fromScaledInteger(total, decimals);
1193
+ }
1194
+ function subtractDecimalStrings(minuend, subtrahends, decimals, options) {
1195
+ if (minuend === null || minuend === void 0 || minuend === "") return null;
1196
+ const rounding = options?.rounding ?? "half-up";
1197
+ let total = toScaledInteger(
1198
+ typeof minuend === "number" ? String(minuend) : minuend,
1199
+ decimals,
1200
+ rounding
1201
+ );
1202
+ if (total === null) return null;
1203
+ for (const value of subtrahends) {
1204
+ if (value === null || value === void 0 || value === "") continue;
1205
+ const scaled = toScaledInteger(
1206
+ typeof value === "number" ? String(value) : value,
1207
+ decimals,
1208
+ rounding
1209
+ );
1210
+ if (scaled !== null) total -= scaled;
1211
+ }
1212
+ if (options?.clampAtZero && total < 0n) total = 0n;
1213
+ return fromScaledInteger(total, decimals);
1214
+ }
1215
+ function formatCoinAmount(value, coin, options) {
1216
+ const code = coin.toLowerCase();
1217
+ const symbol = options?.symbol ?? coin.toUpperCase();
1218
+ const withSymbol = options?.withSymbol !== false;
1219
+ const decimals = Math.max(0, options?.precision ?? getCoinDecimals(code));
1220
+ const trim = options?.trim === true;
1221
+ const rounding = options?.rounding ?? "down";
1222
+ const markDust = options?.markDust !== false;
1223
+ const raw = typeof value === "string" ? value.trim() : typeof value === "number" && Number.isFinite(value) ? String(Object.is(value, -0) ? 0 : value) : "";
1224
+ let formatted = raw === "" ? null : formatDecimalString(raw, decimals, rounding);
1225
+ const exact = formatted !== null;
1226
+ if (formatted === null) {
1227
+ let n = typeof value === "number" ? value : Number(raw);
1228
+ if (!Number.isFinite(n)) n = 0;
1229
+ if (Object.is(n, -0)) n = 0;
1230
+ formatted = n.toFixed(decimals);
1231
+ }
1232
+ if (markDust && exact && !/[1-9]/.test(formatted) && isNonZeroDecimal(raw)) {
1233
+ const epsilon = fromScaledInteger(1n, decimals);
1234
+ const below = raw.startsWith("-");
1235
+ return withSymbol ? `${below ? ">" : "<"} ${below ? "-" : ""}${epsilon} ${symbol}` : `${below ? ">" : "<"} ${below ? "-" : ""}${epsilon}`;
1236
+ }
1237
+ if (trim && formatted.includes(".")) {
1238
+ formatted = formatted.replace(/\.?0+$/, "");
1239
+ if (formatted === "" || formatted === "-") formatted = "0";
1240
+ }
1241
+ return withSymbol ? `${formatted} ${symbol}` : formatted;
1242
+ }
1243
+ function formatCoinAmountList(totals, options) {
1244
+ const sep = options?.separator ?? " \xB7 ";
1245
+ return Object.keys(totals).sort().map((coin) => formatCoinAmount(totals[coin], coin, options)).join(sep);
1246
+ }
1045
1247
  function formatAmount(amount, decimals) {
1046
1248
  const num = parseFloat(amount);
1047
1249
  if (Number.isNaN(num)) return amount;
1048
- const fixed = decimals !== void 0 ? num.toFixed(decimals) : amount;
1250
+ const scaled = decimals !== void 0 ? formatDecimalString(amount, decimals) : null;
1251
+ const fixed = scaled ?? (decimals !== void 0 ? num.toFixed(decimals) : amount);
1049
1252
  const [intPart, decPart] = fixed.split(".");
1050
1253
  const absInt = intPart.replace("-", "");
1051
1254
  const formatted = absInt.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
@@ -1772,7 +1975,7 @@ function AvatarWrapper({
1772
1975
  badge && /* @__PURE__ */ jsx("span", { style: badgeStyle, children: badge })
1773
1976
  ] });
1774
1977
  }
1775
- var Avatar = forwardRef(function Avatar2({ size = "md", shape = "circular", name, src, alt, online, offline, badge, badgeColor, children, sx, ...other }, ref) {
1978
+ function Avatar({ size = "md", shape = "circular", name, src, alt, online, offline, badge, badgeColor, children, sx, ref, ...other }) {
1776
1979
  const initials = useMemo(() => {
1777
1980
  if (children) return null;
1778
1981
  return name ? getInitials(name) : null;
@@ -1789,7 +1992,7 @@ var Avatar = forwardRef(function Avatar2({ size = "md", shape = "circular", name
1789
1992
  };
1790
1993
  const avatarContent = /* @__PURE__ */ jsx(StyledAvatar, { ref, src, alt: alt || name, ownerState, sx, ...other, children: children || initials });
1791
1994
  return /* @__PURE__ */ jsx(AvatarWrapper, { online, offline, badge, badgeColor, size, children: avatarContent });
1792
- });
1995
+ }
1793
1996
  function CustomAvatarGroup({ avatars, size = "sm", max = 4, sx, ...other }) {
1794
1997
  return /* @__PURE__ */ jsx(AvatarGroup, { max, sx, ...other, children: avatars.map((avatar, index) => /* @__PURE__ */ jsx(Avatar, { name: avatar.name, src: avatar.src, alt: avatar.alt || avatar.name, size }, index)) });
1795
1998
  }
@@ -1859,7 +2062,7 @@ var StyledBadge = styled(Badge, {
1859
2062
  }
1860
2063
  };
1861
2064
  });
1862
- var Badge2 = forwardRef(function Badge3({ variant = "standard", color = "error", size = "medium", badgeContent, children, sx, ...other }, ref) {
2065
+ function Badge2({ variant = "standard", color = "error", size = "medium", badgeContent, children, sx, ref, ...other }) {
1863
2066
  const ownerState = { variant, color, size };
1864
2067
  const isStatusVariant = variant === "online" || variant === "offline" || variant === "busy";
1865
2068
  const isDotVariant = variant === "dot" || isStatusVariant;
@@ -1875,14 +2078,16 @@ var Badge2 = forwardRef(function Badge3({ variant = "standard", color = "error",
1875
2078
  children
1876
2079
  }
1877
2080
  );
1878
- });
2081
+ }
1879
2082
  function CountBadge({
1880
2083
  count,
1881
2084
  max = 99,
1882
2085
  showZero = false,
1883
2086
  color = "error",
1884
2087
  size = "medium",
1885
- sx
2088
+ sx,
2089
+ ref,
2090
+ ...other
1886
2091
  }) {
1887
2092
  if (!showZero && count === 0) {
1888
2093
  return null;
@@ -1908,25 +2113,29 @@ function CountBadge({
1908
2113
  Box20,
1909
2114
  {
1910
2115
  component: "span",
1911
- sx: {
1912
- display: "inline-flex",
1913
- alignItems: "center",
1914
- justifyContent: "center",
1915
- minWidth,
1916
- height,
1917
- padding: "0 4px",
1918
- borderRadius: height / 2,
1919
- fontSize,
1920
- fontWeight: 600,
1921
- backgroundColor: bgColor,
1922
- color: "white",
1923
- ...sx
1924
- },
2116
+ ref,
2117
+ ...other,
2118
+ sx: [
2119
+ {
2120
+ display: "inline-flex",
2121
+ alignItems: "center",
2122
+ justifyContent: "center",
2123
+ minWidth,
2124
+ height,
2125
+ padding: "0 4px",
2126
+ borderRadius: height / 2,
2127
+ fontSize,
2128
+ fontWeight: 600,
2129
+ backgroundColor: bgColor,
2130
+ color: "white"
2131
+ },
2132
+ ...Array.isArray(sx) ? sx : sx ? [sx] : []
2133
+ ],
1925
2134
  children: displayCount
1926
2135
  }
1927
2136
  );
1928
2137
  }
1929
- function StatusDot({ status, size = 8, pulse = true, sx }) {
2138
+ function StatusDot({ status, size = 8, pulse = true, sx, ref, ...other }) {
1930
2139
  const statusColors = {
1931
2140
  online: "#22c55e",
1932
2141
  offline: "#9ca3af",
@@ -1938,21 +2147,25 @@ function StatusDot({ status, size = 8, pulse = true, sx }) {
1938
2147
  Box20,
1939
2148
  {
1940
2149
  component: "span",
1941
- sx: {
1942
- display: "inline-block",
1943
- width: size,
1944
- height: size,
1945
- borderRadius: "50%",
1946
- backgroundColor: color,
1947
- ...pulse && status === "online" && {
1948
- animation: "pulse 2s infinite"
2150
+ ref,
2151
+ ...other,
2152
+ sx: [
2153
+ {
2154
+ display: "inline-block",
2155
+ width: size,
2156
+ height: size,
2157
+ borderRadius: "50%",
2158
+ backgroundColor: color,
2159
+ ...pulse && status === "online" && {
2160
+ animation: "pulse 2s infinite"
2161
+ }
1949
2162
  },
1950
- ...sx
1951
- }
2163
+ ...Array.isArray(sx) ? sx : sx ? [sx] : []
2164
+ ]
1952
2165
  }
1953
2166
  );
1954
2167
  }
1955
- var StyledCard = styled(MuiCard, {
2168
+ var StyledCard = styled(Card2, {
1956
2169
  shouldForwardProp: (prop) => prop !== "ownerState"
1957
2170
  })(({ theme, ownerState }) => {
1958
2171
  const { variant } = ownerState;
@@ -1971,7 +2184,7 @@ var StyledCard = styled(MuiCard, {
1971
2184
  }
1972
2185
  };
1973
2186
  });
1974
- var Card = forwardRef(function Card2({
2187
+ function Card({
1975
2188
  variant = "elevation",
1976
2189
  title,
1977
2190
  subheader,
@@ -1983,8 +2196,9 @@ var Card = forwardRef(function Card2({
1983
2196
  disablePadding,
1984
2197
  children,
1985
2198
  sx,
2199
+ ref,
1986
2200
  ...other
1987
- }, ref) {
2201
+ }) {
1988
2202
  const ownerState = { variant };
1989
2203
  const hasHeader = title || subheader || headerAction;
1990
2204
  return /* @__PURE__ */ jsxs(
@@ -2011,7 +2225,7 @@ var Card = forwardRef(function Card2({
2011
2225
  ]
2012
2226
  }
2013
2227
  );
2014
- });
2228
+ }
2015
2229
  function CardSection({ title, description, children, sx }) {
2016
2230
  return /* @__PURE__ */ jsxs(Box20, { sx: { mb: 3, ...sx }, children: [
2017
2231
  title && /* @__PURE__ */ jsx(
@@ -2055,8 +2269,8 @@ function StatCard({
2055
2269
  const isNegative = change && change < 0;
2056
2270
  return /* @__PURE__ */ jsx(Card, { variant, contentSx: { p: 2, "&:last-child": { pb: 2 } }, sx, ...other, children: /* @__PURE__ */ jsxs(Box20, { sx: { display: "flex", justifyContent: "space-between", alignItems: "flex-start" }, children: [
2057
2271
  /* @__PURE__ */ jsx(Box20, { children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
2058
- /* @__PURE__ */ jsx(Skeleton, { width: 80, height: 16 }),
2059
- /* @__PURE__ */ jsx(Skeleton, { width: 50, height: 32, sx: { mt: 0.5 } })
2272
+ /* @__PURE__ */ jsx(Skeleton3, { width: 80, height: 16 }),
2273
+ /* @__PURE__ */ jsx(Skeleton3, { width: 50, height: 32, sx: { mt: 0.5 } })
2060
2274
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2061
2275
  /* @__PURE__ */ jsx(
2062
2276
  Typography5,
@@ -2123,18 +2337,21 @@ function ConfirmDialog({
2123
2337
  }) {
2124
2338
  const titleId = useId();
2125
2339
  const descriptionId = useId();
2340
+ const [confirming, setConfirming] = useState(false);
2341
+ const busy = loading || confirming;
2126
2342
  const handleConfirm = () => {
2343
+ if (busy) return;
2127
2344
  const result = onConfirm();
2128
- if (result instanceof Promise) {
2129
- result.catch(() => {
2130
- });
2131
- }
2345
+ if (!(result instanceof Promise)) return;
2346
+ setConfirming(true);
2347
+ result.catch(() => {
2348
+ }).finally(() => setConfirming(false));
2132
2349
  };
2133
2350
  return /* @__PURE__ */ jsxs(
2134
2351
  Dialog,
2135
2352
  {
2136
2353
  open,
2137
- onClose: loading ? void 0 : onClose,
2354
+ onClose: busy ? void 0 : onClose,
2138
2355
  maxWidth,
2139
2356
  fullWidth: true,
2140
2357
  "aria-labelledby": titleId,
@@ -2144,8 +2361,8 @@ function ConfirmDialog({
2144
2361
  /* @__PURE__ */ jsx(DialogTitle, { id: titleId, children: title }),
2145
2362
  content && /* @__PURE__ */ jsx(DialogContent, { children: typeof content === "string" ? /* @__PURE__ */ jsx(DialogContentText, { id: descriptionId, children: content }) : /* @__PURE__ */ jsx("div", { id: descriptionId, children: content }) }),
2146
2363
  /* @__PURE__ */ jsxs(DialogActions, { sx: { px: 3, pb: 2 }, children: [
2147
- /* @__PURE__ */ jsx(Button, { onClick: onClose, color: "inherit", disabled: loading, variant: "outlined", children: cancelLabel }),
2148
- /* @__PURE__ */ jsx(Button, { onClick: handleConfirm, color: confirmColor, variant: "contained", loading, disabled, children: confirmLabel })
2364
+ /* @__PURE__ */ jsx(Button, { onClick: onClose, color: "inherit", disabled: busy, variant: "outlined", children: cancelLabel }),
2365
+ /* @__PURE__ */ jsx(Button, { onClick: handleConfirm, color: confirmColor, variant: "contained", loading: busy, disabled, children: confirmLabel })
2149
2366
  ] })
2150
2367
  ]
2151
2368
  }
@@ -2163,184 +2380,85 @@ function DeleteDialog({ itemName, content, ...props }) {
2163
2380
  }
2164
2381
  );
2165
2382
  }
2166
- function IconWrapper({ icon, color = "primary.main", size = 64 }) {
2167
- return /* @__PURE__ */ jsx(
2168
- Box20,
2169
- {
2170
- sx: {
2171
- width: size,
2172
- height: size,
2173
- borderRadius: "50%",
2174
- display: "flex",
2175
- alignItems: "center",
2176
- justifyContent: "center",
2177
- bgcolor: (theme) => {
2178
- const parts = color.split(".");
2179
- let resolved = theme.palette;
2180
- for (const part of parts) {
2181
- resolved = resolved?.[part];
2182
- }
2183
- return typeof resolved === "string" ? alpha(resolved, 0.08) : alpha(theme.palette.primary.main, 0.08);
2184
- }
2185
- },
2186
- children: icon
2187
- }
2188
- );
2189
- }
2190
- function EmptyContent({
2191
- illustration,
2383
+
2384
+ // src/components/sponsored-slot/types.ts
2385
+ var DEFAULT_SPONSORED_SLOT_LABELS = {
2386
+ sponsored: "Sponsored"
2387
+ };
2388
+ var TILE_IMAGE = { width: "100%", aspectRatio: "4 / 3" };
2389
+ var BANNER_IMAGE = { width: 160, minHeight: 120, flexShrink: 0 };
2390
+ function SponsoredSlot({
2391
+ content,
2392
+ variant = "tile",
2393
+ loading = false,
2394
+ labels: labelsProp,
2192
2395
  icon,
2193
- iconColor = "primary.main",
2194
- iconSize = 64,
2195
- title = "No data",
2196
- description,
2197
- action,
2198
- actions,
2199
- maxWidth = 400,
2200
- filled = false,
2201
- sx,
2202
- illustrationSx,
2203
- slotProps,
2204
- compact = false
2396
+ link,
2397
+ onOpen,
2398
+ id
2205
2399
  }) {
2206
- const visual = icon ? /* @__PURE__ */ jsx(IconWrapper, { icon, color: iconColor, size: iconSize }) : illustration ? /* @__PURE__ */ jsx(Box20, { sx: illustrationSx, children: illustration }) : null;
2207
- const allActions = [...actions ?? [], ...action ? [action] : []];
2208
- return /* @__PURE__ */ jsx(
2209
- Stack,
2210
- {
2211
- sx: {
2212
- alignItems: "center",
2213
- justifyContent: "center",
2214
- textAlign: "center",
2215
- py: compact ? 4 : 8,
2216
- px: 2,
2217
- // Default non-compact behavior: vertically center inside the
2218
- // available "main content" area. Two complementary anchors:
2219
- // * `flex: 1, alignSelf: 'stretch'` — when the parent IS a
2220
- // flex column with explicit height (DashboardLayout main,
2221
- // full-height page wrappers), EmptyContent grows to fill
2222
- // the column and the inner `justifyContent: center` puts
2223
- // the message in the middle of that column.
2224
- // * `minHeight: calc(100vh - 240px)` — fallback for the
2225
- // common case where the page wrapper is just a content-
2226
- // sized `<Stack>` or `<Box>`. 240px is the typical
2227
- // vertical chrome (header ~64 + breadcrumbs ~60 + page
2228
- // padding ~80 + a small margin), so this leaves enough
2229
- // space below the breadcrumbs for the message to sit at
2230
- // the optical center of the visible viewport.
2231
- //
2232
- // `compact` keeps the inline-sized behavior for callers that
2233
- // drop EmptyContent inside a card cell or sidebar.
2234
- // `filled` is the explicit "fill my parent" mode and shares
2235
- // the same fallback so the visual is consistent.
2236
- ...!compact && {
2237
- flex: 1,
2238
- alignSelf: "stretch",
2239
- minHeight: "calc(100vh - 240px)"
2240
- },
2241
- ...filled && { height: "100%" },
2242
- ...sx
2243
- },
2244
- children: /* @__PURE__ */ jsxs(
2245
- Box20,
2246
- {
2247
- sx: {
2248
- maxWidth,
2249
- display: "flex",
2250
- flexDirection: "column",
2251
- alignItems: "center",
2252
- gap: compact ? 1.5 : 2.5
2253
- },
2254
- children: [
2255
- visual,
2256
- /* @__PURE__ */ jsxs(Stack, { spacing: 0.5, sx: {
2257
- alignItems: "center"
2258
- }, children: [
2259
- title && /* @__PURE__ */ jsx(
2260
- Typography5,
2261
- {
2262
- variant: compact ? "subtitle1" : "h6",
2263
- sx: {
2264
- color: "text.secondary",
2265
- fontWeight: 600,
2266
- ...slotProps?.title
2267
- },
2268
- children: title
2269
- }
2270
- ),
2271
- description && /* @__PURE__ */ jsx(
2272
- Typography5,
2273
- {
2274
- variant: "body2",
2275
- sx: {
2276
- color: "text.disabled",
2277
- lineHeight: 1.6,
2278
- ...slotProps?.description
2279
- },
2280
- children: description
2281
- }
2282
- )
2283
- ] }),
2284
- allActions.length > 0 && /* @__PURE__ */ jsx(
2285
- Stack,
2286
- {
2287
- direction: "row",
2288
- spacing: 1,
2289
- sx: { mt: compact ? 0.5 : 1, flexWrap: "wrap", justifyContent: "center", ...slotProps?.actions },
2290
- children: allActions.map((a, i) => /* @__PURE__ */ jsx(Box20, { children: a }, i))
2291
- }
2292
- )
2293
- ]
2294
- }
2295
- )
2296
- }
2297
- );
2298
- }
2299
- function SearchEmptyContent({
2300
- query,
2301
- ...props
2302
- }) {
2303
- return /* @__PURE__ */ jsx(
2304
- EmptyContent,
2400
+ const labels = { ...DEFAULT_SPONSORED_SLOT_LABELS, ...labelsProp };
2401
+ const banner = variant === "banner";
2402
+ const imageBox = banner ? BANNER_IMAGE : TILE_IMAGE;
2403
+ if (!content) {
2404
+ if (!loading) return null;
2405
+ return /* @__PURE__ */ jsx(Card2, { variant: "outlined", sx: { height: "100%" }, "data-sponsored-pending": "", children: /* @__PURE__ */ jsxs(Box20, { sx: { display: "flex", flexDirection: banner ? "row" : "column", height: "100%" }, children: [
2406
+ /* @__PURE__ */ jsx(Skeleton3, { variant: "rectangular", sx: { ...imageBox, height: banner ? void 0 : "auto" } }),
2407
+ /* @__PURE__ */ jsxs(Box20, { sx: { p: 1.5, flex: 1 }, children: [
2408
+ /* @__PURE__ */ jsx(Skeleton3, { width: "40%" }),
2409
+ /* @__PURE__ */ jsx(Skeleton3, { width: "80%" })
2410
+ ] })
2411
+ ] }) });
2412
+ }
2413
+ const mark = /* @__PURE__ */ jsxs(
2414
+ Box20,
2305
2415
  {
2306
- title: "No results found",
2307
- description: query ? `Your search for "${query}" did not match any results.` : "Try adjusting your search criteria.",
2308
- ...props
2416
+ component: "span",
2417
+ sx: { display: "inline-flex", alignItems: "center", gap: 0.5, color: "text.secondary", typography: "caption" },
2418
+ children: [
2419
+ icon,
2420
+ content.byline || labels.sponsored
2421
+ ]
2309
2422
  }
2310
2423
  );
2311
- }
2312
- function LoadingEmptyContent({ ...props }) {
2313
- return /* @__PURE__ */ jsx(
2314
- EmptyContent,
2315
- {
2316
- title: "Loading...",
2317
- illustration: /* @__PURE__ */ jsx(
2318
- Box20,
2319
- {
2320
- sx: {
2321
- width: 64,
2322
- height: 64,
2323
- borderRadius: "50%",
2324
- border: "3px solid",
2325
- borderColor: "divider",
2326
- borderTopColor: "primary.main",
2327
- animation: "spin 1s linear infinite",
2328
- "@keyframes spin": {
2329
- from: { transform: "rotate(0deg)" },
2330
- to: { transform: "rotate(360deg)" }
2331
- }
2332
- }
2424
+ const body = /* @__PURE__ */ jsxs(Box20, { sx: { display: "flex", flexDirection: banner ? "row" : "column", height: "100%" }, children: [
2425
+ content.image && /* @__PURE__ */ jsx(
2426
+ Box20,
2427
+ {
2428
+ component: "img",
2429
+ src: content.image,
2430
+ alt: "",
2431
+ loading: "lazy",
2432
+ decoding: "async",
2433
+ sx: {
2434
+ display: "block",
2435
+ objectFit: content.imageFit ?? "cover",
2436
+ ...content.imageFit === "contain" && { p: 2, boxSizing: "border-box" },
2437
+ bgcolor: "action.hover",
2438
+ ...imageBox
2333
2439
  }
2334
- ),
2335
- compact: true,
2336
- ...props
2337
- }
2338
- );
2440
+ }
2441
+ ),
2442
+ /* @__PURE__ */ jsxs(Box20, { sx: { p: 1.5, display: "flex", flexDirection: "column", gap: 0.5, minWidth: 0 }, children: [
2443
+ content.because ? /* @__PURE__ */ jsx(Tooltip2, { title: content.because, children: mark }) : mark,
2444
+ /* @__PURE__ */ jsx(Typography5, { variant: "subtitle2", sx: { fontWeight: 600 }, noWrap: !banner, children: content.title }),
2445
+ content.body && /* @__PURE__ */ jsx(Typography5, { variant: "body2", sx: { color: "text.secondary" }, children: content.body }),
2446
+ link && content.cta && /* @__PURE__ */ jsx(Typography5, { variant: "caption", sx: { color: "primary.main", fontWeight: 600, mt: "auto" }, children: content.cta })
2447
+ ] })
2448
+ ] });
2449
+ return /* @__PURE__ */ jsx(Card2, { variant: "outlined", sx: { height: "100%" }, ...id !== void 0 && { "data-sponsored": id }, children: link ? /* @__PURE__ */ jsx(CardActionArea, { component: link.component, ...link.props, onClick: onOpen, sx: { height: "100%" }, children: body }) : body });
2339
2450
  }
2340
2451
  var PAGE_GAP = 3;
2341
2452
  var GRID_GAP = 3;
2342
- var PageContent = forwardRef(
2343
- ({ children, gap = PAGE_GAP, fill, sx, ...rest }, ref) => /* @__PURE__ */ jsx(
2453
+ function PageContent({
2454
+ children,
2455
+ gap = PAGE_GAP,
2456
+ fill,
2457
+ sx,
2458
+ ref,
2459
+ ...rest
2460
+ }) {
2461
+ return /* @__PURE__ */ jsx(
2344
2462
  Stack,
2345
2463
  {
2346
2464
  ref,
@@ -2349,9 +2467,8 @@ var PageContent = forwardRef(
2349
2467
  ...rest,
2350
2468
  children
2351
2469
  }
2352
- )
2353
- );
2354
- PageContent.displayName = "PageContent";
2470
+ );
2471
+ }
2355
2472
  var COLUMN_SIZE = {
2356
2473
  1: { xs: 12, md: 12 },
2357
2474
  2: { xs: 12, md: 6 },
@@ -2450,7 +2567,7 @@ var FallbackBox = styled(Box20)(({ theme }) => ({
2450
2567
  justifyContent: "center",
2451
2568
  color: theme.palette.text.disabled
2452
2569
  }));
2453
- var Image = forwardRef(function Image2({
2570
+ function Image({
2454
2571
  src,
2455
2572
  alt,
2456
2573
  ratio,
@@ -2464,8 +2581,9 @@ var Image = forwardRef(function Image2({
2464
2581
  imgSx,
2465
2582
  onLoad,
2466
2583
  onError,
2584
+ ref,
2467
2585
  ...imgProps
2468
- }, ref) {
2586
+ }) {
2469
2587
  const [isLoaded, setIsLoaded] = useState(false);
2470
2588
  const [hasError, setHasError] = useState(false);
2471
2589
  const [currentSrc, setCurrentSrc] = useState(src);
@@ -2511,7 +2629,7 @@ var Image = forwardRef(function Image2({
2511
2629
  ),
2512
2630
  overlay && /* @__PURE__ */ jsx(OverlayBox, { children: overlay })
2513
2631
  ] });
2514
- });
2632
+ }
2515
2633
  function DefaultImageIcon() {
2516
2634
  return /* @__PURE__ */ jsx(Box20, { component: "svg", viewBox: "0 0 24 24", sx: { width: 48, height: 48, opacity: 0.5 }, children: /* @__PURE__ */ jsx(
2517
2635
  "path",
@@ -2591,7 +2709,17 @@ var StyledLabel = styled("span", {
2591
2709
  ...variantStyles[variant]
2592
2710
  };
2593
2711
  });
2594
- var Label = forwardRef(function Label2({ children, color = "default", variant = "soft", startIcon, endIcon, sx, disabled, ...other }, ref) {
2712
+ function Label({
2713
+ children,
2714
+ color = "default",
2715
+ variant = "soft",
2716
+ startIcon,
2717
+ endIcon,
2718
+ sx,
2719
+ disabled,
2720
+ ref,
2721
+ ...other
2722
+ }) {
2595
2723
  const ownerState = {
2596
2724
  color,
2597
2725
  variant,
@@ -2608,7 +2736,7 @@ var Label = forwardRef(function Label2({ children, color = "default", variant =
2608
2736
  children,
2609
2737
  endIcon && /* @__PURE__ */ jsx(Box20, { sx: { ml: 0.5, ...iconStyles }, children: endIcon })
2610
2738
  ] });
2611
- });
2739
+ }
2612
2740
  function StatusLabel({
2613
2741
  status,
2614
2742
  ...props
@@ -2631,6 +2759,155 @@ function BooleanLabel({
2631
2759
  }) {
2632
2760
  return /* @__PURE__ */ jsx(Label, { color: value ? "success" : "error", ...props, children: value ? trueText : falseText });
2633
2761
  }
2762
+ var MINUTE = 6e4;
2763
+ var HOUR = 60 * MINUTE;
2764
+ var DAY = 24 * HOUR;
2765
+ function deadlineUrgency(leftMs, urgentWithinMs = HOUR, soonWithinMs = DAY) {
2766
+ if (leftMs <= 0) return "overdue";
2767
+ if (leftMs < urgentWithinMs) return "urgent";
2768
+ if (leftMs < soonWithinMs) return "soon";
2769
+ return "later";
2770
+ }
2771
+ function relativeTimeLeft(leftMs, locale) {
2772
+ const words = new Intl.RelativeTimeFormat(locale, { numeric: "always", style: "short" });
2773
+ const size = Math.abs(leftMs);
2774
+ const sign = leftMs < 0 ? -1 : 1;
2775
+ if (size < HOUR) return words.format(sign * Math.max(1, Math.round(size / MINUTE)), "minute");
2776
+ if (size < 2 * DAY) return words.format(sign * Math.round(size / HOUR), "hour");
2777
+ return words.format(sign * Math.round(size / DAY), "day");
2778
+ }
2779
+ var LOOK = {
2780
+ overdue: { color: "error", variant: "filled" },
2781
+ urgent: { color: "error", variant: "soft" },
2782
+ soon: { color: "warning", variant: "soft" },
2783
+ later: { color: "default", variant: "soft" }
2784
+ };
2785
+ function DeadlineChip({
2786
+ deadline,
2787
+ locale,
2788
+ overdueLabel,
2789
+ urgentWithinMs,
2790
+ soonWithinMs,
2791
+ now = Date.now,
2792
+ sx
2793
+ }) {
2794
+ const [at, setAt] = useState(now);
2795
+ useEffect(() => {
2796
+ const tick = setInterval(() => setAt(now()), 3e4);
2797
+ return () => clearInterval(tick);
2798
+ }, [now]);
2799
+ const due = new Date(deadline).getTime();
2800
+ if (Number.isNaN(due)) return null;
2801
+ const left = due - at;
2802
+ const urgency = deadlineUrgency(left, urgentWithinMs, soonWithinMs);
2803
+ const look = LOOK[urgency];
2804
+ const text = urgency === "overdue" && overdueLabel ? overdueLabel : relativeTimeLeft(left, locale);
2805
+ const exact = new Intl.DateTimeFormat(locale, { dateStyle: "medium", timeStyle: "short" }).format(due);
2806
+ return /* @__PURE__ */ jsx(
2807
+ Label,
2808
+ {
2809
+ color: look.color,
2810
+ variant: look.variant,
2811
+ "data-urgency": urgency,
2812
+ sx: [{ fontVariantNumeric: "tabular-nums" }, ...Array.isArray(sx) ? sx : [sx]],
2813
+ children: /* @__PURE__ */ jsx("time", { dateTime: new Date(due).toISOString(), title: exact, children: text })
2814
+ }
2815
+ );
2816
+ }
2817
+ var DEFAULT_ITEM_WIDTH = { xs: "78%", sm: "46%", md: "31%", lg: "23.5%" };
2818
+ function Chevron({ direction }) {
2819
+ return /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true", children: /* @__PURE__ */ jsx("polyline", { points: direction === "left" ? "15 6 9 12 15 18" : "9 6 15 12 9 18" }) });
2820
+ }
2821
+ function Rail({
2822
+ children,
2823
+ "aria-label": ariaLabel,
2824
+ itemWidth = DEFAULT_ITEM_WIDTH,
2825
+ gap = 2,
2826
+ labels,
2827
+ sx
2828
+ }) {
2829
+ const track = useRef(null);
2830
+ const [reach, setReach] = useState({ back: false, forward: false });
2831
+ const measure = useCallback(() => {
2832
+ const el = track.current;
2833
+ if (!el) return;
2834
+ const max = el.scrollWidth - el.clientWidth;
2835
+ setReach({ back: el.scrollLeft > 1, forward: el.scrollLeft < max - 1 });
2836
+ }, []);
2837
+ useEffect(() => {
2838
+ measure();
2839
+ const el = track.current;
2840
+ if (!el || typeof ResizeObserver === "undefined") return void 0;
2841
+ const observer = new ResizeObserver(measure);
2842
+ observer.observe(el);
2843
+ return () => observer.disconnect();
2844
+ }, [measure]);
2845
+ const page = (direction) => {
2846
+ const el = track.current;
2847
+ if (el) el.scrollBy({ left: direction * el.clientWidth * 0.9, behavior: "smooth" });
2848
+ };
2849
+ const arrow = (direction, show, label) => show ? /* @__PURE__ */ jsx(
2850
+ IconButton4,
2851
+ {
2852
+ size: "small",
2853
+ "aria-label": label,
2854
+ onClick: () => page(direction),
2855
+ sx: {
2856
+ position: "absolute",
2857
+ top: "50%",
2858
+ transform: "translateY(-50%)",
2859
+ [direction === 1 ? "right" : "left"]: -8,
2860
+ zIndex: 1,
2861
+ bgcolor: "background.paper",
2862
+ boxShadow: 2,
2863
+ "&:hover": { bgcolor: "background.paper" },
2864
+ "@media (hover: none)": { display: "none" }
2865
+ },
2866
+ children: /* @__PURE__ */ jsx(Chevron, { direction: direction === 1 ? "right" : "left" })
2867
+ }
2868
+ ) : null;
2869
+ return /* @__PURE__ */ jsxs(
2870
+ Box20,
2871
+ {
2872
+ component: "section",
2873
+ "aria-label": ariaLabel,
2874
+ "data-testid": "prism-rail",
2875
+ sx: [{ position: "relative" }, ...Array.isArray(sx) ? sx : [sx]],
2876
+ children: [
2877
+ arrow(-1, reach.back, labels?.previous ?? "Previous"),
2878
+ /* @__PURE__ */ jsx(
2879
+ Box20,
2880
+ {
2881
+ component: "ul",
2882
+ ref: track,
2883
+ tabIndex: 0,
2884
+ onScroll: measure,
2885
+ sx: {
2886
+ display: "grid",
2887
+ gridAutoFlow: "column",
2888
+ gridAutoColumns: itemWidth,
2889
+ gap,
2890
+ m: 0,
2891
+ p: 0,
2892
+ listStyle: "none",
2893
+ overflowX: "auto",
2894
+ overscrollBehaviorX: "contain",
2895
+ scrollSnapType: "x mandatory",
2896
+ scrollbarWidth: "none",
2897
+ "&::-webkit-scrollbar": { display: "none" },
2898
+ "&:focus-visible": { outline: "2px solid", outlineColor: "primary.main", outlineOffset: 2 }
2899
+ },
2900
+ children: Children.map(
2901
+ children,
2902
+ (child) => child == null || child === false ? null : /* @__PURE__ */ jsx(Box20, { component: "li", sx: { scrollSnapAlign: "start", minWidth: 0 }, children: child })
2903
+ )
2904
+ }
2905
+ ),
2906
+ arrow(1, reach.forward, labels?.next ?? "Next")
2907
+ ]
2908
+ }
2909
+ );
2910
+ }
2634
2911
  var LoadingContent = styled("div")(({ theme }) => ({
2635
2912
  flexGrow: 1,
2636
2913
  width: "100%",
@@ -2934,7 +3211,7 @@ var ScrollbarRoot = styled(Box20, {
2934
3211
  }
2935
3212
  };
2936
3213
  });
2937
- var Scrollbar = forwardRef(function Scrollbar2({ children, sx, fillContent = false, hideScrollbar = false, axis = "y", maxHeight, minHeight, className, ...other }, ref) {
3214
+ function Scrollbar({ children, sx, fillContent = false, hideScrollbar = false, axis = "y", maxHeight, minHeight, className, ref, ...other }) {
2938
3215
  const ownerState = {
2939
3216
  fillContent,
2940
3217
  hideScrollbar,
@@ -2957,7 +3234,7 @@ var Scrollbar = forwardRef(function Scrollbar2({ children, sx, fillContent = fal
2957
3234
  children
2958
3235
  }
2959
3236
  );
2960
- });
3237
+ }
2961
3238
  var SnackbarContext = createContext(null);
2962
3239
  function useSnackbar() {
2963
3240
  const context = useContext(SnackbarContext);
@@ -3061,7 +3338,7 @@ function SnackbarProvider({
3061
3338
  severity: state.severity,
3062
3339
  variant: "filled",
3063
3340
  onClose: handleClose,
3064
- action: state.action || /* @__PURE__ */ jsx(IconButton3, { size: "small", "aria-label": "close", color: "inherit", onClick: close, children: /* @__PURE__ */ jsx(CloseIcon3, { fontSize: "small" }) }),
3341
+ action: state.action || /* @__PURE__ */ jsx(IconButton4, { size: "small", "aria-label": "close", color: "inherit", onClick: close, children: /* @__PURE__ */ jsx(CloseIcon3, { fontSize: "small" }) }),
3065
3342
  sx: { width: "100%", alignItems: "center" },
3066
3343
  children: state.message
3067
3344
  }
@@ -3091,7 +3368,7 @@ var SvgRoot = styled("span")(() => ({
3091
3368
  display: "inline-flex",
3092
3369
  backgroundColor: "currentColor"
3093
3370
  }));
3094
- var SvgColor = forwardRef(function SvgColor2({ src, color, size = 24, width, height, className, sx }, ref) {
3371
+ function SvgColor({ src, color, size = 24, width, height, className, sx, ref }) {
3095
3372
  const computedWidth = width ?? size;
3096
3373
  const computedHeight = height ?? size;
3097
3374
  return /* @__PURE__ */ jsx(
@@ -3111,7 +3388,7 @@ var SvgColor = forwardRef(function SvgColor2({ src, color, size = 24, width, hei
3111
3388
  ]
3112
3389
  }
3113
3390
  );
3114
- });
3391
+ }
3115
3392
  function createIconComponent(basePath) {
3116
3393
  function Icon({ name, ...props }) {
3117
3394
  return /* @__PURE__ */ jsx(SvgColor, { src: `${basePath}/${name}.svg`, ...props });
@@ -3141,7 +3418,7 @@ var StyledTableRow2 = styled(TableRow)(({ theme }) => ({
3141
3418
  }
3142
3419
  }
3143
3420
  }));
3144
- function TableInner({
3421
+ function Table({
3145
3422
  columns,
3146
3423
  data,
3147
3424
  rowKey = "id",
@@ -3161,14 +3438,16 @@ function TableInner({
3161
3438
  rowsPerPageOptions = [5, 10, 25, 50],
3162
3439
  emptyContent,
3163
3440
  loading = false,
3441
+ loadingRows = 5,
3164
3442
  dense = false,
3165
3443
  stickyHeader = false,
3166
3444
  maxHeight,
3167
3445
  onRowClick,
3168
3446
  containerSx,
3169
3447
  sx,
3448
+ ref,
3170
3449
  ...other
3171
- }, ref) {
3450
+ }) {
3172
3451
  const getRowKey = useCallback(
3173
3452
  (row, index) => {
3174
3453
  if (typeof rowKey === "function") {
@@ -3267,34 +3546,40 @@ function TableInner({
3267
3546
  String(column.id)
3268
3547
  ))
3269
3548
  ] }) }),
3270
- /* @__PURE__ */ jsx(TableBody, { children: displayData.map((row, index) => {
3271
- const key = getRowKey(row, index);
3272
- const isSelected = selected.includes(key);
3273
- return /* @__PURE__ */ jsxs(
3274
- StyledTableRow2,
3275
- {
3276
- hover: true,
3277
- selected: isSelected,
3278
- onClick: () => onRowClick?.(row, index),
3279
- sx: { cursor: onRowClick ? "pointer" : "default" },
3280
- children: [
3281
- selectable && /* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: /* @__PURE__ */ jsx(
3282
- Checkbox,
3283
- {
3284
- checked: isSelected,
3285
- onClick: (e) => e.stopPropagation(),
3286
- onChange: () => handleSelectRow(key)
3287
- }
3288
- ) }),
3289
- columns.map((column) => {
3290
- const value = row[column.id];
3291
- return /* @__PURE__ */ jsx(TableCell, { align: column.align || "left", children: column.render ? column.render(row, index) : column.format ? column.format(value) : String(value ?? "") }, String(column.id));
3292
- })
3293
- ]
3294
- },
3295
- key
3296
- );
3297
- }) })
3549
+ /* @__PURE__ */ jsxs(TableBody, { children: [
3550
+ loading && Array.from({ length: Math.max(1, loadingRows) }, (_, rowIndex) => /* @__PURE__ */ jsxs(TableRow, { children: [
3551
+ selectable && /* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: /* @__PURE__ */ jsx(Skeleton3, { variant: "rectangular", width: 18, height: 18 }) }),
3552
+ columns.map((column) => /* @__PURE__ */ jsx(TableCell, { align: column.align || "left", children: /* @__PURE__ */ jsx(Skeleton3, { variant: "text", width: column.width ?? "80%" }) }, String(column.id)))
3553
+ ] }, `loading-${rowIndex}`)),
3554
+ !loading && displayData.map((row, index) => {
3555
+ const key = getRowKey(row, index);
3556
+ const isSelected = selected.includes(key);
3557
+ return /* @__PURE__ */ jsxs(
3558
+ StyledTableRow2,
3559
+ {
3560
+ hover: true,
3561
+ selected: isSelected,
3562
+ onClick: () => onRowClick?.(row, index),
3563
+ sx: { cursor: onRowClick ? "pointer" : "default" },
3564
+ children: [
3565
+ selectable && /* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: /* @__PURE__ */ jsx(
3566
+ Checkbox,
3567
+ {
3568
+ checked: isSelected,
3569
+ onClick: (e) => e.stopPropagation(),
3570
+ onChange: () => handleSelectRow(key)
3571
+ }
3572
+ ) }),
3573
+ columns.map((column) => {
3574
+ const value = row[column.id];
3575
+ return /* @__PURE__ */ jsx(TableCell, { align: column.align || "left", children: column.render ? column.render(row, index) : column.format ? column.format(value) : String(value ?? "") }, String(column.id));
3576
+ })
3577
+ ]
3578
+ },
3579
+ key
3580
+ );
3581
+ })
3582
+ ] })
3298
3583
  ] }),
3299
3584
  paginated && /* @__PURE__ */ jsx(
3300
3585
  TablePagination,
@@ -3312,7 +3597,6 @@ function TableInner({
3312
3597
  }
3313
3598
  );
3314
3599
  }
3315
- var Table = forwardRef(TableInner);
3316
3600
  function useTable({
3317
3601
  data,
3318
3602
  defaultPage = 0,
@@ -3367,26 +3651,26 @@ function useTable({
3367
3651
  reset
3368
3652
  };
3369
3653
  }
3370
- function Skeleton3({ variant = "text", ...props }) {
3371
- return /* @__PURE__ */ jsx(Skeleton, { variant, ...props });
3654
+ function Skeleton5({ variant = "text", ...props }) {
3655
+ return /* @__PURE__ */ jsx(Skeleton3, { variant, ...props });
3372
3656
  }
3373
3657
  function CardSkeleton({ hasAvatar = true, lines = 2, width = "100%" }) {
3374
3658
  return /* @__PURE__ */ jsxs(Box20, { sx: { width, p: 2 }, children: [
3375
3659
  hasAvatar && /* @__PURE__ */ jsxs(Box20, { sx: { display: "flex", alignItems: "center", mb: 2 }, children: [
3376
- /* @__PURE__ */ jsx(Skeleton3, { variant: "circular", width: 40, height: 40 }),
3660
+ /* @__PURE__ */ jsx(Skeleton5, { variant: "circular", width: 40, height: 40 }),
3377
3661
  /* @__PURE__ */ jsxs(Box20, { sx: { ml: 1, flex: 1 }, children: [
3378
- /* @__PURE__ */ jsx(Skeleton3, { variant: "text", width: "60%" }),
3379
- /* @__PURE__ */ jsx(Skeleton3, { variant: "text", width: "40%" })
3662
+ /* @__PURE__ */ jsx(Skeleton5, { variant: "text", width: "60%" }),
3663
+ /* @__PURE__ */ jsx(Skeleton5, { variant: "text", width: "40%" })
3380
3664
  ] })
3381
3665
  ] }),
3382
- /* @__PURE__ */ jsx(Skeleton3, { variant: "rectangular", width: "100%", height: 118, sx: { borderRadius: 1 } }),
3383
- /* @__PURE__ */ jsx(Box20, { sx: { mt: 1 }, children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ jsx(Skeleton3, { variant: "text", width: i === lines - 1 ? "80%" : "100%" }, i)) })
3666
+ /* @__PURE__ */ jsx(Skeleton5, { variant: "rectangular", width: "100%", height: 118, sx: { borderRadius: 1 } }),
3667
+ /* @__PURE__ */ jsx(Box20, { sx: { mt: 1 }, children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ jsx(Skeleton5, { variant: "text", width: i === lines - 1 ? "80%" : "100%" }, i)) })
3384
3668
  ] });
3385
3669
  }
3386
3670
  function TableSkeleton({ rows = 5, columns = 4, hasHeader = true }) {
3387
3671
  return /* @__PURE__ */ jsxs(Box20, { sx: { width: "100%" }, children: [
3388
- hasHeader && /* @__PURE__ */ jsx(Box20, { sx: { display: "flex", gap: 2, mb: 1, pb: 1, borderBottom: 1, borderColor: "divider" }, children: Array.from({ length: columns }, (_, i) => /* @__PURE__ */ jsx(Skeleton3, { variant: "text", sx: { flex: 1 }, height: 24 }, i)) }),
3389
- Array.from({ length: rows }, (_row, rowIndex) => /* @__PURE__ */ jsx(Box20, { sx: { display: "flex", gap: 2, py: 1 }, children: Array.from({ length: columns }, (_col, colIndex) => /* @__PURE__ */ jsx(Skeleton3, { variant: "text", sx: { flex: 1 } }, colIndex)) }, rowIndex))
3672
+ hasHeader && /* @__PURE__ */ jsx(Box20, { sx: { display: "flex", gap: 2, mb: 1, pb: 1, borderBottom: 1, borderColor: "divider" }, children: Array.from({ length: columns }, (_, i) => /* @__PURE__ */ jsx(Skeleton5, { variant: "text", sx: { flex: 1 }, height: 24 }, i)) }),
3673
+ Array.from({ length: rows }, (_row, rowIndex) => /* @__PURE__ */ jsx(Box20, { sx: { display: "flex", gap: 2, py: 1 }, children: Array.from({ length: columns }, (_col, colIndex) => /* @__PURE__ */ jsx(Skeleton5, { variant: "text", sx: { flex: 1 } }, colIndex)) }, rowIndex))
3390
3674
  ] });
3391
3675
  }
3392
3676
  function LinearProgress3({
@@ -4431,304 +4715,29 @@ function useProgressBar(pathname, search, delay) {
4431
4715
  window.addEventListener("popstate", handlePopState);
4432
4716
  return () => {
4433
4717
  document.removeEventListener("click", handleClick);
4434
- window.removeEventListener("popstate", handlePopState);
4435
- };
4436
- }, []);
4437
- useEffect(() => {
4438
- const timeout = setTimeout(() => NProgress.done(), delay);
4439
- return () => clearTimeout(timeout);
4440
- }, [pathname, search, delay]);
4441
- }
4442
- function NavigationProgress({ pathname, search = "", delay = 100 }) {
4443
- useEffect(() => {
4444
- NProgress.configure({ showSpinner: false });
4445
- return () => {
4446
- NProgress.done();
4447
- };
4448
- }, []);
4449
- useProgressBar(pathname, search, delay);
4450
- return /* @__PURE__ */ jsx("style", { children: STYLES });
4451
- }
4452
- function ScrollToTop({ pathname }) {
4453
- useEffect(() => {
4454
- window.scrollTo(0, 0);
4455
- }, [pathname]);
4456
- return null;
4457
- }
4458
- function parseStackFrame(line) {
4459
- const patterns = [
4460
- // Named function with file: at functionName (file:line:col)
4461
- /at\s+(?:async\s+)?([^\s(]+)\s+\((.+?):(\d+):(\d+)\)/,
4462
- // Anonymous at file: at file:line:col
4463
- /at\s+(.+?):(\d+):(\d+)/,
4464
- // Webpack/Vite transformed: at Module.functionName (file?xxx:line:col)
4465
- /at\s+(?:async\s+)?(?:Module\.)?([^\s(]+)\s+\((.+?)\?[^:]*:(\d+):(\d+)\)/
4466
- ];
4467
- for (const pattern of patterns) {
4468
- const match = line.match(pattern);
4469
- if (match) {
4470
- const [, funcOrFile, file, lineStr, colStr] = match;
4471
- const hasFile = file !== void 0;
4472
- const functionName = hasFile ? funcOrFile : null;
4473
- const filePath = hasFile ? file : funcOrFile;
4474
- const lineNumber = parseInt(hasFile ? lineStr : file, 10);
4475
- const columnNumber = parseInt(hasFile ? colStr : lineStr, 10);
4476
- const isAppCode = filePath.includes("/src/") || filePath.includes("src/") && !filePath.includes("node_modules");
4477
- return {
4478
- functionName: functionName || null,
4479
- filePath: cleanFilePath(filePath),
4480
- lineNumber: isNaN(lineNumber) ? null : lineNumber,
4481
- columnNumber: isNaN(columnNumber) ? null : columnNumber,
4482
- isAppCode
4483
- };
4484
- }
4485
- }
4486
- return null;
4487
- }
4488
- function cleanFilePath(path) {
4489
- const cleaned = path.replace(/\?.*$/, "");
4490
- const srcIndex = cleaned.indexOf("/src/");
4491
- if (srcIndex !== -1) {
4492
- return cleaned.slice(srcIndex + 1);
4493
- }
4494
- const parts = cleaned.split("/");
4495
- if (parts.length > 3) {
4496
- return parts.slice(-3).join("/");
4497
- }
4498
- return cleaned;
4499
- }
4500
- function parseStackTrace(stack) {
4501
- if (!stack) {
4502
- return { primary: null, frames: [], raw: "" };
4503
- }
4504
- const lines = stack.split("\n");
4505
- const frames = [];
4506
- for (const line of lines) {
4507
- const frame = parseStackFrame(line.trim());
4508
- if (frame) {
4509
- frames.push(frame);
4510
- }
4511
- }
4512
- const primary = frames.find((f) => f.isAppCode) ?? frames[0] ?? null;
4513
- return { primary, frames, raw: stack };
4514
- }
4515
- function getErrorLocation(error) {
4516
- const parsed = parseStackTrace(error.stack);
4517
- const { primary } = parsed;
4518
- if (!primary) {
4519
- return "Unknown location";
4520
- }
4521
- const parts = [];
4522
- if (primary.functionName) {
4523
- parts.push(`in ${primary.functionName}`);
4524
- }
4525
- if (primary.filePath) {
4526
- const location = primary.lineNumber ? `${primary.filePath}:${primary.lineNumber}` : primary.filePath;
4527
- parts.push(`(${location})`);
4528
- }
4529
- return parts.join(" ") || "Unknown location";
4530
- }
4531
- function DefaultErrorFallback({
4532
- error,
4533
- parsedStack,
4534
- resetErrorBoundary,
4535
- sx,
4536
- showDetails
4537
- }) {
4538
- const [expanded, setExpanded] = useState(false);
4539
- const [copied, setCopied] = useState(false);
4540
- const shouldShowDetails = showDetails ?? (typeof process !== "undefined" && process.env.NODE_ENV === "development");
4541
- const handleCopyStack = async () => {
4542
- try {
4543
- const text = [
4544
- `Error: ${error.message}`,
4545
- `Location: ${getErrorLocation(error)}`,
4546
- "",
4547
- "Stack Trace:",
4548
- parsedStack.raw
4549
- ].join("\n");
4550
- await navigator.clipboard.writeText(text);
4551
- setCopied(true);
4552
- setTimeout(() => setCopied(false), 2e3);
4553
- } catch {
4554
- }
4555
- };
4556
- return /* @__PURE__ */ jsxs(
4557
- Box20,
4558
- {
4559
- sx: {
4560
- display: "flex",
4561
- flexDirection: "column",
4562
- alignItems: "center",
4563
- justifyContent: "center",
4564
- minHeight: 200,
4565
- p: 3,
4566
- textAlign: "center",
4567
- ...sx
4568
- },
4569
- children: [
4570
- /* @__PURE__ */ jsx(Typography5, { variant: "h6", color: "error", gutterBottom: true, children: "Something went wrong" }),
4571
- /* @__PURE__ */ jsx(
4572
- Typography5,
4573
- {
4574
- variant: "body2",
4575
- sx: {
4576
- color: "text.secondary",
4577
- mb: 1,
4578
- maxWidth: 400
4579
- },
4580
- children: error.message || "An unexpected error occurred"
4581
- }
4582
- ),
4583
- shouldShowDetails && parsedStack.primary && /* @__PURE__ */ jsxs(
4584
- Typography5,
4585
- {
4586
- variant: "caption",
4587
- sx: {
4588
- color: "text.secondary",
4589
- mb: 2,
4590
- fontFamily: "monospace"
4591
- },
4592
- children: [
4593
- parsedStack.primary.filePath,
4594
- parsedStack.primary.lineNumber && `:${parsedStack.primary.lineNumber}`,
4595
- parsedStack.primary.functionName && ` (${parsedStack.primary.functionName})`
4596
- ]
4597
- }
4598
- ),
4599
- /* @__PURE__ */ jsxs(Box20, { sx: { display: "flex", gap: 1, mb: 2 }, children: [
4600
- /* @__PURE__ */ jsx(Button, { variant: "outlined", onClick: resetErrorBoundary, children: "Try Again" }),
4601
- shouldShowDetails && /* @__PURE__ */ jsxs(Fragment, { children: [
4602
- /* @__PURE__ */ jsx(
4603
- IconButton3,
4604
- {
4605
- size: "small",
4606
- onClick: () => setExpanded(!expanded),
4607
- sx: {
4608
- transform: expanded ? "rotate(180deg)" : "rotate(0deg)",
4609
- transition: "transform 0.2s"
4610
- },
4611
- children: /* @__PURE__ */ jsx(ExpandMoreIcon, {})
4612
- }
4613
- ),
4614
- /* @__PURE__ */ jsx(IconButton3, { size: "small", onClick: handleCopyStack, title: "Copy error details", children: /* @__PURE__ */ jsx(ContentCopyIcon, { fontSize: "small" }) }),
4615
- copied && /* @__PURE__ */ jsx(
4616
- Typography5,
4617
- {
4618
- variant: "caption",
4619
- sx: {
4620
- color: "success.main",
4621
- alignSelf: "center"
4622
- },
4623
- children: "Copied!"
4624
- }
4625
- )
4626
- ] })
4627
- ] }),
4628
- shouldShowDetails && /* @__PURE__ */ jsx(Collapse, { in: expanded, children: /* @__PURE__ */ jsx(
4629
- Box20,
4630
- {
4631
- sx: {
4632
- mt: 1,
4633
- p: 2,
4634
- bgcolor: "grey.100",
4635
- borderRadius: 1,
4636
- maxWidth: 600,
4637
- maxHeight: 300,
4638
- overflow: "auto",
4639
- textAlign: "left"
4640
- },
4641
- children: /* @__PURE__ */ jsx(Typography5, { variant: "caption", component: "pre", sx: { fontFamily: "monospace", m: 0 }, children: parsedStack.frames.map((frame, i) => /* @__PURE__ */ jsxs(
4642
- Box20,
4643
- {
4644
- component: "span",
4645
- sx: {
4646
- display: "block",
4647
- color: frame.isAppCode ? "error.main" : "text.secondary",
4648
- fontWeight: frame.isAppCode ? 600 : 400
4649
- },
4650
- children: [
4651
- frame.functionName || "(anonymous)",
4652
- " at ",
4653
- frame.filePath || "unknown",
4654
- frame.lineNumber && `:${frame.lineNumber}`
4655
- ]
4656
- },
4657
- i
4658
- )) })
4659
- }
4660
- ) })
4661
- ]
4662
- }
4663
- );
4664
- }
4665
- var ErrorBoundary = class extends Component {
4666
- constructor(props) {
4667
- super(props);
4668
- this.state = {
4669
- hasError: false,
4670
- error: null,
4671
- errorInfo: null
4672
- };
4673
- }
4674
- static getDerivedStateFromError(error) {
4675
- return {
4676
- hasError: true,
4677
- error
4678
- };
4679
- }
4680
- componentDidCatch(error, errorInfo) {
4681
- const parsedStack = parseStackTrace(error.stack);
4682
- this.setState({ errorInfo });
4683
- this.props.onError?.(error, errorInfo, parsedStack);
4684
- }
4685
- componentDidUpdate(prevProps) {
4686
- const { resetKeys } = this.props;
4687
- const { hasError } = this.state;
4688
- if (hasError && resetKeys && prevProps.resetKeys) {
4689
- const hasKeyChanged = resetKeys.some((key, index) => key !== prevProps.resetKeys?.[index]);
4690
- if (hasKeyChanged) {
4691
- this.resetErrorBoundary();
4692
- }
4693
- }
4694
- }
4695
- resetErrorBoundary = () => {
4696
- this.props.onReset?.();
4697
- this.setState({
4698
- hasError: false,
4699
- error: null,
4700
- errorInfo: null
4701
- });
4702
- };
4703
- render() {
4704
- const { hasError, error, errorInfo } = this.state;
4705
- const { children, fallback, sx, showDetails } = this.props;
4706
- if (hasError && error) {
4707
- const parsedStack = parseStackTrace(error.stack);
4708
- const fallbackProps = {
4709
- error,
4710
- errorInfo,
4711
- parsedStack,
4712
- resetErrorBoundary: this.resetErrorBoundary
4713
- };
4714
- if (typeof fallback === "function") {
4715
- return fallback(fallbackProps);
4716
- }
4717
- if (fallback) {
4718
- return fallback;
4719
- }
4720
- return /* @__PURE__ */ jsx(DefaultErrorFallback, { ...fallbackProps, sx, showDetails });
4721
- }
4722
- return children;
4723
- }
4724
- };
4725
- function useErrorBoundary() {
4726
- const [, setError] = useState(null);
4727
- return (error) => {
4728
- setError(() => {
4729
- throw error;
4730
- });
4731
- };
4718
+ window.removeEventListener("popstate", handlePopState);
4719
+ };
4720
+ }, []);
4721
+ useEffect(() => {
4722
+ const timeout = setTimeout(() => NProgress.done(), delay);
4723
+ return () => clearTimeout(timeout);
4724
+ }, [pathname, search, delay]);
4725
+ }
4726
+ function NavigationProgress({ pathname, search = "", delay = 100 }) {
4727
+ useEffect(() => {
4728
+ NProgress.configure({ showSpinner: false });
4729
+ return () => {
4730
+ NProgress.done();
4731
+ };
4732
+ }, []);
4733
+ useProgressBar(pathname, search, delay);
4734
+ return /* @__PURE__ */ jsx("style", { children: STYLES });
4735
+ }
4736
+ function ScrollToTop({ pathname }) {
4737
+ useEffect(() => {
4738
+ window.scrollTo(0, 0);
4739
+ }, [pathname]);
4740
+ return null;
4732
4741
  }
4733
4742
  var SettingsContext = createContext(null);
4734
4743
  function SettingsProvider({ children, defaultOpen = false }) {
@@ -5000,7 +5009,7 @@ function PresetsSection() {
5000
5009
  children: PRESET_NAMES.map((preset) => {
5001
5010
  const isSelected = settings.preset === preset;
5002
5011
  const color = PRESET_COLORS[preset] || "#666";
5003
- return /* @__PURE__ */ jsx(Tooltip, { title: PRESET_DISPLAY_NAMES[preset], placement: "top", children: /* @__PURE__ */ jsx(
5012
+ return /* @__PURE__ */ jsx(Tooltip2, { title: PRESET_DISPLAY_NAMES[preset], placement: "top", children: /* @__PURE__ */ jsx(
5004
5013
  Box20,
5005
5014
  {
5006
5015
  onClick: () => actions.setPreset(preset),
@@ -5053,7 +5062,7 @@ function PrimaryColorSection() {
5053
5062
  return /* @__PURE__ */ jsx(Section, { title: "Primary Color", children: /* @__PURE__ */ jsxs(Box20, { sx: { display: "flex", gap: 1, flexWrap: "wrap" }, children: [
5054
5063
  COLOR_OPTIONS.map((option) => {
5055
5064
  const isSelected = settings.primaryColor === option.value;
5056
- return /* @__PURE__ */ jsx(Tooltip, { title: option.label, placement: "top", children: /* @__PURE__ */ jsx(
5065
+ return /* @__PURE__ */ jsx(Tooltip2, { title: option.label, placement: "top", children: /* @__PURE__ */ jsx(
5057
5066
  Box20,
5058
5067
  {
5059
5068
  onClick: () => actions.setPrimaryColor(option.value),
@@ -5086,7 +5095,7 @@ function PrimaryColorSection() {
5086
5095
  }
5087
5096
  ) }, option.value);
5088
5097
  }),
5089
- settings.primaryColor && /* @__PURE__ */ jsx(Tooltip, { title: "Reset to default", placement: "top", children: /* @__PURE__ */ jsx(
5098
+ settings.primaryColor && /* @__PURE__ */ jsx(Tooltip2, { title: "Reset to default", placement: "top", children: /* @__PURE__ */ jsx(
5090
5099
  Box20,
5091
5100
  {
5092
5101
  onClick: () => actions.setPrimaryColor(null),
@@ -5260,8 +5269,8 @@ function SettingsDrawer({ width = 300, sections = DEFAULT_SECTIONS }) {
5260
5269
  children: [
5261
5270
  /* @__PURE__ */ jsx(Typography5, { variant: "h6", sx: { fontWeight: 600 }, children: "Settings" }),
5262
5271
  /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 0.5, children: [
5263
- canReset && /* @__PURE__ */ jsx(Tooltip, { title: "Reset to defaults", children: /* @__PURE__ */ jsx(IconButton3, { size: "small", onClick: actions.reset, "aria-label": "Reset settings to defaults", children: /* @__PURE__ */ jsx(RefreshIcon, {}) }) }),
5264
- /* @__PURE__ */ jsx(IconButton3, { size: "small", onClick: drawer.onClose, "aria-label": "Close settings", children: /* @__PURE__ */ jsx(CloseIcon2, {}) })
5272
+ canReset && /* @__PURE__ */ jsx(Tooltip2, { title: "Reset to defaults", children: /* @__PURE__ */ jsx(IconButton4, { size: "small", onClick: actions.reset, "aria-label": "Reset settings to defaults", children: /* @__PURE__ */ jsx(RefreshIcon, {}) }) }),
5273
+ /* @__PURE__ */ jsx(IconButton4, { size: "small", onClick: drawer.onClose, "aria-label": "Close settings", children: /* @__PURE__ */ jsx(CloseIcon2, {}) })
5265
5274
  ] })
5266
5275
  ]
5267
5276
  }
@@ -5275,7 +5284,7 @@ function SettingsDrawer({ width = 300, sections = DEFAULT_SECTIONS }) {
5275
5284
  }
5276
5285
  );
5277
5286
  }
5278
- function Tooltip2({
5287
+ function Tooltip3({
5279
5288
  title,
5280
5289
  children,
5281
5290
  arrow = true,
@@ -5287,7 +5296,7 @@ function Tooltip2({
5287
5296
  return children;
5288
5297
  }
5289
5298
  return /* @__PURE__ */ jsx(
5290
- Tooltip,
5299
+ Tooltip2,
5291
5300
  {
5292
5301
  title,
5293
5302
  arrow,
@@ -5305,6 +5314,9 @@ function Tooltip2({
5305
5314
  }
5306
5315
  );
5307
5316
  }
5317
+ function mergeSx(own, sx) {
5318
+ return [own, ...Array.isArray(sx) ? sx : sx ? [sx] : []];
5319
+ }
5308
5320
  function Alert2({
5309
5321
  severity = "info",
5310
5322
  variant = "standard",
@@ -5314,27 +5326,31 @@ function Alert2({
5314
5326
  closable = false,
5315
5327
  icon,
5316
5328
  action,
5317
- sx
5329
+ sx,
5330
+ ref,
5331
+ ...other
5318
5332
  }) {
5319
5333
  const muiVariant = variant === "soft" ? "standard" : variant;
5320
5334
  return /* @__PURE__ */ jsxs(
5321
5335
  MuiAlert,
5322
5336
  {
5337
+ ref,
5338
+ ...other,
5323
5339
  severity,
5324
5340
  variant: muiVariant,
5325
5341
  onClose: closable ? onClose : void 0,
5326
5342
  icon,
5327
5343
  action,
5328
- sx: {
5329
- ...variant === "soft" && {
5344
+ sx: mergeSx(
5345
+ variant === "soft" ? {
5330
5346
  backgroundColor: (theme) => alpha(theme.palette[severity].main, theme.palette.mode === "light" ? 0.12 : 0.16),
5331
5347
  color: (theme) => theme.palette.mode === "light" ? theme.palette[severity].dark : theme.palette[severity].light,
5332
5348
  "& .MuiAlert-icon": {
5333
5349
  color: "inherit"
5334
5350
  }
5335
- },
5336
- ...sx
5337
- },
5351
+ } : {},
5352
+ sx
5353
+ ),
5338
5354
  children: [
5339
5355
  title && /* @__PURE__ */ jsx(AlertTitle, { children: title }),
5340
5356
  children
@@ -5342,19 +5358,24 @@ function Alert2({
5342
5358
  }
5343
5359
  );
5344
5360
  }
5345
- function InlineAlert({ severity = "info", message, icon }) {
5361
+ function InlineAlert({ severity = "info", message, icon, sx, ref, ...other }) {
5346
5362
  return /* @__PURE__ */ jsx(
5347
5363
  MuiAlert,
5348
5364
  {
5365
+ ref,
5366
+ ...other,
5349
5367
  severity,
5350
5368
  icon,
5351
- sx: {
5352
- py: 0,
5353
- px: 1,
5354
- "& .MuiAlert-message": {
5355
- py: 0.5
5356
- }
5357
- },
5369
+ sx: mergeSx(
5370
+ {
5371
+ py: 0,
5372
+ px: 1,
5373
+ "& .MuiAlert-message": {
5374
+ py: 0.5
5375
+ }
5376
+ },
5377
+ sx
5378
+ ),
5358
5379
  children: message
5359
5380
  }
5360
5381
  );
@@ -5365,11 +5386,14 @@ function FormAlert({
5365
5386
  children,
5366
5387
  onClose,
5367
5388
  autoScroll = true,
5368
- sx
5389
+ sx,
5390
+ ref: outerRef,
5391
+ ...other
5369
5392
  }) {
5370
5393
  const ref = useRef(null);
5394
+ const handleRef = useForkRef(ref, outerRef);
5371
5395
  useEffect(() => {
5372
- if (!autoScroll) return;
5396
+ if (!autoScroll) return void 0;
5373
5397
  const id = requestAnimationFrame(() => {
5374
5398
  ref.current?.scrollIntoView({ block: "nearest", behavior: "smooth" });
5375
5399
  });
@@ -5378,17 +5402,20 @@ function FormAlert({
5378
5402
  return /* @__PURE__ */ jsxs(
5379
5403
  MuiAlert,
5380
5404
  {
5381
- ref,
5405
+ ref: handleRef,
5406
+ ...other,
5382
5407
  severity,
5383
5408
  onClose,
5384
5409
  role: "alert",
5385
5410
  "aria-live": "assertive",
5386
5411
  "aria-atomic": "true",
5387
- sx: {
5388
- alignItems: "flex-start",
5389
- mb: 2,
5390
- ...sx
5391
- },
5412
+ sx: mergeSx(
5413
+ {
5414
+ alignItems: "flex-start",
5415
+ mb: 2
5416
+ },
5417
+ sx
5418
+ ),
5392
5419
  children: [
5393
5420
  title && /* @__PURE__ */ jsx(AlertTitle, { sx: { mb: 0.5 }, children: title }),
5394
5421
  children
@@ -5443,7 +5470,12 @@ var ItemRoot = styled("div", {
5443
5470
  }));
5444
5471
  var ItemIcon = styled("span")({
5445
5472
  display: "inherit",
5446
- "& > :first-of-type:not(style):not(:first-of-type ~ *)": {
5473
+ // Constrain the icon (first real child) to 20×20. The previous
5474
+ // selector chain `:first-of-type:not(style):not(:first-of-type ~ *)`
5475
+ // was an obscure way to say "the first child that isn't a <style>
5476
+ // tag" — replaced with the modern `:first-child:not(style)` for
5477
+ // both readability and v9 lint compliance.
5478
+ "& > :first-child:not(style)": {
5447
5479
  width: 20,
5448
5480
  height: 20
5449
5481
  }
@@ -5510,8 +5542,18 @@ function BreadcrumbLink({
5510
5542
  }
5511
5543
  return content;
5512
5544
  }
5545
+ var SAFE_LINK_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "tel:"]);
5546
+ function isSafeExternalLink(href) {
5547
+ const trimmed = href.trim();
5548
+ if (trimmed.startsWith("/") || trimmed.startsWith("#")) return true;
5549
+ try {
5550
+ return SAFE_LINK_SCHEMES.has(new URL(trimmed, "https://placeholder.invalid").protocol);
5551
+ } catch {
5552
+ return false;
5553
+ }
5554
+ }
5513
5555
  function MoreLinks({ links, sx, ...other }) {
5514
- return /* @__PURE__ */ jsx(MoreLinksRoot, { sx, ...other, children: links?.map((href) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { href, variant: "body2", target: "_blank", rel: "noopener noreferrer", children: href }) }, href)) });
5556
+ return /* @__PURE__ */ jsx(MoreLinksRoot, { sx, ...other, children: links?.filter(isSafeExternalLink).map((href) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { href, variant: "body2", target: "_blank", rel: "noopener noreferrer", children: href }) }, href)) });
5515
5557
  }
5516
5558
  function Breadcrumbs({
5517
5559
  sx,
@@ -5573,7 +5615,7 @@ function NavCard({
5573
5615
  const label = ariaLabel ?? (typeof title === "string" && typeof description === "string" ? `${title} \u2014 ${description}` : void 0);
5574
5616
  const isVertical = orientation === "vertical";
5575
5617
  return /* @__PURE__ */ jsx(
5576
- MuiCard,
5618
+ Card2,
5577
5619
  {
5578
5620
  variant: "outlined",
5579
5621
  ...linkProps,
@@ -5843,7 +5885,7 @@ function Drawer2({
5843
5885
  title && /* @__PURE__ */ jsx(Typography5, { variant: "h6", component: "div", children: title }),
5844
5886
  /* @__PURE__ */ jsxs(Box20, { sx: { display: "flex", alignItems: "center", gap: 1, ml: "auto" }, children: [
5845
5887
  headerActions,
5846
- showCloseButton && onClose && /* @__PURE__ */ jsx(IconButton3, { onClick: onClose, edge: "end", size: "small", "aria-label": "Close drawer", children: closeIcon ?? /* @__PURE__ */ jsx(DefaultCloseIcon, {}) })
5888
+ showCloseButton && onClose && /* @__PURE__ */ jsx(IconButton4, { onClick: onClose, edge: "end", size: "small", "aria-label": "Close drawer", children: closeIcon ?? /* @__PURE__ */ jsx(DefaultCloseIcon, {}) })
5847
5889
  ] })
5848
5890
  ]
5849
5891
  }
@@ -6029,7 +6071,7 @@ function ChartLoading({ sx, className, type, ...other }) {
6029
6071
  ],
6030
6072
  ...other,
6031
6073
  children: /* @__PURE__ */ jsx(
6032
- Skeleton,
6074
+ Skeleton3,
6033
6075
  {
6034
6076
  variant: "circular",
6035
6077
  sx: {
@@ -6378,6 +6420,17 @@ function deepMerge(target, source) {
6378
6420
  return output;
6379
6421
  }
6380
6422
 
6423
+ // src/components/lightbox/types.ts
6424
+ var DEFAULT_LIGHTBOX_LABELS = {
6425
+ zoomIn: "Zoom in",
6426
+ zoomOut: "Zoom out",
6427
+ download: "Download",
6428
+ share: "Share",
6429
+ close: "Close",
6430
+ previous: "Previous",
6431
+ next: "Next"
6432
+ };
6433
+
6381
6434
  // src/components/lightbox/classes.ts
6382
6435
  var lightboxClasses = {
6383
6436
  root: createClasses("lightbox__root"),
@@ -6428,12 +6481,17 @@ function Lightbox({
6428
6481
  closeOnBackdropClick = true,
6429
6482
  closeOnEsc = true,
6430
6483
  toolbar = { show: true, position: "top" },
6484
+ labels: labelOverrides,
6431
6485
  sx,
6432
6486
  slotProps,
6433
6487
  className,
6434
6488
  ...dialogProps
6435
6489
  }) {
6436
6490
  const theme = useTheme();
6491
+ const labels = useMemo(
6492
+ () => ({ ...DEFAULT_LIGHTBOX_LABELS, ...labelOverrides }),
6493
+ [labelOverrides]
6494
+ );
6437
6495
  const [currentIndex, setCurrentIndex] = useState(controlledIndex);
6438
6496
  const [zoomLevel, setZoomLevel] = useState(MIN_ZOOM);
6439
6497
  const [isFullscreen, setIsFullscreen] = useState(false);
@@ -6502,14 +6560,11 @@ function Lightbox({
6502
6560
  setZoomLevel((prevZoom) => Math.min(prevZoom + ZOOM_STEP, MAX_ZOOM));
6503
6561
  }, []);
6504
6562
  const zoomOut = useCallback(() => {
6505
- setZoomLevel((prevZoom) => {
6506
- const newZoom = Math.max(prevZoom - ZOOM_STEP, MIN_ZOOM);
6507
- if (newZoom === MIN_ZOOM) {
6508
- setPosition({ x: 0, y: 0 });
6509
- }
6510
- return newZoom;
6511
- });
6563
+ setZoomLevel((prevZoom) => Math.max(prevZoom - ZOOM_STEP, MIN_ZOOM));
6512
6564
  }, []);
6565
+ useEffect(() => {
6566
+ if (zoomLevel === MIN_ZOOM) setPosition({ x: 0, y: 0 });
6567
+ }, [zoomLevel]);
6513
6568
  const zoomReset = useCallback(() => {
6514
6569
  setZoomLevel(MIN_ZOOM);
6515
6570
  setPosition({ x: 0, y: 0 });
@@ -6717,7 +6772,7 @@ function Lightbox({
6717
6772
  {
6718
6773
  onClick: zoomOut,
6719
6774
  disabled: zoomLevel <= MIN_ZOOM,
6720
- "aria-label": "Zoom out",
6775
+ "aria-label": labels.zoomOut,
6721
6776
  className: lightboxClasses.toolbarButton,
6722
6777
  size: "small",
6723
6778
  children: /* @__PURE__ */ jsx(ZoomOutIcon, { fontSize: "small" })
@@ -6745,7 +6800,7 @@ function Lightbox({
6745
6800
  {
6746
6801
  onClick: zoomIn,
6747
6802
  disabled: zoomLevel >= MAX_ZOOM,
6748
- "aria-label": "Zoom in",
6803
+ "aria-label": labels.zoomIn,
6749
6804
  className: lightboxClasses.toolbarButton,
6750
6805
  size: "small",
6751
6806
  children: /* @__PURE__ */ jsx(ZoomInIcon, { fontSize: "small" })
@@ -6766,7 +6821,7 @@ function Lightbox({
6766
6821
  GlassButton,
6767
6822
  {
6768
6823
  onClick: handleDownload,
6769
- "aria-label": "Download",
6824
+ "aria-label": labels.download,
6770
6825
  className: lightboxClasses.toolbarButton,
6771
6826
  size: "small",
6772
6827
  children: /* @__PURE__ */ jsx(DownloadIcon, { fontSize: "small" })
@@ -6776,14 +6831,14 @@ function Lightbox({
6776
6831
  GlassButton,
6777
6832
  {
6778
6833
  onClick: handleShare,
6779
- "aria-label": "Share",
6834
+ "aria-label": labels.share,
6780
6835
  className: lightboxClasses.toolbarButton,
6781
6836
  size: "small",
6782
6837
  children: /* @__PURE__ */ jsx(ShareIcon, { fontSize: "small" })
6783
6838
  }
6784
6839
  ),
6785
6840
  toolbar?.buttons,
6786
- /* @__PURE__ */ jsx(GlassButton, { onClick: onClose, "aria-label": "Close", className: lightboxClasses.toolbarButton, size: "small", children: /* @__PURE__ */ jsx(CloseIcon3, { fontSize: "small" }) })
6841
+ /* @__PURE__ */ jsx(GlassButton, { onClick: onClose, "aria-label": labels.close, className: lightboxClasses.toolbarButton, size: "small", children: /* @__PURE__ */ jsx(CloseIcon3, { fontSize: "small" }) })
6787
6842
  ]
6788
6843
  }
6789
6844
  ),
@@ -6897,7 +6952,7 @@ function Lightbox({
6897
6952
  className: cn(lightboxClasses.navButton, lightboxClasses.navPrev),
6898
6953
  side: "left",
6899
6954
  onClick: prev,
6900
- "aria-label": "Previous",
6955
+ "aria-label": labels.previous,
6901
6956
  sx: slotProps?.navButton,
6902
6957
  children: /* @__PURE__ */ jsx(ChevronLeftIcon, { sx: { fontSize: 28 } })
6903
6958
  }
@@ -6908,7 +6963,7 @@ function Lightbox({
6908
6963
  className: cn(lightboxClasses.navButton, lightboxClasses.navNext),
6909
6964
  side: "right",
6910
6965
  onClick: next,
6911
- "aria-label": "Next",
6966
+ "aria-label": labels.next,
6912
6967
  sx: slotProps?.navButton,
6913
6968
  children: /* @__PURE__ */ jsx(ChevronRightIcon, { sx: { fontSize: 28 } })
6914
6969
  }
@@ -6964,7 +7019,7 @@ function Lightbox({
6964
7019
  totalSlides
6965
7020
  ] }),
6966
7021
  /* @__PURE__ */ jsx(Box20, { sx: { flex: 1 } }),
6967
- /* @__PURE__ */ jsx(GlassButton, { onClick: onClose, "aria-label": "Close", size: "small", children: /* @__PURE__ */ jsx(CloseIcon3, { fontSize: "small" }) })
7022
+ /* @__PURE__ */ jsx(GlassButton, { onClick: onClose, "aria-label": labels.close, size: "small", children: /* @__PURE__ */ jsx(CloseIcon3, { fontSize: "small" }) })
6968
7023
  ]
6969
7024
  }
6970
7025
  )
@@ -7009,7 +7064,7 @@ var GlassToolbar = styled(Box20)(({ theme, placement }) => ({
7009
7064
  background: `linear-gradient(${placement === "top" ? "to bottom" : "to top"}, ${alpha(theme.palette.common.black, 0.55)} 0%, ${alpha(theme.palette.common.black, 0.2)} 60%, transparent 100%)`,
7010
7065
  transition: "opacity 0.3s ease"
7011
7066
  }));
7012
- var GlassButton = styled(IconButton3)(({ theme }) => ({
7067
+ var GlassButton = styled(IconButton4)(({ theme }) => ({
7013
7068
  color: alpha(theme.palette.common.white, 0.85),
7014
7069
  borderRadius: Number(theme.shape.borderRadius) * 1.5,
7015
7070
  padding: 6,
@@ -7116,7 +7171,7 @@ var GlassCaption = styled(Box20)(({ theme }) => ({
7116
7171
  to: { opacity: 1, transform: "translateX(-50%) translateY(0)" }
7117
7172
  }
7118
7173
  }));
7119
- var NavArrow = styled(IconButton3)(({ theme, side }) => ({
7174
+ var NavArrow = styled(IconButton4)(({ theme, side }) => ({
7120
7175
  position: "absolute",
7121
7176
  top: "50%",
7122
7177
  transform: "translateY(-50%)",
@@ -7187,18 +7242,14 @@ var ThumbItem = styled(Box20)(({ theme, active }) => ({
7187
7242
  borderColor: active ? theme.palette.primary.main : alpha(theme.palette.common.white, 0.25)
7188
7243
  }
7189
7244
  }));
7190
- var MIN_ZOOM2 = 1;
7191
- var MAX_ZOOM2 = 4;
7192
- var ZOOM_STEP2 = 0.5;
7193
7245
  function useLightbox(options = {}) {
7194
7246
  const { defaultOpen = false, defaultIndex = 0, totalSlides = 0, loop = false } = options;
7195
7247
  const [open, setOpen] = useState(defaultOpen);
7196
7248
  const [index, setIndex] = useState(defaultIndex);
7197
- const [zoomLevel, setZoomLevel] = useState(MIN_ZOOM2);
7198
7249
  const goTo = useCallback(
7199
7250
  (newIndex) => {
7200
7251
  if (totalSlides === 0) {
7201
- setIndex(newIndex);
7252
+ setIndex(0);
7202
7253
  return;
7203
7254
  }
7204
7255
  if (loop) {
@@ -7206,7 +7257,6 @@ function useLightbox(options = {}) {
7206
7257
  } else {
7207
7258
  setIndex(Math.max(0, Math.min(newIndex, totalSlides - 1)));
7208
7259
  }
7209
- setZoomLevel(MIN_ZOOM2);
7210
7260
  },
7211
7261
  [totalSlides, loop]
7212
7262
  );
@@ -7218,21 +7268,10 @@ function useLightbox(options = {}) {
7218
7268
  }, [index, goTo]);
7219
7269
  const onOpen = useCallback((slideIndex = 0) => {
7220
7270
  setIndex(slideIndex);
7221
- setZoomLevel(MIN_ZOOM2);
7222
7271
  setOpen(true);
7223
7272
  }, []);
7224
7273
  const onClose = useCallback(() => {
7225
7274
  setOpen(false);
7226
- setZoomLevel(MIN_ZOOM2);
7227
- }, []);
7228
- const zoomIn = useCallback(() => {
7229
- setZoomLevel((prevZoom) => Math.min(prevZoom + ZOOM_STEP2, MAX_ZOOM2));
7230
- }, []);
7231
- const zoomOut = useCallback(() => {
7232
- setZoomLevel((prevZoom) => Math.max(prevZoom - ZOOM_STEP2, MIN_ZOOM2));
7233
- }, []);
7234
- const zoomReset = useCallback(() => {
7235
- setZoomLevel(MIN_ZOOM2);
7236
7275
  }, []);
7237
7276
  const onIndexChange = useCallback(
7238
7277
  (newIndex) => {
@@ -7257,10 +7296,6 @@ function useLightbox(options = {}) {
7257
7296
  goTo,
7258
7297
  next,
7259
7298
  prev,
7260
- zoomLevel,
7261
- zoomIn,
7262
- zoomOut,
7263
- zoomReset,
7264
7299
  getLightboxProps
7265
7300
  };
7266
7301
  }
@@ -7652,7 +7687,7 @@ var CarouselSlide = styled(Box20)({
7652
7687
  height: "100%"
7653
7688
  }
7654
7689
  });
7655
- var ArrowButton = styled(IconButton3)(
7690
+ var ArrowButton = styled(IconButton4)(
7656
7691
  ({ theme, isHorizontal, direction }) => ({
7657
7692
  position: "absolute",
7658
7693
  zIndex: 10,
@@ -7736,6 +7771,7 @@ function useCarousel(options) {
7736
7771
  const [isPlaying, setIsPlaying] = useState(autoplay);
7737
7772
  const carouselRef = useRef(null);
7738
7773
  const autoplayRef = useRef(null);
7774
+ const currentIndexRef = useRef(currentIndex);
7739
7775
  const maxIndex = Math.max(0, totalSlides - slidesToShow);
7740
7776
  const canPrev = loop || currentIndex > 0;
7741
7777
  const canNext = loop || currentIndex < maxIndex;
@@ -7751,6 +7787,8 @@ function useCarousel(options) {
7751
7787
  } else {
7752
7788
  newIndex = Math.max(0, Math.min(index, maxIndex));
7753
7789
  }
7790
+ if (newIndex === currentIndexRef.current) return;
7791
+ currentIndexRef.current = newIndex;
7754
7792
  setCurrentIndex(newIndex);
7755
7793
  onSlideChange?.(newIndex);
7756
7794
  },
@@ -7779,7 +7817,7 @@ function useCarousel(options) {
7779
7817
  useEffect(() => {
7780
7818
  if (isPlaying && totalSlides > slidesToShow) {
7781
7819
  autoplayRef.current = setInterval(() => {
7782
- goTo(currentIndex + slidesToScroll);
7820
+ goTo(currentIndexRef.current + slidesToScroll);
7783
7821
  }, autoplayInterval);
7784
7822
  return () => {
7785
7823
  if (autoplayRef.current) {
@@ -7789,7 +7827,7 @@ function useCarousel(options) {
7789
7827
  };
7790
7828
  }
7791
7829
  return void 0;
7792
- }, [isPlaying, currentIndex, slidesToScroll, autoplayInterval, totalSlides, slidesToShow, goTo]);
7830
+ }, [isPlaying, slidesToScroll, autoplayInterval, totalSlides, slidesToShow, goTo]);
7793
7831
  useEffect(
7794
7832
  () => () => {
7795
7833
  if (autoplayRef.current) {
@@ -7866,11 +7904,17 @@ var navSectionCssVars = {
7866
7904
  "--nav-icon-active-color": theme.palette.primary.main,
7867
7905
  // Colors - disabled
7868
7906
  "--nav-item-disabled-color": theme.palette.text.disabled,
7869
- // Subheader
7907
+ // Subheader. Asymmetric vertical padding (top < bottom) tightens
7908
+ // the gap to the previous section's last item while preserving
7909
+ // the visual grouping with the items belonging to THIS section.
7910
+ // Pre-fix `8px 8px 8px 12px` summed with the parent `gap: 4px`
7911
+ // and the previous item's `padding-bottom: 4px` to ~16px above
7912
+ // the title, which read as a disconnect rather than a section
7913
+ // boundary.
7870
7914
  "--nav-subheader-font-size": "0.6875rem",
7871
7915
  "--nav-subheader-font-weight": "700",
7872
7916
  "--nav-subheader-color": theme.palette.text.disabled,
7873
- "--nav-subheader-padding": "8px 8px 8px 12px",
7917
+ "--nav-subheader-padding": "4px 8px 8px 12px",
7874
7918
  // Sub-item adjustments
7875
7919
  "--nav-sub-item-padding": "4px 8px 4px 12px",
7876
7920
  "--nav-sub-item-margin-left": "40px",
@@ -7949,7 +7993,7 @@ function getNavCssVars(theme, variant) {
7949
7993
  return navSectionCssVars.vertical(theme);
7950
7994
  }
7951
7995
  }
7952
- var Nav = forwardRef(function Nav2({ className, sx, ...other }, ref) {
7996
+ function Nav({ className, sx, ref, ...other }) {
7953
7997
  return /* @__PURE__ */ jsx(
7954
7998
  Box20,
7955
7999
  {
@@ -7967,8 +8011,8 @@ var Nav = forwardRef(function Nav2({ className, sx, ...other }, ref) {
7967
8011
  ...other
7968
8012
  }
7969
8013
  );
7970
- });
7971
- var NavUl = forwardRef(function NavUl2({ className, sx, ...other }, ref) {
8014
+ }
8015
+ function NavUl({ className, sx, ref, ...other }) {
7972
8016
  return /* @__PURE__ */ jsx(
7973
8017
  Box20,
7974
8018
  {
@@ -7988,8 +8032,8 @@ var NavUl = forwardRef(function NavUl2({ className, sx, ...other }, ref) {
7988
8032
  ...other
7989
8033
  }
7990
8034
  );
7991
- });
7992
- var NavLi = forwardRef(function NavLi2({ className, ...other }, ref) {
8035
+ }
8036
+ function NavLi({ className, ref, ...other }) {
7993
8037
  return /* @__PURE__ */ jsx(
7994
8038
  Box20,
7995
8039
  {
@@ -8003,7 +8047,7 @@ var NavLi = forwardRef(function NavLi2({ className, ...other }, ref) {
8003
8047
  ...other
8004
8048
  }
8005
8049
  );
8006
- });
8050
+ }
8007
8051
  var StyledSubheader = styled(ButtonBase)(({ theme }) => ({
8008
8052
  width: "100%",
8009
8053
  cursor: "pointer",
@@ -8043,12 +8087,12 @@ var ArrowIcon = styled("span")(({ open }) => ({
8043
8087
  transform: "rotate(-45deg)"
8044
8088
  }
8045
8089
  }));
8046
- var NavSubheader = forwardRef(function NavSubheader2({ className, open, onClick, children, ...other }, ref) {
8090
+ function NavSubheader({ className, open, onClick, children, ref, ...other }) {
8047
8091
  return /* @__PURE__ */ jsxs(StyledSubheader, { ref, className: cn(navSectionClasses.subheader, className), onClick, ...other, children: [
8048
8092
  children,
8049
8093
  onClick && /* @__PURE__ */ jsx(ArrowIcon, { open })
8050
8094
  ] });
8051
- });
8095
+ }
8052
8096
  var StyledNavItem = styled(ButtonBase, {
8053
8097
  shouldForwardProp: (prop) => !["active", "open", "depth", "hasChild"].includes(prop)
8054
8098
  })(
@@ -8087,7 +8131,7 @@ var StyledNavItem = styled(ButtonBase, {
8087
8131
  }
8088
8132
  })
8089
8133
  );
8090
- var NavItemBase = forwardRef(function NavItemBase2({ className, active, disabled, open, depth, hasChild, ...other }, ref) {
8134
+ function NavItemBase({ className, active, disabled, open, depth, hasChild, ref, ...other }) {
8091
8135
  return /* @__PURE__ */ jsx(
8092
8136
  StyledNavItem,
8093
8137
  {
@@ -8107,8 +8151,8 @@ var NavItemBase = forwardRef(function NavItemBase2({ className, active, disabled
8107
8151
  ...other
8108
8152
  }
8109
8153
  );
8110
- });
8111
- var IconWrapper2 = styled("span")({
8154
+ }
8155
+ var IconWrapper = styled("span")({
8112
8156
  width: "var(--nav-icon-size, 24px)",
8113
8157
  height: "var(--nav-icon-size, 24px)",
8114
8158
  flexShrink: 0,
@@ -8124,7 +8168,7 @@ var IconWrapper2 = styled("span")({
8124
8168
  });
8125
8169
  function NavIcon({ icon, className }) {
8126
8170
  if (!icon) return null;
8127
- return /* @__PURE__ */ jsx(IconWrapper2, { className: cn("nav-icon", navSectionClasses.icon, className), children: icon });
8171
+ return /* @__PURE__ */ jsx(IconWrapper, { className: cn("nav-icon", navSectionClasses.icon, className), children: icon });
8128
8172
  }
8129
8173
  var TextsWrapper = styled("span")({
8130
8174
  flex: "1 1 auto",
@@ -8355,7 +8399,8 @@ function resolveInfo(info, render) {
8355
8399
  }
8356
8400
  return info;
8357
8401
  }
8358
- var NavItem = forwardRef(function NavItem2(props, ref) {
8402
+ function NavItem(props) {
8403
+ const { ref } = props;
8359
8404
  const {
8360
8405
  // Data props
8361
8406
  path,
@@ -8411,10 +8456,10 @@ var NavItem = forwardRef(function NavItem2(props, ref) {
8411
8456
  }
8412
8457
  );
8413
8458
  if (caption && depth === 1) {
8414
- return /* @__PURE__ */ jsx(Tooltip, { title: caption, placement: "right", arrow: true, children: content });
8459
+ return /* @__PURE__ */ jsx(Tooltip2, { title: caption, placement: "right", arrow: true, children: content });
8415
8460
  }
8416
8461
  return content;
8417
- });
8462
+ }
8418
8463
  var NavContext = createContext(void 0);
8419
8464
  function useNavPathname() {
8420
8465
  const context = useContext(NavContext);
@@ -8875,7 +8920,7 @@ function MiniNavList({
8875
8920
  )
8876
8921
  }
8877
8922
  )
8878
- ] }) : /* @__PURE__ */ jsx(Tooltip, { title: data.title, placement: "right", arrow: true, children: content }) });
8923
+ ] }) : /* @__PURE__ */ jsx(Tooltip2, { title: data.title, placement: "right", arrow: true, children: content }) });
8879
8924
  }
8880
8925
  function MiniDropdown({
8881
8926
  data,
@@ -9033,17 +9078,17 @@ function megaMenuCssVars(theme, variant) {
9033
9078
  return commonVars;
9034
9079
  }
9035
9080
  }
9036
- var Nav3 = styled("nav")({
9081
+ var Nav2 = styled("nav")({
9037
9082
  display: "flex",
9038
9083
  flexShrink: 0
9039
9084
  });
9040
- var NavUl3 = styled("ul")({
9085
+ var NavUl2 = styled("ul")({
9041
9086
  display: "flex",
9042
9087
  listStyle: "none",
9043
9088
  padding: 0,
9044
9089
  margin: 0
9045
9090
  });
9046
- var NavLi3 = styled("li")({
9091
+ var NavLi2 = styled("li")({
9047
9092
  display: "flex"
9048
9093
  });
9049
9094
  var NavButton = styled("button")(({ theme, active, open }) => ({
@@ -9077,7 +9122,7 @@ var NavButton = styled("button")(({ theme, active, open }) => ({
9077
9122
  cursor: "not-allowed"
9078
9123
  }
9079
9124
  }));
9080
- var IconWrapper3 = styled("span")({
9125
+ var IconWrapper2 = styled("span")({
9081
9126
  width: "var(--nav-icon-size)",
9082
9127
  height: "var(--nav-icon-size)",
9083
9128
  marginRight: 8,
@@ -9209,7 +9254,7 @@ function MegaMenuList({ data, render, slotProps, slots, enabledRootRedirect }) {
9209
9254
  handleClose();
9210
9255
  }, [pathname, handleClose]);
9211
9256
  const icon = typeof data.icon === "string" && render?.navIcon ? render.navIcon[data.icon] : data.icon;
9212
- return /* @__PURE__ */ jsxs(NavLi3, { className: megaMenuClasses.li, children: [
9257
+ return /* @__PURE__ */ jsxs(NavLi2, { className: megaMenuClasses.li, children: [
9213
9258
  /* @__PURE__ */ jsxs(
9214
9259
  NavButton,
9215
9260
  {
@@ -9225,7 +9270,7 @@ function MegaMenuList({ data, render, slotProps, slots, enabledRootRedirect }) {
9225
9270
  onMouseEnter: handleOpen,
9226
9271
  onMouseLeave: handleClose,
9227
9272
  children: [
9228
- icon && /* @__PURE__ */ jsx(IconWrapper3, { className: megaMenuClasses.icon, children: icon }),
9273
+ icon && /* @__PURE__ */ jsx(IconWrapper2, { className: megaMenuClasses.icon, children: icon }),
9229
9274
  /* @__PURE__ */ jsx("span", { className: megaMenuClasses.title, children: data.title }),
9230
9275
  hasChild && /* @__PURE__ */ jsx(ArrowIcon2, { open, className: megaMenuClasses.arrow })
9231
9276
  ]
@@ -9302,12 +9347,12 @@ function MegaMenuHorizontal({
9302
9347
  const theme = useTheme();
9303
9348
  const cssVars = { ...megaMenuCssVars(theme, "horizontal"), ...overridesVars };
9304
9349
  return /* @__PURE__ */ jsx(
9305
- Nav3,
9350
+ Nav2,
9306
9351
  {
9307
9352
  className: cn(megaMenuClasses.root, megaMenuClasses.horizontal, className),
9308
9353
  sx: [{ ...cssVars }, ...Array.isArray(sx) ? sx : [sx]],
9309
9354
  ...other,
9310
- children: /* @__PURE__ */ jsx(NavUl3, { className: megaMenuClasses.ul, sx: { gap: "var(--nav-item-gap)" }, children: data.map((item) => /* @__PURE__ */ jsx(
9355
+ children: /* @__PURE__ */ jsx(NavUl2, { className: megaMenuClasses.ul, sx: { gap: "var(--nav-item-gap)" }, children: data.map((item) => /* @__PURE__ */ jsx(
9311
9356
  MegaMenuList,
9312
9357
  {
9313
9358
  data: item,
@@ -9321,19 +9366,19 @@ function MegaMenuHorizontal({
9321
9366
  }
9322
9367
  );
9323
9368
  }
9324
- var Nav4 = styled("nav")({
9369
+ var Nav3 = styled("nav")({
9325
9370
  display: "flex",
9326
9371
  flexDirection: "column",
9327
9372
  flexShrink: 0
9328
9373
  });
9329
- var NavUl4 = styled("ul")({
9374
+ var NavUl3 = styled("ul")({
9330
9375
  display: "flex",
9331
9376
  flexDirection: "column",
9332
9377
  listStyle: "none",
9333
9378
  padding: 0,
9334
9379
  margin: 0
9335
9380
  });
9336
- var NavLi4 = styled("li")({
9381
+ var NavLi3 = styled("li")({
9337
9382
  display: "flex",
9338
9383
  flexDirection: "column"
9339
9384
  });
@@ -9369,7 +9414,7 @@ var NavButton2 = styled("button")(({ theme, active, open }) => ({
9369
9414
  cursor: "not-allowed"
9370
9415
  }
9371
9416
  }));
9372
- var IconWrapper4 = styled("span")({
9417
+ var IconWrapper3 = styled("span")({
9373
9418
  width: "var(--nav-icon-size)",
9374
9419
  height: "var(--nav-icon-size)",
9375
9420
  marginRight: 12,
@@ -9415,7 +9460,10 @@ var SectionHeader2 = styled(Typography5)(({ theme }) => ({
9415
9460
  letterSpacing: "0.08em",
9416
9461
  marginBottom: 8,
9417
9462
  marginTop: 16,
9418
- "&:first-of-type": {
9463
+ // `:first-child` — homogeneous list of subheaders; child-position
9464
+ // selector is equivalent to of-type but doesn't tie correctness
9465
+ // to tag-name uniqueness.
9466
+ "&:first-child": {
9419
9467
  marginTop: 0
9420
9468
  }
9421
9469
  }));
@@ -9459,7 +9507,7 @@ function MegaMenuList2({ data, render, slotProps, slots, enabledRootRedirect })
9459
9507
  handleClose();
9460
9508
  }, [pathname, handleClose]);
9461
9509
  const icon = typeof data.icon === "string" && render?.navIcon ? render.navIcon[data.icon] : data.icon;
9462
- return /* @__PURE__ */ jsxs(NavLi4, { className: megaMenuClasses.li, children: [
9510
+ return /* @__PURE__ */ jsxs(NavLi3, { className: megaMenuClasses.li, children: [
9463
9511
  /* @__PURE__ */ jsxs(
9464
9512
  NavButton2,
9465
9513
  {
@@ -9475,7 +9523,7 @@ function MegaMenuList2({ data, render, slotProps, slots, enabledRootRedirect })
9475
9523
  onMouseEnter: handleOpen,
9476
9524
  onMouseLeave: handleClose,
9477
9525
  children: [
9478
- icon && /* @__PURE__ */ jsx(IconWrapper4, { className: megaMenuClasses.icon, children: icon }),
9526
+ icon && /* @__PURE__ */ jsx(IconWrapper3, { className: megaMenuClasses.icon, children: icon }),
9479
9527
  /* @__PURE__ */ jsx("span", { className: megaMenuClasses.title, children: data.title }),
9480
9528
  hasChild && /* @__PURE__ */ jsx(ArrowIcon3, { open, className: megaMenuClasses.arrow })
9481
9529
  ]
@@ -9551,12 +9599,12 @@ function MegaMenuVertical({
9551
9599
  const theme = useTheme();
9552
9600
  const cssVars = { ...megaMenuCssVars(theme, "vertical"), ...overridesVars };
9553
9601
  return /* @__PURE__ */ jsx(
9554
- Nav4,
9602
+ Nav3,
9555
9603
  {
9556
9604
  className: cn(megaMenuClasses.root, megaMenuClasses.vertical, className),
9557
9605
  sx: [{ ...cssVars }, ...Array.isArray(sx) ? sx : [sx]],
9558
9606
  ...other,
9559
- children: /* @__PURE__ */ jsx(NavUl4, { className: megaMenuClasses.ul, sx: { gap: "var(--nav-item-gap)" }, children: data.map((item) => /* @__PURE__ */ jsx(
9607
+ children: /* @__PURE__ */ jsx(NavUl3, { className: megaMenuClasses.ul, sx: { gap: "var(--nav-item-gap)" }, children: data.map((item) => /* @__PURE__ */ jsx(
9560
9608
  MegaMenuList2,
9561
9609
  {
9562
9610
  data: item,
@@ -9570,13 +9618,13 @@ function MegaMenuVertical({
9570
9618
  }
9571
9619
  );
9572
9620
  }
9573
- var Nav5 = styled("nav")({
9621
+ var Nav4 = styled("nav")({
9574
9622
  display: "flex",
9575
9623
  flexDirection: "column",
9576
9624
  flexShrink: 0,
9577
9625
  width: "100%"
9578
9626
  });
9579
- var NavUl5 = styled("ul")({
9627
+ var NavUl4 = styled("ul")({
9580
9628
  display: "flex",
9581
9629
  flexDirection: "column",
9582
9630
  listStyle: "none",
@@ -9584,7 +9632,7 @@ var NavUl5 = styled("ul")({
9584
9632
  margin: 0,
9585
9633
  width: "100%"
9586
9634
  });
9587
- var NavLi5 = styled("li")({
9635
+ var NavLi4 = styled("li")({
9588
9636
  display: "flex",
9589
9637
  flexDirection: "column",
9590
9638
  width: "100%"
@@ -9621,7 +9669,7 @@ var NavButton3 = styled("button")(({ theme, active }) => ({
9621
9669
  }
9622
9670
  }));
9623
9671
  var NavLink = styled("a")(({ theme, active }) => navItemStyles(theme, active));
9624
- var IconWrapper5 = styled("span")({
9672
+ var IconWrapper4 = styled("span")({
9625
9673
  width: "var(--nav-icon-size)",
9626
9674
  height: "var(--nav-icon-size)",
9627
9675
  marginRight: 12,
@@ -9701,7 +9749,7 @@ function MegaMenuList3({ data, render, slotProps, enabledRootRedirect }) {
9701
9749
  const icon = typeof data.icon === "string" && render?.navIcon ? render.navIcon[data.icon] : data.icon;
9702
9750
  if (!hasChild) {
9703
9751
  const isExternal = isExternalLink(data.path);
9704
- return /* @__PURE__ */ jsx(NavLi5, { className: megaMenuClasses.li, children: /* @__PURE__ */ jsxs(
9752
+ return /* @__PURE__ */ jsx(NavLi4, { className: megaMenuClasses.li, children: /* @__PURE__ */ jsxs(
9705
9753
  NavLink,
9706
9754
  {
9707
9755
  href: data.path,
@@ -9710,13 +9758,13 @@ function MegaMenuList3({ data, render, slotProps, enabledRootRedirect }) {
9710
9758
  target: isExternal ? "_blank" : void 0,
9711
9759
  rel: isExternal ? "noopener noreferrer" : void 0,
9712
9760
  children: [
9713
- icon && /* @__PURE__ */ jsx(IconWrapper5, { className: megaMenuClasses.icon, children: icon }),
9761
+ icon && /* @__PURE__ */ jsx(IconWrapper4, { className: megaMenuClasses.icon, children: icon }),
9714
9762
  /* @__PURE__ */ jsx("span", { className: megaMenuClasses.title, children: data.title })
9715
9763
  ]
9716
9764
  }
9717
9765
  ) });
9718
9766
  }
9719
- return /* @__PURE__ */ jsxs(NavLi5, { className: megaMenuClasses.li, children: [
9767
+ return /* @__PURE__ */ jsxs(NavLi4, { className: megaMenuClasses.li, children: [
9720
9768
  /* @__PURE__ */ jsxs(
9721
9769
  NavButton3,
9722
9770
  {
@@ -9730,7 +9778,7 @@ function MegaMenuList3({ data, render, slotProps, enabledRootRedirect }) {
9730
9778
  disabled: data.disabled,
9731
9779
  onClick: handleToggle,
9732
9780
  children: [
9733
- icon && /* @__PURE__ */ jsx(IconWrapper5, { className: megaMenuClasses.icon, children: icon }),
9781
+ icon && /* @__PURE__ */ jsx(IconWrapper4, { className: megaMenuClasses.icon, children: icon }),
9734
9782
  /* @__PURE__ */ jsx("span", { className: megaMenuClasses.title, children: data.title }),
9735
9783
  /* @__PURE__ */ jsx(ArrowIcon4, { open, className: megaMenuClasses.arrow })
9736
9784
  ]
@@ -9771,12 +9819,12 @@ function MegaMenuMobile({
9771
9819
  const theme = useTheme();
9772
9820
  const cssVars = { ...megaMenuCssVars(theme, "mobile"), ...overridesVars };
9773
9821
  return /* @__PURE__ */ jsx(
9774
- Nav5,
9822
+ Nav4,
9775
9823
  {
9776
9824
  className: cn(megaMenuClasses.root, megaMenuClasses.mobile, className),
9777
9825
  sx: [{ ...cssVars }, ...Array.isArray(sx) ? sx : [sx]],
9778
9826
  ...other,
9779
- children: /* @__PURE__ */ jsx(NavUl5, { className: megaMenuClasses.ul, children: data.map((item) => /* @__PURE__ */ jsx(
9827
+ children: /* @__PURE__ */ jsx(NavUl4, { className: megaMenuClasses.ul, children: data.map((item) => /* @__PURE__ */ jsx(
9780
9828
  MegaMenuList3,
9781
9829
  {
9782
9830
  data: item,
@@ -9952,6 +10000,8 @@ function DocLayout({ sidebar, sectionNav, children, sx }) {
9952
10000
  }
9953
10001
  );
9954
10002
  }
10003
+ var MAX_LABEL_LINES = 2;
10004
+ var useIsoLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
9955
10005
  function DocSidebar({ items, activeId, onItemClick, title }) {
9956
10006
  return /* @__PURE__ */ jsxs(Box20, { children: [
9957
10007
  title && /* @__PURE__ */ jsx(
@@ -10000,6 +10050,7 @@ function SidebarNode({
10000
10050
  mx: 0.5,
10001
10051
  mb: 0.25,
10002
10052
  minHeight: 0,
10053
+ alignItems: "flex-start",
10003
10054
  ...isCategory && {
10004
10055
  mt: depth === 0 ? 1 : 0.5
10005
10056
  },
@@ -10009,19 +10060,13 @@ function SidebarNode({
10009
10060
  }
10010
10061
  },
10011
10062
  children: /* @__PURE__ */ jsx(
10012
- ListItemText,
10063
+ SidebarLabel,
10013
10064
  {
10014
- primary: item.label,
10015
- slotProps: {
10016
- primary: {
10017
- variant: "body2",
10018
- noWrap: true,
10019
- sx: {
10020
- fontWeight: isCategory ? 600 : isActive ? 600 : 400,
10021
- fontSize: "0.8125rem",
10022
- ...isCategory && { color: "text.primary" }
10023
- }
10024
- }
10065
+ label: item.label,
10066
+ sx: {
10067
+ fontWeight: isCategory ? 600 : isActive ? 600 : 400,
10068
+ fontSize: "0.8125rem",
10069
+ ...isCategory && { color: "text.primary" }
10025
10070
  }
10026
10071
  }
10027
10072
  )
@@ -10039,6 +10084,58 @@ function SidebarNode({
10039
10084
  )) }) })
10040
10085
  ] });
10041
10086
  }
10087
+ function SidebarLabel({ label, sx }) {
10088
+ const ref = useRef(null);
10089
+ const [isOverflowing, setIsOverflowing] = useState(false);
10090
+ useIsoLayoutEffect(() => {
10091
+ const el = ref.current;
10092
+ if (!el) return void 0;
10093
+ const check = () => {
10094
+ setIsOverflowing(el.scrollHeight > el.clientHeight + 1);
10095
+ };
10096
+ check();
10097
+ if (typeof ResizeObserver === "undefined") return void 0;
10098
+ const ro = new ResizeObserver(check);
10099
+ ro.observe(el);
10100
+ return () => ro.disconnect();
10101
+ }, [label]);
10102
+ const text = /* @__PURE__ */ jsx(
10103
+ Typography5,
10104
+ {
10105
+ ref,
10106
+ component: "span",
10107
+ variant: "body2",
10108
+ sx: {
10109
+ display: "-webkit-box",
10110
+ WebkitBoxOrient: "vertical",
10111
+ WebkitLineClamp: MAX_LABEL_LINES,
10112
+ overflow: "hidden",
10113
+ wordBreak: "break-word",
10114
+ lineHeight: 1.35,
10115
+ // The flex parent (ListItemButton) needs `minWidth: 0`
10116
+ // on the child for the ellipsis to take effect; do it
10117
+ // here so the consumer doesn't have to reach in.
10118
+ minWidth: 0,
10119
+ flex: 1,
10120
+ ...sx
10121
+ },
10122
+ children: label
10123
+ }
10124
+ );
10125
+ if (!isOverflowing) return text;
10126
+ return /* @__PURE__ */ jsx(
10127
+ Tooltip2,
10128
+ {
10129
+ title: label,
10130
+ placement: "right",
10131
+ arrow: true,
10132
+ enterDelay: 300,
10133
+ enterNextDelay: 150,
10134
+ disableInteractive: true,
10135
+ children: text
10136
+ }
10137
+ );
10138
+ }
10042
10139
  function DocSectionNav({ headings, title = "On this page" }) {
10043
10140
  const { activeId } = useScrollSpy();
10044
10141
  const handleClick = useCallback((e, id) => {
@@ -10164,16 +10261,21 @@ var ContentRoot = styled("div")(({ theme }) => ({
10164
10261
  scrollMarginTop: 100
10165
10262
  // Account for sticky header on anchor jump
10166
10263
  },
10167
- // First heading in content should not have excessive top margin
10168
- "& > h1:first-of-type, & > h2:first-of-type, & > h3:first-of-type": {
10169
- marginTop: 0
10170
- },
10171
- h1: { ...theme.typography.h1, marginTop: 40, marginBottom: 12 },
10172
- h2: { ...theme.typography.h2, marginTop: 40, marginBottom: 12 },
10173
- h3: { ...theme.typography.h3, marginTop: 32, marginBottom: 8 },
10174
- h4: { ...theme.typography.h4, marginTop: 24, marginBottom: 8 },
10175
- h5: { ...theme.typography.h5, marginTop: 24, marginBottom: 8 },
10176
- h6: { ...theme.typography.h6, marginTop: 24, marginBottom: 8 },
10264
+ // Heading margins. Top margins are applied via the adjacent-sibling
10265
+ // combinator (`* + hN`) rather than a `:first-child` reset: a heading
10266
+ // takes its top margin ONLY when it follows another element, so a
10267
+ // heading at the very top of its container carries none. This is
10268
+ // SSR-safe (avoids Emotion's `:first-child` warning) and yields the
10269
+ // same result the previous `& > :first-child:is(h1,h2,h3)` reset did.
10270
+ h1: { ...theme.typography.h1, marginTop: 0, marginBottom: 12 },
10271
+ h2: { ...theme.typography.h2, marginTop: 0, marginBottom: 12 },
10272
+ h3: { ...theme.typography.h3, marginTop: 0, marginBottom: 8 },
10273
+ h4: { ...theme.typography.h4, marginTop: 0, marginBottom: 8 },
10274
+ h5: { ...theme.typography.h5, marginTop: 0, marginBottom: 8 },
10275
+ h6: { ...theme.typography.h6, marginTop: 0, marginBottom: 8 },
10276
+ "& * + h1, & * + h2": { marginTop: 40 },
10277
+ "& * + h3": { marginTop: 32 },
10278
+ "& * + h4, & * + h5, & * + h6": { marginTop: 24 },
10177
10279
  // ─── Paragraph ──────────────────────────────────────────────
10178
10280
  p: {
10179
10281
  ...theme.typography.body1,
@@ -10365,6 +10467,9 @@ var ContentRoot = styled("div")(({ theme }) => ({
10365
10467
  fontWeight: 700,
10366
10468
  backgroundColor: alpha(theme.palette.grey[500], 0.08)
10367
10469
  },
10470
+ // Zebra rows. `:nth-of-type` (not `:nth-child`) is SSR-safe and
10471
+ // exactly equivalent here — a `<tbody>` contains only `<tr>`
10472
+ // children, so type-position and child-position coincide.
10368
10473
  "& tbody tr:nth-of-type(odd)": {
10369
10474
  backgroundColor: alpha(theme.palette.grey[500], 0.04)
10370
10475
  }
@@ -10538,7 +10643,10 @@ var ContentRoot = styled("div")(({ theme }) => ({
10538
10643
  },
10539
10644
  [`& .${contentClasses.tabsPanel}`]: {
10540
10645
  padding: theme.spacing(2),
10541
- "& > :first-of-type": { marginTop: 0 },
10646
+ // No `:first-child` reset needed: headings only take a top margin
10647
+ // when preceded by a sibling (see heading rules above) and
10648
+ // paragraphs carry only a bottom margin, so the panel's first
10649
+ // child never has an excess top margin. (SSR-safe.)
10542
10650
  "& > :last-child": { marginBottom: 0 }
10543
10651
  },
10544
10652
  // ─── Code block — title + copy button ───────────────────────
@@ -10594,7 +10702,9 @@ var ContentRoot = styled("div")(({ theme }) => ({
10594
10702
  // ─── Compact mode (chat messages, comments, etc.) ─────────
10595
10703
  [`&.${contentClasses.compact}`]: {
10596
10704
  "> * + *": { marginTop: 0, marginBottom: 2 },
10597
- "& > :first-of-type:not(p)": { marginTop: 4 },
10705
+ // (Dropped an SSR-unsafe `& > :first-child:not(p)` 4px top-margin
10706
+ // tweak — cosmetically negligible in compact mode, and `:first-child`
10707
+ // triggered Emotion's SSR warning.)
10598
10708
  "& h1, & h2, & h3, & h4, & h5, & h6": { marginTop: 0, marginBottom: 2 },
10599
10709
  h1: { fontSize: "1.25rem", fontWeight: 600, marginTop: 0, marginBottom: 2 },
10600
10710
  h2: { fontSize: "1.125rem", fontWeight: 600, marginTop: 0, marginBottom: 2 },
@@ -10636,6 +10746,25 @@ var ContentRoot = styled("div")(({ theme }) => ({
10636
10746
  }
10637
10747
  }
10638
10748
  }));
10749
+ function isSafeHref(url) {
10750
+ if (typeof url !== "string" || url.length === 0) return false;
10751
+ if (/[\x00-\x1f\x7f]/.test(url)) return false;
10752
+ if (url.startsWith("/") && !url.startsWith("//") && !url.startsWith("/\\")) return true;
10753
+ const lower = url.toLowerCase().trimStart();
10754
+ return lower.startsWith("http://") || lower.startsWith("https://");
10755
+ }
10756
+ function sanitizeHref(url) {
10757
+ return isSafeHref(url) ? url : void 0;
10758
+ }
10759
+ function sanitizeEmbedSrc(url) {
10760
+ if (typeof url !== "string") return void 0;
10761
+ if (!isSafeHref(url)) return void 0;
10762
+ const lower = url.toLowerCase();
10763
+ if (lower.startsWith("https://www.youtube.com/") || lower.startsWith("https://www.youtube-nocookie.com/")) {
10764
+ return url;
10765
+ }
10766
+ return void 0;
10767
+ }
10639
10768
  var customNodeRegistry = /* @__PURE__ */ new Map();
10640
10769
  function registerTipTapNode(type, component) {
10641
10770
  customNodeRegistry.set(type, component);
@@ -10654,8 +10783,14 @@ function renderMarks(text, marks = [], ctx) {
10654
10783
  return /* @__PURE__ */ jsx("u", { children: acc });
10655
10784
  case "strike":
10656
10785
  return /* @__PURE__ */ jsx("s", { children: acc });
10657
- case "link":
10658
- return /* @__PURE__ */ jsx("a", { href: mark.attrs?.href, target: mark.attrs?.target ?? "_blank", rel: "noopener noreferrer", children: acc });
10786
+ case "link": {
10787
+ const safeHref = sanitizeHref(mark.attrs?.href) ?? "#";
10788
+ const Link6 = ctx?.linkComponent;
10789
+ if (Link6 && safeHref.startsWith("/") && !safeHref.startsWith("//")) {
10790
+ return /* @__PURE__ */ jsx(Link6, { to: safeHref, className: contentClasses.link, children: acc });
10791
+ }
10792
+ return /* @__PURE__ */ jsx("a", { href: safeHref, target: mark.attrs?.target ?? "_blank", rel: "noopener noreferrer", children: acc });
10793
+ }
10659
10794
  case "internalLink": {
10660
10795
  const to = String(mark.attrs?.to ?? mark.attrs?.href ?? "#");
10661
10796
  const Link6 = ctx?.linkComponent;
@@ -10685,7 +10820,6 @@ function slugify(nodes) {
10685
10820
  function CodeBlock({ node }) {
10686
10821
  const language = node.attrs?.language;
10687
10822
  const title = node.attrs?.title;
10688
- const html = node.attrs?.html;
10689
10823
  const code = node.content?.map((n) => n.text ?? "").join("\n") ?? "";
10690
10824
  const [copied, setCopied] = useState(false);
10691
10825
  const onCopy = useCallback(() => {
@@ -10703,11 +10837,7 @@ function CodeBlock({ node }) {
10703
10837
  /* @__PURE__ */ jsx("span", { children: title ?? language }),
10704
10838
  /* @__PURE__ */ jsx("button", { type: "button", onClick: onCopy, className: contentClasses.codeBlockCopy, "aria-label": "Copy code", children: copied ? "\u2713" : "\u29C9" })
10705
10839
  ] }),
10706
- html ? (
10707
- // Shiki-rendered HTML is pre-sanitised at build time and contains only
10708
- // <pre>/<code>/<span> tags with style attributes. Safe to inject.
10709
- /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: html } })
10710
- ) : /* @__PURE__ */ jsx("pre", { children: /* @__PURE__ */ jsx("code", { className: language ? `language-${language}` : void 0, children: code }) })
10840
+ /* @__PURE__ */ jsx("pre", { children: /* @__PURE__ */ jsx("code", { className: language ? `language-${language}` : void 0, children: code }) })
10711
10841
  ] });
10712
10842
  }
10713
10843
  var ADMONITION_LABEL = {
@@ -10795,11 +10925,13 @@ function renderNode(node, index) {
10795
10925
  return /* @__PURE__ */ jsx(CodeBlock, { node }, index);
10796
10926
  case "horizontalRule":
10797
10927
  return /* @__PURE__ */ jsx("hr", {}, index);
10798
- case "image":
10928
+ case "image": {
10929
+ const safeSrc = sanitizeHref(node.attrs?.src);
10930
+ if (!safeSrc) return null;
10799
10931
  return /* @__PURE__ */ jsx(
10800
10932
  "img",
10801
10933
  {
10802
- src: node.attrs?.src,
10934
+ src: safeSrc,
10803
10935
  alt: node.attrs?.alt ?? "",
10804
10936
  title: node.attrs?.title,
10805
10937
  className: contentClasses.image,
@@ -10807,6 +10939,7 @@ function renderNode(node, index) {
10807
10939
  },
10808
10940
  index
10809
10941
  );
10942
+ }
10810
10943
  case "figure":
10811
10944
  return /* @__PURE__ */ jsx("figure", { className: contentClasses.figure, children: node.content?.map(renderNode) }, index);
10812
10945
  case "figcaption":
@@ -10822,7 +10955,7 @@ function renderNode(node, index) {
10822
10955
  return /* @__PURE__ */ jsx("section", { "data-type": "tabItem", children: node.content?.map(renderNode) }, index);
10823
10956
  // ─── Table ──────────────────────────────────────────────
10824
10957
  case "table":
10825
- return /* @__PURE__ */ jsx("div", { style: { overflowX: "auto" }, children: /* @__PURE__ */ jsx("table", { children: node.content?.map(renderNode) }) }, index);
10958
+ return /* @__PURE__ */ jsx("div", { style: { overflowX: "auto" }, children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsx("tbody", { children: node.content?.map(renderNode) }) }) }, index);
10826
10959
  case "tableRow":
10827
10960
  return /* @__PURE__ */ jsx("tr", { children: node.content?.map(renderNode) }, index);
10828
10961
  case "tableCell":
@@ -10838,12 +10971,12 @@ function renderNode(node, index) {
10838
10971
  return /* @__PURE__ */ jsx("div", { children: node.content?.map(renderNode) }, index);
10839
10972
  // ─── YouTube embed ──────────────────────────────────────
10840
10973
  case "youtube": {
10841
- const src = node.attrs?.src;
10842
- if (!src) return null;
10974
+ const safeSrc = sanitizeEmbedSrc(node.attrs?.src);
10975
+ if (!safeSrc) return null;
10843
10976
  return /* @__PURE__ */ jsx("div", { style: { position: "relative", paddingBottom: "56.25%", height: 0, marginBottom: "1.25rem" }, children: /* @__PURE__ */ jsx(
10844
10977
  "iframe",
10845
10978
  {
10846
- src,
10979
+ src: safeSrc,
10847
10980
  title: "YouTube video",
10848
10981
  allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
10849
10982
  allowFullScreen: true,
@@ -11139,7 +11272,21 @@ function escapeHtml(str) {
11139
11272
  function isExternalLink2(href) {
11140
11273
  return /^https?:\/\//.test(href) || href.startsWith("//");
11141
11274
  }
11142
- var defaultRehypePlugins = [rehypeRaw, rehypeHighlight];
11275
+ var SAFE_CLASS_RE = /^(prism-content__[a-z0-9_-]+|hljs(-[a-z0-9-]+)?|language-[a-z0-9+#-]+)$/i;
11276
+ var spoilerSanitizeSchema = {
11277
+ ...defaultSchema,
11278
+ attributes: {
11279
+ ...defaultSchema.attributes,
11280
+ span: [...defaultSchema.attributes?.["span"] ?? [], ["className", SAFE_CLASS_RE]],
11281
+ code: [...defaultSchema.attributes?.["code"] ?? [], ["className", SAFE_CLASS_RE]],
11282
+ div: [...defaultSchema.attributes?.["div"] ?? [], ["className", SAFE_CLASS_RE]]
11283
+ }
11284
+ };
11285
+ var defaultRehypePlugins = [
11286
+ rehypeRaw,
11287
+ [rehypeSanitize, spoilerSanitizeSchema],
11288
+ rehypeHighlight
11289
+ ];
11143
11290
  var defaultRemarkPlugins = [
11144
11291
  [remarkGfm, { singleTilde: false }],
11145
11292
  remarkSpoiler
@@ -11205,6 +11352,16 @@ function CheckboxInput(props) {
11205
11352
  function isTipTapDoc(value) {
11206
11353
  return typeof value === "object" && value !== null && "type" in value && value.type === "doc" && "content" in value && Array.isArray(value.content);
11207
11354
  }
11355
+ function tryParseTipTapJson(value) {
11356
+ const trimmed = value.trimStart();
11357
+ if (!trimmed.startsWith("{")) return null;
11358
+ try {
11359
+ const parsed = JSON.parse(trimmed);
11360
+ return isTipTapDoc(parsed) ? parsed : null;
11361
+ } catch {
11362
+ return null;
11363
+ }
11364
+ }
11208
11365
  function ContentRenderer({
11209
11366
  content,
11210
11367
  className,
@@ -11222,6 +11379,10 @@ function ContentRenderer({
11222
11379
  }
11223
11380
  if (typeof content === "string") {
11224
11381
  if (!content.trim()) return null;
11382
+ const docFromJson = tryParseTipTapJson(content);
11383
+ if (docFromJson) {
11384
+ return /* @__PURE__ */ jsx(TipTapRenderer, { content: docFromJson, className, sx, compact });
11385
+ }
11225
11386
  return /* @__PURE__ */ jsx(
11226
11387
  Markdown,
11227
11388
  {
@@ -11236,20 +11397,20 @@ function ContentRenderer({
11236
11397
  }
11237
11398
  return null;
11238
11399
  }
11239
- var HOUR = 3600;
11240
- var DAY = 86400;
11400
+ var HOUR2 = 3600;
11401
+ var DAY2 = 86400;
11241
11402
  var WEEK = 604800;
11242
11403
  var PRESETS = [
11243
- { label: "1h", value: HOUR, key: "1h" },
11244
- { label: "6h", value: 6 * HOUR, key: "6h" },
11245
- { label: "1d", value: DAY, key: "1d" },
11246
- { label: "7d", value: 7 * DAY, key: "7d" },
11247
- { label: "30d", value: 30 * DAY, key: "30d" },
11404
+ { label: "1h", value: HOUR2, key: "1h" },
11405
+ { label: "6h", value: 6 * HOUR2, key: "6h" },
11406
+ { label: "1d", value: DAY2, key: "1d" },
11407
+ { label: "7d", value: 7 * DAY2, key: "7d" },
11408
+ { label: "30d", value: 30 * DAY2, key: "30d" },
11248
11409
  { label: "\u221E", value: null, key: "permanent" }
11249
11410
  ];
11250
11411
  var UNIT_SECONDS = {
11251
- hours: HOUR,
11252
- days: DAY,
11412
+ hours: HOUR2,
11413
+ days: DAY2,
11253
11414
  weeks: WEEK
11254
11415
  };
11255
11416
  var CUSTOM_KEY = "custom";
@@ -11259,12 +11420,14 @@ function resolveActiveKey(value) {
11259
11420
  }
11260
11421
  function decomposeSeconds(seconds) {
11261
11422
  if (seconds > 0 && seconds % WEEK === 0) return { amount: seconds / WEEK, unit: "weeks" };
11262
- if (seconds > 0 && seconds % DAY === 0) return { amount: seconds / DAY, unit: "days" };
11263
- return { amount: Math.max(1, Math.round(seconds / HOUR)), unit: "hours" };
11423
+ if (seconds > 0 && seconds % DAY2 === 0) return { amount: seconds / DAY2, unit: "days" };
11424
+ return { amount: Math.max(1, Math.round(seconds / HOUR2)), unit: "hours" };
11264
11425
  }
11265
11426
  function DurationPicker({ value, onChange, size = "small", disabled = false, labels }) {
11266
11427
  const theme = useTheme();
11267
- const activeKey = useMemo(() => resolveActiveKey(value), [value]);
11428
+ const presetKey = useMemo(() => resolveActiveKey(value), [value]);
11429
+ const [customChosen, setCustomChosen] = useState(() => presetKey === CUSTOM_KEY);
11430
+ const activeKey = customChosen || presetKey === CUSTOM_KEY ? CUSTOM_KEY : presetKey;
11268
11431
  const [customAmount, setCustomAmount] = useState(() => {
11269
11432
  if (activeKey === CUSTOM_KEY && value !== null && value > 0) {
11270
11433
  return decomposeSeconds(value).amount;
@@ -11277,28 +11440,38 @@ function DurationPicker({ value, onChange, size = "small", disabled = false, lab
11277
11440
  }
11278
11441
  return "hours";
11279
11442
  });
11443
+ const [customText, setCustomText] = useState(() => String(customAmount));
11280
11444
  const isCustom = activeKey === CUSTOM_KEY;
11281
11445
  const handlePresetChange = useCallback(
11282
11446
  (_, newKey) => {
11283
11447
  if (newKey === null) return;
11284
11448
  if (newKey === CUSTOM_KEY) {
11449
+ setCustomChosen(true);
11285
11450
  onChange(customAmount * UNIT_SECONDS[customUnit]);
11286
11451
  return;
11287
11452
  }
11288
11453
  const preset = PRESETS.find((p) => p.key === newKey);
11289
- if (preset) onChange(preset.value);
11454
+ if (preset) {
11455
+ setCustomChosen(false);
11456
+ onChange(preset.value);
11457
+ }
11290
11458
  },
11291
11459
  [onChange, customAmount, customUnit]
11292
11460
  );
11293
11461
  const handleCustomAmountChange = useCallback(
11294
11462
  (e) => {
11295
- const raw = parseInt(e.target.value, 10);
11296
- const clamped = Number.isFinite(raw) && raw > 0 ? raw : 1;
11297
- setCustomAmount(clamped);
11298
- onChange(clamped * UNIT_SECONDS[customUnit]);
11463
+ const text = e.target.value;
11464
+ setCustomText(text);
11465
+ const parsed = parseInt(text, 10);
11466
+ if (!Number.isFinite(parsed) || parsed <= 0) return;
11467
+ setCustomAmount(parsed);
11468
+ onChange(parsed * UNIT_SECONDS[customUnit]);
11299
11469
  },
11300
11470
  [onChange, customUnit]
11301
11471
  );
11472
+ const handleCustomAmountBlur = useCallback(() => {
11473
+ setCustomText(String(customAmount));
11474
+ }, [customAmount]);
11302
11475
  const handleCustomUnitChange = useCallback(
11303
11476
  (e) => {
11304
11477
  const unit = e.target.value;
@@ -11348,7 +11521,7 @@ function DurationPicker({ value, onChange, size = "small", disabled = false, lab
11348
11521
  ToggleButtonGroup,
11349
11522
  {
11350
11523
  exclusive: true,
11351
- value: isCustom ? CUSTOM_KEY : activeKey,
11524
+ value: activeKey,
11352
11525
  onChange: handlePresetChange,
11353
11526
  size,
11354
11527
  disabled,
@@ -11360,7 +11533,14 @@ function DurationPicker({ value, onChange, size = "small", disabled = false, lab
11360
11533
  border: "1px solid",
11361
11534
  borderRadius: "8px !important",
11362
11535
  borderColor: alpha(theme.palette.divider, 0.2),
11363
- "&:not(:first-of-type)": {
11536
+ // Position-class selectors replace the deprecated
11537
+ // `:not(:first-of-type)` sibling pattern (MUI v9 tags
11538
+ // children with firstButton/middleButton/lastButton via
11539
+ // ToggleButtonGroupButtonContext). gap:0.5 above means
11540
+ // we want INDEPENDENT borders on every button (no
11541
+ // overlap/collapse), so restore left border + zero out
11542
+ // MUI's default `margin-left: -1px` on middle/last.
11543
+ "&.MuiToggleButtonGroup-middleButton, &.MuiToggleButtonGroup-lastButton": {
11364
11544
  borderLeft: "1px solid",
11365
11545
  borderColor: alpha(theme.palette.divider, 0.2),
11366
11546
  marginLeft: 0
@@ -11387,8 +11567,9 @@ function DurationPicker({ value, onChange, size = "small", disabled = false, lab
11387
11567
  TextField2,
11388
11568
  {
11389
11569
  type: "number",
11390
- value: customAmount,
11570
+ value: customText,
11391
11571
  onChange: handleCustomAmountChange,
11572
+ onBlur: handleCustomAmountBlur,
11392
11573
  disabled,
11393
11574
  size,
11394
11575
  slotProps: {
@@ -11457,7 +11638,7 @@ function ChangelogEntry({ version, date, badge, children }) {
11457
11638
  }
11458
11639
  }
11459
11640
  ),
11460
- /* @__PURE__ */ jsxs(MuiCard, { variant: "outlined", sx: { p: 3 }, children: [
11641
+ /* @__PURE__ */ jsxs(Card2, { variant: "outlined", sx: { p: 3 }, children: [
11461
11642
  /* @__PURE__ */ jsxs(
11462
11643
  Stack,
11463
11644
  {
@@ -11490,7 +11671,308 @@ function ChangelogEntry({ version, date, badge, children }) {
11490
11671
  ] })
11491
11672
  ] });
11492
11673
  }
11674
+ var pmtilesProtocolRegistered = false;
11675
+ function ensurePmtilesProtocol() {
11676
+ if (pmtilesProtocolRegistered) return;
11677
+ const protocol = new Protocol();
11678
+ addProtocol("pmtiles", protocol.tile);
11679
+ pmtilesProtocolRegistered = true;
11680
+ }
11681
+ var DEFAULT_VIEWPORT = {
11682
+ longitude: 37.6173,
11683
+ latitude: 55.7558,
11684
+ zoom: 4,
11685
+ bearing: 0,
11686
+ pitch: 0
11687
+ };
11688
+ var FALLBACK_STYLE = {
11689
+ version: 8,
11690
+ sources: {},
11691
+ layers: [
11692
+ {
11693
+ id: "background",
11694
+ type: "background",
11695
+ paint: { "background-color": "#e0e0e0" }
11696
+ }
11697
+ ]
11698
+ };
11699
+ var Map2 = forwardRef(function MapView({
11700
+ styleUrl,
11701
+ viewport,
11702
+ initialViewport,
11703
+ onViewportChange,
11704
+ showNavigation = true,
11705
+ showScale = true,
11706
+ showAttribution = true,
11707
+ style,
11708
+ cursor = "grab",
11709
+ onClick,
11710
+ children
11711
+ }, ref) {
11712
+ const theme = useTheme();
11713
+ useEffect(() => {
11714
+ ensurePmtilesProtocol();
11715
+ }, []);
11716
+ const mapStyle = useMemo(() => {
11717
+ if (styleUrl) return styleUrl;
11718
+ const envUrl = typeof window !== "undefined" && window.__MAP_STYLE_URL__;
11719
+ if (typeof envUrl === "string" && envUrl.length > 0) return envUrl;
11720
+ return FALLBACK_STYLE;
11721
+ }, [styleUrl]);
11722
+ const initial = useMemo(
11723
+ () => ({ ...DEFAULT_VIEWPORT, ...initialViewport }),
11724
+ [initialViewport]
11725
+ );
11726
+ const handleMove = onViewportChange ? (e) => {
11727
+ const v = e.viewState;
11728
+ onViewportChange({
11729
+ longitude: v.longitude,
11730
+ latitude: v.latitude,
11731
+ zoom: v.zoom,
11732
+ bearing: v.bearing,
11733
+ pitch: v.pitch
11734
+ });
11735
+ } : void 0;
11736
+ const containerStyle = {
11737
+ width: "100%",
11738
+ height: 400,
11739
+ borderRadius: theme.shape.borderRadius,
11740
+ overflow: "hidden",
11741
+ ...style
11742
+ };
11743
+ return /* @__PURE__ */ jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsxs(
11744
+ Map$1,
11745
+ {
11746
+ ref,
11747
+ mapStyle,
11748
+ ...viewport ? {
11749
+ longitude: viewport.longitude ?? initial.longitude,
11750
+ latitude: viewport.latitude ?? initial.latitude,
11751
+ zoom: viewport.zoom ?? initial.zoom,
11752
+ bearing: viewport.bearing ?? initial.bearing,
11753
+ pitch: viewport.pitch ?? initial.pitch
11754
+ } : {
11755
+ initialViewState: initial
11756
+ },
11757
+ onMove: handleMove,
11758
+ onClick: onClick ? (e) => onClick({ lngLat: e.lngLat }) : void 0,
11759
+ cursor,
11760
+ attributionControl: showAttribution ? {} : false,
11761
+ style: { width: "100%", height: "100%" },
11762
+ children: [
11763
+ showNavigation && /* @__PURE__ */ jsx(NavigationControl, { position: "top-right" }),
11764
+ showScale && /* @__PURE__ */ jsx(ScaleControl, { position: "bottom-left" }),
11765
+ children
11766
+ ]
11767
+ }
11768
+ ) });
11769
+ });
11770
+ Map2.displayName = "Map";
11771
+ function MapMarker({
11772
+ longitude,
11773
+ latitude,
11774
+ color,
11775
+ children,
11776
+ popup,
11777
+ anchor = "bottom",
11778
+ onClick
11779
+ }) {
11780
+ const theme = useTheme();
11781
+ const [open, setOpen] = useState(false);
11782
+ const fill = color ?? theme.palette.primary.main;
11783
+ const handleClick = (e) => {
11784
+ e.originalEvent?.stopPropagation?.();
11785
+ if (popup) setOpen((v) => !v);
11786
+ onClick?.();
11787
+ };
11788
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
11789
+ /* @__PURE__ */ jsx(
11790
+ Marker,
11791
+ {
11792
+ longitude,
11793
+ latitude,
11794
+ anchor,
11795
+ onClick: handleClick,
11796
+ children: children ?? /* @__PURE__ */ jsxs("svg", { width: "24", height: "32", viewBox: "0 0 24 32", "aria-hidden": true, style: { display: "block" }, children: [
11797
+ /* @__PURE__ */ jsx(
11798
+ "path",
11799
+ {
11800
+ d: "M12 0C5.4 0 0 5.4 0 12c0 9 12 20 12 20s12-11 12-20C24 5.4 18.6 0 12 0z",
11801
+ fill
11802
+ }
11803
+ ),
11804
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "4", fill: "#fff" })
11805
+ ] })
11806
+ }
11807
+ ),
11808
+ popup && open && /* @__PURE__ */ jsx(
11809
+ Popup,
11810
+ {
11811
+ longitude,
11812
+ latitude,
11813
+ anchor: "top",
11814
+ offset: [0, -32],
11815
+ closeOnClick: false,
11816
+ onClose: () => setOpen(false),
11817
+ children: popup
11818
+ }
11819
+ )
11820
+ ] });
11821
+ }
11822
+ function MapPointPicker({
11823
+ value,
11824
+ onChange,
11825
+ initialViewport,
11826
+ styleUrl,
11827
+ height = 480,
11828
+ geocodeResult,
11829
+ geocodeLoading = false,
11830
+ placeholder = "\u041A\u043B\u0438\u043A\u043D\u0438\u0442\u0435 \u043F\u043E \u043A\u0430\u0440\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u043E\u0447\u043A\u0443"
11831
+ }) {
11832
+ const theme = useTheme();
11833
+ const handleClick = useCallback(
11834
+ (e) => onChange({ lng: e.lngLat.lng, lat: e.lngLat.lat }),
11835
+ [onChange]
11836
+ );
11837
+ const handleDragEnd = useCallback(
11838
+ (e) => {
11839
+ onChange({ lng: e.lngLat.lng, lat: e.lngLat.lat });
11840
+ },
11841
+ [onChange]
11842
+ );
11843
+ return /* @__PURE__ */ jsxs(Stack$1, { direction: { xs: "column", md: "row" }, spacing: 2, sx: { width: "100%" }, children: [
11844
+ /* @__PURE__ */ jsx(Box, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx(
11845
+ Map2,
11846
+ {
11847
+ styleUrl,
11848
+ initialViewport,
11849
+ cursor: "crosshair",
11850
+ onClick: handleClick,
11851
+ style: { height },
11852
+ children: value && /* @__PURE__ */ jsx(
11853
+ Marker,
11854
+ {
11855
+ longitude: value.lng,
11856
+ latitude: value.lat,
11857
+ anchor: "bottom",
11858
+ draggable: true,
11859
+ onDragEnd: handleDragEnd,
11860
+ children: /* @__PURE__ */ jsxs("svg", { width: "24", height: "32", viewBox: "0 0 24 32", "aria-hidden": true, style: { display: "block" }, children: [
11861
+ /* @__PURE__ */ jsx(
11862
+ "path",
11863
+ {
11864
+ d: "M12 0C5.4 0 0 5.4 0 12c0 9 12 20 12 20s12-11 12-20C24 5.4 18.6 0 12 0z",
11865
+ fill: theme.palette.error.main
11866
+ }
11867
+ ),
11868
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "4", fill: "#fff" })
11869
+ ] })
11870
+ }
11871
+ )
11872
+ }
11873
+ ) }),
11874
+ /* @__PURE__ */ jsx(
11875
+ Paper$1,
11876
+ {
11877
+ variant: "outlined",
11878
+ sx: {
11879
+ width: { xs: "100%", md: 320 },
11880
+ p: 2,
11881
+ borderColor: theme.palette.divider,
11882
+ bgcolor: theme.palette.background.default
11883
+ },
11884
+ children: value ? /* @__PURE__ */ jsxs(Stack$1, { spacing: 1.5, children: [
11885
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: "\u041A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0442\u044B" }),
11886
+ /* @__PURE__ */ jsxs(Typography, { variant: "body2", sx: { fontVariantNumeric: "tabular-nums" }, children: [
11887
+ value.lat.toFixed(5),
11888
+ ", ",
11889
+ value.lng.toFixed(5)
11890
+ ] }),
11891
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: "\u0420\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D\u043E\u0435 \u043C\u0435\u0441\u0442\u043E" }),
11892
+ geocodeLoading ? /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
11893
+ /* @__PURE__ */ jsx(CircularProgress$1, { size: 16 }),
11894
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", children: "\u0413\u0435\u043E\u043A\u043E\u0434\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435\u2026" })
11895
+ ] }) : geocodeResult ? /* @__PURE__ */ jsx(Box, { children: geocodeResult }) : /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", children: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445" })
11896
+ ] }) : /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", children: placeholder })
11897
+ }
11898
+ )
11899
+ ] });
11900
+ }
11901
+ function MapCoverageLayer({
11902
+ id,
11903
+ points,
11904
+ colorByStatus,
11905
+ radius = 6,
11906
+ showLabels = false
11907
+ }) {
11908
+ const theme = useTheme();
11909
+ const palette = useMemo(
11910
+ () => ({
11911
+ active: theme.palette.success.main,
11912
+ pending: theme.palette.warning.main,
11913
+ expired: theme.palette.text.disabled,
11914
+ disabled: theme.palette.text.disabled,
11915
+ retired: theme.palette.text.disabled,
11916
+ ...colorByStatus ?? {}
11917
+ }),
11918
+ [theme, colorByStatus]
11919
+ );
11920
+ const geojson = useMemo(
11921
+ () => ({
11922
+ type: "FeatureCollection",
11923
+ features: points.map((p) => ({
11924
+ type: "Feature",
11925
+ id: p.id,
11926
+ geometry: {
11927
+ type: "Point",
11928
+ coordinates: [p.longitude, p.latitude]
11929
+ },
11930
+ properties: {
11931
+ status: p.status ?? "active",
11932
+ label: p.label ?? "",
11933
+ color: palette[p.status ?? "active"] ?? theme.palette.primary.main
11934
+ }
11935
+ }))
11936
+ }),
11937
+ [points, palette, theme]
11938
+ );
11939
+ return /* @__PURE__ */ jsxs(Source, { id, type: "geojson", data: geojson, children: [
11940
+ /* @__PURE__ */ jsx(
11941
+ Layer,
11942
+ {
11943
+ id: `${id}-circles`,
11944
+ type: "circle",
11945
+ paint: {
11946
+ "circle-radius": radius,
11947
+ "circle-color": ["get", "color"],
11948
+ "circle-stroke-color": theme.palette.background.paper,
11949
+ "circle-stroke-width": 1.5
11950
+ }
11951
+ }
11952
+ ),
11953
+ showLabels && /* @__PURE__ */ jsx(
11954
+ Layer,
11955
+ {
11956
+ id: `${id}-labels`,
11957
+ type: "symbol",
11958
+ minzoom: 11,
11959
+ layout: {
11960
+ "text-field": ["get", "label"],
11961
+ "text-size": 11,
11962
+ "text-offset": [0, 1.2],
11963
+ "text-anchor": "top",
11964
+ "text-font": ["Noto Sans Regular"]
11965
+ },
11966
+ paint: {
11967
+ "text-color": theme.palette.text.primary,
11968
+ "text-halo-color": theme.palette.background.paper,
11969
+ "text-halo-width": 1
11970
+ }
11971
+ }
11972
+ )
11973
+ ] });
11974
+ }
11493
11975
 
11494
- export { Accordion, AdminDataTable, Alert2 as Alert, AmountCell, AnimateBorder, Avatar, Badge2 as Badge, BooleanLabel, Breadcrumbs, Card, CardGrid, CardSection, CardSkeleton, Carousel, ChangelogEntry, ChangelogTimeline, Chart, ChartLegends, ChartLoading, CircularProgress2 as CircularProgress, CommandPalette, ConfirmDialog, ContentRenderer, ContentRoot, ContextMenu, CountBadge, CountdownRing, CountrySelect, CustomAvatarGroup, DEFAULT_CLASS_PREFIX, DateRangeInput, DateRangePicker, DeleteDialog, DocLayout, DocSectionNav, DocSidebar, Drawer2 as Drawer, DurationPicker, EmptyContent, ErrorBoundary, FilterToolbar, FlagIcon, FormAlert, Image, ImageWithDefault, InlineAlert, Label, Lightbox, LinearProgress3 as LinearProgress, LoadingEmptyContent, LoadingScreen, Markdown, MegaMenuHorizontal, MegaMenuMobile, MegaMenuVertical, Menu, MotionLazy, Nav, NavArrow2 as NavArrow, NavCard, NavCardGrid, NavIcon, NavInfo, NavItem, NavItemBase, NavLi, NavList, NavSectionHorizontal, NavSectionMini, NavSectionVertical, NavSubList, NavSubheader, NavTexts, NavUl, NavigationProgress, PageContent, ProgressBar, ScrollSpyProvider, ScrollSpySection, ScrollToTop, Scrollbar, SearchEmptyContent, SettingsDrawer, SettingsProvider, SimpleAccordion, SimpleSnackbar, Skeleton3 as Skeleton, SnackbarProvider, Spinner, SplashScreen, StatCard, StatusChip, StatusDot, StatusLabel, Stepper, StepperActions, SvgColor, TabPanel, Table, TableSkeleton, Tabs, TagCloud, TipTapRenderer, Tooltip2 as Tooltip, VirtualList, animateBorderClasses, buildUrl, carouselClasses, chartClasses, cn, contentClasses, createClasses, createClassesObject, createComponentClasses, createIconComponent, formatDateString, getClassPrefix, getErrorLocation, getNavCssVars, getQueryParam, hasParams, htmlToMarkdown, isActiveLink, isEqualPath, isExternalLink, isExternalUrl, isMarkdownContent, lightboxClasses, megaMenuClasses, megaMenuCssVars, mergeClasses, navSectionClasses, navSectionCssVars, parseDateString, parseQueryParams, parseStackTrace, registerTipTapNode, removeLastSlash, removeParams, safeReturnUrl, setClassPrefix, useAccordion, useCarousel, useChart, useDateRangePicker, useErrorBoundary, useLightbox, useMenu, useScrollSpy, useSettings, useSettingsDrawer, useSnackbar, useStepper, useTable, useTabs };
11495
- //# sourceMappingURL=chunk-A2Z7NVGL.js.map
11496
- //# sourceMappingURL=chunk-A2Z7NVGL.js.map
11976
+ export { Accordion, AdminDataTable, Alert2 as Alert, AmountCell, AnimateBorder, Avatar, Badge2 as Badge, BooleanLabel, Breadcrumbs, COIN_DISPLAY_DECIMALS, COIN_WIRE_DECIMALS, Card, CardGrid, CardSection, CardSkeleton, Carousel, ChangelogEntry, ChangelogTimeline, Chart, ChartLegends, ChartLoading, CircularProgress2 as CircularProgress, CommandPalette, ConfirmDialog, ContentRenderer, ContentRoot, ContextMenu, CountBadge, CountdownRing, CountrySelect, CustomAvatarGroup, DEFAULT_CLASS_PREFIX, DEFAULT_LIGHTBOX_LABELS, DEFAULT_SPONSORED_SLOT_LABELS, DateRangeInput, DateRangePicker, DeadlineChip, DeleteDialog, DocLayout, DocSectionNav, DocSidebar, Drawer2 as Drawer, DurationPicker, FilterToolbar, FlagIcon, FormAlert, Image, ImageWithDefault, InlineAlert, Label, Lightbox, LinearProgress3 as LinearProgress, LoadingScreen, Map2 as Map, MapCoverageLayer, MapMarker, MapPointPicker, Markdown, MegaMenuHorizontal, MegaMenuMobile, MegaMenuVertical, Menu, MotionLazy, Nav, NavArrow2 as NavArrow, NavCard, NavCardGrid, NavIcon, NavInfo, NavItem, NavItemBase, NavLi, NavList, NavSectionHorizontal, NavSectionMini, NavSectionVertical, NavSubList, NavSubheader, NavTexts, NavUl, NavigationProgress, PageContent, ProgressBar, Rail, ScrollSpyProvider, ScrollSpySection, ScrollToTop, Scrollbar, SettingsDrawer, SettingsProvider, SimpleAccordion, SimpleSnackbar, Skeleton5 as Skeleton, SnackbarProvider, Spinner, SplashScreen, SponsoredSlot, StatCard, StatusChip, StatusDot, StatusLabel, Stepper, StepperActions, SvgColor, TabPanel, Table, TableSkeleton, Tabs, TagCloud, TipTapRenderer, Tooltip3 as Tooltip, VirtualList, animateBorderClasses, buildUrl, carouselClasses, chartClasses, cn, contentClasses, createClasses, createClassesObject, createComponentClasses, createIconComponent, deadlineUrgency, formatCoinAmount, formatCoinAmountList, formatDateString, formatDecimalString, fromScaledInteger, getClassPrefix, getCoinDecimals, getCoinWireDecimals, getNavCssVars, getQueryParam, hasParams, htmlToMarkdown, isActiveLink, isEqualPath, isExternalLink, isExternalUrl, isMarkdownContent, lightboxClasses, megaMenuClasses, megaMenuCssVars, mergeClasses, navSectionClasses, navSectionCssVars, parseDateString, parseQueryParams, registerTipTapNode, relativeTimeLeft, removeLastSlash, removeParams, safeReturnUrl, setClassPrefix, subtractDecimalStrings, sumDecimalStrings, toScaledInteger, useAccordion, useCarousel, useChart, useDateRangePicker, useLightbox, useMenu, useScrollSpy, useSettings, useSettingsDrawer, useSnackbar, useStepper, useTable, useTabs };
11977
+ //# sourceMappingURL=chunk-YQW43BDH.js.map
11978
+ //# sourceMappingURL=chunk-YQW43BDH.js.map