@zeniai/web-app-ui 5.0.1-dev → 5.0.1-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/assets/{AddressRoutes-BQP-CfGZ.js → AddressRoutes-Ccdt31hR.js} +1 -1
  2. package/dist/assets/{AddressScreen-wF2P11Cc.js → AddressScreen-DG9DlRXT.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-CILB5bBS.js → AiCfoScreen-BySJdfdn.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-Bm6O9E1C.js → BillPayApprovalRoutes-7ZgXY6Qr.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-DvR3hqif.js → BillPayRoutes-B7eECbMR.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-Db_j23ph.js → BusinessVerificationPageScreen-D_IL11BU.js} +1 -1
  7. package/dist/assets/{ChargeCardRoutes-B2KJAodB.js → ChargeCardRoutes-MbQ6GwxR.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-C20zLwxY.js → CompanyPassportScreen-0tGZqhHr.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-DJ5wyIja.js → ConnectionAuthScreen-Ng7EqaWr.js} +1 -1
  10. package/dist/assets/{CustomerOnboardingAuthScreen-BSF1us15.js → CustomerOnboardingAuthScreen-DHzsN76N.js} +1 -1
  11. package/dist/assets/{CustomerOnboardingRoutes-CnVH8vUK.js → CustomerOnboardingRoutes-DEmyPEG9.js} +1 -1
  12. package/dist/assets/{DashboardRoutes-6WcO8n0u.js → DashboardRoutes-LUXfYRYr.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-CrXP_cR1.js → DefaultTenantHome-CsgBmyY-.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-C51IXDOd.js → DomesticWireDetailScreen-Byk3gNE9.js} +1 -1
  15. package/dist/assets/{DrawerScreen-CV5-68Vp.js → DrawerScreen-CN6TBpYY.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-CWP-yEzD.js → EntityDetailRoutes-BVmRwPcm.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-BCVBp8qi.js → ExpenseAutomationRoutes-DzZ2kzOA.js} +1 -1
  18. package/dist/assets/{FeaturePreviewScreen-C9zUUTCh.js → FeaturePreviewScreen-ArEP4se9.js} +1 -1
  19. package/dist/assets/{MagicLinkRoutes-q1juhq3J.js → MagicLinkRoutes-C8RQWz8N.js} +1 -1
  20. package/dist/assets/{MagicLinkSignInScreen-D3tHYM0l.js → MagicLinkSignInScreen-raeb9t11.js} +1 -1
  21. package/dist/assets/{MobileAppDrawer-Czhowgsf.js → MobileAppDrawer-CowqUthz.js} +1 -1
  22. package/dist/assets/{NotFoundScreen-D0cCxE_g.js → NotFoundScreen-0ajohMSv.js} +1 -1
  23. package/dist/assets/{NotificationRoutes-C37yYJm9.js → NotificationRoutes-DzMqKa9n.js} +1 -1
  24. package/dist/assets/{PandLWithForecastRoutes-LRtjQJx_.js → PandLWithForecastRoutes-DdGQfKKW.js} +1 -1
  25. package/dist/assets/{PeopleRoutes-nhSxQuOd.js → PeopleRoutes-BswRWZQg.js} +1 -1
  26. package/dist/assets/{PerformanceRoutes-BU2_koAY.js → PerformanceRoutes-ChMRcywH.js} +1 -1
  27. package/dist/assets/{QBOConnectionScreen-ChkHB_5w.js → QBOConnectionScreen-C_qIc23z.js} +1 -1
  28. package/dist/assets/{ReferralListScreen-DRhEWofN.js → ReferralListScreen-BAK4p9-3.js} +1 -1
  29. package/dist/assets/{ReimbursementApprovalRoutes-BaUI0RrG.js → ReimbursementApprovalRoutes-ogcfMEcC.js} +1 -1
  30. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Doqr5IfY.js → ReimbursementApprovalRuleDetailScreen-Cg7X5Fv7.js} +1 -1
  31. package/dist/assets/{ReimbursementRoutes-B52nhenO.js → ReimbursementRoutes-0m6W0X2g.js} +1 -1
  32. package/dist/assets/{ReportsRoutes-CNqyQ8jz.js → ReportsRoutes-1TXSN037.js} +1 -1
  33. package/dist/assets/{RewardsRoutes-CqIupqR0.js → RewardsRoutes-B8FReE5j.js} +1 -1
  34. package/dist/assets/{ScreenRoutes-CDdkS4QP.js → ScreenRoutes-DRzB_14n.js} +2 -2
  35. package/dist/assets/{SettingsRoutes-CbTsbTLb.js → SettingsRoutes-BGCZcWYL.js} +1 -1
  36. package/dist/assets/{SetupPagesScreen-DeB97TrS.js → SetupPagesScreen-vY1ujDKJ.js} +1 -1
  37. package/dist/assets/{SignInScreen-CEzGCpsn.js → SignInScreen-ClbKNS4x.js} +1 -1
  38. package/dist/assets/{SignOutScreen-CETwZ0Jp.js → SignOutScreen-Dvb2Qc0l.js} +1 -1
  39. package/dist/assets/{TaskListScreen-b7SlqOLh.js → TaskListScreen-CaGy-z1x.js} +1 -1
  40. package/dist/assets/{TaskRoutes-BMFJJPYD.js → TaskRoutes-9joFCtVs.js} +1 -1
  41. package/dist/assets/{TransactionDetailRoutes-CdhRrWAk.js → TransactionDetailRoutes-CWNaQpCz.js} +1 -1
  42. package/dist/assets/{TransactionDetailScreen-Bh4hnUTb.js → TransactionDetailScreen-DXlYmq7Y.js} +1 -1
  43. package/dist/assets/{TransactionListRoutes-DLq7cUVK.js → TransactionListRoutes-FH_uc507.js} +1 -1
  44. package/dist/assets/{TreasuryRoutes-u5hb_BqK.js → TreasuryRoutes-CtBzkTMx.js} +1 -1
  45. package/dist/assets/{VendorsRoutes-DG-CUygJ.js → VendorsRoutes-aBYOoTKe.js} +1 -1
  46. package/dist/assets/{WiseConfirmationScreen-uk0X1R83.js → WiseConfirmationScreen-s0eoug7u.js} +1 -1
  47. package/dist/assets/{ZeniAccountRoutes-CN91LxEE.js → ZeniAccountRoutes-BcBOPI_A.js} +1 -1
  48. package/dist/assets/{ZeniAccountStatementScreen-Da1Wlwqe.js → ZeniAccountStatementScreen-BOfH7mnf.js} +1 -1
  49. package/dist/assets/{analyticsHelper-DZ0CUT0b.js → analyticsHelper-CSpNHX-t.js} +1 -1
  50. package/dist/assets/{getLocaleForTenant-C75hRciY.js → getLocaleForTenant-Ab1B3PjW.js} +1 -1
  51. package/dist/assets/{index-TZBFPhBM.js → index-BaZ8-9eR.js} +5 -5
  52. package/dist/assets/{routePaths-fq-ods6n.js → routePaths-CXa3WNDm.js} +1 -1
  53. package/dist/assets/{useAskAiCfoHostNavButtonProps-BmhiW9nY.js → useAskAiCfoHostNavButtonProps-Crpk73sU.js} +1 -1
  54. package/dist/assets/{useFetchSuggestedQuestionsWhenReady-CJ1dU4ni.js → useFetchSuggestedQuestionsWhenReady-sxquM27W.js} +1 -1
  55. package/dist/assets/{useInitialThreadRequest-DYY0nYQq.js → useInitialThreadRequest-B7p2SBgg.js} +1 -1
  56. package/dist/assets/{withTransactionSidePanel-CsJoitfl.js → withTransactionSidePanel-CB8Jp1hw.js} +1 -1
  57. package/dist/index.html +1 -1
  58. package/package.json +1 -1
@@ -1 +1 @@
1
- import{j as U}from"./liveblocks-BCZSgQbG.js";import{a as c}from"./sentry-CGkVgbup.js";import{h as pe,g as a,l as We,u as Ke,j as qe,i as x}from"./core-C_NeXleM.js";import{eL as he,eT as Je,eU as Se,eN as Qe,bm as Xe,f2 as ea,eV as aa,eW as ta,eY as na,f0 as sa,fa as oa,f1 as g,f4 as ia,f5 as ue,f8 as ra,f6 as da,f7 as la,f9 as ca,cF as ua,fc as fa,cL as ma,bu as ba,eK as pa,fh as ha,fi as Sa,fg as ga}from"./zeni-epic-state-Dp14ovRw.js";import{a1 as Ea,a2 as ka,n as Ca,Z as ya,z as k,a3 as Ia,u as Ta,i as r,a4 as wa,a5 as Fa,S as Aa,a as _a,a6 as Da,U as va,a7 as $a,a8 as Ba,a9 as fe,aa as me,L as Pa,ab as Ra,ac as be,c as M,k as F,ad as N,ae as xa}from"./index-TZBFPhBM.js";import{D as Ma}from"./mui-CgjVMn8C.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="f6352ff3-5a3e-4527-9f3c-244fd03093ba",f._sentryDebugIdIdentifier="sentry-dbid-f6352ff3-5a3e-4527-9f3c-244fd03093ba")}catch{}})();const Na=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=We(),n=Ke(),C=Ca(),o=qe(),V=Qe(),m=pe(),{useFeatureGate:i}=ya(),G=k.getSignedInUser(),A=Xe(G),s=a(e=>he(e)),L=a(e=>ea(e)),j=L.uiState.currentChatSessionId,y=Ia(),{setLoading:ge}=Ta(),[_,O]=c.useState(void 0),D=x("/:tenantEmailDomain/dashboard")!==null,z=x("/:tenantEmailDomain/reports")!==null,I=x("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ee}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),ke=wa(s,Ee,Z),{isFeatureEnabled:Ce}=i(r.isSettingsFeatureEnabled),H=a(e=>aa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=a(e=>ta(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(na(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=a(e=>e.tenantState),ye=a(e=>$.fetchState==="Completed"?sa(e):[]),E=a(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ie}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:K}=i(r.isExpenseAutomationEnabledV2),q=K||W&&A,{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:De}=i(r.isTreasuryEnabled),{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=A||!A&&ve,Be=s.company!=null&&oa(s.company),w=De&&Be,Pe=a(e=>g(e).totalUnreadCount),Re=a(e=>g(e).reducedFetchCountState),J=a(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=a(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),xe=a(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=a(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Me}=Fa();c.useEffect(()=>{const e=setTimeout(()=>Me?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;O(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else O(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&xe.fetchState==="Not-Started"&&V.tenantId!=null&&m(ia("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:_},"comments")))},[_,B.fetchState]);const Ne={fetchStatus:Re,count:Pe},ne=t!=null?k.getSignedInUserTenant(t):null,se=a(e=>ne?.tenantId!=null?ra(e,ne.tenantId):void 0),S=[];Ie===!1&&S.push("accounts_payable_aging"),Te===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),q===!1&&S.push("expense_automation_card");const Ue=Aa(),oe=a(e=>da(e,S,h,K,W,w).fetchState),ie=a(e=>la(e).fetchState),Ve=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Ge=c.useMemo(()=>ca(s.userRole),[s.userRole]),Le=ua(Ge),je=s?.rewardsLastViewedTime==null,Oe=h?.userEmail!=null&&H.fetchState==="Completed"&&fa(H.notificationSettings,h.userEmail,Z,s),re=_a(),ze=re&&Da(n),de=ma(Ue?.loggedInUserRoleMap),le=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,P=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&va(n.pathname)!=="treasury",[w,de,le,n.pathname,t]),[Ye,ce]=c.useState(P);c.useEffect(()=>{ce(P())},[P]);const Ze=a(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=$a(Ze);return U.jsx(Ma,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Ba,{signedInUser:G,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?ye:se!=null?[se]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:me(n),isSettingsFeatureEnabled:Ce,isVendorsTabVisible:Le,isZeniAccountEnabled:Y,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:He,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:Oe,notificationCountDetails:Ne,isExpenseAutomationEnabledForUser:q&&ba(s.userRole)===!1,selectedMenu:fe(n),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:je,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&Q>0?"notifications/comments":"notifications/tasks";me(n)&&(e=J===0&&Q>0?"../../notifications/comments":"../../notifications/tasks");const u=F(n.state?.pathnameStackToGoBack,n.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=F(n.state?.pathnameStackToGoBack,n.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),e.type==="ai_cfo"){const p=F(n.state?.pathnameStackToGoBack,n.pathname);return M.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=F(n.state?.pathnameStackToGoBack,n.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[s.tenantId]!=null&&M.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const R=xa(e.type);be(e.type)?(j!=null&&m(ga()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${R}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{ge(Pa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(n);let b=`/${encodeURIComponent(u)}/`;const R=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ra(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":R?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;M.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:ze,aiCfoView:L,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(pa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`)},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Fe,christmasAnimationEnabled:Ae,newYearAnimationEnabled:_e})})}),za=f=>{const d=pe(),t=a(C=>he(C)),n={events:t.userRoleId!=null?[`private-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Je(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Na,{...f,...n})};export{za as M};
1
+ import{j as U}from"./liveblocks-BCZSgQbG.js";import{a as c}from"./sentry-CGkVgbup.js";import{h as pe,g as a,l as We,u as Ke,j as qe,i as x}from"./core-C_NeXleM.js";import{eL as he,eT as Je,eU as Se,eN as Qe,bm as Xe,f2 as ea,eV as aa,eW as ta,eY as na,f0 as sa,fa as oa,f1 as g,f4 as ia,f5 as ue,f8 as ra,f6 as da,f7 as la,f9 as ca,cF as ua,fc as fa,cL as ma,bu as ba,eK as pa,fh as ha,fi as Sa,fg as ga}from"./zeni-epic-state-Dp14ovRw.js";import{a1 as Ea,a2 as ka,n as Ca,Z as ya,z as k,a3 as Ia,u as Ta,i as r,a4 as wa,a5 as Fa,S as Aa,a as _a,a6 as Da,U as va,a7 as $a,a8 as Ba,a9 as fe,aa as me,L as Pa,ab as Ra,ac as be,c as M,k as F,ad as N,ae as xa}from"./index-BaZ8-9eR.js";import{D as Ma}from"./mui-CgjVMn8C.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="f6352ff3-5a3e-4527-9f3c-244fd03093ba",f._sentryDebugIdIdentifier="sentry-dbid-f6352ff3-5a3e-4527-9f3c-244fd03093ba")}catch{}})();const Na=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=We(),n=Ke(),C=Ca(),o=qe(),V=Qe(),m=pe(),{useFeatureGate:i}=ya(),G=k.getSignedInUser(),A=Xe(G),s=a(e=>he(e)),L=a(e=>ea(e)),j=L.uiState.currentChatSessionId,y=Ia(),{setLoading:ge}=Ta(),[_,O]=c.useState(void 0),D=x("/:tenantEmailDomain/dashboard")!==null,z=x("/:tenantEmailDomain/reports")!==null,I=x("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ee}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),ke=wa(s,Ee,Z),{isFeatureEnabled:Ce}=i(r.isSettingsFeatureEnabled),H=a(e=>aa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=a(e=>ta(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(na(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=a(e=>e.tenantState),ye=a(e=>$.fetchState==="Completed"?sa(e):[]),E=a(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ie}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:K}=i(r.isExpenseAutomationEnabledV2),q=K||W&&A,{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:De}=i(r.isTreasuryEnabled),{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=A||!A&&ve,Be=s.company!=null&&oa(s.company),w=De&&Be,Pe=a(e=>g(e).totalUnreadCount),Re=a(e=>g(e).reducedFetchCountState),J=a(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=a(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),xe=a(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=a(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Me}=Fa();c.useEffect(()=>{const e=setTimeout(()=>Me?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;O(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else O(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&xe.fetchState==="Not-Started"&&V.tenantId!=null&&m(ia("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:_},"comments")))},[_,B.fetchState]);const Ne={fetchStatus:Re,count:Pe},ne=t!=null?k.getSignedInUserTenant(t):null,se=a(e=>ne?.tenantId!=null?ra(e,ne.tenantId):void 0),S=[];Ie===!1&&S.push("accounts_payable_aging"),Te===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),q===!1&&S.push("expense_automation_card");const Ue=Aa(),oe=a(e=>da(e,S,h,K,W,w).fetchState),ie=a(e=>la(e).fetchState),Ve=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Ge=c.useMemo(()=>ca(s.userRole),[s.userRole]),Le=ua(Ge),je=s?.rewardsLastViewedTime==null,Oe=h?.userEmail!=null&&H.fetchState==="Completed"&&fa(H.notificationSettings,h.userEmail,Z,s),re=_a(),ze=re&&Da(n),de=ma(Ue?.loggedInUserRoleMap),le=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,P=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&va(n.pathname)!=="treasury",[w,de,le,n.pathname,t]),[Ye,ce]=c.useState(P);c.useEffect(()=>{ce(P())},[P]);const Ze=a(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=$a(Ze);return U.jsx(Ma,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Ba,{signedInUser:G,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?ye:se!=null?[se]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:me(n),isSettingsFeatureEnabled:Ce,isVendorsTabVisible:Le,isZeniAccountEnabled:Y,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:He,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:Oe,notificationCountDetails:Ne,isExpenseAutomationEnabledForUser:q&&ba(s.userRole)===!1,selectedMenu:fe(n),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:je,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&Q>0?"notifications/comments":"notifications/tasks";me(n)&&(e=J===0&&Q>0?"../../notifications/comments":"../../notifications/tasks");const u=F(n.state?.pathnameStackToGoBack,n.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=F(n.state?.pathnameStackToGoBack,n.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),e.type==="ai_cfo"){const p=F(n.state?.pathnameStackToGoBack,n.pathname);return M.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=F(n.state?.pathnameStackToGoBack,n.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[s.tenantId]!=null&&M.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const R=xa(e.type);be(e.type)?(j!=null&&m(ga()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${R}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{ge(Pa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(n);let b=`/${encodeURIComponent(u)}/`;const R=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ra(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":R?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;M.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:ze,aiCfoView:L,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(pa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`)},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Fe,christmasAnimationEnabled:Ae,newYearAnimationEnabled:_e})})}),za=f=>{const d=pe(),t=a(C=>he(C)),n={events:t.userRoleId!=null?[`private-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Je(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Na,{...f,...n})};export{za as M};
@@ -1 +1 @@
1
- import{j as r}from"./liveblocks-BCZSgQbG.js";import{j as e,k as i}from"./core-C_NeXleM.js";import{R as n}from"./index-TZBFPhBM.js";import"./mui-CgjVMn8C.js";import"./sentry-CGkVgbup.js";import"./zeni-epic-state-Dp14ovRw.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="b6d02d00-6f13-4ce0-b317-0d40d9650c87",o._sentryDebugIdIdentifier="sentry-dbid-b6d02d00-6f13-4ce0-b317-0d40d9650c87")}catch{}})();const d=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=e();return r.jsx(d,{navigate:o})}export{h as default};
1
+ import{j as r}from"./liveblocks-BCZSgQbG.js";import{j as e,k as i}from"./core-C_NeXleM.js";import{R as n}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import"./sentry-CGkVgbup.js";import"./zeni-epic-state-Dp14ovRw.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="b6d02d00-6f13-4ce0-b317-0d40d9650c87",o._sentryDebugIdIdentifier="sentry-dbid-b6d02d00-6f13-4ce0-b317-0d40d9650c87")}catch{}})();const d=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=e();return r.jsx(d,{navigate:o})}export{h as default};
@@ -1 +1 @@
1
- import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-BCZSgQbG.js";import ut from"./NotFoundScreen-D0cCxE_g.js";import{a as k}from"./sentry-CGkVgbup.js";import{j as ht,u as pt,l as kt,h as gt,g as S,k as St,n as bt,o as J}from"./core-C_NeXleM.js";import{cn as It,eV as Q,eL as Z,f9 as Ct,f1 as b,Oe as H,f5 as d,eU as A,q7 as M,vg as Tt,Of as At,eT as yt,fc as Et,qc as _t,Og as $,bp as F,gw as x,qg as K,Oh as Nt,cy as Bt,cs as wt}from"./zeni-epic-state-Dp14ovRw.js";import{E as xt,z as Dt,Z as Rt,i as Ut,D as vt,cn as Gt,k as N,a1 as Pt,co as $t,a2 as Ft,p as Mt}from"./index-TZBFPhBM.js";import"./mui-CgjVMn8C.js";import{u as jt}from"./useAskAiCfoHostNavButtonProps-BmhiW9nY.js";import{c as Ot}from"./useFetchSuggestedQuestionsWhenReady-CJ1dU4ni.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="cf75796d-a457-4ed4-a2f2-055f888146d4",t._sentryDebugIdIdentifier="sentry-dbid-cf75796d-a457-4ed4-a2f2-055f888146d4")}catch{}})();const Vt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),qt=St(function(t,l){const n=Q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Z(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&Et(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:D}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(K("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Bt(g)&&(r="not-found"),c[1].startsWith("bill")&&!wt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(A(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(H(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else D?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(K("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t($([r],F())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(A({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Vt(s,B).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(A({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Mt(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Pt($t)),Lt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:u}=kt(),{areTenantIdsInSync:g}=xt(),i=It(u??""),s=gt(),h=Dt.getSignedInUser(),[B,D]=k.useState(!1),a=S(e=>Q(e)),o=S(e=>Z(e)),{useFeatureGate:m}=Rt(),{isFeatureEnabled:c}=m(Ut.isDebitCardFeatureEnabled),{isAiCfoOpen:r,setIsAiCfoOpen:I}=vt(),{isAiCfoAccessEnabled:X,onAskAiCfoClick:Y}=jt({isAiCfoOpen:r,setIsAiCfoOpen:I,mobileExploreReferrer:"Notifications"});Ot({isDataReady:!0});const tt=Ct(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),O=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),et=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),at=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),ot=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),st=Gt().allUsers,{inboxNotifications:w,isLoading:y,hasFetchedAll:C,isFetchingMore:v,fetchMore:nt}=dt(),{threads:V,isLoading:q,fetchMore:L,isFetchingMore:W,hasFetchedAll:z}=lt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(O!==i&&i!=null&&s(H(i)),i==null){const e=`../${O}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{et.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(y===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(A({unreadCount:p},"comments"))}},[y,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>nt?.(),0);return()=>clearTimeout(e)});const G=y||v===!0||C!==!0||y||v===!0||C!==!0;k.useEffect(()=>{G&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,U]),k.useEffect(()=>{s(A({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(D(!0),s(Tt()))},[a.fetchState]),k.useEffect(()=>{if(y===!1&&q===!1&&w!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),ct=p.map(f=>{const P=V.find(mt=>mt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(W||z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(A({totalCount:E.length,unreadCount:T.length},"comments")),s(At(ct))}},[y,v,W,C,z,q,w?.length]);const it={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ft(p)){const T=yt(p.mode);if(T==="dashboard"&&s(A({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];R==="all"?E.push("read","unread"):R!=="mentions"&&E.push(R),s(M("task_manager",T,E,!0))}}}},rt=ft();return _.jsx(qt,{tenantEmailDomain:n,loggedInUserRoleMap:tt,signedInUser:h,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:st,markInboxNotificationAsRead:rt,allUnreadCommentsNotificationIds:ot,isAiCfoAccessEnabled:X,onAskAiCfoClick:Y,...it})};function me(){return _.jsxs(bt,{children:[_.jsx(J,{path:"/:selectedTab",element:_.jsx(Lt,{})}),_.jsx(J,{path:"*",element:_.jsx(ut,{})})]})}export{me as default};
1
+ import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-BCZSgQbG.js";import ut from"./NotFoundScreen-0ajohMSv.js";import{a as k}from"./sentry-CGkVgbup.js";import{j as ht,u as pt,l as kt,h as gt,g as S,k as St,n as bt,o as J}from"./core-C_NeXleM.js";import{cn as It,eV as Q,eL as Z,f9 as Ct,f1 as b,Oe as H,f5 as d,eU as A,q7 as M,vg as Tt,Of as At,eT as yt,fc as Et,qc as _t,Og as $,bp as F,gw as x,qg as K,Oh as Nt,cy as Bt,cs as wt}from"./zeni-epic-state-Dp14ovRw.js";import{E as xt,z as Dt,Z as Rt,i as Ut,D as vt,cn as Gt,k as N,a1 as Pt,co as $t,a2 as Ft,p as Mt}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import{u as jt}from"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import{c as Ot}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="cf75796d-a457-4ed4-a2f2-055f888146d4",t._sentryDebugIdIdentifier="sentry-dbid-cf75796d-a457-4ed4-a2f2-055f888146d4")}catch{}})();const Vt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),qt=St(function(t,l){const n=Q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Z(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&Et(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:D}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(K("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Bt(g)&&(r="not-found"),c[1].startsWith("bill")&&!wt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(A(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(H(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else D?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(K("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t($([r],F())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(A({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Vt(s,B).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(A({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Mt(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Pt($t)),Lt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:u}=kt(),{areTenantIdsInSync:g}=xt(),i=It(u??""),s=gt(),h=Dt.getSignedInUser(),[B,D]=k.useState(!1),a=S(e=>Q(e)),o=S(e=>Z(e)),{useFeatureGate:m}=Rt(),{isFeatureEnabled:c}=m(Ut.isDebitCardFeatureEnabled),{isAiCfoOpen:r,setIsAiCfoOpen:I}=vt(),{isAiCfoAccessEnabled:X,onAskAiCfoClick:Y}=jt({isAiCfoOpen:r,setIsAiCfoOpen:I,mobileExploreReferrer:"Notifications"});Ot({isDataReady:!0});const tt=Ct(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),O=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),et=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),at=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),ot=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),st=Gt().allUsers,{inboxNotifications:w,isLoading:y,hasFetchedAll:C,isFetchingMore:v,fetchMore:nt}=dt(),{threads:V,isLoading:q,fetchMore:L,isFetchingMore:W,hasFetchedAll:z}=lt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(O!==i&&i!=null&&s(H(i)),i==null){const e=`../${O}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{et.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(y===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(A({unreadCount:p},"comments"))}},[y,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>nt?.(),0);return()=>clearTimeout(e)});const G=y||v===!0||C!==!0||y||v===!0||C!==!0;k.useEffect(()=>{G&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,U]),k.useEffect(()=>{s(A({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(D(!0),s(Tt()))},[a.fetchState]),k.useEffect(()=>{if(y===!1&&q===!1&&w!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),ct=p.map(f=>{const P=V.find(mt=>mt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(W||z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(A({totalCount:E.length,unreadCount:T.length},"comments")),s(At(ct))}},[y,v,W,C,z,q,w?.length]);const it={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ft(p)){const T=yt(p.mode);if(T==="dashboard"&&s(A({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];R==="all"?E.push("read","unread"):R!=="mentions"&&E.push(R),s(M("task_manager",T,E,!0))}}}},rt=ft();return _.jsx(qt,{tenantEmailDomain:n,loggedInUserRoleMap:tt,signedInUser:h,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:st,markInboxNotificationAsRead:rt,allUnreadCommentsNotificationIds:ot,isAiCfoAccessEnabled:X,onAskAiCfoClick:Y,...it})};function me(){return _.jsxs(bt,{children:[_.jsx(J,{path:"/:selectedTab",element:_.jsx(Lt,{})}),_.jsx(J,{path:"*",element:_.jsx(ut,{})})]})}export{me as default};
@@ -1 +1 @@
1
- import{j as n}from"./liveblocks-BCZSgQbG.js";import{j as Z,h as J,u as K,l as X,g as d,k as H,n as ee,o as C}from"./core-C_NeXleM.js";import{eL as M,pX as v,pv as ae,II as $,pq as A,bu as te,bm as se,bQ as oe,pr as re,IJ as ne,It as S,dF as ie,td as ce,IK as le,tA as de,eS as me,eQ as fe}from"./zeni-epic-state-Dp14ovRw.js";import{D as pe,z as ue,E as he,S as Fe,Z as w,i as q,q as ge,c as B,aj as Ie,k as be}from"./index-TZBFPhBM.js";import"./mui-CgjVMn8C.js";import Ce from"./NotFoundScreen-D0cCxE_g.js";import{F as Se}from"./FeaturePreviewScreen-C9zUUTCh.js";import{a as h}from"./sentry-CGkVgbup.js";import{u as Ae}from"./useAskAiCfoHostNavButtonProps-BmhiW9nY.js";import{c as Te}from"./useFetchSuggestedQuestionsWhenReady-CJ1dU4ni.js";import{u as ye}from"./useInitialThreadRequest-DYY0nYQq.js";import{t as ke}from"./routePaths-fq-ods6n.js";import{M as De}from"./MobileAppDrawer-Czhowgsf.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="a8ed8dea-ce3b-450d-8305-a87705cfb3bf",s._sentryDebugIdIdentifier="sentry-dbid-a8ed8dea-ce3b-450d-8305-a87705cfb3bf")}catch{}})();const T=(s,a,e,o)=>{if(s!=a){const r=o||"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},xe=H(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:B}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s($(e,o)),a.isPandLReportFetched(e)||s(A(e)),T(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const F=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const f=ke(a.tenantEmailDomain,e.accountId,e.accountType,F,r,i),p=be(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(f,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(S({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(Ie);function U(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=Z(),o=J(),r=K(),{forecastId:i,tenantEmailDomain:F}=X(),[f,p]=h.useState(!1),[g,y]=h.useState(!1),u=ue.getSignedInUser(),k=d(t=>M(t)),G=k.company?.companyInfo.firstMonthOfFY??1,c=d(t=>v(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),D=d(t=>t.profitAndLossState),x=d(t=>t.reportUIOptionsState.selectedForecast),j=t=>D.pandLByForecastID[t]!=null&&re(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=he();Te({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:_}=Ae({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!f&&I)p(!0),l||o(ae());else if(l&&!g){y(!0);const t=((m,P,R)=>P!=null?m.forecasts.findIndex(b=>b.id===P):R!=null?m.forecasts.findIndex(b=>b.id===R):m.forecasts.length>0?0:-1)(c,i,x?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=x?.index?(o($(c.forecasts[t].id,t)),T(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&T(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!j(c.forecasts[t].id)&&I&&o(A(c.forecasts[t].id))}},[f,p,o,l,c,g,y,v,A,I]);const E=Fe(),W=E?.loggedInUserRole!=null&&te(E.loggedInUserRole),{useFeatureGate:Y}=w(),{isFeatureEnabled:L}=Y(q.isReportsCommentingEnabled),V=ye(L?k?.companyId:void 0,{clearParams:l&&g}),[z,Q]=h.useState(!1),O=t=>{Q(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ge,{analytics:B,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(De,{isAppContentDrawerOpen:z,handleDrawerToggle:O}),n.jsx(xe,{firstMonthOfFY:G,tenantEmailDomain:F,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:j,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:W,isAiCfoAccessEnabled:N,onAskAiCfoClick:_,isReportsCommentingEnabled:L,isZeniUser:se(u),initialOpenThreadRequest:V,onClickMenuIcon:()=>{O(!0)}})]})}function Je(){const s=d(i=>M(i)),{useFeatureGate:a}=w(),{isFeatureEnabled:e}=a(q.isDebitCardFeatureEnabled),o=me(e,s),r=fe(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Je as PandLWithForecastRoutes,Je as default};
1
+ import{j as n}from"./liveblocks-BCZSgQbG.js";import{j as Z,h as J,u as K,l as X,g as d,k as H,n as ee,o as C}from"./core-C_NeXleM.js";import{eL as M,pX as v,pv as ae,II as $,pq as A,bu as te,bm as se,bQ as oe,pr as re,IJ as ne,It as S,dF as ie,td as ce,IK as le,tA as de,eS as me,eQ as fe}from"./zeni-epic-state-Dp14ovRw.js";import{D as pe,z as ue,E as he,S as Fe,Z as w,i as q,q as ge,c as B,aj as Ie,k as be}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import Ce from"./NotFoundScreen-0ajohMSv.js";import{F as Se}from"./FeaturePreviewScreen-ArEP4se9.js";import{a as h}from"./sentry-CGkVgbup.js";import{u as Ae}from"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import{c as Te}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import{u as ye}from"./useInitialThreadRequest-B7p2SBgg.js";import{t as ke}from"./routePaths-CXa3WNDm.js";import{M as De}from"./MobileAppDrawer-CowqUthz.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="a8ed8dea-ce3b-450d-8305-a87705cfb3bf",s._sentryDebugIdIdentifier="sentry-dbid-a8ed8dea-ce3b-450d-8305-a87705cfb3bf")}catch{}})();const T=(s,a,e,o)=>{if(s!=a){const r=o||"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},xe=H(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:B}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s($(e,o)),a.isPandLReportFetched(e)||s(A(e)),T(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const F=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const f=ke(a.tenantEmailDomain,e.accountId,e.accountType,F,r,i),p=be(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(f,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(S({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(Ie);function U(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=Z(),o=J(),r=K(),{forecastId:i,tenantEmailDomain:F}=X(),[f,p]=h.useState(!1),[g,y]=h.useState(!1),u=ue.getSignedInUser(),k=d(t=>M(t)),G=k.company?.companyInfo.firstMonthOfFY??1,c=d(t=>v(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),D=d(t=>t.profitAndLossState),x=d(t=>t.reportUIOptionsState.selectedForecast),j=t=>D.pandLByForecastID[t]!=null&&re(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=he();Te({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:_}=Ae({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!f&&I)p(!0),l||o(ae());else if(l&&!g){y(!0);const t=((m,P,R)=>P!=null?m.forecasts.findIndex(b=>b.id===P):R!=null?m.forecasts.findIndex(b=>b.id===R):m.forecasts.length>0?0:-1)(c,i,x?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=x?.index?(o($(c.forecasts[t].id,t)),T(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&T(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!j(c.forecasts[t].id)&&I&&o(A(c.forecasts[t].id))}},[f,p,o,l,c,g,y,v,A,I]);const E=Fe(),W=E?.loggedInUserRole!=null&&te(E.loggedInUserRole),{useFeatureGate:Y}=w(),{isFeatureEnabled:L}=Y(q.isReportsCommentingEnabled),V=ye(L?k?.companyId:void 0,{clearParams:l&&g}),[z,Q]=h.useState(!1),O=t=>{Q(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ge,{analytics:B,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(De,{isAppContentDrawerOpen:z,handleDrawerToggle:O}),n.jsx(xe,{firstMonthOfFY:G,tenantEmailDomain:F,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:j,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:W,isAiCfoAccessEnabled:N,onAskAiCfoClick:_,isReportsCommentingEnabled:L,isZeniUser:se(u),initialOpenThreadRequest:V,onClickMenuIcon:()=>{O(!0)}})]})}function Je(){const s=d(i=>M(i)),{useFeatureGate:a}=w(),{isFeatureEnabled:e}=a(q.isDebitCardFeatureEnabled),o=me(e,s),r=fe(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Je as PandLWithForecastRoutes,Je as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-BCZSgQbG.js";import{ID as oe,eL as X,j6 as W,eS as J,eQ as ie,Gf as Y,Ij as re,sq as ke,IE as N,se as Pe,sz as je,st as le,si as de,sx as Te,su as Le,IF as ce,t$ as ve,IG as Fe,fw as Ae,IH as G,sn as pe,sl as ue,sC as Oe,b$ as Re}from"./zeni-epic-state-Dp14ovRw.js";import{K as me,Z as ee,i as E,z as _,a4 as ge,y as fe,af as he,ag as Ve,w as Ce,o as A,A as be,O as ye,ah as Ue,E as Ze,D as $e,q as Be,c as we,e as ze,k as Ge,ai as He,S as Ke}from"./index-TZBFPhBM.js";import{D as Se,n as q,S as De}from"./mui-CgjVMn8C.js";import te from"./NotFoundScreen-D0cCxE_g.js";import{a as l}from"./sentry-CGkVgbup.js";import{h as se,l as We,g,j as _e,u as qe,k as Me,n as ne,o as z}from"./core-C_NeXleM.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-BmhiW9nY.js";import{c as Ne}from"./useFetchSuggestedQuestionsWhenReady-CJ1dU4ni.js";import{M as Xe}from"./MobileAppDrawer-Czhowgsf.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="95b24273-c6bc-4ea8-b446-7c319f2f1aa9",e._sentryDebugIdIdentifier="sentry-dbid-95b24273-c6bc-4ea8-b446-7c319f2f1aa9")}catch{}})();const Je={overlayWidth:new Ce(100,100,48)},H=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),{userId:S}=We(),c=g(t=>oe(t)),m=g(t=>X(t)),D=g(t=>W(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=J(I,m),L=ie(m),v=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(N()),y()},F=()=>{O===!0?w(!0):b()},Z=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:$}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:B}=C(E.isChargeCardFeatureEnabled),p=ge(m,B,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:Z,mode:f,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:$===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(f==="zeni_only"?Pe(e):je(v))},onCloseClick:F,isLoading:x||c.person==null},r={onOkClick:()=>{w(!1),b()},onCancelClick:()=>{w(!1)}};return l.useEffect(()=>{x===!1&&S!=null&&u(ke(S))},[x,S]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(he,{titleComponent:s.jsx(xe,{children:H.discardTitle}),descriptionComponent:s.jsx(Ee,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=q(De)`
1
+ import{j as s}from"./liveblocks-BCZSgQbG.js";import{ID as oe,eL as X,j6 as W,eS as J,eQ as ie,Gf as Y,Ij as re,sq as ke,IE as N,se as Pe,sz as je,st as le,si as de,sx as Te,su as Le,IF as ce,t$ as ve,IG as Fe,fw as Ae,IH as G,sn as pe,sl as ue,sC as Oe,b$ as Re}from"./zeni-epic-state-Dp14ovRw.js";import{K as me,Z as ee,i as E,z as _,a4 as ge,y as fe,af as he,ag as Ve,w as Ce,o as A,A as be,O as ye,ah as Ue,E as Ze,D as $e,q as Be,c as we,e as ze,k as Ge,ai as He,S as Ke}from"./index-BaZ8-9eR.js";import{D as Se,n as q,S as De}from"./mui-CgjVMn8C.js";import te from"./NotFoundScreen-0ajohMSv.js";import{a as l}from"./sentry-CGkVgbup.js";import{h as se,l as We,g,j as _e,u as qe,k as Me,n as ne,o as z}from"./core-C_NeXleM.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import{c as Ne}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import{M as Xe}from"./MobileAppDrawer-CowqUthz.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="95b24273-c6bc-4ea8-b446-7c319f2f1aa9",e._sentryDebugIdIdentifier="sentry-dbid-95b24273-c6bc-4ea8-b446-7c319f2f1aa9")}catch{}})();const Je={overlayWidth:new Ce(100,100,48)},H=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),{userId:S}=We(),c=g(t=>oe(t)),m=g(t=>X(t)),D=g(t=>W(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=J(I,m),L=ie(m),v=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(N()),y()},F=()=>{O===!0?w(!0):b()},Z=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:$}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:B}=C(E.isChargeCardFeatureEnabled),p=ge(m,B,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:Z,mode:f,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:$===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(f==="zeni_only"?Pe(e):je(v))},onCloseClick:F,isLoading:x||c.person==null},r={onOkClick:()=>{w(!1),b()},onCancelClick:()=>{w(!1)}};return l.useEffect(()=>{x===!1&&S!=null&&u(ke(S))},[x,S]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(he,{titleComponent:s.jsx(xe,{children:H.discardTitle}),descriptionComponent:s.jsx(Ee,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=q(De)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as a}from"./liveblocks-BCZSgQbG.js";import _ from"./NotFoundScreen-D0cCxE_g.js";import{a as r}from"./sentry-CGkVgbup.js";import{j as v,u as M,g as u,l as U,h as P,N as z,k as V,n as B,o as h}from"./core-C_NeXleM.js";import{eL as F,Oi as b,bn as L,bm as N,gO as H,gw as $}from"./zeni-epic-state-Dp14ovRw.js";import{n as q,z as I,D as G,cp as J}from"./index-TZBFPhBM.js";import"./mui-CgjVMn8C.js";import{u as K}from"./useAskAiCfoHostNavButtonProps-BmhiW9nY.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-CJ1dU4ni.js";import{M as W}from"./MobileAppDrawer-Czhowgsf.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="67a31a73-2ef1-4d87-94cc-e8038d24c8d1",e._sentryDebugIdIdentifier="sentry-dbid-67a31a73-2ef1-4d87-94cc-e8038d24c8d1")}catch{}})();const X=V(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(J),Y=()=>{const e=v(),t=M(),c=q(),o=u(s=>F(s)),{aggregatedReportViewState:n}=u(s=>b(s)),{tenantEmailDomain:m}=U(),p=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[C,w]=r.useState(!1),S=L(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,D=N(l),A=S||k||D,d=r.useCallback((s,i,O)=>{p(H({fromMonth:s,toMonth:i,cacheOverride:O}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const x=r.useCallback((s,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(s,i,!0),f.current=!0},[n?.fetchState,d]),y=r.useCallback((s,i)=>{d(s,i,!1)},[d]),g=s=>{w(s)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=G(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=K({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),A?a.jsxs(a.Fragment,{children:[a.jsx(W,{isAppContentDrawerOpen:C,handleDrawerToggle:g}),a.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:x,onTimeRangeSelect:y,handleDrawerToggle:g,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):a.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ie(){return a.jsxs(B,{children:[a.jsx(h,{path:"*",element:a.jsx(Y,{})}),a.jsx(h,{path:"*",element:a.jsx(_,{})})]})}export{Ie as default};
1
+ import{j as a}from"./liveblocks-BCZSgQbG.js";import _ from"./NotFoundScreen-0ajohMSv.js";import{a as r}from"./sentry-CGkVgbup.js";import{j as v,u as M,g as u,l as U,h as P,N as z,k as V,n as B,o as h}from"./core-C_NeXleM.js";import{eL as F,Oi as b,bn as L,bm as N,gO as H,gw as $}from"./zeni-epic-state-Dp14ovRw.js";import{n as q,z as I,D as G,cp as J}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import{u as K}from"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import{M as W}from"./MobileAppDrawer-CowqUthz.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="67a31a73-2ef1-4d87-94cc-e8038d24c8d1",e._sentryDebugIdIdentifier="sentry-dbid-67a31a73-2ef1-4d87-94cc-e8038d24c8d1")}catch{}})();const X=V(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(J),Y=()=>{const e=v(),t=M(),c=q(),o=u(s=>F(s)),{aggregatedReportViewState:n}=u(s=>b(s)),{tenantEmailDomain:m}=U(),p=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[C,w]=r.useState(!1),S=L(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,D=N(l),A=S||k||D,d=r.useCallback((s,i,O)=>{p(H({fromMonth:s,toMonth:i,cacheOverride:O}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const x=r.useCallback((s,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(s,i,!0),f.current=!0},[n?.fetchState,d]),y=r.useCallback((s,i)=>{d(s,i,!1)},[d]),g=s=>{w(s)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=G(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=K({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),A?a.jsxs(a.Fragment,{children:[a.jsx(W,{isAppContentDrawerOpen:C,handleDrawerToggle:g}),a.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:x,onTimeRangeSelect:y,handleDrawerToggle:g,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):a.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ie(){return a.jsxs(B,{children:[a.jsx(h,{path:"*",element:a.jsx(Y,{})}),a.jsx(h,{path:"*",element:a.jsx(_,{})})]})}export{Ie as default};
@@ -1,4 +1,4 @@
1
- import{j as Ol}from"./liveblocks-BCZSgQbG.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CGkVgbup.js";import{B as dt,eL as Tc,HV as Ac,Iz as kl,bQ as Rc,b$ as Tl,fh as Al,fi as Rl}from"./zeni-epic-state-Dp14ovRw.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Dl,n as Yt,o as ue,p as Cl}from"./utils-CTLGOmjC.js";import{r as un}from"./empty-CDZc49VR.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DznUmqID.js";import{r as Gl}from"./index-Y_8J-EV-.js";import{r as zl}from"./index-DEiuB93P.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-C_NeXleM.js";import{u as Kl,z as Pc,L as Wl,V as Jl,Q as Xl,h as Ql,c as tf}from"./index-TZBFPhBM.js";import"./mui-CgjVMn8C.js";import{d as Pe}from"./decodeURIComponentSafe-Drd7YS9D.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="a4c3f77b-4c8a-43d7-abd2-c1a8a3e187df",t._sentryDebugIdIdentifier="sentry-dbid-a4c3f77b-4c8a-43d7-abd2-c1a8a3e187df")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Dn,Cn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},De={exports:{}},Ce={};function Nc(){if(On)return Ce;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var c,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(u,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(y&&y.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),y&&f(u,y)})(g,h);var d,b=m(g);function g(u,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(u,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function l(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(c===void 0&&(c=ie()),c(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,u,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-u.length,y)===u}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(l(e,"type"));else{var b=function(g,u,y){return typeof y!="number"&&(y=0),!(y+u.length>g.length)&&g.indexOf(u,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(l(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];c===void 0&&(c=ie()),c(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),Ce.codes=n,Ce}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=c(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,c(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function c(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return l(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function l(k,E,j){return l=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},l.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",u="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
1
+ import{j as Ol}from"./liveblocks-BCZSgQbG.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CGkVgbup.js";import{B as dt,eL as Tc,HV as Ac,Iz as kl,bQ as Rc,b$ as Tl,fh as Al,fi as Rl}from"./zeni-epic-state-Dp14ovRw.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Dl,n as Yt,o as ue,p as Cl}from"./utils-CTLGOmjC.js";import{r as un}from"./empty-CDZc49VR.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DznUmqID.js";import{r as Gl}from"./index-Y_8J-EV-.js";import{r as zl}from"./index-DEiuB93P.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-C_NeXleM.js";import{u as Kl,z as Pc,L as Wl,V as Jl,Q as Xl,h as Ql,c as tf}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import{d as Pe}from"./decodeURIComponentSafe-Drd7YS9D.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="a4c3f77b-4c8a-43d7-abd2-c1a8a3e187df",t._sentryDebugIdIdentifier="sentry-dbid-a4c3f77b-4c8a-43d7-abd2-c1a8a3e187df")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Dn,Cn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},De={exports:{}},Ce={};function Nc(){if(On)return Ce;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var c,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(u,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(y&&y.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),y&&f(u,y)})(g,h);var d,b=m(g);function g(u,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(u,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function l(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(c===void 0&&(c=ie()),c(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,u,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-u.length,y)===u}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(l(e,"type"));else{var b=function(g,u,y){return typeof y!="number"&&(y=0),!(y+u.length>g.length)&&g.indexOf(u,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(l(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];c===void 0&&(c=ie()),c(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),Ce.codes=n,Ce}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=c(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,c(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function c(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return l(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function l(k,E,j){return l=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},l.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",u="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
2
2
  `),I=_(E).split(`
3
3
  `),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
4
4
 
@@ -1,4 +1,4 @@
1
- import{j as t}from"./liveblocks-BCZSgQbG.js";import{a as o}from"./sentry-CGkVgbup.js";import{g as f,j as F,h as H,u as W,k as N}from"./core-C_NeXleM.js";import{m as $,K as M,z as R,a$ as U,w as q,E as z,D as Y,q as G,c as l,e as J,a1 as K,b0 as Q}from"./index-TZBFPhBM.js";import{eW as X,eL as Z,L6 as I,L7 as ee,t3 as ae,sV as g,eY as re,bL as ne,s_ as se,L8 as te}from"./zeni-epic-state-Dp14ovRw.js";import{D as oe,e as ie,n as le,S as ce}from"./mui-CgjVMn8C.js";import{u as de}from"./useAskAiCfoHostNavButtonProps-BmhiW9nY.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-CJ1dU4ni.js";import{M as ue}from"./MobileAppDrawer-Czhowgsf.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="c52d9c23-fd86-4ba2-9395-a2201488f4c1",e._sentryDebugIdIdentifier="sentry-dbid-c52d9c23-fd86-4ba2-9395-a2201488f4c1")}catch{}})();const pe={overlayWidth:new q(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=$(),n=M();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>X(c));return t.jsx(oe,{anchor:"right",open:e,PaperProps:{style:{width:pe.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:t.jsx(ie,{in:e,direction:"left",children:t.jsx(ge,{onClick:c=>c.stopPropagation(),children:t.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(ce)`
1
+ import{j as t}from"./liveblocks-BCZSgQbG.js";import{a as o}from"./sentry-CGkVgbup.js";import{g as f,j as F,h as H,u as W,k as N}from"./core-C_NeXleM.js";import{m as $,K as M,z as R,a$ as U,w as q,E as z,D as Y,q as G,c as l,e as J,a1 as K,b0 as Q}from"./index-BaZ8-9eR.js";import{eW as X,eL as Z,L6 as I,L7 as ee,t3 as ae,sV as g,eY as re,bL as ne,s_ as se,L8 as te}from"./zeni-epic-state-Dp14ovRw.js";import{D as oe,e as ie,n as le,S as ce}from"./mui-CgjVMn8C.js";import{u as de}from"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import{M as ue}from"./MobileAppDrawer-CowqUthz.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="c52d9c23-fd86-4ba2-9395-a2201488f4c1",e._sentryDebugIdIdentifier="sentry-dbid-c52d9c23-fd86-4ba2-9395-a2201488f4c1")}catch{}})();const pe={overlayWidth:new q(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=$(),n=M();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>X(c));return t.jsx(oe,{anchor:"right",open:e,PaperProps:{style:{width:pe.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:t.jsx(ie,{in:e,direction:"left",children:t.jsx(ge,{onClick:c=>c.stopPropagation(),children:t.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(ce)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as t}from"./liveblocks-BCZSgQbG.js";import x from"./NotFoundScreen-D0cCxE_g.js";import{a as p}from"./sentry-CGkVgbup.js";import{j as I,u as C,h as A,g as u,N as E,k,n as D,o as c}from"./core-C_NeXleM.js";import{eL as B,M0 as S,Mg as b,C0 as T,B9 as V,B$ as m,BS as U,Mv as _}from"./zeni-epic-state-Dp14ovRw.js";import{m as $,z as M,B as N,a1 as O,bF as W,aa as z}from"./index-TZBFPhBM.js";import"./mui-CgjVMn8C.js";import{R as h}from"./ReimbursementApprovalRuleDetailScreen-Doqr5IfY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="24375af8-cd2e-4c45-8ed2-9f958a017331",e._sentryDebugIdIdentifier="sentry-dbid-24375af8-cd2e-4c45-8ed2-9f958a017331")}catch{}})();const d="reimbursement-approval-rule-update",F=k(function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:b(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(d)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(U(n))},onEditRuleClick:n=>{n!=null?(e(m(n)),a(`./${n}/edit`)):(e(m()),a("./new"))}}})(O(W)),L=()=>{const e=I(),r=C(),a=A(),[l,n]=p.useState(!1),[f,y]=p.useState(!1),v=u(s=>s.remiSetupApproverViewState.fetchState),o=u(s=>B(s)),w=$(),i=u(s=>S(s)),g=u(s=>b(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&a(T())},[g]),p.useEffect(()=>{l||v!=="Not-Started"||(n(!0),a(V(!0)))},[l,v,a]),M.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${d}`]:[],eventCallback:(s,P,R)=>{s.endsWith(d)&&R.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(c,{path:"/",element:t.jsx(L,{})}),t.jsx(c,{path:"/new",element:t.jsx(h,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(h,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
1
+ import{j as t}from"./liveblocks-BCZSgQbG.js";import x from"./NotFoundScreen-0ajohMSv.js";import{a as p}from"./sentry-CGkVgbup.js";import{j as I,u as C,h as A,g as u,N as E,k,n as D,o as c}from"./core-C_NeXleM.js";import{eL as B,M0 as S,Mg as b,C0 as T,B9 as V,B$ as m,BS as U,Mv as _}from"./zeni-epic-state-Dp14ovRw.js";import{m as $,z as M,B as N,a1 as O,bF as W,aa as z}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import{R as h}from"./ReimbursementApprovalRuleDetailScreen-Cg7X5Fv7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="24375af8-cd2e-4c45-8ed2-9f958a017331",e._sentryDebugIdIdentifier="sentry-dbid-24375af8-cd2e-4c45-8ed2-9f958a017331")}catch{}})();const d="reimbursement-approval-rule-update",F=k(function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:b(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(d)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(U(n))},onEditRuleClick:n=>{n!=null?(e(m(n)),a(`./${n}/edit`)):(e(m()),a("./new"))}}})(O(W)),L=()=>{const e=I(),r=C(),a=A(),[l,n]=p.useState(!1),[f,y]=p.useState(!1),v=u(s=>s.remiSetupApproverViewState.fetchState),o=u(s=>B(s)),w=$(),i=u(s=>S(s)),g=u(s=>b(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&a(T())},[g]),p.useEffect(()=>{l||v!=="Not-Started"||(n(!0),a(V(!0)))},[l,v,a]),M.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${d}`]:[],eventCallback:(s,P,R)=>{s.endsWith(d)&&R.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(c,{path:"/",element:t.jsx(L,{})}),t.jsx(c,{path:"/new",element:t.jsx(h,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(h,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
@@ -1 +1 @@
1
- import{j as g}from"./liveblocks-BCZSgQbG.js";import{a as y}from"./sentry-CGkVgbup.js";import{j as w,h as A,u as T,l as C,g as b,k as U}from"./core-C_NeXleM.js";import{Mg as R,M0 as E,BV as x,C2 as _,C0 as S,C1 as h,Mh as B}from"./zeni-epic-state-Dp14ovRw.js";import{z as k,m as V,B as j,bw as F,aa as O}from"./index-TZBFPhBM.js";import"./mui-CgjVMn8C.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="d7e38a42-cdbf-4584-9480-2aead72eba51",e._sentryDebugIdIdentifier="sentry-dbid-d7e38a42-cdbf-4584-9480-2aead72eba51")}catch{}})();function $(e){return B(e)==null}const M=U(function(e,a){const t=R(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=O(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const v=[];return p.forEach(c=>{const D=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=D.concat(I);v.push({action:c.stepType.selectedOption,actors:m,operator:m.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function H(){const e=w(),a=A(),t=T(),{approvalRuleId:s}=C(),n=k.getSignedInUser(),l=V(),r=b(p=>R(p)),i=b(p=>E(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(j,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{H as R,$ as i};
1
+ import{j as g}from"./liveblocks-BCZSgQbG.js";import{a as y}from"./sentry-CGkVgbup.js";import{j as w,h as A,u as T,l as C,g as b,k as U}from"./core-C_NeXleM.js";import{Mg as R,M0 as E,BV as x,C2 as _,C0 as S,C1 as h,Mh as B}from"./zeni-epic-state-Dp14ovRw.js";import{z as k,m as V,B as j,bw as F,aa as O}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="d7e38a42-cdbf-4584-9480-2aead72eba51",e._sentryDebugIdIdentifier="sentry-dbid-d7e38a42-cdbf-4584-9480-2aead72eba51")}catch{}})();function $(e){return B(e)==null}const M=U(function(e,a){const t=R(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=O(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const v=[];return p.forEach(c=>{const D=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=D.concat(I);v.push({action:c.stepType.selectedOption,actors:m,operator:m.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function H(){const e=w(),a=A(),t=T(),{approvalRuleId:s}=C(),n=k.getSignedInUser(),l=V(),r=b(p=>R(p)),i=b(p=>E(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(j,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{H as R,$ as i};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-BCZSgQbG.js";import{j as K,h as le,u as V,l as Y,g as w,N as O,k as J,i as ut,n as pt,o as B}from"./core-C_NeXleM.js";import{eL as W,Mw as me,b$ as ce,B4 as xe,jh as bt,Bh as ae,Bg as se,Mx as gt,bm as de,fF as Te,My as ht,IU as ft,j6 as De,IV as Se,IW as St,h$ as It,LO as yt,ie as Rt,AU as At,rO as vt,i6 as Ct,BE as je,Mz as Fe,MA as kt,MB as Et,MC as Bt,MD as wt,ME as xt,Bo as Ie,il as Tt,LX as Dt,Bi as jt,B2 as Ft,MF as Mt,B1 as Ut,MG as Lt,Ba as ye,Bs as Pt,Br as $t,Bn as Ot,MH as Me,Gf as _t,bn as Nt,Bd as zt,BW as Gt,MI as Ht,MJ as Zt,BA as Vt,Bx as Re,Lh as Wt,A$ as Kt,MK as Ue,Cj as Ae,Cr as Jt,ML as qt,MM as H,MN as Xt,MO as Le,MP as Qt,MQ as Pe,MR as $e,BM as ie,bs as Yt,bD as ue,cy as pe,eS as Oe,eQ as _e,MS as en,gw as tn,Lu as nn,MT as an,MU as Ne,Ly as sn,Mg as on,MV as rn,Mv as ln,Co as ve,Cn as mn,MW as cn,MX as dn,MY as un,MZ as pn,M_ as bn,M1 as gn,Ce as hn,Ci as fn,bu as Sn,bC as In,ct as yn,cN as Rn,br as An,HX as vn,cJ as Cn,cL as kn,cK as En,cs as Bn}from"./zeni-epic-state-Dp14ovRw.js";import{n as ze,K as Ge,Z as ee,i as v,z as P,bG as He,q as te,c as C,aC as Ce,o as M,ao as Q,y as wn,O as Ze,bH as xn,k as Z,D as Ve,bI as Tn,S as ne,bJ as Dn,E as jn,w as Fn,B as be,e as We,a1 as Mn,b7 as Un,M as Ln,m as Ke,bK as Pn,a4 as $n}from"./index-TZBFPhBM.js";import{n as _,S as On}from"./mui-CgjVMn8C.js";import oe from"./NotFoundScreen-D0cCxE_g.js";import{S as ke}from"./SetupPagesScreen-DeB97TrS.js";import{F as Je}from"./FeaturePreviewScreen-C9zUUTCh.js";import{a as g}from"./sentry-CGkVgbup.js";import{u as qe}from"./useInitialThreadRequest-DYY0nYQq.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-BmhiW9nY.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-CJ1dU4ni.js";import{D as _n}from"./DrawerScreen-CV5-68Vp.js";import{M as Ye}from"./MobileAppDrawer-Czhowgsf.js";import{R as Nn}from"./ReimbursementApprovalRoutes-BaUI0RrG.js";import{FallBackRoute as zn}from"./ScreenRoutes-CDdkS4QP.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";import"./analyticsHelper-DZ0CUT0b.js";import"./routePaths-fq-ods6n.js";import"./BusinessVerificationPageScreen-Db_j23ph.js";import"./ReimbursementApprovalRuleDetailScreen-Doqr5IfY.js";import"./getLocaleForTenant-C75hRciY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3ad5671d-69e0-422c-acaa-b9bc5148febe",e._sentryDebugIdIdentifier="sentry-dbid-3ad5671d-69e0-422c-acaa-b9bc5148febe")}catch{}})();const et=e=>`/${e}/reimbursements`,Gn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=Ze.getLocalizedStrings(),Hn=J(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=de(c),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=me(e,t.reimbursementId),p=ht(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,S=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,S=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:ce(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:S,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,p)=>{i!=null&&e(se(i,l,p,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ot(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(Pt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Lt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Ut(l,i,n))},updateReimbursementType:(i,l,p)=>{e(Mt({reimbursementId:p,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,p)=>{e(Ft({reimbursementId:p,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(jt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Dt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ae({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(kt());const i=et(o),l=Z(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Ct(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(At(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(xn);function Ee(){const e=K(),t=le(),n=V(),{reimbursementId:r}=Y(),c=ze(),d=Ge(),[m,o]=g.useState(r==null),[a,i]=g.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:I}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(v.isReimbursementCommentingEnabled),x=V().pathname,R=x.includes("edit"),D=x.includes("reimbursement/new"),[b,k]=g.useState(!1),y=P.getSignedInUser(),T=w(u=>W(u)),f=w(u=>me(u,r)),j=qe(T?.companyId,{clearParams:f.fetchState==="Completed"}),$=ce(T?.userRole??[]);g.useEffect(()=>{(D&&!b||R&&f.fetchState!="Completed"&&f.fetchState!="In-Progress")&&(k(!0),t(xe(!1,p,I,r)))});const A=w(u=>bt(u.accountState,u.accountListState,"reimbursementAccountList"));if(y==null)throw Error("Can't access address page without signing in...");const F={pathname:`../${r}`,search:n.search};return f.isDeleted===!0||f.billStage=="paid"||f.billStage=="scheduled"||f.fetchState=="Not-Started"||$&&f.billStatus==="rejected"||$===!1&&f.billStage==="pending_approval"&&f.billStatus!=="rejected"?s.jsx(O,{to:F}):f.deleteStatus.fetchState==="In-Progress"||f.fetchState!=="Completed"?s.jsx(He,{}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:C,onLoad:u=>(L=>{r!=null&&f.deleteStatus.fetchState!=="Completed"&&L.trackReimbursementEditReimbursement(r)})(u)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:M.sp3,paddingBottom:"15px",paddingLeft:M.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(Kn,{children:[s.jsx(Jn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:M.sp5,paddingRight:M.sp3,paddingBottom:M.sp5,paddingLeft:M.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:j??void 0,isReimbursementCommentingEnabled:S,location:n,navigate:e,currentTenant:T,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i})})]})}const Zn=_.div`
1
+ import{j as s}from"./liveblocks-BCZSgQbG.js";import{j as K,h as le,u as V,l as Y,g as w,N as O,k as J,i as ut,n as pt,o as B}from"./core-C_NeXleM.js";import{eL as W,Mw as me,b$ as ce,B4 as xe,jh as bt,Bh as ae,Bg as se,Mx as gt,bm as de,fF as Te,My as ht,IU as ft,j6 as De,IV as Se,IW as St,h$ as It,LO as yt,ie as Rt,AU as At,rO as vt,i6 as Ct,BE as je,Mz as Fe,MA as kt,MB as Et,MC as Bt,MD as wt,ME as xt,Bo as Ie,il as Tt,LX as Dt,Bi as jt,B2 as Ft,MF as Mt,B1 as Ut,MG as Lt,Ba as ye,Bs as Pt,Br as $t,Bn as Ot,MH as Me,Gf as _t,bn as Nt,Bd as zt,BW as Gt,MI as Ht,MJ as Zt,BA as Vt,Bx as Re,Lh as Wt,A$ as Kt,MK as Ue,Cj as Ae,Cr as Jt,ML as qt,MM as H,MN as Xt,MO as Le,MP as Qt,MQ as Pe,MR as $e,BM as ie,bs as Yt,bD as ue,cy as pe,eS as Oe,eQ as _e,MS as en,gw as tn,Lu as nn,MT as an,MU as Ne,Ly as sn,Mg as on,MV as rn,Mv as ln,Co as ve,Cn as mn,MW as cn,MX as dn,MY as un,MZ as pn,M_ as bn,M1 as gn,Ce as hn,Ci as fn,bu as Sn,bC as In,ct as yn,cN as Rn,br as An,HX as vn,cJ as Cn,cL as kn,cK as En,cs as Bn}from"./zeni-epic-state-Dp14ovRw.js";import{n as ze,K as Ge,Z as ee,i as v,z as P,bG as He,q as te,c as C,aC as Ce,o as M,ao as Q,y as wn,O as Ze,bH as xn,k as Z,D as Ve,bI as Tn,S as ne,bJ as Dn,E as jn,w as Fn,B as be,e as We,a1 as Mn,b7 as Un,M as Ln,m as Ke,bK as Pn,a4 as $n}from"./index-BaZ8-9eR.js";import{n as _,S as On}from"./mui-CgjVMn8C.js";import oe from"./NotFoundScreen-0ajohMSv.js";import{S as ke}from"./SetupPagesScreen-vY1ujDKJ.js";import{F as Je}from"./FeaturePreviewScreen-ArEP4se9.js";import{a as g}from"./sentry-CGkVgbup.js";import{u as qe}from"./useInitialThreadRequest-B7p2SBgg.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import{D as _n}from"./DrawerScreen-CN6TBpYY.js";import{M as Ye}from"./MobileAppDrawer-CowqUthz.js";import{R as Nn}from"./ReimbursementApprovalRoutes-ogcfMEcC.js";import{FallBackRoute as zn}from"./ScreenRoutes-DRzB_14n.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";import"./analyticsHelper-CSpNHX-t.js";import"./routePaths-CXa3WNDm.js";import"./BusinessVerificationPageScreen-D_IL11BU.js";import"./ReimbursementApprovalRuleDetailScreen-Cg7X5Fv7.js";import"./getLocaleForTenant-Ab1B3PjW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3ad5671d-69e0-422c-acaa-b9bc5148febe",e._sentryDebugIdIdentifier="sentry-dbid-3ad5671d-69e0-422c-acaa-b9bc5148febe")}catch{}})();const et=e=>`/${e}/reimbursements`,Gn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=Ze.getLocalizedStrings(),Hn=J(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=de(c),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=me(e,t.reimbursementId),p=ht(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,S=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,S=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:ce(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:S,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,p)=>{i!=null&&e(se(i,l,p,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ot(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(Pt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Lt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Ut(l,i,n))},updateReimbursementType:(i,l,p)=>{e(Mt({reimbursementId:p,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,p)=>{e(Ft({reimbursementId:p,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(jt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Dt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ae({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(kt());const i=et(o),l=Z(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Ct(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(At(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(xn);function Ee(){const e=K(),t=le(),n=V(),{reimbursementId:r}=Y(),c=ze(),d=Ge(),[m,o]=g.useState(r==null),[a,i]=g.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:I}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(v.isReimbursementCommentingEnabled),x=V().pathname,R=x.includes("edit"),D=x.includes("reimbursement/new"),[b,k]=g.useState(!1),y=P.getSignedInUser(),T=w(u=>W(u)),f=w(u=>me(u,r)),j=qe(T?.companyId,{clearParams:f.fetchState==="Completed"}),$=ce(T?.userRole??[]);g.useEffect(()=>{(D&&!b||R&&f.fetchState!="Completed"&&f.fetchState!="In-Progress")&&(k(!0),t(xe(!1,p,I,r)))});const A=w(u=>bt(u.accountState,u.accountListState,"reimbursementAccountList"));if(y==null)throw Error("Can't access address page without signing in...");const F={pathname:`../${r}`,search:n.search};return f.isDeleted===!0||f.billStage=="paid"||f.billStage=="scheduled"||f.fetchState=="Not-Started"||$&&f.billStatus==="rejected"||$===!1&&f.billStage==="pending_approval"&&f.billStatus!=="rejected"?s.jsx(O,{to:F}):f.deleteStatus.fetchState==="In-Progress"||f.fetchState!=="Completed"?s.jsx(He,{}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:C,onLoad:u=>(L=>{r!=null&&f.deleteStatus.fetchState!=="Completed"&&L.trackReimbursementEditReimbursement(r)})(u)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:M.sp3,paddingBottom:"15px",paddingLeft:M.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(Kn,{children:[s.jsx(Jn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:M.sp5,paddingRight:M.sp3,paddingBottom:M.sp5,paddingLeft:M.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:j??void 0,isReimbursementCommentingEnabled:S,location:n,navigate:e,currentTenant:T,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i})})]})}const Zn=_.div`
2
2
  display: flex;
3
3
  position: relative;
4
4
  height: 100vh;
@@ -1 +1 @@
1
- import{j as d}from"./liveblocks-BCZSgQbG.js";import{u as V,j as me,h as fe,l as ue,g as f,k as _e,n as he,o as z}from"./core-C_NeXleM.js";import{eL as M,f7 as g,Ii as be,pp as F,iW as Ie,hY as ye,pu as Ce,bu as ge,Ij as Se,j6 as we,bm as Te,tI as Re,Ik as Fe,Il as Oe,sG as ke,Im as G,In as De,Io as Ae,Ip as T,Iq as O,Ir as k,Is as D,It as A,dF as Ee,to as Le,tc as Y,td as H,tu as Me,th as N,tA as Be,Iu as Pe,Iv as ve,Iw as xe,Ix as Ue,Iy as je,eS as Ve,eQ as ze}from"./zeni-epic-state-Dp14ovRw.js";import{C as Ge,D as Ye,K as He,Z as Q,i as E,z as Z,E as Ne,S as qe,a as $e,q as Qe,c as L,e as Ze,k as J,G as Je,J as Ke,M as We}from"./index-TZBFPhBM.js";import"./mui-CgjVMn8C.js";import Xe from"./NotFoundScreen-D0cCxE_g.js";import{F as ea}from"./FeaturePreviewScreen-C9zUUTCh.js";import{a as _}from"./sentry-CGkVgbup.js";import{u as aa,a as sa,b as ta,c as oa}from"./useFetchSuggestedQuestionsWhenReady-CJ1dU4ni.js";import{u as na}from"./useInitialThreadRequest-DYY0nYQq.js";import{t as q,a as $}from"./routePaths-fq-ods6n.js";import{M as ra}from"./MobileAppDrawer-Czhowgsf.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5dd88472-2c24-46b2-ab0d-8d94b0448c22",e._sentryDebugIdIdentifier="sentry-dbid-5dd88472-2c24-46b2-ab0d-8d94b0448c22")}catch{}})();const ia=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(A({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(O({resetLeftScroll:!0}))},la=e=>{e(ve()),e(xe()),e(Ue()),e(je())},ca=_e(function(e){const o=Z.getSignedInUser(),p=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:p??""},t=g(e),r=Se(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:L,isZeniUser:Te(o),showAccountGroups:r===!0,isAccountingClassesEnabled:we(e),currentTenantCompanyName:a,statementEndPoint:`${We}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:p,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Pe(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Be(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(Y(o.firstMonthOfFY,r,l.numberOfPeriods<4?4:l.numberOfPeriods,i)),m.length>0&&e(H(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<4?4:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(T(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(N({numberOfPeriods:4,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(G({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(N(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(Me(o.firstMonthOfFY,a,s<4?4:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(Y(o.firstMonthOfFY,a,t<4?4:t,s)),s.length>0&&e(H(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<4?4:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Le({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<4?4:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ee(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return $(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?$(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=J(o.location.state?.pathnameStackToGoBack,o.location.pathname);p(l,{state:{pathnameStackToGoBack:i,referrer:R(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(A({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(O({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(O({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{p("../../")},onUpdateAccountViewMode:a=>{e(Ae({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",R(o.selectedReportID)),e(T("profit_and_loss_by_classes"))):(o.analytics?.trackGroupBySwitch("Accounts",R(o.selectedReportID)),e(T("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(De({classesToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{e(ke())},onUpdateDisplayOrder:a=>{e(Oe(a))},onUpdateReportFormat:a=>{la(e),e(Fe(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(Re("profit_and_loss_by_classes"))}}})(Je);function da(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ye(),p=He(),u=Ke(p),a=me(),s=fe(),t=V(),{tenantEmailDomain:r}=ue(),{useFeatureGate:c}=Q(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=Z.getSignedInUser(),[i,y]=_.useState(!1),[B,K]=_.useState(!1),{isFeatureEnabled:P}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=f(n=>M(n)),W=v.company?.companyInfo.firstMonthOfFY??1,X=na(P?v?.companyId:void 0),C=f(n=>g(n).fetchState),ee=f(n=>be(n)),{areTenantIdsInSync:h}=Ne(),S=f(n=>n.financeStatementState.selectedReportId),ae=f(n=>g(n).isCompareModeOn),b=f(n=>g(n).filter),w=f(n=>g(n).selectedReportAndTimeframeFetchState),se=f(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(y(!0),s(F(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!B&&C==="Completed"&&h&&(s(F(l.userId,!1,!0,!1)),K(!0))},[i,B,C,h]),_.useEffect(()=>{if(i&&w.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(S){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ce(b.timeframe));break;case"balance_sheet":s(ye(b.timeframe));break;case"cash_flow":s(Ie(b.timeframe))}},[i,S,w,h]);const x=qe(),te=x?.loggedInUserRole!=null&&ge(x?.loggedInUserRole)!==!0,[oe,ne]=_.useState(!1),U=n=>{ne(n)},re=$e(),ie=ta();return function(n){const{isDataReady:le}=n,{pathname:ce}=V(),j=Ge(ce??"")==="reports",de=aa(le),pe=_.useMemo(()=>j?ia:void 0,[j]);sa({canFetchSuggestedQuestions:de,pageContexts:pe})}({isDataReady:C==="Completed"}),oa({isDataReady:C==="Completed"}),d.jsxs(d.Fragment,{children:[C==="Completed"?d.jsx(Qe,{analytics:L,onLoad:n=>n.trackPageLoaded(Ze.Event.reports)}):null,d.jsx(ra,{isAppContentDrawerOpen:oe,handleDrawerToggle:U}),d.jsx(ca,{firstMonthOfFY:W,tenantEmailDomain:r,location:t,navigate:a,windowSize:p,classViewLayout:se,selectedReportID:S,analytics:L,filter:b,isCompareModeOn:ae,hasTransactionAccess:te,signedInUser:l,selectedReportAndTimeframeFetchState:w,handleDrawerToggle:U,reportsResyncFetchState:ee.reportsResyncFetchState,isAiCfoAccessEnabled:ie&&re&&!e,onAskAiCfoClick:()=>{if(u){const n=J(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:P,initialOpenThreadRequest:X})]})}const R=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function La(){const e=f(s=>M(s)),{useFeatureGate:o}=Q(),{isFeatureEnabled:p}=o(E.isDebitCardFeatureEnabled),u=Ve(p,e),a=ze(e);return u===!0||a===!0?d.jsx(ea,{}):d.jsxs(he,{children:[d.jsx(z,{path:"/",element:d.jsx(da,{})}),d.jsx(z,{path:"*",element:d.jsx(Xe,{})})]})}export{La as default};
1
+ import{j as d}from"./liveblocks-BCZSgQbG.js";import{u as V,j as me,h as fe,l as ue,g as f,k as _e,n as he,o as z}from"./core-C_NeXleM.js";import{eL as M,f7 as g,Ii as be,pp as F,iW as Ie,hY as ye,pu as Ce,bu as ge,Ij as Se,j6 as we,bm as Te,tI as Re,Ik as Fe,Il as Oe,sG as ke,Im as G,In as De,Io as Ae,Ip as T,Iq as O,Ir as k,Is as D,It as A,dF as Ee,to as Le,tc as Y,td as H,tu as Me,th as N,tA as Be,Iu as Pe,Iv as ve,Iw as xe,Ix as Ue,Iy as je,eS as Ve,eQ as ze}from"./zeni-epic-state-Dp14ovRw.js";import{C as Ge,D as Ye,K as He,Z as Q,i as E,z as Z,E as Ne,S as qe,a as $e,q as Qe,c as L,e as Ze,k as J,G as Je,J as Ke,M as We}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import Xe from"./NotFoundScreen-0ajohMSv.js";import{F as ea}from"./FeaturePreviewScreen-ArEP4se9.js";import{a as _}from"./sentry-CGkVgbup.js";import{u as aa,a as sa,b as ta,c as oa}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import{u as na}from"./useInitialThreadRequest-B7p2SBgg.js";import{t as q,a as $}from"./routePaths-CXa3WNDm.js";import{M as ra}from"./MobileAppDrawer-CowqUthz.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5dd88472-2c24-46b2-ab0d-8d94b0448c22",e._sentryDebugIdIdentifier="sentry-dbid-5dd88472-2c24-46b2-ab0d-8d94b0448c22")}catch{}})();const ia=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(A({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(O({resetLeftScroll:!0}))},la=e=>{e(ve()),e(xe()),e(Ue()),e(je())},ca=_e(function(e){const o=Z.getSignedInUser(),p=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:p??""},t=g(e),r=Se(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:L,isZeniUser:Te(o),showAccountGroups:r===!0,isAccountingClassesEnabled:we(e),currentTenantCompanyName:a,statementEndPoint:`${We}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:p,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Pe(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Be(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(Y(o.firstMonthOfFY,r,l.numberOfPeriods<4?4:l.numberOfPeriods,i)),m.length>0&&e(H(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<4?4:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(T(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(N({numberOfPeriods:4,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(G({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(N(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(Me(o.firstMonthOfFY,a,s<4?4:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(Y(o.firstMonthOfFY,a,t<4?4:t,s)),s.length>0&&e(H(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<4?4:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Le({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<4?4:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ee(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return $(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?$(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=J(o.location.state?.pathnameStackToGoBack,o.location.pathname);p(l,{state:{pathnameStackToGoBack:i,referrer:R(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(A({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(O({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(O({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{p("../../")},onUpdateAccountViewMode:a=>{e(Ae({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",R(o.selectedReportID)),e(T("profit_and_loss_by_classes"))):(o.analytics?.trackGroupBySwitch("Accounts",R(o.selectedReportID)),e(T("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(De({classesToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{e(ke())},onUpdateDisplayOrder:a=>{e(Oe(a))},onUpdateReportFormat:a=>{la(e),e(Fe(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(Re("profit_and_loss_by_classes"))}}})(Je);function da(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ye(),p=He(),u=Ke(p),a=me(),s=fe(),t=V(),{tenantEmailDomain:r}=ue(),{useFeatureGate:c}=Q(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=Z.getSignedInUser(),[i,y]=_.useState(!1),[B,K]=_.useState(!1),{isFeatureEnabled:P}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=f(n=>M(n)),W=v.company?.companyInfo.firstMonthOfFY??1,X=na(P?v?.companyId:void 0),C=f(n=>g(n).fetchState),ee=f(n=>be(n)),{areTenantIdsInSync:h}=Ne(),S=f(n=>n.financeStatementState.selectedReportId),ae=f(n=>g(n).isCompareModeOn),b=f(n=>g(n).filter),w=f(n=>g(n).selectedReportAndTimeframeFetchState),se=f(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(y(!0),s(F(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!B&&C==="Completed"&&h&&(s(F(l.userId,!1,!0,!1)),K(!0))},[i,B,C,h]),_.useEffect(()=>{if(i&&w.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(S){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ce(b.timeframe));break;case"balance_sheet":s(ye(b.timeframe));break;case"cash_flow":s(Ie(b.timeframe))}},[i,S,w,h]);const x=qe(),te=x?.loggedInUserRole!=null&&ge(x?.loggedInUserRole)!==!0,[oe,ne]=_.useState(!1),U=n=>{ne(n)},re=$e(),ie=ta();return function(n){const{isDataReady:le}=n,{pathname:ce}=V(),j=Ge(ce??"")==="reports",de=aa(le),pe=_.useMemo(()=>j?ia:void 0,[j]);sa({canFetchSuggestedQuestions:de,pageContexts:pe})}({isDataReady:C==="Completed"}),oa({isDataReady:C==="Completed"}),d.jsxs(d.Fragment,{children:[C==="Completed"?d.jsx(Qe,{analytics:L,onLoad:n=>n.trackPageLoaded(Ze.Event.reports)}):null,d.jsx(ra,{isAppContentDrawerOpen:oe,handleDrawerToggle:U}),d.jsx(ca,{firstMonthOfFY:W,tenantEmailDomain:r,location:t,navigate:a,windowSize:p,classViewLayout:se,selectedReportID:S,analytics:L,filter:b,isCompareModeOn:ae,hasTransactionAccess:te,signedInUser:l,selectedReportAndTimeframeFetchState:w,handleDrawerToggle:U,reportsResyncFetchState:ee.reportsResyncFetchState,isAiCfoAccessEnabled:ie&&re&&!e,onAskAiCfoClick:()=>{if(u){const n=J(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:P,initialOpenThreadRequest:X})]})}const R=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function La(){const e=f(s=>M(s)),{useFeatureGate:o}=Q(),{isFeatureEnabled:p}=o(E.isDebitCardFeatureEnabled),u=Ve(p,e),a=ze(e);return u===!0||a===!0?d.jsx(ea,{}):d.jsxs(he,{children:[d.jsx(z,{path:"/",element:d.jsx(da,{})}),d.jsx(z,{path:"*",element:d.jsx(Xe,{})})]})}export{La as default};
@@ -1 +1 @@
1
- import{j as a}from"./liveblocks-BCZSgQbG.js";import{Z as j,z as w,aI as h,q as E,c as p,e as F,cy as L,i as P}from"./index-TZBFPhBM.js";import"./mui-CgjVMn8C.js";import l from"./NotFoundScreen-D0cCxE_g.js";import{a as u}from"./sentry-CGkVgbup.js";import{h as R,g as y,j as T,u as V,k as O,n as U,o as f}from"./core-C_NeXleM.js";import{eL as z,OR as C,LH as A,OS as k,t3 as Y,eY as q,OT as G,t1 as H}from"./zeni-epic-state-Dp14ovRw.js";import{R as x}from"./ReferralListScreen-DRhEWofN.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";import"./useAskAiCfoHostNavButtonProps-BmhiW9nY.js";import"./useFetchSuggestedQuestionsWhenReady-CJ1dU4ni.js";import"./MobileAppDrawer-Czhowgsf.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="72ab78b5-1bbb-4e8c-9e9c-c1787afb42bf",e._sentryDebugIdIdentifier="sentry-dbid-72ab78b5-1bbb-4e8c-9e9c-c1787afb42bf")}catch{}})();const Z=O(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{e(k()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(H())},onUpdateInviteFormLocalData:s=>{e(G({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(L),B=()=>{const e=R(),[t,n]=u.useState(!1),[o,s]=u.useState(!1),r=y(i=>z(i)),c=T(),S=V(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=y(i=>C(i)),_=d?.firstName!=null?d.firstName:"User",{configValue:b}=g(h.zeniCardsConfig),{configValue:v}=g(h.zeniAccountsConfig),D=A(v);u.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&o===!1&&(e(Y()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(q(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:i=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(Z,{navigate:c,location:S,currentTenant:r,companyName:I,userName:_,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:b.charge_card_cashback_rate_per_transaction!=null?b.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(P.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(f,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(f,{path:"*",element:a.jsx(l,{})})]})}export{de as default};
1
+ import{j as a}from"./liveblocks-BCZSgQbG.js";import{Z as j,z as w,aI as h,q as E,c as p,e as F,cy as L,i as P}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import l from"./NotFoundScreen-0ajohMSv.js";import{a as u}from"./sentry-CGkVgbup.js";import{h as R,g as y,j as T,u as V,k as O,n as U,o as f}from"./core-C_NeXleM.js";import{eL as z,OR as C,LH as A,OS as k,t3 as Y,eY as q,OT as G,t1 as H}from"./zeni-epic-state-Dp14ovRw.js";import{R as x}from"./ReferralListScreen-BAK4p9-3.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";import"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import"./MobileAppDrawer-CowqUthz.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="72ab78b5-1bbb-4e8c-9e9c-c1787afb42bf",e._sentryDebugIdIdentifier="sentry-dbid-72ab78b5-1bbb-4e8c-9e9c-c1787afb42bf")}catch{}})();const Z=O(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{e(k()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(H())},onUpdateInviteFormLocalData:s=>{e(G({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(L),B=()=>{const e=R(),[t,n]=u.useState(!1),[o,s]=u.useState(!1),r=y(i=>z(i)),c=T(),S=V(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=y(i=>C(i)),_=d?.firstName!=null?d.firstName:"User",{configValue:b}=g(h.zeniCardsConfig),{configValue:v}=g(h.zeniAccountsConfig),D=A(v);u.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&o===!1&&(e(Y()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(q(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:i=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(Z,{navigate:c,location:S,currentTenant:r,companyName:I,userName:_,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:b.charge_card_cashback_rate_per_transaction!=null?b.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(P.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(f,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(f,{path:"*",element:a.jsx(l,{})})]})}export{de as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-6WcO8n0u.js","assets/sentry-CGkVgbup.js","assets/core-C_NeXleM.js","assets/zeni-epic-state-Dp14ovRw.js","assets/index-TZBFPhBM.js","assets/mui-CgjVMn8C.js","assets/analytics-BkhHPaQ4.js","assets/utils-CTLGOmjC.js","assets/withTransactionSidePanel-CsJoitfl.js","assets/useAskAiCfoHostNavButtonProps-BmhiW9nY.js","assets/useFetchSuggestedQuestionsWhenReady-CJ1dU4ni.js","assets/TransactionDetailScreen-Bh4hnUTb.js","assets/decodeURIComponentSafe-Drd7YS9D.js","assets/routePaths-fq-ods6n.js","assets/NotFoundScreen-D0cCxE_g.js","assets/analyticsHelper-DZ0CUT0b.js","assets/CompanyPassportScreen-C20zLwxY.js","assets/MobileAppDrawer-Czhowgsf.js","assets/FeaturePreviewScreen-C9zUUTCh.js","assets/ReferralListScreen-DRhEWofN.js","assets/index-D-vub4_t.css","assets/BillPayRoutes-DvR3hqif.js","assets/AddressScreen-wF2P11Cc.js","assets/DomesticWireDetailScreen-C51IXDOd.js","assets/useInitialThreadRequest-DYY0nYQq.js","assets/DrawerScreen-CV5-68Vp.js","assets/SetupPagesScreen-DeB97TrS.js","assets/BusinessVerificationPageScreen-Db_j23ph.js","assets/BillPayApprovalRoutes-Bm6O9E1C.js","assets/ReimbursementApprovalRuleDetailScreen-Doqr5IfY.js","assets/getLocaleForTenant-C75hRciY.js","assets/ReimbursementRoutes-B52nhenO.js","assets/ReimbursementApprovalRoutes-BaUI0RrG.js","assets/TransactionListRoutes-DLq7cUVK.js","assets/ZeniAccountStatementScreen-Da1Wlwqe.js","assets/SettingsRoutes-CbTsbTLb.js","assets/accountMappingHelper-CEUIWp7O.js","assets/ReportsRoutes-CNqyQ8jz.js","assets/ChargeCardRoutes-B2KJAodB.js","assets/PeopleRoutes-nhSxQuOd.js","assets/ExpenseAutomationRoutes-BCVBp8qi.js","assets/TreasuryRoutes-u5hb_BqK.js","assets/VendorsRoutes-DG-CUygJ.js","assets/pathToGoBack-BDpRzqvH.js","assets/ZeniAccountRoutes-CN91LxEE.js","assets/AddressRoutes-BQP-CfGZ.js","assets/PandLWithForecastRoutes-LRtjQJx_.js","assets/CustomerOnboardingRoutes-CnVH8vUK.js","assets/QBOConnectionScreen-ChkHB_5w.js","assets/empty-CDZc49VR.js","assets/index-Y_8J-EV-.js","assets/url-ax2xfQkc.js","assets/index-DEiuB93P.js","assets/TransactionDetailRoutes-CdhRrWAk.js","assets/EntityDetailRoutes-CWP-yEzD.js","assets/NotificationRoutes-C37yYJm9.js","assets/PerformanceRoutes-BU2_koAY.js","assets/RewardsRoutes-CqIupqR0.js","assets/TaskRoutes-BMFJJPYD.js","assets/TaskListScreen-b7SlqOLh.js","assets/AiCfoScreen-CILB5bBS.js"])))=>i.map(i=>d[i]);
2
- import{_ as a,bm as os,eL as ls,eS as cs,eQ as ds,eR as ms,fC as us,eN as _s,cM as Ae,ct as As,f8 as Es,cl as ps,bB as Is,bp as gs,fd as xs,v as Ts,HW as hs,bu as js,HX as Us,bD as Hs,fa as Rs,bC as bs,br as Ds,cN as ys,HY as Cs,HZ as fs,cJ as vs,cL as Os,cK as Ps,cs as Fs,cy as Ls,m1 as Ee,eM as pe,H_ as Bs,fh as Ie,fH as ge,fI as xe,fi as ks}from"./zeni-epic-state-Dp14ovRw.js";import{j as e}from"./liveblocks-BCZSgQbG.js";import{a as v}from"./sentry-CGkVgbup.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-C_NeXleM.js";import{m as ws,u as zs,z as R,Z as Gs,a as $s,W as Ws,i as L,S as Ys,L as B,O as he,t as _,P as qs,c as X,l}from"./index-TZBFPhBM.js";import"./mui-CgjVMn8C.js";import{f as je}from"./analyticsHelper-DZ0CUT0b.js";import{t as Js}from"./getLocaleForTenant-C75hRciY.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="455040bc-d065-45dd-8dac-a922d8e213da",i._sentryDebugIdIdentifier="sentry-dbid-455040bc-d065-45dd-8dac-a922d8e213da")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-6WcO8n0u.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>a(()=>import("./BillPayRoutes-DvR3hqif.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-B52nhenO.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20])),transactions:()=>a(()=>import("./TransactionListRoutes-DLq7cUVK.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>a(()=>import("./SettingsRoutes-CbTsbTLb.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,28,29,32,20])),reports:()=>a(()=>import("./ReportsRoutes-CNqyQ8jz.js"),__vite__mapDeps([37,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-B2KJAodB.js"),__vite__mapDeps([38,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>a(()=>import("./PeopleRoutes-nhSxQuOd.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-BCVBp8qi.js"),__vite__mapDeps([40,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>a(()=>import("./TreasuryRoutes-u5hb_BqK.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>a(()=>import("./VendorsRoutes-DG-CUygJ.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,22,14,18,13,43,9,10,17,25,36,20])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-CN91LxEE.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>a(()=>import("./ReportsRoutes-CNqyQ8jz.js"),__vite__mapDeps([37,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),ea=l(()=>a(()=>import("./AddressRoutes-BQP-CfGZ.js"),__vite__mapDeps([45,1,2,3,22,4,5,6,7,14,20]))),sa=l(()=>a(()=>import("./PeopleRoutes-nhSxQuOd.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,14,9,10,17,20]))),aa=l(()=>a(()=>import("./PandLWithForecastRoutes-LRtjQJx_.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),na=l(()=>a(()=>import("./CustomerOnboardingRoutes-CnVH8vUK.js"),__vite__mapDeps([47,1,2,3,22,4,5,6,7,14,48,49,50,51,52,12,20]))),ta=l(()=>a(()=>import("./VendorsRoutes-DG-CUygJ.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,22,14,18,13,43,9,10,17,25,36,20]))),ia=l(()=>a(()=>import("./TransactionDetailRoutes-CdhRrWAk.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>a(()=>import("./EntityDetailRoutes-CWP-yEzD.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),ra=l(()=>a(()=>import("./DashboardRoutes-6WcO8n0u.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>a(()=>import("./BillPayRoutes-DvR3hqif.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),oa=l(()=>a(()=>import("./SettingsRoutes-CbTsbTLb.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,28,29,32,20]))),Re=l(()=>a(()=>import("./ReimbursementRoutes-B52nhenO.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20]))),la=l(()=>a(()=>import("./ZeniAccountRoutes-CN91LxEE.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),ca=l(()=>a(()=>import("./TreasuryRoutes-u5hb_BqK.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),da=l(()=>a(()=>import("./TransactionListRoutes-DLq7cUVK.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),ma=l(()=>a(()=>import("./ChargeCardRoutes-B2KJAodB.js"),__vite__mapDeps([38,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),ua=l(()=>a(()=>import("./NotificationRoutes-C37yYJm9.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),_a=l(()=>a(()=>import("./PerformanceRoutes-BU2_koAY.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),Aa=l(()=>a(()=>import("./ExpenseAutomationRoutes-BCVBp8qi.js"),__vite__mapDeps([40,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),Ea=l(()=>a(()=>import("./RewardsRoutes-CqIupqR0.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),pa=l(()=>a(()=>import("./TaskRoutes-BMFJJPYD.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Ia=l(()=>a(()=>import("./AiCfoScreen-CILB5bBS.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,43,20]))),y=l(()=>a(()=>import("./NotFoundScreen-D0cCxE_g.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),ga=l(()=>a(()=>import("./TaskListScreen-b7SlqOLh.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function Za({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:C,clearAllLoading:O,clearLoading:Z}=zs(),D=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,De]=v.useState(!1),r=z(n=>ls(n)),{useFeatureGate:P}=Gs(),K=$s(),ye=Ws(),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabledV2),ve=fe||Ce&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(n=>n.tenantState.fetchState),E=z(n=>n.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),W=z(n=>us(n));if(o!=null){const n=R.getSignedInUserTenant(o);h!=null&&n!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ae=_s(),A=Ys(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ne=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(n=>w.tenantId!=null?Es(n,w.tenantId):void 0);v.useEffect(()=>{C(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&D!=null){const n=Q.params.selectedPeriod;if(n!=null){const H=n.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,D]),v.useEffect(()=>{N||(De(!0),C(B.TENANT_FETCHING)),ne.current?ne.current=!1:!Ts(ae,w)&&R.isSignedIn()&&(C(B.TENANT_FETCHING),function(n,H,d,s){if(pe(H?.userId,H?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=R.getSignedInUserTenantWithId(n.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ae,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(C(B.TENANT_FETCHING),function(n,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(Y&&ts){k(Ie(s));const q=R.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else Y&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),Y&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(Y){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(H==="Completed"||H==="Error");n==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,D,h,C,U))},[D,E]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&W.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(W.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,W.tenantsBaseInOrder))},[W,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&C(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):E==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(n=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[E,N]);const f=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!f,oe=Be&&!f,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!f,de=ce&&Hs(A?.loggedInUserRoleMap),me=Oe&&!f,We=r.company!=null&&Rs(r.company),Ye=Pe&&We===!0&&!f,qe=re&&bs(A?.loggedInUserRoleMap),Je=oe&&Ds(A?.loggedInUserRoleMap),Ke=me&&ys(A?.loggedInUserRoleMap),Qe=Cs(A?.loggedInUserRoleMap),Xe=fs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=Ye&&I,as=oe&&g,ns=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xa,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(ra,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ns||F?e.jsx(sa,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(aa,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(na,{})}),e.jsx(t,{path:"transaction/*",element:F&&f===!1||we||ze?e.jsx(ia,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&f===!1?e.jsx(da,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&f===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&f===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(ga,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(pa,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(ea,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(la,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(ca,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(_a,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&f===!1?e.jsx(Aa,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(ua,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(ta,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(oa,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:as?e.jsx(ma,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(Ea,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(Ia,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const xa=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:C,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):C?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),b=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:C,tenantEmailDomain:O})=>C===!0||i?e.jsx(Ua,{tenantEmailDomain:O}):S?e.jsx(ja,{tenantEmailDomain:O}):U?e.jsx(Ha,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(Ta,{tenantEmailDomain:O}):e.jsx(y,{}),Ta=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),be=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{b as FallBackRoute,Za as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-LUXfYRYr.js","assets/sentry-CGkVgbup.js","assets/core-C_NeXleM.js","assets/zeni-epic-state-Dp14ovRw.js","assets/index-BaZ8-9eR.js","assets/mui-CgjVMn8C.js","assets/analytics-BkhHPaQ4.js","assets/utils-CTLGOmjC.js","assets/withTransactionSidePanel-CB8Jp1hw.js","assets/useAskAiCfoHostNavButtonProps-Crpk73sU.js","assets/useFetchSuggestedQuestionsWhenReady-sxquM27W.js","assets/TransactionDetailScreen-DXlYmq7Y.js","assets/decodeURIComponentSafe-Drd7YS9D.js","assets/routePaths-CXa3WNDm.js","assets/NotFoundScreen-0ajohMSv.js","assets/analyticsHelper-CSpNHX-t.js","assets/CompanyPassportScreen-0tGZqhHr.js","assets/MobileAppDrawer-CowqUthz.js","assets/FeaturePreviewScreen-ArEP4se9.js","assets/ReferralListScreen-BAK4p9-3.js","assets/index-D-vub4_t.css","assets/BillPayRoutes-B7eECbMR.js","assets/AddressScreen-DG9DlRXT.js","assets/DomesticWireDetailScreen-Byk3gNE9.js","assets/useInitialThreadRequest-B7p2SBgg.js","assets/DrawerScreen-CN6TBpYY.js","assets/SetupPagesScreen-vY1ujDKJ.js","assets/BusinessVerificationPageScreen-D_IL11BU.js","assets/BillPayApprovalRoutes-7ZgXY6Qr.js","assets/ReimbursementApprovalRuleDetailScreen-Cg7X5Fv7.js","assets/getLocaleForTenant-Ab1B3PjW.js","assets/ReimbursementRoutes-0m6W0X2g.js","assets/ReimbursementApprovalRoutes-ogcfMEcC.js","assets/TransactionListRoutes-FH_uc507.js","assets/ZeniAccountStatementScreen-BOfH7mnf.js","assets/SettingsRoutes-BGCZcWYL.js","assets/accountMappingHelper-CEUIWp7O.js","assets/ReportsRoutes-1TXSN037.js","assets/ChargeCardRoutes-MbQ6GwxR.js","assets/PeopleRoutes-BswRWZQg.js","assets/ExpenseAutomationRoutes-DzZ2kzOA.js","assets/TreasuryRoutes-CtBzkTMx.js","assets/VendorsRoutes-aBYOoTKe.js","assets/pathToGoBack-BDpRzqvH.js","assets/ZeniAccountRoutes-BcBOPI_A.js","assets/AddressRoutes-Ccdt31hR.js","assets/PandLWithForecastRoutes-DdGQfKKW.js","assets/CustomerOnboardingRoutes-DEmyPEG9.js","assets/QBOConnectionScreen-C_qIc23z.js","assets/empty-CDZc49VR.js","assets/index-Y_8J-EV-.js","assets/url-ax2xfQkc.js","assets/index-DEiuB93P.js","assets/TransactionDetailRoutes-CWNaQpCz.js","assets/EntityDetailRoutes-BVmRwPcm.js","assets/NotificationRoutes-DzMqKa9n.js","assets/PerformanceRoutes-ChMRcywH.js","assets/RewardsRoutes-B8FReE5j.js","assets/TaskRoutes-9joFCtVs.js","assets/TaskListScreen-CaGy-z1x.js","assets/AiCfoScreen-BySJdfdn.js"])))=>i.map(i=>d[i]);
2
+ import{_ as a,bm as os,eL as ls,eS as cs,eQ as ds,eR as ms,fC as us,eN as _s,cM as Ae,ct as As,f8 as Es,cl as ps,bB as Is,bp as gs,fd as xs,v as Ts,HW as hs,bu as js,HX as Us,bD as Hs,fa as Rs,bC as bs,br as Ds,cN as ys,HY as Cs,HZ as fs,cJ as vs,cL as Os,cK as Ps,cs as Fs,cy as Ls,m1 as Ee,eM as pe,H_ as Bs,fh as Ie,fH as ge,fI as xe,fi as ks}from"./zeni-epic-state-Dp14ovRw.js";import{j as e}from"./liveblocks-BCZSgQbG.js";import{a as v}from"./sentry-CGkVgbup.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-C_NeXleM.js";import{m as ws,u as zs,z as R,Z as Gs,a as $s,W as Ws,i as L,S as Ys,L as B,O as he,t as _,P as qs,c as X,l}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import{f as je}from"./analyticsHelper-CSpNHX-t.js";import{t as Js}from"./getLocaleForTenant-Ab1B3PjW.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="455040bc-d065-45dd-8dac-a922d8e213da",i._sentryDebugIdIdentifier="sentry-dbid-455040bc-d065-45dd-8dac-a922d8e213da")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-LUXfYRYr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>a(()=>import("./BillPayRoutes-B7eECbMR.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-0m6W0X2g.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20])),transactions:()=>a(()=>import("./TransactionListRoutes-FH_uc507.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>a(()=>import("./SettingsRoutes-BGCZcWYL.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,28,29,32,20])),reports:()=>a(()=>import("./ReportsRoutes-1TXSN037.js"),__vite__mapDeps([37,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-MbQ6GwxR.js"),__vite__mapDeps([38,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>a(()=>import("./PeopleRoutes-BswRWZQg.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-DzZ2kzOA.js"),__vite__mapDeps([40,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>a(()=>import("./TreasuryRoutes-CtBzkTMx.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>a(()=>import("./VendorsRoutes-aBYOoTKe.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,22,14,18,13,43,9,10,17,25,36,20])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-BcBOPI_A.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>a(()=>import("./ReportsRoutes-1TXSN037.js"),__vite__mapDeps([37,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),ea=l(()=>a(()=>import("./AddressRoutes-Ccdt31hR.js"),__vite__mapDeps([45,1,2,3,22,4,5,6,7,14,20]))),sa=l(()=>a(()=>import("./PeopleRoutes-BswRWZQg.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,14,9,10,17,20]))),aa=l(()=>a(()=>import("./PandLWithForecastRoutes-DdGQfKKW.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),na=l(()=>a(()=>import("./CustomerOnboardingRoutes-DEmyPEG9.js"),__vite__mapDeps([47,1,2,3,22,4,5,6,7,14,48,49,50,51,52,12,20]))),ta=l(()=>a(()=>import("./VendorsRoutes-aBYOoTKe.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,22,14,18,13,43,9,10,17,25,36,20]))),ia=l(()=>a(()=>import("./TransactionDetailRoutes-CWNaQpCz.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>a(()=>import("./EntityDetailRoutes-BVmRwPcm.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),ra=l(()=>a(()=>import("./DashboardRoutes-LUXfYRYr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>a(()=>import("./BillPayRoutes-B7eECbMR.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),oa=l(()=>a(()=>import("./SettingsRoutes-BGCZcWYL.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,28,29,32,20]))),Re=l(()=>a(()=>import("./ReimbursementRoutes-0m6W0X2g.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20]))),la=l(()=>a(()=>import("./ZeniAccountRoutes-BcBOPI_A.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),ca=l(()=>a(()=>import("./TreasuryRoutes-CtBzkTMx.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),da=l(()=>a(()=>import("./TransactionListRoutes-FH_uc507.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),ma=l(()=>a(()=>import("./ChargeCardRoutes-MbQ6GwxR.js"),__vite__mapDeps([38,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),ua=l(()=>a(()=>import("./NotificationRoutes-DzMqKa9n.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),_a=l(()=>a(()=>import("./PerformanceRoutes-ChMRcywH.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),Aa=l(()=>a(()=>import("./ExpenseAutomationRoutes-DzZ2kzOA.js"),__vite__mapDeps([40,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),Ea=l(()=>a(()=>import("./RewardsRoutes-B8FReE5j.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),pa=l(()=>a(()=>import("./TaskRoutes-9joFCtVs.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Ia=l(()=>a(()=>import("./AiCfoScreen-BySJdfdn.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,43,20]))),y=l(()=>a(()=>import("./NotFoundScreen-0ajohMSv.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),ga=l(()=>a(()=>import("./TaskListScreen-CaGy-z1x.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function Za({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:C,clearAllLoading:O,clearLoading:Z}=zs(),D=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,De]=v.useState(!1),r=z(n=>ls(n)),{useFeatureGate:P}=Gs(),K=$s(),ye=Ws(),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabledV2),ve=fe||Ce&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(n=>n.tenantState.fetchState),E=z(n=>n.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),W=z(n=>us(n));if(o!=null){const n=R.getSignedInUserTenant(o);h!=null&&n!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ae=_s(),A=Ys(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ne=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(n=>w.tenantId!=null?Es(n,w.tenantId):void 0);v.useEffect(()=>{C(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&D!=null){const n=Q.params.selectedPeriod;if(n!=null){const H=n.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,D]),v.useEffect(()=>{N||(De(!0),C(B.TENANT_FETCHING)),ne.current?ne.current=!1:!Ts(ae,w)&&R.isSignedIn()&&(C(B.TENANT_FETCHING),function(n,H,d,s){if(pe(H?.userId,H?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=R.getSignedInUserTenantWithId(n.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ae,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(C(B.TENANT_FETCHING),function(n,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(Y&&ts){k(Ie(s));const q=R.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else Y&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),Y&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(Y){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(H==="Completed"||H==="Error");n==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,D,h,C,U))},[D,E]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&W.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(W.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,W.tenantsBaseInOrder))},[W,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&C(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):E==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(n=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[E,N]);const f=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!f,oe=Be&&!f,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!f,de=ce&&Hs(A?.loggedInUserRoleMap),me=Oe&&!f,We=r.company!=null&&Rs(r.company),Ye=Pe&&We===!0&&!f,qe=re&&bs(A?.loggedInUserRoleMap),Je=oe&&Ds(A?.loggedInUserRoleMap),Ke=me&&ys(A?.loggedInUserRoleMap),Qe=Cs(A?.loggedInUserRoleMap),Xe=fs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=Ye&&I,as=oe&&g,ns=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xa,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(ra,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ns||F?e.jsx(sa,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(aa,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(na,{})}),e.jsx(t,{path:"transaction/*",element:F&&f===!1||we||ze?e.jsx(ia,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&f===!1?e.jsx(da,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&f===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&f===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(ga,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(pa,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(ea,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(la,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(ca,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(_a,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&f===!1?e.jsx(Aa,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(ua,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(ta,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(oa,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:as?e.jsx(ma,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(Ea,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(Ia,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const xa=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:C,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):C?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),b=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:C,tenantEmailDomain:O})=>C===!0||i?e.jsx(Ua,{tenantEmailDomain:O}):S?e.jsx(ja,{tenantEmailDomain:O}):U?e.jsx(Ha,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(Ta,{tenantEmailDomain:O}):e.jsx(y,{}),Ta=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),be=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{b as FallBackRoute,Za as default};
@@ -1,4 +1,4 @@
1
- import{j as t}from"./liveblocks-BCZSgQbG.js";import{a as u}from"./sentry-CGkVgbup.js";import{j as T,u as R,h as P,g as m,k as _,l as V,n as H,o as C}from"./core-C_NeXleM.js";import{bm as ye,eL as j,gp as ie,JT as Ie,j6 as ce,lp as Ce,gr as xe,JV as Ae,JU as Ee,Mi as ke,wG as je,B9 as we,LT as Pe,M0 as ve,b$ as le,cD as Me,cE as De,I7 as Ue,Mj as Te,I8 as Fe,v6 as Re,Mk as _e,Dp as Ve,AR as Be,AI as re,AF as Le,va as de,AL as ue,AO as pe,AU as X,rO as Y,v9 as Oe,iK as W,iN as ge,Ml as Ne,jO as $e,vp as ze,IO as Ge,IP as Ze,iI as Ke,Mm as Je,iL as Qe,Mn as qe,vm as He,Mo as We,Mp as Xe,B6 as Ye,eQ as me,eS as fe,Mq as en,fv as nn,Ij as tn,vl as te,fA as ae,fz as an,vk as sn,fy as on,fx as cn,Mr as ln,eV as he,Ms as rn,Mt as dn,vs as un,vj as se,Mu as pn,fc as gn,vg as mn,bS as fn,b_ as hn,bZ as bn,bT as Sn,bX as yn,bW as In,bV as Cn,bY as xn,bU as An}from"./zeni-epic-state-Dp14ovRw.js";import{Z as ee,i as D,z as x,aa as be,bx as En,c as z,e as kn,S as B,B as ne,by as jn,bz as wn,al as Pn,h as Se,bA as vn,bB as Mn,bC as Dn,a4 as Un,E as Tn,bD as Fn,k as Rn,bE as _n}from"./index-TZBFPhBM.js";import{n as U}from"./mui-CgjVMn8C.js";import{M as v}from"./MobileAppDrawer-Czhowgsf.js";import{a as N,g as $,m as Vn}from"./accountMappingHelper-CEUIWp7O.js";import{t as Bn,A as Ln}from"./AddressScreen-wF2P11Cc.js";import F from"./NotFoundScreen-D0cCxE_g.js";import{g as On}from"./analyticsHelper-DZ0CUT0b.js";import{B as Nn}from"./BusinessVerificationPageScreen-Db_j23ph.js";import{C as $n}from"./CompanyPassportScreen-C20zLwxY.js";import{B as zn}from"./BillPayApprovalRoutes-Bm6O9E1C.js";import{R as Gn}from"./ReimbursementApprovalRoutes-BaUI0RrG.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";import"./routePaths-fq-ods6n.js";import"./ReimbursementApprovalRuleDetailScreen-Doqr5IfY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="5695de32-3dd7-4d4f-95aa-e76e9dd410cb",e._sentryDebugIdIdentifier="sentry-dbid-5695de32-3dd7-4d4f-95aa-e76e9dd410cb")}catch{}})();const Zn=U.div`
1
+ import{j as t}from"./liveblocks-BCZSgQbG.js";import{a as u}from"./sentry-CGkVgbup.js";import{j as T,u as R,h as P,g as m,k as _,l as V,n as H,o as C}from"./core-C_NeXleM.js";import{bm as ye,eL as j,gp as ie,JT as Ie,j6 as ce,lp as Ce,gr as xe,JV as Ae,JU as Ee,Mi as ke,wG as je,B9 as we,LT as Pe,M0 as ve,b$ as le,cD as Me,cE as De,I7 as Ue,Mj as Te,I8 as Fe,v6 as Re,Mk as _e,Dp as Ve,AR as Be,AI as re,AF as Le,va as de,AL as ue,AO as pe,AU as X,rO as Y,v9 as Oe,iK as W,iN as ge,Ml as Ne,jO as $e,vp as ze,IO as Ge,IP as Ze,iI as Ke,Mm as Je,iL as Qe,Mn as qe,vm as He,Mo as We,Mp as Xe,B6 as Ye,eQ as me,eS as fe,Mq as en,fv as nn,Ij as tn,vl as te,fA as ae,fz as an,vk as sn,fy as on,fx as cn,Mr as ln,eV as he,Ms as rn,Mt as dn,vs as un,vj as se,Mu as pn,fc as gn,vg as mn,bS as fn,b_ as hn,bZ as bn,bT as Sn,bX as yn,bW as In,bV as Cn,bY as xn,bU as An}from"./zeni-epic-state-Dp14ovRw.js";import{Z as ee,i as D,z as x,aa as be,bx as En,c as z,e as kn,S as B,B as ne,by as jn,bz as wn,al as Pn,h as Se,bA as vn,bB as Mn,bC as Dn,a4 as Un,E as Tn,bD as Fn,k as Rn,bE as _n}from"./index-BaZ8-9eR.js";import{n as U}from"./mui-CgjVMn8C.js";import{M as v}from"./MobileAppDrawer-CowqUthz.js";import{a as N,g as $,m as Vn}from"./accountMappingHelper-CEUIWp7O.js";import{t as Bn,A as Ln}from"./AddressScreen-DG9DlRXT.js";import F from"./NotFoundScreen-0ajohMSv.js";import{g as On}from"./analyticsHelper-CSpNHX-t.js";import{B as Nn}from"./BusinessVerificationPageScreen-D_IL11BU.js";import{C as $n}from"./CompanyPassportScreen-0tGZqhHr.js";import{B as zn}from"./BillPayApprovalRoutes-7ZgXY6Qr.js";import{R as Gn}from"./ReimbursementApprovalRoutes-ogcfMEcC.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";import"./routePaths-CXa3WNDm.js";import"./ReimbursementApprovalRuleDetailScreen-Cg7X5Fv7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="5695de32-3dd7-4d4f-95aa-e76e9dd410cb",e._sentryDebugIdIdentifier="sentry-dbid-5695de32-3dd7-4d4f-95aa-e76e9dd410cb")}catch{}})();const Zn=U.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;