@zeniai/web-app-ui 5.1.54-qa → 5.1.55-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 (121) hide show
  1. package/dist/assets/AddressRoutes-DvgS57PS.js +1 -0
  2. package/dist/assets/AddressScreen-kHZ3pkiE.js +9 -0
  3. package/dist/assets/{AiCfoScreen-CuCVJ-9z.js → AiCfoScreen-CnZOpF7D.js} +1 -1
  4. package/dist/assets/BillPayApprovalRoutes-CIS2PKjh.js +1 -0
  5. package/dist/assets/{BillPayRoutes-C-57jjzC.js → BillPayRoutes-Cp4tN_kn.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-CoxJBcce.js → BusinessVerificationPageScreen-Ds_dEqcf.js} +1 -1
  7. package/dist/assets/{CardsAiCfoScreen-BXut6M7h.js → CardsAiCfoScreen-DkmqTSNf.js} +1 -1
  8. package/dist/assets/{ChargeCardRoutes-DAakvdza.js → ChargeCardRoutes-CqBU7ZCW.js} +1 -1
  9. package/dist/assets/CompanyPassportScreen-DBSTWMtn.js +1 -0
  10. package/dist/assets/{ConnectionAuthScreen-BOHdbzkN.js → ConnectionAuthScreen-DzKO3rid.js} +1 -1
  11. package/dist/assets/CustomerOnboardingAuthScreen-ucKYqEJq.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-Dh6ZowLh.js → CustomerOnboardingRoutes-CBqysmDl.js} +3 -3
  13. package/dist/assets/{DashboardRoutes-Cox4nEtE.js → DashboardRoutes-C0rT4cbB.js} +1 -1
  14. package/dist/assets/{DefaultTenantHome-DsGlDo8q.js → DefaultTenantHome-BPqd9f9F.js} +1 -1
  15. package/dist/assets/{DomesticWireDetailScreen-Dwlu904z.js → DomesticWireDetailScreen-BqVZ4JA4.js} +1 -1
  16. package/dist/assets/DrawerScreen-CuqanTdv.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-BCC1kZvg.js +1 -0
  18. package/dist/assets/{ExpenseAutomationRoutes-CKsYpo_A.js → ExpenseAutomationRoutes-BvUJJ11E.js} +1 -1
  19. package/dist/assets/FeaturePreviewScreen-DruJFyVL.js +1 -0
  20. package/dist/assets/{HubSpotOAuthCallbackScreen-074s_I3B.js → HubSpotOAuthCallbackScreen-JY_hR32w.js} +1 -1
  21. package/dist/assets/{MagicLinkRoutes-Cu1l5Hae.js → MagicLinkRoutes-C4tggAcT.js} +6 -6
  22. package/dist/assets/MagicLinkSignInScreen-DSCcYkfy.js +12 -0
  23. package/dist/assets/{MobileAppDrawer-BPYh3fz7.js → MobileAppDrawer-DSwbMXYq.js} +1 -1
  24. package/dist/assets/NotFoundScreen-DaDxz3Zq.js +1 -0
  25. package/dist/assets/{NotificationRoutes-CM26Uc2-.js → NotificationRoutes-DlUwzF5Z.js} +1 -1
  26. package/dist/assets/{OAuthConsentScreen-OutOQhzE.js → OAuthConsentScreen-BQwxsDot.js} +1 -1
  27. package/dist/assets/{PandLWithForecastRoutes-B0qogd0A.js → PandLWithForecastRoutes-D3okgigP.js} +1 -1
  28. package/dist/assets/{PeopleRoutes-CUTyVwx1.js → PeopleRoutes-De0hcTG9.js} +2 -2
  29. package/dist/assets/{PerformanceRoutes-12eFPdp_.js → PerformanceRoutes-C_ycbWFc.js} +1 -1
  30. package/dist/assets/{Preview-DIHwHgF2.js → Preview-JiizEL_C.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-D87ZntTL.js → QBOConnectionScreen-BOOiYmna.js} +1 -1
  32. package/dist/assets/ReferralListScreen-Cv0fhFUv.js +5 -0
  33. package/dist/assets/ReimbursementApprovalRoutes-hf0qddAB.js +1 -0
  34. package/dist/assets/ReimbursementApprovalRuleDetailScreen-BTAascVp.js +1 -0
  35. package/dist/assets/{ReimbursementRoutes-DSyBtaLh.js → ReimbursementRoutes-7HSI61Wk.js} +5 -5
  36. package/dist/assets/{ReportsRoutes-CrvdJeby.js → ReportsRoutes-BB28RWU5.js} +1 -1
  37. package/dist/assets/{RewardsRoutes-DYWFgTvw.js → RewardsRoutes-DVcld8aj.js} +1 -1
  38. package/dist/assets/ScreenRoutes-CFaDbJ8O.js +2 -0
  39. package/dist/assets/{SettingsRoutes-D-CGv9n3.js → SettingsRoutes-D4--hBRA.js} +1 -1
  40. package/dist/assets/{SetupPagesScreen-Bfb-yG5Q.js → SetupPagesScreen-Cl6654uo.js} +1 -1
  41. package/dist/assets/SignInScreen-DovpkvtQ.js +1 -0
  42. package/dist/assets/SignOutScreen-BwLbw69y.js +9 -0
  43. package/dist/assets/{TaskListScreen-SFzbbBq2.js → TaskListScreen-Cc1704_o.js} +2 -2
  44. package/dist/assets/{TaskRoutes-CgfIdOfE.js → TaskRoutes-COfhZO9a.js} +1 -1
  45. package/dist/assets/{TransactionDetailRoutes-BX1iNIyW.js → TransactionDetailRoutes-BLjycMRi.js} +1 -1
  46. package/dist/assets/{TransactionDetailScreen-bJ4okRq5.js → TransactionDetailScreen-DuwJpwyK.js} +1 -1
  47. package/dist/assets/{TransactionListRoutes-C7_m6Yqx.js → TransactionListRoutes-B6GnstS7.js} +1 -1
  48. package/dist/assets/{TreasuryRoutes-CueVe1jr.js → TreasuryRoutes-CHZyInsw.js} +6 -6
  49. package/dist/assets/{VendorsRoutes-DrErfdsR.js → VendorsRoutes-DlVyqp0b.js} +1 -1
  50. package/dist/assets/WiseConfirmationScreen-CeC5ER-6.js +12 -0
  51. package/dist/assets/{ZeniAccountRoutes-_K25ghKx.js → ZeniAccountRoutes-DggTbH7A.js} +9 -9
  52. package/dist/assets/ZeniAccountStatementScreen-CU1luGN8.js +9 -0
  53. package/dist/assets/{accountMappingHelper-BSLlTYQH.js → accountMappingHelper-BfrLGhoG.js} +1 -1
  54. package/dist/assets/{analytics-BHHyMpuV.js → analytics-CQmVOD4d.js} +1 -1
  55. package/dist/assets/{analyticsHelper-BsjRdUZX.js → analyticsHelper-BcD2hj7Q.js} +1 -1
  56. package/dist/assets/{core-CLKYLs-8.js → core-CbpoBsNm.js} +1 -1
  57. package/dist/assets/{decodeURIComponentSafe-Bm32N7cj.js → decodeURIComponentSafe-9Mzf3G8U.js} +1 -1
  58. package/dist/assets/{dnd-BgEYAbRi.js → dnd-CX5suNP6.js} +1 -1
  59. package/dist/assets/{empty-CwSgGrxu.js → empty-BijKctOw.js} +1 -1
  60. package/dist/assets/{empty-DdtYEopm.js → empty-DhAifQ6-.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-D6kbFw8A.js → emptyVideoElement-D-mIIbkx.js} +1 -1
  62. package/dist/assets/epic-D_RLnD_Y.js +2 -0
  63. package/dist/assets/{getLocaleForTenant-C_VQis3o.js → getLocaleForTenant-DvFF548D.js} +1 -1
  64. package/dist/assets/{index-DR5HeC7u.js → index-B781xFYL.js} +2 -2
  65. package/dist/assets/{index-UrW8im9e.js → index-Bg6fgf4p.js} +1 -1
  66. package/dist/assets/{index-Dr5dodMd.js → index-CR_Xz42r.js} +1 -1
  67. package/dist/assets/{index-CTH1zZXf.js → index-CTRa-Eva.js} +1 -1
  68. package/dist/assets/{index-D_hiFYsE.js → index-CoMuhThK.js} +11456 -11456
  69. package/dist/assets/{index-CtRgwYlG.js → index-D-GsKzyX.js} +1 -1
  70. package/dist/assets/{index-DxSdRLh_.js → index-Mdt1gUpR.js} +1 -1
  71. package/dist/assets/{index-BzKXgra3.js → index-cXBO33fb.js} +1 -1
  72. package/dist/assets/{lexical-DN4b_Twn.js → lexical-BS7d_1CV.js} +1 -1
  73. package/dist/assets/{liveblocks-B6jAIe9x.js → liveblocks-BLlSTcoD.js} +1 -1
  74. package/dist/assets/{lottie-C38Bn-X6.js → lottie-BY8e0Ufw.js} +1 -1
  75. package/dist/assets/{mui-AZmtqUsi.js → mui-DcNGd9L2.js} +1 -1
  76. package/dist/assets/{pathToGoBack-ogdURlZM.js → pathToGoBack-C2QnAeVh.js} +1 -1
  77. package/dist/assets/{pdf-BzNDzZ8_.js → pdf-BslZhgI8.js} +4 -4
  78. package/dist/assets/{pdf-lib-0dW_LSbG.js → pdf-lib-BxiXr152.js} +1 -1
  79. package/dist/assets/{plaid-2Q72y6JT.js → plaid-B62punae.js} +1 -1
  80. package/dist/assets/{pusher-DsUo-9K1.js → pusher-yI34WBaU.js} +1 -1
  81. package/dist/assets/{react-DsxTC2P5.js → react-BhNVTcBK.js} +1 -1
  82. package/dist/assets/{react-C_zFJEm7.js → react-Bxt57-xI.js} +1 -1
  83. package/dist/assets/{react-DoYlyteP.js → react-CcJOgdcP.js} +1 -1
  84. package/dist/assets/{react-Ckos0IeG.js → react-D4d29E8H.js} +1 -1
  85. package/dist/assets/{react-BvYGWaT4.js → react-DP_wuGKo.js} +1 -1
  86. package/dist/assets/{react-BpYPYN78.js → react-bALoVfnT.js} +1 -1
  87. package/dist/assets/{recharts-CyaYjFwn.js → recharts-C0aThBg3.js} +1 -1
  88. package/dist/assets/{routePaths-XSngD1ow.js → routePaths-BqMV9loV.js} +1 -1
  89. package/dist/assets/{sentry-95bdnR3R.js → sentry-D_xp3E3Q.js} +1 -1
  90. package/dist/assets/{url-Br2V-Pa5.js → url-Cn_1-HsX.js} +1 -1
  91. package/dist/assets/{url-C5803Pxi.js → url-DZdoYQOC.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CmgL0oiB.js → useAiCfoDashboardSuggestedQuestionsChips-Bw1l6HHU.js} +1 -1
  93. package/dist/assets/useAskAiCfoHostNavButtonProps-Dkub9Q1g.js +1 -0
  94. package/dist/assets/{useCashManagementBanner-Dy5XCSd3.js → useCashManagementBanner-zmolS1ux.js} +1 -1
  95. package/dist/assets/{useDeviceId-B5LKCqFY.js → useDeviceId-BX67JldO.js} +1 -1
  96. package/dist/assets/{useInitialThreadRequest-D1F5GLCG.js → useInitialThreadRequest-DKCJ4fRp.js} +1 -1
  97. package/dist/assets/{utils-CDpOkGne.js → utils-BQO84dIV.js} +1 -1
  98. package/dist/assets/{withTransactionSidePanel-kr0tYyxP.js → withTransactionSidePanel-DzEVaF52.js} +1 -1
  99. package/dist/assets/{zeni-epic-state-CjQblqOQ.js → zeni-epic-state-CkeDRiud.js} +3 -3
  100. package/dist/index.html +1 -1
  101. package/package.json +3 -3
  102. package/dist/assets/AddressRoutes-B9BoI8Fv.js +0 -1
  103. package/dist/assets/AddressScreen-BRdhnUB3.js +0 -9
  104. package/dist/assets/BillPayApprovalRoutes-BrRYqqLJ.js +0 -1
  105. package/dist/assets/CompanyPassportScreen-DUlm9sdh.js +0 -1
  106. package/dist/assets/CustomerOnboardingAuthScreen-BQyQByde.js +0 -1
  107. package/dist/assets/DrawerScreen-KqrF4Sq7.js +0 -1
  108. package/dist/assets/EntityDetailRoutes-COXR1SAJ.js +0 -1
  109. package/dist/assets/FeaturePreviewScreen-CNGfajWs.js +0 -1
  110. package/dist/assets/MagicLinkSignInScreen-iqOI3pqv.js +0 -12
  111. package/dist/assets/NotFoundScreen-ChEBjJeL.js +0 -1
  112. package/dist/assets/ReferralListScreen-BsBo666O.js +0 -5
  113. package/dist/assets/ReimbursementApprovalRoutes-ClbZ-O2b.js +0 -1
  114. package/dist/assets/ReimbursementApprovalRuleDetailScreen-D_Tk1V_u.js +0 -1
  115. package/dist/assets/ScreenRoutes-BE5zmBx7.js +0 -2
  116. package/dist/assets/SignInScreen-DKI-p16g.js +0 -1
  117. package/dist/assets/SignOutScreen-C2_s3moc.js +0 -9
  118. package/dist/assets/WiseConfirmationScreen-DrQXGVBy.js +0 -12
  119. package/dist/assets/ZeniAccountStatementScreen-Be29Xc0Q.js +0 -9
  120. package/dist/assets/epic-DZb8kqBH.js +0 -2
  121. package/dist/assets/useAskAiCfoHostNavButtonProps-FETbJUjN.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as d}from"./liveblocks-B6jAIe9x.js";import{i as K,j as S,g as H,u as z,h as W,n as te,k as ca,o as Ct,p as w}from"./core-CLKYLs-8.js";import{eW as U,MQ as Xe,bE as la,bq as Oe,O2 as Pn,iV as Fn,O3 as Zt,O4 as Rn,iY as kt,O5 as Qe,O6 as Bn,j1 as jn,O7 as Qt,O8 as Mn,j5 as St,O9 as He,Oa as Ln,cp as vt,Ob as Un,Oc as Gn,N8 as Vn,jZ as Yn,Od as Nn,bn as Ge,Oe as da,ME as ie,bc as ua,kb as ma,oc as pa,jW as ha,MG as ce,MF as ee,eV as fa,fp as $n,g1 as _t,Of as zn,Og as Kn,Oh as ga,Oi as Be,vB as Ve,vC as Ye,vZ as xe,vT as le,vG as Ne,Oj as qn,Ok as Zn,Ol as Qn,Om as ba,On as je,Oo as Hn,dJ as Je,s5 as Ca,Op as Wn,Oq as Xn,Or as Jn,Os as At,M2 as It,kr as De,w5 as Et,sd as eo,Ot as to,vD as Ht,s8 as Ee,s4 as ka,Ou as ge,Ov as ao,Ow as Tt,M1 as Ot,u4 as Sa,Ox as no,Oy as oo,Oz as so,OA as xt,uh as ro,OB as io,vF as Wt,u3 as _a,OC as be,OD as co,bt as ya,w9 as va,OE as lo,OF as uo,OG as mo,OH as Dt,w4 as po,OI as ho,vE as Xt,w8 as Aa,OJ as Ce,OK as fo,OL as go,OM as Ia,kg as Ea,o9 as Ta,kl as Oa,o7 as xa,o6 as Da,o5 as wa,ts as bo,fT as Co,cS as ko,cT as So,o2 as _o,fP as yo,oj as vo,Ge as ut,G6 as Ao,Ga as Io,ON as Eo,OO as To,OP as Oo,b5 as et,fH as xo,hD as Do,gh as wo,od as Po,jP as Fo,oa as Ro,o8 as Bo,fB as jo,fz as Mo}from"./zeni-epic-state-CjQblqOQ.js";import{z as M,a2 as ae,r as x,c as O,D as q,aV as Lo,_ as $e,A as ze,aW as Pa,e as N,aX as Uo,j as Se,aY as Fa,F as _e,x as R,m as Go,aZ as Vo,a_ as Yo,W as Ra,K as Ba,a as ja,Z as No,a$ as $o,U as zo,aN as Ma,$ as oe,b0 as La,b1 as Ua,a1 as Ga,b2 as Ko,b3 as qo,aq as Zo,n as Qo,X as Ho,b4 as Wo,b5 as Xo,b6 as Jo,b7 as es,b8 as ke}from"./index-D_hiFYsE.js";import{n as wt}from"./mui-AZmtqUsi.js";import{a as b}from"./sentry-95bdnR3R.js";import{w as Va}from"./withTransactionSidePanel-kr0tYyxP.js";import{c as Ya,t as we,f as de,a as Pt,v as ts}from"./routePaths-XSngD1ow.js";import{u as ne}from"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import Ue from"./NotFoundScreen-ChEBjJeL.js";import{u as Ft}from"./useInitialThreadRequest-D1F5GLCG.js";import{t as Na}from"./analyticsHelper-BsjRdUZX.js";import{C as as}from"./CompanyPassportScreen-DUlm9sdh.js";import{u as ns}from"./useAiCfoDashboardSuggestedQuestionsChips-CmgL0oiB.js";import{F as os}from"./FeaturePreviewScreen-CNGfajWs.js";import{R as ss}from"./ReferralListScreen-BsBo666O.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.js";import"./TransactionDetailScreen-bJ4okRq5.js";import"./decodeURIComponentSafe-Bm32N7cj.js";import"./MobileAppDrawer-BPYh3fz7.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]="ed8f03a8-f335-421e-8b96-bdb9a245366a",e._sentryDebugIdIdentifier="sentry-dbid-ed8f03a8-f335-421e-8b96-bdb9a245366a")}catch{}})();const rs=Va(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=M.getSignedInUser(),i=S(v=>v.tenantState.currentTenantId),c=S(v=>U(v)),{tenantEmailDomain:m}=K(),g=H(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),h=b.useMemo(()=>r!=null?la(r):Oe(),[r]),p=z(),f=W(),A=S(v=>Pn(v,h,o)),I=b.useCallback(()=>{o!=null&&A.fetchState!=="In-Progress"&&A.fetchState!=="Completed"&&p(Fn(o,h))},[h]),_=b.useCallback(()=>{f("../../",{relative:"path"})},[]),T=b.useCallback((v,B)=>{p(Zt({sortKey:v,sortOrder:B}))},[]),E=b.useCallback(v=>{p(Zt({downloadState:v}))},[]),L=b.useCallback(v=>{if(e)e(v.transactionId,v.transactionType);else if(m!=null){const B=Ya({id:v.transactionId,type:v.transactionType},m);f(B);const X=x(g.state?.pathnameStackToGoBack,g.pathname);f(B,{state:{pathnameStackToGoBack:X}})}},[m,e]),k=b.useCallback(()=>{A.vendor!=null&&O.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),A.vendor.id,A.vendor.name)},[A.vendor,h]);return b.useEffect(()=>{I()},[]),b.useEffect(()=>{A.fetchState==="Completed"&&k()},[k,A.fetchState]),d.jsx(Lo,{apAgingDetail:A,downloadParams:l,reportDate:h,analytics:O,onTransactionClick:L,onReload:I,onBackClick:_,onColumnSortConfigChanged:T,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),is=()=>{const e=z(),a=W(),t=S(T=>Rn(T)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AP Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=M.getSignedInUser(),s=S(T=>T.tenantState.currentTenantId),i=S(T=>U(T)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),C=t.apAgingUIState.selectedDate??Oe(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(kt(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(T=>{e(Qe({searchString:T}))},[]),p=b.useCallback((T,E)=>{e(Qe({sortKey:E,sortOrder:T}))},[]),f=b.useCallback(T=>{a(`./${T}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),A=b.useCallback(T=>{e(Qe({downloadState:T}))},[]),I=b.useCallback((T,E)=>{},[]),_=b.useCallback((T,E)=>{e(Qe({selectedDate:T,agingDateSelectionType:E})),e(kt(T))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:O,onLoad:T=>T.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Pa,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:O,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:A,onSelectedDateChanged:_,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},cs=Va(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=M.getSignedInUser(),i=S(k=>U(k)),{tenantEmailDomain:c}=K(),m=H(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),l=b.useMemo(()=>r!=null?la(r):Oe(),[r]),h=z(),p=W(),f=S(k=>Bn(k,l,o)),A=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(jn(o,l))},[l]),I=b.useCallback(()=>{p("../../",{relative:"path"})},[]),_=b.useCallback((k,v)=>{h(Qt({sortKey:k,sortOrder:v}))},[]),T=b.useCallback(k=>{h(Qt({downloadState:k}))},[]),E=b.useCallback(k=>{if(e)e(k.transactionId,k.transactionType);else if(c!=null){const v=Ya({id:k.transactionId,type:k.transactionType},c);p(v);const B=x(m.state?.pathnameStackToGoBack,m.pathname);p(v,{state:{pathnameStackToGoBack:B}})}},[c,e]),L=b.useCallback(()=>{f.customer!=null&&O.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{A()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&L()},[f.fetchState,L]),d.jsx(Uo,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:O,onTransactionClick:E,onReload:A,onBackClick:I,onColumnSortConfigChanged:_,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ls=()=>{const e=z(),a=W(),t=S(_=>Mn(_)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AR Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=M.getSignedInUser(),s=S(_=>U(_)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),g=t.arAgingUIState.selectedDate??Oe(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(St(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(_=>{e(He({searchString:_}))},[]),h=b.useCallback((_,T)=>{e(He({sortKey:T,sortOrder:_}))},[]),p=b.useCallback(_=>{a(`./${_}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(_=>{e(He({downloadState:_}))},[]),A=b.useCallback((_,T)=>{e(He({selectedDate:_,agingDateSelectionType:T})),e(St(_))},[]),I=b.useCallback((_,T)=>{e(Ln({nodeId:_,isCollapsed:T}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:O,onLoad:_=>_.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Pa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:O,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:A,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},$a=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function za(e,a){const t=Vn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=we(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Yn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?O.trackZeniAccountsCashBalancePromoClicked("Move Money"):(O.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else O.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const ds=te(function(e){const a=Un(e).accountsInOrder.map((n,o)=>$a(n,o)),t=Gn(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:O}},za)(Fa),us=te(function(e){const a=Nn(e).accountsInOrder.map((o,r)=>$a(o,r)),t=M.getSignedInUser(),n=Ge(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:O}},za)(Fa);function ms(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=Se(),o=S(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=vt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(ds,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function ps(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=Se(),o=vt(n?.loggedInUserRoleMap),r=S(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(us,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const hs=wt.div`
1
+ import{j as d}from"./liveblocks-BLlSTcoD.js";import{i as K,j as S,g as H,u as z,h as W,n as te,k as ca,o as Ct,p as w}from"./core-CbpoBsNm.js";import{eW as U,MQ as Xe,bE as la,bq as Oe,O2 as Pn,iV as Fn,O3 as Zt,O4 as Rn,iY as kt,O5 as Qe,O6 as Bn,j1 as jn,O7 as Qt,O8 as Mn,j5 as St,O9 as He,Oa as Ln,cp as vt,Ob as Un,Oc as Gn,N8 as Vn,jZ as Yn,Od as Nn,bn as Ge,Oe as da,ME as ie,bc as ua,kb as ma,oc as pa,jW as ha,MG as ce,MF as ee,eV as fa,fp as $n,g1 as _t,Of as zn,Og as Kn,Oh as ga,Oi as Be,vB as Ve,vC as Ye,vZ as xe,vT as le,vG as Ne,Oj as qn,Ok as Zn,Ol as Qn,Om as ba,On as je,Oo as Hn,dJ as Je,s5 as Ca,Op as Wn,Oq as Xn,Or as Jn,Os as At,M2 as It,kr as De,w5 as Et,sd as eo,Ot as to,vD as Ht,s8 as Ee,s4 as ka,Ou as ge,Ov as ao,Ow as Tt,M1 as Ot,u4 as Sa,Ox as no,Oy as oo,Oz as so,OA as xt,uh as ro,OB as io,vF as Wt,u3 as _a,OC as be,OD as co,bt as ya,w9 as va,OE as lo,OF as uo,OG as mo,OH as Dt,w4 as po,OI as ho,vE as Xt,w8 as Aa,OJ as Ce,OK as fo,OL as go,OM as Ia,kg as Ea,o9 as Ta,kl as Oa,o7 as xa,o6 as Da,o5 as wa,ts as bo,fT as Co,cS as ko,cT as So,o2 as _o,fP as yo,oj as vo,Ge as ut,G6 as Ao,Ga as Io,ON as Eo,OO as To,OP as Oo,b5 as et,fH as xo,hD as Do,gh as wo,od as Po,jP as Fo,oa as Ro,o8 as Bo,fB as jo,fz as Mo}from"./zeni-epic-state-CkeDRiud.js";import{z as M,a2 as ae,s as x,d as O,D as q,aV as Lo,_ as $e,A as ze,aW as Pa,f as N,aX as Uo,j as Se,aY as Fa,F as _e,x as R,m as Go,aZ as Vo,a_ as Yo,W as Ra,K as Ba,a as ja,Z as No,a$ as $o,U as zo,aN as Ma,$ as oe,b0 as La,b1 as Ua,a1 as Ga,b2 as Ko,b3 as qo,aq as Zo,p as Qo,X as Ho,b4 as Wo,b5 as Xo,b6 as Jo,b7 as es,b8 as ke}from"./index-CoMuhThK.js";import{n as wt}from"./mui-DcNGd9L2.js";import{a as b}from"./sentry-D_xp3E3Q.js";import{w as Va}from"./withTransactionSidePanel-DzEVaF52.js";import{c as Ya,t as we,f as de,a as Pt,v as ts}from"./routePaths-BqMV9loV.js";import{u as ne}from"./useAskAiCfoHostNavButtonProps-Dkub9Q1g.js";import Ue from"./NotFoundScreen-DaDxz3Zq.js";import{u as Ft}from"./useInitialThreadRequest-DKCJ4fRp.js";import{t as Na}from"./analyticsHelper-BcD2hj7Q.js";import{C as as}from"./CompanyPassportScreen-DBSTWMtn.js";import{u as ns}from"./useAiCfoDashboardSuggestedQuestionsChips-Bw1l6HHU.js";import{F as os}from"./FeaturePreviewScreen-DruJFyVL.js";import{R as ss}from"./ReferralListScreen-Cv0fhFUv.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";import"./TransactionDetailScreen-DuwJpwyK.js";import"./decodeURIComponentSafe-9Mzf3G8U.js";import"./MobileAppDrawer-DSwbMXYq.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]="944cfd08-58ea-4dcd-a471-2d4cb6c244bf",e._sentryDebugIdIdentifier="sentry-dbid-944cfd08-58ea-4dcd-a471-2d4cb6c244bf")}catch{}})();const rs=Va(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=M.getSignedInUser(),i=S(v=>v.tenantState.currentTenantId),c=S(v=>U(v)),{tenantEmailDomain:m}=K(),g=H(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),h=b.useMemo(()=>r!=null?la(r):Oe(),[r]),p=z(),f=W(),A=S(v=>Pn(v,h,o)),I=b.useCallback(()=>{o!=null&&A.fetchState!=="In-Progress"&&A.fetchState!=="Completed"&&p(Fn(o,h))},[h]),_=b.useCallback(()=>{f("../../",{relative:"path"})},[]),T=b.useCallback((v,B)=>{p(Zt({sortKey:v,sortOrder:B}))},[]),E=b.useCallback(v=>{p(Zt({downloadState:v}))},[]),L=b.useCallback(v=>{if(e)e(v.transactionId,v.transactionType);else if(m!=null){const B=Ya({id:v.transactionId,type:v.transactionType},m);f(B);const X=x(g.state?.pathnameStackToGoBack,g.pathname);f(B,{state:{pathnameStackToGoBack:X}})}},[m,e]),k=b.useCallback(()=>{A.vendor!=null&&O.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),A.vendor.id,A.vendor.name)},[A.vendor,h]);return b.useEffect(()=>{I()},[]),b.useEffect(()=>{A.fetchState==="Completed"&&k()},[k,A.fetchState]),d.jsx(Lo,{apAgingDetail:A,downloadParams:l,reportDate:h,analytics:O,onTransactionClick:L,onReload:I,onBackClick:_,onColumnSortConfigChanged:T,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),is=()=>{const e=z(),a=W(),t=S(T=>Rn(T)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AP Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=M.getSignedInUser(),s=S(T=>T.tenantState.currentTenantId),i=S(T=>U(T)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),C=t.apAgingUIState.selectedDate??Oe(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(kt(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(T=>{e(Qe({searchString:T}))},[]),p=b.useCallback((T,E)=>{e(Qe({sortKey:E,sortOrder:T}))},[]),f=b.useCallback(T=>{a(`./${T}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),A=b.useCallback(T=>{e(Qe({downloadState:T}))},[]),I=b.useCallback((T,E)=>{},[]),_=b.useCallback((T,E)=>{e(Qe({selectedDate:T,agingDateSelectionType:E})),e(kt(T))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:O,onLoad:T=>T.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Pa,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:O,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:A,onSelectedDateChanged:_,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},cs=Va(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=M.getSignedInUser(),i=S(k=>U(k)),{tenantEmailDomain:c}=K(),m=H(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),l=b.useMemo(()=>r!=null?la(r):Oe(),[r]),h=z(),p=W(),f=S(k=>Bn(k,l,o)),A=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(jn(o,l))},[l]),I=b.useCallback(()=>{p("../../",{relative:"path"})},[]),_=b.useCallback((k,v)=>{h(Qt({sortKey:k,sortOrder:v}))},[]),T=b.useCallback(k=>{h(Qt({downloadState:k}))},[]),E=b.useCallback(k=>{if(e)e(k.transactionId,k.transactionType);else if(c!=null){const v=Ya({id:k.transactionId,type:k.transactionType},c);p(v);const B=x(m.state?.pathnameStackToGoBack,m.pathname);p(v,{state:{pathnameStackToGoBack:B}})}},[c,e]),L=b.useCallback(()=>{f.customer!=null&&O.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{A()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&L()},[f.fetchState,L]),d.jsx(Uo,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:O,onTransactionClick:E,onReload:A,onBackClick:I,onColumnSortConfigChanged:_,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ls=()=>{const e=z(),a=W(),t=S(_=>Mn(_)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AR Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=M.getSignedInUser(),s=S(_=>U(_)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),g=t.arAgingUIState.selectedDate??Oe(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(St(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(_=>{e(He({searchString:_}))},[]),h=b.useCallback((_,T)=>{e(He({sortKey:T,sortOrder:_}))},[]),p=b.useCallback(_=>{a(`./${_}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(_=>{e(He({downloadState:_}))},[]),A=b.useCallback((_,T)=>{e(He({selectedDate:_,agingDateSelectionType:T})),e(St(_))},[]),I=b.useCallback((_,T)=>{e(Ln({nodeId:_,isCollapsed:T}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:O,onLoad:_=>_.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Pa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:O,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:A,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},$a=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function za(e,a){const t=Vn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=we(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Yn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?O.trackZeniAccountsCashBalancePromoClicked("Move Money"):(O.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else O.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const ds=te(function(e){const a=Un(e).accountsInOrder.map((n,o)=>$a(n,o)),t=Gn(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:O}},za)(Fa),us=te(function(e){const a=Nn(e).accountsInOrder.map((o,r)=>$a(o,r)),t=M.getSignedInUser(),n=Ge(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:O}},za)(Fa);function ms(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=Se(),o=S(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=vt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(ds,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function ps(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=Se(),o=vt(n?.loggedInUserRoleMap),r=S(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(us,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const hs=wt.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -1 +1 @@
1
- import{j as v}from"./liveblocks-B6jAIe9x.js";import{a as u}from"./sentry-95bdnR3R.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-CLKYLs-8.js";import{Lw as N,eW as _,f$ as U,Lx as k,o4 as R,Ly as z}from"./zeni-epic-state-CjQblqOQ.js";import{u as $,z as f,L as T,t as I,D as j,b as O}from"./index-D_hiFYsE.js";import"./mui-AZmtqUsi.js";import{t as P}from"./getLocaleForTenant-C_VQis3o.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="88cabf6f-cb71-49a7-80a8-42b2c8500748",t._sentryDebugIdIdentifier="sentry-dbid-88cabf6f-cb71-49a7-80a8-42b2c8500748")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=O(c,p);return v.jsx(L,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=$(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!k(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],G={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-BLlSTcoD.js";import{a as u}from"./sentry-D_xp3E3Q.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-CbpoBsNm.js";import{Lw as N,eW as _,f$ as U,Lx as k,o4 as R,Ly as z}from"./zeni-epic-state-CkeDRiud.js";import{u as $,z as f,L as T,t as I,D as j,b as O}from"./index-CoMuhThK.js";import"./mui-DcNGd9L2.js";import{t as P}from"./getLocaleForTenant-DvFF548D.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="88cabf6f-cb71-49a7-80a8-42b2c8500748",t._sentryDebugIdIdentifier="sentry-dbid-88cabf6f-cb71-49a7-80a8-42b2c8500748")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=O(c,p);return v.jsx(L,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=$(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!k(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],G={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-B6jAIe9x.js";import{h as w,g as C,j as h,n as P,i as B}from"./core-CLKYLs-8.js";import{Px as k,PE as W,gf as K,ge as M,gd as q,jo as J,MF as L,ro as Q,eW as V,P3 as D,jm as F,Py as S,PH as T,jk as j,jH as G}from"./zeni-epic-state-CjQblqOQ.js";import{bw as X,K as R,F as N,z as U,m as H,n as p,x as v,B as O,bx as Y,o as Z,by as ee,r as te}from"./index-D_hiFYsE.js";import{n as z}from"./mui-AZmtqUsi.js";import"./sentry-95bdnR3R.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]="9ec5cafc-2f0d-467d-9b97-0097c6369357",e._sentryDebugIdIdentifier="sentry-dbid-9ec5cafc-2f0d-467d-9b97-0097c6369357")}catch{}})();const ne=P(null,function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(q(n,"BillPayVendor"))},onResendOtp:n=>{e(M(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(K(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(W(n,a,o))}}})(X);function _({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=z.div`
1
+ import{j as l}from"./liveblocks-BLlSTcoD.js";import{h as w,g as C,j as h,n as P,i as B}from"./core-CbpoBsNm.js";import{Px as k,PE as W,gf as K,ge as M,gd as q,jo as J,MF as L,ro as Q,eW as V,P3 as D,jm as F,Py as S,PH as T,jk as j,jH as G}from"./zeni-epic-state-CkeDRiud.js";import{bw as X,K as R,F as N,z as U,m as H,p,x as v,B as O,bx as Y,o as Z,by as ee,s as te}from"./index-CoMuhThK.js";import{n as z}from"./mui-DcNGd9L2.js";import"./sentry-D_xp3E3Q.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]="b6bc405c-b9dd-4e80-b845-76e2f5c05e8f",e._sentryDebugIdIdentifier="sentry-dbid-b6bc405c-b9dd-4e80-b845-76e2f5c05e8f")}catch{}})();const ne=P(null,function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(q(n,"BillPayVendor"))},onResendOtp:n=>{e(M(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(K(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(W(n,a,o))}}})(X);function _({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=z.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -0,0 +1 @@
1
+ import{j as i}from"./liveblocks-BLlSTcoD.js";import{K as l,G as f,m as c}from"./index-CoMuhThK.js";import{D as b}from"./mui-DcNGd9L2.js";import"./sentry-D_xp3E3Q.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]="bd20cb5d-175f-4865-8979-3e4a3ab496bf",e._sentryDebugIdIdentifier="sentry-dbid-bd20cb5d-175f-4865-8979-3e4a3ab496bf")}catch{}})();const p={drawerLeftMargin:new f(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=l(),s=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),d=c();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{m as D};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-BLlSTcoD.js";import{a as d}from"./sentry-D_xp3E3Q.js";import{h as A,u as B,g as G,i as q,j as l,N as F,n as M,o as O,p as W}from"./core-CbpoBsNm.js";import{NN as _,eW as J,N9 as R,lr as Y,JO as b,NS as $,ME as z,kr as V,JP as S,Ne as H,Nf as K,MG as L,MF as Q}from"./zeni-epic-state-CkeDRiud.js";import{aS as U,d as X,p as Z,s as tt}from"./index-CoMuhThK.js";import"./mui-DcNGd9L2.js";import{d as k}from"./decodeURIComponentSafe-9Mzf3G8U.js";import{w as et}from"./withTransactionSidePanel-DzEVaF52.js";import{f as at,c as nt}from"./routePaths-BqMV9loV.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";import"./useAskAiCfoHostNavButtonProps-Dkub9Q1g.js";import"./TransactionDetailScreen-DuwJpwyK.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="404f0bf1-55eb-4445-93f0-55e46e030512",a._sentryDebugIdIdentifier="sentry-dbid-404f0bf1-55eb-4445-93f0-55e46e030512")}catch{}})();const ot=M(function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:V(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(K()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(b(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:N}=q(),r=k(x??""),f=k(N??""),p=rt(r,f),j=[r,f].filter(n=>n!=null),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=l(n=>J(n).company?.companyInfo.firstMonthOfFY??1),u=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&p===!0&&(T(!0),o(Y(i)))},[m,p,i]);const E=l(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??g,w=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(b(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:I(j.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(O,{children:s.jsx(W,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
@@ -1,4 +1,4 @@
1
- import{j as h}from"./liveblocks-B6jAIe9x.js";import oa from"./NotFoundScreen-ChEBjJeL.js";import{a as o,b as Jt}from"./sentry-95bdnR3R.js";import{n as Ue,S as sa}from"./mui-AZmtqUsi.js";import{u as pe,h as Yt,g as Ke,j as P,n as ca,i as Pt,o as ia,p as Ge}from"./core-CLKYLs-8.js";import{eW as Re,Sz as la,oe as Ee,fW as ra,r$ as da,ow as Kt,oR as Qt,SA as Wt,o$ as ua,SB as Zt,op as ma,rx as pa,fG as Ie,SC as De,tZ as Ht,E7 as Xt,SD as en,SE as ha,r5 as Qe,NO as xt,NQ as Sa,ku as ga,NR as Ca,kB as fa,c_ as Ia,v9 as We,oC as tn,p4 as Fe,ou as de,SF as Ea,MG as Rt,MF as we,SG as Dt,kS as ka,SH as ya,SI as ba,SJ as Ta,SK as va,oJ as Aa,p7 as Pe,SL as wa,SM as Pa,SN as xa,pe as Ra,kF as Da,kw as Fa,SO as Ua,kE as Ft,NY as Ba,SP as _a,SQ as Oa,r1 as Va,qF as za,p5 as me,qE as Ne,SR as Ma,SS as ja,ST as La,m9 as $a,bq as qa,m4 as Ut,lS as Ga,SU as Na,fw as Bt,gv as Ja,m1 as Ya,x2 as Ka,SV as Qa,pF as Wa,pA as Za,pE as Ha,pp as Xa,SW as eo,fJ as nn,oU as to,oF as no,fX as _t,p9 as ao,SX as oo,SY as so,p6 as an,SZ as co,S_ as io,S$ as lo,T0 as ro,T1 as Ot,rd as uo,qw as mo,ME as po,T2 as ho,T3 as So,kD as go,T4 as Co,IP as fo,kC as Io,kr as Eo,fI as ko,q2 as on,qo as yo,p3 as Vt,p8 as bo,bE as To,l_ as vo,lX as Ao,T5 as wo,po as zt,qk as Mt,qi as Po,T6 as xo,q7 as Ro,pP as Do,ql as Fo,T7 as Uo,T8 as Bo,pT as _o,T9 as Oo,pK as Vo,pS as zo,pQ as Mo,qr as jo}from"./zeni-epic-state-CjQblqOQ.js";import{F as sn,x as X,c as q,r as ae,X as cn,_ as ln,cX as Lo,z as Be,cY as $o,at as xe,cZ as qo,aU as jt,B as rn,c_ as Go,aq as Je,D as No,a7 as Jo,c$ as Yo,a2 as Ko,d0 as Qo,W as Wo,d1 as Zo,d2 as Ho,w as Xo,j as es,aN as ts,d3 as ns,d4 as as,b9 as os,E as ss,aQ as cs}from"./index-D_hiFYsE.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-bJ4okRq5.js";import{w as us}from"./withTransactionSidePanel-kr0tYyxP.js";import{h as ms,v as ps}from"./routePaths-XSngD1ow.js";import{g as Ye}from"./accountMappingHelper-BSLlTYQH.js";import{D as hs}from"./DrawerScreen-KqrF4Sq7.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.js";import"./decodeURIComponentSafe-Bm32N7cj.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]="5399ad0d-1030-452c-95b8-46a4c43a5d73",t._sentryDebugIdIdentifier="sentry-dbid-5399ad0d-1030-452c-95b8-46a4c43a5d73")}catch{}})();const Ss=()=>{const t=pe(),l=Yt(),B=Ke(),f=P(d=>Re(d)),{useFeatureGate:T}=sn(),{isFeatureEnabled:C}=T(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=T(X.aiAuditScorePercentage),I=P(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=P(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),k=o.useCallback((d,G,ee=!1)=>{t(Ee({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),v=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),S=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(S.month,S.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),k(S,f.tenantId,!0)},[k,S,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),x=ae(B.state?.pathnameStackToGoBack,B.pathname),E=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&S!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:x,message:"comingFromOverview"}});l(`./month_end_insights/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:x,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,S]),{areTenantIdsInSync:y}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{S!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&y&&k(S,f.tenantId)},[k,S,s.fetchState,f.tenantId,y]),o.useEffect(()=>{S!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&y&&t(da(S))},[S,s.monthClosePerformanceTrendFetchStatus.fetchState,y]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(gs,{children:h.jsx(Lo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:C,onMonthEndCheckClick:d=>{l(`./${d}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:x,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:E,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},gs=Ue.div`
1
+ import{j as h}from"./liveblocks-BLlSTcoD.js";import oa from"./NotFoundScreen-DaDxz3Zq.js";import{a as o,b as Jt}from"./sentry-D_xp3E3Q.js";import{n as Ue,S as sa}from"./mui-DcNGd9L2.js";import{u as pe,h as Yt,g as Ke,j as P,n as ca,i as Pt,o as ia,p as Ge}from"./core-CbpoBsNm.js";import{eW as Re,Sz as la,oe as Ee,fW as ra,r$ as da,ow as Kt,oR as Qt,SA as Wt,o$ as ua,SB as Zt,op as ma,rx as pa,fG as Ie,SC as De,tZ as Ht,E7 as Xt,SD as en,SE as ha,r5 as Qe,NO as xt,NQ as Sa,ku as ga,NR as Ca,kB as fa,c_ as Ia,v9 as We,oC as tn,p4 as Fe,ou as de,SF as Ea,MG as Rt,MF as we,SG as Dt,kS as ka,SH as ya,SI as ba,SJ as Ta,SK as va,oJ as Aa,p7 as Pe,SL as wa,SM as Pa,SN as xa,pe as Ra,kF as Da,kw as Fa,SO as Ua,kE as Ft,NY as Ba,SP as _a,SQ as Oa,r1 as Va,qF as za,p5 as me,qE as Ne,SR as Ma,SS as ja,ST as La,m9 as $a,bq as qa,m4 as Ut,lS as Ga,SU as Na,fw as Bt,gv as Ja,m1 as Ya,x2 as Ka,SV as Qa,pF as Wa,pA as Za,pE as Ha,pp as Xa,SW as eo,fJ as nn,oU as to,oF as no,fX as _t,p9 as ao,SX as oo,SY as so,p6 as an,SZ as co,S_ as io,S$ as lo,T0 as ro,T1 as Ot,rd as uo,qw as mo,ME as po,T2 as ho,T3 as So,kD as go,T4 as Co,IP as fo,kC as Io,kr as Eo,fI as ko,q2 as on,qo as yo,p3 as Vt,p8 as bo,bE as To,l_ as vo,lX as Ao,T5 as wo,po as zt,qk as Mt,qi as Po,T6 as xo,q7 as Ro,pP as Do,ql as Fo,T7 as Uo,T8 as Bo,pT as _o,T9 as Oo,pK as Vo,pS as zo,pQ as Mo,qr as jo}from"./zeni-epic-state-CkeDRiud.js";import{F as sn,x as X,d as q,s as ae,X as cn,_ as ln,cX as Lo,z as Be,cY as $o,at as xe,cZ as qo,aU as jt,B as rn,c_ as Go,aq as Je,D as No,a7 as Jo,c$ as Yo,a2 as Ko,d0 as Qo,W as Wo,d1 as Zo,d2 as Ho,w as Xo,j as es,aN as ts,d3 as ns,d4 as as,b9 as os,G as ss,aQ as cs}from"./index-CoMuhThK.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-Dkub9Q1g.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-DuwJpwyK.js";import{w as us}from"./withTransactionSidePanel-DzEVaF52.js";import{h as ms,v as ps}from"./routePaths-BqMV9loV.js";import{g as Ye}from"./accountMappingHelper-BfrLGhoG.js";import{D as hs}from"./DrawerScreen-CuqanTdv.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";import"./decodeURIComponentSafe-9Mzf3G8U.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]="139c01fd-9817-462c-9bb6-aa2d09c0f2e5",t._sentryDebugIdIdentifier="sentry-dbid-139c01fd-9817-462c-9bb6-aa2d09c0f2e5")}catch{}})();const Ss=()=>{const t=pe(),l=Yt(),B=Ke(),f=P(d=>Re(d)),{useFeatureGate:T}=sn(),{isFeatureEnabled:C}=T(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=T(X.aiAuditScorePercentage),I=P(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=P(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),k=o.useCallback((d,G,ee=!1)=>{t(Ee({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),v=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),S=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(S.month,S.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),k(S,f.tenantId,!0)},[k,S,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),x=ae(B.state?.pathnameStackToGoBack,B.pathname),E=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&S!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:x,message:"comingFromOverview"}});l(`./month_end_insights/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:x,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,S]),{areTenantIdsInSync:y}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{S!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&y&&k(S,f.tenantId)},[k,S,s.fetchState,f.tenantId,y]),o.useEffect(()=>{S!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&y&&t(da(S))},[S,s.monthClosePerformanceTrendFetchStatus.fetchState,y]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(gs,{children:h.jsx(Lo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:C,onMonthEndCheckClick:d=>{l(`./${d}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:x,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:E,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},gs=Ue.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-BLlSTcoD.js";import{a as r}from"./sentry-D_xp3E3Q.js";import{a3 as f,a4 as l,a5 as p,p as m}from"./index-CoMuhThK.js";import"./mui-DcNGd9L2.js";import c from"./NotFoundScreen-DaDxz3Zq.js";import{h as u,g as b}from"./core-CbpoBsNm.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]="720da2d7-8f85-4925-8f09-ee6187521283",e._sentryDebugIdIdentifier="sentry-dbid-720da2d7-8f85-4925-8f09-ee6187521283")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=f(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1 +1 @@
1
- import{a as r}from"./sentry-95bdnR3R.js";import{u as l,h as f,g as m}from"./core-CLKYLs-8.js";import{hn as p,LU as g,LV as _}from"./zeni-epic-state-CjQblqOQ.js";import{u as b,L as h,z as y}from"./index-D_hiFYsE.js";import"./liveblocks-B6jAIe9x.js";import"./recharts-CyaYjFwn.js";import"./mui-AZmtqUsi.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.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]="9021c12e-8f7e-4581-8b2d-7f221029bc2e",e._sentryDebugIdIdentifier="sentry-dbid-9021c12e-8f7e-4581-8b2d-7f221029bc2e")}catch{}})();function j(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:d}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{j as default};
1
+ import{a as r}from"./sentry-D_xp3E3Q.js";import{u as l,h as f,g as m}from"./core-CbpoBsNm.js";import{hn as p,LU as g,LV as _}from"./zeni-epic-state-CkeDRiud.js";import{u as b,L as h,z as y}from"./index-CoMuhThK.js";import"./liveblocks-BLlSTcoD.js";import"./recharts-C0aThBg3.js";import"./mui-DcNGd9L2.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.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]="9021c12e-8f7e-4581-8b2d-7f221029bc2e",e._sentryDebugIdIdentifier="sentry-dbid-9021c12e-8f7e-4581-8b2d-7f221029bc2e")}catch{}})();function j(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:d}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{j as default};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-B6jAIe9x.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-CLKYLs-8.js";import{LN as k,LO as v,LP as T,AZ as A,AL as G,LQ as L,LR as oe,LS as ie,AP as se,fx as $,AW as le,AT as re}from"./zeni-epic-state-CjQblqOQ.js";import{K as g,o as r,p as de,c as j,h as M,k as ce,n as me,q as pe,r as H,F as ue,x as he,v as xe,w as ge,m as fe,y as we,B as be,A as Se,M as ye,S as ke,C as ve,E as je,H as $e}from"./index-D_hiFYsE.js";import{n as m}from"./mui-AZmtqUsi.js";import f from"./NotFoundScreen-ChEBjJeL.js";import{a as I}from"./sentry-95bdnR3R.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.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]="c98ac92f-1279-4fc7-91ea-ab921651bfa6",e._sentryDebugIdIdentifier="sentry-dbid-c98ac92f-1279-4fc7-91ea-ab921651bfa6")}catch{}})();const Ie=m.div`
1
+ import{j as a}from"./liveblocks-BLlSTcoD.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-CbpoBsNm.js";import{LN as k,LO as v,LP as T,AZ as A,AL as G,LQ as L,LR as oe,LS as se,AP as ie,fx as $,AW as le,AT as re}from"./zeni-epic-state-CkeDRiud.js";import{K as g,o as r,k as de,d as j,h as M,n as ce,p as me,r as pe,s as H,F as ue,x as he,v as xe,w as ge,m as fe,y as we,B as be,A as Se,M as ye,S as ke,C as ve,G as je,H as $e}from"./index-CoMuhThK.js";import{n as m}from"./mui-DcNGd9L2.js";import f from"./NotFoundScreen-DaDxz3Zq.js";import{a as I}from"./sentry-D_xp3E3Q.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.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]="e8557a83-4ec1-448b-b036-85964ca70fab",e._sentryDebugIdIdentifier="sentry-dbid-e8557a83-4ec1-448b-b036-85964ca70fab")}catch{}})();const Ie=m.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -7,7 +7,7 @@ import{j as a}from"./liveblocks-B6jAIe9x.js";import{i as S,n as x,h as C,g as y,
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
9
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=x(function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(A(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(T({data:l}))}}})(de);function F(){const e=g(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Ae=m.div`
10
+ `,Ce=x(function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(A(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(de);function F(){const e=g(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Ae=m.div`
11
11
  display: flex;
12
12
  height: 100vh;
13
13
  width: 100%;
@@ -16,7 +16,7 @@ import{j as a}from"./liveblocks-B6jAIe9x.js";import{i as S,n as x,h as C,g as y,
16
16
  align-items: center;
17
17
  background-color: ${e=>e.theme.colors.grey4};
18
18
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,Le=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:L(e),googleAPIKey:M.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=me(o.state?.pathnameStackToGoBack),s=l.poppedPathname??De();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Pe(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}})(ce);function Be({isSubPage:e}){const t=C(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx(Ae,{windowSize:o,children:a.jsx(Le,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:M.googleMapsAPIKey})})})}const De=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Pe=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),ze=m.div`
19
+ `,Le=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:L(e),googleAPIKey:M.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??De();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function Be({isSubPage:e}){const t=C(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx(Ae,{windowSize:o,children:a.jsx(Le,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:M.googleMapsAPIKey})})})}const De=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Pe=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),ze=m.div`
20
20
  display: flex;
21
21
  height: 100%;
22
22
  width: 100%;
@@ -25,7 +25,7 @@ import{j as a}from"./liveblocks-B6jAIe9x.js";import{i as S,n as x,h as C,g as y,
25
25
  align-items: center;
26
26
  background-color: ${e=>e.theme.colors.grey4};
27
27
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Ne=x(function(e){const t=k(e),n=v(e),o=L(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(T({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),t=y(),n=g(),{vendorId:o,billId:i}=S();return o==null||i==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(ze,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:i})})})}const Fe=m.div`
28
+ `,Ne=x(function(e){const t=k(e),n=v(e),o=L(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(T({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(ze,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
29
  display: flex;
30
30
  height: 100%;
31
31
  width: 100%;
@@ -34,7 +34,7 @@ import{j as a}from"./liveblocks-B6jAIe9x.js";import{i as S,n as x,h as C,g as y,
34
34
  align-items: center;
35
35
  background-color: ${e=>e.theme.colors.grey4};
36
36
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Te=x(function(e){const t=k(e),n=v(e),o=L(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(ie({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(xe);function Ge(){const e=C(),t=y(),n=g(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Me={containerWidth:new je(100,58)},He=m(ke)`
37
+ `,Te=x(function(e){const t=k(e),n=v(e),o=L(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(xe);function Ge(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Me={containerWidth:new je(100,58)},He=m(ke)`
38
38
  width: ${r.sp4};
39
39
  height: ${r.sp4};
40
40
  margin-bottom: ${r.sp3};
@@ -69,4 +69,4 @@ import{j as a}from"./liveblocks-B6jAIe9x.js";import{i as S,n as x,h as C,g as y,
69
69
  width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
70
  background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
71
  margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,_e=x(function(e,t){return{file:t.file,type:t.type}})(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=ae(),d=s.get("token"),K=n.pathname.includes("address"),w=g(),V=ge(),B=fe(),b=we(),W=()=>{V.toggle()},_=E(u=>k(u)),U=E(u=>v(u)),{authParams:O,fetchState:c,billAttachment:Q,billFetchState:D,companyName:R,currencySymbol:Z,amount:q}=_,{tenantId:P,userId:z,sessionId:N}=O,{fetchState:J,internationalBankAccountCreateStatus:X}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&t(le(i,o,d))},[b,c,i,o,d,t]),I.useEffect(()=>{b&&c==="Completed"&&($(z,N,P),l!=null&&t(re(l)))},[c,b,z,N,P,l,t]),c==="Error"?a.jsx(f,{}):J==="Completed"||X.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${B.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&D==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",i??"",R,l??"",Ue(n.pathname),Z,q))(u)}),a.jsxs(Ke,{windowSize:w,children:[w!=="small"?a.jsx(He,{onClick:W}):null,a.jsx(We,{windowSize:w,isAddressPage:K,children:D==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(_e,{file:Q,type:"bill"})}),a.jsx(Ve,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Oe(){return a.jsx($e,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Oe,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Be,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ge,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
72
+ `,_e=x(function(e,t){return{file:t.file,type:t.type}})(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),d=i.get("token"),K=n.pathname.includes("address"),w=g(),V=ge(),B=fe(),b=we(),W=()=>{V.toggle()},_=E(u=>k(u)),U=E(u=>v(u)),{authParams:O,fetchState:c,billAttachment:R,billFetchState:D,companyName:Z,currencySymbol:J,amount:Q}=_,{tenantId:P,userId:z,sessionId:N}=O,{fetchState:q,internationalBankAccountCreateStatus:X}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&t(le(s,o,d))},[b,c,s,o,d,t]),I.useEffect(()=>{b&&c==="Completed"&&($(z,N,P),l!=null&&t(re(l)))},[c,b,z,N,P,l,t]),c==="Error"?a.jsx(f,{}):q==="Completed"||X.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${B.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&D==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",Z,l??"",Ue(n.pathname),J,Q))(u)}),a.jsxs(Ke,{windowSize:w,children:[w!=="small"?a.jsx(He,{onClick:W}):null,a.jsx(We,{windowSize:w,isAddressPage:K,children:D==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(_e,{file:R,type:"bill"})}),a.jsx(Ve,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Oe(){return a.jsx($e,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Oe,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Be,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ge,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
@@ -0,0 +1,12 @@
1
+ import{j as u}from"./liveblocks-BLlSTcoD.js";import{a as g}from"./sentry-D_xp3E3Q.js";import{u as U,g as _,h as w,t as M,j as l,N as x}from"./core-CbpoBsNm.js";import{z as r,m as P,D as V,e as A,d as N,f as W,q,M as J,g as K}from"./index-CoMuhThK.js";import{eW as R,Ly as Y,LI as $,Lz as B,fx as G,f_ as H,LE as Q,gm as X,cY as Z,LJ as ee,LK as te}from"./zeni-epic-state-CkeDRiud.js";import{n as ne}from"./mui-DcNGd9L2.js";import{u as se}from"./useDeviceId-BX67JldO.js";import{f as ae}from"./analyticsHelper-BcD2hj7Q.js";import{t as ie}from"./getLocaleForTenant-DvFF548D.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="690a47c1-672d-46ae-80b9-cdb38654a2ff",t._sentryDebugIdIdentifier="sentry-dbid-690a47c1-672d-46ae-80b9-cdb38654a2ff")}catch{}})();const z=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function ze(){const t=U(),a=_(),m=w(),[y]=M(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:D,magicLinkEmail:c,verifyDeviceFetchState:T,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),k=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>R(e)),b=l(e=>Y(e)),E=r.getSignedInUser(),L=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&z(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t($(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(b.tenantsInOrder),s.zeniSessionId),G(s.userId,s.zeniSessionId,o.tenantId),t(H(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,L,void 0,b.tenantsInOrder),X().then(()=>{const e=K();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[I,S,k,s,o,b,L,a.state,t]);const j=g.useCallback(()=>{m("/signin/auth")},[m]),F=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(q,{phoneNumber:D,verifyOtpFetchState:T.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(x,{to:e,state:{...a.state,origin:""}})}if(!z(n,p)||f==null||h==="Error"){const e=a.state?.origin??"/",v=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(x,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:v,magicLinkExpired:!v&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(J,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ z-index: 9999;
11
+ background-color: ${t=>t.theme.colors.background};
12
+ `;export{ze as default};
@@ -1 +1 @@
1
- import{j as V}from"./liveblocks-B6jAIe9x.js";import{a as c}from"./sentry-95bdnR3R.js";import{u as pe,j as s,i as Ke,g as Qe,h as qe,l as G}from"./core-CLKYLs-8.js";import{eW as he,fC as Je,fD as Se,fo as Xe,bn as ea,eV as aa,fE as ta,fF as na,fH as sa,fK as oa,fT as ia,fL as g,fN as ra,fO as ue,fR as da,fP as la,fQ as ca,fS as ua,cO as fa,fV as ma,cT as ba,bt as pa,fn as ha,f_ as Sa,f$ as ga,fZ as Ea}from"./zeni-epic-state-CjQblqOQ.js";import{a7 as Ca,a8 as ka,w as ya,F as Ia,z as C,y as Ta,u as wa,x as r,a9 as Fa,aa as _a,j as Aa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ra,ae as fe,af as me,L as xa,ag as Ga,ah as be,c as M,$ as Ma,r as F,ai as N,aj as Na}from"./index-D_hiFYsE.js";import{D as Va}from"./mui-AZmtqUsi.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]="9c708970-a0f2-4abb-9c2d-6d7c5a88814d",f._sentryDebugIdIdentifier="sentry-dbid-9c708970-a0f2-4abb-9c2d-6d7c5a88814d")}catch{}})();const Ua=Ca(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ke(),a=Qe(),k=ya(),o=qe(),U=Xe(),m=pe(),{useFeatureGate:i}=Ia(),O=C.getSignedInUser(),_=ea(O),n=s(e=>he(e)),ge=n.masterTOSInfo?.isMasterTOSAccepted??!1,P=s(e=>aa(e)),j=P.uiState.currentChatSessionId,y=Ta(),{setLoading:Ee}=wa(),[A,L]=c.useState(void 0),D=G("/:tenantEmailDomain/dashboard")!==null,z=G("/:tenantEmailDomain/reports")!==null,I=G("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:H}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ce}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Y}=i(r.isDebitCardFeatureEnabled),ke=Fa(n,Ce,Y),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),Z=s(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>na(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(sa(!0))},[y,T,v.fetchState,I]);const h=C.getSignedInUser(),$=s(e=>e.tenantState),Ie=s(e=>$.fetchState==="Completed"?oa(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:K}=i(r.isExpenseAutomationEnabledV2),Q=K||W&&_,{isFeatureEnabled:Fe}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=_||!_&&$e,Re=n.company!=null&&ia(n.company),w=ve&&Re,xe=s(e=>g(e).totalUnreadCount),Ge=s(e=>g(e).reducedFetchCountState),q=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),J=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Me=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Me.fetchState==="Not-Started"&&U.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{A!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:A},"comments")))},[A,B.fetchState]);const Ve={fetchStatus:Ge,count:xe},ne=t!=null?C.getSignedInUserTenant(t):null,se=s(e=>ne?.tenantId!=null?da(e,ne.tenantId):void 0),S=[];Te===!1&&S.push("accounts_payable_aging"),we===!1&&S.push("accounts_receivable_aging"),H===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),Q===!1&&S.push("expense_automation_card");const Ue=Aa(),oe=s(e=>la(e,S,h,K,W,w).fetchState),ie=s(e=>ca(e).fetchState),Oe=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Pe=c.useMemo(()=>ua(n.userRole),[n.userRole]),je=fa(Pe),Le=n?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&Z.fetchState==="Completed"&&ma(Z.notificationSettings,h.userEmail,Y,n),re=Da(),He=re&&va(a),de=ba(Ue?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,R=c.useCallback(()=>w&&de&&!C.getTreasuryPopupSeen(t??"")&&le===!1&&$a(a.pathname)!=="treasury",[w,de,le,a.pathname,t]),[Ye,ce]=c.useState(R);c.useEffect(()=>{ce(R())},[R]);const Ze=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,We=Ba(Ze);return V.jsx(Va,{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:V.jsx(Ra,{signedInUser:O,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?Ie:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Oe,isSettings:me(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:je,isZeniAccountEnabled:H,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:We,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:ze,notificationCountDetails:Ve,isExpenseAutomationEnabledForUser:Q&&pa(n.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=q===0&&J>0?"notifications/comments":"notifications/tasks";me(a)&&(e=q===0&&J>0?"../../notifications/comments":"../../notifications/tasks");const u=F(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=F(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(M.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!ge)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=F(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=F(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&M.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const p=E[n.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Na(e.type);be(e.type)?(j!=null&&m(Ea()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${x}`,{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=>{Ee(xa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ga(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(Sa(e.tenantId)),m(ga(h.userId,e.tenantId,h.zeniSessionId)));const p=e;M.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{C.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{k.toggle()},isAiCfo:He,aiCfoView:P,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ha({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Fe,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Ae,newYearAnimationEnabled:De})})}),Ya=f=>{const d=pe(),t=s(k=>he(k)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(k,o)=>{ka(o)&&Je(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Ua,{...f,...a})};export{Ya as M};
1
+ import{j as V}from"./liveblocks-BLlSTcoD.js";import{a as c}from"./sentry-D_xp3E3Q.js";import{u as pe,j as s,i as Ke,g as Qe,h as qe,l as G}from"./core-CbpoBsNm.js";import{eW as he,fC as Je,fD as Se,fo as Xe,bn as ea,eV as aa,fE as ta,fF as na,fH as sa,fK as oa,fT as ia,fL as g,fN as ra,fO as ue,fR as da,fP as la,fQ as ca,fS as ua,cO as fa,fV as ma,cT as ba,bt as pa,fn as ha,f_ as Sa,f$ as ga,fZ as Ea}from"./zeni-epic-state-CkeDRiud.js";import{a7 as Ca,a8 as ka,w as ya,F as Ia,z as C,y as Ta,u as wa,x as r,a9 as Fa,aa as _a,j as Aa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ra,ae as fe,af as me,L as xa,ag as Ga,ah as be,d as M,$ as Ma,s as F,ai as N,aj as Na}from"./index-CoMuhThK.js";import{D as Va}from"./mui-DcNGd9L2.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]="1072d470-bc73-43c0-9b41-a4beb039c52f",f._sentryDebugIdIdentifier="sentry-dbid-1072d470-bc73-43c0-9b41-a4beb039c52f")}catch{}})();const Ua=Ca(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ke(),a=Qe(),k=ya(),o=qe(),U=Xe(),m=pe(),{useFeatureGate:i}=Ia(),O=C.getSignedInUser(),_=ea(O),n=s(e=>he(e)),ge=n.masterTOSInfo?.isMasterTOSAccepted??!1,P=s(e=>aa(e)),j=P.uiState.currentChatSessionId,y=Ta(),{setLoading:Ee}=wa(),[A,L]=c.useState(void 0),D=G("/:tenantEmailDomain/dashboard")!==null,z=G("/:tenantEmailDomain/reports")!==null,I=G("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:H}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ce}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Y}=i(r.isDebitCardFeatureEnabled),ke=Fa(n,Ce,Y),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),Z=s(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>na(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(sa(!0))},[y,T,v.fetchState,I]);const h=C.getSignedInUser(),$=s(e=>e.tenantState),Ie=s(e=>$.fetchState==="Completed"?oa(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:K}=i(r.isExpenseAutomationEnabledV2),Q=K||W&&_,{isFeatureEnabled:Fe}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=_||!_&&$e,Re=n.company!=null&&ia(n.company),w=ve&&Re,xe=s(e=>g(e).totalUnreadCount),Ge=s(e=>g(e).reducedFetchCountState),q=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),J=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Me=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Me.fetchState==="Not-Started"&&U.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{A!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:A},"comments")))},[A,B.fetchState]);const Ve={fetchStatus:Ge,count:xe},ne=t!=null?C.getSignedInUserTenant(t):null,se=s(e=>ne?.tenantId!=null?da(e,ne.tenantId):void 0),S=[];Te===!1&&S.push("accounts_payable_aging"),we===!1&&S.push("accounts_receivable_aging"),H===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),Q===!1&&S.push("expense_automation_card");const Ue=Aa(),oe=s(e=>la(e,S,h,K,W,w).fetchState),ie=s(e=>ca(e).fetchState),Oe=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Pe=c.useMemo(()=>ua(n.userRole),[n.userRole]),je=fa(Pe),Le=n?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&Z.fetchState==="Completed"&&ma(Z.notificationSettings,h.userEmail,Y,n),re=Da(),He=re&&va(a),de=ba(Ue?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,R=c.useCallback(()=>w&&de&&!C.getTreasuryPopupSeen(t??"")&&le===!1&&$a(a.pathname)!=="treasury",[w,de,le,a.pathname,t]),[Ye,ce]=c.useState(R);c.useEffect(()=>{ce(R())},[R]);const Ze=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,We=Ba(Ze);return V.jsx(Va,{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:V.jsx(Ra,{signedInUser:O,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?Ie:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Oe,isSettings:me(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:je,isZeniAccountEnabled:H,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:We,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:ze,notificationCountDetails:Ve,isExpenseAutomationEnabledForUser:Q&&pa(n.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=q===0&&J>0?"notifications/comments":"notifications/tasks";me(a)&&(e=q===0&&J>0?"../../notifications/comments":"../../notifications/tasks");const u=F(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=F(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(M.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!ge)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=F(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=F(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&M.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const p=E[n.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Na(e.type);be(e.type)?(j!=null&&m(Ea()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${x}`,{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=>{Ee(xa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ga(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(Sa(e.tenantId)),m(ga(h.userId,e.tenantId,h.zeniSessionId)));const p=e;M.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{C.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{k.toggle()},isAiCfo:He,aiCfoView:P,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ha({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Fe,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Ae,newYearAnimationEnabled:De})})}),Ya=f=>{const d=pe(),t=s(k=>he(k)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(k,o)=>{ka(o)&&Je(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Ua,{...f,...a})};export{Ya as M};
@@ -0,0 +1 @@
1
+ import{j as r}from"./liveblocks-BLlSTcoD.js";import{h as n,n as e}from"./core-CbpoBsNm.js";import{R as i}from"./index-CoMuhThK.js";import"./mui-DcNGd9L2.js";import"./sentry-D_xp3E3Q.js";import"./zeni-epic-state-CkeDRiud.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.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]="9ceba748-25d5-4d32-9a3c-da4194015415",o._sentryDebugIdIdentifier="sentry-dbid-9ceba748-25d5-4d32-9a3c-da4194015415")}catch{}})();const a=e(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
@@ -1 +1 @@
1
- import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-B6jAIe9x.js";import lt from"./NotFoundScreen-ChEBjJeL.js";import{a as k}from"./sentry-95bdnR3R.js";import{h as ft,g as ut,i as ht,u as pt,j as g,n as kt,o as St,p as H}from"./core-CLKYLs-8.js";import{cv as gt,fE as K,eW as X,fS as bt,fL as b,Su as Q,fO as d,fD as y,sj as j,xF as It,Sv as Ct,fC as Tt,fV as yt,so as _t,Sw as F,bq as $,fw as B,ss as J,Sx as At,cH as Et,cA as xt}from"./zeni-epic-state-CjQblqOQ.js";import{X as Nt,z as wt,F as Bt,x as vt,_ as Dt,cU as Rt,r as x,a7 as Ut,cV as Gt,a8 as Pt,n as Ft}from"./index-D_hiFYsE.js";import"./mui-AZmtqUsi.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.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]="b1c6157f-5697-4620-8cbf-ac5f7108418e",t._sentryDebugIdIdentifier="sentry-dbid-b1c6157f-5697-4620-8cbf-ac5f7108418e")}catch{}})();const jt=(t,l)=>new Promise((n,u)=>{const S=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(S).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),Mt=kt(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:S}=l,i=b(t),s=X(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,S,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:S,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:N,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=x(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=x(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(N(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=x(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(S)&&(r="not-found"),c[1].startsWith("bill")&&!xt(S)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const m=`../${a}`,c=x(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(j("task_manager","dashboard",m))}else v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(N(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(B({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")),jt(s,N).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=x(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Ut(Gt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:S}=Nt(),i=gt(u??""),s=pt(),h=wt.getSignedInUser(),[N,v]=k.useState(!1),a=g(e=>K(e)),o=g(e=>X(e)),{useFeatureGate:m}=Bt(),{isFeatureEnabled:c}=m(vt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const Y=bt(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 M=g(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=g(e=>b(e).currentTab),D=g(e=>b(e).currentSubTab),Z=g(e=>b(e).notificationDetailsByTab.comments.fetchCountState),R=g(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=g(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=g(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Rt().allUsers,{inboxNotifications:w,isLoading:_,hasFetchedAll:C,isFetchingMore:U,fetchMore:ot}=ct(),{threads:L,isLoading:W,fetchMore:q,isFetchingMore:z,hasFetchedAll:O}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Q(i)),i==null){const e=`../${V}`,p=x(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!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(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{M!=="In-Progress"&&S&&s(j("task_manager","dashboard",["read","unread"]))},[S]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const G=_||U===!0||C!==!0||_||U===!0||C!==!0;k.useEffect(()=>{G&&R!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||R!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,R]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&N===!1&&(v(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&W===!1&&w!=null&&L!=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),A=p.map(f=>f.id),it=p.map(f=>{const P=L.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(z||O===!0||q==null||q(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,U,z,C,O,W,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),M!=="In-Progress"){const A=[];D==="all"?A.push("read","unread"):D!=="mentions"&&A.push(D),s(j("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(Mt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(St,{children:[E.jsx(H,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(H,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
1
+ import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-BLlSTcoD.js";import lt from"./NotFoundScreen-DaDxz3Zq.js";import{a as k}from"./sentry-D_xp3E3Q.js";import{h as ft,g as ut,i as ht,u as pt,j as g,n as kt,o as St,p as H}from"./core-CbpoBsNm.js";import{cv as gt,fE as K,eW as X,fS as bt,fL as b,Su as Q,fO as d,fD as y,sj as j,xF as It,Sv as Ct,fC as Tt,fV as yt,so as _t,Sw as F,bq as $,fw as B,ss as J,Sx as At,cH as Et,cA as xt}from"./zeni-epic-state-CkeDRiud.js";import{X as Nt,z as wt,F as Bt,x as vt,_ as Dt,cU as Rt,s as x,a7 as Ut,cV as Gt,a8 as Pt,p as Ft}from"./index-CoMuhThK.js";import"./mui-DcNGd9L2.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-Dkub9Q1g.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.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]="aa849c7e-660f-46b3-a27f-fff6aadd0e3d",t._sentryDebugIdIdentifier="sentry-dbid-aa849c7e-660f-46b3-a27f-fff6aadd0e3d")}catch{}})();const jt=(t,l)=>new Promise((n,u)=>{const S=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(S).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),Mt=kt(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:S}=l,i=b(t),s=X(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,S,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:S,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:N,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=x(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=x(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(N(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=x(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(S)&&(r="not-found"),c[1].startsWith("bill")&&!xt(S)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const m=`../${a}`,c=x(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(j("task_manager","dashboard",m))}else v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(N(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(B({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")),jt(s,N).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=x(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Ut(Gt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:S}=Nt(),i=gt(u??""),s=pt(),h=wt.getSignedInUser(),[N,v]=k.useState(!1),a=g(e=>K(e)),o=g(e=>X(e)),{useFeatureGate:m}=Bt(),{isFeatureEnabled:c}=m(vt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const Y=bt(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 M=g(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=g(e=>b(e).currentTab),D=g(e=>b(e).currentSubTab),Z=g(e=>b(e).notificationDetailsByTab.comments.fetchCountState),R=g(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=g(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=g(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Rt().allUsers,{inboxNotifications:w,isLoading:_,hasFetchedAll:C,isFetchingMore:U,fetchMore:ot}=ct(),{threads:L,isLoading:W,fetchMore:q,isFetchingMore:z,hasFetchedAll:O}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Q(i)),i==null){const e=`../${V}`,p=x(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!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(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{M!=="In-Progress"&&S&&s(j("task_manager","dashboard",["read","unread"]))},[S]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const G=_||U===!0||C!==!0||_||U===!0||C!==!0;k.useEffect(()=>{G&&R!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||R!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,R]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&N===!1&&(v(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&W===!1&&w!=null&&L!=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),A=p.map(f=>f.id),it=p.map(f=>{const P=L.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(z||O===!0||q==null||q(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,U,z,C,O,W,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),M!=="In-Progress"){const A=[];D==="all"?A.push("read","unread"):D!=="mentions"&&A.push(D),s(j("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(Mt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(St,{children:[E.jsx(H,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(H,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
@@ -1 +1 @@
1
- import{j as m}from"./liveblocks-B6jAIe9x.js";import{a as r}from"./sentry-95bdnR3R.js";import{u as T,g as A,j as o,N as j}from"./core-CLKYLs-8.js";import{LX as C,eW as P,fK as x,LY as z,LZ as D,L_ as M,L$ as R,o4 as k,KU as N}from"./zeni-epic-state-CjQblqOQ.js";import{z as h,J as I}from"./index-D_hiFYsE.js";import"./mui-AZmtqUsi.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="7f7f5cbf-877d-4dd0-91e4-6c23ec15fbf1",n._sentryDebugIdIdentifier="sentry-dbid-7f7f5cbf-877d-4dd0-91e4-6c23ec15fbf1")}catch{}})();function ee(){const n=T(),s=A(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),y=o(z),b=o(D),c=o(M),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(L=>L.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),u=v??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(N(a.userId,a.zeniSessionId??void 0,u,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{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
1
+ import{j as m}from"./liveblocks-BLlSTcoD.js";import{a as r}from"./sentry-D_xp3E3Q.js";import{u as T,g as A,j as o,N as j}from"./core-CbpoBsNm.js";import{LX as C,eW as P,fK as x,LY as z,LZ as D,L_ as M,L$ as N,o4 as R,KU as k}from"./zeni-epic-state-CkeDRiud.js";import{z as h,N as I}from"./index-CoMuhThK.js";import"./mui-DcNGd9L2.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="6ef34868-378e-43f2-8afc-7ab70e5501f4",n._sentryDebugIdIdentifier="sentry-dbid-6ef34868-378e-43f2-8afc-7ab70e5501f4")}catch{}})();function ee(){const n=T(),s=A(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>P(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,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(N())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const U=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(L=>L.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),c=S??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(k(a.userId,a.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{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -1 +1 @@
1
- import{j as n}from"./liveblocks-B6jAIe9x.js";import{h as z,u as Z,g as H,i as J,j as d,n as X,o as K,p as I}from"./core-CLKYLs-8.js";import{eW as M,s7 as P,rH as Q,Ms as O,rC as S,bt as ee,bn as ae,bY as te,rD as se,Mt as oe,Mf as C,dJ as re,vC as ne,Mu as ce,vZ as ie,fB as le,fz as de}from"./zeni-epic-state-CjQblqOQ.js";import{z as fe,X as me,_ as pe,j as ue,F as U,x as $,A as he,c as w,ao as Fe,r as ge}from"./index-D_hiFYsE.js";import"./mui-AZmtqUsi.js";import be from"./NotFoundScreen-ChEBjJeL.js";import{F as Ie}from"./FeaturePreviewScreen-CNGfajWs.js";import{a as F}from"./sentry-95bdnR3R.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import{u as Se}from"./useInitialThreadRequest-D1F5GLCG.js";import{t as Te}from"./routePaths-XSngD1ow.js";import{M as ye}from"./MobileAppDrawer-BPYh3fz7.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.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]="efbcd0ec-5d7f-4857-894a-e8a8a3779b2f",s._sentryDebugIdIdentifier="sentry-dbid-efbcd0ec-5d7f-4857-894a-e8a8a3779b2f")}catch{}})();const T=(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})}},xe=X(function(s){const e=oe(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:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(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=re(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 f=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(f,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(Fe);function v(){const s=z(),e=Z(),a=H(),{forecastId:o,tenantEmailDomain:r}=J(),[c,p]=F.useState(!1),[f,u]=F.useState(!1),h=fe.getSignedInUser(),y=d(t=>M(t)),B=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),D=t=>x.pandLByForecastID[t]!=null&&se(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=me();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:N}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect(()=>{if(!c&&g)p(!0),l||e(Q());else if(l&&!f){u(!0);const t=((m,L,R)=>L!=null?m.forecasts.findIndex(b=>b.id===L):R!=null?m.forecasts.findIndex(b=>b.id===R):m.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(O(i.forecasts[t].id,t)),T(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!D(i.forecasts[t].id)&&g&&e(S(i.forecasts[t].id))}},[c,p,e,l,i,f,u,P,S,g]);const k=ue(),W=k?.loggedInUserRole!=null&&ee(k.loggedInUserRole),{useFeatureGate:q}=U(),{isFeatureEnabled:j}=q($.isReportsCommentingEnabled),G=Se(j?y?.companyId:void 0,{clearParams:l&&f}),[V,Y]=F.useState(!1),E=t=>{Y(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:E}),n.jsx(xe,{firstMonthOfFY:B,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:D,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:W,isAiCfoAccessEnabled:_,onAskAiCfoClick:N,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function Ye(){const s=d(c=>M(c)),{useFeatureGate:e}=U(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(K,{children:[n.jsx(I,{path:"/",element:n.jsx(v,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ye as PandLWithForecastRoutes,Ye as default};
1
+ import{j as n}from"./liveblocks-BLlSTcoD.js";import{h as z,u as Z,g as H,i as J,j as d,n as X,o as K,p as I}from"./core-CbpoBsNm.js";import{eW as M,s7 as P,rH as Q,Ms as O,rC as S,bt as ee,bn as ae,bY as te,rD as se,Mt as oe,Mf as C,dJ as re,vC as ne,Mu as ie,vZ as ce,fB as le,fz as de}from"./zeni-epic-state-CkeDRiud.js";import{z as fe,X as me,_ as pe,j as ue,F as U,x as $,A as he,d as w,ao as be,s as Fe}from"./index-CoMuhThK.js";import"./mui-DcNGd9L2.js";import ge from"./NotFoundScreen-DaDxz3Zq.js";import{F as Ie}from"./FeaturePreviewScreen-DruJFyVL.js";import{a as b}from"./sentry-D_xp3E3Q.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-Dkub9Q1g.js";import{u as Se}from"./useInitialThreadRequest-DKCJ4fRp.js";import{t as Te}from"./routePaths-BqMV9loV.js";import{M as ye}from"./MobileAppDrawer-DSwbMXYq.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.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]="31414393-d5f8-4fa3-b156-fbb1a843bdce",s._sentryDebugIdIdentifier="sentry-dbid-31414393-d5f8-4fa3-b156-fbb1a843bdce")}catch{}})();const T=(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})}},xe=X(function(s){const e=oe(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:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(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=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(f,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(be);function v(){const s=z(),e=Z(),a=H(),{forecastId:o,tenantEmailDomain:r}=J(),[i,p]=b.useState(!1),[f,u]=b.useState(!1),h=fe.getSignedInUser(),y=d(t=>M(t)),B=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),D=t=>x.pandLByForecastID[t]!=null&&se(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=me();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:N}=Ce({mobileExploreReferrer:"Forecast"});b.useEffect(()=>{if(!i&&F)p(!0),l||e(Q());else if(l&&!f){u(!0);const t=((m,L,R)=>L!=null?m.forecasts.findIndex(g=>g.id===L):R!=null?m.forecasts.findIndex(g=>g.id===R):m.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(O(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!D(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,f,u,P,S,F]);const k=ue(),W=k?.loggedInUserRole!=null&&ee(k.loggedInUserRole),{useFeatureGate:q}=U(),{isFeatureEnabled:j}=q($.isReportsCommentingEnabled),G=Se(j?y?.companyId:void 0,{clearParams:l&&f}),[V,Y]=b.useState(!1),E=t=>{Y(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:E}),n.jsx(xe,{firstMonthOfFY:B,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:D,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:W,isAiCfoAccessEnabled:_,onAskAiCfoClick:N,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function Ye(){const s=d(i=>M(i)),{useFeatureGate:e}=U(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(K,{children:[n.jsx(I,{path:"/",element:n.jsx(v,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(ge,{})})]})}export{Ye as PandLWithForecastRoutes,Ye as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-B6jAIe9x.js";import{Mo as te,eW as Q,kr as G,fB as q,fz as ne,JS as X,M2 as oe,uA as Ee,Mp as N,up as ke,uJ as Ie,uD as ie,ut as re,uH as Pe,uE as je,Mq as le,wo as Te,fl as Le,gc as ve,Mr as M,ux as de,uw as ce,uM as Fe,c7 as Ae}from"./zeni-epic-state-CjQblqOQ.js";import{K as pe,F as Y,x as E,z as H,a9 as ue,I as me,ak as ge,al as Re,E as he,o as R,N as fe,D as Ce,am as Oe,X as Ve,_ as Ue,A as Be,c as be,e as Ze,r as $e,an as Me,j as _e}from"./index-D_hiFYsE.js";import{D as ye,n as W,S as we}from"./mui-AZmtqUsi.js";import ae from"./NotFoundScreen-ChEBjJeL.js";import{a as r}from"./sentry-95bdnR3R.js";import{u as ee,i as ze,j as m,h as Ge,g as He,n as We,o as se,p as $}from"./core-CLKYLs-8.js";import{u as Ke}from"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import{M as Je}from"./MobileAppDrawer-BPYh3fz7.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="77ce3a50-c009-4aa1-8337-90f982b57020",a._sentryDebugIdIdentifier="sentry-dbid-77ce3a50-c009-4aa1-8337-90f982b57020")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=ze(),d=m(e=>te(e)),u=m(e=>Q(e)),D=m(e=>G(e)),{useFeatureGate:f}=Y(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=q(k,u),L=ne(u),v=X(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},qe=W(we)`
1
+ import{j as s}from"./liveblocks-BLlSTcoD.js";import{Mo as te,eW as Q,kr as G,fB as q,fz as ne,JS as X,M2 as oe,uA as Ee,Mp as N,up as ke,uJ as Ie,uD as ie,ut as re,uH as Pe,uE as je,Mq as le,wo as Te,fl as Le,gc as ve,Mr as M,ux as de,uw as ce,uM as Fe,c7 as Ae}from"./zeni-epic-state-CkeDRiud.js";import{K as pe,F as Y,x as E,z as H,a9 as ue,I as me,ak as ge,al as Re,G as he,o as R,J as fe,D as Ce,am as Oe,X as Ve,_ as Ue,A as Be,d as be,f as Ze,s as $e,an as Me,j as _e}from"./index-CoMuhThK.js";import{D as ye,n as W,S as we}from"./mui-DcNGd9L2.js";import ae from"./NotFoundScreen-DaDxz3Zq.js";import{a as r}from"./sentry-D_xp3E3Q.js";import{u as ee,i as ze,j as m,h as Ge,g as He,n as We,o as se,p as $}from"./core-CbpoBsNm.js";import{u as Je}from"./useAskAiCfoHostNavButtonProps-Dkub9Q1g.js";import{M as Ke}from"./MobileAppDrawer-DSwbMXYq.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="4e4ec343-a35a-4f58-ad6c-26d8be6ad1fd",a._sentryDebugIdIdentifier="sentry-dbid-4e4ec343-a35a-4f58-ad6c-26d8be6ad1fd")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=ze(),d=m(e=>te(e)),u=m(e=>Q(e)),D=m(e=>G(e)),{useFeatureGate:f}=Y(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=q(k,u),L=ne(u),v=X(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},qe=W(we)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -19,4 +19,4 @@ import{j as s}from"./liveblocks-B6jAIe9x.js";import{Mo as te,eW as Q,kr as G,fB
19
19
  display: flex;
20
20
  min-height: 100%;
21
21
  flex-direction: column;
22
- `,aa=We(function(a,t){const l=le(a),n=H.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(M({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(M({searchText:o}))}}}})(Me);function J({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=H.getSignedInUser(),h=m(e=>Q(e)),{useFeatureGate:p}=Y(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>G(e)),I=!q(O,h)&&V,w=X(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=Ke({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(M({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(M({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Ye,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Je,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,K)=>{n(M({sortKey:e,sortOrder:K}))},onRowClick:e=>{const K=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(K,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(J,{})}),s.jsx($,{path:"new",element:s.jsx(J,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(J,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
22
+ `,aa=We(function(a,t){const l=le(a),n=H.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(M({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(M({searchText:o}))}}}})(Me);function K({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=H.getSignedInUser(),h=m(e=>Q(e)),{useFeatureGate:p}=Y(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>G(e)),I=!q(O,h)&&V,w=X(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=Je({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(M({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(M({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Ye,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Ke,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,J)=>{n(M({sortKey:e,sortOrder:J}))},onRowClick:e=>{const J=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(J,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(K,{})}),s.jsx($,{path:"new",element:s.jsx(K,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(K,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-B6jAIe9x.js";import E from"./NotFoundScreen-ChEBjJeL.js";import{a as r}from"./sentry-95bdnR3R.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as z,o as O,p as h}from"./core-CLKYLs-8.js";import{eW as B,Sy as b,bo as F,bn as N,i8 as V,fw as W}from"./zeni-epic-state-CjQblqOQ.js";import{w as $,z as I,_ as q,cW as G}from"./index-D_hiFYsE.js";import"./mui-AZmtqUsi.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import{M as J}from"./MobileAppDrawer-BPYh3fz7.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.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]="7cbda8dc-ce2c-46e5-9726-f9f58694341d",e._sentryDebugIdIdentifier="sentry-dbid-7cbda8dc-ce2c-46e5-9726-f9f58694341d")}catch{}})();const K=z(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)}}})(G),L=()=>{const e=_(),t=v(),c=$(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:m}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,y=N(l),x=C||k||y,d=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(u(W({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
1
+ import{j as s}from"./liveblocks-BLlSTcoD.js";import E from"./NotFoundScreen-DaDxz3Zq.js";import{a as r}from"./sentry-D_xp3E3Q.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as z,o as O,p as h}from"./core-CbpoBsNm.js";import{eW as B,Sy as b,bo as F,bn as N,i8 as V,fw as W}from"./zeni-epic-state-CkeDRiud.js";import{w as $,z as I,_ as q,cW as G}from"./index-CoMuhThK.js";import"./mui-DcNGd9L2.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-Dkub9Q1g.js";import{M as J}from"./MobileAppDrawer-DSwbMXYq.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.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]="7cbda8dc-ce2c-46e5-9726-f9f58694341d",e._sentryDebugIdIdentifier="sentry-dbid-7cbda8dc-ce2c-46e5-9726-f9f58694341d")}catch{}})();const K=z(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)}}})(G),L=()=>{const e=_(),t=v(),c=$(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:m}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,y=N(l),x=C||k||y,d=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(u(W({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1 +1 @@
1
- import{a as h,b as t}from"./sentry-95bdnR3R.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
1
+ import{a as h,b as t}from"./sentry-D_xp3E3Q.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};