@iblai/iblai-js 2.3.13 → 2.3.15

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,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useRef, useEffect, useState, useCallback, useLayoutEffect, forwardRef, createElement as createElement$1, createContext, useContext, useMemo, useReducer, useImperativeHandle, isValidElement, Children, PureComponent, cloneElement, Component, useId as useId$2, useDebugValue, lazy, Suspense } from 'react';
3
3
  import { useDispatch, useSelector } from 'react-redux';
4
- import { selectSessionId, selectActiveChatMessages, useCachedSessionId, chatActions, LOCAL_STORAGE_KEYS, TimeTracker, getInitials, useTenantMetadata, useCurrentTenant, selectRbacPermissions, isPureWatcher, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, getTimeAgo, REQUIRED_ACTIONS_FOR_GROUPS, getVisibleAnalyticsTabs, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, WATCHER_HIDDEN_REPORTS, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl, useOS, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, 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';
4
+ import { selectSessionId, selectActiveChatMessages, useCachedSessionId, chatActions, LOCAL_STORAGE_KEYS, TimeTracker, getInitials, useTenantMetadata, useCurrentTenant, selectRbacPermissions, isPureWatcher, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, getTimeAgo, REQUIRED_ACTIONS_FOR_GROUPS, getVisibleAnalyticsTabs, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, WATCHER_HIDDEN_REPORTS, canViewPlatformAuditLogs, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl, useOS, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, 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';
5
5
  import * as dataLayer from '@iblai/data-layer';
6
- import { useCreateSessionIdMutation, useTimeTrackingMutation, useGetUserMetadataQuery, useGetUserMetadataEdxQuery, 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, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, 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, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useUpdateTenantMetadataMutation, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, useGetMentorsQuery, useUpdateTemplateMutation, useGetTemplateDetailsQuery, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAverageRatingQuery, useGetFinancialStatsQuery, useGetDetailedFinancialStatsQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useLazyGetDownloadReportFromURLQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetMentorMemoriesListQuery, useGetMentorMemoriesQuery, useGetMemoryCategoriesAdminQuery, 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, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, resolveEffectiveAgentSkills, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
6
+ import { useCreateSessionIdMutation, useTimeTrackingMutation, useGetUserMetadataQuery, useGetUserMetadataEdxQuery, 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, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, 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, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useUpdateTenantMetadataMutation, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, useGetMentorsQuery, useUpdateTemplateMutation, useGetTemplateDetailsQuery, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAverageRatingQuery, useGetFinancialStatsQuery, useGetDetailedFinancialStatsQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useLazyGetDownloadReportFromURLQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetPlatformAuditLogsQuery, PLATFORM_AUDIT_EVENT_TYPES, PLATFORM_AUDIT_ACTION_CODES, useGetMentorMemoriesListQuery, useGetMentorMemoriesQuery, useGetMemoryCategoriesAdminQuery, 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, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, resolveEffectiveAgentSkills, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
7
7
  import { toast } from 'sonner';
8
8
  import { jsx, Fragment as Fragment$1, jsxs } from 'react/jsx-runtime';
9
9
  import * as ReactDOM from 'react-dom';
@@ -45577,7 +45577,7 @@ var isArray$f = function isArray(arr) {
45577
45577
  return toStr.call(arr) === '[object Array]';
45578
45578
  };
45579
45579
 
45580
- var isPlainObject$4 = function isPlainObject(obj) {
45580
+ var isPlainObject$5 = function isPlainObject(obj) {
45581
45581
  if (!obj || toStr.call(obj) !== '[object Object]') {
45582
45582
  return false;
45583
45583
  }
@@ -45656,12 +45656,12 @@ var extend$3 = function extend() {
45656
45656
  // Prevent never-ending loop
45657
45657
  if (target !== copy) {
45658
45658
  // Recurse if we're merging plain objects or arrays
45659
- if (deep && copy && (isPlainObject$4(copy) || (copyIsArray = isArray$f(copy)))) {
45659
+ if (deep && copy && (isPlainObject$5(copy) || (copyIsArray = isArray$f(copy)))) {
45660
45660
  if (copyIsArray) {
45661
45661
  copyIsArray = false;
45662
45662
  clone = src && isArray$f(src) ? src : [];
45663
45663
  } else {
45664
- clone = src && isPlainObject$4(src) ? src : {};
45664
+ clone = src && isPlainObject$5(src) ? src : {};
45665
45665
  }
45666
45666
 
45667
45667
  // Never move original objects, clone them
@@ -45682,7 +45682,7 @@ var extend$3 = function extend() {
45682
45682
 
45683
45683
  var extend$2 = /*@__PURE__*/getDefaultExportFromCjs(extend$3);
45684
45684
 
45685
- function isPlainObject$3(value) {
45685
+ function isPlainObject$4(value) {
45686
45686
  if (typeof value !== 'object' || value === null) {
45687
45687
  return false;
45688
45688
  }
@@ -46753,7 +46753,7 @@ class Processor extends CallableInstance {
46753
46753
  else if (parameters.length > 0) {
46754
46754
  let [primary, ...rest] = parameters;
46755
46755
  const currentPrimary = attachers[entryIndex][1];
46756
- if (isPlainObject$3(currentPrimary) && isPlainObject$3(primary)) {
46756
+ if (isPlainObject$4(currentPrimary) && isPlainObject$4(primary)) {
46757
46757
  primary = extend$2(true, currentPrimary, primary);
46758
46758
  }
46759
46759
 
@@ -46845,7 +46845,7 @@ function assertUnfrozen(name, frozen) {
46845
46845
  function assertNode(node) {
46846
46846
  // `isPlainObj` unfortunately uses `any` instead of `unknown`.
46847
46847
  // type-coverage:ignore-next-line
46848
- if (!isPlainObject$3(node) || typeof node.type !== 'string') {
46848
+ if (!isPlainObject$4(node) || typeof node.type !== 'string') {
46849
46849
  throw new TypeError('Expected node, got `' + node + '`')
46850
46850
  // Fine.
46851
46851
  }
@@ -54919,7 +54919,7 @@ const createLucideIcon = (iconName, iconNode) => {
54919
54919
  */
54920
54920
 
54921
54921
 
54922
- const __iconNode$2m = [
54922
+ const __iconNode$2l = [
54923
54923
  [
54924
54924
  "path",
54925
54925
  {
@@ -54928,7 +54928,7 @@ const __iconNode$2m = [
54928
54928
  }
54929
54929
  ]
54930
54930
  ];
54931
- const Activity = createLucideIcon("activity", __iconNode$2m);
54931
+ const Activity = createLucideIcon("activity", __iconNode$2l);
54932
54932
 
54933
54933
  /**
54934
54934
  * @license lucide-react v0.528.0 - ISC
@@ -54938,12 +54938,12 @@ const Activity = createLucideIcon("activity", __iconNode$2m);
54938
54938
  */
54939
54939
 
54940
54940
 
54941
- const __iconNode$2l = [
54941
+ const __iconNode$2k = [
54942
54942
  ["path", { d: "M17 12H7", key: "16if0g" }],
54943
54943
  ["path", { d: "M19 18H5", key: "18s9l3" }],
54944
54944
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
54945
54945
  ];
54946
- const AlignCenter = createLucideIcon("align-center", __iconNode$2l);
54946
+ const AlignCenter = createLucideIcon("align-center", __iconNode$2k);
54947
54947
 
54948
54948
  /**
54949
54949
  * @license lucide-react v0.528.0 - ISC
@@ -54953,12 +54953,12 @@ const AlignCenter = createLucideIcon("align-center", __iconNode$2l);
54953
54953
  */
54954
54954
 
54955
54955
 
54956
- const __iconNode$2k = [
54956
+ const __iconNode$2j = [
54957
54957
  ["path", { d: "M15 12H3", key: "6jk70r" }],
54958
54958
  ["path", { d: "M17 18H3", key: "1amg6g" }],
54959
54959
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
54960
54960
  ];
54961
- const AlignLeft = createLucideIcon("align-left", __iconNode$2k);
54961
+ const AlignLeft = createLucideIcon("align-left", __iconNode$2j);
54962
54962
 
54963
54963
  /**
54964
54964
  * @license lucide-react v0.528.0 - ISC
@@ -54968,12 +54968,12 @@ const AlignLeft = createLucideIcon("align-left", __iconNode$2k);
54968
54968
  */
54969
54969
 
54970
54970
 
54971
- const __iconNode$2j = [
54971
+ const __iconNode$2i = [
54972
54972
  ["path", { d: "M21 12H9", key: "dn1m92" }],
54973
54973
  ["path", { d: "M21 18H7", key: "1ygte8" }],
54974
54974
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
54975
54975
  ];
54976
- const AlignRight = createLucideIcon("align-right", __iconNode$2j);
54976
+ const AlignRight = createLucideIcon("align-right", __iconNode$2i);
54977
54977
 
54978
54978
  /**
54979
54979
  * @license lucide-react v0.528.0 - ISC
@@ -54983,12 +54983,12 @@ const AlignRight = createLucideIcon("align-right", __iconNode$2j);
54983
54983
  */
54984
54984
 
54985
54985
 
54986
- const __iconNode$2i = [
54986
+ const __iconNode$2h = [
54987
54987
  ["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
54988
54988
  ["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
54989
54989
  ["path", { d: "M10 12h4", key: "a56b0p" }]
54990
54990
  ];
54991
- const Archive = createLucideIcon("archive", __iconNode$2i);
54991
+ const Archive = createLucideIcon("archive", __iconNode$2h);
54992
54992
 
54993
54993
  /**
54994
54994
  * @license lucide-react v0.528.0 - ISC
@@ -54998,11 +54998,11 @@ const Archive = createLucideIcon("archive", __iconNode$2i);
54998
54998
  */
54999
54999
 
55000
55000
 
55001
- const __iconNode$2h = [
55001
+ const __iconNode$2g = [
55002
55002
  ["path", { d: "M12 5v14", key: "s699le" }],
55003
55003
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
55004
55004
  ];
55005
- const ArrowDown = createLucideIcon("arrow-down", __iconNode$2h);
55005
+ const ArrowDown = createLucideIcon("arrow-down", __iconNode$2g);
55006
55006
 
55007
55007
  /**
55008
55008
  * @license lucide-react v0.528.0 - ISC
@@ -55012,11 +55012,11 @@ const ArrowDown = createLucideIcon("arrow-down", __iconNode$2h);
55012
55012
  */
55013
55013
 
55014
55014
 
55015
- const __iconNode$2g = [
55015
+ const __iconNode$2f = [
55016
55016
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
55017
55017
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
55018
55018
  ];
55019
- const ArrowLeft = createLucideIcon("arrow-left", __iconNode$2g);
55019
+ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$2f);
55020
55020
 
55021
55021
  /**
55022
55022
  * @license lucide-react v0.528.0 - ISC
@@ -55026,11 +55026,11 @@ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$2g);
55026
55026
  */
55027
55027
 
55028
55028
 
55029
- const __iconNode$2f = [
55029
+ const __iconNode$2e = [
55030
55030
  ["path", { d: "M5 12h14", key: "1ays0h" }],
55031
55031
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
55032
55032
  ];
55033
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$2f);
55033
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$2e);
55034
55034
 
55035
55035
  /**
55036
55036
  * @license lucide-react v0.528.0 - ISC
@@ -55040,11 +55040,11 @@ const ArrowRight = createLucideIcon("arrow-right", __iconNode$2f);
55040
55040
  */
55041
55041
 
55042
55042
 
55043
- const __iconNode$2e = [
55043
+ const __iconNode$2d = [
55044
55044
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
55045
55045
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
55046
55046
  ];
55047
- const ArrowUp = createLucideIcon("arrow-up", __iconNode$2e);
55047
+ const ArrowUp = createLucideIcon("arrow-up", __iconNode$2d);
55048
55048
 
55049
55049
  /**
55050
55050
  * @license lucide-react v0.528.0 - ISC
@@ -55054,7 +55054,7 @@ const ArrowUp = createLucideIcon("arrow-up", __iconNode$2e);
55054
55054
  */
55055
55055
 
55056
55056
 
55057
- const __iconNode$2d = [
55057
+ const __iconNode$2c = [
55058
55058
  [
55059
55059
  "path",
55060
55060
  {
@@ -55064,7 +55064,7 @@ const __iconNode$2d = [
55064
55064
  ],
55065
55065
  ["circle", { cx: "12", cy: "8", r: "6", key: "1vp47v" }]
55066
55066
  ];
55067
- const Award = createLucideIcon("award", __iconNode$2d);
55067
+ const Award = createLucideIcon("award", __iconNode$2c);
55068
55068
 
55069
55069
  /**
55070
55070
  * @license lucide-react v0.528.0 - ISC
@@ -55074,11 +55074,11 @@ const Award = createLucideIcon("award", __iconNode$2d);
55074
55074
  */
55075
55075
 
55076
55076
 
55077
- const __iconNode$2c = [
55077
+ const __iconNode$2b = [
55078
55078
  ["path", { d: "M4.929 4.929 19.07 19.071", key: "196cmz" }],
55079
55079
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
55080
55080
  ];
55081
- const Ban = createLucideIcon("ban", __iconNode$2c);
55081
+ const Ban = createLucideIcon("ban", __iconNode$2b);
55082
55082
 
55083
55083
  /**
55084
55084
  * @license lucide-react v0.528.0 - ISC
@@ -55088,12 +55088,12 @@ const Ban = createLucideIcon("ban", __iconNode$2c);
55088
55088
  */
55089
55089
 
55090
55090
 
55091
- const __iconNode$2b = [
55091
+ const __iconNode$2a = [
55092
55092
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2", key: "9lu3g6" }],
55093
55093
  ["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }],
55094
55094
  ["path", { d: "M6 12h.01M18 12h.01", key: "113zkx" }]
55095
55095
  ];
55096
- const Banknote = createLucideIcon("banknote", __iconNode$2b);
55096
+ const Banknote = createLucideIcon("banknote", __iconNode$2a);
55097
55097
 
55098
55098
  /**
55099
55099
  * @license lucide-react v0.528.0 - ISC
@@ -55103,7 +55103,7 @@ const Banknote = createLucideIcon("banknote", __iconNode$2b);
55103
55103
  */
55104
55104
 
55105
55105
 
55106
- const __iconNode$2a = [
55106
+ const __iconNode$29 = [
55107
55107
  ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
55108
55108
  ["path", { d: "M22 8c0-2.3-.8-4.3-2-6", key: "5bb3ad" }],
55109
55109
  [
@@ -55115,7 +55115,7 @@ const __iconNode$2a = [
55115
55115
  ],
55116
55116
  ["path", { d: "M4 2C2.8 3.7 2 5.7 2 8", key: "tap9e0" }]
55117
55117
  ];
55118
- const BellRing = createLucideIcon("bell-ring", __iconNode$2a);
55118
+ const BellRing = createLucideIcon("bell-ring", __iconNode$29);
55119
55119
 
55120
55120
  /**
55121
55121
  * @license lucide-react v0.528.0 - ISC
@@ -55125,7 +55125,7 @@ const BellRing = createLucideIcon("bell-ring", __iconNode$2a);
55125
55125
  */
55126
55126
 
55127
55127
 
55128
- const __iconNode$29 = [
55128
+ const __iconNode$28 = [
55129
55129
  ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
55130
55130
  [
55131
55131
  "path",
@@ -55135,7 +55135,7 @@ const __iconNode$29 = [
55135
55135
  }
55136
55136
  ]
55137
55137
  ];
55138
- const Bell = createLucideIcon("bell", __iconNode$29);
55138
+ const Bell = createLucideIcon("bell", __iconNode$28);
55139
55139
 
55140
55140
  /**
55141
55141
  * @license lucide-react v0.528.0 - ISC
@@ -55145,13 +55145,13 @@ const Bell = createLucideIcon("bell", __iconNode$29);
55145
55145
  */
55146
55146
 
55147
55147
 
55148
- const __iconNode$28 = [
55148
+ const __iconNode$27 = [
55149
55149
  [
55150
55150
  "path",
55151
55151
  { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
55152
55152
  ]
55153
55153
  ];
55154
- const Bold$1 = createLucideIcon("bold", __iconNode$28);
55154
+ const Bold$1 = createLucideIcon("bold", __iconNode$27);
55155
55155
 
55156
55156
  /**
55157
55157
  * @license lucide-react v0.528.0 - ISC
@@ -55161,7 +55161,7 @@ const Bold$1 = createLucideIcon("bold", __iconNode$28);
55161
55161
  */
55162
55162
 
55163
55163
 
55164
- const __iconNode$27 = [
55164
+ const __iconNode$26 = [
55165
55165
  ["path", { d: "M12 7v14", key: "1akyts" }],
55166
55166
  [
55167
55167
  "path",
@@ -55171,7 +55171,7 @@ const __iconNode$27 = [
55171
55171
  }
55172
55172
  ]
55173
55173
  ];
55174
- const BookOpen = createLucideIcon("book-open", __iconNode$27);
55174
+ const BookOpen = createLucideIcon("book-open", __iconNode$26);
55175
55175
 
55176
55176
  /**
55177
55177
  * @license lucide-react v0.528.0 - ISC
@@ -55181,7 +55181,7 @@ const BookOpen = createLucideIcon("book-open", __iconNode$27);
55181
55181
  */
55182
55182
 
55183
55183
 
55184
- const __iconNode$26 = [
55184
+ const __iconNode$25 = [
55185
55185
  ["path", { d: "M12 8V4H8", key: "hb8ula" }],
55186
55186
  ["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
55187
55187
  ["path", { d: "M2 14h2", key: "vft8re" }],
@@ -55189,27 +55189,7 @@ const __iconNode$26 = [
55189
55189
  ["path", { d: "M15 13v2", key: "1xurst" }],
55190
55190
  ["path", { d: "M9 13v2", key: "rq6x2g" }]
55191
55191
  ];
55192
- const Bot = createLucideIcon("bot", __iconNode$26);
55193
-
55194
- /**
55195
- * @license lucide-react v0.528.0 - ISC
55196
- *
55197
- * This source code is licensed under the ISC license.
55198
- * See the LICENSE file in the root directory of this source tree.
55199
- */
55200
-
55201
-
55202
- const __iconNode$25 = [
55203
- ["path", { d: "M12 18V5", key: "adv99a" }],
55204
- ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
55205
- ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
55206
- ["path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77", key: "iwvgf7" }],
55207
- ["path", { d: "M18 18a4 4 0 0 0 2-7.464", key: "efp6ie" }],
55208
- ["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
55209
- ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
55210
- ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
55211
- ];
55212
- const Brain = createLucideIcon("brain", __iconNode$25);
55192
+ const Bot = createLucideIcon("bot", __iconNode$25);
55213
55193
 
55214
55194
  /**
55215
55195
  * @license lucide-react v0.528.0 - ISC
@@ -60582,6 +60562,10 @@ var analyticsAccessTimeHeatmap$3 = {
60582
60562
  tooltipActiveUsers: "{count} active users"
60583
60563
  };
60584
60564
  var analyticsAnalyticsAuditLogStats$3 = {
60565
+ scopeAgent: "Agent",
60566
+ scopePlatform: "Platform",
60567
+ scopeAgentHint: "Configuration changes for this agent.",
60568
+ scopePlatformHint: "Platform-wide changes and security events.",
60585
60569
  noPermission: "You do not have permission to view audit logs.",
60586
60570
  searchForUser: "Search for User",
60587
60571
  searchUserPlaceholder: "Search user...",
@@ -60618,7 +60602,11 @@ var analyticsAnalyticsCourseDetail$3 = {
60618
60602
  paginationPreviousPage: "Go to previous page",
60619
60603
  paginationGoToPage: "Go to page {page}",
60620
60604
  paginationNextPage: "Go to next page",
60621
- paginationLastPage: "Go to last page"
60605
+ paginationLastPage: "Go to last page",
60606
+ backToCourses: "Back to Courses",
60607
+ activeEnrollmentsDescription: "Learners enrolled in this course who have not finished it yet.",
60608
+ completedEnrollmentsDescription: "Learners who have finished every requirement of this course.",
60609
+ enrolledUsersDescription: "Every learner in this course with their progress, grade and last activity."
60622
60610
  };
60623
60611
  var analyticsAnalyticsCourses$3 = {
60624
60612
  activeCourses: "Active Courses",
@@ -60643,7 +60631,13 @@ var analyticsAnalyticsCourses$3 = {
60643
60631
  goToPage: "Go to page {page}",
60644
60632
  goToNextPage: "Go to next page",
60645
60633
  goToLastPage: "Go to last page",
60646
- noCoursesAvailable: "No courses available"
60634
+ noCoursesAvailable: "No courses available",
60635
+ activeCoursesDescription: "Courses that currently have learners enrolled and progressing.",
60636
+ totalCoursesDescription: "All courses published on this tenant, active or not.",
60637
+ enrollmentsDescription: "Total enrollments recorded across every course.",
60638
+ totalLearnersDescription: "Distinct learners enrolled in at least one course.",
60639
+ courseOvertimeDescription: "Time learners spent in courses over the selected period.",
60640
+ coursesTableDescription: "Every course with its ID and enrollment count. Select a row to open its detail view."
60647
60641
  };
60648
60642
  var analyticsAnalyticsFinancialStats$3 = {
60649
60643
  weeklyCosts: "Weekly Costs",
@@ -60671,7 +60665,14 @@ var analyticsAnalyticsFinancialStats$3 = {
60671
60665
  goToPreviousPage: "Go to previous page",
60672
60666
  goToNextPage: "Go to next page",
60673
60667
  goToLastPage: "Go to last page",
60674
- paginationShowing: "Showing {from} to {to} of {total} results"
60668
+ paginationShowing: "Showing {from} to {to} of {total} results",
60669
+ weeklyCostsDescription: "Model usage cost for the past week, compared with the week before.",
60670
+ monthlyCostsDescription: "Model usage cost for the past month, compared with the month before.",
60671
+ totalCostsDescription: "All model usage cost accumulated on this tenant to date.",
60672
+ costPerDayDescription: "Daily model spend, so you can see how cost tracks with usage.",
60673
+ costByProviderDescription: "How your spend is split across the model providers your agents use.",
60674
+ costByLLMDescription: "How your spend is split across individual models, showing which ones cost the most.",
60675
+ costPerUserDescription: "Spend attributed to each user, with their session count and last activity."
60675
60676
  };
60676
60677
  var analyticsAnalyticsMemoryStats$3 = {
60677
60678
  noPermission: "You do not have permission to view user memories.",
@@ -60702,7 +60703,8 @@ var analyticsAnalyticsMemoryStats$3 = {
60702
60703
  colMemory: "MEMORY",
60703
60704
  colAgent: "AGENT",
60704
60705
  colCategory: "CATEGORY",
60705
- colCaptured: "CAPTURED"
60706
+ colCaptured: "CAPTURED",
60707
+ byCategoryDescription: "How captured memories are distributed across categories for the current filters."
60706
60708
  };
60707
60709
  var analyticsAnalyticsMonetizationStats$3 = {
60708
60710
  totalRevenue: "Total Revenue",
@@ -60742,7 +60744,15 @@ var analyticsAnalyticsMonetizationStats$3 = {
60742
60744
  activePricesCount: "{count} active",
60743
60745
  statusActive: "Active",
60744
60746
  statusDisabled: "Disabled",
60745
- paywallCountTotal: "{count} item{plural} total"
60747
+ paywallCountTotal: "{count} item{plural} total",
60748
+ totalRevenueDescription: "Gross revenue collected from all completed sales.",
60749
+ totalSalesDescription: "Number of completed purchases across all paywalled items.",
60750
+ activePaywallsDescription: "Paywalls currently configured and enabled on this tenant.",
60751
+ totalSubscribersDescription: "People holding a subscription, counted across every status.",
60752
+ subscribersByStatusDescription: "How subscribers are split across active, trialing, canceled and past-due states.",
60753
+ paywallsByTypeDescription: "How your paywalls are split across the item types they protect, such as agents and courses.",
60754
+ subscribersTableDescription: "Every subscriber with the item, plan, amount and status of their subscription.",
60755
+ paywallsTableDescription: "Every configured paywall with its type, prices and whether it is currently active."
60746
60756
  };
60747
60757
  var analyticsAnalyticsOverview$3 = {
60748
60758
  messages: "Messages",
@@ -60755,7 +60765,14 @@ var analyticsAnalyticsOverview$3 = {
60755
60765
  topicDetailsFor: "Topic details for {label}",
60756
60766
  messagesLabel: "Messages:",
60757
60767
  activeUsersFor: "Active users for {label}",
60758
- activeUsersLabel: "Active Users:"
60768
+ activeUsersLabel: "Active Users:",
60769
+ messagesDescription: "Total messages exchanged between users and your agents in the selected period.",
60770
+ activeUsersDescription: "Unique users who interacted with an agent in the selected period.",
60771
+ topicsDescription: "Distinct subjects your agents were asked about in the selected period.",
60772
+ conversationsDescription: "Number of separate conversation threads started in the selected period.",
60773
+ sessionsChartDescription: "Sessions started over time, so you can spot usage peaks and dips.",
60774
+ topicsChartDescription: "The most discussed topics, ranked by how many messages each one generated.",
60775
+ activeUsersChartDescription: "Unique active users per day, showing how engagement changes over time."
60759
60776
  };
60760
60777
  var analyticsAnalyticsProgramDetail$3 = {
60761
60778
  backAriaLabel: "Go back to programs list",
@@ -60783,7 +60800,12 @@ var analyticsAnalyticsProgramDetail$3 = {
60783
60800
  paginationPreviousPage: "Go to previous page",
60784
60801
  paginationGoToPage: "Go to page {page}",
60785
60802
  paginationNextPage: "Go to next page",
60786
- paginationLastPage: "Go to last page"
60803
+ paginationLastPage: "Go to last page",
60804
+ backButton: "Back to Programs",
60805
+ statTotalEnrollmentsDescription: "All learners ever enrolled in this program.",
60806
+ statActiveEnrollmentsDescription: "Learners enrolled in this program who have not finished it yet.",
60807
+ statCompletedEnrollmentsDescription: "Learners who have finished every requirement of this program.",
60808
+ enrolledUsersDescription: "Every learner in this program with their progress, grade and last activity."
60787
60809
  };
60788
60810
  var analyticsAnalyticsPrograms$3 = {
60789
60811
  activePrograms: "Active Programs",
@@ -60807,7 +60829,13 @@ var analyticsAnalyticsPrograms$3 = {
60807
60829
  goToPage: "Go to page {page}",
60808
60830
  goToNextPage: "Go to next page",
60809
60831
  goToLastPage: "Go to last page",
60810
- noProgramsAvailable: "No programs available"
60832
+ noProgramsAvailable: "No programs available",
60833
+ activeProgramsDescription: "Programs that currently have learners enrolled and progressing.",
60834
+ totalProgramsDescription: "All programs published on this tenant, active or not.",
60835
+ enrollmentsDescription: "Total enrollments recorded across every program.",
60836
+ totalLearnersDescription: "Distinct learners enrolled in at least one program.",
60837
+ programOvertimeDescription: "Time learners spent in programs over the selected period.",
60838
+ programsTableDescription: "Every program with its ID. Select a row to open its detail view."
60811
60839
  };
60812
60840
  var analyticsAnalyticsReports$3 = {
60813
60841
  failedToLoadReportForEditing: "Failed to load report for editing. Opening download instead.",
@@ -60849,7 +60877,13 @@ var analyticsAnalyticsTopicsStats$3 = {
60849
60877
  outOfFive: "/ 5",
60850
60878
  topicsDetails: "Topics Details",
60851
60879
  topicDetailsForLabel: "Topic details for {label}",
60852
- messagesColon: "Messages:"
60880
+ messagesColon: "Messages:",
60881
+ topicsDescription: "Distinct subjects raised in conversations this month.",
60882
+ conversationsDescription: "Conversation threads started this month.",
60883
+ messagesDescription: "Messages exchanged this month across all conversations.",
60884
+ conversationsChartDescription: "Conversations started over time, so you can track engagement trends.",
60885
+ averageRatingDescription: "Average user rating of agent responses over time, on a scale of 1 to 5.",
60886
+ topicsDetailsDescription: "Topics ranked by message volume, showing what users ask about most."
60853
60887
  };
60854
60888
  var analyticsAnalyticsTranscriptsStats$3 = {
60855
60889
  justNow: "Just now",
@@ -60904,7 +60938,10 @@ var analyticsAnalyticsTranscriptsStats$3 = {
60904
60938
  srGoToLastPage: "Go to last page",
60905
60939
  none: "none",
60906
60940
  loading: "Loading...",
60907
- paginationInfo: "Page {currentPage} of {totalPages} • {totalRecords} total records"
60941
+ paginationInfo: "Page {currentPage} of {totalPages} • {totalRecords} total records",
60942
+ avgMessagesPerConversationDescription: "How many messages a typical conversation contains, indicating how deep exchanges go.",
60943
+ avgCostPerConversationDescription: "What a typical conversation costs in model usage.",
60944
+ avgRatingDescription: "Average rating users gave their conversations, on a scale of 1 to 5."
60908
60945
  };
60909
60946
  var analyticsAnalyticsUsersStats$3 = {
60910
60947
  usersLoggedInNow: "Users logged in right now",
@@ -60932,7 +60969,13 @@ var analyticsAnalyticsUsersStats$3 = {
60932
60969
  justNow: "Just now",
60933
60970
  minutesAgo: "{count} min ago",
60934
60971
  hoursAgo: "{count} hours ago",
60935
- daysAgo: "{count} days ago"
60972
+ daysAgo: "{count} days ago",
60973
+ usersLoggedInNowDescription: "Users with a session open right now.",
60974
+ usersLoggedInPast30DaysDescription: "Unique users who signed in at least once in the last 30 days.",
60975
+ totalRegisteredUsersDescription: "Every user account registered on this tenant, active or not.",
60976
+ activeUsersChartDescription: "Unique active users per day, showing how engagement changes over time.",
60977
+ accessTimesDescription: "When users are most active, broken down by day of the week and hour of the day.",
60978
+ userDetailsDescription: "Per-user breakdown of message volume and last activity. Search to find a specific user."
60936
60979
  };
60937
60980
  var analyticsGroupsFilterDropdown$3 = {
60938
60981
  filterByGroups: "Filter by Groups",
@@ -61638,7 +61681,10 @@ var clawSandboxAgentSkills$3 = {
61638
61681
  tabsAriaLabel: "Skills",
61639
61682
  tabAgentSkills: "Agent Skills",
61640
61683
  tabAvailableSkills: "Available Skills",
61641
- addedBadge: "Added"
61684
+ addedBadge: "Added",
61685
+ effectiveHeading: "This agent's skills",
61686
+ catalogHeading: "Available skills",
61687
+ resourcesItemLabel: "resources"
61642
61688
  };
61643
61689
  var clawSandboxHelpers$3 = {
61644
61690
  unknown: "Unknown",
@@ -65670,9 +65716,9 @@ var profileApplicationsTab$3 = {
65670
65716
  linkCopied: "Copied",
65671
65717
  formsHeading: "Application forms",
65672
65718
  formsDescription: "Every application form of this platform. One form is the default applicants land on.",
65673
- blockedUsers: "Blocked users",
65719
+ blockedUsers: "Blocked Users",
65674
65720
  blockedUsersDescription: "Families barred from reapplying. Unblocking lets them apply again.",
65675
- allSubmissions: "All submissions ({count})",
65721
+ allSubmissions: "All Submissions ({count})",
65676
65722
  newForm: "New form",
65677
65723
  postApproval_enrolled: "Enrolled",
65678
65724
  postApproval_enrollment_in_progress: "Enrollment in progress",
@@ -65690,7 +65736,7 @@ var profileApplicationsTab$3 = {
65690
65736
  noForms: "No application forms yet. Create one to turn on applications.",
65691
65737
  backToForms: "Back to forms",
65692
65738
  submissionsFor: "Submissions — {form}",
65693
- allSubmissionsHeading: "All submissions",
65739
+ allSubmissionsHeading: "All Submissions",
65694
65740
  candidateFilterPlaceholder: "Student filter, e.g. grade=6",
65695
65741
  sortLabel: "Sort",
65696
65742
  sortNewest: "Newest first",
@@ -66023,6 +66069,81 @@ var graderTabLabels$3 = {
66023
66069
  overrideButtonAria: "Override grade for {email}"
66024
66070
  }
66025
66071
  };
66072
+ var analyticsAnalyticsPlatformAuditLog$3 = {
66073
+ eventTypeLabel: "Event type",
66074
+ allEventTypes: "All Event Types",
66075
+ actionLabel: "Action",
66076
+ allActions: "All Actions",
66077
+ actorUsernameLabel: "Actor username",
66078
+ actorUsernamePlaceholder: "Filter by username",
66079
+ actorEmailLabel: "Actor email",
66080
+ actorEmailPlaceholder: "Filter by email",
66081
+ pickDateRange: "Pick a Date Range",
66082
+ clearFilters: "Clear filters",
66083
+ narrowSuggestion: "{count} entries match. Narrow the date range to review them without paging through everything.",
66084
+ colTimestamp: "TIMESTAMP ({timezone})",
66085
+ colEvent: "EVENT / ACTION",
66086
+ colActor: "ACTOR",
66087
+ colResource: "RESOURCE",
66088
+ colIpAddress: "IP ADDRESS",
66089
+ colDetails: "Details",
66090
+ kindModelChange: "Model change",
66091
+ kindEvent: "Security event",
66092
+ viewDetails: "View",
66093
+ notAvailable: "—",
66094
+ loadError: "An error occurred while loading audit logs.",
66095
+ noEntries: "No audit log entries have been recorded for this platform yet.",
66096
+ noFilteredEntries: "No audit log entries match these filters.",
66097
+ forbiddenTitle: "You do not have permission to view platform audit logs.",
66098
+ forbiddenBody: "Ask a platform administrator to grant you audit log access.",
66099
+ resultSummary: "Showing {shown} of {total} entries."
66100
+ };
66101
+ var analyticsPlatformAuditLogDetailSheet$3 = {
66102
+ title: "Audit entry",
66103
+ description: "Read-only detail for this audit log entry.",
66104
+ timestamp: "Timestamp",
66105
+ event: "Event",
66106
+ action: "Action",
66107
+ actor: "Actor",
66108
+ resource: "Resource",
66109
+ ipAddress: "IP address",
66110
+ entryId: "Entry ID",
66111
+ changesHeading: "Changes",
66112
+ metadataHeading: "Metadata",
66113
+ noMetadata: "This event carries no metadata.",
66114
+ notAvailable: "—"
66115
+ };
66116
+ var analyticsAuditLogJsonView$3 = {
66117
+ "null": "null",
66118
+ empty: "(empty)",
66119
+ emptyString: "(empty string)",
66120
+ emptyList: "(empty list)",
66121
+ emptyObject: "(empty object)",
66122
+ truncated: "(nested too deeply to display)",
66123
+ itemCount: "{count, plural, one {# item} other {# items}}",
66124
+ keyCount: "{count, plural, one {# key} other {# keys}}",
66125
+ noPayload: "No additional data recorded.",
66126
+ noChanges: "No field changes recorded.",
66127
+ fieldColumn: "Field",
66128
+ beforeColumn: "Before",
66129
+ afterColumn: "After"
66130
+ };
66131
+ var analyticsUsePlatformAuditLabels$3 = {
66132
+ eventTypeLogin: "Login",
66133
+ eventTypeLogout: "Logout",
66134
+ eventTypeLoginFailed: "Failed login",
66135
+ eventTypePasswordChange: "Password change",
66136
+ eventTypeExport: "Export",
66137
+ eventTypeDownloadFile: "File download",
66138
+ eventTypeApiCall: "API call",
66139
+ eventTypeViewStudentRecord: "Student record viewed",
66140
+ eventTypeChangeGrade: "Grade change",
66141
+ eventTypeAdminAction: "Admin action",
66142
+ actionCreate: "Create",
66143
+ actionUpdate: "Update",
66144
+ actionDelete: "Delete",
66145
+ actionAccess: "Access"
66146
+ };
66026
66147
  var en = {
66027
66148
  accessTabAddAccess: accessTabAddAccess$3,
66028
66149
  accessTabLabels: accessTabLabels$3,
@@ -66280,7 +66401,11 @@ var en = {
66280
66401
  applyApplyWizard: applyApplyWizard$3,
66281
66402
  profileApplicationsTab: profileApplicationsTab$3,
66282
66403
  profileApplicationsQuestionsEditor: profileApplicationsQuestionsEditor$3,
66283
- graderTabLabels: graderTabLabels$3
66404
+ graderTabLabels: graderTabLabels$3,
66405
+ analyticsAnalyticsPlatformAuditLog: analyticsAnalyticsPlatformAuditLog$3,
66406
+ analyticsPlatformAuditLogDetailSheet: analyticsPlatformAuditLogDetailSheet$3,
66407
+ analyticsAuditLogJsonView: analyticsAuditLogJsonView$3,
66408
+ analyticsUsePlatformAuditLabels: analyticsUsePlatformAuditLabels$3
66284
66409
  };
66285
66410
 
66286
66411
  var accessTabAddAccess$2 = {
@@ -66901,6 +67026,10 @@ var analyticsAccessTimeHeatmap$2 = {
66901
67026
  tooltipActiveUsers: "{count} utilisateurs actifs"
66902
67027
  };
66903
67028
  var analyticsAnalyticsAuditLogStats$2 = {
67029
+ scopeAgent: "Agent",
67030
+ scopePlatform: "Plateforme",
67031
+ scopeAgentHint: "Modifications de configuration de cet agent.",
67032
+ scopePlatformHint: "Modifications et événements de sécurité de la plateforme.",
66904
67033
  noPermission: "Vous n'avez pas la permission de consulter les journaux d'audit.",
66905
67034
  searchForUser: "Rechercher un utilisateur",
66906
67035
  searchUserPlaceholder: "Rechercher un utilisateur...",
@@ -66937,7 +67066,11 @@ var analyticsAnalyticsCourseDetail$2 = {
66937
67066
  paginationPreviousPage: "Aller à la page précédente",
66938
67067
  paginationGoToPage: "Aller à la page {page}",
66939
67068
  paginationNextPage: "Aller à la page suivante",
66940
- paginationLastPage: "Aller à la dernière page"
67069
+ paginationLastPage: "Aller à la dernière page",
67070
+ backToCourses: "Retour aux cours",
67071
+ activeEnrollmentsDescription: "Apprenants inscrits à ce cours qui ne l’ont pas encore terminé.",
67072
+ completedEnrollmentsDescription: "Apprenants ayant satisfait à toutes les exigences de ce cours.",
67073
+ enrolledUsersDescription: "Chaque apprenant de ce cours avec sa progression, sa note et sa dernière activité."
66941
67074
  };
66942
67075
  var analyticsAnalyticsCourses$2 = {
66943
67076
  activeCourses: "Cours actifs",
@@ -66962,7 +67095,13 @@ var analyticsAnalyticsCourses$2 = {
66962
67095
  goToPage: "Aller à la page {page}",
66963
67096
  goToNextPage: "Aller à la page suivante",
66964
67097
  goToLastPage: "Aller à la dernière page",
66965
- noCoursesAvailable: "Aucun cours disponible"
67098
+ noCoursesAvailable: "Aucun cours disponible",
67099
+ activeCoursesDescription: "Cours ayant actuellement des apprenants inscrits et en progression.",
67100
+ totalCoursesDescription: "Tous les cours publiés sur ce tenant, actifs ou non.",
67101
+ enrollmentsDescription: "Nombre total d’inscriptions enregistrées sur l’ensemble des cours.",
67102
+ totalLearnersDescription: "Apprenants distincts inscrits à au moins un cours.",
67103
+ courseOvertimeDescription: "Temps passé par les apprenants dans les cours sur la période sélectionnée.",
67104
+ coursesTableDescription: "Chaque cours avec son ID et son nombre d’inscriptions. Sélectionnez une ligne pour ouvrir sa vue détaillée."
66966
67105
  };
66967
67106
  var analyticsAnalyticsFinancialStats$2 = {
66968
67107
  weeklyCosts: "Coûts hebdomadaires",
@@ -66990,7 +67129,14 @@ var analyticsAnalyticsFinancialStats$2 = {
66990
67129
  goToPreviousPage: "Aller à la page précédente",
66991
67130
  goToNextPage: "Aller à la page suivante",
66992
67131
  goToLastPage: "Aller à la dernière page",
66993
- paginationShowing: "Affichage de {from} à {to} sur {total} résultats"
67132
+ paginationShowing: "Affichage de {from} à {to} sur {total} résultats",
67133
+ weeklyCostsDescription: "Coût d’utilisation des modèles sur la dernière semaine, comparé à la semaine précédente.",
67134
+ monthlyCostsDescription: "Coût d’utilisation des modèles sur le dernier mois, comparé au mois précédent.",
67135
+ totalCostsDescription: "Coût total d’utilisation des modèles cumulé sur ce tenant à ce jour.",
67136
+ costPerDayDescription: "Dépense quotidienne en modèles, pour voir comment le coût suit l’utilisation.",
67137
+ costByProviderDescription: "Répartition de votre dépense entre les fournisseurs de modèles utilisés par vos agents.",
67138
+ costByLLMDescription: "Répartition de votre dépense entre les différents modèles, pour identifier les plus coûteux.",
67139
+ costPerUserDescription: "Dépense attribuée à chaque utilisateur, avec son nombre de sessions et sa dernière activité."
66994
67140
  };
66995
67141
  var analyticsAnalyticsMemoryStats$2 = {
66996
67142
  noPermission: "Vous n'avez pas l'autorisation de consulter les mémoires des utilisateurs.",
@@ -67021,7 +67167,8 @@ var analyticsAnalyticsMemoryStats$2 = {
67021
67167
  colMemory: "MÉMOIRE",
67022
67168
  colAgent: "AGENT",
67023
67169
  colCategory: "CATÉGORIE",
67024
- colCaptured: "CAPTURÉE"
67170
+ colCaptured: "CAPTURÉE",
67171
+ byCategoryDescription: "Répartition des mémoires capturées par catégorie selon les filtres actuels."
67025
67172
  };
67026
67173
  var analyticsAnalyticsMonetizationStats$2 = {
67027
67174
  totalRevenue: "Revenu total",
@@ -67061,7 +67208,15 @@ var analyticsAnalyticsMonetizationStats$2 = {
67061
67208
  activePricesCount: "{count} actif",
67062
67209
  statusActive: "Actif",
67063
67210
  statusDisabled: "Désactivé",
67064
- paywallCountTotal: "{count} élément{plural} au total"
67211
+ paywallCountTotal: "{count} élément{plural} au total",
67212
+ totalRevenueDescription: "Chiffre d’affaires brut généré par toutes les ventes finalisées.",
67213
+ totalSalesDescription: "Nombre d’achats finalisés sur l’ensemble des contenus payants.",
67214
+ activePaywallsDescription: "Paywalls actuellement configurés et activés sur ce tenant.",
67215
+ totalSubscribersDescription: "Personnes détenant un abonnement, tous statuts confondus.",
67216
+ subscribersByStatusDescription: "Répartition des abonnés entre les statuts actif, essai, annulé et impayé.",
67217
+ paywallsByTypeDescription: "Répartition de vos paywalls selon le type de contenu protégé, par exemple agents et cours.",
67218
+ subscribersTableDescription: "Chaque abonné avec le contenu, le forfait, le montant et le statut de son abonnement.",
67219
+ paywallsTableDescription: "Chaque paywall configuré avec son type, ses tarifs et son état d’activation."
67065
67220
  };
67066
67221
  var analyticsAnalyticsOverview$2 = {
67067
67222
  messages: "Messages",
@@ -67074,7 +67229,14 @@ var analyticsAnalyticsOverview$2 = {
67074
67229
  topicDetailsFor: "Détails du sujet pour {label}",
67075
67230
  messagesLabel: "Messages :",
67076
67231
  activeUsersFor: "Utilisateurs actifs pour {label}",
67077
- activeUsersLabel: "Utilisateurs actifs :"
67232
+ activeUsersLabel: "Utilisateurs actifs :",
67233
+ messagesDescription: "Nombre total de messages échangés entre les utilisateurs et vos agents sur la période sélectionnée.",
67234
+ activeUsersDescription: "Utilisateurs uniques ayant interagi avec un agent sur la période sélectionnée.",
67235
+ topicsDescription: "Sujets distincts abordés avec vos agents sur la période sélectionnée.",
67236
+ conversationsDescription: "Nombre de fils de conversation distincts démarrés sur la période sélectionnée.",
67237
+ sessionsChartDescription: "Sessions démarrées au fil du temps, pour repérer les pics et les creux d’utilisation.",
67238
+ topicsChartDescription: "Les sujets les plus abordés, classés selon le nombre de messages générés.",
67239
+ activeUsersChartDescription: "Utilisateurs actifs uniques par jour, pour suivre l’évolution de l’engagement."
67078
67240
  };
67079
67241
  var analyticsAnalyticsProgramDetail$2 = {
67080
67242
  backAriaLabel: "Retour à la liste des programmes",
@@ -67102,7 +67264,12 @@ var analyticsAnalyticsProgramDetail$2 = {
67102
67264
  paginationPreviousPage: "Aller à la page précédente",
67103
67265
  paginationGoToPage: "Aller à la page {page}",
67104
67266
  paginationNextPage: "Aller à la page suivante",
67105
- paginationLastPage: "Aller à la dernière page"
67267
+ paginationLastPage: "Aller à la dernière page",
67268
+ backButton: "Retour aux programmes",
67269
+ statTotalEnrollmentsDescription: "Tous les apprenants jamais inscrits à ce programme.",
67270
+ statActiveEnrollmentsDescription: "Apprenants inscrits à ce programme qui ne l’ont pas encore terminé.",
67271
+ statCompletedEnrollmentsDescription: "Apprenants ayant satisfait à toutes les exigences de ce programme.",
67272
+ enrolledUsersDescription: "Chaque apprenant de ce programme avec sa progression, sa note et sa dernière activité."
67106
67273
  };
67107
67274
  var analyticsAnalyticsPrograms$2 = {
67108
67275
  activePrograms: "Programmes actifs",
@@ -67126,7 +67293,13 @@ var analyticsAnalyticsPrograms$2 = {
67126
67293
  goToPage: "Aller à la page {page}",
67127
67294
  goToNextPage: "Aller à la page suivante",
67128
67295
  goToLastPage: "Aller à la dernière page",
67129
- noProgramsAvailable: "Aucun programme disponible"
67296
+ noProgramsAvailable: "Aucun programme disponible",
67297
+ activeProgramsDescription: "Programmes ayant actuellement des apprenants inscrits et en progression.",
67298
+ totalProgramsDescription: "Tous les programmes publiés sur ce tenant, actifs ou non.",
67299
+ enrollmentsDescription: "Nombre total d’inscriptions enregistrées sur l’ensemble des programmes.",
67300
+ totalLearnersDescription: "Apprenants distincts inscrits à au moins un programme.",
67301
+ programOvertimeDescription: "Temps passé par les apprenants dans les programmes sur la période sélectionnée.",
67302
+ programsTableDescription: "Chaque programme avec son ID. Sélectionnez une ligne pour ouvrir sa vue détaillée."
67130
67303
  };
67131
67304
  var analyticsAnalyticsReports$2 = {
67132
67305
  failedToLoadReportForEditing: "Impossible de charger le rapport pour modification. Téléchargement en cours.",
@@ -67168,7 +67341,13 @@ var analyticsAnalyticsTopicsStats$2 = {
67168
67341
  outOfFive: "/ 5",
67169
67342
  topicsDetails: "Détails des sujets",
67170
67343
  topicDetailsForLabel: "Détails du sujet pour {label}",
67171
- messagesColon: "Messages :"
67344
+ messagesColon: "Messages :",
67345
+ topicsDescription: "Sujets distincts abordés dans les conversations ce mois-ci.",
67346
+ conversationsDescription: "Fils de conversation démarrés ce mois-ci.",
67347
+ messagesDescription: "Messages échangés ce mois-ci, toutes conversations confondues.",
67348
+ conversationsChartDescription: "Conversations démarrées au fil du temps, pour suivre les tendances d’engagement.",
67349
+ averageRatingDescription: "Note moyenne attribuée par les utilisateurs aux réponses de l’agent au fil du temps, sur une échelle de 1 à 5.",
67350
+ topicsDetailsDescription: "Sujets classés par volume de messages, pour voir ce que les utilisateurs demandent le plus."
67172
67351
  };
67173
67352
  var analyticsAnalyticsTranscriptsStats$2 = {
67174
67353
  justNow: "À l'instant",
@@ -67223,7 +67402,10 @@ var analyticsAnalyticsTranscriptsStats$2 = {
67223
67402
  srGoToLastPage: "Aller à la dernière page",
67224
67403
  none: "aucune",
67225
67404
  loading: "Chargement...",
67226
- paginationInfo: "Page {currentPage} sur {totalPages} • {totalRecords} enregistrements au total"
67405
+ paginationInfo: "Page {currentPage} sur {totalPages} • {totalRecords} enregistrements au total",
67406
+ avgMessagesPerConversationDescription: "Nombre de messages d’une conversation type, révélant la profondeur des échanges.",
67407
+ avgCostPerConversationDescription: "Coût d’utilisation des modèles pour une conversation type.",
67408
+ avgRatingDescription: "Note moyenne attribuée par les utilisateurs à leurs conversations, sur une échelle de 1 à 5."
67227
67409
  };
67228
67410
  var analyticsAnalyticsUsersStats$2 = {
67229
67411
  usersLoggedInNow: "Utilisateurs connectés en ce moment",
@@ -67251,7 +67433,13 @@ var analyticsAnalyticsUsersStats$2 = {
67251
67433
  justNow: "À l'instant",
67252
67434
  minutesAgo: "il y a {count} min",
67253
67435
  hoursAgo: "il y a {count} h",
67254
- daysAgo: "il y a {count} j"
67436
+ daysAgo: "il y a {count} j",
67437
+ usersLoggedInNowDescription: "Utilisateurs ayant une session ouverte en ce moment.",
67438
+ usersLoggedInPast30DaysDescription: "Utilisateurs uniques s’étant connectés au moins une fois au cours des 30 derniers jours.",
67439
+ totalRegisteredUsersDescription: "Tous les comptes utilisateur enregistrés sur ce tenant, actifs ou non.",
67440
+ activeUsersChartDescription: "Utilisateurs actifs uniques par jour, pour suivre l’évolution de l’engagement.",
67441
+ accessTimesDescription: "Les moments où les utilisateurs sont les plus actifs, par jour de la semaine et par heure.",
67442
+ userDetailsDescription: "Détail par utilisateur du volume de messages et de la dernière activité. Recherchez pour trouver un utilisateur précis."
67255
67443
  };
67256
67444
  var analyticsGroupsFilterDropdown$2 = {
67257
67445
  filterByGroups: "Filtrer par groupes",
@@ -68123,7 +68311,10 @@ var clawSandboxAgentSkills$2 = {
68123
68311
  tabsAriaLabel: "Compétences",
68124
68312
  tabAgentSkills: "Compétences de l'agent",
68125
68313
  tabAvailableSkills: "Compétences disponibles",
68126
- addedBadge: "Ajoutée"
68314
+ addedBadge: "Ajoutée",
68315
+ effectiveHeading: "Compétences de cet agent",
68316
+ catalogHeading: "Compétences disponibles",
68317
+ resourcesItemLabel: "ressources"
68127
68318
  };
68128
68319
  var clawSandboxHelpers$2 = {
68129
68320
  unknown: "Inconnu",
@@ -72342,6 +72533,81 @@ var skillsTabLabels$2 = {
72342
72533
  notBaseAgent: "Les compétences ne sont disponibles que pour les agents de base.",
72343
72534
  loading: "Chargement..."
72344
72535
  };
72536
+ var analyticsAnalyticsPlatformAuditLog$2 = {
72537
+ eventTypeLabel: "Type d'événement",
72538
+ allEventTypes: "Tous les types d'événement",
72539
+ actionLabel: "Action",
72540
+ allActions: "Toutes les actions",
72541
+ actorUsernameLabel: "Nom d'utilisateur de l'auteur",
72542
+ actorUsernamePlaceholder: "Filtrer par nom d'utilisateur",
72543
+ actorEmailLabel: "E-mail de l'auteur",
72544
+ actorEmailPlaceholder: "Filtrer par e-mail",
72545
+ pickDateRange: "Choisir une période",
72546
+ clearFilters: "Effacer les filtres",
72547
+ narrowSuggestion: "{count} entrées correspondent. Restreignez la période pour les consulter sans parcourir toutes les pages.",
72548
+ colTimestamp: "HORODATAGE ({timezone})",
72549
+ colEvent: "ÉVÉNEMENT / ACTION",
72550
+ colActor: "AUTEUR",
72551
+ colResource: "RESSOURCE",
72552
+ colIpAddress: "ADRESSE IP",
72553
+ colDetails: "Détails",
72554
+ kindModelChange: "Modification de modèle",
72555
+ kindEvent: "Événement de sécurité",
72556
+ viewDetails: "Voir",
72557
+ notAvailable: "—",
72558
+ loadError: "Une erreur s'est produite lors du chargement des journaux d'audit.",
72559
+ noEntries: "Aucune entrée d'audit n'a encore été enregistrée pour cette plateforme.",
72560
+ noFilteredEntries: "Aucune entrée d'audit ne correspond à ces filtres.",
72561
+ forbiddenTitle: "Vous n'avez pas l'autorisation de consulter les journaux d'audit de la plateforme.",
72562
+ forbiddenBody: "Demandez à un administrateur de la plateforme de vous accorder l'accès aux journaux d'audit.",
72563
+ resultSummary: "Affichage de {shown} entrées sur {total}."
72564
+ };
72565
+ var analyticsPlatformAuditLogDetailSheet$2 = {
72566
+ title: "Entrée d'audit",
72567
+ description: "Détail en lecture seule de cette entrée d'audit.",
72568
+ timestamp: "Horodatage",
72569
+ event: "Événement",
72570
+ action: "Action",
72571
+ actor: "Auteur",
72572
+ resource: "Ressource",
72573
+ ipAddress: "Adresse IP",
72574
+ entryId: "ID de l'entrée",
72575
+ changesHeading: "Modifications",
72576
+ metadataHeading: "Métadonnées",
72577
+ noMetadata: "Cet événement ne contient aucune métadonnée.",
72578
+ notAvailable: "—"
72579
+ };
72580
+ var analyticsAuditLogJsonView$2 = {
72581
+ "null": "null",
72582
+ empty: "(vide)",
72583
+ emptyString: "(chaîne vide)",
72584
+ emptyList: "(liste vide)",
72585
+ emptyObject: "(objet vide)",
72586
+ truncated: "(trop imbriqué pour être affiché)",
72587
+ itemCount: "{count, plural, one {# élément} other {# éléments}}",
72588
+ keyCount: "{count, plural, one {# clé} other {# clés}}",
72589
+ noPayload: "Aucune donnée supplémentaire enregistrée.",
72590
+ noChanges: "Aucune modification de champ enregistrée.",
72591
+ fieldColumn: "Champ",
72592
+ beforeColumn: "Avant",
72593
+ afterColumn: "Après"
72594
+ };
72595
+ var analyticsUsePlatformAuditLabels$2 = {
72596
+ eventTypeLogin: "Connexion",
72597
+ eventTypeLogout: "Déconnexion",
72598
+ eventTypeLoginFailed: "Échec de connexion",
72599
+ eventTypePasswordChange: "Changement de mot de passe",
72600
+ eventTypeExport: "Exportation",
72601
+ eventTypeDownloadFile: "Téléchargement de fichier",
72602
+ eventTypeApiCall: "Appel d'API",
72603
+ eventTypeViewStudentRecord: "Dossier étudiant consulté",
72604
+ eventTypeChangeGrade: "Modification de note",
72605
+ eventTypeAdminAction: "Action d'administration",
72606
+ actionCreate: "Créer",
72607
+ actionUpdate: "Mettre à jour",
72608
+ actionDelete: "Supprimer",
72609
+ actionAccess: "Accéder"
72610
+ };
72345
72611
  var fr = {
72346
72612
  accessTabAddAccess: accessTabAddAccess$2,
72347
72613
  accessTabLabels: accessTabLabels$2,
@@ -72599,7 +72865,11 @@ var fr = {
72599
72865
  profileApplicationsTab: profileApplicationsTab$2,
72600
72866
  profileApplicationsQuestionsEditor: profileApplicationsQuestionsEditor$2,
72601
72867
  slashSkillPicker: slashSkillPicker$2,
72602
- skillsTabLabels: skillsTabLabels$2
72868
+ skillsTabLabels: skillsTabLabels$2,
72869
+ analyticsAnalyticsPlatformAuditLog: analyticsAnalyticsPlatformAuditLog$2,
72870
+ analyticsPlatformAuditLogDetailSheet: analyticsPlatformAuditLogDetailSheet$2,
72871
+ analyticsAuditLogJsonView: analyticsAuditLogJsonView$2,
72872
+ analyticsUsePlatformAuditLabels: analyticsUsePlatformAuditLabels$2
72603
72873
  };
72604
72874
 
72605
72875
  var accessTabAddAccess$1 = {
@@ -73220,6 +73490,10 @@ var analyticsAccessTimeHeatmap$1 = {
73220
73490
  tooltipActiveUsers: "{count} usuarios activos"
73221
73491
  };
73222
73492
  var analyticsAnalyticsAuditLogStats$1 = {
73493
+ scopeAgent: "Agente",
73494
+ scopePlatform: "Plataforma",
73495
+ scopeAgentHint: "Cambios de configuración de este agente.",
73496
+ scopePlatformHint: "Cambios y eventos de seguridad de toda la plataforma.",
73223
73497
  noPermission: "No tienes permiso para ver los registros de auditoría.",
73224
73498
  searchForUser: "Buscar usuario",
73225
73499
  searchUserPlaceholder: "Buscar usuario...",
@@ -73256,7 +73530,11 @@ var analyticsAnalyticsCourseDetail$1 = {
73256
73530
  paginationPreviousPage: "Ir a la página anterior",
73257
73531
  paginationGoToPage: "Ir a la página {page}",
73258
73532
  paginationNextPage: "Ir a la página siguiente",
73259
- paginationLastPage: "Ir a la última página"
73533
+ paginationLastPage: "Ir a la última página",
73534
+ backToCourses: "Volver a los cursos",
73535
+ activeEnrollmentsDescription: "Estudiantes inscritos en este curso que aún no lo han terminado.",
73536
+ completedEnrollmentsDescription: "Estudiantes que han completado todos los requisitos de este curso.",
73537
+ enrolledUsersDescription: "Cada estudiante de este curso con su progreso, su calificación y su última actividad."
73260
73538
  };
73261
73539
  var analyticsAnalyticsCourses$1 = {
73262
73540
  activeCourses: "Cursos activos",
@@ -73281,7 +73559,13 @@ var analyticsAnalyticsCourses$1 = {
73281
73559
  goToPage: "Ir a la página {page}",
73282
73560
  goToNextPage: "Ir a la página siguiente",
73283
73561
  goToLastPage: "Ir a la última página",
73284
- noCoursesAvailable: "No hay cursos disponibles"
73562
+ noCoursesAvailable: "No hay cursos disponibles",
73563
+ activeCoursesDescription: "Cursos que actualmente tienen estudiantes inscritos y avanzando.",
73564
+ totalCoursesDescription: "Todos los cursos publicados en este tenant, activos o no.",
73565
+ enrollmentsDescription: "Total de inscripciones registradas en todos los cursos.",
73566
+ totalLearnersDescription: "Estudiantes distintos inscritos en al menos un curso.",
73567
+ courseOvertimeDescription: "Tiempo que los estudiantes dedicaron a los cursos durante el periodo seleccionado.",
73568
+ coursesTableDescription: "Cada curso con su ID y su número de inscripciones. Selecciona una fila para abrir su vista de detalle."
73285
73569
  };
73286
73570
  var analyticsAnalyticsFinancialStats$1 = {
73287
73571
  weeklyCosts: "Costos semanales",
@@ -73309,7 +73593,14 @@ var analyticsAnalyticsFinancialStats$1 = {
73309
73593
  goToPreviousPage: "Ir a la página anterior",
73310
73594
  goToNextPage: "Ir a la página siguiente",
73311
73595
  goToLastPage: "Ir a la última página",
73312
- paginationShowing: "Mostrando {from} a {to} de {total} resultados"
73596
+ paginationShowing: "Mostrando {from} a {to} de {total} resultados",
73597
+ weeklyCostsDescription: "Coste de uso de modelos de la última semana, comparado con la semana anterior.",
73598
+ monthlyCostsDescription: "Coste de uso de modelos del último mes, comparado con el mes anterior.",
73599
+ totalCostsDescription: "Todo el coste de uso de modelos acumulado en este tenant hasta la fecha.",
73600
+ costPerDayDescription: "Gasto diario en modelos, para ver cómo evoluciona el coste con el uso.",
73601
+ costByProviderDescription: "Cómo se reparte tu gasto entre los proveedores de modelos que usan tus agentes.",
73602
+ costByLLMDescription: "Cómo se reparte tu gasto entre modelos concretos, para ver cuáles cuestan más.",
73603
+ costPerUserDescription: "Gasto atribuido a cada usuario, con su número de sesiones y su última actividad."
73313
73604
  };
73314
73605
  var analyticsAnalyticsMemoryStats$1 = {
73315
73606
  noPermission: "No tienes permiso para ver los recuerdos de los usuarios.",
@@ -73340,7 +73631,8 @@ var analyticsAnalyticsMemoryStats$1 = {
73340
73631
  colMemory: "RECUERDO",
73341
73632
  colAgent: "AGENTE",
73342
73633
  colCategory: "CATEGORÍA",
73343
- colCaptured: "CAPTURADO"
73634
+ colCaptured: "CAPTURADO",
73635
+ byCategoryDescription: "Cómo se distribuyen las memorias capturadas entre categorías según los filtros actuales."
73344
73636
  };
73345
73637
  var analyticsAnalyticsMonetizationStats$1 = {
73346
73638
  totalRevenue: "Ingresos totales",
@@ -73380,7 +73672,15 @@ var analyticsAnalyticsMonetizationStats$1 = {
73380
73672
  activePricesCount: "{count} activo",
73381
73673
  statusActive: "Activo",
73382
73674
  statusDisabled: "Deshabilitado",
73383
- paywallCountTotal: "{count} elemento{plural} en total"
73675
+ paywallCountTotal: "{count} elemento{plural} en total",
73676
+ totalRevenueDescription: "Ingresos brutos obtenidos de todas las ventas completadas.",
73677
+ totalSalesDescription: "Número de compras completadas en todos los elementos de pago.",
73678
+ activePaywallsDescription: "Muros de pago configurados y activos actualmente en este tenant.",
73679
+ totalSubscribersDescription: "Personas con una suscripción, contadas en todos los estados.",
73680
+ subscribersByStatusDescription: "Cómo se reparten los suscriptores entre los estados activo, de prueba, cancelado y vencido.",
73681
+ paywallsByTypeDescription: "Cómo se reparten tus muros de pago entre los tipos de elementos que protegen, como agentes y cursos.",
73682
+ subscribersTableDescription: "Cada suscriptor con el elemento, el plan, el importe y el estado de su suscripción.",
73683
+ paywallsTableDescription: "Cada muro de pago configurado con su tipo, sus precios y si está activo actualmente."
73384
73684
  };
73385
73685
  var analyticsAnalyticsOverview$1 = {
73386
73686
  messages: "Mensajes",
@@ -73393,7 +73693,14 @@ var analyticsAnalyticsOverview$1 = {
73393
73693
  topicDetailsFor: "Detalles del tema para {label}",
73394
73694
  messagesLabel: "Mensajes:",
73395
73695
  activeUsersFor: "Usuarios activos para {label}",
73396
- activeUsersLabel: "Usuarios activos:"
73696
+ activeUsersLabel: "Usuarios activos:",
73697
+ messagesDescription: "Total de mensajes intercambiados entre los usuarios y tus agentes en el periodo seleccionado.",
73698
+ activeUsersDescription: "Usuarios únicos que interactuaron con un agente en el periodo seleccionado.",
73699
+ topicsDescription: "Temas distintos sobre los que se consultó a tus agentes en el periodo seleccionado.",
73700
+ conversationsDescription: "Número de conversaciones independientes iniciadas en el periodo seleccionado.",
73701
+ sessionsChartDescription: "Sesiones iniciadas a lo largo del tiempo, para detectar picos y caídas de uso.",
73702
+ topicsChartDescription: "Los temas más tratados, ordenados por la cantidad de mensajes que generó cada uno.",
73703
+ activeUsersChartDescription: "Usuarios activos únicos por día, para ver cómo cambia la participación con el tiempo."
73397
73704
  };
73398
73705
  var analyticsAnalyticsProgramDetail$1 = {
73399
73706
  backAriaLabel: "Volver a la lista de programas",
@@ -73421,7 +73728,12 @@ var analyticsAnalyticsProgramDetail$1 = {
73421
73728
  paginationPreviousPage: "Ir a la página anterior",
73422
73729
  paginationGoToPage: "Ir a la página {page}",
73423
73730
  paginationNextPage: "Ir a la página siguiente",
73424
- paginationLastPage: "Ir a la última página"
73731
+ paginationLastPage: "Ir a la última página",
73732
+ backButton: "Volver a programas",
73733
+ statTotalEnrollmentsDescription: "Todos los estudiantes que se han inscrito alguna vez en este programa.",
73734
+ statActiveEnrollmentsDescription: "Estudiantes inscritos en este programa que aún no lo han terminado.",
73735
+ statCompletedEnrollmentsDescription: "Estudiantes que han completado todos los requisitos de este programa.",
73736
+ enrolledUsersDescription: "Cada estudiante de este programa con su progreso, su calificación y su última actividad."
73425
73737
  };
73426
73738
  var analyticsAnalyticsPrograms$1 = {
73427
73739
  activePrograms: "Programas activos",
@@ -73445,7 +73757,13 @@ var analyticsAnalyticsPrograms$1 = {
73445
73757
  goToPage: "Ir a la página {page}",
73446
73758
  goToNextPage: "Ir a la página siguiente",
73447
73759
  goToLastPage: "Ir a la última página",
73448
- noProgramsAvailable: "No hay programas disponibles"
73760
+ noProgramsAvailable: "No hay programas disponibles",
73761
+ activeProgramsDescription: "Programas que actualmente tienen estudiantes inscritos y avanzando.",
73762
+ totalProgramsDescription: "Todos los programas publicados en este tenant, activos o no.",
73763
+ enrollmentsDescription: "Total de inscripciones registradas en todos los programas.",
73764
+ totalLearnersDescription: "Estudiantes distintos inscritos en al menos un programa.",
73765
+ programOvertimeDescription: "Tiempo que los estudiantes dedicaron a los programas durante el periodo seleccionado.",
73766
+ programsTableDescription: "Cada programa con su ID. Selecciona una fila para abrir su vista de detalle."
73449
73767
  };
73450
73768
  var analyticsAnalyticsReports$1 = {
73451
73769
  failedToLoadReportForEditing: "No se pudo cargar el informe para editarlo. Abriendo descarga en su lugar.",
@@ -73487,7 +73805,13 @@ var analyticsAnalyticsTopicsStats$1 = {
73487
73805
  outOfFive: "/ 5",
73488
73806
  topicsDetails: "Detalles de temas",
73489
73807
  topicDetailsForLabel: "Detalles del tema para {label}",
73490
- messagesColon: "Mensajes:"
73808
+ messagesColon: "Mensajes:",
73809
+ topicsDescription: "Temas distintos planteados en las conversaciones de este mes.",
73810
+ conversationsDescription: "Conversaciones iniciadas este mes.",
73811
+ messagesDescription: "Mensajes intercambiados este mes en todas las conversaciones.",
73812
+ conversationsChartDescription: "Conversaciones iniciadas a lo largo del tiempo, para seguir las tendencias de participación.",
73813
+ averageRatingDescription: "Valoración media de los usuarios sobre las respuestas del agente a lo largo del tiempo, en una escala de 1 a 5.",
73814
+ topicsDetailsDescription: "Temas ordenados por volumen de mensajes, para ver qué consultan más los usuarios."
73491
73815
  };
73492
73816
  var analyticsAnalyticsTranscriptsStats$1 = {
73493
73817
  justNow: "Ahora mismo",
@@ -73542,7 +73866,10 @@ var analyticsAnalyticsTranscriptsStats$1 = {
73542
73866
  srGoToLastPage: "Ir a la última página",
73543
73867
  none: "ninguna",
73544
73868
  loading: "Cargando...",
73545
- paginationInfo: "Página {currentPage} de {totalPages} • {totalRecords} registros en total"
73869
+ paginationInfo: "Página {currentPage} de {totalPages} • {totalRecords} registros en total",
73870
+ avgMessagesPerConversationDescription: "Cuántos mensajes contiene una conversación típica, lo que indica la profundidad de los intercambios.",
73871
+ avgCostPerConversationDescription: "Lo que cuesta una conversación típica en uso de modelos.",
73872
+ avgRatingDescription: "Valoración media que los usuarios dieron a sus conversaciones, en una escala de 1 a 5."
73546
73873
  };
73547
73874
  var analyticsAnalyticsUsersStats$1 = {
73548
73875
  usersLoggedInNow: "Usuarios conectados ahora mismo",
@@ -73570,7 +73897,13 @@ var analyticsAnalyticsUsersStats$1 = {
73570
73897
  justNow: "Ahora mismo",
73571
73898
  minutesAgo: "hace {count} min",
73572
73899
  hoursAgo: "hace {count} h",
73573
- daysAgo: "hace {count} días"
73900
+ daysAgo: "hace {count} días",
73901
+ usersLoggedInNowDescription: "Usuarios con una sesión abierta en este momento.",
73902
+ usersLoggedInPast30DaysDescription: "Usuarios únicos que iniciaron sesión al menos una vez en los últimos 30 días.",
73903
+ totalRegisteredUsersDescription: "Todas las cuentas de usuario registradas en este tenant, activas o no.",
73904
+ activeUsersChartDescription: "Usuarios activos únicos por día, para ver cómo cambia la participación con el tiempo.",
73905
+ accessTimesDescription: "Cuándo son más activos los usuarios, desglosado por día de la semana y hora del día.",
73906
+ userDetailsDescription: "Desglose por usuario del volumen de mensajes y la última actividad. Busca para encontrar a un usuario concreto."
73574
73907
  };
73575
73908
  var analyticsGroupsFilterDropdown$1 = {
73576
73909
  filterByGroups: "Filtrar por grupos",
@@ -74442,7 +74775,10 @@ var clawSandboxAgentSkills$1 = {
74442
74775
  tabsAriaLabel: "Habilidades",
74443
74776
  tabAgentSkills: "Habilidades del agente",
74444
74777
  tabAvailableSkills: "Habilidades disponibles",
74445
- addedBadge: "Añadida"
74778
+ addedBadge: "Añadida",
74779
+ effectiveHeading: "Habilidades de este agente",
74780
+ catalogHeading: "Habilidades disponibles",
74781
+ resourcesItemLabel: "recursos"
74446
74782
  };
74447
74783
  var clawSandboxHelpers$1 = {
74448
74784
  unknown: "Desconocido",
@@ -78661,6 +78997,81 @@ var skillsTabLabels$1 = {
78661
78997
  notBaseAgent: "Las habilidades solo están disponibles para los agentes base.",
78662
78998
  loading: "Cargando..."
78663
78999
  };
79000
+ var analyticsAnalyticsPlatformAuditLog$1 = {
79001
+ eventTypeLabel: "Tipo de evento",
79002
+ allEventTypes: "Todos los tipos de evento",
79003
+ actionLabel: "Acción",
79004
+ allActions: "Todas las acciones",
79005
+ actorUsernameLabel: "Nombre de usuario del actor",
79006
+ actorUsernamePlaceholder: "Filtrar por nombre de usuario",
79007
+ actorEmailLabel: "Correo del actor",
79008
+ actorEmailPlaceholder: "Filtrar por correo",
79009
+ pickDateRange: "Elige un rango de fechas",
79010
+ clearFilters: "Borrar filtros",
79011
+ narrowSuggestion: "{count} registros coinciden. Acota el rango de fechas para revisarlos sin recorrer todas las páginas.",
79012
+ colTimestamp: "FECHA Y HORA ({timezone})",
79013
+ colEvent: "EVENTO / ACCIÓN",
79014
+ colActor: "ACTOR",
79015
+ colResource: "RECURSO",
79016
+ colIpAddress: "DIRECCIÓN IP",
79017
+ colDetails: "Detalles",
79018
+ kindModelChange: "Cambio de modelo",
79019
+ kindEvent: "Evento de seguridad",
79020
+ viewDetails: "Ver",
79021
+ notAvailable: "—",
79022
+ loadError: "Se produjo un error al cargar los registros de auditoría.",
79023
+ noEntries: "Todavía no se han registrado entradas de auditoría para esta plataforma.",
79024
+ noFilteredEntries: "Ninguna entrada de auditoría coincide con estos filtros.",
79025
+ forbiddenTitle: "No tienes permiso para ver los registros de auditoría de la plataforma.",
79026
+ forbiddenBody: "Pide a un administrador de la plataforma que te dé acceso a los registros de auditoría.",
79027
+ resultSummary: "Mostrando {shown} de {total} entradas."
79028
+ };
79029
+ var analyticsPlatformAuditLogDetailSheet$1 = {
79030
+ title: "Entrada de auditoría",
79031
+ description: "Detalle de solo lectura de esta entrada de auditoría.",
79032
+ timestamp: "Fecha y hora",
79033
+ event: "Evento",
79034
+ action: "Acción",
79035
+ actor: "Actor",
79036
+ resource: "Recurso",
79037
+ ipAddress: "Dirección IP",
79038
+ entryId: "ID de entrada",
79039
+ changesHeading: "Cambios",
79040
+ metadataHeading: "Metadatos",
79041
+ noMetadata: "Este evento no incluye metadatos.",
79042
+ notAvailable: "—"
79043
+ };
79044
+ var analyticsAuditLogJsonView$1 = {
79045
+ "null": "null",
79046
+ empty: "(vacío)",
79047
+ emptyString: "(cadena vacía)",
79048
+ emptyList: "(lista vacía)",
79049
+ emptyObject: "(objeto vacío)",
79050
+ truncated: "(demasiado anidado para mostrarlo)",
79051
+ itemCount: "{count, plural, one {# elemento} other {# elementos}}",
79052
+ keyCount: "{count, plural, one {# clave} other {# claves}}",
79053
+ noPayload: "No se registraron datos adicionales.",
79054
+ noChanges: "No se registraron cambios de campos.",
79055
+ fieldColumn: "Campo",
79056
+ beforeColumn: "Antes",
79057
+ afterColumn: "Después"
79058
+ };
79059
+ var analyticsUsePlatformAuditLabels$1 = {
79060
+ eventTypeLogin: "Inicio de sesión",
79061
+ eventTypeLogout: "Cierre de sesión",
79062
+ eventTypeLoginFailed: "Inicio de sesión fallido",
79063
+ eventTypePasswordChange: "Cambio de contraseña",
79064
+ eventTypeExport: "Exportación",
79065
+ eventTypeDownloadFile: "Descarga de archivo",
79066
+ eventTypeApiCall: "Llamada a la API",
79067
+ eventTypeViewStudentRecord: "Expediente de estudiante consultado",
79068
+ eventTypeChangeGrade: "Cambio de calificación",
79069
+ eventTypeAdminAction: "Acción de administrador",
79070
+ actionCreate: "Crear",
79071
+ actionUpdate: "Actualizar",
79072
+ actionDelete: "Eliminar",
79073
+ actionAccess: "Acceder"
79074
+ };
78664
79075
  var es = {
78665
79076
  accessTabAddAccess: accessTabAddAccess$1,
78666
79077
  accessTabLabels: accessTabLabels$1,
@@ -78918,7 +79329,11 @@ var es = {
78918
79329
  profileApplicationsTab: profileApplicationsTab$1,
78919
79330
  profileApplicationsQuestionsEditor: profileApplicationsQuestionsEditor$1,
78920
79331
  slashSkillPicker: slashSkillPicker$1,
78921
- skillsTabLabels: skillsTabLabels$1
79332
+ skillsTabLabels: skillsTabLabels$1,
79333
+ analyticsAnalyticsPlatformAuditLog: analyticsAnalyticsPlatformAuditLog$1,
79334
+ analyticsPlatformAuditLogDetailSheet: analyticsPlatformAuditLogDetailSheet$1,
79335
+ analyticsAuditLogJsonView: analyticsAuditLogJsonView$1,
79336
+ analyticsUsePlatformAuditLabels: analyticsUsePlatformAuditLabels$1
78922
79337
  };
78923
79338
 
78924
79339
  var accessTabAddAccess = {
@@ -79539,6 +79954,10 @@ var analyticsAccessTimeHeatmap = {
79539
79954
  tooltipActiveUsers: "{count} 位活跃用户"
79540
79955
  };
79541
79956
  var analyticsAnalyticsAuditLogStats = {
79957
+ scopeAgent: "智能体",
79958
+ scopePlatform: "平台",
79959
+ scopeAgentHint: "此智能体的配置变更。",
79960
+ scopePlatformHint: "全平台的变更与安全事件。",
79542
79961
  noPermission: "您没有查看审计日志的权限。",
79543
79962
  searchForUser: "搜索用户",
79544
79963
  searchUserPlaceholder: "搜索用户...",
@@ -79575,7 +79994,11 @@ var analyticsAnalyticsCourseDetail = {
79575
79994
  paginationPreviousPage: "转到上一页",
79576
79995
  paginationGoToPage: "转到第 {page} 页",
79577
79996
  paginationNextPage: "转到下一页",
79578
- paginationLastPage: "转到最后一页"
79997
+ paginationLastPage: "转到最后一页",
79998
+ backToCourses: "返回课程",
79999
+ activeEnrollmentsDescription: "已报名本课程但尚未完成的学员数。",
80000
+ completedEnrollmentsDescription: "已完成本课程全部要求的学员数。",
80001
+ enrolledUsersDescription: "本课程的每位学员及其进度、成绩与最近活动。"
79579
80002
  };
79580
80003
  var analyticsAnalyticsCourses = {
79581
80004
  activeCourses: "活跃课程",
@@ -79600,7 +80023,13 @@ var analyticsAnalyticsCourses = {
79600
80023
  goToPage: "跳转到第 {page} 页",
79601
80024
  goToNextPage: "跳转到下一页",
79602
80025
  goToLastPage: "跳转到最后一页",
79603
- noCoursesAvailable: "暂无课程"
80026
+ noCoursesAvailable: "暂无课程",
80027
+ activeCoursesDescription: "当前有学员在读并持续学习的课程数。",
80028
+ totalCoursesDescription: "该租户下发布的全部课程,无论是否活跃。",
80029
+ enrollmentsDescription: "所有课程累计的报名总数。",
80030
+ totalLearnersDescription: "至少报名过一门课程的独立学员数。",
80031
+ courseOvertimeDescription: "所选时间段内学员在课程上花费的时间。",
80032
+ coursesTableDescription: "每门课程及其 ID 与报名人数。点击某行可打开详情视图。"
79604
80033
  };
79605
80034
  var analyticsAnalyticsFinancialStats = {
79606
80035
  weeklyCosts: "每周费用",
@@ -79628,7 +80057,14 @@ var analyticsAnalyticsFinancialStats = {
79628
80057
  goToPreviousPage: "转到上一页",
79629
80058
  goToNextPage: "转到下一页",
79630
80059
  goToLastPage: "转到最后一页",
79631
- paginationShowing: "显示第 {from} 至 {to} 条,共 {total} 条结果"
80060
+ paginationShowing: "显示第 {from} 至 {to} 条,共 {total} 条结果",
80061
+ weeklyCostsDescription: "过去一周的模型使用成本,并与前一周对比。",
80062
+ monthlyCostsDescription: "过去一个月的模型使用成本,并与前一个月对比。",
80063
+ totalCostsDescription: "该租户迄今累计的全部模型使用成本。",
80064
+ costPerDayDescription: "每日模型支出,便于了解成本与使用量的关系。",
80065
+ costByProviderDescription: "您的支出在各智能体所用模型供应商之间的分布。",
80066
+ costByLLMDescription: "您的支出在各个模型之间的分布,展示哪些模型花费最多。",
80067
+ costPerUserDescription: "归属到每位用户的支出,含其会话数与最近活动时间。"
79632
80068
  };
79633
80069
  var analyticsAnalyticsMemoryStats = {
79634
80070
  noPermission: "您没有查看用户记忆的权限。",
@@ -79659,7 +80095,8 @@ var analyticsAnalyticsMemoryStats = {
79659
80095
  colMemory: "记忆",
79660
80096
  colAgent: "智能体",
79661
80097
  colCategory: "类别",
79662
- colCaptured: "捕获时间"
80098
+ colCaptured: "捕获时间",
80099
+ byCategoryDescription: "在当前筛选条件下,已捕获记忆在各类别间的分布。"
79663
80100
  };
79664
80101
  var analyticsAnalyticsMonetizationStats = {
79665
80102
  totalRevenue: "总收入",
@@ -79699,7 +80136,15 @@ var analyticsAnalyticsMonetizationStats = {
79699
80136
  activePricesCount: "{count} 个活跃",
79700
80137
  statusActive: "活跃",
79701
80138
  statusDisabled: "已禁用",
79702
- paywallCountTotal: "共 {count} 个项目"
80139
+ paywallCountTotal: "共 {count} 个项目",
80140
+ totalRevenueDescription: "所有已完成交易带来的总收入。",
80141
+ totalSalesDescription: "所有付费内容上已完成的购买次数。",
80142
+ activePaywallsDescription: "该租户当前已配置并启用的付费墙数量。",
80143
+ totalSubscribersDescription: "持有订阅的人数,涵盖所有订阅状态。",
80144
+ subscribersByStatusDescription: "订阅者在活跃、试用、已取消和逾期各状态间的分布。",
80145
+ paywallsByTypeDescription: "付费墙按其保护的内容类型(如智能体和课程)的分布。",
80146
+ subscribersTableDescription: "每位订阅者及其订阅的内容、方案、金额与状态。",
80147
+ paywallsTableDescription: "每个已配置的付费墙及其类型、价格与当前是否启用。"
79703
80148
  };
79704
80149
  var analyticsAnalyticsOverview = {
79705
80150
  messages: "消息",
@@ -79712,7 +80157,14 @@ var analyticsAnalyticsOverview = {
79712
80157
  topicDetailsFor: "{label} 的话题详情",
79713
80158
  messagesLabel: "消息:",
79714
80159
  activeUsersFor: "{label} 的活跃用户",
79715
- activeUsersLabel: "活跃用户:"
80160
+ activeUsersLabel: "活跃用户:",
80161
+ messagesDescription: "所选时间段内用户与您的智能体之间交换的消息总数。",
80162
+ activeUsersDescription: "所选时间段内与智能体互动过的独立用户数。",
80163
+ topicsDescription: "所选时间段内用户向智能体咨询的不同主题数。",
80164
+ conversationsDescription: "所选时间段内开启的独立对话数。",
80165
+ sessionsChartDescription: "一段时间内开启的会话数,便于发现使用高峰与低谷。",
80166
+ topicsChartDescription: "讨论最多的主题,按各自产生的消息数排序。",
80167
+ activeUsersChartDescription: "每日独立活跃用户数,展示参与度随时间的变化。"
79716
80168
  };
79717
80169
  var analyticsAnalyticsProgramDetail = {
79718
80170
  backAriaLabel: "返回项目列表",
@@ -79740,7 +80192,12 @@ var analyticsAnalyticsProgramDetail = {
79740
80192
  paginationPreviousPage: "转到上一页",
79741
80193
  paginationGoToPage: "转到第 {page} 页",
79742
80194
  paginationNextPage: "转到下一页",
79743
- paginationLastPage: "转到最后一页"
80195
+ paginationLastPage: "转到最后一页",
80196
+ backButton: "返回项目",
80197
+ statTotalEnrollmentsDescription: "曾报名本项目的全部学员数。",
80198
+ statActiveEnrollmentsDescription: "已报名本项目但尚未完成的学员数。",
80199
+ statCompletedEnrollmentsDescription: "已完成本项目全部要求的学员数。",
80200
+ enrolledUsersDescription: "本项目的每位学员及其进度、成绩与最近活动。"
79744
80201
  };
79745
80202
  var analyticsAnalyticsPrograms = {
79746
80203
  activePrograms: "活跃项目",
@@ -79764,7 +80221,13 @@ var analyticsAnalyticsPrograms = {
79764
80221
  goToPage: "跳至第 {page} 页",
79765
80222
  goToNextPage: "跳至下一页",
79766
80223
  goToLastPage: "跳至最后一页",
79767
- noProgramsAvailable: "暂无可用项目"
80224
+ noProgramsAvailable: "暂无可用项目",
80225
+ activeProgramsDescription: "当前有学员在读并持续学习的项目数。",
80226
+ totalProgramsDescription: "该租户下发布的全部项目,无论是否活跃。",
80227
+ enrollmentsDescription: "所有项目累计的报名总数。",
80228
+ totalLearnersDescription: "至少报名过一个项目的独立学员数。",
80229
+ programOvertimeDescription: "所选时间段内学员在项目上花费的时间。",
80230
+ programsTableDescription: "每个项目及其 ID。点击某行可打开详情视图。"
79768
80231
  };
79769
80232
  var analyticsAnalyticsReports = {
79770
80233
  failedToLoadReportForEditing: "无法加载报告进行编辑,正在打开下载。",
@@ -79806,7 +80269,13 @@ var analyticsAnalyticsTopicsStats = {
79806
80269
  outOfFive: "/ 5",
79807
80270
  topicsDetails: "主题详情",
79808
80271
  topicDetailsForLabel: "{label} 的主题详情",
79809
- messagesColon: "消息:"
80272
+ messagesColon: "消息:",
80273
+ topicsDescription: "本月对话中出现的不同主题数。",
80274
+ conversationsDescription: "本月开启的对话数。",
80275
+ messagesDescription: "本月所有对话中交换的消息数。",
80276
+ conversationsChartDescription: "一段时间内开启的对话数,便于跟踪参与度趋势。",
80277
+ averageRatingDescription: "用户对智能体回复的平均评分随时间的变化,满分 5 分。",
80278
+ topicsDetailsDescription: "按消息量排序的主题,展示用户最常咨询的内容。"
79810
80279
  };
79811
80280
  var analyticsAnalyticsTranscriptsStats = {
79812
80281
  justNow: "刚刚",
@@ -79861,7 +80330,10 @@ var analyticsAnalyticsTranscriptsStats = {
79861
80330
  srGoToLastPage: "跳转至最后一页",
79862
80331
  none: "无",
79863
80332
  loading: "加载中...",
79864
- paginationInfo: "第 {currentPage} 页,共 {totalPages} 页 • 共 {totalRecords} 条记录"
80333
+ paginationInfo: "第 {currentPage} 页,共 {totalPages} 页 • 共 {totalRecords} 条记录",
80334
+ avgMessagesPerConversationDescription: "一次典型对话包含的消息数,反映交流的深入程度。",
80335
+ avgCostPerConversationDescription: "一次典型对话所产生的模型使用成本。",
80336
+ avgRatingDescription: "用户对其对话给出的平均评分,满分 5 分。"
79865
80337
  };
79866
80338
  var analyticsAnalyticsUsersStats = {
79867
80339
  usersLoggedInNow: "当前在线用户",
@@ -79889,7 +80361,13 @@ var analyticsAnalyticsUsersStats = {
79889
80361
  justNow: "刚刚",
79890
80362
  minutesAgo: "{count} 分钟前",
79891
80363
  hoursAgo: "{count} 小时前",
79892
- daysAgo: "{count} 天前"
80364
+ daysAgo: "{count} 天前",
80365
+ usersLoggedInNowDescription: "当前处于登录状态的用户数。",
80366
+ usersLoggedInPast30DaysDescription: "过去 30 天内至少登录过一次的独立用户数。",
80367
+ totalRegisteredUsersDescription: "该租户下注册的全部用户账号,无论是否活跃。",
80368
+ activeUsersChartDescription: "每日独立活跃用户数,展示参与度随时间的变化。",
80369
+ accessTimesDescription: "用户最活跃的时段,按星期几和小时细分。",
80370
+ userDetailsDescription: "按用户列出的消息量与最近活动。可搜索以查找特定用户。"
79893
80371
  };
79894
80372
  var analyticsGroupsFilterDropdown = {
79895
80373
  filterByGroups: "按组筛选",
@@ -80761,7 +81239,10 @@ var clawSandboxAgentSkills = {
80761
81239
  tabsAriaLabel: "技能",
80762
81240
  tabAgentSkills: "智能体技能",
80763
81241
  tabAvailableSkills: "可用技能",
80764
- addedBadge: "已添加"
81242
+ addedBadge: "已添加",
81243
+ effectiveHeading: "此智能体的技能",
81244
+ catalogHeading: "可用技能",
81245
+ resourcesItemLabel: "资源"
80765
81246
  };
80766
81247
  var clawSandboxHelpers = {
80767
81248
  unknown: "未知",
@@ -84980,6 +85461,81 @@ var skillsTabLabels = {
84980
85461
  notBaseAgent: "技能仅适用于基础智能体。",
84981
85462
  loading: "加载中..."
84982
85463
  };
85464
+ var analyticsAnalyticsPlatformAuditLog = {
85465
+ eventTypeLabel: "事件类型",
85466
+ allEventTypes: "所有事件类型",
85467
+ actionLabel: "操作",
85468
+ allActions: "所有操作",
85469
+ actorUsernameLabel: "操作者用户名",
85470
+ actorUsernamePlaceholder: "按用户名筛选",
85471
+ actorEmailLabel: "操作者邮箱",
85472
+ actorEmailPlaceholder: "按邮箱筛选",
85473
+ pickDateRange: "选择日期范围",
85474
+ clearFilters: "清除筛选",
85475
+ narrowSuggestion: "共有 {count} 条记录匹配。缩小日期范围可避免逐页翻阅。",
85476
+ colTimestamp: "时间 ({timezone})",
85477
+ colEvent: "事件 / 操作",
85478
+ colActor: "操作者",
85479
+ colResource: "资源",
85480
+ colIpAddress: "IP 地址",
85481
+ colDetails: "详情",
85482
+ kindModelChange: "数据变更",
85483
+ kindEvent: "安全事件",
85484
+ viewDetails: "查看",
85485
+ notAvailable: "—",
85486
+ loadError: "加载审计日志时出错。",
85487
+ noEntries: "该平台尚未记录任何审计日志。",
85488
+ noFilteredEntries: "没有符合这些筛选条件的审计日志。",
85489
+ forbiddenTitle: "您没有查看平台审计日志的权限。",
85490
+ forbiddenBody: "请联系平台管理员为您开通审计日志访问权限。",
85491
+ resultSummary: "显示 {total} 条中的 {shown} 条。"
85492
+ };
85493
+ var analyticsPlatformAuditLogDetailSheet = {
85494
+ title: "审计记录",
85495
+ description: "该审计日志记录的只读详情。",
85496
+ timestamp: "时间",
85497
+ event: "事件",
85498
+ action: "操作",
85499
+ actor: "操作者",
85500
+ resource: "资源",
85501
+ ipAddress: "IP 地址",
85502
+ entryId: "记录 ID",
85503
+ changesHeading: "变更内容",
85504
+ metadataHeading: "元数据",
85505
+ noMetadata: "该事件没有元数据。",
85506
+ notAvailable: "—"
85507
+ };
85508
+ var analyticsAuditLogJsonView = {
85509
+ "null": "null",
85510
+ empty: "(空)",
85511
+ emptyString: "(空字符串)",
85512
+ emptyList: "(空列表)",
85513
+ emptyObject: "(空对象)",
85514
+ truncated: "(嵌套层级过深,无法显示)",
85515
+ itemCount: "{count} 项",
85516
+ keyCount: "{count} 个键",
85517
+ noPayload: "没有记录额外数据。",
85518
+ noChanges: "没有记录字段变更。",
85519
+ fieldColumn: "字段",
85520
+ beforeColumn: "变更前",
85521
+ afterColumn: "变更后"
85522
+ };
85523
+ var analyticsUsePlatformAuditLabels = {
85524
+ eventTypeLogin: "登录",
85525
+ eventTypeLogout: "登出",
85526
+ eventTypeLoginFailed: "登录失败",
85527
+ eventTypePasswordChange: "修改密码",
85528
+ eventTypeExport: "导出",
85529
+ eventTypeDownloadFile: "文件下载",
85530
+ eventTypeApiCall: "API 调用",
85531
+ eventTypeViewStudentRecord: "查看学生记录",
85532
+ eventTypeChangeGrade: "成绩变更",
85533
+ eventTypeAdminAction: "管理员操作",
85534
+ actionCreate: "创建",
85535
+ actionUpdate: "更新",
85536
+ actionDelete: "删除",
85537
+ actionAccess: "访问"
85538
+ };
84983
85539
  var zh = {
84984
85540
  accessTabAddAccess: accessTabAddAccess,
84985
85541
  accessTabLabels: accessTabLabels,
@@ -85237,7 +85793,11 @@ var zh = {
85237
85793
  profileApplicationsTab: profileApplicationsTab,
85238
85794
  profileApplicationsQuestionsEditor: profileApplicationsQuestionsEditor,
85239
85795
  slashSkillPicker: slashSkillPicker,
85240
- skillsTabLabels: skillsTabLabels
85796
+ skillsTabLabels: skillsTabLabels,
85797
+ analyticsAnalyticsPlatformAuditLog: analyticsAnalyticsPlatformAuditLog,
85798
+ analyticsPlatformAuditLogDetailSheet: analyticsPlatformAuditLogDetailSheet,
85799
+ analyticsAuditLogJsonView: analyticsAuditLogJsonView,
85800
+ analyticsUsePlatformAuditLabels: analyticsUsePlatformAuditLabels
85241
85801
  };
85242
85802
 
85243
85803
  /**
@@ -133855,7 +134415,7 @@ var objectCtorString = funcToString.call(Object);
133855
134415
  * _.isPlainObject(Object.create(null));
133856
134416
  * // => true
133857
134417
  */
133858
- function isPlainObject$2(value) {
134418
+ function isPlainObject$3(value) {
133859
134419
  if (!isObjectLike$1(value) || baseGetTag$1(value) != objectTag) {
133860
134420
  return false;
133861
134421
  }
@@ -133868,9 +134428,9 @@ function isPlainObject$2(value) {
133868
134428
  funcToString.call(Ctor) == objectCtorString;
133869
134429
  }
133870
134430
 
133871
- var isPlainObject_1 = isPlainObject$2;
134431
+ var isPlainObject_1 = isPlainObject$3;
133872
134432
 
133873
- var isPlainObject$1 = /*@__PURE__*/getDefaultExportFromCjs(isPlainObject_1);
134433
+ var isPlainObject$2 = /*@__PURE__*/getDefaultExportFromCjs(isPlainObject_1);
133874
134434
 
133875
134435
  var baseGetTag = _baseGetTag,
133876
134436
  isObjectLike = isObjectLike_1;
@@ -134087,7 +134647,7 @@ function Shape(_ref2) {
134087
134647
  shape = /*#__PURE__*/cloneElement(option, _objectSpread$h(_objectSpread$h({}, props), getPropsFromShapeOption(option)));
134088
134648
  } else if (isFunction$3(option)) {
134089
134649
  shape = option(props);
134090
- } else if (isPlainObject$1(option) && !isBoolean(option)) {
134650
+ } else if (isPlainObject$2(option) && !isBoolean(option)) {
134091
134651
  var nextProps = propTransformer(option, props);
134092
134652
  shape = /*#__PURE__*/React__default.createElement(ShapeSelector, {
134093
134653
  shapeType: shapeType,
@@ -141803,11 +142363,11 @@ function EnrolledUserProgressModal({ open, onOpenChange, username, userName, ema
141803
142363
  ];
141804
142364
  const currentGradePct = fractionToPct((_f = (_e = item === null || item === void 0 ? void 0 : item.edx_progress) === null || _e === void 0 ? void 0 : _e.course_grade) === null || _f === void 0 ? void 0 : _f.percent);
141805
142365
  const passingPct = getPassingPct((_h = (_g = item === null || item === void 0 ? void 0 : item.edx_progress) === null || _g === void 0 ? void 0 : _g.grading_policy) === null || _h === void 0 ? void 0 : _h.grade_range);
141806
- return (jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: jsxs(DialogContent, { className: "max-w-2xl max-h-[85vh] overflow-y-auto", "aria-label": "Enrolled user progress", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: userName || username || 'Learner progress' }), jsxs(DialogDescription, { children: [email ? `${email} · ` : '', resolvedName || (isProgram ? 'Program progress' : 'Course progress')] })] }), loading ? (jsx("div", { className: "flex items-center justify-center py-12", children: jsx("div", { className: "text-sm text-gray-500", children: "Loading..." }) })) : !item ? (jsx(EmptyStats, { title: "No progress data available" })) : (jsxs("div", { className: "space-y-6", children: [jsxs("div", { className: "relative mx-auto", style: { width: 220, height: 220 }, children: [jsx(ResponsiveContainer, { width: "100%", height: "100%", children: jsx(PieChart, { children: jsxs(Pie, { data: pieData, dataKey: "value", cx: "50%", cy: "50%", innerRadius: 75, outerRadius: 100, startAngle: 90, endAngle: -270, stroke: "none", isAnimationActive: false, children: [jsx(Cell, { fill: COMPLETED_COLOR }), jsx(Cell, { fill: REMAINING_COLOR })] }) }) }), jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center pointer-events-none", children: [jsxs("span", { className: "text-3xl font-bold text-gray-700", children: [percentage, "%"] }), jsx("span", { className: "text-sm text-gray-500", children: "completed" })] })] }), jsxs("div", { className: "divide-y divide-[oklch(0.922_0_0)]", children: [jsx(DetailRow, { label: "Status", children: jsx("span", { className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${((_j = item.completion) === null || _j === void 0 ? void 0 : _j.passed)
142366
+ return (jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: jsxs(DialogContent, { className: "max-w-2xl max-h-[85vh] overflow-y-auto", "aria-label": "Enrolled user progress", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: userName || username || 'Learner progress' }), jsxs(DialogDescription, { children: [email ? `${email} · ` : '', resolvedName || (isProgram ? 'Program progress' : 'Course progress')] })] }), loading ? (jsx("div", { className: "flex items-center justify-center py-12", children: jsx("div", { className: "text-sm text-gray-500", children: "Loading..." }) })) : !item ? (jsx(EmptyStats, { title: "No progress data available" })) : (jsxs("div", { className: "space-y-6", children: [jsxs("div", { className: "relative mx-auto", style: { width: 220, height: 220 }, children: [jsx(ResponsiveContainer, { width: "100%", height: "100%", children: jsx(PieChart, { children: jsxs(Pie, { data: pieData, dataKey: "value", cx: "50%", cy: "50%", innerRadius: 75, outerRadius: 100, startAngle: 90, endAngle: -270, stroke: "none", isAnimationActive: false, children: [jsx(Cell, { fill: COMPLETED_COLOR }), jsx(Cell, { fill: REMAINING_COLOR })] }) }) }), jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center pointer-events-none", children: [jsxs("span", { className: "text-3xl font-bold text-gray-700", children: [percentage, "%"] }), jsx("span", { className: "text-sm text-gray-500", children: "completed" })] })] }), jsxs("div", { className: "divide-y divide-[oklch(0.922_0_0)]", children: [jsx(DetailRow$1, { label: "Status", children: jsx("span", { className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${((_j = item.completion) === null || _j === void 0 ? void 0 : _j.passed)
141807
142367
  ? 'bg-green-50 text-green-700'
141808
- : 'bg-gray-100 text-gray-600'}`, children: ((_k = item.completion) === null || _k === void 0 ? void 0 : _k.passed) ? 'Passed' : 'Not passed' }) }), jsx(DetailRow, { label: "Passed on", children: formatDate$2((_l = item.completion) === null || _l === void 0 ? void 0 : _l.passed_date) }), jsx(DetailRow, { label: "Time spent", children: item.time_spent || '—' }), jsx(DetailRow, { label: "Enrollment date", children: formatDate$2((_o = (_m = item.enrollment) === null || _m === void 0 ? void 0 : _m.started) !== null && _o !== void 0 ? _o : (_p = item.enrollment) === null || _p === void 0 ? void 0 : _p.created) })] }), ((_s = (_r = (_q = item.edx_progress) === null || _q === void 0 ? void 0 : _q.grading_policy) === null || _r === void 0 ? void 0 : _r.assignment_policies) === null || _s === void 0 ? void 0 : _s.length) ? (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "rounded-lg border p-4", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("h4", { className: "text-sm font-semibold text-gray-900", children: "Grades" }), jsx("p", { className: "text-xs text-gray-500", children: "This represents the weighted grade against the grade needed to pass this course." }), jsx(GradeBar, { currentPct: currentGradePct, passingPct: passingPct })] }), jsxs("div", { className: "flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-4 py-3", children: [jsx(TriangleAlert, { className: "mt-0.5 h-4 w-4 shrink-0 text-amber-600" }), jsxs("span", { className: "text-sm font-medium text-gray-800", children: ["A weighted grade of ", passingPct, "% is required to pass in this course"] })] }), jsxs("div", { className: "rounded-lg border p-4 space-y-3", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("h4", { className: "text-sm font-semibold text-gray-900", children: "Grade summary" }), jsx("div", { className: "overflow-x-auto", children: jsxs("table", { className: "w-full border-collapse text-sm", children: [jsx("thead", { children: jsxs("tr", { className: "bg-amber-50 text-[11px] uppercase tracking-wide text-gray-600", children: [jsx("th", { className: "px-3 py-2 text-left font-medium", children: "Assignment type" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Weight" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Grade" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Weighted grade" })] }) }), jsxs("tbody", { children: [gradeSummary === null || gradeSummary === void 0 ? void 0 : gradeSummary.rows.map((row, index) => (jsxs("tr", { className: index % 2 === 0 ? '' : 'bg-gray-50', children: [jsxs("td", { className: "px-3 py-2 text-gray-800", children: [row.type, row.footnote ? (jsx("sup", { className: "ml-0.5 text-amber-500", children: row.footnote })) : null] }), jsxs("td", { className: "px-3 py-2 text-right text-gray-700", children: [row.weightPct, "%"] }), jsxs("td", { className: "px-3 py-2 text-right text-gray-700", children: [row.gradePct, "%"] }), jsxs("td", { className: "px-3 py-2 text-right font-semibold text-amber-600", children: [row.weightedGradePct, "%"] })] }, row.type))), jsxs("tr", { className: "border-l-2 border-amber-400 bg-amber-50", children: [jsx("td", { className: "px-3 py-2 font-medium text-gray-800", colSpan: 3, children: "Current weighted grade summary" }), jsxs("td", { className: "px-3 py-2 text-right font-bold text-amber-600", children: [currentGradePct, "%"] })] })] })] }) }), gradeSummary && gradeSummary.footnotes.length > 0 ? (jsx("div", { className: "space-y-1", children: gradeSummary.footnotes.map((note, index) => (jsxs("p", { className: "text-xs text-gray-500", children: [jsx("sup", { className: "text-amber-500", children: index + 1 }), " ", note] }, note))) })) : null] })] })) : null] }))] }) }));
142368
+ : 'bg-gray-100 text-gray-600'}`, children: ((_k = item.completion) === null || _k === void 0 ? void 0 : _k.passed) ? 'Passed' : 'Not passed' }) }), jsx(DetailRow$1, { label: "Passed on", children: formatDate$2((_l = item.completion) === null || _l === void 0 ? void 0 : _l.passed_date) }), jsx(DetailRow$1, { label: "Time spent", children: item.time_spent || '—' }), jsx(DetailRow$1, { label: "Enrollment date", children: formatDate$2((_o = (_m = item.enrollment) === null || _m === void 0 ? void 0 : _m.started) !== null && _o !== void 0 ? _o : (_p = item.enrollment) === null || _p === void 0 ? void 0 : _p.created) })] }), ((_s = (_r = (_q = item.edx_progress) === null || _q === void 0 ? void 0 : _q.grading_policy) === null || _r === void 0 ? void 0 : _r.assignment_policies) === null || _s === void 0 ? void 0 : _s.length) ? (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "rounded-lg border p-4", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("h4", { className: "text-sm font-semibold text-gray-900", children: "Grades" }), jsx("p", { className: "text-xs text-gray-500", children: "This represents the weighted grade against the grade needed to pass this course." }), jsx(GradeBar, { currentPct: currentGradePct, passingPct: passingPct })] }), jsxs("div", { className: "flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-4 py-3", children: [jsx(TriangleAlert, { className: "mt-0.5 h-4 w-4 shrink-0 text-amber-600" }), jsxs("span", { className: "text-sm font-medium text-gray-800", children: ["A weighted grade of ", passingPct, "% is required to pass in this course"] })] }), jsxs("div", { className: "rounded-lg border p-4 space-y-3", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("h4", { className: "text-sm font-semibold text-gray-900", children: "Grade summary" }), jsx("div", { className: "overflow-x-auto", children: jsxs("table", { className: "w-full border-collapse text-sm", children: [jsx("thead", { children: jsxs("tr", { className: "bg-amber-50 text-[11px] uppercase tracking-wide text-gray-600", children: [jsx("th", { className: "px-3 py-2 text-left font-medium", children: "Assignment type" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Weight" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Grade" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Weighted grade" })] }) }), jsxs("tbody", { children: [gradeSummary === null || gradeSummary === void 0 ? void 0 : gradeSummary.rows.map((row, index) => (jsxs("tr", { className: index % 2 === 0 ? '' : 'bg-gray-50', children: [jsxs("td", { className: "px-3 py-2 text-gray-800", children: [row.type, row.footnote ? (jsx("sup", { className: "ml-0.5 text-amber-500", children: row.footnote })) : null] }), jsxs("td", { className: "px-3 py-2 text-right text-gray-700", children: [row.weightPct, "%"] }), jsxs("td", { className: "px-3 py-2 text-right text-gray-700", children: [row.gradePct, "%"] }), jsxs("td", { className: "px-3 py-2 text-right font-semibold text-amber-600", children: [row.weightedGradePct, "%"] })] }, row.type))), jsxs("tr", { className: "border-l-2 border-amber-400 bg-amber-50", children: [jsx("td", { className: "px-3 py-2 font-medium text-gray-800", colSpan: 3, children: "Current weighted grade summary" }), jsxs("td", { className: "px-3 py-2 text-right font-bold text-amber-600", children: [currentGradePct, "%"] })] })] })] }) }), gradeSummary && gradeSummary.footnotes.length > 0 ? (jsx("div", { className: "space-y-1", children: gradeSummary.footnotes.map((note, index) => (jsxs("p", { className: "text-xs text-gray-500", children: [jsx("sup", { className: "text-amber-500", children: index + 1 }), " ", note] }, note))) })) : null] })] })) : null] }))] }) }));
141809
142369
  }
141810
- function DetailRow({ label, children }) {
142370
+ function DetailRow$1({ label, children }) {
141811
142371
  return (jsxs("div", { className: "flex items-center justify-between gap-4 py-2", children: [jsx("span", { className: "text-sm text-gray-500", children: label }), jsx("span", { className: "text-sm font-medium text-gray-900 text-right", children: children })] }));
141812
142372
  }
141813
142373
 
@@ -172842,7 +173402,7 @@ function inputRulesPlugin(props) {
172842
173402
  function getType(value) {
172843
173403
  return Object.prototype.toString.call(value).slice(8, -1);
172844
173404
  }
172845
- function isPlainObject(value) {
173405
+ function isPlainObject$1(value) {
172846
173406
  if (getType(value) !== "Object") {
172847
173407
  return false;
172848
173408
  }
@@ -172852,9 +173412,9 @@ function isPlainObject(value) {
172852
173412
  // src/utilities/mergeDeep.ts
172853
173413
  function mergeDeep(target, source) {
172854
173414
  const output = { ...target };
172855
- if (isPlainObject(target) && isPlainObject(source)) {
173415
+ if (isPlainObject$1(target) && isPlainObject$1(source)) {
172856
173416
  Object.keys(source).forEach((key) => {
172857
- if (isPlainObject(source[key]) && isPlainObject(target[key])) {
173417
+ if (isPlainObject$1(source[key]) && isPlainObject$1(target[key])) {
172858
173418
  output[key] = mergeDeep(target[key], source[key]);
172859
173419
  } else {
172860
173420
  output[key] = source[key];
@@ -185752,7 +186312,7 @@ const toTimeString = (value) => {
185752
186312
  return date.toISOString().slice(11, 16);
185753
186313
  };
185754
186314
  const DEFAULT_TIMEZONE = 'UTC';
185755
- const isValidTimeZone = (value) => {
186315
+ const isValidTimeZone$1 = (value) => {
185756
186316
  if (!value) {
185757
186317
  return false;
185758
186318
  }
@@ -185766,12 +186326,12 @@ const isValidTimeZone = (value) => {
185766
186326
  };
185767
186327
  const resolveTimezone = (...candidates) => {
185768
186328
  for (const candidate of candidates) {
185769
- if (isValidTimeZone(candidate)) {
186329
+ if (isValidTimeZone$1(candidate)) {
185770
186330
  return candidate;
185771
186331
  }
185772
186332
  }
185773
186333
  const localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
185774
- if (isValidTimeZone(localTimeZone)) {
186334
+ if (isValidTimeZone$1(localTimeZone)) {
185775
186335
  return localTimeZone;
185776
186336
  }
185777
186337
  return DEFAULT_TIMEZONE;
@@ -186894,7 +187454,20 @@ function ChatPrivacyToggle({ org, userId, mentor, className }) {
186894
187454
  className: "text-white font-semibold bg-gradient-to-r from-blue-600 to-blue-400 hover:from-blue-700 hover:to-blue-500 [text-shadow:0_1px_2px_rgba(0,0,0,0.35)] [&_svg]:[filter:drop-shadow(0_1px_1px_rgba(0,0,0,0.4))]", children: isDisablingChatHistory ? (jsxs(Fragment$1, { children: [jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }), t('chatPrivacyChatPrivacyToggle.enabling')] })) : (t('chatPrivacyChatPrivacyToggle.enablePrivateMode')) })] })] }) })] }));
186895
187455
  }
186896
187456
 
186897
- function StatCard({ title, value, percentage, loading = false, showDollarSign = false, }) {
187457
+ /**
187458
+ * The info icon that sits on every analytics card and, on hover or keyboard
187459
+ * focus, explains what the card measures. The description doubles as the
187460
+ * accessible name so screen readers get it without needing the hover.
187461
+ *
187462
+ * Uses the tooltip primitives directly rather than the shared `TooltipContent`
187463
+ * because analytics wants a light popover, while `TooltipContent` is the dark
187464
+ * `bg-primary` style the rest of the app relies on.
187465
+ */
187466
+ function CardInfoIcon({ title, description, className }) {
187467
+ return (jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("button", { type: "button", "aria-label": description, className: cn('shrink-0 cursor-help rounded p-1 text-[#898989] transition-colors hover:bg-gray-100 hover:text-[#38A1E5] focus-visible:ring-2 focus-visible:ring-[#38A1E5] focus-visible:outline-none', className), children: jsx(Info$3, { className: "h-4 w-4", "aria-hidden": "true" }) }) }), jsx(Portal$2, { children: jsxs(Content2$4, { "data-slot": "tooltip-content", side: "top", align: "center", sideOffset: 6, collisionPadding: 12, className: "animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 max-w-[260px] rounded-lg border border-[oklch(0.922_0_0)] bg-white p-3 shadow-lg", children: [title && (jsx("div", { "data-slot": "tooltip-title", className: "mb-1 text-sm font-semibold text-[#484848]", children: title })), jsx("p", { "data-slot": "tooltip-description", className: "text-sm leading-relaxed text-[#646464]", children: description })] }) })] }));
187468
+ }
187469
+
187470
+ function StatCard({ title, value, percentage, loading = false, showDollarSign = false, description, }) {
186898
187471
  const t = useT();
186899
187472
  let paragraph = jsx("p", { className: "text-sm text-[#898989]", children: t('analyticsStatCard.noChange') });
186900
187473
  if (!percentage) {
@@ -186907,9 +187480,9 @@ function StatCard({ title, value, percentage, loading = false, showDollarSign =
186907
187480
  paragraph = (jsxs("p", { className: "text-sm text-[#898989]", children: [jsxs("span", { className: "text-red-600 mr-1", children: [percentage, "%"] }), t('analyticsStatCard.comparedToLastMonth')] }));
186908
187481
  }
186909
187482
  if (loading) {
186910
- return (jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsStatCard.ariaLabelLoading', { title }), children: [jsx(Skeleton, { className: "h-4 w-24 mb-2" }), jsx(Skeleton, { className: "h-8 w-16 mb-2" }), jsx(Skeleton, { className: "h-4 w-32" })] }) }));
187483
+ return (jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsStatCard.ariaLabelLoading', { title }), children: [jsxs("div", { className: "flex items-start justify-between gap-2 mb-2", children: [jsx(Skeleton, { className: "h-4 w-24" }), jsx(Skeleton, { className: "h-6 w-6 rounded" })] }), jsx(Skeleton, { className: "h-8 w-16 mb-2" }), jsx(Skeleton, { className: "h-4 w-32" })] }) }));
186911
187484
  }
186912
- return (jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsStatCard.ariaLabel', { title }), children: [jsx("h3", { className: "text-sm font-medium text-[#898989] mb-2", children: title }), jsx("p", { className: "text-[28px] font-semibold text-[#484848] mb-2", "aria-label": t('analyticsStatCard.ariaLabelValue', { title }), children: showDollarSign ? `$${value}` : value }), paragraph] }) }));
187485
+ return (jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsStatCard.ariaLabel', { title }), children: [jsxs("div", { className: "flex items-start justify-between gap-2 mb-2", children: [jsx("h3", { className: "text-sm font-medium text-[#898989]", children: title }), description && (jsx(CardInfoIcon, { title: title, description: description, className: "-mt-1" }))] }), jsx("p", { className: "text-[28px] font-semibold text-[#484848] mb-2", "aria-label": t('analyticsStatCard.ariaLabelValue', { title }), children: showDollarSign ? `$${value}` : value }), paragraph] }) }));
186913
187486
  }
186914
187487
 
186915
187488
  const THEMES = { light: '', dark: '.dark' };
@@ -187109,8 +187682,8 @@ function TimeFilter() {
187109
187682
  : 'text-gray-500 hover:text-gray-700 hover:bg-gray-50 border border-gray-100 bg-white'}`, children: "90D" }), jsx(CustomDateRangePicker, {})] }));
187110
187683
  }
187111
187684
 
187112
- function ChartCardWrapper({ title, label, children, filters, setOutsideFilters, overflowAuto, height, }) {
187113
- return (jsx(ChartFiltersProvider, { initialFilters: filters, setOutsideFilters: setOutsideFilters, children: jsx(Card, { className: "w-full bg-white rounded-lg border border-gray-100 overflow-hidden shadow-sm", children: jsxs(CardContent, { className: "p-4", "aria-label": `${title} chart card`, children: [jsx("div", { className: "mb-6", children: jsxs("div", { className: "flex items-center justify-between mb-2", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: title }), jsx(TimeFilter, {})] }) }), jsx("div", { className: "w-full", style: { height: height || '350px' }, children: jsx(ChartContainer, { title: title, config: {
187685
+ function ChartCardWrapper({ title, label, children, filters, setOutsideFilters, overflowAuto, height, description, }) {
187686
+ return (jsx(ChartFiltersProvider, { initialFilters: filters, setOutsideFilters: setOutsideFilters, children: jsx(Card, { className: "w-full bg-white rounded-lg border border-gray-100 overflow-hidden shadow-sm", children: jsxs(CardContent, { className: "p-4", "aria-label": `${title} chart card`, children: [jsx("div", { className: "mb-6", children: jsxs("div", { className: "flex items-center justify-between mb-2", children: [jsxs("div", { className: "flex items-center gap-1", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: title }), description && jsx(CardInfoIcon, { title: title, description: description })] }), jsx(TimeFilter, {})] }) }), jsx("div", { className: "w-full", style: { height: height || '350px' }, children: jsx(ChartContainer, { title: title, config: {
187114
187687
  value: {
187115
187688
  label,
187116
187689
  color: '#38A1E5', // Reverted to original color
@@ -187123,7 +187696,7 @@ const ChartLoading = ({ title = 'Loading...' }) => {
187123
187696
  };
187124
187697
 
187125
187698
  // Utility function to format date to YYYY-MM-DD
187126
- const formatDateToYYYYMMDD$6 = (date) => {
187699
+ const formatDateToYYYYMMDD$7 = (date) => {
187127
187700
  if (!date)
187128
187701
  return undefined;
187129
187702
  return date.toISOString().split('T')[0];
@@ -187173,8 +187746,8 @@ const useOverview = ({ tenantKey, mentorId, usergroupIds, }) => {
187173
187746
  metric: 'active_users',
187174
187747
  platform_key: tenantKey,
187175
187748
  ...(usersStatsDateFilter.activeFilter === 'custom' && {
187176
- start_date: formatDateToYYYYMMDD$6((_g = usersStatsDateFilter.dateRange) === null || _g === void 0 ? void 0 : _g.startDate),
187177
- end_date: formatDateToYYYYMMDD$6((_h = usersStatsDateFilter.dateRange) === null || _h === void 0 ? void 0 : _h.endDate),
187749
+ start_date: formatDateToYYYYMMDD$7((_g = usersStatsDateFilter.dateRange) === null || _g === void 0 ? void 0 : _g.startDate),
187750
+ end_date: formatDateToYYYYMMDD$7((_h = usersStatsDateFilter.dateRange) === null || _h === void 0 ? void 0 : _h.endDate),
187178
187751
  }),
187179
187752
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187180
187753
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187183,8 +187756,8 @@ const useOverview = ({ tenantKey, mentorId, usergroupIds, }) => {
187183
187756
  date_filter: sessionStatsDateFilter.activeFilter || FILTER_30D,
187184
187757
  platform_key: tenantKey,
187185
187758
  ...(sessionStatsDateFilter.activeFilter === 'custom' && {
187186
- start_date: formatDateToYYYYMMDD$6((_j = sessionStatsDateFilter.dateRange) === null || _j === void 0 ? void 0 : _j.startDate),
187187
- end_date: formatDateToYYYYMMDD$6((_k = sessionStatsDateFilter.dateRange) === null || _k === void 0 ? void 0 : _k.endDate),
187759
+ start_date: formatDateToYYYYMMDD$7((_j = sessionStatsDateFilter.dateRange) === null || _j === void 0 ? void 0 : _j.startDate),
187760
+ end_date: formatDateToYYYYMMDD$7((_k = sessionStatsDateFilter.dateRange) === null || _k === void 0 ? void 0 : _k.endDate),
187188
187761
  }),
187189
187762
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187190
187763
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187193,8 +187766,8 @@ const useOverview = ({ tenantKey, mentorId, usergroupIds, }) => {
187193
187766
  date_filter: topicsDetailsStatsDateFilter.activeFilter || FILTER_30D,
187194
187767
  platform_key: tenantKey,
187195
187768
  ...(topicsDetailsStatsDateFilter.activeFilter === 'custom' && {
187196
- start_date: formatDateToYYYYMMDD$6((_l = topicsDetailsStatsDateFilter.dateRange) === null || _l === void 0 ? void 0 : _l.startDate),
187197
- end_date: formatDateToYYYYMMDD$6((_m = topicsDetailsStatsDateFilter.dateRange) === null || _m === void 0 ? void 0 : _m.endDate),
187769
+ start_date: formatDateToYYYYMMDD$7((_l = topicsDetailsStatsDateFilter.dateRange) === null || _l === void 0 ? void 0 : _l.startDate),
187770
+ end_date: formatDateToYYYYMMDD$7((_m = topicsDetailsStatsDateFilter.dateRange) === null || _m === void 0 ? void 0 : _m.endDate),
187198
187771
  }),
187199
187772
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187200
187773
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187234,7 +187807,7 @@ function AnalyticsOverview({ tenantKey, mentorId, selectedMentorId, usergroupIds
187234
187807
  const t = useT();
187235
187808
  const currentMentorId = selectedMentorId || mentorId;
187236
187809
  const { messageStat, topicStat, conversationStat, sessionStats, isLoadingAllStats, isLoadingUsersStats, isLoadingSessionStats, isLoadingTopicsDetailsStats, isLoadingActiveUsersStats, setSessionStatsDateFilter, usersStats, sessionStatsDateFilter, topicsDetailsStats, setTopicsDetailsStatsDateFilter, topicsDetailsStatsDateFilter, activeUsersStats, setUsersStatsDateFilter, usersStatsDateFilter, } = useOverview({ tenantKey, mentorId: currentMentorId, usergroupIds });
187237
- return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoadingAllStats, title: t('analyticsAnalyticsOverview.messages'), value: messageStat.stat, percentage: messageStat.percentage }), jsx(StatCard, { loading: isLoadingUsersStats, title: t('analyticsAnalyticsOverview.activeUsers'), value: (usersStats === null || usersStats === void 0 ? void 0 : usersStats.count) || 0, percentage: (usersStats === null || usersStats === void 0 ? void 0 : usersStats.percentage_change) || 0 }), jsx(StatCard, { loading: isLoadingAllStats, title: t('analyticsAnalyticsOverview.topics'), value: topicStat.stat, percentage: topicStat.percentage }), jsx(StatCard, { loading: isLoadingAllStats, title: t('analyticsAnalyticsOverview.conversations'), value: conversationStat.stat, percentage: conversationStat.percentage })] }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [jsx(ChartCardWrapper, { title: t('analyticsAnalyticsOverview.sessions'), label: t('analyticsAnalyticsOverview.sessions'), setOutsideFilters: setSessionStatsDateFilter, filters: sessionStatsDateFilter, children: isLoadingSessionStats ? (jsx(ChartLoading, {})) : ((_a = sessionStats === null || sessionStats === void 0 ? void 0 : sessionStats.points) === null || _a === void 0 ? void 0 : _a.length) && ((_b = sessionStats === null || sessionStats === void 0 ? void 0 : sessionStats.points) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (jsxs(LineChart, { data: ((_c = sessionStats === null || sessionStats === void 0 ? void 0 : sessionStats.points) === null || _c === void 0 ? void 0 : _c.map((point) => ({
187810
+ return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoadingAllStats, title: t('analyticsAnalyticsOverview.messages'), value: messageStat.stat, percentage: messageStat.percentage, description: t('analyticsAnalyticsOverview.messagesDescription') }), jsx(StatCard, { loading: isLoadingUsersStats, title: t('analyticsAnalyticsOverview.activeUsers'), value: (usersStats === null || usersStats === void 0 ? void 0 : usersStats.count) || 0, percentage: (usersStats === null || usersStats === void 0 ? void 0 : usersStats.percentage_change) || 0, description: t('analyticsAnalyticsOverview.activeUsersDescription') }), jsx(StatCard, { loading: isLoadingAllStats, title: t('analyticsAnalyticsOverview.topics'), value: topicStat.stat, percentage: topicStat.percentage, description: t('analyticsAnalyticsOverview.topicsDescription') }), jsx(StatCard, { loading: isLoadingAllStats, title: t('analyticsAnalyticsOverview.conversations'), value: conversationStat.stat, percentage: conversationStat.percentage, description: t('analyticsAnalyticsOverview.conversationsDescription') })] }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [jsx(ChartCardWrapper, { title: t('analyticsAnalyticsOverview.sessions'), label: t('analyticsAnalyticsOverview.sessions'), setOutsideFilters: setSessionStatsDateFilter, filters: sessionStatsDateFilter, description: t('analyticsAnalyticsOverview.sessionsChartDescription'), children: isLoadingSessionStats ? (jsx(ChartLoading, {})) : ((_a = sessionStats === null || sessionStats === void 0 ? void 0 : sessionStats.points) === null || _a === void 0 ? void 0 : _a.length) && ((_b = sessionStats === null || sessionStats === void 0 ? void 0 : sessionStats.points) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (jsxs(LineChart, { data: ((_c = sessionStats === null || sessionStats === void 0 ? void 0 : sessionStats.points) === null || _c === void 0 ? void 0 : _c.map((point) => ({
187238
187811
  date: formatDateToShortFormat$2(point.date, sessionStatsDateFilter.activeFilter === 'today'),
187239
187812
  value: point.value,
187240
187813
  }))) || [], margin: { top: 5, right: 5, left: 0, bottom: 5 }, children: [jsx(CartesianGrid, { strokeDasharray: "3 3", stroke: "#f0f0f0", vertical: false }), jsx(XAxis, { dataKey: "date", tick: { fontSize: 8, textAnchor: 'end' }, angle: -45, interval: Math.floor(Number((_d = sessionStats === null || sessionStats === void 0 ? void 0 : sessionStats.points) === null || _d === void 0 ? void 0 : _d.length) / 31) || 0 }), jsx(YAxis, { tick: { fontSize: 10 }, width: 30, allowDecimals: false }), jsx(Tooltip, { content: ({ active, payload, label }) => {
@@ -187248,7 +187821,7 @@ function AnalyticsOverview({ tenantKey, mentorId, selectedMentorId, usergroupIds
187248
187821
  stroke: '#38A1E5',
187249
187822
  strokeWidth: 2,
187250
187823
  fill: 'white',
187251
- } })] })) : (jsx(EmptyStats, {})) }), jsx(ChartCardWrapper, { title: t('analyticsAnalyticsOverview.topics'), label: t('analyticsAnalyticsOverview.topics'), filters: topicsDetailsStatsDateFilter, setOutsideFilters: setTopicsDetailsStatsDateFilter, children: isLoadingTopicsDetailsStats ? (jsx(ChartLoading, {})) : ((_e = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _e === void 0 ? void 0 : _e.length) && ((_f = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _f === void 0 ? void 0 : _f.length) > 0 ? (jsxs(BarChart, { data: (_g = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _g === void 0 ? void 0 : _g.map((result) => ({
187824
+ } })] })) : (jsx(EmptyStats, {})) }), jsx(ChartCardWrapper, { title: t('analyticsAnalyticsOverview.topics'), label: t('analyticsAnalyticsOverview.topics'), filters: topicsDetailsStatsDateFilter, setOutsideFilters: setTopicsDetailsStatsDateFilter, description: t('analyticsAnalyticsOverview.topicsChartDescription'), children: isLoadingTopicsDetailsStats ? (jsx(ChartLoading, {})) : ((_e = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _e === void 0 ? void 0 : _e.length) && ((_f = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _f === void 0 ? void 0 : _f.length) > 0 ? (jsxs(BarChart, { data: (_g = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _g === void 0 ? void 0 : _g.map((result) => ({
187252
187825
  topic: result.name,
187253
187826
  value: result.messages,
187254
187827
  })), layout: "vertical", margin: { top: 5, right: 30, left: 20, bottom: 5 }, children: [jsx(CartesianGrid, { strokeDasharray: "3 3", horizontal: true, vertical: false }), jsx(XAxis, { type: "number", tick: { fontSize: 10 }, domain: [0, 'dataMax'], allowDecimals: false }), jsx(YAxis, { dataKey: "topic", type: "category", tick: { fontSize: 10 }, interval: 0, width: 80 }), jsx(Tooltip, { content: ({ active, payload, label }) => {
@@ -187257,7 +187830,7 @@ function AnalyticsOverview({ tenantKey, mentorId, selectedMentorId, usergroupIds
187257
187830
  return null;
187258
187831
  const data = (_a = payload[0]) === null || _a === void 0 ? void 0 : _a.payload;
187259
187832
  return (jsxs("div", { className: "bg-background border border-border rounded-md p-3 shadow-lg z-50", role: "tooltip", "aria-label": t('analyticsAnalyticsOverview.topicDetailsFor', { label }), tabIndex: -1, style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("div", { className: "font-medium text-foreground mb-2 text-base", children: label }), jsx("div", { className: "space-y-2 text-sm", children: jsxs("div", { className: "flex justify-between items-center", children: [jsx("span", { className: "text-muted-foreground", children: t('analyticsAnalyticsOverview.messagesLabel') }), jsx("span", { className: "font-medium text-foreground", children: (_b = data === null || data === void 0 ? void 0 : data.value) === null || _b === void 0 ? void 0 : _b.toLocaleString() })] }) })] }));
187260
- }, cursor: { fill: 'rgba(0, 0, 0, 0.05)' }, wrapperStyle: { outline: 'none' } }), jsx(Bar, { dataKey: "value", fill: "#38A1E5", barSize: 20, radius: [0, 4, 4, 0] })] })) : (jsx(EmptyStats, {})) })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsOverview.activeUsers'), label: t('analyticsAnalyticsOverview.activeUsers'), filters: usersStatsDateFilter, setOutsideFilters: setUsersStatsDateFilter, children: isLoadingActiveUsersStats ? (jsx(ChartLoading, {})) : ((_h = activeUsersStats === null || activeUsersStats === void 0 ? void 0 : activeUsersStats.points) === null || _h === void 0 ? void 0 : _h.length) && ((_j = activeUsersStats === null || activeUsersStats === void 0 ? void 0 : activeUsersStats.points) === null || _j === void 0 ? void 0 : _j.length) > 0 ? (jsxs(BarChart, { data: (_k = activeUsersStats === null || activeUsersStats === void 0 ? void 0 : activeUsersStats.points) === null || _k === void 0 ? void 0 : _k.map((point) => ({
187833
+ }, cursor: { fill: 'rgba(0, 0, 0, 0.05)' }, wrapperStyle: { outline: 'none' } }), jsx(Bar, { dataKey: "value", fill: "#38A1E5", barSize: 20, radius: [0, 4, 4, 0] })] })) : (jsx(EmptyStats, {})) })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsOverview.activeUsers'), label: t('analyticsAnalyticsOverview.activeUsers'), filters: usersStatsDateFilter, setOutsideFilters: setUsersStatsDateFilter, description: t('analyticsAnalyticsOverview.activeUsersChartDescription'), children: isLoadingActiveUsersStats ? (jsx(ChartLoading, {})) : ((_h = activeUsersStats === null || activeUsersStats === void 0 ? void 0 : activeUsersStats.points) === null || _h === void 0 ? void 0 : _h.length) && ((_j = activeUsersStats === null || activeUsersStats === void 0 ? void 0 : activeUsersStats.points) === null || _j === void 0 ? void 0 : _j.length) > 0 ? (jsxs(BarChart, { data: (_k = activeUsersStats === null || activeUsersStats === void 0 ? void 0 : activeUsersStats.points) === null || _k === void 0 ? void 0 : _k.map((point) => ({
187261
187834
  date: formatDateToShortFormat$2(point.date, usersStatsDateFilter.activeFilter === 'today'),
187262
187835
  value: point.value,
187263
187836
  })), margin: { top: 5, right: 5, left: 0, bottom: 5 }, children: [jsx(CartesianGrid, { strokeDasharray: "3 3" }), jsx(XAxis, { dataKey: "date", tick: { fontSize: 8, textAnchor: 'end' }, angle: -45, interval: Math.floor(Number((_l = activeUsersStats === null || activeUsersStats === void 0 ? void 0 : activeUsersStats.points) === null || _l === void 0 ? void 0 : _l.length) / 90) || 0 }), jsx(YAxis, { width: 30, domain: [0, 'dataMax'], allowDecimals: false }), jsx(Tooltip, { content: ({ active, payload, label }) => {
@@ -187384,12 +187957,12 @@ function AnalyticsLayout({ children, currentPath, basePath, onTabChange, tabs =
187384
187957
  return;
187385
187958
  onTabChange(tabValue);
187386
187959
  };
187387
- return (jsxs("div", { className: "flex flex-col flex-1 min-h-0 h-full overflow-hidden overscroll-none bg-[#f5f7fb]", children: [jsx("div", { className: "p-6 pb-0", children: jsx("div", { className: "flex items-center justify-between mb-6", children: jsxs("div", { className: "flex items-center justify-between w-full overflow-x-auto", children: [jsx(Tabs, { className: "mb-6 bg-[#f5f7fb]", value: activeTab, children: jsx(TabsList, { className: "bg-[#f5f7fb]", children: tabs
187960
+ return (jsxs("div", { className: "flex flex-col flex-1 min-h-0 h-full overflow-hidden overscroll-none bg-[#f5f7fb]", children: [jsx("div", { className: "p-6 pb-0 pt-4 xs:pt-0", children: jsx("div", { className: "flex items-center justify-between mb-4 xs:mb-2", children: jsxs("div", { className: "flex items-center justify-between w-full overflow-x-auto", children: [jsx(Tabs, { className: "bg-[#f5f7fb]", value: activeTab, children: jsx(TabsList, { className: "bg-[#f5f7fb]", children: tabs
187388
187961
  .filter((tab) => !excludeTabs.includes(tab.value) && canAccessTab(tab.value))
187389
187962
  .map((tab) => {
187390
187963
  const isActive = activeTab === tab.value;
187391
187964
  return (jsx(TabsTrigger, { value: tab.value, className: cn(className, isActive && activeTabClassName), onClick: () => handleTabClick(tab.value), children: tab.label }, tab.value));
187392
- }) }) }), jsxs("div", { className: "flex items-center gap-4", children: [beforeDataReports, canAccessTab('reports') && (jsx(Tabs, { className: "mb-6 bg-[#f5f7fb]", value: activeTab, children: jsx(TabsList, { className: "bg-[#f5f7fb]", children: jsx(TabsTrigger, { value: "reports", className: cn(className, activeTab === 'reports' && activeTabClassName), onClick: () => handleTabClick('reports'), children: "Data Reports" }) }) }))] })] }) }) }), jsx("div", { className: "flex-1 overflow-auto overscroll-contain scrollbar-none px-6 pb-6 pt-0", children: isActiveTabAllowed ? children : null })] }));
187965
+ }) }) }), jsxs("div", { className: "flex items-center gap-4", children: [beforeDataReports, canAccessTab('reports') && (jsx(Tabs, { className: "bg-[#f5f7fb]", value: activeTab, children: jsx(TabsList, { className: "bg-[#f5f7fb]", children: jsx(TabsTrigger, { value: "reports", className: cn(className, activeTab === 'reports' && activeTabClassName), onClick: () => handleTabClick('reports'), children: "Data Reports" }) }) }))] })] }) }) }), jsx("div", { className: "flex-1 overflow-auto overscroll-contain scrollbar-none px-6 pb-6 pt-0", children: isActiveTabAllowed ? children : null })] }));
187393
187966
  }
187394
187967
 
187395
187968
  const accessTimeData = [
@@ -187457,7 +188030,7 @@ function AccessTimeHeatmap({ accessTimeData, loading, }) {
187457
188030
  }
187458
188031
 
187459
188032
  // Utility function to format date to YYYY-MM-DD
187460
- const formatDateToYYYYMMDD$5 = (date) => {
188033
+ const formatDateToYYYYMMDD$6 = (date) => {
187461
188034
  if (!date)
187462
188035
  return undefined;
187463
188036
  return date.toISOString().split('T')[0];
@@ -187497,8 +188070,8 @@ const useUsers = ({ tenantKey, mentorId, usergroupIds, }) => {
187497
188070
  metric: 'active_users',
187498
188071
  platform_key: tenantKey,
187499
188072
  ...(activeUsersStatsDateFilter.activeFilter === 'custom' && {
187500
- start_date: formatDateToYYYYMMDD$5((_a = activeUsersStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
187501
- end_date: formatDateToYYYYMMDD$5((_b = activeUsersStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
188073
+ start_date: formatDateToYYYYMMDD$6((_a = activeUsersStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
188074
+ end_date: formatDateToYYYYMMDD$6((_b = activeUsersStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
187502
188075
  }),
187503
188076
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187504
188077
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187507,8 +188080,8 @@ const useUsers = ({ tenantKey, mentorId, usergroupIds, }) => {
187507
188080
  date_filter: accessTimeHeatmapDateFilter.activeFilter || FILTER_30D,
187508
188081
  platform_key: tenantKey,
187509
188082
  ...(accessTimeHeatmapDateFilter.activeFilter === 'custom' && {
187510
- start_date: formatDateToYYYYMMDD$5((_c = accessTimeHeatmapDateFilter.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
187511
- end_date: formatDateToYYYYMMDD$5((_d = accessTimeHeatmapDateFilter.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
188083
+ start_date: formatDateToYYYYMMDD$6((_c = accessTimeHeatmapDateFilter.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
188084
+ end_date: formatDateToYYYYMMDD$6((_d = accessTimeHeatmapDateFilter.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
187512
188085
  }),
187513
188086
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187514
188087
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187517,8 +188090,8 @@ const useUsers = ({ tenantKey, mentorId, usergroupIds, }) => {
187517
188090
  date_filter: userDetailsStatsDateFilter.activeFilter || FILTER_30D,
187518
188091
  platform_key: tenantKey,
187519
188092
  ...(userDetailsStatsDateFilter.activeFilter === 'custom' && {
187520
- start_date: formatDateToYYYYMMDD$5((_e = userDetailsStatsDateFilter.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
187521
- end_date: formatDateToYYYYMMDD$5((_f = userDetailsStatsDateFilter.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
188093
+ start_date: formatDateToYYYYMMDD$6((_e = userDetailsStatsDateFilter.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
188094
+ end_date: formatDateToYYYYMMDD$6((_f = userDetailsStatsDateFilter.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
187522
188095
  }),
187523
188096
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187524
188097
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187613,7 +188186,7 @@ function AnalyticsUsersStats({ tenantKey, mentorId, selectedMentorId, usergroupI
187613
188186
  const t = useT();
187614
188187
  const currentMentorId = selectedMentorId || mentorId;
187615
188188
  const { registeredUsers, isLoadingRegisteredUsers, activeUsers, isLoadingActiveUsers, setActiveUsersStatsDateFilter, activeUsersStatsDateFilter, accessTimeHeatmap, isLoadingAccessTimeHeatmap, setAccessTimeHeatmapDateFilter, accessTimeHeatmapDateFilter, userDetailsStats, isLoadingUserDetailsStats, setUserDetailsStatsDateFilter, userDetailsStatsDateFilter, setUserDetailsStatsPage, userDetailsStatsSearch, handleSearchInputChange, currentlyActiveUsers, isLoadingCurrentlyActiveUsers, activeUsers30D, isLoadingActiveUsers30D, } = useUsers({ tenantKey, mentorId: currentMentorId, usergroupIds });
187616
- return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { title: t('analyticsAnalyticsUsersStats.usersLoggedInNow'), value: (currentlyActiveUsers === null || currentlyActiveUsers === void 0 ? void 0 : currentlyActiveUsers.count) || 0, loading: isLoadingCurrentlyActiveUsers }), jsx(StatCard, { title: t('analyticsAnalyticsUsersStats.usersLoggedInPast30Days'), value: (activeUsers30D === null || activeUsers30D === void 0 ? void 0 : activeUsers30D.count) || 0, loading: isLoadingActiveUsers30D }), jsx(StatCard, { title: t('analyticsAnalyticsUsersStats.totalRegisteredUsers'), value: (registeredUsers === null || registeredUsers === void 0 ? void 0 : registeredUsers.count) || 0, loading: isLoadingRegisteredUsers })] }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [jsx(ChartCardWrapper, { title: t('analyticsAnalyticsUsersStats.activeUsersTitle'), label: t('analyticsAnalyticsUsersStats.activeUsersLabel'), filters: activeUsersStatsDateFilter, setOutsideFilters: setActiveUsersStatsDateFilter, children: isLoadingActiveUsers ? (jsx(ChartLoading, {})) : ((_a = activeUsers === null || activeUsers === void 0 ? void 0 : activeUsers.points) === null || _a === void 0 ? void 0 : _a.length) && ((_b = activeUsers === null || activeUsers === void 0 ? void 0 : activeUsers.points) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (jsxs(BarChart, { data: (_c = activeUsers === null || activeUsers === void 0 ? void 0 : activeUsers.points) === null || _c === void 0 ? void 0 : _c.map((point) => ({
188189
+ return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { title: t('analyticsAnalyticsUsersStats.usersLoggedInNow'), value: (currentlyActiveUsers === null || currentlyActiveUsers === void 0 ? void 0 : currentlyActiveUsers.count) || 0, loading: isLoadingCurrentlyActiveUsers, description: t('analyticsAnalyticsUsersStats.usersLoggedInNowDescription') }), jsx(StatCard, { title: t('analyticsAnalyticsUsersStats.usersLoggedInPast30Days'), value: (activeUsers30D === null || activeUsers30D === void 0 ? void 0 : activeUsers30D.count) || 0, loading: isLoadingActiveUsers30D, description: t('analyticsAnalyticsUsersStats.usersLoggedInPast30DaysDescription') }), jsx(StatCard, { title: t('analyticsAnalyticsUsersStats.totalRegisteredUsers'), value: (registeredUsers === null || registeredUsers === void 0 ? void 0 : registeredUsers.count) || 0, loading: isLoadingRegisteredUsers, description: t('analyticsAnalyticsUsersStats.totalRegisteredUsersDescription') })] }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [jsx(ChartCardWrapper, { title: t('analyticsAnalyticsUsersStats.activeUsersTitle'), label: t('analyticsAnalyticsUsersStats.activeUsersLabel'), filters: activeUsersStatsDateFilter, setOutsideFilters: setActiveUsersStatsDateFilter, description: t('analyticsAnalyticsUsersStats.activeUsersChartDescription'), children: isLoadingActiveUsers ? (jsx(ChartLoading, {})) : ((_a = activeUsers === null || activeUsers === void 0 ? void 0 : activeUsers.points) === null || _a === void 0 ? void 0 : _a.length) && ((_b = activeUsers === null || activeUsers === void 0 ? void 0 : activeUsers.points) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (jsxs(BarChart, { data: (_c = activeUsers === null || activeUsers === void 0 ? void 0 : activeUsers.points) === null || _c === void 0 ? void 0 : _c.map((point) => ({
187617
188190
  date: formatDateToShortFormat$2(point.date, activeUsersStatsDateFilter.activeFilter === 'today'),
187618
188191
  value: point.value,
187619
188192
  })), margin: { top: 5, right: 5, left: 0, bottom: 5 }, children: [jsx(CartesianGrid, { strokeDasharray: "3 3" }), jsx(XAxis, { dataKey: "date", tick: { fontSize: 8, textAnchor: 'end' }, angle: -45, interval: Math.floor(Number((_d = activeUsers === null || activeUsers === void 0 ? void 0 : activeUsers.points) === null || _d === void 0 ? void 0 : _d.length) / 31) || 0 }), jsx(YAxis, { width: 30, domain: [0, 'dataMax'], allowDecimals: false }), jsx(Tooltip, { content: ({ active, payload, label }) => {
@@ -187622,7 +188195,7 @@ function AnalyticsUsersStats({ tenantKey, mentorId, selectedMentorId, usergroupI
187622
188195
  return null;
187623
188196
  const data = (_a = payload[0]) === null || _a === void 0 ? void 0 : _a.payload;
187624
188197
  return (jsxs("div", { className: "bg-background border border-border rounded-md p-3 shadow-lg z-50", role: "tooltip", "aria-label": t('analyticsAnalyticsUsersStats.activeUsersAriaLabel', { label }), tabIndex: -1, style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("div", { className: "font-medium text-foreground mb-2 text-base", children: label }), jsx("div", { className: "space-y-2 text-sm", children: jsxs("div", { className: "flex justify-between items-center", children: [jsx("span", { className: "text-muted-foreground", children: t('analyticsAnalyticsUsersStats.activeUsersTooltipLabel') }), jsx("span", { className: "font-medium text-foreground", children: (_b = data === null || data === void 0 ? void 0 : data.value) === null || _b === void 0 ? void 0 : _b.toLocaleString() })] }) })] }));
187625
- }, cursor: { fill: 'rgba(0, 0, 0, 0.05)' }, wrapperStyle: { outline: 'none' } }), jsx(Bar, { dataKey: "value", fill: "#38A1E5", radius: [4, 4, 0, 0] })] })) : (jsx(EmptyStats, {})) }), jsx(ChartCardWrapper, { title: t('analyticsAnalyticsUsersStats.accessTimesTitle'), label: t('analyticsAnalyticsUsersStats.accessTimesLabel'), filters: accessTimeHeatmapDateFilter, setOutsideFilters: setAccessTimeHeatmapDateFilter, children: jsx(AccessTimeHeatmap, { loading: isLoadingAccessTimeHeatmap, accessTimeData: accessTimeHeatmap }) })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsUsersStats.userDetailsTitle'), label: t('analyticsAnalyticsUsersStats.userDetailsLabel'), filters: userDetailsStatsDateFilter, setOutsideFilters: setUserDetailsStatsDateFilter, overflowAuto: true, height: "450px", children: jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-user", type: "text", placeholder: t('analyticsAnalyticsUsersStats.searchPlaceholder'), value: userDetailsStatsSearch, onChange: handleSearchInputChange, required: true, className: `pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11` })] }), jsx("div", { className: "rounded-md", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "w-[250px]", children: t('analyticsAnalyticsUsersStats.tableHeaderUserEmail') }), jsx(TableHead, { className: "w-[200px]", children: t('analyticsAnalyticsUsersStats.tableHeaderUsername') }), jsx(TableHead, { children: t('analyticsAnalyticsUsersStats.tableHeaderMessages') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsUsersStats.tableHeaderLastActive') })] }) }), jsx(TableBody, { children: (_e = userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.results) === null || _e === void 0 ? void 0 : _e.map((user, index) => (jsxs(TableRow, { className: cn(index % 2 === 0 ? 'bg-gray-50' : '', 'h-[48px]'), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: jsx("div", { className: "flex items-center", children: user.email || t('analyticsAnalyticsUsersStats.anonymous') }) }), jsx(TableCell, { children: user.full_name || '' }), jsx(TableCell, { children: user.messages }), jsx(TableCell, { className: "text-right", children: user.last_activity ? formatRelativeTime$1(user.last_activity, t) : '-' })] }, index))) })] }) }), isLoadingUserDetailsStats && (jsx("div", { className: "flex items-center justify-center py-4", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsUsersStats.loading') }) })), !isLoadingUserDetailsStats &&
188198
+ }, cursor: { fill: 'rgba(0, 0, 0, 0.05)' }, wrapperStyle: { outline: 'none' } }), jsx(Bar, { dataKey: "value", fill: "#38A1E5", radius: [4, 4, 0, 0] })] })) : (jsx(EmptyStats, {})) }), jsx(ChartCardWrapper, { title: t('analyticsAnalyticsUsersStats.accessTimesTitle'), label: t('analyticsAnalyticsUsersStats.accessTimesLabel'), filters: accessTimeHeatmapDateFilter, setOutsideFilters: setAccessTimeHeatmapDateFilter, description: t('analyticsAnalyticsUsersStats.accessTimesDescription'), children: jsx(AccessTimeHeatmap, { loading: isLoadingAccessTimeHeatmap, accessTimeData: accessTimeHeatmap }) })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsUsersStats.userDetailsTitle'), label: t('analyticsAnalyticsUsersStats.userDetailsLabel'), filters: userDetailsStatsDateFilter, setOutsideFilters: setUserDetailsStatsDateFilter, overflowAuto: true, height: "450px", description: t('analyticsAnalyticsUsersStats.userDetailsDescription'), children: jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-user", type: "text", placeholder: t('analyticsAnalyticsUsersStats.searchPlaceholder'), value: userDetailsStatsSearch, onChange: handleSearchInputChange, required: true, className: `pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11` })] }), jsx("div", { className: "rounded-md", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "w-[250px]", children: t('analyticsAnalyticsUsersStats.tableHeaderUserEmail') }), jsx(TableHead, { className: "w-[200px]", children: t('analyticsAnalyticsUsersStats.tableHeaderUsername') }), jsx(TableHead, { children: t('analyticsAnalyticsUsersStats.tableHeaderMessages') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsUsersStats.tableHeaderLastActive') })] }) }), jsx(TableBody, { children: (_e = userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.results) === null || _e === void 0 ? void 0 : _e.map((user, index) => (jsxs(TableRow, { className: cn(index % 2 === 0 ? 'bg-gray-50' : '', 'h-[48px]'), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: jsx("div", { className: "flex items-center", children: user.email || t('analyticsAnalyticsUsersStats.anonymous') }) }), jsx(TableCell, { children: user.full_name || '' }), jsx(TableCell, { children: user.messages }), jsx(TableCell, { className: "text-right", children: user.last_activity ? formatRelativeTime$1(user.last_activity, t) : '-' })] }, index))) })] }) }), isLoadingUserDetailsStats && (jsx("div", { className: "flex items-center justify-center py-4", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsUsersStats.loading') }) })), !isLoadingUserDetailsStats &&
187626
188199
  (!((_f = userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.results) === null || _f === void 0 ? void 0 : _f.length) || ((_g = userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.results) === null || _g === void 0 ? void 0 : _g.length) === 0) && (jsx(EmptyStats, {})), (userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.pagination) && ((_h = userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.results) === null || _h === void 0 ? void 0 : _h.length) > 0 && (jsxs("div", { className: "flex items-center justify-center space-x-2 py-4", children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setUserDetailsStatsPage(1), disabled: !userDetailsStats.pagination.has_previous, children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsUsersStats.goToFirstPage') }), jsx(ChevronsLeft, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setUserDetailsStatsPage(userDetailsStats.pagination.page - 1), disabled: !userDetailsStats.pagination.has_previous, children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsUsersStats.goToPreviousPage') }), jsx(ChevronLeft, { className: "h-4 w-4" })] }), Array.from({ length: userDetailsStats.pagination.total_pages }, (_, i) => i + 1)
187627
188200
  .filter((page) => {
187628
188201
  const current = userDetailsStats.pagination.page;
@@ -187641,7 +188214,7 @@ function AnalyticsUsersStats({ tenantKey, mentorId, selectedMentorId, usergroupI
187641
188214
  }
187642
188215
 
187643
188216
  // Utility function to format date to YYYY-MM-DD
187644
- const formatDateToYYYYMMDD$4 = (date) => {
188217
+ const formatDateToYYYYMMDD$5 = (date) => {
187645
188218
  if (!date)
187646
188219
  return undefined;
187647
188220
  return date.toISOString().split('T')[0];
@@ -187659,8 +188232,8 @@ const useTopics = ({ tenantKey, mentorId, usergroupIds, }) => {
187659
188232
  metric: 'conversations',
187660
188233
  date_filter: conversationsStatsDateFilter.activeFilter || FILTER_30D,
187661
188234
  ...(conversationsStatsDateFilter.activeFilter === 'custom' && {
187662
- start_date: formatDateToYYYYMMDD$4((_a = conversationsStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
187663
- end_date: formatDateToYYYYMMDD$4((_b = conversationsStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
188235
+ start_date: formatDateToYYYYMMDD$5((_a = conversationsStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
188236
+ end_date: formatDateToYYYYMMDD$5((_b = conversationsStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
187664
188237
  }),
187665
188238
  });
187666
188239
  const { data: topicsStats, isLoading: isLoadingTopicsStats } = useGetTopicsStatsQuery({
@@ -187678,8 +188251,8 @@ const useTopics = ({ tenantKey, mentorId, usergroupIds, }) => {
187678
188251
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187679
188252
  date_filter: averageRatingDateFilter.activeFilter || FILTER_30D,
187680
188253
  ...(averageRatingDateFilter.activeFilter === 'custom' && {
187681
- start_date: formatDateToYYYYMMDD$4((_c = averageRatingDateFilter.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
187682
- end_date: formatDateToYYYYMMDD$4((_d = averageRatingDateFilter.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
188254
+ start_date: formatDateToYYYYMMDD$5((_c = averageRatingDateFilter.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
188255
+ end_date: formatDateToYYYYMMDD$5((_d = averageRatingDateFilter.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
187683
188256
  }),
187684
188257
  });
187685
188258
  const [topicsDetailsDateFilter, setTopicsDetailsDateFilter] = useState({
@@ -187690,8 +188263,8 @@ const useTopics = ({ tenantKey, mentorId, usergroupIds, }) => {
187690
188263
  date_filter: topicsDetailsDateFilter.activeFilter || FILTER_30D,
187691
188264
  platform_key: tenantKey,
187692
188265
  ...(topicsDetailsDateFilter.activeFilter === 'custom' && {
187693
- start_date: formatDateToYYYYMMDD$4((_e = topicsDetailsDateFilter.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
187694
- end_date: formatDateToYYYYMMDD$4((_f = topicsDetailsDateFilter.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
188266
+ start_date: formatDateToYYYYMMDD$5((_e = topicsDetailsDateFilter.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
188267
+ end_date: formatDateToYYYYMMDD$5((_f = topicsDetailsDateFilter.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
187695
188268
  }),
187696
188269
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187697
188270
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187720,7 +188293,7 @@ function AnalyticsTopicsStats({ tenantKey, mentorId, selectedMentorId, usergroup
187720
188293
  const currentMentorId = selectedMentorId || mentorId;
187721
188294
  const { topicsStats, isLoadingTopicsStats, conversationsStats, isLoadingConversationsStats, conversationsStatsDateFilter, setConversationsStatsDateFilter, averageRatingStats, averageRatingDateFilter, setAverageRatingDateFilter, topicsDetailsStats, isLoadingTopicsDetailsStats, topicsDetailsDateFilter, setTopicsDetailsDateFilter, } = useTopics({ tenantKey, mentorId: currentMentorId, usergroupIds });
187722
188295
  const averageRatingDisplayed = ((_a = averageRatingStats === null || averageRatingStats === void 0 ? void 0 : averageRatingStats.points) === null || _a === void 0 ? void 0 : _a.length) && ((_b = averageRatingStats === null || averageRatingStats === void 0 ? void 0 : averageRatingStats.points) === null || _b === void 0 ? void 0 : _b.length) > 0;
187723
- return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { title: t('analyticsAnalyticsTopicsStats.topics'), value: ((_c = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.topics) === null || _c === void 0 ? void 0 : _c.this_month) || 0, loading: isLoadingTopicsStats, percentage: ((_d = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.topics) === null || _d === void 0 ? void 0 : _d.percentage_change) || 0 }), jsx(StatCard, { title: t('analyticsAnalyticsTopicsStats.conversations'), value: ((_e = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.conversations) === null || _e === void 0 ? void 0 : _e.this_month) || 0, loading: isLoadingTopicsStats, percentage: ((_f = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.conversations) === null || _f === void 0 ? void 0 : _f.percentage_change) || 0 }), jsx(StatCard, { title: t('analyticsAnalyticsTopicsStats.messages'), value: ((_g = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.messages) === null || _g === void 0 ? void 0 : _g.this_month) || 0, loading: isLoadingTopicsStats, percentage: ((_h = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.messages) === null || _h === void 0 ? void 0 : _h.percentage_change) || 0 })] }), jsxs("div", { className: cn('grid grid-cols-1 lg:grid-cols-2 gap-5', !averageRatingDisplayed ? 'lg:grid-cols-1' : ''), children: [jsx(ChartCardWrapper, { title: t('analyticsAnalyticsTopicsStats.conversations'), label: t('analyticsAnalyticsTopicsStats.conversations'), filters: conversationsStatsDateFilter, setOutsideFilters: setConversationsStatsDateFilter, children: isLoadingConversationsStats ? (jsx(ChartLoading, {})) : ((_j = conversationsStats === null || conversationsStats === void 0 ? void 0 : conversationsStats.points) === null || _j === void 0 ? void 0 : _j.length) && ((_k = conversationsStats === null || conversationsStats === void 0 ? void 0 : conversationsStats.points) === null || _k === void 0 ? void 0 : _k.length) > 0 ? (jsxs(LineChart, { data: (_l = conversationsStats === null || conversationsStats === void 0 ? void 0 : conversationsStats.points) === null || _l === void 0 ? void 0 : _l.map((point) => ({
188296
+ return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { title: t('analyticsAnalyticsTopicsStats.topics'), value: ((_c = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.topics) === null || _c === void 0 ? void 0 : _c.this_month) || 0, loading: isLoadingTopicsStats, percentage: ((_d = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.topics) === null || _d === void 0 ? void 0 : _d.percentage_change) || 0, description: t('analyticsAnalyticsTopicsStats.topicsDescription') }), jsx(StatCard, { title: t('analyticsAnalyticsTopicsStats.conversations'), value: ((_e = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.conversations) === null || _e === void 0 ? void 0 : _e.this_month) || 0, loading: isLoadingTopicsStats, percentage: ((_f = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.conversations) === null || _f === void 0 ? void 0 : _f.percentage_change) || 0, description: t('analyticsAnalyticsTopicsStats.conversationsDescription') }), jsx(StatCard, { title: t('analyticsAnalyticsTopicsStats.messages'), value: ((_g = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.messages) === null || _g === void 0 ? void 0 : _g.this_month) || 0, loading: isLoadingTopicsStats, percentage: ((_h = topicsStats === null || topicsStats === void 0 ? void 0 : topicsStats.messages) === null || _h === void 0 ? void 0 : _h.percentage_change) || 0, description: t('analyticsAnalyticsTopicsStats.messagesDescription') })] }), jsxs("div", { className: cn('grid grid-cols-1 lg:grid-cols-2 gap-5', !averageRatingDisplayed ? 'lg:grid-cols-1' : ''), children: [jsx(ChartCardWrapper, { title: t('analyticsAnalyticsTopicsStats.conversations'), label: t('analyticsAnalyticsTopicsStats.conversations'), filters: conversationsStatsDateFilter, setOutsideFilters: setConversationsStatsDateFilter, description: t('analyticsAnalyticsTopicsStats.conversationsChartDescription'), children: isLoadingConversationsStats ? (jsx(ChartLoading, {})) : ((_j = conversationsStats === null || conversationsStats === void 0 ? void 0 : conversationsStats.points) === null || _j === void 0 ? void 0 : _j.length) && ((_k = conversationsStats === null || conversationsStats === void 0 ? void 0 : conversationsStats.points) === null || _k === void 0 ? void 0 : _k.length) > 0 ? (jsxs(LineChart, { data: (_l = conversationsStats === null || conversationsStats === void 0 ? void 0 : conversationsStats.points) === null || _l === void 0 ? void 0 : _l.map((point) => ({
187724
188297
  date: formatDateToShortFormat$2(point.date, conversationsStatsDateFilter.activeFilter === 'today'),
187725
188298
  value: point.value,
187726
188299
  })), margin: { top: 5, right: 5, left: 0, bottom: 5 }, children: [jsx(CartesianGrid, { strokeDasharray: "3 3", stroke: "#f0f0f0", vertical: false }), jsx(XAxis, { dataKey: "date", tick: { fontSize: 8, textAnchor: 'end' }, angle: -45, interval: Math.floor(Number((_m = conversationsStats === null || conversationsStats === void 0 ? void 0 : conversationsStats.points) === null || _m === void 0 ? void 0 : _m.length) / 31) || 0 }), jsx(YAxis, { tick: { fontSize: 10 }, width: 30, allowDecimals: false }), jsx(Tooltip, { content: ({ active, payload, label }) => {
@@ -187736,7 +188309,7 @@ function AnalyticsTopicsStats({ tenantKey, mentorId, selectedMentorId, usergroup
187736
188309
  stroke: '#38A1E5',
187737
188310
  strokeWidth: 2,
187738
188311
  fill: 'white',
187739
- } })] })) : (jsx(EmptyStats, {})) }), averageRatingDisplayed ? (jsx(ChartCardWrapper, { title: t('analyticsAnalyticsTopicsStats.averageRating'), label: t('analyticsAnalyticsTopicsStats.rating'), filters: averageRatingDateFilter, setOutsideFilters: setAverageRatingDateFilter, children: ((_o = averageRatingStats === null || averageRatingStats === void 0 ? void 0 : averageRatingStats.points) === null || _o === void 0 ? void 0 : _o.length) && ((_p = averageRatingStats === null || averageRatingStats === void 0 ? void 0 : averageRatingStats.points) === null || _p === void 0 ? void 0 : _p.length) > 0 ? (jsxs(LineChart, { data: (_q = averageRatingStats === null || averageRatingStats === void 0 ? void 0 : averageRatingStats.points) === null || _q === void 0 ? void 0 : _q.map((point) => ({
188312
+ } })] })) : (jsx(EmptyStats, {})) }), averageRatingDisplayed ? (jsx(ChartCardWrapper, { title: t('analyticsAnalyticsTopicsStats.averageRating'), label: t('analyticsAnalyticsTopicsStats.rating'), filters: averageRatingDateFilter, setOutsideFilters: setAverageRatingDateFilter, description: t('analyticsAnalyticsTopicsStats.averageRatingDescription'), children: ((_o = averageRatingStats === null || averageRatingStats === void 0 ? void 0 : averageRatingStats.points) === null || _o === void 0 ? void 0 : _o.length) && ((_p = averageRatingStats === null || averageRatingStats === void 0 ? void 0 : averageRatingStats.points) === null || _p === void 0 ? void 0 : _p.length) > 0 ? (jsxs(LineChart, { data: (_q = averageRatingStats === null || averageRatingStats === void 0 ? void 0 : averageRatingStats.points) === null || _q === void 0 ? void 0 : _q.map((point) => ({
187740
188313
  date: formatDateToShortFormat$2(point.date, averageRatingDateFilter.activeFilter === 'today'),
187741
188314
  value: point.value,
187742
188315
  })), margin: { top: 5, right: 5, left: 0, bottom: 5 }, children: [jsx(CartesianGrid, { strokeDasharray: "3 3", stroke: "#f0f0f0", vertical: false }), jsx(XAxis, { dataKey: "date", tick: { fontSize: 8, textAnchor: 'end' }, angle: -45, interval: Math.floor(Number((_r = averageRatingStats === null || averageRatingStats === void 0 ? void 0 : averageRatingStats.points) === null || _r === void 0 ? void 0 : _r.length) / 31) || 0 }), jsx(YAxis, { tick: { fontSize: 10 }, width: 30, domain: [0, 5], tickCount: 6 }), jsx(Tooltip, { content: ({ active, payload, label }) => {
@@ -187750,7 +188323,7 @@ function AnalyticsTopicsStats({ tenantKey, mentorId, selectedMentorId, usergroup
187750
188323
  stroke: '#38A1E5',
187751
188324
  strokeWidth: 2,
187752
188325
  fill: 'white',
187753
- } })] })) : (jsx(EmptyStats, {})) })) : null] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsTopicsStats.topicsDetails'), label: t('analyticsAnalyticsTopicsStats.messages'), filters: topicsDetailsDateFilter, setOutsideFilters: setTopicsDetailsDateFilter, children: isLoadingTopicsDetailsStats ? (jsx(ChartLoading, {})) : ((_s = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _s === void 0 ? void 0 : _s.length) && ((_t = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _t === void 0 ? void 0 : _t.length) > 0 ? (jsxs(BarChart, { data: (_u = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _u === void 0 ? void 0 : _u.map((result) => ({
188326
+ } })] })) : (jsx(EmptyStats, {})) })) : null] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsTopicsStats.topicsDetails'), label: t('analyticsAnalyticsTopicsStats.messages'), filters: topicsDetailsDateFilter, setOutsideFilters: setTopicsDetailsDateFilter, description: t('analyticsAnalyticsTopicsStats.topicsDetailsDescription'), children: isLoadingTopicsDetailsStats ? (jsx(ChartLoading, {})) : ((_s = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _s === void 0 ? void 0 : _s.length) && ((_t = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _t === void 0 ? void 0 : _t.length) > 0 ? (jsxs(BarChart, { data: (_u = topicsDetailsStats === null || topicsDetailsStats === void 0 ? void 0 : topicsDetailsStats.results) === null || _u === void 0 ? void 0 : _u.map((result) => ({
187754
188327
  topic: result.name,
187755
188328
  value: result.messages,
187756
188329
  })), layout: "vertical", margin: { top: 5, right: 30, left: 20, bottom: 5 }, children: [jsx(CartesianGrid, { strokeDasharray: "3 3", horizontal: true, vertical: false }), jsx(XAxis, { type: "number", tick: { fontSize: 10 }, allowDecimals: false, domain: [0, 'dataMax'] }), jsx(YAxis, { dataKey: "topic", type: "category", tick: { fontSize: 10 }, interval: 0, width: 120 }), jsx(Tooltip, { content: ({ active, payload, label }) => {
@@ -187765,7 +188338,7 @@ function AnalyticsTopicsStats({ tenantKey, mentorId, selectedMentorId, usergroup
187765
188338
  }
187766
188339
 
187767
188340
  // Utility function to format date to YYYY-MM-DD
187768
- const formatDateToYYYYMMDD$3 = (date) => {
188341
+ const formatDateToYYYYMMDD$4 = (date) => {
187769
188342
  if (!date)
187770
188343
  return undefined;
187771
188344
  return date.toISOString().split('T')[0];
@@ -187823,8 +188396,8 @@ const useFinancial = ({ tenantKey, mentorId, usergroupIds, }) => {
187823
188396
  date_filter: detailedCostPerDayFilters.activeFilter || FILTER_30D,
187824
188397
  platform_key: tenantKey,
187825
188398
  ...(detailedCostPerDayFilters.activeFilter === 'custom' && {
187826
- start_date: formatDateToYYYYMMDD$3((_a = detailedCostPerDayFilters.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
187827
- end_date: formatDateToYYYYMMDD$3((_b = detailedCostPerDayFilters.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
188399
+ start_date: formatDateToYYYYMMDD$4((_a = detailedCostPerDayFilters.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
188400
+ end_date: formatDateToYYYYMMDD$4((_b = detailedCostPerDayFilters.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
187828
188401
  }),
187829
188402
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187830
188403
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187834,8 +188407,8 @@ const useFinancial = ({ tenantKey, mentorId, usergroupIds, }) => {
187834
188407
  date_filter: detailedCostPerProviderFilters.activeFilter || FILTER_30D,
187835
188408
  platform_key: tenantKey,
187836
188409
  ...(detailedCostPerProviderFilters.activeFilter === 'custom' && {
187837
- start_date: formatDateToYYYYMMDD$3((_c = detailedCostPerProviderFilters.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
187838
- end_date: formatDateToYYYYMMDD$3((_d = detailedCostPerProviderFilters.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
188410
+ start_date: formatDateToYYYYMMDD$4((_c = detailedCostPerProviderFilters.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
188411
+ end_date: formatDateToYYYYMMDD$4((_d = detailedCostPerProviderFilters.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
187839
188412
  }),
187840
188413
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187841
188414
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187846,8 +188419,8 @@ const useFinancial = ({ tenantKey, mentorId, usergroupIds, }) => {
187846
188419
  date_filter: detailedCostPerUserFilters.activeFilter || FILTER_30D,
187847
188420
  platform_key: tenantKey,
187848
188421
  ...(detailedCostPerUserFilters.activeFilter === 'custom' && {
187849
- start_date: formatDateToYYYYMMDD$3((_e = detailedCostPerUserFilters.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
187850
- end_date: formatDateToYYYYMMDD$3((_f = detailedCostPerUserFilters.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
188422
+ start_date: formatDateToYYYYMMDD$4((_e = detailedCostPerUserFilters.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
188423
+ end_date: formatDateToYYYYMMDD$4((_f = detailedCostPerUserFilters.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
187851
188424
  }),
187852
188425
  page: costPerUserPage,
187853
188426
  limit: costPerUserLimit,
@@ -187861,8 +188434,8 @@ const useFinancial = ({ tenantKey, mentorId, usergroupIds, }) => {
187861
188434
  date_filter: detailedLLMCostFilters.activeFilter || FILTER_30D,
187862
188435
  platform_key: tenantKey,
187863
188436
  ...(detailedLLMCostFilters.activeFilter === 'custom' && {
187864
- start_date: formatDateToYYYYMMDD$3((_g = detailedLLMCostFilters.dateRange) === null || _g === void 0 ? void 0 : _g.startDate),
187865
- end_date: formatDateToYYYYMMDD$3((_h = detailedLLMCostFilters.dateRange) === null || _h === void 0 ? void 0 : _h.endDate),
188437
+ start_date: formatDateToYYYYMMDD$4((_g = detailedLLMCostFilters.dateRange) === null || _g === void 0 ? void 0 : _g.startDate),
188438
+ end_date: formatDateToYYYYMMDD$4((_h = detailedLLMCostFilters.dateRange) === null || _h === void 0 ? void 0 : _h.endDate),
187866
188439
  }),
187867
188440
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187868
188441
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187989,7 +188562,7 @@ function AnalyticsFinancialStats({ tenantKey, mentorId, selectedMentorId, usergr
187989
188562
  }
187990
188563
  return pages;
187991
188564
  };
187992
- return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoadingWeeklyCostData, title: t('analyticsAnalyticsFinancialStats.weeklyCosts'), value: Number((weeklyCostData === null || weeklyCostData === void 0 ? void 0 : weeklyCostData.value) || 0).toFixed(2), percentage: (weeklyCostData === null || weeklyCostData === void 0 ? void 0 : weeklyCostData.percentage_change) || 0, showDollarSign: true }), jsx(StatCard, { loading: isLoadingMonthlyCostData, title: t('analyticsAnalyticsFinancialStats.monthlyCosts'), value: Number((monthlyCostData === null || monthlyCostData === void 0 ? void 0 : monthlyCostData.value) || 0).toFixed(2), percentage: (monthlyCostData === null || monthlyCostData === void 0 ? void 0 : monthlyCostData.percentage_change) || 0, showDollarSign: true }), jsx(StatCard, { loading: isLoadingTotalCostData, title: t('analyticsAnalyticsFinancialStats.totalCosts'), value: Number((totalCostData === null || totalCostData === void 0 ? void 0 : totalCostData.value) || 0).toFixed(2), percentage: totalCostData === null || totalCostData === void 0 ? void 0 : totalCostData.percentage_change, showDollarSign: true })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costPerDayTitle'), label: t('analyticsAnalyticsFinancialStats.costPerDayLabel'), filters: detailedCostPerDayFilters, setOutsideFilters: setDetailedCostPerDayFilters, children: isLoadingDetailedCostPerDayData ? (jsx(ChartLoading, {})) : ((_a = detailedCostPerDayData === null || detailedCostPerDayData === void 0 ? void 0 : detailedCostPerDayData.overtime) === null || _a === void 0 ? void 0 : _a.length) &&
188565
+ return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoadingWeeklyCostData, title: t('analyticsAnalyticsFinancialStats.weeklyCosts'), value: Number((weeklyCostData === null || weeklyCostData === void 0 ? void 0 : weeklyCostData.value) || 0).toFixed(2), percentage: (weeklyCostData === null || weeklyCostData === void 0 ? void 0 : weeklyCostData.percentage_change) || 0, showDollarSign: true, description: t('analyticsAnalyticsFinancialStats.weeklyCostsDescription') }), jsx(StatCard, { loading: isLoadingMonthlyCostData, title: t('analyticsAnalyticsFinancialStats.monthlyCosts'), value: Number((monthlyCostData === null || monthlyCostData === void 0 ? void 0 : monthlyCostData.value) || 0).toFixed(2), percentage: (monthlyCostData === null || monthlyCostData === void 0 ? void 0 : monthlyCostData.percentage_change) || 0, showDollarSign: true, description: t('analyticsAnalyticsFinancialStats.monthlyCostsDescription') }), jsx(StatCard, { loading: isLoadingTotalCostData, title: t('analyticsAnalyticsFinancialStats.totalCosts'), value: Number((totalCostData === null || totalCostData === void 0 ? void 0 : totalCostData.value) || 0).toFixed(2), percentage: totalCostData === null || totalCostData === void 0 ? void 0 : totalCostData.percentage_change, showDollarSign: true, description: t('analyticsAnalyticsFinancialStats.totalCostsDescription') })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costPerDayTitle'), label: t('analyticsAnalyticsFinancialStats.costPerDayLabel'), filters: detailedCostPerDayFilters, setOutsideFilters: setDetailedCostPerDayFilters, description: t('analyticsAnalyticsFinancialStats.costPerDayDescription'), children: isLoadingDetailedCostPerDayData ? (jsx(ChartLoading, {})) : ((_a = detailedCostPerDayData === null || detailedCostPerDayData === void 0 ? void 0 : detailedCostPerDayData.overtime) === null || _a === void 0 ? void 0 : _a.length) &&
187993
188566
  ((_b = detailedCostPerDayData === null || detailedCostPerDayData === void 0 ? void 0 : detailedCostPerDayData.overtime) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (jsxs(BarChart, { data: detailedCostPerDayData.overtime.map((item) => ({
187994
188567
  date: formatDateToShortFormat$2(item.date, detailedCostPerDayFilters.activeFilter === 'today'),
187995
188568
  value: item.value,
@@ -188001,7 +188574,7 @@ function AnalyticsFinancialStats({ tenantKey, mentorId, selectedMentorId, usergr
188001
188574
  return (jsxs("div", { className: "bg-background border border-border rounded-md p-3 shadow-lg z-50", style: { borderColor: 'oklch(.922 0 0)' }, role: "tooltip", "aria-label": t('analyticsAnalyticsFinancialStats.costDetailsAriaLabel', {
188002
188575
  label,
188003
188576
  }), tabIndex: -1, children: [jsx("div", { className: "font-medium text-foreground mb-2 text-base", children: label }), jsx("div", { className: "space-y-2 text-sm", children: jsxs("div", { className: "flex justify-between items-center", children: [jsx("span", { className: "text-muted-foreground", children: t('analyticsAnalyticsFinancialStats.costTooltipLabel') }), jsxs("span", { className: "font-medium text-foreground", children: ["$", (Number(data === null || data === void 0 ? void 0 : data.value) || 0).toFixed(3)] })] }) })] }));
188004
- }, cursor: { fill: 'rgba(0, 0, 0, 0.05)' }, wrapperStyle: { outline: 'none' } }), jsx(Bar, { dataKey: "value", fill: "#38A1E5", radius: [5, 5, 5, 5], barSize: 30 })] })) : (jsx(EmptyStats, {})) }) }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costByProviderTitle'), label: t('analyticsAnalyticsFinancialStats.costByProviderLabel'), filters: detailedCostPerProviderFilters, setOutsideFilters: setDetailedCostPerProviderFilters, children: isLoadingDetailedCostPerProviderData ? (jsx(ChartLoading, {})) : ((_d = detailedCostPerProviderData === null || detailedCostPerProviderData === void 0 ? void 0 : detailedCostPerProviderData.rows) === null || _d === void 0 ? void 0 : _d.length) &&
188577
+ }, cursor: { fill: 'rgba(0, 0, 0, 0.05)' }, wrapperStyle: { outline: 'none' } }), jsx(Bar, { dataKey: "value", fill: "#38A1E5", radius: [5, 5, 5, 5], barSize: 30 })] })) : (jsx(EmptyStats, {})) }) }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costByProviderTitle'), label: t('analyticsAnalyticsFinancialStats.costByProviderLabel'), filters: detailedCostPerProviderFilters, setOutsideFilters: setDetailedCostPerProviderFilters, description: t('analyticsAnalyticsFinancialStats.costByProviderDescription'), children: isLoadingDetailedCostPerProviderData ? (jsx(ChartLoading, {})) : ((_d = detailedCostPerProviderData === null || detailedCostPerProviderData === void 0 ? void 0 : detailedCostPerProviderData.rows) === null || _d === void 0 ? void 0 : _d.length) &&
188005
188578
  ((_e = detailedCostPerProviderData === null || detailedCostPerProviderData === void 0 ? void 0 : detailedCostPerProviderData.rows) === null || _e === void 0 ? void 0 : _e.length) > 0 ? (jsxs(PieChart, { children: [jsx(Pie, { data: (_f = detailedCostPerProviderData === null || detailedCostPerProviderData === void 0 ? void 0 : detailedCostPerProviderData.rows) === null || _f === void 0 ? void 0 : _f.map((item) => ({
188006
188579
  name: item.provider,
188007
188580
  value: item.total_cost,
@@ -188016,7 +188589,7 @@ function AnalyticsFinancialStats({ tenantKey, mentorId, selectedMentorId, usergr
188016
188589
  return (jsxs("div", { className: "bg-background border border-border rounded-md p-3 shadow-lg z-[99999999]", style: { borderColor: 'oklch(.922 0 0)' }, role: "tooltip", "aria-label": t('analyticsAnalyticsFinancialStats.providerCostDetailsAriaLabel', {
188017
188590
  label,
188018
188591
  }), tabIndex: -1, children: [jsx("div", { className: "font-medium text-foreground mb-2 text-base", children: label }), jsx("div", { className: "space-y-2 text-sm", children: jsxs("div", { className: "flex justify-between items-center", children: [jsxs("span", { className: "text-muted-foreground", children: [data === null || data === void 0 ? void 0 : data.name, ":"] }), jsxs("span", { className: "font-medium text-foreground", children: ["$", (_b = data === null || data === void 0 ? void 0 : data.value) === null || _b === void 0 ? void 0 : _b.toFixed(2)] })] }) })] }));
188019
- }, wrapperStyle: { outline: 'none' } })] })) : (jsx(EmptyStats, {})) }), jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costByLLMTitle'), label: t('analyticsAnalyticsFinancialStats.costByLLMLabel'), filters: detailedLLMCostFilters, setOutsideFilters: setDetailedLLMCostFilters, children: isLoadingDetailedLLMCostData ? (jsx(ChartLoading, {})) : ((_h = detailedLLMCostData === null || detailedLLMCostData === void 0 ? void 0 : detailedLLMCostData.rows) === null || _h === void 0 ? void 0 : _h.length) && ((_j = detailedLLMCostData === null || detailedLLMCostData === void 0 ? void 0 : detailedLLMCostData.rows) === null || _j === void 0 ? void 0 : _j.length) > 0 ? (jsxs(BarChart, { data: (_k = detailedLLMCostData === null || detailedLLMCostData === void 0 ? void 0 : detailedLLMCostData.rows) === null || _k === void 0 ? void 0 : _k.map((item) => ({
188592
+ }, wrapperStyle: { outline: 'none' } })] })) : (jsx(EmptyStats, {})) }), jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costByLLMTitle'), label: t('analyticsAnalyticsFinancialStats.costByLLMLabel'), filters: detailedLLMCostFilters, setOutsideFilters: setDetailedLLMCostFilters, description: t('analyticsAnalyticsFinancialStats.costByLLMDescription'), children: isLoadingDetailedLLMCostData ? (jsx(ChartLoading, {})) : ((_h = detailedLLMCostData === null || detailedLLMCostData === void 0 ? void 0 : detailedLLMCostData.rows) === null || _h === void 0 ? void 0 : _h.length) && ((_j = detailedLLMCostData === null || detailedLLMCostData === void 0 ? void 0 : detailedLLMCostData.rows) === null || _j === void 0 ? void 0 : _j.length) > 0 ? (jsxs(BarChart, { data: (_k = detailedLLMCostData === null || detailedLLMCostData === void 0 ? void 0 : detailedLLMCostData.rows) === null || _k === void 0 ? void 0 : _k.map((item) => ({
188020
188593
  name: item.llm_model,
188021
188594
  value: item.total_cost,
188022
188595
  })), margin: { top: 5, right: 5, left: 20, bottom: 5 }, children: [jsx(CartesianGrid, { strokeDasharray: "3 3", stroke: "#f0f0f0" }), jsx(XAxis, { dataKey: "name", tick: { fontSize: 9, textAnchor: 'end' }, angle: -45, height: 50, interval: Math.floor(Number((_l = detailedLLMCostData === null || detailedLLMCostData === void 0 ? void 0 : detailedLLMCostData.rows) === null || _l === void 0 ? void 0 : _l.length) / 31) || 0 }), jsx(YAxis, { tick: { fontSize: 10 }, width: 30, tickFormatter: (value) => `$${value.toFixed(3)}` }), jsx(Tooltip, { content: ({ active, payload, label }) => {
@@ -188027,7 +188600,7 @@ function AnalyticsFinancialStats({ tenantKey, mentorId, selectedMentorId, usergr
188027
188600
  return (jsxs("div", { className: "bg-background border border-border rounded-md p-3 shadow-lg z-50", style: { borderColor: 'oklch(.922 0 0)' }, role: "tooltip", "aria-label": t('analyticsAnalyticsFinancialStats.llmCostDetailsAriaLabel', {
188028
188601
  label,
188029
188602
  }), tabIndex: -1, children: [jsx("div", { className: "font-medium text-foreground mb-2 text-base", children: label }), jsx("div", { className: "space-y-2 text-sm", children: jsxs("div", { className: "flex justify-between items-center", children: [jsx("span", { className: "text-muted-foreground", children: t('analyticsAnalyticsFinancialStats.totalCostTooltipLabel') }), jsxs("span", { className: "font-medium text-foreground", children: ["$", (_b = data === null || data === void 0 ? void 0 : data.value) === null || _b === void 0 ? void 0 : _b.toFixed(3)] })] }) })] }));
188030
- }, cursor: { fill: 'rgba(0, 0, 0, 0.05)' }, wrapperStyle: { outline: 'none' } }), jsx(Bar, { dataKey: "value", fill: "#38A1E5", radius: [5, 5, 5, 5], barSize: 25 })] })) : (jsx(EmptyStats, {})) })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costPerUserTitle'), label: t('analyticsAnalyticsFinancialStats.costPerUserLabel'), filters: detailedCostPerUserFilters, setOutsideFilters: setDetailedCostPerUserFilters, overflowAuto: true, height: "450px", children: jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "rounded-md", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "w-[250px]", children: t('analyticsAnalyticsFinancialStats.tableHeaderUserEmail') }), jsx(TableHead, { className: "w-[120px]", children: t('analyticsAnalyticsFinancialStats.tableHeaderTotalCost') }), jsx(TableHead, { children: t('analyticsAnalyticsFinancialStats.tableHeaderSessions') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsFinancialStats.tableHeaderLastActive') })] }) }), jsx(TableBody, { children: (_m = detailedCostPerUserData === null || detailedCostPerUserData === void 0 ? void 0 : detailedCostPerUserData.rows) === null || _m === void 0 ? void 0 : _m.map((user, index) => (jsxs(TableRow, { className: cn(index % 2 === 0 ? 'bg-gray-50' : '', 'h-[48px]'), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: jsx("div", { className: "flex items-center", children: (user === null || user === void 0 ? void 0 : user.email) ||
188603
+ }, cursor: { fill: 'rgba(0, 0, 0, 0.05)' }, wrapperStyle: { outline: 'none' } }), jsx(Bar, { dataKey: "value", fill: "#38A1E5", radius: [5, 5, 5, 5], barSize: 25 })] })) : (jsx(EmptyStats, {})) })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costPerUserTitle'), label: t('analyticsAnalyticsFinancialStats.costPerUserLabel'), filters: detailedCostPerUserFilters, setOutsideFilters: setDetailedCostPerUserFilters, overflowAuto: true, height: "450px", description: t('analyticsAnalyticsFinancialStats.costPerUserDescription'), children: jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "rounded-md", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "w-[250px]", children: t('analyticsAnalyticsFinancialStats.tableHeaderUserEmail') }), jsx(TableHead, { className: "w-[120px]", children: t('analyticsAnalyticsFinancialStats.tableHeaderTotalCost') }), jsx(TableHead, { children: t('analyticsAnalyticsFinancialStats.tableHeaderSessions') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsFinancialStats.tableHeaderLastActive') })] }) }), jsx(TableBody, { children: (_m = detailedCostPerUserData === null || detailedCostPerUserData === void 0 ? void 0 : detailedCostPerUserData.rows) === null || _m === void 0 ? void 0 : _m.map((user, index) => (jsxs(TableRow, { className: cn(index % 2 === 0 ? 'bg-gray-50' : '', 'h-[48px]'), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: jsx("div", { className: "flex items-center", children: (user === null || user === void 0 ? void 0 : user.email) ||
188031
188604
  (user === null || user === void 0 ? void 0 : user.username) ||
188032
188605
  t('analyticsAnalyticsFinancialStats.anonymous') }) }), jsxs(TableCell, { className: "font-medium", children: ["$", Number(user.total_cost || 0).toFixed(2)] }), jsx(TableCell, { children: user.sessions }), jsx(TableCell, { className: "text-right", children: user.last_active ? formatRelativeTime$2(user.last_active) : '-' })] }, index))) })] }) }), isLoadingDetailedCostPerUserData && (jsx("div", { className: "h-[60px]", children: jsx(ChartLoading, {}) })), !isLoadingDetailedCostPerUserData &&
188033
188606
  (!((_o = detailedCostPerUserData === null || detailedCostPerUserData === void 0 ? void 0 : detailedCostPerUserData.rows) === null || _o === void 0 ? void 0 : _o.length) ||
@@ -222749,8 +223322,8 @@ function AnalyticsTranscriptsStats({ tenantKey, mentorId, selectedMentorId, user
222749
223322
  jsxs(Fragment$1, { children: [jsxs("div", { className: "mb-4 flex-shrink-0", children: [jsx("h2", { className: "text-lg font-semibold mb-2", children: t('analyticsAnalyticsTranscriptsStats.conversationTranscript') }), jsxs("div", { className: "text-sm text-gray-500", children: [jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelFullName'), ' ', ((_a = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _a === void 0 ? void 0 : _a.name) || '-'] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelUsername'), ' ', ((_b = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _b === void 0 ? void 0 : _b.username) || '-'] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelAgent'), ' ', ((_c = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _c === void 0 ? void 0 : _c.mentor) || '-'] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelModel'), ' ', ((_d = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _d === void 0 ? void 0 : _d.model) || '-'] })] })] }), jsx("div", { className: "flex-1 overflow-y-auto space-y-4 min-h-0", children: ((_e = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _e === void 0 ? void 0 : _e.length) > 0 ? ((_f = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _f === void 0 ? void 0 : _f.map((message, index) => (jsxs(React__default.Fragment, { children: [(message === null || message === void 0 ? void 0 : message.human) && (jsxs("div", { className: `p-3 rounded-lg bg-blue-100 ml-4`, children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: t('analyticsAnalyticsTranscriptsStats.roleUser') }) }), jsx("p", { className: "text-sm", children: getMessageContent(message.human) })] }, `${index}-human`)), (message === null || message === void 0 ? void 0 : message.ai) && (jsxs("div", { className: `p-3 rounded-lg bg-white mr-4`, children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: t('analyticsAnalyticsTranscriptsStats.roleAgent') }) }), jsx(Markdown, { children: getMessageContent(message.ai) })] }, `${index}-ai`))] }, index)))) : (jsx("div", { className: "text-center text-gray-500 py-8", children: jsx("p", { children: t('analyticsAnalyticsTranscriptsStats.noMessages') }) })) })] })) }));
222750
223323
  };
222751
223324
  return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { title: t('analyticsAnalyticsTranscriptsStats.avgMessagesPerConversation'), value: ((_a = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_messages_per_conversation) === null || _a === void 0 ? void 0 : _a.value) || 0, percentage: ((_b = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_messages_per_conversation) === null || _b === void 0 ? void 0 : _b.percentage_change) ||
222752
- undefined, loading: isLoadingTranscriptsConversationHeadlineData }), jsx(StatCard, { title: t('analyticsAnalyticsTranscriptsStats.avgCostPerConversation'), value: Number(((_c = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_cost_per_conversation) === null || _c === void 0 ? void 0 : _c.value) || 0).toFixed(2), percentage: ((_d = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_cost_per_conversation) === null || _d === void 0 ? void 0 : _d.percentage_change) ||
222753
- undefined, showDollarSign: true, loading: isLoadingTranscriptsConversationHeadlineData }), jsx(StatCard, { title: t('analyticsAnalyticsTranscriptsStats.avgRating'), value: ((_e = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_rating) === null || _e === void 0 ? void 0 : _e.value) || 0, percentage: ((_f = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_rating) === null || _f === void 0 ? void 0 : _f.percentage_change) || undefined, loading: isLoadingTranscriptsConversationHeadlineData })] }), jsxs("div", { className: "flex h-[calc(100vh-120px)]", children: [jsxs("div", { className: "w-full md:w-2/3 md:pr-6 overflow-y-auto md:border-r border-gray-200 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: [jsx("div", { className: "mb-6", children: jsxs("div", { className: "flex gap-2 mb-4 items-center", children: [jsxs("div", { className: "relative", children: [jsx(Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4" }), jsx(Input, { placeholder: t('analyticsAnalyticsTranscriptsStats.placeholderTopics'), value: filters.topicSearch, onChange: (e) => setFilters({ ...filters, topicSearch: e.target.value }), className: "pl-10 w-[200px]" })] }), jsxs("div", { className: "relative", children: [jsx(Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4" }), jsx(Input, { placeholder: t('analyticsAnalyticsTranscriptsStats.placeholderUsers'), value: filters.userSearch, onChange: (e) => setFilters({ ...filters, userSearch: e.target.value }), className: "pl-10 w-[200px]" })] }), isFetchingTranscriptsMessagesData && (filters.userSearch || filters.topicSearch) ? (jsx("div", { className: "animate-spin rounded-full h-5 w-5 border-b-2 border-blue-500 ml-2", "aria-hidden": "true" })) : (jsx(Button$1, { variant: "outline", onClick: handleClearFilters, className: "whitespace-nowrap", children: t('analyticsAnalyticsTranscriptsStats.clearAll') }))] }) }), jsxs("div", { className: "bg-gray-50 p-4 rounded-lg mb-6", children: [jsxs("div", { className: "flex flex-wrap gap-x-8 gap-y-2 text-sm text-gray-600", children: [jsxs("div", { "aria-label": t('analyticsAnalyticsTranscriptsStats.ariaTotalConversations'), children: [transcriptsMessagesData === null || transcriptsMessagesData === void 0 ? void 0 : transcriptsMessagesData.summary.total_conversations, ' ', t('analyticsAnalyticsTranscriptsStats.conversations')] }), jsx("div", { children: "\u2022" }), jsxs("div", { children: [transcriptsMessagesData === null || transcriptsMessagesData === void 0 ? void 0 : transcriptsMessagesData.summary.user_queries, ' ', t('analyticsAnalyticsTranscriptsStats.userQueries')] }), jsx("div", { children: "\u2022" }), jsxs("div", { children: [transcriptsMessagesData === null || transcriptsMessagesData === void 0 ? void 0 : transcriptsMessagesData.summary.assistant_responses, ' ', t('analyticsAnalyticsTranscriptsStats.assistantResponses')] })] }), jsx("div", { className: "flex flex-wrap gap-x-8 gap-y-2 text-sm text-gray-600 mt-2", children: jsxs("div", { children: [transcriptsMessagesData === null || transcriptsMessagesData === void 0 ? void 0 : transcriptsMessagesData.summary.average_sentiment_score, ' ', t('analyticsAnalyticsTranscriptsStats.averageSentimentScore')] }) })] }), jsx("div", { className: "flex flex-col gap-4", children: isLoadingTranscriptsMessagesData ? (
223325
+ undefined, loading: isLoadingTranscriptsConversationHeadlineData, description: t('analyticsAnalyticsTranscriptsStats.avgMessagesPerConversationDescription') }), jsx(StatCard, { title: t('analyticsAnalyticsTranscriptsStats.avgCostPerConversation'), value: Number(((_c = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_cost_per_conversation) === null || _c === void 0 ? void 0 : _c.value) || 0).toFixed(2), percentage: ((_d = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_cost_per_conversation) === null || _d === void 0 ? void 0 : _d.percentage_change) ||
223326
+ undefined, showDollarSign: true, loading: isLoadingTranscriptsConversationHeadlineData, description: t('analyticsAnalyticsTranscriptsStats.avgCostPerConversationDescription') }), jsx(StatCard, { title: t('analyticsAnalyticsTranscriptsStats.avgRating'), value: ((_e = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_rating) === null || _e === void 0 ? void 0 : _e.value) || 0, percentage: ((_f = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_rating) === null || _f === void 0 ? void 0 : _f.percentage_change) || undefined, loading: isLoadingTranscriptsConversationHeadlineData, description: t('analyticsAnalyticsTranscriptsStats.avgRatingDescription') })] }), jsxs("div", { className: "flex h-[calc(100vh-120px)]", children: [jsxs("div", { className: "w-full md:w-2/3 md:pr-6 overflow-y-auto md:border-r border-gray-200 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: [jsx("div", { className: "mb-6", children: jsxs("div", { className: "flex gap-2 mb-4 items-center", children: [jsxs("div", { className: "relative", children: [jsx(Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4" }), jsx(Input, { placeholder: t('analyticsAnalyticsTranscriptsStats.placeholderTopics'), value: filters.topicSearch, onChange: (e) => setFilters({ ...filters, topicSearch: e.target.value }), className: "pl-10 w-[200px]" })] }), jsxs("div", { className: "relative", children: [jsx(Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4" }), jsx(Input, { placeholder: t('analyticsAnalyticsTranscriptsStats.placeholderUsers'), value: filters.userSearch, onChange: (e) => setFilters({ ...filters, userSearch: e.target.value }), className: "pl-10 w-[200px]" })] }), isFetchingTranscriptsMessagesData && (filters.userSearch || filters.topicSearch) ? (jsx("div", { className: "animate-spin rounded-full h-5 w-5 border-b-2 border-blue-500 ml-2", "aria-hidden": "true" })) : (jsx(Button$1, { variant: "outline", onClick: handleClearFilters, className: "whitespace-nowrap", children: t('analyticsAnalyticsTranscriptsStats.clearAll') }))] }) }), jsxs("div", { className: "bg-gray-50 p-4 rounded-lg mb-6", children: [jsxs("div", { className: "flex flex-wrap gap-x-8 gap-y-2 text-sm text-gray-600", children: [jsxs("div", { "aria-label": t('analyticsAnalyticsTranscriptsStats.ariaTotalConversations'), children: [transcriptsMessagesData === null || transcriptsMessagesData === void 0 ? void 0 : transcriptsMessagesData.summary.total_conversations, ' ', t('analyticsAnalyticsTranscriptsStats.conversations')] }), jsx("div", { children: "\u2022" }), jsxs("div", { children: [transcriptsMessagesData === null || transcriptsMessagesData === void 0 ? void 0 : transcriptsMessagesData.summary.user_queries, ' ', t('analyticsAnalyticsTranscriptsStats.userQueries')] }), jsx("div", { children: "\u2022" }), jsxs("div", { children: [transcriptsMessagesData === null || transcriptsMessagesData === void 0 ? void 0 : transcriptsMessagesData.summary.assistant_responses, ' ', t('analyticsAnalyticsTranscriptsStats.assistantResponses')] })] }), jsx("div", { className: "flex flex-wrap gap-x-8 gap-y-2 text-sm text-gray-600 mt-2", children: jsxs("div", { children: [transcriptsMessagesData === null || transcriptsMessagesData === void 0 ? void 0 : transcriptsMessagesData.summary.average_sentiment_score, ' ', t('analyticsAnalyticsTranscriptsStats.averageSentimentScore')] }) })] }), jsx("div", { className: "flex flex-col gap-4", children: isLoadingTranscriptsMessagesData ? (
222754
223327
  // Loading state
222755
223328
  jsx("div", { className: "space-y-4", children: Array.from({ length: 3 }).map((_, index) => (jsxs(Card, { className: "p-4 animate-pulse", children: [jsx("div", { className: "mb-3", children: jsx("div", { className: "h-4 bg-gray-200 rounded w-3/4" }) }), jsxs("div", { className: "flex flex-wrap gap-2 mb-3", children: [jsx("div", { className: "h-6 bg-gray-200 rounded w-16" }), jsx("div", { className: "h-6 bg-gray-200 rounded w-20" })] }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 mb-2", children: [jsx("div", { className: "h-4 bg-gray-200 rounded w-24" }), jsx("div", { className: "h-4 bg-gray-200 rounded w-20" })] }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2", children: [jsx("div", { className: "h-4 bg-gray-200 rounded w-20" }), jsx("div", { className: "h-4 bg-gray-200 rounded w-24" })] })] }, index))) })) : (transcriptsMessagesData === null || transcriptsMessagesData === void 0 ? void 0 : transcriptsMessagesData.results) && transcriptsMessagesData.results.length > 0 ? (
222756
223329
  // Results
@@ -223745,7 +224318,7 @@ function ReportRangeDayButton({ day, modifiers, className, ...props }) {
223745
224318
  }
223746
224319
 
223747
224320
  // Utility function to format date to YYYY-MM-DD
223748
- const formatDateToYYYYMMDD$2 = (date) => {
224321
+ const formatDateToYYYYMMDD$3 = (date) => {
223749
224322
  if (!date)
223750
224323
  return undefined;
223751
224324
  return date.toISOString().split('T')[0];
@@ -223806,8 +224379,8 @@ const useCourses = ({ tenantKey, mentorId, courseId, }) => {
223806
224379
  return ({
223807
224380
  metric: 'course',
223808
224381
  date_filter: enrollmentStatsDateFilter.activeFilter,
223809
- start_date: formatDateToYYYYMMDD$2((_a = enrollmentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
223810
- end_date: formatDateToYYYYMMDD$2((_b = enrollmentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224382
+ start_date: formatDateToYYYYMMDD$3((_a = enrollmentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224383
+ end_date: formatDateToYYYYMMDD$3((_b = enrollmentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
223811
224384
  include_overtime: true,
223812
224385
  platform_key: tenantKey,
223813
224386
  mentor_unique_id: mentorId,
@@ -223831,8 +224404,8 @@ const useCourses = ({ tenantKey, mentorId, courseId, }) => {
223831
224404
  content_id: courseId,
223832
224405
  metric: 'course',
223833
224406
  date_filter: timeSpentStatsDateFilter.activeFilter,
223834
- start_date: formatDateToYYYYMMDD$2((_a = timeSpentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
223835
- end_date: formatDateToYYYYMMDD$2((_b = timeSpentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224407
+ start_date: formatDateToYYYYMMDD$3((_a = timeSpentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224408
+ end_date: formatDateToYYYYMMDD$3((_b = timeSpentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
223836
224409
  include_overtime: true,
223837
224410
  platform_key: tenantKey,
223838
224411
  mentor_unique_id: mentorId,
@@ -224010,7 +224583,9 @@ function AnalyticsCourses({ tenantKey, mentorId, selectedMentorId, basePath = ''
224010
224583
  router.push(`${basePath}/courses/${courseId}`);
224011
224584
  };
224012
224585
  const hasEnrollmentStatsPoints = Number((_a = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _a === void 0 ? void 0 : _a.length) > 0;
224013
- return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.activeCourses'), value: courseStats.active_courses, percentage: courseStats.active_courses_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.totalCourses'), value: courseStats.total_courses, percentage: courseStats.total_courses_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.enrollments'), value: courseStats.enrollments, percentage: courseStats.enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.totalLearners'), value: courseStats.total_learners })] }), (isLoading || hasEnrollmentStatsPoints) && (jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsCourses.courseOvertime'), label: t('analyticsAnalyticsCourses.timeSpent'), filters: enrollmentStatsDateFilter, setOutsideFilters: setEnrollmentStatsDateFilter, children: isLoading ? (jsx(ChartLoading, {})) : (jsxs(LineChart, { data: ((_b = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _b === void 0 ? void 0 : _b.map((point) => ({
224586
+ return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.activeCourses'), value: courseStats.active_courses, percentage: courseStats.active_courses_percentage, description: t('analyticsAnalyticsCourses.activeCoursesDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.totalCourses'), value: courseStats.total_courses, percentage: courseStats.total_courses_percentage, description: t('analyticsAnalyticsCourses.totalCoursesDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.enrollments'), value: courseStats.enrollments, percentage: courseStats.enrollments_percentage, description: t('analyticsAnalyticsCourses.enrollmentsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.totalLearners'), value: courseStats.total_learners,
224587
+ //percentage={courseStats.enrollments_percentage}
224588
+ description: t('analyticsAnalyticsCourses.totalLearnersDescription') })] }), (isLoading || hasEnrollmentStatsPoints) && (jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsCourses.courseOvertime'), label: t('analyticsAnalyticsCourses.timeSpent'), filters: enrollmentStatsDateFilter, setOutsideFilters: setEnrollmentStatsDateFilter, description: t('analyticsAnalyticsCourses.courseOvertimeDescription'), children: isLoading ? (jsx(ChartLoading, {})) : (jsxs(LineChart, { data: ((_b = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _b === void 0 ? void 0 : _b.map((point) => ({
224014
224589
  date: formatDateToShortFormat$1(point.date, enrollmentStatsDateFilter.activeFilter === 'today'),
224015
224590
  value: formatSecondsToHours$1(point.value),
224016
224591
  rawSeconds: point.value,
@@ -224025,7 +224600,7 @@ function AnalyticsCourses({ tenantKey, mentorId, selectedMentorId, basePath = ''
224025
224600
  stroke: '#38A1E5',
224026
224601
  strokeWidth: 2,
224027
224602
  fill: 'white',
224028
- } })] })) }) })), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsCourses.coursesTableAriaLabel'), children: [jsx("h3", { className: "text-base font-medium text-gray-700 mb-4", children: t('analyticsAnalyticsCourses.coursesHeading') }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-course", type: "text", placeholder: t('analyticsAnalyticsCourses.searchPlaceholder'), value: coursesListSearch, onChange: handleSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsCourses.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsCourses.loading') }) })) : ((_d = coursesList === null || coursesList === void 0 ? void 0 : coursesList.courses) === null || _d === void 0 ? void 0 : _d.length) && coursesList.courses.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourses.colCourseName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourses.colCourseId') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourses.colEnrollments') })] }) }), jsx(TableBody, { children: coursesList.courses.map((course, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => handleCourseClick(course.id), role: "button", tabIndex: 0, onKeyDown: (e) => {
224603
+ } })] })) }) })), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsCourses.coursesTableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsCourses.coursesHeading') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsCourses.coursesHeading'), description: t('analyticsAnalyticsCourses.coursesTableDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-course", type: "text", placeholder: t('analyticsAnalyticsCourses.searchPlaceholder'), value: coursesListSearch, onChange: handleSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsCourses.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsCourses.loading') }) })) : ((_d = coursesList === null || coursesList === void 0 ? void 0 : coursesList.courses) === null || _d === void 0 ? void 0 : _d.length) && coursesList.courses.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourses.colCourseName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourses.colCourseId') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourses.colEnrollments') })] }) }), jsx(TableBody, { children: coursesList.courses.map((course, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => handleCourseClick(course.id), role: "button", tabIndex: 0, onKeyDown: (e) => {
224029
224604
  if (e.key === 'Enter' || e.key === ' ') {
224030
224605
  e.preventDefault();
224031
224606
  handleCourseClick(course.id);
@@ -224063,7 +224638,7 @@ function AnalyticsCourseDetail({ tenantKey, mentorId, selectedMentorId, courseId
224063
224638
  const [selectedEnrollment, setSelectedEnrollment] = useState(null);
224064
224639
  const resolvedCourseName = courseName || (courseInfo === null || courseInfo === void 0 ? void 0 : courseInfo.name);
224065
224640
  const showTitle = showCourseTitle && !!resolvedCourseName;
224066
- return (jsxs("div", { className: "space-y-8", children: [(onBack || showTitle) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (jsx(Button$1, { variant: "ghost", size: "icon", onClick: onBack, "aria-label": t('analyticsAnalyticsCourseDetail.goBackAriaLabel'), className: "h-8 w-8 rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) })) }), showTitle && (jsx("h2", { className: "flex-1 text-left text-2xl font-medium text-gray-700 sm:text-center", children: resolvedCourseName })), jsx("div", { className: "hidden flex-1 sm:block" })] })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourseDetail.activeEnrollments'), value: courseDetailStats.active_enrollments, percentage: courseDetailStats.active_enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourseDetail.completedEnrollments'), value: courseDetailStats.completed_enrollments, percentage: courseDetailStats.completed_enrollments_percentage })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsCourseDetail.courseEnrollmentsTableAriaLabel'), children: [jsx("h3", { className: "text-base font-medium text-gray-700 mb-4", children: t('analyticsAnalyticsCourseDetail.enrolledUsers') }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-enrolled-user", type: "text", placeholder: t('analyticsAnalyticsCourseDetail.searchPlaceholder'), value: courseEnrollmentsSearch, onChange: handleCourseEnrollmentsSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsCourseDetail.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsCourseDetail.loadingLabel') }) })) : ((_a = courseEnrollments === null || courseEnrollments === void 0 ? void 0 : courseEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) &&
224641
+ return (jsxs("div", { className: "space-y-8", children: [(onBack || showTitle) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (jsx(Button$1, { variant: "ghost", size: "icon", onClick: onBack, "aria-label": t('analyticsAnalyticsCourseDetail.goBackAriaLabel'), className: "h-8 w-8 rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) })) }), showTitle && (jsx("h2", { className: "flex-1 text-left text-2xl font-medium text-gray-700 sm:text-center", children: resolvedCourseName })), jsx("div", { className: "hidden flex-1 sm:block" })] })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourseDetail.activeEnrollments'), value: courseDetailStats.active_enrollments, percentage: courseDetailStats.active_enrollments_percentage, description: t('analyticsAnalyticsCourseDetail.activeEnrollmentsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourseDetail.completedEnrollments'), value: courseDetailStats.completed_enrollments, percentage: courseDetailStats.completed_enrollments_percentage, description: t('analyticsAnalyticsCourseDetail.completedEnrollmentsDescription') })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsCourseDetail.courseEnrollmentsTableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsCourseDetail.enrolledUsers') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsCourseDetail.enrolledUsers'), description: t('analyticsAnalyticsCourseDetail.enrolledUsersDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-enrolled-user", type: "text", placeholder: t('analyticsAnalyticsCourseDetail.searchPlaceholder'), value: courseEnrollmentsSearch, onChange: handleCourseEnrollmentsSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsCourseDetail.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsCourseDetail.loadingLabel') }) })) : ((_a = courseEnrollments === null || courseEnrollments === void 0 ? void 0 : courseEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) &&
224067
224642
  courseEnrollments.enrollments.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourseDetail.columnName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourseDetail.columnEmail') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourseDetail.columnEnrollmentDate') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourseDetail.columnLastActiveOn') })] }) }), jsx(TableBody, { children: courseEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => setSelectedEnrollment(enrollment), role: "button", tabIndex: 0, onKeyDown: (e) => {
224068
224643
  if (e.key === 'Enter' || e.key === ' ') {
224069
224644
  e.preventDefault();
@@ -224100,7 +224675,7 @@ function AnalyticsCourseDetail({ tenantKey, mentorId, selectedMentorId, courseId
224100
224675
  }
224101
224676
 
224102
224677
  // Utility function to format date to YYYY-MM-DD
224103
- const formatDateToYYYYMMDD$1 = (date) => {
224678
+ const formatDateToYYYYMMDD$2 = (date) => {
224104
224679
  if (!date)
224105
224680
  return undefined;
224106
224681
  return date.toISOString().split('T')[0];
@@ -224161,8 +224736,8 @@ const usePrograms = ({ tenantKey, mentorId, programId, }) => {
224161
224736
  return ({
224162
224737
  metric: 'program',
224163
224738
  date_filter: enrollmentStatsDateFilter.activeFilter,
224164
- start_date: formatDateToYYYYMMDD$1((_a = enrollmentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224165
- end_date: formatDateToYYYYMMDD$1((_b = enrollmentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224739
+ start_date: formatDateToYYYYMMDD$2((_a = enrollmentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224740
+ end_date: formatDateToYYYYMMDD$2((_b = enrollmentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224166
224741
  include_overtime: true,
224167
224742
  platform_key: tenantKey,
224168
224743
  mentor_unique_id: mentorId,
@@ -224186,8 +224761,8 @@ const usePrograms = ({ tenantKey, mentorId, programId, }) => {
224186
224761
  content_id: programId,
224187
224762
  metric: 'program',
224188
224763
  date_filter: timeSpentStatsDateFilter.activeFilter,
224189
- start_date: formatDateToYYYYMMDD$1((_a = timeSpentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224190
- end_date: formatDateToYYYYMMDD$1((_b = timeSpentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224764
+ start_date: formatDateToYYYYMMDD$2((_a = timeSpentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224765
+ end_date: formatDateToYYYYMMDD$2((_b = timeSpentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224191
224766
  include_overtime: true,
224192
224767
  platform_key: tenantKey,
224193
224768
  mentor_unique_id: mentorId,
@@ -224367,7 +224942,9 @@ function AnalyticsPrograms({ tenantKey, mentorId, selectedMentorId, basePath = '
224367
224942
  router.push(`${basePath}/programs/${programId}`);
224368
224943
  };
224369
224944
  const hasEnrollmentStatsPoints = Number((_a = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _a === void 0 ? void 0 : _a.length) > 0;
224370
- return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.activePrograms'), value: programStats.active_programs, percentage: programStats.active_programs_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.totalPrograms'), value: programStats.total_programs, percentage: programStats.total_programs_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.enrollments'), value: programStats.enrollments, percentage: programStats.enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.totalLearners'), value: programStats.total_learners })] }), (isLoading || hasEnrollmentStatsPoints) && (jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsPrograms.programOvertime'), label: t('analyticsAnalyticsPrograms.timeSpent'), filters: enrollmentStatsDateFilter, setOutsideFilters: setEnrollmentStatsDateFilter, children: isLoading ? (jsx(ChartLoading, {})) : (jsxs(LineChart, { data: ((_b = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _b === void 0 ? void 0 : _b.map((point) => ({
224945
+ return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.activePrograms'), value: programStats.active_programs, percentage: programStats.active_programs_percentage, description: t('analyticsAnalyticsPrograms.activeProgramsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.totalPrograms'), value: programStats.total_programs, percentage: programStats.total_programs_percentage, description: t('analyticsAnalyticsPrograms.totalProgramsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.enrollments'), value: programStats.enrollments, percentage: programStats.enrollments_percentage, description: t('analyticsAnalyticsPrograms.enrollmentsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.totalLearners'), value: programStats.total_learners,
224946
+ //percentage={programStats.enrollments_percentage}
224947
+ description: t('analyticsAnalyticsPrograms.totalLearnersDescription') })] }), (isLoading || hasEnrollmentStatsPoints) && (jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsPrograms.programOvertime'), label: t('analyticsAnalyticsPrograms.timeSpent'), filters: enrollmentStatsDateFilter, setOutsideFilters: setEnrollmentStatsDateFilter, description: t('analyticsAnalyticsPrograms.programOvertimeDescription'), children: isLoading ? (jsx(ChartLoading, {})) : (jsxs(LineChart, { data: ((_b = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _b === void 0 ? void 0 : _b.map((point) => ({
224371
224948
  date: formatDateToShortFormat(point.date, enrollmentStatsDateFilter.activeFilter === 'today'),
224372
224949
  value: formatSecondsToHours(point.value),
224373
224950
  rawSeconds: point.value,
@@ -224382,7 +224959,7 @@ function AnalyticsPrograms({ tenantKey, mentorId, selectedMentorId, basePath = '
224382
224959
  stroke: '#38A1E5',
224383
224960
  strokeWidth: 2,
224384
224961
  fill: 'white',
224385
- } })] })) }) })), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsPrograms.programsTableAriaLabel'), children: [jsx("h3", { className: "text-base font-medium text-gray-700 mb-4", children: t('analyticsAnalyticsPrograms.programs') }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-program", type: "text", placeholder: t('analyticsAnalyticsPrograms.searchPlaceholder'), value: programsListSearch, onChange: handleSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsPrograms.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsPrograms.loading') }) })) : ((_d = programsList === null || programsList === void 0 ? void 0 : programsList.programs) === null || _d === void 0 ? void 0 : _d.length) && programsList.programs.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsPrograms.programName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsPrograms.programId') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsPrograms.enrollments') })] }) }), jsx(TableBody, { children: programsList.programs.map((program, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => handleProgramClick(program.id), role: "button", tabIndex: 0, onKeyDown: (e) => {
224962
+ } })] })) }) })), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsPrograms.programsTableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsPrograms.programs') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsPrograms.programs'), description: t('analyticsAnalyticsPrograms.programsTableDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-program", type: "text", placeholder: t('analyticsAnalyticsPrograms.searchPlaceholder'), value: programsListSearch, onChange: handleSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsPrograms.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsPrograms.loading') }) })) : ((_d = programsList === null || programsList === void 0 ? void 0 : programsList.programs) === null || _d === void 0 ? void 0 : _d.length) && programsList.programs.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsPrograms.programName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsPrograms.programId') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsPrograms.enrollments') })] }) }), jsx(TableBody, { children: programsList.programs.map((program, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => handleProgramClick(program.id), role: "button", tabIndex: 0, onKeyDown: (e) => {
224386
224963
  if (e.key === 'Enter' || e.key === ' ') {
224387
224964
  e.preventDefault();
224388
224965
  handleProgramClick(program.id);
@@ -224419,7 +224996,7 @@ function AnalyticsProgramDetail({ tenantKey, mentorId, selectedMentorId, program
224419
224996
  });
224420
224997
  const [selectedEnrollment, setSelectedEnrollment] = useState(null);
224421
224998
  const resolvedProgramName = programName || (programInfo === null || programInfo === void 0 ? void 0 : programInfo.name);
224422
- return (jsxs("div", { className: "space-y-8", children: [(onBack || resolvedProgramName) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (jsx(Button$1, { variant: "ghost", size: "icon", onClick: onBack, "aria-label": t('analyticsAnalyticsProgramDetail.backAriaLabel'), className: "h-8 w-8 rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) })) }), resolvedProgramName && (jsx("h2", { className: "flex-1 truncate text-left text-2xl font-medium text-gray-700 sm:text-center", children: resolvedProgramName })), jsx("div", { className: "hidden flex-1 sm:block" })] })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statTotalEnrollments'), value: programDetailStats.enrollments, percentage: programDetailStats.enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statActiveEnrollments'), value: programDetailStats.active_enrollments, percentage: programDetailStats.active_enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statCompletedEnrollments'), value: programDetailStats.completed_enrollments, percentage: programDetailStats.completed_enrollments_percentage })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsProgramDetail.tableAriaLabel'), children: [jsx("h3", { className: "text-base font-medium text-gray-700 mb-4", children: t('analyticsAnalyticsProgramDetail.enrolledUsersHeading') }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-enrolled-user", type: "text", placeholder: t('analyticsAnalyticsProgramDetail.searchPlaceholder'), value: programEnrollmentsSearch, onChange: handleProgramEnrollmentsSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsProgramDetail.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsProgramDetail.loadingLabel') }) })) : ((_a = programEnrollments === null || programEnrollments === void 0 ? void 0 : programEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) &&
224999
+ return (jsxs("div", { className: "space-y-8", children: [(onBack || resolvedProgramName) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (jsx(Button$1, { variant: "ghost", size: "icon", onClick: onBack, "aria-label": t('analyticsAnalyticsProgramDetail.backAriaLabel'), className: "h-8 w-8 rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) })) }), resolvedProgramName && (jsx("h2", { className: "flex-1 truncate text-left text-2xl font-medium text-gray-700 sm:text-center", children: resolvedProgramName })), jsx("div", { className: "hidden flex-1 sm:block" })] })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statTotalEnrollments'), value: programDetailStats.enrollments, percentage: programDetailStats.enrollments_percentage, description: t('analyticsAnalyticsProgramDetail.statTotalEnrollmentsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statActiveEnrollments'), value: programDetailStats.active_enrollments, percentage: programDetailStats.active_enrollments_percentage, description: t('analyticsAnalyticsProgramDetail.statActiveEnrollmentsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statCompletedEnrollments'), value: programDetailStats.completed_enrollments, percentage: programDetailStats.completed_enrollments_percentage, description: t('analyticsAnalyticsProgramDetail.statCompletedEnrollmentsDescription') })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsProgramDetail.tableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsProgramDetail.enrolledUsersHeading') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsProgramDetail.enrolledUsersHeading'), description: t('analyticsAnalyticsProgramDetail.enrolledUsersDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-enrolled-user", type: "text", placeholder: t('analyticsAnalyticsProgramDetail.searchPlaceholder'), value: programEnrollmentsSearch, onChange: handleProgramEnrollmentsSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsProgramDetail.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsProgramDetail.loadingLabel') }) })) : ((_a = programEnrollments === null || programEnrollments === void 0 ? void 0 : programEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) &&
224423
225000
  programEnrollments.enrollments.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsProgramDetail.colName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsProgramDetail.colEmail') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsProgramDetail.colEnrollmentDate') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsProgramDetail.colLastActiveOn') })] }) }), jsx(TableBody, { children: programEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => setSelectedEnrollment(enrollment), role: "button", tabIndex: 0, onKeyDown: (e) => {
224424
225001
  if (e.key === 'Enter' || e.key === ' ') {
224425
225002
  e.preventDefault();
@@ -224599,10 +225176,10 @@ function statusBadgeStyle(status) {
224599
225176
  }
224600
225177
  }
224601
225178
  function AnalyticsMonetizationStats({ tenantKey }) {
224602
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
225179
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
224603
225180
  const t = useT();
224604
225181
  const { revenueData, isLoadingRevenue, paywallsData, isLoadingPaywalls, subscribersData, isLoadingSubscribers, paywallTypeFilter, setPaywallTypeFilter, subscriberStatusFilter, setSubscriberStatusFilter, paywallPage, setPaywallPage, subscriberPage, setSubscriberPage, statusDistribution, itemTypeDistribution, statusColors, itemTypeColors, } = useMonetization({ tenantKey });
224605
- return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoadingRevenue, title: t('analyticsAnalyticsMonetizationStats.totalRevenue'), value: Number((revenueData === null || revenueData === void 0 ? void 0 : revenueData.sales_volume) || 0).toLocaleString(), showDollarSign: true }), jsx(StatCard, { loading: isLoadingRevenue, title: t('analyticsAnalyticsMonetizationStats.totalSales'), value: (_a = revenueData === null || revenueData === void 0 ? void 0 : revenueData.sales_count) !== null && _a !== void 0 ? _a : 0 }), jsx(StatCard, { loading: isLoadingPaywalls, title: t('analyticsAnalyticsMonetizationStats.activePaywalls'), value: (_b = paywallsData === null || paywallsData === void 0 ? void 0 : paywallsData.count) !== null && _b !== void 0 ? _b : 0 }), jsx(StatCard, { loading: isLoadingSubscribers, title: t('analyticsAnalyticsMonetizationStats.totalSubscribers'), value: (_c = subscribersData === null || subscribersData === void 0 ? void 0 : subscribersData.count) !== null && _c !== void 0 ? _c : 0 })] }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [jsx(Card, { className: "w-full bg-white rounded-lg border border-gray-100 overflow-hidden shadow-sm", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsMonetizationStats.subscriptionStatusChartCardAriaLabel'), children: [jsx("div", { className: "mb-6", children: jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsMonetizationStats.subscribersByStatus') }) }), jsx("div", { className: "w-full", style: { height: '350px' }, children: jsx(ChartContainer, { title: t('analyticsAnalyticsMonetizationStats.subscribersByStatus'), config: {
225182
+ return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoadingRevenue, title: t('analyticsAnalyticsMonetizationStats.totalRevenue'), value: Number((revenueData === null || revenueData === void 0 ? void 0 : revenueData.sales_volume) || 0).toLocaleString(), showDollarSign: true, description: t('analyticsAnalyticsMonetizationStats.totalRevenueDescription') }), jsx(StatCard, { loading: isLoadingRevenue, title: t('analyticsAnalyticsMonetizationStats.totalSales'), value: (_a = revenueData === null || revenueData === void 0 ? void 0 : revenueData.sales_count) !== null && _a !== void 0 ? _a : 0, description: t('analyticsAnalyticsMonetizationStats.totalSalesDescription') }), jsx(StatCard, { loading: isLoadingPaywalls, title: t('analyticsAnalyticsMonetizationStats.activePaywalls'), value: (_b = paywallsData === null || paywallsData === void 0 ? void 0 : paywallsData.count) !== null && _b !== void 0 ? _b : 0, description: t('analyticsAnalyticsMonetizationStats.activePaywallsDescription') }), jsx(StatCard, { loading: isLoadingSubscribers, title: t('analyticsAnalyticsMonetizationStats.totalSubscribers'), value: (_c = subscribersData === null || subscribersData === void 0 ? void 0 : subscribersData.count) !== null && _c !== void 0 ? _c : 0, description: t('analyticsAnalyticsMonetizationStats.totalSubscribersDescription') })] }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [jsx(Card, { className: "w-full bg-white rounded-lg border border-gray-100 overflow-hidden shadow-sm", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsMonetizationStats.subscriptionStatusChartCardAriaLabel'), children: [jsx("div", { className: "mb-6", children: jsxs("div", { className: "flex items-center gap-1", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsMonetizationStats.subscribersByStatus') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsMonetizationStats.subscribersByStatus'), description: t('analyticsAnalyticsMonetizationStats.subscribersByStatusDescription') })] }) }), jsx("div", { className: "w-full", style: { height: '350px' }, children: jsx(ChartContainer, { title: t('analyticsAnalyticsMonetizationStats.subscribersByStatus'), config: {
224606
225183
  value: {
224607
225184
  label: t('analyticsAnalyticsMonetizationStats.subscribersLabel'),
224608
225185
  color: '#38A1E5',
@@ -224616,7 +225193,7 @@ function AnalyticsMonetizationStats({ tenantKey }) {
224616
225193
  return null;
224617
225194
  const data = (_a = payload[0]) === null || _a === void 0 ? void 0 : _a.payload;
224618
225195
  return (jsxs("div", { className: "bg-background border border-border rounded-md p-3 shadow-lg z-50", style: { borderColor: 'oklch(.922 0 0)' }, role: "tooltip", tabIndex: -1, children: [jsx("div", { className: "font-medium text-foreground mb-2 text-base capitalize", children: data === null || data === void 0 ? void 0 : data.name }), jsx("div", { className: "space-y-2 text-sm", children: jsxs("div", { className: "flex justify-between items-center gap-4", children: [jsx("span", { className: "text-muted-foreground", children: t('analyticsAnalyticsMonetizationStats.subscribersTooltipLabel') }), jsx("span", { className: "font-medium text-foreground", children: data === null || data === void 0 ? void 0 : data.value })] }) })] }));
224619
- }, wrapperStyle: { outline: 'none' } })] })) : (jsx(EmptyStats, {})) }) }) })] }) }), jsx(Card, { className: "w-full bg-white rounded-lg border border-gray-100 overflow-hidden shadow-sm", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsMonetizationStats.paywallItemTypeChartCardAriaLabel'), children: [jsx("div", { className: "mb-6", children: jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsMonetizationStats.paywallsByType') }) }), jsx("div", { className: "w-full", style: { height: '350px' }, children: jsx(ChartContainer, { title: t('analyticsAnalyticsMonetizationStats.paywallsByType'), config: {
225196
+ }, wrapperStyle: { outline: 'none' } })] })) : (jsx(EmptyStats, {})) }) }) })] }) }), jsx(Card, { className: "w-full bg-white rounded-lg border border-gray-100 overflow-hidden shadow-sm", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsMonetizationStats.paywallItemTypeChartCardAriaLabel'), children: [jsx("div", { className: "mb-6", children: jsxs("div", { className: "flex items-center gap-1", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsMonetizationStats.paywallsByType') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsMonetizationStats.paywallsByType'), description: t('analyticsAnalyticsMonetizationStats.paywallsByTypeDescription') })] }) }), jsx("div", { className: "w-full", style: { height: '350px' }, children: jsx(ChartContainer, { title: t('analyticsAnalyticsMonetizationStats.paywallsByType'), config: {
224620
225197
  value: {
224621
225198
  label: t('analyticsAnalyticsMonetizationStats.paywallsLabel'),
224622
225199
  color: '#38A1E5',
@@ -224630,28 +225207,32 @@ function AnalyticsMonetizationStats({ tenantKey }) {
224630
225207
  return null;
224631
225208
  const data = (_a = payload[0]) === null || _a === void 0 ? void 0 : _a.payload;
224632
225209
  return (jsxs("div", { className: "bg-background border border-border rounded-md p-3 shadow-lg z-50", style: { borderColor: 'oklch(.922 0 0)' }, role: "tooltip", tabIndex: -1, children: [jsx("div", { className: "font-medium text-foreground mb-2 text-base capitalize", children: data === null || data === void 0 ? void 0 : data.name }), jsx("div", { className: "space-y-2 text-sm", children: jsxs("div", { className: "flex justify-between items-center gap-4", children: [jsx("span", { className: "text-muted-foreground", children: t('analyticsAnalyticsMonetizationStats.paywallsTooltipLabel') }), jsx("span", { className: "font-medium text-foreground", children: data === null || data === void 0 ? void 0 : data.value })] }) })] }));
224633
- }, wrapperStyle: { outline: 'none' } })] })) : (jsx(EmptyStats, {})) }) }) })] }) })] }), jsx(Card, { className: "w-full bg-white rounded-lg border border-gray-100 overflow-hidden shadow-sm", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsMonetizationStats.subscribersTableCardAriaLabel'), children: [jsx("div", { className: "mb-4", children: jsxs("div", { className: "flex items-center justify-between", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsMonetizationStats.subscribersSectionHeading', {
224634
- count: (_d = subscribersData === null || subscribersData === void 0 ? void 0 : subscribersData.count) !== null && _d !== void 0 ? _d : 0,
224635
- }) }), jsxs(Select$1, { value: subscriberStatusFilter, onValueChange: (v) => {
225210
+ }, wrapperStyle: { outline: 'none' } })] })) : (jsx(EmptyStats, {})) }) }) })] }) })] }), jsx(Card, { className: "w-full bg-white rounded-lg border border-gray-100 overflow-hidden shadow-sm", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsMonetizationStats.subscribersTableCardAriaLabel'), children: [jsx("div", { className: "mb-4", children: jsxs("div", { className: "flex items-center justify-between", children: [jsxs("div", { className: "flex items-center gap-1", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsMonetizationStats.subscribersSectionHeading', {
225211
+ count: (_d = subscribersData === null || subscribersData === void 0 ? void 0 : subscribersData.count) !== null && _d !== void 0 ? _d : 0,
225212
+ }) }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsMonetizationStats.subscribersSectionHeading', {
225213
+ count: (_e = subscribersData === null || subscribersData === void 0 ? void 0 : subscribersData.count) !== null && _e !== void 0 ? _e : 0,
225214
+ }), description: t('analyticsAnalyticsMonetizationStats.subscribersTableDescription') })] }), jsxs(Select$1, { value: subscriberStatusFilter, onValueChange: (v) => {
224636
225215
  setSubscriberStatusFilter(v);
224637
225216
  setSubscriberPage(1);
224638
- }, children: [jsx(SelectTrigger, { className: "w-[130px]", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: "all", children: t('analyticsAnalyticsMonetizationStats.filterAll') }), jsx(SelectItem, { value: "active", children: t('analyticsAnalyticsMonetizationStats.filterActive') }), jsx(SelectItem, { value: "trialing", children: t('analyticsAnalyticsMonetizationStats.filterTrialing') }), jsx(SelectItem, { value: "canceled", children: t('analyticsAnalyticsMonetizationStats.filterCanceled') }), jsx(SelectItem, { value: "past_due", children: t('analyticsAnalyticsMonetizationStats.filterPastDue') })] })] })] }) }), jsx("div", { className: "rounded-md overflow-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "w-[250px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadItem') }), jsx(TableHead, { className: "w-[100px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadType') }), jsx(TableHead, { className: "w-[120px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadPlan') }), jsx(TableHead, { className: "w-[100px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadAmount') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsMonetizationStats.tableHeadStatus') })] }) }), jsx(TableBody, { children: (_e = subscribersData === null || subscribersData === void 0 ? void 0 : subscribersData.results) === null || _e === void 0 ? void 0 : _e.map((sub, index) => {
225217
+ }, children: [jsx(SelectTrigger, { className: "w-[130px]", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: "all", children: t('analyticsAnalyticsMonetizationStats.filterAll') }), jsx(SelectItem, { value: "active", children: t('analyticsAnalyticsMonetizationStats.filterActive') }), jsx(SelectItem, { value: "trialing", children: t('analyticsAnalyticsMonetizationStats.filterTrialing') }), jsx(SelectItem, { value: "canceled", children: t('analyticsAnalyticsMonetizationStats.filterCanceled') }), jsx(SelectItem, { value: "past_due", children: t('analyticsAnalyticsMonetizationStats.filterPastDue') })] })] })] }) }), jsx("div", { className: "rounded-md overflow-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "w-[250px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadItem') }), jsx(TableHead, { className: "w-[100px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadType') }), jsx(TableHead, { className: "w-[120px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadPlan') }), jsx(TableHead, { className: "w-[100px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadAmount') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsMonetizationStats.tableHeadStatus') })] }) }), jsx(TableBody, { children: (_f = subscribersData === null || subscribersData === void 0 ? void 0 : subscribersData.results) === null || _f === void 0 ? void 0 : _f.map((sub, index) => {
224639
225218
  var _a, _b, _c;
224640
225219
  return (jsxs(TableRow, { className: cn(index % 2 === 0 ? 'bg-gray-50' : '', 'h-[48px]'), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: sub.item_name || sub.item_id }), jsx(TableCell, { children: jsx(Badge, { variant: "secondary", className: "text-xs capitalize", children: sub.item_type }) }), jsx(TableCell, { children: (_a = sub.price) === null || _a === void 0 ? void 0 : _a.name }), jsx(TableCell, { children: sub.status === 'grandfathered' ? null : (jsxs(Fragment$1, { children: ["$", (_b = sub.price) === null || _b === void 0 ? void 0 : _b.amount, ((_c = sub.price) === null || _c === void 0 ? void 0 : _c.interval) && sub.price.interval !== 'one_time'
224641
225220
  ? `/${sub.price.interval}`
224642
225221
  : ''] })) }), jsx(TableCell, { className: "text-right", children: jsx(Badge, { className: statusBadgeStyle(sub.status), children: sub.status }) })] }, sub.unique_id));
224643
- }) })] }) }), (!((_f = subscribersData === null || subscribersData === void 0 ? void 0 : subscribersData.results) === null || _f === void 0 ? void 0 : _f.length) || ((_g = subscribersData === null || subscribersData === void 0 ? void 0 : subscribersData.results) === null || _g === void 0 ? void 0 : _g.length) === 0) && (jsx("div", { className: "h-[60px]", children: jsx(EmptyStats, {}) })), subscribersData &&
225222
+ }) })] }) }), (!((_g = subscribersData === null || subscribersData === void 0 ? void 0 : subscribersData.results) === null || _g === void 0 ? void 0 : _g.length) || ((_h = subscribersData === null || subscribersData === void 0 ? void 0 : subscribersData.results) === null || _h === void 0 ? void 0 : _h.length) === 0) && (jsx("div", { className: "h-[60px]", children: jsx(EmptyStats, {}) })), subscribersData &&
224644
225223
  (subscribersData.previous_page !== null || subscribersData.next_page !== null) && (jsxs("div", { className: "flex items-center justify-between py-3", children: [jsx("div", { className: "text-sm text-gray-700", children: t('analyticsAnalyticsMonetizationStats.subscriberCountTotal', {
224645
225224
  count: subscribersData.count,
224646
225225
  plural: subscribersData.count !== 1 ? 's' : '',
224647
225226
  }) }), jsxs("div", { className: "flex items-center space-x-2", children: [jsx(Button$1, { variant: "outline", size: "sm", className: "h-8 text-xs", disabled: subscribersData.previous_page === null, onClick: () => subscribersData.previous_page !== null &&
224648
225227
  setSubscriberPage(subscribersData.previous_page), children: t('analyticsAnalyticsMonetizationStats.previous') }), jsx("span", { className: "text-xs text-gray-500", children: t('analyticsAnalyticsMonetizationStats.pageLabel', { page: subscriberPage }) }), jsx(Button$1, { variant: "outline", size: "sm", className: "h-8 text-xs", disabled: subscribersData.next_page === null, onClick: () => subscribersData.next_page !== null &&
224649
- setSubscriberPage(subscribersData.next_page), children: t('analyticsAnalyticsMonetizationStats.next') })] })] }))] }) }), jsx(Card, { className: "w-full bg-white rounded-lg border border-gray-100 overflow-hidden shadow-sm", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsMonetizationStats.paywallsTableCardAriaLabel'), children: [jsx("div", { className: "mb-4", children: jsxs("div", { className: "flex items-center justify-between", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsMonetizationStats.configuredPaywalls', {
224650
- count: (_h = paywallsData === null || paywallsData === void 0 ? void 0 : paywallsData.count) !== null && _h !== void 0 ? _h : 0,
224651
- }) }), jsxs(Select$1, { value: paywallTypeFilter, onValueChange: (v) => {
225228
+ setSubscriberPage(subscribersData.next_page), children: t('analyticsAnalyticsMonetizationStats.next') })] })] }))] }) }), jsx(Card, { className: "w-full bg-white rounded-lg border border-gray-100 overflow-hidden shadow-sm", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsMonetizationStats.paywallsTableCardAriaLabel'), children: [jsx("div", { className: "mb-4", children: jsxs("div", { className: "flex items-center justify-between", children: [jsxs("div", { className: "flex items-center gap-1", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsMonetizationStats.configuredPaywalls', {
225229
+ count: (_j = paywallsData === null || paywallsData === void 0 ? void 0 : paywallsData.count) !== null && _j !== void 0 ? _j : 0,
225230
+ }) }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsMonetizationStats.configuredPaywalls', {
225231
+ count: (_k = paywallsData === null || paywallsData === void 0 ? void 0 : paywallsData.count) !== null && _k !== void 0 ? _k : 0,
225232
+ }), description: t('analyticsAnalyticsMonetizationStats.paywallsTableDescription') })] }), jsxs(Select$1, { value: paywallTypeFilter, onValueChange: (v) => {
224652
225233
  setPaywallTypeFilter(v);
224653
225234
  setPaywallPage(1);
224654
- }, children: [jsx(SelectTrigger, { className: "w-[130px]", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: "all", children: t('analyticsAnalyticsMonetizationStats.filterAllTypes') }), jsx(SelectItem, { value: "mentor", children: t('analyticsAnalyticsMonetizationStats.filterAgent') }), jsx(SelectItem, { value: "course", children: t('analyticsAnalyticsMonetizationStats.filterCourse') })] })] })] }) }), jsx("div", { className: "rounded-md overflow-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "w-[250px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadItem') }), jsx(TableHead, { className: "w-[100px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadType') }), jsx(TableHead, { className: "w-[100px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadPrices') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsMonetizationStats.tableHeadStatus') })] }) }), jsx(TableBody, { children: (_j = paywallsData === null || paywallsData === void 0 ? void 0 : paywallsData.results) === null || _j === void 0 ? void 0 : _j.map((pw, index) => {
225235
+ }, children: [jsx(SelectTrigger, { className: "w-[130px]", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: "all", children: t('analyticsAnalyticsMonetizationStats.filterAllTypes') }), jsx(SelectItem, { value: "mentor", children: t('analyticsAnalyticsMonetizationStats.filterAgent') }), jsx(SelectItem, { value: "course", children: t('analyticsAnalyticsMonetizationStats.filterCourse') })] })] })] }) }), jsx("div", { className: "rounded-md overflow-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "w-[250px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadItem') }), jsx(TableHead, { className: "w-[100px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadType') }), jsx(TableHead, { className: "w-[100px]", children: t('analyticsAnalyticsMonetizationStats.tableHeadPrices') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsMonetizationStats.tableHeadStatus') })] }) }), jsx(TableBody, { children: (_l = paywallsData === null || paywallsData === void 0 ? void 0 : paywallsData.results) === null || _l === void 0 ? void 0 : _l.map((pw, index) => {
224655
225236
  var _a, _b;
224656
225237
  return (jsxs(TableRow, { className: cn(index % 2 === 0 ? 'bg-gray-50' : '', 'h-[48px]'), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: pw.item_name || pw.item_id }), jsx(TableCell, { children: jsx(Badge, { variant: "secondary", className: "text-xs capitalize", children: pw.item_type }) }), jsx(TableCell, { children: t('analyticsAnalyticsMonetizationStats.activePricesCount', {
224657
225238
  count: (_b = (_a = pw.prices) === null || _a === void 0 ? void 0 : _a.filter((p) => p.is_active).length) !== null && _b !== void 0 ? _b : 0,
@@ -224660,7 +225241,7 @@ function AnalyticsMonetizationStats({ tenantKey }) {
224660
225241
  : 'bg-gray-100 text-gray-500 border-gray-200 hover:bg-gray-100', children: pw.is_enabled
224661
225242
  ? t('analyticsAnalyticsMonetizationStats.statusActive')
224662
225243
  : t('analyticsAnalyticsMonetizationStats.statusDisabled') }) })] }, `${pw.item_type}-${pw.item_id}`));
224663
- }) })] }) }), (!((_k = paywallsData === null || paywallsData === void 0 ? void 0 : paywallsData.results) === null || _k === void 0 ? void 0 : _k.length) || ((_l = paywallsData === null || paywallsData === void 0 ? void 0 : paywallsData.results) === null || _l === void 0 ? void 0 : _l.length) === 0) && (jsx("div", { className: "h-[60px]", children: jsx(EmptyStats, {}) })), paywallsData &&
225244
+ }) })] }) }), (!((_m = paywallsData === null || paywallsData === void 0 ? void 0 : paywallsData.results) === null || _m === void 0 ? void 0 : _m.length) || ((_o = paywallsData === null || paywallsData === void 0 ? void 0 : paywallsData.results) === null || _o === void 0 ? void 0 : _o.length) === 0) && (jsx("div", { className: "h-[60px]", children: jsx(EmptyStats, {}) })), paywallsData &&
224664
225245
  (paywallsData.previous_page !== null || paywallsData.next_page !== null) && (jsxs("div", { className: "flex items-center justify-between py-3", children: [jsx("div", { className: "text-sm text-gray-700", children: t('analyticsAnalyticsMonetizationStats.paywallCountTotal', {
224665
225246
  count: paywallsData.count,
224666
225247
  plural: paywallsData.count !== 1 ? 's' : '',
@@ -224668,7 +225249,7 @@ function AnalyticsMonetizationStats({ tenantKey }) {
224668
225249
  setPaywallPage(paywallsData.previous_page), children: t('analyticsAnalyticsMonetizationStats.previous') }), jsx("span", { className: "text-xs text-gray-500", children: t('analyticsAnalyticsMonetizationStats.pageLabel', { page: paywallPage }) }), jsx(Button$1, { variant: "outline", size: "sm", className: "h-8 text-xs", disabled: paywallsData.next_page === null, onClick: () => paywallsData.next_page !== null && setPaywallPage(paywallsData.next_page), children: t('analyticsAnalyticsMonetizationStats.next') })] })] }))] }) })] }));
224669
225250
  }
224670
225251
 
224671
- const formatDateToYYYYMMDD = (date) => {
225252
+ const formatDateToYYYYMMDD$1 = (date) => {
224672
225253
  if (!date)
224673
225254
  return undefined;
224674
225255
  return date.toISOString().split('T')[0];
@@ -224698,8 +225279,8 @@ const useAuditLog = ({ tenantKey, userId, mentorId, }) => {
224698
225279
  ...(mentorId ? { mentor: mentorId } : {}),
224699
225280
  ...(actionFilter !== undefined ? { action: actionFilter } : {}),
224700
225281
  ...(actorFilter ? { actor_email: actorFilter } : {}),
224701
- ...((dateRange === null || dateRange === void 0 ? void 0 : dateRange.from) ? { from_date: formatDateToYYYYMMDD(dateRange.from) } : {}),
224702
- ...((dateRange === null || dateRange === void 0 ? void 0 : dateRange.to) ? { to_date: formatDateToYYYYMMDD(dateRange.to) } : {}),
225282
+ ...((dateRange === null || dateRange === void 0 ? void 0 : dateRange.from) ? { from_date: formatDateToYYYYMMDD$1(dateRange.from) } : {}),
225283
+ ...((dateRange === null || dateRange === void 0 ? void 0 : dateRange.to) ? { to_date: formatDateToYYYYMMDD$1(dateRange.to) } : {}),
224703
225284
  };
224704
225285
  const { data, isLoading, error, isFetching } = useGetAuditLogsQuery({
224705
225286
  org: tenantKey,
@@ -224735,6 +225316,467 @@ const useAuditLog = ({ tenantKey, userId, mentorId, }) => {
224735
225316
  };
224736
225317
  };
224737
225318
 
225319
+ function Sheet({ ...props }) {
225320
+ return jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
225321
+ }
225322
+ function SheetPortal({ ...props }) {
225323
+ return jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
225324
+ }
225325
+ function SheetOverlay({ className, ...props }) {
225326
+ return (jsx(DialogPrimitive.Overlay, { "data-slot": "sheet-overlay", 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/50', className), ...props }));
225327
+ }
225328
+ function SheetContent({ className, children, side = 'right', ...props }) {
225329
+ const t = useT();
225330
+ return (jsxs(SheetPortal, { children: [jsx(SheetOverlay, {}), jsxs(DialogPrimitive.Content, { "data-slot": "sheet-content", className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500', side === 'right' &&
225331
+ 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm', side === 'left' &&
225332
+ 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm', side === 'top' &&
225333
+ 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b', side === 'bottom' &&
225334
+ 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t', className), ...props, children: [children, jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [jsx(X$1, { className: "size-4" }), jsx("span", { className: "sr-only", children: t('uiSheet.close') })] })] })] }));
225335
+ }
225336
+ function SheetHeader({ className, ...props }) {
225337
+ return (jsx("div", { "data-slot": "sheet-header", className: cn('flex flex-col gap-1.5 p-4', className), ...props }));
225338
+ }
225339
+ function SheetTitle({ className, ...props }) {
225340
+ return (jsx(DialogPrimitive.Title, { "data-slot": "sheet-title", className: cn('text-foreground font-semibold', className), ...props }));
225341
+ }
225342
+ function SheetDescription({ className, ...props }) {
225343
+ return (jsx(DialogPrimitive.Description, { "data-slot": "sheet-description", className: cn('text-muted-foreground text-sm', className), ...props }));
225344
+ }
225345
+
225346
+ /**
225347
+ * Generic renderer for the free-form JSON the audit trail carries in
225348
+ * `changes` (CRUD entries) and `metadata` (manual events). Neither field has a
225349
+ * guaranteed shape, so nothing here assumes flat key/value pairs: objects and
225350
+ * arrays nest recursively, unknown keys render as-is, and non-JSON values fall
225351
+ * back to their string form rather than throwing.
225352
+ */
225353
+ /** Levels expanded on first render; deeper nodes start collapsed. */
225354
+ const AUTO_EXPAND_DEPTH = 2;
225355
+ /**
225356
+ * Hard stop for pathological payloads. JSON can't be cyclic, but a deeply
225357
+ * nested blob would still render thousands of rows and lock the tab.
225358
+ */
225359
+ const MAX_DEPTH = 20;
225360
+ function isPlainObject(value) {
225361
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
225362
+ }
225363
+ function isBranch(value) {
225364
+ return Array.isArray(value) || isPlainObject(value);
225365
+ }
225366
+ /** Renders a leaf value with a type-appropriate style. */
225367
+ function JsonLeaf({ value }) {
225368
+ const t = useT();
225369
+ if (value === null) {
225370
+ return (jsx("span", { className: "font-mono text-xs text-gray-400", children: t('analyticsAuditLogJsonView.null') }));
225371
+ }
225372
+ if (value === undefined) {
225373
+ return (jsx("span", { className: "font-mono text-xs text-gray-400", children: t('analyticsAuditLogJsonView.empty') }));
225374
+ }
225375
+ if (typeof value === 'boolean') {
225376
+ return jsx("span", { className: "font-mono text-xs text-purple-700", children: String(value) });
225377
+ }
225378
+ if (typeof value === 'number') {
225379
+ return jsx("span", { className: "font-mono text-xs text-blue-700", children: String(value) });
225380
+ }
225381
+ if (typeof value === 'string') {
225382
+ if (value === '') {
225383
+ return (jsx("span", { className: "font-mono text-xs text-gray-400", children: t('analyticsAuditLogJsonView.emptyString') }));
225384
+ }
225385
+ return (jsx("span", { className: "font-mono text-xs break-all whitespace-pre-wrap text-gray-800", children: value }));
225386
+ }
225387
+ // Functions, symbols and bigints can't come out of `JSON.parse`, but the
225388
+ // renderer is public API — degrade instead of crashing.
225389
+ return jsx("span", { className: "font-mono text-xs break-all text-gray-800", children: String(value) });
225390
+ }
225391
+ function JsonBranch({ label, value, depth }) {
225392
+ const t = useT();
225393
+ const [isOpen, setIsOpen] = useState(depth < AUTO_EXPAND_DEPTH);
225394
+ const entries = Array.isArray(value)
225395
+ ? value.map((item, index) => [String(index), item])
225396
+ : Object.entries(value);
225397
+ const summary = Array.isArray(value)
225398
+ ? t('analyticsAuditLogJsonView.itemCount', { count: entries.length })
225399
+ : t('analyticsAuditLogJsonView.keyCount', { count: entries.length });
225400
+ if (entries.length === 0) {
225401
+ return (jsxs("div", { className: "flex flex-wrap items-baseline gap-2 py-1", children: [jsx("span", { className: "font-mono text-xs font-medium text-gray-600", children: label }), jsx("span", { className: "font-mono text-xs text-gray-400", children: Array.isArray(value)
225402
+ ? t('analyticsAuditLogJsonView.emptyList')
225403
+ : t('analyticsAuditLogJsonView.emptyObject') })] }));
225404
+ }
225405
+ return (jsxs("div", { className: "py-0.5", children: [jsxs("button", { type: "button", onClick: () => setIsOpen((open) => !open), "aria-expanded": isOpen, className: "flex items-center gap-1 rounded text-left hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500", children: [isOpen ? (jsx(ChevronDown, { className: "h-3.5 w-3.5 shrink-0 text-gray-400", "aria-hidden": "true" })) : (jsx(ChevronRight, { className: "h-3.5 w-3.5 shrink-0 text-gray-400", "aria-hidden": "true" })), jsx("span", { className: "font-mono text-xs font-medium text-gray-600", children: label }), jsx("span", { className: "font-mono text-[11px] text-gray-400", children: summary })] }), isOpen && (jsx("div", { className: "ml-2 border-l border-gray-200 pl-3", children: entries.map(([childKey, childValue]) => (jsx(JsonNode, { label: childKey, value: childValue, depth: depth + 1 }, childKey))) }))] }));
225406
+ }
225407
+ function JsonNode({ label, value, depth }) {
225408
+ const t = useT();
225409
+ if (depth >= MAX_DEPTH) {
225410
+ return (jsxs("div", { className: "flex flex-wrap items-baseline gap-2 py-1", children: [jsx("span", { className: "font-mono text-xs font-medium text-gray-600", children: label }), jsx("span", { className: "font-mono text-xs text-gray-400", children: t('analyticsAuditLogJsonView.truncated') })] }));
225411
+ }
225412
+ if (isBranch(value)) {
225413
+ return jsx(JsonBranch, { label: label, value: value, depth: depth });
225414
+ }
225415
+ return (jsxs("div", { className: "flex flex-wrap items-baseline gap-2 py-1", children: [jsx("span", { className: "font-mono text-xs font-medium text-gray-600", children: label }), jsx(JsonLeaf, { value: value })] }));
225416
+ }
225417
+ function AuditLogJsonView({ value, className, emptyLabel }) {
225418
+ const t = useT();
225419
+ const isEmpty = value === null ||
225420
+ value === undefined ||
225421
+ (isPlainObject(value) && Object.keys(value).length === 0) ||
225422
+ (Array.isArray(value) && value.length === 0);
225423
+ if (isEmpty) {
225424
+ return (jsx("p", { className: cn('text-sm text-gray-500', className), children: emptyLabel !== null && emptyLabel !== void 0 ? emptyLabel : t('analyticsAuditLogJsonView.noPayload') }));
225425
+ }
225426
+ // A bare scalar payload still deserves to render rather than be dropped.
225427
+ if (!isBranch(value)) {
225428
+ return (jsx("div", { className: cn('rounded-md border border-gray-200 bg-gray-50 p-3', className), children: jsx(JsonLeaf, { value: value }) }));
225429
+ }
225430
+ const entries = Array.isArray(value)
225431
+ ? value.map((item, index) => [String(index), item])
225432
+ : Object.entries(value);
225433
+ return (jsx("div", { className: cn('rounded-md border border-gray-200 bg-gray-50 p-3', className), children: entries.map(([key, childValue]) => (jsx(JsonNode, { label: key, value: childValue, depth: 0 }, key))) }));
225434
+ }
225435
+ /**
225436
+ * `changes` usually arrives as `{ field: [old, new] }`, which reads far better
225437
+ * as a before/after table than as a JSON tree. Fields that don't match the
225438
+ * tuple shape (nested objects, single values, longer arrays) fall through to
225439
+ * the generic renderer, so a schema drift degrades instead of breaking.
225440
+ */
225441
+ function AuditLogChangesView({ changes }) {
225442
+ const t = useT();
225443
+ if (!isPlainObject(changes) || Object.keys(changes).length === 0) {
225444
+ return (jsx(AuditLogJsonView, { value: changes, emptyLabel: t('analyticsAuditLogJsonView.noChanges') }));
225445
+ }
225446
+ const entries = Object.entries(changes);
225447
+ const tupleEntries = entries.filter(([, change]) => Array.isArray(change) && change.length === 2 && !change.some(isBranch));
225448
+ const otherEntries = entries.filter(([key]) => !tupleEntries.some(([k]) => k === key));
225449
+ return (jsxs("div", { className: "space-y-3", children: [tupleEntries.length > 0 && (jsx("div", { className: "overflow-hidden rounded-md border border-gray-200", children: jsxs("table", { className: "w-full table-fixed border-collapse text-left text-xs", children: [jsx("thead", { children: jsxs("tr", { className: "bg-gray-50 text-gray-500", children: [jsx("th", { className: "w-1/3 p-2 font-medium", children: t('analyticsAuditLogJsonView.fieldColumn') }), jsx("th", { className: "w-1/3 p-2 font-medium", children: t('analyticsAuditLogJsonView.beforeColumn') }), jsx("th", { className: "w-1/3 p-2 font-medium", children: t('analyticsAuditLogJsonView.afterColumn') })] }) }), jsx("tbody", { children: tupleEntries.map(([field, change]) => {
225450
+ const [before, after] = change;
225451
+ return (jsxs("tr", { className: "border-t border-gray-200 align-top", children: [jsx("td", { className: "p-2 font-mono break-all text-gray-700", children: field }), jsx("td", { className: "p-2", children: jsx(JsonLeaf, { value: before }) }), jsx("td", { className: "p-2", children: jsx(JsonLeaf, { value: after }) })] }, field));
225452
+ }) })] }) })), otherEntries.length > 0 && jsx(AuditLogJsonView, { value: Object.fromEntries(otherEntries) })] }));
225453
+ }
225454
+
225455
+ /**
225456
+ * Formatting helpers shared by the platform-scoped audit trail views.
225457
+ *
225458
+ * Timestamps are rendered through `Intl.DateTimeFormat` with an explicit
225459
+ * `timeZone` rather than the browser default, so an admin reviewing a trail
225460
+ * reads the times in the platform's zone wherever they happen to be sitting.
225461
+ */
225462
+ const UTC = 'UTC';
225463
+ /** `Intl` throws on an unknown zone, so probe before trusting a value. */
225464
+ function isValidTimeZone(value) {
225465
+ if (!value)
225466
+ return false;
225467
+ try {
225468
+ new Intl.DateTimeFormat(undefined, { timeZone: value });
225469
+ return true;
225470
+ }
225471
+ catch (_a) {
225472
+ return false;
225473
+ }
225474
+ }
225475
+ /**
225476
+ * Picks the zone to render in: the platform's configured zone when the host
225477
+ * supplies one, then the viewer's own zone, and UTC as the last resort so the
225478
+ * column is never ambiguous.
225479
+ */
225480
+ function resolveAuditTimeZone(preferred) {
225481
+ if (isValidTimeZone(preferred))
225482
+ return preferred;
225483
+ try {
225484
+ const local = Intl.DateTimeFormat().resolvedOptions().timeZone;
225485
+ if (isValidTimeZone(local))
225486
+ return local;
225487
+ }
225488
+ catch (_a) {
225489
+ /* fall through to UTC */
225490
+ }
225491
+ return UTC;
225492
+ }
225493
+ /** e.g. `Jan 15, 2024, 10:30 AM`. Returns the raw input if it can't be parsed. */
225494
+ function formatAuditTimestamp(timestamp, timeZone) {
225495
+ const date = new Date(timestamp);
225496
+ if (Number.isNaN(date.getTime()))
225497
+ return timestamp;
225498
+ try {
225499
+ return new Intl.DateTimeFormat(undefined, {
225500
+ timeZone,
225501
+ year: 'numeric',
225502
+ month: 'short',
225503
+ day: '2-digit',
225504
+ hour: 'numeric',
225505
+ minute: '2-digit',
225506
+ second: '2-digit',
225507
+ }).format(date);
225508
+ }
225509
+ catch (_a) {
225510
+ return date.toISOString();
225511
+ }
225512
+ }
225513
+ /** Short zone name (`EST`, `GMT+1`) used to label the timestamp column. */
225514
+ function formatTimeZoneLabel(timeZone) {
225515
+ var _a, _b;
225516
+ try {
225517
+ const parts = new Intl.DateTimeFormat('en-US', {
225518
+ timeZone,
225519
+ timeZoneName: 'short',
225520
+ }).formatToParts(new Date());
225521
+ return (_b = (_a = parts.find((part) => part.type === 'timeZoneName')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : timeZone;
225522
+ }
225523
+ catch (_c) {
225524
+ return timeZone;
225525
+ }
225526
+ }
225527
+ /**
225528
+ * Humanizes the snake_case identifiers the backend sends for `event_type` and
225529
+ * `resource_type`. Unknown values still render readably instead of raw, which
225530
+ * matters because the manual event list grows server-side.
225531
+ */
225532
+ function humanizeAuditToken(token) {
225533
+ const words = token
225534
+ .replace(/([a-z0-9])([A-Z])/g, '$1_$2')
225535
+ .toLowerCase()
225536
+ .split(/[^a-z0-9]+/)
225537
+ .filter(Boolean);
225538
+ if (words.length === 0)
225539
+ return token;
225540
+ const [first, ...rest] = words;
225541
+ return [first.charAt(0).toUpperCase() + first.slice(1), ...rest].join(' ');
225542
+ }
225543
+
225544
+ function usePlatformAuditLabels() {
225545
+ const t = useT();
225546
+ const eventTypeLabels = {
225547
+ login: t('analyticsUsePlatformAuditLabels.eventTypeLogin'),
225548
+ logout: t('analyticsUsePlatformAuditLabels.eventTypeLogout'),
225549
+ login_failed: t('analyticsUsePlatformAuditLabels.eventTypeLoginFailed'),
225550
+ password_change: t('analyticsUsePlatformAuditLabels.eventTypePasswordChange'),
225551
+ export: t('analyticsUsePlatformAuditLabels.eventTypeExport'),
225552
+ download_file: t('analyticsUsePlatformAuditLabels.eventTypeDownloadFile'),
225553
+ api_call: t('analyticsUsePlatformAuditLabels.eventTypeApiCall'),
225554
+ view_student_record: t('analyticsUsePlatformAuditLabels.eventTypeViewStudentRecord'),
225555
+ change_grade: t('analyticsUsePlatformAuditLabels.eventTypeChangeGrade'),
225556
+ admin_action: t('analyticsUsePlatformAuditLabels.eventTypeAdminAction'),
225557
+ };
225558
+ const actionLabels = {
225559
+ create: t('analyticsUsePlatformAuditLabels.actionCreate'),
225560
+ update: t('analyticsUsePlatformAuditLabels.actionUpdate'),
225561
+ delete: t('analyticsUsePlatformAuditLabels.actionDelete'),
225562
+ access: t('analyticsUsePlatformAuditLabels.actionAccess'),
225563
+ };
225564
+ return {
225565
+ eventTypeLabel: (eventType) => { var _a; return (_a = eventTypeLabels[eventType]) !== null && _a !== void 0 ? _a : humanizeAuditToken(eventType); },
225566
+ actionLabel: (action) => { var _a; return (_a = actionLabels[action]) !== null && _a !== void 0 ? _a : humanizeAuditToken(action); },
225567
+ };
225568
+ }
225569
+
225570
+ function DetailRow({ label, value }) {
225571
+ return (jsxs("div", { className: "grid grid-cols-[minmax(0,7rem)_1fr] gap-3 py-2", children: [jsx("dt", { className: "text-xs font-medium tracking-wide text-gray-500 uppercase", children: label }), jsx("dd", { className: "text-sm break-words text-gray-800", children: value })] }));
225572
+ }
225573
+ /**
225574
+ * Read-only detail view for a single audit entry. Which payload it shows is
225575
+ * decided by the `event_type === null` branch: CRUD entries get the field-level
225576
+ * `changes` diff, manual events get their `metadata`.
225577
+ */
225578
+ function PlatformAuditLogDetailSheet({ entry, open, onOpenChange, timeZone, }) {
225579
+ const t = useT();
225580
+ const { eventTypeLabel, actionLabel } = usePlatformAuditLabels();
225581
+ const isCrudEntry = entry ? entry.event_type === null : false;
225582
+ const placeholder = t('analyticsPlatformAuditLogDetailSheet.notAvailable');
225583
+ return (jsx(Sheet, { open: open, onOpenChange: onOpenChange, children: jsxs(SheetContent, { side: "right", className: "w-full overflow-y-auto sm:max-w-xl", "data-testid": "platform-audit-detail", children: [jsxs(SheetHeader, { children: [jsx(SheetTitle, { children: t('analyticsPlatformAuditLogDetailSheet.title') }), jsx(SheetDescription, { children: t('analyticsPlatformAuditLogDetailSheet.description') })] }), entry && (jsxs("div", { className: "space-y-6 px-4 pb-6", children: [jsxs("dl", { className: "divide-y divide-gray-100", children: [jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.timestamp'), value: formatAuditTimestamp(entry.timestamp, timeZone) }), jsx(DetailRow, { label: isCrudEntry
225584
+ ? t('analyticsPlatformAuditLogDetailSheet.action')
225585
+ : t('analyticsPlatformAuditLogDetailSheet.event'), value: isCrudEntry ? actionLabel(entry.action) : eventTypeLabel(String(entry.event_type)) }), !isCrudEntry && (jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.action'), value: actionLabel(entry.action) })), jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.actor'), value: entry.actor_username || entry.actor_email ? (jsxs("span", { className: "flex flex-col", children: [entry.actor_username && jsx("span", { children: entry.actor_username }), entry.actor_email && (jsx("span", { className: "text-xs text-gray-500", children: entry.actor_email }))] })) : (placeholder) }), isCrudEntry && (jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.resource'), value: entry.resource_type || entry.resource_repr ? (jsxs("span", { className: "flex flex-col", children: [entry.resource_repr && jsx("span", { children: entry.resource_repr }), jsx("span", { className: "text-xs text-gray-500", children: [
225586
+ entry.resource_type ? humanizeAuditToken(entry.resource_type) : null,
225587
+ entry.resource_id ? `#${entry.resource_id}` : null,
225588
+ ]
225589
+ .filter(Boolean)
225590
+ .join(' ') })] })) : (placeholder) })), jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.ipAddress'), value: entry.remote_addr || placeholder }), jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.entryId'), value: String(entry.id) })] }), jsxs("div", { className: "space-y-2", children: [jsx("h3", { className: "text-sm font-semibold text-gray-800", children: isCrudEntry
225591
+ ? t('analyticsPlatformAuditLogDetailSheet.changesHeading')
225592
+ : t('analyticsPlatformAuditLogDetailSheet.metadataHeading') }), isCrudEntry ? (jsx(AuditLogChangesView, { changes: entry.changes })) : (jsx(AuditLogJsonView, { value: entry.metadata, emptyLabel: t('analyticsPlatformAuditLogDetailSheet.noMetadata') }))] })] }))] }) }));
225593
+ }
225594
+
225595
+ /** Rows per request. Kept well under the backend's 1000 cap. */
225596
+ const PLATFORM_AUDIT_PAGE_SIZE = 25;
225597
+ /**
225598
+ * Above this many matching entries, deep paging stops being practical (the
225599
+ * endpoint only offers limit/offset). The UI uses this to nudge the user
225600
+ * toward narrowing by date instead of walking thousands of pages.
225601
+ */
225602
+ const PLATFORM_AUDIT_DEEP_PAGING_THRESHOLD = 1000;
225603
+ const TEXT_FILTER_DEBOUNCE_MS = 400;
225604
+ const EMPTY_FILTERS = {
225605
+ eventType: '',
225606
+ action: undefined,
225607
+ actorUsername: '',
225608
+ actorEmail: '',
225609
+ dateRange: undefined,
225610
+ };
225611
+ /**
225612
+ * `from_date`/`to_date` are whole-day bounds, so the local calendar day the
225613
+ * user picked is what we send — `toISOString()` would shift the date backwards
225614
+ * for anyone west of UTC.
225615
+ */
225616
+ const formatDateToYYYYMMDD = (date) => {
225617
+ if (!date)
225618
+ return undefined;
225619
+ const year = date.getFullYear();
225620
+ const month = String(date.getMonth() + 1).padStart(2, '0');
225621
+ const day = String(date.getDate()).padStart(2, '0');
225622
+ return `${year}-${month}-${day}`;
225623
+ };
225624
+ /**
225625
+ * Server-side paging + filtering over the platform-scoped audit trail.
225626
+ *
225627
+ * Every page change is a fresh request (`limit`/`offset`); nothing is sliced
225628
+ * client-side. Any filter change resets the offset to 0, so a user who filters
225629
+ * while on page 12 can't land past the end of the new result set.
225630
+ */
225631
+ const usePlatformAuditLog = ({ platformKey, limit = PLATFORM_AUDIT_PAGE_SIZE, skip = false, }) => {
225632
+ var _a, _b, _c, _d, _e;
225633
+ const [page, setPage] = useState(1);
225634
+ const [filters, setFilters] = useState(EMPTY_FILTERS);
225635
+ // Typing in the username/email boxes shouldn't fire a request per keystroke,
225636
+ // but the inputs still have to stay responsive — so the committed value the
225637
+ // query reads lags behind the value the inputs render.
225638
+ const [debouncedText, setDebouncedText] = useState({ actorUsername: '', actorEmail: '' });
225639
+ useEffect(() => {
225640
+ const timer = setTimeout(() => {
225641
+ setDebouncedText({
225642
+ actorUsername: filters.actorUsername.trim(),
225643
+ actorEmail: filters.actorEmail.trim(),
225644
+ });
225645
+ }, TEXT_FILTER_DEBOUNCE_MS);
225646
+ return () => clearTimeout(timer);
225647
+ }, [filters.actorUsername, filters.actorEmail]);
225648
+ const params = useMemo(() => {
225649
+ var _a, _b;
225650
+ return ({
225651
+ limit,
225652
+ offset: (page - 1) * limit,
225653
+ ...(filters.eventType ? { event_type: filters.eventType } : {}),
225654
+ ...(filters.action !== undefined ? { action: filters.action } : {}),
225655
+ ...(debouncedText.actorUsername ? { actor_username: debouncedText.actorUsername } : {}),
225656
+ ...(debouncedText.actorEmail ? { actor_email: debouncedText.actorEmail } : {}),
225657
+ ...(((_a = filters.dateRange) === null || _a === void 0 ? void 0 : _a.from)
225658
+ ? { from_date: formatDateToYYYYMMDD(filters.dateRange.from) }
225659
+ : {}),
225660
+ ...(((_b = filters.dateRange) === null || _b === void 0 ? void 0 : _b.to) ? { to_date: formatDateToYYYYMMDD(filters.dateRange.to) } : {}),
225661
+ });
225662
+ }, [
225663
+ limit,
225664
+ page,
225665
+ filters.eventType,
225666
+ filters.action,
225667
+ (_a = filters.dateRange) === null || _a === void 0 ? void 0 : _a.from,
225668
+ (_b = filters.dateRange) === null || _b === void 0 ? void 0 : _b.to,
225669
+ debouncedText.actorUsername,
225670
+ debouncedText.actorEmail,
225671
+ ]);
225672
+ const { data, isLoading, isFetching, error } = useGetPlatformAuditLogsQuery({ platformKey, params }, { skip: skip || !platformKey });
225673
+ // The debounced values settle one tick after the raw ones, so resetting the
225674
+ // page inside `setFilter` alone would leave a window where the in-flight
225675
+ // request still carries the old offset. Watching the committed text closes it.
225676
+ const isFirstDebounceRef = useRef(true);
225677
+ useEffect(() => {
225678
+ if (isFirstDebounceRef.current) {
225679
+ isFirstDebounceRef.current = false;
225680
+ return;
225681
+ }
225682
+ setPage(1);
225683
+ }, [debouncedText.actorUsername, debouncedText.actorEmail]);
225684
+ const setFilter = (key, value) => {
225685
+ setFilters((current) => ({ ...current, [key]: value }));
225686
+ setPage(1);
225687
+ };
225688
+ const clearFilters = () => {
225689
+ setFilters(EMPTY_FILTERS);
225690
+ setPage(1);
225691
+ };
225692
+ const totalCount = (_c = data === null || data === void 0 ? void 0 : data.count) !== null && _c !== void 0 ? _c : 0;
225693
+ const totalPages = data ? Math.ceil(totalCount / limit) : 0;
225694
+ const hasActiveFilters = Boolean(filters.eventType) ||
225695
+ filters.action !== undefined ||
225696
+ Boolean(filters.actorUsername) ||
225697
+ Boolean(filters.actorEmail) ||
225698
+ Boolean(((_d = filters.dateRange) === null || _d === void 0 ? void 0 : _d.from) || ((_e = filters.dateRange) === null || _e === void 0 ? void 0 : _e.to));
225699
+ const isForbidden = Boolean(error && 'status' in error && error.status === 403);
225700
+ return {
225701
+ data,
225702
+ isLoading,
225703
+ isFetching,
225704
+ error,
225705
+ isForbidden,
225706
+ page,
225707
+ setPage,
225708
+ limit,
225709
+ totalPages,
225710
+ totalCount,
225711
+ shouldSuggestNarrowing: totalCount > PLATFORM_AUDIT_DEEP_PAGING_THRESHOLD,
225712
+ filters,
225713
+ setFilter,
225714
+ clearFilters,
225715
+ hasActiveFilters,
225716
+ };
225717
+ };
225718
+
225719
+ const ALL_OPTION_VALUE = 'all';
225720
+ const ACTION_OPTION_VALUES = ['create', 'update', 'delete', 'access'];
225721
+ /** Reverse lookup so the select can show the code currently applied. */
225722
+ function actionValueForCode(code) {
225723
+ var _a;
225724
+ if (code === undefined)
225725
+ return ALL_OPTION_VALUE;
225726
+ return ((_a = ACTION_OPTION_VALUES.find((value) => PLATFORM_AUDIT_ACTION_CODES[value] === code)) !== null && _a !== void 0 ? _a : ALL_OPTION_VALUE);
225727
+ }
225728
+ const SKELETON_ROW_KEYS = ['a', 'b', 'c', 'd', 'e'];
225729
+ /** CRUD entries have no `event_type`; that's the branch the whole UI keys off. */
225730
+ function isCrudEntry(entry) {
225731
+ return entry.event_type === null;
225732
+ }
225733
+ function formatActor(entry, placeholder) {
225734
+ if (!entry.actor_username && !entry.actor_email)
225735
+ return null;
225736
+ return (jsxs("span", { className: "flex flex-col", children: [jsx("span", { className: "font-medium text-gray-700", children: entry.actor_username || placeholder }), entry.actor_email && jsx("span", { className: "text-xs text-gray-500", children: entry.actor_email })] }));
225737
+ }
225738
+ function AnalyticsPlatformAuditLog({ platformKey, timezone, }) {
225739
+ var _a, _b, _c;
225740
+ const t = useT();
225741
+ const [selectedEntry, setSelectedEntry] = useState(null);
225742
+ const timeZone = resolveAuditTimeZone(timezone);
225743
+ const timeZoneLabel = formatTimeZoneLabel(timeZone);
225744
+ const placeholder = t('analyticsAnalyticsPlatformAuditLog.notAvailable');
225745
+ const { eventTypeLabel, actionLabel } = usePlatformAuditLabels();
225746
+ const { data, isLoading, isFetching, error, isForbidden, page, setPage, totalPages, totalCount, shouldSuggestNarrowing, filters, setFilter, clearFilters, hasActiveFilters, } = usePlatformAuditLog({ platformKey });
225747
+ // A 403 means the account is signed in but lacks `Ibl.Core/AuditLogs/list` —
225748
+ // a permissions answer, not a failure, so it replaces the whole view rather
225749
+ // than showing an error next to unusable filters.
225750
+ if (isForbidden) {
225751
+ return (jsx(Card, { className: "rounded-lg border border-gray-100 bg-white shadow-sm", children: jsxs(CardContent, { className: "p-8 text-center", children: [jsx("p", { className: "font-medium text-gray-700", children: t('analyticsAnalyticsPlatformAuditLog.forbiddenTitle') }), jsx("p", { className: "mt-1 text-sm text-gray-500", children: t('analyticsAnalyticsPlatformAuditLog.forbiddenBody') })] }) }));
225752
+ }
225753
+ const results = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
225754
+ const hasError = Boolean(error);
225755
+ return (jsxs("div", { className: "space-y-6", children: [jsxs("div", { className: "rounded-lg border border-[oklch(0.922_0_0)] bg-white p-4", children: [jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-5", children: [jsxs(Select$1, { value: filters.eventType || ALL_OPTION_VALUE, onValueChange: (value) => setFilter('eventType', value === ALL_OPTION_VALUE ? '' : value), children: [jsx(SelectTrigger, { className: "h-9 w-full bg-white font-normal", "aria-label": t('analyticsAnalyticsPlatformAuditLog.eventTypeLabel'), children: jsx(SelectValue, { placeholder: t('analyticsAnalyticsPlatformAuditLog.allEventTypes') }) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: ALL_OPTION_VALUE, children: t('analyticsAnalyticsPlatformAuditLog.allEventTypes') }), PLATFORM_AUDIT_EVENT_TYPES.map((eventType) => (jsx(SelectItem, { value: eventType, children: eventTypeLabel(eventType) }, eventType)))] })] }), jsxs(Select$1, { value: actionValueForCode(filters.action), onValueChange: (value) => setFilter('action', value === ALL_OPTION_VALUE
225756
+ ? undefined
225757
+ : PLATFORM_AUDIT_ACTION_CODES[value]), children: [jsx(SelectTrigger, { className: "h-9 w-full bg-white font-normal", "aria-label": t('analyticsAnalyticsPlatformAuditLog.actionLabel'), children: jsx(SelectValue, { placeholder: t('analyticsAnalyticsPlatformAuditLog.allActions') }) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: ALL_OPTION_VALUE, children: t('analyticsAnalyticsPlatformAuditLog.allActions') }), ACTION_OPTION_VALUES.map((value) => (jsx(SelectItem, { value: value, children: actionLabel(value) }, value)))] })] }), jsx(Input, { className: "h-9 bg-white", value: filters.actorUsername, onChange: (event) => setFilter('actorUsername', event.target.value), placeholder: t('analyticsAnalyticsPlatformAuditLog.actorUsernamePlaceholder'), "aria-label": t('analyticsAnalyticsPlatformAuditLog.actorUsernameLabel') }), jsx(Input, { className: "h-9 bg-white", type: "email", value: filters.actorEmail, onChange: (event) => setFilter('actorEmail', event.target.value), placeholder: t('analyticsAnalyticsPlatformAuditLog.actorEmailPlaceholder'), "aria-label": t('analyticsAnalyticsPlatformAuditLog.actorEmailLabel') }), jsxs(Popover, { modal: true, children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", className: "h-9 w-full justify-start gap-2 bg-white font-normal whitespace-nowrap", children: [jsx(Calendar$1, { className: "h-4 w-4" }), ((_b = filters.dateRange) === null || _b === void 0 ? void 0 : _b.from) && ((_c = filters.dateRange) === null || _c === void 0 ? void 0 : _c.to)
225758
+ ? `${format$1(filters.dateRange.from, 'MMM dd')} - ${format$1(filters.dateRange.to, 'MMM dd')}`
225759
+ : t('analyticsAnalyticsPlatformAuditLog.pickDateRange')] }) }), jsx(PopoverContent, { "data-iblai-dialog-interaction-layer": true, className: "z-[60] w-auto p-0", align: "start", children: jsx(Calendar, { mode: "range", selected: filters.dateRange, onSelect: (range) => setFilter('dateRange', range ? { from: range.from, to: range.to } : undefined), numberOfMonths: 2 }) })] })] }), hasActiveFilters && (jsx("div", { className: "mt-3 flex justify-end", children: jsxs(Button$1, { variant: "ghost", size: "sm", onClick: clearFilters, className: "h-8 text-gray-600", children: [jsx(X$1, { className: "mr-1 h-3.5 w-3.5" }), t('analyticsAnalyticsPlatformAuditLog.clearFilters')] }) }))] }), shouldSuggestNarrowing && !hasError && (jsxs("div", { className: "flex items-start gap-2 rounded-lg border border-blue-100 bg-blue-50 p-3 text-sm text-blue-900", children: [jsx(Info$3, { className: "mt-0.5 h-4 w-4 shrink-0", "aria-hidden": "true" }), jsx("p", { children: t('analyticsAnalyticsPlatformAuditLog.narrowSuggestion', { count: totalCount }) })] })), jsx("div", { className: "overflow-hidden rounded-md border border-[oklch(0.922_0_0)] bg-white", children: jsx("div", { className: "overflow-x-auto", children: jsx("div", { className: "inline-block min-w-full align-middle", children: isLoading ? (jsx("div", { className: "space-y-3 p-4", "data-testid": "platform-audit-skeleton", children: SKELETON_ROW_KEYS.map((key) => (jsx(Skeleton, { className: "h-10 w-full" }, key))) })) : hasError ? (jsx("div", { className: "py-8 text-center text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.loadError') })) : results.length === 0 ? (jsx("div", { className: "h-[120px]", children: jsx(EmptyStats, { title: hasActiveFilters
225760
+ ? t('analyticsAnalyticsPlatformAuditLog.noFilteredEntries')
225761
+ : t('analyticsAnalyticsPlatformAuditLog.noEntries') }) })) : (jsxs(Table, { className: "min-w-full", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 border-b border-[oklch(0.922_0_0)]", children: [jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colTimestamp', {
225762
+ timezone: timeZoneLabel,
225763
+ }) }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colEvent') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colActor') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colResource') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colIpAddress') }), jsx(TableHead, { className: "p-3 text-right text-sm whitespace-nowrap text-[#646464]", children: jsx("span", { className: "sr-only", children: t('analyticsAnalyticsPlatformAuditLog.colDetails') }) })] }) }), jsx(TableBody, { children: results.map((entry) => {
225764
+ const crud = isCrudEntry(entry);
225765
+ const actor = formatActor(entry, placeholder);
225766
+ return (jsxs(TableRow, { className: "border-b border-[oklch(0.922_0_0)] last:border-0", children: [jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: formatAuditTimestamp(entry.timestamp, timeZone) }), jsx(TableCell, { className: "p-3 text-[#646464]", children: jsxs("span", { className: "flex flex-col", children: [jsx("span", { className: "font-medium text-gray-700", children: crud
225767
+ ? actionLabel(entry.action)
225768
+ : eventTypeLabel(String(entry.event_type)) }), jsx("span", { className: "text-xs text-gray-500", children: crud
225769
+ ? t('analyticsAnalyticsPlatformAuditLog.kindModelChange')
225770
+ : t('analyticsAnalyticsPlatformAuditLog.kindEvent') })] }) }), jsx(TableCell, { className: "p-3 text-[#646464]", children: actor !== null && actor !== void 0 ? actor : placeholder }), jsx(TableCell, { className: "min-w-[200px] p-3 text-[#646464]", children: entry.resource_repr || entry.resource_type ? (jsxs("span", { className: "flex flex-col", children: [jsx("span", { children: entry.resource_repr || placeholder }), entry.resource_type && (jsx("span", { className: "text-xs text-gray-500", children: humanizeAuditToken(entry.resource_type) }))] })) : (placeholder) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: entry.remote_addr || placeholder }), jsx(TableCell, { className: "p-3 text-right whitespace-nowrap", children: jsx(Button$1, { variant: "ghost", size: "sm", className: "h-8 text-blue-600", onClick: () => setSelectedEntry(entry), children: t('analyticsAnalyticsPlatformAuditLog.viewDetails') }) })] }, entry.id));
225771
+ }) })] })) }) }) }), !hasError && results.length > 0 && (jsx("p", { className: "text-xs text-gray-500", children: t('analyticsAnalyticsPlatformAuditLog.resultSummary', {
225772
+ shown: results.length,
225773
+ total: totalCount,
225774
+ }) })), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isFetching }), jsx(PlatformAuditLogDetailSheet, { entry: selectedEntry, open: selectedEntry !== null, onOpenChange: (open) => {
225775
+ if (!open)
225776
+ setSelectedEntry(null);
225777
+ }, timeZone: timeZone })] }));
225778
+ }
225779
+
224738
225780
  const ACTION_LABELS = {
224739
225781
  create: 'Created',
224740
225782
  update: 'Updated',
@@ -224882,7 +225924,8 @@ function summarizeChanges(entry) {
224882
225924
  }
224883
225925
  return `${action} ${target}`;
224884
225926
  }
224885
- function AnalyticsAuditLogStats({ tenantKey, mentorId, userId, selectedMentorId, }) {
225927
+ /** The per-agent change log — the original audit view, unchanged. */
225928
+ function AgentAuditLogView({ tenantKey, mentorId, userId, selectedMentorId, }) {
224886
225929
  var _a;
224887
225930
  const t = useT();
224888
225931
  const currentMentorId = selectedMentorId || mentorId;
@@ -224922,6 +225965,22 @@ function AnalyticsAuditLogStats({ tenantKey, mentorId, userId, selectedMentorId,
224922
225965
  setPage(1);
224923
225966
  }, children: [jsx(SelectTrigger, { className: "w-full font-normal bg-white h-9", children: jsx(SelectValue, { placeholder: t('analyticsAnalyticsAuditLogStats.allActions') }) }), jsx(SelectContent, { children: ACTION_FILTER_OPTIONS.map((opt) => (jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value))) })] }) })] }) }), jsx("div", { className: "overflow-hidden rounded-md border border-[oklch(0.922_0_0)] bg-white", children: jsx("div", { className: "overflow-x-auto", children: jsx("div", { className: "inline-block min-w-full align-middle", children: isLoading ? (jsx("div", { className: "flex items-center justify-center w-full py-10", children: jsx("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-blue-600 border-t-transparent" }) })) : error && !is403 ? (jsx("div", { className: "py-8 text-center text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.loadError') })) : !((_a = data === null || data === void 0 ? void 0 : data.results) === null || _a === void 0 ? void 0 : _a.length) ? (jsx("div", { className: "h-[120px]", children: jsx(EmptyStats, { title: t('analyticsAnalyticsAuditLogStats.noEntries') }) })) : (jsxs(Table, { className: "min-w-full", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 border-b border-[oklch(0.922_0_0)]", children: [jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colUser') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colAction') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colTime') })] }) }), jsx(TableBody, { children: data.results.map((entry) => (jsxs(TableRow, { className: "border-b border-[oklch(0.922_0_0)] last:border-0", children: [jsx(TableCell, { className: "p-3 font-medium whitespace-nowrap text-[#646464]", children: entry.actor_email }), jsx(TableCell, { className: "min-w-[250px] p-3 text-[#646464]", children: summarizeChanges(entry) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: formatDistanceToNow(new Date(entry.timestamp), { addSuffix: true }) })] }, entry.id))) })] })) }) }) }), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isLoading })] }));
224924
225967
  }
225968
+ function AnalyticsAuditLogStats({ tenantKey, mentorId, userId, selectedMentorId, defaultScope = 'agent', timezone, canViewPlatformAudit, }) {
225969
+ const t = useT();
225970
+ const { currentTenant } = useCurrentTenant();
225971
+ const rbacPermissions = useSelector(selectRbacPermissions);
225972
+ // Mirrors how the backend gates the endpoint (RBAC action, or platform admin
225973
+ // on non-RBAC deployments). Hiding the toggle is UX/defense-in-depth only —
225974
+ // the API answers 403 on its own regardless of what renders here.
225975
+ const canSeePlatformScope = canViewPlatformAudit !== null && canViewPlatformAudit !== void 0 ? canViewPlatformAudit : canViewPlatformAuditLogs(rbacPermissions, currentTenant);
225976
+ const [scope, setScope] = useState(defaultScope === 'platform' && !canSeePlatformScope ? 'agent' : defaultScope);
225977
+ // A user who loses the permission mid-session (tenant switch, role change)
225978
+ // must not be left staring at a trail they can no longer read.
225979
+ const activeScope = scope === 'platform' && !canSeePlatformScope ? 'agent' : scope;
225980
+ return (jsxs("div", { className: "space-y-4", children: [canSeePlatformScope && (jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [jsx(Tabs, { value: activeScope, className: "w-full sm:w-auto", children: jsxs(TabsList, { className: "h-auto gap-2 sm:grid sm:h-[35px] sm:w-fit sm:grid-cols-2 sm:gap-0", children: [jsx(TabsTrigger, { value: "agent", className: activeScope === 'agent' ? 'w-full' : undefined, onClick: () => setScope('agent'), children: t('analyticsAnalyticsAuditLogStats.scopeAgent') }), jsx(TabsTrigger, { value: "platform", className: activeScope === 'platform' ? 'w-full' : undefined, onClick: () => setScope('platform'), children: t('analyticsAnalyticsAuditLogStats.scopePlatform') })] }) }), jsx("p", { className: "hidden text-xs text-gray-500 sm:block", children: activeScope === 'agent'
225981
+ ? t('analyticsAnalyticsAuditLogStats.scopeAgentHint')
225982
+ : t('analyticsAnalyticsAuditLogStats.scopePlatformHint') })] })), activeScope === 'platform' ? (jsx(AnalyticsPlatformAuditLog, { platformKey: tenantKey, timezone: timezone })) : (jsx(AgentAuditLogView, { tenantKey: tenantKey, mentorId: mentorId, userId: userId, selectedMentorId: selectedMentorId }))] }));
225983
+ }
224925
225984
 
224926
225985
  /**
224927
225986
  * Core agent search hook — thin wrapper around `useGetAiSearchMentorsQuery`.
@@ -225445,7 +226504,7 @@ function AnalyticsMemoryStats({ tenantKey, mentorId, userId, selectedMentorId, m
225445
226504
  setContentFilter(contentInput.trim());
225446
226505
  }, children: jsx(Input, { value: contentInput, onChange: (event) => setContentInput(event.target.value), onBlur: () => setContentFilter(contentInput.trim()), placeholder: t('analyticsAnalyticsMemoryStats.contentPlaceholder'), "aria-label": t('analyticsAnalyticsMemoryStats.contentPlaceholder'), className: "h-9 bg-white" }) })), jsxs(Popover, { modal: true, children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", className: "flex h-9 w-full items-center gap-2 bg-white font-normal whitespace-nowrap lg:w-auto", children: [jsx(Calendar$1, { className: "h-4 w-4" }), (dateRange === null || dateRange === void 0 ? void 0 : dateRange.from) && (dateRange === null || dateRange === void 0 ? void 0 : dateRange.to)
225447
226506
  ? `${format$1(dateRange.from, 'MMM dd')} - ${format$1(dateRange.to, 'MMM dd')}`
225448
- : t('analyticsAnalyticsMemoryStats.pickDateRange')] }) }), jsx(PopoverContent, { "data-iblai-dialog-interaction-layer": true, className: "z-[60] w-auto p-0", align: "start", children: jsx(Calendar, { mode: "range", selected: dateRange, onSelect: (range) => setDateRange(range ? { from: range.from, to: range.to } : undefined), numberOfMonths: 2 }) })] }), showCategoryFilter && (jsx("div", { className: "min-w-[160px]", children: jsxs(Select$1, { value: categoryFilter, onValueChange: setCategoryFilter, children: [jsx(SelectTrigger, { className: "h-9 w-full bg-white font-normal", "aria-label": t('analyticsAnalyticsMemoryStats.allCategories'), children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: ALL_CATEGORIES, children: t('analyticsAnalyticsMemoryStats.allCategories') }), categories.map((category) => (jsx(SelectItem, { value: category.slug, children: category.name }, category.slug)))] })] }) }))] }) }), aggregates && aggregates.categories.length > 0 && (jsxs("div", { className: "rounded-lg border border-[oklch(0.922_0_0)] bg-white p-4", children: [jsxs("h3", { className: "mb-4 flex items-center gap-2 text-sm font-medium text-[#484848]", children: [jsx(Brain, { className: "h-4 w-4 text-blue-600" }), t('analyticsAnalyticsMemoryStats.byCategory')] }), jsx("ul", { className: "space-y-3", children: aggregates.categories.map((category) => {
226507
+ : t('analyticsAnalyticsMemoryStats.pickDateRange')] }) }), jsx(PopoverContent, { "data-iblai-dialog-interaction-layer": true, className: "z-[60] w-auto p-0", align: "start", children: jsx(Calendar, { mode: "range", selected: dateRange, onSelect: (range) => setDateRange(range ? { from: range.from, to: range.to } : undefined), numberOfMonths: 2 }) })] }), showCategoryFilter && (jsx("div", { className: "min-w-[160px]", children: jsxs(Select$1, { value: categoryFilter, onValueChange: setCategoryFilter, children: [jsx(SelectTrigger, { className: "h-9 w-full bg-white font-normal", "aria-label": t('analyticsAnalyticsMemoryStats.allCategories'), children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: ALL_CATEGORIES, children: t('analyticsAnalyticsMemoryStats.allCategories') }), categories.map((category) => (jsx(SelectItem, { value: category.slug, children: category.name }, category.slug)))] })] }) }))] }) }), aggregates && aggregates.categories.length > 0 && (jsxs("div", { className: "rounded-lg border border-[oklch(0.922_0_0)] bg-white p-4", children: [jsxs("h3", { className: "mb-4 flex items-center gap-1 text-sm font-medium text-[#484848]", children: [t('analyticsAnalyticsMemoryStats.byCategory'), jsx(CardInfoIcon, { title: t('analyticsAnalyticsMemoryStats.byCategory'), description: t('analyticsAnalyticsMemoryStats.byCategoryDescription') })] }), jsx("ul", { className: "space-y-3", children: aggregates.categories.map((category) => {
225449
226508
  const percent = aggregates.totalMemories
225450
226509
  ? Math.round((category.count / aggregates.totalMemories) * 100)
225451
226510
  : 0;
@@ -228040,30 +229099,6 @@ const CourseOutline = () => {
228040
229099
  : 'text-gray-600 hover:bg-gray-50'}`, children: [jsx("div", { className: "mr-2 flex-shrink-0", children: jsx(CompletionIcon, { node: sublesson }) }), jsx("span", { children: sublesson.display_name })] }, sublesson.id))) }))] }, lesson.id))) }))] }, module.id)))) }));
228041
229100
  };
228042
229101
 
228043
- function Sheet({ ...props }) {
228044
- return jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
228045
- }
228046
- function SheetPortal({ ...props }) {
228047
- return jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
228048
- }
228049
- function SheetOverlay({ className, ...props }) {
228050
- return (jsx(DialogPrimitive.Overlay, { "data-slot": "sheet-overlay", 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/50', className), ...props }));
228051
- }
228052
- function SheetContent({ className, children, side = 'right', ...props }) {
228053
- const t = useT();
228054
- return (jsxs(SheetPortal, { children: [jsx(SheetOverlay, {}), jsxs(DialogPrimitive.Content, { "data-slot": "sheet-content", className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500', side === 'right' &&
228055
- 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm', side === 'left' &&
228056
- 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm', side === 'top' &&
228057
- 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b', side === 'bottom' &&
228058
- 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t', className), ...props, children: [children, jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [jsx(X$1, { className: "size-4" }), jsx("span", { className: "sr-only", children: t('uiSheet.close') })] })] })] }));
228059
- }
228060
- function SheetHeader({ className, ...props }) {
228061
- return (jsx("div", { "data-slot": "sheet-header", className: cn('flex flex-col gap-1.5 p-4', className), ...props }));
228062
- }
228063
- function SheetTitle({ className, ...props }) {
228064
- return (jsx(DialogPrimitive.Title, { "data-slot": "sheet-title", className: cn('text-foreground font-semibold', className), ...props }));
228065
- }
228066
-
228067
229102
  /**
228068
229103
  * Mobile drawer wrapping `<CourseOutline />` in a `Sheet` for responsive
228069
229104
  * course navigation. Ported from skillsai's `course-outline-drawer.tsx`.
@@ -236268,5 +237303,5 @@ var trainOrDeleteModal = /*#__PURE__*/Object.freeze({
236268
237303
  TrainOrDeleteModal: TrainOrDeleteModal
236269
237304
  });
236270
237305
 
236271
- export { ACCESS_COURSE_LABEL, ALL_CATEGORIES, AccessTimeHeatmap, AccessiblePaginate, AddMentorToProjectModal, AddSkillDialog, Admin, AdvancedTab, AgentConfigPrompts, AgentSkills, AlertsTab, AnalyticsAuditLogStats, AnalyticsCourseDetail, AnalyticsCourses, AnalyticsFinancialStats, AnalyticsLayout, AnalyticsMemoryStats, AnalyticsMonetizationStats, AnalyticsOverview, AnalyticsProgramDetail, AnalyticsPrograms, AnalyticsReportDownload, AnalyticsReports, AnalyticsSettingsProvider, AnalyticsTopicsStats, AnalyticsTranscriptsStats, AnalyticsUsersStats, AppleRestrictionModal, ApplyWizard, BUY_NOW_LABEL, BillingTab, CATALOGS, CREATE_AGENT_LABELS, CUA_DRIVER_REPO_URL, CUA_DRIVER_TAURI_COMMANDS, CUA_DRIVER_TAURI_EVENTS, CategorizedDropdownMenu, ChartCardWrapper, ChartFiltersProvider, ChartLoading, ChatContext, ChatPrivacyToggle, ChatProvider, CompanyDialog, ConnectorManagementDialog, CopyButtonIcon, CourseAccessGuard, CourseCardSkeleton, CourseContentLoading, CourseOutline, CourseOutlineContext, CourseOutlineDrawer, CreateAgentForm, CreateAgentModal, CreateProjectModal, CreateWorkflowModal, CredentialBox, CredentialMiniBoxSkeleton, CredentialsList, CreditBalance, CustomDateRangePicker, CustomTooltip, DEFAULT_COWORK_REQUIRED_SIZE_GB, DEFAULT_LOCALE, DefaultEmptyBox, DeleteProjectModal, DeleteWorkflowModal, DiscoverContentCard, DiscoverFacetsFilter, DiscoverFilterDrawer, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENROLL_NOW_COURSE_STARTING_SOON_LABEL, ENROLL_NOW_LABEL, EditAlertDialog, EducationBox, EducationDialog, EducationTab, EdxIframeContext, EmptyStats, ExperienceBox, ExperienceDialog, ExperienceTab, FacetFilterContext, Footer, GradebookTab, GroupsFilterDropdown, INVITATION_ONLY_LABEL, InstitutionDialog, IntegrationsTab, InviteUserContent, InviteUserDialog, InvitedUsersDialog, LOCAL_MODELS, Loader, LocalLLMTab, LocalModelsContent, LoginButton, MACOS_PERMISSIONS_COMMANDS, MEMORY_PAGE_SIZE, Markdown, MinimumMentorAlert, MonetizationTab, NotificationDisplay, NotificationDropdown, ONBOARDING_SECTORS, OnboardingShell, OnboardingWizard, PaywallModal, PlacementExam, PlacementExamsDropdown, PlatformNavbar, PlatformNavbarSearch, Profile, ProfileTimeChart, ProgressDots, ProjectActionButtons, ProjectFilesModal, ProjectInstructionsModal, ProjectLandingPage, ProjectMentorsList, ProjectsPage, REQUEST_ACCESS_COURSE_STARTING_SOON_LABEL, REQUEST_ACCESS_LABEL, RenameProjectModal, ResumeBox, ResumeTab, RichTextEditor, SUPPORTED_LOCALES, SandboxConfig, SearchableMultiSelect, SendNotificationDialog, SignupButton, SkeletonActivityStatBox, SkeletonAddSkillsLoading, SkeletonCreatePathwaySearchList, SkeletonDiscoverFilterBox, SkeletonEducationBox, SkeletonMultiplier, SkeletonPathwayBox, SkeletonProfileInfoCard, SkeletonSkillBox, SkillBox, SkillDetailModal, SkillLeaderboardChart, SkillsBox, SkillsList, SlashSkillPicker, Spinner, StatCard, StepHeader, TAURI_COMMANDS, TAURI_EVENTS, TenantSwitcher, TimeFilter, TimeTrackingProvider, TimedExam, ToolDialogs, TopBanner, UpgradePackageModal, UserAvatar, Version, WebContainersI18nProvider, WorkflowSidebar, addBookmarksTab, availablePlacementExams, findLastResumeBlock, findSequentialParent, flattenVerticalBlocks, getCatalog, getFirstAvailableUnit, getLocalLLMModel, getLocalLLMToolSupport, getNextUnitIframe, getOrg, getParentBlockById, getParentsInfosFromSublessonId, getPreviousUnitIframe, getRandomCourseImage, getSectorById, getTenant, getUnitToIframe, getUserId, getUserName, inBrowserPrint, inIframe, initialCuaDriverInstallState, initialModelDownloadState, isCoworkEnabled, isLocalLLMEnabled, isPlatformNavbarCreditBalanceVisible, isSlashCommandToken, isTauriApp, isValidLocale, components as markdownComponents, modelSupportsCowork, onboardingPrimaryButtonClass, onboardingSecondaryButtonClass, resolveCreateAgentLabels, sanitizeCss, setCoworkEnabled, setLocalLLMEnabled, setLocalLLMModel, setLocalLLMToolSupport, smallestCoworkModel, useAnalyticsSettings, useAuditLog, useCatalogSearch, useChartFilters, useChatPrivacy, useChatState, useCourseDetail, useCourseMetadata, useCourses, useCuaDriver, useDiscover, useEdxIframe, useFinancial, useIframeMessageHandler, useLocalStorage, useMemory, useModelDownload, useMonetization, useOverview, useProfileActivityStats, useProfileCredentials, useProfilePathways, useProfilePrograms, useProfileSkills, useProfileTimeSpent, usePrograms, useReports, useSlashSkillPicker, useSlashSkills, useT, useTauri, useTimeTracking, useTopics, useTranscripts, useUserCourses, useUserMetadata, useUsers, useWebContainersI18n, useWebContainersLocale };
237306
+ export { ACCESS_COURSE_LABEL, ALL_CATEGORIES, AccessTimeHeatmap, AccessiblePaginate, AddMentorToProjectModal, AddSkillDialog, Admin, AdvancedTab, AgentConfigPrompts, AgentSkills, AlertsTab, AnalyticsAuditLogStats, AnalyticsCourseDetail, AnalyticsCourses, AnalyticsFinancialStats, AnalyticsLayout, AnalyticsMemoryStats, AnalyticsMonetizationStats, AnalyticsOverview, AnalyticsPlatformAuditLog, AnalyticsProgramDetail, AnalyticsPrograms, AnalyticsReportDownload, AnalyticsReports, AnalyticsSettingsProvider, AnalyticsTopicsStats, AnalyticsTranscriptsStats, AnalyticsUsersStats, AppleRestrictionModal, ApplyWizard, AuditLogChangesView, AuditLogJsonView, BUY_NOW_LABEL, BillingTab, CATALOGS, CREATE_AGENT_LABELS, CUA_DRIVER_REPO_URL, CUA_DRIVER_TAURI_COMMANDS, CUA_DRIVER_TAURI_EVENTS, CardInfoIcon, CategorizedDropdownMenu, ChartCardWrapper, ChartFiltersProvider, ChartLoading, ChatContext, ChatPrivacyToggle, ChatProvider, CompanyDialog, ConnectorManagementDialog, CopyButtonIcon, CourseAccessGuard, CourseCardSkeleton, CourseContentLoading, CourseOutline, CourseOutlineContext, CourseOutlineDrawer, CreateAgentForm, CreateAgentModal, CreateProjectModal, CreateWorkflowModal, CredentialBox, CredentialMiniBoxSkeleton, CredentialsList, CreditBalance, CustomDateRangePicker, CustomTooltip, DEFAULT_COWORK_REQUIRED_SIZE_GB, DEFAULT_LOCALE, DefaultEmptyBox, DeleteProjectModal, DeleteWorkflowModal, DiscoverContentCard, DiscoverFacetsFilter, DiscoverFilterDrawer, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENROLL_NOW_COURSE_STARTING_SOON_LABEL, ENROLL_NOW_LABEL, EditAlertDialog, EducationBox, EducationDialog, EducationTab, EdxIframeContext, EmptyStats, ExperienceBox, ExperienceDialog, ExperienceTab, FacetFilterContext, Footer, GradebookTab, GroupsFilterDropdown, INVITATION_ONLY_LABEL, InstitutionDialog, IntegrationsTab, InviteUserContent, InviteUserDialog, InvitedUsersDialog, LOCAL_MODELS, Loader, LocalLLMTab, LocalModelsContent, LoginButton, MACOS_PERMISSIONS_COMMANDS, MEMORY_PAGE_SIZE, Markdown, MinimumMentorAlert, MonetizationTab, NotificationDisplay, NotificationDropdown, ONBOARDING_SECTORS, OnboardingShell, OnboardingWizard, PLATFORM_AUDIT_DEEP_PAGING_THRESHOLD, PLATFORM_AUDIT_PAGE_SIZE, PaywallModal, PlacementExam, PlacementExamsDropdown, PlatformAuditLogDetailSheet, PlatformNavbar, PlatformNavbarSearch, Profile, ProfileTimeChart, ProgressDots, ProjectActionButtons, ProjectFilesModal, ProjectInstructionsModal, ProjectLandingPage, ProjectMentorsList, ProjectsPage, REQUEST_ACCESS_COURSE_STARTING_SOON_LABEL, REQUEST_ACCESS_LABEL, RenameProjectModal, ResumeBox, ResumeTab, RichTextEditor, SUPPORTED_LOCALES, SandboxConfig, SearchableMultiSelect, SendNotificationDialog, SignupButton, SkeletonActivityStatBox, SkeletonAddSkillsLoading, SkeletonCreatePathwaySearchList, SkeletonDiscoverFilterBox, SkeletonEducationBox, SkeletonMultiplier, SkeletonPathwayBox, SkeletonProfileInfoCard, SkeletonSkillBox, SkillBox, SkillDetailModal, SkillLeaderboardChart, SkillsBox, SkillsList, SlashSkillPicker, Spinner, StatCard, StepHeader, TAURI_COMMANDS, TAURI_EVENTS, TenantSwitcher, TimeFilter, TimeTrackingProvider, TimedExam, ToolDialogs, TopBanner, UpgradePackageModal, UserAvatar, Version, WebContainersI18nProvider, WorkflowSidebar, addBookmarksTab, availablePlacementExams, findLastResumeBlock, findSequentialParent, flattenVerticalBlocks, formatAuditTimestamp, formatTimeZoneLabel, getCatalog, getFirstAvailableUnit, getLocalLLMModel, getLocalLLMToolSupport, getNextUnitIframe, getOrg, getParentBlockById, getParentsInfosFromSublessonId, getPreviousUnitIframe, getRandomCourseImage, getSectorById, getTenant, getUnitToIframe, getUserId, getUserName, humanizeAuditToken, inBrowserPrint, inIframe, initialCuaDriverInstallState, initialModelDownloadState, isCoworkEnabled, isLocalLLMEnabled, isPlatformNavbarCreditBalanceVisible, isSlashCommandToken, isTauriApp, isValidLocale, isValidTimeZone, components as markdownComponents, modelSupportsCowork, onboardingPrimaryButtonClass, onboardingSecondaryButtonClass, resolveAuditTimeZone, resolveCreateAgentLabels, sanitizeCss, setCoworkEnabled, setLocalLLMEnabled, setLocalLLMModel, setLocalLLMToolSupport, smallestCoworkModel, useAnalyticsSettings, useAuditLog, useCatalogSearch, useChartFilters, useChatPrivacy, useChatState, useCourseDetail, useCourseMetadata, useCourses, useCuaDriver, useDiscover, useEdxIframe, useFinancial, useIframeMessageHandler, useLocalStorage, useMemory, useModelDownload, useMonetization, useOverview, usePlatformAuditLabels, usePlatformAuditLog, useProfileActivityStats, useProfileCredentials, useProfilePathways, useProfilePrograms, useProfileSkills, useProfileTimeSpent, usePrograms, useReports, useSlashSkillPicker, useSlashSkills, useT, useTauri, useTimeTracking, useTopics, useTranscripts, useUserCourses, useUserMetadata, useUsers, useWebContainersI18n, useWebContainersLocale };
236272
237307
  //# sourceMappingURL=index.esm.js.map