@vertesia/ui 0.78.0-dev-28b447d → 0.79.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 (1380) hide show
  1. package/lib/esm/core/components/Avatar.js +31 -0
  2. package/lib/esm/core/components/Avatar.js.map +1 -0
  3. package/lib/esm/core/components/Badge.js +62 -0
  4. package/lib/esm/core/components/Badge.js.map +1 -0
  5. package/lib/esm/core/components/Button.js +32 -0
  6. package/lib/esm/core/components/Button.js.map +1 -0
  7. package/lib/esm/core/components/Center.js +6 -0
  8. package/lib/esm/core/components/Center.js.map +1 -0
  9. package/lib/esm/core/components/ComboBox.js +356 -0
  10. package/lib/esm/core/components/ComboBox.js.map +1 -0
  11. package/lib/esm/core/components/ConfirmModal.js +10 -0
  12. package/lib/esm/core/components/ConfirmModal.js.map +1 -0
  13. package/lib/esm/core/components/DeleteModal.js +28 -0
  14. package/lib/esm/core/components/DeleteModal.js.map +1 -0
  15. package/lib/esm/core/components/Divider.js +6 -0
  16. package/lib/esm/core/components/Divider.js.map +1 -0
  17. package/lib/esm/core/components/Dropdown.js +16 -0
  18. package/lib/esm/core/components/Dropdown.js.map +1 -0
  19. package/lib/esm/core/components/DropdownList.js +9 -0
  20. package/lib/esm/core/components/DropdownList.js.map +1 -0
  21. package/lib/esm/core/components/EmptyCollection.js +7 -0
  22. package/lib/esm/core/components/EmptyCollection.js.map +1 -0
  23. package/lib/esm/core/components/FileUpload.js +119 -0
  24. package/lib/esm/core/components/FileUpload.js.map +1 -0
  25. package/lib/esm/core/components/FormItem.js +9 -0
  26. package/lib/esm/core/components/FormItem.js.map +1 -0
  27. package/lib/esm/core/components/InputList.js +43 -0
  28. package/lib/esm/core/components/InputList.js.map +1 -0
  29. package/lib/esm/core/components/Link.js +13 -0
  30. package/lib/esm/core/components/Link.js.map +1 -0
  31. package/lib/esm/core/components/MenuList.js +23 -0
  32. package/lib/esm/core/components/MenuList.js.map +1 -0
  33. package/lib/esm/core/components/MessageBox.js +66 -0
  34. package/lib/esm/core/components/MessageBox.js.map +1 -0
  35. package/lib/esm/core/components/Modal.js +26 -0
  36. package/lib/esm/core/components/Modal.js.map +1 -0
  37. package/lib/esm/core/components/NumberInput.js +43 -0
  38. package/lib/esm/core/components/NumberInput.js.map +1 -0
  39. package/lib/esm/core/components/Overlay.js +57 -0
  40. package/lib/esm/core/components/Overlay.js.map +1 -0
  41. package/lib/esm/core/components/Portal.js +28 -0
  42. package/lib/esm/core/components/Portal.js.map +1 -0
  43. package/lib/esm/core/components/RadioGroup.js +34 -0
  44. package/lib/esm/core/components/RadioGroup.js.map +1 -0
  45. package/lib/esm/core/components/SelectBox.js +67 -0
  46. package/lib/esm/core/components/SelectBox.js.map +1 -0
  47. package/lib/esm/core/components/SelectList.js +52 -0
  48. package/lib/esm/core/components/SelectList.js.map +1 -0
  49. package/lib/esm/core/components/SelectStack.js +8 -0
  50. package/lib/esm/core/components/SelectStack.js.map +1 -0
  51. package/lib/esm/core/components/SidePanel.js +33 -0
  52. package/lib/esm/core/components/SidePanel.js.map +1 -0
  53. package/lib/esm/core/components/Spinner.js +18 -0
  54. package/lib/esm/core/components/Spinner.js.map +1 -0
  55. package/lib/esm/core/components/Switch.js +12 -0
  56. package/lib/esm/core/components/Switch.js.map +1 -0
  57. package/lib/esm/core/components/Textarea.js +15 -0
  58. package/lib/esm/core/components/Textarea.js.map +1 -0
  59. package/lib/esm/core/components/index.js +35 -0
  60. package/lib/esm/core/components/index.js.map +1 -0
  61. package/lib/esm/core/components/libs/utils.js +6 -0
  62. package/lib/esm/core/components/libs/utils.js.map +1 -0
  63. package/lib/esm/core/components/libs/visuallyHidden.js +16 -0
  64. package/lib/esm/core/components/libs/visuallyHidden.js.map +1 -0
  65. package/lib/esm/core/components/popup/Popup.js +60 -0
  66. package/lib/esm/core/components/popup/Popup.js.map +1 -0
  67. package/lib/esm/core/components/popup/PopupController.js +149 -0
  68. package/lib/esm/core/components/popup/PopupController.js.map +1 -0
  69. package/lib/esm/core/components/popup/index.js +4 -0
  70. package/lib/esm/core/components/popup/index.js.map +1 -0
  71. package/lib/esm/core/components/popup/position.js +221 -0
  72. package/lib/esm/core/components/popup/position.js.map +1 -0
  73. package/lib/esm/core/components/popup/utils.js +74 -0
  74. package/lib/esm/core/components/popup/utils.js.map +1 -0
  75. package/lib/esm/core/components/shadcn/breadcrumb.js +30 -0
  76. package/lib/esm/core/components/shadcn/breadcrumb.js.map +1 -0
  77. package/lib/esm/core/components/shadcn/button.js +75 -0
  78. package/lib/esm/core/components/shadcn/button.js.map +1 -0
  79. package/lib/esm/core/components/shadcn/calendar.js +13 -0
  80. package/lib/esm/core/components/shadcn/calendar.js.map +1 -0
  81. package/lib/esm/core/components/shadcn/card.js +17 -0
  82. package/lib/esm/core/components/shadcn/card.js.map +1 -0
  83. package/lib/esm/core/components/shadcn/checkbox.js +9 -0
  84. package/lib/esm/core/components/shadcn/checkbox.js.map +1 -0
  85. package/lib/esm/core/components/shadcn/command.js +29 -0
  86. package/lib/esm/core/components/shadcn/command.js.map +1 -0
  87. package/lib/esm/core/components/shadcn/dialog.js +60 -0
  88. package/lib/esm/core/components/shadcn/dialog.js.map +1 -0
  89. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js +38 -0
  90. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js.map +1 -0
  91. package/lib/esm/core/components/shadcn/filters/animateChangeInHeight.js +23 -0
  92. package/lib/esm/core/components/shadcn/filters/animateChangeInHeight.js.map +1 -0
  93. package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js +129 -0
  94. package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -0
  95. package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js +46 -0
  96. package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js.map +1 -0
  97. package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js +23 -0
  98. package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js.map +1 -0
  99. package/lib/esm/core/components/shadcn/filters/comboBox/TextCombobox.js +28 -0
  100. package/lib/esm/core/components/shadcn/filters/comboBox/TextCombobox.js.map +1 -0
  101. package/lib/esm/core/components/shadcn/filters/comboBox/comboBox.js +5 -0
  102. package/lib/esm/core/components/shadcn/filters/comboBox/comboBox.js.map +1 -0
  103. package/lib/esm/core/components/shadcn/filters/filter/SelectFilter.js +101 -0
  104. package/lib/esm/core/components/shadcn/filters/filter/SelectFilter.js.map +1 -0
  105. package/lib/esm/core/components/shadcn/filters/filter/StringListFilter.js +24 -0
  106. package/lib/esm/core/components/shadcn/filters/filter/StringListFilter.js.map +1 -0
  107. package/lib/esm/core/components/shadcn/filters/filter/TextFilter.js +21 -0
  108. package/lib/esm/core/components/shadcn/filters/filter/TextFilter.js.map +1 -0
  109. package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js +161 -0
  110. package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js.map +1 -0
  111. package/lib/esm/core/components/shadcn/filters/filter-styles.js +88 -0
  112. package/lib/esm/core/components/shadcn/filters/filter-styles.js.map +1 -0
  113. package/lib/esm/core/components/shadcn/filters/filterBar.js +242 -0
  114. package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -0
  115. package/lib/esm/core/components/shadcn/filters/filters.js +57 -0
  116. package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -0
  117. package/lib/esm/core/components/shadcn/filters/index.js +6 -0
  118. package/lib/esm/core/components/shadcn/filters/index.js.map +1 -0
  119. package/lib/esm/core/components/shadcn/filters/types.js +10 -0
  120. package/lib/esm/core/components/shadcn/filters/types.js.map +1 -0
  121. package/lib/esm/core/components/shadcn/heading.js +17 -0
  122. package/lib/esm/core/components/shadcn/heading.js.map +1 -0
  123. package/lib/esm/core/components/shadcn/index.js +23 -0
  124. package/lib/esm/core/components/shadcn/index.js.map +1 -0
  125. package/lib/esm/core/components/shadcn/input.js +38 -0
  126. package/lib/esm/core/components/shadcn/input.js.map +1 -0
  127. package/lib/esm/core/components/shadcn/label.js +10 -0
  128. package/lib/esm/core/components/shadcn/label.js.map +1 -0
  129. package/lib/esm/core/components/shadcn/popover.js +50 -0
  130. package/lib/esm/core/components/shadcn/popover.js.map +1 -0
  131. package/lib/esm/core/components/shadcn/resizeable.js +15 -0
  132. package/lib/esm/core/components/shadcn/resizeable.js.map +1 -0
  133. package/lib/esm/core/components/shadcn/selectBox.js +128 -0
  134. package/lib/esm/core/components/shadcn/selectBox.js.map +1 -0
  135. package/lib/esm/core/components/shadcn/separator.js +8 -0
  136. package/lib/esm/core/components/shadcn/separator.js.map +1 -0
  137. package/lib/esm/core/components/shadcn/tabs.js +125 -0
  138. package/lib/esm/core/components/shadcn/tabs.js.map +1 -0
  139. package/lib/esm/core/components/shadcn/text.js +30 -0
  140. package/lib/esm/core/components/shadcn/text.js.map +1 -0
  141. package/lib/esm/core/components/shadcn/theme/ThemeProvider.js +39 -0
  142. package/lib/esm/core/components/shadcn/theme/ThemeProvider.js.map +1 -0
  143. package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js +13 -0
  144. package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js.map +1 -0
  145. package/lib/esm/core/components/shadcn/tooltip.js +14 -0
  146. package/lib/esm/core/components/shadcn/tooltip.js.map +1 -0
  147. package/lib/esm/core/components/styles.js +10 -0
  148. package/lib/esm/core/components/styles.js.map +1 -0
  149. package/lib/esm/core/components/table/index.js +23 -0
  150. package/lib/esm/core/components/table/index.js.map +1 -0
  151. package/lib/esm/core/components/tabs/Tabs.js +78 -0
  152. package/lib/esm/core/components/tabs/Tabs.js.map +1 -0
  153. package/lib/esm/core/components/tabs/TabsContext.js +7 -0
  154. package/lib/esm/core/components/tabs/TabsContext.js.map +1 -0
  155. package/lib/esm/core/components/tabs/index.js +3 -0
  156. package/lib/esm/core/components/tabs/index.js.map +1 -0
  157. package/lib/esm/core/components/toast/NotificationPanel.js +43 -0
  158. package/lib/esm/core/components/toast/NotificationPanel.js.map +1 -0
  159. package/lib/esm/core/components/toast/ToastContext.js +7 -0
  160. package/lib/esm/core/components/toast/ToastContext.js.map +1 -0
  161. package/lib/esm/core/components/toast/ToastProps.js +2 -0
  162. package/lib/esm/core/components/toast/ToastProps.js.map +1 -0
  163. package/lib/esm/core/components/toast/ToastProvider.js +13 -0
  164. package/lib/esm/core/components/toast/ToastProvider.js.map +1 -0
  165. package/lib/esm/core/components/toast/index.js +3 -0
  166. package/lib/esm/core/components/toast/index.js.map +1 -0
  167. package/lib/esm/core/hooks/CompositeState.js +118 -0
  168. package/lib/esm/core/hooks/CompositeState.js.map +1 -0
  169. package/lib/esm/core/hooks/PortalContainerProvider.js +42 -0
  170. package/lib/esm/core/hooks/PortalContainerProvider.js.map +1 -0
  171. package/lib/esm/core/hooks/SharedState.js +64 -0
  172. package/lib/esm/core/hooks/SharedState.js.map +1 -0
  173. package/lib/esm/core/hooks/index.js +15 -0
  174. package/lib/esm/core/hooks/index.js.map +1 -0
  175. package/lib/esm/core/hooks/useClickOutside.js +29 -0
  176. package/lib/esm/core/hooks/useClickOutside.js.map +1 -0
  177. package/lib/esm/core/hooks/useCopyToClipboard.js +23 -0
  178. package/lib/esm/core/hooks/useCopyToClipboard.js.map +1 -0
  179. package/lib/esm/core/hooks/useDarkMode.js +11 -0
  180. package/lib/esm/core/hooks/useDarkMode.js.map +1 -0
  181. package/lib/esm/core/hooks/useDebounce.js +14 -0
  182. package/lib/esm/core/hooks/useDebounce.js.map +1 -0
  183. package/lib/esm/core/hooks/useEventSource.js +31 -0
  184. package/lib/esm/core/hooks/useEventSource.js.map +1 -0
  185. package/lib/esm/core/hooks/useFetch.js +40 -0
  186. package/lib/esm/core/hooks/useFetch.js.map +1 -0
  187. package/lib/esm/core/hooks/useFlag.js +13 -0
  188. package/lib/esm/core/hooks/useFlag.js.map +1 -0
  189. package/lib/esm/core/hooks/useIntersectionObserver.js +34 -0
  190. package/lib/esm/core/hooks/useIntersectionObserver.js.map +1 -0
  191. package/lib/esm/core/hooks/useIsFistRendering.js +14 -0
  192. package/lib/esm/core/hooks/useIsFistRendering.js.map +1 -0
  193. package/lib/esm/core/hooks/useSafeLayoutEffect.js +4 -0
  194. package/lib/esm/core/hooks/useSafeLayoutEffect.js.map +1 -0
  195. package/lib/esm/core/hooks/useSharedValue.js +21 -0
  196. package/lib/esm/core/hooks/useSharedValue.js.map +1 -0
  197. package/lib/esm/core/index.js +4 -0
  198. package/lib/esm/core/index.js.map +1 -0
  199. package/lib/esm/core/utils/cn.js +6 -0
  200. package/lib/esm/core/utils/cn.js.map +1 -0
  201. package/lib/esm/core/utils/index.js +2 -0
  202. package/lib/esm/core/utils/index.js.map +1 -0
  203. package/lib/esm/env/index.js +72 -0
  204. package/lib/esm/env/index.js.map +1 -0
  205. package/lib/esm/features/activity-doc/ActivityDoc.js +71 -0
  206. package/lib/esm/features/activity-doc/ActivityDoc.js.map +1 -0
  207. package/lib/esm/features/activity-doc/index.js +2 -0
  208. package/lib/esm/features/activity-doc/index.js.map +1 -0
  209. package/lib/esm/features/agent/PayloadBuilder.js +241 -0
  210. package/lib/esm/features/agent/PayloadBuilder.js.map +1 -0
  211. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js +207 -0
  212. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js.map +1 -0
  213. package/lib/esm/features/agent/chat/JumpingDots.js +6 -0
  214. package/lib/esm/features/agent/chat/JumpingDots.js.map +1 -0
  215. package/lib/esm/features/agent/chat/ModernAgentConversation.js +415 -0
  216. package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -0
  217. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +130 -0
  218. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -0
  219. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +62 -0
  220. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -0
  221. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js +29 -0
  222. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js.map +1 -0
  223. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +97 -0
  224. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -0
  225. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +46 -0
  226. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -0
  227. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +364 -0
  228. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -0
  229. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js +20 -0
  230. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js.map +1 -0
  231. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +62 -0
  232. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -0
  233. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js +23 -0
  234. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -0
  235. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js +52 -0
  236. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -0
  237. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +82 -0
  238. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -0
  239. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js +13 -0
  240. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js.map +1 -0
  241. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +105 -0
  242. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -0
  243. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +160 -0
  244. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -0
  245. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +266 -0
  246. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -0
  247. package/lib/esm/features/agent/chat/WaitingMessages.js +60 -0
  248. package/lib/esm/features/agent/chat/WaitingMessages.js.map +1 -0
  249. package/lib/esm/features/agent/chat/index.js +5 -0
  250. package/lib/esm/features/agent/chat/index.js.map +1 -0
  251. package/lib/esm/features/agent/index.js +3 -0
  252. package/lib/esm/features/agent/index.js.map +1 -0
  253. package/lib/esm/features/errors/PanelErrorBoundary.js +11 -0
  254. package/lib/esm/features/errors/PanelErrorBoundary.js.map +1 -0
  255. package/lib/esm/features/errors/RowErrorBoundary.js +9 -0
  256. package/lib/esm/features/errors/RowErrorBoundary.js.map +1 -0
  257. package/lib/esm/features/errors/VertesiaErrorBoundary.js +15 -0
  258. package/lib/esm/features/errors/VertesiaErrorBoundary.js.map +1 -0
  259. package/lib/esm/features/errors/WidgetErrorBoundary.js +11 -0
  260. package/lib/esm/features/errors/WidgetErrorBoundary.js.map +1 -0
  261. package/lib/esm/features/errors/index.js +5 -0
  262. package/lib/esm/features/errors/index.js.map +1 -0
  263. package/lib/esm/features/facets/CollectionsFacetsNav.js +66 -0
  264. package/lib/esm/features/facets/CollectionsFacetsNav.js.map +1 -0
  265. package/lib/esm/features/facets/DocumentsFacetsNav.js +147 -0
  266. package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -0
  267. package/lib/esm/features/facets/EnvironmentFacet.js +39 -0
  268. package/lib/esm/features/facets/EnvironmentFacet.js.map +1 -0
  269. package/lib/esm/features/facets/InteractionsFacetsNav.js +82 -0
  270. package/lib/esm/features/facets/InteractionsFacetsNav.js.map +1 -0
  271. package/lib/esm/features/facets/PromptsFacetsNav.js +80 -0
  272. package/lib/esm/features/facets/PromptsFacetsNav.js.map +1 -0
  273. package/lib/esm/features/facets/RunsFacetsNav.js +157 -0
  274. package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -0
  275. package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js +100 -0
  276. package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js.map +1 -0
  277. package/lib/esm/features/facets/index.js +15 -0
  278. package/lib/esm/features/facets/index.js.map +1 -0
  279. package/lib/esm/features/facets/utils/SearchInterface.js +2 -0
  280. package/lib/esm/features/facets/utils/SearchInterface.js.map +1 -0
  281. package/lib/esm/features/facets/utils/StringFacet.js +12 -0
  282. package/lib/esm/features/facets/utils/StringFacet.js.map +1 -0
  283. package/lib/esm/features/facets/utils/StringListFacet.js +11 -0
  284. package/lib/esm/features/facets/utils/StringListFacet.js.map +1 -0
  285. package/lib/esm/features/facets/utils/TypeFacet.js +42 -0
  286. package/lib/esm/features/facets/utils/TypeFacet.js.map +1 -0
  287. package/lib/esm/features/facets/utils/VEnvironmentFacet.js +24 -0
  288. package/lib/esm/features/facets/utils/VEnvironmentFacet.js.map +1 -0
  289. package/lib/esm/features/facets/utils/VInteractionFacet.js +45 -0
  290. package/lib/esm/features/facets/utils/VInteractionFacet.js.map +1 -0
  291. package/lib/esm/features/facets/utils/VStringFacet.js +20 -0
  292. package/lib/esm/features/facets/utils/VStringFacet.js.map +1 -0
  293. package/lib/esm/features/facets/utils/VTypeFacet.js +58 -0
  294. package/lib/esm/features/facets/utils/VTypeFacet.js.map +1 -0
  295. package/lib/esm/features/facets/utils/VUserFacet.js +31 -0
  296. package/lib/esm/features/facets/utils/VUserFacet.js.map +1 -0
  297. package/lib/esm/features/facets/utils/utils.js +7 -0
  298. package/lib/esm/features/facets/utils/utils.js.map +1 -0
  299. package/lib/esm/features/index.js +11 -0
  300. package/lib/esm/features/index.js.map +1 -0
  301. package/lib/esm/features/layout/GenericPageNavHeader.js +11 -0
  302. package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -0
  303. package/lib/esm/features/layout/NotFoundView.js +5 -0
  304. package/lib/esm/features/layout/NotFoundView.js.map +1 -0
  305. package/lib/esm/features/layout/index.js +3 -0
  306. package/lib/esm/features/layout/index.js.map +1 -0
  307. package/lib/esm/features/magic-pdf/DownloadPopover.js +28 -0
  308. package/lib/esm/features/magic-pdf/DownloadPopover.js.map +1 -0
  309. package/lib/esm/features/magic-pdf/MagicPdfView.js +67 -0
  310. package/lib/esm/features/magic-pdf/MagicPdfView.js.map +1 -0
  311. package/lib/esm/features/magic-pdf/PageSlider.js +70 -0
  312. package/lib/esm/features/magic-pdf/PageSlider.js.map +1 -0
  313. package/lib/esm/features/magic-pdf/PdfPageProvider.js +188 -0
  314. package/lib/esm/features/magic-pdf/PdfPageProvider.js.map +1 -0
  315. package/lib/esm/features/magic-pdf/TextPageView.js +62 -0
  316. package/lib/esm/features/magic-pdf/TextPageView.js.map +1 -0
  317. package/lib/esm/features/magic-pdf/index.js +2 -0
  318. package/lib/esm/features/magic-pdf/index.js.map +1 -0
  319. package/lib/esm/features/magic-pdf/types.js +2 -0
  320. package/lib/esm/features/magic-pdf/types.js.map +1 -0
  321. package/lib/esm/features/magic-pdf/useResizeOnDrag.js +34 -0
  322. package/lib/esm/features/magic-pdf/useResizeOnDrag.js.map +1 -0
  323. package/lib/esm/features/permissions/SecureButton.js +13 -0
  324. package/lib/esm/features/permissions/SecureButton.js.map +1 -0
  325. package/lib/esm/features/permissions/SecureSidebarItem.js +14 -0
  326. package/lib/esm/features/permissions/SecureSidebarItem.js.map +1 -0
  327. package/lib/esm/features/permissions/UserPermissionsProvider.js +87 -0
  328. package/lib/esm/features/permissions/UserPermissionsProvider.js.map +1 -0
  329. package/lib/esm/features/permissions/helpers.js +12 -0
  330. package/lib/esm/features/permissions/helpers.js.map +1 -0
  331. package/lib/esm/features/permissions/index.js +5 -0
  332. package/lib/esm/features/permissions/index.js.map +1 -0
  333. package/lib/esm/features/store/collections/BrowseCollectionView.js +37 -0
  334. package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -0
  335. package/lib/esm/features/store/collections/CollectionsTable.js +64 -0
  336. package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -0
  337. package/lib/esm/features/store/collections/CreateCollection.js +87 -0
  338. package/lib/esm/features/store/collections/CreateCollection.js.map +1 -0
  339. package/lib/esm/features/store/collections/EditCollectionView.js +175 -0
  340. package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -0
  341. package/lib/esm/features/store/collections/SelectCollection.js +53 -0
  342. package/lib/esm/features/store/collections/SelectCollection.js.map +1 -0
  343. package/lib/esm/features/store/collections/index.js +6 -0
  344. package/lib/esm/features/store/collections/index.js.map +1 -0
  345. package/lib/esm/features/store/index.js +4 -0
  346. package/lib/esm/features/store/index.js.map +1 -0
  347. package/lib/esm/features/store/objects/DocumentPreviewPanel.js +147 -0
  348. package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +1 -0
  349. package/lib/esm/features/store/objects/DocumentSearchResults.js +177 -0
  350. package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -0
  351. package/lib/esm/features/store/objects/DocumentSelectionProvider.js +81 -0
  352. package/lib/esm/features/store/objects/DocumentSelectionProvider.js.map +1 -0
  353. package/lib/esm/features/store/objects/DocumentTable.js +278 -0
  354. package/lib/esm/features/store/objects/DocumentTable.js.map +1 -0
  355. package/lib/esm/features/store/objects/ExportPropertiesModal.js +31 -0
  356. package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -0
  357. package/lib/esm/features/store/objects/components/ContentDispositionButton.js +31 -0
  358. package/lib/esm/features/store/objects/components/ContentDispositionButton.js.map +1 -0
  359. package/lib/esm/features/store/objects/components/ContentOverview.js +286 -0
  360. package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -0
  361. package/lib/esm/features/store/objects/components/DocumentIcon.js +31 -0
  362. package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -0
  363. package/lib/esm/features/store/objects/components/DocumentInput.js +51 -0
  364. package/lib/esm/features/store/objects/components/DocumentInput.js.map +1 -0
  365. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +171 -0
  366. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -0
  367. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +44 -0
  368. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -0
  369. package/lib/esm/features/store/objects/components/SelectDocument.js +45 -0
  370. package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -0
  371. package/lib/esm/features/store/objects/components/SelectDocumentModal.js +7 -0
  372. package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -0
  373. package/lib/esm/features/store/objects/components/VectorSearchWidget.js +90 -0
  374. package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -0
  375. package/lib/esm/features/store/objects/components/index.js +10 -0
  376. package/lib/esm/features/store/objects/components/index.js.map +1 -0
  377. package/lib/esm/features/store/objects/components/useDownloadObject.js +21 -0
  378. package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -0
  379. package/lib/esm/features/store/objects/index.js +11 -0
  380. package/lib/esm/features/store/objects/index.js.map +1 -0
  381. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +74 -0
  382. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -0
  383. package/lib/esm/features/store/objects/layout/documentLayout.js +15 -0
  384. package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -0
  385. package/lib/esm/features/store/objects/layout/index.js +3 -0
  386. package/lib/esm/features/store/objects/layout/index.js.map +1 -0
  387. package/lib/esm/features/store/objects/layout/renderers.js +128 -0
  388. package/lib/esm/features/store/objects/layout/renderers.js.map +1 -0
  389. package/lib/esm/features/store/objects/search/DocumentSearchContext.js +171 -0
  390. package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -0
  391. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +39 -0
  392. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -0
  393. package/lib/esm/features/store/objects/search/index.js +3 -0
  394. package/lib/esm/features/store/objects/search/index.js.map +1 -0
  395. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +149 -0
  396. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -0
  397. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js +2 -0
  398. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js.map +1 -0
  399. package/lib/esm/features/store/objects/selection/SelectionActions.js +75 -0
  400. package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -0
  401. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +73 -0
  402. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -0
  403. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +53 -0
  404. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -0
  405. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js +30 -0
  406. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js.map +1 -0
  407. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +66 -0
  408. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -0
  409. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +106 -0
  410. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -0
  411. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +64 -0
  412. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +1 -0
  413. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +72 -0
  414. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -0
  415. package/lib/esm/features/store/objects/selection/actions/index.js +8 -0
  416. package/lib/esm/features/store/objects/selection/actions/index.js.map +1 -0
  417. package/lib/esm/features/store/objects/selection/index.js +5 -0
  418. package/lib/esm/features/store/objects/selection/index.js.map +1 -0
  419. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +511 -0
  420. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -0
  421. package/lib/esm/features/store/objects/upload/index.js +4 -0
  422. package/lib/esm/features/store/objects/upload/index.js.map +1 -0
  423. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +194 -0
  424. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -0
  425. package/lib/esm/features/store/objects/upload/useUploadHandler.js +230 -0
  426. package/lib/esm/features/store/objects/upload/useUploadHandler.js.map +1 -0
  427. package/lib/esm/features/store/types/ContentObjectTypesSearch.js +81 -0
  428. package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -0
  429. package/lib/esm/features/store/types/ContentObjectTypesTable.js +11 -0
  430. package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +1 -0
  431. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +26 -0
  432. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -0
  433. package/lib/esm/features/store/types/ObjectSchemaEditor.js +103 -0
  434. package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -0
  435. package/lib/esm/features/store/types/SelectContentType.js +43 -0
  436. package/lib/esm/features/store/types/SelectContentType.js.map +1 -0
  437. package/lib/esm/features/store/types/SelectContentTypeModal.js +28 -0
  438. package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -0
  439. package/lib/esm/features/store/types/TableLayoutEditor.js +78 -0
  440. package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -0
  441. package/lib/esm/features/store/types/index.js +9 -0
  442. package/lib/esm/features/store/types/index.js.map +1 -0
  443. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js +98 -0
  444. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js.map +1 -0
  445. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js +15 -0
  446. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js.map +1 -0
  447. package/lib/esm/features/store/types/search/index.js +3 -0
  448. package/lib/esm/features/store/types/search/index.js.map +1 -0
  449. package/lib/esm/features/user/UserAvatar.js +18 -0
  450. package/lib/esm/features/user/UserAvatar.js.map +1 -0
  451. package/lib/esm/features/user/UserInfo.js +119 -0
  452. package/lib/esm/features/user/UserInfo.js.map +1 -0
  453. package/lib/esm/features/user/index.js +3 -0
  454. package/lib/esm/features/user/index.js.map +1 -0
  455. package/lib/esm/features/utils/index.js +4 -0
  456. package/lib/esm/features/utils/index.js.map +1 -0
  457. package/lib/esm/features/utils/mimeType.js +9 -0
  458. package/lib/esm/features/utils/mimeType.js.map +1 -0
  459. package/lib/esm/features/utils/rendition.js +67 -0
  460. package/lib/esm/features/utils/rendition.js.map +1 -0
  461. package/lib/esm/features/utils/text.js +10 -0
  462. package/lib/esm/features/utils/text.js.map +1 -0
  463. package/lib/esm/layout/AppLayout.js +46 -0
  464. package/lib/esm/layout/AppLayout.js.map +1 -0
  465. package/lib/esm/layout/FullHeightLayout.js +18 -0
  466. package/lib/esm/layout/FullHeightLayout.js.map +1 -0
  467. package/lib/esm/layout/Navbar.js +40 -0
  468. package/lib/esm/layout/Navbar.js.map +1 -0
  469. package/lib/esm/layout/Sidebar.js +45 -0
  470. package/lib/esm/layout/Sidebar.js.map +1 -0
  471. package/lib/esm/layout/SidebarContext.js +10 -0
  472. package/lib/esm/layout/SidebarContext.js.map +1 -0
  473. package/lib/esm/layout/TitleBar.js +5 -0
  474. package/lib/esm/layout/TitleBar.js.map +1 -0
  475. package/lib/esm/layout/index.js +7 -0
  476. package/lib/esm/layout/index.js.map +1 -0
  477. package/lib/esm/router/FixLinks.js +23 -0
  478. package/lib/esm/router/FixLinks.js.map +1 -0
  479. package/lib/esm/router/HistoryNavigator.js +149 -0
  480. package/lib/esm/router/HistoryNavigator.js.map +1 -0
  481. package/lib/esm/router/Nav.js +26 -0
  482. package/lib/esm/router/Nav.js.map +1 -0
  483. package/lib/esm/router/NestedNavigationContext.js +19 -0
  484. package/lib/esm/router/NestedNavigationContext.js.map +1 -0
  485. package/lib/esm/router/NestedRouterProvider.js +44 -0
  486. package/lib/esm/router/NestedRouterProvider.js.map +1 -0
  487. package/lib/esm/router/PathMatcher.js +159 -0
  488. package/lib/esm/router/PathMatcher.js.map +1 -0
  489. package/lib/esm/router/PathWithParams.js +34 -0
  490. package/lib/esm/router/PathWithParams.js.map +1 -0
  491. package/lib/esm/router/Route404.js +18 -0
  492. package/lib/esm/router/Route404.js.map +1 -0
  493. package/lib/esm/router/RouteComponent.js +32 -0
  494. package/lib/esm/router/RouteComponent.js.map +1 -0
  495. package/lib/esm/router/Router.js +161 -0
  496. package/lib/esm/router/Router.js.map +1 -0
  497. package/lib/esm/router/RouterProvider.js +41 -0
  498. package/lib/esm/router/RouterProvider.js.map +1 -0
  499. package/lib/esm/router/index.js +11 -0
  500. package/lib/esm/router/index.js.map +1 -0
  501. package/lib/esm/router/path.js +140 -0
  502. package/lib/esm/router/path.js.map +1 -0
  503. package/lib/esm/session/TypeRegistry.js +24 -0
  504. package/lib/esm/session/TypeRegistry.js.map +1 -0
  505. package/lib/esm/session/UserSession.js +191 -0
  506. package/lib/esm/session/UserSession.js.map +1 -0
  507. package/lib/esm/session/UserSessionProvider.js +164 -0
  508. package/lib/esm/session/UserSessionProvider.js.map +1 -0
  509. package/lib/esm/session/auth/composable.js +162 -0
  510. package/lib/esm/session/auth/composable.js.map +1 -0
  511. package/lib/esm/session/auth/firebase.js +158 -0
  512. package/lib/esm/session/auth/firebase.js.map +1 -0
  513. package/lib/esm/session/auth/useAuthState.js +46 -0
  514. package/lib/esm/session/auth/useAuthState.js.map +1 -0
  515. package/lib/esm/session/auth/useCurrentTenant.js +63 -0
  516. package/lib/esm/session/auth/useCurrentTenant.js.map +1 -0
  517. package/lib/esm/session/constants.js +3 -0
  518. package/lib/esm/session/constants.js.map +1 -0
  519. package/lib/esm/session/index.js +8 -0
  520. package/lib/esm/session/index.js.map +1 -0
  521. package/lib/esm/session/useUXTracking.js +29 -0
  522. package/lib/esm/session/useUXTracking.js.map +1 -0
  523. package/lib/esm/shell/SplashScreen.js +26 -0
  524. package/lib/esm/shell/SplashScreen.js.map +1 -0
  525. package/lib/esm/shell/VertesiaShell.js +10 -0
  526. package/lib/esm/shell/VertesiaShell.js.map +1 -0
  527. package/lib/esm/shell/apps/AppInstallationProvider.js +13 -0
  528. package/lib/esm/shell/apps/AppInstallationProvider.js.map +1 -0
  529. package/lib/esm/shell/apps/AppProjectSelector.js +36 -0
  530. package/lib/esm/shell/apps/AppProjectSelector.js.map +1 -0
  531. package/lib/esm/shell/apps/StandaloneApp.js +60 -0
  532. package/lib/esm/shell/apps/StandaloneApp.js.map +1 -0
  533. package/lib/esm/shell/apps/index.js +4 -0
  534. package/lib/esm/shell/apps/index.js.map +1 -0
  535. package/lib/esm/shell/index.js +8 -0
  536. package/lib/esm/shell/index.js.map +1 -0
  537. package/lib/esm/shell/login/EnterpriseSigninButton.js +84 -0
  538. package/lib/esm/shell/login/EnterpriseSigninButton.js.map +1 -0
  539. package/lib/esm/shell/login/GitHubSignInButton.js +24 -0
  540. package/lib/esm/shell/login/GitHubSignInButton.js.map +1 -0
  541. package/lib/esm/shell/login/GoogleSignInButton.js +25 -0
  542. package/lib/esm/shell/login/GoogleSignInButton.js.map +1 -0
  543. package/lib/esm/shell/login/InviteAcceptModal.js +62 -0
  544. package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -0
  545. package/lib/esm/shell/login/MicrosoftSigninButton.js +19 -0
  546. package/lib/esm/shell/login/MicrosoftSigninButton.js.map +1 -0
  547. package/lib/esm/shell/login/PreviewIcon.js +23 -0
  548. package/lib/esm/shell/login/PreviewIcon.js.map +1 -0
  549. package/lib/esm/shell/login/SignInModal.js +9 -0
  550. package/lib/esm/shell/login/SignInModal.js.map +1 -0
  551. package/lib/esm/shell/login/SigninScreen.js +64 -0
  552. package/lib/esm/shell/login/SigninScreen.js.map +1 -0
  553. package/lib/esm/shell/login/SignupForm.js +91 -0
  554. package/lib/esm/shell/login/SignupForm.js.map +1 -0
  555. package/lib/esm/shell/login/TerminalLogin.js +179 -0
  556. package/lib/esm/shell/login/TerminalLogin.js.map +1 -0
  557. package/lib/esm/shell/login/UserInfo.js +40 -0
  558. package/lib/esm/shell/login/UserInfo.js.map +1 -0
  559. package/lib/esm/shell/login/UserSessionMenu.js +31 -0
  560. package/lib/esm/shell/login/UserSessionMenu.js.map +1 -0
  561. package/lib/esm/shell/utils.js +6 -0
  562. package/lib/esm/shell/utils.js.map +1 -0
  563. package/lib/esm/widgets/Progress.js +5 -0
  564. package/lib/esm/widgets/Progress.js.map +1 -0
  565. package/lib/esm/widgets/SvgIcon.js +36 -0
  566. package/lib/esm/widgets/SvgIcon.js.map +1 -0
  567. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +103 -0
  568. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js.map +1 -0
  569. package/lib/esm/widgets/codemirror/CodemirrorStateSingleton.js +33 -0
  570. package/lib/esm/widgets/codemirror/CodemirrorStateSingleton.js.map +1 -0
  571. package/lib/esm/widgets/codemirror/index.js +2 -0
  572. package/lib/esm/widgets/codemirror/index.js.map +1 -0
  573. package/lib/esm/widgets/form/Form.js +102 -0
  574. package/lib/esm/widgets/form/Form.js.map +1 -0
  575. package/lib/esm/widgets/form/FormContext.js +29 -0
  576. package/lib/esm/widgets/form/FormContext.js.map +1 -0
  577. package/lib/esm/widgets/form/ManagedObject.js +283 -0
  578. package/lib/esm/widgets/form/ManagedObject.js.map +1 -0
  579. package/lib/esm/widgets/form/fields.js +11 -0
  580. package/lib/esm/widgets/form/fields.js.map +1 -0
  581. package/lib/esm/widgets/form/index.js +7 -0
  582. package/lib/esm/widgets/form/index.js.map +1 -0
  583. package/lib/esm/widgets/form/inputs.js +36 -0
  584. package/lib/esm/widgets/form/inputs.js.map +1 -0
  585. package/lib/esm/widgets/form/schema.js +197 -0
  586. package/lib/esm/widgets/form/schema.js.map +1 -0
  587. package/lib/esm/widgets/index.js +12 -0
  588. package/lib/esm/widgets/index.js.map +1 -0
  589. package/lib/esm/widgets/json-view/JSONCode.js +157 -0
  590. package/lib/esm/widgets/json-view/JSONCode.js.map +1 -0
  591. package/lib/esm/widgets/json-view/JSONDisplay.js +10 -0
  592. package/lib/esm/widgets/json-view/JSONDisplay.js.map +1 -0
  593. package/lib/esm/widgets/json-view/JSONView.js +106 -0
  594. package/lib/esm/widgets/json-view/JSONView.js.map +1 -0
  595. package/lib/esm/widgets/json-view/index.js +4 -0
  596. package/lib/esm/widgets/json-view/index.js.map +1 -0
  597. package/lib/esm/widgets/json-view/types.js +2 -0
  598. package/lib/esm/widgets/json-view/types.js.map +1 -0
  599. package/lib/esm/widgets/markdown/MarkdownRenderer.js +24 -0
  600. package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +1 -0
  601. package/lib/esm/widgets/markdown/index.js +2 -0
  602. package/lib/esm/widgets/markdown/index.js.map +1 -0
  603. package/lib/esm/widgets/popover/Popover.js +73 -0
  604. package/lib/esm/widgets/popover/Popover.js.map +1 -0
  605. package/lib/esm/widgets/popover/context.js +7 -0
  606. package/lib/esm/widgets/popover/context.js.map +1 -0
  607. package/lib/esm/widgets/popover/index.js +3 -0
  608. package/lib/esm/widgets/popover/index.js.map +1 -0
  609. package/lib/esm/widgets/popover/slots.js +22 -0
  610. package/lib/esm/widgets/popover/slots.js.map +1 -0
  611. package/lib/esm/widgets/properties/PropertiesView.js +8 -0
  612. package/lib/esm/widgets/properties/PropertiesView.js.map +1 -0
  613. package/lib/esm/widgets/properties/index.js +2 -0
  614. package/lib/esm/widgets/properties/index.js.map +1 -0
  615. package/lib/esm/widgets/schema-editor/ManagedSchema.js +303 -0
  616. package/lib/esm/widgets/schema-editor/ManagedSchema.js.map +1 -0
  617. package/lib/esm/widgets/schema-editor/editor/Editable.js +110 -0
  618. package/lib/esm/widgets/schema-editor/editor/Editable.js.map +1 -0
  619. package/lib/esm/widgets/schema-editor/editor/EditableSchemaProperty.js +8 -0
  620. package/lib/esm/widgets/schema-editor/editor/EditableSchemaProperty.js.map +1 -0
  621. package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js +81 -0
  622. package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js.map +1 -0
  623. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js +7 -0
  624. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js.map +1 -0
  625. package/lib/esm/widgets/schema-editor/editor/SchemaContext.js +9 -0
  626. package/lib/esm/widgets/schema-editor/editor/SchemaContext.js.map +1 -0
  627. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +84 -0
  628. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -0
  629. package/lib/esm/widgets/schema-editor/index.js +7 -0
  630. package/lib/esm/widgets/schema-editor/index.js.map +1 -0
  631. package/lib/esm/widgets/schema-editor/json-schema4-utils.js +188 -0
  632. package/lib/esm/widgets/schema-editor/json-schema4-utils.js.map +1 -0
  633. package/lib/esm/widgets/schema-editor/type-signature.js +30 -0
  634. package/lib/esm/widgets/schema-editor/type-signature.js.map +1 -0
  635. package/lib/esm/widgets/upload/DropZone.js +162 -0
  636. package/lib/esm/widgets/upload/DropZone.js.map +1 -0
  637. package/lib/esm/widgets/upload/UploadResultCategory.js +19 -0
  638. package/lib/esm/widgets/upload/UploadResultCategory.js.map +1 -0
  639. package/lib/esm/widgets/upload/UploadSummary.js +30 -0
  640. package/lib/esm/widgets/upload/UploadSummary.js.map +1 -0
  641. package/lib/esm/widgets/upload/index.js +4 -0
  642. package/lib/esm/widgets/upload/index.js.map +1 -0
  643. package/lib/esm/widgets/xml-viewer/components/Attributes/index.js +11 -0
  644. package/lib/esm/widgets/xml-viewer/components/Attributes/index.js.map +1 -0
  645. package/lib/esm/widgets/xml-viewer/components/CDataTag/index.js +8 -0
  646. package/lib/esm/widgets/xml-viewer/components/CDataTag/index.js.map +1 -0
  647. package/lib/esm/widgets/xml-viewer/components/CollapseIcon/index.js +11 -0
  648. package/lib/esm/widgets/xml-viewer/components/CollapseIcon/index.js.map +1 -0
  649. package/lib/esm/widgets/xml-viewer/components/CommentTag/index.js +11 -0
  650. package/lib/esm/widgets/xml-viewer/components/CommentTag/index.js.map +1 -0
  651. package/lib/esm/widgets/xml-viewer/components/DeclarationTag/index.js +9 -0
  652. package/lib/esm/widgets/xml-viewer/components/DeclarationTag/index.js.map +1 -0
  653. package/lib/esm/widgets/xml-viewer/components/Elements/index.js +36 -0
  654. package/lib/esm/widgets/xml-viewer/components/Elements/index.js.map +1 -0
  655. package/lib/esm/widgets/xml-viewer/components/InvalidXml/index.js +5 -0
  656. package/lib/esm/widgets/xml-viewer/components/InvalidXml/index.js.map +1 -0
  657. package/lib/esm/widgets/xml-viewer/components/Tag/index.js +13 -0
  658. package/lib/esm/widgets/xml-viewer/components/Tag/index.js.map +1 -0
  659. package/lib/esm/widgets/xml-viewer/components/TextElement/index.js +13 -0
  660. package/lib/esm/widgets/xml-viewer/components/TextElement/index.js.map +1 -0
  661. package/lib/esm/widgets/xml-viewer/components/XMLViewer.js +30 -0
  662. package/lib/esm/widgets/xml-viewer/components/XMLViewer.js.map +1 -0
  663. package/lib/esm/widgets/xml-viewer/components/types.js +2 -0
  664. package/lib/esm/widgets/xml-viewer/components/types.js.map +1 -0
  665. package/lib/esm/widgets/xml-viewer/constants/index.js +17 -0
  666. package/lib/esm/widgets/xml-viewer/constants/index.js.map +1 -0
  667. package/lib/esm/widgets/xml-viewer/context/xml-viewer-context.js +10 -0
  668. package/lib/esm/widgets/xml-viewer/context/xml-viewer-context.js.map +1 -0
  669. package/lib/esm/widgets/xml-viewer/helpers/index.js +40 -0
  670. package/lib/esm/widgets/xml-viewer/helpers/index.js.map +1 -0
  671. package/lib/esm/widgets/xml-viewer/hooks/useCollapsible.js +22 -0
  672. package/lib/esm/widgets/xml-viewer/hooks/useCollapsible.js.map +1 -0
  673. package/lib/esm/widgets/xml-viewer/hooks/useXMLViewer.js +31 -0
  674. package/lib/esm/widgets/xml-viewer/hooks/useXMLViewer.js.map +1 -0
  675. package/lib/esm/widgets/xml-viewer/index.js +3 -0
  676. package/lib/esm/widgets/xml-viewer/index.js.map +1 -0
  677. package/lib/esm/widgets/xml-viewer/types/index.js +2 -0
  678. package/lib/esm/widgets/xml-viewer/types/index.js.map +1 -0
  679. package/lib/tsconfig.tsbuildinfo +1 -0
  680. package/lib/types/core/components/Avatar.d.ts +16 -0
  681. package/lib/types/core/components/Avatar.d.ts.map +1 -0
  682. package/lib/types/core/components/Badge.d.ts +21 -0
  683. package/lib/types/core/components/Badge.d.ts.map +1 -0
  684. package/lib/types/core/components/Button.d.ts +14 -0
  685. package/lib/types/core/components/Button.d.ts.map +1 -0
  686. package/lib/types/core/components/Center.d.ts +8 -0
  687. package/lib/types/core/components/Center.d.ts.map +1 -0
  688. package/lib/types/core/components/ComboBox.d.ts +124 -0
  689. package/lib/types/core/components/ComboBox.d.ts.map +1 -0
  690. package/lib/types/core/components/ConfirmModal.d.ts +11 -0
  691. package/lib/types/core/components/ConfirmModal.d.ts.map +1 -0
  692. package/lib/types/core/components/DeleteModal.d.ts +11 -0
  693. package/lib/types/core/components/DeleteModal.d.ts.map +1 -0
  694. package/lib/types/core/components/Divider.d.ts +6 -0
  695. package/lib/types/core/components/Divider.d.ts.map +1 -0
  696. package/lib/types/core/components/Dropdown.d.ts +15 -0
  697. package/lib/types/core/components/Dropdown.d.ts.map +1 -0
  698. package/lib/types/core/components/DropdownList.d.ts +13 -0
  699. package/lib/types/core/components/DropdownList.d.ts.map +1 -0
  700. package/lib/types/core/components/EmptyCollection.d.ts +9 -0
  701. package/lib/types/core/components/EmptyCollection.d.ts.map +1 -0
  702. package/lib/types/core/components/FileUpload.d.ts +29 -0
  703. package/lib/types/core/components/FileUpload.d.ts.map +1 -0
  704. package/lib/types/core/components/FormItem.d.ts +13 -0
  705. package/lib/types/core/components/FormItem.d.ts.map +1 -0
  706. package/lib/types/core/components/InputList.d.ts +12 -0
  707. package/lib/types/core/components/InputList.d.ts.map +1 -0
  708. package/lib/types/core/components/Link.d.ts +7 -0
  709. package/lib/types/core/components/Link.d.ts.map +1 -0
  710. package/lib/types/core/components/MenuList.d.ts +14 -0
  711. package/lib/types/core/components/MenuList.d.ts.map +1 -0
  712. package/lib/types/core/components/MessageBox.d.ts +36 -0
  713. package/lib/types/core/components/MessageBox.d.ts.map +1 -0
  714. package/lib/types/core/components/Modal.d.ts +30 -0
  715. package/lib/types/core/components/Modal.d.ts.map +1 -0
  716. package/lib/types/core/components/NumberInput.d.ts +16 -0
  717. package/lib/types/core/components/NumberInput.d.ts.map +1 -0
  718. package/lib/types/core/components/Overlay.d.ts +25 -0
  719. package/lib/types/core/components/Overlay.d.ts.map +1 -0
  720. package/lib/types/core/components/Portal.d.ts +6 -0
  721. package/lib/types/core/components/Portal.d.ts.map +1 -0
  722. package/lib/types/core/components/RadioGroup.d.ts +26 -0
  723. package/lib/types/core/components/RadioGroup.d.ts.map +1 -0
  724. package/lib/types/core/components/SelectBox.d.ts +36 -0
  725. package/lib/types/core/components/SelectBox.d.ts.map +1 -0
  726. package/lib/types/core/components/SelectList.d.ts +19 -0
  727. package/lib/types/core/components/SelectList.d.ts.map +1 -0
  728. package/lib/types/core/components/SelectStack.d.ts +13 -0
  729. package/lib/types/core/components/SelectStack.d.ts.map +1 -0
  730. package/lib/types/core/components/SidePanel.d.ts +11 -0
  731. package/lib/types/core/components/SidePanel.d.ts.map +1 -0
  732. package/lib/types/core/components/Spinner.d.ts +7 -0
  733. package/lib/types/core/components/Spinner.d.ts.map +1 -0
  734. package/lib/types/core/components/Switch.d.ts +11 -0
  735. package/lib/types/core/components/Switch.d.ts.map +1 -0
  736. package/lib/types/core/components/Textarea.d.ts +8 -0
  737. package/lib/types/core/components/Textarea.d.ts.map +1 -0
  738. package/lib/types/core/components/index.d.ts +39 -0
  739. package/lib/types/core/components/index.d.ts.map +1 -0
  740. package/lib/types/core/components/libs/utils.d.ts +3 -0
  741. package/lib/types/core/components/libs/utils.d.ts.map +1 -0
  742. package/lib/types/core/components/libs/visuallyHidden.d.ts +7 -0
  743. package/lib/types/core/components/libs/visuallyHidden.d.ts.map +1 -0
  744. package/lib/types/core/components/popup/Popup.d.ts +26 -0
  745. package/lib/types/core/components/popup/Popup.d.ts.map +1 -0
  746. package/lib/types/core/components/popup/PopupController.d.ts +41 -0
  747. package/lib/types/core/components/popup/PopupController.d.ts.map +1 -0
  748. package/lib/types/core/components/popup/index.d.ts +4 -0
  749. package/lib/types/core/components/popup/index.d.ts.map +1 -0
  750. package/lib/types/core/components/popup/position.d.ts +59 -0
  751. package/lib/types/core/components/popup/position.d.ts.map +1 -0
  752. package/lib/types/core/components/popup/utils.d.ts +30 -0
  753. package/lib/types/core/components/popup/utils.d.ts.map +1 -0
  754. package/lib/types/core/components/shadcn/breadcrumb.d.ts +14 -0
  755. package/lib/types/core/components/shadcn/breadcrumb.d.ts.map +1 -0
  756. package/lib/types/core/components/shadcn/button.d.ts +27 -0
  757. package/lib/types/core/components/shadcn/button.d.ts.map +1 -0
  758. package/lib/types/core/components/shadcn/calendar.d.ts +11 -0
  759. package/lib/types/core/components/shadcn/calendar.d.ts.map +1 -0
  760. package/lib/types/core/components/shadcn/card.d.ts +9 -0
  761. package/lib/types/core/components/shadcn/card.d.ts.map +1 -0
  762. package/lib/types/core/components/shadcn/checkbox.d.ts +5 -0
  763. package/lib/types/core/components/shadcn/checkbox.d.ts.map +1 -0
  764. package/lib/types/core/components/shadcn/command.d.ts +17 -0
  765. package/lib/types/core/components/shadcn/command.d.ts.map +1 -0
  766. package/lib/types/core/components/shadcn/dialog.d.ts +36 -0
  767. package/lib/types/core/components/shadcn/dialog.d.ts.map +1 -0
  768. package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts +9 -0
  769. package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts.map +1 -0
  770. package/lib/types/core/components/shadcn/filters/animateChangeInHeight.d.ts +7 -0
  771. package/lib/types/core/components/shadcn/filters/animateChangeInHeight.d.ts.map +1 -0
  772. package/lib/types/core/components/shadcn/filters/comboBox/DateCombobox.d.ts +6 -0
  773. package/lib/types/core/components/shadcn/filters/comboBox/DateCombobox.d.ts.map +1 -0
  774. package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts +9 -0
  775. package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts.map +1 -0
  776. package/lib/types/core/components/shadcn/filters/comboBox/StringListCombobox.d.ts +6 -0
  777. package/lib/types/core/components/shadcn/filters/comboBox/StringListCombobox.d.ts.map +1 -0
  778. package/lib/types/core/components/shadcn/filters/comboBox/TextCombobox.d.ts +6 -0
  779. package/lib/types/core/components/shadcn/filters/comboBox/TextCombobox.d.ts.map +1 -0
  780. package/lib/types/core/components/shadcn/filters/comboBox/comboBox.d.ts +5 -0
  781. package/lib/types/core/components/shadcn/filters/comboBox/comboBox.d.ts.map +1 -0
  782. package/lib/types/core/components/shadcn/filters/filter/SelectFilter.d.ts +12 -0
  783. package/lib/types/core/components/shadcn/filters/filter/SelectFilter.d.ts.map +1 -0
  784. package/lib/types/core/components/shadcn/filters/filter/StringListFilter.d.ts +11 -0
  785. package/lib/types/core/components/shadcn/filters/filter/StringListFilter.d.ts.map +1 -0
  786. package/lib/types/core/components/shadcn/filters/filter/TextFilter.d.ts +13 -0
  787. package/lib/types/core/components/shadcn/filters/filter/TextFilter.d.ts.map +1 -0
  788. package/lib/types/core/components/shadcn/filters/filter/dateFilter.d.ts +14 -0
  789. package/lib/types/core/components/shadcn/filters/filter/dateFilter.d.ts.map +1 -0
  790. package/lib/types/core/components/shadcn/filters/filter-styles.d.ts +2 -0
  791. package/lib/types/core/components/shadcn/filters/filter-styles.d.ts.map +1 -0
  792. package/lib/types/core/components/shadcn/filters/filterBar.d.ts +20 -0
  793. package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -0
  794. package/lib/types/core/components/shadcn/filters/filters.d.ts +10 -0
  795. package/lib/types/core/components/shadcn/filters/filters.d.ts.map +1 -0
  796. package/lib/types/core/components/shadcn/filters/index.d.ts +6 -0
  797. package/lib/types/core/components/shadcn/filters/index.d.ts.map +1 -0
  798. package/lib/types/core/components/shadcn/filters/types.d.ts +35 -0
  799. package/lib/types/core/components/shadcn/filters/types.d.ts.map +1 -0
  800. package/lib/types/core/components/shadcn/heading.d.ts +6 -0
  801. package/lib/types/core/components/shadcn/heading.d.ts.map +1 -0
  802. package/lib/types/core/components/shadcn/index.d.ts +23 -0
  803. package/lib/types/core/components/shadcn/index.d.ts.map +1 -0
  804. package/lib/types/core/components/shadcn/input.d.ts +17 -0
  805. package/lib/types/core/components/shadcn/input.d.ts.map +1 -0
  806. package/lib/types/core/components/shadcn/label.d.ts +8 -0
  807. package/lib/types/core/components/shadcn/label.d.ts.map +1 -0
  808. package/lib/types/core/components/shadcn/popover.d.ts +17 -0
  809. package/lib/types/core/components/shadcn/popover.d.ts.map +1 -0
  810. package/lib/types/core/components/shadcn/resizeable.d.ts +9 -0
  811. package/lib/types/core/components/shadcn/resizeable.d.ts.map +1 -0
  812. package/lib/types/core/components/shadcn/selectBox.d.ts +31 -0
  813. package/lib/types/core/components/shadcn/selectBox.d.ts.map +1 -0
  814. package/lib/types/core/components/shadcn/separator.d.ts +5 -0
  815. package/lib/types/core/components/shadcn/separator.d.ts.map +1 -0
  816. package/lib/types/core/components/shadcn/tabs.d.ts +31 -0
  817. package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -0
  818. package/lib/types/core/components/shadcn/text.d.ts +11 -0
  819. package/lib/types/core/components/shadcn/text.d.ts.map +1 -0
  820. package/lib/types/core/components/shadcn/theme/ThemeProvider.d.ts +15 -0
  821. package/lib/types/core/components/shadcn/theme/ThemeProvider.d.ts.map +1 -0
  822. package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts +10 -0
  823. package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts.map +1 -0
  824. package/lib/types/core/components/shadcn/tooltip.d.ts +20 -0
  825. package/lib/types/core/components/shadcn/tooltip.d.ts.map +1 -0
  826. package/lib/types/core/components/styles.d.ts +7 -0
  827. package/lib/types/core/components/styles.d.ts.map +1 -0
  828. package/lib/types/core/components/table/index.d.ts +15 -0
  829. package/lib/types/core/components/table/index.d.ts.map +1 -0
  830. package/lib/types/core/components/tabs/Tabs.d.ts +25 -0
  831. package/lib/types/core/components/tabs/Tabs.d.ts.map +1 -0
  832. package/lib/types/core/components/tabs/TabsContext.d.ts +17 -0
  833. package/lib/types/core/components/tabs/TabsContext.d.ts.map +1 -0
  834. package/lib/types/core/components/tabs/index.d.ts +3 -0
  835. package/lib/types/core/components/tabs/index.d.ts.map +1 -0
  836. package/lib/types/core/components/toast/NotificationPanel.d.ts +8 -0
  837. package/lib/types/core/components/toast/NotificationPanel.d.ts.map +1 -0
  838. package/lib/types/core/components/toast/ToastContext.d.ts +6 -0
  839. package/lib/types/core/components/toast/ToastContext.d.ts.map +1 -0
  840. package/lib/types/core/components/toast/ToastProps.d.ts +7 -0
  841. package/lib/types/core/components/toast/ToastProps.d.ts.map +1 -0
  842. package/lib/types/core/components/toast/ToastProvider.d.ts +6 -0
  843. package/lib/types/core/components/toast/ToastProvider.d.ts.map +1 -0
  844. package/lib/types/core/components/toast/index.d.ts +3 -0
  845. package/lib/types/core/components/toast/index.d.ts.map +1 -0
  846. package/lib/types/core/hooks/CompositeState.d.ts +28 -0
  847. package/lib/types/core/hooks/CompositeState.d.ts.map +1 -0
  848. package/lib/types/core/hooks/PortalContainerProvider.d.ts +7 -0
  849. package/lib/types/core/hooks/PortalContainerProvider.d.ts.map +1 -0
  850. package/lib/types/core/hooks/SharedState.d.ts +10 -0
  851. package/lib/types/core/hooks/SharedState.d.ts.map +1 -0
  852. package/lib/types/core/hooks/index.d.ts +15 -0
  853. package/lib/types/core/hooks/index.d.ts.map +1 -0
  854. package/lib/types/core/hooks/useClickOutside.d.ts +8 -0
  855. package/lib/types/core/hooks/useClickOutside.d.ts.map +1 -0
  856. package/lib/types/core/hooks/useCopyToClipboard.d.ts +5 -0
  857. package/lib/types/core/hooks/useCopyToClipboard.d.ts.map +1 -0
  858. package/lib/types/core/hooks/useDarkMode.d.ts +2 -0
  859. package/lib/types/core/hooks/useDarkMode.d.ts.map +1 -0
  860. package/lib/types/core/hooks/useDebounce.d.ts +2 -0
  861. package/lib/types/core/hooks/useDebounce.d.ts.map +1 -0
  862. package/lib/types/core/hooks/useEventSource.d.ts +2 -0
  863. package/lib/types/core/hooks/useEventSource.d.ts.map +1 -0
  864. package/lib/types/core/hooks/useFetch.d.ts +24 -0
  865. package/lib/types/core/hooks/useFetch.d.ts.map +1 -0
  866. package/lib/types/core/hooks/useFlag.d.ts +9 -0
  867. package/lib/types/core/hooks/useFlag.d.ts.map +1 -0
  868. package/lib/types/core/hooks/useIntersectionObserver.d.ts +14 -0
  869. package/lib/types/core/hooks/useIntersectionObserver.d.ts.map +1 -0
  870. package/lib/types/core/hooks/useIsFistRendering.d.ts +2 -0
  871. package/lib/types/core/hooks/useIsFistRendering.d.ts.map +1 -0
  872. package/lib/types/core/hooks/useSafeLayoutEffect.d.ts +4 -0
  873. package/lib/types/core/hooks/useSafeLayoutEffect.d.ts.map +1 -0
  874. package/lib/types/core/hooks/useSharedValue.d.ts +12 -0
  875. package/lib/types/core/hooks/useSharedValue.d.ts.map +1 -0
  876. package/lib/types/core/index.d.ts +4 -0
  877. package/lib/types/core/index.d.ts.map +1 -0
  878. package/lib/types/core/utils/cn.d.ts +3 -0
  879. package/lib/types/core/utils/cn.d.ts.map +1 -0
  880. package/lib/types/core/utils/index.d.ts +2 -0
  881. package/lib/types/core/utils/index.d.ts.map +1 -0
  882. package/lib/types/env/index.d.ts +72 -0
  883. package/lib/types/env/index.d.ts.map +1 -0
  884. package/lib/types/features/activity-doc/ActivityDoc.d.ts +14 -0
  885. package/lib/types/features/activity-doc/ActivityDoc.d.ts.map +1 -0
  886. package/lib/types/features/activity-doc/index.d.ts +2 -0
  887. package/lib/types/features/activity-doc/index.d.ts.map +1 -0
  888. package/lib/types/features/agent/PayloadBuilder.d.ts +73 -0
  889. package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -0
  890. package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts +38 -0
  891. package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts.map +1 -0
  892. package/lib/types/features/agent/chat/JumpingDots.d.ts +7 -0
  893. package/lib/types/features/agent/chat/JumpingDots.d.ts.map +1 -0
  894. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +25 -0
  895. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -0
  896. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +22 -0
  897. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -0
  898. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +19 -0
  899. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -0
  900. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts +11 -0
  901. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts.map +1 -0
  902. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts +16 -0
  903. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts.map +1 -0
  904. package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +13 -0
  905. package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -0
  906. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +8 -0
  907. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -0
  908. package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts +10 -0
  909. package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts.map +1 -0
  910. package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts +9 -0
  911. package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -0
  912. package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts +11 -0
  913. package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts.map +1 -0
  914. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts +8 -0
  915. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts.map +1 -0
  916. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts +10 -0
  917. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts.map +1 -0
  918. package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts +8 -0
  919. package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts.map +1 -0
  920. package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts +22 -0
  921. package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -0
  922. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +25 -0
  923. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -0
  924. package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts +18 -0
  925. package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts.map +1 -0
  926. package/lib/types/features/agent/chat/WaitingMessages.d.ts +2 -0
  927. package/lib/types/features/agent/chat/WaitingMessages.d.ts.map +1 -0
  928. package/lib/types/features/agent/chat/index.d.ts +5 -0
  929. package/lib/types/features/agent/chat/index.d.ts.map +1 -0
  930. package/lib/types/features/agent/index.d.ts +3 -0
  931. package/lib/types/features/agent/index.d.ts.map +1 -0
  932. package/lib/types/features/errors/PanelErrorBoundary.d.ts +5 -0
  933. package/lib/types/features/errors/PanelErrorBoundary.d.ts.map +1 -0
  934. package/lib/types/features/errors/RowErrorBoundary.d.ts +8 -0
  935. package/lib/types/features/errors/RowErrorBoundary.d.ts.map +1 -0
  936. package/lib/types/features/errors/VertesiaErrorBoundary.d.ts +12 -0
  937. package/lib/types/features/errors/VertesiaErrorBoundary.d.ts.map +1 -0
  938. package/lib/types/features/errors/WidgetErrorBoundary.d.ts +5 -0
  939. package/lib/types/features/errors/WidgetErrorBoundary.d.ts.map +1 -0
  940. package/lib/types/features/errors/index.d.ts +5 -0
  941. package/lib/types/features/errors/index.d.ts.map +1 -0
  942. package/lib/types/features/facets/CollectionsFacetsNav.d.ts +14 -0
  943. package/lib/types/features/facets/CollectionsFacetsNav.d.ts.map +1 -0
  944. package/lib/types/features/facets/DocumentsFacetsNav.d.ts +17 -0
  945. package/lib/types/features/facets/DocumentsFacetsNav.d.ts.map +1 -0
  946. package/lib/types/features/facets/EnvironmentFacet.d.ts +10 -0
  947. package/lib/types/features/facets/EnvironmentFacet.d.ts.map +1 -0
  948. package/lib/types/features/facets/InteractionsFacetsNav.d.ts +13 -0
  949. package/lib/types/features/facets/InteractionsFacetsNav.d.ts.map +1 -0
  950. package/lib/types/features/facets/PromptsFacetsNav.d.ts +15 -0
  951. package/lib/types/features/facets/PromptsFacetsNav.d.ts.map +1 -0
  952. package/lib/types/features/facets/RunsFacetsNav.d.ts +20 -0
  953. package/lib/types/features/facets/RunsFacetsNav.d.ts.map +1 -0
  954. package/lib/types/features/facets/WorkflowExecutionsFacetsNav.d.ts +14 -0
  955. package/lib/types/features/facets/WorkflowExecutionsFacetsNav.d.ts.map +1 -0
  956. package/lib/types/features/facets/index.d.ts +15 -0
  957. package/lib/types/features/facets/index.d.ts.map +1 -0
  958. package/lib/types/features/facets/utils/SearchInterface.d.ts +9 -0
  959. package/lib/types/features/facets/utils/SearchInterface.d.ts.map +1 -0
  960. package/lib/types/features/facets/utils/StringFacet.d.ts +11 -0
  961. package/lib/types/features/facets/utils/StringFacet.d.ts.map +1 -0
  962. package/lib/types/features/facets/utils/StringListFacet.d.ts +11 -0
  963. package/lib/types/features/facets/utils/StringListFacet.d.ts.map +1 -0
  964. package/lib/types/features/facets/utils/TypeFacet.d.ts +16 -0
  965. package/lib/types/features/facets/utils/TypeFacet.d.ts.map +1 -0
  966. package/lib/types/features/facets/utils/VEnvironmentFacet.d.ts +12 -0
  967. package/lib/types/features/facets/utils/VEnvironmentFacet.d.ts.map +1 -0
  968. package/lib/types/features/facets/utils/VInteractionFacet.d.ts +15 -0
  969. package/lib/types/features/facets/utils/VInteractionFacet.d.ts.map +1 -0
  970. package/lib/types/features/facets/utils/VStringFacet.d.ts +21 -0
  971. package/lib/types/features/facets/utils/VStringFacet.d.ts.map +1 -0
  972. package/lib/types/features/facets/utils/VTypeFacet.d.ts +11 -0
  973. package/lib/types/features/facets/utils/VTypeFacet.d.ts.map +1 -0
  974. package/lib/types/features/facets/utils/VUserFacet.d.ts +11 -0
  975. package/lib/types/features/facets/utils/VUserFacet.d.ts.map +1 -0
  976. package/lib/types/features/facets/utils/utils.d.ts +4 -0
  977. package/lib/types/features/facets/utils/utils.d.ts.map +1 -0
  978. package/lib/types/features/index.d.ts +11 -0
  979. package/lib/types/features/index.d.ts.map +1 -0
  980. package/lib/types/features/layout/GenericPageNavHeader.d.ts +13 -0
  981. package/lib/types/features/layout/GenericPageNavHeader.d.ts.map +1 -0
  982. package/lib/types/features/layout/NotFoundView.d.ts +5 -0
  983. package/lib/types/features/layout/NotFoundView.d.ts.map +1 -0
  984. package/lib/types/features/layout/index.d.ts +3 -0
  985. package/lib/types/features/layout/index.d.ts.map +1 -0
  986. package/lib/types/features/magic-pdf/DownloadPopover.d.ts +7 -0
  987. package/lib/types/features/magic-pdf/DownloadPopover.d.ts.map +1 -0
  988. package/lib/types/features/magic-pdf/MagicPdfView.d.ts +7 -0
  989. package/lib/types/features/magic-pdf/MagicPdfView.d.ts.map +1 -0
  990. package/lib/types/features/magic-pdf/PageSlider.d.ts +9 -0
  991. package/lib/types/features/magic-pdf/PageSlider.d.ts.map +1 -0
  992. package/lib/types/features/magic-pdf/PdfPageProvider.d.ts +39 -0
  993. package/lib/types/features/magic-pdf/PdfPageProvider.d.ts.map +1 -0
  994. package/lib/types/features/magic-pdf/TextPageView.d.ts +8 -0
  995. package/lib/types/features/magic-pdf/TextPageView.d.ts.map +1 -0
  996. package/lib/types/features/magic-pdf/index.d.ts +2 -0
  997. package/lib/types/features/magic-pdf/index.d.ts.map +1 -0
  998. package/lib/types/features/magic-pdf/types.d.ts +2 -0
  999. package/lib/types/features/magic-pdf/types.d.ts.map +1 -0
  1000. package/lib/types/features/magic-pdf/useResizeOnDrag.d.ts +9 -0
  1001. package/lib/types/features/magic-pdf/useResizeOnDrag.d.ts.map +1 -0
  1002. package/lib/types/features/permissions/SecureButton.d.ts +8 -0
  1003. package/lib/types/features/permissions/SecureButton.d.ts.map +1 -0
  1004. package/lib/types/features/permissions/SecureSidebarItem.d.ts +8 -0
  1005. package/lib/types/features/permissions/SecureSidebarItem.d.ts.map +1 -0
  1006. package/lib/types/features/permissions/UserPermissionsProvider.d.ts +21 -0
  1007. package/lib/types/features/permissions/UserPermissionsProvider.d.ts.map +1 -0
  1008. package/lib/types/features/permissions/helpers.d.ts +5 -0
  1009. package/lib/types/features/permissions/helpers.d.ts.map +1 -0
  1010. package/lib/types/features/permissions/index.d.ts +5 -0
  1011. package/lib/types/features/permissions/index.d.ts.map +1 -0
  1012. package/lib/types/features/store/collections/BrowseCollectionView.d.ts +7 -0
  1013. package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -0
  1014. package/lib/types/features/store/collections/CollectionsTable.d.ts +6 -0
  1015. package/lib/types/features/store/collections/CollectionsTable.d.ts.map +1 -0
  1016. package/lib/types/features/store/collections/CreateCollection.d.ts +13 -0
  1017. package/lib/types/features/store/collections/CreateCollection.d.ts.map +1 -0
  1018. package/lib/types/features/store/collections/EditCollectionView.d.ts +8 -0
  1019. package/lib/types/features/store/collections/EditCollectionView.d.ts.map +1 -0
  1020. package/lib/types/features/store/collections/SelectCollection.d.ts +17 -0
  1021. package/lib/types/features/store/collections/SelectCollection.d.ts.map +1 -0
  1022. package/lib/types/features/store/collections/index.d.ts +6 -0
  1023. package/lib/types/features/store/collections/index.d.ts.map +1 -0
  1024. package/lib/types/features/store/index.d.ts +4 -0
  1025. package/lib/types/features/store/index.d.ts.map +1 -0
  1026. package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts +8 -0
  1027. package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts.map +1 -0
  1028. package/lib/types/features/store/objects/DocumentSearchResults.d.ts +20 -0
  1029. package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -0
  1030. package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts +33 -0
  1031. package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts.map +1 -0
  1032. package/lib/types/features/store/objects/DocumentTable.d.ts +21 -0
  1033. package/lib/types/features/store/objects/DocumentTable.d.ts.map +1 -0
  1034. package/lib/types/features/store/objects/ExportPropertiesModal.d.ts +12 -0
  1035. package/lib/types/features/store/objects/ExportPropertiesModal.d.ts.map +1 -0
  1036. package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts +9 -0
  1037. package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts.map +1 -0
  1038. package/lib/types/features/store/objects/components/ContentOverview.d.ts +9 -0
  1039. package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +1 -0
  1040. package/lib/types/features/store/objects/components/DocumentIcon.d.ts +16 -0
  1041. package/lib/types/features/store/objects/components/DocumentIcon.d.ts.map +1 -0
  1042. package/lib/types/features/store/objects/components/DocumentInput.d.ts +8 -0
  1043. package/lib/types/features/store/objects/components/DocumentInput.d.ts.map +1 -0
  1044. package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts +9 -0
  1045. package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts.map +1 -0
  1046. package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts +9 -0
  1047. package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts.map +1 -0
  1048. package/lib/types/features/store/objects/components/SelectDocument.d.ts +9 -0
  1049. package/lib/types/features/store/objects/components/SelectDocument.d.ts.map +1 -0
  1050. package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts +9 -0
  1051. package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts.map +1 -0
  1052. package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts +12 -0
  1053. package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts.map +1 -0
  1054. package/lib/types/features/store/objects/components/index.d.ts +10 -0
  1055. package/lib/types/features/store/objects/components/index.d.ts.map +1 -0
  1056. package/lib/types/features/store/objects/components/useDownloadObject.d.ts +4 -0
  1057. package/lib/types/features/store/objects/components/useDownloadObject.d.ts.map +1 -0
  1058. package/lib/types/features/store/objects/index.d.ts +11 -0
  1059. package/lib/types/features/store/objects/index.d.ts.map +1 -0
  1060. package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +17 -0
  1061. package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts.map +1 -0
  1062. package/lib/types/features/store/objects/layout/documentLayout.d.ts +18 -0
  1063. package/lib/types/features/store/objects/layout/documentLayout.d.ts.map +1 -0
  1064. package/lib/types/features/store/objects/layout/index.d.ts +3 -0
  1065. package/lib/types/features/store/objects/layout/index.d.ts.map +1 -0
  1066. package/lib/types/features/store/objects/layout/renderers.d.ts +3 -0
  1067. package/lib/types/features/store/objects/layout/renderers.d.ts.map +1 -0
  1068. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +51 -0
  1069. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -0
  1070. package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts +14 -0
  1071. package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts.map +1 -0
  1072. package/lib/types/features/store/objects/search/index.d.ts +3 -0
  1073. package/lib/types/features/store/objects/search/index.d.ts.map +1 -0
  1074. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +26 -0
  1075. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -0
  1076. package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +28 -0
  1077. package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts.map +1 -0
  1078. package/lib/types/features/store/objects/selection/SelectionActions.d.ts +5 -0
  1079. package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -0
  1080. package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts +4 -0
  1081. package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts.map +1 -0
  1082. package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts +4 -0
  1083. package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts.map +1 -0
  1084. package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts +16 -0
  1085. package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts.map +1 -0
  1086. package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +4 -0
  1087. package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +1 -0
  1088. package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts +4 -0
  1089. package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts.map +1 -0
  1090. package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts +4 -0
  1091. package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts.map +1 -0
  1092. package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts +4 -0
  1093. package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts.map +1 -0
  1094. package/lib/types/features/store/objects/selection/actions/index.d.ts +8 -0
  1095. package/lib/types/features/store/objects/selection/actions/index.d.ts.map +1 -0
  1096. package/lib/types/features/store/objects/selection/index.d.ts +5 -0
  1097. package/lib/types/features/store/objects/selection/index.d.ts.map +1 -0
  1098. package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts +38 -0
  1099. package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -0
  1100. package/lib/types/features/store/objects/upload/index.d.ts +4 -0
  1101. package/lib/types/features/store/objects/upload/index.d.ts.map +1 -0
  1102. package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts +30 -0
  1103. package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -0
  1104. package/lib/types/features/store/objects/upload/useUploadHandler.d.ts +50 -0
  1105. package/lib/types/features/store/objects/upload/useUploadHandler.d.ts.map +1 -0
  1106. package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts +6 -0
  1107. package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -0
  1108. package/lib/types/features/store/types/ContentObjectTypesTable.d.ts +8 -0
  1109. package/lib/types/features/store/types/ContentObjectTypesTable.d.ts.map +1 -0
  1110. package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts +15 -0
  1111. package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts.map +1 -0
  1112. package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +8 -0
  1113. package/lib/types/features/store/types/ObjectSchemaEditor.d.ts.map +1 -0
  1114. package/lib/types/features/store/types/SelectContentType.d.ts +11 -0
  1115. package/lib/types/features/store/types/SelectContentType.d.ts.map +1 -0
  1116. package/lib/types/features/store/types/SelectContentTypeModal.d.ts +33 -0
  1117. package/lib/types/features/store/types/SelectContentTypeModal.d.ts.map +1 -0
  1118. package/lib/types/features/store/types/TableLayoutEditor.d.ts +9 -0
  1119. package/lib/types/features/store/types/TableLayoutEditor.d.ts.map +1 -0
  1120. package/lib/types/features/store/types/index.d.ts +9 -0
  1121. package/lib/types/features/store/types/index.d.ts.map +1 -0
  1122. package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts +36 -0
  1123. package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -0
  1124. package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts +11 -0
  1125. package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts.map +1 -0
  1126. package/lib/types/features/store/types/search/index.d.ts +3 -0
  1127. package/lib/types/features/store/types/search/index.d.ts.map +1 -0
  1128. package/lib/types/features/user/UserAvatar.d.ts +9 -0
  1129. package/lib/types/features/user/UserAvatar.d.ts.map +1 -0
  1130. package/lib/types/features/user/UserInfo.d.ts +48 -0
  1131. package/lib/types/features/user/UserInfo.d.ts.map +1 -0
  1132. package/lib/types/features/user/index.d.ts +3 -0
  1133. package/lib/types/features/user/index.d.ts.map +1 -0
  1134. package/lib/types/features/utils/index.d.ts +4 -0
  1135. package/lib/types/features/utils/index.d.ts.map +1 -0
  1136. package/lib/types/features/utils/mimeType.d.ts +5 -0
  1137. package/lib/types/features/utils/mimeType.d.ts.map +1 -0
  1138. package/lib/types/features/utils/rendition.d.ts +4 -0
  1139. package/lib/types/features/utils/rendition.d.ts.map +1 -0
  1140. package/lib/types/features/utils/text.d.ts +3 -0
  1141. package/lib/types/features/utils/text.d.ts.map +1 -0
  1142. package/lib/types/layout/AppLayout.d.ts +13 -0
  1143. package/lib/types/layout/AppLayout.d.ts.map +1 -0
  1144. package/lib/types/layout/FullHeightLayout.d.ts +27 -0
  1145. package/lib/types/layout/FullHeightLayout.d.ts.map +1 -0
  1146. package/lib/types/layout/Navbar.d.ts +33 -0
  1147. package/lib/types/layout/Navbar.d.ts.map +1 -0
  1148. package/lib/types/layout/Sidebar.d.ts +31 -0
  1149. package/lib/types/layout/Sidebar.d.ts.map +1 -0
  1150. package/lib/types/layout/SidebarContext.d.ts +9 -0
  1151. package/lib/types/layout/SidebarContext.d.ts.map +1 -0
  1152. package/lib/types/layout/TitleBar.d.ts +6 -0
  1153. package/lib/types/layout/TitleBar.d.ts.map +1 -0
  1154. package/lib/types/layout/index.d.ts +7 -0
  1155. package/lib/types/layout/index.d.ts.map +1 -0
  1156. package/lib/types/router/FixLinks.d.ts +7 -0
  1157. package/lib/types/router/FixLinks.d.ts.map +1 -0
  1158. package/lib/types/router/HistoryNavigator.d.ts +56 -0
  1159. package/lib/types/router/HistoryNavigator.d.ts.map +1 -0
  1160. package/lib/types/router/Nav.d.ts +29 -0
  1161. package/lib/types/router/Nav.d.ts.map +1 -0
  1162. package/lib/types/router/NestedNavigationContext.d.ts +9 -0
  1163. package/lib/types/router/NestedNavigationContext.d.ts.map +1 -0
  1164. package/lib/types/router/NestedRouterProvider.d.ts +14 -0
  1165. package/lib/types/router/NestedRouterProvider.d.ts.map +1 -0
  1166. package/lib/types/router/PathMatcher.d.ts +36 -0
  1167. package/lib/types/router/PathMatcher.d.ts.map +1 -0
  1168. package/lib/types/router/PathWithParams.d.ts +9 -0
  1169. package/lib/types/router/PathWithParams.d.ts.map +1 -0
  1170. package/lib/types/router/Route404.d.ts +4 -0
  1171. package/lib/types/router/Route404.d.ts.map +1 -0
  1172. package/lib/types/router/RouteComponent.d.ts +6 -0
  1173. package/lib/types/router/RouteComponent.d.ts.map +1 -0
  1174. package/lib/types/router/Router.d.ts +74 -0
  1175. package/lib/types/router/Router.d.ts.map +1 -0
  1176. package/lib/types/router/RouterProvider.d.ts +15 -0
  1177. package/lib/types/router/RouterProvider.d.ts.map +1 -0
  1178. package/lib/types/router/index.d.ts +11 -0
  1179. package/lib/types/router/index.d.ts.map +1 -0
  1180. package/lib/types/router/path.d.ts +8 -0
  1181. package/lib/types/router/path.d.ts.map +1 -0
  1182. package/lib/types/session/TypeRegistry.d.ts +10 -0
  1183. package/lib/types/session/TypeRegistry.d.ts.map +1 -0
  1184. package/lib/types/session/UserSession.d.ts +40 -0
  1185. package/lib/types/session/UserSession.d.ts.map +1 -0
  1186. package/lib/types/session/UserSessionProvider.d.ts +7 -0
  1187. package/lib/types/session/UserSessionProvider.d.ts.map +1 -0
  1188. package/lib/types/session/auth/composable.d.ts +26 -0
  1189. package/lib/types/session/auth/composable.d.ts.map +1 -0
  1190. package/lib/types/session/auth/firebase.d.ts +10 -0
  1191. package/lib/types/session/auth/firebase.d.ts.map +1 -0
  1192. package/lib/types/session/auth/useAuthState.d.ts +10 -0
  1193. package/lib/types/session/auth/useAuthState.d.ts.map +1 -0
  1194. package/lib/types/session/auth/useCurrentTenant.d.ts +15 -0
  1195. package/lib/types/session/auth/useCurrentTenant.d.ts.map +1 -0
  1196. package/lib/types/session/constants.d.ts +3 -0
  1197. package/lib/types/session/constants.d.ts.map +1 -0
  1198. package/lib/types/session/index.d.ts +8 -0
  1199. package/lib/types/session/index.d.ts.map +1 -0
  1200. package/lib/types/session/useUXTracking.d.ts +6 -0
  1201. package/lib/types/session/useUXTracking.d.ts.map +1 -0
  1202. package/lib/types/shell/SplashScreen.d.ts +7 -0
  1203. package/lib/types/shell/SplashScreen.d.ts.map +1 -0
  1204. package/lib/types/shell/VertesiaShell.d.ts +10 -0
  1205. package/lib/types/shell/VertesiaShell.d.ts.map +1 -0
  1206. package/lib/types/shell/apps/AppInstallationProvider.d.ts +12 -0
  1207. package/lib/types/shell/apps/AppInstallationProvider.d.ts.map +1 -0
  1208. package/lib/types/shell/apps/AppProjectSelector.d.ts +12 -0
  1209. package/lib/types/shell/apps/AppProjectSelector.d.ts.map +1 -0
  1210. package/lib/types/shell/apps/StandaloneApp.d.ts +23 -0
  1211. package/lib/types/shell/apps/StandaloneApp.d.ts.map +1 -0
  1212. package/lib/types/shell/apps/index.d.ts +4 -0
  1213. package/lib/types/shell/apps/index.d.ts.map +1 -0
  1214. package/lib/types/shell/index.d.ts +8 -0
  1215. package/lib/types/shell/index.d.ts.map +1 -0
  1216. package/lib/types/shell/login/EnterpriseSigninButton.d.ts +6 -0
  1217. package/lib/types/shell/login/EnterpriseSigninButton.d.ts.map +1 -0
  1218. package/lib/types/shell/login/GitHubSignInButton.d.ts +6 -0
  1219. package/lib/types/shell/login/GitHubSignInButton.d.ts.map +1 -0
  1220. package/lib/types/shell/login/GoogleSignInButton.d.ts +6 -0
  1221. package/lib/types/shell/login/GoogleSignInButton.d.ts.map +1 -0
  1222. package/lib/types/shell/login/InviteAcceptModal.d.ts +2 -0
  1223. package/lib/types/shell/login/InviteAcceptModal.d.ts.map +1 -0
  1224. package/lib/types/shell/login/MicrosoftSigninButton.d.ts +6 -0
  1225. package/lib/types/shell/login/MicrosoftSigninButton.d.ts.map +1 -0
  1226. package/lib/types/shell/login/PreviewIcon.d.ts +6 -0
  1227. package/lib/types/shell/login/PreviewIcon.d.ts.map +1 -0
  1228. package/lib/types/shell/login/SignInModal.d.ts +7 -0
  1229. package/lib/types/shell/login/SignInModal.d.ts.map +1 -0
  1230. package/lib/types/shell/login/SigninScreen.d.ts +9 -0
  1231. package/lib/types/shell/login/SigninScreen.d.ts.map +1 -0
  1232. package/lib/types/shell/login/SignupForm.d.ts +8 -0
  1233. package/lib/types/shell/login/SignupForm.d.ts.map +1 -0
  1234. package/lib/types/shell/login/TerminalLogin.d.ts +2 -0
  1235. package/lib/types/shell/login/TerminalLogin.d.ts.map +1 -0
  1236. package/lib/types/shell/login/UserInfo.d.ts +6 -0
  1237. package/lib/types/shell/login/UserInfo.d.ts.map +1 -0
  1238. package/lib/types/shell/login/UserSessionMenu.d.ts +9 -0
  1239. package/lib/types/shell/login/UserSessionMenu.d.ts.map +1 -0
  1240. package/lib/types/shell/utils.d.ts +2 -0
  1241. package/lib/types/shell/utils.d.ts.map +1 -0
  1242. package/lib/types/widgets/Progress.d.ts +6 -0
  1243. package/lib/types/widgets/Progress.d.ts.map +1 -0
  1244. package/lib/types/widgets/SvgIcon.d.ts +7 -0
  1245. package/lib/types/widgets/SvgIcon.d.ts.map +1 -0
  1246. package/lib/types/widgets/codemirror/CodeMirrorEditor.d.ts +23 -0
  1247. package/lib/types/widgets/codemirror/CodeMirrorEditor.d.ts.map +1 -0
  1248. package/lib/types/widgets/codemirror/CodemirrorStateSingleton.d.ts +15 -0
  1249. package/lib/types/widgets/codemirror/CodemirrorStateSingleton.d.ts.map +1 -0
  1250. package/lib/types/widgets/codemirror/index.d.ts +2 -0
  1251. package/lib/types/widgets/codemirror/index.d.ts.map +1 -0
  1252. package/lib/types/widgets/form/Form.d.ts +21 -0
  1253. package/lib/types/widgets/form/Form.d.ts.map +1 -0
  1254. package/lib/types/widgets/form/FormContext.d.ts +17 -0
  1255. package/lib/types/widgets/form/FormContext.d.ts.map +1 -0
  1256. package/lib/types/widgets/form/ManagedObject.d.ts +82 -0
  1257. package/lib/types/widgets/form/ManagedObject.d.ts.map +1 -0
  1258. package/lib/types/widgets/form/fields.d.ts +16 -0
  1259. package/lib/types/widgets/form/fields.d.ts.map +1 -0
  1260. package/lib/types/widgets/form/index.d.ts +7 -0
  1261. package/lib/types/widgets/form/index.d.ts.map +1 -0
  1262. package/lib/types/widgets/form/inputs.d.ts +8 -0
  1263. package/lib/types/widgets/form/inputs.d.ts.map +1 -0
  1264. package/lib/types/widgets/form/schema.d.ts +47 -0
  1265. package/lib/types/widgets/form/schema.d.ts.map +1 -0
  1266. package/lib/types/widgets/index.d.ts +12 -0
  1267. package/lib/types/widgets/index.d.ts.map +1 -0
  1268. package/lib/types/widgets/json-view/JSONCode.d.ts +22 -0
  1269. package/lib/types/widgets/json-view/JSONCode.d.ts.map +1 -0
  1270. package/lib/types/widgets/json-view/JSONDisplay.d.ts +8 -0
  1271. package/lib/types/widgets/json-view/JSONDisplay.d.ts.map +1 -0
  1272. package/lib/types/widgets/json-view/JSONView.d.ts +7 -0
  1273. package/lib/types/widgets/json-view/JSONView.d.ts.map +1 -0
  1274. package/lib/types/widgets/json-view/index.d.ts +5 -0
  1275. package/lib/types/widgets/json-view/index.d.ts.map +1 -0
  1276. package/lib/types/widgets/json-view/types.d.ts +8 -0
  1277. package/lib/types/widgets/json-view/types.d.ts.map +1 -0
  1278. package/lib/types/widgets/markdown/MarkdownRenderer.d.ts +9 -0
  1279. package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +1 -0
  1280. package/lib/types/widgets/markdown/index.d.ts +2 -0
  1281. package/lib/types/widgets/markdown/index.d.ts.map +1 -0
  1282. package/lib/types/widgets/popover/Popover.d.ts +38 -0
  1283. package/lib/types/widgets/popover/Popover.d.ts.map +1 -0
  1284. package/lib/types/widgets/popover/context.d.ts +8 -0
  1285. package/lib/types/widgets/popover/context.d.ts.map +1 -0
  1286. package/lib/types/widgets/popover/index.d.ts +3 -0
  1287. package/lib/types/widgets/popover/index.d.ts.map +1 -0
  1288. package/lib/types/widgets/popover/slots.d.ts +5 -0
  1289. package/lib/types/widgets/popover/slots.d.ts.map +1 -0
  1290. package/lib/types/widgets/properties/PropertiesView.d.ts +11 -0
  1291. package/lib/types/widgets/properties/PropertiesView.d.ts.map +1 -0
  1292. package/lib/types/widgets/properties/index.d.ts +2 -0
  1293. package/lib/types/widgets/properties/index.d.ts.map +1 -0
  1294. package/lib/types/widgets/schema-editor/ManagedSchema.d.ts +75 -0
  1295. package/lib/types/widgets/schema-editor/ManagedSchema.d.ts.map +1 -0
  1296. package/lib/types/widgets/schema-editor/editor/Editable.d.ts +40 -0
  1297. package/lib/types/widgets/schema-editor/editor/Editable.d.ts.map +1 -0
  1298. package/lib/types/widgets/schema-editor/editor/EditableSchemaProperty.d.ts +8 -0
  1299. package/lib/types/widgets/schema-editor/editor/EditableSchemaProperty.d.ts.map +1 -0
  1300. package/lib/types/widgets/schema-editor/editor/PropertyEditor.d.ts +5 -0
  1301. package/lib/types/widgets/schema-editor/editor/PropertyEditor.d.ts.map +1 -0
  1302. package/lib/types/widgets/schema-editor/editor/PropertyViewer.d.ts +4 -0
  1303. package/lib/types/widgets/schema-editor/editor/PropertyViewer.d.ts.map +1 -0
  1304. package/lib/types/widgets/schema-editor/editor/SchemaContext.d.ts +3 -0
  1305. package/lib/types/widgets/schema-editor/editor/SchemaContext.d.ts.map +1 -0
  1306. package/lib/types/widgets/schema-editor/editor/SchemaEditor.d.ts +9 -0
  1307. package/lib/types/widgets/schema-editor/editor/SchemaEditor.d.ts.map +1 -0
  1308. package/lib/types/widgets/schema-editor/index.d.ts +7 -0
  1309. package/lib/types/widgets/schema-editor/index.d.ts.map +1 -0
  1310. package/lib/types/widgets/schema-editor/json-schema4-utils.d.ts +16 -0
  1311. package/lib/types/widgets/schema-editor/json-schema4-utils.d.ts.map +1 -0
  1312. package/lib/types/widgets/schema-editor/type-signature.d.ts +19 -0
  1313. package/lib/types/widgets/schema-editor/type-signature.d.ts.map +1 -0
  1314. package/lib/types/widgets/upload/DropZone.d.ts +41 -0
  1315. package/lib/types/widgets/upload/DropZone.d.ts.map +1 -0
  1316. package/lib/types/widgets/upload/UploadResultCategory.d.ts +26 -0
  1317. package/lib/types/widgets/upload/UploadResultCategory.d.ts.map +1 -0
  1318. package/lib/types/widgets/upload/UploadSummary.d.ts +38 -0
  1319. package/lib/types/widgets/upload/UploadSummary.d.ts.map +1 -0
  1320. package/lib/types/widgets/upload/index.d.ts +4 -0
  1321. package/lib/types/widgets/upload/index.d.ts.map +1 -0
  1322. package/lib/types/widgets/xml-viewer/components/Attributes/index.d.ts +6 -0
  1323. package/lib/types/widgets/xml-viewer/components/Attributes/index.d.ts.map +1 -0
  1324. package/lib/types/widgets/xml-viewer/components/CDataTag/index.d.ts +8 -0
  1325. package/lib/types/widgets/xml-viewer/components/CDataTag/index.d.ts.map +1 -0
  1326. package/lib/types/widgets/xml-viewer/components/CollapseIcon/index.d.ts +5 -0
  1327. package/lib/types/widgets/xml-viewer/components/CollapseIcon/index.d.ts.map +1 -0
  1328. package/lib/types/widgets/xml-viewer/components/CommentTag/index.d.ts +9 -0
  1329. package/lib/types/widgets/xml-viewer/components/CommentTag/index.d.ts.map +1 -0
  1330. package/lib/types/widgets/xml-viewer/components/DeclarationTag/index.d.ts +8 -0
  1331. package/lib/types/widgets/xml-viewer/components/DeclarationTag/index.d.ts.map +1 -0
  1332. package/lib/types/widgets/xml-viewer/components/Elements/index.d.ts +8 -0
  1333. package/lib/types/widgets/xml-viewer/components/Elements/index.d.ts.map +1 -0
  1334. package/lib/types/widgets/xml-viewer/components/InvalidXml/index.d.ts +2 -0
  1335. package/lib/types/widgets/xml-viewer/components/InvalidXml/index.d.ts.map +1 -0
  1336. package/lib/types/widgets/xml-viewer/components/Tag/index.d.ts +13 -0
  1337. package/lib/types/widgets/xml-viewer/components/Tag/index.d.ts.map +1 -0
  1338. package/lib/types/widgets/xml-viewer/components/TextElement/index.d.ts +8 -0
  1339. package/lib/types/widgets/xml-viewer/components/TextElement/index.d.ts.map +1 -0
  1340. package/lib/types/widgets/xml-viewer/components/XMLViewer.d.ts +3 -0
  1341. package/lib/types/widgets/xml-viewer/components/XMLViewer.d.ts.map +1 -0
  1342. package/lib/types/widgets/xml-viewer/components/types.d.ts +104 -0
  1343. package/lib/types/widgets/xml-viewer/components/types.d.ts.map +1 -0
  1344. package/lib/types/widgets/xml-viewer/constants/index.d.ts +17 -0
  1345. package/lib/types/widgets/xml-viewer/constants/index.d.ts.map +1 -0
  1346. package/lib/types/widgets/xml-viewer/context/xml-viewer-context.d.ts +4 -0
  1347. package/lib/types/widgets/xml-viewer/context/xml-viewer-context.d.ts.map +1 -0
  1348. package/lib/types/widgets/xml-viewer/helpers/index.d.ts +13 -0
  1349. package/lib/types/widgets/xml-viewer/helpers/index.d.ts.map +1 -0
  1350. package/lib/types/widgets/xml-viewer/hooks/useCollapsible.d.ts +15 -0
  1351. package/lib/types/widgets/xml-viewer/hooks/useCollapsible.d.ts.map +1 -0
  1352. package/lib/types/widgets/xml-viewer/hooks/useXMLViewer.d.ts +10 -0
  1353. package/lib/types/widgets/xml-viewer/hooks/useXMLViewer.d.ts.map +1 -0
  1354. package/lib/types/widgets/xml-viewer/index.d.ts +3 -0
  1355. package/lib/types/widgets/xml-viewer/index.d.ts.map +1 -0
  1356. package/lib/types/widgets/xml-viewer/types/index.d.ts +16 -0
  1357. package/lib/types/widgets/xml-viewer/types/index.d.ts.map +1 -0
  1358. package/lib/vertesia-ui-core.js +2 -0
  1359. package/lib/vertesia-ui-core.js.map +1 -0
  1360. package/lib/vertesia-ui-env.js +2 -0
  1361. package/lib/vertesia-ui-env.js.map +1 -0
  1362. package/lib/vertesia-ui-features.js +2 -0
  1363. package/lib/vertesia-ui-features.js.map +1 -0
  1364. package/lib/vertesia-ui-layout.js +2 -0
  1365. package/lib/vertesia-ui-layout.js.map +1 -0
  1366. package/lib/vertesia-ui-router.js +2 -0
  1367. package/lib/vertesia-ui-router.js.map +1 -0
  1368. package/lib/vertesia-ui-session.js +2 -0
  1369. package/lib/vertesia-ui-session.js.map +1 -0
  1370. package/lib/vertesia-ui-shell.js +2 -0
  1371. package/lib/vertesia-ui-shell.js.map +1 -0
  1372. package/lib/vertesia-ui-widgets.js +2 -0
  1373. package/lib/vertesia-ui-widgets.js.map +1 -0
  1374. package/package.json +165 -170
  1375. package/src/env/index.ts +1 -2
  1376. package/src/features/store/objects/DocumentSearchResults.tsx +1 -15
  1377. package/src/features/user/UserInfo.tsx +0 -2
  1378. package/src/session/UserSession.ts +0 -1
  1379. package/src/session/UserSessionProvider.tsx +1 -1
  1380. package/src/session/auth/composable.ts +70 -71
@@ -0,0 +1,2 @@
1
+ class t{_props;constructor(t){this._props=t}init(t){return this._props=t,this}prop(t){if(!this._props)throw new Error("VertesiaEnvironment was not initialized");return this._props[t]}get version(){return this.prop("version")}get name(){return this.prop("name")}get type(){return this.prop("type")}get isProd(){return"production"===this.type}get isStable(){return"production"===this.type||"preview"===this.type||"dr"===this.type}get isDev(){return!this.isStable}get isPreview(){return"preview"===this.type}get isLocalDev(){return this.prop("isLocalDev")}get isDocker(){return this.prop("isDocker")}get endpoints(){return this.prop("endpoints")}get firebase(){return this.prop("firebase")}get datadog(){return this.prop("datadog")}get logger(){return this._props?.logger??console}onLogin(t){this._props?.onLogin?.(t)}onLogout(){this._props?.onLogout?.()}}const r=new t;export{r as Env,t as VertesiaEnvironment};
2
+ //# sourceMappingURL=vertesia-ui-env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vertesia-ui-env.js","sources":["esm/env/index.js"],"sourcesContent":["// hook to initialize the environment and auth session\n// the main app must call this hook before rendering the page.\nexport class VertesiaEnvironment {\n _props;\n constructor(_props) {\n this._props = _props;\n }\n init(props) {\n this._props = props;\n return this;\n }\n prop(name) {\n if (!this._props) {\n throw new Error(\"VertesiaEnvironment was not initialized\");\n }\n return this._props[name];\n }\n get version() {\n return this.prop(\"version\");\n }\n get name() {\n return this.prop(\"name\");\n }\n get type() {\n return this.prop(\"type\");\n }\n get isProd() {\n return this.type === \"production\";\n }\n get isStable() {\n return this.type === \"production\" || this.type === \"preview\" || this.type === \"dr\";\n }\n get isDev() {\n return !this.isStable;\n }\n get isPreview() {\n return this.type === \"preview\";\n }\n get isLocalDev() {\n return this.prop(\"isLocalDev\");\n }\n get isDocker() {\n return this.prop(\"isDocker\");\n }\n get endpoints() {\n return this.prop(\"endpoints\");\n }\n get firebase() {\n return this.prop(\"firebase\");\n }\n get datadog() {\n return this.prop(\"datadog\");\n }\n get logger() {\n return this._props?.logger ?? console;\n }\n /**\n * Callback to notify the host app when the user logs in.\n */\n onLogin(token) {\n this._props?.onLogin?.(token);\n }\n /**\n * Callback to notify the host app when the user logs out\n */\n onLogout() {\n this._props?.onLogout?.();\n }\n}\nconst Env = new VertesiaEnvironment();\nexport { Env };\n//# sourceMappingURL=index.js.map"],"names":["VertesiaEnvironment","_props","constructor","this","init","props","prop","name","Error","version","type","isProd","isStable","isDev","isPreview","isLocalDev","isDocker","endpoints","firebase","datadog","logger","console","onLogin","token","onLogout","Env"],"mappings":"AAEO,MAAMA,EACTC,OACA,WAAAC,CAAYD,GACRE,KAAKF,OAASA,CACtB,CACI,IAAAG,CAAKC,GAED,OADAF,KAAKF,OAASI,EACPF,IACf,CACI,IAAAG,CAAKC,GACD,IAAKJ,KAAKF,OACN,MAAM,IAAIO,MAAM,2CAEpB,OAAOL,KAAKF,OAAOM,EAC3B,CACI,WAAIE,GACA,OAAON,KAAKG,KAAK,UACzB,CACI,QAAIC,GACA,OAAOJ,KAAKG,KAAK,OACzB,CACI,QAAII,GACA,OAAOP,KAAKG,KAAK,OACzB,CACI,UAAIK,GACA,MAAqB,eAAdR,KAAKO,IACpB,CACI,YAAIE,GACA,MAAqB,eAAdT,KAAKO,MAAuC,YAAdP,KAAKO,MAAoC,OAAdP,KAAKO,IAC7E,CACI,SAAIG,GACA,OAAQV,KAAKS,QACrB,CACI,aAAIE,GACA,MAAqB,YAAdX,KAAKO,IACpB,CACI,cAAIK,GACA,OAAOZ,KAAKG,KAAK,aACzB,CACI,YAAIU,GACA,OAAOb,KAAKG,KAAK,WACzB,CACI,aAAIW,GACA,OAAOd,KAAKG,KAAK,YACzB,CACI,YAAIY,GACA,OAAOf,KAAKG,KAAK,WACzB,CACI,WAAIa,GACA,OAAOhB,KAAKG,KAAK,UACzB,CACI,UAAIc,GACA,OAAOjB,KAAKF,QAAQmB,QAAUC,OACtC,CAII,OAAAC,CAAQC,GACJpB,KAAKF,QAAQqB,UAAUC,EAC/B,CAII,QAAAC,GACIrB,KAAKF,QAAQuB,YACrB,EAEK,MAACC,EAAM,IAAIzB"}
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import r from"clsx";import{AnimatePresence as a,motion as s}from"motion/react";import i,{useMemo as l,useState as o,useEffect as c,createContext as d,useContext as u,useRef as m,useCallback as h,useLayoutEffect as p}from"react";import{cn as g,useToast as f,Badge as y,Button as b,Popover as v,PopoverTrigger as x,PopoverContent as w,Command as N,CommandList as k,CommandGroup as C,CommandItem as j,Modal as S,ModalTitle as _,ModalBody as P,RadioGroup as T,FormItem as I,Input as $,ModalFooter as A,RadioOptionAdapter as E,ResizablePanelGroup as z,ResizablePanel as L,ResizableHandle as U,Spinner as D,Card as O,Separator as F,CardContent as R,VTooltip as M,SelectBox as V,InputList as q,useFetch as W,Avatar as B,Table as J,FilterProvider as G,FilterBtn as H,FilterBar as K,FilterClear as Y,TBody as Q,SharedState as X,useWatchSharedState as Z,VModal as ee,VModalTitle as te,VModalBody as ne,MessageBox as re,VModalFooter as ae,VSelectBox as se,useIntersectionObserver as ie,ErrorBox as le,useFlag as oe,Styles as ce,Checkbox as de,NumberInput as ue,SidePanel as me,Divider as he,Switch as pe,TR as ge,EmptyCollection as fe,ConfirmModal as ye,Textarea as be,useDebounce as ve,CommandInput as xe,CommandEmpty as we,SelectList as Ne,Portal as ke,DialogDescription as Ce,Heading as je,VTabs as Se,VTabsBar as _e,VTabsPanel as Pe,Center as Te}from"@vertesia/ui/core";import{AgentMessageType as Ie,mergePromptsSchema as $e,supportsToolUse as Ae,ImageRenditionFormat as Ee,PrincipalType as ze,InteractionStatus as Le,SearchTypes as Ue,SupportedEmbeddingTypes as De}from"@vertesia/common";import{useUserSession as Oe}from"@vertesia/ui/session";import{X as Fe,Circle as Re,AlertCircle as Me,Clock as Ve,CheckCircle as qe,CopyIcon as We,Bot as Be,MessageSquare as Je,Info as Ge,User as He,ClipboardList as Ke,XIcon as Ye,MoreVertical as Qe,ExternalLink as Xe,DownloadCloudIcon as Ze,TableProperties as et,LayoutGrid as tt,Copy as nt,SquarePen as rt,Download as at,Eye as st,Users as it,RefreshCw as lt,UploadIcon as ot,CheckCircleIcon as ct,AlertCircleIcon as dt,FileIcon as ut,XCircleIcon as mt,FolderIcon as ht,ChevronsUpDown as pt,FileText as gt,Maximize2 as ft,ChevronRight as yt,Settings as bt,Trash2 as vt,Search as xt,FolderClosed as wt,Check as Nt,EllipsisVertical as kt,PaperclipIcon as Ct,SendIcon as jt,Activity as St,Cpu as _t,CloudDownload as Pt,ChevronsUp as Tt,ImageIcon as It,InfoIcon as $t,AtSignIcon as At,ChevronsDown as Et}from"lucide-react";import{NavLink as zt,useNavigate as Lt}from"@vertesia/ui/router";import Ut from"dayjs";import Dt from"react-markdown";import Ot from"remark-gfm";import Ft,{Ajv as Rt}from"ajv";import{JSONDisplay as Mt,MarkdownRenderer as Vt,DropZone as qt,UploadSummary as Wt,useSchema as Bt,CodeMirrorEditor as Jt,SchemaEditor as Gt,ManagedObject as Ht,GeneratedForm as Kt,Popover as Yt,XMLViewer as Qt,JSONCode as Xt}from"@vertesia/ui/widgets";import Zt from"@monaco-editor/react";import en from"dayjs/plugin/localizedFormat";import tn from"dayjs/plugin/relativeTime";import{Md5 as nn}from"ts-md5";import{json as rn}from"@codemirror/lang-json";import{basicSetup as an}from"codemirror";import{ErrorBoundary as sn}from"react-error-boundary";import{SidebarItem as ln}from"@vertesia/ui/layout";function on({children:t,secondary:n=!1}){return e("span",{className:n?"bg-secondary text-primary":"text-foreground bg-muted",children:t})}function cn(e){return e?"array"===e.name?cn(e.innerType):e:void 0}function dn({property:n}){return t("div",{className:"flex items-center gap-x-2",children:[e("div",{className:"font-semibold text-gray-600",children:n.name}),n.optional&&e(on,{children:"optional"}),e(on,{children:n.type.value})]})}function un({activities:t}){return e("div",{className:"flex flex-col gap-y-4 divide-y divide-gray-200",children:t.map((t=>e(hn,{activity:t},t.name)))})}function mn({code:n,children:r}){return t("div",{className:"flex gap-2 items-center border-b border-b-gray-200 mb-2",children:[e("div",{className:"text-lg font-medium text-gray-900 py-2 ",children:r}),n&&e("div",{children:e(on,{children:n})})]})}function hn({activity:n,headingClass:r,headingRef:a}){return t("div",{className:r,id:n.name,ref:a,children:[e("div",{className:"text-xl font-semibold pt-8",children:n.title}),e("div",{className:"pb-4",children:e(on,{children:n.name})}),n.doc&&e("div",{className:"text-gray-700 pb-2",children:n.doc}),t("div",{className:"pb-4",children:[e(mn,{code:n.paramsType,children:"Parameters"}),e("div",{className:"divide-y divide-gray-100",children:n.params.map((t=>e(pn,{property:t},t.name)))})]}),t("div",{className:"pb-4",children:[e(mn,{children:"Returns"}),e("div",{children:n.returnType?n.returnType.value:"void"})]})]})}function pn({property:n,className:a}){const s=l((()=>{const t=cn(n.type.innerType)??n.type;return"object"===t.name&&t.members?e(fn,{members:t.members}):"enum"===t.name&&t.enum?e(gn,{values:t.enum}):null}),[n.type.innerType]);return t("div",{className:r("py-2",a),children:[e(dn,{property:n}),n.doc&&e("div",{className:"text-gray-700 text-sm pt-2",children:n.doc}),s&&e("div",{className:"my-2 overflow-hidden",children:s})]})}function gn({values:t}){return e("div",{className:"flex flex-wrap items-center gap-2",children:t.map(((t,n)=>e(on,{secondary:!0,children:t},n)))})}function fn({members:n}){return e(bn,{className:"rounded-md border border-gray-200",button:n=>t("div",{className:"px-4 py-2 flex items-center gap-x-2 text-sm font-medium hover:text-blue-600",children:[e(vn,{isOpen:n}),e("div",n?{children:"Hide child properties"}:{children:"Show child properties"})]}),body:e(yn,{properties:n})})}function yn({properties:t}){return e("div",{className:"border-l-2 border-l-blue-200 flex flex-col divide-y divide-gray-100 border-t border-t-gray-200",children:t.map((t=>e(pn,{property:t,className:"px-4 py-2"},t.name)))})}function bn({button:n,body:i,className:l,isInitiallyOpen:c}){const[d,u]=o(c||!1);return t("div",{className:r(d?"block":"inline-block",l),children:[e("button",{className:"p-0 m-0 bg-transparent",onClick:()=>u(!d),children:e(a,{children:n(d)})}),e(a,{children:d&&e(s.div,{className:"overflow-hidden",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:"easeOut"},children:i})})]})}function vn({isOpen:t}){return e(a,{propagate:!0,mode:"wait",children:e(s.div,{className:"font-mono font-semibold text-gray-400 text-lg",initial:{rotate:0},animate:{rotate:t?45:0},transition:{duration:.2},children:"+"},"closeIcon")})}function xn({className:n,inline:r=!1}){return t("div",{className:g("flex items-center gap-1",r?"inline-flex":"",n),children:[e("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-[jumping_1s_infinite_ease-in-out] hover:bg-blue-600",style:{transform:"translateY(0)",animationRange:"0px -8px"}}),e("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-[jumping_1s_0.3s_infinite_ease-in-out] hover:bg-blue-600",style:{transform:"translateY(0)",animationRange:"0px -8px"}}),e("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-[jumping_1s_0.6s_infinite_ease-in-out] hover:bg-blue-600",style:{transform:"translateY(0)",animationRange:"0px -8px"}})]})}function wn({className:n,inline:r=!1,color:a="blue"}){const s={blue:"from-blue-400 to-indigo-500 dark:from-blue-500 dark:to-indigo-400",purple:"from-purple-400 to-violet-500 dark:from-purple-500 dark:to-violet-400",teal:"from-teal-400 to-emerald-500 dark:from-teal-500 dark:to-emerald-400",green:"from-green-400 to-emerald-500 dark:from-green-500 dark:to-emerald-400",amber:"from-amber-400 to-orange-500 dark:from-amber-500 dark:to-orange-400"}[a];return t("div",{className:g("flex items-center gap-1.5",r?"inline-flex":"",n),children:[e("div",{className:`w-2 h-2 bg-gradient-to-r ${s} rounded-full animate-[bounce_1.2s_ease-in-out_infinite]`}),e("div",{className:`w-2 h-2 bg-gradient-to-r ${s} rounded-full animate-[bounce_1.2s_ease-in-out_0.2s_infinite]`}),e("div",{className:`w-2 h-2 bg-gradient-to-r ${s} rounded-full animate-[bounce_1.2s_ease-in-out_0.4s_infinite]`})]})}function Nn({className:n,size:r="md",color:a="blue"}){const s={blue:"bg-blue-500 dark:bg-blue-400",purple:"bg-purple-500 dark:bg-purple-400",teal:"bg-teal-500 dark:bg-teal-400",green:"bg-green-500 dark:bg-green-400",amber:"bg-amber-500 dark:bg-amber-400"};return t("span",{className:g("relative flex",n),children:[e("span",{className:g("animate-ping absolute inline-flex h-full w-full rounded-full opacity-60",s[a])}),e("span",{className:g("animate-pulse absolute inline-flex h-[80%] w-[80%] rounded-full opacity-80",s[a]),style:{left:"10%",top:"10%",animationDuration:"2s"}}),e("span",{className:g("relative inline-flex rounded-full",s[a],{sm:"w-3 h-3",md:"w-5 h-5",lg:"w-7 h-7"}[r])})]})}function kn({className:t,color:n="blue"}){const[r,a]=o(".");return c((()=>{const e=setInterval((()=>{a((e=>"."===e?"..":".."===e?"...":"."))}),500);return()=>clearInterval(e)}),[]),e("span",{className:g({blue:"text-blue-600 dark:text-blue-400",purple:"text-purple-600 dark:text-purple-400",teal:"text-teal-600 dark:text-teal-400",green:"text-green-600 dark:text-green-400",amber:"text-amber-600 dark:text-amber-400"}[n],"font-bold",t),children:r})}function Cn({message:n,className:r,color:a="blue"}){const s={blue:{dot:"bg-blue-500 dark:bg-blue-400",text:"text-blue-700 dark:text-blue-300"},purple:{dot:"bg-purple-500 dark:bg-purple-400",text:"text-purple-700 dark:text-purple-300"},teal:{dot:"bg-teal-500 dark:bg-teal-400",text:"text-teal-700 dark:text-teal-300"},green:{dot:"bg-green-500 dark:bg-green-400",text:"text-green-700 dark:text-green-300"},amber:{dot:"bg-amber-500 dark:bg-amber-400",text:"text-amber-700 dark:text-amber-300"}};return t("div",{className:g("flex items-center gap-2 py-1",r),children:[t("div",{className:"flex space-x-1",children:[e("div",{className:`w-1.5 h-1.5 ${s[a].dot} rounded-full animate-bounce`}),e("div",{className:`w-1.5 h-1.5 ${s[a].dot} rounded-full animate-bounce`,style:{animationDelay:"0.2s"}}),e("div",{className:`w-1.5 h-1.5 ${s[a].dot} rounded-full animate-bounce`,style:{animationDelay:"0.4s"}})]}),e("div",{className:`${s[a].text} font-medium text-xs`,children:n})]})}function jn({className:n,color:r="blue",width:a="md",message:s}){const[i,l]=o(15),[d,u]=o("increasing"),[m,h]=o(.4);return c((()=>{let e,t=Date.now();const n=()=>{const r=Date.now(),a=r-t;t=r,l((e=>{const t=m*(a/16);let n="increasing"===d?e+t:e-t;return n>=85?(u("decreasing"),h(.3+.2*Math.random()),85):n<=15?(u("increasing"),h(.3+.2*Math.random()),15):(Math.random()>.99&&h((e=>Math.max(.2,Math.min(.5,e+(.1*Math.random()-.05))))),n)})),e=requestAnimationFrame(n)};return e=requestAnimationFrame(n),()=>{cancelAnimationFrame(e)}}),[d,m]),t("div",{className:g("flex flex-col gap-1",n),children:[s&&e("div",{className:`text-xs font-medium ${{blue:"text-blue-700 dark:text-blue-300",purple:"text-purple-700 dark:text-purple-300",teal:"text-teal-700 dark:text-teal-300",green:"text-green-700 dark:text-green-300",amber:"text-amber-700 dark:text-amber-300"}[r]} mb-1`,children:s}),e("div",{className:g("h-1.5 rounded-full overflow-hidden shadow-inner",{blue:"bg-blue-200 dark:bg-blue-900/30",purple:"bg-purple-200 dark:bg-purple-900/30",teal:"bg-teal-200 dark:bg-teal-900/30",green:"bg-green-200 dark:bg-green-900/30",amber:"bg-amber-200 dark:bg-amber-900/30"}[r],{sm:"w-24",md:"w-32",lg:"w-48",xl:"w-64",full:"w-full"}[a]),children:e("div",{className:g("h-full rounded-full",{blue:"bg-gradient-to-r from-blue-400 to-blue-500 dark:from-blue-500 dark:to-blue-400",purple:"bg-gradient-to-r from-purple-400 to-purple-500 dark:from-purple-500 dark:to-purple-400",teal:"bg-gradient-to-r from-teal-400 to-teal-500 dark:from-teal-500 dark:to-teal-400",green:"bg-gradient-to-r from-green-400 to-green-500 dark:from-green-500 dark:to-green-400",amber:"bg-gradient-to-r from-amber-400 to-amber-500 dark:from-amber-500 dark:to-amber-400"}[r]),style:{width:`${i}%`,transition:"width 150ms cubic-bezier(0.4, 0.0, 0.2, 1)"}})})]})}function Sn({className:t,color:n="blue",size:r="md"}){const[a,s]=o(Array(7).fill(50)),i={sm:{width:"w-16",height:"h-4",barWidth:"w-0.5",gap:"gap-[2px]"},md:{width:"w-20",height:"h-5",barWidth:"w-1",gap:"gap-[3px]"},lg:{width:"w-24",height:"h-6",barWidth:"w-1.5",gap:"gap-1"}},l={blue:"bg-gradient-to-b from-blue-400 to-blue-500 dark:from-blue-400 dark:to-blue-500",purple:"bg-gradient-to-b from-purple-400 to-purple-500 dark:from-purple-400 dark:to-purple-500",teal:"bg-gradient-to-b from-teal-400 to-teal-500 dark:from-teal-400 dark:to-teal-500",green:"bg-gradient-to-b from-green-400 to-green-500 dark:from-green-400 dark:to-green-500",amber:"bg-gradient-to-b from-amber-400 to-amber-500 dark:from-amber-400 dark:to-amber-500"};return c((()=>{let e;const t=[1.2,1,1.5,.8,1.3,.9,1.1],n=[0,.5,1,1.5,2,2.5,3];let r=0;const i=()=>{r+=.02;const l=a.map(((e,a)=>10+40*(Math.sin(r*t[a]+n[a])+1)));s(l),e=requestAnimationFrame(i)};return e=requestAnimationFrame(i),()=>{cancelAnimationFrame(e)}}),[]),e("div",{className:g("flex items-end justify-center",i[r].width,i[r].height,i[r].gap,t),children:a.map(((t,a)=>e("div",{className:g(i[r].barWidth,"rounded-full transform-gpu",l[n]),style:{height:`${t}%`,transition:"height 100ms cubic-bezier(0.4, 0.0, 0.2, 1)",opacity:.9}},a)))})}function _n({plan:r,workstreamStatus:a,isOpen:s,onClose:i,plans:l=[],activePlanIndex:o=0,onChangePlan:c=()=>{}}){return s?t("div",{className:"fixed top-24 right-8 bottom-24 z-50 bg-white dark:bg-gray-900 shadow-xl border border-gray-200 dark:border-gray-700 overflow-hidden",style:{width:"350px"},children:[t("div",{className:"flex items-center justify-between p-3 border-b border-gray-200 dark:border-gray-800",children:[e("h3",{className:"font-bold text-gray-800 dark:text-gray-200 text-base",children:"Plan"}),t("button",{className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full text-gray-500 dark:text-gray-400",onClick:i,children:[e(Fe,{className:"h-4 w-4"}),e("span",{className:"sr-only",children:"Close"})]})]}),t("div",{className:"p-3 overflow-y-auto",style:{height:"calc(100% - 44px)",maxHeight:"calc(100vh - 150px)"},children:[t("div",{className:"mb-3 p-2 bg-blue-50 dark:bg-blue-900/20 rounded-md border border-blue-100 dark:border-blue-800",children:[e("div",{className:"text-xs font-medium text-blue-700 dark:text-blue-300 mb-1",children:"Task Progress"}),e("div",{className:"flex items-center gap-2",children:(()=>{const s=r.plan||[],i=s.length;let l=0;i>0&&s.forEach((e=>{if(e&&e.id){const t=e.id.toString();"completed"===a.get(t)&&l++}}));const o=i>0?Math.round(l/i*100):0;return t(n,{children:[e("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2",children:e("div",{className:"bg-blue-600 h-2 rounded-full",style:{width:`${o}%`}})}),e("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:i>0?`${l}/${i}`:"0/0"})]})})()})]}),l.length>1&&t("div",{className:"mb-3 flex items-center justify-between",children:[e("button",{className:"text-xs px-2 py-1 rounded-md bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300 disabled:opacity-50",onClick:()=>c(Math.min(l.length-1,o+1)),disabled:o>=l.length-1,children:"Older Plan"}),e("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:l[o]?.timestamp?new Date(l[o].timestamp).toLocaleTimeString():"Unknown time"}),e("button",{className:"text-xs px-2 py-1 rounded-md bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300 disabled:opacity-50",onClick:()=>c(Math.max(0,o-1)),disabled:o<=0,children:"Newer Plan"})]}),t("div",{className:"rounded-md border border-gray-200 dark:border-gray-800",children:[e("div",{className:"p-2 border-b border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/50",children:e("div",{className:"font-medium text-xs",children:"Step-by-Step Plan"})}),e("div",{className:"divide-y divide-gray-100 dark:divide-gray-800 max-h-[calc(100vh-350px)] overflow-y-auto",children:r.plan&&r.plan.length>0?r.plan.map(((n,r)=>{const s=n.id?n.id.toString():`task-${r}`,i=n.goal||`Task ${r+1}`;let l=n.status||"pending";a.has(s)&&(l=a.get(s));let o=Re,c="text-gray-400",d="";return"in_progress"===l?(o=Ve,c="text-blue-500",d="bg-blue-50/50 dark:bg-blue-900/10"):"completed"===l&&(o=qe,c="text-green-500"),t("div",{className:`flex p-3 my-1 ${d}`,children:[e("div",{className:`mr-2 mt-0.5 flex-shrink-0 ${c}`,children:e(o,{className:"h-3.5 w-3.5"})}),t("div",{className:"w-full",children:[e("div",{className:"text-sm font-medium text-gray-800 dark:text-gray-200 mb-2",children:i}),t("div",{className:"mt-1 flex justify-between items-center",children:[e("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300",children:s}),e("span",{className:"ml-2 text-xs px-2 py-0.5 rounded-full "+("completed"===l?"bg-green-100 text-green-600 dark:bg-green-900/30 dark:text-green-400":"in_progress"===l?"bg-blue-100 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"),children:"completed"===l?"Completed":"in_progress"===l?"In Progress":"Pending"})]})]})]},r)})):t("div",{className:"p-3 text-center text-gray-500 dark:text-gray-400 italic",children:[e(Me,{className:"h-4 w-4 mx-auto mb-2 text-amber-500"}),e("p",{className:"text-xs",children:"No plan has been detected yet"}),e("p",{className:"text-xs mt-1",children:"Plans will appear here when the agent creates one"})]})})]}),(()=>{const n=new Set((r.plan||[]).filter((e=>e&&e.id)).map((e=>e.id.toString()))),s=Array.from(a.entries()).filter((([e])=>"main"!==e&&!n.has(e)));return s.length>0?t("div",{className:"mt-3 rounded-md border border-gray-200 dark:border-gray-800",children:[e("div",{className:"p-2 border-b border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/50",children:e("div",{className:"font-medium text-xs",children:"Workstreams"})}),e("div",{className:"p-3",children:e("div",{className:"grid grid-cols-1 gap-2",children:s.map((([n,r])=>{let a=Re,s="text-gray-400",i="bg-gray-100 dark:bg-gray-800",l="Pending";return"in_progress"===r?(a=Ve,s="text-blue-500",i="bg-blue-100 dark:bg-blue-800/30",l="In Progress"):"completed"===r&&(a=qe,s="text-green-500",i="bg-green-100 dark:bg-green-800/30",l="Completed"),t("div",{className:`flex items-center p-1.5 rounded ${i}`,children:[e("div",{className:`mr-1.5 ${s}`,children:e(a,{className:"h-3.5 w-3.5"})}),e("div",{className:"flex-1",children:e("span",{className:"text-xs font-medium text-gray-800 dark:text-gray-300",children:n})}),e("span",{className:"text-xs font-medium",children:l})]},n)}))})})]}):null})()]})]}):null}const Pn=["Brewing some code magic...","Doing the robot dance...","Cooking up something good...","Working my gears...","Parsing the possibilities...","Crunching the numbers...","Connecting the digital dots...","Processing at maximum capacity...","Searching through my circuits...","Running advanced algorithms...","Computing optimal solutions...","Loading brilliance.exe...","Scanning the knowledge base...","Optimizing response protocols...","Having a quick brainstorm...","Thinking cap firmly on...","Pondering the digital universe...","Consulting my silicon wisdom...","Untangling the logic knots...","Assembling clever responses...","Mixing thoughtful ingredients...","Polishing the perfect answer...","Taking a momentary mind sprint...","Connecting virtual synapses...","Baking fresh ideas...","Stirring the thought pot...","Simmering solutions slowly...","Whipping up a smart response...","Adding a dash of intelligence...","Preparing a gourmet answer...","Growing brilliant ideas...","Cultivating the perfect response...","Gathering digital nectar...","Planting seeds of solutions...","Exploring the data landscape...","Mapping the solution path...","Navigating through possibilities...","Charting the course to answers...","Embarking on a thought expedition...","Sketching out concepts...","Painting with digital brushstrokes...","Composing my response symphony...","Crafting precision answers...","Weaving threads of information...","Just a moment of processing...","Taking a quick thinking break...","Almost there, final touches...","Putting the pieces together...","Making progress, hold tight..."];const Tn=[Ie.COMPLETE,Ie.IDLE,Ie.REQUEST_INPUT,Ie.TERMINATED];function In(e){return e.workstream_id?(e.type===Ie.COMPLETE&&console.log("[getWorkstreamId] COMPLETE message with workstream_id:",e.workstream_id),e.workstream_id):(e.type===Ie.COMPLETE&&console.log("[getWorkstreamId] COMPLETE message without workstream_id, defaulting to 'main'"),"main")}function $n({message:r,showPulsatingCircle:a=!1}){const[s,i]=o(!1),[l,d]=o(""),[u,m]=o(!1),{client:h}=Oe(),p=f(),g=(()=>{const t={containerClass:"bg-white border-l-4 border-l-muted/30 shadow-sm",iconComponent:e(Be,{className:"size-4 text-muted"}),sender:""};switch(r.type){case Ie.ANSWER:return{...t,containerClass:"bg-white border-l-4 border-l-muted/30 shadow-sm",iconComponent:e(Be,{className:"size-4 text-muted"}),sender:"Agent"};case Ie.COMPLETE:return{...t,containerClass:"bg-white border-l-4 border-l-success shadow-sm",iconComponent:e(qe,{className:"size-4 text-success"}),sender:"Completed"};case Ie.TERMINATED:return{...t,containerClass:"bg-white border-l-4 border-l-attention shadow-sm",iconComponent:e(qe,{className:"size-4 text-attention"}),sender:"Terminated"};case Ie.QUESTION:return{...t,iconComponent:e(He,{className:"size-4 text-muted"}),sender:"User"};case Ie.THOUGHT:return{...t,iconComponent:a?e(Nn,{size:"sm",color:"blue"}):e(Be,{className:"size-4 text-muted"}),sender:"Agent"};case Ie.ERROR:return{...t,iconComponent:e(Me,{className:"size-4 text-muted"}),sender:"System"};case Ie.UPDATE:return{...t,containerClass:"bg-white border-l-4 border-success shadow-sm",iconComponent:e(Ge,{className:"size-4 text-success"}),sender:"Update"};case Ie.PLAN:return{...t,iconComponent:e(Je,{className:"size-4 text-muted"}),sender:"Agent"};default:return{...t,sender:"Agent"}}})(),v=()=>{let e="";if(r.message&&(e="object"==typeof r.message?JSON.stringify(r.message,null,2):r.message.trim?r.message.trim():String(r.message)),"string"==typeof e&&e.includes("%thinking_message%")){const t=Math.floor(Math.random()*Pn.length);e=e.replace(/%thinking_message%/g,Pn[t])}return e},x=r=>"object"==typeof r?e("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto bg-gray-100 dark:bg-gray-800 p-2 rounded text-gray-700 ",children:JSON.stringify(r,null,2)}):e("div",{className:"vprose prose-sm",children:e(Dt,{remarkPlugins:[Ot],components:{a:({node:t,ref:n,...r})=>{const a=r.href||"";return a.includes("/store/objects")?e(zt,{href:a,topLevelNav:!0,children:r.children}):e("a",{...r,target:"_blank",rel:"noopener noreferrer"})},img:({node:t,ref:n,...r})=>e("img",{...r,className:"max-w-full h-auto rounded-lg shadow-md my-3 cursor-pointer hover:shadow-lg transition-shadow",loading:"lazy",onClick:()=>r.src&&window.open(r.src,"_blank")}),code:({node:r,ref:a,className:s,children:i,...l})=>{const o=/language-(\w+)/.exec(s||""),c=!o,d=o?o[1]:"";return t(n,{children:[!c&&d&&e("div",{className:"code-language-indicator",children:d}),e("code",{...l,children:i})]})},p:({node:t,ref:n,...r})=>e("p",{...r}),strong:({node:t,ref:n,...r})=>e("strong",{...r}),em:({node:t,ref:n,...r})=>e("em",{...r}),pre:({node:t,ref:n,...r})=>e("pre",{...r}),h1:({node:t,ref:n,...r})=>e("h1",{...r}),h2:({node:t,ref:n,...r})=>e("h2",{...r}),h3:({node:t,ref:n,...r})=>e("h3",{...r}),li:({node:t,ref:n,...r})=>e("li",{...r}),ul:({node:t,ref:n,...r})=>e("ul",{...r}),ol:({node:t,ref:n,...r})=>e("ol",{...r}),blockquote:({node:t,ref:n,...r})=>e("blockquote",{...r}),hr:({node:t,ref:n,...r})=>e("hr",{...r}),table:({node:t,ref:n,...r})=>e("div",{className:"overflow-x-auto",children:e("table",{...r})}),th:({node:t,ref:n,...r})=>e("th",{...r}),td:({node:t,ref:n,...r})=>e("td",{...r})},children:r})}),w=v();c((()=>{(async()=>{if(w){m(!0);try{const e=await(async e=>{if("string"!=typeof e)return e;let t=e;t=t.replace(/\[([^\]]+)\]\((store|collection):([a-f\d]{24})\)/gi,((e,t,n,r)=>`[${t}](/store/${"store"===n?"objects":"collections"}/${r})`));const n=Array.from(t.matchAll(/!\[([^\]]*)\]\(image:([^)]+)\)/g)),r=await Promise.all(n.map((async e=>{const[t,n,r]=e;try{return{fullMatch:t,replacement:`![${n}](${(await h.files.getDownloadUrl(r)).url})`}}catch(e){return console.error(`Failed to get download URL for image: ${r}`,e),{fullMatch:t,replacement:t}}})));for(const{fullMatch:e,replacement:n}of r)t=t.replace(e,n);return t})((e=>{if("string"!=typeof e)return e;if(r.type===Ie.THOUGHT||"string"==typeof r.message&&(r.message.toLowerCase().includes("thinking about")||r.message.toLowerCase().includes("i'm thinking")||r.message.toLowerCase().includes("💭"))){let t=e;return/\d+\.\s+.+/.test(t)&&(t=t.replace(/(\d+\.\s+.+?)(?=\s+\d+\.\s+|$)/g,"$1\n\n"),t=t.replace(/(\d+\.\s+.+\n)([^\d\n][^:])/g,"$1 $2")),t.includes(":")&&!t.includes("\n\n")&&(t=t.replace(/\b(First|Next|Then|Finally|Lastly|Additionally|Step \d+):\s+/gi,"\n\n$&")),t.includes(" - ")&&(t=t.replace(/\s+-\s+/g,"\n- ")),t}return/\d+\.\s+.+/.test(e)&&!e.includes("\n\n")?e.replace(/(\d+\.\s+.+?)(?=\s+\d+\.\s+|$)/g,"$1\n\n"):e})(w));d(e)}catch(e){console.error("Error processing message content:",e),d(w)}finally{m(!1)}}})()}),[w,h]);const N=In(r),k=(()=>{switch(r.type){case Ie.ANSWER:return"border-l-info bg-info";case Ie.COMPLETE:return"border-l-success bg-success";case Ie.IDLE:return"border-l-muted bg-muted";case Ie.REQUEST_INPUT:return"border-l-attention bg-attention";case Ie.QUESTION:return"border-l-muted bg-muted";case Ie.THOUGHT:return"border-l-accent dark:border-l-purple-500 bg-purple-50/50 dark:bg-purple-900/10";case Ie.ERROR:return"border-l-destructive bg-destructive";case Ie.UPDATE:return"border-l-success bg-success";case Ie.PLAN:return"border-l-attention bg-attention";case Ie.TERMINATED:return"border-l-muted bg-muted";default:return"border-l-indigo-500 dark:border-l-indigo-400 bg-indigo-50/50 dark:bg-indigo-900/10"}})();return t("div",{className:`border-l-4 shadow-md overflow-hidden bg-white dark:bg-gray-900 mb-5 ${k}`,"data-workstream-id":N,children:[t("div",{className:"flex items-center justify-between px-4 py-2 border-b border-gray-100/80 dark:border-gray-800/80 bg-white/50 dark:bg-gray-900/50 backdrop-blur-sm",children:[t("div",{className:"flex items-center gap-2",children:[e("div",{className:a?"animate-fadeIn":"",children:(()=>{const t=(()=>{switch(r.type){case Ie.ANSWER:return"text-info";case Ie.COMPLETE:return"text-success";case Ie.IDLE:return"text-muted";case Ie.REQUEST_INPUT:return"text-attention";case Ie.QUESTION:return"text-muted";case Ie.THOUGHT:return"text-purple-600 dark:text-purple-400";case Ie.ERROR:return"text-destructive";case Ie.UPDATE:return"text-success";case Ie.PLAN:return"text-attention";default:return"text-muted"}})(),n=t=>("number"==typeof r.timestamp?r.timestamp:new Date(r.timestamp).getTime())%2==0?e(Nn,{size:"sm",color:t}):e(wn,{color:t});switch(r.type){case Ie.ANSWER:return a?n("blue"):e(Be,{className:`size-4 ${t}`});case Ie.COMPLETE:case Ie.TERMINATED:return e(qe,{className:`size-4 ${t}`});case Ie.IDLE:return e(Ve,{className:`size-4 ${t}`});case Ie.REQUEST_INPUT:case Ie.QUESTION:return e(He,{className:`size-4 ${t}`});case Ie.THOUGHT:return a?n("purple"):e(Be,{className:`size-4 ${t}`});case Ie.ERROR:return e(Me,{className:`size-4 ${t}`});case Ie.UPDATE:return a?n("green"):e(Ge,{className:`size-4 ${t}`});case Ie.PLAN:return a?n("amber"):e(Je,{className:`size-4 ${t}`});default:return a?n("blue"):e(Be,{className:`size-4 ${t}`})}})()}),e("span",{className:"text-xs font-medium text-muted ",children:g.sender}),"main"!==N&&"all"!==N&&e(y,{variant:"default",className:"text-xs text-muted",children:N})]}),t("div",{className:"flex items-center gap-2",children:[e("span",{className:"text-xs text-muted",children:Ut(r.timestamp).format("HH:mm:ss")}),e(b,{variant:"ghost",size:"xs",onClick:()=>{const e=v()||"",t="string"==typeof r.details?r.details:r.details?JSON.stringify(r.details,null,2):"",n=[e,t?"\n\nDetails:\n"+t:""].join("").trim();navigator.clipboard.writeText(n).then((()=>{p({status:"success",title:"Copied to clipboard",duration:2e3})}))},className:"text-muted",title:"Copy message",children:e(We,{className:"size-3"})})]})]}),t("div",{className:"px-4 py-3 bg-white dark:bg-gray-900",children:[w&&e("div",{className:"message-content",children:u?t("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[e(wn,{color:"blue"}),e("span",{children:"Loading images..."})]}):x(l||w)}),r.details&&t("div",{className:"mt-2",children:[t("button",{onClick:()=>i(!s),className:"text-xs text-muted flex items-center",children:[s?"Hide":"Show"," details",e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 ml-1 transition-transform "+(s?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&e("div",{className:"mt-2 p-2 bg-muted border border-mixer-muted/40 rounded text-sm",children:"string"==typeof r.details?x(r.details):e("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto bg-muted p-2 rounded text-muted ",children:JSON.stringify(r.details,null,2)})})]})]})]})}function An({workstreams:n,activeWorkstream:r,onSelectWorkstream:a,count:s,completionStatus:i}){const l=new Map;l.set("all","All Messages"),l.set("main","Main"),n.forEach(((e,t)=>{"all"!==t&&"main"!==t&&"research_france"!==t&&"statistics"!==t&&l.set(t,e)})),n=l;const o=Array.from(n.entries()).sort((([e],[t])=>"all"===e?-1:"all"===t?1:"main"===e?-1:"main"===t?1:e.localeCompare(t))),c=o.length>2;return e("div",c?{className:"flex overflow-x-auto space-x-1 pb-2 mb-2 border-b-2 border-blue-200 dark:border-blue-900 sticky top-0 bg-white dark:bg-gray-900 z-10 pt-1",children:o.map((([n,l])=>t("button",{className:"px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors flex items-center gap-1.5\n "+(r===n?"bg-blue-200 text-blue-800 dark:bg-blue-800 dark:text-blue-200 border-b-2 border-blue-500":"text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-800/30 border-b-2 border-transparent"),onClick:()=>a(n),title:l.length>20?l:void 0,children:[l.length>20?l.substring(0,18)+"...":l,s&&s.has(n)&&s.get(n)>0&&t("div",{className:"flex items-center space-x-1",children:[e("span",{className:"inline-flex items-center justify-center w-4 h-4 text-xs\n "+(r===n?"bg-blue-200 text-blue-800 dark:bg-blue-800 dark:text-blue-200":"bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-300"),children:s.get(n)}),i&&"all"!==n&&(i.get(n)?e(qe,{className:"h-3 w-3 text-green-500"}):e(Ve,{className:"h-3 w-3 text-amber-500"}))]})]},n)))}:{className:"py-1"})}function En(e,t){return"all"===t?[...e]:"main"===t?e.filter((e=>"main"===In(e))):e.filter((e=>In(e)===t))}function zn({messages:r,bottomRef:a,viewMode:s="stacked",isCompleted:d=!1,plan:u={plan:[]},workstreamStatus:m=new Map,showPlanPanel:h=!1,onTogglePlanPanel:p=()=>{},plans:g=[],activePlanIndex:f=0,onChangePlan:y=()=>{}}){const b=i.useRef(null),[v,x]=o("all");c((()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})}),[r,a]);const w=i.useMemo((()=>[...r].sort(((e,t)=>("number"==typeof e.timestamp?e.timestamp:new Date(e.timestamp).getTime())-("number"==typeof t.timestamp?t.timestamp:new Date(t.timestamp).getTime())))),[r]),N=i.useMemo((()=>{const e=function(e){const t=new Map;return t.set("all","All Messages"),t.set("main","Main"),e.forEach((e=>{e.workstream_id&&"main"!==e.workstream_id&&"all"!==e.workstream_id&&!t.has(e.workstream_id)&&(t.set(e.workstream_id,e.workstream_id),console.log(`Found workstream: ${e.workstream_id}`))})),t.size<=2&&!t.has("main")&&t.set("main","Main"),console.log("Final workstreams map:",t),t}(w);return e}),[w]),k=i.useMemo((()=>{const e=new Map;e.set("all",w.length);const t=En(w,"main");return e.set("main",t.length),w.forEach((t=>{const n=In(t);"main"!==n&&e.set(n,(e.get(n)||0)+1)})),e}),[w]),C=i.useMemo((()=>"all"===v?w:En(w,v)),[w,v]),j=l((()=>{const e=new Map,t=new Map;w.forEach((e=>{const n=In(e);t.has(n)||t.set(n,[]),t.get(n).push(e)}));for(const[n,r]of t.entries())if(r.length>0){const t=r[r.length-1];e.set(n,[Ie.COMPLETE,Ie.IDLE,Ie.REQUEST_INPUT,Ie.TERMINATED].includes(t.type))}return e}),[w]);return t("div",{ref:b,className:"flex-1 min-h-0 h-full overflow-y-auto py-2 px-4 sm:px-6 lg:px-8 flex flex-col relative","data-testid":"all-messages-mixed",style:h?{paddingRight:"350px"}:{},children:[e(_n,{plan:u,workstreamStatus:m,isOpen:h,onClose:p,plans:g,activePlanIndex:f,onChangePlan:y}),e("div",{className:"sticky top-0 bg-white dark:bg-gray-900 z-10",children:e(An,{workstreams:N,activeWorkstream:v,onSelectWorkstream:x,count:k,completionStatus:j})}),0===C.length?e("div",{className:"flex items-center justify-center h-full text-center py-8",children:e("div",{className:"flex items-center px-4 py-3 text-gray-500 dark:text-gray-400",children:"all"===v?"Waiting for agent response...":"No messages in this workstream yet..."})}):t("div",{className:"flex-1 flex flex-col justify-start pb-4 space-y-2",children:["stacked"===s?C.map(((t,n)=>{const r=!d&&n===C.length-1&&!Tn.includes(t.type);return e($n,{message:t,showPulsatingCircle:r},`${t.timestamp}-${n}`)})):e(n,{children:(()=>{const t=C.filter((e=>e.type===Ie.ANSWER||e.type===Ie.QUESTION||e.type===Ie.COMPLETE||e.type===Ie.TERMINATED)),n=d?null:C.filter((e=>e.type===Ie.THOUGHT||e.type===Ie.UPDATE||e.type===Ie.PLAN)).sort(((e,t)=>{const n="number"==typeof e.timestamp?e.timestamp:new Date(e.timestamp).getTime();return("number"==typeof t.timestamp?t.timestamp:new Date(t.timestamp).getTime())-n}))[0],r=[...t];return n&&r.push(n),r.sort(((e,t)=>("number"==typeof e.timestamp?e.timestamp:new Date(e.timestamp).getTime())-("number"==typeof t.timestamp?t.timestamp:new Date(t.timestamp).getTime()))),r.map(((t,n)=>{const a=!d&&n===r.length-1&&!Tn.includes(t.type);return e($n,{message:t,showPulsatingCircle:a},`${t.timestamp}-${n}`)}))})()}),e("div",{ref:a,className:"h-4"})]})]})}class Ln{vertesia;updateState;_interactive=!0;_debug_mode=!1;_collection;_start=!1;_preserveRunValues=!1;payload;_interactionParamsSchema;_inputValidator;constructor(e,t){this.vertesia=e,this.updateState=t,this.payload={config:{model:""},tool_names:[]}}onStateChanged(){const e=this.clone();this.updateState(e)}clone(){const e=new Ln(this.vertesia,this.updateState);return e._interactionParamsSchema=this._interactionParamsSchema,e.payload=this.payload,e._interactive=this._interactive,e._debug_mode=this._debug_mode,e._inputValidator=this._inputValidator,e._start=this._start,e._collection=this._collection,e._preserveRunValues=this._preserveRunValues,e}get interactive(){return this._interactive}set interactive(e){e!==this._interactive&&(this._interactive=e,this.onStateChanged())}get debug_mode(){return this._debug_mode}set debug_mode(e){e!==this._debug_mode&&(this._debug_mode=e,this.onStateChanged())}get collection(){return this._collection}set collection(e){e!==this._collection&&(this._collection=e,this.onStateChanged())}get search_scope(){return this._collection?"collection":void 0}get interaction(){return this.payload.interaction}set interaction(e){e?.id!==this.payload.interaction?.id&&(this.payload.interaction=e,this._interactionParamsSchema=$e(this.interaction),this._inputValidator=void 0,e&&!this._preserveRunValues&&(e.environment&&("string"==typeof e.environment?this.vertesia.environments.retrieve(e.environment).then((e=>this.environment=e)):this.payload.config.environment=e.environment),e.model?this.payload.config.model=e.model:this.payload.config.model=this.environment?.default_model&&Ae(this.environment.default_model,this.environment.provider)?this.environment.default_model:void 0),this.onStateChanged())}get environment(){return this.payload.config.environment}set environment(e){if(e?.id!==this.payload.config.environment?.id){if(this.payload.config.environment=e,!this._preserveRunValues){const t=this.payload.interaction?.model;t&&e&&Ae(t,e.provider)?this.payload.config.model=t:this.payload.config.model=e?.default_model&&Ae(e.default_model,e.provider)?e.default_model:void 0}this.onStateChanged()}}get model(){return this.payload.config.model}set model(e){e!==this.payload.config.model&&(this.payload.config.model=e,this.onStateChanged())}get tool_names(){return this.payload.tool_names}set tool_names(e){this.payload.tool_names=e,this.onStateChanged()}get data(){return this.payload.data}set data(e){this.payload.data=e,this.onStateChanged()}get config(){return this.payload.config}set run(e){console.log("run",e),this.onStateChanged()}set start(e){this._start!==e&&(this._start=e,this.onStateChanged())}get start(){return this._start}get preserveRunValues(){return this._preserveRunValues}set preserveRunValues(e){this._preserveRunValues=e}get interactionParamsSchema(){return this._interactionParamsSchema}set interactionParamsSchema(e){this._interactionParamsSchema!==e&&(this._interactionParamsSchema=e,this.onStateChanged())}reset(){if(this._start=!1,this._interactive=!0,this._debug_mode=!1,this._collection=void 0,this._preserveRunValues=!1,this.payload={config:{environment:void 0,model:""},tool_names:[],interaction:void 0,data:void 0},this._interactionParamsSchema=null,this._inputValidator=void 0,this.model=void 0,this.environment=void 0,this.onStateChanged(),location.hash){const e=window.location.origin+window.location.pathname+window.location.search;history.replaceState(null,"",e),location.hash=""}}validateInput(){if(!this._interactionParamsSchema)return{isValid:!0};if(!this._inputValidator||this._inputValidator.schema!==this._interactionParamsSchema){const e=new Ft({strict:!1});this._inputValidator={validate:e.compile(this._interactionParamsSchema),schema:this._interactionParamsSchema}}const e=this.payload.data||{};if(!this._inputValidator.validate(e)){return{isValid:!1,errorMessage:this._inputValidator.validate.errors?this._inputValidator.validate.errors.map((e=>`${e.instancePath}: ${e.message}`)).join(", "):"Invalid payload data"}}return{isValid:!0}}}const Un=d(void 0);function Dn({children:t}){const{client:n}=Oe(),[r,a]=o();return c((()=>{a(new Ln(n,a))}),[]),r&&e(Un.Provider,{value:r,children:t})}function On(){const e=u(Un);if(!e)throw new Error("usePayloadBuilder must be used within a PayloadProvider");return e}function Fn({title:n,onClose:r,isModal:a,run:s,viewMode:i,onViewModeChange:l,showPlanPanel:o,hasPlan:c=!1,onTogglePlanPanel:d,onDownload:u,onCopyRunId:m,resetWorkflow:h}){return e(Dn,{children:t("div",{className:"flex items-center justify-between py-1.5 px-2 border-b shadow-sm flex-shrink-0",children:[t("div",{className:"flex flex-wrap items-center space-x-2",children:[t("div",{className:"flex items-center space-x-1",children:[e(Be,{className:"size-5 text-muted"}),e("span",{className:"font-medium",children:n})]}),t("span",{className:"text-xs text-muted ml-1",children:["(Run ID: ",s.runId.substring(0,8),"...)"]})]}),t("div",{className:"flex items-center space-x-2",children:[t("div",{className:"flex items-center space-x-1 bg-muted rounded p-0.5",children:[e(b,{variant:"stacked"===i?"outline":"ghost",size:"xs",className:"rounded-l-md",onClick:()=>l("stacked"),children:"Details"}),e(b,{variant:"sliding"===i?"outline":"ghost",size:"xs",className:"rounded-l-md",onClick:()=>l("sliding"),children:"Most Important"})]}),t("div",{className:"relative",children:[c&&!o&&e("span",{className:"absolute -top-1 -right-1 w-2.5 h-2.5 bg-primary rounded-full border border-border z-10"}),t(b,{size:"sm",variant:o?"primary":"secondary",onClick:d,className:"transition-all duration-200 rounded-md",title:"Toggle plan panel",children:[e(Ke,{className:"size-4 mr-1.5"}),e("span",{className:"font-medium text-xs",children:o?"Hide Plan":"Show Plan"})]})]}),e(Rn,{run:s,isModal:a,onClose:r,onDownload:u,onCopyRunId:m,resetWorkflow:h}),r&&!a&&e(b,{size:"xs",variant:"ghost",onClick:r,children:e(Ye,{className:"size-4"})})]})]})})}function Rn({run:n,isModal:r,onClose:a,onDownload:s,onCopyRunId:i,resetWorkflow:l}){const o=f(),{client:c}=Oe(),d=On();return t(v,{hover:!0,children:[e(x,{children:e(b,{size:"xs",variant:"ghost",title:"More actions",children:e(Qe,{className:"size-4"})})}),e(w,{className:"w-48",align:"end",children:e("div",{className:"rounded-md shadow-lg z-50",children:e("div",{className:"py-1 min-w-36",children:e(N,{children:e(k,{children:t(C,{children:[e("div",{className:"flex items-center px-3 py-1.5 text-xs text-gray-700 dark:text-gray-300",children:e("span",{className:"text-muted",children:"Actions"})}),r&&t(j,{className:"text-xs",onSelect:()=>{return e=`/store/agent-runner?agentId=${n.runId}__${n.workflowId}`,window.open(e,"_blank"),e;var e},children:[e(Xe,{className:"size-3.5 mr-2 text-muted"})," Open in new tab"]}),t(j,{className:"text-xs",onSelect:()=>{i?i():(navigator.clipboard.writeText(n.runId),o({status:"success",title:"Run ID copied",duration:2e3}))},children:[e(We,{className:"size-3.5 mr-2 text-muted"})," Copy Run ID"]}),t(j,{className:"text-xs",onSelect:()=>{s?s():async function(e,t){return e.files.getDownloadUrl(`agents/${t}/conversation.json`).then((e=>e.url))}(c,n.runId).then((e=>window.open(e,"_blank")))},children:[e(Ze,{className:"size-3.5 mr-2 text-muted"})," Download Conversation"]}),a&&r&&t(j,{className:"text-xs",onSelect:a,children:[e(Ye,{className:"size-3.5 mr-2 text-muted"})," Close"]}),t(j,{className:"text-xs text-destructive",onSelect:()=>{(async e=>{try{return await c.store.workflows.terminate(e.workflowId,e.runId,"cancel"),o({status:"success",title:"Workflow cancelled",duration:2e3}),d.reset(),l?.(),!0}catch(e){return o({status:"error",title:"Failed to cancel workflow",duration:2e3}),!1}})(n)},children:[e(Ye,{className:"size-3.5 mr-2 text-destructive"})," Cancel Workflow"]})]})})})})})})]})}const Mn="vertesia.content_store.lastDisplayedView";function Vn({onUpdate:t}){const[n,r]=o("grid"===localStorage.getItem(Mn)),a=()=>{localStorage.setItem(Mn,"grid"),r(!0),t(!0)},s=()=>{localStorage.setItem(Mn,"table"),r(!1),t(!1)};return e(b,{variant:"outline",onClick:()=>{n?s():a()},alt:n?"Table View":"Thumbnail View",children:e(n?et:tt,{})})}Vn.LAST_DISPLAYED_VIEW=Mn;class qn extends E{labelOf(e){return e.label}idOf(e){return e.id}renderOption(n){return t("div",{children:[e("div",{className:"font-medium",children:n.label}),e("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:n.description})]})}}function Wn({isOpen:n,onClose:r,onConfirm:a,isLoading:s,uploadedFileName:i}){const l=[{id:"update",label:"Update current version",description:i?"Replace the content file and modify properties directly in the current revision.":"Modify the properties directly in the current revision."},{id:"new-version",label:"Create new version",description:i?"Create a new revision with the replacement file while preserving the original.":"Create a new revision with these property changes while preserving the original."}],[c,d]=o(l[0]),[u,m]=o(""),h=new qn,p="new-version"===c?.id;return t(S,{isOpen:n,onClose:r,className:"sm:max-w-md",children:[e(_,{children:"Save Changes"}),e(P,{children:t("div",{className:"space-y-4",children:[i&&e("div",{className:"mb-4 p-3 bg-blue-50 dark:bg-blue-900/20 rounded-md",children:t("p",{className:"text-sm text-blue-700 dark:text-blue-300 font-medium",children:["You're about to replace the content file with: ",e("span",{className:"font-bold",children:i})]})}),e("p",{className:"text-sm text-mixer-muted/5",children:"How would you like to save these changes?"}),e(T,{adapter:h,options:l,value:c,onChange:e=>{d(e)},gap:"gap-4"}),p&&e(I,{label:"Version Label (Optional)",description:"Optional label for the new version.",className:"mt-3 pl-8",children:e($,{value:u,onChange:m,placeholder:"e.g., v1.2, approved, post-review",className:"w-full"})})]})}),t(A,{children:[e(b,{variant:"secondary",onClick:r,disabled:s,children:"Cancel"}),e(b,{variant:"primary",onClick:async()=>{await a(p,p?u:void 0)},isLoading:s,children:"Save"})]})]})}function Bn({isOpen:r,onClose:a,object:s,refetch:i}){const{client:l,store:d}=Oe(),u=f(),h=Lt(),[p,g]=o(!1),[y,v]=o(""),[x,w]=o(!1),[N,k]=o(null),C=m(null),j=m(null),[T,I]=o(null),[$,E]=o(null);function z(e,t){e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:[{uri:"http://myserver/object-schema.json",fileMatch:["*"],schema:t}]})}return c((()=>{r&&(v(JSON.stringify(s.properties||{},null,2)),s.type?.id&&async function(e){try{const t=await d.types.retrieve(e);t.object_schema&&(I(t.object_schema),j.current&&z(j.current,t.object_schema))}catch(e){console.error("Failed to fetch JSON schema:",e)}}(s.type.id))}),[r,s]),t(n,{children:[t(S,{isOpen:r,onClose:a,className:"sm:max-w-[90%] md:max-w-[80%] lg:max-w-[75%] xl:max-w-[70%]",children:[e(_,{children:"Edit Properties"}),t(P,{children:[t("div",{className:"mb-2 text-sm text-gray-500",children:[s.type?.name?t("span",{children:["Editing properties for object type: ",e("strong",{children:s.type.name})]}):e("span",{children:"Editing properties for generic document"}),T&&e("span",{className:"ml-2 text-green-600",children:"(JSON schema validation enabled)"})]}),e("div",{className:"h-[75vh] border border-gray-300 dark:border-gray-700 rounded-md",children:e(Zt,{height:"100%",language:"json",value:y,onChange:e=>v(e||""),onMount:function(e,t){C.current=e,j.current=t,T&&z(t,T)},options:{minimap:{enabled:!1},scrollBeyondLastLine:!1,formatOnPaste:!0,formatOnType:!0,automaticLayout:!0,wordWrap:"on"}})})]}),t(A,{children:[e(b,{variant:"secondary",onClick:a,children:"Cancel"}),e(b,{variant:"primary",onClick:function(){if(!C.current)return;const e=C.current.getValue();try{const t=JSON.parse(e);k(t),w(!0)}catch(e){u({status:"error",title:"Invalid JSON",description:"Please fix the JSON syntax errors before saving.",duration:5e3})}},children:"Save Changes"})]})]}),e(Wn,{isOpen:x,onClose:function(){w(!1)},onConfirm:async function(e,t){try{g(!0);const n=N||JSON.parse(y);if(e){const e=await l.objects.update(s.id,{properties:n},{createRevision:!0,revisionLabel:t});e.id!==s.id&&E(e.id),u({status:"success",title:"New version created",description:"A new version with updated properties has been created.",duration:2e3}),w(!1),a(),e.id!==s.id&&setTimeout((()=>{h(`/objects/${e.id}`),u({status:"info",title:"Viewing New Version",description:t?`Now viewing version '${t}'`:"Now viewing the new version",duration:3e3})}),100)}else await d.objects.update(s.id,{properties:n}),u({status:"success",title:"Properties updated",description:"The object properties have been updated successfully.",duration:2e3}),i&&await i(),w(!1),a()}catch(e){u({status:"error",title:"Error updating properties",description:e.message||"An error occurred while updating the properties.",duration:5e3}),g(!1)}},isLoading:p})]})}function Jn({object:r,loadText:a,refetch:s}){const i=f(),l=async(e,t)=>{try{await navigator.clipboard.writeText(e),i({status:"success",title:("text"===t?"Content":"Properties")+" copied",description:`Successfully copied ${t} to clipboard`,duration:2e3})}catch(e){console.error(`Failed to copy ${t}:`,e),i({status:"error",title:"Copy failed",description:`Failed to copy ${t} to clipboard`,duration:5e3})}};return e(n,{children:t(z,{direction:"horizontal",className:"h-[calc(100vh-200px)]",children:[e(L,{className:"min-w-[100px]",children:e(Gn,{object:r,refetch:s??(()=>Promise.resolve()),handleCopyContent:l})}),e(U,{withHandle:!0}),e(L,{className:"min-w-[100px]",children:e(Hn,{object:r,loadText:a??!1,handleCopyContent:l})})]})})}function Gn({object:r,refetch:a,handleCopyContent:s}){const[i,l]=o(!1),[c,d]=o(!1);return t(n,{children:[t("div",{className:"flex justify-between items-center px-2",children:[t("div",{className:"flex items-center gap-1 bg-muted mb-2 p-1 rounded",children:[e(b,{variant:""+(i?"ghost":"primary"),size:"sm",alt:"Preview properties",onClick:()=>l(!i),children:"Properties"}),e(b,{variant:""+(i?"primary":"ghost"),size:"sm",alt:"View in JSON format",onClick:()=>l(!i),children:"JSON"})]}),t("div",{className:"flex items-center gap-2",children:[r.properties&&e(b,{variant:"ghost",size:"sm",title:"Copy properties",onClick:()=>s(JSON.stringify(r.properties,null,2),"properties"),children:e(nt,{className:"size-4"})}),e(b,{variant:"ghost",size:"sm",onClick:()=>{d(!0)},title:"Edit properties",className:"flex items-center gap-2",children:e(rt,{className:"size-4"})})]})]}),r.properties?e("div",{className:"h-[calc(100vh-220px)] overflow-auto px-2",children:e(Mt,{value:r.properties,viewCode:i})}):e("div",{className:"h-[calc(100vh-220px)] overflow-auto px-2",children:e("div",{children:"No properties defined"})}),e(Bn,{isOpen:c,onClose:()=>{d(!1)},object:r,refetch:a})]})}function Hn({object:r,loadText:a,handleCopyContent:s}){const{store:i}=Oe(),l=r.content,d=l&&l.type&&l.type.startsWith("image/"),[u,m]=o(d),[h,p]=o(r.text),[g,f]=o(!1);return c((()=>{a&&!h&&(f(!0),i.objects.getObjectText(r.id).then((e=>{p(e.text)})).catch((e=>{console.error("Failed to load text",e)})).finally((()=>{f(!1)})))}),[a]),t(n,{children:[t("div",{className:"flex justify-between items-center px-2",children:[t("div",{className:"flex items-center gap-1 bg-muted mb-2 p-1 rounded",children:[d&&e(b,{variant:""+(u?"primary":"ghost"),size:"sm",alt:"View Image",onClick:()=>m(!0),children:"Image"}),e(b,{variant:""+(u?"ghost":"primary"),size:"sm",alt:"View Text",onClick:()=>m(!1),children:"Text"})]}),!u&&e(Kn,{object:r,text:h,handleCopyContent:s})]}),u?e(Qn,{object:r}):g?e("div",{className:"flex justify-center items-center h-[calc(100vh-260px)]",children:e(D,{size:"lg"})}):e(Yn,{object:r,text:h})]})}function Kn({object:r,text:a,handleCopyContent:s}){const{client:i}=Oe(),l=f(),o=r.content,c=o&&o.type&&("text/markdown"===o.type||"text/plain"===o.type),d=a&&(a.includes("\n#")||a.includes("\n*")||a.includes("\n+")||a.includes("![")),u=async e=>{try{const t=await i.objects.getRendition(r.id,{format:e,generate_if_missing:!0,sign_url:!0});if("generating"===t.status)return l({status:"info",title:"Generating document",description:`Please wait while we prepare your ${e.toUpperCase()} file...`,duration:5e3}),void setTimeout((()=>u(e)),3e3);if("failed"===t.status)throw new Error("Document generation failed");if(t.renditions&&t.renditions.length>0){const n=t.renditions[0];if("pdf"===e)window.open(n,"_blank"),l({status:"success",title:"PDF opened",description:"PDF document opened in a new window",duration:2e3});else{const t=document.createElement("a");t.href=n,t.download=`${r.name||"document"}.${e}`,document.body.appendChild(t),t.click(),document.body.removeChild(t),l({status:"success",title:"Document exported",description:`Successfully exported to ${e.toUpperCase()} format`,duration:2e3})}}}catch(t){console.error(`Failed to export document as ${e}:`,t),l({status:"error",title:"Export failed",description:`Failed to export document to ${e.toUpperCase()} format`,duration:5e3})}};return e("div",{className:"h-[41px] text-lg font-semibold flex justify-between items-center px-2",children:t("div",{className:"flex items-center gap-2",children:[a&&e(b,{variant:"ghost",size:"sm",title:"Copy text",className:"flex items-center gap-2",onClick:()=>s(a,"text"),children:e(nt,{className:"size-4"})}),(c||d)&&a&&t(n,{children:[t(b,{variant:"ghost",size:"sm",onClick:()=>u("docx"),className:"flex items-center gap-2",children:[e(at,{className:"size-4"}),"DOCX"]}),t(b,{variant:"ghost",size:"sm",onClick:()=>u("pdf"),className:"flex items-center gap-2",children:[e(at,{className:"size-4"}),"PDF"]})]})]})})}function Yn({object:t,text:r}){f();const{client:a}=Oe(),s=r&&(r.includes("\n#")||r.includes("\n*")||r.includes("\n+")||r.includes("!["));return r?e(n,{children:e("div",{className:"max-w-7xl px-2 h-[calc(100vh-210px)] overflow-auto",children:s?e("div",{className:"vprose prose-sm p-1",children:e(Vt,{components:{a:({node:t,...n})=>{const r=n.href||"";return r.includes("/store/objects/")?e(zt,{topLevelNav:!0,href:r,className:"text-info",children:n.children}):e("a",{...n,"data-debug":"test",target:"_blank",rel:"noopener noreferrer"})},p:({node:t,...n})=>e("p",{...n,className:"my-0"}),pre:({node:t,...n})=>e("pre",{...n,className:"my-2 p-2 rounded"}),code:({node:t,className:n,children:r,...a})=>{const s=/language-(\w+)/.exec(n||"");return e("code",{...a,className:!s?"px-1.5 py-0.5 rounded":"text-muted",children:r})},h1:({node:t,...n})=>e("h1",{...n,className:"font-bold text-2xl my-2"}),h2:({node:t,...n})=>e("h2",{...n,className:"font-bold text-xl my-2"}),h3:({node:t,...n})=>e("h3",{...n,className:"font-bold text-lg my-2"}),li:({node:t,...n})=>e("li",{...n})},children:r})}):e("pre",{className:"text-wrap bg-muted text-muted p-2",children:r})})}):e("div",{className:"px-2",children:e("div",{children:"No content"})})}function Qn({object:t}){const{client:n}=Oe(),[r,a]=o(),s=t.content,i=s&&s.type&&s.type.startsWith("image/");return c((()=>{if(i){(async()=>{const e=s?.type&&["image/jpeg","image/jpg","image/png","image/gif","image/webp","image/svg+xml"].includes(s.type);try{const r=await n.objects.getRendition(t.id,{format:Ee.jpeg,generate_if_missing:!1,sign_url:!0});if("found"===r.status&&r.renditions?.length)a(r.renditions[0]);else if(e){const e=await n.files.getDownloadUrl(t.content.source);a(e.url)}}catch(r){if(e){const e=await n.files.getDownloadUrl(t.content.source);a(e.url)}}})()}}),[]),e("div",{className:"mb-4 px-2",children:r?e("img",{src:r,alt:t.name,className:"w-full object-contain"}):e(D,{size:"md"})})}function Xn(e,t=7){return e?"~"+e.slice(-t):""}function Zn(e,t){return e.length>t?e.substring(0,t)+"...":e}const er="text/csv",tr="image/",nr="application/pdf",rr="video/",ar=e=>e===er||er.includes(e),sr=e=>e.startsWith(tr)||tr.includes(e),ir=e=>e===nr||nr.includes(e),lr=e=>e.startsWith(rr)||rr.includes(e),or=import.meta.env,cr={max_hw:or?.VITE_RENDITION_HW||256,format:Ee.jpeg,generate_if_missing:!0},dr="vertesia.content_store.renditionId";async function ur(e,t,n,r,a){if(!t?.content?.type||!(sr(t.content.type)||lr(t.content.type)||ir(t.content.type)))return void a("No preview available");a("Preparing preview...");const s=(new Date).getTime()/1e3,i=localStorage.getItem(`${dr}_${t.id}_${cr.max_hw}`),l=localStorage.getItem(`${dr}_${t.id}_${cr.max_hw}_time`);if(i?.length&&l&&Math.abs(s-parseInt(l))<=900)return n(i),r(`${t.name} Rendition`),a("ready"),i;a("Preparing preview..."),e.objects.getRendition(t.id,cr).then((s=>{if("generating"===s.status)a("Preparing preview..."),n(""),r(""),setTimeout((()=>ur(e,t,n,r,a)),6e4);else{if("failed"===s.status)return a("No preview available"),n(""),void r("");{if(!s?.renditions?.length)return a("No preview available"),n(""),void r("");const e=s.renditions[0];localStorage.setItem(`${dr}_${t.id}_${cr.max_hw}`,e),localStorage.setItem(`${dr}_${t.id}_${cr.max_hw}_time`,((new Date).getTime()/1e3).toString()),n(e),r(`${t.name} Rendition`),a("ready"),console.log(`Rendition for document ${t.id} retrieved successfully: ${e}`)}}})).catch((e=>{a("No preview available"),console.warn("Failed to retrieve rendition:",e),n(""),r("")}))}function mr({isLoading:n=!1,counts:r=6}){return n?e("div",{className:"flex flex-wrap gap-2 justify-between",children:Array(r).fill(0).map(((n,r)=>e("div",{className:"w-[15vw] animate-pulse",children:t(O,{className:"relative flex flex-col border h-fit",children:[e("div",{className:"h-48 bg-muted rounded-t-xl flex items-center justify-center text-muted",children:" "}),e(F,{className:"bg-muted h-[2px]"}),t(R,{className:"p-2 flex flex-col",children:[t("div",{className:"flex flex-col overflow-hidden",children:[e("div",{className:"h-5 bg-muted rounded w-3/4 mb-2"}),e("div",{className:"h-4 bg-muted rounded w-1/2"})]}),e("div",{className:"text-xs text-muted w-full flex justify-end mt-2",children:e("div",{className:"h-3 bg-muted rounded w-1/4"})})]})]})},r)))}):null}function hr({selection:n,document:r,onSelectionChange:a,onRowClick:s}){const{client:i}=Oe(),[l,d]=o(void 0),[u,m]=o(void 0),[h,p]=o(void 0);return c((()=>{r?.content&&ur(i,r,d,m,p)}),[r]),t(O,{className:"relative flex flex-col border h-fit",onClick:()=>s&&s(r),children:[n&&e("div",{className:"absolute top-2 left-2 z-10 flex flex-col items-center gap-1",children:e("input",{checked:n.isSelected(r.id),type:"checkbox",onChange:e=>{e.stopPropagation(),a(r,e)},onClick:e=>e.stopPropagation()})}),e("div",{className:"absolute top-1 right-1 z-10 flex flex-col items-center",children:e(zt,{topLevelNav:!0,href:`/store/objects/${r.id}`,children:e(b,{variant:"ghost",size:"sm",title:"Open Object",children:e(st,{className:"size-4 "+("ready"===h?"text-muted":"text-white")})})})}),l&&"ready"==h?e("img",{src:l,alt:u,className:"w-auto h-48 object-cover rounded-t-xl"}):e("div",{className:"h-48 bg-gray-700 rounded-t-xl flex items-center justify-center text-muted",children:h}),e(F,{className:"bg-gray-200 h-[2px]"}),t(R,{className:"p-2 flex flex-col",children:[t("div",{className:"flex flex-col overflow-hidden",children:[e(M,{placement:"top",description:r.properties?.title??r.name,children:e("h3",{className:"text-start font-medium leading-none truncate",children:r.properties?.title??r.name})}),r?.type?.name?e(M,{placement:"bottom",size:"xs",description:r?.type?.name,children:e("p",{className:"text-start text-xs text-muted truncate",children:r?.type?.name})}):e("p",{className:"text-xs text-muted",children:" "})]}),r.score&&t("div",{className:"text-xs text-muted w-full flex justify-end",children:["Score: ",r.score.toFixed(4)??"-"]})]})]})}function pr(e){return`${e._id} (${e.count})`}function gr(e){return`${e.name} (${e.count})`}function fr({search:t,buckets:n,name:r,placeholder:a,className:s}){const i=t.getFilterValue(r),l=n?.find((e=>JSON.stringify(e._id)===JSON.stringify(i)));return e(V,{filterBy:"_id",className:s,isClearable:!0,optionLabel:pr,options:n,value:l,onChange:e=>{t.setFilterValue(r,e?._id)},by:"_id",placeholder:a})}function yr({search:t,name:n,placeholder:r,className:a}){const[s,i]=o([]);return c((()=>{t.setFilterValue(n,s)}),[s]),e(q,{className:a,value:s,onChange:i,placeholder:r})}function br(e){return`${e.name} (${e.count})`}function vr({search:t,buckets:n,placeholder:r="Filter by Type",className:a}){const[s,i]=o([]),{typeRegistry:l}=Oe(),d=t.getFilterValue("type");c((()=>{if(l){const e=n.map((e=>{let t;return null==e._id?(e._id="Document",t="Document"):(t=l.getTypeName(e._id),t||(console.warn("Content Object Type not found",e._id),t=e._id)),{...e,name:t}}));e.sort(((e,t)=>e.name.localeCompare(t.name))),i(e)}}),[n,l]);const u=s?.find((e=>e._id===d));return e(V,{filterBy:"name",className:a,isClearable:!0,optionLabel:br,options:s,value:u,onChange:e=>{t.setFilterValue("type",e?._id)},by:"_id",placeholder:r})}function xr({buckets:e,name:t,placeholder:n,type:r,multiple:a}){return function({buckets:e,name:t,placeholder:n,type:r="select",multiple:a=!1}){return{name:t,options:e.map((e=>({label:pr(e),value:e._id}))),type:r,multiple:a,placeholder:`${n??`${t.charAt(0).toUpperCase()+t.slice(1)}`}`,allowCreate:!1}}({buckets:e,name:t,placeholder:n,type:r,multiple:a})}function wr({buckets:n,typeRegistry:r,type:a="select",multiple:s=!1}){const i=new Map;n.forEach((e=>{let t,n=e._id;null==e._id?(n="Document",t="Document"):(t=r.getTypeName(e._id),t||(console.warn("Content Object Type not found",e._id),t=e._id)),i.set(n,{name:t,count:e.count})}));return{name:"types",placeholder:"Types",type:a,multiple:s,options:n.map((e=>{const t=e._id,n=t||"Document",r=i.get(n);return{value:t,label:r?`${r.name} (${r.count})`:`Unknown (${e.count})`}})),labelRenderer:n=>{const r=i.get(n);return r?t("div",{className:"w-full flex items-center",children:[e("span",{className:"text-sm truncate",children:r.name}),t("span",{className:"ml-2 text-xs",children:["(",r.count,")"]})]}):(console.warn(`Type data not found for ${n}`),n)},filterBy:(e,t)=>{const n=i.get(e);return n?n.name.toLowerCase().includes(t.toLowerCase()):(console.warn(`Type name not found for ${e}`),!1)}}}const Nr={},kr={};function Cr(e){const{client:t}=Oe();return W((()=>{let n=Nr[e];return n||(n=t.users.retrieve(e).then((e=>e)),Nr[e]=n),n}),[e])}function jr(e){const{client:t}=Oe();return W((()=>{let n=kr[e];return n||(n=t.iam.groups.retrieve(e).then((e=>e)),kr[e]=n),n}),[e])}function Sr(){return e("div",{className:"size-8"})}function _r({showTitle:n=!1,size:r="md"}){return e(Lr,{title:"System User",description:"The system user is used to initialize built-in objects.",children:t("div",{className:"flex gap-2 items-center",children:[e(B,{src:"/icon.svg",size:r}),n&&e("div",{className:"text-sm font-semibold pl-2",children:"System User"})]})})}function Pr({accountId:r,showTitle:a=!1,size:s="md"}){const i=t(n,{children:[e("div",{children:"This user is used by robots like workflow workers."}),t("div",{className:"text-gray-800 dark:text-gray-500 text-sm",children:[e("span",{className:"font-semibold",children:"ID:"})," ",r]})]});return e(Lr,{title:"Service Account",description:i,children:t("div",{className:"flex flex-row items-center gap-2",children:[e(B,{src:"/cloud.svg",name:"SA",color:"bg-amber-500",className:"px-[5px] text-white",size:s}),a&&t("div",{className:"text-sm font-semibold pl-2 truncate",children:["Service Account : ",r]})]})})}function Tr({title:t="Error",error:n,showTitle:r=!1,size:a="md"}){return e($r,{title:t,message:"string"==typeof n?n:n.message,color:"bg-red-500",showTitle:r,size:a})}function Ir({userRef:t,showTitle:n=!1,size:r="md"}){if(!t)return e($r,{title:"Unknown User",message:"User information is not available.",showTitle:n,size:r});const[a,s]=t?t.split(":"):["unknown"];switch(a){case ze.User:return e(Er,{userId:s,showTitle:n,size:r});case ze.Group:return e(Ar,{userId:s,showTitle:n,size:r});case"system":return e(_r,{showTitle:n,size:r});case ze.ServiceAccount:return e(Pr,{accountId:s,showTitle:n,size:r});case ze.ApiKey:return e(zr,{keyId:s,size:r,showTitle:n});default:return e(Tr,{title:"Unknown User",error:`Invalid user ref type: ${a}`,showTitle:n,size:r})}}function $r({title:n,message:r,color:a,size:s="md",showTitle:i=!1}){return e(Lr,{title:n,description:r,children:t("div",{className:"flex flex-row items-center gap-2",children:[e(B,{color:a,size:s}),i&&e("div",{className:"text-sm font-semibold pl-1",children:n})]})})}function Ar({userId:n,showTitle:r=!1,size:a="md"}){const{data:s,error:i}=jr(n);if(i)return e(Tr,{title:"Failed to fetch group",error:i,showTitle:r,size:a});if(!s)return e(Sr,{});const l=t("div",{className:"space-y-1",children:[s.description&&e("div",{className:"text-sm",children:s.description}),t("div",{className:"text-xs text-muted-foreground",children:["Group ID: ",s.id]}),s.tags&&s.tags.length>0&&e("div",{className:"flex flex-wrap gap-1",children:s.tags.map((t=>e("span",{className:"px-1.5 py-0.5 bg-muted rounded text-xs",children:t},t)))})]});return e(Lr,{title:s.name||"Unnamed Group",description:l,children:t("div",{className:"flex flex-row items-center gap-2",children:[e(it,{className:"size-6 text-indigo-500",size:a}),r&&e("div",{className:"text-sm font-semibold pl-2",children:s.name||"Unnamed Group"})]})})}function Er({userId:n,showTitle:r=!1,size:a="md"}){const{data:s,error:i}=Cr(n);if(i)return e(Tr,{title:"Failed to fetch user",error:i,showTitle:r,size:a});if(!s)return e(Sr,{});const l=e("div",{className:"truncate",title:s.email,children:s.email});return e(Lr,{title:s.name||s.email||s.username||"unknown",description:l,children:t("div",{className:"flex flex-row items-center gap-2",children:[e(B,{src:s.picture,name:s.name,color:"bg-indigo-500",size:a}),r&&e("div",{className:"text-sm font-semibold pl-2",children:s.name||s.email||s.username||"unknown"})]})})}function zr({keyId:n,showTitle:r=!1,size:a="md"}){const{client:s}=Oe(),{data:i,error:l}=W((()=>s.apikeys.retrieve(n)),[]);if(l)return e(Tr,{title:"Failed to fetch the apikey",error:l,showTitle:r,size:a});if(!i)return e(Sr,{});const o=e(B,{name:"PK",color:"bg-pink-500",size:a}),c=t(J,{className:"dark:bg-gray-800 dark:text-gray-200 table-fixed w-full",children:[t("tr",{children:[e("td",{className:"font-semibold w-20",children:"Key:"}),e("td",{className:"truncate max-w-0",children:i?.name})]}),t("tr",{children:[e("td",{className:"font-semibold w-20",children:"Account:"}),e("td",{className:"truncate max-w-0",children:i?.account})]}),t("tr",{children:[e("td",{className:"font-semibold w-20",children:"Project:"}),e("td",{className:"truncate max-w-0",children:i?.project.name})]})]});return e(Lr,{title:"Private Key",description:c,children:t("div",{className:"flex flex-row items-center gap-2",children:[o,r&&e("div",{className:"text-sm font-semibold",children:i?.name||i?.account||i?.project.name||"unknown"})]})})}function Lr({title:n,description:r,children:a}){return t(v,{hover:!0,children:[e(x,{className:"cursor-pointer flex items-center inline-block",children:e("div",{children:a})}),e(w,{align:"center",sideOffset:8,side:"right",children:t("div",{className:"flex flex-col gap-1 rounded-md shadow-md p-2",children:[e("div",{className:"text-md font-semibold",children:n}),r]})})]})}function Ur({buckets:n,name:r,placeholder:a}){return function({buckets:n,name:r,placeholder:a}){const s=n.map((e=>({value:e._id,label:`(${e.count})`})));return{name:r,placeholder:a||`${r.charAt(0).toUpperCase()+r.slice(1)}`,options:s,labelRenderer:r=>{if("Unknown User"===r||!r){const e=n.find((e=>e._id===r));return`Unknown User (${e?.count||0})`}const a=n.find((e=>e._id===r));return t("div",{className:"flex items-center w-full gap-2",children:[e("div",{className:"flex-1 min-w-0 flex items-center truncate",children:e(Ir,{userRef:r,showTitle:!0,size:"sm"})}),t("span",{className:"text-muted-foreground flex-shrink-0",children:["(",a?.count||0,")"]})]})}}}({buckets:n,name:r,placeholder:a})}function Dr({search:t,buckets:n,placeholder:r="All Environments",className:a}){const{client:s}=Oe(),[i,l]=o([]),d=t.getFilterValue("environment");c((()=>{if(s){const e=n.map((async e=>{let t;return await s.environments.retrieve(e._id).then((e=>{t=e.name})).catch((()=>{t=`${e._id} (deleted)`})),t||(t=e._id),{...e,name:t}}));Promise.all(e).then((e=>{e.sort(((e,t)=>e.name.localeCompare(t.name))),l(e)}))}}),[n,s]);const u=i?.find((e=>e._id===d));return e(V,{filterBy:"name",className:a,isClearable:!0,optionLabel:gr,options:i,value:u,onChange:e=>{t.setFilterValue("environment",e?._id)},by:"_id",placeholder:r})}function Or(n){const r=[];if(r.push({name:"run_ids",placeholder:"Run ID",type:"text",multiple:!1}),n.interactions){const a=function({buckets:n,name:r,placeholder:a}){return{name:r,placeholder:a,options:n.map((e=>({label:`(${e.count})`,value:e._id}))),type:"select",labelRenderer:r=>{const a=n.find((e=>e._id===r)),s=a?.name||r;let i="success";if(a?.status)switch(a.status){case Le.published:i="success";break;case Le.archived:i="destructive";break;default:i="attention"}const l=a?.version&&a?.status?`v${a.version} ${a.status}`:a?.status||(a?.version?`v${a.version}`:"");return t("div",{className:"w-full flex items-center justify-between",children:[t("div",{className:"flex flex-row flex-wrap items-center gap-2 min-w-0 flex-1",children:[e("span",{className:"text-sm truncate",children:s}),l&&e(y,{variant:i,className:"text-xs w-fit",children:l})]}),t("span",{className:"ml-2 text-xs shrink-0",children:["(",a?.count||0,")"]})]})},filterBy:(e,t)=>{const r=n.find((t=>t._id===e));return(r?.name||e).toLowerCase().includes(t.toLowerCase())}}}({buckets:n.interactions||[],name:"interaction",placeholder:"Interactions"});r.push(a)}if(n.environments){const a=function({buckets:n,name:r}){const a=n.map((e=>({label:`(${e.count})`,value:e._id})));return{name:r.charAt(0).toUpperCase()+r.slice(1),options:a,type:"select",labelRenderer:r=>{const a=n.find((e=>e._id===r));return t("div",{className:"w-full flex items-center",children:[e("span",{className:"text-sm truncate",children:a?.name||r}),t("span",{className:"ml-2 text-xs",children:["(",a?.count||0,")"]})]})},filterBy:(e,t)=>{const r=n.find((t=>t._id===e));return(r?.name||e).toLowerCase().includes(t.toLowerCase())}}}({buckets:n.environments||[],name:"environments"});r.push(a)}if(r.push({name:"tags",placeholder:"Tags",type:"stringList",multiple:!0}),n.models){const e=xr({buckets:n.models||[],name:"model"});r.push(e)}if(n.statuses){const e=xr({buckets:n.statuses||[],name:"status"});r.push(e)}if(n.finish_reason){const e=xr({buckets:n.finish_reason.map((e=>({...e,_id:null===e._id?"none":e._id}))),name:"finish_reason",placeholder:"Finish Reason"});r.push(e)}if(n.created_by){const e=Ur({buckets:n.created_by||[],name:"created_by",placeholder:"Created By"});r.push(e)}r.push({name:"start",placeholder:"Date After",type:"date",multiple:!1});r.push({name:"end",placeholder:"Date Before",type:"date",multiple:!1});return r.push({name:"workflow_run_ids",placeholder:"Workflow Run ID",type:"text",multiple:!1}),r}function Fr(e){return t=>{0!==t.length?(e.clearFilters(!1,!1),t.forEach((t=>{if(t.value&&t.value.length>0){const n=t.name;let r;r="stringList"===t.type?t.value.map((e=>"string"==typeof e?e:e.value)):t.multiple?Array.isArray(t.value)?t.value.map((e=>"object"==typeof e&&e.value?e.value:e)):["object"==typeof t.value&&t.value.value?t.value.value:t.value]:Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value,"run_ids"!==n&&"workflow_run_ids"!==n||Array.isArray(r)||(r=[r]),e.query[n]=r}})),e.search()):e.clearFilters(!0,!1)}}function Rr({facets:n,search:r}){const[a,s]=o([]),i=Or(n),l=Fr(r);return t(G,{filterGroups:i,filters:a,setFilters:e=>{const t="function"==typeof e?e(a):e;s(t),l(t)},children:[t("div",{className:"flex justify-between mb-1",children:[e(H,{}),e(b,{onClick:()=>{r.search()},variant:"outline",title:"Refresh",children:e(lt,{className:"size-5"})})]}),t("div",{className:"flex gap-2 items-center",children:[e(K,{}),e(Y,{})]})]})}function Mr(e){const t=[];if(t.push({placeholder:"Workflow or Run ID",name:"name",type:"text",options:[]}),e.status){const n=xr({buckets:e.status||[],name:"status",placeholder:"Status"});t.push(n)}if(e.initiated_by){const n=Ur({buckets:e.initiated_by||[],name:"initiated_by",placeholder:"Initiated By"});t.push(n)}t.push({name:"start",placeholder:"Date After",type:"date",multiple:!1});return t.push({name:"end",placeholder:"Date Before",type:"date",multiple:!1}),t}function Vr(e){return t=>{0!==t.length?(e.clearFilters(!1),t.forEach((t=>{if(t.value&&t.value.length>0){const n=t.name;let r;r="stringList"===t.type?t.value.map((e=>"string"==typeof e?e:e.value)):t.multiple?Array.isArray(t.value)?t.value.map((e=>"object"==typeof e&&e.value?e.value:e)):["object"==typeof t.value&&t.value.value?t.value.value:t.value]:Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value,"name"===n?(e.query.search_term=r,e.query.name=r):e.query[n]=r}})),e.search()):e.clearFilters()}}function qr({facets:n,search:r}){const[a,s]=o([]),i=Mr(n),l=Vr(r);return e(G,{filterGroups:i,filters:a,setFilters:e=>{const t="function"==typeof e?e(a):e;s(t),l(t)},children:t("div",{className:"flex gap-2 items-center",children:[e(H,{}),e(K,{}),e(Y,{})]})})}function Wr(e){const{typeRegistry:t}=Oe(),n=[];if(n.push({placeholder:"ID",name:"id",type:"text",options:[]}),n.push({placeholder:"Name",name:"name",type:"text",options:[]}),e.type){const r=wr({buckets:e.type||[],typeRegistry:t,type:"select",multiple:!0});n.push(r)}if(e.status){const t=xr({buckets:e.status||[],name:"status",placeholder:"Status",type:"select",multiple:!0});n.push(t)}return e.tags&&n.push({name:"tags",placeholder:"Tags",type:"stringList",options:e.tags.map((e=>({label:e,value:e})))}),n.push({name:"created_at",placeholder:"Created Date",type:"date",multiple:!0,options:[]}),n.push({name:"updated_at",placeholder:"Updated Date",type:"date",multiple:!0,options:[]}),n}function Br(e){return t=>{0!==t.length?(e.clearFilters(!1),t.forEach((t=>{if(t.value&&t.value.length>0){const n=t.name;let r;if("date"===t.type&&t.multiple){if(Array.isArray(t.value)&&t.value.length>0)if(1===t.value.length){const e="object"==typeof t.value[0]?t.value[0].value:t.value[0];r={gte:e,lte:e}}else if(2===t.value.length){r={gte:"object"==typeof t.value[0]?t.value[0].value:t.value[0],lte:"object"==typeof t.value[1]?t.value[1].value:t.value[1]}}}else if(t.multiple)if(Array.isArray(t.value))r=t.value.map((e=>"object"==typeof e&&e.value?e.value:e));else{r=["object"==typeof t.value&&t.value.value?t.value.value:t.value]}else r=Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value;"name"===n?e.query.name=r:"id"===n?e.query.id=r:e.query[n]=r}})),e.search()):e.clearFilters()}}function Jr({facets:n,search:r}){const[a,s]=o([]),i=Wr(n),l=Br(r);return e(G,{filterGroups:i,filters:a,setFilters:e=>{const t="function"==typeof e?e(a):e;s(t),l(t)},children:t("div",{className:"flex gap-2 items-center",children:[e(H,{}),e(K,{}),e(Y,{})]})})}function Gr(e){const t=[];t.push({name:"name",placeholder:"Name",type:"text",multiple:!1});t.push({name:"prompt",placeholder:"Prompt Name",type:"text",multiple:!1});return t.push({name:"tags",placeholder:"Tags",type:"stringList",multiple:!0}),t}function Hr(e){return t=>{0!==t.length?(e.clearFilters(!1,!1),t.forEach((t=>{if(t.value&&t.value.length>0){const n=t.name;let r;r="stringList"===t.type?t.value.map((e=>"string"==typeof e?e:e.value)):t.multiple?Array.isArray(t.value)?t.value.map((e=>"object"==typeof e&&e.value?e.value:e)):["object"==typeof t.value&&t.value.value?t.value.value:t.value]:Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value,e.query[n]=r}})),e.search()):e.clearFilters(!0,!1)}}function Kr({facets:n,search:r}){const[a,s]=o([]),i=Gr(),l=Hr(r);return e(G,{filterGroups:i,filters:a,setFilters:e=>{const t="function"==typeof e?e(a):e;s(t),l(t)},children:t("div",{className:"flex gap-2 items-center",children:[e(H,{}),e(K,{}),e(Y,{})]})})}function Yr(e){const t=[];if(t.push({name:"name",placeholder:"Name",type:"text",multiple:!1}),e.role&&e.role.length>0){const n={name:"role",placeholder:"Role",type:"select",options:e.role.map((e=>({label:e._id,value:e._id,count:e.count})))};t.push(n)}return t}function Qr(e){return t=>{0!==t.length?(e.clearFilters(!1,!1),t.forEach((t=>{if(t.value&&t.value.length>0){const n=t.name;let r;r="stringList"===t.type?t.value.map((e=>"string"==typeof e?e:e.value)):t.multiple?Array.isArray(t.value)?t.value.map((e=>"object"==typeof e&&e.value?e.value:e)):["object"==typeof t.value&&t.value.value?t.value.value:t.value]:Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value,e.query[n]=r}})),e.search()):e.clearFilters(!0,!1)}}function Xr({facets:n,search:r}){const[a,s]=o([]),i=Yr(n),l=Qr(r);return e(G,{filterGroups:i,filters:a,setFilters:e=>{const t="function"==typeof e?e(a):e;s(t),l(t)},children:t("div",{className:"flex gap-2 items-center",children:[e(H,{}),e(K,{}),e(Y,{})]})})}function Zr(e){const t=[];return t.push({name:"name",placeholder:"Name",type:"text",multiple:!1}),t}function ea(e){return t=>{0!==t.length?(e.clearFilters(!1),t.forEach((t=>{if(t.value&&t.value.length>0){const n=t.name;let r;r="stringList"===t.type?t.value.map((e=>"string"==typeof e?e:e.value)):t.multiple?Array.isArray(t.value)?t.value.map((e=>"object"==typeof e&&e.value?e.value:e)):["object"==typeof t.value&&t.value.value?t.value.value:t.value]:Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value,e.query[n]=r}})),e.search()):e.clearFilters(!0)}}function ta({facets:n,search:r}){const[a,s]=o([]),i=Zr(),l=ea(r);return e(G,{filterGroups:i,filters:a,setFilters:e=>{const t="function"==typeof e?e(a):e;s(t),l(t)},children:t("div",{className:"flex gap-2 items-center",children:[e(H,{}),e(K,{}),e(Y,{})]})})}class na{object;objects;setState;collectionId;singleSelection=!1;constructor(e,t,n,r){this.object=e,this.objects=n,this.setState=r,this.singleSelection=0===Object.keys(this.objects).length,this.collectionId=t}isSingleSelection(){return this.singleSelection}hasSelection(){return void 0!==this.object||0!==this.size()}size(){return Object.keys(this.objects).length}getObjectIds(){return Object.keys(this.objects)}getObjectId(){return this.object?.id}clone(){return new na(this.object,this.collectionId,this.objects,this.setState)}add(e){this.objects[e.id]=e,this.singleSelection=0===Object.keys(this.objects).length,this.setState(this.clone())}remove(e){delete this.objects[e],this.singleSelection=0===Object.keys(this.objects).length,this.setState(this.clone())}addAll(e){for(const t of e)this.objects[t.id]=t;this.setState(this.clone())}isSelected(e){return void 0!==this.objects[e]}removeAll(){this.objects={},this.singleSelection=!0,this.setState(this.clone())}}const ra=d(void 0);function aa(){const e=u(ra);if(!e)throw new Error("useObjectSelection must be used within a ObjectSelectionProvider");return e}function sa(){return u(ra)}function ia({value:t,collectionId:n,children:r}){const[a,s]=o();return c((()=>{const e=new na(t,n,{},s);s(e)}),[t]),a&&e(ra.Provider,{value:a,children:r})}Ut.extend(tn),Ut.extend(en);const la={string(t){let n=[];if(t){const e=t.get("slice");e&&n.push((t=>t.slice(parseInt(e))));const r=t.get("max_length");r&&n.push((e=>e.slice(0,parseInt(r)))),t.has("upper")&&n.push((e=>e.toUpperCase())),t.has("lower")&&n.push((e=>e.toLowerCase())),t.has("capitalize")&&n.push((e=>e[0].toUpperCase()+e.substring(1))),t.has("ellipsis")&&n.push((e=>e+"..."))}return(t,r)=>{let a;if(t){if(a=String(t),n.length>0)for(const e of n)a=e(a)}else a="";return e("td",{children:a},r)}},fileSize:t=>(t,n)=>{let r="";if(t){const e=Number(t);if(isNaN(e))r=String(t);else{const t=["Bytes","KB","MB","GB","TB"];if(0===e)r="0 Bytes";else{const n=Math.floor(Math.log(e)/Math.log(1024));r=`${(e/Math.pow(1024,n)).toFixed(2)} ${t[n]}`}}}return e("td",{children:r},n)},number(t){let n,r;t&&(n=t.get("currency")||void 0,r=t.get("decimals")||void 0);const a=r?parseInt(r):2;return(t,r)=>{let s=new Intl.NumberFormat("en-US",{style:n?"currency":"decimal",currency:n,maximumFractionDigits:a}).format(t);return e("td",{children:s},r)}},objectLink(t){let n="title";return t&&(n=t.get("title")||"title"),(t,r)=>e("td",{children:e(zt,{topLevelNav:!0,className:"underline text-indigo-800 dark:text-indigo-300",href:`/store/objects/${t.id}`,children:t.properties?.[n]||t.name||Xn(t.id)})},r)},typeLink:t=>(t,n)=>e("td",{children:t?.name||"n/a"},n),date(t){let n="format",r="LLL";if(t){const e=t.get("localized");if(e)r=e;else{const e=t.get("relative");e&&(n=e,r=void 0)}}return(t,a)=>e("td",{children:Ut(t)[n](r)},a)}},oa=la.string();function ca(e,t){let n=e;if(!n)return;if(!t.length)return n;const r=t.length-1;for(let e=0;e<r;e++)if(n=n[t[e]],!n)return;return n[t[r]]}function da(e){return e&&"."!==e?e.split("."):[]}class ua{layout;renderer=oa;path;fallbackPath;constructor(e){if(this.layout=e,this.path=da(e.field||""),this.fallbackPath=e.fallback?da(e.fallback):void 0,e.render)this.renderer=(e,t)=>null;else{const t=e.type||"string",n=t.indexOf("?");if(n>0){const e=t.substring(0,n),r=new URLSearchParams(t.substring(n+1));this.renderer=la[e](r)}else this.renderer=la[t]()}}get name(){return this.layout.name}resolveValue(e){let t=ca(e,this.path);return void 0===t&&this.fallbackPath&&(t=ca(e,this.fallbackPath)),void 0===t&&(t=this.layout.default),t}render(t,n){return this.layout.render?e("td",{className:"whitespace-nowrap px-3 py-4 text-sm",children:this.layout.render(t)},n):this.renderer(this.resolveValue(t),n)}}function ma({objects:n,selection:r,isLoading:a,onRowClick:s,columns:i,toggleAll:l,onSelectionChange:o}){return t(J,{className:"w-full border-t",children:[e("thead",{children:t("tr",{children:[r&&e("th",{children:e("input",{type:"checkbox",onChange:l})}),i.map((t=>e("th",{children:t.name},t.name)))]})}),t(Q,{isLoading:a,columns:i.length+1,children:[n?.map((n=>t("tr",{className:"cursor-pointer hover:bg-muted",onClick:()=>{s&&s(n)},children:[r&&e("td",{onClick:e=>e.stopPropagation(),children:e("input",{checked:r.isSelected(n.id),type:"checkbox",onChange:e=>o(n,e)})}),i.map(((e,t)=>e.render(n,t)))]},n.id))),0===n.length&&e("tr",{children:e("td",{colSpan:i.length+(r?1:0),className:"text-center",children:"No objects. Just drag and drop documents or images here to create content objects."})})]})]})}function ha({objects:r,selection:a,isLoading:s,onSelectionChange:i,onRowClick:l}){return t(n,{children:[e(mr,{isLoading:s}),e("div",{className:"w-full gap-2 grid lg:grid-cols-6",children:r.map((t=>e(hr,{document:t,selection:a,onSelectionChange:i,onRowClick:l},t.id)))})]})}class pa{client;limit;collectionId;facets=new X({});result=new X({objects:[],isLoading:!1});facetSpecs=[];query={};constructor(e,t=100){this.client=e,this.limit=t}withFacets(e){return this.facetSpecs=e,this}get objects(){return this.result.value.objects}get error(){return this.result.value.error}get isRunning(){return this.result.value.isLoading}get hasMore(){return this.result.value.hasMore||!1}getFilterValue(e){return this.query[e]}setFilterValue(e,t){this.query[e]=t,this.search()}clearFilters(e=!0){const{parent:t,full_text:n,vector:r,weights:a,score_aggregation:s,dynamic_scaling:i,limit:l}=this.query;this.query={parent:t,...void 0!==n&&{full_text:n},...void 0!==r&&{vector:r},...void 0!==a&&{weights:a},...void 0!==s&&{score_aggregation:s},...void 0!==i&&{dynamic_scaling:i},...void 0!==l&&{limit:l}},e&&this.search()}getFacetBuckets(e){return this.facets.value[e]?.buckets||[]}resetFacets(){this.query={}}reset(e=!1){this.result.value={objects:[],isLoading:e,hasMore:!0}}_updateRunningState(e){const t=this.result.value;this.result.value={objects:t.objects,isLoading:e,error:t.error,hasMore:t.hasMore}}_searchRequest(e,t,n,r=!0){const a={limit:t,offset:n,query:e,facets:r?this.facetSpecs:void 0};return this.collectionId?this.client.collections.searchMembers(this.collectionId,a):this.client.objects.search(a)}_facetsRequest(){const e={facets:this.facetSpecs,query:this.query};return this.collectionId?this.client.collections.computeFacets(this.collectionId,e):this.client.objects.computeFacets(e)}computeFacets(e){this._facetsRequest().then((e=>{this.facets.value=e}))}_search(e=!1,t=!1){if(this.isRunning&&e)return Promise.resolve(!1);this.result.value={isLoading:!0,objects:e?this.objects:[],hasMore:!e||this.result.value.hasMore};const n=this.limit,r=e?this.objects.length:0;return this._searchRequest(this.query,n,r,!t).then((async r=>{const a=r.results||[],s=r.facets||{};return this.result.value={isLoading:!1,objects:e?this.objects.concat(a):a,hasMore:a.length===n},!t&&s&&Object.keys(s).length>0&&(this.facets.value=s),!0})).catch((e=>{throw this.result.value={error:e,isLoading:!1,objects:this.objects,hasMore:this.result.value.hasMore},e}))}search(e=!1){return this.isRunning&&this.objects.length>0?Promise.resolve(!1):this._search(!1,e)}loadMore(e=!1){return this.isRunning||!this.hasMore||this.query.vector?Promise.resolve(!1):(this.objects.length>0&&(e=!0),this._search(!0,e))}}const ga=d(void 0);function fa(){return u(ga)}function ya(){return Z(fa().facets)}function ba(){const e=fa();return{...Z(e.result),search:e}}function va(){const e=fa();return Z(e.facets).total}var xa;async function wa(e){try{const t=await e.arrayBuffer(),n=new nn;n.appendByteArray(new Uint8Array(t));const r=n.end();return r?.toString()}catch(e){return void console.error("Error calculating file hash:",e)}}function Na(){const{client:e}=Oe(),t=f();return{checkDocumentProcessing:async(n,r,a)=>{try{console.log(`Preparing metadata for ${n.length} files...`);const t=await async function(e,t){const n=[];for(let r=0;r<e.length;r+=5){const a=e.slice(r,r+5),s=await Promise.all(a.map((async e=>{let n=t||void 0;if(e.webkitRelativePath){const r=e.webkitRelativePath.split("/");if(r.length>1){const e=r.slice(0,-1).join("/");n=t?`${t}/${e}`:e}}return{file:e,hash:await wa(e),name:e.name,size:e.size,location:n}})));n.push(...s)}return n}(n,r),s=async()=>{let n;const r={query:{match:{"content.etag":{$in:t.map((e=>e.hash))}}},select:void 0};n=a?(await e.store.collections.searchMembers(a,r)).results:(await e.store.objects.search(r)).results;for(const e of n){const n=t.find((t=>t.hash===e.content.etag));n&&(n.existingId=e.id,n.action=xa.SKIP)}},i=async()=>{const n=t.filter((e=>e.action!==xa.SKIP)),r=n.map((e=>e.location)),s=Array.from(new Set(r)),i=[];for(const t of s){const r=n.filter((e=>e.location===t)).map((e=>e.name)),s={location:t??"","content.name":{$in:r}};if(a){const t=e.store.collections.searchMembers(a,{query:{match:s},select:void 0}).then((e=>e.results));i.push(t)}else{const t=e.store.objects.find({query:{match:s},select:void 0});i.push(t)}}const l=(await Promise.all(i)).flat();console.log(`Found ${l.length} document to update`,l);for(const e of l){const n=t.find((t=>t.name===e.content.name&&(t.location?t.location===e.location:""===e.location)));n&&(n.existingId=e.id,n.action=xa.UPDATE)}console.log(`Reconciled ${t.filter((e=>e.action===xa.UPDATE)).length}`)};return await s(),await i(),t.forEach((e=>{e.action||(e.action=xa.CREATE)})),console.log("Document processing check results:",{totalFiles:n.length,toCreate:t.filter((e=>e.action===xa.CREATE)).length,toUpdate:t.filter((e=>e.action===xa.UPDATE)).length,toSkip:t.filter((e=>e.action===xa.SKIP)).length}),t}catch(e){throw t({title:"Error in file upload processing check",status:"error",description:e.message}),console.log("Error in file upload processing check",e),new Error("Error in file upload processing check: "+e.message)}}}}function ka({isOpen:r,onClose:a,files:s,collectionId:i,selectedFolder:d,title:u="Upload Files",children:m,onUploadComplete:h,hideFileSelection:p=!1,showTypeSelectionOnly:g=!1}){const{client:y,typeRegistry:v}=Oe(),x=f(),[w,N]=o([]),[k,C]=o([]),[j,S]=o(!1),[_,P]=o(null),[T,I]=o([]),[$,A]=o(!1),[E,z]=o(!1),[L,U]=o(0),[O,F]=o(Date.now()),[R,V]=o(void 0),[q,W]=o(null),[B,J]=o(u),[G,H]=o("");c((()=>{i&&y.store.collections.retrieve(i).then(V)}),[i]),c((()=>{$?(J("Uploading Files"),H(`${Math.round(L)}% complete`)):E?(J("Upload Complete"),H("")):j?(J("File Analysis Results"),H(`${w.length} file${1!==w.length?"s":""}`)):w.length>0?(J(u),H("Checking for duplicates and updates")):(J(u),H(""))}),[$,E,j,u,L,w.length]);const K=()=>R||d?t(re,{className:"mb-4",status:"default",icon:e(ht,{className:"size-5"}),children:[e("div",{className:"flex items-center",children:e("span",{className:"font-medium",children:"Upload Location:"})}),t("div",{className:"text-sm mt-1",children:[R&&t("div",{className:"flex items-center",children:[e("span",{className:"mr-1",children:"Collection:"}),e("span",{className:"font-medium",children:R.name})]}),d&&t("div",{className:"flex items-center mt-1",children:[e("span",{className:"mr-1",children:"Folder:"}),e("span",{className:"font-medium",children:d})]})]})]}):null,[Y,Q]=o({toCreate:0,toUpdate:0,toSkip:0}),{checkDocumentProcessing:X}=Na(),Z=l((()=>v?.types||[]),[v?.types]);c((()=>{r&&(C([]),S(!1),P(null),I([]),A(!1),z(!1),U(0),Q({toCreate:0,toUpdate:0,toSkip:0}),W(null),J(u),H(""),s&&s.length>0?(N(s),oe(s)):N([]),F(Date.now()))}),[r,s]);const ie=()=>{N([]),C([]),S(!1),P(null),I([]),A(!1),z(!1),U(0),Q({toCreate:0,toUpdate:0,toSkip:0}),W(null),J(u),H(""),F(Date.now()),a()},le=e=>{e&&e.length>0&&(N(e),oe(e))},oe=async e=>{if(e.length)try{console.log(`Processing ${e.length} files to determine required actions...`);const t=await X(e,d,i);C(t);const n=t.filter((e=>e.action===xa.CREATE)).length,r=t.filter((e=>e.action===xa.UPDATE)).length,a=t.filter((e=>e.action===xa.SKIP)).length;Q({toCreate:n,toUpdate:r,toSkip:a}),x({title:"Files analyzed",description:`${e.length} file(s): ${n} new, ${r} to update, ${a} to skip`,status:"info",duration:4e3}),S(!0)}catch(e){console.error("Error processing files:",e),x({title:"Error",description:"There was an error analyzing the files",status:"error",duration:5e3})}},ce=async()=>{if(!k.length)return;const e=_?.id||null,t=k.map((e=>({file:e.file,status:"pending",progress:0,action:e.action===xa.CREATE?"create":e.action===xa.UPDATE?"update":"skip"})));I(t),A(!0),z(!1);const n=k.filter((e=>e.action===xa.SKIP)),r=k.filter((e=>e.action===xa.UPDATE)),a=k.filter((e=>e.action===xa.CREATE)),s={success:!0,objectIds:[],uploadedFiles:[],skippedFiles:[],failedFiles:[]};for(const t of n)t.existingId&&(s.objectIds.push(t.existingId),s.skippedFiles.push({id:t.existingId,name:t.name,type:e,status:"skipped",location:t.location}),I((e=>e.map((e=>e.file===t.file?{...e,status:"success",progress:100,id:t.existingId}:e)))));const l=async(t,n)=>{const r=[];for(let e=0;e<t.length;e+=50)r.push(t.slice(e,e+50));for(let a=0;a<r.length;a++){const l=r[a];if(console.log(`Processing ${n} batch ${a+1}/${r.length} (${l.length} files)`),t.length>50){x({title:`Processing files (${n})`,description:`Processed ${50*a}/${t.length} files...`,status:"info",duration:2e3})}await Promise.all(l.map((async t=>{try{if(I((e=>e.map((e=>e.file===t.file?{...e,status:"uploading",progress:20}:e)))),"update"===n&&t.existingId)await y.store.objects.update(t.existingId,{type:e||void 0,content:t.file,location:t.location,name:t.name},{createRevision:!0,revisionLabel:"upload on "+(new Date).toISOString()}),I((e=>e.map((e=>e.file===t.file?{...e,status:"success",progress:100,id:t.existingId}:e)))),s.objectIds.push(t.existingId),s.uploadedFiles.push({id:t.existingId,name:t.name,type:e,status:"updated",location:t.location});else{const n=await y.store.objects.create({type:e||void 0,content:t.file,location:t.location||t.file.webkitRelativePath||t.name},{collection_id:i});I((e=>e.map((e=>e.file===t.file?{...e,status:"success",progress:100,id:n.id}:e)))),s.objectIds.push(n.id),s.uploadedFiles.push({id:n.id,name:t.name,type:e,status:"created",location:t.location})}}catch(n){console.error(`Failed to process file ${t.name}:`,n),I((e=>e.map((e=>e.file===t.file?{...e,status:"error",progress:100,message:n.message||"Unknown error"}:e)))),s.failedFiles.push({name:t.name,error:n.message||"Unknown error",status:"failed",location:t.location,type:e}),s.success=!1}})));const o=T.filter((e=>"success"===e.status||"error"===e.status)).length,c=T.length,d=Math.round(o/c*100);U(d)}};r.length>0&&await l(r,"update"),a.length>0&&await l(a,"create"),I((e=>{const t=e.filter((e=>"pending"===e.status)).map((e=>({...e,status:"error",progress:100,message:"Upload process interrupted"})));return t.length>0?(t.forEach((e=>{s.failedFiles.push({name:e.file.name,error:"Upload process interrupted",status:"failed",type:_?.id||null})})),s.success=!1,e.map((e=>"pending"===e.status?{...e,status:"error",progress:100,message:"Upload process interrupted"}:e))):e})),A(!1),z(!0);const o=s.uploadedFiles.filter((e=>"created"===e.status)).length,c=s.uploadedFiles.filter((e=>"updated"===e.status)).length,d=s.skippedFiles.length,u=s.failedFiles.length;let m="";o>0&&(m+=`${o} file${1!==o?"s":""} uploaded`),c>0&&(m+=m?", ":"",m+=`${c} file${1!==c?"s":""} updated`),d>0&&(m+=m?", ":"",m+=`${d} file${1!==d?"s":""} skipped`),u>0&&(m+=m?", ":"",m+=`${u} file${1!==u?"s":""} failed`),x({title:"Upload Complete",description:m,status:u>0?"warning":"success",duration:5e3}),W(s)},de=()=>t("div",{className:"mb-4",children:[t("label",{className:"block text-sm font-medium mb-2",children:["Content Type ",e("span",{className:"text-muted font-normal",children:"(Optional)"}),e(M,{description:"Select a content type to apply to the uploaded files. If left empty, Vertesia will automatically detect the type based on file content.",placement:"top",size:"xs",children:e(Ge,{className:"size-3 ml-2"})})]}),e(se,{options:Z,value:_,optionLabel:e=>e?e.name:"Select a content type",placeholder:"Select a content type or leave empty for automatic detection",onChange:e=>P(void 0===e?null:e),filterBy:"name",isClearable:!0}),_?e(n,{}):e("div",{className:"p-2 rounded-md",children:t("div",{className:"flex items-center text-attention",children:[e(ct,{className:"size-4 mr-1"}),"Automatic Type Detection",e(M,{description:"Vertesia will analyze the content and select the most appropriate type. This is recommended for most uploads and ensures optimal processing.",placement:"top",size:"xs",children:e(Ge,{className:"size-3 ml-2"})})]})})]});return t(ee,{isOpen:r,onClose:ie,className:"mx-auto",children:[e(te,{description:G,children:B}),g?t(ne,{children:[m,K(),de()]}):0!==w.length||p?$||E?$?t(ne,{children:[K(),e("div",{className:"mb-4",children:e("div",{className:"h-2 bg-muted/20 rounded-full overflow-hidden",children:e("div",{className:"h-full bg-primary rounded-full",style:{width:`${L}%`}})})}),e("div",{className:"max-h-96 overflow-y-auto",children:T.map(((n,r)=>t("div",{className:"flex items-center py-2 border-b border-border last:border-b-0",children:[t("div",{className:"mr-3",children:["pending"===n.status&&e(ut,{className:"size-5 text-muted"}),"uploading"===n.status&&e(D,{size:"sm"}),"success"===n.status&&e(ct,{className:"size-5 text-success"}),"error"===n.status&&e(mt,{className:"size-5 text-destructive"})]}),t("div",{className:"flex-1 min-w-0",children:[e("div",{className:"truncate font-medium",children:n.file.name}),t("div",{className:"text-xs text-muted",children:["pending"===n.status&&"Waiting...","uploading"===n.status&&"Uploading...","success"===n.status&&("create"===n.action?"Created":"update"===n.action?"Updated":"Skipped"),"error"===n.status&&n.message]})]})]},`${n.file.name}-${r}`)))})]}):e(ne,{children:t("div",{className:"mb-4",children:[K(),e(Wt,{files:T.map((e=>{let t;return t="success"===e.status?"create"===e.action?"success":"update"===e.action?"updated":"skipped":"failed",{name:e.file.name,status:t,error:"error"===e.status?e.message:void 0}})),location:d||void 0,collection:R?.name})]})}):e(ne,{children:j?t(n,{children:[K(),e("div",{className:"mb-4",children:e("div",{className:"p-4 rounded-md mb-4",children:t("div",{className:"grid grid-cols-3 gap-4",children:[t("div",{className:"flex flex-col items-center",children:[t("div",{className:"flex items-center gap-2",children:[e(ot,{className:"size-5 text-primary"}),e("span",{className:"font-medium",children:"New"})]}),e("div",{className:"text-2xl font-semibold",children:Y.toCreate})]}),t("div",{className:"flex flex-col items-center",children:[t("div",{className:"flex items-center gap-2",children:[e(ct,{className:"size-5 text-success"}),e("span",{className:"font-medium",children:"Update"})]}),e("div",{className:"text-2xl font-semibold",children:Y.toUpdate})]}),t("div",{className:"flex flex-col items-center",children:[t("div",{className:"flex items-center gap-2",children:[e(dt,{className:"size-5 text-mixer-attention/40"}),e("span",{className:"font-medium",children:"Skip"})]}),e("div",{className:"text-2xl font-semibold",children:Y.toSkip})]})]})})}),de(),e(re,{className:"mb-4",status:"info",children:Y.toCreate+Y.toUpdate>0?t("div",{className:"space-y-1",children:[t("p",{children:[Y.toCreate+Y.toUpdate," file",Y.toCreate+Y.toUpdate>1?"s are":" is"," ready to process"]}),e("p",{children:Y.toSkip>0&&`${Y.toSkip} file${Y.toSkip>1?"s are":" is"} already in the system and will be skipped.`})]}):Y.toSkip>0?t("span",{children:["All ",Y.toSkip," file(s) already exist in the system and will be skipped. You can proceed to view the results."]}):e("span",{children:"No files to process."})})]}):t("div",{className:"flex flex-col items-center justify-center py-4",children:[e(D,{size:"lg",className:"mb-4"}),e("div",{className:"text-lg font-medium",children:"Analyzing files..."})]})}):t(ne,{className:"flex flex-col items-center justify-center p-8",children:[K(),e(qt,{onDrop:le,message:"Drag and drop files here or click to select",buttonLabel:"Select Files",className:"w-full h-64"}),m]}),(()=>{if(g)return t(ae,{children:[e(b,{variant:"ghost",onClick:ie,children:"Cancel"}),e(b,{onClick:()=>{h&&h({success:!0,objectIds:[],uploadedFiles:[{name:"type-selection",type:_?.id||null,status:"created"}],skippedFiles:[],failedFiles:[]}),ie()},children:_?`Use ${_.name}`:"Use Automatic Type Detection"})]});if(0===w.length&&!p)return e(ae,{children:e(b,{variant:"ghost",onClick:ie,children:"Cancel"})});if(!$&&!E){const n=j;return t(ae,{children:[e(b,{variant:"ghost",onClick:ie,children:"Cancel"}),e(b,{disabled:!n,onClick:ce,children:Y.toCreate+Y.toUpdate>0?"Upload":"Continue"})]})}return $?e(ae,{children:e(b,{variant:"ghost",disabled:!0,children:"Uploading..."})}):t(ae,{children:[e(b,{variant:"ghost",onClick:()=>{N([]),C([]),S(!1),P(null),I([]),A(!1),z(!1),U(0),Q({toCreate:0,toUpdate:0,toSkip:0})},children:"Upload More"}),e(b,{onClick:()=>{h&&q&&h(q),ie()},children:"Close"})]})})()]},O)}function Ca(e){const t="function"==typeof e?e:e.onUploadDone,{client:n,project:r,store:a}=Oe(),s=fa(),i=f(),{checkDocumentProcessing:l}=Na();return async(e,o,c)=>{const d={success:!1,objectIds:[],uploadedFiles:[],skippedFiles:[],failedFiles:[]};if(!r)return i({status:"error",title:"No project selected",duration:3e3}),d;if(!e||0===e.length)return i({status:"warning",title:"No files selected",duration:3e3}),d;const u=Array.from(e).filter((e=>e.size>0));if(0===u.length)return i({status:"error",title:"No valid files selected",description:"Please select files with valid content.",duration:5e3}),d;const m=[],h=[],p=[];console.log(`Processing ${u.length} files with smart file processing...`);const g=await l(u,null,c),f=g.filter((e=>e.action===xa.CREATE)).length,y=g.filter((e=>e.action===xa.UPDATE)).length,b=g.filter((e=>e.action===xa.SKIP)).length;i({title:"Files analyzed",description:`${u.length} file(s): ${f} new, ${y} to update, ${b} to skip`,status:"info",duration:4e3});for(const e of g.filter((e=>e.action===xa.SKIP&&e.existingId)))m.push({id:e.existingId,name:e.name,type:o,status:"skipped",location:e.location});const v=g.filter((e=>(e.action===xa.CREATE||e.action===xa.UPDATE)&&e.file));if(v.length>0){console.log(`Processing ${v.length} files (${v.filter((e=>e.action===xa.CREATE)).length} create, ${v.filter((e=>e.action===xa.UPDATE)).length} update)...`);const e=50,t=[];for(let n=0;n<v.length;n+=e)t.push(v.slice(n,n+e));for(let r=0;r<t.length;r++){const s=t[r],l=r*e;console.log(`Processing batch ${r+1}/${t.length} (${s.length} files)`),v.length>e&&i({title:"Processing files",description:`Processed ${l}/${v.length} files...`,status:"info",duration:2e3});const u=await Promise.all(s.map((async e=>{try{if(e.action===xa.UPDATE&&e.existingId){const t=await n.store.objects.update(e.existingId,{type:o||void 0,content:e.file,location:e.location,name:e.name},{createRevision:!0,revisionLabel:"upload on "+(new Date).toISOString()});return h.push({id:e.existingId,name:e.name,type:o,status:"updated",location:e.location}),d.objectIds.push(e.existingId),{success:!0,id:t.id,name:e.name,action:"update"}}{const t=c?{collection_id:c}:void 0,n=await a.objects.create({type:o||void 0,content:e.file,location:e.location||e.file.webkitRelativePath||e.name},t);h.push({id:n.id,name:e.name,type:o,status:"created",location:e.location})}}catch(t){console.error(`Failed to process file ${e.name}:`,t),p.push({name:e.name,error:t.message||"Unknown error",status:"failed",location:e.location,type:o}),i({status:"error",title:`Processing failed for ${e.name}`,description:t.message,duration:4e3})}}))),m=h.filter((e=>"created"===e.status)),g=h.filter((e=>"updated"===e.status)),f=h.filter((e=>"failed"===e.status));console.log(`Batch ${r+1} results:`,{creates:m,updates:g,failures:f,total:u.length})}}const x=h.filter((e=>"created"===e.status)).length,w=h.filter((e=>"updated"===e.status)).length,N=h.filter((e=>"failed"===e.status)).length,k=h.filter((e=>"skipped"===e.status)).length;t&&(console.log("Upload complete:",{totalObjectIds:d.objectIds.length,uploadedFiles:x,updatedFiles:w,skippedFiles:k,failedFiles:N}),await t(d.objectIds));let C="";return x>0&&(C+=`${x} file${1!==x?"s":""} uploaded`),w>0&&(C+=C?", ":"",C+=`${w} file${1!==w?"s":""} updated`),k>0&&(C+=C?", ":"",C+=`${k} file${1!==k?"s":""} skipped (already existed)`),N>0&&(C+=C?", ":"",C+=`${N} file${1!==N?"s":""} failed`),C&&i({status:N>0?"warning":"success",title:C,duration:4e3}),s.search(),d}}!function(e){e.CREATE="create",e.SKIP="skip",e.UPDATE="update"}(xa||(xa={}));const ja=[{name:"ID",field:"id",type:"string?slice=-7"},{name:"Name",field:".",type:"objectLink"},{name:"Type",field:"type.name",type:"string"},{name:"Status",field:"status",type:"string"},{name:"Updated At",field:"updated_at",type:"date"}];function Sa({isGridView:t=!1,onUpload:n,collectionId:r,...a}){return n?e(_a,{...a,onUpload:n,isGridView:t,collectionId:r}):e(Pa,{...a,isGridView:t})}function _a({isGridView:n,onUpload:a,collectionId:s,skipTypeModal:i=!1,...l}){const[c,d]=o(!1),[u,m]=o([]),[h,p]=o(!1),[g,y]=o(null),[b,v]=o(!1),x=fa(),w=f(),{checkDocumentProcessing:N}=Na(),k=async(e,t)=>{console.log("Files dropped on ObjectTable:",e.length,t),d(!0);try{if(s){const t=await N(e,null,s);y(t);const n=t.filter((e=>"create"===e.action)).length,r=t.filter((e=>"update"===e.action)).length,a=t.filter((e=>"skip"===e.action)).length;w({title:"Files ready to process",description:`${e.length} file(s): ${n} new, ${r} to update, ${a} to skip`,status:"info",duration:4e3})}else y(null)}catch(e){console.error("Error processing files:",e),w({title:"Error processing files",description:"There was an error checking for duplicate files",status:"error",duration:4e3}),y(null)}finally{if(d(!1),m(e),p(!1),i){console.log("Skipping type modal and calling onUpload directly",{filesLength:e.length,processedFilesLength:g?.length});const t=a(e,null,s);t&&"object"==typeof t&&(t.processedFiles=g)}else console.log("Setting typeSelectionOpen to true",{filesLength:e.length}),v(!0)}},C=e=>{const t=[...u];m([]),y(null),v(!1),t.length>0&&void 0!==e&&(d(!0),console.log("Starting upload with",{typeId:e,filesCount:t.length,hasProcessingResults:!!g,collectionId:s}),a(t,e,s).finally((()=>{d(!1),x.search()})))},j=e=>{e.preventDefault(),e.stopPropagation(),p(!0)};return t("div",{className:"min-h-[400px] relative",onDragOver:j,onDragEnter:j,onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.contains(e.relatedTarget)||p(!1)},onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),p(!1),e.dataTransfer.items){const t=[];for(let n=0;n<e.dataTransfer.items.length;n++){const r=e.dataTransfer.items[n];if("file"===r.kind){const e=r.getAsFile();e&&t.push(e)}}if(t.length>0){const e={count:t.length,message:`Preparing to upload ${t.length} file${1===t.length?"":"s"}...`};k(t,e)}}},children:[e("div",{className:r("bg-white dark:bg-gray-800 opacity-40 absolute inset-0 z-50 flex justify-center items-center",c?"block":"hidden"),children:e(D,{size:"xl"})}),e(Pa,{...l,isGridView:n}),e("div",{className:r("absolute inset-0 pointer-events-none",h?"z-40":"-z-10"),children:e("div",{className:"w-full h-full relative",children:e(qt,{onDrop:k,message:"Drop files or folders here to upload",className:r("absolute inset-0 bg-white/90 dark:bg-gray-800/90 pointer-events-auto",h?"flex":"hidden"),buttonLabel:"Select Files or Folders",allowFolders:!0})})}),e(ka,{isOpen:b&&u.length>0,onClose:()=>{m([]),y(null),v(!1),C(void 0)},files:u,collectionId:s,selectedFolder:null,title:"Upload Files",onUploadComplete:e=>{if(e){if(e.failedFiles&&e.failedFiles.length>0&&w({title:"Upload Issues",description:`${e.failedFiles.length} file(s) failed to upload`,status:"warning",duration:5e3}),e.success){const t=e.uploadedFiles.filter((e=>"created"===e.status)).length,n=e.uploadedFiles.filter((e=>"updated"===e.status)).length,r=e.skippedFiles.length;(t>0||n>0)&&w({title:"Upload Complete",description:`${t>0?`${t} created`:""}${t>0&&n>0?", ":""}${n>0?`${n} updated`:""}${r>0?`, ${r} skipped`:""}`,status:"success",duration:5e3})}x.search()}m([]),y(null),v(!1),e&&e.success&&e.objectIds.length>0?C(null):C(void 0)}})]})}function Pa({objects:t,layout:n=ja,isLoading:r,onRowClick:a,onSelectionChange:s,isGridView:i}){const o=sa(),c=(e,n)=>{if(o){const r=n.nativeEvent.shiftKey;if(n.target.checked){if(o.add(e),r){const n=t.findIndex((t=>t.id===e.id)),r=function(e,t,n){for(let r=t-1;r>=0;r--)if(n.isSelected(e[r].id))return r;return-1}(t,n,o);if(r>-1&&r<n-1){const e=[];for(let a=r+1;a<n;a++)e.push(t[a]);o.addAll(e)}else{const e=function(e,t,n){const r=e.length;for(let a=t+1;a<r;a++)if(n.isSelected(e[a].id))return a;return-1}(t,n,o);if(e>-1&&e>n+1){const r=[];for(let a=n+1;a<e;a++)r.push(t[a]);o.addAll(r)}}}}else o.remove(e.id);s&&s(o)}},d=e=>{if(o){e.target.checked?o.addAll(t):o.removeAll()}},u=l((()=>(n.length>0?n:ja).map((e=>new ua(e)))),[n]);return e(i?ha:ma,{objects:t,isLoading:r,columns:u,onRowClick:a,selection:o,toggleAll:d,onSelectionChange:c})}function Ta({children:t,limit:n,parent:r,typeId:a,facets:s,name:i,collectionId:o}){const{store:c}=Oe(),d=l((()=>{let e;s?e=s:(e=[{name:"status",field:"status"},{name:"location",field:"location"}],a||e.unshift({name:"type",field:"type"}));const t=new pa(c,n).withFacets(e);return t.collectionId=o,t.query.type=a,t.query.parent=r,t.query.name=i,t}),[a,n]);return e(ga.Provider,{value:d,children:t})}const Ia=[{name:"Name",field:"properties.title",type:"string",fallback:"name"},{name:"Type",field:"type.name",type:"string"},{name:"Status",field:"status",type:"string"},{name:"Created At",field:"created_at",type:"date"}];function $a({onChange:t}){return e(Ta,{children:e(Ea,{onRowClick:e=>{t(e||void 0)}})})}const Aa="vertesia.content_store.lastDisplayedView";function Ea({onRowClick:n}){const[r,a]=o(!1),[s,i]=o("grid"===localStorage.getItem(Aa)),{search:l,isLoading:d,error:u,objects:h}=ba(),p=m(null);ie(p,(()=>{r&&l.loadMore(!0)}),{deps:[r]}),c((()=>{l.search().then((()=>a(!0)))}),[]);const g=ya(),f=fa();return u?e(le,{title:"Search failed",children:u.message}):t("div",{children:[t("div",{className:"flex justify-between items-center mb-4",children:[e(Jr,{facets:g,search:f}),t("div",{className:"flex items-center gap-2",children:[e(b,{variant:"outline",onClick:()=>{a(!1),l.search().then((()=>a(!0)))},alt:"Refresh",children:e(lt,{size:16})}),e(Vn,{onUpdate:i})]})]}),e(Sa,{objects:h||[],isLoading:!1,layout:Ia,onRowClick:n,isGridView:s}),e("div",{ref:p,className:"mt-10"}),d&&e("div",{className:"flex justify-center",children:e(D,{size:"xl"})})]})}function za({isOpen:n,onClose:r}){return t(ee,{onClose:()=>r(),isOpen:!!n,className:"min-w-[60vw]",children:[e(te,{children:"Select Content"}),e(ne,{className:"pt-0 overflow-y-auto max-h-[80vh] min-h-[80vh]",children:n&&e($a,{onChange:r})})]})}const La=/store:([a-f0-9]+)/;function Ua({object:n}){const{client:a}=Oe(),{off:s,on:i,isOn:l}=oe(),[d,u]=o(null!=n.value?String(n.value):""),[m,h]=o(void 0),p=()=>{u(""),n.value="",h(void 0)};return c((()=>{if(!d||m)return;const e=d.match(La);e&&a.objects.get(e[1]).then((e=>{h(e)})).catch((()=>{p()}))}),[d]),t("div",{children:[t("div",{className:"relative",children:[e("input",{value:d,onChange:e=>{const t=e.target.value;u(t),n.value=t},className:r(ce.INPUT,"pr-10 w-full")}),m&&e("div",{className:"absolute inset-y-0 right-10 flex items-center justify-center ",children:e(b,{onClick:p,variant:"unstyled",className:"hover:text-red-500 hover:bg-gray-100 dark:hover:bg-gray-600",children:e(Fe,{className:"size-5"})})}),e("div",{className:"absolute inset-y-0 right-0 flex items-center justify-center",children:e(b,{onClick:i,variant:"unstyled",className:"hover:bg-gray-100 dark:hover:bg-gray-600",children:e(pt,{className:"size-5"})})}),e(za,{value:d,isOpen:l,onClose:e=>{if(e){const t="store:"+e.id;u(t),h(e||void 0),n.value=t}s()}})]}),m&&e("div",{className:"p-1 semibold text-sm text-gray-600 dark:text-slate-300",children:m.properties?.title||m.name})]})}function Da(e,t,n){return()=>{n&&e.files.getDownloadUrl(n).then((e=>{window.open(e.url,"_blank")})).catch((e=>{t({status:"error",title:"Failed to get download URL",description:e.message,duration:5e3})}))}}function Oa({objectId:n,isOpen:r,onClose:a}){const s=Lt(),{client:i,store:l}=Oe(),[d,u]=o(null),[m,h]=o(!1),[p,g]=o(!1),[y,v]=o(),[x,w]=o(),[N,k]=o("preview"),C=f();c((()=>{n&&r?(h(!0),l.objects.retrieve(n,"+embeddings").then((e=>{u(e),e.text?v(e.text):j(e.id);const t=e.content;t&&t.source&&t.type&&t.type.startsWith("image/")&&S(e)})).catch((e=>{console.error("Error loading object:",e),C({title:"Error",description:"Failed to load document",status:"error",duration:3e3})})).finally((()=>{h(!1)}))):(u(null),v(void 0),w(void 0))}),[n,r,l.objects]);const j=async e=>{g(!0);try{const t=await l.objects.getObjectText(e);v(t.text)}catch(e){console.error("Error loading text:",e)}finally{g(!1)}},S=async e=>{try{"found"===(await i.objects.getRendition(e.id,{format:Ee.jpeg,generate_if_missing:!1})).status&&console.log("Found rendition");const t=await i.files.getDownloadUrl(e.content.source);w(t.url)}catch(e){console.error("Error loading image:",e)}},_=()=>{d&&(s(`/legal/objects/${d.id}`),a())},P=y&&(y.startsWith("#")||y.includes("\n#")||y.includes("\n*")),T=d?.content?.type&&d.content.type.startsWith("image/"),I="application/pdf"===d?.content?.type;return r?t("div",{className:"fixed inset-y-0 right-0 w-2/5 dark:bg-slate-900 shadow-xl z-50 flex flex-col transition-transform duration-300 transform "+(r?"translate-x-0":"translate-x-full"),children:[t("div",{className:"flex items-center justify-between px-4 py-3 border-b dark:border-gray-700 bg-gradient-to-r from-indigo-50 to-gray-50 dark:from-gray-800 dark:to-gray-900",children:[t("div",{className:"flex items-center",children:[e(gt,{className:"h-5 w-5 text-indigo-600 mr-2"}),e("h2",{className:"text-lg font-semibold text-gray-800 dark:text-gray-200 truncate",children:m?"Loading document...":d?.name||"Document Preview"})]}),t("div",{className:"flex items-center space-x-2",children:[t(b,{variant:"ghost",size:"sm",onClick:_,className:"flex items-center gap-1 text-indigo-600 hover:text-indigo-800",children:[e(ft,{className:"h-4 w-4"}),e("span",{children:"Full View"})]}),e(b,{variant:"ghost",size:"sm",onClick:a,className:"flex items-center text-gray-600 hover:text-gray-800 dark:text-gray-300 dark:hover:text-gray-100",children:e(Fe,{className:"h-5 w-5"})})]})]}),m?e("div",{className:"flex-1 flex items-center justify-center",children:t("div",{className:"text-center",children:[e(D,{size:"lg",className:"text-indigo-600 dark:text-indigo-400 mb-2"}),e("p",{className:"text-gray-600 dark:text-gray-400",children:"Loading document..."})]})}):t("div",{className:"flex-1 flex flex-col h-full",children:[e("div",{className:"border-b",children:t("div",{className:"flex px-4",children:[e("button",{className:"py-2 px-4 font-medium border-b-2 "+("preview"===N?"border-indigo-600 text-indigo-700 dark:text-indigo-300":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"),onClick:()=>k("preview"),children:t("div",{className:"flex items-center gap-1",children:[e(tt,{className:"h-4 w-4"}),e("span",{children:"Preview"})]})}),e("button",{className:"py-2 px-4 font-medium border-b-2 "+("properties"===N?"border-indigo-600 text-indigo-700 dark:text-indigo-300":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"),onClick:()=>k("properties"),children:t("div",{className:"flex items-center gap-1",children:[e(Ge,{className:"h-4 w-4"}),e("span",{children:"Properties"})]})})]})}),t("div",{className:"flex-1 overflow-auto p-4",children:["preview"===N&&t("div",{className:"h-full",children:[p?e("div",{className:"flex items-center justify-center h-40",children:e(D,{size:"md",className:"text-indigo-600 dark:text-indigo-400"})}):y?e("div",{className:"shadow rounded-md p-4 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800",children:P?e("div",{className:"prose prose-sm max-w-none prose-p:my-2 prose-pre:bg-gray-800 prose-pre:my-2 prose-headings:text-indigo-700 dark:prose-invert dark:prose-headings:text-indigo-300",children:e(Vt,{children:y})}):e("pre",{className:"text-wrap whitespace-pre-wrap dark:text-gray-200",children:y})}):null,T&&e("div",{className:"mt-4",children:e("div",x?{className:"border border-gray-200 dark:border-gray-700 rounded-md p-2 bg-white dark:bg-gray-800",children:e("img",{src:x,alt:d?.name,className:"mx-auto max-h-[70vh] object-contain"})}:{className:"flex items-center justify-center h-40",children:e(D,{size:"md",className:"text-indigo-600 dark:text-indigo-400"})})}),I&&t("div",{className:"flex flex-col items-center justify-center h-64 border border-gray-200 dark:border-gray-700 rounded-md p-4 bg-gray-50 dark:bg-gray-800",children:[e(gt,{className:"h-16 w-16 text-indigo-300 dark:text-indigo-400 mb-4"}),t("p",{className:"text-gray-600 dark:text-gray-400 text-center mb-4",children:["PDF document preview is available in full view. TODO"," "]}),e(b,{onClick:_,className:"bg-indigo-600 hover:bg-indigo-700 text-white",children:"Open Full Document View"})]}),!T&&!y&&!I&&!p&&t("div",{className:"flex flex-col items-center justify-center h-64 border border-gray-200 dark:border-gray-700 rounded-md p-4 bg-gray-50 dark:bg-gray-800",children:[e(gt,{className:"h-16 w-16 text-gray-300 dark:text-gray-600 mb-4"}),e("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:"No preview available for this document type."})]})]}),"properties"===N&&d&&t("div",{className:"h-full",children:[d.properties?e("div",{className:"shadow rounded-md p-4 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800",children:e(Mt,{value:d.properties})}):t("div",{className:"flex flex-col items-center justify-center h-64 border border-gray-200 dark:border-gray-700 rounded-md p-4 bg-gray-50 dark:bg-gray-800",children:[e(Ge,{className:"h-16 w-16 text-gray-300 dark:text-gray-600 mb-4"}),e("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:"No properties available for this document."})]}),t("div",{className:"mt-4",children:[e("h3",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:"Document Information"}),e("div",{className:"shadow rounded-md p-4 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800",children:t("div",{className:"grid grid-cols-2 gap-y-2 gap-x-4 text-sm",children:[e("div",{className:"text-gray-500 dark:text-gray-400",children:"ID"}),e("div",{className:"font-medium dark:text-gray-200",children:d.id}),e("div",{className:"text-gray-500 dark:text-gray-400",children:"Type"}),e("div",{className:"font-medium dark:text-gray-200",children:d.type?.name||"Unknown"}),e("div",{className:"text-gray-500 dark:text-gray-400",children:"Content Type"}),e("div",{className:"font-medium dark:text-gray-200",children:d.content?.type||"N/A"}),e("div",{className:"text-gray-500",children:"Size"}),e("div",{className:"font-medium",children:d.content&&"size"in d.content?Fa(d.content.size):"Unknown"}),e("div",{className:"text-gray-500",children:"Created"}),e("div",{className:"font-medium",children:d.created_at?new Date(d.created_at).toLocaleString():"N/A"}),e("div",{className:"text-gray-500",children:"Updated"}),e("div",{className:"font-medium",children:d.updated_at?new Date(d.updated_at).toLocaleString():"N/A"})]})})]})]})]})]}),t("div",{className:"flex items-center justify-between p-4 border-t bg-gray-50 dark:bg-gray-800 dark:border-gray-700",children:[e("div",{children:d?.content?.source&&t(b,{onClick:()=>{d?.content?.source&&i.files.getDownloadUrl(d.content.source).then((e=>{window.open(e.url,"_blank")})).catch((e=>{console.error("Error getting download URL:",e),C({title:"Error",description:"Failed to download file",status:"error",duration:3e3})}))},variant:"outline",className:"text-indigo-600 border-indigo-300 hover:bg-indigo-50",children:[e(at,{className:"h-4 w-4 mr-2"}),"Download"]})}),t(b,{onClick:_,className:"bg-indigo-600 hover:bg-indigo-700 text-white",children:["Open Full Document",e(yt,{className:"h-4 w-4 ml-2"})]})]})]}):null}function Fa(e){if(0===e)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB","TB"][t]}const Ra=Object.values(Ue),Ma=Object.values(De);function Va({onChange:n,isLoading:r,refresh:a,searchTypes:s}){const{client:i,project:l}=Oe(),d=f(),[u,m]=o(void 0),[h,p]=o(void 0),g=!(!l||!h?.embeddings.text&&!h?.embeddings.image),[y,v]=o(void 0),[x,w]=o(!1),[N,k]=o(s||Ra),[C,j]=o(100);c((()=>{s&&k(s)}),[s]);const T={};let I=!1,E=!1;N.forEach((e=>{e===Ue.full_text?I=!0:E=!0,Ma.includes(e)&&(T[e]=!0)})),c((()=>{m(void 0),v(void 0)}),[a]),c((()=>{l&&i.projects.retrieve(l.id).then((e=>{p(e.configuration)}))}),[l]),c((()=>{y&&d({title:y,status:"success",duration:2e3})}),[y]),c((()=>{u&&0!==u.length||n(void 0)}),[u]);const z=()=>{if(!g||!u)return;n({vector:E?{text:u,config:T}:void 0,full_text:I?u:void 0,limit:C}),v("Searching...")},L=e=>t=>{k(t?t=>Array.from(new Set([...t,e])):t=>t.filter((t=>t!==e)))};return t("div",{className:"flex gap-1 items-center w-1/2",children:[e($,{placeholder:"Type what you are looking for, or select a filter",value:u,onChange:m,onKeyDown:e=>{"Enter"===e.key&&z()}}),e(b,{variant:"ghost",onClick:()=>w(!0),alt:"Semantic search settings",className:"ml-1",children:e(bt,{size:18})}),t(S,{isOpen:x,onClose:()=>w(!1),children:[e(_,{children:"Search Types"}),e(P,{children:t("div",{className:"flex flex-col gap-2",children:[t("label",{className:"flex items-center gap-2",children:[e(de,{checked:N.includes(Ue.full_text),onCheckedChange:L(Ue.full_text)}),e("span",{children:"Full Text"})]}),e("div",{className:"font-semibold mt-2 mb-1",children:"Embeddings"}),Ma.map((n=>t("label",{className:"flex items-center gap-2",children:[e(de,{checked:N.includes(n),onCheckedChange:L(n)}),e("span",{children:n.charAt(0).toUpperCase()+n.slice(1)})]},n))),t("div",{className:"mt-3",children:[e("span",{className:"mr-2",children:"Limit"}),e(ue,{type:"number",min:1,value:C,onChange:e=>j(Number(e)||1),style:{width:80}})]})]})}),e(A,{children:e(b,{variant:"outline",onClick:()=>w(!1),children:"Close"})})]}),e(b,{variant:"secondary",isLoading:r,onClick:z,isDisabled:!g,alt:"Semantic search",children:"Search"})]})}const qa=[{name:"ID",field:"id",type:"string?slice=-7"},{name:"Name",field:".",type:"objectLink"},{name:"Type",field:"type.name",type:"string"},{name:"Status",field:"status",type:"string"},{name:"Updated At",field:"updated_at",type:"date"}];function Wa({onUploadDone:t=async()=>{},layout:n}){const r=fa(),a=f(),s=Ca((async e=>{await t(e),setTimeout((()=>{console.log("Delayed refresh after upload to ensure backend consistency"),r.search().then((()=>{a({title:"Document list refreshed",description:"The document list has been updated with your uploaded files.",status:"info",duration:3e3})})).catch((e=>{console.error("Failed to refresh search results:",e)}))}),1e3)}));return e(Ba,{layout:n,onUpload:(e,t)=>{const n=r.collectionId;return s(e,t,n)}})}function Ba({layout:n,onUpload:r,allowFilter:a=!0,allowSearch:s=!0}){const i=fa(),[l,d]=o(!1),[u,h]=o(null),{typeRegistry:p}=Oe(),{search:g,isLoading:f,error:y,objects:v}=ba(),[x,w]=o(p?n||(N=p,((k=g.query.type)?N.getTypeLayout(k):qa)??qa):qa);var N,k;const[C,j]=o(0),[S,_]=o(0),[P,T]=o("grid"===localStorage.getItem(Vn.LAST_DISPLAYED_VIEW)),[I,$]=o([]),A=m(null);c((()=>{l||0!==v.length||(g._updateRunningState(!0),g.search().then((()=>{d(!0)})).catch((e=>{console.error("Initial search failed:",e),g._updateRunningState(!1)})))}),[]),ie(A,(()=>{l&&v.length>0&&v.length!=S&&(d(!1),g.loadMore().finally((()=>{_(v.length),d(!0)})))}),{deps:[l,v.length]});const E=e=>{if(e&&e.vector){if(g.query.vector=e.vector,g.query.full_text=e.full_text,g.query.weights=e.weights,g.query.score_aggregation=e.score_aggregation,g.query.dynamic_scaling=e.dynamic_scaling,!x.find((e=>"Search Score"===e.name))){const e=[...x,{name:"Search Score",field:"score",render:e=>e.score?.toFixed(4)||"0.0000"}];w(e)}g.search().then((()=>d(!0)))}else e&&e.full_text?(g.query.full_text=e.full_text,g.search().then((()=>d(!0)))):void 0===e&&l&&(delete g.query.vector,delete g.query.full_text,g.search().then((()=>d(!0))))},z=ya(),L=fa(),U=()=>{g.search().then((()=>d(!0)))},O=Wr(z),F=Br(L),R=new URL(window.location.href),M=R.searchParams.get("filters");if(M)try{const e=M.split(";"),t=e.filter((e=>{const[t]=e.split(":"),n=decodeURIComponent(t);return"start"!==n&&"end"!==n}));if(t.length!==e.length){const e=t.length>0?t.join(";"):"";e?R.searchParams.set("filters",e):R.searchParams.delete("filters"),window.history.replaceState({},"",R.toString())}}catch(y){console.error("Failed to clean start/end filters from URL:",y)}return t("div",{className:"flex flex-col gap-y-2",children:[e(Ja,{object:u,onClose:()=>h(null)}),y&&e(le,{title:"Error",children:y.message}),t("div",{className:"sticky top-0 z-10 bg-background pb-2",children:[a&&t(G,{filterGroups:O,filters:I,setFilters:e=>{const t="function"==typeof e?e(I):e;$(t),F(t)},children:[t("div",{className:"flex flex-row gap-4 items-center justify-between w-full",children:[t("div",{className:"flex gap-2 items-center w-2/3",children:[s&&e(Va,{onChange:E,isLoading:f,refresh:C,className:"w-full"}),e(H,{})]}),t("div",{className:"flex gap-1 items-center",children:[e(b,{variant:"outline",onClick:U,alt:"Refresh",children:e(lt,{size:16})}),e(Vn,{onUpdate:T})]})]}),t("div",{className:"flex gap-2 items-center",children:[e(K,{}),e(Y,{})]})]}),!a&&t("div",{className:"flex flex-row gap-4 items-center justify-between w-full",children:[e("div",{className:"flex gap-2 items-center w-2/3",children:s&&e(Va,{onChange:E,isLoading:f,refresh:C})}),t("div",{className:"flex gap-1 items-center",children:[e(b,{variant:"outline",onClick:U,alt:"Refresh",children:e(lt,{size:16})}),e(Vn,{onUpdate:T})]})]})]}),e(Sa,{objects:v,isLoading:!v.length&&f,layout:x,onRowClick:h,onUpload:r,isGridView:P,collectionId:i.collectionId}),f&&e("div",{className:"flex justify-center",children:e(D,{size:"xl"})}),e("div",{ref:A})]})}function Ja({object:n,onClose:r}){const{store:a}=Oe(),s=f(),i=Lt(),l=Da(a,s,n?.content?.source);return n?t(me,{title:n.properties?.title||n.name,isOpen:!0,onClose:r,children:[t("div",{className:"flex items-center gap-x-2",children:[e(b,{variant:"ghost",size:"sm",title:"Open Object",onClick:()=>i(`/objects/${n.id}`),children:e(st,{className:"size-4"})}),n.content?.source&&e(b,{variant:"ghost",size:"sm",title:"Download",onClick:l,children:e(at,{className:"size-4"})})]}),e(he,{className:"my-2"}),e("div",{className:"pt-2",children:e(Jn,{object:n,loadText:!0})})]}):null}var Ga;function Ha({isExporting:n,isOpen:r,onClose:a}){return t(S,{onClose:()=>a(void 0),isOpen:r,className:"relative overflow-visible",children:[e(_,{children:"Export Object Properties"}),!n&&e(Ka,{onClose:a}),n&&e(Ya,{})]})}function Ka({onClose:n}){const[r,a]=o(void 0),[s,i]=o(void 0),l=["Export selected objects","Export all objects"];return t(P,{className:"min-h-[104px] pt-0 flex flex-col gap-y-4",children:[e("div",{className:"h-1/3",children:e(V,{options:l,value:s,onChange:i,placeholder:"Choose what to export",className:"h-full w-full text-sm",filterBy:"name",isClearable:!0})}),t("div",{className:"h-1/2 flex flex-col gap-y-8 content-between",children:[e(V,{options:Object.values(Ga),value:r,onChange:a,placeholder:"Choose a format",className:"h-full w-full text-sm",filterBy:"name",isClearable:!0}),e(b,{className:"w-full",isDisabled:!r||!s,onClick:()=>{n(r,s==l[1])},children:"Export Properties"})]})]})}function Ya({}){return e(P,{className:"min-h-[84px] pt-0",children:t("div",{className:"h-full grid flex-col gap-y-2 content-between justify-items-center",children:[t("div",{className:"text-sm flex flex-col gap-x-2",children:[e("p",{children:"EXPORT IS IN PROGRESS"}),e("p",{className:"pt-2 grid justify-items-center",children:"PLEASE WAIT"})]}),e(D,{size:"lg"})]})})}function Qa({collection:t}){const n=f(),{client:r,typeRegistry:a}=Oe(),s=function(e,t){let n=e.table_layout;if(n&&n.length>0)return n;e.type&&t&&(n=t?.getTypeLayout(e.type.id));return n&&n.length>0?n:void 0}(t,a);return t.dynamic?e(Ba,{layout:s}):e(Wa,{onUploadDone:async e=>{e.length>0&&await r.store.collections.addMembers(t.id,e).catch((e=>{n({title:"Failed to add objects to collection",description:e.message,status:"error"})}))},layout:s})}!function(e){e.CSV="CSV",e.JSON="JSON"}(Ga||(Ga={}));const Xa=n=>null===n?"None":t("div",{children:[e("div",{className:"text-sm",children:n.name}),e("div",{className:"text-xs text-gray-500",children:n.description})]});function Za({className:t,defaultValue:n,onChange:r,isClearable:a,multiple:s}){const i=Oe(),[l,d]=o(!1),[u,m]=o(),[h,p]=o([]);c((()=>{if(!l&&(d(!0),i.typeRegistry&&n)){if(s&&Array.isArray(n)){const e=i.typeRegistry.types.filter((e=>n.includes(e.id)));p(e)}const e=i.typeRegistry.types.find((e=>e.id===n));e&&m(e)}}),[i.typeRegistry,n,s]);const g=e=>{p(e),r(e)};return e("div",s?{className:"flex flex-col gap-4 content-between",children:e(se,{options:i.typeRegistry?.types||[],value:h,onChange:g,placeholder:"Choose Content Types...",optionLabel:Xa,className:t||"text-sm bg-background",filterBy:"name",isClearable:a||!1,multiple:!0})}:{className:"flex flex-col gap-4 content-between",children:e(se,{options:i.typeRegistry?.types||[],value:u,onChange:e=>{m(e||void 0),r(e)},placeholder:"Choose a Content Type...",optionLabel:Xa,className:t||"text-sm bg-background",filterBy:"name",isClearable:a||!1})})}function es({onClose:n,redirect:r=!0,onAddToCollection:a}){const s=Lt(),i=f(),[l,c]=o(!1),{client:d}=Oe(),[u,m]=o({dynamic:!1,name:"",description:""});function h(e,t){m({...u,[e]:t})}return t("form",{onSubmit:e=>e.preventDefault(),children:[t(ne,{children:[e(I,{label:"Name",required:!0,children:e($,{type:"text",value:u.name||"",onChange:e=>h("name",e)})}),e(I,{label:"Description",className:"mt-2",children:e("textarea",{className:ce.INPUT,value:u.description||"",onChange:e=>h("description",e.target.value)})}),e(I,{label:"Dynamic Collection",className:"mt-2",direction:"row",description:"Dynamically fetch content for the collection based on a query. If not enabled, then content must be added by users or agents.",children:e(pe,{value:u.dynamic||!1,onChange:e=>h("dynamic",e)})}),!u.dynamic&&e(I,{label:"Allowed Content Types",className:"mt-4",description:"Optionally select which content types can be added to the collection. If not set, then all content types are allowed.",children:e(Za,{defaultValue:u.allowed_types||null,onChange:e=>{Array.isArray(e)?h("allowed_types",e.map((e=>e.id))):h("allowed_types",e?[e.id]:[])},isClearable:!0,multiple:!0})}),e(I,{label:"Type",className:"mt-2",description:"Optionally select a content type to assign custom properties and data to the collection.",children:e(Za,{defaultValue:u.type||null,onChange:e=>{Array.isArray(e)?h("type",e.length>0?e[0].id:null):h("type",e?.id||null)},isClearable:!0})})]}),e(ae,{children:e(b,{isDisabled:l,onClick:()=>{u?.name&&u.name.trim()?(u.name=u.name.trim(),u.description&&(u.description=u.description.trim()),null==u.dynamic&&(u.dynamic=!1),c(!0),d.store.collections.create(u).then((e=>{n(),i({title:"Collection created",description:`Collection "${e.name}" created successfully`,status:"success",duration:3e3}),r&&s(`/collections/${e.id}`),a&&a(e.id)})).catch((e=>{i({title:"Failed to create collection",description:e.message,status:"error",duration:5e3})})).finally((()=>c(!1)))):i({title:"Name is required",description:"Please provide a name for the collection",status:"error",duration:5e3})},children:"Create Collection"})})]})}function ts({isOpen:n,onClose:r}){return t(ee,{onClose:r,isOpen:n,children:[e(te,{children:"Create a Collection"}),e(es,{onClose:r})]})}function ns({}){const{client:r}=Oe(),a=f(),[s,i]=o(),[l,d]=o(!0),[u,m]=o(!1),{data:h,error:p,refetch:g}=W((()=>r.store.collections.search({})),[]);if(c((()=>{(h||p)&&d(!1)}),[h,p]),p)return e(le,{title:"Collections fetch failed",children:p.message});return t(n,{children:[h&&(h.length>0?t(J,{className:"w-full",children:[e("thead",{children:t("tr",{children:[e("th",{children:"Name"}),e("th",{children:"Type"}),e("th",{children:"Created"}),e("th",{})]})}),e(Q,{columns:4,isLoading:l,children:h.map((n=>t(ge,{children:[e("td",{children:t("div",{className:"flex items-center gap-2",children:[rs(n.dynamic),e(zt,{href:`/collections/${n.id}`,children:n.name})]})}),e("td",{children:n.type?.name||"-"}),e("td",{children:Ut(n.created_at).fromNow()}),e("td",{className:"text-right",children:e(b,{variant:"destructive",size:"sm",onClick:()=>i(n.id),children:e(vt,{className:"size-4"})})})]},n.id)))})]}):e(fe,{title:"No Collections",buttonLabel:"New Collections",onClick:()=>m(!0),children:"Get started by creating a new Collections."})),e(ts,{isOpen:u,onClose:()=>m(!1)}),e(ye,{isOpen:!!s,title:"Delete Collection",content:"Are you sure you want to delete this collection? This action cannot be undone.",onConfirm:async()=>{if(s)try{await r.store.collections.delete(s),a({title:"Collection deleted",status:"success",duration:3e3}),g()}catch(e){console.error("Failed to delete collection:",e),a({title:"Failed to delete collection",description:e.message||"An error occurred",status:"error",duration:5e3})}finally{i(void 0)}},onCancel:()=>i(void 0)})]})}function rs(t){const n=t?"Dynamic Collection":"Static Collection",r=e(t?xt:wt,{className:"size-5"});return e(M,{description:n,className:"mr-2",children:r})}function as({objects:n,isLoading:r}){const a=Lt();return e("div",{children:t(J,{className:"w-full",children:[e("thead",{children:t("tr",{children:[e("th",{children:"Name"}),e("th",{children:"Strict Mode"}),e("th",{children:"Semantic Chunking"}),e("th",{children:"Updated At"})]})}),e(Q,{isLoading:r,columns:3,children:n?.map((n=>t("tr",{onClick:()=>a(`/types/${n.id}`),className:"cursor-pointer hover:bg-muted",children:[e("td",{children:n.name}),e("td",{children:n.strict_mode?"Yes":"No"}),e("td",{children:n.is_chunkable?"Yes":"No"}),e("td",{children:Ut(n.updated_at).fromNow()})]},n.id)))})]})})}Ut.extend(tn),Ut.extend(tn);class ss{client;limit;result=new X({objects:[],isLoading:!1});query={};constructor(e,t=100){this.client=e,this.limit=t}get objects(){return this.result.value.objects}get error(){return this.result.value.error}get isRunning(){return this.result.value.isLoading}getFilterValue(e){return this.query[e]}setFilterValue(e,t){this.query[e]=t,this.search()}reset(e=!1){this.result.value={objects:[],isLoading:e}}_updateRunningState(e){const t=this.result.value;this.result.value={objects:t.objects,isLoading:e,error:t.error}}async _search(e=!1){if(this.isRunning)return Promise.resolve(!1);this.result.value={isLoading:!0,objects:e?this.objects:[]};const t=this.limit,n=this.objects.length;return this.client.types.list({limit:t,offset:n,query:this.query}).then((async e=>(this.result.value={isLoading:!1,objects:this.objects.concat(e)},!0))).catch((e=>{throw this.result.value={error:e,isLoading:!1,objects:this.objects},e}))}search(){return this.isRunning?Promise.resolve(!1):this._search(!1)}loadMore(){return this.isRunning?Promise.resolve(!1):this._search(!0)}}const is=d(void 0);function ls(){return u(is)}function os(){const e=ls();return{...Z(e.result),search:e}}function cs(){return ls().objects.length}function ds({title:n,isOpen:r,onClose:a,okLabel:s,initialPayload:i}){const l=f(),[c,d]=o(i?.name),[u,m]=o(i?.description),[h,p]=o(i?.strict_mode??!1);return t(S,{isOpen:r,onClose:()=>a(),children:[e(_,{children:n}),e(P,{className:"pt-0",children:t("div",{className:"h-full flex flex-col gap-4 content-between",children:[t("div",{children:[e("label",{className:"block text-sm font-medium text-muted",children:"Name"}),e($,{value:c,onChange:d})]}),t("div",{children:[e("label",{className:"block text-sm font-medium text-muted",children:"Description"}),e(be,{value:u,onChange:m})]})]})}),e(A,{children:t("div",{className:"flex justify-end gap-4",children:[e(b,{variant:"secondary",onClick:()=>a(),children:"Cancel"}),e(b,{variant:"primary",onClick:()=>(()=>{if(!c)return void l({status:"error",title:"Name is required",duration:5e3});a({name:c,description:u,strict_mode:h}).then((()=>a())),d(void 0),m(void 0),p(!1)})(),children:s})]})})]})}var us;function ms({isDirty:n=!1}){const r=Oe(),{store:a}=r,s=f(),[i,l]=o(!1),{search:d,isLoading:u,error:h,objects:p}=os(),[g,y]=o(""),b=ve(g,500),v=m(null);ie(v,(()=>{i&&d.loadMore()}),{deps:[i]}),c((()=>{d.search().then((()=>l(!0)))}),[]),c((()=>{d.query.name=g,d.search().then((()=>l(!0)))}),[b]);const[x,w]=o(void 0);c((()=>{d.query.chunkable=x?"Yes"==x:void 0,d.search().then((()=>l(!0)))}),[x]),c((()=>{n&&i&&d.search().then((()=>l(!0)))}),[n]);const[N,k]=o(!1);if(h)return e(le,{title:"Failed to fetch ObjectTypes",children:h.message});return t("div",{className:"flex flex-col gap-4 h-full",children:[t("div",{className:"flex gap-4",children:[e($,{placeholder:"Filter by Name",value:g,onChange:y}),e(V,{className:"w-60",isClearable:!0,options:Object.values(us),value:x,onChange:e=>{w(e)},placeholder:"Is Chunkable"})]}),t("div",{className:"flex-1",children:[u||0!==p?.length?e(as,{objects:p,isLoading:u}):e(fe,{title:"No Type",buttonLabel:"Create Type",onClick:()=>{k(!0)},children:"Get started by creating a new Type."}),e(ds,{okLabel:"Create",title:"Create Type",isOpen:N,onClose:async e=>e?a.types.create(e).then((async()=>{s({status:"success",title:"Type created",duration:2e3}),r.reloadTypes(),d.search().then((()=>l(!0)))})).catch((e=>{s({status:"error",title:"Error creating type",description:e.message,duration:5e3})})):(k(!1),Promise.resolve())})]})]})}!function(e){e.true="Yes",e.false="No"}(us||(us={}));const hs=[an,rn()];function ps({objectType:n,onSchemaUpdate:r}){const{store:a}=Oe(),s=f(),[i,c]=o(!1),d=Bt(n.object_schema),u=m(void 0),[h,p]=o(!1),g=l((()=>function(e){if(!e)return"";return JSON.stringify(e,null,2)}(d.schema)),[d]),y=()=>{if(u.current){const e=u.current.getValue();try{const t=function(e){if(!e?.trim())return;return JSON.parse(e.trim())}(e);gs(t),d.replaceSchema(t)}catch(e){return s({status:"error",title:"Invalid JSON Schema",description:e.message,duration:5e3}),!1}}return!0};return t("div",{className:"mx-2 my-2 rounded-2xl border border-solid shadow-md border-spacing-2",children:[t("div",{className:"flex items-center rounded-t-md border-b gap-x-2 py-2 pl-4 pr-2",children:[e("div",{className:"text-base font-semibold",children:"Schema Editor"}),e("div",{children:e(b,{variant:"outline",size:"sm",onClick:()=>{h&&!y()||p((e=>!e))},children:h?"Edit Schema":"Edit Json"})}),e("div",{className:"ml-auto flex gap-x-2",children:e(b,{isLoading:i,variant:"outline",size:"sm",onClick:()=>{h&&!y()||(c(!0),a.types.update(n.id,{object_schema:d.schema}).then((()=>{r(d),s({status:"success",title:"Schema updated",description:"The schema has been updated successfully",duration:2e3})})).catch((e=>{s({status:"error",title:"Failed to update schema",description:e.message,duration:5e3})})).finally((()=>{c(!1)})))},children:"Save Changes"})})]}),e("div",{className:"px-4 py-2",children:h?e(Jt,{value:g,extensions:hs,editorRef:u}):e(Gt,{schema:d})})]})}const gs=e=>{try{new Rt({strict:!1}).compile(e)}catch(e){throw new Error(`Invalid JSON Schema definition: ${e.message}`)}};function fs({children:t,limit:n,name:r,chunkable:a}){const{store:s}=Oe(),i=l((()=>{const e=new ss(s,n);return e.query.name=r,e.query.chunkable=a,e}),[n]);return e(is.Provider,{value:i,children:t})}function ys({isOpen:n,onClose:r,title:a="Select Content Type",children:s,initialSelectedType:i=null,confirmLabel:l="Select Type",allowNone:c=!0}){const{typeRegistry:d}=Oe(),[u,m]=o(i),h=d?.types||[],p=()=>{r(void 0)};return t(S,{isOpen:n,onClose:p,className:"w-full max-w-xl mx-auto",children:[e(_,{children:a}),t(P,{className:"p-6",children:[s,t("div",{className:"mb-4 mt-4",children:[t("label",{className:"block text-sm font-medium mb-2",children:["Content Type ",c&&e("span",{className:"text-gray-500 font-normal",children:"(Optional)"})]}),e(V,c?{options:h,value:u,optionLabel:e=>e?e.name:"Select a content type",placeholder:"Select a content type or leave empty for automatic detection",onChange:e=>m(e||null),filterBy:"name",isClearable:!0}:{options:h,value:u,optionLabel:e=>e?e.name:"Select a content type",placeholder:"Select a content type",onChange:e=>m(e||null),filterBy:"name"}),c&&t("div",{className:"mt-2 text-sm text-blue-600 flex items-center",children:[e(ct,{className:"h-4 w-4 mr-1"}),t("span",{children:[e("strong",{children:"Type selection is optional."})," Leave empty to let Vertesia choose the appropriate type"]})]})]}),u?t("div",{className:"text-sm text-gray-500 bg-gray-50 p-3 rounded-md mb-4",children:[e("div",{className:"font-medium",children:u.name}),u.description&&e("div",{className:"mt-1",children:u.description})]}):c&&t("div",{className:"text-sm text-blue-600 bg-blue-50 p-3 rounded-md mb-4",children:[e("div",{className:"font-medium",children:"Automatic Type Detection"}),t("div",{className:"mt-1",children:["Vertesia will analyze each file's content and automatically select the most appropriate type.",e("br",{}),e("span",{className:"mt-1 block font-medium",children:"This is recommended for most uploads."})]})]})]}),t(A,{children:[e(b,{variant:"ghost",onClick:p,children:"Cancel"}),e(b,{onClick:()=>{r(u?.id??null)},children:u?`${l}: ${u.name}`:c?"Let Vertesia Choose":l})]})]})}const bs=[an,rn()];function vs({objectType:n,onLayoutUpdate:r}){const a=f(),[s,i]=o(!1),{store:c}=Oe(),d=m(void 0),u=l((()=>xs(n.table_layout)),[n.table_layout]),h=(e,t)=>{a({status:"error",title:e,description:t,duration:5e3})};return t("div",{className:"mx-2 my-2 rounded-2xl border border-solid shadow-xs",children:[t("div",{className:"flex items-center rounded-t-md border-b gap-x-2 py-2 pl-4 pr-2",children:[e("div",{className:"text-base font-semibold ",children:"Table Layout Editor"}),e("div",{className:"ml-auto flex gap-x-2",children:e(b,{isLoading:s,variant:"outline",size:"sm",onClick:()=>{if(!d.current)return;const e=d.current.getValue();let t;if(e)try{t=JSON.parse(e)}catch(e){return h("Invalid JSON",e.message)}else t=null;return Array.isArray(t)?t.some((e=>!e||!e.name||!e.field))?h("Invalid JSON","A table layout entry must contain the following properties:] {field, name, converter?}"):(i(!0),void c.types.update(n.id,{table_layout:t}).then((e=>{a({status:"success",title:"Table Layout updated",description:"The table layout has been updated successfully",duration:2e3}),r(e.table_layout)})).catch((e=>{a({status:"error",title:"Failed to update table layout",description:e.message,duration:5e3})})).finally((()=>{i(!1)}))):h("Invalid JSON","The table layout must be an array")},children:"Save Changes"})})]}),e("div",{className:"px-4 py-2",children:e(Jt,{value:u,extensions:bs,editorRef:d})})]})}function xs(e){return e?JSON.stringify(e,null,2):"[\n\n]"}const ws=[an,rn()];function Ns({refetch:n,collection:r}){const a=r.type?.id,s=m(void 0),i=f(),{client:c}=Oe(),[d,u]=o(!1),[h,p]=o({name:r.name,description:r.description||"",query:r.query?JSON.stringify(r.query,null,2):"",tags:r.tags||[],type:r.type?.id||"",allowed_types:r.allowed_types||[]}),g=l((()=>xs(r.table_layout)),[r.table_layout]),y=(e,t)=>{p({...h,[e]:t})};return t("div",{className:"flex flex-col gap-4 py-2",children:[e(I,{label:"Name",required:!0,children:e($,{value:h.name,onChange:e=>y("name",e)})}),e(I,{label:"Description",children:e("textarea",{className:ce.INPUT,value:h.description,onChange:e=>y("description",e.target.value)})}),!r.dynamic&&e(I,{label:"Allowed Content Types",description:"Select which content types can be added to the collection. If not set, then all content types are allowed.",children:e(Za,{defaultValue:h.allowed_types||null,onChange:e=>{Array.isArray(e)?y("allowed_types",e.map((e=>e.id))):y("allowed_types",e?[e.id]:[])},isClearable:!0,multiple:!0})}),r.dynamic&&e(I,{label:"Query",description:"Define the query to dynamically fetch content for the collection.",children:e("textarea",{className:ce.INPUT,value:h.query,onChange:e=>y("query",e.target.value)})}),e(I,{label:"Table Layout",description:"Define a custom layout for displaying the collection in tables.",children:e(Jt,{className:"border-1 rounded-md border-border",value:g,extensions:ws,editorRef:s})}),e(I,{label:"Type",description:"Select a content type to assign custom properties and data to the collection.",children:e(Za,{defaultValue:h.type||null,onChange:e=>{Array.isArray(e)?y("type",e.length>0?e[0].id:null):y("type",e?.id||null)},isClearable:!0})}),e(b,{size:"lg",className:"w-min my-4",isDisabled:d,onClick:()=>{let e;try{e=h.query?JSON.parse(h.query):void 0}catch(e){return void i({title:"Invalid Query JSON",description:e.message,status:"error",duration:5e3})}const t={name:h.name,description:h.description,query:e,tags:h.tags,type:h.type,allowed_types:h.allowed_types};let a;if(t.name||(a="Name is required"),t.type||(t.type=null),a)i({title:"Validation failed",description:a,status:"error",duration:5e3});else{if(s.current){const e=s.current.getValue();if(e)try{t.table_layout=JSON.parse(e)}catch(e){return void i({title:"Invalid Table Layout",description:e.message,status:"error",duration:5e3})}else t.table_layout=null}u(!0),c.store.collections.update(r.id,t).then((()=>{n(),i({title:"Collection updated",description:"Collection has been updated successfully",status:"success",duration:3e3})})).catch((e=>{i({title:"Failed to update collection",description:e.message,status:"error",duration:5e3})})).finally((()=>{u(!1)}))}},children:"Save Metadata"}),a&&e(ks,{typeId:a,collection:r})]})}function ks({typeId:t,collection:n}){const{client:r}=Oe(),{data:a,error:s}=W((()=>r.store.types.retrieve(t)),[t]);return s?e(le,{title:"Failed to load type",children:s.message}):e(js,{title:"Properties",children:a&&e(Cs,{collection:n,schema:a.object_schema})})}function Cs({schema:t={},collection:n}){const{client:r}=Oe(),a=f(),s=l((()=>new Ht(t,n.properties||{})),[t,n]),[i,c]=o(!1);return e(Kt,{object:s,onSubmit:e=>{const t={properties:e||{}};c(!0),r.store.collections.update(n.id,t).then((()=>{a({title:"Collection properties updated",description:"Collection has been updated successfully",status:"success",duration:3e3})})).catch((e=>{a({title:"Failed to update collection properties",description:e.message,status:"error",duration:5e3})})).finally((()=>{c(!1)}))},children:e(b,{size:"lg",isLoading:i,className:"my-4",variant:"primary",type:"submit",children:"Save Properties"})})}function js({children:n,title:r}){return t("div",{className:"my-4",children:[e("div",{className:"text-lg text-gray-700 font-semibold border-b border-b-gray-300 py-2 mb-4",children:r}),n]})}function Ss({onChange:n,value:r,disabled:a=!1,placeholder:s="Select a collection",searchPlaceholder:i="Search collections"}){const{client:c}=Oe(),[d,u]=o(""),[m,p]=o(!1),f=ve(d,300),y=h((async e=>{p(!0);const t=e.trim(),n=await c.store.collections.search({dynamic:!1,name:t||void 0});return p(!1),n}),[c]),{data:k,error:S}=W((()=>y(f)),[f,y]),_=l((()=>k?.find((e=>e.id===r))),[k,r]),P=h((e=>{n(e.id,e)}),[n]),T=h((()=>{n(void 0,void 0)}),[n]),I=h((e=>{u(e)}),[]);if(S)return e(le,{title:"Collection fetch failed",children:S.message});const $=d.trim().length>0,A=_&&$;return t(v,{children:[e(x,{asChild:!0,children:t(b,{variant:"outline",role:"combobox","aria-haspopup":"listbox",className:g("w-full justify-between min-w-0"),disabled:a,children:[e("span",{className:"truncate flex-1 text-left min-w-0",children:_?_.name:s}),e(pt,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e(w,{className:"mt-2 mb-2 w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:t(N,{shouldFilter:!1,children:[t("div",{className:"flex justify-between items-center border-b px-3","cmdk-input-wrapper":"",children:[e(xe,{placeholder:i,value:d,onValueChange:I,className:"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),m&&e("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"})]}),e(we,{children:m?"Searching...":$?"No collections found.":"No collections available."}),t(C,{className:"max-h-[300px] overflow-auto",children:[A&&e(j,{value:"__clear__",onSelect:T,className:"text-muted-foreground",children:"Clear selection"}),k?.map((n=>t(j,{value:n.id,onSelect:()=>P(n),className:g("flex items-center justify-between",r===n.id?"bg-muted/20":""),children:[t("div",{className:"flex flex-col flex-1 min-w-0",children:[e("span",{className:"truncate font-medium",children:n.name}),n.description&&e("span",{className:"text-sm text-muted-foreground truncate",children:n.description})]}),e(Nt,{className:g("ml-2 h-4 w-4 shrink-0",r===n.id?"opacity-100":"opacity-0")})]},n.id)))]})]})})]})}function _s({action:n,objectIds:r,children:a}){const{store:s}=Oe(),i=f(),[l,c]=o(!1),d=h((()=>(c(!0),Promise.resolve(!0))),[]);Js(n.id,d);return t("div",{children:[a,e(ys,{isOpen:l,onClose:e=>{c(!1),void 0!==e&&s.runOperation({name:"change_type",ids:r,params:{typeId:e}}).then((e=>{i({status:"success",title:"Change Type",description:`Change the type of ${r.length} objects is ${"in_progress"===e.status?"in progress":"completed"}`,duration:2e3})})).catch((e=>{i({status:"error",title:"Error changing type",description:e.message,duration:5e3})}))},title:"Change Content Type",confirmLabel:"Change Type",children:t("div",{className:"text-sm flex flex-col gap-x-2",children:[t("p",{children:["Choose a new Content Type for the selected object",r.length>1?"s":" ","or let the system choose or generate a type based on the content."]}),t("p",{className:"pt-2 text-xs",children:["Note: This action will raise the ",e("code",{children:"change_type"})," event and will trigger the standard intake workflows which may reset the object properties."]})]})})]})}const Ps={id:"changeType",name:"Change Content Type",description:"Change the Content Type of the selected documents",confirm:!1,component:_s};function Ts({action:r,callback:a,children:s}){const[i,l]=o(!1),c=r.confirmationText||`Are you sure you want to ${r.name}?`,d=h((e=>r.confirm?(l(!0),Promise.resolve(!0)):a(e)),[r.confirm,a]),u=Js(r.id,d);return t(n,{children:[s,e(ye,{onConfirm:()=>{l(!1),a({...u.params,action:r})},onCancel:()=>l(!1),title:"Are you sure?",content:c,isOpen:i})]})}function Is({action:t,objectIds:n,children:r}){const a=Bs(),s=f(),{client:i}=Oe(),l=fa(),o=Lt(),c=h((()=>n&&n.length?Promise.all(n.map((e=>i.store.objects.delete(e)))).then((e=>{const t=e.length>1?"s":"";if(s({status:"success",title:`${e.length} object${t} deleted`,description:`Objects ${e.map((e=>e.id)).join(", ")} have been deleted`,duration:2e3}),l){a.params?.selection?.removeAll();const e=JSON.parse(JSON.stringify(l.facets));n.length===e._value.total&&l.resetFacets(),l.search()}else o("/objects")})).catch((e=>{s({status:"error",title:"Error deleting objects",description:e.message,duration:5e3})})):(s({status:"error",title:"No objects selected",description:"Please select objects to delete",duration:3e3}),Promise.resolve(!1))),[n]);return e(Ts,{action:t,callback:c,children:r})}const $s={id:"delete",name:"Delete",description:"Delete the selected objects",confirm:!0,confirmationText:"Are you sure you want to delete the selected objects?",component:Is,destructive:!0};function As({action:t,objectIds:n}){const{store:r}=Oe(),a=f(),[s,i]=o(!1),[l,c]=o(!1),d=h((()=>(i(!0),Promise.resolve(!0))),[]),u=Js(t.id,d);return e("div",{children:e(Ha,{isExporting:l,isOpen:s,onClose:(e,t)=>{if(e&&(t||n.length>0)){c(!0);const s=u.params?.search?.query||{},l=u.params?.search?.result?.value?.objects?.map((e=>e.id))||void 0,o=async e=>r.objects.list({query:{parent:e}}).then((e=>e.map((e=>e.id))));(async()=>t?l?s.vector?l:[]:0===n.length?[]:(await o(n[0])).concat(n):n)().then((l=>{r.objects.exportProperties({objectIds:l,type:e,query:t&&!s.vector?s:{type:s.type}}).then((r=>{let s;if(e===Ga.CSV)s=new Blob([r.data],{type:r.type});else if(e===Ga.JSON)s=new Blob([JSON.stringify(r.data)],{type:r.type});else{const e=r.data;s=new Blob([new Uint8Array(e.data)],{type:r.type})}const i=window.URL.createObjectURL(s),l=document.createElement("a");l.download=r.name,l.href=i,l.click(),a({status:"success",title:"Export Properties",description:t?"Export the properties of all objects completed":`Export the properties of ${n.length} object${n.length>1?"s":""} is completed`,duration:2e3})})).catch((e=>{a({status:"error",title:"Error Export Properties",description:e.message,duration:5e3})})).finally((()=>{c(!1),i(!1)}))}))}else i(!1)}})})}const Es={id:"exportProperties",name:"Export Properties",description:"Export all Object Properties",confirm:!1,component:As};function zs({action:t,objectIds:n,collectionId:r}){const a=Bs(),s=f(),{client:i}=Oe(),l=fa(),o=h((()=>n&&n.length?r?i.store.collections.deleteMembers(r,n).then((()=>{const e=n.length>1?"s":"";s({status:"success",title:`${n.length} object${e} removed from collection`,description:"Objects have been removed from the collection",duration:2e3}),l&&(a.params?.selection?.removeAll(),l.search())})).catch((e=>{s({status:"error",title:"Error removing objects from collection",description:e.message,duration:5e3})})):(s({status:"error",title:"No collection context",description:"Cannot remove objects: no collection specified",duration:3e3}),Promise.resolve(!1)):(s({status:"error",title:"No objects selected",description:"Please select objects to remove from collection",duration:3e3}),Promise.resolve(!1))),[n,r]);return e(Ts,{action:t,callback:o})}const Ls={id:"removeFromCollection",name:"Remove from Collection",description:"Remove the selected objects from this collection",confirm:!0,confirmationText:"Are you sure you want to remove the selected objects from this collection?",component:zs,destructive:!0};function Us({action:t,objectIds:n,collectionId:r}){const a=f(),{client:s}=Oe(),[i,l]=o(!1),c=h((()=>(l(!0),Promise.resolve(!0))),[]);return Js(t.id,c),e(Os,{isOpen:i,onClose:e=>{if(l(!1),e)return s.store.workflows.rules.execute(e,n,{collection_id:r}).then((()=>{a({title:"Workflow started",status:"success",duration:3e3})})).catch((e=>{a({title:"Error starting workflow",status:"error",description:e.message,duration:9e3})}))}})}const Ds={id:"startWorkflow",name:"Start Workflow",description:"Start an workflow on the selected objects",confirm:!1,hideInList:!0,component:Us};function Os({isOpen:n,onClose:r}){return t(ee,{onClose:()=>r(void 0),isOpen:n,className:"",children:[e(te,{children:"Start a Workflow by Rule"}),e(Rs,{onClose:r})]})}function Fs(n){return{label:t("div",{children:[e("div",{children:n.name}),e("div",{className:"text-sm text-muted",children:n.description})]}),reverse:!0}}function Rs({onClose:n}){const[r,a]=o(void 0),s=Bs();return t("div",{children:[t(ne,{children:[e("div",{className:"pb-2",children:"Choose a workflow rule to start:"}),e("div",{className:"max-h-[420px] overflow-y-scroll border-border border rounded-md",children:e(Ne,{options:s.wfRules,optionLayout:Fs,onChange:e=>{a(e)},value:r})})]}),t(ae,{children:[e(b,{variant:"secondary",onClick:()=>n(),children:"Cancel"}),e(b,{onClick:()=>{r&&n(r.id)},isDisabled:!r,children:"Start"})]})]})}class Ms{params;allActions=[Es,Ps,Ds,Ks,$s,Ls];wfRules=[];callbacks={};startWorkflow;constructor(e){this.params=e}get actions(){return!!this.params.selection?.collectionId?this.allActions.filter((e=>"addToCollection"!==e.id&&"delete"!==e.id)):this.allActions.filter((e=>"removeFromCollection"!==e.id))}async loadWorkflows(){return this.params.client.workflows.rules.list().then((e=>{this.wfRules=e.map((e=>({id:e.id,name:e.name,description:e.description,confirm:!1,isWorkflow:!0,component:Us}))).sort(((e,t)=>e.name.localeCompare(t.name)))})),this.wfRules}registerCallback(e,t){return this.callbacks[e]=t,()=>{delete this.callbacks[e]}}unregisterCallback(e){delete this.callbacks[e]}findAction(e){let t=this.allActions.find((t=>t.id===e));return t||(t=this.wfRules.find((t=>t.id===e))),t}async run(e){const t=this.findAction(e);if(!t)throw new Error(`Action ${e} not found`);const n={...this.params,action:t},r=this.callbacks[e];if(r)return r(n);throw new Error("No action callback set")}}const Vs=d(void 0);function qs({children:n}){const r=aa(),a=f(),{client:s}=Oe(),i=fa(),{data:o,error:c}=W((()=>s.workflows.rules.list().then((e=>e.map((e=>({id:e.id,name:e.name,description:e.description,confirm:!1,isWorkflow:!0,component:Us}))).sort(((e,t)=>e.name.localeCompare(t.name)))))),[]),d=l((()=>{const e=new Ms({selection:r,toast:a,client:s,search:i});return e.wfRules=o,e}),[r,o]);return c?e(le,{title:"Failed to fetch workflows",children:c.message}):d&&t(Vs.Provider,{value:d,children:[e(Ws,{}),n]})}function Ws({}){const t=Bs(),n=t.params.selection,r=n.getObjectId(),a=n.isSingleSelection()&&r?[r]:n.getObjectIds();return e("div",{style:{display:"none"},children:t.allActions.map((t=>e(t.component,{action:t,objectIds:a,collectionId:n.collectionId},t.id)))})}function Bs(){const e=u(Vs);if(!e)throw new Error("You cannot use useActionContext outside an ActionProvider");return e}function Js(e,t){const n=Bs();return c((()=>n.registerCallback(e,t)),[n,e,t]),n}function Gs(e){const t=Bs();return c((()=>(t.startWorkflow=e,()=>{t.startWorkflow=void 0})),[e,t]),t}function Hs({action:t,objectIds:n}){const[r,a]=o(!1),s=h((()=>(n.length>0&&a(!0),Promise.resolve(!0))),[n]);return Js(t.id,s),r&&e(ke,{children:e(Ys,{objectIds:n,isOpen:r,onClose:()=>{a(!1)}})})}const Ks={id:"addToCollection",name:"Add to Collection",description:"Add documents to a collection",confirm:!1,component:Hs};function Ys({isOpen:n,onClose:r,objectIds:a}){return t(ee,{isOpen:n,onClose:r,className:"max-w-lg w-full min-w-0 overflow-hidden",children:[e(te,{className:"flex flex-col min-w-0 overflow-hidden",children:"Add to a Collection"}),e(Ce,{className:"min-w-0 overflow-hidden",children:"Add the selected objects to an existing collection or create a new one."}),e("div",{className:"min-w-0 max-w-full overflow-hidden",children:e(Qs,{onClose:r,objectIds:a})})]})}function Qs({onClose:n,objectIds:r}){const a=f(),{client:s}=Oe(),[i,l]=o(),c=({collectionId:e})=>{e&&r?.length&&s.store.collections.addMembers(e,r).then((()=>{a({title:"Add to collection success",status:"success",description:`Added ${r.length} objects to the selected collection`,duration:3e3}),n()})).catch((()=>{a({title:"Add to collection failure",status:"error",description:"Failed to add the selected objects to the collection",duration:5e3})}))},d=[{name:"select",label:"Select Collection",content:t("div",{className:"p-4 min-w-0 max-w-full overflow-hidden",children:[e(je,{level:5,children:"Choose from existing collections"}),e(ne,{className:"min-w-0 max-w-full overflow-hidden",children:e("div",{className:"mb-4 min-w-0 max-w-full overflow-hidden",children:e(Ss,{onChange:e=>{l(e)},value:i})})}),e(ae,{children:e(b,{isDisabled:!i,onClick:()=>i&&c({collectionId:i}),children:"Add to Collection"})})]})},{name:"create",label:"Create new",content:e("div",{className:"p-4",children:e(es,{onClose:n,onAddToCollection:e=>c({collectionId:e}),redirect:!1})})}];return t(Se,{defaultValue:"select",tabs:d,fullWidth:!0,children:[e(_e,{}),e(Pe,{})]})}function Xs(){const n=aa(),r=n.size(),a=r>1?"s":"",s=n?.hasSelection(),i=n?.isSingleSelection();return e(qs,{children:t("div",{className:"flex items-center gap-x-2",children:[s&&!i&&t("div",{className:"flex items-center gap-x-1 shrink-0",children:[t("div",{className:"text-sm nowrap",children:[r," document",a," selected"]}),e(b,{title:"Clear selection",variant:"ghost",onClick:()=>{n?.removeAll()},children:e(Fe,{className:"size-4"})})]}),e(ri,{selection:n,children:e(b,{variant:"ghost",alt:"More action",size:"sm",children:e(kt,{size:16})})}),s&&e(Zs,{selection:n})]})})}function Zs({}){return e(ti,{})}function ei({collectionId:r}){const[a,s]=o([]),i=aa(),l=i?.hasSelection();return!l&&t(n,{children:[e(b,{onClick:()=>(()=>{const e=document.createElement("input");e.type="file",e?.click(),e.onchange=e=>{const t=e.target.files;t&&s(Array.from(t))}})(),children:"Upload"}),e(ka,{collectionId:r??"",isOpen:a.length>0,onClose:()=>s([]),files:a,title:"Upload Files",onUploadComplete:e=>{e&&e.success&&s([])},children:e("div",{className:"text-sm",children:"Select the associated Content Type, or let the system choose or generate the type based on the content."})})]})}function ti(){const t=Bs();return t.params.selection.hasSelection()&&e(b,{onClick:()=>t.run(Ds.id),children:"Start Workflow"})}function ni(e){return{label:e.name,className:r("flex-1 px-2 py-2 hover:bg-accent nowrap",e.destructive?"text-destructive":"")}}function ri({selection:n,children:r}){const a=Bs();return t(v,{hover:!0,children:[e(x,{children:r}),e(w,{className:"p-0 w-50",align:"end",sideOffset:6,children:e(ai,{executeAction:e=>{a.run(e.id)},selection:n})})]})}function ai({executeAction:t,selection:n}){const r=Bs(),a=n?.hasSelection()?r.actions.filter((e=>!e.hideInList)):[Es];return e("div",{className:"rounded-md shadow-md py-2",children:e("div",{className:"px-1 text-sm",children:e(Ne,{options:a,optionLayout:ni,onChange:e=>{t(e)},noCheck:!0})})})}function si({value:n,onChange:r,onSend:a,disabled:s=!1,isSending:i=!1,isCompleted:l=!1,activeTaskCount:d=0,placeholder:u="Type your message..."}){const h=m(null),[p,g]=o(!1);c((()=>{!s&&l&&h.current?.focus()}),[s,l]);return t("div",{className:"p-3 border-t border-muted flex-shrink-0",style:{minHeight:"90px"},children:[t("div",{className:"flex items-center space-x-2",children:[t("div",{className:"flex flex-1 space-x-1",children:[e($,{ref:h,value:n,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),a())},onChange:r,disabled:s||i,placeholder:u,className:"pr-12 py-2.5"}),e(b,{variant:"ghost",className:"rounded-full",disabled:!l,onClick:()=>g(!0),alt:"Link Object",children:e(Ct,{className:"size-4"})})]}),t(b,{onClick:a,disabled:s||i||!n.trim(),className:"px-4 py-2.5",children:[i?e(D,{size:"sm",className:"mr-2"}):e(jt,{className:"size-4 mr-2"})," Send"]})]}),e("div",{className:"text-xs text-muted mt-2 text-center",children:d>0?t("div",{className:"flex items-center justify-center",children:[e(St,{className:"h-3 w-3 mr-1 text-attention"}),t("span",{children:["Agent has ",d," active workstream",1!==d?"s":""," running"]})]}):s?"Agent is processing, you can continue once it completes...":"You can send a message at any time"}),t(ee,{isOpen:p,onClose:()=>g(!1),className:"min-w-[60vw]",children:[e(te,{children:"Link Object"}),e(ne,{className:"pb-6",children:e($a,{onChange:e=>{const t=`[${e.properties?.title||e.name||"Object"}](store:${e.id})`,a=n||"",s=h.current?.selectionStart||a.length,i=a.substring(0,s)+t+a.substring(s);r(i),g(!1),setTimeout((()=>{if(h.current){h.current.focus();const e=s+t.length;h.current.setSelectionRange(e,e)}}),100)}})})]})]})}function ii({plan:n,workstreamStatus:r,isVisible:a}){return a?t("div",{className:"border-b border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900 p-3 shadow-sm transition-all duration-300 ease-in-out transform",children:[e("div",{className:"text-xs font-medium mb-2 text-gray-800 dark:text-gray-200",children:"Agent Plan"}),n.plan&&n.plan.length>0?e("div",{className:"space-y-1.5",children:n.plan.map(((n,a)=>{const s=n.id.toString(),i=n.goal;let l=n.status||"pending";r.has(s)&&(l=r.get(s));let o=Re,c="text-gray-400";return"in_progress"===l?(o=Ve,c="text-blue-500"):"completed"===l&&(o=qe,c="text-green-500"),t("div",{className:"flex items-start",children:[e("div",{className:`mr-1.5 mt-0.5 ${c}`,children:e(o,{className:"h-3.5 w-3.5"})}),t("div",{className:"text-xs",children:[e("span",{className:"text-gray-700 dark:text-gray-300",children:i}),e("span",{className:"ml-1 bg-gray-200 dark:bg-gray-700 px-1 py-0.5 rounded text-[10px] font-mono",children:s})]})]},a)}))}):t("div",{className:"text-xs text-gray-500 dark:text-gray-400 italic flex items-center",children:[e(Me,{className:"h-3.5 w-3.5 mr-1.5 text-amber-500"}),"No plan detected yet"]}),r.size>1&&t("div",{className:"mt-3 pt-2 border-t border-gray-200 dark:border-gray-700",children:[e("div",{className:"text-xs font-medium mb-1.5 text-gray-800 dark:text-gray-200",children:"Workstreams"}),e("div",{className:"grid grid-cols-2 gap-1.5",children:Array.from(r.entries()).filter((([e,t])=>{if("main"===e)return!0;if(/^\d+$/.test(e))return!1;if(n?.plan){return!n.plan.find((t=>t.id?.toString()===e))}return!0})).map((([n,r])=>{let a=Re,s="text-gray-400",i="Pending";"in_progress"===r?(a=Ve,s="text-blue-500",i="In Progress"):"completed"===r&&(a=qe,s="text-green-500",i="Completed");const l="main"===n?"Main":n;return t("div",{className:"flex items-center",children:[e("div",{className:`mr-1.5 ${s}`,children:e(a,{className:"h-3 w-3"})}),e("span",{className:"text-[10px] font-medium text-gray-600 dark:text-gray-400",children:l}),e("span",{className:"text-[10px] text-gray-500 dark:text-gray-500 ml-1",children:i})]},n)}))})]})]}):null}function li(t){const{run:n,startWorkflow:r}=t;if(n){const r="runId"in n?n:{runId:n.run_id,workflowId:n.workflow_id};return e(di,{...t,run:r})}return r?e(ci,{...t}):e(oi,{})}function oi(){return t(re,{status:"info",icon:e(Be,{className:"size-16 text-muted mb-4"}),children:[e("div",{className:"text-base font-medium text-muted",children:"No agent currently running"}),e("div",{className:"mt-3 text-sm text-muted",children:"Select an interaction and click Start to start an agent"})]})}function ci({initialMessage:n,startWorkflow:r,onClose:a,isModal:s=!1,placeholder:i="Type your message...",startButtonText:l="Start Agent",title:d="Start New Conversation"}){const[u,h]=o(""),[p,g]=o(!1),[y,v]=o(),x=f(),w=m(null);c((()=>{w.current&&w.current.focus()}),[]);const N=async()=>{if(!r)return;const e=u.trim();if(e&&!p){g(!0);try{sessionStorage.removeItem("plan-panel-shown"),x({title:"Starting agent...",status:"info",duration:3e3});const t=await r(e);t&&(v({runId:t.run_id,workflowId:t.workflow_id}),h(""),x({title:"Agent started",status:"success",duration:3e3}))}catch(e){x({title:"Error starting workflow",status:"error",duration:3e3,description:e instanceof Error?e.message:"Unknown error"})}finally{g(!1)}}};return y?e(di,{onClose:a,isModal:s,initialMessage:n,placeholder:i,run:y,title:d}):t("div",{className:"flex flex-col h-full bg-white dark:bg-gray-900 overflow-hidden border-0",children:[t("div",{className:"flex items-center justify-between py-2 px-3 border-b border-gray-100 dark:border-gray-800 bg-white dark:bg-gray-900",children:[t("div",{className:"flex items-center space-x-2",children:[e("div",{className:"p-1",children:e(_t,{className:"h-3.5 w-3.5 text-gray-400 dark:text-gray-500"})}),e("span",{className:"font-medium text-sm text-gray-700 dark:text-gray-300",children:d})]}),a&&!s&&e(b,{size:"xs",variant:"ghost",onClick:a,title:"Close",className:"text-slate-500 hover:text-slate-700",children:e(Ye,{className:"h-4 w-4"})})]}),t("div",{className:"flex-1 overflow-y-auto px-4 py-6 bg-white dark:bg-gray-900 flex flex-col items-center justify-center",children:[n&&e("div",{className:"px-4 py-3 mb-4 bg-blue-50/80 dark:bg-blue-900/30 border-l-2 border-blue-400 dark:border-blue-500 text-blue-700 dark:text-blue-300 max-w-md",children:n}),t("div",{className:"bg-white dark:bg-slate-800 p-4 max-w-md border-l-2 border-blue-400 dark:border-blue-500",children:[e("div",{className:"text-base text-slate-600 dark:text-slate-300 font-medium",children:"Enter a message to start a conversation"}),t("div",{className:"mt-3 text-sm text-slate-500 dark:text-slate-400",children:["Type your question below and press Enter or click ",l," ","to begin"]})]})]}),t("div",{className:"py-3 px-3 border-t border-gray-100 dark:border-gray-800 bg-white dark:bg-gray-900",children:[t("div",{className:"flex items-center gap-2",children:[e("div",{className:"flex-1",children:e("input",{ref:w,value:u,onChange:e=>h(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),N())},placeholder:i,disabled:p,className:"w-full py-2 px-3 text-sm border border-gray-200 dark:border-gray-700 dark:bg-gray-800 dark:text-white focus:border-gray-300 dark:focus:border-gray-600 focus:ring-0 rounded-md"})}),t(b,{onClick:N,disabled:!u.trim()||p,className:"px-3 py-2 bg-gray-800 dark:bg-gray-700 hover:bg-gray-700 dark:hover:bg-gray-600 text-white text-xs rounded-md transition-colors",children:[p?e(D,{size:"sm",className:"mr-1.5"}):e(jt,{className:"h-3.5 w-3.5 mr-1.5"}),l]})]}),e("div",{className:"text-xs text-gray-400 dark:text-gray-500 mt-2 text-center",children:"Type a message to start the conversation"})]})]})}function di({run:n,title:r,interactive:a=!0,onClose:s,isModal:i=!1,placeholder:d="Type your message...",resetWorkflow:u}){const{client:h}=Oe(),p=m(null),[g,y]=o([]),[b,v]=o(!1),[x,w]=o(""),[N,k]=o(!1),[C,j]=o("sliding"),[S,_]=o(!1),[P,T]=o(!1),[I,$]=o([]),[A,E]=o(0),[z,L]=o(new Map),[U,D]=o(0),O=f(),[F,R]=o(a),[M,V]=o(null),q=l((()=>{const e=I[A]||{plan:{plan:[]},timestamp:0},t=z.get(e.timestamp)||new Map;return{plan:e.plan,workstreamStatus:t}}),[I,A,z]);c((()=>{if(!b){const e=setInterval((()=>{D((()=>Math.floor(Math.random()*(Pn.length-1))))}),4e3);return()=>clearInterval(e)}}),[b]);c((()=>(y([]),$([]),E(0),L(new Map),T(!1),V(null),(async()=>{try{const e=await h.store.workflows.getRunDetails(n.runId,n.workflowId);V(e.status)}catch(e){console.error("Failed to check workflow status:",e)}})(),h.store.workflows.streamMessages(n.workflowId,n.runId,(e=>{e.message&&y((t=>t.find((t=>t.timestamp===e.timestamp))?t:(function(e,t){const n="number"==typeof t.timestamp?t.timestamp:new Date(t.timestamp).getTime(),r=e.findIndex((e=>("number"==typeof e.timestamp?e.timestamp:new Date(e.timestamp).getTime())>n));-1===r?e.push(t):e.splice(r,0,t)}(t,e),[...t])))})),()=>{y([])})),[n.runId,h.store.workflows]),c((()=>{v(!function(e){if(!e.length)return!0;const t=new Map;if(e.forEach((e=>{const n=In(e);t.has(n)||t.set(n,[]),t.get(n).push(e)})),console.log("[isInProgress] Workstreams found:",Array.from(t.keys())),1===t.size&&!t.has("main")){const e=t.keys().next().value||"unknown";console.log(`[isInProgress] Only one workstream found (${e}), treating as main`);const n=t.get(e),r=n[n.length-1];return console.log(`[isInProgress] Last message type in only workstream: ${r.type}`),Tn.includes(r.type)?(console.log("[isInProgress] Only workstream is completed"),!1):(console.log("[isInProgress] Only workstream is still in progress"),!0)}if(t.has("main")){const e=t.get("main");if(0===e.length)return console.log("[isInProgress] Main workstream exists but has no messages, still in progress"),!0;const n=e[e.length-1];return console.log(`[isInProgress] Last message type in main workstream: ${n.type}`),Tn.includes(n.type)?(console.log("[isInProgress] Main workstream is completed"),!1):(console.log("[isInProgress] Main workstream is still in progress"),!0)}console.log("[isInProgress] Multiple workstreams but no main, checking if any are still active");for(const[e,n]of t.entries())if(n.length>0){const t=n[n.length-1];if(!Tn.includes(t.type))return console.log(`[isInProgress] Workstream ${e} is still active`),!0}return console.log("[isInProgress] All workstreams are completed"),!1}(g)),0===I.length&&T(!1)}),[g,I.length]),c((()=>{if(1===I.length&&!P&&!sessionStorage.getItem("plan-panel-shown")){const e=setTimeout((()=>{T(!0),sessionStorage.setItem("plan-panel-shown","true")}),500);return()=>clearTimeout(e)}g.forEach((e=>{if(e.type===Ie.PLAN)try{console.log("PLAN message received:",e.type);let t=null;if(e.details&&"object"==typeof e.details&&e.details.plan&&Array.isArray(e.details.plan)&&(console.log("Valid plan array found in message.details.plan"),t={plan:e.details.plan}),t){const n="number"==typeof e.timestamp?e.timestamp:new Date(e.timestamp).getTime();if(-1===I.findIndex((e=>e.timestamp===n))&&t){console.log("Adding new plan to plans array");const e={plan:t,timestamp:n};console.log("Adding plan to plans array:",e),$((t=>{const n=[e,...t];return console.log("New plans array:",n),n})),E(0),console.log("Setting showSlidingPanel to true"),T(!0);const r=new Map;r.set("main","in_progress"),Array.isArray(t.plan)&&t.plan.forEach((e=>{if(e&&"object"==typeof e&&e.id){const t=e.id.toString();r.set(t,e.status||"pending")}})),L((e=>{const t=new Map(e);return t.set(n,r),t}))}}}catch(e){console.error("Failed to parse plan from message:",e)}e.type===Ie.UPDATE&&e.details&&e.details.updates&&Array.isArray(e.details.updates)&&console.log("Ignoring UPDATE message with details.updates - waiting for PLAN message with full plan")}));const e=g[g.length-1];e&&(e.type===Ie.TERMINATED?(R(!1),V("TERMINATED")):R(!!a||e.type===Ie.REQUEST_INPUT))}),[g,I,A]);const W=r||n.workflowId.split(":")[2]||"Agent Conversation";return t("div",{className:"flex flex-col h-full min-h-0 "+(i?"rounded-lg overflow-hidden":""),children:[e(Fn,{title:W,isCompleted:b,onClose:s,isModal:i,run:n,viewMode:C,onViewModeChange:j,showPlanPanel:P,hasPlan:I.length>0,onTogglePlanPanel:()=>{T(!P),P||sessionStorage.setItem("plan-panel-shown","true")},onDownload:async()=>{try{const e=await async function(e,t){return e.files.getDownloadUrl(`agents/${t}/conversation.json`).then((e=>e.url))}(h,n.runId);e&&window.open(e,"_blank")}catch(e){console.error("Failed to download conversation",e),O({status:"error",title:"Failed to download conversation",duration:3e3})}},onCopyRunId:()=>{navigator.clipboard.writeText(n.runId),O({status:"success",title:"Run ID copied",duration:2e3})},resetWorkflow:u}),S&&!P&&I.length>0&&e(ii,{plan:q.plan,workstreamStatus:q.workstreamStatus,isVisible:!0}),0!==g.length||b?e(zn,{messages:g,bottomRef:p,viewMode:C,isCompleted:b,plan:q.plan,workstreamStatus:q.workstreamStatus,showPlanPanel:P,onTogglePlanPanel:()=>{console.log("Toggle plan panel called, current state:",P),T(!P)},plans:I,activePlanIndex:A,onChangePlan:e=>E(e),taskLabels:q.plan.plan?.reduce(((e,t)=>(t.id&&t.goal&&e.set(t.id.toString(),t.goal),e)),new Map)}):e("div",{className:"flex-1 flex flex-col items-center justify-center h-full text-center py-6 bg-white dark:bg-gray-900",children:t("div",{className:"bg-white dark:bg-slate-800 p-5 max-w-md border border-blue-200 dark:border-blue-900/50 rounded-lg shadow-sm",children:[t("div",{className:"flex items-center space-x-3 mb-3",children:[e(Nn,{size:"sm",color:"blue"}),e("div",{className:"text-sm text-slate-600 dark:text-slate-300 font-medium",children:Pn[U]})]}),e("div",{className:"mt-4 flex justify-center",children:e(wn,{color:"blue",className:"mt-1"})})]})}),M&&("RUNNING"!==M?t(re,{status:"COMPLETED"===M?"success":"done",icon:null,className:"flex-shrink-0 m-2",children:["This Workflow is ",M]}):F&&e(si,{value:x,onChange:w,onSend:()=>{const e=x.trim();e&&!N&&(k(!0),w(""),h.store.workflows.sendSignal(n.workflowId,n.runId,"UserInput",{message:e}).then((()=>{v(!1),O({status:"success",title:"Message Sent",duration:2e3})})).catch((e=>{O({status:"error",title:"Failed to Send Message",description:e instanceof Error?e.message:"Unknown error",duration:3e3})})).finally((()=>{k(!1)})))},disabled:!1,isSending:N,isCompleted:b,activeTaskCount:(()=>{if(!g.length)return 0;const e=new Map;g.forEach((t=>{const n=In(t);"main"!==n&&"all"!==n&&(e.has(n)||e.set(n,[]),e.get(n).push(t))}));let t=0;for(const[n,r]of e.entries())if(r.length>0){const e=r[r.length-1];[Ie.COMPLETE,Ie.IDLE].includes(e.type)||t++}return t})(),placeholder:d}))]})}function ui({children:t,fallback:n}){return mi?e(mi,{fallback:n,children:t}):e(sn,{FallbackComponent:n,children:t})}let mi=null;function hi(e){mi=e}function pi({children:t}){return e(ui,{fallback:gi,children:t})}function gi({error:n}){return t(re,{status:"error",title:"Sorry, something went wrong...",children:[t("div",{className:"mb-4",children:["Our team has been notified and will be quickly working on resolving it. If you'd like to escalate or simply contact us, please email us at ",e("a",{className:"text-info",href:"mailto:support@vertesiahq.com",children:"support@vertesiahq.com"}),"."]}),n?.message&&e("code",{className:"w-full mt-4 text-sm text-muted break-words",children:n.message})]})}function fi({children:t}){return e(ui,{fallback:yi,children:t})}function yi({error:n}){return e("tr",{children:t("td",{colSpan:100,children:[e("span",{className:"text-xs",children:" Cannot display row"}),e("br",{}),e("span",{className:"bg-gray-400",children:n?.message})]})})}function bi({children:t}){return e(ui,{fallback:vi,children:t})}function vi({error:n}){return console.log("WidgetError",n),t("div",{className:"text-sm",children:["Sorry, this area cannot be loaded or rendered.",n?.message&&e("pre",{children:n.message})]})}function xi({className:n,children:a,title:s,description:i,actions:l,breadcrumbs:o,isCompact:c=!1}){return t("div",{className:r(c?"pb-0":"pb-2","p-4 flex flex-col",n),children:[t("div",{className:"flex items-start gap-4",children:[t("div",{className:"w-full flex place-content-between h-auto min-h-8 flex-col items-start",children:[e("nav",{className:"flex-1 flex justify-start text-xs",children:o?.map(((n,r)=>t("div",{className:"flex items-center text-muted",children:[n,r<o.length-1&&e(yt,{className:"w-3.5 h-3.5"})]},r)))}),t("div",{className:"flex gap-2 items-center",children:[e("h1",{className:"text-xl font-semibold break-all",children:s}),i&&e(M,{description:i,children:e(Ge,{className:"size-4 text-muted"})})]})]}),e("div",{className:"flex gap-x-2 shrink-0",children:l})]}),a&&e("div",{className:"w-full flex items-center",children:a})]})}function wi({}){return t("div",{className:"text-center pt-32",children:[e("h1",{className:"text-3xl font-bold text-red-500",children:"404"}),e("p",{className:"text-2xl",children:"Page Not Found"})]})}class Ni{totalPages;layoutUrls=[];cache;constructor(e){this.totalPages=e,this.cache=new Array(e)}async loadUrls(e,t){const n=[];for(let r=0;r<this.totalPages;r++)n.push($i(e,t,r+1));const r=await Promise.all(n);this.layoutUrls=r.map((e=>e.url))}async getPageLayout(e){const t=e-1;let n=this.cache[t];if(void 0===n){const e=this.layoutUrls[t];n=await fetch(e,{method:"GET"}).then((e=>{if(e.ok)return e.text();throw new Error("Failed to fetch json layout: "+e.statusText)})),this.cache[t]=n}return n}}class ki{totalPages;markdownUrls=[];cache;constructor(e){this.totalPages=e,this.cache=new Array(e)}async loadUrls(e,t){const n=[];for(let r=0;r<this.totalPages;r++)n.push(Ai(e,t,r+1));const r=await Promise.all(n);this.markdownUrls=r.map((e=>e.url))}async getPageMarkdown(e){const t=e-1;let n=this.cache[t];if(void 0===n){const e=this.markdownUrls[t];n=await fetch(e,{method:"GET"}).then((e=>{if(e.ok)return e.text();throw new Error("Failed to fetch markdown: "+e.statusText)})),this.cache[t]=n}return n}}const Ci=d(void 0);function ji({children:t,object:n}){const{client:r}=Oe(),[a,s]=o();return c((()=>{const e=n.metadata.page_count||10;(async function(e,t,n){const r=[];for(let a=0;a<n;a++)r.push(_i(e,t.id,a+1));const a=await Promise.all(r),s=[];for(let r=0;r<n;r++)s.push(Pi(e,t.id,r+1));const i=await Promise.all(s),l=[];for(let r=0;r<n;r++)l.push(Ti(e,t.id,r+1));const o=await Promise.all(l),c=[];for(let r=0;r<n;r++)c.push(Ii(e,t.id,r+1));const d=await Promise.all(c),u=new Ni(n);await u.loadUrls(e,t.id);const m=new ki(n);await m.loadUrls(e,t.id);const h=t.text?Li(t.text):"";return{count:n,urls:a.map((e=>e.url)),originalUrls:d.map((e=>e.url)),annotatedUrls:i.map((e=>e.url)),instrumentedUrls:o.map((e=>e.url)),layoutProvider:u,markdownProvider:m,xml:h,xmlPages:t.text?zi(h):[]}})(r,n,e).then(s)}),[n.id]),a&&e(Ci.Provider,{value:a,children:t})}function Si(e){return`magic-pdf/${e}`}function _i(e,t,n){return e.files.getDownloadUrl(function(e,t,n=".jpg"){return`${Si(e)}/pages/page-${t}${n}`}(t,n))}function Pi(e,t,n){return e.files.getDownloadUrl(function(e,t,n=".jpg"){return`${Si(e)}/pages/page-${t}-annotated${n}`}(t,n))}function Ti(e,t,n){return e.files.getDownloadUrl(function(e,t,n=".jpg"){return`${Si(e)}/pages/page-${t}.instrumented${n}`}(t,n))}function Ii(e,t,n){return e.files.getDownloadUrl(function(e,t,n=".jpg"){return`${Si(e)}/pages/page-${t}.original${n}`}(t,n))}function $i(e,t,n){return e.files.getDownloadUrl(function(e,t){return`${Si(e)}/pages/page-${t}.layout.json`}(t,n))}function Ai(e,t,n){return e.files.getDownloadUrl(function(e,t){return`${Si(e)}/pages/page-${t}.md`}(t,n))}function Ei(){const e=i.useContext(Ci);if(!e)throw new Error("usePdfPagesInfo must be used within a PdfPageProvider");return e}function zi(e){const t=(new DOMParser).parseFromString(Li(e),"text/xml").getElementsByTagName("page"),n=new XMLSerializer;return Array.from(t).map((e=>n.serializeToString(e)))}function Li(e){return e.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g,"").replace(/<\?xml.*?\?>/g,"")}function Ui({object:r}){const{client:a}=Oe(),s=e=>{(function(e,t,n){return e.files.getDownloadUrl(`${Si(t)}/${n}`).then((e=>e.url))})(a,r.id,e).then((e=>window.open(e,"_blank")))},i=(()=>{if("document"===r.metadata?.type){const e=r.metadata;return e.content_processor?.type||"xml"}return"xml"})();return e("div",{className:"absolute bottom-[58px] right-[20px] w-[36px] h-[36px] cursor-pointer text-indigo-400 border-indigo-400 hover:border-indigo-500 hover:text-indigo-500 border-2 rounded-full shadow-xs flex items-center justify-center",children:t(Yt,{strategy:"absolute",placement:"top-end",zIndex:100,offset:20,children:[e(Yt.Trigger,{click:!0,children:e(Pt,{className:"size-6"})}),e(Yt.Content,{children:e("div",{className:"rounded-md shadow-md border border-gray-100 bg-white dark:bg-slate-50 dark:border-slate-100 min-w-[200px] flex flex-col divide-y",children:"markdown"===i?e("button",{className:"p-2 cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-100",onClick:()=>s("document.md"),children:"document.md"}):t(n,{children:[e("button",{className:"p-2 cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-100",onClick:()=>s("annotated.pdf"),children:"annotated.pdf"}),e("button",{className:"p-2 cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-100",onClick:()=>s("document.xml"),children:"document.xml"}),e("button",{className:"p-2 cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-100",onClick:()=>s("analyzed-pages.json"),children:"analyzed-pages.json"})]})})})]})})}var Di;function Oi({className:a,currentPage:s,onChange:i,object:l}){const c=()=>{if("document"===l.metadata?.type){const e=l.metadata;return e.content_processor?.type||"xml"}return"xml"},[d,u]=o("markdown"===c()?Di.original:Di.default),h=m(null),{urls:p,originalUrls:g,annotatedUrls:f,instrumentedUrls:y}=Ei(),b=d===Di.instrumented?y:d===Di.annotated?f:d===Di.original?g:p;return t("div",{ref:h,className:r("flex flex-col items-stretch gap-y-2",a),children:[t("div",{className:"flex h-5 items-center justify-center relative",children:[e("button",{className:Ri,onClick:()=>{s>1&&(i(s-1),h.current&&h.current.querySelector(`div[data-index="${s-1}"]`)?.scrollIntoView({behavior:"smooth",block:"end",inline:"center"}))},children:e(Tt,{className:"w-5 h-5"})}),e("div",{className:"absolute right-3 flex gap-x-1",children:"markdown"===c()?t(n,{children:[e("button",{className:Mi(Di.original,d),onClick:()=>u(Di.original),children:e(It,{className:"w-5 h-5 mt-1"})}),e("button",{className:Mi(Di.instrumented,d),onClick:()=>u(Di.instrumented),children:e($t,{className:"w-5 h-5 mt-1"})})]}):t(n,{children:[e("button",{className:Mi(Di.default,d),onClick:()=>u(Di.default),children:e(It,{className:"w-5 h-5 mt-1"})}),e("button",{className:Mi(Di.instrumented,d),onClick:()=>u(Di.instrumented),children:e($t,{className:"w-5 h-5 mt-1"})}),e("button",{className:Mi(Di.annotated,d),onClick:()=>u(Di.annotated),children:e(At,{className:"w-5 h-5 mt-1"})})]})})]}),e("div",{className:"flex flex-col items-center gap-2 flex-1 overflow-y-auto px-2",children:b.map(((t,n)=>e(Fi,{url:t,currentPage:s,pageNumber:n+1,onSelect:()=>i(n+1)},n)))}),e("div",{className:"flex h-5 items-center justify-center relative",children:e("button",{className:Ri,onClick:()=>{s<p.length&&(i(s+1),h.current&&h.current.querySelector(`div[data-index="${s+1}"]`)?.scrollIntoView({behavior:"smooth",block:"end",inline:"center"}))},children:e(Et,{className:"size-5"})})})]})}function Fi({url:n,pageNumber:a,currentPage:s,onSelect:i}){return t("div",{className:"p-2 hover:bg-gray-200 dark:hover:bg-slate-600 rounded-md","data-index":a-1,children:[e("div",{className:r("relative border-[2px] cursor-pointer",a===s?"border-blue-500 dark:border-pink-400":"border-gray-300"),onClick:i,children:e("img",{src:n,alt:`Page ${a}`})}),e(Te,{className:"text-sm text-gray-500 dark:text-gray-400 pt-1 font-semibold align",children:a})]})}!function(e){e[e.default=0]="default",e[e.original=1]="original",e[e.instrumented=2]="instrumented",e[e.annotated=3]="annotated"}(Di||(Di={}));const Ri="cursor-pointer text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-500 hover:font-semibold";function Mi(e,t){return e===t?"${BTN_CLASS} text-pink-600":`${Ri}`}const Vi={attributeKeyColor:"#FFD700",attributeValueColor:"#FF4500",tagColor:"#87CEFA",textColor:"#00FF00",separatorColor:"#FFD700",commentColor:"#BEBEBE",cdataColor:"#33CC66"};function qi({viewType:t,pageNumber:n}){switch(t){case"json":return e(Bi,{pageNumber:n});case"markdown":return e(Ji,{pageNumber:n});default:return e(Wi,{pageNumber:n})}}function Wi({pageNumber:t}){const[n,r]=o(),{xmlPages:a}=Ei();return p((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)"),t=e=>{r(e.matches?Vi:void 0)};return e.addEventListener("change",t),e.matches&&r(Vi),()=>{e.removeEventListener("change",t)}}),[]),e("div",{className:"px-4 py-2",children:e(Qt,{xml:a[t-1],collapsible:!0,theme:n})})}function Bi({pageNumber:t}){const[n,r]=o(),{layoutProvider:a}=Ei();return c((()=>{a.getPageLayout(t).then((e=>r(e?JSON.parse(e):void 0))).catch((e=>{console.error(e),r(void 0)}))}),[t]),n&&e(Xt,{className:"w-full",data:n})}function Ji({pageNumber:t}){const[n,r]=o(),{markdownProvider:a}=Ei();return c((()=>{a.getPageMarkdown(t).then(r).catch((e=>{console.error(e),r(void 0)}))}),[t]),e("div",{className:"px-4 py-2 prose prose-sm max-w-none dark:prose-invert",children:n?e(Vt,{children:n}):e("div",{children:"No markdown content available"})})}function Gi({objectId:t,onClose:n}){const{client:r}=Oe(),{data:a,error:s}=W((()=>r.store.objects.retrieve(t,"+text")),[t]);return s?e(le,{title:"Fetching document failed",children:s.message}):a?e("div",{className:"fixed inset-0 bg-white dark:bg-slate-700 z-50 flex items-center justify-center",children:e(ji,{object:a,children:e(Hi,{object:a,onClose:n})})}):"Loading..."}function Hi({object:r,onClose:a}){const[s,i]=o((()=>{if("document"===r.metadata?.type){const e=r.metadata,t=e.content_processor?.type;if("markdown"===t)return"markdown";if("xml"===t)return"xml"}return"xml"})()),[l,d]=o(1),u=(()=>{if("document"===r.metadata?.type){const e=r.metadata;return e.content_processor?.type||"xml"}return"xml"})(),h=m(null),p=m(null),g=m(null);var f;return c((()=>{if(f.handler.current&&f.left.current&&f.right.current){const e=f.handler.current,t=f.left.current,n=f.right.current,r=e=>{let r=e.clientX,a=t.offsetWidth,s=n.offsetLeft;const i=e=>{const i=e.clientX-r;t.style.width=`${a+i}px`,n.style.left=`${s+i}px`,e.target.classList.add("resizing")},l=e=>{e.target.classList.remove("resizing"),i(e),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",l)};return e.addEventListener("mousedown",r),()=>{e.removeEventListener("mousedown",r)}}}),[(f={handler:h,left:p,right:g}).handler.current,f.left.current,f.right.current]),t(n,{children:[t("div",{ref:p,className:"absolute top-0 left-0 bottom-0 w-[50%] bg-gray-100 dark:bg-slate-800 flex items-stretch justify-stretch py-2",children:[e(Oi,{className:"flex-1",currentPage:l,onChange:d,object:r}),e("div",{ref:h,className:"w-[2px] p-[2px] m-0 bg-slate-300 cursor-ew-resize"})]}),e("div",{ref:g,className:"absolute top-0 left-[50%] right-0 bottom-0 flex items-stretch justify-stretch overflow-auto p-2",children:e(qi,{pageNumber:l,viewType:s})}),e(Ui,{object:r}),"xml"===u&&e(Ki,{type:s,onSwitch:i}),!!a&&e("div",{className:"absolute top-6 right-7 w-9 h-9 cursor-pointer text-red-400 border-red-400 hover:border-red-500 hover:text-red-500 border-2 rounded-full shadow-xs flex items-center justify-center",onClick:a,children:e(Fe,{className:"size-6"})})]})}function Ki({type:e="xml",onSwitch:n}){return t("div",{className:"absolute bottom-[16px] right-[20px] w-[36px] h-[36px] cursor-pointer text-indigo-400 border-indigo-400 hover:border-indigo-500 hover:text-indigo-500 border-2 rounded-full shadow-xs flex items-center justify-center",onClick:()=>{"xml"===e?n("json"):"json"===e?n("markdown"):"markdown"===e&&n("xml")},children:["xml"===e&&Yi,"json"===e&&Xi,"markdown"===e&&Qi]})}const Yi=e("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 2.984V2h-.09c-.313 0-.616.062-.909.185a2.33 2.33 0 0 0-.775.53 2.23 2.23 0 0 0-.493.753v.001a3.542 3.542 0 0 0-.198.83v.002a6.08 6.08 0 0 0-.024.863c.012.29.018.58.018.869 0 .203-.04.393-.117.572v.001a1.504 1.504 0 0 1-.765.787 1.376 1.376 0 0 1-.558.115H2v.984h.09c.195 0 .38.04.556.121l.001.001c.178.078.329.184.455.318l.002.002c.13.13.233.285.307.465l.001.002c.078.18.117.368.117.566 0 .29-.006.58-.018.869-.012.296-.004.585.024.87v.001c.033.283.099.558.197.824v.001c.106.273.271.524.494.753.223.23.482.407.775.53.293.123.596.185.91.185H6v-.984h-.09c-.2 0-.387-.038-.563-.115a1.613 1.613 0 0 1-.457-.32 1.659 1.659 0 0 1-.309-.467c-.074-.18-.11-.37-.11-.573 0-.228.003-.453.011-.672.008-.228.008-.45 0-.665a4.639 4.639 0 0 0-.055-.64 2.682 2.682 0 0 0-.168-.609A2.284 2.284 0 0 0 3.522 8a2.284 2.284 0 0 0 .738-.955c.08-.192.135-.393.168-.602.033-.21.051-.423.055-.64.008-.22.008-.442 0-.666-.008-.224-.012-.45-.012-.678a1.47 1.47 0 0 1 .877-1.354 1.33 1.33 0 0 1 .563-.121H6zm4 10.032V14h.09c.313 0 .616-.062.909-.185.293-.123.552-.3.775-.53.223-.23.388-.48.493-.753v-.001c.1-.266.165-.543.198-.83v-.002c.028-.28.036-.567.024-.863-.012-.29-.018-.58-.018-.869 0-.203.04-.393.117-.572v-.001a1.502 1.502 0 0 1 .765-.787 1.38 1.38 0 0 1 .558-.115H14v-.984h-.09c-.196 0-.381-.04-.557-.121l-.001-.001a1.376 1.376 0 0 1-.455-.318l-.002-.002a1.415 1.415 0 0 1-.307-.465v-.002a1.405 1.405 0 0 1-.118-.566c0-.29.006-.58.018-.869a6.174 6.174 0 0 0-.024-.87v-.001a3.537 3.537 0 0 0-.197-.824v-.001a2.23 2.23 0 0 0-.494-.753 2.331 2.331 0 0 0-.775-.53 2.325 2.325 0 0 0-.91-.185H10v.984h.09c.2 0 .387.038.562.115.174.082.326.188.457.32.127.134.23.29.309.467.074.18.11.37.11.573 0 .228-.003.452-.011.672-.008.228-.008.45 0 .665.004.222.022.435.055.64.033.214.089.416.168.609a2.285 2.285 0 0 0 .738.955 2.285 2.285 0 0 0-.738.955 2.689 2.689 0 0 0-.168.602c-.033.21-.051.423-.055.64a9.15 9.15 0 0 0 0 .666c.008.224.012.45.012.678a1.471 1.471 0 0 1-.877 1.354 1.33 1.33 0 0 1-.563.121H10z"})}),Qi=e("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:e("path",{d:"M4.708 5.578L2.061 8.224l2.647 2.646-.708.708-3-3V7.87l3-3 .708.708zm7-.708L11 5.578l2.647 2.646L11 10.87l.708.708 3-3V7.87l-3-3zM4.908 13l.894.448 5-10L9.908 3l-5 10z"})}),Xi=e("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:e("path",{d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7.5L5.5 9l-1 1.5H3V5h1.5l1 2 2-2H9v6zm2.99.5L9.5 8H11V5h1v3h1.5l-2.51 3.5z"})});function Zi(...e){const t=Array.from(e);return t.__AnyOf__=!0,t}function el(...e){return Array.from(e)}function tl(e){return!0===e.__AnyOf__}class nl{system_roles;roles;permissions;constructor(e,t){if(!e.authToken)throw new Error("No auth token found in user session");this.system_roles=t;const n=new Set(e.authToken.account_roles||[]);if(e.authToken.project_roles)for(const t of e.authToken.project_roles)n.add(t);this.roles=n;const r={};for(const e of t)r[e.name]=e.permissions;const a=new Set;for(const e of n){const t=r[e];if(t)for(const e of t)a.add(e)}this.permissions=a}hasPermission(e){if("string"==typeof e)return this.permissions.has(e);if(tl(e))return e.some((e=>this.permissions.has(e)));for(const t of e)if(!this.permissions.has(t))return!1;return!0}}const rl=d(void 0);function al(){const e=u(rl);if(!e)throw new Error("UserPermissionContext cannot be used outside UserPermissionProvider");return e}function sl({children:t}){const n=Oe(),{data:r,error:a,isLoading:s}=W((()=>n.user?n.client.iam.roles.list():Promise.resolve(void 0)),[n.user]),i=l((()=>n.authToken&&r&&!s?new nl(n,r):void 0),[n,r,s]);return a?e(le,{title:"Failed to fetch role mappings",children:a.message}):i&&e(rl.Provider,{value:i,children:t})}function il({permission:t,isDisabled:n,title:r,children:a,...s}){return al().hasPermission(t)||(n=!0,r="You do not have permission to perform this action"),e(b,{isDisabled:n,title:r,...s,children:a})}function ll({permission:t,...n}){return al().hasPermission(t)?e(ln,{...n}):null}function ol({user:n}){return t("div",{className:"flex items-center",children:[e("div",{className:"w-9 h-9",children:(()=>{if(n.picture)return e("img",{className:"inline-block h-9 w-9 rounded-full",src:n.picture,alt:n.name});{const t=n.name.split(" ").map((e=>e[0])).join("");return e("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full bg-indigo-600",children:e("span",{className:"text-sm font-medium leading-none text-white",children:t})})}})()}),t("div",{className:"ml-3",children:[e("p",{className:"text-sm font-medium text-gray-700 dark:text-slate-50 group-hover:text-gray-900",children:n.name??"Deleted User"}),e("p",{className:"text-xs font-medium text-gray-500 dark:text-slate-300 group-hover:text-gray-700",children:n.email??"Deleted User"})]})]})}export{un as ActivitiesDoc,hn as ActivityDoc,Ks as AddToCollectionAction,Hs as AddToCollectionActionComponent,el as AllOf,wn as AnimatedThinkingDots,Zi as AnyOf,zr as ApiKeyAvatar,Qa as BrowseCollectionView,Ps as ChangeTypeAction,_s as ChangeTypeActionComponent,ta as CollectionsFacetsNav,ns as CollectionsTable,Vn as ContentDispositionButton,ms as ContentObjectTypesSearch,as as ContentObjectTypesTable,Jn as ContentOverview,es as CreateCollectionForm,ts as CreateCollectionModal,ds as CreateOrUpdateTypeModal,$s as DeleteObjectsAction,Is as DeleteObjectsActionComponent,ha as DocumentGridView,hr as DocumentIcon,mr as DocumentIconSkeleton,Ua as DocumentInput,Oa as DocumentPreviewPanel,pa as DocumentSearch,Ta as DocumentSearchProvider,Ba as DocumentSearchResults,Wa as DocumentSearchResultsWithDropZone,na as DocumentSelection,ia as DocumentSelectionProvider,Sa as DocumentTable,ua as DocumentTableColumn,ma as DocumentTableView,ka as DocumentUploadModal,Jr as DocumentsFacetsNav,Ns as EditCollectionView,Dr as EnvironmentFacet,Es as ExportPropertiesAction,As as ExportPropertiesComponent,Ha as ExportPropertiesModal,Ga as ExportTypes,xa as FileUploadAction,xi as GenericPageNavHeader,Kr as InteractionsFacetsNav,xn as JumpingDots,Gi as MagicPdfView,li as ModernAgentConversation,wi as NotFoundView,ps as ObjectSchemaEditor,ss as ObjectTypeSearch,is as ObjectTypeSearchContext,fs as ObjectTypeSearchProvider,Ms as ObjectsActionContext,qs as ObjectsActionContextProvider,pi as PanelErrorBoundary,Ln as PayloadBuilder,Dn as PayloadBuilderProvider,Un as PayloadContext,Xr as PromptsFacetsNav,Bn as PropertiesEditorModal,Nn as PulsatingCircle,Cn as PulsingMessageLoader,Ls as RemoveFromCollectionAction,zs as RemoveFromCollectionActionComponent,fi as RowErrorBoundary,Rr as RunsFacetsNav,Wn as SaveVersionConfirmModal,ga as SearchContext,il as SecureButton,ll as SecureSidebarItem,Ss as SelectCollection,Za as SelectContentType,ys as SelectContentTypeModal,$a as SelectDocument,za as SelectDocumentModal,Xs as SelectionActions,Ds as StartWorkflowAction,Us as StartWorkflowComponent,fr as StringFacet,yr as StringListFacet,vs as TableLayoutEditor,jn as ThinkingBar,Pn as ThinkingMessages,vr as TypeFacet,kn as TypedDots,ei as UploadObjectsButton,ol as UserAvatar,Ir as UserInfo,sl as UserPermissionProvider,nl as UserPermissions,rl as UserPermissionsContext,xr as VStringFacet,wr as VTypeFacet,Ur as VUserFacet,ui as VertesiaErrorBoundary,Sn as WavyThinking,bi as WidgetErrorBoundary,qr as WorkflowExecutionsFacetsNav,rs as collectionIcon,tl as isAnyOf,ar as isCsv,sr as isImage,ir as isPdf,lr as isVideo,ur as retrieveRendition,hi as setErrorBoundaryComponent,Xn as shortId,Zn as shortenString,xs as stringifyTableLayout,Zr as useCollectionsFilterGroups,ea as useCollectionsFilterHandler,Wr as useDocumentFilterGroups,Br as useDocumentFilterHandler,fa as useDocumentSearch,va as useDocumentSearchCount,aa as useDocumentSelection,Ca as useDocumentUploadHandler,Da as useDownloadDocument,jr as useFetchGroupInfo,Cr as useFetchUserInfo,Gr as useInteractionsFilterGroups,Hr as useInteractionsFilterHandler,Js as useObjectsActionCallback,Bs as useObjectsActionContext,sa as useOptionalDocumentSelection,On as usePayloadBuilder,Yr as usePromptsFilterGroups,Qr as usePromptsFilterHandler,Or as useRunsFilterGroups,Fr as useRunsFilterHandler,ls as useSearch,cs as useSearchCount,Na as useSmartFileUploadProcessing,Gs as useStartWorkflowCallback,al as useUserPermissions,ya as useWatchDocumentSearchFacets,ba as useWatchDocumentSearchResult,os as useWatchSearchResult,Mr as useWorkflowExecutionsFilterGroups,Vr as useWorkflowExecutionsFilterHandler};
2
+ //# sourceMappingURL=vertesia-ui-features.js.map