@vertesia/ui 1.0.0-dev.20260227.112605Z → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/core/components/SelectList.js +3 -1
- package/lib/esm/core/components/SelectList.js.map +1 -1
- package/lib/esm/core/components/SidePanel.js +2 -2
- package/lib/esm/core/components/SidePanel.js.map +1 -1
- package/lib/esm/core/components/index.js +0 -5
- package/lib/esm/core/components/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/breadcrumb.js +11 -7
- package/lib/esm/core/components/shadcn/breadcrumb.js.map +1 -1
- package/lib/esm/core/components/shadcn/button.js +5 -3
- package/lib/esm/core/components/shadcn/button.js.map +1 -1
- package/lib/esm/core/components/shadcn/collaspible.js +14 -0
- package/lib/esm/core/components/shadcn/collaspible.js.map +1 -0
- package/lib/esm/core/components/shadcn/dropdown.js +61 -0
- package/lib/esm/core/components/shadcn/dropdown.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js +3 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js +3 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js +1 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filter/StringListFilter.js +1 -1
- package/lib/esm/core/components/shadcn/filters/filter/StringListFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js +4 -2
- package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +7 -4
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/index.js +4 -0
- package/lib/esm/core/components/shadcn/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/modal/ConfirmModal.js +4 -2
- package/lib/esm/core/components/shadcn/modal/ConfirmModal.js.map +1 -1
- package/lib/esm/core/components/shadcn/modal/DeleteModal.js +5 -3
- package/lib/esm/core/components/shadcn/modal/DeleteModal.js.map +1 -1
- package/lib/esm/core/components/shadcn/popover.js +11 -7
- package/lib/esm/core/components/shadcn/popover.js.map +1 -1
- package/lib/esm/core/components/shadcn/radioGroup.js +29 -0
- package/lib/esm/core/components/shadcn/radioGroup.js.map +1 -0
- package/lib/esm/core/components/shadcn/selectBox.js +1 -1
- package/lib/esm/core/components/shadcn/switch.js +19 -0
- package/lib/esm/core/components/shadcn/switch.js.map +1 -0
- package/lib/esm/core/components/shadcn/tabs.js +6 -6
- package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
- package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js +8 -6
- package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js.map +1 -1
- package/lib/esm/core/components/shadcn/tooltip.js +1 -1
- package/lib/esm/core/components/shadcn/tooltip.js.map +1 -1
- package/lib/esm/core/components/toast/NotificationPanel.js +3 -3
- package/lib/esm/core/components/toast/NotificationPanel.js.map +1 -1
- package/lib/esm/env/index.js +11 -1
- package/lib/esm/env/index.js.map +1 -1
- package/lib/esm/features/agent/PayloadBuilder.js +87 -15
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/esm/features/agent/chat/AgentRightPanel.js +159 -0
- package/lib/esm/features/agent/chat/AgentRightPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ArtifactsTab.js +69 -0
- package/lib/esm/features/agent/chat/ArtifactsTab.js.map +1 -0
- package/lib/esm/features/agent/chat/AskUserWidget.js +12 -6
- package/lib/esm/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/esm/features/agent/chat/DocumentPanel.js +6 -3
- package/lib/esm/features/agent/chat/DocumentPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ImageLightbox.js +3 -1
- package/lib/esm/features/agent/chat/ImageLightbox.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +243 -106
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +122 -52
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +5 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +57 -18
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +82 -83
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +16 -14
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +20 -5
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +8 -6
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +12 -10
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js +5 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +104 -13
- package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +9 -5
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +160 -76
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +3 -1
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -1
- package/lib/esm/features/agent/chat/VegaLiteChart.js +14 -2
- package/lib/esm/features/agent/chat/VegaLiteChart.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useAgentPlans.js +3 -8
- package/lib/esm/features/agent/chat/hooks/useAgentPlans.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js +75 -16
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useArtifacts.js +108 -0
- package/lib/esm/features/agent/chat/hooks/useArtifacts.js.map +1 -0
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js +56 -5
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useFileProcessing.js +12 -10
- package/lib/esm/features/agent/chat/hooks/useFileProcessing.js.map +1 -1
- package/lib/esm/features/errors/PanelErrorBoundary.js +3 -1
- package/lib/esm/features/errors/PanelErrorBoundary.js.map +1 -1
- package/lib/esm/features/facets/AgentRunnerFacetsNav.js +45 -33
- package/lib/esm/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/RunsFacetsNav.js +1 -1
- package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/index.js +1 -1
- package/lib/esm/features/facets/index.js.map +1 -1
- package/lib/esm/features/layout/GenericPageNavHeader.js +40 -28
- package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -1
- package/lib/esm/features/layout/NotFoundView.js +3 -1
- package/lib/esm/features/layout/NotFoundView.js.map +1 -1
- package/lib/esm/features/magic-pdf/AnnotatedImageSlider.js +9 -5
- package/lib/esm/features/magic-pdf/AnnotatedImageSlider.js.map +1 -1
- package/lib/esm/features/magic-pdf/DownloadPopover.js +5 -4
- package/lib/esm/features/magic-pdf/DownloadPopover.js.map +1 -1
- package/lib/esm/features/magic-pdf/MagicPdfView.js +8 -5
- package/lib/esm/features/magic-pdf/MagicPdfView.js.map +1 -1
- package/lib/esm/features/pdf-viewer/PdfPageSlider.js +9 -5
- package/lib/esm/features/pdf-viewer/PdfPageSlider.js.map +1 -1
- package/lib/esm/features/pdf-viewer/SimplePdfViewer.js +5 -3
- package/lib/esm/features/pdf-viewer/SimplePdfViewer.js.map +1 -1
- package/lib/esm/features/permissions/UserPermissionsProvider.js +3 -1
- package/lib/esm/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js +9 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/CollectionsTable.js +14 -7
- package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -1
- package/lib/esm/features/store/collections/CreateCollection.js +21 -18
- package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js +23 -19
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/SelectCollection.js +25 -10
- package/lib/esm/features/store/collections/SelectCollection.js.map +1 -1
- package/lib/esm/features/store/collections/SharedPropsEditor.js +5 -3
- package/lib/esm/features/store/collections/SharedPropsEditor.js.map +1 -1
- package/lib/esm/features/store/collections/SyncMemberHeadsToggle.js +5 -3
- package/lib/esm/features/store/collections/SyncMemberHeadsToggle.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js +14 -12
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +15 -5
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentTable.js +10 -7
- package/lib/esm/features/store/objects/DocumentTable.js.map +1 -1
- package/lib/esm/features/store/objects/ExportPropertiesModal.js +5 -2
- package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentDispositionButton.js +3 -1
- package/lib/esm/features/store/objects/components/ContentDispositionButton.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +55 -40
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/DocumentIcon.js +4 -3
- package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -1
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +13 -11
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +15 -18
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/SelectDocument.js +9 -6
- package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -1
- package/lib/esm/features/store/objects/components/TextEditorPanel.js +97 -0
- package/lib/esm/features/store/objects/components/TextEditorPanel.js.map +1 -0
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js +3 -1
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -1
- package/lib/esm/features/store/objects/components/useContentPanelHooks.js +4 -2
- package/lib/esm/features/store/objects/components/useContentPanelHooks.js.map +1 -1
- package/lib/esm/features/store/objects/components/useDownloadFile.js +12 -10
- package/lib/esm/features/store/objects/components/useDownloadFile.js.map +1 -1
- package/lib/esm/features/store/objects/layout/documentLayout.js +10 -6
- package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -1
- package/lib/esm/features/store/objects/layout/renderers.js +10 -1
- package/lib/esm/features/store/objects/layout/renderers.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +3 -2
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +3 -0
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -1
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +22 -109
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -1
- package/lib/esm/features/store/objects/selection/ObjectsActionContextClass.js +50 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionContextClass.js.map +1 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionHooks.js +27 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionHooks.js.map +1 -0
- package/lib/esm/features/store/objects/selection/SelectionActions.js +10 -6
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +17 -12
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +9 -5
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js +4 -2
- package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +24 -23
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +10 -5
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +13 -9
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +14 -8
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +42 -39
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +4 -2
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -1
- package/lib/esm/features/store/objects/upload/useUploadHandler.js +9 -7
- package/lib/esm/features/store/objects/upload/useUploadHandler.js.map +1 -1
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js +6 -4
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -1
- package/lib/esm/features/store/types/ContentObjectTypesTable.js +3 -1
- package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +1 -1
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +6 -7
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -1
- package/lib/esm/features/store/types/ObjectSchemaEditor.js +9 -7
- package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentType.js +9 -7
- package/lib/esm/features/store/types/SelectContentType.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentTypeModal.js +5 -2
- package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/esm/features/store/types/TableLayoutEditor.js +6 -4
- package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +40 -50
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/i18n/index.js +31 -0
- package/lib/esm/i18n/index.js.map +1 -0
- package/lib/esm/i18n/instance.js +46 -0
- package/lib/esm/i18n/instance.js.map +1 -0
- package/lib/esm/i18n/locales/ar.json +694 -0
- package/lib/esm/i18n/locales/de.json +662 -0
- package/lib/esm/i18n/locales/en.json +663 -0
- package/lib/esm/i18n/locales/es.json +668 -0
- package/lib/esm/i18n/locales/fr.json +670 -0
- package/lib/esm/i18n/locales/it.json +668 -0
- package/lib/esm/i18n/locales/ja.json +662 -0
- package/lib/esm/i18n/locales/ko.json +662 -0
- package/lib/esm/i18n/locales/pt.json +668 -0
- package/lib/esm/i18n/locales/ru.json +678 -0
- package/lib/esm/i18n/locales/tr.json +662 -0
- package/lib/esm/i18n/locales/zh-TW.json +662 -0
- package/lib/esm/i18n/locales/zh.json +662 -0
- package/lib/esm/layout/FullHeightLayout.js +3 -0
- package/lib/esm/layout/FullHeightLayout.js.map +1 -1
- package/lib/esm/layout/Navbar.js +3 -1
- package/lib/esm/layout/Navbar.js.map +1 -1
- package/lib/esm/layout/RegionTag.js +15 -0
- package/lib/esm/layout/RegionTag.js.map +1 -0
- package/lib/esm/layout/Sidebar.js +2 -2
- package/lib/esm/layout/Sidebar.js.map +1 -1
- package/lib/esm/layout/index.js +1 -0
- package/lib/esm/layout/index.js.map +1 -1
- package/lib/esm/router/HistoryNavigator.js +1 -1
- package/lib/esm/router/HistoryNavigator.js.map +1 -1
- package/lib/esm/router/Nav.js +5 -3
- package/lib/esm/router/Nav.js.map +1 -1
- package/lib/esm/router/NestedNavigationContext.js +4 -0
- package/lib/esm/router/NestedNavigationContext.js.map +1 -1
- package/lib/esm/router/NestedRouterProvider.js +3 -1
- package/lib/esm/router/NestedRouterProvider.js.map +1 -1
- package/lib/esm/router/Router.js +21 -6
- package/lib/esm/router/Router.js.map +1 -1
- package/lib/esm/session/UserSession.js +31 -0
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/UserSessionProvider.js +4 -0
- package/lib/esm/session/UserSessionProvider.js.map +1 -1
- package/lib/esm/session/auth/composable.js +1 -1
- package/lib/esm/session/auth/composable.js.map +1 -1
- package/lib/esm/session/auth/firebase.js +1 -1
- package/lib/esm/session/auth/firebase.js.map +1 -1
- package/lib/esm/session/auth/useCurrentTenant.js +3 -1
- package/lib/esm/session/auth/useCurrentTenant.js.map +1 -1
- package/lib/esm/shell/SplashScreen.js +3 -7
- package/lib/esm/shell/SplashScreen.js.map +1 -1
- package/lib/esm/shell/apps/StandaloneApp.js +5 -2
- package/lib/esm/shell/apps/StandaloneApp.js.map +1 -1
- package/lib/esm/shell/login/EnterpriseSigninButton.js +5 -3
- package/lib/esm/shell/login/EnterpriseSigninButton.js.map +1 -1
- package/lib/esm/shell/login/GitHubSignInButton.js +3 -7
- package/lib/esm/shell/login/GitHubSignInButton.js.map +1 -1
- package/lib/esm/shell/login/GoogleSignInButton.js +3 -1
- package/lib/esm/shell/login/GoogleSignInButton.js.map +1 -1
- package/lib/esm/shell/login/InviteAcceptModal.js +5 -2
- package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -1
- package/lib/esm/shell/login/MicrosoftSigninButton.js +4 -6
- package/lib/esm/shell/login/MicrosoftSigninButton.js.map +1 -1
- package/lib/esm/shell/login/SigninScreen.js +6 -2
- package/lib/esm/shell/login/SigninScreen.js.map +1 -1
- package/lib/esm/shell/login/SignupForm.js +36 -34
- package/lib/esm/shell/login/SignupForm.js.map +1 -1
- package/lib/esm/shell/login/TerminalLogin.js +29 -22
- package/lib/esm/shell/login/TerminalLogin.js.map +1 -1
- package/lib/esm/shell/login/UserInfo.js +6 -4
- package/lib/esm/shell/login/UserInfo.js.map +1 -1
- package/lib/esm/shell/login/UserSessionMenu.js +3 -4
- package/lib/esm/shell/login/UserSessionMenu.js.map +1 -1
- package/lib/esm/widgets/index.js +0 -1
- package/lib/esm/widgets/index.js.map +1 -1
- package/lib/esm/widgets/json-view/JSONCode.js +1 -1
- package/lib/esm/widgets/json-view/JSONCode.js.map +1 -1
- package/lib/esm/widgets/json-view/JSONDisplay.js +6 -2
- package/lib/esm/widgets/json-view/JSONDisplay.js.map +1 -1
- package/lib/esm/widgets/json-view/JSONSwitcher.js +6 -0
- package/lib/esm/widgets/json-view/JSONSwitcher.js.map +1 -0
- package/lib/esm/widgets/json-view/JSONView.js +1 -1
- package/lib/esm/widgets/json-view/JSONView.js.map +1 -1
- package/lib/esm/widgets/json-view/index.js +1 -0
- package/lib/esm/widgets/json-view/index.js.map +1 -1
- package/lib/esm/widgets/markdown/ArtifactContentRenderer.js +6 -5
- package/lib/esm/widgets/markdown/ArtifactContentRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/CodeBlockContext.js +11 -0
- package/lib/esm/widgets/markdown/CodeBlockContext.js.map +1 -0
- package/lib/esm/widgets/markdown/MarkdownRenderer.js +11 -10
- package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/codeBlockHandlers.js +11 -12
- package/lib/esm/widgets/markdown/codeBlockHandlers.js.map +1 -1
- package/lib/esm/widgets/markdown/index.js +10 -9
- package/lib/esm/widgets/markdown/index.js.map +1 -1
- package/lib/esm/widgets/markdown/remarkDirectiveHandler.js +0 -1
- package/lib/esm/widgets/markdown/remarkDirectiveHandler.js.map +1 -1
- package/lib/esm/widgets/schema-editor/ManagedSchema.js +6 -5
- package/lib/esm/widgets/schema-editor/ManagedSchema.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js +7 -3
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +3 -1
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
- package/lib/esm/widgets/upload/DropZone.js +9 -11
- package/lib/esm/widgets/upload/DropZone.js.map +1 -1
- package/lib/esm/widgets/upload/UploadResultCategory.js +3 -1
- package/lib/esm/widgets/upload/UploadResultCategory.js.map +1 -1
- package/lib/esm/widgets/upload/UploadSummary.js +3 -1
- package/lib/esm/widgets/upload/UploadSummary.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/SelectList.d.ts.map +1 -1
- package/lib/types/core/components/SidePanel.d.ts +4 -2
- package/lib/types/core/components/SidePanel.d.ts.map +1 -1
- package/lib/types/core/components/index.d.ts +0 -5
- package/lib/types/core/components/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/badge.d.ts +2 -2
- package/lib/types/core/components/shadcn/breadcrumb.d.ts +1 -1
- package/lib/types/core/components/shadcn/breadcrumb.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/collaspible.d.ts +6 -0
- package/lib/types/core/components/shadcn/collaspible.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/dropdown.d.ts +44 -0
- package/lib/types/core/components/shadcn/dropdown.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/filters/comboBox/DateCombobox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/filter/dateFilter.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/index.d.ts +4 -0
- package/lib/types/core/components/shadcn/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/input.d.ts +1 -1
- package/lib/types/core/components/shadcn/modal/ConfirmModal.d.ts +2 -1
- package/lib/types/core/components/shadcn/modal/ConfirmModal.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/modal/DeleteModal.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/popover.d.ts +11 -3
- package/lib/types/core/components/shadcn/popover.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/radioGroup.d.ts +26 -0
- package/lib/types/core/components/shadcn/radioGroup.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/switch.d.ts +12 -0
- package/lib/types/core/components/shadcn/switch.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/tabs.d.ts +4 -2
- package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts +8 -2
- package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts.map +1 -1
- package/lib/types/core/components/toast/NotificationPanel.d.ts.map +1 -1
- package/lib/types/env/index.d.ts +8 -1
- package/lib/types/env/index.d.ts.map +1 -1
- package/lib/types/features/agent/PayloadBuilder.d.ts +31 -3
- package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AgentRightPanel.d.ts +50 -0
- package/lib/types/features/agent/chat/AgentRightPanel.d.ts.map +1 -0
- package/lib/types/features/agent/chat/ArtifactsTab.d.ts +9 -0
- package/lib/types/features/agent/chat/ArtifactsTab.d.ts.map +1 -0
- package/lib/types/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/types/features/agent/chat/DocumentPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ImageLightbox.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +22 -9
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +3 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +12 -3
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts +3 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts +5 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +16 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
- package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts.map +1 -1
- package/lib/types/features/agent/chat/VegaLiteChart.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useAgentPlans.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts +3 -3
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useArtifacts.d.ts +18 -0
- package/lib/types/features/agent/chat/hooks/useArtifacts.d.ts.map +1 -0
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts +4 -4
- package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts.map +1 -1
- package/lib/types/features/agent/chat/types/document.d.ts +2 -0
- package/lib/types/features/agent/chat/types/document.d.ts.map +1 -1
- package/lib/types/features/errors/PanelErrorBoundary.d.ts.map +1 -1
- package/lib/types/features/facets/AgentRunnerFacetsNav.d.ts +2 -1
- package/lib/types/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/index.d.ts +1 -1
- package/lib/types/features/facets/index.d.ts.map +1 -1
- package/lib/types/features/layout/GenericPageNavHeader.d.ts +2 -2
- package/lib/types/features/layout/GenericPageNavHeader.d.ts.map +1 -1
- package/lib/types/features/layout/NotFoundView.d.ts.map +1 -1
- package/lib/types/features/magic-pdf/AnnotatedImageSlider.d.ts.map +1 -1
- package/lib/types/features/magic-pdf/DownloadPopover.d.ts.map +1 -1
- package/lib/types/features/magic-pdf/MagicPdfView.d.ts.map +1 -1
- package/lib/types/features/pdf-viewer/PdfPageSlider.d.ts.map +1 -1
- package/lib/types/features/pdf-viewer/SimplePdfViewer.d.ts.map +1 -1
- package/lib/types/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/CollectionsTable.d.ts +4 -0
- package/lib/types/features/store/collections/CollectionsTable.d.ts.map +1 -1
- package/lib/types/features/store/collections/CreateCollection.d.ts.map +1 -1
- package/lib/types/features/store/collections/EditCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/SelectCollection.d.ts.map +1 -1
- package/lib/types/features/store/collections/SharedPropsEditor.d.ts.map +1 -1
- package/lib/types/features/store/collections/SyncMemberHeadsToggle.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentTable.d.ts.map +1 -1
- package/lib/types/features/store/objects/ExportPropertiesModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts +2 -1
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/SelectDocument.d.ts +3 -1
- package/lib/types/features/store/objects/components/SelectDocument.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/TextEditorPanel.d.ts +10 -0
- package/lib/types/features/store/objects/components/TextEditorPanel.d.ts.map +1 -0
- package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useDownloadFile.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/documentLayout.d.ts +3 -2
- package/lib/types/features/store/objects/layout/documentLayout.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +3 -20
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/ObjectsActionContextClass.d.ts +16 -0
- package/lib/types/features/store/objects/selection/ObjectsActionContextClass.d.ts.map +1 -0
- package/lib/types/features/store/objects/selection/ObjectsActionHooks.d.ts +7 -0
- package/lib/types/features/store/objects/selection/ObjectsActionHooks.d.ts.map +1 -0
- package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +4 -1
- package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts +6 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts +1 -1
- package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/useUploadHandler.d.ts.map +1 -1
- package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -1
- package/lib/types/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
- package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts +2 -1
- package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts.map +1 -1
- package/lib/types/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
- package/lib/types/features/store/types/SelectContentType.d.ts.map +1 -1
- package/lib/types/features/store/types/SelectContentTypeModal.d.ts.map +1 -1
- package/lib/types/features/store/types/TableLayoutEditor.d.ts.map +1 -1
- package/lib/types/features/user/UserInfo.d.ts +2 -2
- package/lib/types/features/user/UserInfo.d.ts.map +1 -1
- package/lib/types/i18n/index.d.ts +14 -0
- package/lib/types/i18n/index.d.ts.map +1 -0
- package/lib/types/i18n/instance.d.ts +5 -0
- package/lib/types/i18n/instance.d.ts.map +1 -0
- package/lib/types/layout/FullHeightLayout.d.ts +3 -0
- package/lib/types/layout/FullHeightLayout.d.ts.map +1 -1
- package/lib/types/layout/Navbar.d.ts.map +1 -1
- package/lib/types/layout/RegionTag.d.ts +4 -0
- package/lib/types/layout/RegionTag.d.ts.map +1 -0
- package/lib/types/layout/Sidebar.d.ts +2 -1
- package/lib/types/layout/Sidebar.d.ts.map +1 -1
- package/lib/types/layout/index.d.ts +1 -0
- package/lib/types/layout/index.d.ts.map +1 -1
- package/lib/types/router/Nav.d.ts +5 -1
- package/lib/types/router/Nav.d.ts.map +1 -1
- package/lib/types/router/NestedNavigationContext.d.ts.map +1 -1
- package/lib/types/router/NestedRouterProvider.d.ts.map +1 -1
- package/lib/types/router/Router.d.ts +2 -0
- package/lib/types/router/Router.d.ts.map +1 -1
- package/lib/types/session/UserSession.d.ts +1 -0
- package/lib/types/session/UserSession.d.ts.map +1 -1
- package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/types/session/auth/useCurrentTenant.d.ts.map +1 -1
- package/lib/types/shell/SplashScreen.d.ts.map +1 -1
- package/lib/types/shell/apps/StandaloneApp.d.ts.map +1 -1
- package/lib/types/shell/login/EnterpriseSigninButton.d.ts.map +1 -1
- package/lib/types/shell/login/GitHubSignInButton.d.ts.map +1 -1
- package/lib/types/shell/login/GoogleSignInButton.d.ts.map +1 -1
- package/lib/types/shell/login/InviteAcceptModal.d.ts.map +1 -1
- package/lib/types/shell/login/MicrosoftSigninButton.d.ts +1 -1
- package/lib/types/shell/login/MicrosoftSigninButton.d.ts.map +1 -1
- package/lib/types/shell/login/SigninScreen.d.ts.map +1 -1
- package/lib/types/shell/login/SignupForm.d.ts.map +1 -1
- package/lib/types/shell/login/TerminalLogin.d.ts.map +1 -1
- package/lib/types/shell/login/UserInfo.d.ts.map +1 -1
- package/lib/types/shell/login/UserSessionMenu.d.ts.map +1 -1
- package/lib/types/widgets/index.d.ts +0 -1
- package/lib/types/widgets/index.d.ts.map +1 -1
- package/lib/types/widgets/json-view/JSONDisplay.d.ts.map +1 -1
- package/lib/types/widgets/json-view/JSONSwitcher.d.ts +6 -0
- package/lib/types/widgets/json-view/JSONSwitcher.d.ts.map +1 -0
- package/lib/types/widgets/json-view/index.d.ts +1 -0
- package/lib/types/widgets/json-view/index.d.ts.map +1 -1
- package/lib/types/widgets/markdown/ArtifactContentRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/CodeBlockContext.d.ts +21 -0
- package/lib/types/widgets/markdown/CodeBlockContext.d.ts.map +1 -0
- package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/codeBlockHandlers.d.ts +0 -12
- package/lib/types/widgets/markdown/codeBlockHandlers.d.ts.map +1 -1
- package/lib/types/widgets/markdown/index.d.ts +10 -9
- package/lib/types/widgets/markdown/index.d.ts.map +1 -1
- package/lib/types/widgets/schema-editor/ManagedSchema.d.ts +1 -1
- package/lib/types/widgets/schema-editor/ManagedSchema.d.ts.map +1 -1
- package/lib/types/widgets/schema-editor/editor/PropertyEditor.d.ts.map +1 -1
- package/lib/types/widgets/schema-editor/editor/SchemaEditor.d.ts.map +1 -1
- package/lib/types/widgets/upload/DropZone.d.ts.map +1 -1
- package/lib/types/widgets/upload/UploadResultCategory.d.ts.map +1 -1
- package/lib/types/widgets/upload/UploadSummary.d.ts.map +1 -1
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +2 -0
- package/lib/vertesia-ui-i18n.js.map +1 -0
- package/lib/vertesia-ui-layout.js +1 -1
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/llms.txt +124 -4
- package/package.json +50 -22
- package/src/core/components/SelectList.tsx +3 -1
- package/src/core/components/SidePanel.tsx +5 -4
- package/src/core/components/index.ts +0 -5
- package/src/core/components/shadcn/breadcrumb.tsx +16 -9
- package/src/core/components/shadcn/button.tsx +5 -3
- package/src/core/components/shadcn/collaspible.tsx +33 -0
- package/src/core/components/shadcn/dropdown.tsx +309 -0
- package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +3 -1
- package/src/core/components/shadcn/filters/comboBox/SelectCombobox.tsx +3 -1
- package/src/core/components/shadcn/filters/comboBox/StringListCombobox.tsx +1 -1
- package/src/core/components/shadcn/filters/filter/StringListFilter.tsx +1 -1
- package/src/core/components/shadcn/filters/filter/dateFilter.tsx +5 -3
- package/src/core/components/shadcn/filters/filterBar.tsx +8 -5
- package/src/core/components/shadcn/index.ts +5 -1
- package/src/core/components/shadcn/modal/ConfirmModal.tsx +7 -3
- package/src/core/components/shadcn/modal/DeleteModal.tsx +5 -3
- package/src/core/components/shadcn/popover.tsx +12 -7
- package/src/core/components/shadcn/radioGroup.tsx +100 -0
- package/src/core/components/shadcn/selectBox.tsx +1 -1
- package/src/core/components/shadcn/switch.tsx +60 -0
- package/src/core/components/shadcn/tabs.tsx +29 -27
- package/src/core/components/shadcn/theme/ThemeSwitcher.tsx +19 -10
- package/src/core/components/shadcn/tooltip.tsx +1 -1
- package/src/core/components/toast/NotificationPanel.tsx +38 -44
- package/src/css/base.css +31 -0
- package/src/css/color.css +136 -0
- package/src/css/custom-tooltips.css +64 -0
- package/src/css/index.css +27 -0
- package/src/css/theme.css +86 -0
- package/src/css/typography.css +88 -0
- package/src/css/utilities.css +72 -0
- package/src/env/index.ts +16 -3
- package/src/features/agent/PayloadBuilder.tsx +100 -13
- package/src/features/agent/chat/AgentRightPanel.tsx +424 -0
- package/src/features/agent/chat/ArtifactsTab.tsx +197 -0
- package/src/features/agent/chat/AskUserWidget.tsx +14 -8
- package/src/features/agent/chat/DocumentPanel.tsx +24 -9
- package/src/features/agent/chat/ImageLightbox.tsx +6 -3
- package/src/features/agent/chat/ModernAgentConversation.tsx +539 -356
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +151 -55
- package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +6 -4
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +126 -46
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +21 -31
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +119 -114
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +26 -9
- package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +9 -7
- package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +15 -13
- package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +8 -3
- package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +149 -49
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +9 -5
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +229 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +202 -97
- package/src/features/agent/chat/SlidingThinkingIndicator.tsx +5 -3
- package/src/features/agent/chat/VegaLiteChart.tsx +20 -8
- package/src/features/agent/chat/hooks/useAgentPlans.ts +3 -9
- package/src/features/agent/chat/hooks/useAgentStream.ts +80 -19
- package/src/features/agent/chat/hooks/useArtifacts.ts +151 -0
- package/src/features/agent/chat/hooks/useDocumentPanel.ts +65 -5
- package/src/features/agent/chat/hooks/useFileProcessing.ts +14 -13
- package/src/features/agent/chat/types/document.ts +2 -0
- package/src/features/errors/PanelErrorBoundary.tsx +5 -3
- package/src/features/facets/AgentRunnerFacetsNav.tsx +54 -35
- package/src/features/facets/RunsFacetsNav.tsx +6 -6
- package/src/features/facets/index.ts +1 -1
- package/src/features/layout/GenericPageNavHeader.tsx +64 -41
- package/src/features/layout/NotFoundView.tsx +4 -1
- package/src/features/magic-pdf/AnnotatedImageSlider.tsx +12 -8
- package/src/features/magic-pdf/DownloadPopover.tsx +11 -10
- package/src/features/magic-pdf/MagicPdfView.tsx +10 -7
- package/src/features/pdf-viewer/PdfPageSlider.tsx +10 -6
- package/src/features/pdf-viewer/SimplePdfViewer.tsx +5 -3
- package/src/features/permissions/UserPermissionsProvider.tsx +3 -1
- package/src/features/store/collections/BrowseCollectionView.tsx +11 -1
- package/src/features/store/collections/CollectionsTable.tsx +20 -12
- package/src/features/store/collections/CreateCollection.tsx +45 -40
- package/src/features/store/collections/EditCollectionView.tsx +31 -28
- package/src/features/store/collections/SelectCollection.tsx +50 -14
- package/src/features/store/collections/SharedPropsEditor.tsx +7 -5
- package/src/features/store/collections/SyncMemberHeadsToggle.tsx +6 -4
- package/src/features/store/objects/DocumentPreviewPanel.tsx +30 -28
- package/src/features/store/objects/DocumentSearchResults.tsx +31 -21
- package/src/features/store/objects/DocumentTable.tsx +11 -5
- package/src/features/store/objects/ExportPropertiesModal.tsx +8 -5
- package/src/features/store/objects/components/ContentDispositionButton.tsx +3 -1
- package/src/features/store/objects/components/ContentOverview.tsx +96 -50
- package/src/features/store/objects/components/DocumentIcon.tsx +11 -3
- package/src/features/store/objects/components/PropertiesEditorModal.tsx +14 -12
- package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +24 -37
- package/src/features/store/objects/components/SelectDocument.tsx +15 -6
- package/src/features/store/objects/components/TextEditorPanel.tsx +143 -0
- package/src/features/store/objects/components/VectorSearchWidget.tsx +11 -8
- package/src/features/store/objects/components/useContentPanelHooks.ts +4 -2
- package/src/features/store/objects/components/useDownloadFile.ts +12 -10
- package/src/features/store/objects/layout/documentLayout.tsx +16 -6
- package/src/features/store/objects/layout/renderers.tsx +27 -1
- package/src/features/store/objects/search/DocumentSearchContext.ts +3 -2
- package/src/features/store/objects/search/DocumentSearchProvider.tsx +3 -0
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +26 -128
- package/src/features/store/objects/selection/ObjectsActionContextClass.ts +59 -0
- package/src/features/store/objects/selection/ObjectsActionHooks.ts +33 -0
- package/src/features/store/objects/selection/ObjectsActionSpec.ts +4 -1
- package/src/features/store/objects/selection/SelectionActions.tsx +14 -6
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +19 -14
- package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +9 -5
- package/src/features/store/objects/selection/actions/ConfirmAction.tsx +4 -3
- package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +24 -23
- package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +10 -5
- package/src/features/store/objects/selection/actions/RemoveFromCollectionAction.tsx +13 -9
- package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +14 -8
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +56 -55
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +4 -2
- package/src/features/store/objects/upload/useUploadHandler.ts +9 -7
- package/src/features/store/types/ContentObjectTypesSearch.tsx +10 -8
- package/src/features/store/types/ContentObjectTypesTable.tsx +6 -4
- package/src/features/store/types/CreateOrUpdateTypeModal.tsx +11 -12
- package/src/features/store/types/ObjectSchemaEditor.tsx +11 -9
- package/src/features/store/types/SelectContentType.tsx +15 -13
- package/src/features/store/types/SelectContentTypeModal.tsx +16 -13
- package/src/features/store/types/TableLayoutEditor.tsx +16 -12
- package/src/features/user/UserInfo.tsx +47 -56
- package/src/i18n/index.tsx +45 -0
- package/src/i18n/instance.ts +49 -0
- package/src/i18n/locales/ar.json +694 -0
- package/src/i18n/locales/de.json +662 -0
- package/src/i18n/locales/en.json +663 -0
- package/src/i18n/locales/es.json +668 -0
- package/src/i18n/locales/fr.json +670 -0
- package/src/i18n/locales/it.json +668 -0
- package/src/i18n/locales/ja.json +662 -0
- package/src/i18n/locales/ko.json +662 -0
- package/src/i18n/locales/pt.json +668 -0
- package/src/i18n/locales/ru.json +678 -0
- package/src/i18n/locales/tr.json +662 -0
- package/src/i18n/locales/zh-TW.json +662 -0
- package/src/i18n/locales/zh.json +662 -0
- package/src/layout/FullHeightLayout.tsx +8 -0
- package/src/layout/Navbar.tsx +4 -2
- package/src/layout/RegionTag.tsx +25 -0
- package/src/layout/Sidebar.tsx +4 -3
- package/src/layout/index.ts +2 -1
- package/src/router/HistoryNavigator.ts +10 -10
- package/src/router/Nav.tsx +9 -3
- package/src/router/NestedNavigationContext.tsx +4 -0
- package/src/router/NestedRouterProvider.tsx +3 -1
- package/src/router/Router.tsx +23 -7
- package/src/session/UserSession.ts +32 -0
- package/src/session/UserSessionProvider.tsx +4 -0
- package/src/session/auth/composable.ts +1 -1
- package/src/session/auth/firebase.ts +1 -1
- package/src/session/auth/useCurrentTenant.ts +3 -1
- package/src/shell/SplashScreen.tsx +22 -26
- package/src/shell/apps/StandaloneApp.tsx +9 -6
- package/src/shell/login/EnterpriseSigninButton.tsx +6 -4
- package/src/shell/login/GitHubSignInButton.tsx +3 -7
- package/src/shell/login/GoogleSignInButton.tsx +3 -1
- package/src/shell/login/InviteAcceptModal.tsx +5 -2
- package/src/shell/login/MicrosoftSigninButton.tsx +4 -6
- package/src/shell/login/SigninScreen.tsx +18 -13
- package/src/shell/login/SignupForm.tsx +46 -46
- package/src/shell/login/TerminalLogin.tsx +36 -33
- package/src/shell/login/UserInfo.tsx +15 -13
- package/src/shell/login/UserSessionMenu.tsx +28 -31
- package/src/widgets/index.ts +0 -1
- package/src/widgets/json-view/JSONCode.tsx +1 -1
- package/src/widgets/json-view/JSONDisplay.tsx +8 -3
- package/src/widgets/json-view/JSONSwitcher.tsx +24 -0
- package/src/widgets/json-view/JSONView.tsx +1 -1
- package/src/widgets/json-view/index.ts +1 -0
- package/src/widgets/markdown/ArtifactContentRenderer.tsx +15 -7
- package/src/widgets/markdown/CodeBlockContext.tsx +34 -0
- package/src/widgets/markdown/MarkdownRenderer.tsx +14 -13
- package/src/widgets/markdown/codeBlockHandlers.tsx +17 -36
- package/src/widgets/markdown/index.ts +27 -34
- package/src/widgets/markdown/remarkDirectiveHandler.ts +1 -1
- package/src/widgets/schema-editor/ManagedSchema.ts +6 -5
- package/src/widgets/schema-editor/editor/PropertyEditor.tsx +7 -3
- package/src/widgets/schema-editor/editor/SchemaEditor.tsx +3 -1
- package/src/widgets/upload/DropZone.tsx +10 -13
- package/src/widgets/upload/UploadResultCategory.tsx +3 -1
- package/src/widgets/upload/UploadSummary.tsx +13 -11
- package/tsconfig.dist.json +1 -1
- package/lib/esm/core/components/Dropdown.js +0 -16
- package/lib/esm/core/components/Dropdown.js.map +0 -1
- package/lib/esm/core/components/DropdownList.js +0 -9
- package/lib/esm/core/components/DropdownList.js.map +0 -1
- package/lib/esm/core/components/RadioGroup.js +0 -34
- package/lib/esm/core/components/RadioGroup.js.map +0 -1
- package/lib/esm/core/components/SelectStack.js +0 -8
- package/lib/esm/core/components/SelectStack.js.map +0 -1
- package/lib/esm/core/components/Switch.js +0 -12
- package/lib/esm/core/components/Switch.js.map +0 -1
- package/lib/esm/widgets/popover/Popover.js +0 -73
- package/lib/esm/widgets/popover/Popover.js.map +0 -1
- package/lib/esm/widgets/popover/context.js +0 -7
- package/lib/esm/widgets/popover/context.js.map +0 -1
- package/lib/esm/widgets/popover/index.js +0 -3
- package/lib/esm/widgets/popover/index.js.map +0 -1
- package/lib/esm/widgets/popover/slots.js +0 -22
- package/lib/esm/widgets/popover/slots.js.map +0 -1
- package/lib/types/core/components/Dropdown.d.ts +0 -15
- package/lib/types/core/components/Dropdown.d.ts.map +0 -1
- package/lib/types/core/components/DropdownList.d.ts +0 -13
- package/lib/types/core/components/DropdownList.d.ts.map +0 -1
- package/lib/types/core/components/RadioGroup.d.ts +0 -26
- package/lib/types/core/components/RadioGroup.d.ts.map +0 -1
- package/lib/types/core/components/SelectStack.d.ts +0 -13
- package/lib/types/core/components/SelectStack.d.ts.map +0 -1
- package/lib/types/core/components/Switch.d.ts +0 -11
- package/lib/types/core/components/Switch.d.ts.map +0 -1
- package/lib/types/widgets/popover/Popover.d.ts +0 -38
- package/lib/types/widgets/popover/Popover.d.ts.map +0 -1
- package/lib/types/widgets/popover/context.d.ts +0 -8
- package/lib/types/widgets/popover/context.d.ts.map +0 -1
- package/lib/types/widgets/popover/index.d.ts +0 -3
- package/lib/types/widgets/popover/index.d.ts.map +0 -1
- package/lib/types/widgets/popover/slots.d.ts +0 -5
- package/lib/types/widgets/popover/slots.d.ts.map +0 -1
- package/src/core/components/Dropdown.tsx +0 -63
- package/src/core/components/DropdownList.tsx +0 -72
- package/src/core/components/RadioGroup.tsx +0 -100
- package/src/core/components/SelectStack.tsx +0 -63
- package/src/core/components/Switch.tsx +0 -30
- package/src/widgets/popover/Popover.tsx +0 -171
- package/src/widgets/popover/context.ts +0 -15
- package/src/widgets/popover/index.ts +0 -2
- package/src/widgets/popover/slots.ts +0 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertesia-ui-shell.js","sources":["esm/shell/login/InviteAcceptModal.js","esm/shell/login/EnterpriseSigninButton.js","esm/shell/login/GitHubSignInButton.js","esm/shell/login/GoogleSignInButton.js","esm/shell/login/MicrosoftSigninButton.js","esm/shell/login/SignupForm.js","esm/shell/login/SigninScreen.js","esm/shell/login/TerminalLogin.js","esm/shell/login/SignInModal.js","esm/shell/login/UserInfo.js","esm/shell/login/UserSessionMenu.js","esm/shell/utils.js","esm/shell/SplashScreen.js","esm/shell/VertesiaShell.js","esm/shell/apps/AppInstallationProvider.js","esm/shell/apps/AppProjectSelector.js","esm/shell/apps/StandaloneApp.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Button, Modal, ModalBody, ModalTitle } from \"@vertesia/ui/core\";\nimport { useEffect, useState } from \"react\";\nimport { useUserSession } from \"@vertesia/ui/session\";\nexport function InviteAcceptModal() {\n const session = useUserSession();\n const { client, account } = session;\n const [showModal, setShowModal] = useState(false);\n const [invites, setInvites] = useState([]);\n useEffect(() => {\n client.account.listInvites().then(invites => {\n if (invites.length > 0) {\n // Filter out legacy invites that do not have account data\n const notLegacyInvites = invites.filter(i => i.data.account);\n if (notLegacyInvites.length === 0) {\n console.log(\"No valid invites found, closing modal\");\n return;\n }\n // If we have valid invites, show the modal\n console.log(\"Found valid invites\", notLegacyInvites.length);\n setShowModal(true);\n setInvites(notLegacyInvites);\n }\n else {\n console.log(\"No invites found, closing modal\");\n setShowModal(false);\n }\n }).catch(err => {\n console.error(\"Error fetching invites\", err);\n });\n }, [account?.id]);\n const closeModal = () => setShowModal(false);\n const accept = async (invite) => {\n await client.account.acceptInvite(invite.id);\n await session.fetchAccounts();\n const remainingInvites = invites.filter(i => i.id !== invite.id);\n const notLegacyInvites = remainingInvites.filter(i => i.data.account);\n if (notLegacyInvites.length > 0) {\n setInvites(notLegacyInvites);\n }\n else {\n closeModal();\n }\n };\n const reject = async (invite) => {\n await client.account.rejectInvite(invite.id);\n const remainingInvites = invites.filter(i => i.id !== invite.id);\n setInvites(remainingInvites);\n if (remainingInvites.length === 0) {\n closeModal();\n }\n };\n const inviteList = invites.map(invite => {\n if (!invite.data.account) {\n console.warn(\"Invite has no account data\", invite);\n return null; // Skip rendering this invite\n }\n return (_jsxs(\"div\", { className: \"flex flex-row w-full justify-between border rounded-sm px-2 py-2 \", children: [_jsxs(\"div\", { className: \"flex flex-col\", children: [_jsx(\"div\", { className: \"w-full font-semibold\", children: invite.data.account.name ?? invite.data.account }), invite.data.project && _jsxs(\"div\", { className: \"w-full text-base\", children: [\"- \", invite.data.project.name] }), _jsxs(\"div\", { className: \"text-xs\", children: [\"Role: \", invite.data.role] }), invite.data.invited_by && _jsxs(\"div\", { className: \"text-xs\", children: [\"by \", invite.data.invited_by.name ?? invite.data.invited_by] })] }), _jsxs(\"div\", { className: \"flex flex-col gap-4\", children: [_jsx(Button, { size: 'xs', onClick: () => accept(invite), children: \"Accept\" }), \" \", _jsx(Button, { size: 'xs', variant: \"secondary\", onClick: () => reject(invite), children: \"Reject\" })] })] }, invite.id));\n });\n return (_jsx(\"div\", { children: _jsxs(Modal, { isOpen: showModal, onClose: closeModal, children: [_jsx(ModalTitle, { children: \"Review Invites\" }), _jsxs(ModalBody, { children: [_jsx(\"div\", { className: \"text-sm pb-4\", children: \"You have received the following invites to join other accounts. Please review and accept or declined them.\" }), inviteList] })] }) }));\n}\n//# sourceMappingURL=InviteAcceptModal.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Button, Input, Spinner, useToast } from \"@vertesia/ui/core\";\nimport { Env } from \"@vertesia/ui/env\";\nimport { getFirebaseAuth, setFirebaseTenant, useUXTracking } from \"@vertesia/ui/session\";\nimport { GoogleAuthProvider, OAuthProvider, signInWithRedirect } from \"firebase/auth\";\nimport { useState } from \"react\";\nfunction getProvider(redirectTo) {\n if (!Env.firebase) {\n throw new Error(\"Firebase configuration is not available in the environment\");\n }\n const providerType = Env.firebase.providerType;\n switch (providerType) {\n case \"oidc\":\n return new OAuthProvider(\"oidc.main\");\n case \"google\": {\n let redirectPath = redirectTo || window.location.pathname || '/';\n if (redirectPath[0] !== '/') {\n redirectPath = '/' + redirectPath;\n }\n const provider = new GoogleAuthProvider();\n provider.addScope('profile');\n provider.addScope('email');\n provider.setCustomParameters({\n prompt: 'select_account',\n redirect_uri: window.location.origin + redirectPath\n });\n return provider;\n }\n case \"microsoft\":\n return new OAuthProvider(\"microsoft.com\");\n case \"github\":\n return new OAuthProvider(\"github.com\");\n default:\n return new OAuthProvider(\"oidc.main\");\n }\n}\nexport default function EnterpriseSigninButton({ redirectTo }) {\n const [isLoading, setIsLoading] = useState(false);\n const { trackEvent } = useUXTracking();\n const [email, setEmail] = useState(\"\");\n const toast = useToast();\n const signIn = async () => {\n if (!email)\n return;\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(email)) {\n toast({\n title: \"Invalid email address\",\n status: \"error\",\n duration: 5000,\n });\n return;\n }\n // Env.firebase.tenantEmail = email;\n setIsLoading(true);\n setFirebaseTenant(email).then((data) => {\n if (!data) {\n toast({\n title: \"Tenant not found\",\n status: \"error\",\n duration: 5000,\n });\n setIsLoading(false);\n return;\n }\n localStorage.setItem(\"tenantName\", data.name ?? \"\");\n const provider = getProvider(redirectTo);\n trackEvent(\"enterprise_signin\", {\n firebaseTenantName: data.name,\n });\n Env.logger.info('Enterprise single sign-in', {\n vertesia: {\n email: email,\n firebaseTenantName: data.name,\n firebaseTenantId: data.firebaseTenantId,\n },\n });\n signInWithRedirect(getFirebaseAuth(), provider);\n setIsLoading(false);\n });\n };\n return (_jsxs(_Fragment, { children: [_jsx(Input, { value: email, onChange: setEmail, placeholder: \"Enter your enterprise email\", type: \"email\" }), isLoading ? (_jsx(\"div\", { className: \"w-full flex justify-center\", children: _jsx(Spinner, {}) })) : (_jsx(Button, { variant: \"outline\", onClick: signIn, className: \"w-full mt-2 py-4 flex rounded-lg hover:shadow-sm transition duration-150 text-center\", children: _jsx(\"span\", { className: \"text-sm font-semibold\", children: \"Continue with Enterprise SSO\" }) }))] }));\n}\n//# sourceMappingURL=EnterpriseSigninButton.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { GithubAuthProvider, signInWithRedirect } from \"firebase/auth\";\nimport { getFirebaseAuth } from \"@vertesia/ui/session\";\nimport { Button } from \"@vertesia/ui/core\";\nexport default function GitHubSignInButton({}) {\n const signIn = () => {\n localStorage.removeItem(\"tenantName\");\n //with github can only have one allowed redirect\n const baseUrl = \"https://dengenlabs.firebaseapp.com/__/auth/handler\";\n let redirectPath = baseUrl + window.location.pathname;\n if (redirectPath[0] !== \"/\") {\n redirectPath = \"/\" + redirectPath;\n }\n const provider = new GithubAuthProvider();\n provider.addScope(\"profile\");\n provider.addScope(\"email\");\n /*provider.setCustomParameters({\n redirect_uri: redirectPath,\n });*/\n signInWithRedirect(getFirebaseAuth(), provider);\n };\n return (_jsxs(Button, { variant: \"outline\", onClick: signIn, className: \"w-full py-5 flex rounded-lg hover:shadow-sm transition duration-150 text-center mb-2\", children: [_jsx(\"img\", { className: \"size-6 bg-white rounded-full\", src: \"https://www.svgrepo.com/show/503359/github.svg\", loading: \"lazy\", alt: \"github logo\" }), _jsx(\"span\", { className: \"text-sm font-semibold\", children: \"Continue with GitHub\" })] }));\n}\n//# sourceMappingURL=GitHubSignInButton.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { GoogleAuthProvider, signInWithRedirect } from \"firebase/auth\";\nimport { getFirebaseAuth } from \"@vertesia/ui/session\";\nimport { Button } from \"@vertesia/ui/core\";\nexport default function GoogleSignInButton({ redirectTo }) {\n const signIn = () => {\n localStorage.removeItem(\"tenantName\");\n let redirectPath = redirectTo || window.location.pathname || '/';\n if (redirectPath[0] !== '/') {\n redirectPath = '/' + redirectPath;\n }\n const provider = new GoogleAuthProvider();\n provider.addScope('profile');\n provider.addScope('email');\n // always ask to select the google account\n //console.log('redirectPath', window.location.origin + redirectPath)\n provider.setCustomParameters({\n prompt: 'select_account',\n redirect_uri: window.location.origin + redirectPath\n });\n signInWithRedirect(getFirebaseAuth(), provider);\n };\n return (_jsxs(Button, { variant: \"outline\", onClick: signIn, className: \"w-full py-5 flex rounded-lg hover:shadow-sm transition duration-150 text-center mb-2\", children: [_jsx(\"img\", { className: \"size-6\", src: \"https://www.svgrepo.com/show/475656/google-color.svg\", loading: \"lazy\", alt: \"google logo\" }), _jsx(\"span\", { className: \"text-sm font-semibold\", children: \"Continue with Google\" })] }));\n}\n//# sourceMappingURL=GoogleSignInButton.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { OAuthProvider, signInWithRedirect } from \"firebase/auth\";\nimport { getFirebaseAuth } from \"@vertesia/ui/session\";\nimport { Button } from \"@vertesia/ui/core\";\nexport default function MicrosoftSignInButton({ redirectTo }) {\n const signIn = () => {\n localStorage.removeItem(\"tenantName\");\n let redirectPath = redirectTo || window.location.pathname || '/';\n if (redirectPath[0] !== '/') {\n redirectPath = '/' + redirectPath;\n }\n const provider = new OAuthProvider('microsoft.com');\n provider.addScope('profile');\n provider.addScope('email');\n signInWithRedirect(getFirebaseAuth(), provider);\n };\n return (_jsxs(Button, { variant: \"outline\", onClick: signIn, className: \"w-full py-5 flex rounded-lg hover:shadow-sm transition duration-150 text-center\", children: [_jsx(\"img\", { className: \"size-6\", src: \"https://learn.microsoft.com/en-us/entra/identity-platform/media/howto-add-branding-in-apps/ms-symbollockup_mssymbol_19.svg\", loading: \"lazy\", alt: \"microsoft logo\" }), _jsx(\"span\", { className: \"text-sm font-semibold\", children: \"Continue with Microsoft\" })] }));\n}\n//# sourceMappingURL=MicrosoftSigninButton.js.map","import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Button, Input, SelectBox, SelectStack } from \"@vertesia/ui/core\";\nimport { useEffect, useState } from \"react\";\nimport { getFirebaseAuth } from \"@vertesia/ui/session\";\nconst companySizeOptions = [\n { id: 1, label: \"1-10 employees\" },\n { id: 11, label: \"11-100 employees\" },\n { id: 101, label: \"101-1000 employees\" },\n { id: 1001, label: \"1001-5000 employees\" },\n { id: 5001, label: \"5000+ employees\" },\n];\nconst accountTypeOptions = [\n {\n id: \"personal\",\n label: \"Personal\",\n description: \"For personal use, or for a small team.\",\n },\n {\n id: \"company\",\n label: \"Company\",\n description: \"For a company or organization.\",\n },\n];\nconst projectMaturityOptions = [\n { id: \"testing\", label: \"Just Testing or Evaluating LLMs\" },\n { id: \"exploring\", label: \"Actively Exploring LLMs on a Project\" },\n { id: \"using\", label: \"Already Using LLMs in Production\" },\n { id: \"migrating\", label: \"Migrating to different LLMs\" },\n { id: \"other\", label: \"Other\" },\n];\nexport default function SignupForm({ onSignup, goBack }) {\n const [accountType, setAccountType] = useState(undefined);\n const [companySize, setCompanySize] = useState(undefined);\n const [companyName, setCompanyName] = useState(undefined);\n const [companyWebsite, setCompanyWebsite] = useState(undefined);\n const [projectMaturity, setProjectMaturity] = useState(undefined);\n const [fbUser, setFbUser] = useState(undefined);\n const [error, setError] = useState(undefined);\n const isCompany = accountType === \"company\";\n useEffect(() => {\n const user = getFirebaseAuth().currentUser;\n if (!user) {\n console.error('No user found');\n return;\n }\n setFbUser(user);\n }, [fbUser]);\n const isValid = () => {\n if (!accountType) {\n setError(\"Please select an account type\");\n return false;\n }\n if (isCompany && !companyName) {\n setError(\"Please enter an organization name\");\n return false;\n }\n if (isCompany && !companySize) {\n setError(\"Please select a company size\");\n return false;\n }\n return true;\n };\n const onSubmit = async () => {\n if (!isValid())\n return;\n if (!accountType)\n return;\n const signupData = {\n accountType: accountType,\n companyName: companyName,\n companySize: companySize?.id,\n companyWebsite: companyWebsite,\n maturity: projectMaturity,\n };\n window.localStorage.setItem(\"composableSignupData\", JSON.stringify(signupData));\n const fbToken = await getFirebaseAuth().currentUser?.getIdToken();\n console.log('Got firebase token', getFirebaseAuth(), fbToken);\n if (!fbToken) {\n console.error('No firebase token found');\n return;\n }\n onSignup(signupData, fbToken);\n };\n return (_jsxs(\"div\", { className: \"flex flex-col space-y-2\", children: [_jsxs(\"div\", { className: \"prose\", children: [_jsxs(\"p\", { className: \"prose text-sm text-muted pt-4\", children: [\"Welcome to Vertesia, \", fbUser?.displayName, \" (\", fbUser?.email, \"). Please tell us a little bit about yourself and you'll be on your way. No credit card is required.\"] }), error &&\n _jsx(\"div\", { className: \"text-destructive\", children: error })] }), _jsx(FormItem, { label: \"Account Type\", children: _jsx(SelectStack, { options: accountTypeOptions, selected: accountTypeOptions.find((option) => option.id === accountType), onSelect: (option) => setAccountType(option.id) }) }), isCompany &&\n _jsxs(_Fragment, { children: [_jsx(FormItem, { label: \"Company Size\", children: _jsx(SelectBox, { className: \"w-full border border-accent bg-muted\", value: companySize, options: companySizeOptions, onChange: setCompanySize, optionLabel: (option) => option?.label, placeholder: 'Select Company Size' }) }), _jsx(FormItem, { label: \"Company Name\", children: _jsx(Input, { value: companyName, onChange: setCompanyName, type: \"text\", required: true }) }), _jsx(FormItem, { label: \"Company Website\", children: _jsx(Input, { value: companyWebsite, onChange: setCompanyWebsite, type: \"text\" }) })] }), _jsx(FormItem, { label: \"Project Maturity\", children: _jsx(SelectBox, { className: \"w-full border border-accent bg-muted\", options: projectMaturityOptions, value: projectMaturityOptions.find((option) => option.id === projectMaturity), optionLabel: (option) => option?.label, placeholder: 'Select Project Maturity', onChange: (option) => setProjectMaturity(option?.id) }) }), _jsxs(\"div\", { className: \"pt-8 flex flex-col\", children: [_jsx(Button, { variant: \"primary\", onClick: onSubmit, size: \"xl\", children: _jsx(\"span\", { className: \"text-lg\", children: \"Sign Up\" }) }), _jsx(Button, { variant: \"ghost\", size: \"xl\", className: \"mt-4\", onClick: goBack, children: _jsx(\"span\", { className: \"\", children: \"Wrong account, go back\" }) })] })] }));\n}\nfunction FormItem({ label, children }) {\n return (_jsxs(\"div\", { className: \"flex flex-col space-y-2 pt-4\", children: [_jsx(\"div\", { className: \"text-sm text-muted\", children: label }), children] }));\n}\n//# sourceMappingURL=SignupForm.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Button, useSafeLayoutEffect } from \"@vertesia/ui/core\";\nimport { Env } from \"@vertesia/ui/env\";\nimport { UserNotFoundError, useUserSession, useUXTracking } from \"@vertesia/ui/session\";\nimport clsx from \"clsx\";\nimport { useEffect, useState } from \"react\";\nimport EnterpriseSigninButton from \"./EnterpriseSigninButton\";\nimport GitHubSignInButton from \"./GitHubSignInButton\";\nimport GoogleSignInButton from \"./GoogleSignInButton\";\nimport MicrosoftSignInButton from \"./MicrosoftSigninButton\";\nimport SignupForm from \"./SignupForm\";\nexport function SigninScreen({ allowedPrefix, isNested = false, lightLogo, darkLogo }) {\n const [allow, setAllow] = useState(false);\n useSafeLayoutEffect(() => {\n allowedPrefix && setAllow(window.location.href.startsWith(allowedPrefix));\n }, []);\n return allow ? null : _jsx(SigninScreenImpl, { isNested: isNested, lightLogo: lightLogo, darkLogo: darkLogo });\n}\nfunction SigninScreenImpl({ isNested = false, lightLogo, darkLogo }) {\n const { isLoading, user, authError } = useUserSession();\n return !isLoading && !user ? (_jsx(\"div\", { style: { zIndex: 999998 }, className: (isNested ? \"absolute\" : \"fixed\") + \"overflow-y-auto \", children: _jsxs(\"div\", { className: clsx(\"flex flex-col items-center justify-center py-14 px-4\"), children: [_jsx(StandardSigninPanel, { authError: authError, lightLogo: lightLogo, darkLogo: darkLogo }), _jsxs(\"div\", { className: \"flex gap-x-6 mt-10 justify-center text-muted\", children: [_jsx(\"a\", { href: \"https://vertesiahq.com/privacy\", className: \"text-sm\", children: \"Privacy Policy\" }), _jsx(\"a\", { href: \"https://vertesiahq.com/terms\", className: \"text-sm\", children: \"Terms of Service\" })] })] }) })) : null;\n}\nfunction StandardSigninPanel({ authError, darkLogo, lightLogo }) {\n const [signupData, setSignupData] = useState(undefined);\n const [collectSignupData, setCollectSignupData] = useState(false);\n const { signOut } = useUserSession();\n const { trackEvent } = useUXTracking();\n history.replaceState({}, '', '/');\n const goBack = () => {\n console.log(\"Going back, signing out\");\n setSignupData(undefined);\n setCollectSignupData(false);\n signOut();\n };\n const goToSignup = () => {\n setSignupData(undefined);\n setCollectSignupData(true);\n };\n useEffect(() => {\n if (authError instanceof UserNotFoundError) {\n console.log(\"User not found, redirecting to signup\");\n goToSignup();\n }\n }, [authError]);\n const onSignup = (data, fbToken) => {\n console.log(\"Got Signup data\", data);\n setSignupData(data);\n const payload = {\n signupData: data,\n firebaseToken: fbToken,\n };\n fetch(Env.endpoints.studio + \"/auth/signup\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(payload),\n }).then((res) => {\n console.log(\"Signup successful\", payload, res);\n trackEvent(\"sign_up\");\n window.location.href = \"/\";\n });\n };\n return (_jsxs(_Fragment, { children: [lightLogo && _jsx(\"img\", { src: lightLogo, alt: 'logo', className: 'h-15 block dark:hidden' }), darkLogo && _jsx(\"img\", { src: darkLogo, alt: 'logo', className: 'h-15 hidden dark:block' }), signupData && (_jsxs(\"div\", { className: \"my-6\", children: [\"Need to make a change?\", \" \", _jsx(Button, { onClick: goToSignup, children: \" Go back\" })] })), _jsx(\"div\", { className: \"flex flex-col space-y-2\", children: collectSignupData && !localStorage.getItem('tenantName') ? (_jsx(SignupForm, { onSignup: onSignup, goBack: goBack })) : (_jsxs(\"div\", { className: \"flex flex-col\", children: [_jsx(\"div\", { className: \"my-4\", children: _jsx(\"h2\", { className: \"text-2xl font-bold text-center\", children: \"Log in or Sign up\" }) }), _jsxs(\"div\", { className: \"max-w-2xl text-center my-2 px-2\", children: [\"First time here? No problem, it's free to try!\", _jsx(\"br\", {}), \"We'll just ask you a couple of questions next and you'll be on your way.\"] }), _jsxs(\"div\", { className: \"flex items-center flex-col\", children: [_jsxs(\"div\", { className: \"py-4 w-70\", children: [_jsx(GoogleSignInButton, {}), _jsx(GitHubSignInButton, {}), _jsx(MicrosoftSignInButton, {})] }), _jsxs(\"div\", { className: \"flex items-center flex-row w-70 text-muted\", children: [_jsx(\"hr\", { className: \"w-full\" }), _jsx(\"div\", { className: \"px-2 text-xs\", children: \"OR\" }), _jsx(\"hr\", { className: \"w-full\" })] }), _jsx(\"div\", { className: \"py-4 w-70\", children: _jsx(EnterpriseSigninButton, {}) })] }), authError && !(authError instanceof UserNotFoundError) && (_jsx(\"div\", { className: \"text-center\", children: _jsxs(\"div\", { className: \"\", children: [\"Sorry, we have not been able to sign you in.\", _jsx(\"br\", {}), \"Please try again or contact\", _jsx(\"a\", { className: 'text-info mx-1', href: \"mailto:support@vertesiahq.com\", children: \"support@vertesiahq.com\" }), \"if it persists.\", _jsxs(\"pre\", { className: \"mt-2\", children: [\"Error: \", authError.message] })] }) }))] })) })] }));\n}\n//# sourceMappingURL=SigninScreen.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useState } from 'react';\nimport { Button, Center, ErrorBox, Input, SelectBox, Spinner, useFetch, useToast } from '@vertesia/ui/core';\nimport { Env } from \"@vertesia/ui/env\";\nimport { useLocation } from \"@vertesia/ui/router\";\nimport { fetchComposableTokenFromFirebaseToken, useUserSession } from '@vertesia/ui/session';\nconst LOOPBACK_HOSTS = new Set(['127.0.0.1', 'localhost']);\nfunction parseRedirectUri(rawRedirect) {\n if (!rawRedirect) {\n return null;\n }\n let decoded;\n try {\n decoded = decodeURIComponent(rawRedirect);\n }\n catch {\n return null;\n }\n let parsed;\n try {\n parsed = new URL(decoded);\n }\n catch {\n return null;\n }\n if (parsed.protocol !== 'http:') {\n return null;\n }\n if (!parsed.port) {\n return null;\n }\n if (parsed.username || parsed.password) {\n return null;\n }\n if (!LOOPBACK_HOSTS.has(parsed.hostname)) {\n return null;\n }\n return parsed.toString();\n}\nfunction getClientInfo(location) {\n const params = new URLSearchParams(location.search);\n const redirect = parseRedirectUri(params.get('redirect_uri'));\n const code = params.get('code');\n if (!redirect || !code) {\n return null;\n }\n const profile = params.get('profile') ?? \"default\";\n const project = params.get('project') ?? undefined;\n const account = params.get('account') ?? undefined;\n return { redirect, code, profile, project, account };\n}\nexport function TerminalLogin() {\n const [payload, setPayload] = useState();\n const [error, setError] = useState();\n const location = useLocation();\n const clientInfo = getClientInfo(location);\n const toast = useToast();\n const onAccept = async (data) => {\n if (!clientInfo)\n return;\n if (!data.profile) {\n toast({\n title: 'Profile is required',\n description: 'Please enter a profile name to save the client authorization',\n status: 'error',\n duration: 2000\n });\n return;\n }\n if (!data.account) {\n toast({\n title: 'Account is required',\n description: 'Please select an account to authorize the client to access the ComposablePrompts servers',\n status: 'error',\n duration: 2000\n });\n return;\n }\n if (!data.project) {\n toast({\n title: 'Project is required',\n description: 'Please select a project to authorize the client to access the ComposablePrompts servers',\n status: 'error',\n duration: 2000\n });\n return;\n }\n // expire in 1 day\n let payload;\n try {\n const token = await fetchComposableTokenFromFirebaseToken(data.account, data.project, 24 * 3600);\n if (token) {\n payload = {\n ...data,\n studio_server_url: Env.endpoints.studio,\n zeno_server_url: Env.endpoints.zeno,\n token,\n };\n await fetch(clientInfo.redirect, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(payload)\n });\n setPayload(payload);\n }\n else {\n toast({\n title: 'Failed to get composable token',\n status: 'error',\n duration: 5000\n });\n }\n }\n catch (err) {\n if (payload) {\n setError(err);\n setPayload(payload);\n }\n else {\n toast({\n title: 'Error authorizing client',\n description: err.message,\n status: 'error',\n duration: 5000\n });\n }\n }\n };\n const getPageContent = () => {\n if (!clientInfo) {\n return _jsx(ErrorBox, { title: 'Invalid request', children: \"This page should be called by a terminal client to authenticate against the ComposablePrompts servers\" });\n }\n return payload\n ? _jsx(AuthDoneScreen, { payload: payload, error: error })\n : _jsx(AuthAcceptScreen, { clientInfo: clientInfo, onAccept: onAccept });\n };\n const page = getPageContent();\n return (_jsx(\"div\", { className: \"w-full flex flex-col items-center gap-4 mt-24\", children: page }));\n}\nfunction AuthAcceptScreen({ onAccept, clientInfo }) {\n const { client, user } = useUserSession();\n const { data: allProjects, error } = useFetch(() => user ? client.projects.list() : Promise.resolve([]), [user]);\n if (error) {\n return _jsx(ErrorBox, { title: 'Error loading projects', children: error.message });\n }\n const getEnvironmentName = () => {\n if (Env.isLocalDev) {\n return \"Local Dev\";\n }\n else if (Env.isDev) {\n return \"Staging\";\n }\n return \"Production\";\n };\n const envName = getEnvironmentName();\n return user && allProjects ? (_jsxs(_Fragment, { children: [_jsxs(\"div\", { className: 'w-1/3', children: [_jsxs(\"div\", { className: \"mb-4 text-xl font-semibold text-info\", children: [\"Authorizing client on \", envName, \" environment.\"] }), _jsxs(\"div\", { className: 'mb-2 text-md text-muted-foreground', children: [_jsx(\"div\", { children: \"A client app wants authorization to access the composable prompt servers in your name.\" }), _jsxs(\"div\", { children: [\"The client app code is \", _jsx(\"b\", { className: \"text-foreground\", children: clientInfo.code }), \". You can check if the code is correct in the terminal.\"] })] }), _jsxs(\"div\", { className: 'mb-2 text-sm text-muted-foreground', children: [_jsx(\"div\", { children: \"You must choose the target account and project for the client to access.\" }), _jsx(\"div\", { children: \"Also, enter a profile name that will be used to save the authorization in your client configuration.\" })] })] }), _jsx(ProfileForm, { onAccept: onAccept, allProjects: allProjects, data: clientInfo })] })) : _jsx(Spinner, { size: 'lg' });\n}\nfunction AuthDoneScreen({ payload, error }) {\n const toast = useToast();\n const onCopy = () => {\n if (payload) {\n navigator.clipboard.writeText(JSON.stringify(payload));\n toast({\n title: 'Authentication Payload copied',\n description: error ? 'You can paste the authentication payload in the terminal to authenticate the client.' : 'You can close the page now.',\n status: 'success',\n duration: 5000\n });\n }\n };\n return (_jsxs(\"div\", { children: [error ?\n _jsxs(\"div\", { children: [_jsxs(ErrorBox, { title: 'Failed to send the authorization token to the cli tool', children: [\"This can happen due to security checks on Safari. The error is \\\"\", error.message, \"\\\"\"] }), _jsx(\"div\", { children: \"Don't worry, you can still authenticate the cli tool by pasting the authentication token in the terminal. You can close this page.\" })] })\n : _jsx(\"div\", { children: \"The client is authenticated. You can close this page.\" }), _jsx(Center, { className: \"mt-4\", children: _jsx(Button, { variant: 'secondary', onClick: onCopy, children: \"Copy the Authentication Payload\" }) })] }));\n}\nfunction ProfileForm({ allProjects, data, onAccept }) {\n const { accounts, account, project } = useUserSession();\n const [currentData, setCurrentData] = useState(() => ({\n profile: data.profile,\n account: data.account ?? account?.id,\n project: data.project ?? project?.id,\n }));\n const onChangeProfile = (value) => {\n setCurrentData({ ...currentData, profile: value });\n };\n const onChangeAccount = (value) => {\n setCurrentData({ ...currentData, account: value.id, project: undefined });\n };\n const onChangeProject = (value) => {\n setCurrentData({ ...currentData, project: value.id });\n };\n const projects = allProjects.filter(p => p.account === currentData.account);\n return (_jsxs(\"div\", { className: 'w-1/3', children: [_jsxs(\"div\", { className: \"mb-4 flex flex-col gap-2\", children: [_jsx(\"span\", { className: \"font-semibold text-muted-foreground\", children: \"Profile Name\" }), _jsx(Input, { type: 'text', value: currentData.profile, onChange: onChangeProfile })] }), _jsxs(\"div\", { className: \"mb-4 flex flex-col gap-2\", children: [_jsx(\"span\", { className: \"font-semibold text-muted-foreground\", children: \"Account\" }), _jsx(SelectAccount, { value: currentData.account, onChange: onChangeAccount, accounts: accounts || [] })] }), _jsxs(\"div\", { className: \"mb-4 flex flex-col gap-2\", children: [_jsx(\"span\", { className: \"font-semibold text-muted-foreground\", children: \"Project\" }), _jsx(SelectProject, { value: currentData.project, onChange: onChangeProject, projects: projects })] }), _jsxs(\"div\", { className: 'mb-4 text-sm text-attention', children: [_jsx(\"b\", { children: \"Note:\" }), \" If your browser asks for permission to access your local network, please allow it. This is required to send the authorization token back to the CLI tool. If not, you will need to copy/paste the token manually in your terminal.\"] }), _jsx(\"div\", { children: _jsx(Button, { size: 'xl', onClick: () => onAccept(currentData), children: \"Authorize Client\" }) })] }));\n}\nfunction SelectAccount({ value, accounts, onChange }) {\n const _onChange = (value) => {\n onChange(value);\n };\n return _jsx(SelectBox, { options: accounts, value: accounts?.find(a => a.id === value), onChange: _onChange, by: \"id\", optionLabel: (option) => option.name, placeholder: 'Select Account' });\n}\nfunction SelectProject({ value, projects, onChange }) {\n const _onChange = (value) => {\n onChange(value);\n };\n return (_jsx(SelectBox, { by: \"id\", value: projects.find(p => p.id === value), options: projects, optionLabel: (option) => option.name, placeholder: 'Select Project', onChange: _onChange }));\n}\n//# sourceMappingURL=TerminalLogin.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Button, Modal, ModalBody, ModalFooter, ModalTitle } from \"@vertesia/ui/core\";\nimport GitHubSignInButton from \"./GitHubSignInButton\";\nimport GoogleSignInButton from \"./GoogleSignInButton\";\nimport MicrosoftSignInButton from \"./MicrosoftSigninButton\";\nexport default function SignInModal({ isOpen, onClose }) {\n return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, children: [_jsx(ModalTitle, { children: \"Sign In\" }), _jsxs(ModalBody, { className: \"flex justify-center\", children: [_jsx(GoogleSignInButton, {}), _jsx(GitHubSignInButton, {}), _jsx(MicrosoftSignInButton, {})] }), _jsx(ModalFooter, { align: \"right\", children: _jsx(Button, { variant: \"ghost\", onClick: onClose, children: \"Cancel\" }) })] }));\n}\n//# sourceMappingURL=SignInModal.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { getTenantIdFromProject } from \"@vertesia/common\";\nimport { Tabs, TabsBar, TabsPanel, VTooltip } from \"@vertesia/ui/core\";\nimport { Env } from \"@vertesia/ui/env\";\nimport { useUserSession } from \"@vertesia/ui/session\";\n// Package version is now passed as prop from the consuming application\nimport { Check, CopyIcon } from \"lucide-react\";\nimport { useState } from \"react\";\nexport function InfoItems({ title, value }) {\n function copyToClipboard(value) {\n navigator.clipboard.writeText(value);\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 2000);\n }\n const [isCopied, setIsCopied] = useState(false);\n return (_jsxs(\"div\", { className: \"w-full flex justify-between items-center mb-1\", children: [_jsxs(\"div\", { className: \"flex flex-col w-[calc(100%-3rem)]\", children: [_jsx(\"div\", { className: 'text-sm px-2 dark:text-slate-200', children: title }), _jsx(VTooltip, { description: value, size: \"xs\", placement: \"left\", children: _jsxs(\"div\", { className: 'text-xs truncate text-muted w-full text-left px-2', children: [value, \" \"] }) })] }), isCopied ?\n _jsx(Check, { className: \"size-4 cursor-pointer text-success\" })\n :\n _jsx(CopyIcon, { className: \"size-4 cursor-pointer text-gray-400 dark:text-slate-400\", onClick: () => copyToClipboard(value) })] }));\n}\nexport default function InfoList() {\n const session = useUserSession();\n const { account, project, client, authToken } = session;\n const server = new URL(client.baseUrl).hostname;\n const store = new URL(client.store.baseUrl).hostname;\n const tenantId = project ? getTenantIdFromProject(project) : '';\n const tabs = [\n {\n name: 'user',\n label: 'User',\n content: _jsxs(\"div\", { className: \"space-y-1 p-2\", children: [_jsx(InfoItems, { title: \"Organization ID\", value: account?.id ?? 'Unknown' }), _jsx(InfoItems, { title: \"Project ID\", value: project?.id ?? 'Unknown' }), _jsx(InfoItems, { title: \"User ID\", value: authToken?.sub ?? 'Unknown' }), _jsx(InfoItems, { title: \"Organization Roles\", value: authToken?.account_roles?.join(',') ?? 'Unknown' }), _jsx(InfoItems, { title: \"Project Roles\", value: authToken?.project_roles?.join(',') ?? 'Unknown' })] })\n },\n {\n name: 'environment',\n label: 'Environment',\n content: _jsxs(\"div\", { className: \"space-y-1 p-2\", children: [_jsx(InfoItems, { title: \"Tenant ID\", value: tenantId }), _jsx(InfoItems, { title: \"Environment\", value: Env.type }), _jsx(InfoItems, { title: \"Server\", value: server }), _jsx(InfoItems, { title: \"Store\", value: store }), _jsx(InfoItems, { title: \"App Version\", value: Env.version }), _jsx(InfoItems, { title: \"SDK Version\", value: Env.sdkVersion || 'unknown' })] })\n }\n ];\n return (_jsx(\"div\", { className: \"w-full\", children: _jsxs(Tabs, { defaultValue: \"user\", tabs: tabs, fullWidth: true, updateHash: false, children: [_jsx(TabsBar, {}), _jsx(TabsPanel, {})] }) }));\n}\n//# sourceMappingURL=UserInfo.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Permission } from \"@vertesia/common\";\nimport { Avatar, Button, MenuList, ModeToggle, Spinner } from \"@vertesia/ui/core\";\nimport { useUserSession } from \"@vertesia/ui/session\";\nimport { Popover } from \"@vertesia/ui/widgets\";\nimport clsx from \"clsx\";\nimport { useState } from \"react\";\nimport SignInModal from \"./SignInModal\";\nimport InfoList from \"./UserInfo\";\nimport { useNavigate } from \"@vertesia/ui/router\";\nimport { useUserPermissions } from \"@vertesia/ui/features\";\nexport function UserSessionMenu({}) {\n const { user, isLoading } = useUserSession();\n const [showModal, setShowModal] = useState(false);\n if (isLoading) {\n return _jsx(Spinner, {});\n }\n else if (!user) {\n return _jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setShowModal(true), children: \"Sign In\" }), _jsx(SignInModal, { isOpen: showModal, onClose: () => setShowModal(false) })] });\n }\n else {\n return (_jsx(\"div\", { className: \"px-3\", children: _jsx(UserSessionPopup, { asMenuTrigger: true }) }));\n }\n}\nfunction UserSessionPopup({ className, asMenuTrigger = false }) {\n const session = useUserSession();\n const navigate = useNavigate();\n const perms = useUserPermissions();\n const { user } = session;\n if (!session || !user)\n return null;\n const isProjectManager = perms.hasPermission(Permission.project_admin);\n return (_jsxs(Popover, { strategy: 'fixed', placement: 'bottom-start', zIndex: 100, children: [_jsx(Popover.Trigger, { click: true, children: _jsx(\"div\", { className: clsx(className, \"flex items-center justify-start\", asMenuTrigger && \"cursor-pointer\"), children: _jsx(Avatar, { size: 'sm', color: 'bg-amber-500', shape: 'circle', \n /*src={picture} */\n name: user?.name }) }) }), _jsx(Popover.Content, { className: \"w-[280px] mx-2 my-1\", children: _jsx(\"div\", { className: \"bg-white dark:bg-slate-900 shadow-lg rounded-md ring-1 ring-gray-200 dark:ring-slate-700\", children: _jsxs(\"div\", { className: 'divide-y divide-gray-200 dark:divide-slate-700', children: [_jsxs(\"div\", { className: 'py-2 pl-2', children: [_jsx(\"p\", { className: \"px-4 dark:text-white mb-1\", children: user?.name ?? 'Unknown' }), _jsx(\"p\", { className: \"px-4 text-xs text-gray-500\", children: user?.email ?? '' })] }), _jsx(\"div\", { className: \"w-full p-1\", children: _jsx(InfoList, {}) }), _jsx(\"div\", { className: 'py-2 pl-2', children: _jsx(ModeToggle, {}) }), _jsx(\"div\", { className: 'py-2', children: _jsxs(MenuList, { children: [isProjectManager && (_jsx(MenuList.Item, { className: 'px-2', onClick: () => navigate('/settings', { replace: true }), children: \"Settings\" })), _jsx(MenuList.Item, { className: 'px-2', onClick: () => session.logout(), children: \"Sign out\" })] }) })] }) }) })] }));\n}\n//# sourceMappingURL=UserSessionMenu.js.map","export function isVertesiaEmail(email) {\n return email ? (email.endsWith('@vertesiahq.com') ||\n email.endsWith('@becomposable.com') ||\n email.endsWith('@composableprompts.com')) : false;\n}\n//# sourceMappingURL=utils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Transition } from \"@headlessui/react\";\nimport { Fragment, useEffect, useState } from \"react\";\nimport { useUserSession } from \"@vertesia/ui/session\";\nexport function SplashScreen({ icon: Icon }) {\n const { isLoading } = useUserSession();\n const [show, setShow] = useState(true);\n useEffect(() => {\n if (!isLoading) {\n setShow(false);\n }\n // setTimeout(() => {\n // setShow(false)\n // }, 2000)\n }, [isLoading]);\n // 300 500 700 1000\n return (_jsx(Transition, { appear: true, show: show, as: Fragment, unmount: true, leave: \"transition ease-in duration-500\", leaveFrom: \"opacity-100\", leaveTo: \"opacity-0\", children: _jsx(\"div\", { style: { zIndex: 999999, position: 'fixed', inset: 0 }, className: 'fixed inset-x-0 inset-y-0', children: _jsx(\"div\", { style: { display: 'flex', width: '100%', height: '100%', alignItems: 'center', justifyContent: 'center' }, className: \"flex w-full h-full items-center justify-center\", children: _jsx(\"div\", { className: \"animate-[spin_4s_linear_infinite]\", children: _jsx(\"div\", { className: 'animate-pulse rounded-full bg-transparent', children: Icon || _jsx(LoadingIcon, {}) }) }) }) }) }));\n}\nfunction LoadingIcon() {\n const stopColor1 = \"currentColor\";\n const stopColor2 = \"currentColor\";\n // const stopColor1 = \"#4F46E5\";\n // const stopColor2 = \"#4F46E5\";\n return (_jsxs(\"svg\", { width: \"32\", height: \"32\", className: \"w-8 h-8 text-indigo-600\", viewBox: \"0 0 50 50\", xmlns: \"http://www.w3.org/2000/svg\", children: [_jsx(\"defs\", { children: _jsxs(\"linearGradient\", { id: \"spinner-gradient\", x1: \"1\", y1: \"0\", x2: \"0\", y2: \"1\", children: [_jsx(\"stop\", { offset: \"0%\", stopColor: stopColor1, stopOpacity: \"1\" }), _jsx(\"stop\", { offset: \"100%\", stopColor: stopColor2, stopOpacity: \"0\" })] }) }), _jsx(\"circle\", { cx: \"25\", cy: \"25\", r: \"20\", stroke: \"url(#spinner-gradient)\", strokeWidth: \"5\", fill: \"none\", strokeLinecap: \"round\" })] }));\n}\n//# sourceMappingURL=SplashScreen.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { ThemeProvider, ToastProvider } from \"@vertesia/ui/core\";\nimport { UserPermissionProvider, TypeRegistryProvider } from \"@vertesia/ui/features\";\nimport { UserSessionProvider } from \"@vertesia/ui/session\";\nimport { SplashScreen } from \"./SplashScreen\";\nimport { SigninScreen } from \"./login/SigninScreen\";\nexport function VertesiaShell({ children, lightLogo, darkLogo, loadingIcon }) {\n return (_jsx(ToastProvider, { children: _jsx(UserSessionProvider, { children: _jsx(TypeRegistryProvider, { children: _jsxs(ThemeProvider, { defaultTheme: \"system\", storageKey: \"vite-ui-theme\", children: [_jsx(SplashScreen, { icon: loadingIcon }), _jsx(SigninScreen, { allowedPrefix: \"/shared/\", lightLogo: lightLogo, darkLogo: darkLogo }), _jsx(UserPermissionProvider, { children: children })] }) }) }) }));\n}\n//# sourceMappingURL=VertesiaShell.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { createContext, useContext } from \"react\";\nexport const AppInstallationContext = createContext(null);\nexport function AppInstallationProvider({ installation, children }) {\n return (_jsx(AppInstallationContext.Provider, { value: installation, children: children }));\n}\n/**\n * Get the current app installation obejct when called in an app context otheriwse returns null\n */\nexport function useAppInstallation() {\n return useContext(AppInstallationContext);\n}\n//# sourceMappingURL=AppInstallationProvider.js.map","import { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nimport { SelectBox, useFetch } from \"@vertesia/ui/core\";\nimport { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY, useUserSession } from \"@vertesia/ui/session\";\nimport { useState } from \"react\";\nexport function AppProjectSelector({ app, onChange, placeholder }) {\n const { client, project } = useUserSession();\n const { data: projects, error } = useFetch(() => {\n return client.apps.getAppInstallationProjects(app);\n }, [app.id, app.name]);\n const _onChange = (project) => {\n if (onChange) {\n if (!onChange(project)) {\n // if onChange returns true then the defualt on change is called\n return;\n }\n }\n // default on change\n localStorage.setItem(LastSelectedAccountId_KEY, project.account);\n localStorage.setItem(LastSelectedProjectId_KEY + '-' + project.account, project.id);\n window.location.reload();\n };\n if (error) {\n return _jsxs(\"span\", { className: 'text-red-600', children: [\"Error: failed to fetch projects: \", error.message] });\n }\n return _jsx(SelectProject, { placeholder: placeholder, initialValue: project?.id, projects: projects || [], onChange: _onChange });\n}\nfunction SelectProject({ initialValue, projects, onChange, placeholder = \"Select Project\" }) {\n const [value, setValue] = useState();\n const _onChange = (value) => {\n setValue(value);\n onChange(value);\n };\n let actualValue = !value && initialValue ? projects.find(p => p.id === initialValue) : value;\n return (_jsx(SelectBox, { by: \"id\", value: actualValue, options: projects, optionLabel: (option) => option.name, placeholder: placeholder, onChange: _onChange }));\n}\n//# sourceMappingURL=AppProjectSelector.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Center, useFetch, SelectBox } from \"@vertesia/ui/core\";\nimport { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY, useUserSession } from \"@vertesia/ui/session\";\nimport { LockIcon } from \"lucide-react\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { AppInstallationProvider } from \"./AppInstallationProvider\";\nexport function StandaloneApp({ name, AccessDenied = AccessDeniedMessage, children }) {\n return name ? (_jsx(StandaloneAppImpl, { name: name, AccessDenied: AccessDenied, children: children })) : (_jsx(UnknownAppName, {}));\n}\nexport function StandaloneAppImpl({ name, AccessDenied = AccessDeniedMessage, children }) {\n const { authToken, client } = useUserSession();\n const [installation, setInstallation] = useState(null);\n const [state, setState] = useState(\"loading\");\n useEffect(() => {\n if (!authToken) {\n setState(\"loading\");\n }\n else {\n const isAppVisible = authToken.apps.includes(name);\n if (isAppVisible) {\n client.apps.getAppInstallationByName(name).then(inst => {\n if (!inst) {\n console.log(`App ${name} not found!`);\n setState(\"error\");\n }\n else {\n setState(\"loaded\");\n setInstallation(inst);\n }\n });\n }\n else {\n setState(\"error\");\n }\n }\n }, [name, authToken]);\n if (state === \"loading\") {\n return null;\n }\n else if (state === \"error\") {\n return _jsx(AccessDenied, { name: name });\n }\n else if (installation) {\n return _jsx(AppInstallationProvider, { installation: installation, children: children });\n }\n}\nfunction AccessDeniedMessage({ name }) {\n const { project, accounts, client } = useUserSession();\n const [selectedAccountId, setSelectedAccountId] = useState();\n // Fetch all projects where the app is installed across all organizations\n const { data: allProjects } = useFetch(() => {\n return client.apps.getAppInstallationProjects({ name });\n }, [name]);\n // Group projects by organization\n const { projectsByOrg, orgOptions } = useMemo(() => {\n if (!allProjects || !accounts)\n return { projectsByOrg: {}, orgOptions: [] };\n const grouped = {};\n for (const p of allProjects) {\n if (!grouped[p.account]) {\n grouped[p.account] = [];\n }\n grouped[p.account].push(p);\n }\n // Only show orgs that have projects with the app installed\n const orgsWithProjects = accounts.filter(a => grouped[a.id]?.length > 0);\n return { projectsByOrg: grouped, orgOptions: orgsWithProjects };\n }, [allProjects, accounts]);\n // Auto-select first org if not selected\n useEffect(() => {\n if (!selectedAccountId && orgOptions.length > 0) {\n setSelectedAccountId(orgOptions[0].id);\n }\n }, [orgOptions, selectedAccountId]);\n const onProjectChange = (selected) => {\n localStorage.setItem(LastSelectedAccountId_KEY, selected.account);\n localStorage.setItem(LastSelectedProjectId_KEY + '-' + selected.account, selected.id);\n window.location.reload();\n };\n const filteredProjects = selectedAccountId ? (projectsByOrg[selectedAccountId] || []) : [];\n const selectedOrg = orgOptions.find(a => a.id === selectedAccountId);\n return (_jsxs(Center, { className: \"pt-10 flex flex-col items-center text-center text-gray-700\", children: [_jsx(LockIcon, { className: \"w-10 h-10 mb-4 text-gray-500\" }), _jsx(\"div\", { className: \"text-xl font-semibold\", children: \"Access Denied\" }), _jsxs(\"div\", { className: \"mt-2 text-sm text-gray-500\", children: [\"You don't have permission to view the \", _jsx(\"span\", { className: \"font-semibold\", children: name }), \" app in project: \", _jsxs(\"span\", { className: \"font-semibold\", children: [\"\\u00AB\", project?.name, \"\\u00BB\"] }), \".\"] }), orgOptions.length === 0 && allProjects !== undefined && (_jsx(\"div\", { className: \"mt-4 text-sm text-gray-500\", children: \"This app is not installed in any project you have access to.\" })), orgOptions.length > 0 && (_jsxs(\"div\", { className: \"mt-4 flex flex-row gap-4 items-end\", children: [orgOptions.length > 1 && (_jsxs(\"div\", { children: [_jsx(\"div\", { className: \"text-sm text-gray-500 mb-2\", children: \"Organization\" }), _jsx(SelectBox, { by: \"id\", value: selectedOrg, options: orgOptions, optionLabel: (option) => option.name, placeholder: \"Select Organization\", onChange: (org) => setSelectedAccountId(org.id) })] })), _jsxs(\"div\", { children: [orgOptions.length > 1 && _jsx(\"div\", { className: \"text-sm text-gray-500 mb-2\", children: \"Project\" }), _jsx(SelectBox, { by: \"id\", value: undefined, options: filteredProjects, optionLabel: (option) => option.name, placeholder: \"Select Project\", onChange: onProjectChange })] })] }))] }));\n}\nfunction UnknownAppName() {\n return (_jsxs(Center, { className: \"pt-10 flex flex-col items-center text-center text-gray-700\", children: [_jsx(LockIcon, { className: \"w-10 h-10 mb-4 text-gray-500\" }), _jsx(\"div\", { className: \"text-xl font-semibold\", children: \"Application not registered\" }), _jsxs(\"div\", { className: \"mt-2 text-sm text-gray-500\", children: [\"Before starting to code a Vertesia application you must register an application manifest in Vertesia Studio then install it in one or more projects.\", _jsx(\"p\", {}), \"Then use the created app name as a parameter to \", _jsx(\"code\", { children: \"<StandaloneApp name=\\\"your-app-name\\\">\" }), \" in the \", _jsx(\"code\", { children: \"src/main.tsx\" }), \" file.\"] })] }));\n}\n//# sourceMappingURL=StandaloneApp.js.map"],"names":["InviteAcceptModal","session","useUserSession","client","account","showModal","setShowModal","useState","invites","setInvites","useEffect","listInvites","then","length","notLegacyInvites","filter","i","data","console","log","catch","err","error","id","closeModal","inviteList","map","invite","_jsxs","className","children","_jsx","name","project","role","invited_by","Button","size","onClick","async","acceptInvite","fetchAccounts","accept","variant","rejectInvite","remainingInvites","reject","warn","Modal","isOpen","onClose","ModalTitle","ModalBody","EnterpriseSigninButton","redirectTo","isLoading","setIsLoading","trackEvent","useUXTracking","email","setEmail","toast","useToast","_Fragment","Input","value","onChange","placeholder","type","Spinner","test","setFirebaseTenant","title","status","duration","localStorage","setItem","provider","Env","firebase","Error","providerType","OAuthProvider","redirectPath","window","location","pathname","GoogleAuthProvider","addScope","setCustomParameters","prompt","redirect_uri","origin","getProvider","firebaseTenantName","logger","info","vertesia","firebaseTenantId","signInWithRedirect","getFirebaseAuth","GitHubSignInButton","removeItem","GithubAuthProvider","src","loading","alt","GoogleSignInButton","MicrosoftSignInButton","companySizeOptions","label","accountTypeOptions","description","projectMaturityOptions","SignupForm","onSignup","goBack","accountType","setAccountType","undefined","companySize","setCompanySize","companyName","setCompanyName","companyWebsite","setCompanyWebsite","projectMaturity","setProjectMaturity","fbUser","setFbUser","setError","isCompany","user","currentUser","displayName","FormItem","SelectStack","options","selected","find","option","onSelect","SelectBox","optionLabel","required","signupData","maturity","JSON","stringify","fbToken","getIdToken","SigninScreen","allowedPrefix","isNested","lightLogo","darkLogo","allow","setAllow","useSafeLayoutEffect","href","startsWith","SigninScreenImpl","authError","style","zIndex","clsx","StandardSigninPanel","setSignupData","collectSignupData","setCollectSignupData","signOut","history","replaceState","goToSignup","UserNotFoundError","getItem","payload","firebaseToken","fetch","endpoints","studio","method","headers","body","res","message","LOOPBACK_HOSTS","Set","getClientInfo","params","URLSearchParams","search","redirect","rawRedirect","decoded","parsed","decodeURIComponent","URL","protocol","port","username","password","has","hostname","toString","parseRedirectUri","get","code","profile","TerminalLogin","setPayload","clientInfo","useLocation","onAccept","token","fetchComposableTokenFromFirebaseToken","studio_server_url","zeno_server_url","zeno","page","AuthDoneScreen","AuthAcceptScreen","ErrorBox","allProjects","useFetch","projects","list","Promise","resolve","envName","isLocalDev","isDev","ProfileForm","Center","navigator","clipboard","writeText","accounts","currentData","setCurrentData","p","SelectAccount","SelectProject","a","by","SignInModal","ModalFooter","align","InfoItems","isCopied","setIsCopied","VTooltip","placement","Check","CopyIcon","setTimeout","copyToClipboard","InfoList","authToken","server","baseUrl","store","tenantId","getTenantIdFromProject","tabs","content","sub","account_roles","join","project_roles","version","sdkVersion","Tabs","defaultValue","fullWidth","updateHash","TabsBar","TabsPanel","UserSessionMenu","UserSessionPopup","asMenuTrigger","navigate","useNavigate","perms","useUserPermissions","isProjectManager","hasPermission","Permission","project_admin","Popover","strategy","Trigger","click","Avatar","color","shape","Content","ModeToggle","MenuList","Item","replace","logout","isVertesiaEmail","endsWith","SplashScreen","icon","Icon","show","setShow","Transition","appear","as","Fragment","unmount","leave","leaveFrom","leaveTo","position","inset","display","width","height","alignItems","justifyContent","LoadingIcon","viewBox","xmlns","x1","y1","x2","y2","offset","stopColor","stopOpacity","cx","cy","r","stroke","strokeWidth","fill","strokeLinecap","VertesiaShell","loadingIcon","ToastProvider","UserSessionProvider","TypeRegistryProvider","ThemeProvider","defaultTheme","storageKey","UserPermissionProvider","AppInstallationContext","createContext","AppInstallationProvider","installation","Provider","useAppInstallation","useContext","AppProjectSelector","app","apps","getAppInstallationProjects","initialValue","LastSelectedAccountId_KEY","LastSelectedProjectId_KEY","reload","setValue","actualValue","StandaloneApp","AccessDenied","AccessDeniedMessage","StandaloneAppImpl","UnknownAppName","setInstallation","state","setState","includes","getAppInstallationByName","inst","selectedAccountId","setSelectedAccountId","projectsByOrg","orgOptions","useMemo","grouped","push","orgsWithProjects","filteredProjects","selectedOrg","LockIcon","org"],"mappings":"g4CAIO,SAASA,KACZ,MAAMC,EAAUC,KACVC,OAAEA,EAAMC,QAAEA,GAAYH,GACrBI,EAAWC,GAAgBC,GAAS,IACpCC,EAASC,GAAcF,EAAS,IACvCG,EAAU,KACNP,EAAOC,QAAQO,cAAcC,KAAKJ,IAC9B,GAAIA,EAAQK,OAAS,EAAG,CAEpB,MAAMC,EAAmBN,EAAQO,OAAOC,GAAKA,EAAEC,KAAKb,SACpD,GAAgC,IAA5BU,EAAiBD,OAEjB,YADAK,QAAQC,IAAI,yCAIhBD,QAAQC,IAAI,sBAAuBL,EAAiBD,QACpDP,GAAa,GACbG,EAAWK,EACf,MAEII,QAAQC,IAAI,mCACZb,GAAa,KAElBc,MAAMC,IACLH,QAAQI,MAAM,yBAA0BD,MAE7C,CAACjB,GAASmB,KACb,MAAMC,EAAa,IAAMlB,GAAa,GAqBhCmB,EAAajB,EAAQkB,IAAIC,GACtBA,EAAOV,KAAKb,QAITwB,EAAM,MAAO,CAAEC,UAAW,oEAAqEC,SAAU,CAACF,EAAM,MAAO,CAAEC,UAAW,gBAAiBC,SAAU,CAACC,EAAK,MAAO,CAAEF,UAAW,uBAAwBC,SAAUH,EAAOV,KAAKb,QAAQ4B,MAAQL,EAAOV,KAAKb,UAAYuB,EAAOV,KAAKgB,SAAWL,EAAM,MAAO,CAAEC,UAAW,mBAAoBC,SAAU,CAAC,KAAMH,EAAOV,KAAKgB,QAAQD,QAAUJ,EAAM,MAAO,CAAEC,UAAW,UAAWC,SAAU,CAAC,SAAUH,EAAOV,KAAKiB,QAAUP,EAAOV,KAAKkB,YAAcP,EAAM,MAAO,CAAEC,UAAW,UAAWC,SAAU,CAAC,MAAOH,EAAOV,KAAKkB,WAAWH,MAAQL,EAAOV,KAAKk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AA,GAAK,mDAAoDA,EAAK,OAAQ,CAAED,SAAU,yCAA6C,WAAYC,EAAK,OAAQ,CAAED,SAAU,iBAAmB,cACxqB"}
|
|
1
|
+
{"version":3,"file":"vertesia-ui-shell.js","sources":["esm/i18n/instance.js","esm/i18n/index.js","esm/shell/login/InviteAcceptModal.js","esm/shell/login/EnterpriseSigninButton.js","esm/shell/login/GitHubSignInButton.js","esm/shell/login/GoogleSignInButton.js","esm/shell/login/MicrosoftSigninButton.js","esm/shell/login/SignupForm.js","esm/shell/login/SigninScreen.js","esm/shell/login/TerminalLogin.js","esm/shell/login/SignInModal.js","esm/shell/login/UserInfo.js","esm/shell/login/UserSessionMenu.js","esm/shell/utils.js","esm/shell/SplashScreen.js","esm/shell/VertesiaShell.js","esm/shell/apps/AppInstallationProvider.js","esm/shell/apps/AppProjectSelector.js","esm/shell/apps/StandaloneApp.js"],"sourcesContent":["import i18next from 'i18next';\nimport { initReactI18next } from 'react-i18next';\nimport ar from './locales/ar.json';\nimport de from './locales/de.json';\nimport en from './locales/en.json';\nimport es from './locales/es.json';\nimport fr from './locales/fr.json';\nimport it from './locales/it.json';\nimport ja from './locales/ja.json';\nimport ko from './locales/ko.json';\nimport pt from './locales/pt.json';\nimport ru from './locales/ru.json';\nimport tr from './locales/tr.json';\nimport zh from './locales/zh.json';\nimport zhTW from './locales/zh-TW.json';\nexport const NAMESPACE = 'vertesia.ui';\n// Scoped instance — does NOT touch the global i18next singleton\nconst i18nInstance = i18next.createInstance();\nvoid i18nInstance.use(initReactI18next).init({\n resources: {\n ar: { [NAMESPACE]: ar },\n de: { [NAMESPACE]: de },\n en: { [NAMESPACE]: en },\n es: { [NAMESPACE]: es },\n fr: { [NAMESPACE]: fr },\n it: { [NAMESPACE]: it },\n ja: { [NAMESPACE]: ja },\n ko: { [NAMESPACE]: ko },\n pt: { [NAMESPACE]: pt },\n ru: { [NAMESPACE]: ru },\n tr: { [NAMESPACE]: tr },\n zh: { [NAMESPACE]: zh },\n 'zh-TW': { [NAMESPACE]: zhTW },\n },\n fallbackLng: 'en',\n ns: [NAMESPACE],\n defaultNS: NAMESPACE,\n interpolation: {\n escapeValue: false, // React already escapes\n },\n react: {\n useSuspense: false, // Translations are bundled, no async loading\n },\n});\nexport { i18nInstance };\n//# sourceMappingURL=instance.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useEffect } from 'react';\nimport { I18nextProvider, useTranslation } from 'react-i18next';\nimport { i18nInstance, NAMESPACE } from './instance.js';\nfunction detectLanguage(lng) {\n return lng ?? navigator.language?.split('-')[0] ?? 'en';\n}\nexport function I18nProvider({ lng, children }) {\n // Set language synchronously on first render to avoid flash of wrong language\n const language = detectLanguage(lng);\n if (i18nInstance.language !== language) {\n void i18nInstance.changeLanguage(language);\n }\n // Also react to prop changes\n useEffect(() => {\n const lang = detectLanguage(lng);\n if (i18nInstance.language !== lang) {\n void i18nInstance.changeLanguage(lang);\n }\n }, [lng]);\n return (_jsx(I18nextProvider, { i18n: i18nInstance, children: children }));\n}\n/**\n * Hook for components inside @vertesia/ui to get translation functions.\n * Always binds to the 'vertesia.ui' namespace on the scoped instance.\n */\nexport function useUITranslation() {\n return useTranslation(NAMESPACE, { i18n: i18nInstance });\n}\nexport { i18nInstance, NAMESPACE } from './instance.js';\n//# sourceMappingURL=index.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Button, Modal, ModalBody, ModalTitle } from \"@vertesia/ui/core\";\nimport { useEffect, useState } from \"react\";\nimport { useUserSession } from \"@vertesia/ui/session\";\nimport { useUITranslation } from '../../i18n/index.js';\nexport function InviteAcceptModal() {\n const session = useUserSession();\n const { client, account } = session;\n const { t } = useUITranslation();\n const [showModal, setShowModal] = useState(false);\n const [invites, setInvites] = useState([]);\n useEffect(() => {\n client.account.listInvites().then(invites => {\n if (invites.length > 0) {\n // Filter out legacy invites that do not have account data\n const notLegacyInvites = invites.filter(i => i.data.account);\n if (notLegacyInvites.length === 0) {\n console.log(\"No valid invites found, closing modal\");\n return;\n }\n // If we have valid invites, show the modal\n console.log(\"Found valid invites\", notLegacyInvites.length);\n setShowModal(true);\n setInvites(notLegacyInvites);\n }\n else {\n console.log(\"No invites found, closing modal\");\n setShowModal(false);\n }\n }).catch(err => {\n console.error(\"Error fetching invites\", err);\n });\n }, [account?.id]);\n const closeModal = () => setShowModal(false);\n const accept = async (invite) => {\n await client.account.acceptInvite(invite.id);\n await session.fetchAccounts();\n await session.fetchProjects(invite.data.account.id);\n const remainingInvites = invites.filter(i => i.id !== invite.id);\n const notLegacyInvites = remainingInvites.filter(i => i.data.account);\n if (notLegacyInvites.length > 0) {\n setInvites(notLegacyInvites);\n }\n else {\n closeModal();\n }\n };\n const reject = async (invite) => {\n await client.account.rejectInvite(invite.id);\n const remainingInvites = invites.filter(i => i.id !== invite.id);\n setInvites(remainingInvites);\n if (remainingInvites.length === 0) {\n closeModal();\n }\n };\n const inviteList = invites.map(invite => {\n if (!invite.data.account) {\n console.warn(\"Invite has no account data\", invite);\n return null; // Skip rendering this invite\n }\n return (_jsxs(\"div\", { className: \"flex flex-row w-full justify-between border rounded-sm px-2 py-2 \", children: [_jsxs(\"div\", { className: \"flex flex-col\", children: [_jsx(\"div\", { className: \"w-full font-semibold\", children: invite.data.account.name ?? invite.data.account }), invite.data.project && _jsxs(\"div\", { className: \"w-full text-base\", children: [\"- \", invite.data.project.name] }), _jsxs(\"div\", { className: \"text-xs\", children: [\"Role: \", invite.data.role] }), invite.data.invited_by && _jsxs(\"div\", { className: \"text-xs\", children: [\"by \", invite.data.invited_by.name ?? invite.data.invited_by] })] }), _jsxs(\"div\", { className: \"flex flex-col gap-4\", children: [_jsx(Button, { size: 'xs', onClick: () => accept(invite), children: t('login.accept') }), \" \", _jsx(Button, { size: 'xs', variant: \"secondary\", onClick: () => reject(invite), children: t('login.reject') })] })] }, invite.id));\n });\n return (_jsx(\"div\", { children: _jsxs(Modal, { isOpen: showModal, onClose: closeModal, children: [_jsx(ModalTitle, { children: t('login.reviewInvites') }), _jsxs(ModalBody, { children: [_jsx(\"div\", { className: \"text-sm pb-4\", children: \"You have received the following invites to join other accounts. Please review and accept or declined them.\" }), inviteList] })] }) }));\n}\n//# sourceMappingURL=InviteAcceptModal.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Button, Input, Spinner, useToast } from \"@vertesia/ui/core\";\nimport { Env } from \"@vertesia/ui/env\";\nimport { useUITranslation } from \"@vertesia/ui/i18n\";\nimport { getFirebaseAuth, setFirebaseTenant, useUXTracking } from \"@vertesia/ui/session\";\nimport { GoogleAuthProvider, OAuthProvider, signInWithRedirect } from \"firebase/auth\";\nimport { useState } from \"react\";\nfunction getProvider(redirectTo) {\n if (!Env.firebase) {\n throw new Error(\"Firebase configuration is not available in the environment\");\n }\n const providerType = Env.firebase.providerType;\n switch (providerType) {\n case \"oidc\":\n return new OAuthProvider(\"oidc.main\");\n case \"google\": {\n let redirectPath = redirectTo || window.location.pathname || '/';\n if (redirectPath[0] !== '/') {\n redirectPath = '/' + redirectPath;\n }\n const provider = new GoogleAuthProvider();\n provider.addScope('profile');\n provider.addScope('email');\n provider.setCustomParameters({\n prompt: 'select_account',\n redirect_uri: window.location.origin + redirectPath\n });\n return provider;\n }\n case \"microsoft\":\n return new OAuthProvider(\"microsoft.com\");\n case \"github\":\n return new OAuthProvider(\"github.com\");\n default:\n return new OAuthProvider(\"oidc.main\");\n }\n}\nexport default function EnterpriseSigninButton({ redirectTo }) {\n const { t } = useUITranslation();\n const [isLoading, setIsLoading] = useState(false);\n const { trackEvent } = useUXTracking();\n const [email, setEmail] = useState(\"\");\n const toast = useToast();\n const signIn = async () => {\n if (!email)\n return;\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(email)) {\n toast({\n title: t('auth.invalidEmail'),\n status: \"error\",\n duration: 5000,\n });\n return;\n }\n // Env.firebase.tenantEmail = email;\n setIsLoading(true);\n setFirebaseTenant(email).then((data) => {\n if (!data) {\n toast({\n title: t('auth.tenantNotFound'),\n status: \"error\",\n duration: 5000,\n });\n setIsLoading(false);\n return;\n }\n localStorage.setItem(\"tenantName\", data.name ?? \"\");\n const provider = getProvider(redirectTo);\n trackEvent(\"enterprise_signin\", {\n firebaseTenantName: data.name,\n });\n Env.logger.info('Enterprise single sign-in', {\n vertesia: {\n email: email,\n firebaseTenantName: data.name,\n firebaseTenantId: data.firebaseTenantId,\n },\n });\n signInWithRedirect(getFirebaseAuth(), provider);\n setIsLoading(false);\n });\n };\n return (_jsxs(_Fragment, { children: [_jsx(Input, { value: email, onChange: setEmail, placeholder: t('auth.enterEnterpriseEmail'), type: \"email\" }), isLoading ? (_jsx(\"div\", { className: \"w-full flex justify-center\", children: _jsx(Spinner, {}) })) : (_jsx(Button, { variant: \"outline\", onClick: signIn, className: \"w-full mt-2 py-4 flex rounded-lg hover:shadow-sm transition duration-150 text-center\", children: _jsx(\"span\", { className: \"text-sm font-semibold\", children: t('auth.continueWithEnterprise') }) }))] }));\n}\n//# sourceMappingURL=EnterpriseSigninButton.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { GithubAuthProvider, signInWithRedirect } from \"firebase/auth\";\nimport { getFirebaseAuth } from \"@vertesia/ui/session\";\nimport { Button } from \"@vertesia/ui/core\";\nimport { useUITranslation } from \"@vertesia/ui/i18n\";\nexport default function GitHubSignInButton({}) {\n const { t } = useUITranslation();\n const signIn = () => {\n localStorage.removeItem(\"tenantName\");\n const provider = new GithubAuthProvider();\n provider.addScope(\"profile\");\n provider.addScope(\"email\");\n /*provider.setCustomParameters({\n redirect_uri: redirectPath,\n });*/\n signInWithRedirect(getFirebaseAuth(), provider);\n };\n return (_jsxs(Button, { variant: \"outline\", onClick: signIn, className: \"w-full py-5 flex rounded-lg hover:shadow-sm transition duration-150 text-center mb-2\", children: [_jsx(\"img\", { className: \"size-6 bg-white rounded-full\", src: \"https://www.svgrepo.com/show/503359/github.svg\", loading: \"lazy\", alt: \"github logo\" }), _jsx(\"span\", { className: \"text-sm font-semibold\", children: t('auth.continueWithGithub') })] }));\n}\n//# sourceMappingURL=GitHubSignInButton.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { GoogleAuthProvider, signInWithRedirect } from \"firebase/auth\";\nimport { getFirebaseAuth } from \"@vertesia/ui/session\";\nimport { Button } from \"@vertesia/ui/core\";\nimport { useUITranslation } from \"@vertesia/ui/i18n\";\nexport default function GoogleSignInButton({ redirectTo }) {\n const { t } = useUITranslation();\n const signIn = () => {\n localStorage.removeItem(\"tenantName\");\n let redirectPath = redirectTo || window.location.pathname || '/';\n if (redirectPath[0] !== '/') {\n redirectPath = '/' + redirectPath;\n }\n const provider = new GoogleAuthProvider();\n provider.addScope('profile');\n provider.addScope('email');\n // always ask to select the google account\n //console.log('redirectPath', window.location.origin + redirectPath)\n provider.setCustomParameters({\n prompt: 'select_account',\n redirect_uri: window.location.origin + redirectPath\n });\n signInWithRedirect(getFirebaseAuth(), provider);\n };\n return (_jsxs(Button, { variant: \"outline\", onClick: signIn, className: \"w-full py-5 flex rounded-lg hover:shadow-sm transition duration-150 text-center mb-2\", children: [_jsx(\"img\", { className: \"size-6\", src: \"https://www.svgrepo.com/show/475656/google-color.svg\", loading: \"lazy\", alt: \"google logo\" }), _jsx(\"span\", { className: \"text-sm font-semibold\", children: t('auth.continueWithGoogle') })] }));\n}\n//# sourceMappingURL=GoogleSignInButton.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { OAuthProvider, signInWithRedirect } from \"firebase/auth\";\nimport { getFirebaseAuth } from \"@vertesia/ui/session\";\nimport { Button } from \"@vertesia/ui/core\";\nimport { useUITranslation } from \"@vertesia/ui/i18n\";\nexport default function MicrosoftSignInButton({ redirectTo: _redirectTo }) {\n const { t } = useUITranslation();\n const signIn = () => {\n localStorage.removeItem(\"tenantName\");\n const provider = new OAuthProvider('microsoft.com');\n provider.addScope('profile');\n provider.addScope('email');\n signInWithRedirect(getFirebaseAuth(), provider);\n };\n return (_jsxs(Button, { variant: \"outline\", onClick: signIn, className: \"w-full py-5 flex rounded-lg hover:shadow-sm transition duration-150 text-center\", children: [_jsx(\"img\", { className: \"size-6\", src: \"https://learn.microsoft.com/en-us/entra/identity-platform/media/howto-add-branding-in-apps/ms-symbollockup_mssymbol_19.svg\", loading: \"lazy\", alt: \"microsoft logo\" }), _jsx(\"span\", { className: \"text-sm font-semibold\", children: t('auth.continueWithMicrosoft') })] }));\n}\n//# sourceMappingURL=MicrosoftSigninButton.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Button, Input, RadioGroup, SelectBox } from \"@vertesia/ui/core\";\nimport { useEffect, useState } from \"react\";\nimport { getFirebaseAuth } from \"@vertesia/ui/session\";\nimport { useUITranslation } from '../../i18n/index.js';\nexport default function SignupForm({ onSignup, goBack }) {\n const { t } = useUITranslation();\n const [accountType, setAccountType] = useState(undefined);\n const [companySize, setCompanySize] = useState(undefined);\n const [companyName, setCompanyName] = useState(undefined);\n const [companyWebsite, setCompanyWebsite] = useState(undefined);\n const [projectMaturity, setProjectMaturity] = useState(undefined);\n const [fbUser, setFbUser] = useState(undefined);\n const [error, setError] = useState(undefined);\n const isCompany = accountType === \"company\";\n const companySizeOptions = [\n { id: 1, label: t('signup.size1to10') },\n { id: 11, label: t('signup.size11to100') },\n { id: 101, label: t('signup.size101to1000') },\n { id: 1001, label: t('signup.size1001to5000') },\n { id: 5001, label: t('signup.size5000plus') },\n ];\n const accountTypeOptions = [\n {\n id: \"personal\",\n label: t('signup.personal'),\n description: t('signup.personalDescription'),\n },\n {\n id: \"company\",\n label: t('signup.company'),\n description: t('signup.companyDescription'),\n },\n ];\n const projectMaturityOptions = [\n { id: \"testing\", label: t('signup.justTesting') },\n { id: \"exploring\", label: t('signup.activelyExploring') },\n { id: \"using\", label: t('signup.alreadyUsing') },\n { id: \"migrating\", label: t('signup.migratingLLMs') },\n { id: \"other\", label: t('signup.other') },\n ];\n useEffect(() => {\n const user = getFirebaseAuth().currentUser;\n if (!user) {\n console.error('No user found');\n return;\n }\n setFbUser(user);\n }, [fbUser]);\n const isValid = () => {\n if (!accountType) {\n setError(t('signup.pleaseSelectAccountType'));\n return false;\n }\n if (isCompany && !companyName) {\n setError(t('signup.pleaseEnterOrgName'));\n return false;\n }\n if (isCompany && !companySize) {\n setError(t('signup.pleaseSelectCompanySize'));\n return false;\n }\n return true;\n };\n const onSubmit = async () => {\n if (!isValid())\n return;\n if (!accountType)\n return;\n const signupData = {\n accountType: accountType,\n companyName: companyName,\n companySize: companySize?.id,\n companyWebsite: companyWebsite,\n maturity: projectMaturity,\n };\n window.localStorage.setItem(\"composableSignupData\", JSON.stringify(signupData));\n const fbToken = await getFirebaseAuth().currentUser?.getIdToken();\n console.log('Got firebase token', getFirebaseAuth(), fbToken);\n if (!fbToken) {\n console.error('No firebase token found');\n return;\n }\n onSignup(signupData, fbToken);\n };\n return (_jsxs(\"div\", { className: \"flex flex-col space-y-2\", children: [_jsxs(\"div\", { className: \"prose\", children: [_jsx(\"p\", { className: \"prose text-sm text-muted pt-4\", children: t('signup.welcomeMessage', { name: fbUser?.displayName, email: fbUser?.email }) }), error &&\n _jsx(\"div\", { className: \"text-destructive\", children: error })] }), _jsx(FormItem, { label: t('signup.accountType'), children: _jsx(RadioGroup, { options: accountTypeOptions, selected: accountTypeOptions.find((option) => option.id === accountType), onSelect: (option) => setAccountType(option.id) }) }), isCompany &&\n _jsxs(_Fragment, { children: [_jsx(FormItem, { label: t('signup.companySize'), children: _jsx(SelectBox, { className: \"w-full border border-accent bg-muted\", value: companySize, options: companySizeOptions, onChange: setCompanySize, optionLabel: (option) => option?.label, placeholder: t('signup.selectCompanySize') }) }), _jsx(FormItem, { label: t('signup.companyName'), children: _jsx(Input, { value: companyName, onChange: setCompanyName, type: \"text\", required: true }) }), _jsx(FormItem, { label: t('signup.companyWebsite'), children: _jsx(Input, { value: companyWebsite, onChange: setCompanyWebsite, type: \"text\" }) })] }), _jsx(FormItem, { label: t('signup.projectMaturity'), children: _jsx(SelectBox, { className: \"w-full border border-accent bg-muted\", options: projectMaturityOptions, value: projectMaturityOptions.find((option) => option.id === projectMaturity), optionLabel: (option) => option?.label, placeholder: t('signup.selectProjectMaturity'), onChange: (option) => setProjectMaturity(option?.id) }) }), _jsxs(\"div\", { className: \"pt-8 flex flex-col\", children: [_jsx(Button, { variant: \"primary\", onClick: onSubmit, size: \"xl\", children: _jsx(\"span\", { className: \"text-lg\", children: t('signup.signUp') }) }), _jsx(Button, { variant: \"ghost\", size: \"xl\", className: \"mt-4\", onClick: goBack, children: _jsx(\"span\", { className: \"\", children: t('signup.wrongAccountGoBack') }) })] })] }));\n}\nfunction FormItem({ label, children }) {\n return (_jsxs(\"div\", { className: \"flex flex-col space-y-2 pt-4\", children: [_jsx(\"div\", { className: \"text-sm text-muted\", children: label }), children] }));\n}\n//# sourceMappingURL=SignupForm.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Button, useSafeLayoutEffect } from \"@vertesia/ui/core\";\nimport { Env } from \"@vertesia/ui/env\";\nimport { useUITranslation } from \"@vertesia/ui/i18n\";\nimport { UserNotFoundError, useUserSession, useUXTracking } from \"@vertesia/ui/session\";\nimport { RegionTag } from \"@vertesia/ui/layout\";\nimport clsx from \"clsx\";\nimport { useEffect, useState } from \"react\";\nimport EnterpriseSigninButton from \"./EnterpriseSigninButton\";\nimport GitHubSignInButton from \"./GitHubSignInButton\";\nimport GoogleSignInButton from \"./GoogleSignInButton\";\nimport MicrosoftSignInButton from \"./MicrosoftSigninButton\";\nimport SignupForm from \"./SignupForm\";\nexport function SigninScreen({ allowedPrefix, isNested = false, lightLogo, darkLogo }) {\n const [allow, setAllow] = useState(false);\n useSafeLayoutEffect(() => {\n allowedPrefix && setAllow(window.location.href.startsWith(allowedPrefix));\n }, []);\n return allow ? null : _jsx(SigninScreenImpl, { isNested: isNested, lightLogo: lightLogo, darkLogo: darkLogo });\n}\nfunction SigninScreenImpl({ isNested = false, lightLogo, darkLogo }) {\n const { t } = useUITranslation();\n const { isLoading, user, authError } = useUserSession();\n return !isLoading && !user ? (_jsx(\"div\", { style: { zIndex: 999998 }, className: (isNested ? \"absolute\" : \"fixed\") + \"overflow-y-auto \", children: _jsxs(\"div\", { className: clsx(\"flex flex-col items-center justify-center py-14 px-4\"), children: [_jsx(StandardSigninPanel, { authError: authError, lightLogo: lightLogo, darkLogo: darkLogo }), _jsxs(\"div\", { className: \"flex gap-x-6 mt-10 justify-center items-center text-muted\", children: [_jsx(\"a\", { href: \"https://vertesiahq.com/privacy\", className: \"text-sm\", children: t('auth.privacyPolicy') }), _jsx(\"a\", { href: \"https://vertesiahq.com/terms\", className: \"text-sm\", children: t('auth.termsOfService') }), _jsx(RegionTag, {})] })] }) })) : null;\n}\nfunction StandardSigninPanel({ authError, darkLogo, lightLogo }) {\n const { t } = useUITranslation();\n const [signupData, setSignupData] = useState(undefined);\n const [collectSignupData, setCollectSignupData] = useState(false);\n const { signOut } = useUserSession();\n const { trackEvent } = useUXTracking();\n history.replaceState({}, '', '/');\n const goBack = () => {\n console.log(\"Going back, signing out\");\n setSignupData(undefined);\n setCollectSignupData(false);\n signOut();\n };\n const goToSignup = () => {\n setSignupData(undefined);\n setCollectSignupData(true);\n };\n useEffect(() => {\n if (authError instanceof UserNotFoundError) {\n console.log(\"User not found, redirecting to signup\");\n goToSignup();\n }\n }, [authError]);\n const onSignup = (data, fbToken) => {\n console.log(\"Got Signup data\", data);\n setSignupData(data);\n const payload = {\n signupData: data,\n firebaseToken: fbToken,\n };\n fetch(Env.endpoints.studio + \"/auth/signup\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(payload),\n }).then((res) => {\n console.log(\"Signup successful\", payload, res);\n trackEvent(\"sign_up\");\n window.location.href = \"/\";\n });\n };\n return (_jsxs(_Fragment, { children: [lightLogo && _jsx(\"img\", { src: lightLogo, alt: 'logo', className: 'h-15 block dark:hidden' }), darkLogo && _jsx(\"img\", { src: darkLogo, alt: 'logo', className: 'h-15 hidden dark:block' }), signupData && (_jsxs(\"div\", { className: \"my-6\", children: [t('auth.needToMakeChange'), \" \", _jsxs(Button, { onClick: goToSignup, children: [\" \", t('auth.goBack')] })] })), _jsx(\"div\", { className: \"flex flex-col space-y-2\", children: collectSignupData && !localStorage.getItem('tenantName') ? (_jsx(SignupForm, { onSignup: onSignup, goBack: goBack })) : (_jsxs(\"div\", { className: \"flex flex-col\", children: [_jsx(\"div\", { className: \"my-4\", children: _jsx(\"h2\", { className: \"text-2xl font-bold text-center\", children: t('auth.logInOrSignUp') }) }), _jsxs(\"div\", { className: \"max-w-2xl text-center my-2 px-2\", children: [t('auth.firstTimeMessage'), _jsx(\"br\", {}), t('auth.firstTimeDetails')] }), _jsxs(\"div\", { className: \"flex items-center flex-col\", children: [_jsxs(\"div\", { className: \"py-4 w-70\", children: [_jsx(GoogleSignInButton, {}), _jsx(GitHubSignInButton, {}), _jsx(MicrosoftSignInButton, {})] }), _jsxs(\"div\", { className: \"flex items-center flex-row w-70 text-muted\", children: [_jsx(\"hr\", { className: \"w-full\" }), _jsx(\"div\", { className: \"px-2 text-xs\", children: t('auth.or') }), _jsx(\"hr\", { className: \"w-full\" })] }), _jsx(\"div\", { className: \"py-4 w-70\", children: _jsx(EnterpriseSigninButton, {}) })] }), authError && !(authError instanceof UserNotFoundError) && (_jsx(\"div\", { className: \"text-center\", children: _jsxs(\"div\", { className: \"\", children: [t('auth.signInError'), _jsx(\"br\", {}), t('auth.signInErrorContact'), _jsx(\"a\", { className: 'text-info mx-1', href: \"mailto:support@vertesiahq.com\", children: \"support@vertesiahq.com\" }), t('auth.signInErrorPersists'), _jsx(\"pre\", { className: \"mt-2\", children: t('auth.error', { message: authError.message }) })] }) }))] })) })] }));\n}\n//# sourceMappingURL=SigninScreen.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Button, Center, ErrorBox, Input, SelectBox, Spinner, useFetch, useToast } from '@vertesia/ui/core';\nimport { Env } from \"@vertesia/ui/env\";\nimport { useLocation } from \"@vertesia/ui/router\";\nimport { fetchComposableTokenFromFirebaseToken, useUserSession } from '@vertesia/ui/session';\nimport { useState } from 'react';\nimport { useUITranslation } from '../../i18n/index.js';\nconst LOOPBACK_HOSTS = new Set(['127.0.0.1', 'localhost']);\nfunction parseRedirectUri(rawRedirect) {\n if (!rawRedirect) {\n return null;\n }\n let decoded;\n try {\n decoded = decodeURIComponent(rawRedirect);\n }\n catch {\n return null;\n }\n let parsed;\n try {\n parsed = new URL(decoded);\n }\n catch {\n return null;\n }\n if (parsed.protocol !== 'http:') {\n return null;\n }\n if (!parsed.port) {\n return null;\n }\n if (parsed.username || parsed.password) {\n return null;\n }\n if (!LOOPBACK_HOSTS.has(parsed.hostname)) {\n return null;\n }\n return parsed.toString();\n}\nfunction getClientInfo(location) {\n const params = new URLSearchParams(location.search);\n const redirect = parseRedirectUri(params.get('redirect_uri'));\n const code = params.get('code');\n if (!redirect || !code) {\n return null;\n }\n const profile = params.get('profile') ?? \"default\";\n const project = params.get('project') ?? undefined;\n const account = params.get('account') ?? undefined;\n return { redirect, code, profile, project, account };\n}\nexport function TerminalLogin() {\n const [payload, setPayload] = useState();\n const [error, setError] = useState();\n const location = useLocation();\n const clientInfo = getClientInfo(location);\n const toast = useToast();\n const { t } = useUITranslation();\n const onAccept = async (data) => {\n if (!clientInfo)\n return;\n if (!data.profile) {\n toast({\n title: t('login.terminal.profileRequired'),\n description: t('login.terminal.profileRequiredDesc'),\n status: 'error',\n duration: 2000\n });\n return;\n }\n if (!data.account) {\n toast({\n title: t('login.terminal.accountRequired'),\n description: t('login.terminal.accountRequiredDesc'),\n status: 'error',\n duration: 2000\n });\n return;\n }\n if (!data.project) {\n toast({\n title: t('login.terminal.projectRequired'),\n description: t('login.terminal.projectRequiredDesc'),\n status: 'error',\n duration: 2000\n });\n return;\n }\n // expire in 1 day\n let payload;\n try {\n const token = await fetchComposableTokenFromFirebaseToken(data.account, data.project, 24 * 3600);\n if (token) {\n payload = {\n ...data,\n studio_server_url: Env.endpoints.studio,\n zeno_server_url: Env.endpoints.zeno,\n token,\n };\n await fetch(clientInfo.redirect, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(payload)\n });\n setPayload(payload);\n }\n else {\n toast({\n title: t('login.terminal.failedToGetToken'),\n status: 'error',\n duration: 5000\n });\n }\n }\n catch (err) {\n if (payload) {\n setError(err);\n setPayload(payload);\n }\n else {\n toast({\n title: t('login.terminal.errorAuthorizingClient'),\n description: err.message,\n status: 'error',\n duration: 5000\n });\n }\n }\n };\n const getPageContent = () => {\n if (!clientInfo) {\n return _jsx(ErrorBox, { title: t('login.terminal.invalidRequest'), children: t('login.terminal.invalidRequestDesc') });\n }\n return payload\n ? _jsx(AuthDoneScreen, { payload: payload, error: error })\n : _jsx(AuthAcceptScreen, { clientInfo: clientInfo, onAccept: onAccept });\n };\n const page = getPageContent();\n return (_jsx(\"div\", { className: \"w-full flex flex-col items-center gap-4 mt-24\", children: page }));\n}\nfunction AuthAcceptScreen({ onAccept, clientInfo }) {\n const { client, user } = useUserSession();\n const { data: allProjects, error } = useFetch(() => user ? client.projects.list() : Promise.resolve([]), [user]);\n const { t } = useUITranslation();\n if (error) {\n return _jsx(ErrorBox, { title: t('login.terminal.errorLoadingProjects'), children: error.message });\n }\n const getEnvironmentName = () => {\n if (Env.isLocalDev) {\n return t('login.terminal.envLocalDev');\n }\n else if (Env.isDev) {\n return t('login.terminal.envStaging');\n }\n return t('login.terminal.envProduction');\n };\n const envName = getEnvironmentName();\n return user && allProjects ? (_jsxs(_Fragment, { children: [_jsxs(\"div\", { className: 'w-1/3', children: [_jsxs(\"div\", { className: \"mb-4 text-xl font-semibold text-info\", children: [\"Authorizing client on \", envName, \" environment.\"] }), _jsxs(\"div\", { className: 'mb-2 text-md text-muted-foreground', children: [_jsx(\"div\", { children: t('login.terminal.clientWantsAuth') }), _jsxs(\"div\", { children: [\"The client app code is \", _jsx(\"b\", { className: \"text-foreground\", children: clientInfo.code }), \". You can check if the code is correct in the terminal.\"] })] }), _jsxs(\"div\", { className: 'mb-2 text-sm text-muted-foreground', children: [_jsx(\"div\", { children: t('login.terminal.chooseAccountProject') }), _jsx(\"div\", { children: t('login.terminal.profileNameNote') })] })] }), _jsx(ProfileForm, { onAccept: onAccept, allProjects: allProjects, data: clientInfo })] })) : _jsx(Spinner, { size: 'lg' });\n}\nfunction AuthDoneScreen({ payload, error }) {\n const toast = useToast();\n const { t } = useUITranslation();\n const onCopy = () => {\n if (payload) {\n navigator.clipboard.writeText(JSON.stringify(payload));\n toast({\n title: t('login.terminal.authPayloadCopied'),\n description: error ? t('login.terminal.authPayloadCopiedWithError', { error: error.message }) : t('login.terminal.authPayloadCopiedSuccess'),\n status: 'success',\n duration: 5000\n });\n }\n };\n return (_jsxs(\"div\", { children: [error ?\n _jsx(\"div\", { children: _jsx(ErrorBox, { title: t('login.terminal.failedToSendToken'), children: t('login.terminal.failedToSendTokenDesc', { error: error.message }) }) })\n : _jsx(\"div\", { children: t('login.terminal.clientAuthenticated') }), _jsx(Center, { className: \"mt-4\", children: _jsx(Button, { variant: 'secondary', onClick: onCopy, children: t('login.terminal.copyAuthPayload') }) })] }));\n}\nfunction ProfileForm({ allProjects, data, onAccept }) {\n const { accounts, account, project } = useUserSession();\n const { t } = useUITranslation();\n const [currentData, setCurrentData] = useState(() => ({\n profile: data.profile,\n account: data.account ?? account?.id,\n project: data.project ?? project?.id,\n }));\n const onChangeProfile = (value) => {\n setCurrentData({ ...currentData, profile: value });\n };\n const onChangeAccount = (value) => {\n setCurrentData({ ...currentData, account: value.id, project: undefined });\n };\n const onChangeProject = (value) => {\n setCurrentData({ ...currentData, project: value.id });\n };\n const projects = allProjects.filter(p => p.account === currentData.account);\n return (_jsxs(\"div\", { className: 'w-1/3', children: [_jsxs(\"div\", { className: \"mb-4 flex flex-col gap-2\", children: [_jsx(\"span\", { className: \"font-semibold text-muted-foreground\", children: t('login.terminal.profileName') }), _jsx(Input, { type: 'text', value: currentData.profile, onChange: onChangeProfile })] }), _jsxs(\"div\", { className: \"mb-4 flex flex-col gap-2\", children: [_jsx(\"span\", { className: \"font-semibold text-muted-foreground\", children: t('login.terminal.account') }), _jsx(SelectAccount, { value: currentData.account, onChange: onChangeAccount, accounts: accounts || [] })] }), _jsxs(\"div\", { className: \"mb-4 flex flex-col gap-2\", children: [_jsx(\"span\", { className: \"font-semibold text-muted-foreground\", children: t('login.terminal.project') }), _jsx(SelectProject, { value: currentData.project, onChange: onChangeProject, projects: projects })] }), _jsx(\"div\", { className: 'mb-4 text-sm text-attention', children: t('login.terminal.browserPermissionNote') }), _jsx(\"div\", { children: _jsx(Button, { size: 'xl', onClick: () => onAccept(currentData), children: t('login.terminal.authorizeClient') }) })] }));\n}\nfunction SelectAccount({ value, accounts, onChange }) {\n const { t } = useUITranslation();\n const _onChange = (value) => {\n onChange(value);\n };\n return _jsx(SelectBox, { options: accounts, value: accounts?.find(a => a.id === value), onChange: _onChange, by: \"id\", optionLabel: (option) => option.name, placeholder: t('login.terminal.selectAccount') });\n}\nfunction SelectProject({ value, projects, onChange }) {\n const { t } = useUITranslation();\n const _onChange = (value) => {\n onChange(value);\n };\n return (_jsx(SelectBox, { by: \"id\", value: projects.find(p => p.id === value), options: projects, optionLabel: (option) => option.name, placeholder: t('login.terminal.selectProject'), onChange: _onChange }));\n}\n//# sourceMappingURL=TerminalLogin.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Button, Modal, ModalBody, ModalFooter, ModalTitle } from \"@vertesia/ui/core\";\nimport GitHubSignInButton from \"./GitHubSignInButton\";\nimport GoogleSignInButton from \"./GoogleSignInButton\";\nimport MicrosoftSignInButton from \"./MicrosoftSigninButton\";\nexport default function SignInModal({ isOpen, onClose }) {\n return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, children: [_jsx(ModalTitle, { children: \"Sign In\" }), _jsxs(ModalBody, { className: \"flex justify-center\", children: [_jsx(GoogleSignInButton, {}), _jsx(GitHubSignInButton, {}), _jsx(MicrosoftSignInButton, {})] }), _jsx(ModalFooter, { align: \"right\", children: _jsx(Button, { variant: \"ghost\", onClick: onClose, children: \"Cancel\" }) })] }));\n}\n//# sourceMappingURL=SignInModal.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { getTenantIdFromProject } from \"@vertesia/common\";\nimport { Tabs, TabsBar, TabsPanel, VTooltip } from \"@vertesia/ui/core\";\nimport { Env } from \"@vertesia/ui/env\";\nimport { useUserSession } from \"@vertesia/ui/session\";\n// Package version is now passed as prop from the consuming application\nimport { Check, CopyIcon } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { useUITranslation } from '../../i18n/index.js';\nexport function InfoItems({ title, value }) {\n function copyToClipboard(value) {\n navigator.clipboard.writeText(value);\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 2000);\n }\n const [isCopied, setIsCopied] = useState(false);\n return (_jsxs(\"div\", { className: \"w-full flex justify-between items-center mb-1\", children: [_jsxs(\"div\", { className: \"flex flex-col w-[calc(100%-3rem)]\", children: [_jsx(\"div\", { className: 'text-sm px-2 dark:text-slate-200', children: title }), _jsx(VTooltip, { description: value, size: \"xs\", placement: \"left\", children: _jsxs(\"div\", { className: 'text-xs truncate text-muted w-full text-left px-2', children: [value, \" \"] }) })] }), isCopied ?\n _jsx(Check, { className: \"size-4 cursor-pointer text-success\" })\n :\n _jsx(CopyIcon, { className: \"size-4 cursor-pointer text-gray-400 dark:text-slate-400\", onClick: () => copyToClipboard(value) })] }));\n}\nexport default function InfoList() {\n const { t } = useUITranslation();\n const session = useUserSession();\n const { account, project, client, authToken } = session;\n const server = new URL(client.baseUrl).hostname;\n const store = new URL(client.store.baseUrl).hostname;\n const tenantId = project ? getTenantIdFromProject(project) : '';\n const tabs = [\n {\n name: 'user',\n label: t('user.user'),\n content: _jsxs(\"div\", { className: \"space-y-1 p-2\", children: [_jsx(InfoItems, { title: t('user.organizationId'), value: account?.id ?? t('user.unknown') }), _jsx(InfoItems, { title: t('user.projectId'), value: project?.id ?? t('user.unknown') }), _jsx(InfoItems, { title: t('user.userId'), value: authToken?.sub ?? t('user.unknown') }), _jsx(InfoItems, { title: t('user.organizationRoles'), value: authToken?.account_roles?.join(',') ?? t('user.unknown') }), _jsx(InfoItems, { title: t('user.projectRoles'), value: authToken?.project_roles?.join(',') ?? t('user.unknown') })] })\n },\n {\n name: 'environment',\n label: t('user.environment'),\n content: _jsxs(\"div\", { className: \"space-y-1 p-2\", children: [_jsx(InfoItems, { title: t('user.tenantId'), value: tenantId }), _jsx(InfoItems, { title: t('user.environment'), value: Env.type }), _jsx(InfoItems, { title: t('user.server'), value: server }), _jsx(InfoItems, { title: t('user.store'), value: store }), _jsx(InfoItems, { title: t('user.appVersion'), value: Env.version }), _jsx(InfoItems, { title: t('user.sdkVersion'), value: Env.sdkVersion || t('user.unknown') })] })\n }\n ];\n return (_jsx(\"div\", { className: \"w-full\", children: _jsxs(Tabs, { defaultValue: \"user\", tabs: tabs, fullWidth: true, updateHash: false, children: [_jsx(TabsBar, {}), _jsx(TabsPanel, {})] }) }));\n}\n//# sourceMappingURL=UserInfo.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Permission } from \"@vertesia/common\";\nimport { Avatar, Button, MenuList, ModeToggle, Popover, PopoverContent, PopoverTrigger, Spinner } from \"@vertesia/ui/core\";\nimport { useUserSession } from \"@vertesia/ui/session\";\nimport clsx from \"clsx\";\nimport { useState } from \"react\";\nimport SignInModal from \"./SignInModal\";\nimport InfoList from \"./UserInfo\";\nimport { useNavigate } from \"@vertesia/ui/router\";\nimport { useUserPermissions } from \"@vertesia/ui/features\";\nexport function UserSessionMenu({}) {\n const { user, isLoading } = useUserSession();\n const [showModal, setShowModal] = useState(false);\n if (isLoading) {\n return _jsx(Spinner, {});\n }\n else if (!user) {\n return _jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setShowModal(true), children: \"Sign In\" }), _jsx(SignInModal, { isOpen: showModal, onClose: () => setShowModal(false) })] });\n }\n else {\n return (_jsx(\"div\", { className: \"px-3\", children: _jsx(UserSessionPopup, { asMenuTrigger: true }) }));\n }\n}\nfunction UserSessionPopup({ className, asMenuTrigger = false }) {\n const session = useUserSession();\n const navigate = useNavigate();\n const perms = useUserPermissions();\n const { user } = session;\n if (!session || !user)\n return null;\n const isProjectManager = perms.hasPermission(Permission.project_admin);\n return (_jsxs(Popover, { click: true, children: [_jsx(PopoverTrigger, { children: _jsx(\"div\", { className: clsx(className, \"flex items-center justify-start\", asMenuTrigger && \"cursor-pointer\"), children: _jsx(Avatar, { size: 'sm', color: 'bg-amber-500', shape: 'circle', \n /*src={picture} */\n name: user?.name }) }) }), _jsx(PopoverContent, { align: \"start\", className: \"w-[280px] mx-2 my-1 p-0\", children: _jsxs(\"div\", { className: 'divide-y divide-gray-200 dark:divide-slate-700', children: [_jsxs(\"div\", { className: 'py-2 pl-2', children: [_jsx(\"p\", { className: \"px-4 dark:text-white mb-1\", children: user?.name ?? 'Unknown' }), _jsx(\"p\", { className: \"px-4 text-xs text-gray-500\", children: user?.email ?? '' })] }), _jsx(\"div\", { className: \"w-full p-1\", children: _jsx(InfoList, {}) }), _jsx(\"div\", { className: 'py-2 pl-2', children: _jsx(ModeToggle, {}) }), _jsx(\"div\", { className: 'py-2', children: _jsxs(MenuList, { children: [isProjectManager && (_jsx(MenuList.Item, { className: 'px-2', onClick: () => navigate('/settings', { replace: true }), children: \"Settings\" })), _jsx(MenuList.Item, { className: 'px-2', onClick: () => session.logout(), children: \"Sign out\" })] }) })] }) })] }));\n}\n//# sourceMappingURL=UserSessionMenu.js.map","export function isVertesiaEmail(email) {\n return email ? (email.endsWith('@vertesiahq.com') ||\n email.endsWith('@becomposable.com') ||\n email.endsWith('@composableprompts.com')) : false;\n}\n//# sourceMappingURL=utils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { useEffect, useState } from \"react\";\nimport { useUserSession } from \"@vertesia/ui/session\";\nexport function SplashScreen({ icon: Icon }) {\n const { isLoading } = useUserSession();\n const [show, setShow] = useState(true);\n useEffect(() => {\n if (!isLoading) {\n setShow(false);\n }\n }, [isLoading]);\n return (_jsx(AnimatePresence, { children: show && (_jsx(motion.div, { style: { zIndex: 999999, position: 'fixed', inset: 0 }, className: 'fixed inset-x-0 inset-y-0', initial: { opacity: 1 }, exit: { opacity: 0 }, transition: { ease: 'easeIn', duration: 0.5 }, children: _jsx(\"div\", { style: { display: 'flex', width: '100%', height: '100%', alignItems: 'center', justifyContent: 'center' }, className: \"flex w-full h-full items-center justify-center\", children: _jsx(\"div\", { className: \"animate-[spin_4s_linear_infinite]\", children: _jsx(\"div\", { className: 'animate-pulse rounded-full bg-transparent', children: Icon || _jsx(LoadingIcon, {}) }) }) }) })) }));\n}\nfunction LoadingIcon() {\n const stopColor1 = \"currentColor\";\n const stopColor2 = \"currentColor\";\n // const stopColor1 = \"#4F46E5\";\n // const stopColor2 = \"#4F46E5\";\n return (_jsxs(\"svg\", { width: \"32\", height: \"32\", className: \"w-8 h-8 text-indigo-600\", viewBox: \"0 0 50 50\", xmlns: \"http://www.w3.org/2000/svg\", children: [_jsx(\"defs\", { children: _jsxs(\"linearGradient\", { id: \"spinner-gradient\", x1: \"1\", y1: \"0\", x2: \"0\", y2: \"1\", children: [_jsx(\"stop\", { offset: \"0%\", stopColor: stopColor1, stopOpacity: \"1\" }), _jsx(\"stop\", { offset: \"100%\", stopColor: stopColor2, stopOpacity: \"0\" })] }) }), _jsx(\"circle\", { cx: \"25\", cy: \"25\", r: \"20\", stroke: \"url(#spinner-gradient)\", strokeWidth: \"5\", fill: \"none\", strokeLinecap: \"round\" })] }));\n}\n//# sourceMappingURL=SplashScreen.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { ThemeProvider, ToastProvider } from \"@vertesia/ui/core\";\nimport { UserPermissionProvider, TypeRegistryProvider } from \"@vertesia/ui/features\";\nimport { UserSessionProvider } from \"@vertesia/ui/session\";\nimport { SplashScreen } from \"./SplashScreen\";\nimport { SigninScreen } from \"./login/SigninScreen\";\nexport function VertesiaShell({ children, lightLogo, darkLogo, loadingIcon }) {\n return (_jsx(ToastProvider, { children: _jsx(UserSessionProvider, { children: _jsx(TypeRegistryProvider, { children: _jsxs(ThemeProvider, { defaultTheme: \"system\", storageKey: \"vite-ui-theme\", children: [_jsx(SplashScreen, { icon: loadingIcon }), _jsx(SigninScreen, { allowedPrefix: \"/shared/\", lightLogo: lightLogo, darkLogo: darkLogo }), _jsx(UserPermissionProvider, { children: children })] }) }) }) }));\n}\n//# sourceMappingURL=VertesiaShell.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { createContext, useContext } from \"react\";\nexport const AppInstallationContext = createContext(null);\nexport function AppInstallationProvider({ installation, children }) {\n return (_jsx(AppInstallationContext.Provider, { value: installation, children: children }));\n}\n/**\n * Get the current app installation obejct when called in an app context otheriwse returns null\n */\nexport function useAppInstallation() {\n return useContext(AppInstallationContext);\n}\n//# sourceMappingURL=AppInstallationProvider.js.map","import { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nimport { SelectBox, useFetch } from \"@vertesia/ui/core\";\nimport { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY, useUserSession } from \"@vertesia/ui/session\";\nimport { useState } from \"react\";\nexport function AppProjectSelector({ app, onChange, placeholder }) {\n const { client, project } = useUserSession();\n const { data: projects, error } = useFetch(() => {\n return client.apps.getAppInstallationProjects(app);\n }, [app.id, app.name]);\n const _onChange = (project) => {\n if (onChange) {\n if (!onChange(project)) {\n // if onChange returns true then the defualt on change is called\n return;\n }\n }\n // default on change\n localStorage.setItem(LastSelectedAccountId_KEY, project.account);\n localStorage.setItem(LastSelectedProjectId_KEY + '-' + project.account, project.id);\n window.location.reload();\n };\n if (error) {\n return _jsxs(\"span\", { className: 'text-red-600', children: [\"Error: failed to fetch projects: \", error.message] });\n }\n return _jsx(SelectProject, { placeholder: placeholder, initialValue: project?.id, projects: projects || [], onChange: _onChange });\n}\nfunction SelectProject({ initialValue, projects, onChange, placeholder = \"Select Project\" }) {\n const [value, setValue] = useState();\n const _onChange = (value) => {\n setValue(value);\n onChange(value);\n };\n let actualValue = !value && initialValue ? projects.find(p => p.id === initialValue) : value;\n return (_jsx(SelectBox, { by: \"id\", value: actualValue, options: projects, optionLabel: (option) => option.name, placeholder: placeholder, onChange: _onChange }));\n}\n//# sourceMappingURL=AppProjectSelector.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Center, useFetch, SelectBox } from \"@vertesia/ui/core\";\nimport { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY, useUserSession } from \"@vertesia/ui/session\";\nimport { LockIcon } from \"lucide-react\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { useUITranslation } from '../../i18n/index.js';\nimport { AppInstallationProvider } from \"./AppInstallationProvider\";\nexport function StandaloneApp({ name, AccessDenied = AccessDeniedMessage, children }) {\n return name ? (_jsx(StandaloneAppImpl, { name: name, AccessDenied: AccessDenied, children: children })) : (_jsx(UnknownAppName, {}));\n}\nexport function StandaloneAppImpl({ name, AccessDenied = AccessDeniedMessage, children }) {\n const { authToken, client } = useUserSession();\n const [installation, setInstallation] = useState(null);\n const [state, setState] = useState(\"loading\");\n useEffect(() => {\n if (!authToken) {\n setState(\"loading\");\n }\n else {\n const isAppVisible = authToken.apps.includes(name);\n if (isAppVisible) {\n client.apps.getAppInstallationByName(name).then(inst => {\n if (!inst) {\n console.log(`App ${name} not found!`);\n setState(\"error\");\n }\n else {\n setState(\"loaded\");\n setInstallation(inst);\n }\n });\n }\n else {\n setState(\"error\");\n }\n }\n }, [name, authToken]);\n if (state === \"loading\") {\n return null;\n }\n else if (state === \"error\") {\n return _jsx(AccessDenied, { name: name });\n }\n else if (installation) {\n return _jsx(AppInstallationProvider, { installation: installation, children: children });\n }\n}\nfunction AccessDeniedMessage({ name }) {\n const { project, accounts, client } = useUserSession();\n const { t } = useUITranslation();\n const [selectedAccountId, setSelectedAccountId] = useState();\n // Fetch all projects where the app is installed across all organizations\n const { data: allProjects } = useFetch(() => {\n return client.apps.getAppInstallationProjects({ name });\n }, [name]);\n // Group projects by organization\n const { projectsByOrg, orgOptions } = useMemo(() => {\n if (!allProjects || !accounts)\n return { projectsByOrg: {}, orgOptions: [] };\n const grouped = {};\n for (const p of allProjects) {\n if (!grouped[p.account]) {\n grouped[p.account] = [];\n }\n grouped[p.account].push(p);\n }\n // Only show orgs that have projects with the app installed\n const orgsWithProjects = accounts.filter(a => grouped[a.id]?.length > 0);\n return { projectsByOrg: grouped, orgOptions: orgsWithProjects };\n }, [allProjects, accounts]);\n // Auto-select first org if not selected\n useEffect(() => {\n if (!selectedAccountId && orgOptions.length > 0) {\n setSelectedAccountId(orgOptions[0].id);\n }\n }, [orgOptions, selectedAccountId]);\n const onProjectChange = (selected) => {\n localStorage.setItem(LastSelectedAccountId_KEY, selected.account);\n localStorage.setItem(LastSelectedProjectId_KEY + '-' + selected.account, selected.id);\n window.location.reload();\n };\n const filteredProjects = selectedAccountId ? (projectsByOrg[selectedAccountId] || []) : [];\n const selectedOrg = orgOptions.find(a => a.id === selectedAccountId);\n return (_jsxs(Center, { className: \"pt-10 flex flex-col items-center text-center text-gray-700\", children: [_jsx(LockIcon, { className: \"w-10 h-10 mb-4 text-gray-500\" }), _jsx(\"div\", { className: \"text-xl font-semibold\", children: t('shell.accessDenied') }), _jsxs(\"div\", { className: \"mt-2 text-sm text-gray-500\", children: [\"You don't have permission to view the \", _jsx(\"span\", { className: \"font-semibold\", children: name }), \" app in project: \", _jsxs(\"span\", { className: \"font-semibold\", children: [\"\\u00AB\", project?.name, \"\\u00BB\"] }), \".\"] }), orgOptions.length === 0 && allProjects !== undefined && (_jsx(\"div\", { className: \"mt-4 text-sm text-gray-500\", children: \"This app is not installed in any project you have access to.\" })), orgOptions.length > 0 && (_jsxs(\"div\", { className: \"mt-4 flex flex-row gap-4 items-end\", children: [orgOptions.length > 1 && (_jsxs(\"div\", { children: [_jsx(\"div\", { className: \"text-sm text-gray-500 mb-2\", children: t('shell.organization') }), _jsx(SelectBox, { by: \"id\", value: selectedOrg, options: orgOptions, optionLabel: (option) => option.name, placeholder: t('shell.selectOrganization'), onChange: (org) => setSelectedAccountId(org.id) })] })), _jsxs(\"div\", { children: [orgOptions.length > 1 && _jsx(\"div\", { className: \"text-sm text-gray-500 mb-2\", children: t('login.terminal.project') }), _jsx(SelectBox, { by: \"id\", value: undefined, options: filteredProjects, optionLabel: (option) => option.name, placeholder: t('shell.selectProject'), onChange: onProjectChange })] })] }))] }));\n}\nfunction UnknownAppName() {\n const { t } = useUITranslation();\n return (_jsxs(Center, { className: \"pt-10 flex flex-col items-center text-center text-gray-700\", children: [_jsx(LockIcon, { className: \"w-10 h-10 mb-4 text-gray-500\" }), _jsx(\"div\", { className: \"text-xl font-semibold\", children: t('shell.applicationNotRegistered') }), _jsxs(\"div\", { className: \"mt-2 text-sm text-gray-500\", children: [\"Before starting to code a Vertesia application you must register an application manifest in Vertesia Studio then install it in one or more projects.\", _jsx(\"p\", {}), \"Then use the created app name as a parameter to \", _jsx(\"code\", { children: \"<StandaloneApp name=\\\"your-app-name\\\">\" }), \" in the \", _jsx(\"code\", { children: \"src/main.tsx\" }), \" file.\"] })] }));\n}\n//# sourceMappingURL=StandaloneApp.js.map"],"names":["NAMESPACE","i18nInstance","i18next","createInstance","useUITranslation","useTranslation","i18n","InviteAcceptModal","session","useUserSession","client","account","t","showModal","setShowModal","useState","invites","setInvites","useEffect","listInvites","then","length","notLegacyInvites","filter","i","data","console","log","catch","err","error","id","closeModal","inviteList","map","invite","_jsxs","className","children","_jsx","name","project","role","invited_by","Button","size","onClick","async","acceptInvite","fetchAccounts","fetchProjects","accept","variant","rejectInvite","remainingInvites","reject","warn","Modal","isOpen","onClose","ModalTitle","ModalBody","EnterpriseSigninButton","redirectTo","isLoading","setIsLoading","trackEvent","useUXTracking","email","setEmail","toast","useToast","_Fragment","Input","value","onChange","placeholder","type","Spinner","test","setFirebaseTenant","title","status","duration","localStorage","setItem","provider","Env","firebase","Error","providerType","OAuthProvider","redirectPath","window","location","pathname","GoogleAuthProvider","addScope","setCustomParameters","prompt","redirect_uri","origin","getProvider","firebaseTenantName","logger","info","vertesia","firebaseTenantId","signInWithRedirect","getFirebaseAuth","GitHubSignInButton","removeItem","GithubAuthProvider","src","loading","alt","GoogleSignInButton","MicrosoftSignInButton","_redirectTo","SignupForm","onSignup","goBack","accountType","setAccountType","undefined","companySize","setCompanySize","companyName","setCompanyName","companyWebsite","setCompanyWebsite","projectMaturity","setProjectMaturity","fbUser","setFbUser","setError","isCompany","companySizeOptions","label","accountTypeOptions","description","projectMaturityOptions","user","currentUser","displayName","FormItem","RadioGroup","options","selected","find","option","onSelect","SelectBox","optionLabel","required","signupData","maturity","JSON","stringify","fbToken","getIdToken","SigninScreen","allowedPrefix","isNested","lightLogo","darkLogo","allow","setAllow","useSafeLayoutEffect","href","startsWith","SigninScreenImpl","authError","style","zIndex","clsx","StandardSigninPanel","RegionTag","setSignupData","collectSignupData","setCollectSignupData","signOut","history","replaceState","goToSignup","UserNotFoundError","getItem","payload","firebaseToken","fetch","endpoints","studio","method","headers","body","res","message","use","initReactI18next","init","resources","ar","de","en","es","fr","it","ja","ko","pt","ru","tr","zh","fallbackLng","ns","defaultNS","interpolation","escapeValue","react","useSuspense","LOOPBACK_HOSTS","Set","getClientInfo","params","URLSearchParams","search","redirect","rawRedirect","decoded","parsed","decodeURIComponent","URL","protocol","port","username","password","has","hostname","toString","parseRedirectUri","get","code","profile","TerminalLogin","setPayload","clientInfo","useLocation","onAccept","token","fetchComposableTokenFromFirebaseToken","studio_server_url","zeno_server_url","zeno","page","AuthDoneScreen","AuthAcceptScreen","ErrorBox","allProjects","useFetch","projects","list","Promise","resolve","envName","isLocalDev","isDev","ProfileForm","Center","navigator","clipboard","writeText","accounts","currentData","setCurrentData","p","SelectAccount","SelectProject","a","by","SignInModal","ModalFooter","align","InfoItems","isCopied","setIsCopied","VTooltip","placement","Check","CopyIcon","setTimeout","copyToClipboard","InfoList","authToken","server","baseUrl","store","tenantId","getTenantIdFromProject","tabs","content","sub","account_roles","join","project_roles","version","sdkVersion","Tabs","defaultValue","fullWidth","updateHash","TabsBar","TabsPanel","UserSessionMenu","UserSessionPopup","asMenuTrigger","navigate","useNavigate","perms","useUserPermissions","isProjectManager","hasPermission","Permission","project_admin","Popover","click","PopoverTrigger","Avatar","color","shape","PopoverContent","ModeToggle","MenuList","Item","replace","logout","isVertesiaEmail","endsWith","SplashScreen","icon","Icon","show","setShow","AnimatePresence","motion","div","position","inset","initial","opacity","exit","transition","ease","display","width","height","alignItems","justifyContent","LoadingIcon","viewBox","xmlns","x1","y1","x2","y2","offset","stopColor","stopOpacity","cx","cy","r","stroke","strokeWidth","fill","strokeLinecap","VertesiaShell","loadingIcon","ToastProvider","UserSessionProvider","TypeRegistryProvider","ThemeProvider","defaultTheme","storageKey","UserPermissionProvider","AppInstallationContext","createContext","AppInstallationProvider","installation","Provider","useAppInstallation","useContext","AppProjectSelector","app","apps","getAppInstallationProjects","initialValue","LastSelectedAccountId_KEY","LastSelectedProjectId_KEY","reload","setValue","actualValue","StandaloneApp","AccessDenied","AccessDeniedMessage","StandaloneAppImpl","UnknownAppName","setInstallation","state","setState","includes","getAppInstallationByName","inst","selectedAccountId","setSelectedAccountId","projectsByOrg","orgOptions","useMemo","grouped","push","orgsWithProjects","filteredProjects","selectedOrg","LockIcon","org"],"mappings":"4kDAeO,MAAMA,GAAY,cAEnBC,GAAeC,EAAQC,iBCStB,SAASC,KACZ,OAAOC,EAAeL,GAAW,CAAEM,KAAML,IAC7C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