@pstdio/ui 0.25.0 → 0.35.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 (607) hide show
  1. package/README.md +8 -1
  2. package/dist/EquationComponent-DDd5UoIP.js +65 -0
  3. package/dist/EquationComponent-DDd5UoIP.js.map +1 -0
  4. package/dist/MermaidComponent-DGDnQ6pb.js +90 -0
  5. package/dist/MermaidComponent-DGDnQ6pb.js.map +1 -0
  6. package/dist/browser-storage-C_ipoNwP.js +37 -0
  7. package/dist/browser-storage-C_ipoNwP.js.map +1 -0
  8. package/dist/chat-ui.d.ts +688 -2
  9. package/dist/chat-ui.js +3272 -2763
  10. package/dist/chat-ui.js.map +1 -1
  11. package/dist/data-table-stats-row-DNJG8tLZ.js +415 -0
  12. package/dist/data-table-stats-row-DNJG8tLZ.js.map +1 -0
  13. package/dist/data-table.d.ts +143 -2
  14. package/dist/data-table.js +1216 -1188
  15. package/dist/data-table.js.map +1 -1
  16. package/dist/diff-bubble-DZsarmSG.js +61 -0
  17. package/dist/diff-bubble-DZsarmSG.js.map +1 -0
  18. package/dist/diff-drawer-45rpk3aq.js +776 -0
  19. package/dist/diff-drawer-45rpk3aq.js.map +1 -0
  20. package/dist/diff-editor-CGpeyoCE.js +124 -0
  21. package/dist/diff-editor-CGpeyoCE.js.map +1 -0
  22. package/dist/diff-size-Dydn_Uw5.js +61 -0
  23. package/dist/diff-size-Dydn_Uw5.js.map +1 -0
  24. package/dist/diff-viewer-hGkaF_zW.js +558 -0
  25. package/dist/diff-viewer-hGkaF_zW.js.map +1 -0
  26. package/dist/diff.d.ts +128 -2
  27. package/dist/diff.js +163 -1300
  28. package/dist/diff.js.map +1 -1
  29. package/dist/empty-state-3mVV_pV-.js +38 -0
  30. package/dist/empty-state-3mVV_pV-.js.map +1 -0
  31. package/dist/file-change-badge-0QFNv82B.js +64 -0
  32. package/dist/file-change-badge-0QFNv82B.js.map +1 -0
  33. package/dist/index-BfFLdci8.d.ts +189 -0
  34. package/dist/index-Dd6e8lU_.d.ts +61 -0
  35. package/dist/index-DlmvvQ6x.d.ts +143 -0
  36. package/dist/index.d.ts +1508 -41
  37. package/dist/index.js +3167 -3173
  38. package/dist/index.js.map +1 -1
  39. package/dist/kanban-renderer.d.ts +337 -2
  40. package/dist/kanban-renderer.js +1413 -1084
  41. package/dist/kanban-renderer.js.map +1 -1
  42. package/dist/list-row-De9R2zKU.js +1008 -0
  43. package/dist/list-row-De9R2zKU.js.map +1 -0
  44. package/dist/mermaid-renderer-DImi0fDp.js +553 -0
  45. package/dist/mermaid-renderer-DImi0fDp.js.map +1 -0
  46. package/dist/mermaid.d.ts +12 -2
  47. package/dist/mermaid.js +2 -5
  48. package/dist/monaco-browser-CLRPSE4-.js +14 -0
  49. package/dist/monaco-browser-CLRPSE4-.js.map +1 -0
  50. package/dist/param-editor-IJzw1cA2.js +225 -0
  51. package/dist/param-editor-IJzw1cA2.js.map +1 -0
  52. package/dist/param-editor-field-DscIjv8s.js +2368 -0
  53. package/dist/param-editor-field-DscIjv8s.js.map +1 -0
  54. package/dist/param-editor.d.ts +407 -0
  55. package/dist/param-editor.js +3 -0
  56. package/dist/prism-pSHJejZx.js +646 -0
  57. package/dist/prism-pSHJejZx.js.map +1 -0
  58. package/dist/radio-CiFrDN6O.js +54 -0
  59. package/dist/radio-CiFrDN6O.js.map +1 -0
  60. package/dist/resource-badge-95WPVlZf.d.ts +76 -0
  61. package/dist/rich-text-DtQpHBlX.js +7018 -0
  62. package/dist/rich-text-DtQpHBlX.js.map +1 -0
  63. package/dist/rich-text.d.ts +3 -2
  64. package/dist/rich-text.js +2 -265
  65. package/dist/rolldown-runtime-Dy4uBu1J.js +11 -0
  66. package/dist/scroll-area-Cr1lNXAr.js +100 -0
  67. package/dist/scroll-area-Cr1lNXAr.js.map +1 -0
  68. package/dist/slider-hwHYe98I.js +423 -0
  69. package/dist/slider-hwHYe98I.js.map +1 -0
  70. package/dist/style.css +2 -1
  71. package/dist/terminal.d.ts +203 -2
  72. package/dist/terminal.js +324 -357
  73. package/dist/terminal.js.map +1 -1
  74. package/dist/theme-kSkOHzbV.js +2852 -0
  75. package/dist/theme-kSkOHzbV.js.map +1 -0
  76. package/dist/theme-preference-pzfuK5cH.js +101 -0
  77. package/dist/theme-preference-pzfuK5cH.js.map +1 -0
  78. package/dist/theme.d.ts +3 -2
  79. package/dist/theme.js +2 -15
  80. package/dist/tree-list-BUfDQz3v.js +1449 -0
  81. package/dist/tree-list-BUfDQz3v.js.map +1 -0
  82. package/dist/types-yjKBk07w.d.ts +161 -0
  83. package/dist/workspace-badge-9g78pXHS.js +245 -0
  84. package/dist/workspace-badge-9g78pXHS.js.map +1 -0
  85. package/dist/workspace-badge-CkJ_jTQw.d.ts +75 -0
  86. package/dist-monaco/assets/codicon-ngg6Pgfi.ttf +0 -0
  87. package/dist-monaco/assets/css.worker-DFdt6_zu.js +89 -0
  88. package/dist-monaco/assets/editor.worker-O-CH8JUO.js +26 -0
  89. package/dist-monaco/assets/html.worker-JUzsMP-j.js +502 -0
  90. package/dist-monaco/assets/json.worker-B4dEhy0e.js +58 -0
  91. package/dist-monaco/assets/ts.worker-CmEKzkmF.js +67734 -0
  92. package/dist-monaco/monaco.css +1 -0
  93. package/dist-monaco/monaco.js +1201 -0
  94. package/package.json +30 -12
  95. package/dist/EquationComponent-DeDYHvqY.js +0 -62
  96. package/dist/EquationComponent-DeDYHvqY.js.map +0 -1
  97. package/dist/MermaidComponent-BVdDqDRU.js +0 -60
  98. package/dist/MermaidComponent-BVdDqDRU.js.map +0 -1
  99. package/dist/browser-storage-DPtOQJx0.js +0 -127
  100. package/dist/browser-storage-DPtOQJx0.js.map +0 -1
  101. package/dist/components/activity/activity-avatar.d.ts +0 -9
  102. package/dist/components/activity/activity-comment.d.ts +0 -27
  103. package/dist/components/activity/activity-composer.d.ts +0 -18
  104. package/dist/components/activity/activity-event.d.ts +0 -12
  105. package/dist/components/activity/activity-root.d.ts +0 -15
  106. package/dist/components/activity/activity-timeline.d.ts +0 -6
  107. package/dist/components/activity/activity.types.d.ts +0 -5
  108. package/dist/components/activity/index.d.ts +0 -27
  109. package/dist/components/activity/resource-activity-feed.d.ts +0 -58
  110. package/dist/components/chat-ui/components/ai-conversation.d.ts +0 -603
  111. package/dist/components/chat-ui/components/ai-message.d.ts +0 -91
  112. package/dist/components/chat-ui/components/ai-response.d.ts +0 -5
  113. package/dist/components/chat-ui/components/approval-prompt.d.ts +0 -8
  114. package/dist/components/chat-ui/components/attachment-list.d.ts +0 -23
  115. package/dist/components/chat-ui/components/auto-scroll.d.ts +0 -37
  116. package/dist/components/chat-ui/components/chat-input-actions.d.ts +0 -13
  117. package/dist/components/chat-ui/components/chat-input-attachments.d.ts +0 -12
  118. package/dist/components/chat-ui/components/chat-input-question-prompt.d.ts +0 -36
  119. package/dist/components/chat-ui/components/chat-input.d.ts +0 -31
  120. package/dist/components/chat-ui/components/chat-message-animation.d.ts +0 -22
  121. package/dist/components/chat-ui/components/chat-message-list-items.d.ts +0 -17
  122. package/dist/components/chat-ui/components/chat-message-list.d.ts +0 -12
  123. package/dist/components/chat-ui/components/chat-panel-sticky-user-message.d.ts +0 -13
  124. package/dist/components/chat-ui/components/chat-panel.d.ts +0 -45
  125. package/dist/components/chat-ui/components/chat-skeleton.d.ts +0 -1
  126. package/dist/components/chat-ui/components/composer-constants.d.ts +0 -1
  127. package/dist/components/chat-ui/components/conversation-browse.d.ts +0 -22
  128. package/dist/components/chat-ui/components/message-action-panel.d.ts +0 -10
  129. package/dist/components/chat-ui/components/message-parts-renderer.d.ts +0 -13
  130. package/dist/components/chat-ui/components/message-types.d.ts +0 -116
  131. package/dist/components/chat-ui/components/model-swap-separator.d.ts +0 -5
  132. package/dist/components/chat-ui/components/queued-follow-up-list-state.d.ts +0 -4
  133. package/dist/components/chat-ui/components/queued-follow-up-list.d.ts +0 -11
  134. package/dist/components/chat-ui/components/send-button.d.ts +0 -7
  135. package/dist/components/chat-ui/components/timeline-title.d.ts +0 -6
  136. package/dist/components/chat-ui/components/timeline-tool-blocks.d.ts +0 -14
  137. package/dist/components/chat-ui/components/timeline.d.ts +0 -113
  138. package/dist/components/chat-ui/components/tool-invocation-timeline.d.ts +0 -8
  139. package/dist/components/chat-ui/components/working-indicator.d.ts +0 -9
  140. package/dist/components/chat-ui/components/workspace-hub.d.ts +0 -19
  141. package/dist/components/chat-ui/index.d.ts +0 -19
  142. package/dist/components/chat-ui/mocks/library/index.d.ts +0 -10
  143. package/dist/components/chat-ui/performance/chat-mount-metrics.d.ts +0 -37
  144. package/dist/components/chat-ui/performance/chat-panel.perf.d.ts +0 -18
  145. package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +0 -28
  146. package/dist/components/chat-ui/performance/chat-performance-panel.d.ts +0 -23
  147. package/dist/components/chat-ui/performance/chat-performance-story-utils.d.ts +0 -30
  148. package/dist/components/chat-ui/tool-rendering/apply-patch-renderer.d.ts +0 -2
  149. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +0 -13
  150. package/dist/components/chat-ui/tool-rendering/default-renderers.d.ts +0 -13
  151. package/dist/components/chat-ui/tool-rendering/edit-renderer.d.ts +0 -2
  152. package/dist/components/chat-ui/tool-rendering/index.d.ts +0 -3
  153. package/dist/components/chat-ui/tool-rendering/question-prompt.d.ts +0 -9
  154. package/dist/components/chat-ui/tool-rendering/question-renderer.d.ts +0 -10
  155. package/dist/components/chat-ui/tool-rendering/shared.d.ts +0 -53
  156. package/dist/components/chat-ui/tool-rendering/standard-renderers.d.ts +0 -7
  157. package/dist/components/chat-ui/tool-rendering/todowrite-renderer.d.ts +0 -10
  158. package/dist/components/chat-ui/tool-rendering/types.d.ts +0 -12
  159. package/dist/components/chat-ui/utils/diff.d.ts +0 -21
  160. package/dist/components/chat-ui/utils/editor-state.d.ts +0 -1
  161. package/dist/components/chat-ui/utils/get-icon.d.ts +0 -36
  162. package/dist/components/chat-ui/utils/tool-name.d.ts +0 -2
  163. package/dist/components/command-palette/index.d.ts +0 -4
  164. package/dist/components/command-palette/palette-filter.d.ts +0 -23
  165. package/dist/components/command-palette/palette-list.d.ts +0 -11
  166. package/dist/components/command-palette/palette-shortcut.d.ts +0 -12
  167. package/dist/components/command-palette/palette.d.ts +0 -48
  168. package/dist/components/data-table/build-columns.d.ts +0 -16
  169. package/dist/components/data-table/categorical-color-cell.d.ts +0 -8
  170. package/dist/components/data-table/color-cell-style.d.ts +0 -13
  171. package/dist/components/data-table/color-scale-cell.d.ts +0 -7
  172. package/dist/components/data-table/data-table-column-menu.d.ts +0 -17
  173. package/dist/components/data-table/data-table-header.d.ts +0 -12
  174. package/dist/components/data-table/data-table-row-display.d.ts +0 -11
  175. package/dist/components/data-table/data-table-skeleton.d.ts +0 -13
  176. package/dist/components/data-table/data-table-stat-chart.d.ts +0 -21
  177. package/dist/components/data-table/data-table-state.d.ts +0 -27
  178. package/dist/components/data-table/data-table-stats-row.d.ts +0 -11
  179. package/dist/components/data-table/data-table-stats.d.ts +0 -19
  180. package/dist/components/data-table/data-table-table-parts.d.ts +0 -22
  181. package/dist/components/data-table/data-table.d.ts +0 -2
  182. package/dist/components/data-table/data-table.story-descriptions.d.ts +0 -6
  183. package/dist/components/data-table/data-table.story-fixtures.d.ts +0 -6
  184. package/dist/components/data-table/edit-mode-data-table-body.d.ts +0 -30
  185. package/dist/components/data-table/edit-mode-data-table-cell.d.ts +0 -16
  186. package/dist/components/data-table/edit-mode-data-table-editors.d.ts +0 -19
  187. package/dist/components/data-table/edit-mode-data-table-header.d.ts +0 -24
  188. package/dist/components/data-table/edit-mode-data-table-selection.d.ts +0 -12
  189. package/dist/components/data-table/edit-mode-data-table.d.ts +0 -2
  190. package/dist/components/data-table/edit-mode-story.d.ts +0 -5
  191. package/dist/components/data-table/friendly-json-display.d.ts +0 -31
  192. package/dist/components/data-table/helpers.d.ts +0 -10
  193. package/dist/components/data-table/index.d.ts +0 -7
  194. package/dist/components/data-table/json-cell.d.ts +0 -6
  195. package/dist/components/data-table/pagination-footer.d.ts +0 -11
  196. package/dist/components/data-table/selection-toolbar.d.ts +0 -11
  197. package/dist/components/data-table/types.d.ts +0 -117
  198. package/dist/components/diff-viewer/build-changed-files-tree.d.ts +0 -4
  199. package/dist/components/diff-viewer/code-editor.d.ts +0 -43
  200. package/dist/components/diff-viewer/diff-bubble.d.ts +0 -14
  201. package/dist/components/diff-viewer/diff-card-body.d.ts +0 -60
  202. package/dist/components/diff-viewer/diff-card-content.d.ts +0 -23
  203. package/dist/components/diff-viewer/diff-card-load-state.d.ts +0 -9
  204. package/dist/components/diff-viewer/diff-card.d.ts +0 -46
  205. package/dist/components/diff-viewer/diff-drawer-empty-state.d.ts +0 -1
  206. package/dist/components/diff-viewer/diff-drawer-height.d.ts +0 -10
  207. package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +0 -28
  208. package/dist/components/diff-viewer/diff-drawer.d.ts +0 -29
  209. package/dist/components/diff-viewer/diff-editor.d.ts +0 -20
  210. package/dist/components/diff-viewer/diff-size.d.ts +0 -16
  211. package/dist/components/diff-viewer/diff-view-adapter.d.ts +0 -27
  212. package/dist/components/diff-viewer/diff-viewer-options-menu.d.ts +0 -16
  213. package/dist/components/diff-viewer/diff-viewer.d.ts +0 -14
  214. package/dist/components/diff-viewer/diff-viewer.store.d.ts +0 -21
  215. package/dist/components/diff-viewer/file-change-badge.d.ts +0 -3
  216. package/dist/components/diff-viewer/file-list-panel.d.ts +0 -18
  217. package/dist/components/diff-viewer/index.d.ts +0 -9
  218. package/dist/components/diff-viewer/monaco-browser.d.ts +0 -1
  219. package/dist/components/diff-viewer/types.d.ts +0 -13
  220. package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +0 -23
  221. package/dist/components/file-browser/column-file-browser.d.ts +0 -20
  222. package/dist/components/internal/performance-panel.d.ts +0 -40
  223. package/dist/components/internal/style-guide.d.ts +0 -14
  224. package/dist/components/internal/token-editor-controls.d.ts +0 -8
  225. package/dist/components/internal/token-editor-data.d.ts +0 -40
  226. package/dist/components/internal/token-editor-state.d.ts +0 -22
  227. package/dist/components/kanban-renderer/collection-badge.d.ts +0 -7
  228. package/dist/components/kanban-renderer/display-menu.d.ts +0 -16
  229. package/dist/components/kanban-renderer/filter-menu.d.ts +0 -12
  230. package/dist/components/kanban-renderer/index.d.ts +0 -19
  231. package/dist/components/kanban-renderer/kanban-renderer-attribute-badge.d.ts +0 -7
  232. package/dist/components/kanban-renderer/kanban-renderer-badge-helpers.d.ts +0 -46
  233. package/dist/components/kanban-renderer/kanban-renderer-board-column-header.d.ts +0 -8
  234. package/dist/components/kanban-renderer/kanban-renderer-board-group-section.d.ts +0 -17
  235. package/dist/components/kanban-renderer/kanban-renderer-board-move.d.ts +0 -21
  236. package/dist/components/kanban-renderer/kanban-renderer-board.d.ts +0 -49
  237. package/dist/components/kanban-renderer/kanban-renderer-card.d.ts +0 -17
  238. package/dist/components/kanban-renderer/kanban-renderer-content.d.ts +0 -27
  239. package/dist/components/kanban-renderer/kanban-renderer-create-dialog.d.ts +0 -12
  240. package/dist/components/kanban-renderer/kanban-renderer-create-field.d.ts +0 -10
  241. package/dist/components/kanban-renderer/kanban-renderer-enum-helpers.d.ts +0 -10
  242. package/dist/components/kanban-renderer/kanban-renderer-grouping.d.ts +0 -23
  243. package/dist/components/kanban-renderer/kanban-renderer-helpers.d.ts +0 -58
  244. package/dist/components/kanban-renderer/kanban-renderer-list-items.d.ts +0 -25
  245. package/dist/components/kanban-renderer/kanban-renderer-list.d.ts +0 -43
  246. package/dist/components/kanban-renderer/kanban-renderer-story-fixtures.d.ts +0 -14
  247. package/dist/components/kanban-renderer/kanban-renderer-toolbar.d.ts +0 -15
  248. package/dist/components/kanban-renderer/kanban-renderer-view-bar.d.ts +0 -14
  249. package/dist/components/kanban-renderer/kanban-renderer-views.d.ts +0 -12
  250. package/dist/components/kanban-renderer/kanban-renderer.d.ts +0 -43
  251. package/dist/components/kanban-renderer/types.d.ts +0 -159
  252. package/dist/components/kanban-renderer/use-kanban-renderer-store.d.ts +0 -78
  253. package/dist/components/kanban-renderer/use-resolved-attributes.d.ts +0 -14
  254. package/dist/components/layout/header.d.ts +0 -7
  255. package/dist/components/layout/horizontal-menu-stack.d.ts +0 -6
  256. package/dist/components/layout/index.d.ts +0 -8
  257. package/dist/components/layout/item-section.d.ts +0 -11
  258. package/dist/components/layout/panel-header.constants.d.ts +0 -3
  259. package/dist/components/layout/resizable-split-layout.d.ts +0 -22
  260. package/dist/components/layout/resizable-split-layout.geometry.d.ts +0 -56
  261. package/dist/components/layout/resizable-split-layout.handle.d.ts +0 -25
  262. package/dist/components/layout/resizable-split-layout.panels.d.ts +0 -29
  263. package/dist/components/layout/resizable-split-layout.root-size.d.ts +0 -3
  264. package/dist/components/list-row/list-row-actions.d.ts +0 -11
  265. package/dist/components/list-row/list-row-chrome.d.ts +0 -11
  266. package/dist/components/list-row/list-row-content.d.ts +0 -17
  267. package/dist/components/list-row/list-row-menu.d.ts +0 -12
  268. package/dist/components/list-row/list-row-root-props.d.ts +0 -34
  269. package/dist/components/list-row/list-row.d.ts +0 -2
  270. package/dist/components/list-row/list-row.types.d.ts +0 -109
  271. package/dist/components/list-row/searchable-action-menu.d.ts +0 -6
  272. package/dist/components/mermaid-renderer/download-png.d.ts +0 -7
  273. package/dist/components/mermaid-renderer/index.d.ts +0 -2
  274. package/dist/components/mermaid-renderer/mermaid-error-state.d.ts +0 -6
  275. package/dist/components/mermaid-renderer/mermaid-fixtures.d.ts +0 -9
  276. package/dist/components/mermaid-renderer/mermaid-fullscreen.d.ts +0 -10
  277. package/dist/components/mermaid-renderer/mermaid-renderer.d.ts +0 -8
  278. package/dist/components/mermaid-renderer/mermaid-svg-view.d.ts +0 -12
  279. package/dist/components/mermaid-renderer/mermaid-toolbar.d.ts +0 -12
  280. package/dist/components/mermaid-renderer/mermaid-zoom.d.ts +0 -6
  281. package/dist/components/mermaid-renderer/svg-data-url.d.ts +0 -6
  282. package/dist/components/mermaid-renderer/use-mermaid-render.d.ts +0 -5
  283. package/dist/components/notification-center/index.d.ts +0 -2
  284. package/dist/components/notification-center/notification-center.d.ts +0 -2
  285. package/dist/components/notification-center/notification-center.types.d.ts +0 -37
  286. package/dist/components/overlays/attached-menu.d.ts +0 -6
  287. package/dist/components/overlays/attached-panel.d.ts +0 -9
  288. package/dist/components/overlays/attachment-chip.d.ts +0 -13
  289. package/dist/components/overlays/bubble-button.d.ts +0 -10
  290. package/dist/components/overlays/bubble-panel.d.ts +0 -18
  291. package/dist/components/overlays/delete-confirmation-modal.d.ts +0 -13
  292. package/dist/components/overlays/dialog-accept-shortcut.d.ts +0 -12
  293. package/dist/components/overlays/index.d.ts +0 -17
  294. package/dist/components/overlays/repo-picker-dialog.d.ts +0 -25
  295. package/dist/components/overlays/resource-context-menu.d.ts +0 -35
  296. package/dist/components/overlays/search-modal-content.d.ts +0 -20
  297. package/dist/components/overlays/searchable-menu-input.d.ts +0 -9
  298. package/dist/components/overlays/searchable-menu.d.ts +0 -65
  299. package/dist/components/param-editor/index.d.ts +0 -31
  300. package/dist/components/param-editor/inputs/action-input.d.ts +0 -14
  301. package/dist/components/param-editor/inputs/anchor-grid-input.d.ts +0 -12
  302. package/dist/components/param-editor/inputs/anchor-grid.d.ts +0 -4
  303. package/dist/components/param-editor/inputs/boolean-input.d.ts +0 -13
  304. package/dist/components/param-editor/inputs/color-input.d.ts +0 -14
  305. package/dist/components/param-editor/inputs/date-input.d.ts +0 -16
  306. package/dist/components/param-editor/inputs/file-upload-input.d.ts +0 -15
  307. package/dist/components/param-editor/inputs/file-upload-value.d.ts +0 -7
  308. package/dist/components/param-editor/inputs/horizontal-text-input.d.ts +0 -13
  309. package/dist/components/param-editor/inputs/markdown-input.d.ts +0 -13
  310. package/dist/components/param-editor/inputs/number-input.d.ts +0 -18
  311. package/dist/components/param-editor/inputs/numeric-value.d.ts +0 -6
  312. package/dist/components/param-editor/inputs/range-input.d.ts +0 -18
  313. package/dist/components/param-editor/inputs/range-value.d.ts +0 -5
  314. package/dist/components/param-editor/inputs/resource-input-chips.d.ts +0 -15
  315. package/dist/components/param-editor/inputs/resource-input.d.ts +0 -20
  316. package/dist/components/param-editor/inputs/segmented-input.d.ts +0 -15
  317. package/dist/components/param-editor/inputs/selection-input.d.ts +0 -27
  318. package/dist/components/param-editor/inputs/selection-menu.d.ts +0 -39
  319. package/dist/components/param-editor/inputs/slider-marks.d.ts +0 -5
  320. package/dist/components/param-editor/inputs/text-input.d.ts +0 -14
  321. package/dist/components/param-editor/inputs/vector-input.d.ts +0 -17
  322. package/dist/components/param-editor/inputs/vector-value.d.ts +0 -7
  323. package/dist/components/param-editor/param-editor-advanced-field.d.ts +0 -14
  324. package/dist/components/param-editor/param-editor-control-fixtures.d.ts +0 -24
  325. package/dist/components/param-editor/param-editor-control-item.d.ts +0 -15
  326. package/dist/components/param-editor/param-editor-control-list.d.ts +0 -5
  327. package/dist/components/param-editor/param-editor-field-label.d.ts +0 -1
  328. package/dist/components/param-editor/param-editor-field.d.ts +0 -13
  329. package/dist/components/param-editor/param-editor-horizontal.d.ts +0 -11
  330. package/dist/components/param-editor/param-editor-inline-group.d.ts +0 -5
  331. package/dist/components/param-editor/param-editor-label.d.ts +0 -7
  332. package/dist/components/param-editor/param-editor-presentation.d.ts +0 -3
  333. package/dist/components/param-editor/param-editor-read-only-field.d.ts +0 -9
  334. package/dist/components/param-editor/param-editor-read-only-value.d.ts +0 -8
  335. package/dist/components/param-editor/param-editor-row.d.ts +0 -17
  336. package/dist/components/param-editor/param-editor-section.d.ts +0 -17
  337. package/dist/components/param-editor/param-editor.d.ts +0 -12
  338. package/dist/components/param-editor/param-editor.types.d.ts +0 -31
  339. package/dist/components/param-editor/resolve-param-value.d.ts +0 -2
  340. package/dist/components/primitives/alert.d.ts +0 -9
  341. package/dist/components/primitives/breadcrumb.d.ts +0 -20
  342. package/dist/components/primitives/checkbox.d.ts +0 -8
  343. package/dist/components/primitives/chip.d.ts +0 -4
  344. package/dist/components/primitives/content-placeholder.d.ts +0 -6
  345. package/dist/components/primitives/empty-state.d.ts +0 -12
  346. package/dist/components/primitives/error-boundary.d.ts +0 -26
  347. package/dist/components/primitives/glyph-icon.d.ts +0 -16
  348. package/dist/components/primitives/icon-color-picker.d.ts +0 -15
  349. package/dist/components/primitives/icon-options.d.ts +0 -301
  350. package/dist/components/primitives/index.d.ts +0 -39
  351. package/dist/components/primitives/info-card.d.ts +0 -12
  352. package/dist/components/primitives/integration-card.d.ts +0 -12
  353. package/dist/components/primitives/number-input.d.ts +0 -6
  354. package/dist/components/primitives/radio.d.ts +0 -8
  355. package/dist/components/primitives/resource-badge.d.ts +0 -64
  356. package/dist/components/primitives/scroll-area.d.ts +0 -17
  357. package/dist/components/primitives/segmented-control.d.ts +0 -20
  358. package/dist/components/primitives/session-indicator.d.ts +0 -15
  359. package/dist/components/primitives/simple-card.d.ts +0 -5
  360. package/dist/components/primitives/slider.d.ts +0 -5
  361. package/dist/components/primitives/switch.d.ts +0 -15
  362. package/dist/components/primitives/tag-swatch.d.ts +0 -10
  363. package/dist/components/primitives/toaster.d.ts +0 -3
  364. package/dist/components/primitives/tooltip.d.ts +0 -11
  365. package/dist/components/primitives/workspace-badge.d.ts +0 -23
  366. package/dist/components/rich-text/collaborative-markdown-editor/awareness-cursors.d.ts +0 -5
  367. package/dist/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.d.ts +0 -9
  368. package/dist/components/rich-text/index.d.ts +0 -17
  369. package/dist/components/rich-text/lazy-markdown-editor.d.ts +0 -2
  370. package/dist/components/rich-text/markdown-editor/markdown-editor.d.ts +0 -17
  371. package/dist/components/rich-text/markdown-editor/markdown-table.story-fixture.d.ts +0 -3
  372. package/dist/components/rich-text/markdown-editor/plugins/MarkdownSectionNavigationPlugin.d.ts +0 -8
  373. package/dist/components/rich-text/markdown-editor/plugins/MarkdownSlashCommandPlugin.d.ts +0 -1
  374. package/dist/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -21
  375. package/dist/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -2
  376. package/dist/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.d.ts +0 -2
  377. package/dist/components/rich-text/markdown-editor/plugins/markdown-history-plugin.d.ts +0 -1
  378. package/dist/components/rich-text/markdown-editor/plugins/markdown-section-navigation.d.ts +0 -20
  379. package/dist/components/rich-text/prompt-input/commands.d.ts +0 -2
  380. package/dist/components/rich-text/prompt-input/events.d.ts +0 -2
  381. package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.d.ts +0 -1
  382. package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.d.ts +0 -3
  383. package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.d.ts +0 -1
  384. package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +0 -16
  385. package/dist/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.d.ts +0 -7
  386. package/dist/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +0 -4
  387. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.d.ts +0 -12
  388. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +0 -11
  389. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.d.ts +0 -9
  390. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.d.ts +0 -12
  391. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.d.ts +0 -2
  392. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +0 -14
  393. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.d.ts +0 -9
  394. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.d.ts +0 -2
  395. package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +0 -7
  396. package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +0 -25
  397. package/dist/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +0 -9
  398. package/dist/components/rich-text/prompt-input/prompt-input.d.ts +0 -25
  399. package/dist/components/rich-text/prompt-input/theme/prompt-input-theme.d.ts +0 -3
  400. package/dist/components/rich-text/prompt-input/utils.d.ts +0 -22
  401. package/dist/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -21
  402. package/dist/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -2
  403. package/dist/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.d.ts +0 -2
  404. package/dist/components/rich-text/rich-message/rich-message.d.ts +0 -10
  405. package/dist/components/rich-text/shared/components/content-editable.d.ts +0 -9
  406. package/dist/components/rich-text/shared/components/default-rich-text-components.d.ts +0 -3
  407. package/dist/components/rich-text/shared/editor-config.d.ts +0 -5
  408. package/dist/components/rich-text/shared/lexical-code.d.ts +0 -2
  409. package/dist/components/rich-text/shared/markdown-ast.d.ts +0 -7
  410. package/dist/components/rich-text/shared/markdown-codec.d.ts +0 -3
  411. package/dist/components/rich-text/shared/markdown-export.d.ts +0 -2
  412. package/dist/components/rich-text/shared/markdown-import.d.ts +0 -2
  413. package/dist/components/rich-text/shared/markdown-inline.d.ts +0 -5
  414. package/dist/components/rich-text/shared/markdown-source-document.d.ts +0 -7
  415. package/dist/components/rich-text/shared/markdown-source-links.d.ts +0 -11
  416. package/dist/components/rich-text/shared/markdown-source-map.d.ts +0 -10
  417. package/dist/components/rich-text/shared/markdown-table.d.ts +0 -41
  418. package/dist/components/rich-text/shared/markdown-url-context.d.ts +0 -9
  419. package/dist/components/rich-text/shared/markdown-url.d.ts +0 -3
  420. package/dist/components/rich-text/shared/nodes/DataTableNode.d.ts +0 -24
  421. package/dist/components/rich-text/shared/nodes/MarkdownImageNode.d.ts +0 -35
  422. package/dist/components/rich-text/shared/nodes/MarkdownLinkNode.d.ts +0 -18
  423. package/dist/components/rich-text/shared/nodes/RawHtmlNode.d.ts +0 -31
  424. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockActionsPlugin.d.ts +0 -4
  425. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +0 -3
  426. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeHighlightingPlugin.d.ts +0 -1
  427. package/dist/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.d.ts +0 -6
  428. package/dist/components/rich-text/shared/plugins/EquationPlugin/EquationNode.d.ts +0 -26
  429. package/dist/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.d.ts +0 -4
  430. package/dist/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.d.ts +0 -4
  431. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.d.ts +0 -4
  432. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/floating-toolbar-buttons.d.ts +0 -18
  433. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +0 -1
  434. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/resolve-block-type.d.ts +0 -17
  435. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/should-show-floating-toolbar.d.ts +0 -11
  436. package/dist/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.d.ts +0 -13
  437. package/dist/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.d.ts +0 -2
  438. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.d.ts +0 -4
  439. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.d.ts +0 -1
  440. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/commands.d.ts +0 -2
  441. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/index.d.ts +0 -3
  442. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/link-editor-content.d.ts +0 -18
  443. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.d.ts +0 -2
  444. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/link-edit-state.d.ts +0 -1
  445. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/selection-link-url.d.ts +0 -2
  446. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +0 -1
  447. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.d.ts +0 -2
  448. package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidComponent.d.ts +0 -6
  449. package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +0 -23
  450. package/dist/components/rich-text/shared/plugins/StateUpdatePlugin.d.ts +0 -6
  451. package/dist/components/rich-text/shared/plugins/ToggleEditablePlugin.d.ts +0 -3
  452. package/dist/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +0 -1
  453. package/dist/components/rich-text/shared/prism-global.d.ts +0 -2
  454. package/dist/components/rich-text/shared/transformers/markdown-transformers-test-utils.d.ts +0 -3
  455. package/dist/components/rich-text/shared/transformers/markdown-transformers.d.ts +0 -16
  456. package/dist/components/rich-text/shared/types/rich-text-components.d.ts +0 -15
  457. package/dist/components/rich-text/theme/rich-text-theme.d.ts +0 -3
  458. package/dist/components/rich-text/types.d.ts +0 -8
  459. package/dist/components/rich-text/utils/inferResourceType.d.ts +0 -1
  460. package/dist/components/rich-text/utils/markdown.d.ts +0 -5
  461. package/dist/components/rich-text/utils/mediaType.d.ts +0 -1
  462. package/dist/components/sidenav/sidenav-footer.d.ts +0 -6
  463. package/dist/components/sidenav/sidenav-header.d.ts +0 -6
  464. package/dist/components/sidenav/sidenav.d.ts +0 -2
  465. package/dist/components/sidenav/sidenav.store.d.ts +0 -49
  466. package/dist/components/sidenav/sidenav.types.d.ts +0 -31
  467. package/dist/components/tab-strip/tab-visibility-filter.d.ts +0 -22
  468. package/dist/components/tab-strip/tab-visibility.store.d.ts +0 -41
  469. package/dist/components/tab-strip/window-tabs.d.ts +0 -15
  470. package/dist/components/tab-strip/window-title-bar.d.ts +0 -6
  471. package/dist/components/tag-editor/index.d.ts +0 -8
  472. package/dist/components/tag-editor/tag-editor-heading.d.ts +0 -11
  473. package/dist/components/tag-editor/tag-editor-row.d.ts +0 -20
  474. package/dist/components/tag-editor/tag-editor-save-bar.d.ts +0 -13
  475. package/dist/components/tag-editor/tag-editor.d.ts +0 -2
  476. package/dist/components/tag-editor/tag-editor.types.d.ts +0 -57
  477. package/dist/components/tag-editor/tag-settings-panel.d.ts +0 -30
  478. package/dist/components/terminal/bind-session.d.ts +0 -33
  479. package/dist/components/terminal/index.d.ts +0 -6
  480. package/dist/components/terminal/scripted-bridge.d.ts +0 -35
  481. package/dist/components/terminal/terminal-contract.d.ts +0 -22
  482. package/dist/components/terminal/terminal-theme.d.ts +0 -12
  483. package/dist/components/terminal/terminal.d.ts +0 -56
  484. package/dist/components/terminal/types.d.ts +0 -35
  485. package/dist/components/terminal/use-terminal-session.d.ts +0 -21
  486. package/dist/components/tree-list/tree-list-background.d.ts +0 -8
  487. package/dist/components/tree-list/tree-list-drag-provider.d.ts +0 -13
  488. package/dist/components/tree-list/tree-list-drag.d.ts +0 -7
  489. package/dist/components/tree-list/tree-list-inline-creation-story.d.ts +0 -3
  490. package/dist/components/tree-list/tree-list-inline-input.d.ts +0 -9
  491. package/dist/components/tree-list/tree-list-model.d.ts +0 -58
  492. package/dist/components/tree-list/tree-list-move-surface.d.ts +0 -7
  493. package/dist/components/tree-list/tree-list-node-row.d.ts +0 -21
  494. package/dist/components/tree-list/tree-list-order-filter.d.ts +0 -2
  495. package/dist/components/tree-list/tree-list-order.store.d.ts +0 -45
  496. package/dist/components/tree-list/tree-list-reorder.d.ts +0 -24
  497. package/dist/components/tree-list/tree-list-section-header.d.ts +0 -14
  498. package/dist/components/tree-list/tree-list-sortable.d.ts +0 -24
  499. package/dist/components/tree-list/tree-list-visibility-filter.d.ts +0 -24
  500. package/dist/components/tree-list/tree-list-visibility.store.d.ts +0 -45
  501. package/dist/components/tree-list/tree-list.d.ts +0 -41
  502. package/dist/components/tree-list/tree-list.types.d.ts +0 -63
  503. package/dist/components/tree-list/use-tree-list-keyboard-navigation.d.ts +0 -15
  504. package/dist/diff-bubble-DvUPRnfB.js +0 -183
  505. package/dist/diff-bubble-DvUPRnfB.js.map +0 -1
  506. package/dist/edit-mode-data-table-B8UpWb7i.js +0 -846
  507. package/dist/edit-mode-data-table-B8UpWb7i.js.map +0 -1
  508. package/dist/empty-state-Bo4HVrgr.js +0 -34
  509. package/dist/empty-state-Bo4HVrgr.js.map +0 -1
  510. package/dist/foundations/gallery/gallery-frame.d.ts +0 -21
  511. package/dist/foundations/gallery/sections/badges-section.d.ts +0 -1
  512. package/dist/foundations/gallery/sections/buttons-section.d.ts +0 -1
  513. package/dist/foundations/gallery/sections/composite-chat-section.d.ts +0 -1
  514. package/dist/foundations/gallery/sections/composites-section.d.ts +0 -1
  515. package/dist/foundations/gallery/sections/feedback-section.d.ts +0 -1
  516. package/dist/foundations/gallery/sections/input-authoring-card.d.ts +0 -1
  517. package/dist/foundations/gallery/sections/inputs-section.d.ts +0 -1
  518. package/dist/foundations/gallery/sections/layout-section.d.ts +0 -1
  519. package/dist/foundations/gallery/sections/navigation-identity-section.d.ts +0 -1
  520. package/dist/foundations/gallery/sections/overlays-section.d.ts +0 -1
  521. package/dist/foundations/gallery/sections/panels-section.d.ts +0 -1
  522. package/dist/foundations/gallery/sections/param-editor-composite-card.d.ts +0 -1
  523. package/dist/foundations/gallery/sections/settings-composite-cards.d.ts +0 -1
  524. package/dist/kanban-renderer-toolbar-DzY6THJY.js +0 -1374
  525. package/dist/kanban-renderer-toolbar-DzY6THJY.js.map +0 -1
  526. package/dist/lazy-markdown-editor-ClZPZuaU.js +0 -235
  527. package/dist/lazy-markdown-editor-ClZPZuaU.js.map +0 -1
  528. package/dist/list-row-BDoV_iMV.js +0 -815
  529. package/dist/list-row-BDoV_iMV.js.map +0 -1
  530. package/dist/markdown-editor-CAVqJ9yR.js +0 -1019
  531. package/dist/markdown-editor-CAVqJ9yR.js.map +0 -1
  532. package/dist/markdown-gNucAjnF.js +0 -1643
  533. package/dist/markdown-gNucAjnF.js.map +0 -1
  534. package/dist/mermaid-renderer-CVnuKs-A.js +0 -425
  535. package/dist/mermaid-renderer-CVnuKs-A.js.map +0 -1
  536. package/dist/mermaid.js.map +0 -1
  537. package/dist/monaco-browser-l82HnffN.js +0 -22
  538. package/dist/monaco-browser-l82HnffN.js.map +0 -1
  539. package/dist/param-editor-CTx3mDxQ.js +0 -161
  540. package/dist/param-editor-CTx3mDxQ.js.map +0 -1
  541. package/dist/param-editor-field-DteDEyeU.js +0 -2810
  542. package/dist/param-editor-field-DteDEyeU.js.map +0 -1
  543. package/dist/prompt-input-DNpRL5tI.js +0 -564
  544. package/dist/prompt-input-DNpRL5tI.js.map +0 -1
  545. package/dist/radio-cLMEBBZk.js +0 -76
  546. package/dist/radio-cLMEBBZk.js.map +0 -1
  547. package/dist/rich-message-CuPiKxKX.js +0 -78
  548. package/dist/rich-message-CuPiKxKX.js.map +0 -1
  549. package/dist/rich-text.js.map +0 -1
  550. package/dist/test-utils/local-storage.d.ts +0 -1
  551. package/dist/theme/custom/index.d.ts +0 -2
  552. package/dist/theme/custom/vscode-theme.d.ts +0 -32
  553. package/dist/theme/global.d.ts +0 -62
  554. package/dist/theme/index.d.ts +0 -3
  555. package/dist/theme/primitives/colors.d.ts +0 -1081
  556. package/dist/theme/primitives/fonts.d.ts +0 -84
  557. package/dist/theme/primitives/sizes.d.ts +0 -207
  558. package/dist/theme/recipes/activity-comment.d.ts +0 -36
  559. package/dist/theme/recipes/alert.d.ts +0 -1
  560. package/dist/theme/recipes/badge.d.ts +0 -58
  561. package/dist/theme/recipes/button.d.ts +0 -188
  562. package/dist/theme/recipes/color-picker.d.ts +0 -18
  563. package/dist/theme/recipes/dialog.d.ts +0 -1
  564. package/dist/theme/recipes/divider.d.ts +0 -1
  565. package/dist/theme/recipes/drawer.d.ts +0 -1
  566. package/dist/theme/recipes/editable.d.ts +0 -46
  567. package/dist/theme/recipes/form.d.ts +0 -1
  568. package/dist/theme/recipes/input.d.ts +0 -94
  569. package/dist/theme/recipes/kbd.d.ts +0 -41
  570. package/dist/theme/recipes/menu.d.ts +0 -1
  571. package/dist/theme/recipes/number-input.d.ts +0 -98
  572. package/dist/theme/recipes/popover.d.ts +0 -16
  573. package/dist/theme/recipes/progress-circle.d.ts +0 -28
  574. package/dist/theme/recipes/resizable-split-layout.d.ts +0 -106
  575. package/dist/theme/recipes/segmented-control.d.ts +0 -22
  576. package/dist/theme/recipes/skeleton.d.ts +0 -1
  577. package/dist/theme/recipes/switch.d.ts +0 -18
  578. package/dist/theme/recipes/tabs.d.ts +0 -80
  579. package/dist/theme/recipes/textarea.d.ts +0 -62
  580. package/dist/theme/recipes/timeline.d.ts +0 -74
  581. package/dist/theme/recipes/tooltip.d.ts +0 -1
  582. package/dist/theme/recipes/window-title-bar.d.ts +0 -19
  583. package/dist/theme/shadowless-default-config.d.ts +0 -2
  584. package/dist/theme/theme.d.ts +0 -2
  585. package/dist/theme/tokens/borders.d.ts +0 -17
  586. package/dist/theme/tokens/colors-background.d.ts +0 -260
  587. package/dist/theme/tokens/colors-visualization.d.ts +0 -162
  588. package/dist/theme/tokens/colors.d.ts +0 -878
  589. package/dist/theme/tokens/layer-styles.d.ts +0 -1
  590. package/dist/theme/tokens/text.d.ts +0 -1
  591. package/dist/theme-Dc7hVvMC.js +0 -3990
  592. package/dist/theme-Dc7hVvMC.js.map +0 -1
  593. package/dist/theme-preference-Bpobguh4.js +0 -114
  594. package/dist/theme-preference-Bpobguh4.js.map +0 -1
  595. package/dist/theme.js.map +0 -1
  596. package/dist/tree-list-CZvcg3_6.js +0 -1348
  597. package/dist/tree-list-CZvcg3_6.js.map +0 -1
  598. package/dist/utils/apply-file-icon-theme-preference.d.ts +0 -35
  599. package/dist/utils/apply-theme-preference.d.ts +0 -22
  600. package/dist/utils/browser-storage.d.ts +0 -7
  601. package/dist/utils/file-icon-theme-preference.d.ts +0 -15
  602. package/dist/utils/get-file-type-icon.d.ts +0 -2
  603. package/dist/utils/prism.d.ts +0 -1
  604. package/dist/utils/resolve-file-icon-element.d.ts +0 -8
  605. package/dist/utils/theme-preference.d.ts +0 -20
  606. package/dist/workspace-badge-BR_GgsAG.js +0 -175
  607. package/dist/workspace-badge-BR_GgsAG.js.map +0 -1
@@ -1,1199 +1,1227 @@
1
- import { jsx as a, jsxs as _, Fragment as ct } from "react/jsx-runtime";
2
- import { c as z } from "react/compiler-runtime";
3
- import { Text as O, Popover as te, HStack as Ee, Portal as ue, Image as dt, Button as ut, chakra as ae, Icon as ee, Menu as G, IconButton as we, Stack as ze, Box as re, Table as L, Flex as oe, Skeleton as Be } from "@chakra-ui/react";
4
- import { flexRender as be, useReactTable as mt, getPaginationRowModel as ft, getCoreRowModel as ht, getSortedRowModel as gt } from "@tanstack/react-table";
5
- import { isValidElement as Fe, cloneElement as bt, useRef as Te, useState as Q, useEffect as Ke, Fragment as pt } from "react";
6
- import { S as xe, T as Je } from "./browser-storage-DPtOQJx0.js";
7
- import { u as St } from "./kanban-renderer-toolbar-DzY6THJY.js";
8
- import { Braces as wt, ChevronRight as xt, CircleHelp as yt, Minus as Ct, Check as ye, ChevronDown as vt, Settings2 as Rt, GripVertical as It, ArrowUpAZ as Xe, ArrowDownAZ as qe, MoreVertical as At } from "lucide-react";
9
- import { C as Ce, S as $t } from "./lazy-markdown-editor-ClZPZuaU.js";
10
- import { L as ce, S as _t, R as kt } from "./list-row-BDoV_iMV.js";
11
- import { c as ie, g as zt, i as Ge, f as Tt, D as Dt, E as Vt, r as Mt, a as De, s as Pt, b as Ht, d as Lt, e as Ot, h as Wt, j as Nt, k as jt, l as Et, m as Bt, n as Ft, o as Kt, S as Jt, P as Xt } from "./edit-mode-data-table-B8UpWb7i.js";
12
- import { P as qt } from "./param-editor-CTx3mDxQ.js";
13
- import { useSensors as Gt, useSensor as Ut, PointerSensor as Yt, DndContext as Zt, closestCenter as Qt } from "@dnd-kit/core";
14
- import { SortableContext as eo, verticalListSortingStrategy as to, useSortable as oo } from "@dnd-kit/sortable";
15
- import { CSS as lo } from "@dnd-kit/utilities";
16
- import { useChart as no, Chart as Ve } from "@chakra-ui/charts";
17
- import { XAxis as ro, YAxis as io, Bar as so, Tooltip as ao, BarChart as co, useActiveTooltipCoordinate as uo, usePlotArea as mo } from "recharts";
18
- const Ue = (o, e) => e.find((t) => Object.is(t.value, o))?.color ?? null, fo = (o) => {
19
- const {
20
- children: e
21
- } = o;
22
- return e;
23
- }, ho = "#111827", go = "#ffffff", bo = "#000000", po = 4.5, So = (o) => o.split("").map((e) => e + e).join(""), ne = (o) => {
24
- const e = o.trim(), t = e.startsWith("#") ? e.slice(1) : e, l = t.length === 3 ? So(t) : t;
25
- return /^[\da-f]{6}$/i.test(l) ? {
26
- r: Number.parseInt(l.slice(0, 2), 16),
27
- g: Number.parseInt(l.slice(2, 4), 16),
28
- b: Number.parseInt(l.slice(4, 6), 16)
29
- } : null;
30
- }, he = (o) => {
31
- const e = o / 255;
32
- return e <= 0.03928 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
33
- }, Me = (o) => 0.2126 * he(o.r) + 0.7152 * he(o.g) + 0.0722 * he(o.b), wo = (o, e) => {
34
- const t = Me(o), l = Me(e), n = Math.max(t, l), i = Math.min(t, l);
35
- return (n + 0.05) / (i + 0.05);
36
- }, pe = (o) => {
37
- const e = (t) => Math.round(t).toString(16).padStart(2, "0");
38
- return `#${e(o.r)}${e(o.g)}${e(o.b)}`;
39
- }, Ye = (o, e, t) => ({
40
- r: o.r * (1 - t) + e.r * t,
41
- g: o.g * (1 - t) + e.g * t,
42
- b: o.b * (1 - t) + e.b * t
43
- }), Pe = (o, e) => {
44
- for (let t = 1; t <= 50; t += 1) {
45
- const l = Ye(o, e, t / 50);
46
- if (wo(l, o) >= po)
47
- return {
48
- color: pe(l),
49
- step: t
50
- };
51
- }
52
- return {
53
- color: pe(e),
54
- step: 50
55
- };
56
- }, He = (o) => {
57
- const e = ne(o);
58
- if (!e) return ho;
59
- const t = ne(bo), l = ne(go), n = Pe(e, t), i = Pe(e, l);
60
- return n.step <= i.step ? n.color : i.color;
61
- }, xo = (o, e, t) => {
62
- const l = ne(o), n = ne(e);
63
- return !l || !n ? null : pe(Ye(l, n, 1 - t));
64
- }, Le = (o) => {
65
- const e = o.foreground?.light ?? He(o.light), t = o.foreground?.dark ?? He(o.dark);
66
- return {
67
- backgroundColor: `light-dark(${o.light}, ${o.dark})`,
68
- color: `light-dark(${e}, ${t})`
69
- };
70
- }, yo = (o) => Math.round(o * 100) / 100, se = (o, e, t) => {
71
- const l = xo(o, e, t);
72
- return l || `color-mix(in srgb, ${o} ${yo(t * 100)}%, ${e})`;
73
- }, Co = (o, e, t) => {
74
- const l = o.foreground && e.foreground ? {
75
- light: se(o.foreground.light, e.foreground.light, t),
76
- dark: se(o.foreground.dark, e.foreground.dark, t)
77
- } : void 0;
78
- return {
79
- light: se(o.light, e.light, t),
80
- dark: se(o.dark, e.dark, t),
81
- ...l ? {
82
- foreground: l
83
- } : {}
84
- };
85
- }, Ze = (o, e) => {
86
- if (typeof o != "number" || !Number.isFinite(o) || e.length < 2) return null;
87
- const t = e[0], l = e[e.length - 1];
88
- if (l.value - t.value <= 0) return null;
89
- if (o <= t.value) return t.color;
90
- if (o >= l.value) return l.color;
91
- const i = e.findIndex((u) => o <= u.value), c = e[i - 1], s = e[i], d = 1 - (o - c.value) / (s.value - c.value);
92
- return Co(c.color, s.color, d);
93
- }, vo = (o) => {
94
- const e = z(2), {
95
- value: t
96
- } = o;
97
- let l;
98
- return e[0] !== t ? (l = /* @__PURE__ */ a(O, { textStyle: "paragraph/S/medium", fontVariantNumeric: "tabular-nums", truncate: !0, children: t }), e[0] = t, e[1] = l) : l = e[1], l;
99
- }, Ro = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, Io = /(^|\s)(avatar|image|logo|photo|picture|thumbnail)(\s|$)/i, Ao = (o) => {
100
- const e = o.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
101
- return e ? `${e[0]?.toUpperCase()}${e.slice(1)}` : "Details";
102
- }, ge = (o) => o.map((e) => /^\d+$/.test(e) ? e : Ao(e)).join(" / "), $o = (o) => o.every((e) => e === null || typeof e != "object"), Se = (o, e, t) => {
103
- if (Array.isArray(o)) {
104
- if (o.length === 0 || $o(o)) {
105
- t.push({
106
- label: ge(e),
107
- value: o
108
- });
109
- return;
110
- }
111
- o.forEach((l, n) => {
112
- Se(l, [...e, String(n + 1)], t);
113
- });
114
- return;
115
- }
116
- if (o !== null && typeof o == "object") {
117
- const l = Object.entries(o);
118
- if (l.length === 0) {
119
- t.push({
120
- label: ge(e),
121
- value: null
122
- });
123
- return;
124
- }
125
- l.forEach(([n, i]) => {
126
- Se(i, [...e, n], t);
127
- });
128
- return;
129
- }
130
- t.push({
131
- label: ge(e),
132
- value: o
133
- });
134
- }, Qe = (o) => {
135
- if (typeof o != "string") return o;
136
- try {
137
- return JSON.parse(o);
138
- } catch {
139
- return o;
140
- }
141
- }, ve = (o) => {
142
- const e = [];
143
- return Se(Qe(o), [], e), e.map((t) => ({
144
- ...t,
145
- label: t.label || "Value"
146
- }));
147
- }, me = (o, e) => {
148
- if (typeof o != "string") return !1;
149
- if (o.startsWith("data:image/")) return !0;
150
- try {
151
- const t = new URL(o);
152
- return t.protocol !== "http:" && t.protocol !== "https:" ? !1 : Ro.test(t.pathname) || Io.test(e);
153
- } catch {
154
- return !1;
155
- }
156
- }, Re = (o, e) => Array.isArray(o) && o.length > 0 && o.every((t) => me(t, e)), Oe = (o) => o == null || o === "" ? "Not provided" : typeof o == "boolean" ? o ? "Yes" : "No" : String(o), _o = (o) => Array.isArray(o) ? o.length === 0 ? "None" : o.map(Oe).join(", ") : Oe(o), ko = (o) => {
157
- const e = Qe(o);
158
- if (Array.isArray(e) && e.length === 0 || e !== null && typeof e == "object" && Object.keys(e).length === 0)
159
- return "No details";
160
- const t = ve(o).filter((i) => !me(i.value, i.label) && !Re(i.value, i.label));
161
- if (t.length === 0) return "No details";
162
- const l = t.slice(0, 2).map((i) => _o(i.value)), n = t.length - l.length;
163
- return [...l, n > 0 ? `${n} more` : null].filter(Boolean).join(" · ");
164
- }, zo = (o) => {
165
- const {
166
- label: e,
167
- value: t
168
- } = o;
169
- return me(t, e) ? {
170
- type: "image",
171
- src: String(t),
172
- alt: `${e} preview`
173
- } : Array.isArray(t) && Re(t, e) ? {
174
- type: "image-gallery",
175
- images: t.map((l, n) => ({
176
- src: String(l),
177
- alt: `${e} ${n + 1} preview`
178
- }))
179
- } : Array.isArray(t) ? t : t === void 0 ? null : t;
180
- }, To = (o) => ve(o).map((e, t) => ({
181
- id: `friendly-json-${t}`,
182
- name: e.label,
183
- type: "readOnly",
184
- value: zo(e)
185
- })), Do = (o) => {
186
- const e = z(4), {
187
- value: t
188
- } = o;
189
- let l;
190
- e[0] !== t ? (l = To(t), e[0] = t, e[1] = l) : l = e[1];
191
- let n;
192
- return e[2] !== l ? (n = /* @__PURE__ */ a(qt, { params: l, readOnly: !0, fullWidth: !0 }), e[2] = l, e[3] = n) : n = e[3], n;
193
- }, Vo = (o) => o.stopPropagation(), Mo = (o) => {
194
- const e = z(49), {
195
- columnLabel: t,
196
- value: l
197
- } = o;
198
- let n, i, c, s, r, d, u, m, f, h, S, b, x, g, v, w;
199
- if (e[0] !== t || e[1] !== l) {
200
- const M = ve(l).flatMap(Po).slice(0, 2);
201
- let D;
202
- e[18] !== l ? (D = ko(l), e[18] = l, e[19] = D) : D = e[19], s = D, c = te.Root, e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = {
203
- placement: "bottom-start",
204
- offset: {
205
- mainAxis: 6
206
- }
207
- }, e[20] = m) : m = e[20], i = te.Trigger, u = !0, n = ut, r = `View ${t} details`, d = "ghost", f = "xs", h = "full", S = "0", b = "28px", x = "2xs", g = "flex-start", v = Vo, w = M.length > 0 ? /* @__PURE__ */ a(Ee, { gap: "-1", flexShrink: "0", children: M.map(Ho) }) : /* @__PURE__ */ a(wt, { size: 14 }), e[0] = t, e[1] = l, e[2] = n, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h, e[12] = S, e[13] = b, e[14] = x, e[15] = g, e[16] = v, e[17] = w;
208
- } else
209
- n = e[2], i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11], S = e[12], b = e[13], x = e[14], g = e[15], v = e[16], w = e[17];
210
- let p;
211
- e[21] !== s ? (p = /* @__PURE__ */ a(O, { flex: "1", minWidth: "0", textAlign: "left", textStyle: "paragraph/S/regular", truncate: !0, children: s }), e[21] = s, e[22] = p) : p = e[22];
212
- let R;
213
- e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ a(xt, { size: 12 }), e[23] = R) : R = e[23];
214
- let C;
215
- e[24] !== n || e[25] !== r || e[26] !== d || e[27] !== p || e[28] !== f || e[29] !== h || e[30] !== S || e[31] !== b || e[32] !== x || e[33] !== g || e[34] !== v || e[35] !== w ? (C = /* @__PURE__ */ _(n, { "aria-label": r, variant: d, size: f, width: h, minWidth: S, height: b, paddingX: x, justifyContent: g, onClick: v, children: [
216
- w,
217
- p,
218
- R
219
- ] }), e[24] = n, e[25] = r, e[26] = d, e[27] = p, e[28] = f, e[29] = h, e[30] = S, e[31] = b, e[32] = x, e[33] = g, e[34] = v, e[35] = w, e[36] = C) : C = e[36];
220
- let y;
221
- e[37] !== i || e[38] !== u || e[39] !== C ? (y = /* @__PURE__ */ a(i, { asChild: u, children: C }), e[37] = i, e[38] = u, e[39] = C, e[40] = y) : y = e[40];
222
- let A;
223
- e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = {
224
- overscrollBehavior: "contain"
225
- }, e[41] = A) : A = e[41];
226
- let $;
227
- e[42] !== l ? ($ = /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(te.Positioner, { children: /* @__PURE__ */ a(te.Content, { width: "min(380px, calc(100vw - 32px))", padding: "0", background: "bg", overflow: "hidden", children: /* @__PURE__ */ a(xe, { maxH: "360px", viewportProps: A, children: /* @__PURE__ */ a(Do, { value: l }) }) }) }) }), e[42] = l, e[43] = $) : $ = e[43];
228
- let T;
229
- return e[44] !== c || e[45] !== m || e[46] !== y || e[47] !== $ ? (T = /* @__PURE__ */ _(c, { positioning: m, children: [
230
- y,
231
- $
232
- ] }), e[44] = c, e[45] = m, e[46] = y, e[47] = $, e[48] = T) : T = e[48], T;
1
+ import { a as e, n as t } from "./prism-pSHJejZx.js";
2
+ import { n, t as r } from "./scroll-area-Cr1lNXAr.js";
3
+ import { i, s as a, t as o } from "./list-row-De9R2zKU.js";
4
+ import { A as s, C as c, D as l, E as u, F as d, I as f, K as p, M as m, N as h, O as g, P as _, S as v, T as y, b, g as x, h as S, j as C, k as w, m as T, w as E, x as D, y as ee } from "./rich-text-DtQpHBlX.js";
5
+ import { n as O } from "./param-editor-IJzw1cA2.js";
6
+ import { Box as te, Button as k, Flex as A, HStack as j, Icon as M, IconButton as N, Image as P, Menu as F, Popover as I, Portal as L, Skeleton as R, Stack as z, Table as B, Text as V, chakra as H } from "@chakra-ui/react";
7
+ import { c as U } from "react/compiler-runtime";
8
+ import { jsx as W, jsxs as G } from "react/jsx-runtime";
9
+ import { Fragment as K, Suspense as q, cloneElement as J, isValidElement as Y, lazy as ne, useEffect as re, useRef as ie, useState as X } from "react";
10
+ import { ArrowDownAZ as ae, ArrowUpAZ as oe, Braces as se, Check as ce, ChevronDown as le, ChevronRight as ue, CircleHelp as Z, GripVertical as de, Minus as fe, MoreVertical as Q, Settings2 as pe } from "lucide-react";
11
+ import { DndContext as me, PointerSensor as he, closestCenter as ge, useSensor as _e, useSensors as ve } from "@dnd-kit/core";
12
+ import { SortableContext as ye, useSortable as $, verticalListSortingStrategy as be } from "@dnd-kit/sortable";
13
+ import { CSS as xe } from "@dnd-kit/utilities";
14
+ import { flexRender as Se, getCoreRowModel as Ce, getPaginationRowModel as we, getSortedRowModel as Te, useReactTable as Ee } from "@tanstack/react-table";
15
+ //#region src/components/data-table/categorical-color-cell.tsx
16
+ var De = (e, t) => t.find((t) => Object.is(t.value, e))?.color ?? null, Oe = (e) => {
17
+ let { children: t } = e;
18
+ return t;
19
+ }, ke = "#111827", Ae = "#ffffff", je = "#000000", Me = 4.5, Ne = (e) => e.split("").map((e) => e + e).join(""), Pe = (e) => {
20
+ let t = e.trim(), n = t.startsWith("#") ? t.slice(1) : t, r = n.length === 3 ? Ne(n) : n;
21
+ return /^[\da-f]{6}$/i.test(r) ? {
22
+ r: Number.parseInt(r.slice(0, 2), 16),
23
+ g: Number.parseInt(r.slice(2, 4), 16),
24
+ b: Number.parseInt(r.slice(4, 6), 16)
25
+ } : null;
26
+ }, Fe = (e) => {
27
+ let t = e / 255;
28
+ return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
29
+ }, Ie = (e) => .2126 * Fe(e.r) + .7152 * Fe(e.g) + .0722 * Fe(e.b), Le = (e, t) => {
30
+ let n = Ie(e), r = Ie(t), i = Math.max(n, r), a = Math.min(n, r);
31
+ return (i + .05) / (a + .05);
32
+ }, Re = (e) => {
33
+ let t = (e) => Math.round(e).toString(16).padStart(2, "0");
34
+ return `#${t(e.r)}${t(e.g)}${t(e.b)}`;
35
+ }, ze = (e, t, n) => ({
36
+ r: e.r * (1 - n) + t.r * n,
37
+ g: e.g * (1 - n) + t.g * n,
38
+ b: e.b * (1 - n) + t.b * n
39
+ }), Be = (e, t) => {
40
+ for (let n = 1; n <= 50; n += 1) {
41
+ let r = ze(e, t, n / 50);
42
+ if (Le(r, e) >= Me) return {
43
+ color: Re(r),
44
+ step: n
45
+ };
46
+ }
47
+ return {
48
+ color: Re(t),
49
+ step: 50
50
+ };
51
+ }, Ve = (e) => {
52
+ let t = Pe(e);
53
+ if (!t) return ke;
54
+ let n = Pe(je), r = Pe(Ae), i = Be(t, n), a = Be(t, r);
55
+ return i.step <= a.step ? i.color : a.color;
56
+ }, He = (e, t, n) => {
57
+ let r = Pe(e), i = Pe(t);
58
+ return !r || !i ? null : Re(ze(r, i, 1 - n));
59
+ }, Ue = (e) => {
60
+ let t = e.foreground?.light ?? Ve(e.light), n = e.foreground?.dark ?? Ve(e.dark);
61
+ return {
62
+ backgroundColor: `light-dark(${e.light}, ${e.dark})`,
63
+ color: `light-dark(${t}, ${n})`
64
+ };
65
+ }, We = (e) => Math.round(e * 100) / 100, Ge = (e, t, n) => He(e, t, n) || `color-mix(in srgb, ${e} ${We(n * 100)}%, ${t})`, Ke = (e, t, n) => {
66
+ let r = e.foreground && t.foreground ? {
67
+ light: Ge(e.foreground.light, t.foreground.light, n),
68
+ dark: Ge(e.foreground.dark, t.foreground.dark, n)
69
+ } : void 0;
70
+ return {
71
+ light: Ge(e.light, t.light, n),
72
+ dark: Ge(e.dark, t.dark, n),
73
+ ...r ? { foreground: r } : {}
74
+ };
75
+ }, qe = (e, t) => {
76
+ if (typeof e != "number" || !Number.isFinite(e) || t.length < 2) return null;
77
+ let n = t[0], r = t[t.length - 1];
78
+ if (r.value - n.value <= 0) return null;
79
+ if (e <= n.value) return n.color;
80
+ if (e >= r.value) return r.color;
81
+ let i = t.findIndex((t) => e <= t.value), a = t[i - 1], o = t[i], s = 1 - (e - a.value) / (o.value - a.value);
82
+ return Ke(a.color, o.color, s);
83
+ }, Je = (e) => {
84
+ let t = U(2), { value: n } = e, r;
85
+ return t[0] === n ? r = t[1] : (r = /* @__PURE__ */ W(V, {
86
+ textStyle: "paragraph/S/medium",
87
+ fontVariantNumeric: "tabular-nums",
88
+ truncate: !0,
89
+ children: n
90
+ }), t[0] = n, t[1] = r), r;
91
+ }, Ye = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, Xe = /(^|\s)(avatar|image|logo|photo|picture|thumbnail)(\s|$)/i, Ze = (e) => {
92
+ let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
93
+ return t ? `${t[0]?.toUpperCase()}${t.slice(1)}` : "Details";
94
+ }, Qe = (e) => e.map((e) => /^\d+$/.test(e) ? e : Ze(e)).join(" / "), $e = (e) => e.every((e) => typeof e != "object" || !e), et = (e, t, n) => {
95
+ if (Array.isArray(e)) {
96
+ if (e.length === 0 || $e(e)) {
97
+ n.push({
98
+ label: Qe(t),
99
+ value: e
100
+ });
101
+ return;
102
+ }
103
+ e.forEach((e, r) => {
104
+ et(e, [...t, String(r + 1)], n);
105
+ });
106
+ return;
107
+ }
108
+ if (typeof e == "object" && e) {
109
+ let r = Object.entries(e);
110
+ if (r.length === 0) {
111
+ n.push({
112
+ label: Qe(t),
113
+ value: null
114
+ });
115
+ return;
116
+ }
117
+ r.forEach(([e, r]) => {
118
+ et(r, [...t, e], n);
119
+ });
120
+ return;
121
+ }
122
+ n.push({
123
+ label: Qe(t),
124
+ value: e
125
+ });
126
+ }, tt = (e) => {
127
+ if (typeof e != "string") return e;
128
+ try {
129
+ return JSON.parse(e);
130
+ } catch {
131
+ return e;
132
+ }
133
+ }, nt = (e) => {
134
+ let t = [];
135
+ return et(tt(e), [], t), t.map((e) => ({
136
+ ...e,
137
+ label: e.label || "Value"
138
+ }));
139
+ }, rt = (e, t) => {
140
+ if (typeof e != "string") return !1;
141
+ if (e.startsWith("data:image/")) return !0;
142
+ try {
143
+ let n = new URL(e);
144
+ return n.protocol !== "http:" && n.protocol !== "https:" ? !1 : Ye.test(n.pathname) || Xe.test(t);
145
+ } catch {
146
+ return !1;
147
+ }
148
+ }, it = (e, t) => Array.isArray(e) && e.length > 0 && e.every((e) => rt(e, t)), at = (e) => e == null || e === "" ? "Not provided" : typeof e == "boolean" ? e ? "Yes" : "No" : String(e), ot = (e) => Array.isArray(e) ? e.length === 0 ? "None" : e.map(at).join(", ") : at(e), st = (e) => {
149
+ let t = tt(e);
150
+ if (Array.isArray(t) && t.length === 0 || typeof t == "object" && t && Object.keys(t).length === 0) return "No details";
151
+ let n = nt(e).filter((e) => !rt(e.value, e.label) && !it(e.value, e.label));
152
+ if (n.length === 0) return "No details";
153
+ let r = n.slice(0, 2).map((e) => ot(e.value)), i = n.length - r.length;
154
+ return [...r, i > 0 ? `${i} more` : null].filter(Boolean).join(" · ");
155
+ }, ct = (e) => {
156
+ let { label: t, value: n } = e;
157
+ return rt(n, t) ? {
158
+ type: "image",
159
+ src: String(n),
160
+ alt: `${t} preview`
161
+ } : Array.isArray(n) && it(n, t) ? {
162
+ type: "image-gallery",
163
+ images: n.map((e, n) => ({
164
+ src: String(e),
165
+ alt: `${t} ${n + 1} preview`
166
+ }))
167
+ } : Array.isArray(n) ? n : n === void 0 ? null : n;
168
+ }, lt = (e) => nt(e).map((e, t) => ({
169
+ id: `friendly-json-${t}`,
170
+ name: e.label,
171
+ type: "readOnly",
172
+ value: ct(e)
173
+ })), ut = (e) => {
174
+ let t = U(4), { value: n } = e, r;
175
+ t[0] === n ? r = t[1] : (r = lt(n), t[0] = n, t[1] = r);
176
+ let i;
177
+ return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ W(O, {
178
+ params: r,
179
+ readOnly: !0,
180
+ fullWidth: !0
181
+ }), t[2] = r, t[3] = i), i;
182
+ }, dt = (e) => e.stopPropagation(), ft = (e) => {
183
+ let t = U(49), { columnLabel: n, value: i } = e, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b;
184
+ if (t[0] !== n || t[1] !== i) {
185
+ let e = nt(i).flatMap(pt).slice(0, 2), r;
186
+ t[18] === i ? r = t[19] : (r = st(i), t[18] = i, t[19] = r), c = r, s = I.Root, t[20] === Symbol.for("react.memo_cache_sentinel") ? (f = {
187
+ placement: "bottom-start",
188
+ offset: { mainAxis: 6 }
189
+ }, t[20] = f) : f = t[20], o = I.Trigger, d = !0, a = k, l = `View ${n} details`, u = "ghost", p = "xs", m = "full", h = "0", g = "28px", _ = "2xs", v = "flex-start", y = dt, b = e.length > 0 ? /* @__PURE__ */ W(j, {
190
+ gap: "-1",
191
+ flexShrink: "0",
192
+ children: e.map(mt)
193
+ }) : /* @__PURE__ */ W(se, { size: 14 }), t[0] = n, t[1] = i, t[2] = a, t[3] = o, t[4] = s, t[5] = c, t[6] = l, t[7] = u, t[8] = d, t[9] = f, t[10] = p, t[11] = m, t[12] = h, t[13] = g, t[14] = _, t[15] = v, t[16] = y, t[17] = b;
194
+ } else a = t[2], o = t[3], s = t[4], c = t[5], l = t[6], u = t[7], d = t[8], f = t[9], p = t[10], m = t[11], h = t[12], g = t[13], _ = t[14], v = t[15], y = t[16], b = t[17];
195
+ let x;
196
+ t[21] === c ? x = t[22] : (x = /* @__PURE__ */ W(V, {
197
+ flex: "1",
198
+ minWidth: "0",
199
+ textAlign: "left",
200
+ textStyle: "paragraph/S/regular",
201
+ truncate: !0,
202
+ children: c
203
+ }), t[21] = c, t[22] = x);
204
+ let S;
205
+ t[23] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ W(ue, { size: 12 }), t[23] = S) : S = t[23];
206
+ let C;
207
+ t[24] !== a || t[25] !== l || t[26] !== u || t[27] !== x || t[28] !== p || t[29] !== m || t[30] !== h || t[31] !== g || t[32] !== _ || t[33] !== v || t[34] !== y || t[35] !== b ? (C = /* @__PURE__ */ G(a, {
208
+ "aria-label": l,
209
+ variant: u,
210
+ size: p,
211
+ width: m,
212
+ minWidth: h,
213
+ height: g,
214
+ paddingX: _,
215
+ justifyContent: v,
216
+ onClick: y,
217
+ children: [
218
+ b,
219
+ x,
220
+ S
221
+ ]
222
+ }), t[24] = a, t[25] = l, t[26] = u, t[27] = x, t[28] = p, t[29] = m, t[30] = h, t[31] = g, t[32] = _, t[33] = v, t[34] = y, t[35] = b, t[36] = C) : C = t[36];
223
+ let w;
224
+ t[37] !== o || t[38] !== d || t[39] !== C ? (w = /* @__PURE__ */ W(o, {
225
+ asChild: d,
226
+ children: C
227
+ }), t[37] = o, t[38] = d, t[39] = C, t[40] = w) : w = t[40];
228
+ let T;
229
+ t[41] === Symbol.for("react.memo_cache_sentinel") ? (T = { overscrollBehavior: "contain" }, t[41] = T) : T = t[41];
230
+ let E;
231
+ t[42] === i ? E = t[43] : (E = /* @__PURE__ */ W(L, { children: /* @__PURE__ */ W(I.Positioner, { children: /* @__PURE__ */ W(I.Content, {
232
+ width: "min(380px, calc(100vw - 32px))",
233
+ padding: "0",
234
+ background: "bg",
235
+ overflow: "hidden",
236
+ children: /* @__PURE__ */ W(r, {
237
+ maxH: "360px",
238
+ viewportProps: T,
239
+ children: /* @__PURE__ */ W(ut, { value: i })
240
+ })
241
+ }) }) }), t[42] = i, t[43] = E);
242
+ let D;
243
+ return t[44] !== s || t[45] !== f || t[46] !== w || t[47] !== E ? (D = /* @__PURE__ */ G(s, {
244
+ positioning: f,
245
+ children: [w, E]
246
+ }), t[44] = s, t[45] = f, t[46] = w, t[47] = E, t[48] = D) : D = t[48], D;
233
247
  };
234
- function Po(o) {
235
- return me(o.value, o.label) ? [o] : !Array.isArray(o.value) || !Re(o.value, o.label) ? [] : o.value.map((e, t) => ({
236
- label: `${o.label} ${t + 1}`,
237
- value: e
238
- }));
248
+ function pt(e) {
249
+ return rt(e.value, e.label) ? [e] : !Array.isArray(e.value) || !it(e.value, e.label) ? [] : e.value.map((t, n) => ({
250
+ label: `${e.label} ${n + 1}`,
251
+ value: t
252
+ }));
239
253
  }
240
- function Ho(o) {
241
- return /* @__PURE__ */ a(dt, { src: String(o.value), alt: `${o.label} preview`, boxSize: "22px", borderRadius: "xs", borderWidth: "1px", borderColor: "border.subtle", objectFit: "cover" }, o.label);
254
+ function mt(e) {
255
+ return /* @__PURE__ */ W(P, {
256
+ src: String(e.value),
257
+ alt: `${e.label} preview`,
258
+ boxSize: "22px",
259
+ borderRadius: "xs",
260
+ borderWidth: "1px",
261
+ borderColor: "border.subtle",
262
+ objectFit: "cover"
263
+ }, e.label);
242
264
  }
243
- const We = (o) => Ge(o) ? o.sortValue : o, Lo = (o, e) => o === e ? 0 : o == null ? 1 : e == null ? -1 : typeof o == "number" && typeof e == "number" ? o - e : String(o).localeCompare(String(e)), Oo = (o) => Fe(o) ? bt(o, {
244
- style: {
245
- ...o.props.style,
246
- flexWrap: "nowrap",
247
- minWidth: 0,
248
- whiteSpace: "nowrap"
249
- }
250
- }) : o, de = (o) => {
251
- o.stopPropagation();
252
- }, Wo = (o) => {
253
- const e = z(8), {
254
- table: t
255
- } = o, l = t.getIsAllRowsSelected(), n = !l && t.getIsSomeRowsSelected(), i = l ? !0 : n ? "indeterminate" : !1, c = n ? Ct : ye;
256
- let s;
257
- e[0] !== c ? (s = /* @__PURE__ */ a(ee, { as: c, boxSize: "12px", strokeWidth: "3" }), e[0] = c, e[1] = s) : s = e[1];
258
- let r;
259
- e[2] !== t ? (r = (u) => t.toggleAllRowsSelected(u.checked === !0), e[2] = t, e[3] = r) : r = e[3];
260
- let d;
261
- return e[4] !== i || e[5] !== s || e[6] !== r ? (d = /* @__PURE__ */ a(Ce, { checked: i, "aria-label": "Select all", icon: s, onClick: de, onCheckedChange: r }), e[4] = i, e[5] = s, e[6] = r, e[7] = d) : d = e[7], d;
262
- }, No = (o) => {
263
- const e = z(6), {
264
- row: t,
265
- selectedRowIds: l
266
- } = o, n = !!l?.[t.id];
267
- let i;
268
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ a(ee, { as: ye, boxSize: "12px", strokeWidth: "3" }), e[0] = i) : i = e[0];
269
- let c;
270
- e[1] !== t ? (c = (r) => t.toggleSelected(r.checked === !0), e[1] = t, e[2] = c) : c = e[2];
271
- let s;
272
- return e[3] !== n || e[4] !== c ? (s = /* @__PURE__ */ a(Ce, { checked: n, "aria-label": "Select row", icon: i, onClick: de, onCheckedChange: c }), e[3] = n, e[4] = c, e[5] = s) : s = e[5], s;
273
- }, jo = (o, e) => {
274
- const t = new Set(e.map((l) => l.label));
275
- return [...e, ...o.filter((l) => !t.has(l.label))];
276
- }, Eo = (o) => {
277
- const e = z(30), {
278
- row: t,
279
- actions: l,
280
- getActions: n
281
- } = o;
282
- let i, c, s, r, d, u, m, f, h;
283
- if (e[0] !== l || e[1] !== n || e[2] !== t) {
284
- h = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
285
- e: {
286
- const v = jo(l, n?.(t.original) ?? []);
287
- if (v.length === 0) {
288
- h = null;
289
- break e;
290
- }
291
- r = G.Root, e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ a(G.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { "aria-label": "Row actions", size: "2xs", variant: "ghost", onClick: de, children: /* @__PURE__ */ a(ee, { as: vt, boxSize: "14px" }) }) }), e[12] = f) : f = e[12], s = ue, c = G.Positioner, i = G.Content, d = "popover", u = "bg";
292
- let w;
293
- e[13] !== t ? (w = (p) => /* @__PURE__ */ a(G.Item, { value: p.label, asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", tone: p.destructive ? "danger" : "default", label: p.label, icon: p.icon, onClick: de, onActivate: () => p.onSelect(t.original) }) }, p.label), e[13] = t, e[14] = w) : w = e[14], m = v.map(w);
294
- }
295
- e[0] = l, e[1] = n, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h;
296
- } else
297
- i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11];
298
- if (h !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
299
- return h;
300
- let S;
301
- e[15] !== i || e[16] !== d || e[17] !== u || e[18] !== m ? (S = /* @__PURE__ */ a(i, { zIndex: d, bg: u, children: m }), e[15] = i, e[16] = d, e[17] = u, e[18] = m, e[19] = S) : S = e[19];
302
- let b;
303
- e[20] !== c || e[21] !== S ? (b = /* @__PURE__ */ a(c, { children: S }), e[20] = c, e[21] = S, e[22] = b) : b = e[22];
304
- let x;
305
- e[23] !== s || e[24] !== b ? (x = /* @__PURE__ */ a(s, { children: b }), e[23] = s, e[24] = b, e[25] = x) : x = e[25];
306
- let g;
307
- return e[26] !== r || e[27] !== f || e[28] !== x ? (g = /* @__PURE__ */ _(r, { children: [
308
- f,
309
- x
310
- ] }), e[26] = r, e[27] = f, e[28] = x, e[29] = g) : g = e[29], g;
311
- }, Ne = (o) => {
312
- const e = z(15), {
313
- value: t,
314
- wrapRows: l
315
- } = o;
316
- let n, i;
317
- if (e[0] !== t || e[1] !== l) {
318
- i = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
319
- e:
320
- if (n = Tt(t), Fe(n)) {
321
- const m = l ? "visible" : "hidden", f = l ? "anywhere" : void 0, h = l ? "normal" : "nowrap", S = l ? n : Oo(n);
322
- let b;
323
- e[4] !== m || e[5] !== f || e[6] !== h || e[7] !== S ? (b = /* @__PURE__ */ a(ae.span, { display: "inline-flex", maxWidth: "full", minW: "0", overflow: m, overflowWrap: f, whiteSpace: h, children: S }), e[4] = m, e[5] = f, e[6] = h, e[7] = S, e[8] = b) : b = e[8], i = b;
324
- break e;
325
- }
326
- e[0] = t, e[1] = l, e[2] = n, e[3] = i;
327
- } else
328
- n = e[2], i = e[3];
329
- if (i !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
330
- return i;
331
- const c = l ? "visible" : "hidden", s = l ? "anywhere" : void 0, r = l ? void 0 : "ellipsis", d = l ? "normal" : "nowrap";
332
- let u;
333
- return e[9] !== n || e[10] !== c || e[11] !== s || e[12] !== r || e[13] !== d ? (u = /* @__PURE__ */ a(O, { maxWidth: "full", overflow: c, overflowWrap: s, textOverflow: r, textStyle: "paragraph/S/regular", whiteSpace: d, children: n }), e[9] = n, e[10] = c, e[11] = s, e[12] = r, e[13] = d, e[14] = u) : u = e[14], u;
334
- }, Bo = (o) => {
335
- const e = z(11), {
336
- columnLabel: t,
337
- renderer: l,
338
- value: n,
339
- wrapRows: i
340
- } = o;
341
- if (l?.type === "json") {
342
- let s;
343
- return e[0] !== t || e[1] !== n ? (s = /* @__PURE__ */ a(Mo, { columnLabel: t, value: n }), e[0] = t, e[1] = n, e[2] = s) : s = e[2], s;
344
- }
345
- if (l?.type === "color-scale" && Ze(n, l.stops) && typeof n == "number") {
346
- let r;
347
- return e[3] !== n ? (r = /* @__PURE__ */ a(vo, { value: n }), e[3] = n, e[4] = r) : r = e[4], r;
348
- }
349
- if (l?.type === "categorical-color" && Ue(n, l.categories)) {
350
- let r;
351
- return e[5] !== n || e[6] !== i ? (r = /* @__PURE__ */ a(fo, { children: /* @__PURE__ */ a(Ne, { value: n, wrapRows: i }) }), e[5] = n, e[6] = i, e[7] = r) : r = e[7], r;
352
- }
353
- let c;
354
- return e[8] !== n || e[9] !== i ? (c = /* @__PURE__ */ a(Ne, { value: n, wrapRows: i }), e[8] = n, e[9] = i, e[10] = c) : c = e[10], c;
355
- }, Fo = (o, e) => {
356
- if (e?.type === "color-scale") {
357
- const t = Ze(o, e.stops);
358
- if (t && typeof o == "number") return Le(t);
359
- }
360
- if (e?.type === "categorical-color") {
361
- const t = Ue(o, e.categories);
362
- if (t) return Le(t);
363
- }
265
+ //#endregion
266
+ //#region src/components/data-table/data-table-cell-renderers.tsx
267
+ var ht = (e) => Y(e) ? J(e, { style: {
268
+ ...e.props.style,
269
+ flexWrap: "nowrap",
270
+ minWidth: 0,
271
+ whiteSpace: "nowrap"
272
+ } }) : e, gt = (e) => {
273
+ e.stopPropagation();
274
+ }, _t = (t) => {
275
+ let n = U(8), { table: r } = t, i = r.getIsAllRowsSelected(), a = !i && r.getIsSomeRowsSelected(), o = i ? !0 : a ? "indeterminate" : !1, s = a ? fe : ce, c;
276
+ n[0] === s ? c = n[1] : (c = /* @__PURE__ */ W(M, {
277
+ as: s,
278
+ boxSize: "12px",
279
+ strokeWidth: "3"
280
+ }), n[0] = s, n[1] = c);
281
+ let l;
282
+ n[2] === r ? l = n[3] : (l = (e) => r.toggleAllRowsSelected(e.checked === !0), n[2] = r, n[3] = l);
283
+ let u;
284
+ return n[4] !== o || n[5] !== c || n[6] !== l ? (u = /* @__PURE__ */ W(e, {
285
+ checked: o,
286
+ "aria-label": "Select all",
287
+ icon: c,
288
+ onClick: gt,
289
+ onCheckedChange: l
290
+ }), n[4] = o, n[5] = c, n[6] = l, n[7] = u) : u = n[7], u;
291
+ }, vt = (t) => {
292
+ let n = U(6), { row: r, column: i } = t, { selectedRowIds: a } = i.columnDef.meta, o = !!a?.[r.id], s;
293
+ n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ W(M, {
294
+ as: ce,
295
+ boxSize: "12px",
296
+ strokeWidth: "3"
297
+ }), n[0] = s) : s = n[0];
298
+ let c;
299
+ n[1] === r ? c = n[2] : (c = (e) => r.toggleSelected(e.checked === !0), n[1] = r, n[2] = c);
300
+ let l;
301
+ return n[3] !== o || n[4] !== c ? (l = /* @__PURE__ */ W(e, {
302
+ checked: o,
303
+ "aria-label": "Select row",
304
+ icon: s,
305
+ onClick: gt,
306
+ onCheckedChange: c
307
+ }), n[3] = o, n[4] = c, n[5] = l) : l = n[5], l;
308
+ }, yt = (e, t) => {
309
+ let n = new Set(t.map((e) => e.label));
310
+ return [...t, ...e.filter((e) => !n.has(e.label))];
311
+ }, bt = (e) => {
312
+ let t = U(30), { row: n, column: r } = e, { rowActions: i, getRowActions: a } = r.columnDef.meta, s, c, l, u, d, f, p, m, h;
313
+ if (t[0] !== a || t[1] !== n || t[2] !== i) {
314
+ h = Symbol.for("react.early_return_sentinel");
315
+ bb0: {
316
+ let e = yt(i === void 0 ? [] : i, a?.(n.original) ?? []);
317
+ if (e.length === 0) {
318
+ h = null;
319
+ break bb0;
320
+ }
321
+ u = F.Root, t[12] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ W(F.Trigger, {
322
+ asChild: !0,
323
+ children: /* @__PURE__ */ W(N, {
324
+ "aria-label": "Row actions",
325
+ size: "2xs",
326
+ variant: "ghost",
327
+ onClick: gt,
328
+ children: /* @__PURE__ */ W(M, {
329
+ as: le,
330
+ boxSize: "14px"
331
+ })
332
+ })
333
+ }), t[12] = m) : m = t[12], l = L, c = F.Positioner, s = F.Content, d = "popover", f = "bg";
334
+ let r;
335
+ t[13] === n ? r = t[14] : (r = (e) => /* @__PURE__ */ W(F.Item, {
336
+ value: e.label,
337
+ asChild: !0,
338
+ children: /* @__PURE__ */ W(o, {
339
+ asChild: !0,
340
+ variant: "full-width",
341
+ tone: e.destructive ? "danger" : "default",
342
+ label: e.label,
343
+ icon: e.icon,
344
+ onClick: gt,
345
+ onActivate: () => e.onSelect(n.original)
346
+ })
347
+ }, e.label), t[13] = n, t[14] = r), p = e.map(r);
348
+ }
349
+ t[0] = a, t[1] = n, t[2] = i, t[3] = s, t[4] = c, t[5] = l, t[6] = u, t[7] = d, t[8] = f, t[9] = p, t[10] = m, t[11] = h;
350
+ } else s = t[3], c = t[4], l = t[5], u = t[6], d = t[7], f = t[8], p = t[9], m = t[10], h = t[11];
351
+ if (h !== Symbol.for("react.early_return_sentinel")) return h;
352
+ let g;
353
+ t[15] !== s || t[16] !== d || t[17] !== f || t[18] !== p ? (g = /* @__PURE__ */ W(s, {
354
+ zIndex: d,
355
+ bg: f,
356
+ children: p
357
+ }), t[15] = s, t[16] = d, t[17] = f, t[18] = p, t[19] = g) : g = t[19];
358
+ let _;
359
+ t[20] !== c || t[21] !== g ? (_ = /* @__PURE__ */ W(c, { children: g }), t[20] = c, t[21] = g, t[22] = _) : _ = t[22];
360
+ let v;
361
+ t[23] !== l || t[24] !== _ ? (v = /* @__PURE__ */ W(l, { children: _ }), t[23] = l, t[24] = _, t[25] = v) : v = t[25];
362
+ let y;
363
+ return t[26] !== u || t[27] !== m || t[28] !== v ? (y = /* @__PURE__ */ G(u, { children: [m, v] }), t[26] = u, t[27] = m, t[28] = v, t[29] = y) : y = t[29], y;
364
+ }, xt = (e) => {
365
+ let t = U(15), { value: n, wrapRows: r } = e, i, a;
366
+ if (t[0] !== n || t[1] !== r) {
367
+ a = Symbol.for("react.early_return_sentinel");
368
+ bb0: if (i = m(n), Y(i)) {
369
+ let e = r ? "visible" : "hidden", n = r ? "anywhere" : void 0, o = r ? "normal" : "nowrap", s = r ? i : ht(i), c;
370
+ t[4] !== e || t[5] !== n || t[6] !== o || t[7] !== s ? (c = /* @__PURE__ */ W(H.span, {
371
+ display: "inline-flex",
372
+ maxWidth: "full",
373
+ minW: "0",
374
+ overflow: e,
375
+ overflowWrap: n,
376
+ whiteSpace: o,
377
+ children: s
378
+ }), t[4] = e, t[5] = n, t[6] = o, t[7] = s, t[8] = c) : c = t[8], a = c;
379
+ break bb0;
380
+ }
381
+ t[0] = n, t[1] = r, t[2] = i, t[3] = a;
382
+ } else i = t[2], a = t[3];
383
+ if (a !== Symbol.for("react.early_return_sentinel")) return a;
384
+ let o = r ? "visible" : "hidden", s = r ? "anywhere" : void 0, c = r ? void 0 : "ellipsis", l = r ? "normal" : "nowrap", u;
385
+ return t[9] !== i || t[10] !== o || t[11] !== s || t[12] !== c || t[13] !== l ? (u = /* @__PURE__ */ W(V, {
386
+ maxWidth: "full",
387
+ overflow: o,
388
+ overflowWrap: s,
389
+ textOverflow: c,
390
+ textStyle: "paragraph/S/regular",
391
+ whiteSpace: l,
392
+ children: i
393
+ }), t[9] = i, t[10] = o, t[11] = s, t[12] = c, t[13] = l, t[14] = u) : u = t[14], u;
394
+ }, St = (e) => {
395
+ let t = U(11), { columnLabel: n, renderer: r, value: i, wrapRows: a } = e;
396
+ if (r?.type === "json") {
397
+ let e;
398
+ return t[0] !== n || t[1] !== i ? (e = /* @__PURE__ */ W(ft, {
399
+ columnLabel: n,
400
+ value: i
401
+ }), t[0] = n, t[1] = i, t[2] = e) : e = t[2], e;
402
+ }
403
+ if (r?.type === "color-scale" && qe(i, r.stops) && typeof i == "number") {
404
+ let e;
405
+ return t[3] === i ? e = t[4] : (e = /* @__PURE__ */ W(Je, { value: i }), t[3] = i, t[4] = e), e;
406
+ }
407
+ if (r?.type === "categorical-color" && De(i, r.categories)) {
408
+ let e;
409
+ return t[5] !== i || t[6] !== a ? (e = /* @__PURE__ */ W(Oe, { children: /* @__PURE__ */ W(xt, {
410
+ value: i,
411
+ wrapRows: a
412
+ }) }), t[5] = i, t[6] = a, t[7] = e) : e = t[7], e;
413
+ }
414
+ let o;
415
+ return t[8] !== i || t[9] !== a ? (o = /* @__PURE__ */ W(xt, {
416
+ value: i,
417
+ wrapRows: a
418
+ }), t[8] = i, t[9] = a, t[10] = o) : o = t[10], o;
419
+ }, Ct = (e) => {
420
+ let t = U(4), { getValue: n } = e, r;
421
+ t[0] === n ? r = t[1] : (r = n(), t[0] = n, t[1] = r);
422
+ let i;
423
+ return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ W(H.span, {
424
+ display: "block",
425
+ textStyle: "paragraph/S/regular",
426
+ textAlign: "center",
427
+ children: r
428
+ }), t[2] = r, t[3] = i), i;
429
+ }, wt = (e) => {
430
+ let t = U(7), { column: n, getValue: r } = e, { renderer: i, wrapRows: a } = n.columnDef.meta, o = a !== void 0 && a, s = n.id, c;
431
+ t[0] === r ? c = t[1] : (c = r(), t[0] = r, t[1] = c);
432
+ let l;
433
+ return t[2] !== n.id || t[3] !== i || t[4] !== c || t[5] !== o ? (l = /* @__PURE__ */ W(St, {
434
+ columnLabel: s,
435
+ renderer: i,
436
+ value: c,
437
+ wrapRows: o
438
+ }), t[2] = n.id, t[3] = i, t[4] = c, t[5] = o, t[6] = l) : l = t[6], l;
439
+ }, Tt = (e) => {
440
+ let t = U(9), { column: r } = e, { headerLabel: i, headerIcon: a, columnDescription: o } = r.columnDef.meta, s;
441
+ t[0] === i ? s = t[1] : (s = /* @__PURE__ */ W(H.span, {
442
+ overflow: "hidden",
443
+ textOverflow: "ellipsis",
444
+ whiteSpace: "nowrap",
445
+ children: i
446
+ }), t[0] = i, t[1] = s);
447
+ let c;
448
+ t[2] !== o || t[3] !== i ? (c = o ? /* @__PURE__ */ W(n, {
449
+ content: o,
450
+ children: /* @__PURE__ */ W(M, {
451
+ as: Z,
452
+ "aria-label": `About ${i}`,
453
+ boxSize: "12px",
454
+ color: "fg.muted",
455
+ cursor: "help",
456
+ flexShrink: 0,
457
+ opacity: .6,
458
+ tabIndex: 0
459
+ })
460
+ }) : null, t[2] = o, t[3] = i, t[4] = c) : c = t[4];
461
+ let l;
462
+ return t[5] !== a || t[6] !== s || t[7] !== c ? (l = /* @__PURE__ */ G(H.span, {
463
+ display: "inline-flex",
464
+ alignItems: "center",
465
+ gap: "4px",
466
+ minW: "0",
467
+ maxW: "full",
468
+ overflow: "hidden",
469
+ children: [
470
+ a,
471
+ s,
472
+ c
473
+ ]
474
+ }), t[5] = a, t[6] = s, t[7] = c, t[8] = l) : l = t[8], l;
475
+ }, Et = (e) => _(e) ? e.sortValue : e, Dt = (e, t) => e === t ? 0 : e == null ? 1 : t == null ? -1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t)), Ot = (e, t) => {
476
+ if (t?.type === "color-scale") {
477
+ let n = qe(e, t.stops);
478
+ if (n && typeof e == "number") return Ue(n);
479
+ }
480
+ if (t?.type === "categorical-color") {
481
+ let n = De(e, t.categories);
482
+ if (n) return Ue(n);
483
+ }
364
484
  };
365
- function Ko(o, e, t = {}) {
366
- const {
367
- columnIcons: l,
368
- columnDescriptions: n,
369
- compactHeaders: i,
370
- enableSelection: c = !1,
371
- rowActions: s = [],
372
- getRowActions: r,
373
- selectedRowIds: d,
374
- columnRenderers: u,
375
- wrapRows: m = !1
376
- } = t, f = ie.accessor((x, g) => g + 1, {
377
- header: "",
378
- id: "rowIndex",
379
- enableResizing: !1,
380
- size: 20,
381
- cell: (x) => /* @__PURE__ */ a(ae.span, { display: "block", textStyle: "paragraph/S/regular", textAlign: "center", children: x.getValue() })
382
- }), h = ie.display({
383
- id: "rowSelection",
384
- header: Wo,
385
- cell: (x) => /* @__PURE__ */ a(No, { ...x, selectedRowIds: d }),
386
- enableResizing: !1,
387
- enableSorting: !1,
388
- size: 36
389
- }), S = e.map((x) => {
390
- const g = x || "-", v = o.map((y) => y[g]), w = u?.[g], p = l?.[g], R = p === void 0 ? zt(v) : p, C = n?.[g];
391
- return ie.accessor((y) => y[g], {
392
- id: g,
393
- header: () => {
394
- const y = i?.[g] ?? g;
395
- return /* @__PURE__ */ _(ae.span, { display: "inline-flex", alignItems: "center", gap: "4px", minW: "0", maxW: "full", overflow: "hidden", children: [
396
- R,
397
- /* @__PURE__ */ a(ae.span, { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: y }),
398
- C ? /* @__PURE__ */ a(Je, { content: C, children: /* @__PURE__ */ a(ee, { as: yt, "aria-label": `About ${y}`, boxSize: "12px", color: "fg.muted", cursor: "help", flexShrink: 0, opacity: 0.6, tabIndex: 0 }) }) : null
399
- ] });
400
- },
401
- cell: (y) => /* @__PURE__ */ a(Bo, { columnLabel: g, renderer: w, value: y.getValue(), wrapRows: m }),
402
- meta: {
403
- getCellStyle: (y) => Fo(y, w)
404
- },
405
- sortingFn: (y, A) => {
406
- const $ = We(y.original[g]), T = We(A.original[g]);
407
- return Lo($, T);
408
- }
409
- });
410
- }), b = ie.display({
411
- id: "rowActions",
412
- header: "",
413
- cell: (x) => /* @__PURE__ */ a(Eo, { ...x, actions: s, getActions: r }),
414
- enableResizing: !1,
415
- enableSorting: !1,
416
- size: 36
417
- });
418
- return [f, ...c ? [h] : [], ...S, ...s.length > 0 || r ? [b] : []];
485
+ function kt(e, t, n = {}) {
486
+ let { columnIcons: r, columnDescriptions: i, compactHeaders: a, enableSelection: o = !1, selectedRowIds: s, rowActions: c = [], getRowActions: l, columnRenderers: u, wrapRows: d = !1 } = n, f = C.accessor((e, t) => t + 1, {
487
+ header: "",
488
+ id: "rowIndex",
489
+ enableResizing: !1,
490
+ size: 20,
491
+ cell: Ct
492
+ }), p = C.display({
493
+ id: "rowSelection",
494
+ header: _t,
495
+ cell: vt,
496
+ meta: { selectedRowIds: s },
497
+ enableResizing: !1,
498
+ enableSorting: !1,
499
+ size: 36
500
+ }), m = t.map((t) => {
501
+ let n = t || "-", o = e.map((e) => e[n]), s = u?.[n], c = r?.[n], l = c === void 0 ? h(o) : c, f = i?.[n];
502
+ return C.accessor((e) => e[n], {
503
+ id: n,
504
+ header: Tt,
505
+ cell: wt,
506
+ meta: {
507
+ headerLabel: a?.[n] ?? n,
508
+ headerIcon: l,
509
+ columnDescription: f,
510
+ renderer: s,
511
+ wrapRows: d,
512
+ getCellStyle: (e) => Ot(e, s)
513
+ },
514
+ sortingFn: (e, t) => Dt(Et(e.original[n]), Et(t.original[n]))
515
+ });
516
+ }), g = C.display({
517
+ id: "rowActions",
518
+ header: "",
519
+ cell: bt,
520
+ meta: {
521
+ rowActions: c,
522
+ getRowActions: l
523
+ },
524
+ enableResizing: !1,
525
+ enableSorting: !1,
526
+ size: 36
527
+ });
528
+ return [
529
+ f,
530
+ ...o ? [p] : [],
531
+ ...m,
532
+ ...c.length > 0 || l ? [g] : []
533
+ ];
419
534
  }
420
- const Jo = (o) => {
421
- const e = z(28), {
422
- column: t,
423
- checked: l,
424
- onColumnVisibilityChange: n
425
- } = o;
426
- let i;
427
- e[0] !== t.id ? (i = {
428
- id: t.id
429
- }, e[0] = t.id, e[1] = i) : i = e[1];
430
- const {
431
- attributes: c,
432
- listeners: s,
433
- setNodeRef: r,
434
- transform: d,
435
- transition: u,
436
- isDragging: m
437
- } = oo(i);
438
- let f;
439
- e[2] !== d ? (f = lo.Transform.toString(d), e[2] = d, e[3] = f) : f = e[3];
440
- const h = m ? 0.5 : 1;
441
- let S;
442
- e[4] !== f || e[5] !== h || e[6] !== u ? (S = {
443
- transform: f,
444
- transition: u,
445
- opacity: h
446
- }, e[4] = f, e[5] = h, e[6] = u, e[7] = S) : S = e[7];
447
- const b = S;
448
- let x;
449
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = {
450
- bg: "bg.hover"
451
- }, e[8] = x) : x = e[8];
452
- let g;
453
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ a(It, { size: 14 }), e[9] = g) : g = e[9];
454
- let v;
455
- e[10] !== c || e[11] !== s ? (v = /* @__PURE__ */ a(re, { as: "span", display: "inline-flex", cursor: "grab", color: "fg.muted", ...c, ...s, children: g }), e[10] = c, e[11] = s, e[12] = v) : v = e[12];
456
- let w;
457
- e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ a(ee, { as: ye, boxSize: "12px", strokeWidth: "3" }), e[13] = w) : w = e[13];
458
- let p;
459
- e[14] !== t.id || e[15] !== n ? (p = (A) => n(t.id, A.checked === !0), e[14] = t.id, e[15] = n, e[16] = p) : p = e[16];
460
- let R;
461
- e[17] !== t.label ? (R = /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", truncate: !0, children: t.label }), e[17] = t.label, e[18] = R) : R = e[18];
462
- let C;
463
- e[19] !== l || e[20] !== p || e[21] !== R ? (C = /* @__PURE__ */ a(Ce, { checked: l, flex: "1", minW: "0", width: "full", flexDirection: "row-reverse", justifyContent: "space-between", size: "sm", icon: w, onCheckedChange: p, children: R }), e[19] = l, e[20] = p, e[21] = R, e[22] = C) : C = e[22];
464
- let y;
465
- return e[23] !== r || e[24] !== b || e[25] !== C || e[26] !== v ? (y = /* @__PURE__ */ _(Ee, { ref: r, style: b, gap: "2xs", minW: "0", width: "full", borderRadius: "xs", px: "xs", py: "2xs", _hover: x, children: [
466
- v,
467
- C
468
- ] }), e[23] = r, e[24] = b, e[25] = C, e[26] = v, e[27] = y) : y = e[27], y;
469
- }, Xo = (o) => {
470
- const e = z(47), {
471
- columns: t,
472
- visibleColumnIds: l,
473
- wrapRows: n,
474
- showStats: i,
475
- statsAvailable: c,
476
- onColumnVisibilityChange: s,
477
- onColumnReorder: r,
478
- onWrapRowsChange: d,
479
- onStatsVisibilityChange: u
480
- } = o, m = Te(null), f = Te(null), [h, S] = Q(!1), [b, x] = Q("");
481
- let g;
482
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = {
483
- activationConstraint: {
484
- distance: 5
485
- }
486
- }, e[0] = g) : g = e[0];
487
- const v = Gt(Ut(Yt, g));
488
- let w;
489
- if (e[1] !== t || e[2] !== b) {
490
- const k = b.trim().toLowerCase();
491
- w = k ? t.filter((B) => B.label.toLowerCase().includes(k)) : t, e[1] = t, e[2] = b, e[3] = w;
492
- } else
493
- w = e[3];
494
- const p = w;
495
- let R;
496
- e[4] !== r ? (R = (k) => {
497
- const {
498
- active: B,
499
- over: F
500
- } = k;
501
- !F || B.id === F.id || r(String(B.id), String(F.id));
502
- }, e[4] = r, e[5] = R) : R = e[5];
503
- const C = R;
504
- let y, A;
505
- e[6] !== h ? (y = () => {
506
- if (!h)
507
- return;
508
- const k = (F) => {
509
- const le = F.target;
510
- le instanceof Node && (f.current?.contains(le) || m.current?.contains(le) || S(!1));
511
- }, B = (F) => {
512
- F.key === "Escape" && S(!1);
513
- };
514
- return document.addEventListener("pointerdown", k), document.addEventListener("keydown", B, !0), () => {
515
- document.removeEventListener("pointerdown", k), document.removeEventListener("keydown", B, !0);
516
- };
517
- }, A = [h], e[6] = h, e[7] = y, e[8] = A) : (y = e[7], A = e[8]), Ke(y, A);
518
- let $;
519
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
520
- placement: "bottom-end",
521
- offset: {
522
- mainAxis: 8
523
- },
524
- getAnchorElement: () => m.current
525
- }, e[9] = $) : $ = e[9];
526
- let T;
527
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ a(te.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { ref: m, "aria-label": "Display settings", variant: "ghost", size: "sm", onClick: () => S(qo), children: /* @__PURE__ */ a(ee, { as: Rt, boxSize: "14px" }) }) }), e[10] = T) : T = e[10];
528
- let P;
529
- e[11] !== d || e[12] !== n ? (P = /* @__PURE__ */ a(Dt, { showDivider: !0, wrapRows: n, onWrapRowsChange: d }), e[11] = d, e[12] = n, e[13] = P) : P = e[13];
530
- let M;
531
- e[14] !== u || e[15] !== i || e[16] !== c ? (M = c ? /* @__PURE__ */ a(re, { borderBottomWidth: "1px", borderColor: "border.subtle", padding: "xs", children: /* @__PURE__ */ a($t, { checked: i, inputProps: {
532
- role: "switch"
533
- }, width: "full", flexDirection: "row-reverse", justifyContent: "space-between", onCheckedChange: (k) => u(k.checked === !0), children: /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", children: "Statistics" }) }) }) : null, e[14] = u, e[15] = i, e[16] = c, e[17] = M) : M = e[17];
534
- let D;
535
- e[18] !== b ? (D = /* @__PURE__ */ a(_t, { value: b, placeholder: "Search columns", onValueChange: x }), e[18] = b, e[19] = D) : D = e[19];
536
- let K;
537
- e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (K = {
538
- overscrollBehavior: "contain"
539
- }, e[20] = K) : K = e[20];
540
- let W;
541
- e[21] !== t ? (W = t.map(Go), e[21] = t, e[22] = W) : W = e[22];
542
- let N;
543
- if (e[23] !== p || e[24] !== s || e[25] !== l) {
544
- let k;
545
- e[27] !== s || e[28] !== l ? (k = (B) => /* @__PURE__ */ a(Jo, { column: B, checked: l.has(B.id), onColumnVisibilityChange: s }, B.id), e[27] = s, e[28] = l, e[29] = k) : k = e[29], N = p.map(k), e[23] = p, e[24] = s, e[25] = l, e[26] = N;
546
- } else
547
- N = e[26];
548
- let J;
549
- e[30] !== N ? (J = /* @__PURE__ */ a(ze, { gap: "1px", children: N }), e[30] = N, e[31] = J) : J = e[31];
550
- let X;
551
- e[32] !== W || e[33] !== J ? (X = /* @__PURE__ */ a(eo, { items: W, strategy: to, children: J }), e[32] = W, e[33] = J, e[34] = X) : X = e[34];
552
- let j;
553
- e[35] !== C || e[36] !== v || e[37] !== X ? (j = /* @__PURE__ */ a(xe, { maxH: "280px", viewportProps: K, children: /* @__PURE__ */ a(re, { padding: "2xs", children: /* @__PURE__ */ a(Zt, { sensors: v, collisionDetection: Qt, onDragEnd: C, children: X }) }) }), e[35] = C, e[36] = v, e[37] = X, e[38] = j) : j = e[38];
554
- let H;
555
- e[39] !== j || e[40] !== P || e[41] !== M || e[42] !== D ? (H = /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(te.Positioner, { children: /* @__PURE__ */ a(te.Content, { ref: f, width: "min(320px, calc(100vw - 32px))", p: "0", bg: "bg", overflow: "hidden", children: /* @__PURE__ */ _(ze, { gap: "0", children: [
556
- P,
557
- M,
558
- D,
559
- j
560
- ] }) }) }) }), e[39] = j, e[40] = P, e[41] = M, e[42] = D, e[43] = H) : H = e[43];
561
- let E;
562
- return e[44] !== h || e[45] !== H ? (E = /* @__PURE__ */ _(te.Root, { open: h, closeOnInteractOutside: !1, positioning: $, children: [
563
- T,
564
- H
565
- ] }), e[44] = h, e[45] = H, e[46] = E) : E = e[46], E;
535
+ //#endregion
536
+ //#region src/components/data-table/data-table-column-menu.tsx
537
+ var At = (t) => {
538
+ let n = U(28), { column: r, checked: i, onColumnVisibilityChange: a } = t, o;
539
+ n[0] === r.id ? o = n[1] : (o = { id: r.id }, n[0] = r.id, n[1] = o);
540
+ let { attributes: s, listeners: c, setNodeRef: l, transform: u, transition: d, isDragging: f } = $(o), p;
541
+ n[2] === u ? p = n[3] : (p = xe.Transform.toString(u), n[2] = u, n[3] = p);
542
+ let m = f ? .5 : 1, h;
543
+ n[4] !== p || n[5] !== m || n[6] !== d ? (h = {
544
+ transform: p,
545
+ transition: d,
546
+ opacity: m
547
+ }, n[4] = p, n[5] = m, n[6] = d, n[7] = h) : h = n[7];
548
+ let g = h, _;
549
+ n[8] === Symbol.for("react.memo_cache_sentinel") ? (_ = { bg: "bg.hover" }, n[8] = _) : _ = n[8];
550
+ let v;
551
+ n[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ W(de, { size: 14 }), n[9] = v) : v = n[9];
552
+ let y;
553
+ n[10] !== s || n[11] !== c ? (y = /* @__PURE__ */ W(te, {
554
+ as: "span",
555
+ display: "inline-flex",
556
+ cursor: "grab",
557
+ color: "fg.muted",
558
+ ...s,
559
+ ...c,
560
+ children: v
561
+ }), n[10] = s, n[11] = c, n[12] = y) : y = n[12];
562
+ let b;
563
+ n[13] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ W(M, {
564
+ as: ce,
565
+ boxSize: "12px",
566
+ strokeWidth: "3"
567
+ }), n[13] = b) : b = n[13];
568
+ let x;
569
+ n[14] !== r.id || n[15] !== a ? (x = (e) => a(r.id, e.checked === !0), n[14] = r.id, n[15] = a, n[16] = x) : x = n[16];
570
+ let S;
571
+ n[17] === r.label ? S = n[18] : (S = /* @__PURE__ */ W(V, {
572
+ as: "span",
573
+ textStyle: "label/S/regular",
574
+ truncate: !0,
575
+ children: r.label
576
+ }), n[17] = r.label, n[18] = S);
577
+ let C;
578
+ n[19] !== i || n[20] !== x || n[21] !== S ? (C = /* @__PURE__ */ W(e, {
579
+ checked: i,
580
+ flex: "1",
581
+ minW: "0",
582
+ width: "full",
583
+ flexDirection: "row-reverse",
584
+ justifyContent: "space-between",
585
+ size: "sm",
586
+ icon: b,
587
+ onCheckedChange: x,
588
+ children: S
589
+ }), n[19] = i, n[20] = x, n[21] = S, n[22] = C) : C = n[22];
590
+ let w;
591
+ return n[23] !== l || n[24] !== g || n[25] !== C || n[26] !== y ? (w = /* @__PURE__ */ G(j, {
592
+ ref: l,
593
+ style: g,
594
+ gap: "2xs",
595
+ minW: "0",
596
+ width: "full",
597
+ borderRadius: "xs",
598
+ px: "xs",
599
+ py: "2xs",
600
+ _hover: _,
601
+ children: [y, C]
602
+ }), n[23] = l, n[24] = g, n[25] = C, n[26] = y, n[27] = w) : w = n[27], w;
603
+ }, jt = (e) => {
604
+ let n = U(47), { columns: a, visibleColumnIds: o, wrapRows: s, showStats: c, statsAvailable: l, onColumnVisibilityChange: u, onColumnReorder: f, onWrapRowsChange: p, onStatsVisibilityChange: m } = e, h = ie(null), g = ie(null), [_, v] = X(!1), [y, b] = X(""), x;
605
+ n[0] === Symbol.for("react.memo_cache_sentinel") ? (x = { activationConstraint: { distance: 5 } }, n[0] = x) : x = n[0];
606
+ let S = ve(_e(he, x)), C;
607
+ if (n[1] !== a || n[2] !== y) {
608
+ let e = y.trim().toLowerCase();
609
+ C = e ? a.filter((t) => t.label.toLowerCase().includes(e)) : a, n[1] = a, n[2] = y, n[3] = C;
610
+ } else C = n[3];
611
+ let w = C, T;
612
+ n[4] === f ? T = n[5] : (T = (e) => {
613
+ let { active: t, over: n } = e;
614
+ n && t.id !== n.id && f(String(t.id), String(n.id));
615
+ }, n[4] = f, n[5] = T);
616
+ let E = T, D, ee;
617
+ n[6] === _ ? (D = n[7], ee = n[8]) : (D = () => {
618
+ if (!_) return;
619
+ let e = (e) => {
620
+ let t = e.target;
621
+ t instanceof Node && (g.current?.contains(t) || h.current?.contains(t) || v(!1));
622
+ }, t = (e) => {
623
+ e.key === "Escape" && v(!1);
624
+ };
625
+ return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t, !0), () => {
626
+ document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t, !0);
627
+ };
628
+ }, ee = [_], n[6] = _, n[7] = D, n[8] = ee), re(D, ee);
629
+ let O;
630
+ n[9] === Symbol.for("react.memo_cache_sentinel") ? (O = {
631
+ placement: "bottom-end",
632
+ offset: { mainAxis: 8 },
633
+ getAnchorElement: () => h.current
634
+ }, n[9] = O) : O = n[9];
635
+ let k;
636
+ n[10] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ W(I.Trigger, {
637
+ asChild: !0,
638
+ children: /* @__PURE__ */ W(N, {
639
+ ref: h,
640
+ "aria-label": "Display settings",
641
+ variant: "ghost",
642
+ size: "sm",
643
+ onClick: () => v(Mt),
644
+ children: /* @__PURE__ */ W(M, {
645
+ as: pe,
646
+ boxSize: "14px"
647
+ })
648
+ })
649
+ }), n[10] = k) : k = n[10];
650
+ let A;
651
+ n[11] !== p || n[12] !== s ? (A = /* @__PURE__ */ W(d, {
652
+ showDivider: !0,
653
+ wrapRows: s,
654
+ onWrapRowsChange: p
655
+ }), n[11] = p, n[12] = s, n[13] = A) : A = n[13];
656
+ let j;
657
+ n[14] !== m || n[15] !== c || n[16] !== l ? (j = l ? /* @__PURE__ */ W(te, {
658
+ borderBottomWidth: "1px",
659
+ borderColor: "border.subtle",
660
+ padding: "xs",
661
+ children: /* @__PURE__ */ W(t, {
662
+ checked: c,
663
+ inputProps: { role: "switch" },
664
+ width: "full",
665
+ flexDirection: "row-reverse",
666
+ justifyContent: "space-between",
667
+ onCheckedChange: (e) => m(e.checked === !0),
668
+ children: /* @__PURE__ */ W(V, {
669
+ as: "span",
670
+ textStyle: "label/S/regular",
671
+ children: "Statistics"
672
+ })
673
+ })
674
+ }) : null, n[14] = m, n[15] = c, n[16] = l, n[17] = j) : j = n[17];
675
+ let P;
676
+ n[18] === y ? P = n[19] : (P = /* @__PURE__ */ W(i, {
677
+ value: y,
678
+ placeholder: "Search columns",
679
+ onValueChange: b
680
+ }), n[18] = y, n[19] = P);
681
+ let F;
682
+ n[20] === Symbol.for("react.memo_cache_sentinel") ? (F = { overscrollBehavior: "contain" }, n[20] = F) : F = n[20];
683
+ let R;
684
+ n[21] === a ? R = n[22] : (R = a.map(Nt), n[21] = a, n[22] = R);
685
+ let B;
686
+ if (n[23] !== w || n[24] !== u || n[25] !== o) {
687
+ let e;
688
+ n[27] !== u || n[28] !== o ? (e = (e) => /* @__PURE__ */ W(At, {
689
+ column: e,
690
+ checked: o.has(e.id),
691
+ onColumnVisibilityChange: u
692
+ }, e.id), n[27] = u, n[28] = o, n[29] = e) : e = n[29], B = w.map(e), n[23] = w, n[24] = u, n[25] = o, n[26] = B;
693
+ } else B = n[26];
694
+ let H;
695
+ n[30] === B ? H = n[31] : (H = /* @__PURE__ */ W(z, {
696
+ gap: "1px",
697
+ children: B
698
+ }), n[30] = B, n[31] = H);
699
+ let K;
700
+ n[32] !== R || n[33] !== H ? (K = /* @__PURE__ */ W(ye, {
701
+ items: R,
702
+ strategy: be,
703
+ children: H
704
+ }), n[32] = R, n[33] = H, n[34] = K) : K = n[34];
705
+ let q;
706
+ n[35] !== E || n[36] !== S || n[37] !== K ? (q = /* @__PURE__ */ W(r, {
707
+ maxH: "280px",
708
+ viewportProps: F,
709
+ children: /* @__PURE__ */ W(te, {
710
+ padding: "2xs",
711
+ children: /* @__PURE__ */ W(me, {
712
+ sensors: S,
713
+ collisionDetection: ge,
714
+ onDragEnd: E,
715
+ children: K
716
+ })
717
+ })
718
+ }), n[35] = E, n[36] = S, n[37] = K, n[38] = q) : q = n[38];
719
+ let J;
720
+ n[39] !== q || n[40] !== A || n[41] !== j || n[42] !== P ? (J = /* @__PURE__ */ W(L, { children: /* @__PURE__ */ W(I.Positioner, { children: /* @__PURE__ */ W(I.Content, {
721
+ ref: g,
722
+ width: "min(320px, calc(100vw - 32px))",
723
+ p: "0",
724
+ bg: "bg",
725
+ overflow: "hidden",
726
+ children: /* @__PURE__ */ G(z, {
727
+ gap: "0",
728
+ children: [
729
+ A,
730
+ j,
731
+ P,
732
+ q
733
+ ]
734
+ })
735
+ }) }) }), n[39] = q, n[40] = A, n[41] = j, n[42] = P, n[43] = J) : J = n[43];
736
+ let Y;
737
+ return n[44] !== _ || n[45] !== J ? (Y = /* @__PURE__ */ G(I.Root, {
738
+ open: _,
739
+ closeOnInteractOutside: !1,
740
+ positioning: O,
741
+ children: [k, J]
742
+ }), n[44] = _, n[45] = J, n[46] = Y) : Y = n[46], Y;
566
743
  };
567
- function qo(o) {
568
- return !o;
744
+ function Mt(e) {
745
+ return !e;
569
746
  }
570
- function Go(o) {
571
- return o.id;
747
+ function Nt(e) {
748
+ return e.id;
572
749
  }
573
- const Uo = () => {
574
- const o = z(11), e = uo(), t = mo();
575
- if (!e || !t)
576
- return null;
577
- const l = t.y + t.height;
578
- let n;
579
- o[0] !== e.x || o[1] !== t.y || o[2] !== l ? (n = /* @__PURE__ */ a("line", { x1: e.x, x2: e.x, y1: t.y, y2: l }), o[0] = e.x, o[1] = t.y, o[2] = l, o[3] = n) : n = o[3];
580
- const i = t.x + t.width;
581
- let c;
582
- o[4] !== e.y || o[5] !== t.x || o[6] !== i ? (c = /* @__PURE__ */ a("line", { x1: t.x, x2: i, y1: e.y, y2: e.y }), o[4] = e.y, o[5] = t.x, o[6] = i, o[7] = c) : c = o[7];
583
- let s;
584
- return o[8] !== n || o[9] !== c ? (s = /* @__PURE__ */ _("g", { pointerEvents: "none", stroke: "var(--chakra-colors-border-emphasized)", strokeWidth: "1", children: [
585
- n,
586
- c
587
- ] }), o[8] = n, o[9] = c, o[10] = s) : s = o[10], s;
588
- }, et = (o) => {
589
- const e = z(47), {
590
- data: t,
591
- dataKey: l,
592
- color: n,
593
- height: i,
594
- ariaLabel: c,
595
- tooltipLabel: s,
596
- tooltipValue: r,
597
- tooltipSeriesLabel: d,
598
- layout: u,
599
- categoryKey: m,
600
- domain: f,
601
- barSize: h,
602
- barCategoryGap: S
603
- } = o, b = u === void 0 ? "horizontal" : u, x = S === void 0 ? 1 : S;
604
- let g;
605
- e[0] !== n || e[1] !== l ? (g = [{
606
- name: l,
607
- color: n
608
- }], e[0] = n, e[1] = l, e[2] = g) : g = e[2];
609
- let v;
610
- e[3] !== t || e[4] !== g ? (v = {
611
- data: t,
612
- series: g
613
- }, e[3] = t, e[4] = g, e[5] = v) : v = e[5];
614
- const w = no(v);
615
- let p;
616
- e[6] !== l ? (p = (k) => k[l], e[6] = l, e[7] = p) : p = e[7];
617
- const R = p;
618
- let C;
619
- e[8] !== m ? (C = m ? (k) => k[m] : void 0, e[8] = m, e[9] = C) : C = e[9];
620
- const y = C, A = w.data;
621
- let $;
622
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
623
- top: 2,
624
- right: 0,
625
- bottom: 0,
626
- left: 0
627
- }, e[10] = $) : $ = e[10];
628
- let T;
629
- e[11] !== f || e[12] !== y || e[13] !== b ? (T = b === "vertical" ? /* @__PURE__ */ _(ct, { children: [
630
- /* @__PURE__ */ a(ro, { type: "number", domain: f, hide: !0 }),
631
- /* @__PURE__ */ a(io, { type: "category", dataKey: y, hide: !0 })
632
- ] }) : null, e[11] = f, e[12] = y, e[13] = b, e[14] = T) : T = e[14];
633
- let P;
634
- e[15] !== w || e[16] !== n ? (P = w.color(n), e[15] = w, e[16] = n, e[17] = P) : P = e[17];
635
- let M;
636
- e[18] !== h || e[19] !== R || e[20] !== P ? (M = /* @__PURE__ */ a(so, { dataKey: R, fill: P, barSize: h, isAnimationActive: !1 }), e[18] = h, e[19] = R, e[20] = P, e[21] = M) : M = e[21];
637
- let D;
638
- e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = {
639
- x: !0,
640
- y: !0
641
- }, e[22] = D) : D = e[22];
642
- let K;
643
- e[23] !== s ? (K = (k, B) => {
644
- const F = B[0]?.payload;
645
- return F ? s(F) : k;
646
- }, e[23] = s, e[24] = K) : K = e[24];
647
- let W;
648
- e[25] !== d || e[26] !== r ? (W = (k) => [r(k), d], e[25] = d, e[26] = r, e[27] = W) : W = e[27];
649
- let N;
650
- e[28] !== K || e[29] !== W ? (N = /* @__PURE__ */ a(Ve.Tooltip, { labelFormatter: K, formatter: W }), e[28] = K, e[29] = W, e[30] = N) : N = e[30];
651
- let J;
652
- e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ a(Uo, {}), e[31] = J) : J = e[31];
653
- let X;
654
- e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (X = {
655
- zIndex: 1800
656
- }, e[32] = X) : X = e[32];
657
- let j;
658
- e[33] !== N ? (j = /* @__PURE__ */ a(ao, { allowEscapeViewBox: D, content: N, cursor: J, isAnimationActive: !1, wrapperStyle: X }), e[33] = N, e[34] = j) : j = e[34];
659
- let H;
660
- e[35] !== x || e[36] !== w.data || e[37] !== b || e[38] !== M || e[39] !== j || e[40] !== T ? (H = /* @__PURE__ */ _(co, { responsive: !0, data: A, layout: b, margin: $, barCategoryGap: x, children: [
661
- T,
662
- M,
663
- j
664
- ] }), e[35] = x, e[36] = w.data, e[37] = b, e[38] = M, e[39] = j, e[40] = T, e[41] = H) : H = e[41];
665
- let E;
666
- return e[42] !== c || e[43] !== w || e[44] !== i || e[45] !== H ? (E = /* @__PURE__ */ a(Ve.Root, { chart: w, height: i, aspectRatio: "auto", cursor: "crosshair", "aria-label": c, children: H }), e[42] = c, e[43] = w, e[44] = i, e[45] = H, e[46] = E) : E = e[46], E;
667
- }, Yo = (o) => Ge(o) ? o.sortValue : o, Ie = (o, e) => o.map((t) => Yo(t[e])).filter((t) => t != null && t !== ""), Zo = (o, e) => new Set(Ie(o, e)).size, Qo = (o, e, t) => {
668
- const l = Ie(o, e), n = /* @__PURE__ */ new Map();
669
- for (const r of l)
670
- n.set(r, (n.get(r) ?? 0) + 1);
671
- const i = [...n.entries()].map(([r, d]) => ({
672
- label: String(r),
673
- count: d,
674
- percentage: Math.round(d / l.length * 100)
675
- })).sort((r, d) => d.count - r.count || r.label.localeCompare(d.label)), c = i.slice(0, t), s = i.slice(t).reduce((r, d) => r + d.count, 0);
676
- return s === 0 ? c : [...c, {
677
- label: "Other",
678
- count: s,
679
- percentage: Math.round(s / l.length * 100)
680
- }];
681
- }, el = (o, e, t) => {
682
- const l = Ie(o, e).filter((r) => typeof r == "number");
683
- if (l.length === 0) return null;
684
- const n = Math.min(...l), i = Math.max(...l), c = (i - n) / t, s = Array.from({
685
- length: t
686
- }, (r, d) => ({
687
- start: n + c * d,
688
- end: n + c * (d + 1),
689
- count: 0
690
- }));
691
- for (const r of l) {
692
- const d = r === i || c === 0 ? t - 1 : Math.floor((r - n) / c);
693
- s[d].count += 1;
694
- }
695
- return {
696
- min: n,
697
- max: i,
698
- bins: s
699
- };
700
- }, Y = new Intl.NumberFormat(void 0, {
701
- maximumFractionDigits: 2
702
- }).format, tt = "vis.categorical.1", ot = (o) => {
703
- const e = z(10), {
704
- value: t,
705
- count: l
706
- } = o;
707
- let n;
708
- e[0] !== t ? (n = /* @__PURE__ */ a(O, { textStyle: "label/L/medium", lineHeight: "1", maxWidth: "100%", truncate: !0, children: t }), e[0] = t, e[1] = n) : n = e[1];
709
- let i;
710
- e[2] !== l ? (i = Y(l), e[2] = l, e[3] = i) : i = e[3];
711
- const c = l === 1 ? "value" : "values";
712
- let s;
713
- e[4] !== i || e[5] !== c ? (s = /* @__PURE__ */ _(O, { textStyle: "label/XS", color: "fg.muted", children: [
714
- i,
715
- " ",
716
- c
717
- ] }), e[4] = i, e[5] = c, e[6] = s) : s = e[6];
718
- let r;
719
- return e[7] !== n || e[8] !== s ? (r = /* @__PURE__ */ _(oe, { "data-single-value-stat": !0, direction: "column", gap: "2xs", alignItems: "flex-start", minWidth: "0", children: [
720
- n,
721
- s
722
- ] }), e[7] = n, e[8] = s, e[9] = r) : r = e[9], r;
723
- }, tl = (o) => {
724
- const e = z(22), {
725
- rows: t,
726
- columnId: l
727
- } = o;
728
- let n, i, c, s, r, d, u, m;
729
- if (e[0] !== l || e[1] !== t) {
730
- const b = Zo(t, l);
731
- i = oe, d = "column", u = "2xs", m = "flex-start", n = O, c = "label/L/medium", s = "1", r = Y(b), e[0] = l, e[1] = t, e[2] = n, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m;
732
- } else
733
- n = e[2], i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9];
734
- let f;
735
- e[10] !== n || e[11] !== c || e[12] !== s || e[13] !== r ? (f = /* @__PURE__ */ a(n, { textStyle: c, lineHeight: s, children: r }), e[10] = n, e[11] = c, e[12] = s, e[13] = r, e[14] = f) : f = e[14];
736
- let h;
737
- e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "unique values" }), e[15] = h) : h = e[15];
738
- let S;
739
- return e[16] !== i || e[17] !== d || e[18] !== u || e[19] !== m || e[20] !== f ? (S = /* @__PURE__ */ _(i, { direction: d, gap: u, alignItems: m, children: [
740
- f,
741
- h
742
- ] }), e[16] = i, e[17] = d, e[18] = u, e[19] = m, e[20] = f, e[21] = S) : S = e[21], S;
743
- }, ol = (o) => {
744
- const e = z(36), {
745
- rows: t,
746
- columnId: l,
747
- binCount: n
748
- } = o;
749
- let i, c, s, r, d, u, m, f, h, S, b, x, g, v;
750
- if (e[0] !== n || e[1] !== l || e[2] !== t) {
751
- u = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
752
- e: {
753
- const C = el(t, l, n);
754
- if (!C) {
755
- let A;
756
- e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "No numeric values" }), e[17] = A) : A = e[17], u = A;
757
- break e;
758
- }
759
- const y = C.bins.reduce(sl, 0);
760
- if (C.min === C.max) {
761
- u = /* @__PURE__ */ a(ot, { value: Y(C.min), count: y });
762
- break e;
763
- }
764
- s = oe, b = "column", x = "100%", g = "2xs", v = /* @__PURE__ */ a(et, { data: C.bins, dataKey: "count", color: tt, height: "40px", ariaLabel: `Distribution for ${l}`, tooltipLabel: al, tooltipValue: cl, tooltipSeriesLabel: "Count" }), c = oe, f = "space-between", h = "xs", S = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: Y(C.min) }), i = O, r = "label/XS/regular", d = "fg.muted", m = Y(C.max);
765
- }
766
- e[0] = n, e[1] = l, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h, e[12] = S, e[13] = b, e[14] = x, e[15] = g, e[16] = v;
767
- } else
768
- i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11], S = e[12], b = e[13], x = e[14], g = e[15], v = e[16];
769
- if (u !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
770
- return u;
771
- let w;
772
- e[18] !== i || e[19] !== r || e[20] !== d || e[21] !== m ? (w = /* @__PURE__ */ a(i, { textStyle: r, color: d, children: m }), e[18] = i, e[19] = r, e[20] = d, e[21] = m, e[22] = w) : w = e[22];
773
- let p;
774
- e[23] !== c || e[24] !== w || e[25] !== f || e[26] !== h || e[27] !== S ? (p = /* @__PURE__ */ _(c, { justifyContent: f, gap: h, children: [
775
- S,
776
- w
777
- ] }), e[23] = c, e[24] = w, e[25] = f, e[26] = h, e[27] = S, e[28] = p) : p = e[28];
778
- let R;
779
- return e[29] !== s || e[30] !== p || e[31] !== b || e[32] !== x || e[33] !== g || e[34] !== v ? (R = /* @__PURE__ */ _(s, { direction: b, width: x, gap: g, children: [
780
- v,
781
- p
782
- ] }), e[29] = s, e[30] = p, e[31] = b, e[32] = x, e[33] = g, e[34] = v, e[35] = R) : R = e[35], R;
783
- }, ll = (o) => {
784
- const e = z(15), {
785
- rows: t,
786
- columnId: l,
787
- limit: n
788
- } = o;
789
- let i, c, s, r, d, u;
790
- if (e[0] !== l || e[1] !== n || e[2] !== t) {
791
- u = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
792
- e: {
793
- const f = Qo(t, l, n);
794
- if (f.length === 1 && f[0]) {
795
- u = /* @__PURE__ */ a(ot, { value: f[0].label, count: f[0].count });
796
- break e;
797
- }
798
- i = oe, c = "column", s = "100%", r = "2xs", d = f.map(ml);
799
- }
800
- e[0] = l, e[1] = n, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u;
801
- } else
802
- i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8];
803
- if (u !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
804
- return u;
805
- let m;
806
- return e[9] !== i || e[10] !== c || e[11] !== s || e[12] !== r || e[13] !== d ? (m = /* @__PURE__ */ a(i, { direction: c, width: s, gap: r, children: d }), e[9] = i, e[10] = c, e[11] = s, e[12] = r, e[13] = d, e[14] = m) : m = e[14], m;
807
- }, nl = (o) => {
808
- const e = z(11), {
809
- rows: t,
810
- columnId: l,
811
- stat: n
812
- } = o;
813
- if (n.type === "unique") {
814
- let s;
815
- return e[0] !== l || e[1] !== t ? (s = /* @__PURE__ */ a(tl, { rows: t, columnId: l }), e[0] = l, e[1] = t, e[2] = s) : s = e[2], s;
816
- }
817
- if (n.type === "histogram") {
818
- const s = n.bins ?? 10;
819
- let r;
820
- return e[3] !== l || e[4] !== t || e[5] !== s ? (r = /* @__PURE__ */ a(ol, { rows: t, columnId: l, binCount: s }), e[3] = l, e[4] = t, e[5] = s, e[6] = r) : r = e[6], r;
821
- }
822
- const i = n.limit ?? 2;
823
- let c;
824
- return e[7] !== l || e[8] !== t || e[9] !== i ? (c = /* @__PURE__ */ a(ll, { rows: t, columnId: l, limit: i }), e[7] = l, e[8] = t, e[9] = i, e[10] = c) : c = e[10], c;
825
- }, rl = (o) => {
826
- const e = z(12), {
827
- header: t,
828
- headerGroup: l,
829
- rows: n,
830
- columnStats: i,
831
- fullWidth: c
832
- } = o, s = i[t.column.id], r = s?.type;
833
- let d;
834
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
835
- borderRight: "none"
836
- }, e[0] = d) : d = e[0];
837
- const u = c && l.headers.indexOf(t) === l.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
838
- let m;
839
- e[1] !== u ? (m = {
840
- width: u
841
- }, e[1] = u, e[2] = m) : m = e[2];
842
- let f;
843
- e[3] !== t.column.id || e[4] !== n || e[5] !== s ? (f = s ? /* @__PURE__ */ a(nl, { rows: n, columnId: t.column.id, stat: s }) : null, e[3] = t.column.id, e[4] = n, e[5] = s, e[6] = f) : f = e[6];
844
- let h;
845
- return e[7] !== t.column.id || e[8] !== r || e[9] !== m || e[10] !== f ? (h = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": t.column.id, "data-stat-type": r, borderRight: "1px solid", _last: d, borderColor: "border.subtle", padding: "xs", verticalAlign: "middle", overflow: "hidden", style: m, children: f }), e[7] = t.column.id, e[8] = r, e[9] = m, e[10] = f, e[11] = h) : h = e[11], h;
846
- }, il = (o) => {
847
- const e = z(8), {
848
- headerGroup: t,
849
- rows: l,
850
- columnStats: n,
851
- fullWidth: i,
852
- noBorder: c
853
- } = o;
854
- if (!t.headers.some((m) => n[m.column.id]))
855
- return null;
856
- const r = c ? "none" : "1px solid";
857
- let d;
858
- e[0] !== n || e[1] !== i || e[2] !== t || e[3] !== l ? (d = t.headers.map((m) => /* @__PURE__ */ a(rl, { header: m, headerGroup: t, rows: l, columnStats: n, fullWidth: i }, m.id)), e[0] = n, e[1] = i, e[2] = t, e[3] = l, e[4] = d) : d = e[4];
859
- let u;
860
- return e[5] !== r || e[6] !== d ? (u = /* @__PURE__ */ a(L.Row, { className: "data-table-stats-row", borderRight: r, borderColor: "border.subtle", children: d }), e[5] = r, e[6] = d, e[7] = u) : u = e[7], u;
750
+ //#endregion
751
+ //#region src/components/data-table/data-table-table-parts.tsx
752
+ var Pt = /* @__PURE__ */ new Set([
753
+ "rowIndex",
754
+ "rowSelection",
755
+ "rowActions"
756
+ ]), Ft = (e) => e === "asc" ? oe : e === "desc" ? ae : Q, It = (e) => {
757
+ let t = U(37), { header: r, headerGroup: i, table: a, fullWidth: s, hasDescription: c } = e, l, u, d;
758
+ if (t[0] !== r.column || t[1] !== a) {
759
+ u = r.column.getIsSorted();
760
+ let e;
761
+ t[5] !== r.column.id || t[6] !== a ? (e = !Pt.has(r.column.id) && a.getCoreRowModel().rows.length > 1, t[5] = r.column.id, t[6] = a, t[7] = e) : e = t[7], l = e, d = Ft(u), t[0] = r.column, t[1] = a, t[2] = l, t[3] = u, t[4] = d;
762
+ } else l = t[2], u = t[3], d = t[4];
763
+ let f = d, p;
764
+ t[8] === r ? p = t[9] : (p = r.column.id === "rowSelection" ? "Select all" : Se(r.column.columnDef.header, r.getContext()), t[8] = r, t[9] = p);
765
+ let m = p, h = r.column.id, g;
766
+ t[10] === Symbol.for("react.memo_cache_sentinel") ? (g = { borderRight: "none" }, t[10] = g) : g = t[10];
767
+ let _ = r.id, v = s && i.headers.indexOf(r) === i.headers.length - 1 ? void 0 : `calc(var(--header-${r.id}-size) * 1px)`, y;
768
+ t[11] === v ? y = t[12] : (y = { width: v }, t[11] = v, t[12] = y);
769
+ let b;
770
+ t[13] === r ? b = t[14] : (b = Se(r.column.columnDef.header, r.getContext()), t[13] = r, t[14] = b);
771
+ let x;
772
+ t[15] === b ? x = t[16] : (x = /* @__PURE__ */ W(V, {
773
+ as: "div",
774
+ textStyle: "label/S/medium",
775
+ lineHeight: "1.2",
776
+ truncate: !0,
777
+ children: b
778
+ }), t[15] = b, t[16] = x);
779
+ let S;
780
+ t[17] !== f || t[18] !== l || t[19] !== r.column || t[20] !== u ? (S = l && /* @__PURE__ */ G(F.Root, { children: [/* @__PURE__ */ W(F.Trigger, {
781
+ asChild: !0,
782
+ children: /* @__PURE__ */ W(N, {
783
+ ml: "2px",
784
+ size: "2xs",
785
+ "aria-label": u ? `Sorted ${u}` : "Sort column",
786
+ variant: "ghost",
787
+ visibility: u ? "visible" : "hidden",
788
+ _groupHover: { visibility: "visible" },
789
+ children: /* @__PURE__ */ W(M, {
790
+ as: f,
791
+ boxSize: "14px"
792
+ })
793
+ })
794
+ }), /* @__PURE__ */ W(L, { children: /* @__PURE__ */ W(F.Positioner, { children: /* @__PURE__ */ G(F.Content, {
795
+ zIndex: "popover",
796
+ bg: "bg",
797
+ children: [
798
+ /* @__PURE__ */ W(F.Item, {
799
+ value: "sort-asc",
800
+ asChild: !0,
801
+ children: /* @__PURE__ */ W(o, {
802
+ asChild: !0,
803
+ variant: "full-width",
804
+ label: "Sort ascending",
805
+ icon: /* @__PURE__ */ W(M, {
806
+ as: oe,
807
+ boxSize: "16px"
808
+ }),
809
+ disabled: u === "asc",
810
+ onActivate: () => r.column.toggleSorting(!1)
811
+ })
812
+ }),
813
+ /* @__PURE__ */ W(F.Item, {
814
+ value: "sort-desc",
815
+ asChild: !0,
816
+ children: /* @__PURE__ */ W(o, {
817
+ asChild: !0,
818
+ variant: "full-width",
819
+ label: "Sort descending",
820
+ icon: /* @__PURE__ */ W(M, {
821
+ as: ae,
822
+ boxSize: "16px"
823
+ }),
824
+ disabled: u === "desc",
825
+ onActivate: () => r.column.toggleSorting(!0)
826
+ })
827
+ }),
828
+ u && /* @__PURE__ */ W(F.Item, {
829
+ value: "clear-sort",
830
+ asChild: !0,
831
+ children: /* @__PURE__ */ W(o, {
832
+ asChild: !0,
833
+ variant: "full-width",
834
+ label: "Clear sort",
835
+ onActivate: () => r.column.clearSorting()
836
+ })
837
+ })
838
+ ]
839
+ }) }) })] }), t[17] = f, t[18] = l, t[19] = r.column, t[20] = u, t[21] = S) : S = t[21];
840
+ let C;
841
+ t[22] === r ? C = t[23] : (C = r.column.getCanResize() && /* @__PURE__ */ W("span", {
842
+ onDoubleClick: () => r.column.resetSize(),
843
+ onMouseDown: r.getResizeHandler(),
844
+ onTouchStart: r.getResizeHandler(),
845
+ className: `resizer ${r.column.getIsResizing() ? "isResizing" : ""}`
846
+ }), t[22] = r, t[23] = C);
847
+ let w;
848
+ t[24] !== C || t[25] !== x || t[26] !== S ? (w = /* @__PURE__ */ G(A, {
849
+ className: "group",
850
+ alignItems: "center",
851
+ justifyContent: "space-between",
852
+ gap: "1",
853
+ flex: "1",
854
+ minW: "0",
855
+ children: [
856
+ x,
857
+ S,
858
+ C
859
+ ]
860
+ }), t[24] = C, t[25] = x, t[26] = S, t[27] = w) : w = t[27];
861
+ let T;
862
+ t[28] !== c || t[29] !== w || t[30] !== m ? (T = /* @__PURE__ */ W(n, {
863
+ content: m,
864
+ disabled: c,
865
+ children: w
866
+ }), t[28] = c, t[29] = w, t[30] = m, t[31] = T) : T = t[31];
867
+ let E;
868
+ return t[32] !== r.column.id || t[33] !== r.id || t[34] !== T || t[35] !== y ? (E = /* @__PURE__ */ W(B.ColumnHeader, {
869
+ "data-column-id": h,
870
+ textTransform: "none",
871
+ borderRight: "1px solid",
872
+ _last: g,
873
+ borderColor: "border.subtle",
874
+ paddingX: "xs",
875
+ paddingY: "xs",
876
+ overflow: "hidden",
877
+ position: "relative",
878
+ verticalAlign: "middle",
879
+ whiteSpace: "nowrap",
880
+ style: y,
881
+ children: T
882
+ }, _), t[32] = r.column.id, t[33] = r.id, t[34] = T, t[35] = y, t[36] = E) : E = t[36], E;
883
+ }, Lt = (e) => {
884
+ let t = U(26), { cell: n, row: r, wrapRows: i, getCellContextMenuActions: o } = e, s = n.column.columnDef.meta, c;
885
+ t[0] !== n || t[1] !== s ? (c = s?.getCellStyle?.(n.getValue()), t[0] = n, t[1] = s, t[2] = c) : c = t[2];
886
+ let l = c, u;
887
+ if (t[3] !== n || t[4] !== o || t[5] !== r.id || t[6] !== r.original) {
888
+ let e = {
889
+ row: r.original,
890
+ rowId: r.id,
891
+ columnId: n.column.id,
892
+ value: n.getValue()
893
+ };
894
+ u = o?.(e).map((t) => ({
895
+ key: t.label,
896
+ label: t.label,
897
+ icon: t.icon,
898
+ onClick: () => t.onSelect(e)
899
+ })) ?? [], t[3] = n, t[4] = o, t[5] = r.id, t[6] = r.original, t[7] = u;
900
+ } else u = t[7];
901
+ let d = u, f = n.column.id, p = i ? "anywhere" : void 0, m = i ? void 0 : "10", h = i ? void 0 : "10", g;
902
+ t[8] === Symbol.for("react.memo_cache_sentinel") ? (g = { borderRight: "none" }, t[8] = g) : g = t[8];
903
+ let _ = n.id, v = i ? void 0 : "ellipsis", y = i ? "top" : "middle", b = i ? "normal" : "nowrap", x;
904
+ t[9] === n ? x = t[10] : (x = Se(n.column.columnDef.cell, n.getContext()), t[9] = n, t[10] = x);
905
+ let S;
906
+ t[11] !== n.column.id || t[12] !== n.id || t[13] !== l || t[14] !== b || t[15] !== x || t[16] !== p || t[17] !== m || t[18] !== h || t[19] !== v || t[20] !== y ? (S = /* @__PURE__ */ W(B.Cell, {
907
+ "data-column-id": f,
908
+ width: "fit-content",
909
+ maxWidth: "12rem",
910
+ overflow: "hidden",
911
+ overflowWrap: p,
912
+ padding: "xs",
913
+ height: m,
914
+ maxHeight: h,
915
+ borderRight: "1px solid",
916
+ borderColor: "border.subtle",
917
+ _last: g,
918
+ borderBottom: "none",
919
+ textStyle: "paragraph/S/regular",
920
+ textOverflow: v,
921
+ verticalAlign: y,
922
+ whiteSpace: b,
923
+ style: l,
924
+ children: x
925
+ }, _), t[11] = n.column.id, t[12] = n.id, t[13] = l, t[14] = b, t[15] = x, t[16] = p, t[17] = m, t[18] = h, t[19] = v, t[20] = y, t[21] = S) : S = t[21];
926
+ let C = S;
927
+ if (d.length === 0) return C;
928
+ let w;
929
+ return t[22] !== n.id || t[23] !== C || t[24] !== d ? (w = /* @__PURE__ */ W(a, {
930
+ actions: d,
931
+ children: C
932
+ }, n.id), t[22] = n.id, t[23] = C, t[24] = d, t[25] = w) : w = t[25], w;
933
+ }, Rt = (e) => {
934
+ let t = U(23), { row: n, noBorder: r, rowIsInteractive: i, rowIsActive: a, rowIsSelected: o, wrapRows: s, onRowClick: c, getCellContextMenuActions: l } = e, u = n.id, d = a ? "true" : void 0, f = o ? "true" : void 0, p = o ? "true" : void 0, m = s ? void 0 : "10", h = i ? "pointer" : void 0, g;
935
+ t[0] !== c || t[1] !== n.original || t[2] !== i ? (g = i ? () => c?.(n.original) : void 0, t[0] = c, t[1] = n.original, t[2] = i, t[3] = g) : g = t[3];
936
+ let _ = r ? "none" : "1px solid", v = r ? "none" : "1px solid", y = r ? "none" : "1px solid", b;
937
+ t[4] === y ? b = t[5] : (b = {
938
+ borderBottom: y,
939
+ borderColor: "border.subtle"
940
+ }, t[4] = y, t[5] = b);
941
+ let x = a ? "bg.active" : "bg", S;
942
+ t[6] !== l || t[7] !== n || t[8] !== s ? (S = n.getVisibleCells().map((e) => /* @__PURE__ */ W(Lt, {
943
+ cell: e,
944
+ row: n,
945
+ wrapRows: s,
946
+ getCellContextMenuActions: l
947
+ }, e.id)), t[6] = l, t[7] = n, t[8] = s, t[9] = S) : S = t[9];
948
+ let C;
949
+ return t[10] !== n.id || t[11] !== d || t[12] !== b || t[13] !== x || t[14] !== S || t[15] !== f || t[16] !== p || t[17] !== m || t[18] !== h || t[19] !== g || t[20] !== _ || t[21] !== v ? (C = /* @__PURE__ */ W(B.Row, {
950
+ "data-active": d,
951
+ "data-selected": f,
952
+ "aria-selected": p,
953
+ height: m,
954
+ cursor: h,
955
+ onClick: g,
956
+ borderTop: _,
957
+ borderBottom: "1px solid",
958
+ borderRight: v,
959
+ _last: b,
960
+ borderColor: "border.subtle",
961
+ background: x,
962
+ children: S
963
+ }, u), t[10] = n.id, t[11] = d, t[12] = b, t[13] = x, t[14] = S, t[15] = f, t[16] = p, t[17] = m, t[18] = h, t[19] = g, t[20] = _, t[21] = v, t[22] = C) : C = t[22], C;
964
+ }, zt = ne(() => import("./data-table-stats-row-DNJG8tLZ.js").then((e) => ({ default: e.DataTableStatsRow }))), Bt = (e, t) => e.map((e) => ({
965
+ id: e,
966
+ label: t?.[e] ?? e
967
+ })), Vt = (e) => {
968
+ let t = U(12), { table: n, pagination: r, pageSizeOptions: i } = e, a;
969
+ t[0] === n ? a = t[1] : (a = n.getPageCount(), t[0] = n, t[1] = a);
970
+ let o = r.pageIndex, s = r.pageSize, c;
971
+ t[2] === n ? c = t[3] : (c = n.getCoreRowModel(), t[2] = n, t[3] = c);
972
+ let l;
973
+ return t[4] !== i || t[5] !== r.pageIndex || t[6] !== r.pageSize || t[7] !== a || t[8] !== c.rows.length || t[9] !== n.setPageIndex || t[10] !== n.setPageSize ? (l = /* @__PURE__ */ W(x, {
974
+ pageCount: a,
975
+ pageIndex: o,
976
+ pageSize: s,
977
+ pageSizeOptions: i,
978
+ totalRows: c.rows.length,
979
+ onPageChange: n.setPageIndex,
980
+ onPageSizeChange: n.setPageSize
981
+ }), t[4] = i, t[5] = r.pageIndex, t[6] = r.pageSize, t[7] = a, t[8] = c.rows.length, t[9] = n.setPageIndex, t[10] = n.setPageSize, t[11] = l) : l = t[11], l;
982
+ }, Ht = (e) => {
983
+ let { data: t, noBorder: n, fullWidth: i, hiddenColumns: a, onRowClick: o, isRowInteractive: d, activeRowId: m, columnIcons: h, columnDescriptions: _, compactHeaders: x, columnStats: C, columnRenderers: T, initialPageSize: O, pageSizeOptions: k = [
984
+ 10,
985
+ 20,
986
+ 30,
987
+ 50,
988
+ 100
989
+ ], rowActions: j = [], getRowActions: M, getRowId: N, toolbarStorageKey: P, enableRowActivation: F = !1, getCellContextMenuActions: I } = e, [L, R] = X([]), [z, V] = X(() => ({
990
+ pageIndex: 0,
991
+ pageSize: l({ initialPageSize: O })
992
+ })), [H, U] = X({}), [J, Y] = X(!0), [ne, ie] = X(!1), [ae, oe] = X(() => {
993
+ let e = new Set(a ?? []);
994
+ return Object.keys(t[0] || {}).filter((t) => !e.has(t));
995
+ }), [se, ce] = X(() => /* @__PURE__ */ new Set()), le = new Set(a ?? []), ue = Object.keys(t[0] || {}).filter((e) => !le.has(e)), Z = E(ue, ae), de = new Set(Z.filter((e) => !se.has(e))), fe = Z.filter((e) => de.has(e)), Q = w(e), pe = g(e), me = ee(t, Z, x), he = b(t, Z, N), ge = u({
996
+ toolbarStorageKey: P,
997
+ columnKeys: ue
998
+ }), _e = p(ge, (e) => e.filters, {
999
+ settings: { viewMode: "list" },
1000
+ views: e.defaultViews,
1001
+ activeViewId: e.defaultActiveViewId
1002
+ }), ve = D(he, _e, me).map((e) => e.sourceRow), ye = kt(t, fe, {
1003
+ columnIcons: h,
1004
+ columnDescriptions: _,
1005
+ compactHeaders: x,
1006
+ enableSelection: Q,
1007
+ rowActions: j,
1008
+ getRowActions: M,
1009
+ selectedRowIds: H,
1010
+ columnRenderers: T,
1011
+ wrapRows: ne
1012
+ }), $ = Ee({
1013
+ data: ve,
1014
+ columns: ye,
1015
+ defaultColumn: {
1016
+ size: 150,
1017
+ minSize: 40,
1018
+ maxSize: 800
1019
+ },
1020
+ state: {
1021
+ sorting: L,
1022
+ pagination: z,
1023
+ rowSelection: H
1024
+ },
1025
+ getRowId: (e, t) => y(e, t, N),
1026
+ columnResizeMode: "onChange",
1027
+ columnResizeDirection: "ltr",
1028
+ onSortingChange: R,
1029
+ onPaginationChange: V,
1030
+ onRowSelectionChange: U,
1031
+ getSortedRowModel: Te(),
1032
+ getCoreRowModel: Ce(),
1033
+ getPaginationRowModel: we(),
1034
+ enableMultiRowSelection: Q,
1035
+ enableRowSelection: Q,
1036
+ autoResetAll: !1
1037
+ });
1038
+ re(() => {
1039
+ let e = $.getPageCount();
1040
+ e === 0 || z.pageIndex < e || V((t) => ({
1041
+ ...t,
1042
+ pageIndex: Math.max(e - 1, 0)
1043
+ }));
1044
+ }, [z.pageIndex, $]);
1045
+ let be = (() => {
1046
+ let e = $.getFlatHeaders(), t = {};
1047
+ for (let n = 0; n < e.length; n++) {
1048
+ let r = e[n];
1049
+ t[`--header-${r.id}-size`] = r.getSize(), t[`--col-${r.column.id}-size`] = r.column.getSize();
1050
+ }
1051
+ return t;
1052
+ })(), xe = $.getSelectedRowModel().rows, Se = $.getCoreRowModel().rows, De = v(xe), Oe = /* @__PURE__ */ W(jt, {
1053
+ columns: Bt(Z, x),
1054
+ visibleColumnIds: de,
1055
+ wrapRows: ne,
1056
+ showStats: J,
1057
+ statsAvailable: !!C,
1058
+ onColumnVisibilityChange: (e, t) => ce((n) => {
1059
+ let r = new Set(n);
1060
+ return t ? r.delete(e) : r.add(e), r;
1061
+ }),
1062
+ onColumnReorder: (e, t) => oe((n) => c(E(ue, n), e, t)),
1063
+ onWrapRowsChange: ie,
1064
+ onStatsVisibilityChange: Y
1065
+ });
1066
+ return /* @__PURE__ */ G(A, {
1067
+ direction: "column",
1068
+ height: "100%",
1069
+ width: "100%",
1070
+ children: [
1071
+ /* @__PURE__ */ W(f, {
1072
+ rows: he,
1073
+ storageKey: ge,
1074
+ attributes: me,
1075
+ columnControl: Oe,
1076
+ defaultViews: e.defaultViews,
1077
+ defaultActiveViewId: e.defaultActiveViewId
1078
+ }),
1079
+ /* @__PURE__ */ G(te, {
1080
+ position: "relative",
1081
+ flex: "1",
1082
+ minHeight: "0",
1083
+ children: [/* @__PURE__ */ W(r, {
1084
+ height: "100%",
1085
+ maxWidth: "unset",
1086
+ showHorizontalScrollbar: !0,
1087
+ children: /* @__PURE__ */ G(B.Root, {
1088
+ className: `data-table${i ? " full-width" : ""}`,
1089
+ style: {
1090
+ ...be,
1091
+ width: i ? "100%" : $.getTotalSize()
1092
+ },
1093
+ children: [/* @__PURE__ */ W(B.Header, { children: $.getHeaderGroups().map((e) => /* @__PURE__ */ G(K, { children: [/* @__PURE__ */ W(B.Row, {
1094
+ className: "data-table-column-header-row",
1095
+ borderRight: n ? "none" : "1px solid",
1096
+ borderColor: "border.subtle",
1097
+ children: e.headers.map((t) => /* @__PURE__ */ W(It, {
1098
+ header: t,
1099
+ headerGroup: e,
1100
+ table: $,
1101
+ fullWidth: i,
1102
+ hasDescription: !!_?.[t.column.id]
1103
+ }, t.id))
1104
+ }), C && J ? /* @__PURE__ */ W(q, {
1105
+ fallback: null,
1106
+ children: /* @__PURE__ */ W(zt, {
1107
+ headerGroup: e,
1108
+ rows: ve,
1109
+ columnStats: C,
1110
+ noBorder: n,
1111
+ fullWidth: i
1112
+ })
1113
+ }) : null] }, e.id)) }), /* @__PURE__ */ W(B.Body, { children: $.getRowModel().rows.map((e) => {
1114
+ let t = o ? d?.(e.original) ?? !0 : !1, r = s({
1115
+ enableRowActivation: F,
1116
+ activeRowId: m,
1117
+ rowId: e.id
1118
+ }), i = e.getIsSelected();
1119
+ return /* @__PURE__ */ W(Rt, {
1120
+ row: e,
1121
+ noBorder: n,
1122
+ rowIsInteractive: t,
1123
+ rowIsActive: r,
1124
+ rowIsSelected: i,
1125
+ wrapRows: ne,
1126
+ onRowClick: o,
1127
+ getCellContextMenuActions: I
1128
+ }, e.id);
1129
+ }) })]
1130
+ })
1131
+ }), Q && xe.length > 0 ? /* @__PURE__ */ W(S, {
1132
+ selectedCount: xe.length,
1133
+ totalCount: Se.length,
1134
+ onClearSelection: () => $.toggleAllRowsSelected(!1),
1135
+ onSelectAll: () => $.toggleAllRowsSelected(!0),
1136
+ actions: pe,
1137
+ selectedRows: De
1138
+ }) : null]
1139
+ }),
1140
+ $.getPageCount() > 1 && /* @__PURE__ */ W(Vt, {
1141
+ table: $,
1142
+ pagination: z,
1143
+ pageSizeOptions: k
1144
+ })
1145
+ ]
1146
+ });
1147
+ }, Ut = (e) => {
1148
+ let t = U(4);
1149
+ if (e.editMode) {
1150
+ let n;
1151
+ return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ W(T, { ...e }), t[0] = e, t[1] = n), n;
1152
+ }
1153
+ let n;
1154
+ return t[2] === e ? n = t[3] : (n = /* @__PURE__ */ W(Ht, { ...e }), t[2] = e, t[3] = n), n;
1155
+ }, Wt = [
1156
+ "70%",
1157
+ "45%",
1158
+ "60%",
1159
+ "35%",
1160
+ "55%"
1161
+ ], Gt = (e) => {
1162
+ let t = U(15), { columns: n, columnCount: r, rowCount: i } = e, a = r === void 0 ? 3 : r, o = i === void 0 ? 5 : i, s;
1163
+ t[0] !== a || t[1] !== n ? (s = n && n.length > 0 ? n : Array.from({ length: a }, Kt), t[0] = a, t[1] = n, t[2] = s) : s = t[2];
1164
+ let c = s, l;
1165
+ t[3] === c ? l = t[4] : (l = c.map(qt), t[3] = c, t[4] = l);
1166
+ let u;
1167
+ t[5] === l ? u = t[6] : (u = /* @__PURE__ */ W(B.Header, { children: /* @__PURE__ */ W(B.Row, {
1168
+ className: "data-table-column-header-row",
1169
+ borderRight: "1px solid",
1170
+ borderColor: "border.subtle",
1171
+ children: l
1172
+ }) }), t[5] = l, t[6] = u);
1173
+ let d;
1174
+ if (t[7] !== c || t[8] !== o) {
1175
+ let e;
1176
+ t[10] === c ? e = t[11] : (e = (e, t) => /* @__PURE__ */ W(B.Row, { children: c.map((e, n) => /* @__PURE__ */ W(B.Cell, {
1177
+ padding: "xs",
1178
+ borderRight: "1px solid",
1179
+ borderColor: "border.subtle",
1180
+ _last: { borderRight: "none" },
1181
+ borderBottom: "none",
1182
+ children: /* @__PURE__ */ W(R, {
1183
+ height: "14px",
1184
+ width: Wt[(t + n) % Wt.length],
1185
+ borderRadius: "xs"
1186
+ })
1187
+ }, e.id)) }, t), t[10] = c, t[11] = e), d = /* @__PURE__ */ W(B.Body, { children: Array.from({ length: o }, e) }), t[7] = c, t[8] = o, t[9] = d;
1188
+ } else d = t[9];
1189
+ let f;
1190
+ return t[12] !== u || t[13] !== d ? (f = /* @__PURE__ */ G(B.Root, {
1191
+ className: "data-table full-width",
1192
+ width: "100%",
1193
+ children: [u, d]
1194
+ }), t[12] = u, t[13] = d, t[14] = f) : f = t[14], f;
861
1195
  };
862
- function sl(o, e) {
863
- return o + e.count;
1196
+ function Kt(e, t) {
1197
+ return {
1198
+ id: `column-${t + 1}`,
1199
+ label: ""
1200
+ };
864
1201
  }
865
- function al(o) {
866
- return `${Y(o.start)} – ${Y(o.end)}`;
1202
+ function qt(e) {
1203
+ return /* @__PURE__ */ W(B.ColumnHeader, {
1204
+ textTransform: "none",
1205
+ borderRight: "1px solid",
1206
+ _last: { borderRight: "none" },
1207
+ borderColor: "border.subtle",
1208
+ paddingX: "xs",
1209
+ paddingY: "xs",
1210
+ whiteSpace: "nowrap",
1211
+ children: e.label ? /* @__PURE__ */ W(V, {
1212
+ as: "div",
1213
+ textStyle: "label/S/medium",
1214
+ lineHeight: "1.2",
1215
+ truncate: !0,
1216
+ children: e.label
1217
+ }) : /* @__PURE__ */ W(R, {
1218
+ height: "12px",
1219
+ width: "4rem",
1220
+ borderRadius: "xs"
1221
+ })
1222
+ }, e.id);
867
1223
  }
868
- function cl(o) {
869
- return `${Y(Number(o))} values`;
870
- }
871
- function dl(o) {
872
- return `${o.label} · ${Y(o.count)} values`;
873
- }
874
- function ul(o) {
875
- return `${Y(Number(o))}%`;
876
- }
877
- function ml(o) {
878
- return /* @__PURE__ */ _(re, { position: "relative", height: "18px", children: [
879
- /* @__PURE__ */ a(et, { data: [o], dataKey: "percentage", categoryKey: "label", color: tt, height: "18px", ariaLabel: `${o.label}: ${o.percentage}%`, layout: "vertical", domain: [0, 100], barSize: 18, tooltipLabel: dl, tooltipValue: ul, tooltipSeriesLabel: "Share" }),
880
- /* @__PURE__ */ _(oe, { position: "absolute", inset: "0", paddingX: "2xs", justifyContent: "space-between", gap: "xs", pointerEvents: "none", children: [
881
- /* @__PURE__ */ a(O, { textStyle: "label/2XS", color: "fg.inverted", truncate: !0, children: o.label }),
882
- /* @__PURE__ */ _(O, { textStyle: "label/2XS/medium", color: "fg.muted", children: [
883
- o.percentage,
884
- "%"
885
- ] })
886
- ] })
887
- ] }, o.label);
888
- }
889
- const fl = /* @__PURE__ */ new Set(["rowIndex", "rowSelection", "rowActions"]), hl = (o) => o === "asc" ? Xe : o === "desc" ? qe : At, gl = (o) => {
890
- const e = z(37), {
891
- header: t,
892
- headerGroup: l,
893
- table: n,
894
- fullWidth: i,
895
- hasDescription: c
896
- } = o;
897
- let s, r, d;
898
- if (e[0] !== t.column || e[1] !== n) {
899
- r = t.column.getIsSorted();
900
- let $;
901
- e[5] !== t.column.id || e[6] !== n ? ($ = !fl.has(t.column.id) && n.getCoreRowModel().rows.length > 1, e[5] = t.column.id, e[6] = n, e[7] = $) : $ = e[7], s = $, d = hl(r), e[0] = t.column, e[1] = n, e[2] = s, e[3] = r, e[4] = d;
902
- } else
903
- s = e[2], r = e[3], d = e[4];
904
- const u = d;
905
- let m;
906
- e[8] !== t ? (m = t.column.id === "rowSelection" ? "Select all" : be(t.column.columnDef.header, t.getContext()), e[8] = t, e[9] = m) : m = e[9];
907
- const f = m, h = t.column.id;
908
- let S;
909
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
910
- borderRight: "none"
911
- }, e[10] = S) : S = e[10];
912
- const b = t.id, x = i && l.headers.indexOf(t) === l.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
913
- let g;
914
- e[11] !== x ? (g = {
915
- width: x
916
- }, e[11] = x, e[12] = g) : g = e[12];
917
- let v;
918
- e[13] !== t ? (v = be(t.column.columnDef.header, t.getContext()), e[13] = t, e[14] = v) : v = e[14];
919
- let w;
920
- e[15] !== v ? (w = /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: v }), e[15] = v, e[16] = w) : w = e[16];
921
- let p;
922
- e[17] !== u || e[18] !== s || e[19] !== t.column || e[20] !== r ? (p = s && /* @__PURE__ */ _(G.Root, { children: [
923
- /* @__PURE__ */ a(G.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { ml: "2px", size: "2xs", "aria-label": r ? `Sorted ${r}` : "Sort column", variant: "ghost", visibility: r ? "visible" : "hidden", _groupHover: {
924
- visibility: "visible"
925
- }, children: /* @__PURE__ */ a(ee, { as: u, boxSize: "14px" }) }) }),
926
- /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(G.Positioner, { children: /* @__PURE__ */ _(G.Content, { zIndex: "popover", bg: "bg", children: [
927
- /* @__PURE__ */ a(G.Item, { value: "sort-asc", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Sort ascending", icon: /* @__PURE__ */ a(ee, { as: Xe, boxSize: "16px" }), disabled: r === "asc", onActivate: () => t.column.toggleSorting(!1) }) }),
928
- /* @__PURE__ */ a(G.Item, { value: "sort-desc", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Sort descending", icon: /* @__PURE__ */ a(ee, { as: qe, boxSize: "16px" }), disabled: r === "desc", onActivate: () => t.column.toggleSorting(!0) }) }),
929
- r && /* @__PURE__ */ a(G.Item, { value: "clear-sort", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Clear sort", onActivate: () => t.column.clearSorting() }) })
930
- ] }) }) })
931
- ] }), e[17] = u, e[18] = s, e[19] = t.column, e[20] = r, e[21] = p) : p = e[21];
932
- let R;
933
- e[22] !== t ? (R = t.column.getCanResize() && /* @__PURE__ */ a("span", { onDoubleClick: () => t.column.resetSize(), onMouseDown: t.getResizeHandler(), onTouchStart: t.getResizeHandler(), className: `resizer ${t.column.getIsResizing() ? "isResizing" : ""}` }), e[22] = t, e[23] = R) : R = e[23];
934
- let C;
935
- e[24] !== R || e[25] !== w || e[26] !== p ? (C = /* @__PURE__ */ _(oe, { className: "group", alignItems: "center", justifyContent: "space-between", gap: "1", flex: "1", minW: "0", children: [
936
- w,
937
- p,
938
- R
939
- ] }), e[24] = R, e[25] = w, e[26] = p, e[27] = C) : C = e[27];
940
- let y;
941
- e[28] !== c || e[29] !== C || e[30] !== f ? (y = /* @__PURE__ */ a(Je, { content: f, disabled: c, children: C }), e[28] = c, e[29] = C, e[30] = f, e[31] = y) : y = e[31];
942
- let A;
943
- return e[32] !== t.column.id || e[33] !== t.id || e[34] !== y || e[35] !== g ? (A = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": h, textTransform: "none", borderRight: "1px solid", _last: S, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", overflow: "hidden", position: "relative", verticalAlign: "middle", whiteSpace: "nowrap", style: g, children: y }, b), e[32] = t.column.id, e[33] = t.id, e[34] = y, e[35] = g, e[36] = A) : A = e[36], A;
944
- }, bl = (o) => {
945
- const e = z(26), {
946
- cell: t,
947
- row: l,
948
- wrapRows: n,
949
- getCellContextMenuActions: i
950
- } = o, c = t.column.columnDef.meta;
951
- let s;
952
- e[0] !== t || e[1] !== c ? (s = c?.getCellStyle?.(t.getValue()), e[0] = t, e[1] = c, e[2] = s) : s = e[2];
953
- const r = s;
954
- let d;
955
- if (e[3] !== t || e[4] !== i || e[5] !== l.id || e[6] !== l.original) {
956
- const A = {
957
- row: l.original,
958
- rowId: l.id,
959
- columnId: t.column.id,
960
- value: t.getValue()
961
- };
962
- d = i?.(A).map(($) => ({
963
- key: $.label,
964
- label: $.label,
965
- icon: $.icon,
966
- onClick: () => $.onSelect(A)
967
- })) ?? [], e[3] = t, e[4] = i, e[5] = l.id, e[6] = l.original, e[7] = d;
968
- } else
969
- d = e[7];
970
- const u = d, m = t.column.id, f = n ? "anywhere" : void 0, h = n ? void 0 : "10", S = n ? void 0 : "10";
971
- let b;
972
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
973
- borderRight: "none"
974
- }, e[8] = b) : b = e[8];
975
- const x = t.id, g = n ? void 0 : "ellipsis", v = n ? "top" : "middle", w = n ? "normal" : "nowrap";
976
- let p;
977
- e[9] !== t ? (p = be(t.column.columnDef.cell, t.getContext()), e[9] = t, e[10] = p) : p = e[10];
978
- let R;
979
- e[11] !== t.column.id || e[12] !== t.id || e[13] !== r || e[14] !== w || e[15] !== p || e[16] !== f || e[17] !== h || e[18] !== S || e[19] !== g || e[20] !== v ? (R = /* @__PURE__ */ a(L.Cell, { "data-column-id": m, width: "fit-content", maxWidth: "12rem", overflow: "hidden", overflowWrap: f, padding: "xs", height: h, maxHeight: S, borderRight: "1px solid", borderColor: "border.subtle", _last: b, borderBottom: "none", textStyle: "paragraph/S/regular", textOverflow: g, verticalAlign: v, whiteSpace: w, style: r, children: p }, x), e[11] = t.column.id, e[12] = t.id, e[13] = r, e[14] = w, e[15] = p, e[16] = f, e[17] = h, e[18] = S, e[19] = g, e[20] = v, e[21] = R) : R = e[21];
980
- const C = R;
981
- if (u.length === 0)
982
- return C;
983
- let y;
984
- return e[22] !== t.id || e[23] !== C || e[24] !== u ? (y = /* @__PURE__ */ a(kt, { actions: u, children: C }, t.id), e[22] = t.id, e[23] = C, e[24] = u, e[25] = y) : y = e[25], y;
985
- }, pl = (o) => {
986
- const e = z(23), {
987
- row: t,
988
- noBorder: l,
989
- rowIsInteractive: n,
990
- rowIsActive: i,
991
- rowIsSelected: c,
992
- wrapRows: s,
993
- onRowClick: r,
994
- getCellContextMenuActions: d
995
- } = o, u = t.id, m = i ? "true" : void 0, f = c ? "true" : void 0, h = c ? "true" : void 0, S = s ? void 0 : "10", b = n ? "pointer" : void 0;
996
- let x;
997
- e[0] !== r || e[1] !== t.original || e[2] !== n ? (x = n ? () => r?.(t.original) : void 0, e[0] = r, e[1] = t.original, e[2] = n, e[3] = x) : x = e[3];
998
- const g = l ? "none" : "1px solid", v = l ? "none" : "1px solid", w = l ? "none" : "1px solid";
999
- let p;
1000
- e[4] !== w ? (p = {
1001
- borderBottom: w,
1002
- borderColor: "border.subtle"
1003
- }, e[4] = w, e[5] = p) : p = e[5];
1004
- const R = i ? "bg.active" : "bg";
1005
- let C;
1006
- e[6] !== d || e[7] !== t || e[8] !== s ? (C = t.getVisibleCells().map((A) => /* @__PURE__ */ a(bl, { cell: A, row: t, wrapRows: s, getCellContextMenuActions: d }, A.id)), e[6] = d, e[7] = t, e[8] = s, e[9] = C) : C = e[9];
1007
- let y;
1008
- return e[10] !== t.id || e[11] !== m || e[12] !== p || e[13] !== R || e[14] !== C || e[15] !== f || e[16] !== h || e[17] !== S || e[18] !== b || e[19] !== x || e[20] !== g || e[21] !== v ? (y = /* @__PURE__ */ a(L.Row, { "data-active": m, "data-selected": f, "aria-selected": h, height: S, cursor: b, onClick: x, borderTop: g, borderBottom: "1px solid", borderRight: v, _last: p, borderColor: "border.subtle", background: R, children: C }, u), e[10] = t.id, e[11] = m, e[12] = p, e[13] = R, e[14] = C, e[15] = f, e[16] = h, e[17] = S, e[18] = b, e[19] = x, e[20] = g, e[21] = v, e[22] = y) : y = e[22], y;
1009
- }, Sl = (o, e) => o.map((t) => ({
1010
- id: t,
1011
- label: e?.[t] ?? t
1012
- })), wl = (o) => {
1013
- const e = z(12), {
1014
- table: t,
1015
- pagination: l,
1016
- pageSizeOptions: n
1017
- } = o;
1018
- let i;
1019
- e[0] !== t ? (i = t.getPageCount(), e[0] = t, e[1] = i) : i = e[1];
1020
- const c = l.pageIndex, s = l.pageSize;
1021
- let r;
1022
- e[2] !== t ? (r = t.getCoreRowModel(), e[2] = t, e[3] = r) : r = e[3];
1023
- let d;
1024
- return e[4] !== n || e[5] !== l.pageIndex || e[6] !== l.pageSize || e[7] !== i || e[8] !== r.rows.length || e[9] !== t.setPageIndex || e[10] !== t.setPageSize ? (d = /* @__PURE__ */ a(Xt, { pageCount: i, pageIndex: c, pageSize: s, pageSizeOptions: n, totalRows: r.rows.length, onPageChange: t.setPageIndex, onPageSizeChange: t.setPageSize }), e[4] = n, e[5] = l.pageIndex, e[6] = l.pageSize, e[7] = i, e[8] = r.rows.length, e[9] = t.setPageIndex, e[10] = t.setPageSize, e[11] = d) : d = e[11], d;
1025
- }, xl = (o) => {
1026
- const {
1027
- data: e,
1028
- noBorder: t,
1029
- fullWidth: l,
1030
- hiddenColumns: n,
1031
- onRowClick: i,
1032
- isRowInteractive: c,
1033
- activeRowId: s,
1034
- columnIcons: r,
1035
- columnDescriptions: d,
1036
- compactHeaders: u,
1037
- columnStats: m,
1038
- columnRenderers: f,
1039
- initialPageSize: h,
1040
- pageSizeOptions: S = [10, 20, 30, 50, 100],
1041
- rowActions: b = [],
1042
- getRowActions: x,
1043
- getRowId: g,
1044
- toolbarStorageKey: v,
1045
- enableRowActivation: w = !1,
1046
- getCellContextMenuActions: p
1047
- } = o, [R, C] = Q([]), [y, A] = Q(() => ({
1048
- pageIndex: 0,
1049
- pageSize: Mt({
1050
- initialPageSize: h
1051
- })
1052
- })), [$, T] = Q({}), [P, M] = Q(!0), [D, K] = Q(!1), [W, N] = Q(() => {
1053
- const I = new Set(n ?? []);
1054
- return Object.keys(e[0] || {}).filter((V) => !I.has(V));
1055
- }), [J, X] = Q(() => /* @__PURE__ */ new Set()), j = new Set(n ?? []), H = Object.keys(e[0] || {}).filter((I) => !j.has(I)), E = De(H, W), k = new Set(E.filter((I) => !J.has(I))), B = E.filter((I) => k.has(I)), F = Pt(o), le = Ht(o), Ae = Lt(e, E, u), $e = Ot(e, E, g), _e = Wt({
1056
- toolbarStorageKey: v,
1057
- columnKeys: H
1058
- }), lt = St(_e, (I) => I.filters, {
1059
- settings: {
1060
- viewMode: "list"
1061
- },
1062
- views: o.defaultViews,
1063
- activeViewId: o.defaultActiveViewId
1064
- }), ke = Nt($e, lt, Ae).map((I) => I.sourceRow), nt = Ko(e, B, {
1065
- columnIcons: r,
1066
- columnDescriptions: d,
1067
- compactHeaders: u,
1068
- enableSelection: F,
1069
- rowActions: b,
1070
- getRowActions: x,
1071
- selectedRowIds: $,
1072
- columnRenderers: f,
1073
- wrapRows: D
1074
- }), q = mt({
1075
- data: ke,
1076
- columns: nt,
1077
- defaultColumn: {
1078
- size: 150,
1079
- minSize: 40,
1080
- maxSize: 800
1081
- },
1082
- state: {
1083
- sorting: R,
1084
- pagination: y,
1085
- rowSelection: $
1086
- },
1087
- getRowId: (I, V) => jt(I, V, g),
1088
- columnResizeMode: "onChange",
1089
- columnResizeDirection: "ltr",
1090
- onSortingChange: C,
1091
- onPaginationChange: A,
1092
- onRowSelectionChange: T,
1093
- getSortedRowModel: gt(),
1094
- getCoreRowModel: ht(),
1095
- getPaginationRowModel: ft(),
1096
- enableMultiRowSelection: F,
1097
- enableRowSelection: F,
1098
- autoResetAll: !1
1099
- });
1100
- Ke(() => {
1101
- const I = q.getPageCount();
1102
- I === 0 || y.pageIndex < I || A((V) => ({
1103
- ...V,
1104
- pageIndex: Math.max(I - 1, 0)
1105
- }));
1106
- }, [y.pageIndex, q]);
1107
- const rt = (() => {
1108
- const I = q.getFlatHeaders(), V = {};
1109
- for (let Z = 0; Z < I.length; Z++) {
1110
- const U = I[Z];
1111
- V[`--header-${U.id}-size`] = U.getSize(), V[`--col-${U.column.id}-size`] = U.column.getSize();
1112
- }
1113
- return V;
1114
- })(), fe = q.getSelectedRowModel().rows, it = q.getCoreRowModel().rows, st = Et(fe), at = /* @__PURE__ */ a(Xo, { columns: Sl(E, u), visibleColumnIds: k, wrapRows: D, showStats: P, statsAvailable: !!m, onColumnVisibilityChange: (I, V) => X((Z) => {
1115
- const U = new Set(Z);
1116
- return V ? U.delete(I) : U.add(I), U;
1117
- }), onColumnReorder: (I, V) => N((Z) => Bt(De(H, Z), I, V)), onWrapRowsChange: K, onStatsVisibilityChange: M });
1118
- return /* @__PURE__ */ _(oe, { direction: "column", height: "100%", width: "100%", children: [
1119
- /* @__PURE__ */ a(Ft, { rows: $e, storageKey: _e, attributes: Ae, columnControl: at, defaultViews: o.defaultViews, defaultActiveViewId: o.defaultActiveViewId }),
1120
- /* @__PURE__ */ _(re, { position: "relative", flex: "1", minHeight: "0", children: [
1121
- /* @__PURE__ */ a(xe, { height: "100%", maxWidth: "unset", showHorizontalScrollbar: !0, children: /* @__PURE__ */ _(L.Root, { className: `data-table${l ? " full-width" : ""}`, style: {
1122
- ...rt,
1123
- width: l ? "100%" : q.getTotalSize()
1124
- }, children: [
1125
- /* @__PURE__ */ a(L.Header, { children: q.getHeaderGroups().map((I) => /* @__PURE__ */ _(pt, { children: [
1126
- /* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: t ? "none" : "1px solid", borderColor: "border.subtle", children: I.headers.map((V) => /* @__PURE__ */ a(gl, { header: V, headerGroup: I, table: q, fullWidth: l, hasDescription: !!d?.[V.column.id] }, V.id)) }),
1127
- m && P ? /* @__PURE__ */ a(il, { headerGroup: I, rows: ke, columnStats: m, noBorder: t, fullWidth: l }) : null
1128
- ] }, I.id)) }),
1129
- /* @__PURE__ */ a(L.Body, { children: q.getRowModel().rows.map((I) => {
1130
- const V = i ? c?.(I.original) ?? !0 : !1, Z = Kt({
1131
- enableRowActivation: w,
1132
- activeRowId: s,
1133
- rowId: I.id
1134
- }), U = I.getIsSelected();
1135
- return /* @__PURE__ */ a(pl, { row: I, noBorder: t, rowIsInteractive: V, rowIsActive: Z, rowIsSelected: U, wrapRows: D, onRowClick: i, getCellContextMenuActions: p }, I.id);
1136
- }) })
1137
- ] }) }),
1138
- F && fe.length > 0 ? /* @__PURE__ */ a(Jt, { selectedCount: fe.length, totalCount: it.length, onClearSelection: () => q.toggleAllRowsSelected(!1), onSelectAll: () => q.toggleAllRowsSelected(!0), actions: le, selectedRows: st }) : null
1139
- ] }),
1140
- q.getPageCount() > 1 && /* @__PURE__ */ a(wl, { table: q, pagination: y, pageSizeOptions: S })
1141
- ] });
1142
- }, jl = (o) => {
1143
- const e = z(4);
1144
- if (o.editMode) {
1145
- let l;
1146
- return e[0] !== o ? (l = /* @__PURE__ */ a(Vt, { ...o }), e[0] = o, e[1] = l) : l = e[1], l;
1147
- }
1148
- let t;
1149
- return e[2] !== o ? (t = /* @__PURE__ */ a(xl, { ...o }), e[2] = o, e[3] = t) : t = e[3], t;
1150
- }, je = ["70%", "45%", "60%", "35%", "55%"], El = (o) => {
1151
- const e = z(15), {
1152
- columns: t,
1153
- columnCount: l,
1154
- rowCount: n
1155
- } = o, i = l === void 0 ? 3 : l, c = n === void 0 ? 5 : n;
1156
- let s;
1157
- e[0] !== i || e[1] !== t ? (s = t && t.length > 0 ? t : Array.from({
1158
- length: i
1159
- }, yl), e[0] = i, e[1] = t, e[2] = s) : s = e[2];
1160
- const r = s;
1161
- let d;
1162
- e[3] !== r ? (d = r.map(Cl), e[3] = r, e[4] = d) : d = e[4];
1163
- let u;
1164
- e[5] !== d ? (u = /* @__PURE__ */ a(L.Header, { children: /* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: "1px solid", borderColor: "border.subtle", children: d }) }), e[5] = d, e[6] = u) : u = e[6];
1165
- let m;
1166
- if (e[7] !== r || e[8] !== c) {
1167
- let h;
1168
- e[10] !== r ? (h = (S, b) => /* @__PURE__ */ a(L.Row, { children: r.map((x, g) => /* @__PURE__ */ a(L.Cell, { padding: "xs", borderRight: "1px solid", borderColor: "border.subtle", _last: {
1169
- borderRight: "none"
1170
- }, borderBottom: "none", children: /* @__PURE__ */ a(Be, { height: "14px", width: je[(b + g) % je.length], borderRadius: "xs" }) }, x.id)) }, b), e[10] = r, e[11] = h) : h = e[11], m = /* @__PURE__ */ a(L.Body, { children: Array.from({
1171
- length: c
1172
- }, h) }), e[7] = r, e[8] = c, e[9] = m;
1173
- } else
1174
- m = e[9];
1175
- let f;
1176
- return e[12] !== u || e[13] !== m ? (f = /* @__PURE__ */ _(L.Root, { className: "data-table full-width", width: "100%", children: [
1177
- u,
1178
- m
1179
- ] }), e[12] = u, e[13] = m, e[14] = f) : f = e[14], f;
1180
- };
1181
- function yl(o, e) {
1182
- return {
1183
- id: `column-${e + 1}`,
1184
- label: ""
1185
- };
1186
- }
1187
- function Cl(o) {
1188
- return /* @__PURE__ */ a(L.ColumnHeader, { textTransform: "none", borderRight: "1px solid", _last: {
1189
- borderRight: "none"
1190
- }, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", whiteSpace: "nowrap", children: o.label ? /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: o.label }) : /* @__PURE__ */ a(Be, { height: "12px", width: "4rem", borderRadius: "xs" }) }, o.id);
1191
- }
1192
- export {
1193
- jl as DataTable,
1194
- El as DataTableSkeleton,
1195
- Do as FriendlyJsonDisplay,
1196
- Tt as formatDisplayValue,
1197
- zt as getIcon
1198
- };
1199
- //# sourceMappingURL=data-table.js.map
1224
+ //#endregion
1225
+ export { Ut as DataTable, Gt as DataTableSkeleton, ut as FriendlyJsonDisplay, m as formatDisplayValue, h as getIcon };
1226
+
1227
+ //# sourceMappingURL=data-table.js.map