@iblai/iblai-js 1.18.0 → 1.18.1

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,18 +1,18 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useRef, useEffect, useState, useCallback, useLayoutEffect, forwardRef, createElement as createElement$1, useMemo, createContext, useReducer, useImperativeHandle, useContext, useId as useId$2, useDebugValue, isValidElement, Children, PureComponent, cloneElement, Component, lazy, Suspense } from 'react';
3
3
  import { LOCAL_STORAGE_KEYS, TimeTracker, getInitials, useTenantMetadata, WithPermissions, useStripeUpgrade, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, getTimeAgo, REQUIRED_ACTIONS_FOR_GROUPS, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl, useOS, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, selectRbacPermissions, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, chatActions, WithFormPermissions, MENTOR_VISIBILITY } from '@iblai/web-utils';
4
- import { 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, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useDeleteApiKeyMutation, useGetApiKeysQuery, 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, useGetCustomMentorsQuery, 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, useGetReportsQuery, useCreateReportMutation, useGetMentorPublicSettingsQuery, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, 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, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useGetPublicMentorsQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
4
+ import { 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, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useDeleteApiKeyMutation, useGetApiKeysQuery, 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, useGetCustomMentorsQuery, 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, useGetReportsQuery, useCreateReportMutation, useGetMentorPublicSettingsQuery, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, 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, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useGetPublicMentorsQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
5
5
  import { toast, Toaster as Toaster$1 } from 'sonner';
6
6
  import { jsx, Fragment as Fragment$1, jsxs } from 'react/jsx-runtime';
7
7
  import * as ReactDOM from 'react-dom';
8
8
  import ReactDOM__default from 'react-dom';
9
9
  import { z as z$1 } from 'zod';
10
10
  import { useDispatch, useSelector } from 'react-redux';
11
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
12
+ import { createDialogScope } from '@radix-ui/react-dialog';
11
13
  import { NotificationSourceTypeEnum, StateEnum, MentorVisibilityEnum, PromptVisibilityEnum } from '@iblai/iblai-api';
12
14
  import { useSearchParams, useRouter, usePathname, useParams } from 'next/navigation';
13
15
  import { skipToken } from '@reduxjs/toolkit/query';
14
- import * as DialogPrimitive from '@radix-ui/react-dialog';
15
- import { createDialogScope } from '@radix-ui/react-dialog';
16
16
  import Image$4 from 'next/image';
17
17
  import dynamic from 'next/dynamic';
18
18
  import Link$2 from 'next/link';
@@ -89669,6 +89669,37 @@ function GroupsTab({ tenant, isTeam = false, hasInviteUserPermission = false, ha
89669
89669
  }, tenant: tenant, teamId: shareTeamId, teamName: shareTeamName }))] }));
89670
89670
  }
89671
89671
 
89672
+ var U=1,Y$1=.9,H=.8,J=.17,p=.1,u=.999,$=.9999;var k$2=.99,m=/[\\\/_+.#"@\[\(\{&]/,B$1=/[\\\/_+.#"@\[\(\{&]/g,K$1=/[\s-]/,X=/[\s-]/g;function G$1(_,C,h,P,A,f,O){if(f===C.length)return A===_.length?U:k$2;var T=`${A},${f}`;if(O[T]!==void 0)return O[T];for(var L=P.charAt(f),c=h.indexOf(L,A),S=0,E,N,R,M;c>=0;)E=G$1(_,C,h,P,c+1,f+1,O),E>S&&(c===A?E*=U:m.test(_.charAt(c-1))?(E*=H,R=_.slice(A,c-1).match(B$1),R&&A>0&&(E*=Math.pow(u,R.length))):K$1.test(_.charAt(c-1))?(E*=Y$1,M=_.slice(A,c-1).match(X),M&&A>0&&(E*=Math.pow(u,M.length))):(E*=J,A>0&&(E*=Math.pow(u,c-A))),_.charAt(c)!==C.charAt(f)&&(E*=$)),(E<p&&h.charAt(c-1)===P.charAt(f+1)||P.charAt(f+1)===P.charAt(f)&&h.charAt(c-1)!==P.charAt(f))&&(N=G$1(_,C,h,P,c+1,f+2,O),N*p>E&&(E=N*p)),E>S&&(S=E),c=h.indexOf(L,c+1);return O[T]=S,S}function D(_){return _.toLowerCase().replace(X," ")}function W(_,C,h){return _=h&&h.length>0?`${_+" "+h.join(" ")}`:_,G$1(_,C,D(_),D(C),0,0,{})}
89673
+
89674
+ var N='[cmdk-group=""]',Y='[cmdk-group-items=""]',be='[cmdk-group-heading=""]',le$1='[cmdk-item=""]',ce=`${le$1}:not([aria-disabled="true"])`,Z="cmdk-item-select",T="data-value",Re$1=(r,o,n)=>W(r,o,n),ue=React.createContext(void 0),K=()=>React.useContext(ue),de$1=React.createContext(void 0),ee$1=()=>React.useContext(de$1),fe=React.createContext(void 0),me=React.forwardRef((r,o)=>{let n=L$1(()=>{var e,a;return {search:"",value:(a=(e=r.value)!=null?e:r.defaultValue)!=null?a:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=L$1(()=>new Set),c=L$1(()=>new Map),d=L$1(()=>new Map),f=L$1(()=>new Set),p=pe(r),{label:b,children:m,value:R,onValueChange:x,filter:C,shouldFilter:S,loop:A,disablePointerSelection:ge=false,vimBindings:j=true,...O}=r,$=useId$1(),q=useId$1(),_=useId$1(),I=React.useRef(null),v=ke();k$1(()=>{if(R!==void 0){let e=R.trim();n.current.value=e,E.emit();}},[R]),k$1(()=>{v(6,ne);},[]);let E=React.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>n.current,setState:(e,a,s)=>{var i,l,g,y;if(!Object.is(n.current[e],a)){if(n.current[e]=a,e==="search")J(),z(),v(1,W);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let h=document.getElementById(_);h?h.focus():(i=document.getElementById($))==null||i.focus();}if(v(7,()=>{var h;n.current.selectedItemId=(h=M())==null?void 0:h.id,E.emit();}),s||v(5,ne),((l=p.current)==null?void 0:l.value)!==void 0){let h=a!=null?a:"";(y=(g=p.current).onValueChange)==null||y.call(g,h);return}}E.emit();}},emit:()=>{f.current.forEach(e=>e());}}),[]),U=React.useMemo(()=>({value:(e,a,s)=>{var i;a!==((i=d.current.get(e))==null?void 0:i.value)&&(d.current.set(e,{value:a,keywords:s}),n.current.filtered.items.set(e,te(a,s)),v(2,()=>{z(),E.emit();}));},item:(e,a)=>(u.current.add(e),a&&(c.current.has(a)?c.current.get(a).add(e):c.current.set(a,new Set([e]))),v(3,()=>{J(),z(),n.current.value||W(),E.emit();}),()=>{d.current.delete(e),u.current.delete(e),n.current.filtered.items.delete(e);let s=M();v(4,()=>{J(),(s==null?void 0:s.getAttribute("id"))===e&&W(),E.emit();});}),group:e=>(c.current.has(e)||c.current.set(e,new Set),()=>{d.current.delete(e),c.current.delete(e);}),filter:()=>p.current.shouldFilter,label:b||r["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:$,inputId:_,labelId:q,listInnerRef:I}),[]);function te(e,a){var i,l;let s=(l=(i=p.current)==null?void 0:i.filter)!=null?l:Re$1;return e?s(e,n.current.search,a):0}function z(){if(!n.current.search||p.current.shouldFilter===false)return;let e=n.current.filtered.items,a=[];n.current.filtered.groups.forEach(i=>{let l=c.current.get(i),g=0;l.forEach(y=>{let h=e.get(y);g=Math.max(h,g);}),a.push([i,g]);});let s=I.current;V().sort((i,l)=>{var h,F;let g=i.getAttribute("id"),y=l.getAttribute("id");return ((h=e.get(y))!=null?h:0)-((F=e.get(g))!=null?F:0)}).forEach(i=>{let l=i.closest(Y);l?l.appendChild(i.parentElement===l?i:i.closest(`${Y} > *`)):s.appendChild(i.parentElement===s?i:i.closest(`${Y} > *`));}),a.sort((i,l)=>l[1]-i[1]).forEach(i=>{var g;let l=(g=I.current)==null?void 0:g.querySelector(`${N}[${T}="${encodeURIComponent(i[0])}"]`);l==null||l.parentElement.appendChild(l);});}function W(){let e=V().find(s=>s.getAttribute("aria-disabled")!=="true"),a=e==null?void 0:e.getAttribute(T);E.setState("value",a||void 0);}function J(){var a,s,i,l;if(!n.current.search||p.current.shouldFilter===false){n.current.filtered.count=u.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let g of u.current){let y=(s=(a=d.current.get(g))==null?void 0:a.value)!=null?s:"",h=(l=(i=d.current.get(g))==null?void 0:i.keywords)!=null?l:[],F=te(y,h);n.current.filtered.items.set(g,F),F>0&&e++;}for(let[g,y]of c.current)for(let h of y)if(n.current.filtered.items.get(h)>0){n.current.filtered.groups.add(g);break}n.current.filtered.count=e;}function ne(){var a,s,i;let e=M();e&&(((a=e.parentElement)==null?void 0:a.firstChild)===e&&((i=(s=e.closest(N))==null?void 0:s.querySelector(be))==null||i.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}));}function M(){var e;return (e=I.current)==null?void 0:e.querySelector(`${le$1}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=I.current)==null?void 0:e.querySelectorAll(ce))||[])}function X(e){let s=V()[e];s&&E.setState("value",s.getAttribute(T));}function Q(e){var g;let a=M(),s=V(),i=s.findIndex(y=>y===a),l=s[i+e];(g=p.current)!=null&&g.loop&&(l=i+e<0?s[s.length-1]:i+e===s.length?s[0]:s[i+e]),l&&E.setState("value",l.getAttribute(T));}function re(e){let a=M(),s=a==null?void 0:a.closest(N),i;for(;s&&!i;)s=e>0?we(s,N):De(s,N),i=s==null?void 0:s.querySelector(ce);i?E.setState("value",i.getAttribute(T)):Q(e);}let oe=()=>X(V().length-1),ie=e=>{e.preventDefault(),e.metaKey?oe():e.altKey?re(1):Q(1);},se=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?re(-1):Q(-1);};return React.createElement(Primitive.div,{ref:o,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var s;(s=O.onKeyDown)==null||s.call(O,e);let a=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||a))switch(e.key){case "n":case "j":{j&&e.ctrlKey&&ie(e);break}case "ArrowDown":{ie(e);break}case "p":case "k":{j&&e.ctrlKey&&se(e);break}case "ArrowUp":{se(e);break}case "Home":{e.preventDefault(),X(0);break}case "End":{e.preventDefault(),oe();break}case "Enter":{e.preventDefault();let i=M();if(i){let l=new Event(Z);i.dispatchEvent(l);}}}}},React.createElement("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:Te},b),B(r,e=>React.createElement(de$1.Provider,{value:E},React.createElement(ue.Provider,{value:U},e))))}),he=React.forwardRef((r,o)=>{var _,I;let n=useId$1(),u=React.useRef(null),c=React.useContext(fe),d=K(),f=pe(r),p=(I=(_=f.current)==null?void 0:_.forceMount)!=null?I:c==null?void 0:c.forceMount;k$1(()=>{if(!p)return d.item(n,c==null?void 0:c.id)},[p]);let b=ve(n,u,[r.value,r.children,u],r.keywords),m=ee$1(),R=P$1(v=>v.value&&v.value===b.current),x=P$1(v=>p||d.filter()===false?true:v.search?v.filtered.items.get(n)>0:true);React.useEffect(()=>{let v=u.current;if(!(!v||r.disabled))return v.addEventListener(Z,C),()=>v.removeEventListener(Z,C)},[x,r.onSelect,r.disabled]);function C(){var v,E;S(),(E=(v=f.current).onSelect)==null||E.call(v,b.current);}function S(){m.setState("value",b.current,true);}if(!x)return null;let{disabled:A,value:ge,onSelect:j,forceMount:O,keywords:$,...q}=r;return React.createElement(Primitive.div,{ref:composeRefs$1(u,o),...q,id:n,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!R,"data-disabled":!!A,"data-selected":!!R,onPointerMove:A||d.getDisablePointerSelection()?void 0:S,onClick:A?void 0:C},r.children)}),Ee=React.forwardRef((r,o)=>{let{heading:n,children:u,forceMount:c,...d}=r,f=useId$1(),p=React.useRef(null),b=React.useRef(null),m=useId$1(),R=K(),x=P$1(S=>c||R.filter()===false?true:S.search?S.filtered.groups.has(f):true);k$1(()=>R.group(f),[]),ve(f,p,[r.value,r.heading,b]);let C=React.useMemo(()=>({id:f,forceMount:c}),[c]);return React.createElement(Primitive.div,{ref:composeRefs$1(p,o),...d,"cmdk-group":"",role:"presentation",hidden:x?void 0:true},n&&React.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":true,id:m},n),B(r,S=>React.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?m:void 0},React.createElement(fe.Provider,{value:C},S))))}),ye$1=React.forwardRef((r,o)=>{let{alwaysRender:n,...u}=r,c=React.useRef(null),d=P$1(f=>!f.search);return !n&&!d?null:React.createElement(Primitive.div,{ref:composeRefs$1(c,o),...u,"cmdk-separator":"",role:"separator"})}),Se=React.forwardRef((r,o)=>{let{onValueChange:n,...u}=r,c=r.value!=null,d=ee$1(),f=P$1(m=>m.search),p=P$1(m=>m.selectedItemId),b=K();return React.useEffect(()=>{r.value!=null&&d.setState("search",r.value);},[r.value]),React.createElement(Primitive.input,{ref:o,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:false,"aria-autocomplete":"list",role:"combobox","aria-expanded":true,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":p,id:b.inputId,type:"text",value:c?r.value:f,onChange:m=>{c||d.setState("search",m.target.value),n==null||n(m.target.value);}})}),Ce=React.forwardRef((r,o)=>{let{children:n,label:u="Suggestions",...c}=r,d=React.useRef(null),f=React.useRef(null),p=P$1(m=>m.selectedItemId),b=K();return React.useEffect(()=>{if(f.current&&d.current){let m=f.current,R=d.current,x,C=new ResizeObserver(()=>{x=requestAnimationFrame(()=>{let S=m.offsetHeight;R.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px");});});return C.observe(m),()=>{cancelAnimationFrame(x),C.unobserve(m);}}},[]),React.createElement(Primitive.div,{ref:composeRefs$1(d,o),...c,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":u,id:b.listId},B(r,m=>React.createElement("div",{ref:composeRefs$1(f,b.listInnerRef),"cmdk-list-sizer":""},m)))}),xe=React.forwardRef((r,o)=>{let{open:n,onOpenChange:u,overlayClassName:c,contentClassName:d,container:f,...p}=r;return React.createElement(DialogPrimitive.Root,{open:n,onOpenChange:u},React.createElement(DialogPrimitive.Portal,{container:f},React.createElement(DialogPrimitive.Overlay,{"cmdk-overlay":"",className:c}),React.createElement(DialogPrimitive.Content,{"aria-label":r.label,"cmdk-dialog":"",className:d},React.createElement(me,{ref:o,...p}))))}),Ie=React.forwardRef((r,o)=>P$1(u=>u.filtered.count===0)?React.createElement(Primitive.div,{ref:o,...r,"cmdk-empty":"",role:"presentation"}):null),Pe=React.forwardRef((r,o)=>{let{progress:n,children:u,label:c="Loading...",...d}=r;return React.createElement(Primitive.div,{ref:o,...d,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":c},B(r,f=>React.createElement("div",{"aria-hidden":true},f)))}),_e=Object.assign(me,{List:Ce,Item:he,Input:Se,Group:Ee,Separator:ye$1,Dialog:xe,Empty:Ie,Loading:Pe});function we(r,o){let n=r.nextElementSibling;for(;n;){if(n.matches(o))return n;n=n.nextElementSibling;}}function De(r,o){let n=r.previousElementSibling;for(;n;){if(n.matches(o))return n;n=n.previousElementSibling;}}function pe(r){let o=React.useRef(r);return k$1(()=>{o.current=r;}),o}var k$1=typeof window=="undefined"?React.useEffect:React.useLayoutEffect;function L$1(r){let o=React.useRef();return o.current===void 0&&(o.current=r()),o}function P$1(r){let o=ee$1(),n=()=>r(o.snapshot());return React.useSyncExternalStore(o.subscribe,n,n)}function ve(r,o,n,u=[]){let c=React.useRef(),d=K();return k$1(()=>{var b;let f=(()=>{var m;for(let R of n){if(typeof R=="string")return R.trim();if(typeof R=="object"&&"current"in R)return R.current?(m=R.current.textContent)==null?void 0:m.trim():c.current}})(),p=u.map(m=>m.trim());d.value(r,f,p),(b=o.current)==null||b.setAttribute(T,f),c.current=f;}),c}var ke=()=>{let[r,o]=React.useState(),n=L$1(()=>new Map);return k$1(()=>{n.current.forEach(u=>u()),n.current=new Map;},[r]),(u,c)=>{n.current.set(u,c),o({});}};function Me(r){let o=r.type;return typeof o=="function"?o(r.props):"render"in o?o.render(r.props):r}function B({asChild:r,children:o},n){return r&&React.isValidElement(o)?React.cloneElement(Me(o),{ref:o.ref},n(o.props.children)):n(o)}var Te={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};
89675
+
89676
+ const Command = React.forwardRef(({ className, ...props }, ref) => (jsx(_e, { ref: ref, className: cn('bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md', className), ...props })));
89677
+ Command.displayName = _e.displayName;
89678
+ const CommandInput = React.forwardRef(({ className, ...props }, ref) => (jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), jsx(_e.Input, { ref: ref, className: cn('placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50', className), ...props })] })));
89679
+ CommandInput.displayName = _e.Input.displayName;
89680
+ const CommandList = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.List, { ref: ref, className: cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className), ...props })));
89681
+ CommandList.displayName = _e.List.displayName;
89682
+ const CommandEmpty = React.forwardRef((props, ref) => (jsx(_e.Empty, { ref: ref, className: "py-6 text-center text-sm", ...props })));
89683
+ CommandEmpty.displayName = _e.Empty.displayName;
89684
+ const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Group, { ref: ref, className: cn('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className), ...props })));
89685
+ CommandGroup.displayName = _e.Group.displayName;
89686
+ const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Separator, { ref: ref, className: cn('bg-border -mx-1 h-px', className), ...props })));
89687
+ CommandSeparator.displayName = _e.Separator.displayName;
89688
+ const CommandItem = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Item, { ref: ref, className: cn("data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), ...props })));
89689
+ CommandItem.displayName = _e.Item.displayName;
89690
+
89691
+ function ActionsCombobox({ selected, onSelect, }) {
89692
+ const [open, setOpen] = useState(false);
89693
+ const { data: definitions, isLoading, isError } = useGetRbacActionsDefinitionQuery(undefined);
89694
+ const entries = useMemo(() => Object.entries(definitions !== null && definitions !== void 0 ? definitions : {}), [definitions]);
89695
+ return (jsxs("div", { children: [jsxs(Button$1, { type: "button", variant: "outline", role: "combobox", "aria-label": "Search actions", "aria-expanded": open, onClick: () => setOpen((o) => !o), className: "w-full justify-between font-normal text-muted-foreground", children: ["Search actions\u2026", jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }), open && (jsx("div", { className: "mt-2 rounded-md border border-gray-200 dark:border-gray-700", children: jsxs(Command, { filter: (value, search) => (value.toLowerCase().includes(search.toLowerCase()) ? 1 : 0), children: [jsx(CommandInput, { placeholder: "Search actions by key or description\u2026" }), jsxs(CommandList, { children: [isLoading && (jsxs("div", { className: "flex items-center justify-center py-6 text-sm text-muted-foreground", children: [jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin", "aria-hidden": "true" }), "Loading actions\u2026"] })), isError && (jsx("div", { className: "py-6 text-center text-sm text-red-500", children: "Failed to load actions" })), !isLoading && !isError && (jsxs(Fragment$1, { children: [jsx(CommandEmpty, { children: "No actions found." }), jsx(CommandGroup, { children: entries.map(([key, def]) => {
89696
+ const isAdded = selected.includes(key);
89697
+ return (jsxs(CommandItem, { value: `${key} ${def.description}`, onSelect: () => {
89698
+ onSelect(key);
89699
+ setOpen(false);
89700
+ }, className: "flex items-start gap-2", children: [jsx(Check, { className: `mt-0.5 h-4 w-4 shrink-0 ${isAdded ? 'opacity-100' : 'opacity-0'}`, "aria-hidden": "true" }), jsxs("div", { className: "flex flex-col gap-0.5", children: [jsx("span", { className: "font-mono text-xs", children: key }), jsx("span", { className: "text-xs text-muted-foreground", children: def.description })] })] }, key));
89701
+ }) })] }))] })] }) }))] }));
89702
+ }
89672
89703
  function RolesTab({ tenant }) {
89673
89704
  const [page, setPage] = useState(1);
89674
89705
  const [searchQuery, setSearchQuery] = useState('');
@@ -89754,6 +89785,9 @@ function RolesTab({ tenant }) {
89754
89785
  setActionInput('');
89755
89786
  }
89756
89787
  }
89788
+ function addActionKey(key) {
89789
+ setActions((prev) => (prev.includes(key) ? prev : [...prev, key]));
89790
+ }
89757
89791
  function removeAction(action) {
89758
89792
  setActions(actions.filter((a) => a !== action));
89759
89793
  }
@@ -89816,7 +89850,7 @@ function RolesTab({ tenant }) {
89816
89850
  setDeletingRoleId(null);
89817
89851
  }
89818
89852
  }
89819
- return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1 mb-6", children: [jsxs("div", { className: "relative max-w-sm", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search roles", "aria-label": "Search roles", className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]" }), isLoading && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), jsx(Button$1, { onClick: openNew, "aria-label": "New role", className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: "New Role" })] }), isLoading && (jsx("div", { className: "flex justify-center items-center h-64", children: jsx("div", { className: "py-8 text-center text-sm text-gray-500 dark:text-gray-400", children: "Loading\u2026" }) })), isError && jsx("div", { className: "py-8 text-center text-sm text-red-500", children: "Failed to load roles" }), !isLoading && !isError && (jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: "Name" }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[100px]" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [roles.map((r) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm", children: r.name }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex gap-2 justify-end", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(r), disabled: deletingRoleId === r.id, "aria-label": `Edit role ${r.name}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { tabIndex: 0, children: jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => onDelete(r), className: "text-red-600 hover:text-red-700", disabled: deletingRoleId === r.id || r.is_internal, "aria-label": `Delete role ${r.name}`, children: deletingRoleId === r.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" })) }) }) }), r.is_internal && (jsx(TooltipContent, { children: jsx("p", { children: "Cannot delete internal roles" }) }))] }) })] }) })] }, r.id))), roles.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 2, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: "No roles found" }) }))] })] }) })), !isLoading && !isError && (jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => handlePageChange(newPage), totalCount: data === null || data === void 0 ? void 0 : data.count, itemsPerPage: 10, itemLabel: "roles" })), jsx(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: jsxs(DialogContent, { "aria-describedby": undefined, className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: editing ? 'Edit Role' : 'New Role' }) }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$2, { htmlFor: "r-name", children: "Role Name" }), jsx(Input, { id: "r-name", value: form.name, onChange: (e) => setForm({ ...form, name: e.target.value }), placeholder: "Enter role name", required: true })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$2, { htmlFor: "r-actions", children: "Actions" }), jsxs("div", { className: "space-y-2", children: [actions.length > 0 && (jsx("div", { className: "flex flex-wrap gap-2 p-2 border border-gray-200 dark:border-gray-700 rounded-md bg-gray-50 dark:bg-gray-800", children: actions.map((action, index) => (jsxs(Badge, { variant: "secondary", className: "px-2 py-1 flex items-center gap-1 font-mono text-xs", children: [jsx("span", { children: action }), jsx("button", { type: "button", onClick: () => removeAction(action), className: "ml-1 hover:text-red-600", "aria-label": `Remove action ${action}`, children: jsx(X$1, { className: "h-3 w-3" }) })] }, index))) })), jsxs("div", { className: "flex gap-2", children: [jsx(Input, { id: "r-actions", value: actionInput, onChange: (e) => setActionInput(e.target.value), onKeyDown: handleActionKeyDown, placeholder: "e.g., Ibl.Mentor/Settings/read, Ibl.Mentor/*/write", className: "flex-1 font-mono text-sm" }), jsx(Button$1, { type: "button", variant: "outline", size: "sm", onClick: addAction, disabled: !actionInput.trim(), "aria-label": "Add action", children: jsx(Plus, { className: "h-4 w-4" }) })] }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Press Enter or click + to add. Supports wildcards (e.g., Ibl.Mentor/*/read)" })] })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$2, { htmlFor: "r-data-actions", children: "Data Actions" }), jsxs("div", { className: "space-y-2", children: [dataActions.length > 0 && (jsx("div", { className: "flex flex-wrap gap-2 p-2 border border-gray-200 dark:border-gray-700 rounded-md bg-gray-50 dark:bg-gray-800", children: dataActions.map((action, index) => (jsxs(Badge, { variant: "secondary", className: "px-2 py-1 flex items-center gap-1 font-mono text-xs", children: [jsx("span", { children: action }), jsx("button", { type: "button", onClick: () => removeDataAction(action), className: "ml-1 hover:text-red-600", "aria-label": `Remove data action ${action}`, children: jsx(X$1, { className: "h-3 w-3" }) })] }, index))) })), jsxs("div", { className: "flex gap-2", children: [jsx(Input, { id: "r-data-actions", value: dataActionInput, onChange: (e) => setDataActionInput(e.target.value), onKeyDown: handleDataActionKeyDown, placeholder: "e.g., Ibl.Mentor/Settings/email/read, Ibl.Core/*/name/write", className: "flex-1 font-mono text-sm" }), jsx(Button$1, { type: "button", variant: "outline", size: "sm", onClick: addDataAction, disabled: !dataActionInput.trim(), "aria-label": "Add data action", children: jsx(Plus, { className: "h-4 w-4" }) })] }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Press Enter or click + to add. Field-level access (e.g., Ibl.Mentor/Settings/email/read)" })] })] })] }), jsxs(DialogFooter, { className: "mt-6", children: [jsx(Button$1, { variant: "outline", onClick: () => setIsOpen(false), children: "Cancel" }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { tabIndex: 0, children: jsx(Button$1, { onClick: onSubmit, disabled: !!editing && (roleDetails === null || roleDetails === void 0 ? void 0 : roleDetails.is_internal), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", children: editing ? 'Save Role' : 'Create Role' }) }) }), editing && (roleDetails === null || roleDetails === void 0 ? void 0 : roleDetails.is_internal) && (jsx(TooltipContent, { children: jsx("p", { children: "Cannot edit internal roles" }) }))] }) })] })] }) })] }));
89853
+ return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1 mb-6", children: [jsxs("div", { className: "relative max-w-sm", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search roles", "aria-label": "Search roles", className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]" }), isLoading && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), jsx(Button$1, { onClick: openNew, "aria-label": "New role", className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: "New Role" })] }), isLoading && (jsx("div", { className: "flex justify-center items-center h-64", children: jsx("div", { className: "py-8 text-center text-sm text-gray-500 dark:text-gray-400", children: "Loading\u2026" }) })), isError && jsx("div", { className: "py-8 text-center text-sm text-red-500", children: "Failed to load roles" }), !isLoading && !isError && (jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: "Name" }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[100px]" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [roles.map((r) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm", children: r.name }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex gap-2 justify-end", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(r), disabled: deletingRoleId === r.id, "aria-label": `Edit role ${r.name}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { tabIndex: 0, children: jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => onDelete(r), className: "text-red-600 hover:text-red-700", disabled: deletingRoleId === r.id || r.is_internal, "aria-label": `Delete role ${r.name}`, children: deletingRoleId === r.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" })) }) }) }), r.is_internal && (jsx(TooltipContent, { children: jsx("p", { children: "Cannot delete internal roles" }) }))] }) })] }) })] }, r.id))), roles.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 2, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: "No roles found" }) }))] })] }) })), !isLoading && !isError && (jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => handlePageChange(newPage), totalCount: data === null || data === void 0 ? void 0 : data.count, itemsPerPage: 10, itemLabel: "roles" })), jsx(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: jsxs(DialogContent, { "aria-describedby": undefined, className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: editing ? 'Edit Role' : 'New Role' }) }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$2, { htmlFor: "r-name", children: "Role Name" }), jsx(Input, { id: "r-name", value: form.name, onChange: (e) => setForm({ ...form, name: e.target.value }), placeholder: "Enter role name", required: true })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$2, { htmlFor: "r-actions", children: "Actions" }), jsxs("div", { className: "space-y-2", children: [actions.length > 0 && (jsx("div", { className: "flex flex-wrap gap-2 p-2 border border-gray-200 dark:border-gray-700 rounded-md bg-gray-50 dark:bg-gray-800", children: actions.map((action, index) => (jsxs(Badge, { variant: "secondary", className: "px-2 py-1 flex items-center gap-1 font-mono text-xs", children: [jsx("span", { children: action }), jsx("button", { type: "button", onClick: () => removeAction(action), className: "ml-1 hover:text-red-600", "aria-label": `Remove action ${action}`, children: jsx(X$1, { className: "h-3 w-3" }) })] }, index))) })), jsx(ActionsCombobox, { selected: actions, onSelect: addActionKey }), jsxs("div", { className: "flex gap-2", children: [jsx(Input, { id: "r-actions", value: actionInput, onChange: (e) => setActionInput(e.target.value), onKeyDown: handleActionKeyDown, placeholder: "Or type a custom action, e.g., Ibl.Mentor/*/write", className: "flex-1 font-mono text-sm" }), jsx(Button$1, { type: "button", variant: "outline", size: "sm", onClick: addAction, disabled: !actionInput.trim(), "aria-label": "Add action", children: jsx(Plus, { className: "h-4 w-4" }) })] }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Search predefined actions above, or type a custom one. Supports wildcards (e.g., Ibl.Mentor/*/read)" })] })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$2, { htmlFor: "r-data-actions", children: "Data Actions" }), jsxs("div", { className: "space-y-2", children: [dataActions.length > 0 && (jsx("div", { className: "flex flex-wrap gap-2 p-2 border border-gray-200 dark:border-gray-700 rounded-md bg-gray-50 dark:bg-gray-800", children: dataActions.map((action, index) => (jsxs(Badge, { variant: "secondary", className: "px-2 py-1 flex items-center gap-1 font-mono text-xs", children: [jsx("span", { children: action }), jsx("button", { type: "button", onClick: () => removeDataAction(action), className: "ml-1 hover:text-red-600", "aria-label": `Remove data action ${action}`, children: jsx(X$1, { className: "h-3 w-3" }) })] }, index))) })), jsxs("div", { className: "flex gap-2", children: [jsx(Input, { id: "r-data-actions", value: dataActionInput, onChange: (e) => setDataActionInput(e.target.value), onKeyDown: handleDataActionKeyDown, placeholder: "e.g., Ibl.Mentor/Settings/email/read, Ibl.Core/*/name/write", className: "flex-1 font-mono text-sm" }), jsx(Button$1, { type: "button", variant: "outline", size: "sm", onClick: addDataAction, disabled: !dataActionInput.trim(), "aria-label": "Add data action", children: jsx(Plus, { className: "h-4 w-4" }) })] }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Press Enter or click + to add. Field-level access (e.g., Ibl.Mentor/Settings/email/read)" })] })] })] }), jsxs(DialogFooter, { className: "mt-6 gap-1.5", children: [jsx(Button$1, { variant: "outline", onClick: () => setIsOpen(false), children: "Cancel" }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { tabIndex: 0, className: "", children: jsx(Button$1, { onClick: onSubmit, disabled: !!editing && (roleDetails === null || roleDetails === void 0 ? void 0 : roleDetails.is_internal), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white w-full", children: editing ? 'Save Role' : 'Create Role' }) }) }), editing && (roleDetails === null || roleDetails === void 0 ? void 0 : roleDetails.is_internal) && (jsx(TooltipContent, { children: jsx("p", { children: "Cannot edit internal roles" }) }))] }) })] })] }) })] }));
89820
89854
  }
89821
89855
 
89822
89856
  function PoliciesTab({ tenant }) {
@@ -94335,10 +94369,11 @@ function daysFromCurrentDate(targetDate) {
94335
94369
  const oneDay = 24 * 60 * 60 * 1000; // Number of milliseconds in a day
94336
94370
  const timeDifference = targetDate.getTime() - currentDate.getTime();
94337
94371
  const daysDifference = Math.ceil(timeDifference / oneDay);
94338
- return daysDifference * 24 * 3600;
94372
+ return daysDifference * 24 * 3600; // Number of seconds in a day
94339
94373
  }
94340
94374
  function CreateApiModal({ isOpen, onClose, tenantKey, username }) {
94341
94375
  const [apiKey, setApiKey] = React__default.useState(null);
94376
+ const [isCalendarOpen, setIsCalendarOpen] = React__default.useState(false);
94342
94377
  const [createApiKey, { isLoading }] = useCreateApiKeyMutation();
94343
94378
  const form = useForm({
94344
94379
  defaultValues: createApiFormDefaultValues,
@@ -94382,9 +94417,12 @@ function CreateApiModal({ isOpen, onClose, tenantKey, username }) {
94382
94417
  const isDirty = field.state.meta.isDirty;
94383
94418
  const hasErrorAndIsDirty = hasError && isDirty;
94384
94419
  return (jsxs("div", { className: "space-y-1.5", children: [jsxs(Label$2, { className: "flex items-center text-sm font-medium text-[#646464]", children: ["API Key Name", jsx("span", { className: "ml-1 text-red-500", children: "*" })] }), jsx(Input, { placeholder: "API Key Name", value: field.state.value, onChange: (event) => field.handleChange(event.target.value), autoComplete: "off" }), hasErrorAndIsDirty && (jsx("p", { className: "text-red-500 text-xs", children: (_b = field.state.meta.errors[0]) === null || _b === void 0 ? void 0 : _b.message }))] }));
94385
- } }), jsx(form.Field, { name: "expiration_date", children: (field) => (jsxs("div", { className: "space-y-1.5", children: [jsx(Label$2, { className: "flex items-center text-sm font-medium text-[#646464]", children: "Expiration Date" }), jsxs(Popover, { children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { type: "button", variant: "outline", className: cn('w-full pl-3 text-left font-normal', !field.state.value && 'text-muted-foreground'), children: [field.state.value ? (format$1(field.state.value, 'PPP')) : (jsx("span", { children: "Pick a date" })), jsx(Calendar$1, { className: "ml-auto h-4 w-4 opacity-50" })] }) }), jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: jsx(Calendar, { mode: "single",
94420
+ } }), jsx(form.Field, { name: "expiration_date", children: (field) => (jsxs("div", { className: "space-y-1.5", children: [jsx(Label$2, { className: "flex items-center text-sm font-medium text-[#646464]", children: "Expiration Date" }), jsxs("div", { children: [jsxs(Button$1, { type: "button", variant: "outline", "aria-haspopup": "dialog", "aria-expanded": isCalendarOpen, onClick: () => setIsCalendarOpen((open) => !open), className: cn('w-full pl-3 text-left font-normal', !field.state.value && 'text-muted-foreground'), children: [field.state.value ? (format$1(field.state.value, 'PPP')) : (jsx("span", { children: "Pick a date" })), jsx(Calendar$1, { className: "ml-auto h-4 w-4 opacity-50" })] }), isCalendarOpen && (jsx("div", { className: "mt-2 w-auto rounded-md border border-gray-200 dark:border-gray-700", children: jsx(Calendar, { mode: "single",
94386
94421
  // @ts-expect-error - Calendar selected prop expects Date but form field may be null
94387
- selected: field.state.value, onSelect: field.handleChange, disabled: (date) => date && date < new Date() }) })] })] })) }), jsx(DialogFooter, { className: "justify-end", children: jsx(form.Subscribe, { selector: (state) => ({
94422
+ selected: field.state.value, onSelect: (date) => {
94423
+ field.handleChange(date !== null && date !== void 0 ? date : null);
94424
+ setIsCalendarOpen(false);
94425
+ }, disabled: (date) => date && date < new Date() }) }))] })] })) }), jsx(DialogFooter, { className: "justify-end", children: jsx(form.Subscribe, { selector: (state) => ({
94388
94426
  canSubmit: state.canSubmit,
94389
94427
  }), children: ({ canSubmit }) => (jsx(Button$1, { type: "submit", disabled: !canSubmit || isLoading, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: isLoading ? 'Submitting...' : 'Submit' })) }) })] })] }) }), apiKey && jsx(ApiKeyModal, { isOpen: true, onClose: () => setApiKey(null), apiKey: apiKey })] }));
94390
94428
  }
@@ -132223,14 +132261,14 @@ var symbolTriangle = {
132223
132261
 
132224
132262
  const c$1 = -0.5;
132225
132263
  const s = sqrt$1(3) / 2;
132226
- const k$2 = 1 / sqrt$1(12);
132227
- const a$1 = (k$2 / 2 + 1) * 3;
132264
+ const k = 1 / sqrt$1(12);
132265
+ const a$1 = (k / 2 + 1) * 3;
132228
132266
 
132229
132267
  var symbolWye = {
132230
132268
  draw(context, size) {
132231
132269
  const r = sqrt$1(size / a$1);
132232
- const x0 = r / 2, y0 = r * k$2;
132233
- const x1 = x0, y1 = r * k$2 + r;
132270
+ const x0 = r / 2, y0 = r * k;
132271
+ const x1 = x0, y1 = r * k + r;
132234
132272
  const x2 = -x1, y2 = y1;
132235
132273
  context.moveTo(x0, y0);
132236
132274
  context.lineTo(x1, y1);
@@ -141436,7 +141474,7 @@ var MAX_DIGITS = 1e9, // 0 to 1e9
141436
141474
  MAX_E = mathfloor(MAX_SAFE_INTEGER / LOG_BASE), // 1286742750677284
141437
141475
 
141438
141476
  // Decimal.prototype object
141439
- P$1 = {};
141477
+ P = {};
141440
141478
 
141441
141479
 
141442
141480
  // Decimal prototype methods
@@ -141485,7 +141523,7 @@ var MAX_DIGITS = 1e9, // 0 to 1e9
141485
141523
  * Return a new Decimal whose value is the absolute value of this Decimal.
141486
141524
  *
141487
141525
  */
141488
- P$1.absoluteValue = P$1.abs = function () {
141526
+ P.absoluteValue = P.abs = function () {
141489
141527
  var x = new this.constructor(this);
141490
141528
  if (x.s) x.s = 1;
141491
141529
  return x;
@@ -141499,7 +141537,7 @@ P$1.absoluteValue = P$1.abs = function () {
141499
141537
  * 0 if they have the same value
141500
141538
  *
141501
141539
  */
141502
- P$1.comparedTo = P$1.cmp = function (y) {
141540
+ P.comparedTo = P.cmp = function (y) {
141503
141541
  var i, j, xdL, ydL,
141504
141542
  x = this;
141505
141543
 
@@ -141528,7 +141566,7 @@ P$1.comparedTo = P$1.cmp = function (y) {
141528
141566
  * Return the number of decimal places of the value of this Decimal.
141529
141567
  *
141530
141568
  */
141531
- P$1.decimalPlaces = P$1.dp = function () {
141569
+ P.decimalPlaces = P.dp = function () {
141532
141570
  var x = this,
141533
141571
  w = x.d.length - 1,
141534
141572
  dp = (w - x.e) * LOG_BASE;
@@ -141546,7 +141584,7 @@ P$1.decimalPlaces = P$1.dp = function () {
141546
141584
  * `precision` significant digits.
141547
141585
  *
141548
141586
  */
141549
- P$1.dividedBy = P$1.div = function (y) {
141587
+ P.dividedBy = P.div = function (y) {
141550
141588
  return divide$2(this, new this.constructor(y));
141551
141589
  };
141552
141590
 
@@ -141556,7 +141594,7 @@ P$1.dividedBy = P$1.div = function (y) {
141556
141594
  * by the value of `y`, truncated to `precision` significant digits.
141557
141595
  *
141558
141596
  */
141559
- P$1.dividedToIntegerBy = P$1.idiv = function (y) {
141597
+ P.dividedToIntegerBy = P.idiv = function (y) {
141560
141598
  var x = this,
141561
141599
  Ctor = x.constructor;
141562
141600
  return round(divide$2(x, new Ctor(y), 0, 1), Ctor.precision);
@@ -141567,7 +141605,7 @@ P$1.dividedToIntegerBy = P$1.idiv = function (y) {
141567
141605
  * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.
141568
141606
  *
141569
141607
  */
141570
- P$1.equals = P$1.eq = function (y) {
141608
+ P.equals = P.eq = function (y) {
141571
141609
  return !this.cmp(y);
141572
141610
  };
141573
141611
 
@@ -141576,7 +141614,7 @@ P$1.equals = P$1.eq = function (y) {
141576
141614
  * Return the (base 10) exponent value of this Decimal (this.e is the base 10000000 exponent).
141577
141615
  *
141578
141616
  */
141579
- P$1.exponent = function () {
141617
+ P.exponent = function () {
141580
141618
  return getBase10Exponent(this);
141581
141619
  };
141582
141620
 
@@ -141586,7 +141624,7 @@ P$1.exponent = function () {
141586
141624
  * false.
141587
141625
  *
141588
141626
  */
141589
- P$1.greaterThan = P$1.gt = function (y) {
141627
+ P.greaterThan = P.gt = function (y) {
141590
141628
  return this.cmp(y) > 0;
141591
141629
  };
141592
141630
 
@@ -141596,7 +141634,7 @@ P$1.greaterThan = P$1.gt = function (y) {
141596
141634
  * otherwise return false.
141597
141635
  *
141598
141636
  */
141599
- P$1.greaterThanOrEqualTo = P$1.gte = function (y) {
141637
+ P.greaterThanOrEqualTo = P.gte = function (y) {
141600
141638
  return this.cmp(y) >= 0;
141601
141639
  };
141602
141640
 
@@ -141605,7 +141643,7 @@ P$1.greaterThanOrEqualTo = P$1.gte = function (y) {
141605
141643
  * Return true if the value of this Decimal is an integer, otherwise return false.
141606
141644
  *
141607
141645
  */
141608
- P$1.isInteger = P$1.isint = function () {
141646
+ P.isInteger = P.isint = function () {
141609
141647
  return this.e > this.d.length - 2;
141610
141648
  };
141611
141649
 
@@ -141614,7 +141652,7 @@ P$1.isInteger = P$1.isint = function () {
141614
141652
  * Return true if the value of this Decimal is negative, otherwise return false.
141615
141653
  *
141616
141654
  */
141617
- P$1.isNegative = P$1.isneg = function () {
141655
+ P.isNegative = P.isneg = function () {
141618
141656
  return this.s < 0;
141619
141657
  };
141620
141658
 
@@ -141623,7 +141661,7 @@ P$1.isNegative = P$1.isneg = function () {
141623
141661
  * Return true if the value of this Decimal is positive, otherwise return false.
141624
141662
  *
141625
141663
  */
141626
- P$1.isPositive = P$1.ispos = function () {
141664
+ P.isPositive = P.ispos = function () {
141627
141665
  return this.s > 0;
141628
141666
  };
141629
141667
 
@@ -141632,7 +141670,7 @@ P$1.isPositive = P$1.ispos = function () {
141632
141670
  * Return true if the value of this Decimal is 0, otherwise return false.
141633
141671
  *
141634
141672
  */
141635
- P$1.isZero = function () {
141673
+ P.isZero = function () {
141636
141674
  return this.s === 0;
141637
141675
  };
141638
141676
 
@@ -141641,7 +141679,7 @@ P$1.isZero = function () {
141641
141679
  * Return true if the value of this Decimal is less than `y`, otherwise return false.
141642
141680
  *
141643
141681
  */
141644
- P$1.lessThan = P$1.lt = function (y) {
141682
+ P.lessThan = P.lt = function (y) {
141645
141683
  return this.cmp(y) < 0;
141646
141684
  };
141647
141685
 
@@ -141650,7 +141688,7 @@ P$1.lessThan = P$1.lt = function (y) {
141650
141688
  * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.
141651
141689
  *
141652
141690
  */
141653
- P$1.lessThanOrEqualTo = P$1.lte = function (y) {
141691
+ P.lessThanOrEqualTo = P.lte = function (y) {
141654
141692
  return this.cmp(y) < 1;
141655
141693
  };
141656
141694
 
@@ -141668,7 +141706,7 @@ P$1.lessThanOrEqualTo = P$1.lte = function (y) {
141668
141706
  * [base] {number|string|Decimal} The base of the logarithm.
141669
141707
  *
141670
141708
  */
141671
- P$1.logarithm = P$1.log = function (base) {
141709
+ P.logarithm = P.log = function (base) {
141672
141710
  var r,
141673
141711
  x = this,
141674
141712
  Ctor = x.constructor,
@@ -141707,7 +141745,7 @@ P$1.logarithm = P$1.log = function (base) {
141707
141745
  * `precision` significant digits.
141708
141746
  *
141709
141747
  */
141710
- P$1.minus = P$1.sub = function (y) {
141748
+ P.minus = P.sub = function (y) {
141711
141749
  var x = this;
141712
141750
  y = new x.constructor(y);
141713
141751
  return x.s == y.s ? subtract(x, y) : add(x, (y.s = -y.s, y));
@@ -141719,7 +141757,7 @@ P$1.minus = P$1.sub = function (y) {
141719
141757
  * `precision` significant digits.
141720
141758
  *
141721
141759
  */
141722
- P$1.modulo = P$1.mod = function (y) {
141760
+ P.modulo = P.mod = function (y) {
141723
141761
  var q,
141724
141762
  x = this,
141725
141763
  Ctor = x.constructor,
@@ -141748,7 +141786,7 @@ P$1.modulo = P$1.mod = function (y) {
141748
141786
  * significant digits.
141749
141787
  *
141750
141788
  */
141751
- P$1.naturalExponential = P$1.exp = function () {
141789
+ P.naturalExponential = P.exp = function () {
141752
141790
  return exp(this);
141753
141791
  };
141754
141792
 
@@ -141758,7 +141796,7 @@ P$1.naturalExponential = P$1.exp = function () {
141758
141796
  * truncated to `precision` significant digits.
141759
141797
  *
141760
141798
  */
141761
- P$1.naturalLogarithm = P$1.ln = function () {
141799
+ P.naturalLogarithm = P.ln = function () {
141762
141800
  return ln(this);
141763
141801
  };
141764
141802
 
@@ -141768,7 +141806,7 @@ P$1.naturalLogarithm = P$1.ln = function () {
141768
141806
  * -1.
141769
141807
  *
141770
141808
  */
141771
- P$1.negated = P$1.neg = function () {
141809
+ P.negated = P.neg = function () {
141772
141810
  var x = new this.constructor(this);
141773
141811
  x.s = -x.s || 0;
141774
141812
  return x;
@@ -141780,7 +141818,7 @@ P$1.negated = P$1.neg = function () {
141780
141818
  * `precision` significant digits.
141781
141819
  *
141782
141820
  */
141783
- P$1.plus = P$1.add = function (y) {
141821
+ P.plus = P.add = function (y) {
141784
141822
  var x = this;
141785
141823
  y = new x.constructor(y);
141786
141824
  return x.s == y.s ? add(x, y) : subtract(x, (y.s = -y.s, y));
@@ -141793,7 +141831,7 @@ P$1.plus = P$1.add = function (y) {
141793
141831
  * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.
141794
141832
  *
141795
141833
  */
141796
- P$1.precision = P$1.sd = function (z) {
141834
+ P.precision = P.sd = function (z) {
141797
141835
  var e, sd, w,
141798
141836
  x = this;
141799
141837
 
@@ -141823,7 +141861,7 @@ P$1.precision = P$1.sd = function (z) {
141823
141861
  * significant digits.
141824
141862
  *
141825
141863
  */
141826
- P$1.squareRoot = P$1.sqrt = function () {
141864
+ P.squareRoot = P.sqrt = function () {
141827
141865
  var e, n, pr, r, s, t, wpr,
141828
141866
  x = this,
141829
141867
  Ctor = x.constructor;
@@ -141904,7 +141942,7 @@ P$1.squareRoot = P$1.sqrt = function () {
141904
141942
  * `precision` significant digits.
141905
141943
  *
141906
141944
  */
141907
- P$1.times = P$1.mul = function (y) {
141945
+ P.times = P.mul = function (y) {
141908
141946
  var carry, e, i, k, r, rL, t, xdL, ydL,
141909
141947
  x = this,
141910
141948
  Ctor = x.constructor,
@@ -141969,7 +142007,7 @@ P$1.times = P$1.mul = function (y) {
141969
142007
  * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
141970
142008
  *
141971
142009
  */
141972
- P$1.toDecimalPlaces = P$1.todp = function (dp, rm) {
142010
+ P.toDecimalPlaces = P.todp = function (dp, rm) {
141973
142011
  var x = this,
141974
142012
  Ctor = x.constructor;
141975
142013
 
@@ -141993,7 +142031,7 @@ P$1.toDecimalPlaces = P$1.todp = function (dp, rm) {
141993
142031
  * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
141994
142032
  *
141995
142033
  */
141996
- P$1.toExponential = function (dp, rm) {
142034
+ P.toExponential = function (dp, rm) {
141997
142035
  var str,
141998
142036
  x = this,
141999
142037
  Ctor = x.constructor;
@@ -142030,7 +142068,7 @@ P$1.toExponential = function (dp, rm) {
142030
142068
  * (-0.5).toFixed(0) is '-0'.
142031
142069
  *
142032
142070
  */
142033
- P$1.toFixed = function (dp, rm) {
142071
+ P.toFixed = function (dp, rm) {
142034
142072
  var str, y,
142035
142073
  x = this,
142036
142074
  Ctor = x.constructor;
@@ -142056,7 +142094,7 @@ P$1.toFixed = function (dp, rm) {
142056
142094
  * rounding mode `rounding`.
142057
142095
  *
142058
142096
  */
142059
- P$1.toInteger = P$1.toint = function () {
142097
+ P.toInteger = P.toint = function () {
142060
142098
  var x = this,
142061
142099
  Ctor = x.constructor;
142062
142100
  return round(new Ctor(x), getBase10Exponent(x) + 1, Ctor.rounding);
@@ -142067,7 +142105,7 @@ P$1.toInteger = P$1.toint = function () {
142067
142105
  * Return the value of this Decimal converted to a number primitive.
142068
142106
  *
142069
142107
  */
142070
- P$1.toNumber = function () {
142108
+ P.toNumber = function () {
142071
142109
  return +this;
142072
142110
  };
142073
142111
 
@@ -142085,7 +142123,7 @@ P$1.toNumber = function () {
142085
142123
  * y {number|string|Decimal} The power to which to raise this Decimal.
142086
142124
  *
142087
142125
  */
142088
- P$1.toPower = P$1.pow = function (y) {
142126
+ P.toPower = P.pow = function (y) {
142089
142127
  var e, k, pr, r, sign, yIsInt,
142090
142128
  x = this,
142091
142129
  Ctor = x.constructor,
@@ -142175,7 +142213,7 @@ P$1.toPower = P$1.pow = function (y) {
142175
142213
  * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
142176
142214
  *
142177
142215
  */
142178
- P$1.toPrecision = function (sd, rm) {
142216
+ P.toPrecision = function (sd, rm) {
142179
142217
  var e, str,
142180
142218
  x = this,
142181
142219
  Ctor = x.constructor;
@@ -142207,7 +142245,7 @@ P$1.toPrecision = function (sd, rm) {
142207
142245
  * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
142208
142246
  *
142209
142247
  */
142210
- P$1.toSignificantDigits = P$1.tosd = function (sd, rm) {
142248
+ P.toSignificantDigits = P.tosd = function (sd, rm) {
142211
142249
  var x = this,
142212
142250
  Ctor = x.constructor;
142213
142251
 
@@ -142232,7 +142270,7 @@ P$1.toSignificantDigits = P$1.tosd = function (sd, rm) {
142232
142270
  * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.
142233
142271
  *
142234
142272
  */
142235
- P$1.toString = P$1.valueOf = P$1.val = P$1.toJSON = P$1[Symbol.for('nodejs.util.inspect.custom')] = function () {
142273
+ P.toString = P.valueOf = P.val = P.toJSON = P[Symbol.for('nodejs.util.inspect.custom')] = function () {
142236
142274
  var x = this,
142237
142275
  e = getBase10Exponent(x),
142238
142276
  Ctor = x.constructor;
@@ -143263,7 +143301,7 @@ function clone(obj) {
143263
143301
  else throw Error(invalidArgument + value);
143264
143302
  }
143265
143303
 
143266
- Decimal.prototype = P$1;
143304
+ Decimal.prototype = P;
143267
143305
 
143268
143306
  Decimal.ROUND_UP = 0;
143269
143307
  Decimal.ROUND_DOWN = 1;
@@ -160499,7 +160537,7 @@ var ForAll = "∀";
160499
160537
  var Fouriertrf = "ℱ";
160500
160538
  var Fscr = "ℱ";
160501
160539
  var GJcy = "Ѓ";
160502
- var G$1 = ">";
160540
+ var G = ">";
160503
160541
  var GT = ">";
160504
160542
  var Gamma = "Γ";
160505
160543
  var Gammad = "Ϝ";
@@ -160577,7 +160615,7 @@ var Kfr = "𝔎";
160577
160615
  var Kopf = "𝕂";
160578
160616
  var Kscr = "𝒦";
160579
160617
  var LJcy = "Љ";
160580
- var L$1 = "<";
160618
+ var L = "<";
160581
160619
  var LT = "<";
160582
160620
  var Lacute = "Ĺ";
160583
160621
  var Lambda = "Λ";
@@ -160779,7 +160817,7 @@ var Rarrtl = "⤖";
160779
160817
  var Rcaron = "Ř";
160780
160818
  var Rcedil = "Ŗ";
160781
160819
  var Rcy = "Р";
160782
- var Re$1 = "ℜ";
160820
+ var Re = "ℜ";
160783
160821
  var ReverseElement = "∋";
160784
160822
  var ReverseEquilibrium = "⇋";
160785
160823
  var ReverseUpEquilibrium = "⥯";
@@ -161263,7 +161301,7 @@ var dd = "ⅆ";
161263
161301
  var ddagger = "‡";
161264
161302
  var ddarr = "⇊";
161265
161303
  var ddotseq = "⩷";
161266
- var de$1 = "°";
161304
+ var de = "°";
161267
161305
  var deg = "°";
161268
161306
  var delta = "δ";
161269
161307
  var demptyv = "⦱";
@@ -161325,7 +161363,7 @@ var ecirc = "ê";
161325
161363
  var ecolon = "≕";
161326
161364
  var ecy = "э";
161327
161365
  var edot = "ė";
161328
- var ee$1 = "ⅇ";
161366
+ var ee = "ⅇ";
161329
161367
  var efDot = "≒";
161330
161368
  var efr = "𝔢";
161331
161369
  var eg = "⪚";
@@ -161627,7 +161665,7 @@ var ldquor = "„";
161627
161665
  var ldrdhar = "⥧";
161628
161666
  var ldrushar = "⥋";
161629
161667
  var ldsh = "↲";
161630
- var le$1 = "≤";
161668
+ var le = "≤";
161631
161669
  var leftarrow = "←";
161632
161670
  var leftarrowtail = "↢";
161633
161671
  var leftharpoondown = "↽";
@@ -162529,7 +162567,7 @@ var yacute = "ý";
162529
162567
  var yacy = "я";
162530
162568
  var ycirc = "ŷ";
162531
162569
  var ycy = "ы";
162532
- var ye$1 = "¥";
162570
+ var ye = "¥";
162533
162571
  var yen = "¥";
162534
162572
  var yfr = "𝔶";
162535
162573
  var yicy = "ї";
@@ -162720,7 +162758,7 @@ var require$$0 = {
162720
162758
  Fouriertrf: Fouriertrf,
162721
162759
  Fscr: Fscr,
162722
162760
  GJcy: GJcy,
162723
- G: G$1,
162761
+ G: G,
162724
162762
  GT: GT,
162725
162763
  Gamma: Gamma,
162726
162764
  Gammad: Gammad,
@@ -162798,7 +162836,7 @@ var require$$0 = {
162798
162836
  Kopf: Kopf,
162799
162837
  Kscr: Kscr,
162800
162838
  LJcy: LJcy,
162801
- L: L$1,
162839
+ L: L,
162802
162840
  LT: LT,
162803
162841
  Lacute: Lacute,
162804
162842
  Lambda: Lambda,
@@ -163001,7 +163039,7 @@ var require$$0 = {
163001
163039
  Rcaron: Rcaron,
163002
163040
  Rcedil: Rcedil,
163003
163041
  Rcy: Rcy,
163004
- Re: Re$1,
163042
+ Re: Re,
163005
163043
  ReverseElement: ReverseElement,
163006
163044
  ReverseEquilibrium: ReverseEquilibrium,
163007
163045
  ReverseUpEquilibrium: ReverseUpEquilibrium,
@@ -163485,7 +163523,7 @@ var require$$0 = {
163485
163523
  ddagger: ddagger,
163486
163524
  ddarr: ddarr,
163487
163525
  ddotseq: ddotseq,
163488
- de: de$1,
163526
+ de: de,
163489
163527
  deg: deg,
163490
163528
  delta: delta,
163491
163529
  demptyv: demptyv,
@@ -163547,7 +163585,7 @@ var require$$0 = {
163547
163585
  ecolon: ecolon,
163548
163586
  ecy: ecy,
163549
163587
  edot: edot,
163550
- ee: ee$1,
163588
+ ee: ee,
163551
163589
  efDot: efDot,
163552
163590
  efr: efr,
163553
163591
  eg: eg,
@@ -163850,7 +163888,7 @@ var require$$0 = {
163850
163888
  ldrdhar: ldrdhar,
163851
163889
  ldrushar: ldrushar,
163852
163890
  ldsh: ldsh,
163853
- le: le$1,
163891
+ le: le,
163854
163892
  leftarrow: leftarrow,
163855
163893
  leftarrowtail: leftarrowtail,
163856
163894
  leftharpoondown: leftharpoondown,
@@ -164752,7 +164790,7 @@ var require$$0 = {
164752
164790
  yacy: yacy,
164753
164791
  ycirc: ycirc,
164754
164792
  ycy: ycy,
164755
- ye: ye$1,
164793
+ ye: ye,
164756
164794
  yen: yen,
164757
164795
  yfr: yfr,
164758
164796
  yicy: yicy,
@@ -193186,25 +193224,6 @@ function AnalyticsMonetizationStats({ tenantKey }) {
193186
193224
  setPaywallPage(paywallsData.previous_page), children: "Previous" }), jsxs("span", { className: "text-xs text-gray-500", children: ["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: "Next" })] })] }))] }) })] }));
193187
193225
  }
193188
193226
 
193189
- var U=1,Y$1=.9,H=.8,J=.17,p=.1,u=.999,$=.9999;var k$1=.99,m=/[\\\/_+.#"@\[\(\{&]/,B$1=/[\\\/_+.#"@\[\(\{&]/g,K$1=/[\s-]/,X=/[\s-]/g;function G(_,C,h,P,A,f,O){if(f===C.length)return A===_.length?U:k$1;var T=`${A},${f}`;if(O[T]!==void 0)return O[T];for(var L=P.charAt(f),c=h.indexOf(L,A),S=0,E,N,R,M;c>=0;)E=G(_,C,h,P,c+1,f+1,O),E>S&&(c===A?E*=U:m.test(_.charAt(c-1))?(E*=H,R=_.slice(A,c-1).match(B$1),R&&A>0&&(E*=Math.pow(u,R.length))):K$1.test(_.charAt(c-1))?(E*=Y$1,M=_.slice(A,c-1).match(X),M&&A>0&&(E*=Math.pow(u,M.length))):(E*=J,A>0&&(E*=Math.pow(u,c-A))),_.charAt(c)!==C.charAt(f)&&(E*=$)),(E<p&&h.charAt(c-1)===P.charAt(f+1)||P.charAt(f+1)===P.charAt(f)&&h.charAt(c-1)!==P.charAt(f))&&(N=G(_,C,h,P,c+1,f+2,O),N*p>E&&(E=N*p)),E>S&&(S=E),c=h.indexOf(L,c+1);return O[T]=S,S}function D(_){return _.toLowerCase().replace(X," ")}function W(_,C,h){return _=h&&h.length>0?`${_+" "+h.join(" ")}`:_,G(_,C,D(_),D(C),0,0,{})}
193190
-
193191
- var N='[cmdk-group=""]',Y='[cmdk-group-items=""]',be='[cmdk-group-heading=""]',le='[cmdk-item=""]',ce=`${le}:not([aria-disabled="true"])`,Z="cmdk-item-select",T="data-value",Re=(r,o,n)=>W(r,o,n),ue=React.createContext(void 0),K=()=>React.useContext(ue),de=React.createContext(void 0),ee=()=>React.useContext(de),fe=React.createContext(void 0),me=React.forwardRef((r,o)=>{let n=L(()=>{var e,a;return {search:"",value:(a=(e=r.value)!=null?e:r.defaultValue)!=null?a:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=L(()=>new Set),c=L(()=>new Map),d=L(()=>new Map),f=L(()=>new Set),p=pe(r),{label:b,children:m,value:R,onValueChange:x,filter:C,shouldFilter:S,loop:A,disablePointerSelection:ge=false,vimBindings:j=true,...O}=r,$=useId$1(),q=useId$1(),_=useId$1(),I=React.useRef(null),v=ke();k(()=>{if(R!==void 0){let e=R.trim();n.current.value=e,E.emit();}},[R]),k(()=>{v(6,ne);},[]);let E=React.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>n.current,setState:(e,a,s)=>{var i,l,g,y;if(!Object.is(n.current[e],a)){if(n.current[e]=a,e==="search")J(),z(),v(1,W);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let h=document.getElementById(_);h?h.focus():(i=document.getElementById($))==null||i.focus();}if(v(7,()=>{var h;n.current.selectedItemId=(h=M())==null?void 0:h.id,E.emit();}),s||v(5,ne),((l=p.current)==null?void 0:l.value)!==void 0){let h=a!=null?a:"";(y=(g=p.current).onValueChange)==null||y.call(g,h);return}}E.emit();}},emit:()=>{f.current.forEach(e=>e());}}),[]),U=React.useMemo(()=>({value:(e,a,s)=>{var i;a!==((i=d.current.get(e))==null?void 0:i.value)&&(d.current.set(e,{value:a,keywords:s}),n.current.filtered.items.set(e,te(a,s)),v(2,()=>{z(),E.emit();}));},item:(e,a)=>(u.current.add(e),a&&(c.current.has(a)?c.current.get(a).add(e):c.current.set(a,new Set([e]))),v(3,()=>{J(),z(),n.current.value||W(),E.emit();}),()=>{d.current.delete(e),u.current.delete(e),n.current.filtered.items.delete(e);let s=M();v(4,()=>{J(),(s==null?void 0:s.getAttribute("id"))===e&&W(),E.emit();});}),group:e=>(c.current.has(e)||c.current.set(e,new Set),()=>{d.current.delete(e),c.current.delete(e);}),filter:()=>p.current.shouldFilter,label:b||r["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:$,inputId:_,labelId:q,listInnerRef:I}),[]);function te(e,a){var i,l;let s=(l=(i=p.current)==null?void 0:i.filter)!=null?l:Re;return e?s(e,n.current.search,a):0}function z(){if(!n.current.search||p.current.shouldFilter===false)return;let e=n.current.filtered.items,a=[];n.current.filtered.groups.forEach(i=>{let l=c.current.get(i),g=0;l.forEach(y=>{let h=e.get(y);g=Math.max(h,g);}),a.push([i,g]);});let s=I.current;V().sort((i,l)=>{var h,F;let g=i.getAttribute("id"),y=l.getAttribute("id");return ((h=e.get(y))!=null?h:0)-((F=e.get(g))!=null?F:0)}).forEach(i=>{let l=i.closest(Y);l?l.appendChild(i.parentElement===l?i:i.closest(`${Y} > *`)):s.appendChild(i.parentElement===s?i:i.closest(`${Y} > *`));}),a.sort((i,l)=>l[1]-i[1]).forEach(i=>{var g;let l=(g=I.current)==null?void 0:g.querySelector(`${N}[${T}="${encodeURIComponent(i[0])}"]`);l==null||l.parentElement.appendChild(l);});}function W(){let e=V().find(s=>s.getAttribute("aria-disabled")!=="true"),a=e==null?void 0:e.getAttribute(T);E.setState("value",a||void 0);}function J(){var a,s,i,l;if(!n.current.search||p.current.shouldFilter===false){n.current.filtered.count=u.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let g of u.current){let y=(s=(a=d.current.get(g))==null?void 0:a.value)!=null?s:"",h=(l=(i=d.current.get(g))==null?void 0:i.keywords)!=null?l:[],F=te(y,h);n.current.filtered.items.set(g,F),F>0&&e++;}for(let[g,y]of c.current)for(let h of y)if(n.current.filtered.items.get(h)>0){n.current.filtered.groups.add(g);break}n.current.filtered.count=e;}function ne(){var a,s,i;let e=M();e&&(((a=e.parentElement)==null?void 0:a.firstChild)===e&&((i=(s=e.closest(N))==null?void 0:s.querySelector(be))==null||i.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}));}function M(){var e;return (e=I.current)==null?void 0:e.querySelector(`${le}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=I.current)==null?void 0:e.querySelectorAll(ce))||[])}function X(e){let s=V()[e];s&&E.setState("value",s.getAttribute(T));}function Q(e){var g;let a=M(),s=V(),i=s.findIndex(y=>y===a),l=s[i+e];(g=p.current)!=null&&g.loop&&(l=i+e<0?s[s.length-1]:i+e===s.length?s[0]:s[i+e]),l&&E.setState("value",l.getAttribute(T));}function re(e){let a=M(),s=a==null?void 0:a.closest(N),i;for(;s&&!i;)s=e>0?we(s,N):De(s,N),i=s==null?void 0:s.querySelector(ce);i?E.setState("value",i.getAttribute(T)):Q(e);}let oe=()=>X(V().length-1),ie=e=>{e.preventDefault(),e.metaKey?oe():e.altKey?re(1):Q(1);},se=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?re(-1):Q(-1);};return React.createElement(Primitive.div,{ref:o,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var s;(s=O.onKeyDown)==null||s.call(O,e);let a=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||a))switch(e.key){case "n":case "j":{j&&e.ctrlKey&&ie(e);break}case "ArrowDown":{ie(e);break}case "p":case "k":{j&&e.ctrlKey&&se(e);break}case "ArrowUp":{se(e);break}case "Home":{e.preventDefault(),X(0);break}case "End":{e.preventDefault(),oe();break}case "Enter":{e.preventDefault();let i=M();if(i){let l=new Event(Z);i.dispatchEvent(l);}}}}},React.createElement("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:Te},b),B(r,e=>React.createElement(de.Provider,{value:E},React.createElement(ue.Provider,{value:U},e))))}),he=React.forwardRef((r,o)=>{var _,I;let n=useId$1(),u=React.useRef(null),c=React.useContext(fe),d=K(),f=pe(r),p=(I=(_=f.current)==null?void 0:_.forceMount)!=null?I:c==null?void 0:c.forceMount;k(()=>{if(!p)return d.item(n,c==null?void 0:c.id)},[p]);let b=ve(n,u,[r.value,r.children,u],r.keywords),m=ee(),R=P(v=>v.value&&v.value===b.current),x=P(v=>p||d.filter()===false?true:v.search?v.filtered.items.get(n)>0:true);React.useEffect(()=>{let v=u.current;if(!(!v||r.disabled))return v.addEventListener(Z,C),()=>v.removeEventListener(Z,C)},[x,r.onSelect,r.disabled]);function C(){var v,E;S(),(E=(v=f.current).onSelect)==null||E.call(v,b.current);}function S(){m.setState("value",b.current,true);}if(!x)return null;let{disabled:A,value:ge,onSelect:j,forceMount:O,keywords:$,...q}=r;return React.createElement(Primitive.div,{ref:composeRefs$1(u,o),...q,id:n,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!R,"data-disabled":!!A,"data-selected":!!R,onPointerMove:A||d.getDisablePointerSelection()?void 0:S,onClick:A?void 0:C},r.children)}),Ee=React.forwardRef((r,o)=>{let{heading:n,children:u,forceMount:c,...d}=r,f=useId$1(),p=React.useRef(null),b=React.useRef(null),m=useId$1(),R=K(),x=P(S=>c||R.filter()===false?true:S.search?S.filtered.groups.has(f):true);k(()=>R.group(f),[]),ve(f,p,[r.value,r.heading,b]);let C=React.useMemo(()=>({id:f,forceMount:c}),[c]);return React.createElement(Primitive.div,{ref:composeRefs$1(p,o),...d,"cmdk-group":"",role:"presentation",hidden:x?void 0:true},n&&React.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":true,id:m},n),B(r,S=>React.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?m:void 0},React.createElement(fe.Provider,{value:C},S))))}),ye=React.forwardRef((r,o)=>{let{alwaysRender:n,...u}=r,c=React.useRef(null),d=P(f=>!f.search);return !n&&!d?null:React.createElement(Primitive.div,{ref:composeRefs$1(c,o),...u,"cmdk-separator":"",role:"separator"})}),Se=React.forwardRef((r,o)=>{let{onValueChange:n,...u}=r,c=r.value!=null,d=ee(),f=P(m=>m.search),p=P(m=>m.selectedItemId),b=K();return React.useEffect(()=>{r.value!=null&&d.setState("search",r.value);},[r.value]),React.createElement(Primitive.input,{ref:o,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:false,"aria-autocomplete":"list",role:"combobox","aria-expanded":true,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":p,id:b.inputId,type:"text",value:c?r.value:f,onChange:m=>{c||d.setState("search",m.target.value),n==null||n(m.target.value);}})}),Ce=React.forwardRef((r,o)=>{let{children:n,label:u="Suggestions",...c}=r,d=React.useRef(null),f=React.useRef(null),p=P(m=>m.selectedItemId),b=K();return React.useEffect(()=>{if(f.current&&d.current){let m=f.current,R=d.current,x,C=new ResizeObserver(()=>{x=requestAnimationFrame(()=>{let S=m.offsetHeight;R.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px");});});return C.observe(m),()=>{cancelAnimationFrame(x),C.unobserve(m);}}},[]),React.createElement(Primitive.div,{ref:composeRefs$1(d,o),...c,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":u,id:b.listId},B(r,m=>React.createElement("div",{ref:composeRefs$1(f,b.listInnerRef),"cmdk-list-sizer":""},m)))}),xe=React.forwardRef((r,o)=>{let{open:n,onOpenChange:u,overlayClassName:c,contentClassName:d,container:f,...p}=r;return React.createElement(DialogPrimitive.Root,{open:n,onOpenChange:u},React.createElement(DialogPrimitive.Portal,{container:f},React.createElement(DialogPrimitive.Overlay,{"cmdk-overlay":"",className:c}),React.createElement(DialogPrimitive.Content,{"aria-label":r.label,"cmdk-dialog":"",className:d},React.createElement(me,{ref:o,...p}))))}),Ie=React.forwardRef((r,o)=>P(u=>u.filtered.count===0)?React.createElement(Primitive.div,{ref:o,...r,"cmdk-empty":"",role:"presentation"}):null),Pe=React.forwardRef((r,o)=>{let{progress:n,children:u,label:c="Loading...",...d}=r;return React.createElement(Primitive.div,{ref:o,...d,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":c},B(r,f=>React.createElement("div",{"aria-hidden":true},f)))}),_e=Object.assign(me,{List:Ce,Item:he,Input:Se,Group:Ee,Separator:ye,Dialog:xe,Empty:Ie,Loading:Pe});function we(r,o){let n=r.nextElementSibling;for(;n;){if(n.matches(o))return n;n=n.nextElementSibling;}}function De(r,o){let n=r.previousElementSibling;for(;n;){if(n.matches(o))return n;n=n.previousElementSibling;}}function pe(r){let o=React.useRef(r);return k(()=>{o.current=r;}),o}var k=typeof window=="undefined"?React.useEffect:React.useLayoutEffect;function L(r){let o=React.useRef();return o.current===void 0&&(o.current=r()),o}function P(r){let o=ee(),n=()=>r(o.snapshot());return React.useSyncExternalStore(o.subscribe,n,n)}function ve(r,o,n,u=[]){let c=React.useRef(),d=K();return k(()=>{var b;let f=(()=>{var m;for(let R of n){if(typeof R=="string")return R.trim();if(typeof R=="object"&&"current"in R)return R.current?(m=R.current.textContent)==null?void 0:m.trim():c.current}})(),p=u.map(m=>m.trim());d.value(r,f,p),(b=o.current)==null||b.setAttribute(T,f),c.current=f;}),c}var ke=()=>{let[r,o]=React.useState(),n=L(()=>new Map);return k(()=>{n.current.forEach(u=>u()),n.current=new Map;},[r]),(u,c)=>{n.current.set(u,c),o({});}};function Me(r){let o=r.type;return typeof o=="function"?o(r.props):"render"in o?o.render(r.props):r}function B({asChild:r,children:o},n){return r&&React.isValidElement(o)?React.cloneElement(Me(o),{ref:o.ref},n(o.props.children)):n(o)}var Te={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};
193192
-
193193
- const Command = React.forwardRef(({ className, ...props }, ref) => (jsx(_e, { ref: ref, className: cn('bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md', className), ...props })));
193194
- Command.displayName = _e.displayName;
193195
- const CommandInput = React.forwardRef(({ className, ...props }, ref) => (jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), jsx(_e.Input, { ref: ref, className: cn('placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50', className), ...props })] })));
193196
- CommandInput.displayName = _e.Input.displayName;
193197
- const CommandList = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.List, { ref: ref, className: cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className), ...props })));
193198
- CommandList.displayName = _e.List.displayName;
193199
- const CommandEmpty = React.forwardRef((props, ref) => (jsx(_e.Empty, { ref: ref, className: "py-6 text-center text-sm", ...props })));
193200
- CommandEmpty.displayName = _e.Empty.displayName;
193201
- const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Group, { ref: ref, className: cn('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className), ...props })));
193202
- CommandGroup.displayName = _e.Group.displayName;
193203
- const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Separator, { ref: ref, className: cn('bg-border -mx-1 h-px', className), ...props })));
193204
- CommandSeparator.displayName = _e.Separator.displayName;
193205
- const CommandItem = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Item, { ref: ref, className: cn("data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), ...props })));
193206
- CommandItem.displayName = _e.Item.displayName;
193207
-
193208
193227
  const formatDateToYYYYMMDD = (date) => {
193209
193228
  if (!date)
193210
193229
  return undefined;
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { useState, useEffect, forwardRef, createElement as createElement$3, useLayoutEffect, useMemo, createContext, useReducer, useRef, useImperativeHandle, useCallback, useContext, useId as useId$2, useDebugValue, cloneElement, lazy, Suspense, Component as Component$1 } from 'react';
4
- import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useDeleteApiKeyMutation, useGetApiKeysQuery, 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, useGetCustomMentorsQuery, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useGetMentorsQuery, useGetPublicMentorsQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, useGetMentorPublicSettingsQuery, useGetChatHistoryFilterQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStarMentorMutation, useUnstarMentorMutation, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
4
+ import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useDeleteApiKeyMutation, useGetApiKeysQuery, 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, useGetCustomMentorsQuery, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useGetMentorsQuery, useGetPublicMentorsQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, useGetMentorPublicSettingsQuery, useGetChatHistoryFilterQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStarMentorMutation, useUnstarMentorMutation, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
5
5
  import { getInitials, useTenantMetadata, WithPermissions, useStripeUpgrade, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, selectRbacPermissions, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, chatActions, WithFormPermissions, useTenantContext, TimeTracker, advancedTabsProperties, defaultSessionIds, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$2, redirectToAuthSpaJoinTenant, selectActiveTab, useAxdToken, useWelcomeMessage, markdownToPlainText, useCachedSessionId, use402ErrorCheck, selectTokenEnabled, selectToken, useServiceWorker, useUserAgreement, useAdvancedChat, sendMessageToParentWebsite, useMentorTools, useFileDragDrop, eventBus, RemoteEvents, selectEnableChatActionsPopup, advancedTabs, isInIframe, getAuthSpaJoinUrl, addMessage, clearFiles, MENTOR_VISIBILITY } from '@iblai/web-utils';
6
6
  import { useDispatch, useSelector } from 'react-redux';
7
7
  import { toast, Toaster as Toaster$1 } from 'sonner';
@@ -11,10 +11,10 @@ import Link$2 from 'next/link';
11
11
  import * as ReactDOM from 'react-dom';
12
12
  import ReactDOM__default from 'react-dom';
13
13
  import { z as z$3 } from 'zod';
14
- import { MentorVisibilityEnum, TransportEnum, PromptVisibilityEnum } from '@iblai/iblai-api';
15
- import '@reduxjs/toolkit/query';
16
14
  import * as DialogPrimitive from '@radix-ui/react-dialog';
17
15
  import { createDialogScope } from '@radix-ui/react-dialog';
16
+ import { MentorVisibilityEnum, TransportEnum, PromptVisibilityEnum } from '@iblai/iblai-api';
17
+ import '@reduxjs/toolkit/query';
18
18
  import dynamic from 'next/dynamic';
19
19
  import Script from 'next/script';
20
20
  import { useRouter } from 'next/router';
@@ -126763,6 +126763,37 @@ function GroupsTab({ tenant, isTeam = false, hasInviteUserPermission = false, ha
126763
126763
  }, tenant: tenant, teamId: shareTeamId, teamName: shareTeamName }))] }));
126764
126764
  }
126765
126765
 
126766
+ var U$2=1,Y$2=.9,H$1=.8,J$1=.17,p$2=.1,u$3=.999,$$g=.9999;var k$2=.99,m$3=/[\\\/_+.#"@\[\(\{&]/,B$2=/[\\\/_+.#"@\[\(\{&]/g,K$2=/[\s-]/,X$1=/[\s-]/g;function G$2(_,C,h,P,A,f,O){if(f===C.length)return A===_.length?U$2:k$2;var T=`${A},${f}`;if(O[T]!==void 0)return O[T];for(var L=P.charAt(f),c=h.indexOf(L,A),S=0,E,N,R,M;c>=0;)E=G$2(_,C,h,P,c+1,f+1,O),E>S&&(c===A?E*=U$2:m$3.test(_.charAt(c-1))?(E*=H$1,R=_.slice(A,c-1).match(B$2),R&&A>0&&(E*=Math.pow(u$3,R.length))):K$2.test(_.charAt(c-1))?(E*=Y$2,M=_.slice(A,c-1).match(X$1),M&&A>0&&(E*=Math.pow(u$3,M.length))):(E*=J$1,A>0&&(E*=Math.pow(u$3,c-A))),_.charAt(c)!==C.charAt(f)&&(E*=$$g)),(E<p$2&&h.charAt(c-1)===P.charAt(f+1)||P.charAt(f+1)===P.charAt(f)&&h.charAt(c-1)!==P.charAt(f))&&(N=G$2(_,C,h,P,c+1,f+2,O),N*p$2>E&&(E=N*p$2)),E>S&&(S=E),c=h.indexOf(L,c+1);return O[T]=S,S}function D$2(_){return _.toLowerCase().replace(X$1," ")}function W$1(_,C,h){return _=h&&h.length>0?`${_+" "+h.join(" ")}`:_,G$2(_,C,D$2(_),D$2(C),0,0,{})}
126767
+
126768
+ var N$2='[cmdk-group=""]',Y$1='[cmdk-group-items=""]',be$1='[cmdk-group-heading=""]',le$2='[cmdk-item=""]',ce$1=`${le$2}:not([aria-disabled="true"])`,Z$2="cmdk-item-select",T$4="data-value",Re$1=(r,o,n)=>W$1(r,o,n),ue$1=React.createContext(void 0),K$1=()=>React.useContext(ue$1),de$2=React.createContext(void 0),ee$2=()=>React.useContext(de$2),fe$1=React.createContext(void 0),me$1=React.forwardRef((r,o)=>{let n=L$3(()=>{var e,a;return {search:"",value:(a=(e=r.value)!=null?e:r.defaultValue)!=null?a:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=L$3(()=>new Set),c=L$3(()=>new Map),d=L$3(()=>new Map),f=L$3(()=>new Set),p=pe$1(r),{label:b,children:m,value:R,onValueChange:x,filter:C,shouldFilter:S,loop:A,disablePointerSelection:ge=false,vimBindings:j=true,...O}=r,$=useId$1(),q=useId$1(),_=useId$1(),I=React.useRef(null),v=ke();k$1(()=>{if(R!==void 0){let e=R.trim();n.current.value=e,E.emit();}},[R]),k$1(()=>{v(6,ne);},[]);let E=React.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>n.current,setState:(e,a,s)=>{var i,l,g,y;if(!Object.is(n.current[e],a)){if(n.current[e]=a,e==="search")J(),z(),v(1,W);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let h=document.getElementById(_);h?h.focus():(i=document.getElementById($))==null||i.focus();}if(v(7,()=>{var h;n.current.selectedItemId=(h=M())==null?void 0:h.id,E.emit();}),s||v(5,ne),((l=p.current)==null?void 0:l.value)!==void 0){let h=a!=null?a:"";(y=(g=p.current).onValueChange)==null||y.call(g,h);return}}E.emit();}},emit:()=>{f.current.forEach(e=>e());}}),[]),U=React.useMemo(()=>({value:(e,a,s)=>{var i;a!==((i=d.current.get(e))==null?void 0:i.value)&&(d.current.set(e,{value:a,keywords:s}),n.current.filtered.items.set(e,te(a,s)),v(2,()=>{z(),E.emit();}));},item:(e,a)=>(u.current.add(e),a&&(c.current.has(a)?c.current.get(a).add(e):c.current.set(a,new Set([e]))),v(3,()=>{J(),z(),n.current.value||W(),E.emit();}),()=>{d.current.delete(e),u.current.delete(e),n.current.filtered.items.delete(e);let s=M();v(4,()=>{J(),(s==null?void 0:s.getAttribute("id"))===e&&W(),E.emit();});}),group:e=>(c.current.has(e)||c.current.set(e,new Set),()=>{d.current.delete(e),c.current.delete(e);}),filter:()=>p.current.shouldFilter,label:b||r["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:$,inputId:_,labelId:q,listInnerRef:I}),[]);function te(e,a){var i,l;let s=(l=(i=p.current)==null?void 0:i.filter)!=null?l:Re$1;return e?s(e,n.current.search,a):0}function z(){if(!n.current.search||p.current.shouldFilter===false)return;let e=n.current.filtered.items,a=[];n.current.filtered.groups.forEach(i=>{let l=c.current.get(i),g=0;l.forEach(y=>{let h=e.get(y);g=Math.max(h,g);}),a.push([i,g]);});let s=I.current;V().sort((i,l)=>{var h,F;let g=i.getAttribute("id"),y=l.getAttribute("id");return ((h=e.get(y))!=null?h:0)-((F=e.get(g))!=null?F:0)}).forEach(i=>{let l=i.closest(Y$1);l?l.appendChild(i.parentElement===l?i:i.closest(`${Y$1} > *`)):s.appendChild(i.parentElement===s?i:i.closest(`${Y$1} > *`));}),a.sort((i,l)=>l[1]-i[1]).forEach(i=>{var g;let l=(g=I.current)==null?void 0:g.querySelector(`${N$2}[${T$4}="${encodeURIComponent(i[0])}"]`);l==null||l.parentElement.appendChild(l);});}function W(){let e=V().find(s=>s.getAttribute("aria-disabled")!=="true"),a=e==null?void 0:e.getAttribute(T$4);E.setState("value",a||void 0);}function J(){var a,s,i,l;if(!n.current.search||p.current.shouldFilter===false){n.current.filtered.count=u.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let g of u.current){let y=(s=(a=d.current.get(g))==null?void 0:a.value)!=null?s:"",h=(l=(i=d.current.get(g))==null?void 0:i.keywords)!=null?l:[],F=te(y,h);n.current.filtered.items.set(g,F),F>0&&e++;}for(let[g,y]of c.current)for(let h of y)if(n.current.filtered.items.get(h)>0){n.current.filtered.groups.add(g);break}n.current.filtered.count=e;}function ne(){var a,s,i;let e=M();e&&(((a=e.parentElement)==null?void 0:a.firstChild)===e&&((i=(s=e.closest(N$2))==null?void 0:s.querySelector(be$1))==null||i.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}));}function M(){var e;return (e=I.current)==null?void 0:e.querySelector(`${le$2}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=I.current)==null?void 0:e.querySelectorAll(ce$1))||[])}function X(e){let s=V()[e];s&&E.setState("value",s.getAttribute(T$4));}function Q(e){var g;let a=M(),s=V(),i=s.findIndex(y=>y===a),l=s[i+e];(g=p.current)!=null&&g.loop&&(l=i+e<0?s[s.length-1]:i+e===s.length?s[0]:s[i+e]),l&&E.setState("value",l.getAttribute(T$4));}function re(e){let a=M(),s=a==null?void 0:a.closest(N$2),i;for(;s&&!i;)s=e>0?we$1(s,N$2):De(s,N$2),i=s==null?void 0:s.querySelector(ce$1);i?E.setState("value",i.getAttribute(T$4)):Q(e);}let oe=()=>X(V().length-1),ie=e=>{e.preventDefault(),e.metaKey?oe():e.altKey?re(1):Q(1);},se=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?re(-1):Q(-1);};return React.createElement(Primitive.div,{ref:o,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var s;(s=O.onKeyDown)==null||s.call(O,e);let a=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||a))switch(e.key){case "n":case "j":{j&&e.ctrlKey&&ie(e);break}case "ArrowDown":{ie(e);break}case "p":case "k":{j&&e.ctrlKey&&se(e);break}case "ArrowUp":{se(e);break}case "Home":{e.preventDefault(),X(0);break}case "End":{e.preventDefault(),oe();break}case "Enter":{e.preventDefault();let i=M();if(i){let l=new Event(Z$2);i.dispatchEvent(l);}}}}},React.createElement("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:Te},b),B$1(r,e=>React.createElement(de$2.Provider,{value:E},React.createElement(ue$1.Provider,{value:U},e))))}),he$1=React.forwardRef((r,o)=>{var _,I;let n=useId$1(),u=React.useRef(null),c=React.useContext(fe$1),d=K$1(),f=pe$1(r),p=(I=(_=f.current)==null?void 0:_.forceMount)!=null?I:c==null?void 0:c.forceMount;k$1(()=>{if(!p)return d.item(n,c==null?void 0:c.id)},[p]);let b=ve$1(n,u,[r.value,r.children,u],r.keywords),m=ee$2(),R=P$1(v=>v.value&&v.value===b.current),x=P$1(v=>p||d.filter()===false?true:v.search?v.filtered.items.get(n)>0:true);React.useEffect(()=>{let v=u.current;if(!(!v||r.disabled))return v.addEventListener(Z$2,C),()=>v.removeEventListener(Z$2,C)},[x,r.onSelect,r.disabled]);function C(){var v,E;S(),(E=(v=f.current).onSelect)==null||E.call(v,b.current);}function S(){m.setState("value",b.current,true);}if(!x)return null;let{disabled:A,value:ge,onSelect:j,forceMount:O,keywords:$,...q}=r;return React.createElement(Primitive.div,{ref:composeRefs$1(u,o),...q,id:n,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!R,"data-disabled":!!A,"data-selected":!!R,onPointerMove:A||d.getDisablePointerSelection()?void 0:S,onClick:A?void 0:C},r.children)}),Ee=React.forwardRef((r,o)=>{let{heading:n,children:u,forceMount:c,...d}=r,f=useId$1(),p=React.useRef(null),b=React.useRef(null),m=useId$1(),R=K$1(),x=P$1(S=>c||R.filter()===false?true:S.search?S.filtered.groups.has(f):true);k$1(()=>R.group(f),[]),ve$1(f,p,[r.value,r.heading,b]);let C=React.useMemo(()=>({id:f,forceMount:c}),[c]);return React.createElement(Primitive.div,{ref:composeRefs$1(p,o),...d,"cmdk-group":"",role:"presentation",hidden:x?void 0:true},n&&React.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":true,id:m},n),B$1(r,S=>React.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?m:void 0},React.createElement(fe$1.Provider,{value:C},S))))}),ye$2=React.forwardRef((r,o)=>{let{alwaysRender:n,...u}=r,c=React.useRef(null),d=P$1(f=>!f.search);return !n&&!d?null:React.createElement(Primitive.div,{ref:composeRefs$1(c,o),...u,"cmdk-separator":"",role:"separator"})}),Se=React.forwardRef((r,o)=>{let{onValueChange:n,...u}=r,c=r.value!=null,d=ee$2(),f=P$1(m=>m.search),p=P$1(m=>m.selectedItemId),b=K$1();return React.useEffect(()=>{r.value!=null&&d.setState("search",r.value);},[r.value]),React.createElement(Primitive.input,{ref:o,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:false,"aria-autocomplete":"list",role:"combobox","aria-expanded":true,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":p,id:b.inputId,type:"text",value:c?r.value:f,onChange:m=>{c||d.setState("search",m.target.value),n==null||n(m.target.value);}})}),Ce=React.forwardRef((r,o)=>{let{children:n,label:u="Suggestions",...c}=r,d=React.useRef(null),f=React.useRef(null),p=P$1(m=>m.selectedItemId),b=K$1();return React.useEffect(()=>{if(f.current&&d.current){let m=f.current,R=d.current,x,C=new ResizeObserver(()=>{x=requestAnimationFrame(()=>{let S=m.offsetHeight;R.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px");});});return C.observe(m),()=>{cancelAnimationFrame(x),C.unobserve(m);}}},[]),React.createElement(Primitive.div,{ref:composeRefs$1(d,o),...c,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":u,id:b.listId},B$1(r,m=>React.createElement("div",{ref:composeRefs$1(f,b.listInnerRef),"cmdk-list-sizer":""},m)))}),xe=React.forwardRef((r,o)=>{let{open:n,onOpenChange:u,overlayClassName:c,contentClassName:d,container:f,...p}=r;return React.createElement(DialogPrimitive.Root,{open:n,onOpenChange:u},React.createElement(DialogPrimitive.Portal,{container:f},React.createElement(DialogPrimitive.Overlay,{"cmdk-overlay":"",className:c}),React.createElement(DialogPrimitive.Content,{"aria-label":r.label,"cmdk-dialog":"",className:d},React.createElement(me$1,{ref:o,...p}))))}),Ie=React.forwardRef((r,o)=>P$1(u=>u.filtered.count===0)?React.createElement(Primitive.div,{ref:o,...r,"cmdk-empty":"",role:"presentation"}):null),Pe=React.forwardRef((r,o)=>{let{progress:n,children:u,label:c="Loading...",...d}=r;return React.createElement(Primitive.div,{ref:o,...d,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":c},B$1(r,f=>React.createElement("div",{"aria-hidden":true},f)))}),_e=Object.assign(me$1,{List:Ce,Item:he$1,Input:Se,Group:Ee,Separator:ye$2,Dialog:xe,Empty:Ie,Loading:Pe});function we$1(r,o){let n=r.nextElementSibling;for(;n;){if(n.matches(o))return n;n=n.nextElementSibling;}}function De(r,o){let n=r.previousElementSibling;for(;n;){if(n.matches(o))return n;n=n.previousElementSibling;}}function pe$1(r){let o=React.useRef(r);return k$1(()=>{o.current=r;}),o}var k$1=typeof window=="undefined"?React.useEffect:React.useLayoutEffect;function L$3(r){let o=React.useRef();return o.current===void 0&&(o.current=r()),o}function P$1(r){let o=ee$2(),n=()=>r(o.snapshot());return React.useSyncExternalStore(o.subscribe,n,n)}function ve$1(r,o,n,u=[]){let c=React.useRef(),d=K$1();return k$1(()=>{var b;let f=(()=>{var m;for(let R of n){if(typeof R=="string")return R.trim();if(typeof R=="object"&&"current"in R)return R.current?(m=R.current.textContent)==null?void 0:m.trim():c.current}})(),p=u.map(m=>m.trim());d.value(r,f,p),(b=o.current)==null||b.setAttribute(T$4,f),c.current=f;}),c}var ke=()=>{let[r,o]=React.useState(),n=L$3(()=>new Map);return k$1(()=>{n.current.forEach(u=>u()),n.current=new Map;},[r]),(u,c)=>{n.current.set(u,c),o({});}};function Me(r){let o=r.type;return typeof o=="function"?o(r.props):"render"in o?o.render(r.props):r}function B$1({asChild:r,children:o},n){return r&&React.isValidElement(o)?React.cloneElement(Me(o),{ref:o.ref},n(o.props.children)):n(o)}var Te={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};
126769
+
126770
+ const Command = React.forwardRef(({ className, ...props }, ref) => (jsx(_e, { ref: ref, className: cn('bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md', className), ...props })));
126771
+ Command.displayName = _e.displayName;
126772
+ const CommandInput = React.forwardRef(({ className, ...props }, ref) => (jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), jsx(_e.Input, { ref: ref, className: cn('placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50', className), ...props })] })));
126773
+ CommandInput.displayName = _e.Input.displayName;
126774
+ const CommandList = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.List, { ref: ref, className: cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className), ...props })));
126775
+ CommandList.displayName = _e.List.displayName;
126776
+ const CommandEmpty = React.forwardRef((props, ref) => (jsx(_e.Empty, { ref: ref, className: "py-6 text-center text-sm", ...props })));
126777
+ CommandEmpty.displayName = _e.Empty.displayName;
126778
+ const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Group, { ref: ref, className: cn('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className), ...props })));
126779
+ CommandGroup.displayName = _e.Group.displayName;
126780
+ const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Separator, { ref: ref, className: cn('bg-border -mx-1 h-px', className), ...props })));
126781
+ CommandSeparator.displayName = _e.Separator.displayName;
126782
+ const CommandItem = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Item, { ref: ref, className: cn("data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), ...props })));
126783
+ CommandItem.displayName = _e.Item.displayName;
126784
+
126785
+ function ActionsCombobox({ selected, onSelect, }) {
126786
+ const [open, setOpen] = useState(false);
126787
+ const { data: definitions, isLoading, isError } = useGetRbacActionsDefinitionQuery(undefined);
126788
+ const entries = useMemo(() => Object.entries(definitions !== null && definitions !== void 0 ? definitions : {}), [definitions]);
126789
+ return (jsxs("div", { children: [jsxs(Button$1, { type: "button", variant: "outline", role: "combobox", "aria-label": "Search actions", "aria-expanded": open, onClick: () => setOpen((o) => !o), className: "w-full justify-between font-normal text-muted-foreground", children: ["Search actions\u2026", jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }), open && (jsx("div", { className: "mt-2 rounded-md border border-gray-200 dark:border-gray-700", children: jsxs(Command, { filter: (value, search) => (value.toLowerCase().includes(search.toLowerCase()) ? 1 : 0), children: [jsx(CommandInput, { placeholder: "Search actions by key or description\u2026" }), jsxs(CommandList, { children: [isLoading && (jsxs("div", { className: "flex items-center justify-center py-6 text-sm text-muted-foreground", children: [jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin", "aria-hidden": "true" }), "Loading actions\u2026"] })), isError && (jsx("div", { className: "py-6 text-center text-sm text-red-500", children: "Failed to load actions" })), !isLoading && !isError && (jsxs(Fragment$1, { children: [jsx(CommandEmpty, { children: "No actions found." }), jsx(CommandGroup, { children: entries.map(([key, def]) => {
126790
+ const isAdded = selected.includes(key);
126791
+ return (jsxs(CommandItem, { value: `${key} ${def.description}`, onSelect: () => {
126792
+ onSelect(key);
126793
+ setOpen(false);
126794
+ }, className: "flex items-start gap-2", children: [jsx(Check, { className: `mt-0.5 h-4 w-4 shrink-0 ${isAdded ? 'opacity-100' : 'opacity-0'}`, "aria-hidden": "true" }), jsxs("div", { className: "flex flex-col gap-0.5", children: [jsx("span", { className: "font-mono text-xs", children: key }), jsx("span", { className: "text-xs text-muted-foreground", children: def.description })] })] }, key));
126795
+ }) })] }))] })] }) }))] }));
126796
+ }
126766
126797
  function RolesTab({ tenant }) {
126767
126798
  const [page, setPage] = useState(1);
126768
126799
  const [searchQuery, setSearchQuery] = useState('');
@@ -126848,6 +126879,9 @@ function RolesTab({ tenant }) {
126848
126879
  setActionInput('');
126849
126880
  }
126850
126881
  }
126882
+ function addActionKey(key) {
126883
+ setActions((prev) => (prev.includes(key) ? prev : [...prev, key]));
126884
+ }
126851
126885
  function removeAction(action) {
126852
126886
  setActions(actions.filter((a) => a !== action));
126853
126887
  }
@@ -126910,7 +126944,7 @@ function RolesTab({ tenant }) {
126910
126944
  setDeletingRoleId(null);
126911
126945
  }
126912
126946
  }
126913
- return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1 mb-6", children: [jsxs("div", { className: "relative max-w-sm", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search roles", "aria-label": "Search roles", className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]" }), isLoading && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), jsx(Button$1, { onClick: openNew, "aria-label": "New role", className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: "New Role" })] }), isLoading && (jsx("div", { className: "flex justify-center items-center h-64", children: jsx("div", { className: "py-8 text-center text-sm text-gray-500 dark:text-gray-400", children: "Loading\u2026" }) })), isError && jsx("div", { className: "py-8 text-center text-sm text-red-500", children: "Failed to load roles" }), !isLoading && !isError && (jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: "Name" }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[100px]" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [roles.map((r) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm", children: r.name }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex gap-2 justify-end", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(r), disabled: deletingRoleId === r.id, "aria-label": `Edit role ${r.name}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(TooltipProvider, { children: jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { tabIndex: 0, children: jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => onDelete(r), className: "text-red-600 hover:text-red-700", disabled: deletingRoleId === r.id || r.is_internal, "aria-label": `Delete role ${r.name}`, children: deletingRoleId === r.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" })) }) }) }), r.is_internal && (jsx(TooltipContent, { children: jsx("p", { children: "Cannot delete internal roles" }) }))] }) })] }) })] }, r.id))), roles.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 2, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: "No roles found" }) }))] })] }) })), !isLoading && !isError && (jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => handlePageChange(newPage), totalCount: data === null || data === void 0 ? void 0 : data.count, itemsPerPage: 10, itemLabel: "roles" })), jsx(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: jsxs(DialogContent, { "aria-describedby": undefined, className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: editing ? 'Edit Role' : 'New Role' }) }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label, { htmlFor: "r-name", children: "Role Name" }), jsx(Input, { id: "r-name", value: form.name, onChange: (e) => setForm({ ...form, name: e.target.value }), placeholder: "Enter role name", required: true })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label, { htmlFor: "r-actions", children: "Actions" }), jsxs("div", { className: "space-y-2", children: [actions.length > 0 && (jsx("div", { className: "flex flex-wrap gap-2 p-2 border border-gray-200 dark:border-gray-700 rounded-md bg-gray-50 dark:bg-gray-800", children: actions.map((action, index) => (jsxs(Badge, { variant: "secondary", className: "px-2 py-1 flex items-center gap-1 font-mono text-xs", children: [jsx("span", { children: action }), jsx("button", { type: "button", onClick: () => removeAction(action), className: "ml-1 hover:text-red-600", "aria-label": `Remove action ${action}`, children: jsx(X$2, { className: "h-3 w-3" }) })] }, index))) })), jsxs("div", { className: "flex gap-2", children: [jsx(Input, { id: "r-actions", value: actionInput, onChange: (e) => setActionInput(e.target.value), onKeyDown: handleActionKeyDown, placeholder: "e.g., Ibl.Mentor/Settings/read, Ibl.Mentor/*/write", className: "flex-1 font-mono text-sm" }), jsx(Button$1, { type: "button", variant: "outline", size: "sm", onClick: addAction, disabled: !actionInput.trim(), "aria-label": "Add action", children: jsx(Plus, { className: "h-4 w-4" }) })] }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Press Enter or click + to add. Supports wildcards (e.g., Ibl.Mentor/*/read)" })] })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label, { htmlFor: "r-data-actions", children: "Data Actions" }), jsxs("div", { className: "space-y-2", children: [dataActions.length > 0 && (jsx("div", { className: "flex flex-wrap gap-2 p-2 border border-gray-200 dark:border-gray-700 rounded-md bg-gray-50 dark:bg-gray-800", children: dataActions.map((action, index) => (jsxs(Badge, { variant: "secondary", className: "px-2 py-1 flex items-center gap-1 font-mono text-xs", children: [jsx("span", { children: action }), jsx("button", { type: "button", onClick: () => removeDataAction(action), className: "ml-1 hover:text-red-600", "aria-label": `Remove data action ${action}`, children: jsx(X$2, { className: "h-3 w-3" }) })] }, index))) })), jsxs("div", { className: "flex gap-2", children: [jsx(Input, { id: "r-data-actions", value: dataActionInput, onChange: (e) => setDataActionInput(e.target.value), onKeyDown: handleDataActionKeyDown, placeholder: "e.g., Ibl.Mentor/Settings/email/read, Ibl.Core/*/name/write", className: "flex-1 font-mono text-sm" }), jsx(Button$1, { type: "button", variant: "outline", size: "sm", onClick: addDataAction, disabled: !dataActionInput.trim(), "aria-label": "Add data action", children: jsx(Plus, { className: "h-4 w-4" }) })] }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Press Enter or click + to add. Field-level access (e.g., Ibl.Mentor/Settings/email/read)" })] })] })] }), jsxs(DialogFooter, { className: "mt-6", children: [jsx(Button$1, { variant: "outline", onClick: () => setIsOpen(false), children: "Cancel" }), jsx(TooltipProvider, { children: jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { tabIndex: 0, children: jsx(Button$1, { onClick: onSubmit, disabled: !!editing && (roleDetails === null || roleDetails === void 0 ? void 0 : roleDetails.is_internal), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", children: editing ? 'Save Role' : 'Create Role' }) }) }), editing && (roleDetails === null || roleDetails === void 0 ? void 0 : roleDetails.is_internal) && (jsx(TooltipContent, { children: jsx("p", { children: "Cannot edit internal roles" }) }))] }) })] })] }) })] }));
126947
+ return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1 mb-6", children: [jsxs("div", { className: "relative max-w-sm", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search roles", "aria-label": "Search roles", className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]" }), isLoading && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), jsx(Button$1, { onClick: openNew, "aria-label": "New role", className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: "New Role" })] }), isLoading && (jsx("div", { className: "flex justify-center items-center h-64", children: jsx("div", { className: "py-8 text-center text-sm text-gray-500 dark:text-gray-400", children: "Loading\u2026" }) })), isError && jsx("div", { className: "py-8 text-center text-sm text-red-500", children: "Failed to load roles" }), !isLoading && !isError && (jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: "Name" }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[100px]" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [roles.map((r) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm", children: r.name }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex gap-2 justify-end", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(r), disabled: deletingRoleId === r.id, "aria-label": `Edit role ${r.name}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(TooltipProvider, { children: jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { tabIndex: 0, children: jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => onDelete(r), className: "text-red-600 hover:text-red-700", disabled: deletingRoleId === r.id || r.is_internal, "aria-label": `Delete role ${r.name}`, children: deletingRoleId === r.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" })) }) }) }), r.is_internal && (jsx(TooltipContent, { children: jsx("p", { children: "Cannot delete internal roles" }) }))] }) })] }) })] }, r.id))), roles.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 2, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: "No roles found" }) }))] })] }) })), !isLoading && !isError && (jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => handlePageChange(newPage), totalCount: data === null || data === void 0 ? void 0 : data.count, itemsPerPage: 10, itemLabel: "roles" })), jsx(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: jsxs(DialogContent, { "aria-describedby": undefined, className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: editing ? 'Edit Role' : 'New Role' }) }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label, { htmlFor: "r-name", children: "Role Name" }), jsx(Input, { id: "r-name", value: form.name, onChange: (e) => setForm({ ...form, name: e.target.value }), placeholder: "Enter role name", required: true })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label, { htmlFor: "r-actions", children: "Actions" }), jsxs("div", { className: "space-y-2", children: [actions.length > 0 && (jsx("div", { className: "flex flex-wrap gap-2 p-2 border border-gray-200 dark:border-gray-700 rounded-md bg-gray-50 dark:bg-gray-800", children: actions.map((action, index) => (jsxs(Badge, { variant: "secondary", className: "px-2 py-1 flex items-center gap-1 font-mono text-xs", children: [jsx("span", { children: action }), jsx("button", { type: "button", onClick: () => removeAction(action), className: "ml-1 hover:text-red-600", "aria-label": `Remove action ${action}`, children: jsx(X$2, { className: "h-3 w-3" }) })] }, index))) })), jsx(ActionsCombobox, { selected: actions, onSelect: addActionKey }), jsxs("div", { className: "flex gap-2", children: [jsx(Input, { id: "r-actions", value: actionInput, onChange: (e) => setActionInput(e.target.value), onKeyDown: handleActionKeyDown, placeholder: "Or type a custom action, e.g., Ibl.Mentor/*/write", className: "flex-1 font-mono text-sm" }), jsx(Button$1, { type: "button", variant: "outline", size: "sm", onClick: addAction, disabled: !actionInput.trim(), "aria-label": "Add action", children: jsx(Plus, { className: "h-4 w-4" }) })] }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Search predefined actions above, or type a custom one. Supports wildcards (e.g., Ibl.Mentor/*/read)" })] })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label, { htmlFor: "r-data-actions", children: "Data Actions" }), jsxs("div", { className: "space-y-2", children: [dataActions.length > 0 && (jsx("div", { className: "flex flex-wrap gap-2 p-2 border border-gray-200 dark:border-gray-700 rounded-md bg-gray-50 dark:bg-gray-800", children: dataActions.map((action, index) => (jsxs(Badge, { variant: "secondary", className: "px-2 py-1 flex items-center gap-1 font-mono text-xs", children: [jsx("span", { children: action }), jsx("button", { type: "button", onClick: () => removeDataAction(action), className: "ml-1 hover:text-red-600", "aria-label": `Remove data action ${action}`, children: jsx(X$2, { className: "h-3 w-3" }) })] }, index))) })), jsxs("div", { className: "flex gap-2", children: [jsx(Input, { id: "r-data-actions", value: dataActionInput, onChange: (e) => setDataActionInput(e.target.value), onKeyDown: handleDataActionKeyDown, placeholder: "e.g., Ibl.Mentor/Settings/email/read, Ibl.Core/*/name/write", className: "flex-1 font-mono text-sm" }), jsx(Button$1, { type: "button", variant: "outline", size: "sm", onClick: addDataAction, disabled: !dataActionInput.trim(), "aria-label": "Add data action", children: jsx(Plus, { className: "h-4 w-4" }) })] }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Press Enter or click + to add. Field-level access (e.g., Ibl.Mentor/Settings/email/read)" })] })] })] }), jsxs(DialogFooter, { className: "mt-6 gap-1.5", children: [jsx(Button$1, { variant: "outline", onClick: () => setIsOpen(false), children: "Cancel" }), jsx(TooltipProvider, { children: jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { tabIndex: 0, className: "", children: jsx(Button$1, { onClick: onSubmit, disabled: !!editing && (roleDetails === null || roleDetails === void 0 ? void 0 : roleDetails.is_internal), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white w-full", children: editing ? 'Save Role' : 'Create Role' }) }) }), editing && (roleDetails === null || roleDetails === void 0 ? void 0 : roleDetails.is_internal) && (jsx(TooltipContent, { children: jsx("p", { children: "Cannot edit internal roles" }) }))] }) })] })] }) })] }));
126914
126948
  }
126915
126949
 
126916
126950
  function PoliciesTab({ tenant }) {
@@ -131429,10 +131463,11 @@ function daysFromCurrentDate$1(targetDate) {
131429
131463
  const oneDay = 24 * 60 * 60 * 1000; // Number of milliseconds in a day
131430
131464
  const timeDifference = targetDate.getTime() - currentDate.getTime();
131431
131465
  const daysDifference = Math.ceil(timeDifference / oneDay);
131432
- return daysDifference * 24 * 3600;
131466
+ return daysDifference * 24 * 3600; // Number of seconds in a day
131433
131467
  }
131434
131468
  function CreateApiModal$1({ isOpen, onClose, tenantKey, username }) {
131435
131469
  const [apiKey, setApiKey] = React__default.useState(null);
131470
+ const [isCalendarOpen, setIsCalendarOpen] = React__default.useState(false);
131436
131471
  const [createApiKey, { isLoading }] = useCreateApiKeyMutation();
131437
131472
  const form = useForm({
131438
131473
  defaultValues: createApiFormDefaultValues$1,
@@ -131476,9 +131511,12 @@ function CreateApiModal$1({ isOpen, onClose, tenantKey, username }) {
131476
131511
  const isDirty = field.state.meta.isDirty;
131477
131512
  const hasErrorAndIsDirty = hasError && isDirty;
131478
131513
  return (jsxs("div", { className: "space-y-1.5", children: [jsxs(Label, { className: "flex items-center text-sm font-medium text-[#646464]", children: ["API Key Name", jsx("span", { className: "ml-1 text-red-500", children: "*" })] }), jsx(Input, { placeholder: "API Key Name", value: field.state.value, onChange: (event) => field.handleChange(event.target.value), autoComplete: "off" }), hasErrorAndIsDirty && (jsx("p", { className: "text-red-500 text-xs", children: (_b = field.state.meta.errors[0]) === null || _b === void 0 ? void 0 : _b.message }))] }));
131479
- } }), jsx(form.Field, { name: "expiration_date", children: (field) => (jsxs("div", { className: "space-y-1.5", children: [jsx(Label, { className: "flex items-center text-sm font-medium text-[#646464]", children: "Expiration Date" }), jsxs(Popover, { children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { type: "button", variant: "outline", className: cn('w-full pl-3 text-left font-normal', !field.state.value && 'text-muted-foreground'), children: [field.state.value ? (format(field.state.value, 'PPP')) : (jsx("span", { children: "Pick a date" })), jsx(Calendar$1, { className: "ml-auto h-4 w-4 opacity-50" })] }) }), jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: jsx(Calendar, { mode: "single",
131514
+ } }), jsx(form.Field, { name: "expiration_date", children: (field) => (jsxs("div", { className: "space-y-1.5", children: [jsx(Label, { className: "flex items-center text-sm font-medium text-[#646464]", children: "Expiration Date" }), jsxs("div", { children: [jsxs(Button$1, { type: "button", variant: "outline", "aria-haspopup": "dialog", "aria-expanded": isCalendarOpen, onClick: () => setIsCalendarOpen((open) => !open), className: cn('w-full pl-3 text-left font-normal', !field.state.value && 'text-muted-foreground'), children: [field.state.value ? (format(field.state.value, 'PPP')) : (jsx("span", { children: "Pick a date" })), jsx(Calendar$1, { className: "ml-auto h-4 w-4 opacity-50" })] }), isCalendarOpen && (jsx("div", { className: "mt-2 w-auto rounded-md border border-gray-200 dark:border-gray-700", children: jsx(Calendar, { mode: "single",
131480
131515
  // @ts-expect-error - Calendar selected prop expects Date but form field may be null
131481
- selected: field.state.value, onSelect: field.handleChange, disabled: (date) => date && date < new Date() }) })] })] })) }), jsx(DialogFooter, { className: "justify-end", children: jsx(form.Subscribe, { selector: (state) => ({
131516
+ selected: field.state.value, onSelect: (date) => {
131517
+ field.handleChange(date !== null && date !== void 0 ? date : null);
131518
+ setIsCalendarOpen(false);
131519
+ }, disabled: (date) => date && date < new Date() }) }))] })] })) }), jsx(DialogFooter, { className: "justify-end", children: jsx(form.Subscribe, { selector: (state) => ({
131482
131520
  canSubmit: state.canSubmit,
131483
131521
  }), children: ({ canSubmit }) => (jsx(Button$1, { type: "submit", disabled: !canSubmit || isLoading, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: isLoading ? 'Submitting...' : 'Submit' })) }) })] })] }) }), apiKey && jsx(ApiKeyModal$1, { isOpen: true, onClose: () => setApiKey(null), apiKey: apiKey })] }));
131484
131522
  }
@@ -169269,7 +169307,7 @@ var ForAll = "∀";
169269
169307
  var Fouriertrf = "ℱ";
169270
169308
  var Fscr = "ℱ";
169271
169309
  var GJcy = "Ѓ";
169272
- var G$2 = ">";
169310
+ var G$1 = ">";
169273
169311
  var GT$1 = ">";
169274
169312
  var Gamma = "Γ";
169275
169313
  var Gammad = "Ϝ";
@@ -169347,7 +169385,7 @@ var Kfr = "𝔎";
169347
169385
  var Kopf = "𝕂";
169348
169386
  var Kscr = "𝒦";
169349
169387
  var LJcy = "Љ";
169350
- var L$3 = "<";
169388
+ var L$2 = "<";
169351
169389
  var LT$1 = "<";
169352
169390
  var Lacute = "Ĺ";
169353
169391
  var Lambda = "Λ";
@@ -169549,7 +169587,7 @@ var Rarrtl = "⤖";
169549
169587
  var Rcaron = "Ř";
169550
169588
  var Rcedil = "Ŗ";
169551
169589
  var Rcy = "Р";
169552
- var Re$1 = "ℜ";
169590
+ var Re = "ℜ";
169553
169591
  var ReverseElement = "∋";
169554
169592
  var ReverseEquilibrium = "⇋";
169555
169593
  var ReverseUpEquilibrium = "⥯";
@@ -170033,7 +170071,7 @@ var dd = "ⅆ";
170033
170071
  var ddagger = "‡";
170034
170072
  var ddarr = "⇊";
170035
170073
  var ddotseq = "⩷";
170036
- var de$2 = "°";
170074
+ var de$1 = "°";
170037
170075
  var deg$1 = "°";
170038
170076
  var delta = "δ";
170039
170077
  var demptyv = "⦱";
@@ -170095,7 +170133,7 @@ var ecirc = "ê";
170095
170133
  var ecolon = "≕";
170096
170134
  var ecy = "э";
170097
170135
  var edot = "ė";
170098
- var ee$2 = "ⅇ";
170136
+ var ee$1 = "ⅇ";
170099
170137
  var efDot = "≒";
170100
170138
  var efr = "𝔢";
170101
170139
  var eg = "⪚";
@@ -170397,7 +170435,7 @@ var ldquor = "„";
170397
170435
  var ldrdhar = "⥧";
170398
170436
  var ldrushar = "⥋";
170399
170437
  var ldsh = "↲";
170400
- var le$2 = "≤";
170438
+ var le$1 = "≤";
170401
170439
  var leftarrow = "←";
170402
170440
  var leftarrowtail = "↢";
170403
170441
  var leftharpoondown = "↽";
@@ -171299,7 +171337,7 @@ var yacute = "ý";
171299
171337
  var yacy = "я";
171300
171338
  var ycirc = "ŷ";
171301
171339
  var ycy = "ы";
171302
- var ye$2 = "¥";
171340
+ var ye$1 = "¥";
171303
171341
  var yen = "¥";
171304
171342
  var yfr = "𝔶";
171305
171343
  var yicy = "ї";
@@ -171490,7 +171528,7 @@ var require$$0 = {
171490
171528
  Fouriertrf: Fouriertrf,
171491
171529
  Fscr: Fscr,
171492
171530
  GJcy: GJcy,
171493
- G: G$2,
171531
+ G: G$1,
171494
171532
  GT: GT$1,
171495
171533
  Gamma: Gamma,
171496
171534
  Gammad: Gammad,
@@ -171568,7 +171606,7 @@ var require$$0 = {
171568
171606
  Kopf: Kopf,
171569
171607
  Kscr: Kscr,
171570
171608
  LJcy: LJcy,
171571
- L: L$3,
171609
+ L: L$2,
171572
171610
  LT: LT$1,
171573
171611
  Lacute: Lacute,
171574
171612
  Lambda: Lambda,
@@ -171771,7 +171809,7 @@ var require$$0 = {
171771
171809
  Rcaron: Rcaron,
171772
171810
  Rcedil: Rcedil,
171773
171811
  Rcy: Rcy,
171774
- Re: Re$1,
171812
+ Re: Re,
171775
171813
  ReverseElement: ReverseElement,
171776
171814
  ReverseEquilibrium: ReverseEquilibrium,
171777
171815
  ReverseUpEquilibrium: ReverseUpEquilibrium,
@@ -172255,7 +172293,7 @@ var require$$0 = {
172255
172293
  ddagger: ddagger,
172256
172294
  ddarr: ddarr,
172257
172295
  ddotseq: ddotseq,
172258
- de: de$2,
172296
+ de: de$1,
172259
172297
  deg: deg$1,
172260
172298
  delta: delta,
172261
172299
  demptyv: demptyv,
@@ -172317,7 +172355,7 @@ var require$$0 = {
172317
172355
  ecolon: ecolon,
172318
172356
  ecy: ecy,
172319
172357
  edot: edot,
172320
- ee: ee$2,
172358
+ ee: ee$1,
172321
172359
  efDot: efDot,
172322
172360
  efr: efr,
172323
172361
  eg: eg,
@@ -172620,7 +172658,7 @@ var require$$0 = {
172620
172658
  ldrdhar: ldrdhar,
172621
172659
  ldrushar: ldrushar,
172622
172660
  ldsh: ldsh,
172623
- le: le$2,
172661
+ le: le$1,
172624
172662
  leftarrow: leftarrow,
172625
172663
  leftarrowtail: leftarrowtail,
172626
172664
  leftharpoondown: leftharpoondown,
@@ -173522,7 +173560,7 @@ var require$$0 = {
173522
173560
  yacy: yacy,
173523
173561
  ycirc: ycirc,
173524
173562
  ycy: ycy,
173525
- ye: ye$2,
173563
+ ye: ye$1,
173526
173564
  yen: yen,
173527
173565
  yfr: yfr,
173528
173566
  yicy: yicy,
@@ -200068,25 +200106,6 @@ function Markdown({ children, className }) {
200068
200106
  const AnalyticsSettingsContext = createContext({});
200069
200107
  AnalyticsSettingsContext.Provider;
200070
200108
 
200071
- var U$2=1,Y$2=.9,H$1=.8,J$1=.17,p$2=.1,u$3=.999,$$g=.9999;var k$2=.99,m$3=/[\\\/_+.#"@\[\(\{&]/,B$2=/[\\\/_+.#"@\[\(\{&]/g,K$2=/[\s-]/,X$1=/[\s-]/g;function G$1(_,C,h,P,A,f,O){if(f===C.length)return A===_.length?U$2:k$2;var T=`${A},${f}`;if(O[T]!==void 0)return O[T];for(var L=P.charAt(f),c=h.indexOf(L,A),S=0,E,N,R,M;c>=0;)E=G$1(_,C,h,P,c+1,f+1,O),E>S&&(c===A?E*=U$2:m$3.test(_.charAt(c-1))?(E*=H$1,R=_.slice(A,c-1).match(B$2),R&&A>0&&(E*=Math.pow(u$3,R.length))):K$2.test(_.charAt(c-1))?(E*=Y$2,M=_.slice(A,c-1).match(X$1),M&&A>0&&(E*=Math.pow(u$3,M.length))):(E*=J$1,A>0&&(E*=Math.pow(u$3,c-A))),_.charAt(c)!==C.charAt(f)&&(E*=$$g)),(E<p$2&&h.charAt(c-1)===P.charAt(f+1)||P.charAt(f+1)===P.charAt(f)&&h.charAt(c-1)!==P.charAt(f))&&(N=G$1(_,C,h,P,c+1,f+2,O),N*p$2>E&&(E=N*p$2)),E>S&&(S=E),c=h.indexOf(L,c+1);return O[T]=S,S}function D$2(_){return _.toLowerCase().replace(X$1," ")}function W$1(_,C,h){return _=h&&h.length>0?`${_+" "+h.join(" ")}`:_,G$1(_,C,D$2(_),D$2(C),0,0,{})}
200072
-
200073
- var N$2='[cmdk-group=""]',Y$1='[cmdk-group-items=""]',be$1='[cmdk-group-heading=""]',le$1='[cmdk-item=""]',ce$1=`${le$1}:not([aria-disabled="true"])`,Z$2="cmdk-item-select",T$4="data-value",Re=(r,o,n)=>W$1(r,o,n),ue$1=React.createContext(void 0),K$1=()=>React.useContext(ue$1),de$1=React.createContext(void 0),ee$1=()=>React.useContext(de$1),fe$1=React.createContext(void 0),me$1=React.forwardRef((r,o)=>{let n=L$2(()=>{var e,a;return {search:"",value:(a=(e=r.value)!=null?e:r.defaultValue)!=null?a:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=L$2(()=>new Set),c=L$2(()=>new Map),d=L$2(()=>new Map),f=L$2(()=>new Set),p=pe$1(r),{label:b,children:m,value:R,onValueChange:x,filter:C,shouldFilter:S,loop:A,disablePointerSelection:ge=false,vimBindings:j=true,...O}=r,$=useId$1(),q=useId$1(),_=useId$1(),I=React.useRef(null),v=ke();k$1(()=>{if(R!==void 0){let e=R.trim();n.current.value=e,E.emit();}},[R]),k$1(()=>{v(6,ne);},[]);let E=React.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>n.current,setState:(e,a,s)=>{var i,l,g,y;if(!Object.is(n.current[e],a)){if(n.current[e]=a,e==="search")J(),z(),v(1,W);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let h=document.getElementById(_);h?h.focus():(i=document.getElementById($))==null||i.focus();}if(v(7,()=>{var h;n.current.selectedItemId=(h=M())==null?void 0:h.id,E.emit();}),s||v(5,ne),((l=p.current)==null?void 0:l.value)!==void 0){let h=a!=null?a:"";(y=(g=p.current).onValueChange)==null||y.call(g,h);return}}E.emit();}},emit:()=>{f.current.forEach(e=>e());}}),[]),U=React.useMemo(()=>({value:(e,a,s)=>{var i;a!==((i=d.current.get(e))==null?void 0:i.value)&&(d.current.set(e,{value:a,keywords:s}),n.current.filtered.items.set(e,te(a,s)),v(2,()=>{z(),E.emit();}));},item:(e,a)=>(u.current.add(e),a&&(c.current.has(a)?c.current.get(a).add(e):c.current.set(a,new Set([e]))),v(3,()=>{J(),z(),n.current.value||W(),E.emit();}),()=>{d.current.delete(e),u.current.delete(e),n.current.filtered.items.delete(e);let s=M();v(4,()=>{J(),(s==null?void 0:s.getAttribute("id"))===e&&W(),E.emit();});}),group:e=>(c.current.has(e)||c.current.set(e,new Set),()=>{d.current.delete(e),c.current.delete(e);}),filter:()=>p.current.shouldFilter,label:b||r["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:$,inputId:_,labelId:q,listInnerRef:I}),[]);function te(e,a){var i,l;let s=(l=(i=p.current)==null?void 0:i.filter)!=null?l:Re;return e?s(e,n.current.search,a):0}function z(){if(!n.current.search||p.current.shouldFilter===false)return;let e=n.current.filtered.items,a=[];n.current.filtered.groups.forEach(i=>{let l=c.current.get(i),g=0;l.forEach(y=>{let h=e.get(y);g=Math.max(h,g);}),a.push([i,g]);});let s=I.current;V().sort((i,l)=>{var h,F;let g=i.getAttribute("id"),y=l.getAttribute("id");return ((h=e.get(y))!=null?h:0)-((F=e.get(g))!=null?F:0)}).forEach(i=>{let l=i.closest(Y$1);l?l.appendChild(i.parentElement===l?i:i.closest(`${Y$1} > *`)):s.appendChild(i.parentElement===s?i:i.closest(`${Y$1} > *`));}),a.sort((i,l)=>l[1]-i[1]).forEach(i=>{var g;let l=(g=I.current)==null?void 0:g.querySelector(`${N$2}[${T$4}="${encodeURIComponent(i[0])}"]`);l==null||l.parentElement.appendChild(l);});}function W(){let e=V().find(s=>s.getAttribute("aria-disabled")!=="true"),a=e==null?void 0:e.getAttribute(T$4);E.setState("value",a||void 0);}function J(){var a,s,i,l;if(!n.current.search||p.current.shouldFilter===false){n.current.filtered.count=u.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let g of u.current){let y=(s=(a=d.current.get(g))==null?void 0:a.value)!=null?s:"",h=(l=(i=d.current.get(g))==null?void 0:i.keywords)!=null?l:[],F=te(y,h);n.current.filtered.items.set(g,F),F>0&&e++;}for(let[g,y]of c.current)for(let h of y)if(n.current.filtered.items.get(h)>0){n.current.filtered.groups.add(g);break}n.current.filtered.count=e;}function ne(){var a,s,i;let e=M();e&&(((a=e.parentElement)==null?void 0:a.firstChild)===e&&((i=(s=e.closest(N$2))==null?void 0:s.querySelector(be$1))==null||i.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}));}function M(){var e;return (e=I.current)==null?void 0:e.querySelector(`${le$1}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=I.current)==null?void 0:e.querySelectorAll(ce$1))||[])}function X(e){let s=V()[e];s&&E.setState("value",s.getAttribute(T$4));}function Q(e){var g;let a=M(),s=V(),i=s.findIndex(y=>y===a),l=s[i+e];(g=p.current)!=null&&g.loop&&(l=i+e<0?s[s.length-1]:i+e===s.length?s[0]:s[i+e]),l&&E.setState("value",l.getAttribute(T$4));}function re(e){let a=M(),s=a==null?void 0:a.closest(N$2),i;for(;s&&!i;)s=e>0?we$1(s,N$2):De(s,N$2),i=s==null?void 0:s.querySelector(ce$1);i?E.setState("value",i.getAttribute(T$4)):Q(e);}let oe=()=>X(V().length-1),ie=e=>{e.preventDefault(),e.metaKey?oe():e.altKey?re(1):Q(1);},se=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?re(-1):Q(-1);};return React.createElement(Primitive.div,{ref:o,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var s;(s=O.onKeyDown)==null||s.call(O,e);let a=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||a))switch(e.key){case "n":case "j":{j&&e.ctrlKey&&ie(e);break}case "ArrowDown":{ie(e);break}case "p":case "k":{j&&e.ctrlKey&&se(e);break}case "ArrowUp":{se(e);break}case "Home":{e.preventDefault(),X(0);break}case "End":{e.preventDefault(),oe();break}case "Enter":{e.preventDefault();let i=M();if(i){let l=new Event(Z$2);i.dispatchEvent(l);}}}}},React.createElement("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:Te},b),B$1(r,e=>React.createElement(de$1.Provider,{value:E},React.createElement(ue$1.Provider,{value:U},e))))}),he$1=React.forwardRef((r,o)=>{var _,I;let n=useId$1(),u=React.useRef(null),c=React.useContext(fe$1),d=K$1(),f=pe$1(r),p=(I=(_=f.current)==null?void 0:_.forceMount)!=null?I:c==null?void 0:c.forceMount;k$1(()=>{if(!p)return d.item(n,c==null?void 0:c.id)},[p]);let b=ve$1(n,u,[r.value,r.children,u],r.keywords),m=ee$1(),R=P$1(v=>v.value&&v.value===b.current),x=P$1(v=>p||d.filter()===false?true:v.search?v.filtered.items.get(n)>0:true);React.useEffect(()=>{let v=u.current;if(!(!v||r.disabled))return v.addEventListener(Z$2,C),()=>v.removeEventListener(Z$2,C)},[x,r.onSelect,r.disabled]);function C(){var v,E;S(),(E=(v=f.current).onSelect)==null||E.call(v,b.current);}function S(){m.setState("value",b.current,true);}if(!x)return null;let{disabled:A,value:ge,onSelect:j,forceMount:O,keywords:$,...q}=r;return React.createElement(Primitive.div,{ref:composeRefs$1(u,o),...q,id:n,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!R,"data-disabled":!!A,"data-selected":!!R,onPointerMove:A||d.getDisablePointerSelection()?void 0:S,onClick:A?void 0:C},r.children)}),Ee=React.forwardRef((r,o)=>{let{heading:n,children:u,forceMount:c,...d}=r,f=useId$1(),p=React.useRef(null),b=React.useRef(null),m=useId$1(),R=K$1(),x=P$1(S=>c||R.filter()===false?true:S.search?S.filtered.groups.has(f):true);k$1(()=>R.group(f),[]),ve$1(f,p,[r.value,r.heading,b]);let C=React.useMemo(()=>({id:f,forceMount:c}),[c]);return React.createElement(Primitive.div,{ref:composeRefs$1(p,o),...d,"cmdk-group":"",role:"presentation",hidden:x?void 0:true},n&&React.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":true,id:m},n),B$1(r,S=>React.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?m:void 0},React.createElement(fe$1.Provider,{value:C},S))))}),ye$1=React.forwardRef((r,o)=>{let{alwaysRender:n,...u}=r,c=React.useRef(null),d=P$1(f=>!f.search);return !n&&!d?null:React.createElement(Primitive.div,{ref:composeRefs$1(c,o),...u,"cmdk-separator":"",role:"separator"})}),Se=React.forwardRef((r,o)=>{let{onValueChange:n,...u}=r,c=r.value!=null,d=ee$1(),f=P$1(m=>m.search),p=P$1(m=>m.selectedItemId),b=K$1();return React.useEffect(()=>{r.value!=null&&d.setState("search",r.value);},[r.value]),React.createElement(Primitive.input,{ref:o,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:false,"aria-autocomplete":"list",role:"combobox","aria-expanded":true,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":p,id:b.inputId,type:"text",value:c?r.value:f,onChange:m=>{c||d.setState("search",m.target.value),n==null||n(m.target.value);}})}),Ce=React.forwardRef((r,o)=>{let{children:n,label:u="Suggestions",...c}=r,d=React.useRef(null),f=React.useRef(null),p=P$1(m=>m.selectedItemId),b=K$1();return React.useEffect(()=>{if(f.current&&d.current){let m=f.current,R=d.current,x,C=new ResizeObserver(()=>{x=requestAnimationFrame(()=>{let S=m.offsetHeight;R.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px");});});return C.observe(m),()=>{cancelAnimationFrame(x),C.unobserve(m);}}},[]),React.createElement(Primitive.div,{ref:composeRefs$1(d,o),...c,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":u,id:b.listId},B$1(r,m=>React.createElement("div",{ref:composeRefs$1(f,b.listInnerRef),"cmdk-list-sizer":""},m)))}),xe=React.forwardRef((r,o)=>{let{open:n,onOpenChange:u,overlayClassName:c,contentClassName:d,container:f,...p}=r;return React.createElement(DialogPrimitive.Root,{open:n,onOpenChange:u},React.createElement(DialogPrimitive.Portal,{container:f},React.createElement(DialogPrimitive.Overlay,{"cmdk-overlay":"",className:c}),React.createElement(DialogPrimitive.Content,{"aria-label":r.label,"cmdk-dialog":"",className:d},React.createElement(me$1,{ref:o,...p}))))}),Ie=React.forwardRef((r,o)=>P$1(u=>u.filtered.count===0)?React.createElement(Primitive.div,{ref:o,...r,"cmdk-empty":"",role:"presentation"}):null),Pe=React.forwardRef((r,o)=>{let{progress:n,children:u,label:c="Loading...",...d}=r;return React.createElement(Primitive.div,{ref:o,...d,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":c},B$1(r,f=>React.createElement("div",{"aria-hidden":true},f)))}),_e=Object.assign(me$1,{List:Ce,Item:he$1,Input:Se,Group:Ee,Separator:ye$1,Dialog:xe,Empty:Ie,Loading:Pe});function we$1(r,o){let n=r.nextElementSibling;for(;n;){if(n.matches(o))return n;n=n.nextElementSibling;}}function De(r,o){let n=r.previousElementSibling;for(;n;){if(n.matches(o))return n;n=n.previousElementSibling;}}function pe$1(r){let o=React.useRef(r);return k$1(()=>{o.current=r;}),o}var k$1=typeof window=="undefined"?React.useEffect:React.useLayoutEffect;function L$2(r){let o=React.useRef();return o.current===void 0&&(o.current=r()),o}function P$1(r){let o=ee$1(),n=()=>r(o.snapshot());return React.useSyncExternalStore(o.subscribe,n,n)}function ve$1(r,o,n,u=[]){let c=React.useRef(),d=K$1();return k$1(()=>{var b;let f=(()=>{var m;for(let R of n){if(typeof R=="string")return R.trim();if(typeof R=="object"&&"current"in R)return R.current?(m=R.current.textContent)==null?void 0:m.trim():c.current}})(),p=u.map(m=>m.trim());d.value(r,f,p),(b=o.current)==null||b.setAttribute(T$4,f),c.current=f;}),c}var ke=()=>{let[r,o]=React.useState(),n=L$2(()=>new Map);return k$1(()=>{n.current.forEach(u=>u()),n.current=new Map;},[r]),(u,c)=>{n.current.set(u,c),o({});}};function Me(r){let o=r.type;return typeof o=="function"?o(r.props):"render"in o?o.render(r.props):r}function B$1({asChild:r,children:o},n){return r&&React.isValidElement(o)?React.cloneElement(Me(o),{ref:o.ref},n(o.props.children)):n(o)}var Te={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};
200074
-
200075
- const Command = React.forwardRef(({ className, ...props }, ref) => (jsx(_e, { ref: ref, className: cn('bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md', className), ...props })));
200076
- Command.displayName = _e.displayName;
200077
- const CommandInput = React.forwardRef(({ className, ...props }, ref) => (jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), jsx(_e.Input, { ref: ref, className: cn('placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50', className), ...props })] })));
200078
- CommandInput.displayName = _e.Input.displayName;
200079
- const CommandList = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.List, { ref: ref, className: cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className), ...props })));
200080
- CommandList.displayName = _e.List.displayName;
200081
- const CommandEmpty = React.forwardRef((props, ref) => (jsx(_e.Empty, { ref: ref, className: "py-6 text-center text-sm", ...props })));
200082
- CommandEmpty.displayName = _e.Empty.displayName;
200083
- const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Group, { ref: ref, className: cn('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className), ...props })));
200084
- CommandGroup.displayName = _e.Group.displayName;
200085
- const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Separator, { ref: ref, className: cn('bg-border -mx-1 h-px', className), ...props })));
200086
- CommandSeparator.displayName = _e.Separator.displayName;
200087
- const CommandItem = React.forwardRef(({ className, ...props }, ref) => (jsx(_e.Item, { ref: ref, className: cn("data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), ...props })));
200088
- CommandItem.displayName = _e.Item.displayName;
200089
-
200090
200109
  const SkeletonMultiplier = ({ Skeleton, multiplier }) => {
200091
200110
  return (jsx(Fragment$1, { children: Array.from({ length: multiplier }).map((_, index) => (jsx(Skeleton, {}, index))) }));
200092
200111
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/iblai-js",
3
- "version": "1.18.0",
3
+ "version": "1.18.1",
4
4
  "description": "Unified JavaScript SDK for IBL.ai — re-exports data-layer, web-containers, and web-utils under a single package",
5
5
  "type": "module",
6
6
  "engines": {
@@ -66,10 +66,10 @@
66
66
  "axios": "1.13.6",
67
67
  "dotenv": "16.6.1",
68
68
  "winston": "3.19.0",
69
- "@iblai/data-layer": "1.8.0",
70
- "@iblai/mcp": "1.6.0",
71
- "@iblai/web-containers": "1.9.0",
72
- "@iblai/web-utils": "1.10.11"
69
+ "@iblai/data-layer": "1.8.1",
70
+ "@iblai/web-containers": "1.9.1",
71
+ "@iblai/web-utils": "1.10.11",
72
+ "@iblai/mcp": "1.6.0"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "@radix-ui/react-dialog": "^1.1.7",