@zeniai/web-app-ui 5.4.12-dev → 5.4.13-dev

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 (169) hide show
  1. package/dist/assets/{AccountMappingScreen-CtnQtVOI.js → AccountMappingScreen-BRzigj9b.js} +2 -2
  2. package/dist/assets/ActualMatchingMatchDetailScreen-BAnhij0b.js +1 -0
  3. package/dist/assets/AddressRoutes-CENGCuuf.js +1 -0
  4. package/dist/assets/{AddressScreen-CiPLLpNX.js → AddressScreen-B1WKzTxJ.js} +2 -2
  5. package/dist/assets/AiCfoScreen-C-9SCmEd.js +22 -0
  6. package/dist/assets/{AppDrawer-Bxmzf_KR.js → AppDrawer-BMUNiLoq.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-Bhwrq5tr.js → BillPayApprovalRoutes-DKLoOuwS.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-CQCAwPWX.js → BillPayRoutes-VPiZq7wX.js} +8 -8
  9. package/dist/assets/{BusinessVerificationPageScreen-71JxUYXB.js → BusinessVerificationPageScreen-BBfkNXWr.js} +2 -2
  10. package/dist/assets/CardsAiCfoScreen-DvGNnU6w.js +14 -0
  11. package/dist/assets/{ChargeCardRoutes-CvC_JvPH.js → ChargeCardRoutes-CulF2JvM.js} +9 -9
  12. package/dist/assets/CompanyPassportScreen-CO0hs3h5.js +1 -0
  13. package/dist/assets/ConnectionAuthScreen-BEy82Ssf.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-BMc4DHei.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-BMrjyYZ8.js → CustomerOnboardingRoutes-rnOyKIiB.js} +3 -3
  16. package/dist/assets/{DashboardRoutes-DYfRGtw5.js → DashboardRoutes-Cu8fYKAV.js} +4 -4
  17. package/dist/assets/{DefaultTenantHome-DmRqFqlc.js → DefaultTenantHome-CVMojLIT.js} +1 -1
  18. package/dist/assets/DomesticWireDetailScreen-DvqNzOqw.js +18 -0
  19. package/dist/assets/DrawerScreen-DcCH_0uM.js +1 -0
  20. package/dist/assets/EntityDetailRoutes-CU_8Y8KV.js +1 -0
  21. package/dist/assets/{ExpenseAutomationRoutes-Bks-mNnn.js → ExpenseAutomationRoutes-BDWC6-9s.js} +6 -6
  22. package/dist/assets/FeaturePreviewScreen-BNMkwdyk.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-BCwidLV1.js +1 -0
  24. package/dist/assets/InboxNotificationsProvider-dYyDAGLI.js +1 -0
  25. package/dist/assets/InvoicingRoutes-92Lk9pMJ.js +3 -0
  26. package/dist/assets/{MagicLinkRoutes-BQns5k2S.js → MagicLinkRoutes-qLj928yC.js} +9 -9
  27. package/dist/assets/MagicLinkSignInScreen-B5rANZEW.js +12 -0
  28. package/dist/assets/MobileAppDrawer-DfwkluKE.js +1 -0
  29. package/dist/assets/NotFoundScreen-QNLsV8PR.js +1 -0
  30. package/dist/assets/NotificationRoutes-ByCMeGhn.js +1 -0
  31. package/dist/assets/OAuthConsentScreen-DvZbWzs6.js +1 -0
  32. package/dist/assets/PandLWithForecastRoutes-CddU1LvP.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-BADSNyXp.js → PaymentLinkScreen-DJv-jPN7.js} +2 -2
  34. package/dist/assets/PeopleRoutes-seHwQw6o.js +22 -0
  35. package/dist/assets/PerformanceRoutes-DNmhsmNx.js +1 -0
  36. package/dist/assets/{Preview-DGZHmpgt.js → Preview-DYy1N-vn.js} +1 -1
  37. package/dist/assets/QBOConnectionScreen-BnjbZJvL.js +100 -0
  38. package/dist/assets/{ReimbursementApprovalRoutes-CsG7QtOs.js → ReimbursementApprovalRoutes-DUvLzvwu.js} +1 -1
  39. package/dist/assets/ReimbursementApprovalRuleDetailScreen-BliFeglB.js +1 -0
  40. package/dist/assets/ReimbursementRoutes-uqQhXzD_.js +68 -0
  41. package/dist/assets/ReportsRoutes-Ty52_HTE.js +1 -0
  42. package/dist/assets/RewardsRoutes-DLgsJCTB.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-v3zw3e0R.js → ScheduleDetailsPrepaidExpensesScreen-DW_6SN7k.js} +5 -5
  44. package/dist/assets/ScreenRoutes-DJPFTJup.js +2 -0
  45. package/dist/assets/{SettingsRoutes-CwW3Kcyz.js → SettingsRoutes-DucmuzJP.js} +6 -6
  46. package/dist/assets/{SetupPagesScreen-DPnnq4jj.js → SetupPagesScreen-DK6Wiu69.js} +5 -5
  47. package/dist/assets/SignInScreen-DaPgU2Nl.js +1 -0
  48. package/dist/assets/SignOutScreen-B59RCl56.js +9 -0
  49. package/dist/assets/TaskListScreen-Cvt-fENk.js +9 -0
  50. package/dist/assets/TaskRoutes-D2FIt6Mv.js +9 -0
  51. package/dist/assets/TransactionDetailRoutes-tbHHbIBD.js +1 -0
  52. package/dist/assets/TransactionDetailScreen-Ch0LCj8G.js +5 -0
  53. package/dist/assets/{TransactionListRoutes-aYhnWH8H.js → TransactionListRoutes-C3bzQYFS.js} +1 -1
  54. package/dist/assets/TreasuryRoutes-DDeLTUpi.js +37 -0
  55. package/dist/assets/{VendorsRoutes-QudM99vQ.js → VendorsRoutes-DJp9Lw7q.js} +11 -11
  56. package/dist/assets/WiseConfirmationScreen-CLvpbPdm.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-DeSodvmm.js → ZeniAccountRoutes-DaY0WnU3.js} +11 -11
  58. package/dist/assets/ZeniAccountStatementScreen-iiLi8G_s.js +9 -0
  59. package/dist/assets/{accountMappingHelper-7kGWRPlV.js → accountMappingHelper-Bhr6esKF.js} +1 -1
  60. package/dist/assets/{analytics-BfKlFVdJ.js → analytics-DQKmqYV4.js} +4 -4
  61. package/dist/assets/{analyticsHelper-Cn2rORl_.js → analyticsHelper-BwgoMQXe.js} +1 -1
  62. package/dist/assets/{core-BWRpGVdr.js → core--MkqccHv.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-DN9u1X8y.js → decodeURIComponentSafe-BEyzjo_o.js} +1 -1
  64. package/dist/assets/{dnd-wLfPcqQ_.js → dnd-CP4whtxN.js} +1 -1
  65. package/dist/assets/{empty-CKwCpajm.js → empty-BNS5Y1pB.js} +1 -1
  66. package/dist/assets/{empty-BxjviaN4.js → empty-ClM8DHuA.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-BURd-WPn.js → emptyVideoElement-fa_uGl7-.js} +1 -1
  68. package/dist/assets/epic-D_XIiCBV.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-Dgshk1zd.js +1 -0
  70. package/dist/assets/getLocaleForTenant-GT2HpY4t.js +1 -0
  71. package/dist/assets/{index-9pdMsp-M.js → index-B3QEycF9.js} +14277 -14277
  72. package/dist/assets/{index-DwbDgvVM.js → index-BF_3R8uL.js} +1 -1
  73. package/dist/assets/{index-DYK9WSJX.js → index-BeoiOG5z.js} +1 -1
  74. package/dist/assets/{index-BtcZVjM1.js → index-CgMPBz0t.js} +1 -1
  75. package/dist/assets/{index-CcNUb4uI.js → index-D6eGMXVa.js} +2 -2
  76. package/dist/assets/index-eDdhdaqL.js +1 -0
  77. package/dist/assets/{index-D6O1UsWW.js → index-unoqrRj0.js} +1 -1
  78. package/dist/assets/index-yOyvZ3iU.js +1 -0
  79. package/dist/assets/{lexical-ljfsYSTd.js → lexical-BSiUIp1H.js} +1 -1
  80. package/dist/assets/liveblocks-DxRiM6VH.js +59 -0
  81. package/dist/assets/{lottie-ByqRhfis.js → lottie-ixiiUTSF.js} +1 -1
  82. package/dist/assets/{mui-BmHHlwSU.js → mui-kCJnrqYM.js} +1 -1
  83. package/dist/assets/{pathToGoBack-Dr_s0YFt.js → pathToGoBack-bat7ZlX9.js} +1 -1
  84. package/dist/assets/{pdf-C42gprG9.js → pdf-CRxQY5HT.js} +5 -5
  85. package/dist/assets/{pdf-lib-D4o6Nk27.js → pdf-lib-CHqQ3Ry3.js} +1 -1
  86. package/dist/assets/{plaid-CNV6JDhi.js → plaid-D94Y0H1P.js} +1 -1
  87. package/dist/assets/{pusher-DvjXiGU0.js → pusher-D0JY_FIf.js} +1 -1
  88. package/dist/assets/{react-DJxNpxcE.js → react-BBat2v6H.js} +1 -1
  89. package/dist/assets/{react-CdlDO5TG.js → react-BMVWGyVG.js} +1 -1
  90. package/dist/assets/{react-s5yBxYCg.js → react-Bv8sZiPk.js} +1 -1
  91. package/dist/assets/{react-CFwPpD-1.js → react-CiS3ccRD.js} +1 -1
  92. package/dist/assets/{react-Ct2ZzE_U.js → react-DTdBaAd3.js} +1 -1
  93. package/dist/assets/{react-CFX1RFZH.js → react-ltAkcaDC.js} +1 -1
  94. package/dist/assets/{recharts-BXLxGQ-T.js → recharts-EjKi4hbc.js} +1 -1
  95. package/dist/assets/{reportTimeframe-tJTkNTvP.js → reportTimeframe-DQT7aPWx.js} +1 -1
  96. package/dist/assets/{routePaths--TXDBUUo.js → routePaths-33YxbFc-.js} +1 -1
  97. package/dist/assets/{sentry-bpmZUW7k.js → sentry-B-dIf5xz.js} +1 -1
  98. package/dist/assets/{stripSplatSuffix-Bizh1-Tx.js → stripSplatSuffix-xBjFkZSJ.js} +1 -1
  99. package/dist/assets/{url-Cc_9bwX-.js → url-Bs4Dq0vG.js} +1 -1
  100. package/dist/assets/{url-8ONn8gmN.js → url-hbMZAh9y.js} +1 -1
  101. package/dist/assets/useActualMatchingMatchDetail-CAIVsCJG.js +1 -0
  102. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BTEnEWTt.js +1 -0
  103. package/dist/assets/useAskAiCfoHostNavButtonProps-BZFKDw3z.js +1 -0
  104. package/dist/assets/useChargeCardPusherEvents-DG1lA66n.js +1 -0
  105. package/dist/assets/{useDeviceId-3o80RPjJ.js → useDeviceId-8baAH1vH.js} +1 -1
  106. package/dist/assets/useEmailConnectResultRefresh-BEw2d8Jv.js +1 -0
  107. package/dist/assets/useEnsureVendorListLoaded-IzkQpfDE.js +1 -0
  108. package/dist/assets/useInitialThreadRequest-D8OFP51H.js +1 -0
  109. package/dist/assets/useTaskManagerAccess-ULuU1uGf.js +1 -0
  110. package/dist/assets/useTaskManagerPusherEvents-WPqjoQIF.js +1 -0
  111. package/dist/assets/utils-BPWa_pEs.js +36 -0
  112. package/dist/assets/withTransactionSidePanel-RKi7LGHx.js +25 -0
  113. package/dist/assets/{zeni-epic-state-BlWDBO75.js → zeni-epic-state-Dg1W8Zu5.js} +4 -4
  114. package/dist/index.html +1 -1
  115. package/package.json +4 -4
  116. package/dist/assets/ActualMatchingMatchDetailScreen-COb45lJn.js +0 -1
  117. package/dist/assets/AddressRoutes-CXRpuLt0.js +0 -1
  118. package/dist/assets/AiCfoScreen-DPuJRDN-.js +0 -22
  119. package/dist/assets/CardsAiCfoScreen-Dze-_SQs.js +0 -14
  120. package/dist/assets/CompanyPassportScreen-dRN2jnGn.js +0 -1
  121. package/dist/assets/ConnectionAuthScreen-CrQ3LZFB.js +0 -11
  122. package/dist/assets/CustomerOnboardingAuthScreen-BUiUC1A4.js +0 -1
  123. package/dist/assets/DomesticWireDetailScreen-YfGiQgSo.js +0 -18
  124. package/dist/assets/DrawerScreen-DH40ycW6.js +0 -1
  125. package/dist/assets/EntityDetailRoutes-BgqO6DqU.js +0 -1
  126. package/dist/assets/FeaturePreviewScreen-B9UACzAC.js +0 -1
  127. package/dist/assets/HubSpotOAuthCallbackScreen-BjEMURaY.js +0 -1
  128. package/dist/assets/InboxNotificationsProvider-Cd4NxEtR.js +0 -1
  129. package/dist/assets/InvoicingRoutes-UHPes0q9.js +0 -3
  130. package/dist/assets/MagicLinkSignInScreen-IXnuvHt3.js +0 -12
  131. package/dist/assets/MobileAppDrawer-rCVKr3J3.js +0 -1
  132. package/dist/assets/NotFoundScreen-C94S-cmy.js +0 -1
  133. package/dist/assets/NotificationRoutes-h53g4kBO.js +0 -1
  134. package/dist/assets/OAuthConsentScreen-35XPz7Vp.js +0 -1
  135. package/dist/assets/PandLWithForecastRoutes-OnVWoGgX.js +0 -1
  136. package/dist/assets/PeopleRoutes-CnmV1pW5.js +0 -22
  137. package/dist/assets/PerformanceRoutes-MYTxvcMA.js +0 -1
  138. package/dist/assets/QBOConnectionScreen-C1Kn9y8q.js +0 -101
  139. package/dist/assets/ReimbursementApprovalRuleDetailScreen-BzhkgPjS.js +0 -1
  140. package/dist/assets/ReimbursementRoutes-BcjYsUHB.js +0 -68
  141. package/dist/assets/ReportsRoutes-Bcm2EvxJ.js +0 -1
  142. package/dist/assets/RewardsRoutes-Do7moyFI.js +0 -1
  143. package/dist/assets/ScreenRoutes-vTLuTGuW.js +0 -2
  144. package/dist/assets/SignInScreen-ColMnPgQ.js +0 -1
  145. package/dist/assets/SignOutScreen-DILD5ueP.js +0 -9
  146. package/dist/assets/TaskListScreen-aizYXFWj.js +0 -9
  147. package/dist/assets/TaskRoutes-CWWa57kf.js +0 -9
  148. package/dist/assets/TransactionDetailRoutes-DWXM95sG.js +0 -1
  149. package/dist/assets/TransactionDetailScreen-CNMo1Iyr.js +0 -5
  150. package/dist/assets/TreasuryRoutes-DnAsQTrn.js +0 -37
  151. package/dist/assets/WiseConfirmationScreen-CkFHmO99.js +0 -12
  152. package/dist/assets/ZeniAccountStatementScreen-DKVtRt3N.js +0 -9
  153. package/dist/assets/epic-Nc2-Ka61.js +0 -2
  154. package/dist/assets/expenseAutomationHelper-Dr99xbt1.js +0 -1
  155. package/dist/assets/getLocaleForTenant-BNAJG7gN.js +0 -1
  156. package/dist/assets/index-BXpurrfG.js +0 -1
  157. package/dist/assets/index-mJCZBkgN.js +0 -1
  158. package/dist/assets/liveblocks-V5YQZeeY.js +0 -59
  159. package/dist/assets/useActualMatchingMatchDetail-Mft821vz.js +0 -1
  160. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-3ayut61P.js +0 -1
  161. package/dist/assets/useAskAiCfoHostNavButtonProps-E2UGdnp9.js +0 -1
  162. package/dist/assets/useChargeCardPusherEvents-DVeqwUB9.js +0 -1
  163. package/dist/assets/useEmailConnectResultRefresh-F8OBO8EU.js +0 -1
  164. package/dist/assets/useEnsureVendorListLoaded-CKZrwkQQ.js +0 -1
  165. package/dist/assets/useInitialThreadRequest-Df-inltN.js +0 -1
  166. package/dist/assets/useTaskManagerAccess-Bq9TDvwr.js +0 -1
  167. package/dist/assets/useTaskManagerPusherEvents-Ctn5L7kn.js +0 -1
  168. package/dist/assets/utils-CXFQdt3d.js +0 -36
  169. package/dist/assets/withTransactionSidePanel-DOV8YzFf.js +0 -25
@@ -1 +0,0 @@
1
- import{j as B}from"./liveblocks-V5YQZeeY.js";import{a as m}from"./sentry-bpmZUW7k.js";import{u as te,j as t,i as $e,g as Ge,h as Ue,q as _}from"./core-BWRpGVdr.js";import{fE as ne,UH as Me,UI as se,g8 as xe,fD as Ne,UR as Re,UK as Pe,UL as Ve,q3 as Le,gl as Oe,UO as b,UT as je,UU as Q,gm as He,UV as Ze,ED as ze,h1 as qe,cT as We,UW as Ye,g7 as Je,gn as Ke}from"./zeni-epic-state-BlWDBO75.js";import{w as Qe,i as Xe,g as ea,p as aa,d as ta,h as na,u as sa,c,j as oa,f as ia,z as ra,e as da,r as ca,s as la,A as ua,v as ma,x as X,L as fa,I as ha,J as ba,n as S,m as ee,D as pa,M as ae,F as ga,H as Sa}from"./index-9pdMsp-M.js";import{D as Ea}from"./mui-BmHHlwSU.js";import{u as ka}from"./InboxNotificationsProvider-Cd4NxEtR.js";import{u as Ca}from"./useTaskManagerAccess-Bq9TDvwr.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="7d30dfe9-b9ca-4866-9733-0839a005d0e1",l._sentryDebugIdIdentifier="sentry-dbid-7d30dfe9-b9ca-4866-9733-0839a005d0e1")}catch{}})();const Ta=Qe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),E=ea(),n=Ue(),F=xe(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:k}=Ca(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Ne(e))),{status:ie}=t(Re),G=$.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,U]=m.useState(void 0),A=_("/:tenantEmailDomain/dashboard")!==null,M=_("/:tenantEmailDomain/reports")!==null,f=_("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,x),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),N=t((e=>Pe(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),v=t((e=>Ve(e)));m.useEffect((()=>{C&&T&&!f&&v.fetchState==="Not-Started"&&r(Le(!0))}),[C,T,v.fetchState,f]);const D=t((e=>e.tenantState)),me=t((e=>D.fetchState==="Completed"?Oe(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:fe}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),R=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),Ee=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",ke=t((e=>b(e).totalUnreadCount)),Ce=t((e=>b(e).reducedFetchCountState)),P=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),V=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),L=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:O,isLoading:j,isFetchingMore:H,hasFetchedAll:Z,fetchMore:Te}=ka();m.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),m.useEffect((()=>{if(j===!1&&H===!1&&Z===!0)if(o?.companyId!=null&&O!=null){const e=`dashboard_${o.companyId}`;U(O.filter((u=>u.roomId===e&&u.readAt==null)).length)}else U(0)}),[j,H,Z]),m.useEffect((()=>{C&&k&&!f&&L.fetchState==="Not-Started"&&F.tenantId!=null&&r(je("task_manager","dashboard"))}),[C,k,f,L.fetchState,F.tenantId,r]),m.useEffect((()=>{f||I.fetchState!=="Not-Started"||r(Q({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[f,I.fetchState,r]),m.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(Q({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:ke},z=s!=null?ra.getSignedInUserTenant(s):null,q=t((e=>z?.tenantId!=null?He(e,z.tenantId):void 0)),h=[];fe===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&h.push("rewards_card"),R===!1&&h.push("expense_automation_card");const W=t((e=>Ze(e,h).fetchState)),Y=t((e=>ze(e).fetchState)),ye=A&&(W==="Completed"||W==="Error")||M&&(Y==="Completed"||Y==="Error")||!A&&!M?void 0:"disabled",we=m.useMemo((()=>qe(o.userRole)),[o.userRole]),Ae=We(we),ve=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&N.fetchState==="Completed"&&Ye(N.notificationSettings,p.userEmail,x,o,k),J=da(),_e=J&&ca(a);return B.jsx(Ea,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:B.jsx(la,{signedInUser:p,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?me:q!=null?[q]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:X(a),isInvoicing:ma(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:Ee,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:R,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=P===0&&V>0?"notifications/comments":"notifications/tasks";X(a)&&(e=P===0&&V>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),K=e.type,Be=ae(K)&&K!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),Be&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Fe=ga(e.type);Sa(e.type)?(G!=null&&r(Ke()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Fe}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(fa.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{E.toggle()},isAiCfo:_e,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Je({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:k,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Fa=l=>{const i=te(),s=t((E=>ne(E))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(E,n)=>{Xe(n)&&Me(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return B.jsx(Ta,{...l,...a})};export{Fa as M};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-V5YQZeeY.js";import{h as r,l as i}from"./core-BWRpGVdr.js";import{al as n}from"./index-9pdMsp-M.js";import"./mui-BmHHlwSU.js";import"./sentry-bpmZUW7k.js";import"./recharts-BXLxGQ-T.js";import"./zeni-epic-state-BlWDBO75.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.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]="2727121c-0fea-4d72-8154-4c14ed8be457",o._sentryDebugIdIdentifier="sentry-dbid-2727121c-0fea-4d72-8154-4c14ed8be457")}catch{}})();const a=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
@@ -1 +0,0 @@
1
- import{n as mt,b as lt,o as ft,j as N}from"./liveblocks-V5YQZeeY.js";import ut from"./NotFoundScreen-C94S-cmy.js";import{a as k}from"./sentry-bpmZUW7k.js";import{h as ht,g as pt,i as kt,u as gt,j as S,l as St,n as bt,o as q}from"./core-BWRpGVdr.js";import{cy as It,UK as Q,fE as Z,h1 as Tt,UO as b,a1Z as z,UU as m,UI as y,AO as F,GB as Ct,a1_ as At,UH as yt,UW as Et,AT as _t,a1$ as $,bn as j,gg as x,AX as J,a20 as Nt,cK as Bt,cD as wt}from"./zeni-epic-state-BlWDBO75.js";import{ap as xt,d as Ut,p as vt,c as Dt,ar as Rt,dL as Gt,n as B,dM as Pt,w as Mt,dN as $t,i as jt,a3 as Ft}from"./index-9pdMsp-M.js";import"./mui-BmHHlwSU.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-E2UGdnp9.js";import{u as Wt}from"./useTaskManagerAccess-Bq9TDvwr.js";import"./recharts-BXLxGQ-T.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.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]="149d7469-96ec-4ef8-8be9-492cf861f420",t._sentryDebugIdIdentifier="sentry-dbid-149d7469-96ec-4ef8-8be9-492cf861f420")}catch{}})();const Lt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),Ot=St((function(t,l){const n=Q(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=b(t),f=Z(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(a),t($([a],j())));let i=`/${h}/${r[1]}`;const T=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,s)=>{t(y(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(z(a,s));const d=`../${a}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(F("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(J("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t($([i],j())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Lt(o,I).then((()=>{t($(o,j())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Mt($t)),Ht=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=Ut(),[I,v]=k.useState(!1),a=S((e=>Q(e))),s=S((e=>Z(e))),{useFeatureGate:d}=vt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Y=Tt(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),W=S((e=>b(e).currentTab)),D=S((e=>b(e).currentSubTab)),tt=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),R=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),et=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Gt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=mt(),{threads:L,isLoading:O,fetchMore:H,isFetchingMore:K,hasFetchedAll:X}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(W!==c&&c!=null&&o(z(c)),c==null){const e=`../${W}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&C===!0&&s?.companyId!=null&&w!=null){const e=`dashboard_${s.companyId}`,p=w.filter((A=>A.roomId===e&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(y({unreadCount:p},"comments"))}}),[E,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(F("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const P=E||G===!0||C!==!0||E||G===!0||C!==!0;k.useEffect((()=>{P&&R!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||R!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,R]),k.useEffect((()=>{o(y({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&I===!1&&(v(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(E===!1&&O===!1&&w!=null&&L!=null){const e=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===e)).filter((u=>Pt(u.kind))),A=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const M=L.find((dt=>{return dt.id===((U=u).kind==="thread"?U.threadId:"subjectId"in U?U.subjectId:void 0);var U}));return M!=null?{inboxNotification:{...u,threadId:M.id},thread:M}:(K||X===!0||H==null||H(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(y({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[E,G,K,C,X,O,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(jt(p)){const A=yt(p.mode);if(A==="dashboard"&&o(y({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(F("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=Wt(f);return N.jsx(Ot,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function me(){return N.jsxs(bt,{children:[N.jsx(q,{path:"/:selectedTab",element:N.jsx(Ht,{})}),N.jsx(q,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-V5YQZeeY.js";import{a as r}from"./sentry-bpmZUW7k.js";import{u as A,g as j,j as o,N as C}from"./core-BWRpGVdr.js";import{Vl as P,fE as V,gl as x,Vm as z,Vn as D,Vo as M,Vp as R,pW as k,U0 as L}from"./zeni-epic-state-BlWDBO75.js";import{z as h,ag as I}from"./index-9pdMsp-M.js";import"./mui-BmHHlwSU.js";import"./recharts-BXLxGQ-T.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="ac7afb87-4180-4e84-9009-986e9488aef1",n._sentryDebugIdIdentifier="sentry-dbid-ac7afb87-4180-4e84-9009-986e9488aef1")}catch{}})();function ee(){const n=A(),a=j(),{params:t,error:i}=r.useMemo((()=>P(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),f=o((e=>V(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),y=o(z),v=o(D),u=o(M),[S,b]=r.useState(null),[E,U]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(R())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[p,s,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const _=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),c=S??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(L(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{U("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as n}from"./liveblocks-V5YQZeeY.js";import{h as q,u as G,g as z,i as Z,j as d,l as H,n as J,o as C}from"./core-BWRpGVdr.js";import{fE as v,Az as O,vc as K,Wf as w,v7 as T,bm as Q,bZ as X,v8 as ee,Wg as ae,VY as S,eg as te,Es as se,Wh as oe,ER as re,dZ as ne,dY as ce}from"./zeni-epic-state-BlWDBO75.js";import{ah as ie,z as le,ap as de,ar as me,V as fe,a7 as pe,m as M,aC as ue,n as he,p as ge,c as Fe}from"./index-9pdMsp-M.js";import"./mui-BmHHlwSU.js";import Ie from"./NotFoundScreen-C94S-cmy.js";import{F as be}from"./FeaturePreviewScreen-B9UACzAC.js";import{a as g}from"./sentry-bpmZUW7k.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-E2UGdnp9.js";import{u as Se}from"./useInitialThreadRequest-Df-inltN.js";import{t as Te}from"./routePaths--TXDBUUo.js";import{M as ye}from"./MobileAppDrawer-rCVKr3J3.js";import"./recharts-BXLxGQ-T.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.js";import"./InboxNotificationsProvider-Cd4NxEtR.js";import"./useTaskManagerAccess-Bq9TDvwr.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="4176a576-e166-4ac2-a033-3f379cd0e8ec",s._sentryDebugIdIdentifier="sentry-dbid-4176a576-e166-4ac2-a033-3f379cd0e8ec")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=H((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=q(),a=G(),o=z(),{forecastId:r,tenantEmailDomain:c}=Z(),[p,u]=g.useState(!1),[m,A]=g.useState(!1),F=le.getSignedInUser(),x=d((t=>v(t))),N=x.company?.companyInfo.firstMonthOfFY??1,i=d((t=>O(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),D=d((t=>t.profitAndLossState)),E=d((t=>t.reportUIOptionsState.selectedForecast)),j=t=>D.pandLByForecastID[t]!=null&&ee(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:W,onAskAiCfoClick:_}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&I)u(!0),l||a(K());else if(l&&!m){A(!0);const t=((f,P,R)=>P!=null?f.forecasts.findIndex((b=>b.id===P)):R!=null?f.forecasts.findIndex((b=>b.id===R)):f.forecasts.length>0?0:-1)(i,r,E?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=E?.index?(a(w(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!j(i.forecasts[t].id)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,O,T,I]);const k=fe(),B=k?.loggedInUserRole!=null&&Q(k.loggedInUserRole),V=Se(x?.companyId,{clearParams:l&&m}),[Y,$]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{$(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:L}),n.jsx(Ae,{firstMonthOfFY:N,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:j,meetingUrl:X(h.toString()),hasTransactionAccess:B,isAiCfoAccessEnabled:W,onAskAiCfoClick:_,initialOpenThreadRequest:V,onClickMenuIcon:()=>{L(!0)}})]})}function Ze(){const s=d((c=>v(c))),{useFeatureGate:e}=ge(),{isFeatureEnabled:a}=e(Fe.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(J,{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(Ie,{})})]})}export{Ze as default};
@@ -1,22 +0,0 @@
1
- import{j as a}from"./liveblocks-V5YQZeeY.js";import{Wb as re,fE as X,l$ as _,dZ as N,dY as le,S$ as J,Vz as ce,Di as Pe,Wc as Y,D7 as je,Ds as Le,Dm as de,Db as pe,Dq as ve,Dn as Te,Wd as ue,sx as Ae,g5 as Ve,gC as Oe,We as W,Df as me,De as ge,Dv as Re,c6 as Fe}from"./zeni-epic-state-BlWDBO75.js";import{a0 as fe,p as Q,c as H,z as G,j as he,O as Ce,ae as be,ay as ye,az as Ze,aa as Se,K as R,af as De,G as K,aA as Be,ap as Ue,ar as $e,a7 as ze,m as we,S as We,n as He,aB as _e,V as Ge}from"./index-9pdMsp-M.js";import{D as xe,n as M,S as Ie}from"./mui-BmHHlwSU.js";import ae from"./NotFoundScreen-C94S-cmy.js";import{a as c}from"./sentry-bpmZUW7k.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Ye,n as se,o as z}from"./core-BWRpGVdr.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-E2UGdnp9.js";import{M as Ne}from"./MobileAppDrawer-rCVKr3J3.js";import"./recharts-BXLxGQ-T.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.js";import"./InboxNotificationsProvider-Cd4NxEtR.js";import"./useTaskManagerAccess-Bq9TDvwr.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]="4e3470c9-1f86-45fb-a44b-34b1a9e7146a",e._sentryDebugIdIdentifier="sentry-dbid-4e3470c9-1f86-45fb-a44b-34b1a9e7146a")}catch{}})();const Je={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=fe(),m=ee(),[F,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>X(l))),E=g((l=>_(l))),{useFeatureGate:x}=Q(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=N(I,p),v=le(p),T=J(p),B=ce(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Y()),y()},A=()=>{F===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:V}=Ce(p?.tenantId),b=!L||V,O=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:O===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(T))},onCloseClick:A,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(ye,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ze,{...s})]})})},ea=M(Ie)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,ke=M(De.H6Regular)`
6
- margin-top: ${R.sp7};
7
- padding-left: ${R.sp8};
8
- padding-right: ${R.sp8};
9
- color: ${e=>e.theme.colors.primary};
10
- word-break: break-word;
11
- `,Ee=M(De.LargeRegularSp)`
12
- color: ${e=>e.theme.colors.hero};
13
- padding-left: ${R.sp8};
14
- padding-right: ${R.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${R.sp4};
17
- white-space: pre-line;
18
- `,aa={overlayWidth:new Se(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=fe(),m=ee(),[F,Z]=c.useState(!1),[k,S]=c.useState(!1),D=g((o=>re(o))),r=g((o=>X(o))),p=g((o=>_(o))),{useFeatureGate:E}=Q(),{isFeatureEnabled:x}=E(H.isDebitCardFeatureEnabled),I=N(x,r),P=le(r),v=J(r),T=ce(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{y(),m(Y())},C=()=>{F===!0?S(!0):w()},A={onOkClick:()=>{S(!1),w()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(H.isChargeCardFeatureEnabled),L=he(r,j,x),{isCardsHidden:V}=Ce(r?.tenantId),b=!L||V,O=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),Z(!0)},onResetClick:w,onSaveClick:()=>{m(f==="zeni_only"?ve(e):Te())},onCloseClick:C,peopleDetails:D,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:O===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return c.useEffect((()=>{D.invitePersonState.fetchState==="Completed"&&(y(),m(Y()))}),[D.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(ye,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:A}):null,a.jsx(Be,{...s})]})})},ta=M(Ie)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,na=Ye((function(e,t){const d=ue(e),n=G.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:_(e),analytics:we}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,y)=>{e(pe(i,y))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(W({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(W({searchText:i}))}}}}))(_e);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=Me(),n=ee(),f=qe(),{areTenantIdsInSync:i}=Ue(),y=G.getSignedInUser(),h=g((s=>X(s))),{useFeatureGate:m}=Q(),{isFeatureEnabled:F}=m(H.isDebitCardFeatureEnabled),Z=g((s=>_(s))),k=!N(F,h)&&Z,S=J(h),D=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=c.useState(!1),[x,I]=c.useState(!1),[P,v]=c.useState(!1),[T,B]=c.useState("off"),[U,w]=c.useState(!1),C=s=>{w(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=Xe({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ae(s.classState,s.classListState))),L=g((s=>Ve(s.userState,s.userRoleState,s.userListViewState,"manager"))),V=g((s=>Oe(s))),b=h?.companyId;c.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(W({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),E(!0),n(me()))}),[p,y,D,n,u.uiState.mode,i]),c.useEffect((()=>{b!=null&&i&&n(ge(b,k))}),[b,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),v(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(W({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const O=()=>{I(!1),v(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:we,onLoad:s=>s.trackPageLoaded(We.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:O,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:V,classListView:j,companyId:b,mode:u.uiState.mode}):null,P===!0?a.jsx(Qe,{closeDrawerHandler:O,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:V,classListView:j,companyId:b,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:d,signedInUser:y,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:b,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(W({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=He(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function ka(){const e=Ge();return Fe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-V5YQZeeY.js";import T from"./NotFoundScreen-C94S-cmy.js";import{a as n}from"./sentry-bpmZUW7k.js";import{h as _,g as v,j as p,i as M,u as U,N as O,l as P,n as z,o as h}from"./core-BWRpGVdr.js";import{fE as B,a21 as b,bk as F,bj as N,iL as V,gg as L}from"./zeni-epic-state-BlWDBO75.js";import{g as $,z as I,ar as q,dO as G}from"./index-9pdMsp-M.js";import"./mui-BmHHlwSU.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-E2UGdnp9.js";import{M as J}from"./MobileAppDrawer-rCVKr3J3.js";import"./recharts-BXLxGQ-T.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.js";import"./InboxNotificationsProvider-Cd4NxEtR.js";import"./useTaskManagerAccess-Bq9TDvwr.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]="c30de27d-27d0-4518-a9f6-b290035be40d",e._sentryDebugIdIdentifier="sentry-dbid-c30de27d-27d0-4518-a9f6-b290035be40d")}catch{}})();const K=P((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:r}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:r}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),Q=()=>{const e=_(),t=v(),d=$(),o=p((a=>B(a))),{aggregatedReportViewState:r}=p((a=>b(a))),{tenantEmailDomain:g}=M(),f=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=n.useRef(!1),[w,S]=n.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,j=N(l),x=C||k||j,c=n.useCallback(((a,i,E)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:E}))}),[]);n.useEffect((()=>{r?.fetchState==="Completed"&&m.current&&(f(L({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[r?.fetchState]);const y=n.useCallback(((a,i)=>{r!=null&&r?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[r?.fetchState,c]),D=n.useCallback(((a,i)=>{c(a,i,!1)}),[c]),u=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:r?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:u}),s.jsx(K,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:g,onReload:y,onTimeRangeSelect:D,handleDrawerToggle:u,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${g}/dashboard`,replace:!0})};function he(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(T,{})})]})}export{he as default};