@zeniai/web-app-ui 5.1.22-qa → 5.1.23-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 (131) hide show
  1. package/dist/assets/AddressRoutes-iiutr8Jz.js +1 -0
  2. package/dist/assets/{AddressScreen-CLP4FP-O.js → AddressScreen-tFmdakWA.js} +2 -2
  3. package/dist/assets/{AiCfoScreen-BLZXZArd.js → AiCfoScreen-DDKQqune.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-B93D6K86.js → BillPayApprovalRoutes-DHZpT3No.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-BjRPRC0a.js → BillPayRoutes-C3kWZhA-.js} +18 -18
  6. package/dist/assets/BusinessVerificationPageScreen-Gu3xfWkO.js +9 -0
  7. package/dist/assets/ChargeCardRoutes-CDBK5Rsn.js +71 -0
  8. package/dist/assets/CompanyPassportScreen-WdmqXh3-.js +1 -0
  9. package/dist/assets/ConnectionAuthScreen-CYdP4C61.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-B6G9r_f7.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-DKTu3TSV.js → CustomerOnboardingRoutes-Do7A7jXR.js} +6 -6
  12. package/dist/assets/{DashboardRoutes-DQ8scLPs.js → DashboardRoutes-Cr_qaBQm.js} +3 -3
  13. package/dist/assets/{DefaultTenantHome-Bz8KR5te.js → DefaultTenantHome-CVoVD99-.js} +1 -1
  14. package/dist/assets/DomesticWireDetailScreen-D-kY5B9y.js +18 -0
  15. package/dist/assets/DrawerScreen-Dy-FhaRy.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-CXuD_yIT.js +1 -0
  17. package/dist/assets/ExpenseAutomationRoutes-BqOROAyt.js +25 -0
  18. package/dist/assets/FeaturePreviewScreen-CFCMNKBU.js +1 -0
  19. package/dist/assets/HubSpotOAuthCallbackScreen-BZL3fMbo.js +1 -0
  20. package/dist/assets/MagicLinkRoutes-B1WpGs_j.js +72 -0
  21. package/dist/assets/MagicLinkSignInScreen-BmHDtX_Y.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-CzXbfz6E.js → MobileAppDrawer-BSk7YHeH.js} +1 -1
  23. package/dist/assets/NotFoundScreen-BEFHW4G3.js +1 -0
  24. package/dist/assets/{NotificationRoutes-m1_3MbJD.js → NotificationRoutes-BY3IG0y5.js} +1 -1
  25. package/dist/assets/OAuthConsentScreen-C2xZczK4.js +1 -0
  26. package/dist/assets/PandLWithForecastRoutes-cWGNCcqf.js +1 -0
  27. package/dist/assets/PeopleRoutes-vbCcQ3ee.js +22 -0
  28. package/dist/assets/PerformanceRoutes-CBUJyIHv.js +1 -0
  29. package/dist/assets/{Preview-DMFknWZO.js → Preview-DJmqkFOo.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-CoUX8FMs.js → QBOConnectionScreen-Dain4XtO.js} +1 -1
  31. package/dist/assets/ReferralListScreen-sgTEbSbs.js +5 -0
  32. package/dist/assets/ReimbursementApprovalRoutes-D4DIZDe_.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B-HB-2Ii.js → ReimbursementApprovalRuleDetailScreen-BKQV6Gey.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-CT53GTQR.js → ReimbursementRoutes-Cv7-Cyp4.js} +9 -9
  35. package/dist/assets/{ReportsRoutes-Bd2DqBOB.js → ReportsRoutes-DEUxYcXP.js} +1 -1
  36. package/dist/assets/RewardsRoutes-BTu3LH6D.js +1 -0
  37. package/dist/assets/ScreenRoutes-Cd2ZKjlA.js +2 -0
  38. package/dist/assets/{SettingsRoutes-BTpkC5ER.js → SettingsRoutes-NK-zqL44.js} +8 -8
  39. package/dist/assets/{SetupPagesScreen-BLeSibic.js → SetupPagesScreen-NvSqWgzr.js} +5 -5
  40. package/dist/assets/SignInScreen-BB4yXngc.js +1 -0
  41. package/dist/assets/SignOutScreen-C24Lu_iD.js +9 -0
  42. package/dist/assets/TaskListScreen-DYz0lfQ9.js +9 -0
  43. package/dist/assets/{TaskRoutes-C1MBk6tP.js → TaskRoutes-D53-F9Tz.js} +2 -2
  44. package/dist/assets/{TransactionDetailRoutes-D8PM2qy_.js → TransactionDetailRoutes-NB5jTxua.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-CrAEKQhU.js → TransactionDetailScreen-C-nbZGJm.js} +2 -2
  46. package/dist/assets/{TransactionListRoutes-BcEl6aLg.js → TransactionListRoutes-aQZ7jhPa.js} +1 -1
  47. package/dist/assets/TreasuryRoutes-DDQ8gehh.js +37 -0
  48. package/dist/assets/{VendorsRoutes-DIXbOVo9.js → VendorsRoutes-Dw3rLW5P.js} +23 -23
  49. package/dist/assets/WiseConfirmationScreen-CNibKVby.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-BcmFR78c.js → ZeniAccountRoutes-BrBJNwAv.js} +9 -9
  51. package/dist/assets/ZeniAccountStatementScreen-DpqB7dh6.js +9 -0
  52. package/dist/assets/{accountMappingHelper-DjOpJLte.js → accountMappingHelper-BprfT0GK.js} +1 -1
  53. package/dist/assets/{analytics-CnRKHa3G.js → analytics-i3QajGlB.js} +1 -1
  54. package/dist/assets/analyticsHelper-PpRvwE56.js +1 -0
  55. package/dist/assets/{core-rmRh_ZE8.js → core-mrC-JzGi.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-C5DyNl7Z.js → decodeURIComponentSafe-D7hgbcm6.js} +1 -1
  57. package/dist/assets/{dnd-DhJJZ165.js → dnd-DZwpImxe.js} +1 -1
  58. package/dist/assets/{empty-BR41JKH4.js → empty-DncJ1CJr.js} +1 -1
  59. package/dist/assets/{empty-Bl8iXXbt.js → empty-p7zsbAY4.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-JvcOcTif.js → emptyVideoElement-nmkuasXW.js} +1 -1
  61. package/dist/assets/epic-BkgBKn6e.js +2 -0
  62. package/dist/assets/{getLocaleForTenant-D8ujXHmv.js → getLocaleForTenant-DlHE4SFU.js} +1 -1
  63. package/dist/assets/{index-BcKPNqyh.js → index-B75Ozwz_.js} +1 -1
  64. package/dist/assets/{index-DvQmfPWS.js → index-BqRCJPTQ.js} +1 -1
  65. package/dist/assets/{index-BhTe6Ye9.js → index-C9iPRurj.js} +1 -1
  66. package/dist/assets/{index-ek_-6Hro.js → index-CsClpzPd.js} +1 -1
  67. package/dist/assets/{index-CP6u_qYB.js → index-D9amQzUe.js} +2 -2
  68. package/dist/assets/{index-BRBKIeck.js → index-HYe9zsmh.js} +10755 -10759
  69. package/dist/assets/{index-CTpsdld-.js → index-T0lbkIBD.js} +1 -1
  70. package/dist/assets/{index-Da7svMe4.js → index-W27fWxOr.js} +1 -1
  71. package/dist/assets/{lexical-Bbb_9RJE.js → lexical-9U8kXGr5.js} +1 -1
  72. package/dist/assets/{liveblocks-oKBQUmhq.js → liveblocks-D8betOTZ.js} +1 -1
  73. package/dist/assets/{lottie-BEwdV52_.js → lottie-CT5flDGi.js} +1 -1
  74. package/dist/assets/{mui-DRkb5v8u.js → mui-CtKcfboe.js} +1 -1
  75. package/dist/assets/{pathToGoBack-BjLk76KL.js → pathToGoBack-CynAiod2.js} +1 -1
  76. package/dist/assets/{pdf-DTUmIE_Y.js → pdf-CUvE2RE-.js} +3 -3
  77. package/dist/assets/{pdf-lib-B5Yv6f0X.js → pdf-lib-CClLSROc.js} +1 -1
  78. package/dist/assets/{plaid-DkZRc6lf.js → plaid-DVya51Ew.js} +1 -1
  79. package/dist/assets/{pusher-C7GLtvZ1.js → pusher-DSqgf_ao.js} +1 -1
  80. package/dist/assets/{react-C0jbaFfs.js → react-B9ErTbNF.js} +1 -1
  81. package/dist/assets/{react-BGSDLiM6.js → react-BBWa0hDB.js} +1 -1
  82. package/dist/assets/{react-CzE32USB.js → react-BaFQVmTf.js} +1 -1
  83. package/dist/assets/{react-PcSYu_R0.js → react-CozBWqvn.js} +1 -1
  84. package/dist/assets/{react-BlZq22yG.js → react-Klu4yn0H.js} +1 -1
  85. package/dist/assets/{react-CyxukSSB.js → react-Siz_fpzj.js} +1 -1
  86. package/dist/assets/{recharts-BG7SNYPF.js → recharts-Q6vC6hsk.js} +1 -1
  87. package/dist/assets/{routePaths-f58A_7uy.js → routePaths-REpeZ6R0.js} +1 -1
  88. package/dist/assets/{sentry-p9ArnUH9.js → sentry-BHRgRpRB.js} +1 -1
  89. package/dist/assets/{url-Cy9bK65P.js → url-Cx4mpMZX.js} +1 -1
  90. package/dist/assets/{url-B-b7cLPz.js → url-sKaroM18.js} +1 -1
  91. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CDWxxCLl.js → useAiCfoDashboardSuggestedQuestionsChips-D-YoPaLt.js} +1 -1
  92. package/dist/assets/useAskAiCfoHostNavButtonProps-O_OQACkG.js +1 -0
  93. package/dist/assets/{useDeviceId-DDLhcPdX.js → useDeviceId-Csejqjvv.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-B5lLxxrW.js → useInitialThreadRequest-BO39So_q.js} +1 -1
  95. package/dist/assets/{utils-B4k-7_rU.js → utils-B2v0z9lS.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-Dqu6-_83.js → withTransactionSidePanel-BDlHvnIn.js} +2 -2
  97. package/dist/assets/{zeni-epic-state-DH4sFgeZ.js → zeni-epic-state-Beqj4-lt.js} +6 -6
  98. package/dist/index.html +1 -1
  99. package/package.json +6 -11
  100. package/dist/assets/AddressRoutes-CT41ny-f.js +0 -1
  101. package/dist/assets/BusinessVerificationPageScreen-COS298yT.js +0 -9
  102. package/dist/assets/ChargeCardRoutes-DOf8ZxFe.js +0 -71
  103. package/dist/assets/CompanyPassportScreen-E_X2D3vf.js +0 -1
  104. package/dist/assets/ConnectionAuthScreen-Cu1m3qnO.js +0 -11
  105. package/dist/assets/CustomerOnboardingAuthScreen-BlnEv_rI.js +0 -1
  106. package/dist/assets/DomesticWireDetailScreen-Dt8QkNl1.js +0 -18
  107. package/dist/assets/DrawerScreen-B0s6XB_a.js +0 -1
  108. package/dist/assets/EntityDetailRoutes-BFnZxzSO.js +0 -1
  109. package/dist/assets/ExpenseAutomationRoutes-Du15OqPm.js +0 -25
  110. package/dist/assets/FeaturePreviewScreen-B1hf1dDh.js +0 -1
  111. package/dist/assets/HubSpotOAuthCallbackScreen-Btz0OQdh.js +0 -1
  112. package/dist/assets/MagicLinkRoutes-BkrcEfxv.js +0 -72
  113. package/dist/assets/MagicLinkSignInScreen-B7-oTG61.js +0 -12
  114. package/dist/assets/NotFoundScreen-B6lzVM70.js +0 -1
  115. package/dist/assets/OAuthConsentScreen-C3grO2B9.js +0 -1
  116. package/dist/assets/PandLWithForecastRoutes-tDYLv6EF.js +0 -1
  117. package/dist/assets/PeopleRoutes-BvrpCiXR.js +0 -22
  118. package/dist/assets/PerformanceRoutes-D65HLS4l.js +0 -1
  119. package/dist/assets/ReferralListScreen-BJK_FqYN.js +0 -5
  120. package/dist/assets/ReimbursementApprovalRoutes-Deq3_qrD.js +0 -1
  121. package/dist/assets/RewardsRoutes-D5m9btlG.js +0 -1
  122. package/dist/assets/ScreenRoutes-B800Vl-U.js +0 -2
  123. package/dist/assets/SignInScreen-D56meGXv.js +0 -1
  124. package/dist/assets/SignOutScreen-D3B_wlKC.js +0 -9
  125. package/dist/assets/TaskListScreen-DV56A-OD.js +0 -9
  126. package/dist/assets/TreasuryRoutes-udOEEHS2.js +0 -37
  127. package/dist/assets/WiseConfirmationScreen-CO9e9Q0A.js +0 -12
  128. package/dist/assets/ZeniAccountStatementScreen-seV3Vtmq.js +0 -9
  129. package/dist/assets/analyticsHelper-DLVGE934.js +0 -1
  130. package/dist/assets/epic-NcHkg6Zz.js +0 -2
  131. package/dist/assets/useAskAiCfoHostNavButtonProps-lMf8y8xS.js +0 -1
@@ -1,25 +0,0 @@
1
- import{j as C}from"./liveblocks-oKBQUmhq.js";import Rn from"./NotFoundScreen-B6lzVM70.js";import{a,b as wt}from"./sentry-p9ArnUH9.js";import{n as Fe,S as Dn}from"./mui-DRkb5v8u.js";import{u as de,h as Pt,g as qe,j as F,n as Un,i as rt,o as Fn,p as ze}from"./core-rmRh_ZE8.js";import{eP as Re,Q7 as Bn,n4 as ke,fj as _n,qS as Vn,nm as xt,nH as Rt,Q8 as Dt,nR as Mn,Q9 as Ut,nf as jn,qo as On,f3 as fe,Qa as De,sR as Ft,C2 as Bt,Qb as _t,Qc as zn,pY as Ge,LG as dt,LI as Ln,jJ as Qn,LJ as $n,jQ as qn,cV as Gn,tW as Je,ns as Vt,nW as Ue,Qd as Jn,Kz as ut,Ky as we,Qe as mt,k5 as Nn,Qf as Yn,Qg as Kn,Qh as Hn,Qi as Wn,nz as Zn,nk as ue,nZ as Pe,Qj as Xn,Qk as ea,Ql as ta,o4 as na,jU as aa,jL as oa,Qm as sa,jT as ht,LQ as ca,Qn as ia,Qo as la,pU as ra,pw as da,nX as le,pv as Le,Qp as ua,Qq as ma,Qr as ha,lo as pa,bq as ga,lj as pt,l5 as Ca,Qs as Sa,gT as gt,fU as Ia,lg as fa,vP as ka,Qt as Ea,ov as va,oq as ba,ou as ya,of as Aa,Qu as Ta,f6 as Mt,nK as wa,nv as Pa,fk as Ct,n$ as xa,Qv as Ra,nY as jt,Qw as Da,Qx as Ua,Qy as Fa,Qz as Ba,QA as St,q4 as _a,pm as Va,Kx as Ma,jS as ja,QB as Oa,GA as za,jR as La,jG as Qa,f5 as $a,oW as Ot,pe as qa,nV as It,n_ as Ga,bE as Ja,ld as Na,la as Ya,QC as Ka,oe as ft,pc as kt,pa as Ha,o$ as Wa,oG as Za,pd as Xa,QD as eo,QE as to,oK as no,QF as ao,oA as oo,oJ as so,oH as co,ph as io}from"./zeni-epic-state-DH4sFgeZ.js";import{v as zt,T as re,c as z,q as H,V as Lt,_ as Qt,cE as lo,z as Be,cF as ro,at as xe,cG as uo,aT as Et,s as $t,cH as mo,aq as Qe,D as ho,cI as po,a2 as go,cJ as Co,O as So,cK as Io,cL as fo,N as ko,k as Eo,aN as vo,b7 as bo,x as yo,cM as Ao}from"./index-BRBKIeck.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import{c as vt,C as To}from"./TransactionDetailScreen-CrAEKQhU.js";import{w as wo}from"./withTransactionSidePanel-Dqu6-_83.js";import{h as Po,v as xo}from"./routePaths-f58A_7uy.js";import{g as $e}from"./accountMappingHelper-DjOpJLte.js";import{D as Ro}from"./DrawerScreen-B0s6XB_a.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./decodeURIComponentSafe-C5DyNl7Z.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="990fe08d-3266-44b2-b19b-7e7060b9a7bf",t._sentryDebugIdIdentifier="sentry-dbid-990fe08d-3266-44b2-b19b-7e7060b9a7bf")}catch{}})();const Do=()=>{const t=de(),i=Pt(),A=qe(),f=F(d=>Re(d)),{useFeatureGate:E}=zt(),{isFeatureEnabled:g}=E(re.isRealtimeInsightsFeatureEnabled),u=F(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=F(d=>Bn(d,f.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=qt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,Y=!1)=>{t(ke({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:Y}))},[]),b=a.useCallback(d=>{const R=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(_n(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],_=a.useCallback(()=>{const d=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=H(A.state?.pathnameStackToGoBack,A.pathname),T=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=Lt();return Qt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Vn(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&_()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=A.state?.referrer;z.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Uo,{children:C.jsx(lo,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:b,handleReviewButtonClick:T,onBackClick:()=>{i("../../dashboard")},onReload:_,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Uo=Fe.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- background-color: ${t=>t.theme.colors.grey4};
8
- `,Fo=wt.memo(({reconciliation:t,selectedDrawerAccountId:i,onClose:A,onFetchLinkTokenClick:f,onEstablishConnectionClick:E})=>{const g=de(),u=Be.getSignedInUser(),o=F(e=>Re(e)),v=t.excludedAccountIDs,S=a.useMemo(()=>({userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:o?.tenantId??""}),[u?.userId,u?.zeniSessionId,o?.tenantId]),{accountReconciliationsByAccountID:m,monthYearPeriod:b,statementUploadChosen:r}=t,_=m[i],h=_?.accountReconEntity.statementMetaData?.statementUploadId,T=(e,n)=>{g(On(e,n.split(".")[0]))},I=e=>{h!=null&&g(jn({accountId:i,selectedPeriod:b,fileId:e,statementUploadId:h}))},d=()=>{g(Dt({statementUploadChosen:!1}))},R=e=>{g(Mn({accountId:i,selectedPeriod:b,payload:e}))},Y=e=>{g(Ut({accountId:i,selectedPeriod:b,localData:{accountSource:e}}))},te=a.useCallback(()=>{g(xt({accountId:i}))},[g,i]),V=a.useCallback(()=>{g(Rt({accountId:i}))},[g,i]),D=v.includes(i)?t.excludedAccountReconciliationByAccountID[i]:void 0;return _!=null?C.jsx(bt,{children:C.jsx(yt,{children:C.jsx(ro,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:_,monthYearPeriod:b,onDismissClick:A,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:E,onEditFileName:T,onDeleteFile:I,onSelectSourceType:Y,filesEndPoint:xe.fileMicroServiceBaseUrl,authParams:S,openFilePicker:r,onStatementUploadSuccess:R,onUploadWindowOpenedOnce:d,onExcludeFromReconciliation:te})})}):D!=null?C.jsx(bt,{children:C.jsx(yt,{children:C.jsx(uo,{excludedAccountReconciliation:D,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:V})})}):null}),bt=Fe.div`
9
- display: flex;
10
- flex-direction: column;
11
- height: 100%;
12
- `,yt=Fe.div`
13
- flex: 1;
14
- min-height: 0;
15
- display: flex;
16
- flex-direction: column;
17
- box-sizing: border-box;
18
- min-width: 0;
19
- overflow-x: hidden;
20
- overflow-y: auto;
21
- `;function Bo({companyId:t,closeCustomerRequestDrawer:i,addCustomerRequest:A,resetCustomerRequest:f}){const E=Be.getSignedInUser();if(E==null)throw Error("Can't access Customer Request page without signing in...");const g=F(u=>zn(u,t,E));return a.useEffect(()=>{f()},[]),C.jsx(C.Fragment,{children:g.fetchState==="In-Progress"||g.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?C.jsx($t,{fetchState:"In-Progress"}):C.jsx(mo,{onCloseClick:i,addCustomerRequest:A,snippets:g.companyMonthEndReportTemplatesData,bulletPoints:g.zeniRequestsData??[]})})}const _o=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Vo,comma:At,space:Mo}},dateFormat:Gt}=ho.getLocalizedStrings(),Tt=io,jo=Un(function(t,i){const{uncategorizedAccounts:A,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,companyId:u,isMissingReceiptsBulkUploadEnabled:o,isTransactionActivityEnabled:v}=i,S=Be.getSignedInUser(),m=t.tenantState.currentTenantId,b={userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:m??""},r=fe(t),{selectedTransactionCategorizationTab:_}=r;return{expenseAutomationViewSelector:r,bulkUploadSelector:o===!0?r.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:b,receiptUploadEndpoint:`${xe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${go}/transaction_attachments`,bulkUploadEndpoint:o===!0?`${xe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:_,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:S,uncategorizedAccounts:A,companyId:u,isTransactionActivityEnabled:v}},function(t,i){const{themeState:A,isAccountingClassesEnabled:f,isCOTEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isMissingReceiptsBulkUploadEnabled:u,location:o,vendorSearchAutoCompleteData:v,expenseAutomationViewSelector:S,currentTenant:m,uncategorizedAccounts:b,navigate:r,onClickCustomerRequest:_,handleEditClick:h,setActivityLogTransactionId:T}=i,{selectedPeriod:I,currentSelectedView:d,reconciliation:{selectedAccountId:R}}=S,{accountSettingsView:Y}=S.jeSchedules,te=Vt(I),V=Ue(te.start),D=Ue(te.end);return{onZeniLogoClick:()=>{A.toggle()},onUploadReceiptAttachment:e=>{z.trackMissingReceiptAttached(I.month,I.year),t(Va(e))},onUploadTransactionReceipt:(e,n,s,l,k,p)=>{t(St(e,n,{fetchState:"In-Progress"}));const y=()=>t(St(e,n,{fetchState:"Error"}));Co(`${xe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,p,n,s,l,k).then(w=>{w!=null?t(_a(e,w)):y()}).catch(y)},onMissingReceiptsRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Ba(e,n)),m!=null&&t(ke({tenantId:m.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,s,l)=>{t(Fa(e,{fetchState:n,error:s})),s!=null&&t(gt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:l!=null?Mo+Vo+l+At:At}]}))},onUpdateJESchedulesUIState:e=>{t(Ua(e))},onUpdateMissingReceiptsUIState:e=>{t(Da(e))},onFetchMissingReceiptsList:()=>{D!=null&&V!=null&&t(jt({start:V,end:D},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...u===!0?{onBulkUploadFiles:e=>{t(co(e))},onBulkUploadProgress:e=>{t(so(e))},onBulkUploadSuccess:e=>{t(oo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(ao(e))},onConfirmBulkUploadMatch:(e,n,s,l,k)=>{t(no(e,n,s,l,k))},onBulkUploadConfirmMatchAcknowledged:()=>{t(to())},onSetBulkUploadResultsTab:e=>{t(eo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Xa(e))},onSetBulkUploadSortConfig:(e,n)=>{t(kt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Za())},onSearchTransactionsForManualMatch:(e,n)=>{t(Tt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=S.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Tt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Wa(e,n))},onFetchBulkUploadBatches:e=>{t(Ot(e))},onFetchMoreBatchDetails:()=>{t(Ha())},onResetBulkUploadSort:()=>{t(kt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(Ra())},onSearchTextChanged:e=>{const n=S.currentSelectedView,s=S.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Le({selectedTab:s,uiState:{searchString:e}})),D!=null&&V!=null&&t(le(s,{start:V,end:D},!0,!1,e,void 0,!0)))},onRefresh:()=>{i.trackExpenseAutomationTabAnalytics(!0),t(xa(g))},onClose:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0})),r("../")},onBack:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Pa(e))},onSaveReconciliationReview:e=>{t(wa(e))},onUpdateStep:e=>{const{selectedPeriod:n}=S,s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:s,referrer:S.currentSelectedView}}),t(Mt(e))},handleLogOutClick:()=>{const e=H(o.state?.pathnameStackToGoBack,o.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:s,fixedAssetsAccount:l,accruedExpensesAccount:k}=n,p=$e(Y.prepaidExpensesAccountList,s.selectedOptions),y=$e(Y.fixedAssetsAccountList,l.selectedOptions),w=$e(Y.accruedExpensesAccountList,k.selectedOptions),M={selectedPrepaidExpensesAccountIds:p.map(P=>P.accountId),selectedFixedAssetsAccountIds:y.map(P=>P.accountId),selectedAccruedExpensesAccountIds:w.map(P=>P.accountId)};t(Ta({data:M}))},onSaveJeAccountSettingsClick:()=>{t(Aa())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:s,accumulatedDepreciationCategory:l,scheduleClass:k,scheduleExpenseCategory:p,vendor:y}=n,{allAccountList:w,allClassList:M,allDepreciationAccountList:P}=S.jeSchedules,Q=v.entityAutoCompleteView.vendor.length>0?v.entityAutoCompleteView.vendor.find($=>$.id===y?.selectedOption):void 0,ne={id:Q?.zeniId??y?.selectedOption??"",name:Q?.name??y?.defaultOptions.find($=>$.value===y?.selectedOption)?.label??"",logo:Q?.logo},ae=p?.selectedOption!=null?w.find($=>$.qboId===p.selectedOption):void 0,Ee=k?.selectedOption!=null?M.find($=>$.classId===k.selectedOption):void 0,oe=l?.selectedOption!=null?P.find($=>$.qboId===l.selectedOption):void 0;t(ya({scheduledJournalEntryID:e,localData:{jeScheduleID:s,scheduledJournalEntryID:e,updatedCategoryId:ae?.accountId,updatedClassId:Ee?.classId,updatedAccumulatedDepreciationCategoryID:oe?.accountId,updatedVendor:{id:ne.id,name:ne.name}}}))},ignoreRecommendedJeSchedule(e,n){t(ba(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(ut({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onCancelAutoComplete:()=>{t(we("common"))}},onPostJESchedule(e,n){t(va({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Ea())},handleJeScheduleClick:(e,n,s)=>{t(ka({selectedJEScheduleKey:n}));const l=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../vendors/schedules/${s}/details/${e}`,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{m!=null&&t(fa(e,m.companyId,m.tenantId))},onClickCustomerRequest:_,setActivityLogTransactionId:T,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Ia())},onOpenFileAttachmentSnackBar:()=>{t(gt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Sa(e))},onUpdateFileAttachment:e=>{t(Ca({files:e}))},previewMonthEndReport:(e,n,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!0,s,l,m.tenantId))},saveMonthEndReport:(e,n,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!1,s,l,m.tenantId))},onEditMonthEndInsightsClick:h,sendMonthEndReport:e=>{const n=o.state?.referrer,{selectedPeriod:s,auditSummary:l}=S;m!=null&&l?.auditScorePercentage!=null&&(t(pa(m.companyId,e,m.tenantId)),z.trackInsightsEmailPage(s.month,s.year,!1,"draft",l.auditScorePercentage,ga().format(Gt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,s,l,k,p,y,w,M,P,Q,ne,ae)=>{t(ha(e,n,s,l,b,k,p,y,w,M,P,Q,ne,ae))},onCancelAutoComplete:()=>{t(we("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(mt({scrollPosition:e}))},onUpdateTab:e=>{i.closeSidePanel?.(),D!=null&&V!=null&&(t(le(e,{start:V,end:D},!1,!1)),t(ma(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{i.closeSidePanel?.(),D!=null&&V!=null&&(t(ua(e)),t(le("autoCategorized",{start:V,end:D},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Le({selectedTab:e,uiState:n})),D!=null&&V!=null&&t(le(e,{start:V,end:D},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Le({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,s,l,k,p,y)=>{D!=null&&V!=null&&t(le(e,{start:V,end:D},!0,s,n,l,k,p,y))},resetTransactionCategorizationLocalData:(e,n,s,l,k,p,y,w)=>{t(da(e,n,s,l,w??null,k,p,!1,y))},updateSelectedVendorForTransaction:(e,n,s,l,k)=>{t(ht({selectedTab:e,transactionId:n,lineId:s,selectedTransaction:l,uncategorizedAccounts:b,updatedVendor:k,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,s)=>{const l=o.state?.referrer;e==="autoCategorized"?z.trackTransactionsAutoCategorisedPage(I.month,I.year,S.transactionView.totalCountByTab.autoCategorized,n.length,!1,l??null):z.trackTransactionsReviewPage(I.month,I.year,S.transactionView.totalCountByTab.review,n.length,!1,l??null),t(ra(e,n,s,g))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(la({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,s,l,k,p,y)=>{const{transactionId:w,transaction:M,lineIds:P}=n;p!=null&&t(ca({transactionId:w,customerUpdates:p})),t(ia({selectedTab:l,transactionId:w.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:b,updatedCustomer:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:y})),k!=null&&t(Je(k,e,n,s,!0,E,y))},onFetchRecommendationsForEntityCategorization:(e,n,s,l,k,p,y)=>{const{transactionId:w,transaction:M,lineIds:P}=n;p!=null&&(t(aa({transactionId:w,vendorUpdates:{name:p.name,id:p.id?p.id:void 0}})),t(oa({vendorId:p.id?p.id:void 0,localData:{vendorName:p.name,vendorId:p.id?p.id:void 0}}))),p?.id?(t(ht({selectedTab:l,transactionId:w.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:b,updatedVendor:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:y})),k!=null&&t(Je(k,e,n,s,!0,E,y))):t(sa({selectedTab:l,transactionId:w.id,lineId:P[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(Pe(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(Pe(I,!0,!1,null,!1,!1))},markAsReview:(e,n,s,l)=>{z.trackFluxAnalysisReviewed(s.month,s.year,l??!1,e),t(na(n,e,s,l??!1))},onUpdateFluxAnalysisUIState:e=>{t(ta(e))},updateOperatingExpensesIdsForReview:e=>{t(ea({operatingExpenseIds:e,selectedPeriod:I}))},redirectToVendorDetailPage:e=>{if(i.tenantEmailDomain!=null){const n=xo(e.id,e.qboId,i.tenantEmailDomain),s=H(i.location.state?.pathnameStackToGoBack,i.location.pathname);i.navigate(n,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Xn({sectionId:e,selectedPeriod:I}))},onFetchReimbursementView:(e,n,s)=>{t(Pe(e,!0,!1,n,!0,s))},onReviewClicked:e=>{t(ue(I,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Ft("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const s=m?.companyId;s!=null&&(t(Bt(e,s,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(_t({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ut({accountId:e,selectedPeriod:I,localData:{accountSource:"bank_statement"}})),t(Dt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ue(I,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Zn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Wn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Hn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{i.closeSidePanel?.(),t(Kn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,s)=>{const l=e.vendor?.id;s&&l!=null&&t(Nn(l)),t(Yn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,Ge("bill"));const n=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{r(-1)},onReconListPageScroll:e=>{t(mt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ut({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Jn({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(xt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Rt({accountId:e}))}}},(t,i,A)=>{const{isMissingReceiptsBulkUploadEnabled:f,...E}=A;return function(g,u,o){return{...g,...u,...o,onUploadTransactionReceipt:(v,S,m,b,r)=>{u.onUploadTransactionReceipt(v,S,m,b,r,g.authParams)}}}(t,i,E)})(po),Oo=wo(function(t){const i=t.displayName??t.name??"Component",A=wt.memo(t),f=E=>{const g=de(),u=function(){const T=de(),I=F(d=>fe(d).reconciliation.selectedDrawerAccountId);return{isOpen:I!=null,selectedAccountId:I,openPanel:a.useCallback(d=>{T(De({selectedDrawerAccountId:d}))},[T]),closePanel:a.useCallback(()=>{T(De({selectedDrawerAccountId:void 0}))},[T])}}(),o=F(T=>fe(T).reconciliation),v=F(T=>Re(T)),S=a.useCallback((T,I)=>{g(Ft("expense_automation_reconcile",T,I))},[g]),m=a.useCallback((T,I)=>{const d=v?.companyId;d!=null&&(g(Bt(T,d,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",I)),g(_t({accountId:I,connectionInProgress:!0})))},[g,v?.companyId]),b=a.useMemo(()=>{if(u.isOpen&&u.selectedAccountId!=null)return C.jsx(Fo,{reconciliation:o,selectedDrawerAccountId:u.selectedAccountId,onClose:u.closePanel,onFetchLinkTokenClick:S,onEstablishConnectionClick:m})},[u.isOpen,u.selectedAccountId,u.closePanel,o,S,m]),r=a.useMemo(()=>({reconPanelContent:b,reconSidePanelIsOpen:u.isOpen,closeReconSidePanel:u.closePanel}),[b,u.isOpen,u.closePanel]),_=a.useContext(Et),h=a.useMemo(()=>u.isOpen?{closePanel:u.closePanel,selectedItemId:u.selectedAccountId}:_,[u.isOpen,u.closePanel,u.selectedAccountId,_]);return C.jsx(Et.Provider,{value:h,children:C.jsx(A,{...E,...r})})};return f.displayName=`withReconSidePanel(${i})`,f}(({closeSidePanel:t,openTransactionPanel:i,panelContent:A,sidePanelIsFullView:f,sidePanelIsOpen:E,reconPanelContent:g,reconSidePanelIsOpen:u,closeReconSidePanel:o})=>{const{isAiCfoOpen:v,setIsAiCfoOpen:S}=So(),m=Io(),{isOpen:b}=fo(),r=Pt(),_=qe(),h=de(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:I}=qt({mobileExploreReferrer:"Transaction categorization"}),d=a.useCallback(()=>{E===!0&&f!==!0&&t?.()},[t,E,f]),{areTenantIdsInSync:R}=Lt(),Y=(()=>{const c=F(q=>fe(q)),O=qe(),{currentSelectedViewFetchState:N,currentSelectedView:j,selectedPeriod:B}=c,Ie=Qe(j),X=Qe(N.fetchState),ye=a.useCallback(q=>{const K=O.state?.referrer;j==="transaction_categorization"&&(c.selectedTransactionCategorizationTab==="review"?z.trackTransactionsReviewPage(B.month,B.year,c.transactionView.totalCountByTab.review,0,q,K??null):z.trackTransactionsAutoCategorisedPage(B.month,B.year,c.transactionView.totalCountByTab.autoCategorized,0,q,K??null)),j==="missing_receipts"&&z.trackMissingReceiptsPage(B.month,B.year,q,c.missingReceipts.transactions.length,K??null),j==="je_schedules"&&z.trackMonthCloseScheduleListPage(B.month,B.year,q,c.jeSchedules.draftSchedules.length,c.jeSchedules.resolveSchedules.length,K??null),j==="flux_analysis"&&z.trackFluxAnalysisPage(B.month,B.year,q,_o(c.fluxAnalysis),K??null),j==="month_end_insights"&&c.auditSummary?.auditScorePercentage!=null&&z.trackInsightsEmailPage(B.month,B.year,q,"draft",c.auditSummary.auditScorePercentage,null,K??null)},[B,c]);return a.useEffect(()=>{X===N.fetchState&&j===Ie||N.fetchState!=="Completed"||ye(!1)},[j,N.fetchState,Ie]),ye})(),te=ko(),[V,D]=a.useState(!1),e=F(c=>dt(c)),n=F(c=>Re(c)),[s,l]=a.useState(!1),[k,p]=a.useState(!1),[y,w]=a.useState([]),[M,P]=a.useState(void 0),Q=a.useCallback(c=>{c!=null&&(v&&S(!1),m(),d()),P(c)},[d,v,m,S]),ne=a.useCallback(()=>{m(),P(void 0),d(),I()},[d,I,m]),ae=a.useRef(v);a.useEffect(()=>{v===!0&&ae.current===!1&&(m(),P(void 0),d()),ae.current=v},[d,v,m]);const Ee=a.useRef(b);a.useEffect(()=>{b===!0&&Ee.current===!1&&(v&&S(!1),P(void 0),E===!0&&f!==!0&&t?.()),Ee.current=b},[t,b,v,S,f,E]);const oe=E===!0&&f!==!0,$=a.useRef(oe);a.useEffect(()=>{oe&&!$.current&&(v&&S(!1),m(),P(void 0)),$.current=oe},[v,oe,m,S]);const[Ne,Jt]=a.useState(!1),Ye=a.useRef(!1),{selectedTab:Ke}=rt(),{tenantEmailDomain:Nt}=rt(),[_e,He]=a.useState(_.state?.message==="comingFromTransactionDetail"),We=_.state?.message==="comingFromOverview",Yt=Eo(),Ve=Be.getSignedInUser(),{useDynamicConfig:Kt,useFeatureGate:me}=zt(),{configValue:Ht}=Kt(vo.enableUncategorizedExpenseCategory),W=Ht?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:Ze}=me(re.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:he}=me(re.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Xe}=me(re.isTransactionActivityEnabled),{isFeatureEnabled:Wt}=me(re.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:Zt}=me(re.isProjectsTransactionsEnabled),Xt=a.useCallback(c=>{const O=Ge(c.view==="reconciliation"?"bill":"expense");i?.(c.entityId,O)},[i]),en=F(c=>Ma(c,"common")),L=F(c=>fe(c)),{monthEndCloseChecksView:J,currentSelectedView:x,selectedPeriod:U,selectedTransactionCategorizationTab:se,currentSelectedViewBackgroundRefreshFetchState:tn,currentSelectedViewFetchState:Z,jeSchedules:Me,reconciliation:nn}=L;a.useEffect(()=>{x==="transaction_categorization"&&E!==!0||Q(void 0)},[x,Q,E]);const ve=a.useRef(null);a.useEffect(()=>{ve.current!==null?ve.current!==se&&(ve.current=se,x==="transaction_categorization"&&Q(void 0)):ve.current=se},[x,se,Q]);const an=F(c=>M==null?void 0:ja(c.transactionState,M)),ce=an?.qboId,on=F(c=>ce==null?void 0:Oa(c,ce));a.useEffect(()=>{ce!=null&&h(za(ce))},[h,ce]);const{selectedAccountId:pe}=nn,et=Qe(Me.accountSettingsView.saveState.fetchState),sn=F(c=>La(c.accountState,c.accountListState,"accountList")),cn=F(c=>Qa(c)),ge=Ke!=null?$a(Ke):x,ln=F(c=>c.entityAutoCompleteState.autoCompleteText.common);if(Qt({isDataReady:Z.fetchState==="Completed"}),Ve==null)throw Error("Can't access expense automation screen without signing in...");const tt=Vt(U),Ce=Ue(tt.start),Se=Ue(tt.end);if(Ce==null||Se==null)throw Error(`Invalid start - ${Ce} and end - ${Se} period from given ${U}`);const rn=a.useCallback(()=>{l(!1)},[]),dn=a.useCallback(()=>{p(!0)},[]),un=a.useCallback(c=>{w(c),p(!1)},[]),mn=a.useCallback(()=>{w([])},[]),be=L.missingReceipts.bulkUpload.phase,nt=L.missingReceipts.bulkUpload.currentBatchId;a.useEffect(()=>{he===!0&&x==="missing_receipts"&&be==="matching"&&nt!=null&&h(Ot({cacheOverride:!0}))},[he,x,be,nt,h]);const at=Ve?.userId,hn=U.month,pn=U.year,ot=n?.tenantId;a.useEffect(()=>{x==="missing_receipts"&&he!==!1&&be==="idle"&&at!=null&&ot!=null&&h(qa())},[x,he,be,at,ot,hn,pn,h]),a.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?D(!0):D(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect(()=>{ge!=null&&x!==ge&&h(Mt(ge))},[ge]),a.useEffect(()=>{Ne!==!1||Z.fetchState!=="Completed"&&Z.fetchState!=="Error"||!R||(Jt(!0),h(It(!1,!1,W)))},[Ne,Z,R,W]),a.useEffect(()=>{!We&&R&&(h(It(!1,!1,W)),h(ue(U,pe,!1,!1)))},[U.month,U.year,R,W]);const st=a.useCallback((c=!1,O=!1)=>{const N={start:Ce,end:Se};switch(x){case"transaction_categorization":h(le(se,N,c,!_e,void 0,void 0,O,void 0,W)),He(!1);break;case"flux_analysis":h(Pe(U,c,O,null));break;case"month_end_insights":if(O===!1){const j=new Date(U.year,U.month,0),B=Ja(j.toDateString()).format(Gt.analytics.YYYYDashMMDashDDFormat);h(Na(!0,n.companyId,n.tenantId,B)),h(Ya(n.companyId,n.tenantId))}break;case"je_schedules":h(Ga(N,O));break;case"missing_receipts":h(jt(N,{amount:75,currencyCode:"USD",currencySymbol:"$"},c,O));break;default:h(ue(U,pe,c,O))}},[x,Ce,Se,n.companyId,n.tenantId,se,U,pe,_e,He,W]);a.useEffect(()=>{x===ge&&Z.fetchState==="Not-Started"&&R&&st(!0)},[Z,Ce,Se,n.companyId,n.tenantId,R]),a.useEffect(()=>{We||_e||Ye.current||tn.fetchState==="In-Progress"||Z.fetchState!=="Completed"||(Ye.current=!0,st(!0,!0))},[]),a.useEffect(()=>{J.fetchState!=="In-Progress"&&J.fetchState!=="Completed"&&h(ke({tenantId:n.tenantId,period:U,refreshViewInBackground:!1}))},[J.fetchState,n.tenantId]),a.useEffect(()=>{L.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?l(!0):l(!1)},[L.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect(()=>{L.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&R&&(h(ke({tenantId:n.tenantId,period:U,refreshViewInBackground:!0})),h(Ka({companyId:n.companyId})),r("../"))},[L.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,U,n.companyId,R]),a.useEffect(()=>{const c=setInterval(()=>{J.fetchState!=="In-Progress"&&J.fetchState==="Completed"&&h(ke({tenantId:n.tenantId,period:U,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(c)},[J.fetchState,n.tenantId,U,h]),a.useEffect(()=>{const c=setInterval(()=>{x==="reconciliation"&&pe==null&&L.reconciliation.fetchStatus.fetchState==="Completed"&&L.reconciliation.refreshStatus.fetchState!=="In-Progress"&&h(ue(U,void 0,!0,!0))},3e5);return()=>clearInterval(c)},[x,h,L.reconciliation.fetchStatus.fetchState,L.reconciliation.refreshStatus.fetchState,ue,pe,U]);const gn=vt();a.useEffect(()=>{const c=(J.monthEndCloseChecks?.monthEndCloseCheckList.find(O=>O.id==="month_end_insights")?.isDisabled??!1)&&!Ze;x!=="month_end_insights"||!c&&J.monthEndCloseChecks?.reportEmailSentDate==null||r("../")},[x,J.monthEndCloseChecks]);const Cn=u===!0?g:A,Sn=u===!0||E===!0,In=u===!0?o:t;a.useEffect(()=>{et==="In-Progress"&&Me.accountSettingsView.saveState.fetchState==="Completed"&&h(ft())},[et,Me.accountSettingsView.saveState.fetchState,ft]);const{transactionId:ct,onSaveVendor:fn,onSaveSuccess:kn,onCancel:En,vendorViewDetails:vn}=(({expenseAutomationViewSelector:c,closeDrawerHandler:O,currentSelectedView:N})=>{const j=de();let B,Ie,X;const ye=vt(),q=c.transactionView;let K=()=>{};const{transactions:bn,selectedTransactionId:ie,selectedTransactionLineId:Ae,transactionLocalData:yn}=q;if(N==="transaction_categorization"){const je=yn.find(ee=>ee.transactionId===ie),G=bn.find(ee=>ee.id===ie),it=Ae!=null?je?.transactionReviewLocalData?.lineItemById[Ae]:void 0,lt=it?.account;Ie=it?.class?.classId,B=["Uncategorized Income","Uncategorized Expense"].includes(lt?.accountName??"")?void 0:lt?.accountId;const Tn=Po(ie,G?.typeOfTransaction);G!=null&&Tn&&(X={id:ie,type:Ge(G.typeOfTransaction)}),K=()=>{if(ie!=null&&Ae!=null&&G!=null){const ee=q.transactionLocalData.find(Te=>Te.transactionId===ie)?.transactionReviewLocalData;if(ee!=null&&G.lines!=null&&G.lines.length>0){const Te=ee.lineItemById[Ae];let Oe=ee.selectedEntity;if(Gn(G)||(Oe=Te.selectedEntityLine),Oe!=null){const wn=Oe,Pn={transactionId:{id:G.id,type:G.type},transaction:G,lineIds:G.lines.map(xn=>xn.id)??[]};j(Je(wn,Te.amount.amount,Pn,!1,!0,ye))}}}}}const An=F(je=>dt(je,void 0,B,Ie));return{transactionId:X,onSaveVendor:()=>{j(qn(X,void 0,!1,!0))},onSaveSuccess:K,onCancel:()=>{X!=null&&j(Ln({transactionId:X})),j(Qn()),j($n()),O()},vendorViewDetails:An}})({expenseAutomationViewSelector:L,closeDrawerHandler:()=>{D(!1)},currentSelectedView:x});return Yt?.loggedInUserRoleMap==null?J.fetchState==="Error"?C.jsx(bo,{onGoHome:()=>r("../",{replace:!0}),onReload:()=>window.location.reload()}):C.jsx($t,{fetchState:"In-Progress"}):C.jsxs(C.Fragment,{children:[C.jsx(Ro,{isOpen:k,drawerLeftMargin:new yo(0,0,300,650),onClose:()=>{p(!1)},children:C.jsx(zo,{onClick:c=>c.stopPropagation(),children:C.jsx(Bo,{companyId:n.companyId,closeCustomerRequestDrawer:()=>p(!1),addCustomerRequest:un,resetCustomerRequest:mn})})}),ct!=null&&V&&C.jsx(To,{isOpen:V,transactionId:ct,onSaveVendor:fn,onSaveSuccess:kn,onCancel:En,vendorViewDetails:vn}),C.jsx(jo,{navigate:r,location:_,themeState:te,vendorSearchAutoCompleteData:{autoCompleteText:ln,entityAutoCompleteView:en},expenseAutomationViewSelector:L,isMissingReceiptsBulkUploadEnabled:he,monthEndInsightsPreviewMode:s,monthEndInsightsCustomerRequestData:y,isRealtimeInsightsFeatureEnabled:Ze,isUncategorizedExpenseCategoryEnabled:W,isAccountingClassesEnabled:cn,isProjectsTransactionsEnabled:Zt,isCOTEnabled:gn,currentTenant:n,companyId:n.companyId,signedInUser:Ve,isTransactionActivityEnabled:Xe,activityLogTransactionId:x==="transaction_categorization"?M:void 0,activityLogPanel:x==="transaction_categorization"&&Xe===!0&&M!=null?C.jsx(Ao,{activityLogView:on,qboId:ce,onClose:()=>Q(void 0),selectedTransactionId:M},String(M)):null,uncategorizedAccounts:sn,onClickCustomerRequest:dn,handleEditClick:rn,tenantEmailDomain:Nt,trackExpenseAutomationTabAnalytics:Y,setActivityLogTransactionId:Q,closeSidePanel:In,openTransactionPanel:i,sidePanelIsOpen:Sn,sidePanelIsFullView:u!==!0&&f,panelContent:Cn,isAiCfoAccessEnabled:T,onAskAiCfoClick:ne,isExpenseAutomationCommentingEnabled:Wt,onExpenseAutomationCommentingThreadClick:Xt,sidePanelListPercent:u===!0?66:void 0})]})})),zo=Fe(Dn)`
22
- display: flex;
23
- min-height: 100%;
24
- flex-direction: column;
25
- `;function ds(){return C.jsxs(Fn,{children:[C.jsx(ze,{path:"*",element:C.jsx(Do,{})}),C.jsx(ze,{path:"/:selectedTab/:selectedPeriod/*",element:C.jsx(Oo,{})}),C.jsx(ze,{path:"*",element:C.jsx(Rn,{})})]})}export{ds as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-oKBQUmhq.js";import{a as r}from"./sentry-p9ArnUH9.js";import{a3 as l,a4 as p,a5 as d,n as m}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import c from"./NotFoundScreen-B6lzVM70.js";import{h as u,g as b}from"./core-rmRh_ZE8.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]="e5992879-11fa-4121-8a97-eb0ecebef062",e._sentryDebugIdIdentifier="sentry-dbid-e5992879-11fa-4121-8a97-eb0ecebef062")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),f=n.poppedPathname??k();e(f,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:d(o),onDemoClick:t,onGoBack:i}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1 +0,0 @@
1
- import{a as r}from"./sentry-p9ArnUH9.js";import{u as l,h as f,g as m}from"./core-rmRh_ZE8.js";import{gA as p,JM as g,JN as _}from"./zeni-epic-state-DH4sFgeZ.js";import{u as b,L as h,z as y}from"./index-BRBKIeck.js";import"./liveblocks-oKBQUmhq.js";import"./recharts-BG7SNYPF.js";import"./mui-DRkb5v8u.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="c3143327-0e0d-4fc6-83b3-9f591aea766a",e._sentryDebugIdIdentifier="sentry-dbid-c3143327-0e0d-4fc6-83b3-9f591aea766a")}catch{}})();function R(){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{R as default};
@@ -1,72 +0,0 @@
1
- import{j as t}from"./liveblocks-oKBQUmhq.js";import{i as S,n as x,h as C,g as y,u as ee,s as te,j as E,N as ae,o as ne,p}from"./core-rmRh_ZE8.js";import{JF as k,JG as v,JH as T,zF as z,zr as G,JI as D,JJ as oe,JK as se,zv as ie,eW as $,zC as le,zz as de}from"./zeni-epic-state-DH4sFgeZ.js";import{J as g,o as d,Q as re,c as j,i as J,m as ce,n as me,U as pe,q as K,v as ue,T as he,G as xe,N as ge,h as fe,r as we,s as be,K as Se,R as ye,S as ke,w as ve,x as je,Y as $e}from"./index-BRBKIeck.js";import{n as m}from"./mui-DRkb5v8u.js";import f from"./NotFoundScreen-B6lzVM70.js";import{a as I}from"./sentry-p9ArnUH9.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="7b2d3a4d-65da-45ec-8f33-cb5c7c5d16d7",e._sentryDebugIdIdentifier="sentry-dbid-7b2d3a4d-65da-45ec-8f33-cb5c7c5d16d7")}catch{}})();const Ie=m.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=x(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(z(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(re);function F(){const e=g(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const ze=m.div`
11
- display: flex;
12
- height: 100vh;
13
- width: 100%;
14
- flex: 1 1 auto;
15
- flex-direction: column;
16
- align-items: center;
17
- background-color: ${e=>e.theme.colors.grey4};
18
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,De=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:D(e),googleAPIKey:J.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Ae();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 a=C(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx(ze,{windowSize:o,children:t.jsx(De,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:J.googleMapsAPIKey})})})}const Ae=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},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}),Ne=m.div`
20
- display: flex;
21
- height: 100%;
22
- width: 100%;
23
- flex: 1 1 auto;
24
- flex-direction: column;
25
- align-items: center;
26
- background-color: ${e=>e.theme.colors.grey4};
27
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Le=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(z(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:r}=i;e(T({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),r=K(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(pe);function Ee(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ne,{windowSize:n,children:t.jsx(Le,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
- display: flex;
30
- height: 100%;
31
- width: 100%;
32
- flex: 1 1 auto;
33
- flex-direction: column;
34
- align-items: center;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Te=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(z(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:r}=i;e(se({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),r=K(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(xe);function Ge(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Te,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Je={containerWidth:new je(100,58)},Ke=m(ke)`
38
- width: ${d.sp4};
39
- height: ${d.sp4};
40
- margin-bottom: ${d.sp3};
41
- margin-top: ${d.sp3};
42
- margin-left: ${d.sp8};
43
- cursor: pointer;
44
- position: absolute;
45
- color: ${e=>e.theme.colors.brandColorJade};
46
- `,Me=m.div`
47
- display: flex;
48
- height: 100vh;
49
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
- width: 100vw;
51
- overflow-y: scroll;
52
- background-color: ${e=>e.theme.colors.grey4};
53
- `,He=m.div`
54
- display: flex;
55
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
- flex-direction: column;
57
- width: ${e=>`${Je.containerWidth.value(e.windowSize)}%`};
58
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
60
- padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
61
- `,Ve=m.div`
62
- display: flex;
63
- flex-direction: column;
64
- align-items: center;
65
- justify-content: center;
66
- padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.sp8}`};
67
- height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
- overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
- width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
- background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
- margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,We=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),r=i.get("token"),M=n.pathname.includes("address"),w=g(),H=ge(),B=fe(),b=we(),V=()=>{H.toggle()},W=E(u=>k(u)),U=E(u=>v(u)),{authParams:_,fetchState:c,billAttachment:Q,billFetchState:A,companyName:R,currencySymbol:Y,amount:q}=W,{tenantId:P,userId:N,sessionId:L}=_,{fetchState:O,internationalBankAccountCreateStatus:X}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&r!=null&&a(le(s,o,r))},[b,c,s,o,r,a]),I.useEffect(()=>{b&&c==="Completed"&&($(N,L,P),l!=null&&a(de(l)))},[c,b,N,L,P,l,a]),c==="Error"?t.jsx(f,{}):O==="Completed"||X.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${B.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&A==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",R,l??"",Ue(n.pathname),Y,q))(u)}),t.jsxs(Me,{windowSize:w,children:[w!=="small"?t.jsx(Ke,{onClick:V}):null,t.jsx(Ve,{windowSize:w,isAddressPage:M,children:A==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(We,{file:Q,type:"bill"})}),t.jsx(He,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function _e(){return t.jsx($e,{})}function rt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(_e,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(Be,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Ge,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{rt as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-oKBQUmhq.js";import{a as g}from"./sentry-p9ArnUH9.js";import{u as U,g as w,h as _,s as J,j as l,N as T}from"./core-rmRh_ZE8.js";import{z as r,h as P,D as A,d as M,c as V,e as N,B,R,g as W}from"./index-BRBKIeck.js";import{eP as q,Jq as $,JA as G,Jr as H,eW as K,fn as Q,Jw as X,fL as Y,cT as Z,JB as ee,JC as te}from"./zeni-epic-state-DH4sFgeZ.js";import{n as ne}from"./mui-DRkb5v8u.js";import{u as se}from"./useDeviceId-DDLhcPdX.js";import{f as ae}from"./analyticsHelper-DLVGE934.js";import{t as ie}from"./getLocaleForTenant-D8ujXHmv.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="30da8cf3-0d81-4dd2-8213-9c690af7a695",t._sentryDebugIdIdentifier="sentry-dbid-30da8cf3-0d81-4dd2-8213-9c690af7a695")}catch{}})();const C=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Ce(){const t=U(),a=w(),m=_(),[y]=J(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:D,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>q(e)),k=l(e=>$(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(G(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(k.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),A.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&M(e)}),setTimeout(()=>{V.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,b,s,o,k,v,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(I==="Completed"&&d!=null)return u.jsx(B,{phoneNumber:D,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!C(n,p)||f==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{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{Ce as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-oKBQUmhq.js";import{h as r,n}from"./core-rmRh_ZE8.js";import{F as i}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import"./sentry-p9ArnUH9.js";import"./zeni-epic-state-DH4sFgeZ.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="5c5889c8-57e3-45ae-9448-30e7686263ec",o._sentryDebugIdIdentifier="sentry-dbid-5c5889c8-57e3-45ae-9448-30e7686263ec")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-oKBQUmhq.js";import{a as r}from"./sentry-p9ArnUH9.js";import{u as P,g as A,j as o,N as j}from"./core-rmRh_ZE8.js";import{JP as C,eP as J,f7 as R,JQ as x,JR as z,JS as D,JT as L,mW as M,IL as N}from"./zeni-epic-state-DH4sFgeZ.js";import{z as h,W as I}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="c017ba98-b4c1-45db-9d59-cda3924bf5ec",n._sentryDebugIdIdentifier="sentry-dbid-c017ba98-b4c1-45db-9d59-cda3924bf5ec")}catch{}})();function ee(){const n=P(),s=A(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o(e=>J(e)),l=o(e=>R(e)),d=o(e=>e.tenantState.fetchState),w=o(x),y=o(z),c=o(D),[S,v]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(M(a.userId,a.zeniSessionId??void 0))))},[p,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),u=S??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:v,approveError:E??y,isApproving:w==="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.")}}}):f.jsx(j,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as n}from"./liveblocks-oKBQUmhq.js";import{h as W,u as z,g as Z,i as H,j as d,n as J,o as Q,p as I}from"./core-rmRh_ZE8.js";import{eP as U,q_ as R,qy as X,Kl as v,qt as T,bt as ee,bn as ae,bT as te,qu as se,Km as oe,K7 as C,dE as re,un as ne,Kn as ie,uK as ce,e_ as le,eY as de}from"./zeni-epic-state-DH4sFgeZ.js";import{z as me,V as fe,_ as pe,k as ue,v as q,T as M,K as he,c as _,ao as ge,q as Fe}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import be from"./NotFoundScreen-B6lzVM70.js";import{F as Ie}from"./FeaturePreviewScreen-B1hf1dDh.js";import{a as g}from"./sentry-p9ArnUH9.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import{u as Te}from"./useInitialThreadRequest-B5lLxxrW.js";import{t as ye}from"./routePaths-f58A_7uy.js";import{M as Se}from"./MobileAppDrawer-CzXbfz6E.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="6195d03e-9900-40d9-beb1-186f3055119a",s._sentryDebugIdIdentifier="sentry-dbid-6195d03e-9900-40d9-beb1-186f3055119a")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=J(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:_}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(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 m=ye(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{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("../../")}}})(ge);function O(){const s=W(),e=z(),a=Z(),{forecastId:o,tenantEmailDomain:r}=H(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),S=d(t=>U(t)),$=S.company?.companyInfo.firstMonthOfFY??1,c=d(t=>R(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:w,onAskAiCfoClick:K}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,P)=>L!=null?f.forecasts.findIndex(b=>b.id===L):P!=null?f.forecasts.findIndex(b=>b.id===P):f.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(v(c.forecasts[t].id,t)),y(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&y(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(T(c.forecasts[t].id))}},[i,p,e,l,c,m,u,R,T,F]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:N}=q(),{isFeatureEnabled:E}=N(M.isReportsCommentingEnabled),Y=Te(E?S?.companyId:void 0,{clearParams:l&&m}),[G,V]=g.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:_,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Se,{isAppContentDrawerOpen:G,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:w,onAskAiCfoClick:K,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d(i=>U(i)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Q,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
@@ -1,22 +0,0 @@
1
- import{j as s}from"./liveblocks-oKBQUmhq.js";import{Kg as te,eP as J,jG as z,e_ as Q,eY as ne,HI as Y,JW as oe,tt as Ee,Kh as N,th as ke,tC as Ie,tw as ie,tl as re,tA as Pe,tx as je,Ki as le,v9 as Te,Kj as ve,fB as Le,Kk as K,tq as de,to as ce,tF as Fe,c2 as Ae}from"./zeni-epic-state-DH4sFgeZ.js";import{J as pe,v as X,T as E,z as H,a9 as ue,y as me,ak as ge,al as Re,x as he,o as R,A as fe,D as Ce,am as Oe,V as Ve,_ as Ue,K as Be,c as be,e as Ze,q as $e,an as Ke,k as _e}from"./index-BRBKIeck.js";import{D as ye,n as W,S as we}from"./mui-DRkb5v8u.js";import ae from"./NotFoundScreen-B6lzVM70.js";import{a as r}from"./sentry-p9ArnUH9.js";import{u as ee,i as Ge,j as m,h as ze,g as He,n as We,o as se,p as $}from"./core-rmRh_ZE8.js";import{u as qe}from"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import{M as Me}from"./MobileAppDrawer-CzXbfz6E.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="379d12db-9293-4ada-9de5-3cc1040bad17",a._sentryDebugIdIdentifier="sentry-dbid-379d12db-9293-4ada-9de5-3cc1040bad17")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Je=({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}=Ge(),d=m(e=>te(e)),u=m(e=>J(e)),D=m(e=>z(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Q(k,u),v=ne(u),L=Y(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:L,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,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(L))},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
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Se=W(fe.H6Regular)`
6
- margin-top: ${R.sp7};
7
- padding-left: ${R.sp8};
8
- padding-right: ${R.sp8};
9
- color: ${a=>a.theme.colors.primary};
10
- word-break: break-word;
11
- `,De=W(fe.LargeRegularSp)`
12
- color: ${a=>a.theme.colors.hero};
13
- padding-left: ${R.sp8};
14
- padding-right: ${R.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${R.sp4};
17
- white-space: pre-line;
18
- `,Ye={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>J(i)),u=m(i=>z(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Q(f,d),P=ne(d),v=Y(d),L=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&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 x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:L===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ye.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=W(we)`
19
- display: flex;
20
- min-height: 100%;
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:z(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(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=ze(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=H.getSignedInUser(),h=m(e=>J(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>z(e)),I=!Q(O,h)&&V,w=Y(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,v]=r.useState(!1),[L,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=qe({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>ve(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Le(e)),b=h?.companyId;r.useEffect(()=>{u&&L===c.uiState.mode||!o||(n(K({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),v(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),v(!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(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Je,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Me,{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,q)=>{n(K({sortKey:e,sortOrder:q}))},onRowClick:e=>{const q=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(q,{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(M,{})}),s.jsx($,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(M,{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 +0,0 @@
1
- import{j as s}from"./liveblocks-oKBQUmhq.js";import E from"./NotFoundScreen-B6lzVM70.js";import{a as r}from"./sentry-p9ArnUH9.js";import{h as _,g as v,j as p,i as M,u as P,N as U,n as z,o as N,p as h}from"./core-rmRh_ZE8.js";import{eP as O,Q6 as b,bo as B,bn as F,hn as V,gT as Q}from"./zeni-epic-state-DH4sFgeZ.js";import{N as $,z as I,_ as q,cD as G}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import{M as J}from"./MobileAppDrawer-CzXbfz6E.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="ad89de49-43db-4f0a-b350-0c562b872722",e._sentryDebugIdIdentifier="sentry-dbid-ad89de49-43db-4f0a-b350-0c562b872722")}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=>O(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),D=o?.userRole?.includes("bookkeeping_admin")??!1,k=F(l),x=C||D||k,d=r.useCallback((a,i,A)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:A}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f(Q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const y=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=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:u,onReload:y,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(N,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1,5 +0,0 @@
1
- import{j as s}from"./liveblocks-oKBQUmhq.js";import{a as o}from"./sentry-p9ArnUH9.js";import{j as f,h as V,u as B,g as _,n as F}from"./core-rmRh_ZE8.js";import{h as H,J as N,z as R,b9 as W,x as U,V as $,_ as z,K,c as l,e as q,a7 as J,ba as G}from"./index-BRBKIeck.js";import{f2 as Q,eP as X,ML as P,MM as Y,ud as Z,u3 as g,f4 as ee,bO as ae,u8 as re,MN as ne}from"./zeni-epic-state-DH4sFgeZ.js";import{D as te,e as se,n as oe,S as ie}from"./mui-DRkb5v8u.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import{M as de}from"./MobileAppDrawer-CzXbfz6E.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]="0103fd3d-0d18-43a0-9759-b4f1654a4f7e",e._sentryDebugIdIdentifier="sentry-dbid-0103fd3d-0d18-43a0-9759-b4f1654a4f7e")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=H(),n=N();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>Q(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,I="refer-and-earn-status-update",we=F(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(J(G));function ve({isReferralDrawerOpen:e}){const a=V(),r=B(),n=_(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>X(t)),m=f(t=>P(t)),y=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),b=Y([m,p]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&y==="Not-Started"&&c&&(u(!0),r(g(!0)))},[y,r,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(x(!0),r(ee(!0)))},[p,r,c]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:M,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:b===!0});const L={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,T)=>{T.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[b===!0?s.jsx(K,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(q.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:M,onAskAiCfoClick:O,...L})]})}export{ve as R};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-oKBQUmhq.js";import x from"./NotFoundScreen-B6lzVM70.js";import{a as p}from"./sentry-p9ArnUH9.js";import{h as I,g as C,u as D,j as u,N as A,n as E,o as k,p as c}from"./core-rmRh_ZE8.js";import{eP as V,NF as g,NV as S,Da as T,Cj as N,D9 as f,D0 as U,O9 as _}from"./zeni-epic-state-DH4sFgeZ.js";import{h as O,z as $,s as P,a7 as W,bQ as z,af as B}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-B-HB-2Ii.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]="5501c75f-c1e4-4abf-a5a7-271ff52d06a9",e._sentryDebugIdIdentifier="sentry-dbid-5501c75f-c1e4-4abf-a5a7-271ff52d06a9")}catch{}})();const m="reimbursement-approval-rule-update",F=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(m)&&e(_(!1))},onBackClick:()=>{B(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(U(n))},onEditRuleClick:n=>{n!=null?(e(f(n)),a(`./${n}/edit`)):(e(f()),a("./new"))}}})(W(z)),Q=()=>{const e=I(),r=C(),a=D(),[l,n]=p.useState(!1),[d,y]=p.useState(!1),h=u(s=>s.remiSetupApproverViewState.fetchState),o=u(s=>V(s)),w=O(),i=u(s=>g(s)),b=u(s=>S(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{b?.updateStatus.fetchState==="Completed"&&a(T())},[b]),p.useEffect(()=>{l||h!=="Not-Started"||(n(!0),a(N(!0)))},[l,h,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(d||(y(!0),a(f())),e("./new"))},[d,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${m}`]:[],eventCallback:(s,q,R)=>{s.endsWith(m)&&R.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(A,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(c,{path:"/",element:t.jsx(Q,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-oKBQUmhq.js";import{v as x,z as w,aN as y,K as E,c as p,e as F,cN as P,T as L}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import l from"./NotFoundScreen-B6lzVM70.js";import{a as d}from"./sentry-p9ArnUH9.js";import{u as T,j as b,h as V,g as A,n as R,o as U,p as u}from"./core-rmRh_ZE8.js";import{eP as z,QG as C,Nk as Q,QH as N,ud as G,f4 as Y,QI as H,ub as K}from"./zeni-epic-state-DH4sFgeZ.js";import{R as j}from"./ReferralListScreen-BJK_FqYN.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import"./MobileAppDrawer-CzXbfz6E.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]="182d2752-30fb-4d3e-b17e-dc05d7fea225",e._sentryDebugIdIdentifier="sentry-dbid-182d2752-30fb-4d3e-b17e-dc05d7fea225")}catch{}})();const O=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(N()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(K())},onUpdateInviteFormLocalData:s=>{e(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),q=()=>{const e=T(),[t,n]=d.useState(!1),[i,s]=d.useState(!1),r=b(o=>z(o)),c=V(),_=A(),{useDynamicConfig:g}=x(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=b(o=>C(o)),k=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:v}=g(y.zeniAccountsConfig),D=Q(v);d.useEffect(()=>{e(N()),r?.rewardsLastViewedTime==null&&i===!1&&(e(G()),s(!0))},[]),d.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(Y(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(O,{navigate:c,location:_,currentTenant:r,companyName:I,userName:k,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=x(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(j,{}):a.jsx(l,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(j,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(q,{}):a.jsx(l,{})}),a.jsx(u,{path:"*",element:a.jsx(l,{})})]})}export{ue as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-DQ8scLPs.js","assets/sentry-p9ArnUH9.js","assets/core-rmRh_ZE8.js","assets/zeni-epic-state-DH4sFgeZ.js","assets/index-BRBKIeck.js","assets/mui-DRkb5v8u.js","assets/analytics-CnRKHa3G.js","assets/utils-B4k-7_rU.js","assets/withTransactionSidePanel-Dqu6-_83.js","assets/useAskAiCfoHostNavButtonProps-lMf8y8xS.js","assets/TransactionDetailScreen-CrAEKQhU.js","assets/decodeURIComponentSafe-C5DyNl7Z.js","assets/routePaths-f58A_7uy.js","assets/NotFoundScreen-B6lzVM70.js","assets/useInitialThreadRequest-B5lLxxrW.js","assets/analyticsHelper-DLVGE934.js","assets/CompanyPassportScreen-E_X2D3vf.js","assets/MobileAppDrawer-CzXbfz6E.js","assets/useAiCfoDashboardSuggestedQuestionsChips-CDWxxCLl.js","assets/FeaturePreviewScreen-B1hf1dDh.js","assets/ReferralListScreen-BJK_FqYN.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-BjRPRC0a.js","assets/AddressScreen-CLP4FP-O.js","assets/DomesticWireDetailScreen-Dt8QkNl1.js","assets/DrawerScreen-B0s6XB_a.js","assets/SetupPagesScreen-BLeSibic.js","assets/BusinessVerificationPageScreen-COS298yT.js","assets/BillPayApprovalRoutes-B93D6K86.js","assets/ReimbursementApprovalRuleDetailScreen-B-HB-2Ii.js","assets/getLocaleForTenant-D8ujXHmv.js","assets/ReimbursementRoutes-CT53GTQR.js","assets/ReimbursementApprovalRoutes-Deq3_qrD.js","assets/TransactionListRoutes-BcEl6aLg.js","assets/ZeniAccountStatementScreen-seV3Vtmq.js","assets/SettingsRoutes-BTpkC5ER.js","assets/accountMappingHelper-DjOpJLte.js","assets/QBOConnectionScreen-CoUX8FMs.js","assets/empty-BR41JKH4.js","assets/index-BcKPNqyh.js","assets/url-B-b7cLPz.js","assets/index-CTpsdld-.js","assets/ReportsRoutes-Bd2DqBOB.js","assets/ChargeCardRoutes-DOf8ZxFe.js","assets/PeopleRoutes-BvrpCiXR.js","assets/ExpenseAutomationRoutes-Du15OqPm.js","assets/TreasuryRoutes-udOEEHS2.js","assets/VendorsRoutes-DIXbOVo9.js","assets/pathToGoBack-BjLk76KL.js","assets/ZeniAccountRoutes-BcmFR78c.js","assets/AddressRoutes-CT41ny-f.js","assets/PandLWithForecastRoutes-tDYLv6EF.js","assets/CustomerOnboardingRoutes-DKTu3TSV.js","assets/TransactionDetailRoutes-D8PM2qy_.js","assets/EntityDetailRoutes-BFnZxzSO.js","assets/NotificationRoutes-m1_3MbJD.js","assets/PerformanceRoutes-D65HLS4l.js","assets/RewardsRoutes-D5m9btlG.js","assets/TaskRoutes-C1MBk6tP.js","assets/TaskListScreen-DV56A-OD.js","assets/AiCfoScreen-BLZXZArd.js"])))=>i.map(i=>d[i]);
2
- import{_ as n,bn as os,eP as ls,e_ as cs,eY as ds,eZ as ms,fH as us,eT as _s,cP as Ee,cx as Es,fe as As,cp as ps,bE as gs,bq as xs,fj as Is,v as Ts,Jr as hs,bt as js,Js as Us,bG as Hs,fg as bs,bF as Rs,bs as Ds,cl as ys,Jt as fs,Ju as Cs,cM as vs,cO as Os,cN as Ps,cw as Fs,cC as Ls,mW as Ae,eW as pe,fR as Bs,fn as ge,fO as xe,fP as Ie,fo as ks}from"./zeni-epic-state-DH4sFgeZ.js";import{j as e}from"./liveblocks-oKBQUmhq.js";import{a as v}from"./sentry-p9ArnUH9.js";import{u as Vs,h as Ss,i as Ns,g as Ms,j as G,l as Te,N as c,o as Zs,p as t}from"./core-rmRh_ZE8.js";import{h as ws,u as Gs,z as b,v as zs,a as $s,X as Ws,T as L,k as Ys,L as B,D as he,t as _,P as Js,c as Q,l}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import{f as je}from"./analyticsHelper-DLVGE934.js";import{t as qs}from"./getLocaleForTenant-D8ujXHmv.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="212cec0d-cb34-481d-be74-464406c6135e",i._sentryDebugIdIdentifier="sentry-dbid-212cec0d-cb34-481d-be74-464406c6135e")}catch{}})();const Xs={dashboard:()=>n(()=>import("./DashboardRoutes-DQ8scLPs.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-BjRPRC0a.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-CT53GTQR.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-BcEl6aLg.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-BTpkC5ER.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-Bd2DqBOB.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-DOf8ZxFe.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-BvrpCiXR.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-Du15OqPm.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-udOEEHS2.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-DIXbOVo9.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-BcmFR78c.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Ks=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Qs=l(()=>n(()=>import("./ReportsRoutes-Bd2DqBOB.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),en=l(()=>n(()=>import("./AddressRoutes-CT41ny-f.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-BvrpCiXR.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-tDYLv6EF.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-DKTu3TSV.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),tn=l(()=>n(()=>import("./VendorsRoutes-DIXbOVo9.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-D8PM2qy_.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-BFnZxzSO.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),on=l(()=>n(()=>import("./DashboardRoutes-DQ8scLPs.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),He=l(()=>n(()=>import("./BillPayRoutes-BjRPRC0a.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),ln=l(()=>n(()=>import("./SettingsRoutes-BTpkC5ER.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),be=l(()=>n(()=>import("./ReimbursementRoutes-CT53GTQR.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-BcmFR78c.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),dn=l(()=>n(()=>import("./TreasuryRoutes-udOEEHS2.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),mn=l(()=>n(()=>import("./TransactionListRoutes-BcEl6aLg.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-DOf8ZxFe.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),_n=l(()=>n(()=>import("./NotificationRoutes-m1_3MbJD.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),En=l(()=>n(()=>import("./PerformanceRoutes-D65HLS4l.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-Du15OqPm.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),pn=l(()=>n(()=>import("./RewardsRoutes-D5m9btlG.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),gn=l(()=>n(()=>import("./TaskRoutes-C1MBk6tP.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),xn=l(()=>n(()=>import("./AiCfoScreen-BLZXZArd.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-B6lzVM70.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),In=l(()=>n(()=>import("./TaskListScreen-DV56A-OD.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),D=b.getSignedInUserTenant(o)?.tenantId,h=b.getSignedInUser(),q=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),X=$s(),ye=Ws(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&q,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),W=G(a=>us(a));if(o!=null){const a=b.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=Ys(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,K=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&D!=null){const a=K.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(Is(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&b.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=b.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(qs(s)),m?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?Q.identify(a.userId,{tenant_id:a.tenantId}):Q.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,b]),v.useEffect(()=>{b.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(Y&&ts){k(ge(s));const J=b.getSignedInUserTenantWithId(s);J?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(J?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else Y&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),Y&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(Y){Q.identify(m.userId,{tenant_id:s});const J=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,D,h,f,U))},[D,A]),v.useEffect(()=>{b.isSignedIn()&&j==="Completed"&&W.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),b.saveSignedInUserTenants(hs(W.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,W.tenantsBaseInOrder))},[W,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):A==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Ks,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Xs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(E?.loggedInUserRoleMap),me=Oe&&!C,We=r.company!=null&&bs(r.company),Ye=Pe&&We===!0&&!C,Je=re&&Rs(E?.loggedInUserRoleMap),qe=oe&&Ds(E?.loggedInUserRoleMap),Xe=me&&ys(E?.loggedInUserRoleMap),Ke=fs(E?.loggedInUserRoleMap),Qe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),g=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),I=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=Ye&&g,ns=oe&&x,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Ke===!0||Qe===!0;return b.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||q&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||q?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Js,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Qs,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(gn,{})}),e.jsx(t,{path:"address/*",element:Je||de||Xe||qe?e.jsx(en,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:X?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:X?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:X?e.jsx(xn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(bn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),bn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Re=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wn as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-oKBQUmhq.js";import{a as u,b as T,q as A}from"./sentry-p9ArnUH9.js";import{u as D,h as z,j as c,g as J,N as M,n as O}from"./core-rmRh_ZE8.js";import{u as P,z as s,h as j,c as E,D as F,d as _,e as B,f as N,g as q,p as V,i as v}from"./index-BRBKIeck.js";import{eP as W,Jq as $,Jr as G,eW as H,fn as K,Jw as Q,fL as R,cT as X,Jx as x,Jy as Y,Jz as Z,bT as y}from"./zeni-epic-state-DH4sFgeZ.js";import"./mui-DRkb5v8u.js";import{u as ee}from"./useDeviceId-DDLhcPdX.js";import{f as te}from"./analyticsHelper-DLVGE934.js";import{t as ne}from"./getLocaleForTenant-D8ujXHmv.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="9e59efcc-6e86-4118-9400-ff95aaf6e417",t._sentryDebugIdIdentifier="sentry-dbid-9e59efcc-6e86-4118-9400-ff95aaf6e417")}catch{}})();const ie=O(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(x())}}})(V),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),S=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>W(e)),I=c(e=>$(e)),m=J(),w=j().mode,U=m.state?.magicLinkExpired,b=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(G(I.tenantsInOrder),o.zeniSessionId),H(o.userId,o.zeniSessionId,r.tenantId),i(K(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(Q("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),R().then(()=>{const e=q();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(M,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!b,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(N,{onClose:()=>i(x()),unlockDate:k}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-oKBQUmhq.js";import{a as n}from"./sentry-p9ArnUH9.js";import{u,g as m,h as p,N as g}from"./core-rmRh_ZE8.js";import{z as f,s as y,t as b,c as d,e as h}from"./index-BRBKIeck.js";import{fQ as x,fR as I,JO as w}from"./zeni-epic-state-DH4sFgeZ.js";import{n as j}from"./mui-DRkb5v8u.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="da7a630f-188d-4b8d-9b5e-93c5011f900a",e._sentryDebugIdIdentifier="sentry-dbid-da7a630f-188d-4b8d-9b5e-93c5011f900a")}catch{}})();function U(){const e=u(),t=m(),i=p(),a=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),w(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=j.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;export{U as default};
@@ -1,9 +0,0 @@
1
- import{j as p}from"./liveblocks-oKBQUmhq.js";import{a as g}from"./sentry-p9ArnUH9.js";import{h as K,u as _,g as z,j as D,i as O,n as V}from"./core-rmRh_ZE8.js";import{z as Q,v as W,T as d,_ as q,K as M,c as Z,e as J,cQ as X,q as f,n as H}from"./index-BRBKIeck.js";import{eP as Y,QN as R,Gs as y,QO as x,QJ as aa,FQ as S,QP as ea,FY as I,Fi as ta,Gt as B,QQ as w,gT as sa,Gj as oa,Go as na,Gb as ia,G9 as L,Gp as la,G6 as ra,QR as ca,QS as ka,QT as ua,QU as pa,QV as T,ec as da,QW as Ta,QX as ma}from"./zeni-epic-state-DH4sFgeZ.js";import{n as ga}from"./mui-DRkb5v8u.js";import{u as fa}from"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import{M as Ga}from"./MobileAppDrawer-CzXbfz6E.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="e959b0df-2b38-4e3a-98bc-4c405a62ef78",e._sentryDebugIdIdentifier="sentry-dbid-e959b0df-2b38-4e3a-98bc-4c405a62ef78")}catch{}})();const ha=ga.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,ba=V(function(e,t){const o=R(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,i=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o,u=aa(e),n=Q.isZeniUser();return{taskListView:i,tagListView:u,localData:i.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:n}},function(e,t){const{navigate:o,currentTenant:c,location:i,isTaskTemplatesEnabled:u}=t,{tenantEmailDomain:n}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=F(n,a),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(y(!0,u))},onTabChange:a=>{e(pa(a))},onParentTaskClick:a=>{const s=F(n,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(L(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(n,t.localData.defaultTaskGroupId),s=f(i.state?.pathnameStackToGoBack,i.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(w({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ua({filters:a}))},onSearchTextChanged:a=>{e(ka({searchText:a}))},onReloadCards:()=>{e(y(!0,u))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const a=H(i.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(ca({localData:a}))},resetLocalData:()=>{e(x({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ra(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(L(t.localData.selectedTaskIds,a,la(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(ia(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=Da(l,a);e(S({taskDetailLocalData:s}));const k=C(n,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),G=f(i.state?.pathnameStackToGoBack,i.pathname);o(k,{state:{pathnameStackToGoBack:G,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(na(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(oa(a,s))},onTimeSpentUpdate:(a,s)=>{e(B({task:a,updates:s}))},onShowToast:a=>{e(sa(a))},onGroupByFilterChange:a=>{e(w({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(B({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(ta(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(S({taskDetailLocalData:{...ea,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(n,t.localData.defaultTaskGroupId),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${n}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${n}/tasks/quick-responses`)}}})(X);function va(){const e=K(),t=_(),o=z(),c=Q.getSignedInUser(),i=D(r=>Y(r)),{taskGroupId:u}=O(),{useFeatureGate:n}=W(),{isFeatureEnabled:l}=n(d.isTaskTemplatesEnabled),{isFeatureEnabled:a}=n(d.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=n(d.isTaskCategorizationEnabled),{isFeatureEnabled:k}=n(d.isTaskBulkResolutionEnabled),{isFeatureEnabled:G}=n(d.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=n(d.isTaskRecurringParentEnabled),[E,P]=g.useState(!1),[j,N]=g.useState(!1),h=D(r=>R(r,l)),b=D(r=>r.taskGroupState),m=h.fetchState,{isAiCfoAccessEnabled:$,onAskAiCfoClick:v}=fa({mobileExploreReferrer:"Task Checklist"});if(q({isDataReady:m==="Completed"}),g.useEffect(()=>{E||(P(!0),t(y(!1,l)))},[E,t]),g.useEffect(()=>{m==="Completed"&&t(x({taskGroupById:b.taskGroupById}))},[m,b.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return p.jsxs(p.Fragment,{children:[m==="Completed"?p.jsx(M,{analytics:Z,onLoad:r=>(U=>U.trackPageLoaded(J.Event.taskListPage))(r)}):null,p.jsxs(ha,{children:[p.jsx(Ga,{isAppContentDrawerOpen:j,handleDrawerToggle:r=>{N(r)}}),p.jsx(ba,{location:o,navigate:e,currentTenant:i,taskGroupId:u,taskGroupState:b,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:l,taskListFetchState:m,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:G,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:$,onAskAiCfoClick:v})]})]})}const F=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,Da=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...T.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=da(t);return{...T.taskDetailLocalData,priority:o}}if(e==="status"){const o=Ta(t);return{...T.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...T.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=ma(t);return{...T.taskDetailLocalData,dueDate:o}}return{...T.taskDetailLocalData}};export{va as default};
@@ -1,37 +0,0 @@
1
- import{j as e}from"./liveblocks-oKBQUmhq.js";import{h as L,g as P,u as B,i as N,j as f,N as U,n as M,o as Te,p as k}from"./core-rmRh_ZE8.js";import{cm as V,eP as D,NO as R,DU as ae,fh as q,DC as ne,NQ as we,DX as Ce,NM as Ie,NN as se,O3 as ke,C2 as je,sR as be,NS as Ae,E6 as Ee,NP as re,cO as H,wZ as oe,eY as ve,e_ as De,OZ as Fe,O_ as Ue,DD as Le,O$ as Pe,DE as Be,DN as Re,bt as Oe,bF as Ne,cx as Me,bG as Ve,cl as _e,fg as ze,bs as $e,Js as Ge,ck as Ze}from"./zeni-epic-state-DH4sFgeZ.js";import{k as _,aq as qe,z as A,K as z,c as j,c5 as He,c6 as Je,c7 as Z,J,h as We,V as Ke,_ as Qe,v as ie,T as v,x as Xe,s as Ye,c8 as et,at as W,q as tt,c9 as at,n as K,ca as nt,R as X,cb as st,a9 as rt}from"./index-BRBKIeck.js";import{D as ot,n as O,S as it}from"./mui-DRkb5v8u.js";import ct from"./NotFoundScreen-B6lzVM70.js";import{S as Y}from"./SetupPagesScreen-BLeSibic.js";import{a as d}from"./sentry-p9ArnUH9.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import{u as ut}from"./useInitialThreadRequest-B5lLxxrW.js";import{M as ce}from"./MobileAppDrawer-CzXbfz6E.js";import{F as dt}from"./FeaturePreviewScreen-B1hf1dDh.js";import{a as ee}from"./analyticsHelper-DLVGE934.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./routePaths-f58A_7uy.js";import"./BusinessVerificationPageScreen-COS298yT.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]="866e27d4-e237-47db-be3a-88a6ae437518",t._sentryDebugIdIdentifier="sentry-dbid-866e27d4-e237-47db-be3a-88a6ae437518")}catch{}})();const pt=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ce(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(He);function mt(){const t=L(),a=P(),n=B(),{tenantEmailDomain:o}=N(),p=_(),r=f(I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=qe(r),s=V(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,C]=d.useState(!1),[u,c]=d.useState(!1),h=f(I=>D(I)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(I=>R(I,y)),w=f(I=>I.treasurySetupViewState.fetchState),x=f(I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,w,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(q()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(C(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(U,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{Z(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Z(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),yt=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=N(),o=B(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,C]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ie(x)),w=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(q()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(C(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{Z(j,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=O.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${t=>t.theme.colors.grey4};
9
- `,ht={overlayWidth:new Xe(100,100,48)},St=M(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:l=>{let i="page-not-found";l==="editPortfolio"?i=xt(s):l==="statements"?i=Tt(s):l==="taxLetter"?i=wt(s):l==="settings"&&(i=Ct(s));const g=tt(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:g}})},onColumnSortConfigChanged:(l,i)=>{t(Fe({uiState:{sortKey:l,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(et);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=P(),o=L(),p=B(),r=J(),m=We(),s=f(b=>D(b)),{tenantEmailDomain:l}=N(),i=s.companyId??A.getSignedInUserTenant(l)?.companyId,[g,C]=d.useState(!1),u=f(b=>re(b)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),w=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=H(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Ke();d.useEffect(()=>{c==="Not-Started"&&!g&&E&&(C(!0),p(oe(!0)))},[g,p,c,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const I=()=>{o("..")},[le,ue]=d.useState(!1),Q=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});Qe({isDataReady:c==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:me}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=$(v.isTreasuryCommentingEnabled),ge=ut(i,{clearParams:c==="Completed"&&y?.fetchState==="Completed"}),he=ve(s),Se=De(me,s);if(he===!0&&Se!==!0)return e.jsx(dt,{});if(T){const b=y?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(ot,{onClose:I,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(It,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:u.transactions.length===0||h===0}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:Q,initialOpenThreadRequest:ge,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&x?e.jsx(U,{to:"../setup"}):s.companyTreasuryInfo?.info&&!w&&F?e.jsx(U,{to:"../promo",state:n.state}):e.jsx(Ye,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,Ct=t=>`/${t}/treasury/setup`,It=O(it)`
10
- display: flex;
11
- min-height: 100%;
12
- flex-direction: column;
13
- `,kt=O.div`
14
- display: flex;
15
- height: 100vh;
16
- width: 100%;
17
- flex: 1 1 auto;
18
- flex-direction: column;
19
- align-items: center;
20
- background-color: ${t=>t.theme.colors.grey4};
21
- `;function jt(){const t=L(),a=B(),n=J(),o=P(),p=`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Ue(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Le(!1)))},[r,s.fetchState,a]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},C=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(at,{currentTenantCompanyName:C,statementListView:s,isLoading:u,onBackClick:()=>{const c=K(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const bt=O.div`
22
- display: flex;
23
- height: 100vh;
24
- width: 100%;
25
- flex: 1 1 auto;
26
- flex-direction: column;
27
- align-items: center;
28
- background-color: ${t=>t.theme.colors.grey4};
29
- `;function At(){const t=L(),a=J(),n=P(),o=B(),p=`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Pe(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Be(!1)))},[r,s.fetchState,o]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},C=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:a,children:e.jsx(nt,{currentTenantCompanyName:C,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=K(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const Et=M(function(t,a){const{companyId:n}=a,o=R(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(st),vt=()=>{const t=L(),a=P(),n=B(),{tenantEmailDomain:o}=N(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,l]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||g==null||(l(!0),n(q()))},[i,n]);const g=A.getSignedInUserTenant(o)?.companyId??m.companyId,C=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(C==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),y=V(h?.loggedInUserRoleMap),T=H(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(U,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||T)){if(a.state?.message==="activation"){const S=K(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:S=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(Et,{analytics:j,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=O.div`
30
- display: flex;
31
- width: 100%;
32
- height: 100%;
33
- flex-direction: row;
34
- justify-content: center;
35
- align-items: center;
36
- background-color: ${t=>t.theme.colors.grey5};
37
- `;function ea(){const t=P(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=H(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Me(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),{isFeatureEnabled:C}=n(v.isDepositAccountsFeatureEnabled),u=C&&!s&&_e(r?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(v.isDebitCardFeatureEnabled),S=rt(a,y,T)&&!s&&$e(r?.loggedInUserRoleMap),w=Ge(r?.loggedInUserRoleMap),x=Ze(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Te,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(U,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(U,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ea as default};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-oKBQUmhq.js";import{a as f}from"./sentry-p9ArnUH9.js";import{s as u,u as h,j as y,N as b}from"./core-rmRh_ZE8.js";import{JL as I,eW as w,zK as j}from"./zeni-epic-state-DH4sFgeZ.js";import{z as c,s as x,y as S,A as D}from"./index-BRBKIeck.js";import{n as l}from"./mui-DRkb5v8u.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="b49238f9-b2cc-45a3-809d-29c772d575dc",e._sentryDebugIdIdentifier="sentry-dbid-b49238f9-b2cc-45a3-809d-29c772d575dc")}catch{}})();const q=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),i=y(m=>I(m)),r=c.getSignedInUser(),d=c.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(b,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(g(!0),a(j(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=l.div`
2
- display: flex;
3
- width: 100%;
4
- height: 100vh;
5
- flex-direction: row;
6
- justify-content: center;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey5};
9
- `,_=l(D.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{q as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-oKBQUmhq.js";import{a as f}from"./sentry-p9ArnUH9.js";import{h as x,u as j,g as $,i as v,j as p}from"./core-rmRh_ZE8.js";import{II as s,IH as B,OX as C,eP as P,OY as T}from"./zeni-epic-state-DH4sFgeZ.js";import{J as z,at as g,h as D,z as E,s as L,c4 as N,n as U}from"./index-BRBKIeck.js";import{n as _}from"./mui-DRkb5v8u.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]="193b6ee5-df97-4c4a-89cc-6b685ac7a06c",e._sentryDebugIdIdentifier="sentry-dbid-193b6ee5-df97-4c4a-89cc-6b685ac7a06c")}catch{}})();const G=_.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;function X(){const e=x(),n=j(),d=z(),l=$();let{accountId:a}=v(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,y]=f.useState(!1),h=D();f.useEffect(()=>{u||(y(!0),n(B(a??"",!1)))},[u,n]);const o=p(t=>C(t,a??"")),I=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=E.getSignedInUser(),r=p(t=>P(t)),b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:m})})}export{X as Z};
@@ -1 +0,0 @@
1
- import{cH as m,cI as l,JD as _,JE as d}from"./zeni-epic-state-DH4sFgeZ.js";import{c as u}from"./index-BRBKIeck.js";import"./sentry-p9ArnUH9.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]="1429d6e3-4d05-41b9-80af-8843db66835c",e._sentryDebugIdIdentifier="sentry-dbid-1429d6e3-4d05-41b9-80af-8843db66835c")}catch{}})();const b=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},h=(e,a,o,i,s)=>{const r=[],c=[];let t=[];s?.forEach(n=>{r.push(n.companyId),c.push(n.companyName),t=t.concat(n.userRole)}),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:i,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?r:void 0,company_names:s!=null?c:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":l(e,a)?"reimbursement":_(e,a)?"zeni_accounts":d(e,a)?"charge_cards":"bill_pay",I=e=>Object.values(e.allocation).map(String).join("-");export{I as a,h as f,g,b as t};