@iblai/iblai-js 2.19.1 → 2.20.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.
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useRef, useEffect, useMemo, useCallback, useState, createContext, useContext, forwardRef, createElement as createElement$1, useLayoutEffect, useReducer, useImperativeHandle, isValidElement, Children, PureComponent, cloneElement, Component, Fragment as Fragment$2, useId as useId$2, useDebugValue, lazy, Suspense } from 'react';
3
3
  import * as dataLayer from '@iblai/data-layer';
4
- import { useGetLlmsQuery, useCreateSessionIdMutation, useTimeTrackingMutation, useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmCostByService, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, USER_PROGRESS_DATA_POINTS, useResetTemplateMutation, useSendTestTemplateEmailMutation, useUpdateTemplateMutation, useGetTemplateDetailsQuery, USER_PROGRESS_SUMMARY_TYPE, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetLlmUsageTracesQuery, useGetLlmUsageObservationsQuery, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetAverageRatingQuery, useGetModelCostsQuery, useGetPerUserCostsQuery, useGetTenantCostQuery, useGetAgentCostQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetPlatformAuditLogsQuery, PLATFORM_AUDIT_EVENT_TYPES, PLATFORM_AUDIT_ACTION_CODES, useGetMentorMemoriesQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useCreateOrUpdateUserReportedSkillMutation, useCreateOrUpdateUserDesiredSkillMutation, useLazyGetPathwayListQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetPathwayCompletionQuery, useLazyGetProgramListQuery, useLazyGetProgramCompletionQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetAssignedProgramsQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetPerLearnerInfoQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useLazyGetPersonnalizedSearchQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
4
+ import { useGetLlmsQuery, useCreateSessionIdMutation, useTimeTrackingMutation, useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmCostByService, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, VERCEL_SPA, useGetCustomDomainsQuery, useGetHostingProjectsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useCreateHostingProjectDomainMutation, useUpdateHostingDomainMutation, useDeleteHostingDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, USER_PROGRESS_DATA_POINTS, useResetTemplateMutation, useSendTestTemplateEmailMutation, useUpdateTemplateMutation, useGetTemplateDetailsQuery, USER_PROGRESS_SUMMARY_TYPE, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetLlmUsageTracesQuery, useGetLlmUsageObservationsQuery, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetAverageRatingQuery, useGetModelCostsQuery, useGetPerUserCostsQuery, useGetTenantCostQuery, useGetAgentCostQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetPlatformAuditLogsQuery, PLATFORM_AUDIT_EVENT_TYPES, PLATFORM_AUDIT_ACTION_CODES, useGetMentorMemoriesQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useCreateOrUpdateUserReportedSkillMutation, useCreateOrUpdateUserDesiredSkillMutation, useLazyGetPathwayListQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetPathwayCompletionQuery, useLazyGetProgramListQuery, useLazyGetProgramCompletionQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetAssignedProgramsQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetPerLearnerInfoQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useLazyGetPersonnalizedSearchQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
5
5
  import { useDispatch, useSelector } from 'react-redux';
6
6
  import { selectSessionId, selectActiveChatMessages, useCachedSessionId, chatActions, LOCAL_STORAGE_KEYS, TimeTracker, selectRbacPermissions, useCurrentTenant, canViewOtherUsersChatHistory, isPureWatcher, getInitials, useTenantMetadata, useUsername, selectStreaming, isLoggedIn, TOOL_NAME_MAP, WRITE_TODOS_TOOL, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, getTimeAgo, REQUIRED_ACTIONS_FOR_GROUPS, getVisibleAnalyticsTabs, getUserName as getUserName$2, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, WATCHER_HIDDEN_REPORTS, canViewPlatformAuditLogs, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl, useOS, selectNumberOfActiveChatMessages, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, chatInputSliceActions, removeFile, WithFormPermissions, MENTOR_VISIBILITY } from '@iblai/web-utils';
7
7
  import { toast } from 'sonner';
@@ -1776,37 +1776,58 @@ var advancedChatPrivacy$3 = {
1776
1776
  switchAriaDisabled: "User chat privacy control disabled"
1777
1777
  };
1778
1778
  var advancedCustomDomain$3 = {
1779
- dnsConfiguration: "DNS Configuration",
1779
+ dnsConfiguration: "Domains",
1780
1780
  add: "Add",
1781
- dialogTitle: "Your custom domain",
1782
- verificationNecessary: "Domain verification is necessary after making changes",
1783
- customDomainLabel: "Custom Domain",
1781
+ dialogTitle: "Add a domain",
1782
+ dialogDescription: "Point a domain you own at this organization’s sign-in site or at one of your deployed apps.",
1783
+ kindLabel: "What is this domain for?",
1784
+ kindPlatform: "Sign-in site",
1785
+ kindApp: "Deployed app",
1786
+ projectLabel: "App",
1787
+ projectPlaceholder: "Choose an app",
1788
+ noProjects: "You have not deployed any apps yet. Deploy one first, then come back to give it a domain.",
1789
+ customDomainLabel: "Domain",
1790
+ domainHelpPlatform: "Without the scheme or a leading “www.” — for example, app.example.com.",
1791
+ domainHelpApp: "Leave this empty and a subdomain will be assigned to the app for you, with no DNS records to set.",
1784
1792
  cancel: "Cancel",
1785
1793
  save: "Save",
1786
- expandAriaLabel: "Expand custom domain",
1787
- collapseAriaLabel: "Collapse custom domain",
1788
- loading: "Loading custom domain...",
1789
- verifying: "Verifying...",
1790
- verified: "Verified",
1791
- unregistered: "Unregistered",
1792
- notVerified: "Not Verified",
1793
- retry: "Retry",
1794
+ expandAriaLabel: "Expand domains",
1795
+ collapseAriaLabel: "Collapse domains",
1796
+ loading: "Loading domains…",
1797
+ verifying: "Checking…",
1798
+ reverify: "Check again",
1799
+ reverifyAriaLabel: "Check {domain} again",
1800
+ removeAriaLabel: "Remove {domain}",
1794
1801
  "delete": "Delete",
1795
- domainVerificationHeading: "Domain verification",
1796
- domainVerificationInstruction: "To verify your domain ownership and enable it to point to your application, you need to add the following DNS records at your domain registrar (like Namecheap, GoDaddy, or Google Domains).",
1797
- domainRecords: "Domain records",
1802
+ detach: "Detach",
1803
+ statusVerified: "Verified",
1804
+ statusUnverified: "Verification required",
1805
+ statusUnregistered: "Not registered",
1806
+ statusUnknown: "Could not check",
1798
1807
  tableType: "Type",
1799
1808
  tableNameHost: "Name/Host",
1800
1809
  tableValue: "Value",
1801
- tableStatus: "Status",
1802
1810
  copyNameHostAriaLabel: "Copy name/host: {domain}",
1803
1811
  copyValueAriaLabel: "Copy value/target",
1804
- noDomainConfigured: "No custom domain configured for this application.",
1805
- deleteSuccess: "Custom domain deleted successfully",
1806
- deleteError: "Failed to delete custom domain",
1807
- pleaseEnterDomain: "Please enter a custom domain",
1808
- createSuccess: "Custom domain created successfully",
1809
- createError: "Failed to create custom domain",
1812
+ noRecordsYet: "No records yet. Check the domain again to fetch them.",
1813
+ confirmRemoveTitle: "Remove this domain?",
1814
+ confirmDeleteBody: "{domain} will stop signing users in to this organization.",
1815
+ confirmDetachBody: "{domain} will stop serving the app, here and at the hosting provider.",
1816
+ noDomainConfigured: "No domains yet.",
1817
+ deleteSuccess: "Domain removed",
1818
+ deleteError: "The domain could not be removed",
1819
+ pleaseEnterDomain: "Enter a domain",
1820
+ createSuccess: "Domain added",
1821
+ createError: "The domain could not be added",
1822
+ verifySuccess: "The domain is verified and serving",
1823
+ verifyPending: "The records are not visible yet. Add them at your registrar and check again.",
1824
+ verifyError: "The domain could not be checked",
1825
+ verifyUnavailable: "The domain could not be checked from this browser",
1826
+ errorRefused: "This domain cannot be used here",
1827
+ errorForbidden: "Domains are managed by an organization admin",
1828
+ errorRateLimited: "Too many requests — try again shortly",
1829
+ errorUpstream: "The hosting provider rejected this organization’s credential",
1830
+ errorUnavailable: "This is not available on this instance yet",
1810
1831
  copiedToClipboard: "Copied to clipboard",
1811
1832
  unableToCopy: "Unable to copy"
1812
1833
  };
@@ -9060,39 +9081,60 @@ var advancedChatPrivacy$2 = {
9060
9081
  switchAriaDisabled: "Contrôle de la confidentialité du chat désactivé"
9061
9082
  };
9062
9083
  var advancedCustomDomain$2 = {
9063
- dnsConfiguration: "Configuration DNS",
9084
+ dnsConfiguration: "Domaines",
9064
9085
  add: "Ajouter",
9065
- dialogTitle: "Votre domaine personnalisé",
9066
- verificationNecessary: "La vérification du domaine est nécessaire après toute modification",
9067
- customDomainLabel: "Domaine personnalisé",
9086
+ dialogTitle: "Ajouter un domaine",
9087
+ dialogDescription: "Faites pointer un domaine qui vous appartient vers le site de connexion de cette organisation ou vers l’une de vos applications déployées.",
9088
+ kindLabel: "À quoi sert ce domaine ?",
9089
+ kindPlatform: "Site de connexion",
9090
+ kindApp: "Application déployée",
9091
+ projectLabel: "Application",
9092
+ projectPlaceholder: "Choisissez une application",
9093
+ noProjects: "Vous n’avez encore déployé aucune application. Déployez-en une, puis revenez lui donner un domaine.",
9094
+ customDomainLabel: "Domaine",
9095
+ domainHelpPlatform: "Sans le schéma ni un « www. » en tête — par exemple, app.example.com.",
9096
+ domainHelpApp: "Laissez ce champ vide et un sous-domaine sera attribué à l’application, sans aucun enregistrement DNS à créer.",
9068
9097
  cancel: "Annuler",
9069
9098
  save: "Enregistrer",
9070
- expandAriaLabel: "Développer le domaine personnalisé",
9071
- collapseAriaLabel: "Réduire le domaine personnalisé",
9072
- loading: "Chargement du domaine personnalisé...",
9073
- verifying: "Vérification...",
9074
- verified: "Vérifié",
9075
- unregistered: "Non enregistré",
9076
- notVerified: "Non vérifié",
9077
- retry: "Réessayer",
9099
+ expandAriaLabel: "Déplier les domaines",
9100
+ collapseAriaLabel: "Replier les domaines",
9101
+ loading: "Chargement des domaines…",
9102
+ verifying: "Vérification…",
9103
+ reverify: "Vérifier à nouveau",
9104
+ reverifyAriaLabel: "Vérifier à nouveau {domain}",
9105
+ removeAriaLabel: "Supprimer {domain}",
9078
9106
  "delete": "Supprimer",
9079
- domainVerificationHeading: "Vérification du domaine",
9080
- domainVerificationInstruction: "Pour vérifier la propriété de votre domaine et lui permettre de pointer vers votre application, vous devez ajouter les enregistrements DNS suivants chez votre registraire de domaine (comme Namecheap, GoDaddy ou Google Domains).",
9081
- domainRecords: "Enregistrements de domaine",
9107
+ detach: "Détacher",
9108
+ statusVerified: "Vérifié",
9109
+ statusUnverified: "Vérification requise",
9110
+ statusUnregistered: "Non enregistré",
9111
+ statusUnknown: "Vérification impossible",
9082
9112
  tableType: "Type",
9083
9113
  tableNameHost: "Nom/Hôte",
9084
9114
  tableValue: "Valeur",
9085
- tableStatus: "Statut",
9086
9115
  copyNameHostAriaLabel: "Copier le nom/hôte : {domain}",
9087
9116
  copyValueAriaLabel: "Copier la valeur/cible",
9088
- noDomainConfigured: "Aucun domaine personnalisé configuré pour cette application.",
9089
- deleteSuccess: "Domaine personnalisé supprimé avec succès",
9090
- deleteError: "Échec de la suppression du domaine personnalisé",
9091
- pleaseEnterDomain: "Veuillez saisir un domaine personnalisé",
9092
- createSuccess: "Domaine personnalisé créé avec succès",
9093
- createError: "Échec de la création du domaine personnalisé",
9117
+ noRecordsYet: "Aucun enregistrement pour l’instant. Vérifiez le domaine à nouveau pour les obtenir.",
9118
+ confirmRemoveTitle: "Supprimer ce domaine ?",
9119
+ confirmDeleteBody: "{domain} ne permettra plus de se connecter à cette organisation.",
9120
+ confirmDetachBody: "{domain} cessera de servir l’application, ici comme chez l’hébergeur.",
9121
+ noDomainConfigured: "Aucun domaine pour l’instant.",
9122
+ deleteSuccess: "Domaine supprimé",
9123
+ deleteError: "Le domaine n’a pas pu être supprimé",
9124
+ pleaseEnterDomain: "Saisissez un domaine",
9125
+ createSuccess: "Domaine ajouté",
9126
+ createError: "Le domaine n’a pas pu être ajouté",
9127
+ verifySuccess: "Le domaine est vérifié et sert l’application",
9128
+ verifyPending: "Les enregistrements ne sont pas encore visibles. Ajoutez-les chez votre registraire puis vérifiez à nouveau.",
9129
+ verifyError: "Le domaine n’a pas pu être vérifié",
9130
+ verifyUnavailable: "Le domaine n’a pas pu être vérifié depuis ce navigateur",
9131
+ errorRefused: "Ce domaine ne peut pas être utilisé ici",
9132
+ errorForbidden: "Les domaines sont gérés par un administrateur de l’organisation",
9133
+ errorRateLimited: "Trop de requêtes — réessayez dans un instant",
9134
+ errorUpstream: "L’hébergeur a rejeté l’identifiant de cette organisation",
9135
+ errorUnavailable: "Ce n’est pas encore disponible sur cette instance",
9094
9136
  copiedToClipboard: "Copié dans le presse-papiers",
9095
- unableToCopy: "Impossible de copier"
9137
+ unableToCopy: "Copie impossible"
9096
9138
  };
9097
9139
  var advancedExternalMapping$2 = {
9098
9140
  regionAriaLabel: "Correspondance d'identifiants externes",
@@ -16344,39 +16386,60 @@ var advancedChatPrivacy$1 = {
16344
16386
  switchAriaDisabled: "Control de privacidad del chat deshabilitado"
16345
16387
  };
16346
16388
  var advancedCustomDomain$1 = {
16347
- dnsConfiguration: "Configuración DNS",
16348
- add: "Agregar",
16349
- dialogTitle: "Tu dominio personalizado",
16350
- verificationNecessary: "La verificación del dominio es necesaria después de realizar cambios",
16351
- customDomainLabel: "Dominio personalizado",
16389
+ dnsConfiguration: "Dominios",
16390
+ add: "Añadir",
16391
+ dialogTitle: "Añadir un dominio",
16392
+ dialogDescription: "Dirige un dominio tuyo al sitio de inicio de sesión de esta organización o a una de tus aplicaciones desplegadas.",
16393
+ kindLabel: "¿Para qué es este dominio?",
16394
+ kindPlatform: "Sitio de inicio de sesión",
16395
+ kindApp: "Aplicación desplegada",
16396
+ projectLabel: "Aplicación",
16397
+ projectPlaceholder: "Elige una aplicación",
16398
+ noProjects: "Todavía no has desplegado ninguna aplicación. Despliega una primero y vuelve para darle un dominio.",
16399
+ customDomainLabel: "Dominio",
16400
+ domainHelpPlatform: "Sin el esquema ni un “www.” inicial — por ejemplo, app.example.com.",
16401
+ domainHelpApp: "Déjalo vacío y se asignará un subdominio a la aplicación, sin registros DNS que configurar.",
16352
16402
  cancel: "Cancelar",
16353
16403
  save: "Guardar",
16354
- expandAriaLabel: "Expandir dominio personalizado",
16355
- collapseAriaLabel: "Contraer dominio personalizado",
16356
- loading: "Cargando dominio personalizado...",
16357
- verifying: "Verificando...",
16358
- verified: "Verificado",
16359
- unregistered: "No registrado",
16360
- notVerified: "No verificado",
16361
- retry: "Reintentar",
16404
+ expandAriaLabel: "Expandir dominios",
16405
+ collapseAriaLabel: "Contraer dominios",
16406
+ loading: "Cargando dominios…",
16407
+ verifying: "Comprobando…",
16408
+ reverify: "Comprobar de nuevo",
16409
+ reverifyAriaLabel: "Comprobar {domain} de nuevo",
16410
+ removeAriaLabel: "Eliminar {domain}",
16362
16411
  "delete": "Eliminar",
16363
- domainVerificationHeading: "Verificación de dominio",
16364
- domainVerificationInstruction: "Para verificar la propiedad de tu dominio y permitir que apunte a tu aplicación, debes agregar los siguientes registros DNS en tu registrador de dominio (como Namecheap, GoDaddy o Google Domains).",
16365
- domainRecords: "Registros de dominio",
16412
+ detach: "Desvincular",
16413
+ statusVerified: "Verificado",
16414
+ statusUnverified: "Verificación necesaria",
16415
+ statusUnregistered: "No registrado",
16416
+ statusUnknown: "No se pudo comprobar",
16366
16417
  tableType: "Tipo",
16367
16418
  tableNameHost: "Nombre/Host",
16368
16419
  tableValue: "Valor",
16369
- tableStatus: "Estado",
16370
16420
  copyNameHostAriaLabel: "Copiar nombre/host: {domain}",
16371
16421
  copyValueAriaLabel: "Copiar valor/destino",
16372
- noDomainConfigured: "No hay dominio personalizado configurado para esta aplicación.",
16373
- deleteSuccess: "Dominio personalizado eliminado correctamente",
16374
- deleteError: "Error al eliminar el dominio personalizado",
16375
- pleaseEnterDomain: "Por favor, introduce un dominio personalizado",
16376
- createSuccess: "Dominio personalizado creado correctamente",
16377
- createError: "Error al crear el dominio personalizado",
16422
+ noRecordsYet: "Aún no hay registros. Comprueba el dominio de nuevo para obtenerlos.",
16423
+ confirmRemoveTitle: "¿Eliminar este dominio?",
16424
+ confirmDeleteBody: "{domain} dejará de permitir el inicio de sesión en esta organización.",
16425
+ confirmDetachBody: "{domain} dejará de servir la aplicación, aquí y en el proveedor de alojamiento.",
16426
+ noDomainConfigured: "Todavía no hay dominios.",
16427
+ deleteSuccess: "Dominio eliminado",
16428
+ deleteError: "No se pudo eliminar el dominio",
16429
+ pleaseEnterDomain: "Introduce un dominio",
16430
+ createSuccess: "Dominio añadido",
16431
+ createError: "No se pudo añadir el dominio",
16432
+ verifySuccess: "El dominio está verificado y sirviendo",
16433
+ verifyPending: "Los registros aún no son visibles. Añádelos en tu registrador y comprueba de nuevo.",
16434
+ verifyError: "No se pudo comprobar el dominio",
16435
+ verifyUnavailable: "No se pudo comprobar el dominio desde este navegador",
16436
+ errorRefused: "Este dominio no se puede usar aquí",
16437
+ errorForbidden: "Los dominios los gestiona un administrador de la organización",
16438
+ errorRateLimited: "Demasiadas solicitudes: inténtalo de nuevo en breve",
16439
+ errorUpstream: "El proveedor de alojamiento rechazó la credencial de esta organización",
16440
+ errorUnavailable: "Esto todavía no está disponible en esta instancia",
16378
16441
  copiedToClipboard: "Copiado al portapapeles",
16379
- unableToCopy: "No se puede copiar"
16442
+ unableToCopy: "No se pudo copiar"
16380
16443
  };
16381
16444
  var advancedExternalMapping$1 = {
16382
16445
  regionAriaLabel: "Mapeo de credenciales externas",
@@ -23628,37 +23691,58 @@ var advancedChatPrivacy = {
23628
23691
  switchAriaDisabled: "用户聊天隐私控制已禁用"
23629
23692
  };
23630
23693
  var advancedCustomDomain = {
23631
- dnsConfiguration: "DNS 配置",
23694
+ dnsConfiguration: "域名",
23632
23695
  add: "添加",
23633
- dialogTitle: "您的自定义域名",
23634
- verificationNecessary: "更改后需要进行域名验证",
23635
- customDomainLabel: "自定义域名",
23696
+ dialogTitle: "添加域名",
23697
+ dialogDescription: "将你拥有的域名指向该组织的登录站点,或指向你已部署的某个应用。",
23698
+ kindLabel: "这个域名用于什么?",
23699
+ kindPlatform: "登录站点",
23700
+ kindApp: "已部署的应用",
23701
+ projectLabel: "应用",
23702
+ projectPlaceholder: "选择一个应用",
23703
+ noProjects: "你还没有部署任何应用。请先部署一个,然后回来为它设置域名。",
23704
+ customDomainLabel: "域名",
23705
+ domainHelpPlatform: "不要带协议前缀或开头的“www.”,例如 app.example.com。",
23706
+ domainHelpApp: "留空即可自动为该应用分配一个子域名,无需设置任何 DNS 记录。",
23636
23707
  cancel: "取消",
23637
23708
  save: "保存",
23638
- expandAriaLabel: "展开自定义域名",
23639
- collapseAriaLabel: "收起自定义域名",
23640
- loading: "正在加载自定义域名...",
23641
- verifying: "验证中...",
23642
- verified: "已验证",
23643
- unregistered: "未注册",
23644
- notVerified: "未验证",
23645
- retry: "重试",
23709
+ expandAriaLabel: "展开域名",
23710
+ collapseAriaLabel: "收起域名",
23711
+ loading: "正在加载域名…",
23712
+ verifying: "正在检查…",
23713
+ reverify: "重新检查",
23714
+ reverifyAriaLabel: "重新检查 {domain}",
23715
+ removeAriaLabel: "移除 {domain}",
23646
23716
  "delete": "删除",
23647
- domainVerificationHeading: "域名验证",
23648
- domainVerificationInstruction: "要验证您的域名所有权并使其指向您的应用程序,您需要在域名注册商(如 Namecheap、GoDaddy 或 Google Domains)处添加以下 DNS 记录。",
23649
- domainRecords: "域名记录",
23717
+ detach: "解除绑定",
23718
+ statusVerified: "已验证",
23719
+ statusUnverified: "需要验证",
23720
+ statusUnregistered: "未注册",
23721
+ statusUnknown: "无法检查",
23650
23722
  tableType: "类型",
23651
23723
  tableNameHost: "名称/主机",
23652
23724
  tableValue: "值",
23653
- tableStatus: "状态",
23654
23725
  copyNameHostAriaLabel: "复制名称/主机:{domain}",
23655
23726
  copyValueAriaLabel: "复制值/目标",
23656
- noDomainConfigured: "此应用程序未配置自定义域名。",
23657
- deleteSuccess: "自定义域名已成功删除",
23658
- deleteError: "删除自定义域名失败",
23659
- pleaseEnterDomain: "请输入自定义域名",
23660
- createSuccess: "自定义域名已成功创建",
23661
- createError: "创建自定义域名失败",
23727
+ noRecordsYet: "暂无记录。请重新检查该域名以获取记录。",
23728
+ confirmRemoveTitle: "要移除这个域名吗?",
23729
+ confirmDeleteBody: "{domain} 将不再用于登录该组织。",
23730
+ confirmDetachBody: "{domain} 将不再为该应用提供服务,本处和托管服务商处都会解除。",
23731
+ noDomainConfigured: "暂无域名。",
23732
+ deleteSuccess: "域名已移除",
23733
+ deleteError: "无法移除该域名",
23734
+ pleaseEnterDomain: "请输入域名",
23735
+ createSuccess: "域名已添加",
23736
+ createError: "无法添加该域名",
23737
+ verifySuccess: "域名已验证并正常服务",
23738
+ verifyPending: "记录尚未生效。请在域名注册商处添加后再检查。",
23739
+ verifyError: "无法检查该域名",
23740
+ verifyUnavailable: "无法从当前浏览器检查该域名",
23741
+ errorRefused: "该域名不能在此使用",
23742
+ errorForbidden: "域名由组织管理员管理",
23743
+ errorRateLimited: "请求过于频繁,请稍后再试",
23744
+ errorUpstream: "托管服务商拒绝了该组织的凭据",
23745
+ errorUnavailable: "此实例尚不支持该功能",
23662
23746
  copiedToClipboard: "已复制到剪贴板",
23663
23747
  unableToCopy: "无法复制"
23664
23748
  };
@@ -196797,6 +196881,325 @@ const PlatformMembershipContent = ({ platformKey, authURL, }) => {
196797
196881
  return (jsxs("div", { className: "flex items-center justify-between rounded-lg border px-6 py-6", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: t('advancedPlatformMembership.publicRegistrationLabel') }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": t('advancedPlatformMembership.infoAriaLabel'), className: "hidden sm:block", children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "rounded-lg bg-gray-700 px-3 py-2 text-sm font-medium whitespace-nowrap text-white shadow-sm transition-opacity duration-300 z-50", children: jsx("p", { children: t('advancedPlatformMembership.infoTooltip') }) })] }) }), (membershipData === null || membershipData === void 0 ? void 0 : membershipData.allow_self_linking) && (jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { onClick: handleCopyToClipboard, "aria-label": t('advancedPlatformMembership.copyAriaLabel'), className: "cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800 p-1 rounded transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1", children: jsx(Copy, { className: "h-4 w-4 text-gray-400 hover:text-blue-500" }) }), jsx(TooltipContent, { className: "rounded-lg bg-gray-700 px-3 py-2 text-sm font-medium whitespace-nowrap text-white shadow-sm transition-opacity duration-300 z-50", children: jsx("p", { children: t('advancedPlatformMembership.copyTooltip') }) })] }) }))] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Switch, { checked: membershipData === null || membershipData === void 0 ? void 0 : membershipData.allow_self_linking, onCheckedChange: handleToggleMembership, disabled: isUpdating, "aria-label": `${t('advancedPlatformMembership.switchAriaLabel')} ${(membershipData === null || membershipData === void 0 ? void 0 : membershipData.allow_self_linking) ? t('advancedPlatformMembership.switchEnabled') : t('advancedPlatformMembership.switchDisabled')}`, className: "cursor-pointer data-[state=checked]:bg-blue-500" }), isUpdating && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] })] }));
196798
196882
  };
196799
196883
 
196884
+ /**
196885
+ * Paste-tolerant: a copied address brings a scheme, a path and often a `www.`
196886
+ * with it, and a typed one may carry capitals. The backend takes only a
196887
+ * lowercase bare host and refuses anything else with a field error.
196888
+ */
196889
+ const sanitizeDomain = (domain) => domain
196890
+ .trim()
196891
+ .toLowerCase()
196892
+ .replace(/^https?:\/\//, '')
196893
+ .replace(/\/.*$/, '')
196894
+ .replace(/^www\./, '');
196895
+ const AddDomainDialog = ({ open, onOpenChange, canAddPlatformDomain, projects, isLoadingProjects, isSubmitting, onSubmitPlatformDomain, onSubmitAppDomain, }) => {
196896
+ const t = useT();
196897
+ const [mode, setMode] = useState(canAddPlatformDomain ? 'platform' : 'app');
196898
+ const [domainValue, setDomainValue] = useState('');
196899
+ const [projectId, setProjectId] = useState('');
196900
+ const reset = () => {
196901
+ setDomainValue('');
196902
+ setProjectId('');
196903
+ setMode(canAddPlatformDomain ? 'platform' : 'app');
196904
+ };
196905
+ const close = () => {
196906
+ reset();
196907
+ onOpenChange(false);
196908
+ };
196909
+ const handleSubmit = async (event) => {
196910
+ event.preventDefault();
196911
+ if (mode === 'platform') {
196912
+ await onSubmitPlatformDomain(sanitizeDomain(domainValue));
196913
+ }
196914
+ else {
196915
+ await onSubmitAppDomain(Number(projectId), sanitizeDomain(domainValue));
196916
+ }
196917
+ };
196918
+ const canSubmit = mode === 'platform' ? domainValue.trim().length > 0 : projectId.trim().length > 0;
196919
+ return (jsx(Dialog, { open: open, onOpenChange: (next) => {
196920
+ if (!next) {
196921
+ reset();
196922
+ }
196923
+ onOpenChange(next);
196924
+ }, children: jsxs(DialogContent, { className: "sm:max-w-[480px]", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: t('advancedCustomDomain.dialogTitle') }), jsx(DialogDescription, { children: t('advancedCustomDomain.dialogDescription') })] }), jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [jsxs("div", { className: "space-y-2", children: [jsx("label", { htmlFor: "add-domain-kind", className: "text-sm", children: t('advancedCustomDomain.kindLabel') }), jsxs(Select$1, { value: mode, onValueChange: (next) => setMode(next), children: [jsx(SelectTrigger, { id: "add-domain-kind", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [canAddPlatformDomain && (jsx(SelectItem, { value: "platform", children: t('advancedCustomDomain.kindPlatform') })), jsx(SelectItem, { value: "app", children: t('advancedCustomDomain.kindApp') })] })] })] }), mode === 'app' && (jsxs("div", { className: "space-y-2", children: [jsx("label", { htmlFor: "add-domain-project", className: "text-sm", children: t('advancedCustomDomain.projectLabel') }), isLoadingProjects ? (jsx("p", { className: "text-sm text-[#646464]", children: t('advancedCustomDomain.loading') })) : projects.length === 0 ? (
196925
+ // The backend lists only the caller's own projects, so this is
196926
+ // "you have not deployed anything", not "the platform has not".
196927
+ jsx("p", { className: "text-sm text-[#646464]", children: t('advancedCustomDomain.noProjects') })) : (jsxs(Select$1, { value: projectId, onValueChange: setProjectId, children: [jsx(SelectTrigger, { id: "add-domain-project", children: jsx(SelectValue, { placeholder: t('advancedCustomDomain.projectPlaceholder') }) }), jsx(SelectContent, { children: projects.map((project) => (jsx(SelectItem, { value: String(project.id), children: project.name }, project.id))) })] }))] })), jsxs("div", { className: "space-y-2", children: [jsx("label", { htmlFor: "add-domain-name", className: "text-sm", children: t('advancedCustomDomain.customDomainLabel') }), jsx(Input, { id: "add-domain-name", value: domainValue, onChange: (event) => setDomainValue(event.target.value), placeholder: "example.com", className: "w-full", required: mode === 'platform' }), jsx("p", { className: "text-xs text-[#646464]", children: mode === 'app'
196928
+ ? t('advancedCustomDomain.domainHelpApp')
196929
+ : t('advancedCustomDomain.domainHelpPlatform') })] }), jsxs("div", { className: "flex justify-end gap-2", children: [jsx(Button$1, { type: "button", variant: "outline", onClick: close, children: t('advancedCustomDomain.cancel') }), jsxs(Button$1, { type: "submit", disabled: isSubmitting || !canSubmit, children: [isSubmitting && jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }), t('advancedCustomDomain.save')] })] })] })] }) }));
196930
+ };
196931
+
196932
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
196933
+ // @__NO_SIDE_EFFECTS__
196934
+ function createSlottable(ownerName) {
196935
+ const Slottable2 = ({ children }) => {
196936
+ return /* @__PURE__ */ jsx(Fragment$1, { children });
196937
+ };
196938
+ Slottable2.displayName = `${ownerName}.Slottable`;
196939
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
196940
+ return Slottable2;
196941
+ }
196942
+
196943
+ var ROOT_NAME = "AlertDialog";
196944
+ var [createAlertDialogContext] = createContextScope$1(ROOT_NAME, [
196945
+ createDialogScope
196946
+ ]);
196947
+ var useDialogScope = createDialogScope();
196948
+ var AlertDialog$1 = (props) => {
196949
+ const { __scopeAlertDialog, ...alertDialogProps } = props;
196950
+ const dialogScope = useDialogScope(__scopeAlertDialog);
196951
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });
196952
+ };
196953
+ AlertDialog$1.displayName = ROOT_NAME;
196954
+ var TRIGGER_NAME = "AlertDialogTrigger";
196955
+ var AlertDialogTrigger = React.forwardRef(
196956
+ (props, forwardedRef) => {
196957
+ const { __scopeAlertDialog, ...triggerProps } = props;
196958
+ const dialogScope = useDialogScope(__scopeAlertDialog);
196959
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
196960
+ }
196961
+ );
196962
+ AlertDialogTrigger.displayName = TRIGGER_NAME;
196963
+ var PORTAL_NAME = "AlertDialogPortal";
196964
+ var AlertDialogPortal$1 = (props) => {
196965
+ const { __scopeAlertDialog, ...portalProps } = props;
196966
+ const dialogScope = useDialogScope(__scopeAlertDialog);
196967
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });
196968
+ };
196969
+ AlertDialogPortal$1.displayName = PORTAL_NAME;
196970
+ var OVERLAY_NAME = "AlertDialogOverlay";
196971
+ var AlertDialogOverlay$1 = React.forwardRef(
196972
+ (props, forwardedRef) => {
196973
+ const { __scopeAlertDialog, ...overlayProps } = props;
196974
+ const dialogScope = useDialogScope(__scopeAlertDialog);
196975
+ return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
196976
+ }
196977
+ );
196978
+ AlertDialogOverlay$1.displayName = OVERLAY_NAME;
196979
+ var CONTENT_NAME = "AlertDialogContent";
196980
+ var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
196981
+ var Slottable = createSlottable("AlertDialogContent");
196982
+ var AlertDialogContent$1 = React.forwardRef(
196983
+ (props, forwardedRef) => {
196984
+ const { __scopeAlertDialog, children, ...contentProps } = props;
196985
+ const dialogScope = useDialogScope(__scopeAlertDialog);
196986
+ const contentRef = React.useRef(null);
196987
+ const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
196988
+ const cancelRef = React.useRef(null);
196989
+ return /* @__PURE__ */ jsx(
196990
+ DialogPrimitive.WarningProvider,
196991
+ {
196992
+ contentName: CONTENT_NAME,
196993
+ titleName: TITLE_NAME,
196994
+ docsSlug: "alert-dialog",
196995
+ children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(
196996
+ DialogPrimitive.Content,
196997
+ {
196998
+ role: "alertdialog",
196999
+ ...dialogScope,
197000
+ ...contentProps,
197001
+ ref: composedRefs,
197002
+ onOpenAutoFocus: composeEventHandlers$1(contentProps.onOpenAutoFocus, (event) => {
197003
+ event.preventDefault();
197004
+ cancelRef.current?.focus({ preventScroll: true });
197005
+ }),
197006
+ onPointerDownOutside: (event) => event.preventDefault(),
197007
+ onInteractOutside: (event) => event.preventDefault(),
197008
+ children: [
197009
+ /* @__PURE__ */ jsx(Slottable, { children }),
197010
+ /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })
197011
+ ]
197012
+ }
197013
+ ) })
197014
+ }
197015
+ );
197016
+ }
197017
+ );
197018
+ AlertDialogContent$1.displayName = CONTENT_NAME;
197019
+ var TITLE_NAME = "AlertDialogTitle";
197020
+ var AlertDialogTitle$1 = React.forwardRef(
197021
+ (props, forwardedRef) => {
197022
+ const { __scopeAlertDialog, ...titleProps } = props;
197023
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197024
+ return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });
197025
+ }
197026
+ );
197027
+ AlertDialogTitle$1.displayName = TITLE_NAME;
197028
+ var DESCRIPTION_NAME = "AlertDialogDescription";
197029
+ var AlertDialogDescription$1 = React.forwardRef((props, forwardedRef) => {
197030
+ const { __scopeAlertDialog, ...descriptionProps } = props;
197031
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197032
+ return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
197033
+ });
197034
+ AlertDialogDescription$1.displayName = DESCRIPTION_NAME;
197035
+ var ACTION_NAME = "AlertDialogAction";
197036
+ var AlertDialogAction$1 = React.forwardRef(
197037
+ (props, forwardedRef) => {
197038
+ const { __scopeAlertDialog, ...actionProps } = props;
197039
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197040
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });
197041
+ }
197042
+ );
197043
+ AlertDialogAction$1.displayName = ACTION_NAME;
197044
+ var CANCEL_NAME = "AlertDialogCancel";
197045
+ var AlertDialogCancel$1 = React.forwardRef(
197046
+ (props, forwardedRef) => {
197047
+ const { __scopeAlertDialog, ...cancelProps } = props;
197048
+ const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
197049
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197050
+ const ref = useComposedRefs$1(forwardedRef, cancelRef);
197051
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });
197052
+ }
197053
+ );
197054
+ AlertDialogCancel$1.displayName = CANCEL_NAME;
197055
+ var DescriptionWarning = ({ contentRef }) => {
197056
+ const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
197057
+
197058
+ You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
197059
+
197060
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
197061
+
197062
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
197063
+ React.useEffect(() => {
197064
+ const hasDescription = document.getElementById(
197065
+ contentRef.current?.getAttribute("aria-describedby")
197066
+ );
197067
+ if (!hasDescription) console.warn(MESSAGE);
197068
+ }, [MESSAGE, contentRef]);
197069
+ return null;
197070
+ };
197071
+ var Root2 = AlertDialog$1;
197072
+ var Portal2 = AlertDialogPortal$1;
197073
+ var Overlay2 = AlertDialogOverlay$1;
197074
+ var Content2 = AlertDialogContent$1;
197075
+ var Action = AlertDialogAction$1;
197076
+ var Cancel = AlertDialogCancel$1;
197077
+ var Title2 = AlertDialogTitle$1;
197078
+ var Description2 = AlertDialogDescription$1;
197079
+
197080
+ const AlertDialog = Root2;
197081
+ const AlertDialogPortal = Portal2;
197082
+ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (jsx(Overlay2, { className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80', className), ...props, ref: ref })));
197083
+ AlertDialogOverlay.displayName = Overlay2.displayName;
197084
+ const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (jsxs(AlertDialogPortal, { children: [jsx(AlertDialogOverlay, {}), jsx(Content2, { ref: ref, className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg', className), ...props })] })));
197085
+ AlertDialogContent.displayName = Content2.displayName;
197086
+ const AlertDialogHeader = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col space-y-2 text-center sm:text-left', className), ...props }));
197087
+ AlertDialogHeader.displayName = 'AlertDialogHeader';
197088
+ const AlertDialogFooter = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
197089
+ AlertDialogFooter.displayName = 'AlertDialogFooter';
197090
+ const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (jsx(Title2, { ref: ref, className: cn('text-lg font-semibold', className), ...props })));
197091
+ AlertDialogTitle.displayName = Title2.displayName;
197092
+ const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (jsx(Description2, { ref: ref, className: cn('text-muted-foreground text-sm', className), ...props })));
197093
+ AlertDialogDescription.displayName = Description2.displayName;
197094
+ const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (jsx(Action, { ref: ref, className: cn(buttonVariants(), className), ...props })));
197095
+ AlertDialogAction.displayName = Action.displayName;
197096
+ const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (jsx(Cancel, { ref: ref, className: cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className), ...props })));
197097
+ AlertDialogCancel.displayName = Cancel.displayName;
197098
+
197099
+ const hostedDomainStatus = (row) => {
197100
+ // A domain that was taken over keeps this organization's old `verified_at`,
197101
+ // so `lost_at` has to outrank it: the row is waiting on DNS again until a
197102
+ // re-verify reclaims it. The panel does not say who took it.
197103
+ if (row.lost_at) {
197104
+ return 'unverified';
197105
+ }
197106
+ return row.verified_at ? 'verified' : 'unverified';
197107
+ };
197108
+ /**
197109
+ * Every SPA domain CNAMEs to the same instance-wide host, so this answers "is
197110
+ * DNS pointing at us" and nothing more — it cannot tell which organization owns
197111
+ * the name. That is why it is only ever used for SPA rows.
197112
+ */
197113
+ const resolveCname = async (domain, target) => {
197114
+ var _a;
197115
+ const response = await fetch(`https://dns.google/resolve?name=${domain}&type=CNAME`, {
197116
+ cache: 'no-store',
197117
+ });
197118
+ const body = await response.json();
197119
+ return Boolean((_a = body === null || body === void 0 ? void 0 : body.Answer) === null || _a === void 0 ? void 0 : _a.some((answer) => { var _a; return ((_a = answer.data) !== null && _a !== void 0 ? _a : '').replace(/\.$/, '') === target; }));
197120
+ };
197121
+ const DomainRow = ({ row, sslValue, onReverify, onRemove, isBusy, onStatusChange, }) => {
197122
+ var _a;
197123
+ const t = useT();
197124
+ const isHosted = row.spa === VERCEL_SPA;
197125
+ const [copiedKey, setCopiedKey] = useState(null);
197126
+ const [confirmOpen, setConfirmOpen] = useState(false);
197127
+ const [spaStatus, setSpaStatus] = useState('checking');
197128
+ const checkSpaDomain = useCallback(async () => {
197129
+ if (isHosted) {
197130
+ return;
197131
+ }
197132
+ if (!row.registered_with_dns_pro) {
197133
+ setSpaStatus('unregistered');
197134
+ return;
197135
+ }
197136
+ setSpaStatus('checking');
197137
+ try {
197138
+ setSpaStatus((await resolveCname(row.custom_domain, sslValue)) ? 'verified' : 'unverified');
197139
+ }
197140
+ catch (_a) {
197141
+ // A blocked or failed lookup is not the same answer as "the record is
197142
+ // missing" — the OS content-security-policy can refuse the request
197143
+ // outright — so say so instead of showing a confident "Not verified".
197144
+ setSpaStatus('unknown');
197145
+ toast.error(t('advancedCustomDomain.verifyUnavailable'));
197146
+ }
197147
+ }, [isHosted, row.custom_domain, row.registered_with_dns_pro, sslValue, t]);
197148
+ useEffect(() => {
197149
+ void checkSpaDomain();
197150
+ }, [checkSpaDomain]);
197151
+ useEffect(() => {
197152
+ if (isHosted) {
197153
+ return;
197154
+ }
197155
+ onStatusChange === null || onStatusChange === void 0 ? void 0 : onStatusChange(row.id, spaStatus);
197156
+ }, [isHosted, onStatusChange, row.id, spaStatus]);
197157
+ const status = isHosted ? hostedDomainStatus(row) : spaStatus;
197158
+ // A hosted row's records come from the provider and carry a reason each; an
197159
+ // SPA row has none stored, and its single CNAME is the same for every
197160
+ // organization on the instance, so it is computed here.
197161
+ const records = isHosted
197162
+ ? ((_a = row.records) !== null && _a !== void 0 ? _a : [])
197163
+ : [{ type: 'CNAME', name: row.custom_domain, value: sslValue }];
197164
+ const handleCopy = async (value, key) => {
197165
+ try {
197166
+ await navigator.clipboard.writeText(value);
197167
+ setCopiedKey(key);
197168
+ toast.success(t('advancedCustomDomain.copiedToClipboard'));
197169
+ setTimeout(() => setCopiedKey(null), 5000);
197170
+ }
197171
+ catch (_a) {
197172
+ toast.error(t('advancedCustomDomain.unableToCopy'));
197173
+ }
197174
+ };
197175
+ // Spelled out rather than built from `status`: the i18n coverage check reads
197176
+ // literal t('…') calls out of the source, so a computed key is invisible to
197177
+ // it and a typo in one would only surface in the running UI.
197178
+ const statusLabel = () => {
197179
+ switch (status) {
197180
+ case 'verified':
197181
+ return t('advancedCustomDomain.statusVerified');
197182
+ case 'unregistered':
197183
+ return t('advancedCustomDomain.statusUnregistered');
197184
+ case 'unknown':
197185
+ return t('advancedCustomDomain.statusUnknown');
197186
+ default:
197187
+ return t('advancedCustomDomain.statusUnverified');
197188
+ }
197189
+ };
197190
+ const statusBadge = (jsx("span", { className: status === 'verified'
197191
+ ? 'rounded bg-green-100 px-2 py-1 text-xs text-green-800'
197192
+ : 'rounded bg-gray-100 px-2 py-1 text-xs text-gray-600', children: status === 'checking' ? (jsxs("span", { className: "flex items-center gap-1", children: [jsx(LoaderCircle, { className: "h-3 w-3 animate-spin" }), t('advancedCustomDomain.verifying')] })) : (statusLabel()) }));
197193
+ return (jsxs("div", { className: "space-y-3 rounded-lg border border-gray-200 p-3 dark:border-gray-700", children: [jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm", children: row.custom_domain }), jsx("span", { className: "text-xs text-[#646464]", children: isHosted ? t('advancedCustomDomain.kindApp') : t('advancedCustomDomain.kindPlatform') }), statusBadge] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Button$1, { variant: "outline", size: "sm", onClick: () => (isHosted ? void onReverify(row) : void checkSpaDomain()), disabled: isBusy || status === 'checking' || (!isHosted && !row.registered_with_dns_pro), "aria-label": t('advancedCustomDomain.reverifyAriaLabel', { domain: row.custom_domain }), children: isBusy || status === 'checking' ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" })) : (jsxs(Fragment$1, { children: [jsx(RefreshCw, { className: "mr-1 h-4 w-4", "aria-hidden": "true" }), t('advancedCustomDomain.reverify')] })) }), jsx(Button$1, { variant: "outline", size: "sm", className: "text-red-600 hover:text-red-700", onClick: () => setConfirmOpen(true), disabled: isBusy, "aria-label": t('advancedCustomDomain.removeAriaLabel', { domain: row.custom_domain }), children: isHosted ? t('advancedCustomDomain.detach') : t('advancedCustomDomain.delete') })] })] }), records.length > 0 ? (jsxs(Table, { className: "table-fixed", children: [jsx(TableHeader, { children: jsxs(TableRow, { children: [jsx(TableHead, { className: "w-[90px]", children: t('advancedCustomDomain.tableType') }), jsx(TableHead, { className: "w-1/3", children: t('advancedCustomDomain.tableNameHost') }), jsx(TableHead, { children: t('advancedCustomDomain.tableValue') })] }) }), jsx(TableBody, { children: records.map((record, index) => (jsxs(TableRow, { children: [jsx(TableCell, { className: "text-sm", children: record.type }), jsx(TableCell, { children: jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm break-all", children: record.name }), jsx(Button$1, { type: "button", variant: "ghost", size: "icon", className: "h-6 w-6 shrink-0", onClick: () => handleCopy(record.name, `name-${index}`), "aria-label": t('advancedCustomDomain.copyNameHostAriaLabel', {
197194
+ domain: record.name,
197195
+ }), children: copiedKey === `name-${index}` ? (jsx(Check, { className: "h-4 w-4 text-blue-600", "aria-hidden": "true" })) : (jsx(Copy, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) }), jsxs(TableCell, { children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm break-all", children: record.value }), jsx(Button$1, { type: "button", variant: "ghost", size: "icon", className: "h-6 w-6 shrink-0", onClick: () => handleCopy(record.value, `value-${index}`), "aria-label": t('advancedCustomDomain.copyValueAriaLabel'), children: copiedKey === `value-${index}` ? (jsx(Check, { className: "h-4 w-4 text-blue-600", "aria-hidden": "true" })) : (jsx(Copy, { className: "h-4 w-4", "aria-hidden": "true" })) })] }), record.reason && jsx("p", { className: "mt-1 text-xs text-[#646464]", children: record.reason })] })] }, `${record.type}-${record.name}-${record.value}`))) })] })) : (jsx("p", { className: "text-sm text-[#646464]", children: t('advancedCustomDomain.noRecordsYet') })), jsx(AlertDialog, { open: confirmOpen, onOpenChange: setConfirmOpen, children: jsxs(AlertDialogContent, { children: [jsxs(AlertDialogHeader, { children: [jsx(AlertDialogTitle, { children: t('advancedCustomDomain.confirmRemoveTitle') }), jsx(AlertDialogDescription, { children: isHosted
197196
+ ? t('advancedCustomDomain.confirmDetachBody', { domain: row.custom_domain })
197197
+ : t('advancedCustomDomain.confirmDeleteBody', { domain: row.custom_domain }) })] }), jsxs(AlertDialogFooter, { children: [jsx(AlertDialogCancel, { children: t('advancedCustomDomain.cancel') }), jsx(AlertDialogAction, { onClick: () => {
197198
+ setConfirmOpen(false);
197199
+ void onRemove(row);
197200
+ }, children: isHosted ? t('advancedCustomDomain.detach') : t('advancedCustomDomain.delete') })] })] }) })] }));
197201
+ };
197202
+
196800
197203
  const normalizeCustomDomains = (response) => {
196801
197204
  if (!response) {
196802
197205
  return [];
@@ -196815,141 +197218,196 @@ const normalizeCustomDomains = (response) => {
196815
197218
  }
196816
197219
  return [];
196817
197220
  };
196818
- const sanitizeDomain = (domain) => {
196819
- return domain
196820
- .trim()
196821
- .replace(/^https?:\/\//, '') // Remove http:// or https://
196822
- .replace(/^www\./, ''); // Remove www.
197221
+ const serverDetail = (error) => {
197222
+ const data = error === null || error === void 0 ? void 0 : error.data;
197223
+ if (typeof data === 'string') {
197224
+ return data;
197225
+ }
197226
+ const body = data;
197227
+ for (const value of [body === null || body === void 0 ? void 0 : body.error, body === null || body === void 0 ? void 0 : body.message, body === null || body === void 0 ? void 0 : body.detail]) {
197228
+ if (typeof value === 'string' && value.trim() !== '') {
197229
+ return value;
197230
+ }
197231
+ }
197232
+ // A field error — `{"domain": ["…"]}` — is how the backend refuses a malformed
197233
+ // name; its text is the first entry of the first such list.
197234
+ for (const value of Object.values(body !== null && body !== void 0 ? body : {})) {
197235
+ const first = Array.isArray(value) ? value[0] : undefined;
197236
+ if (typeof first === 'string' && first.trim() !== '') {
197237
+ return first;
197238
+ }
197239
+ }
197240
+ return undefined;
196823
197241
  };
196824
- const CustomDomainsContent = ({ platformKey, currentSPA, currentPlatformBaseDomain, }) => {
197242
+ const CustomDomainsContent = ({ platformKey, username, currentSPA, currentPlatformBaseDomain, }) => {
197243
+ var _a;
196825
197244
  const t = useT();
196826
197245
  const [isCollapsed, setIsCollapsed] = useState(true);
196827
197246
  const [isModalOpen, setIsModalOpen] = useState(false);
196828
- const [customDomainValue, setCustomDomainValue] = useState('');
196829
- const [deletingDomainId, setDeletingDomainId] = useState(null);
196830
- const [copiedField, setCopiedField] = useState(null);
196831
- const [isVerified, setIsVerified] = useState(null);
196832
- const [isVerifying, setIsVerifying] = useState(false);
197247
+ const [busyDomainId, setBusyDomainId] = useState(null);
196833
197248
  const { data, isLoading, isFetching, refetch } = useGetCustomDomainsQuery({
196834
197249
  params: { platform_key: platformKey },
196835
197250
  });
197251
+ // Only the caller's own deployed apps are listable, and only the Add dialog
197252
+ // needs them — so this stays idle until it opens.
197253
+ const { data: projectData, isFetching: isLoadingProjects } = useGetHostingProjectsQuery({ org: platformKey, username }, { skip: !isModalOpen || !username });
196836
197254
  const [createCustomDomain, { isLoading: isCreating }] = useCreateCustomDomainMutation();
196837
197255
  const [deleteCustomDomain] = useDeleteCustomDomainMutation();
197256
+ const [createHostingProjectDomain, { isLoading: isAttaching }] = useCreateHostingProjectDomainMutation();
197257
+ const [updateHostingDomain] = useUpdateHostingDomainMutation();
197258
+ const [deleteHostingDomain] = useDeleteHostingDomainMutation();
196838
197259
  const customDomains = useMemo(() => normalizeCustomDomains(data), [data]);
196839
- const sslValue = `ssl.${currentPlatformBaseDomain && currentPlatformBaseDomain.trim() !== '' ? currentPlatformBaseDomain : typeof window !== 'undefined' ? window.location.hostname.split('.').slice(-2).join('.') : 'iblai.app'}`;
196840
- // Get the current domain for the current SPA
196841
- const currentDomain = useMemo(() => {
196842
- if (!currentSPA)
196843
- return null;
196844
- return customDomains.find((domain) => { var _a; return (_a = domain.spa) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(currentSPA.toLowerCase()); });
196845
- }, [customDomains, currentSPA]);
196846
- const verifyCustomDomain = async (domain) => {
196847
- if (!(currentDomain === null || currentDomain === void 0 ? void 0 : currentDomain.registered_with_dns_pro)) {
196848
- return;
196849
- }
196850
- setIsVerifying(true);
196851
- try {
196852
- const endpoint = `https://dns.google/resolve?name=${domain}&type=CNAME`;
196853
- const res = await fetch(endpoint, { cache: 'no-store' });
196854
- const data = await res.json();
196855
- let verified = false;
196856
- if (data.Answer) {
196857
- // Check if any CNAME record points to sslValue
196858
- verified = data.Answer.some((a) => a.data.replace(/\.$/, '') === sslValue);
196859
- }
196860
- setIsVerified(verified);
196861
- }
196862
- catch (error) {
196863
- console.error('Failed to verify domain:', error);
196864
- setIsVerified(false);
196865
- }
196866
- finally {
196867
- setIsVerifying(false);
196868
- }
196869
- };
196870
- // Auto-check verification on domain load
196871
- useEffect(() => {
196872
- if (currentDomain === null || currentDomain === void 0 ? void 0 : currentDomain.custom_domain) {
196873
- verifyCustomDomain(currentDomain.custom_domain);
196874
- }
196875
- else {
196876
- setIsVerified(null);
196877
- }
196878
- }, [currentDomain === null || currentDomain === void 0 ? void 0 : currentDomain.custom_domain]);
196879
- const handleDeleteCustomDomain = async (domain_id) => {
196880
- try {
196881
- setDeletingDomainId(domain_id);
196882
- await deleteCustomDomain({
196883
- domain_id,
196884
- platform_key: platformKey,
196885
- }).unwrap();
196886
- await refetch();
196887
- toast.success(t('advancedCustomDomain.deleteSuccess'));
196888
- }
196889
- catch (error) {
196890
- console.error('Failed to delete custom domain:', error);
196891
- toast.error(t('advancedCustomDomain.deleteError'));
196892
- }
196893
- finally {
196894
- setDeletingDomainId(null);
197260
+ // A sign-in row's answer exists only in the browser, so the row reports it up
197261
+ // to here. Two things stop a child's effect writing parent state that
197262
+ // re-renders the child that fired it, for ever: this identity never changes,
197263
+ // and an unchanged status returns the SAME object so React bails out. Either
197264
+ // alone is enough — losing both hangs the process, so the cheap second one
197265
+ // stays. Adding a dependency below is exactly how the first gets lost.
197266
+ const [spaStatuses, setSpaStatuses] = useState({});
197267
+ const handleStatusChange = useCallback((id, status) => {
197268
+ setSpaStatuses((previous) => previous[id] === status ? previous : { ...previous, [id]: status });
197269
+ }, []);
197270
+ // Verified first. Two groups rather than a full ranking — nothing was asked
197271
+ // about the order of the rest, and Array#sort is stable, so the server's
197272
+ // order survives inside each group.
197273
+ const sortedDomains = useMemo(() => {
197274
+ const isVerified = (row) => (row.spa === VERCEL_SPA ? hostedDomainStatus(row) : spaStatuses[row.id]) === 'verified';
197275
+ return [...customDomains].sort((a, b) => Number(isVerified(b)) - Number(isVerified(a)));
197276
+ }, [customDomains, spaStatuses]);
197277
+ const sslValue = `ssl.${currentPlatformBaseDomain && currentPlatformBaseDomain.trim() !== ''
197278
+ ? currentPlatformBaseDomain
197279
+ : typeof window !== 'undefined'
197280
+ ? window.location.hostname.split('.').slice(-2).join('.')
197281
+ : 'iblai.app'}`;
197282
+ // A platform gets one sign-in domain per SPA, so the Add dialog offers that
197283
+ // kind only while this SPA has none. Deployed apps have no such limit.
197284
+ const canAddPlatformDomain = useMemo(() => Boolean(currentSPA) &&
197285
+ !customDomains.some((domain) => { var _a; return domain.spa !== VERCEL_SPA && ((_a = domain.spa) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(currentSPA.toLowerCase())); }), [customDomains, currentSPA]);
197286
+ /**
197287
+ * The status decides what the user should do next, so it gets its own
197288
+ * message. 409 shares 400's: both mean "not this domain, not here", and the
197289
+ * panel does not tell one organization that another is holding it.
197290
+ */
197291
+ const headlineForStatus = (status, fallback) => {
197292
+ switch (status) {
197293
+ case 400:
197294
+ case 409:
197295
+ return t('advancedCustomDomain.errorRefused');
197296
+ case 403:
197297
+ return t('advancedCustomDomain.errorForbidden');
197298
+ case 429:
197299
+ return t('advancedCustomDomain.errorRateLimited');
197300
+ case 502:
197301
+ return t('advancedCustomDomain.errorUpstream');
197302
+ case 503:
197303
+ return t('advancedCustomDomain.errorUnavailable');
197304
+ default:
197305
+ return fallback;
196895
197306
  }
196896
197307
  };
196897
- const handleResetForm = () => {
196898
- setCustomDomainValue('');
197308
+ const reportError = (error, fallback) => {
197309
+ const status = error === null || error === void 0 ? void 0 : error.status;
197310
+ // The server's own words go underneath the headline — except on 409, the
197311
+ // one status whose body names the organization holding the domain.
197312
+ const description = status === 409 ? undefined : serverDetail(error);
197313
+ toast.error(headlineForStatus(status, fallback), { description });
196899
197314
  };
196900
- const handleAddCustomDomain = async (event) => {
196901
- event.preventDefault();
196902
- if (!customDomainValue.trim()) {
197315
+ const handleAddPlatformDomain = async (domain) => {
197316
+ if (!domain) {
196903
197317
  toast.error(t('advancedCustomDomain.pleaseEnterDomain'));
196904
197318
  return;
196905
197319
  }
196906
- const sanitizedDomain = sanitizeDomain(customDomainValue);
196907
197320
  try {
196908
197321
  await createCustomDomain({
196909
197322
  requestBody: {
196910
197323
  platform_key: platformKey,
196911
- custom_domain: sanitizedDomain,
197324
+ custom_domain: domain,
196912
197325
  spa: (currentSPA.endsWith('ai') ? currentSPA : `${currentSPA}ai`),
196913
197326
  registered_with_dns_pro: true,
196914
197327
  },
196915
197328
  }).unwrap();
196916
197329
  await refetch();
196917
197330
  toast.success(t('advancedCustomDomain.createSuccess'));
196918
- handleResetForm();
196919
197331
  setIsModalOpen(false);
196920
- // Auto-verify after creation
196921
- setTimeout(() => {
196922
- verifyCustomDomain(sanitizedDomain);
196923
- }, 1000);
196924
197332
  }
196925
- catch (mutationError) {
196926
- console.error('Failed to create custom domain:', mutationError);
196927
- toast.error(t('advancedCustomDomain.createError'));
197333
+ catch (error) {
197334
+ reportError(error, t('advancedCustomDomain.createError'));
196928
197335
  }
196929
197336
  };
196930
- const handleCopyField = async (value, fieldType) => {
197337
+ const handleAddAppDomain = async (project, domain) => {
196931
197338
  try {
196932
- await navigator.clipboard.writeText(value);
196933
- setCopiedField(fieldType);
196934
- toast.success(t('advancedCustomDomain.copiedToClipboard'));
196935
- // Reset the icon after 5 seconds
196936
- setTimeout(() => {
196937
- setCopiedField(null);
196938
- }, 5000);
197339
+ // An empty domain is the "assign me a subdomain" path, which the backend
197340
+ // reads as the absent key — not as an empty string.
197341
+ await createHostingProjectDomain({
197342
+ org: platformKey,
197343
+ username,
197344
+ project,
197345
+ domain: domain || undefined,
197346
+ }).unwrap();
197347
+ await refetch();
197348
+ toast.success(t('advancedCustomDomain.createSuccess'));
197349
+ setIsModalOpen(false);
196939
197350
  }
196940
- catch (copyError) {
196941
- console.error('Failed to copy:', copyError);
196942
- toast.error(t('advancedCustomDomain.unableToCopy'));
197351
+ catch (error) {
197352
+ reportError(error, t('advancedCustomDomain.createError'));
196943
197353
  }
196944
197354
  };
196945
- return (jsxs("div", { className: "rounded-lg px-6 py-5 border border-gray-200 dark:border-gray-700", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex sm:items-center justify-between", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: t('advancedCustomDomain.dnsConfiguration') }), isFetching && !isLoading && (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-blue-500", "aria-hidden": "true" }))] }), jsxs("div", { className: "flex items-center gap-2 self-end sm:self-auto", children: [!currentDomain && (jsxs(Dialog, { open: isModalOpen, onOpenChange: setIsModalOpen, children: [jsx(DialogTrigger, { asChild: true, children: jsxs(Button$1, { type: "button", variant: "secondary", size: "sm", className: "gap-1", children: [jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" }), t('advancedCustomDomain.add')] }) }), jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('advancedCustomDomain.dialogTitle') }) }), jsxs("form", { onSubmit: handleAddCustomDomain, className: "space-y-4", children: [jsxs("div", { className: "space-y-2", children: [jsx("div", { className: "bg-blue-50 border border-blue-200 rounded-md p-3", children: jsxs("div", { className: "flex items-center gap-2", children: [jsx("div", { className: "w-4 h-4 bg-blue-400 rounded-full flex items-center justify-center", children: jsx("span", { className: "text-white text-xs", children: "!" }) }), jsx("span", { className: "text-sm text-blue-800", children: t('advancedCustomDomain.verificationNecessary') })] }) }), jsxs("div", { className: "space-y-2", children: [jsx("label", { htmlFor: "custom-domain", className: "text-sm", children: t('advancedCustomDomain.customDomainLabel') }), jsx(Input, { id: "custom-domain", value: customDomainValue, onChange: (event) => setCustomDomainValue(event.target.value), placeholder: "example.com", className: "w-full", required: true })] })] }), jsxs("div", { className: "flex justify-end gap-2", children: [jsx(Button$1, { type: "button", variant: "outline", onClick: () => {
196946
- setIsModalOpen(false);
196947
- handleResetForm();
196948
- }, children: t('advancedCustomDomain.cancel') }), jsxs(Button$1, { className: "bg-gradient-to-r from-blue-500 to-blue-600 text-white hover:opacity-90", type: "submit", disabled: isCreating, children: [isCreating && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin mr-2" }), t('advancedCustomDomain.save')] })] })] })] })] })), jsx("button", { onClick: () => setIsCollapsed((previous) => !previous), className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1", "aria-label": isCollapsed
197355
+ const handleReverify = async (row) => {
197356
+ setBusyDomainId(row.id);
197357
+ try {
197358
+ const result = await updateHostingDomain({
197359
+ org: platformKey,
197360
+ domainId: row.id,
197361
+ }).unwrap();
197362
+ await refetch();
197363
+ // The rule the badge is built from after the refetch: Vercel says verified
197364
+ // AND not misconfigured. `verified` alone is ownership (the TXT record); a
197365
+ // domain can hold that and still not point here, and the badge would then
197366
+ // say "required" while this toast said "serving".
197367
+ if ((result === null || result === void 0 ? void 0 : result.verified) && (result === null || result === void 0 ? void 0 : result.misconfigured) === false) {
197368
+ toast.success(t('advancedCustomDomain.verifySuccess'));
197369
+ }
197370
+ else {
197371
+ // Includes the reclaim the server refused — it answers 200, unverified,
197372
+ // and says which organization still serves it. Not relayed: from here
197373
+ // the domain is simply waiting on its records, same as any other.
197374
+ toast.message(t('advancedCustomDomain.verifyPending'));
197375
+ }
197376
+ }
197377
+ catch (error) {
197378
+ reportError(error, t('advancedCustomDomain.verifyError'));
197379
+ }
197380
+ finally {
197381
+ setBusyDomainId(null);
197382
+ }
197383
+ };
197384
+ const handleRemove = async (row) => {
197385
+ setBusyDomainId(row.id);
197386
+ try {
197387
+ // A hosted row has to go through the hosting route: deleting it here
197388
+ // would drop the record while the domain carried on serving the app.
197389
+ if (row.spa === VERCEL_SPA) {
197390
+ await deleteHostingDomain({ org: platformKey, domainId: row.id }).unwrap();
197391
+ }
197392
+ else {
197393
+ await deleteCustomDomain({ domain_id: row.id, platform_key: platformKey }).unwrap();
197394
+ }
197395
+ await refetch();
197396
+ toast.success(t('advancedCustomDomain.deleteSuccess'));
197397
+ }
197398
+ catch (error) {
197399
+ reportError(error, t('advancedCustomDomain.deleteError'));
197400
+ }
197401
+ finally {
197402
+ setBusyDomainId(null);
197403
+ }
197404
+ };
197405
+ return (jsxs("div", { className: "rounded-lg border border-gray-200 px-6 py-5 dark:border-gray-700", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex justify-between sm:items-center", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: t('advancedCustomDomain.dnsConfiguration') }), isFetching && !isLoading && (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-blue-500", "aria-hidden": "true" }))] }), jsxs("div", { className: "flex items-center gap-2 self-end sm:self-auto", children: [jsxs(Button$1, { type: "button", variant: "secondary", size: "sm", className: "gap-1", onClick: () => {
197406
+ setIsCollapsed(false);
197407
+ setIsModalOpen(true);
197408
+ }, children: [jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" }), t('advancedCustomDomain.add')] }), jsx("button", { onClick: () => setIsCollapsed((previous) => !previous), className: "rounded p-1 hover:bg-gray-100 focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 focus:outline-none dark:hover:bg-gray-800", "aria-label": isCollapsed
196949
197409
  ? t('advancedCustomDomain.expandAriaLabel')
196950
- : t('advancedCustomDomain.collapseAriaLabel'), type: "button", children: isCollapsed ? (jsx(ChevronDown, { className: "h-5 w-5 text-gray-400", "aria-hidden": "true" })) : (jsx(ChevronUp, { className: "h-5 w-5 text-gray-400", "aria-hidden": "true" })) })] })] }), !isCollapsed && (jsx("div", { className: "mt-4", children: isLoading ? (jsx("div", { className: "p-4 text-gray-500", children: t('advancedCustomDomain.loading') })) : currentDomain ? (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "flex items-center justify-between p-3 bg-gray-50 rounded-lg", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { children: currentDomain.custom_domain }), isVerifying ? (jsxs("span", { className: "px-2 py-1 text-xs bg-gray-100 text-gray-600 rounded flex items-center gap-1", children: [jsx(LoaderCircle, { className: "h-3 w-3 animate-spin" }), t('advancedCustomDomain.verifying')] })) : isVerified ? (jsx("span", { className: "px-2 py-1 text-xs bg-green-100 text-green-800 rounded", children: t('advancedCustomDomain.verified') })) : !currentDomain.registered_with_dns_pro ? (jsx("span", { className: "px-2 py-1 text-xs bg-yellow-100 text-yellow-800 rounded", children: t('advancedCustomDomain.unregistered') })) : isVerified === false ? (jsx("span", { className: "px-2 py-1 text-xs bg-yellow-100 text-yellow-800 rounded", children: t('advancedCustomDomain.notVerified') })) : null] }), jsxs("div", { className: "flex items-center gap-2", children: [!isVerified && isVerified !== null && currentDomain.registered_with_dns_pro && (jsx(Button$1, { variant: "outline", size: "sm", onClick: () => verifyCustomDomain(currentDomain.custom_domain), disabled: isVerifying, children: isVerifying ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" })) : (jsxs(Fragment$1, { children: [jsx(RefreshCw, { className: "h-4 w-4 mr-1" }), t('advancedCustomDomain.retry')] })) })), jsx(Button$1, { variant: "outline", size: "sm", className: "text-red-600 hover:text-red-700", onClick: () => handleDeleteCustomDomain(currentDomain.id), disabled: deletingDomainId === currentDomain.id, children: deletingDomainId === currentDomain.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" })) : (t('advancedCustomDomain.delete')) })] })] }), jsx("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: jsxs("div", { className: "flex items-start gap-2", children: [jsx("div", { className: "w-5 h-5 bg-blue-500 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5", children: jsx("span", { className: "text-white text-xs", children: "i" }) }), jsxs("div", { className: "space-y-2", children: [jsx("h4", { className: "font-medium text-blue-900", children: t('advancedCustomDomain.domainVerificationHeading') }), jsx("p", { className: "text-sm text-blue-800", children: t('advancedCustomDomain.domainVerificationInstruction') })] })] }) }), jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "flex items-center justify-between", children: jsx("h5", { children: t('advancedCustomDomain.domainRecords') }) }), jsx("div", { className: "", children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { children: [jsx(TableHead, { className: "w-[100px]", children: t('advancedCustomDomain.tableType') }), jsx(TableHead, { children: t('advancedCustomDomain.tableNameHost') }), jsx(TableHead, { children: t('advancedCustomDomain.tableValue') }), jsx(TableHead, { className: "w-[100px]", children: t('advancedCustomDomain.tableStatus') })] }) }), jsx(TableBody, { children: jsxs(TableRow, { children: [jsx(TableCell, { className: "text-sm", children: "CNAME" }), jsx(TableCell, { children: jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm", children: currentDomain.custom_domain }), jsx(Button$1, { type: "button", variant: "ghost", size: "icon", className: "h-6 w-6 shrink-0", onClick: () => handleCopyField(currentDomain.custom_domain, 'name'), "aria-label": t('advancedCustomDomain.copyNameHostAriaLabel', {
196951
- domain: currentDomain.custom_domain,
196952
- }), children: copiedField === 'name' ? (jsx(Check, { className: "h-4 w-4 text-blue-600", "aria-hidden": "true" })) : (jsx(Copy, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) }), jsx(TableCell, { children: jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm", children: sslValue }), jsx(Button$1, { type: "button", variant: "ghost", size: "icon", className: "h-6 w-6 shrink-0", onClick: () => handleCopyField(sslValue, 'value'), "aria-label": t('advancedCustomDomain.copyValueAriaLabel'), children: copiedField === 'value' ? (jsx(Check, { className: "h-4 w-4 text-blue-600", "aria-hidden": "true" })) : (jsx(Copy, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) }), jsx(TableCell, { children: isVerifying ? (jsxs("span", { className: "px-2 py-1 text-xs bg-gray-100 text-gray-600 rounded flex items-center gap-1 w-fit", children: [jsx(LoaderCircle, { className: "h-3 w-3 animate-spin" }), t('advancedCustomDomain.verifying')] })) : isVerified ? (jsx("span", { className: "px-2 py-1 text-xs bg-green-100 text-green-800 rounded", children: t('advancedCustomDomain.verified') })) : !currentDomain.registered_with_dns_pro ? (jsx("span", { className: "px-2 py-1 text-xs bg-yellow-100 text-yellow-800 rounded", children: t('advancedCustomDomain.unregistered') })) : isVerified === false ? (jsxs(Button$1, { variant: "outline", size: "sm", onClick: () => verifyCustomDomain(currentDomain.custom_domain), disabled: isVerifying, className: "h-7 text-xs", children: [jsx(RefreshCw, { className: "h-3 w-3 mr-1" }), t('advancedCustomDomain.retry')] })) : null })] }) })] }) })] })] })) : (jsx("div", { className: "p-4 text-sm text-gray-500 text-center", children: t('advancedCustomDomain.noDomainConfigured') })) }))] }));
197410
+ : t('advancedCustomDomain.collapseAriaLabel'), type: "button", children: isCollapsed ? (jsx(ChevronDown, { className: "h-5 w-5 text-gray-400", "aria-hidden": "true" })) : (jsx(ChevronUp, { className: "h-5 w-5 text-gray-400", "aria-hidden": "true" })) })] })] }), !isCollapsed && (jsx("div", { className: "mt-4", children: isLoading ? (jsx("div", { className: "p-4 text-gray-500", children: t('advancedCustomDomain.loading') })) : customDomains.length > 0 ? (jsx("div", { className: "space-y-3", children: sortedDomains.map((row) => (jsx(DomainRow, { row: row, sslValue: sslValue, onReverify: handleReverify, onRemove: handleRemove, isBusy: busyDomainId === row.id, onStatusChange: handleStatusChange }, row.id))) })) : (jsx("div", { className: "p-4 text-center text-sm text-gray-500", children: t('advancedCustomDomain.noDomainConfigured') })) })), jsx(AddDomainDialog, { open: isModalOpen, onOpenChange: setIsModalOpen, canAddPlatformDomain: canAddPlatformDomain, projects: (_a = projectData === null || projectData === void 0 ? void 0 : projectData.projects) !== null && _a !== void 0 ? _a : [], isLoadingProjects: isLoadingProjects, isSubmitting: isCreating || isAttaching, onSubmitPlatformDomain: handleAddPlatformDomain, onSubmitAppDomain: handleAddAppDomain })] }));
196953
197411
  };
196954
197412
 
196955
197413
  const StudentMentorCreationContent = ({ platformKey, }) => {
@@ -198620,7 +199078,7 @@ function AdvancedTab({ platformKey, username, currentSPA, authURL, currentPlatfo
198620
199078
  await handleToggleSetting(metadataItem.slug, currentValue);
198621
199079
  }, disabled: isUpdatingTenantMetadata, "aria-label": `${metadataItem.label} ${currentValue ? t('advancedAdvanced.enabled') : t('advancedAdvanced.disabled')}`, className: "cursor-pointer data-[state=checked]:bg-blue-500" }), isUpdatingTenantMetadata && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] })) })] }, metadataItem.slug));
198622
199080
  }) })] }, spa)));
198623
- })()), jsx(StartScreenContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(ContentViewWrapper, { currentSPA: currentSPA, spas: ['mentor'], children: jsx(ChatAreaWidth, { chatAreaSize: metadata === null || metadata === void 0 ? void 0 : metadata.chat_area_size, isUpdating: isUpdatingTenantMetadata, onUpdate: handleChatAreaSizeUpdate, onError: handleChatAreaSizeError }) }), jsx(AuthSpaCustomizationContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(AdvancedCssContent, { platformKey: platformKey, currentSPA: currentSPA || '' }), jsx(RecommendationSystemPromptsContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(StudentMentorCreationContent, { platformKey: platformKey }), jsx(ChatPrivacyContent, { platformKey: platformKey, username: username }), jsx(MemsearchConfigContent, { platformKey: platformKey, userId: username }), jsx(PlatformMembershipContent, { platformKey: platformKey, authURL: authURL }), jsx(CustomDomainsContent, { platformKey: platformKey, currentSPA: currentSPA || '', currentPlatformBaseDomain: currentPlatformBaseDomain || '' }), jsx(SmtpContent, { platformKey: platformKey }), (currentSPA === null || currentSPA === void 0 ? void 0 : currentSPA.includes('skills')) && (jsxs(Fragment$1, { children: [jsx(ProviderConfigContent, { platformKey: platformKey, username: username }), jsx(ExternalMappingContent, { platformKey: platformKey, username: username })] }))] }) }));
199081
+ })()), jsx(StartScreenContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(ContentViewWrapper, { currentSPA: currentSPA, spas: ['mentor'], children: jsx(ChatAreaWidth, { chatAreaSize: metadata === null || metadata === void 0 ? void 0 : metadata.chat_area_size, isUpdating: isUpdatingTenantMetadata, onUpdate: handleChatAreaSizeUpdate, onError: handleChatAreaSizeError }) }), jsx(AuthSpaCustomizationContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(AdvancedCssContent, { platformKey: platformKey, currentSPA: currentSPA || '' }), jsx(RecommendationSystemPromptsContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(StudentMentorCreationContent, { platformKey: platformKey }), jsx(ChatPrivacyContent, { platformKey: platformKey, username: username }), jsx(MemsearchConfigContent, { platformKey: platformKey, userId: username }), jsx(PlatformMembershipContent, { platformKey: platformKey, authURL: authURL }), jsx(CustomDomainsContent, { platformKey: platformKey, username: username, currentSPA: currentSPA || '', currentPlatformBaseDomain: currentPlatformBaseDomain || '' }), jsx(SmtpContent, { platformKey: platformKey }), (currentSPA === null || currentSPA === void 0 ? void 0 : currentSPA.includes('skills')) && (jsxs(Fragment$1, { children: [jsx(ProviderConfigContent, { platformKey: platformKey, username: username }), jsx(ExternalMappingContent, { platformKey: platformKey, username: username })] }))] }) }));
198624
199082
  }
198625
199083
 
198626
199084
  function StripeConnect({ platformKey }) {
@@ -228881,173 +229339,6 @@ function WatcherEmailSection({ isSaving, isCustomized, onCustomizedChange, subje
228881
229339
  : t('componentsWatcherEmailSection.bodyFallbackHelper') }), jsx(SummerNoteTextEditor, { value: body, onChange: onBodyChange, placeholder: t('componentsWatcherEmailSection.bodyPlaceholder'), exportFormat: "html", disabled: isSaving, id: "watcher-email-body", ariaLabelledBy: bodyLabelId, ariaDescribedBy: bodyError ? `${bodyHelperId} ${bodyErrorId}` : bodyHelperId, ariaInvalid: Boolean(bodyError) }), bodyError && (jsx("p", { id: bodyErrorId, className: "text-sm text-red-600", role: "alert", children: bodyError }))] }), jsx(TemplateVariablesHelper, { context: context })] }))] }));
228882
229340
  }
228883
229341
 
228884
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
228885
- // @__NO_SIDE_EFFECTS__
228886
- function createSlottable(ownerName) {
228887
- const Slottable2 = ({ children }) => {
228888
- return /* @__PURE__ */ jsx(Fragment$1, { children });
228889
- };
228890
- Slottable2.displayName = `${ownerName}.Slottable`;
228891
- Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
228892
- return Slottable2;
228893
- }
228894
-
228895
- var ROOT_NAME = "AlertDialog";
228896
- var [createAlertDialogContext] = createContextScope$1(ROOT_NAME, [
228897
- createDialogScope
228898
- ]);
228899
- var useDialogScope = createDialogScope();
228900
- var AlertDialog$1 = (props) => {
228901
- const { __scopeAlertDialog, ...alertDialogProps } = props;
228902
- const dialogScope = useDialogScope(__scopeAlertDialog);
228903
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });
228904
- };
228905
- AlertDialog$1.displayName = ROOT_NAME;
228906
- var TRIGGER_NAME = "AlertDialogTrigger";
228907
- var AlertDialogTrigger = React.forwardRef(
228908
- (props, forwardedRef) => {
228909
- const { __scopeAlertDialog, ...triggerProps } = props;
228910
- const dialogScope = useDialogScope(__scopeAlertDialog);
228911
- return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
228912
- }
228913
- );
228914
- AlertDialogTrigger.displayName = TRIGGER_NAME;
228915
- var PORTAL_NAME = "AlertDialogPortal";
228916
- var AlertDialogPortal$1 = (props) => {
228917
- const { __scopeAlertDialog, ...portalProps } = props;
228918
- const dialogScope = useDialogScope(__scopeAlertDialog);
228919
- return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });
228920
- };
228921
- AlertDialogPortal$1.displayName = PORTAL_NAME;
228922
- var OVERLAY_NAME = "AlertDialogOverlay";
228923
- var AlertDialogOverlay$1 = React.forwardRef(
228924
- (props, forwardedRef) => {
228925
- const { __scopeAlertDialog, ...overlayProps } = props;
228926
- const dialogScope = useDialogScope(__scopeAlertDialog);
228927
- return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
228928
- }
228929
- );
228930
- AlertDialogOverlay$1.displayName = OVERLAY_NAME;
228931
- var CONTENT_NAME = "AlertDialogContent";
228932
- var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
228933
- var Slottable = createSlottable("AlertDialogContent");
228934
- var AlertDialogContent$1 = React.forwardRef(
228935
- (props, forwardedRef) => {
228936
- const { __scopeAlertDialog, children, ...contentProps } = props;
228937
- const dialogScope = useDialogScope(__scopeAlertDialog);
228938
- const contentRef = React.useRef(null);
228939
- const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
228940
- const cancelRef = React.useRef(null);
228941
- return /* @__PURE__ */ jsx(
228942
- DialogPrimitive.WarningProvider,
228943
- {
228944
- contentName: CONTENT_NAME,
228945
- titleName: TITLE_NAME,
228946
- docsSlug: "alert-dialog",
228947
- children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(
228948
- DialogPrimitive.Content,
228949
- {
228950
- role: "alertdialog",
228951
- ...dialogScope,
228952
- ...contentProps,
228953
- ref: composedRefs,
228954
- onOpenAutoFocus: composeEventHandlers$1(contentProps.onOpenAutoFocus, (event) => {
228955
- event.preventDefault();
228956
- cancelRef.current?.focus({ preventScroll: true });
228957
- }),
228958
- onPointerDownOutside: (event) => event.preventDefault(),
228959
- onInteractOutside: (event) => event.preventDefault(),
228960
- children: [
228961
- /* @__PURE__ */ jsx(Slottable, { children }),
228962
- /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })
228963
- ]
228964
- }
228965
- ) })
228966
- }
228967
- );
228968
- }
228969
- );
228970
- AlertDialogContent$1.displayName = CONTENT_NAME;
228971
- var TITLE_NAME = "AlertDialogTitle";
228972
- var AlertDialogTitle$1 = React.forwardRef(
228973
- (props, forwardedRef) => {
228974
- const { __scopeAlertDialog, ...titleProps } = props;
228975
- const dialogScope = useDialogScope(__scopeAlertDialog);
228976
- return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });
228977
- }
228978
- );
228979
- AlertDialogTitle$1.displayName = TITLE_NAME;
228980
- var DESCRIPTION_NAME = "AlertDialogDescription";
228981
- var AlertDialogDescription$1 = React.forwardRef((props, forwardedRef) => {
228982
- const { __scopeAlertDialog, ...descriptionProps } = props;
228983
- const dialogScope = useDialogScope(__scopeAlertDialog);
228984
- return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
228985
- });
228986
- AlertDialogDescription$1.displayName = DESCRIPTION_NAME;
228987
- var ACTION_NAME = "AlertDialogAction";
228988
- var AlertDialogAction$1 = React.forwardRef(
228989
- (props, forwardedRef) => {
228990
- const { __scopeAlertDialog, ...actionProps } = props;
228991
- const dialogScope = useDialogScope(__scopeAlertDialog);
228992
- return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });
228993
- }
228994
- );
228995
- AlertDialogAction$1.displayName = ACTION_NAME;
228996
- var CANCEL_NAME = "AlertDialogCancel";
228997
- var AlertDialogCancel$1 = React.forwardRef(
228998
- (props, forwardedRef) => {
228999
- const { __scopeAlertDialog, ...cancelProps } = props;
229000
- const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
229001
- const dialogScope = useDialogScope(__scopeAlertDialog);
229002
- const ref = useComposedRefs$1(forwardedRef, cancelRef);
229003
- return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });
229004
- }
229005
- );
229006
- AlertDialogCancel$1.displayName = CANCEL_NAME;
229007
- var DescriptionWarning = ({ contentRef }) => {
229008
- const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
229009
-
229010
- You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
229011
-
229012
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
229013
-
229014
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
229015
- React.useEffect(() => {
229016
- const hasDescription = document.getElementById(
229017
- contentRef.current?.getAttribute("aria-describedby")
229018
- );
229019
- if (!hasDescription) console.warn(MESSAGE);
229020
- }, [MESSAGE, contentRef]);
229021
- return null;
229022
- };
229023
- var Root2 = AlertDialog$1;
229024
- var Portal2 = AlertDialogPortal$1;
229025
- var Overlay2 = AlertDialogOverlay$1;
229026
- var Content2 = AlertDialogContent$1;
229027
- var Action = AlertDialogAction$1;
229028
- var Cancel = AlertDialogCancel$1;
229029
- var Title2 = AlertDialogTitle$1;
229030
- var Description2 = AlertDialogDescription$1;
229031
-
229032
- const AlertDialog = Root2;
229033
- const AlertDialogPortal = Portal2;
229034
- const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (jsx(Overlay2, { className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80', className), ...props, ref: ref })));
229035
- AlertDialogOverlay.displayName = Overlay2.displayName;
229036
- const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (jsxs(AlertDialogPortal, { children: [jsx(AlertDialogOverlay, {}), jsx(Content2, { ref: ref, className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg', className), ...props })] })));
229037
- AlertDialogContent.displayName = Content2.displayName;
229038
- const AlertDialogHeader = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col space-y-2 text-center sm:text-left', className), ...props }));
229039
- AlertDialogHeader.displayName = 'AlertDialogHeader';
229040
- const AlertDialogFooter = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
229041
- AlertDialogFooter.displayName = 'AlertDialogFooter';
229042
- const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (jsx(Title2, { ref: ref, className: cn('text-lg font-semibold', className), ...props })));
229043
- AlertDialogTitle.displayName = Title2.displayName;
229044
- const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (jsx(Description2, { ref: ref, className: cn('text-muted-foreground text-sm', className), ...props })));
229045
- AlertDialogDescription.displayName = Description2.displayName;
229046
- const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (jsx(Action, { ref: ref, className: cn(buttonVariants(), className), ...props })));
229047
- AlertDialogAction.displayName = Action.displayName;
229048
- const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (jsx(Cancel, { ref: ref, className: cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className), ...props })));
229049
- AlertDialogCancel.displayName = Cancel.displayName;
229050
-
229051
229342
  /** Rough client-side check; the server remains the authority. */
229052
229343
  const isProbableEmail = (value) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value.trim());
229053
229344
  /**