@zeniai/web-app-ui 5.3.87-dev → 5.3.88-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 (140) hide show
  1. package/dist/assets/{AccountMappingScreen-9MHulU9s.js → AccountMappingScreen-Db0caIkZ.js} +2 -2
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-Db6bbB6u.js → ActualMatchingMatchDetailScreen--akEs1x5.js} +1 -1
  3. package/dist/assets/AddressRoutes-Btf8GDJA.js +1 -0
  4. package/dist/assets/AddressScreen-lx_HZDfg.js +9 -0
  5. package/dist/assets/{AiCfoScreen-bjaeBeb9.js → AiCfoScreen-DH4uTpfZ.js} +3 -3
  6. package/dist/assets/{AppDrawer-UbqqLXJe.js → AppDrawer-DAhxL0-t.js} +2 -2
  7. package/dist/assets/{BillPayApprovalRoutes-CYDv31qk.js → BillPayApprovalRoutes-z6WREO6S.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-C4GXOC5A.js → BillPayRoutes-BNtj5Z6g.js} +8 -8
  9. package/dist/assets/BusinessVerificationPageScreen-CqCRDHlP.js +9 -0
  10. package/dist/assets/{CardsAiCfoScreen-DZorjbaf.js → CardsAiCfoScreen-BtuN3Fna.js} +2 -2
  11. package/dist/assets/{ChargeCardRoutes-C7tzEoGV.js → ChargeCardRoutes-Bwd20GRb.js} +7 -7
  12. package/dist/assets/{CompanyPassportScreen-DViAGsze.js → CompanyPassportScreen-BS8cAeG7.js} +1 -1
  13. package/dist/assets/ConnectionAuthScreen-NpomCNmq.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-K1DQpnRo.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-B2flxgjR.js → CustomerOnboardingRoutes-Ctei1yxR.js} +5 -5
  16. package/dist/assets/{DashboardRoutes-D6igUQ_c.js → DashboardRoutes-Yd6ytWgF.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-CMpQllfi.js → DefaultTenantHome-C_ePwGG_.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-D-XdJZt2.js → DomesticWireDetailScreen-agLHT6HV.js} +3 -3
  19. package/dist/assets/{DrawerScreen-DquM7PdJ.js → DrawerScreen-B3BZEyK7.js} +1 -1
  20. package/dist/assets/EntityDetailRoutes-DFTT7Jex.js +1 -0
  21. package/dist/assets/{ExpenseAutomationRoutes-o1rALTgt.js → ExpenseAutomationRoutes-7J9OIwql.js} +3 -3
  22. package/dist/assets/FeaturePreviewScreen-DInsBmdk.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-wO_7Z3IU.js +1 -0
  24. package/dist/assets/{InboxNotificationsProvider-DPgK9Ai7.js → InboxNotificationsProvider-CJ6RDL31.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-BroIFZYm.js → InvoicingRoutes-cvqoXavi.js} +1 -1
  26. package/dist/assets/{MagicLinkRoutes-BYZevXyH.js → MagicLinkRoutes-B7dsytLy.js} +6 -6
  27. package/dist/assets/MagicLinkSignInScreen-D4aX7YwY.js +12 -0
  28. package/dist/assets/MobileAppDrawer-CTQRP8UJ.js +1 -0
  29. package/dist/assets/NotFoundScreen-BWSuWGJw.js +1 -0
  30. package/dist/assets/NotificationRoutes-DzRmN_jM.js +1 -0
  31. package/dist/assets/OAuthConsentScreen-eVNO9tpS.js +1 -0
  32. package/dist/assets/PandLWithForecastRoutes-B8_fFjT-.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-6qwvkVJe.js → PaymentLinkScreen-BFbh2fvr.js} +5 -5
  34. package/dist/assets/{PeopleRoutes-BT10_5ZZ.js → PeopleRoutes-DRqKHSzZ.js} +3 -3
  35. package/dist/assets/PerformanceRoutes-DRekxiu8.js +1 -0
  36. package/dist/assets/{Preview-xYIpXmh0.js → Preview-DOoN8piN.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-CPdRdNFp.js → QBOConnectionScreen-DwtmgRyN.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRoutes-kSFV0KaQ.js → ReimbursementApprovalRoutes-CL2uUquG.js} +1 -1
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CD8m8c7W.js → ReimbursementApprovalRuleDetailScreen-CXdcXz04.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-B7HRPmdv.js → ReimbursementRoutes-DRi4OeXU.js} +5 -5
  41. package/dist/assets/{ReportsRoutes-CkYyyTje.js → ReportsRoutes-Bmh4S4Fl.js} +1 -1
  42. package/dist/assets/{RewardsRoutes-kEA_DefW.js → RewardsRoutes-CdUHO7Yc.js} +1 -1
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DH-G2ABB.js → ScheduleDetailsPrepaidExpensesScreen-B6e9FDGx.js} +5 -5
  44. package/dist/assets/{ScreenRoutes-C72NzSAe.js → ScreenRoutes-NcBi_D0j.js} +2 -2
  45. package/dist/assets/{SettingsRoutes-gBgMK1MW.js → SettingsRoutes-CXMPeImh.js} +5 -5
  46. package/dist/assets/{SetupPagesScreen-CIrP22mo.js → SetupPagesScreen-u4czjChG.js} +4 -4
  47. package/dist/assets/SignInScreen-DfoNrTd3.js +1 -0
  48. package/dist/assets/SignOutScreen-CaEWLSLT.js +9 -0
  49. package/dist/assets/TaskListScreen-C4v_wDqU.js +9 -0
  50. package/dist/assets/TaskRoutes-pNExaoog.js +9 -0
  51. package/dist/assets/TransactionDetailRoutes-Bi3Vmb5p.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-BfwmFu4d.js → TransactionDetailScreen-BzGcsLih.js} +2 -2
  53. package/dist/assets/{TransactionListRoutes-CcqGcmw0.js → TransactionListRoutes-B432YMQA.js} +1 -1
  54. package/dist/assets/{TreasuryRoutes-S1BfnYGO.js → TreasuryRoutes-Crl38a_q.js} +5 -5
  55. package/dist/assets/{VendorsRoutes-D9wt7kTI.js → VendorsRoutes-xIHUU5cC.js} +1 -1
  56. package/dist/assets/WiseConfirmationScreen-COz0cxAH.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-CgUN5fCf.js → ZeniAccountRoutes-D0ESQTiE.js} +9 -9
  58. package/dist/assets/ZeniAccountStatementScreen-mhMclD_-.js +9 -0
  59. package/dist/assets/{accountMappingHelper-BYw-4sqP.js → accountMappingHelper-CzuKXsfZ.js} +1 -1
  60. package/dist/assets/{analytics-UPQyZr49.js → analytics-BGlrzyDz.js} +1 -1
  61. package/dist/assets/{analyticsHelper-nRPDDcpi.js → analyticsHelper-N9KfV3Ey.js} +1 -1
  62. package/dist/assets/{core-D4EC26kf.js → core-C6dxOS4P.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-CDB32jt8.js → decodeURIComponentSafe-DX5mm8tE.js} +1 -1
  64. package/dist/assets/{dnd-CQ9igkkh.js → dnd-BtyoSdzG.js} +1 -1
  65. package/dist/assets/{empty-D2f6MViE.js → empty-20Do0ayr.js} +1 -1
  66. package/dist/assets/{empty-CI6RvMsS.js → empty-s4dMcXJj.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-DMQKfl7Z.js → emptyVideoElement-Cn9_hQna.js} +1 -1
  68. package/dist/assets/epic-DcczydaG.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-DCxx3oei.js +1 -0
  70. package/dist/assets/{getLocaleForTenant-B07LkoV2.js → getLocaleForTenant-D3SNBEiv.js} +1 -1
  71. package/dist/assets/{index-DIih7oGD.js → index-B2UVgtaW.js} +1 -1
  72. package/dist/assets/{index-D7USIDVj.js → index-Bk0SSvS0.js} +1 -1
  73. package/dist/assets/{index-CEVAJ-IM.js → index-CZ8Bq_4q.js} +1 -1
  74. package/dist/assets/{index-CWHRX-bO.js → index-DNfJb3gN.js} +1 -1
  75. package/dist/assets/{index-Cjagh0U7.js → index-DQSzwhal.js} +2 -2
  76. package/dist/assets/{index-CllzBMQZ.js → index-DVkDiHzq.js} +1 -1
  77. package/dist/assets/{index-B_bOZ9_a.js → index-I-q_Bo-e.js} +1 -1
  78. package/dist/assets/{index-Ch-ATQTq.js → index-pj4u0b1G.js} +14375 -14409
  79. package/dist/assets/{lexical-DvwBeJWJ.js → lexical-plr3Wvpq.js} +1 -1
  80. package/dist/assets/{liveblocks-DcDE-V-o.js → liveblocks-CRyd9n8B.js} +1 -1
  81. package/dist/assets/{lottie-DBrmrNFb.js → lottie-CXwABHQ0.js} +1 -1
  82. package/dist/assets/{mui-BCH_ILdb.js → mui-0pGBD9L4.js} +1 -1
  83. package/dist/assets/{pathToGoBack-rzbozB31.js → pathToGoBack-B8vmhE3I.js} +1 -1
  84. package/dist/assets/{pdf-zGCHYG6q.js → pdf-c_Y6aTYi.js} +4 -4
  85. package/dist/assets/{pdf-lib-CbTEittW.js → pdf-lib-kUoa-zRQ.js} +1 -1
  86. package/dist/assets/{plaid-a-pmhWdo.js → plaid-CO0-sO-T.js} +1 -1
  87. package/dist/assets/{pusher-DTPJtuD1.js → pusher-BfHG6cEQ.js} +1 -1
  88. package/dist/assets/{react-BxMK-s19.js → react-B6rMqh5y.js} +1 -1
  89. package/dist/assets/{react-DEi14qD-.js → react-B9ZK5e9A.js} +1 -1
  90. package/dist/assets/{react-CW0JS27q.js → react-C9Oqiteh.js} +1 -1
  91. package/dist/assets/{react-Dom5mok4.js → react-CKKOu6ZR.js} +1 -1
  92. package/dist/assets/{react-Cc6y9hJ0.js → react-Ds8BzNi6.js} +1 -1
  93. package/dist/assets/{react-C83CKqL4.js → react-rpmVlbhi.js} +1 -1
  94. package/dist/assets/{recharts-BRIJ8RH5.js → recharts-C9C0kAsT.js} +1 -1
  95. package/dist/assets/{routePaths-D0-Tropc.js → routePaths-D6noST9U.js} +1 -1
  96. package/dist/assets/{sentry-DB4rU-NW.js → sentry-BOmfv4Oi.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-DDkMarxH.js → stripSplatSuffix-4upapLOu.js} +1 -1
  98. package/dist/assets/{url-B6fk1MD4.js → url-1eFiIl2c.js} +1 -1
  99. package/dist/assets/{url-C0P0ff3A.js → url-BtRn4YUp.js} +1 -1
  100. package/dist/assets/useActualMatchingMatchDetail-CnwaLoCC.js +1 -0
  101. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DOmg3jmM.js → useAiCfoDashboardSuggestedQuestionsChips-Br490_x2.js} +1 -1
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-D_lZcHX9.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-WOovjOqT.js → useChargeCardPusherEvents-ijimVvc8.js} +1 -1
  104. package/dist/assets/{useDeviceId-Dy35NfBh.js → useDeviceId-AGSM87EZ.js} +1 -1
  105. package/dist/assets/useEmailConnectResultRefresh-BRFhahB3.js +1 -0
  106. package/dist/assets/{useInitialThreadRequest-Da3K5Ksw.js → useInitialThreadRequest-B9k0MBEA.js} +1 -1
  107. package/dist/assets/{useTaskManagerAccess-CX5toJpg.js → useTaskManagerAccess-DlX9f1Pd.js} +1 -1
  108. package/dist/assets/{useTaskManagerPusherEvents-BiZinOaM.js → useTaskManagerPusherEvents-CDCMnrHo.js} +1 -1
  109. package/dist/assets/{utils-CU_Pr3K6.js → utils-DrAWZPZ0.js} +1 -1
  110. package/dist/assets/{withTransactionSidePanel-CCvid0cv.js → withTransactionSidePanel-DfxhH5Jw.js} +1 -1
  111. package/dist/assets/{zeni-epic-state-Bl3gAQPi.js → zeni-epic-state-C5-RfNOq.js} +5 -5
  112. package/dist/index.html +1 -1
  113. package/package.json +4 -4
  114. package/dist/assets/AddressRoutes-DHraPu2z.js +0 -1
  115. package/dist/assets/AddressScreen-BOTH_mRu.js +0 -9
  116. package/dist/assets/BusinessVerificationPageScreen-CqSHzLo6.js +0 -9
  117. package/dist/assets/ConnectionAuthScreen-yW3T26AI.js +0 -11
  118. package/dist/assets/CustomerOnboardingAuthScreen-CEs020qJ.js +0 -1
  119. package/dist/assets/EntityDetailRoutes-B7vzEsHl.js +0 -1
  120. package/dist/assets/FeaturePreviewScreen-B0SxkBd3.js +0 -1
  121. package/dist/assets/HubSpotOAuthCallbackScreen-CYGRU6le.js +0 -1
  122. package/dist/assets/MagicLinkSignInScreen-DqgSvyNq.js +0 -12
  123. package/dist/assets/MobileAppDrawer-C6gfQS8M.js +0 -1
  124. package/dist/assets/NotFoundScreen-0hF8kIyY.js +0 -1
  125. package/dist/assets/NotificationRoutes-BRYauJLR.js +0 -1
  126. package/dist/assets/OAuthConsentScreen-B_ncopNh.js +0 -1
  127. package/dist/assets/PandLWithForecastRoutes-BU_XWD0n.js +0 -1
  128. package/dist/assets/PerformanceRoutes-DEM0F09k.js +0 -1
  129. package/dist/assets/SignInScreen-DAl9_AVs.js +0 -1
  130. package/dist/assets/SignOutScreen-CvQRUG30.js +0 -9
  131. package/dist/assets/TaskListScreen-DI37lN7R.js +0 -9
  132. package/dist/assets/TaskRoutes-Sr-eq5Xy.js +0 -9
  133. package/dist/assets/TransactionDetailRoutes-DHOAhb5X.js +0 -1
  134. package/dist/assets/WiseConfirmationScreen-CBCiP645.js +0 -12
  135. package/dist/assets/ZeniAccountStatementScreen-jmmjZcA9.js +0 -9
  136. package/dist/assets/epic-pH_zo6MR.js +0 -2
  137. package/dist/assets/expenseAutomationHelper-DLTA8kBq.js +0 -1
  138. package/dist/assets/useActualMatchingMatchDetail-BNN20aCx.js +0 -1
  139. package/dist/assets/useAskAiCfoHostNavButtonProps-CBSVhkeG.js +0 -1
  140. package/dist/assets/useEmailConnectResultRefresh-27P04Izm.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-DcDE-V-o.js";import{h as L,g as P,u as U,i as M,j as y,N as D,l as V,n as xe,o as k}from"./core-D4EC26kf.js";import{cw as N,fI as E,ZL as B,OT as ae,OA as G,OB as ne,ZN as Ie,OW as Te,ZJ as we,ZK as se,ZZ as Ce,MX as ke,Cx as je,ZP as Ae,P1 as be,ZM as oe,de as H,H2 as re,d$ as ve,e0 as Ee,a08 as De,a09 as Le,OC as Pe,a0a as Ue,OD as Be,OM as Fe,bq as Oe,bK as Re,cH as Me,bL as Ve,cv as Ne,bu as Ze,UJ as _e,cu as $e}from"./zeni-epic-state-Bl3gAQPi.js";import{V as Z,h as ze,z as v,a6 as _,j as A,d4 as Ge,d5 as He,d6 as z,$ as q,ao as qe,aq as Ke,W as ie,A as R,a9 as We,a5 as Je,d7 as Xe,ac as K,p as Ye,d8 as Qe,a2 as W,d9 as et,ag as tt,Y,da as at,g as nt}from"./index-Ch-ATQTq.js";import{u as st,D as ot,n as O,S as rt}from"./mui-BCH_ILdb.js";import it from"./NotFoundScreen-0hF8kIyY.js";import{S as Q}from"./SetupPagesScreen-CIrP22mo.js";import{a as p}from"./sentry-DB4rU-NW.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-CBSVhkeG.js";import{u as lt}from"./useInitialThreadRequest-Da3K5Ksw.js";import{M as ce}from"./MobileAppDrawer-C6gfQS8M.js";import{F as ut}from"./FeaturePreviewScreen-B0SxkBd3.js";import{a as ee}from"./analyticsHelper-nRPDDcpi.js";import"./recharts-BRIJ8RH5.js";import"./analytics-UPQyZr49.js";import"./plaid-a-pmhWdo.js";import"./dnd-CQ9igkkh.js";import"./stripe-cKAAJElX.js";import"./lottie-DBrmrNFb.js";import"./lexical-DvwBeJWJ.js";import"./pdf-zGCHYG6q.js";import"./utils-CU_Pr3K6.js";import"./BusinessVerificationPageScreen-CqSHzLo6.js";import"./routePaths-D0-Tropc.js";import"./InboxNotificationsProvider-DPgK9Ai7.js";import"./useTaskManagerAccess-CX5toJpg.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]="b6507afb-e2d0-4c01-983f-515946a2732f",t._sentryDebugIdIdentifier="sentry-dbid-b6507afb-e2d0-4c01-983f-515946a2732f")}catch{}})();const dt=V((function(t,a){const{companyId:n}=a;return{treasurySetupView:B(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const o=i.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(o.riskScore,ee(o)),t(Te(!0))},onUpdateFundAllocation:o=>{r.trackTreasuryAllocationAction("update",ee(o)),t(Ie(o))}}}))(Ge);function pt(){const t=L(),a=P(),n=U(),{tenantEmailDomain:r}=M(),i=Z(),o=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=ze(o),s=N(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,I]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>E(w))),f=v.getSignedInUserTenant(r)?.companyId??x.companyId,C=v.getSignedInUser(),h=y((w=>B(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),T=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||T!=="Not-Started"||f==null||(u(!0),n(G()))}),[l,T,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(I(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&o==="Completed"&&t("../")}),[m,o,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const F=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!F&&e.jsx(_,{analytics:A,onLoad:()=>{}}),e.jsx(dt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:F,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const mt=V((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ce(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:B(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:i}=a,o=r.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{z(a.analytics,"cancel",o,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{z(a.analytics,"confirm",o,m,"Transfer"),t(be())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(ke(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(He),ft=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:r}=M(),i=U(),[o,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[I,l]=p.useState(!1),u=y((T=>T.treasurySetupViewState.fetchState)),x=y((T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((T=>E(T))),h=v.getSignedInUserTenant(r)?.companyId??C.companyId,g=y((T=>we(T))),j=y((T=>B(T,h)));if(v.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(G()))}),[c,x,h,i]),p.useEffect((()=>{I||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[I,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:A,onLoad:()=>{}}),e.jsx(mt,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:o,maxInsuredAmount:5e5,onReviewClick:()=>{z(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},yt=O.div`
1
+ import{j as e}from"./liveblocks-CRyd9n8B.js";import{h as L,g as U,u as B,i as M,j as y,N as D,l as V,n as xe,o as k}from"./core-C6dxOS4P.js";import{cw as N,fI as E,ZK as F,OT as ae,OA as G,OB as ne,ZM as Ie,OW as Te,ZI as we,ZJ as se,ZY as Ce,MX as ke,Cx as je,ZO as Ae,P1 as be,ZL as oe,de as H,H2 as re,d$ as ve,e0 as Ee,a07 as De,a08 as Le,OC as Ue,a09 as Be,OD as Fe,OM as Pe,bq as Oe,bK as Re,cH as Me,bL as Ve,cv as Ne,bu as _e,UI as Ze,cu as $e}from"./zeni-epic-state-C5-RfNOq.js";import{V as _,g as ze,z as v,a6 as Z,h as A,d4 as Ge,d5 as He,d6 as z,$ as q,ao as qe,aq as Ke,W as ie,A as R,a9 as We,a5 as Je,d7 as Ye,ac as K,p as Xe,d8 as Qe,a2 as W,d9 as et,ag as tt,Y as X,da as at,f as nt}from"./index-pj4u0b1G.js";import{u as st,D as ot,n as O,S as rt}from"./mui-0pGBD9L4.js";import it from"./NotFoundScreen-BWSuWGJw.js";import{S as Q}from"./SetupPagesScreen-u4czjChG.js";import{a as p}from"./sentry-BOmfv4Oi.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-D_lZcHX9.js";import{u as lt}from"./useInitialThreadRequest-B9k0MBEA.js";import{M as ce}from"./MobileAppDrawer-CTQRP8UJ.js";import{F as ut}from"./FeaturePreviewScreen-DInsBmdk.js";import{a as ee}from"./analyticsHelper-N9KfV3Ey.js";import"./recharts-C9C0kAsT.js";import"./analytics-BGlrzyDz.js";import"./plaid-CO0-sO-T.js";import"./dnd-BtyoSdzG.js";import"./stripe-cKAAJElX.js";import"./lottie-CXwABHQ0.js";import"./lexical-plr3Wvpq.js";import"./pdf-c_Y6aTYi.js";import"./utils-DrAWZPZ0.js";import"./BusinessVerificationPageScreen-CqCRDHlP.js";import"./routePaths-D6noST9U.js";import"./InboxNotificationsProvider-CJ6RDL31.js";import"./useTaskManagerAccess-DlX9f1Pd.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]="0c03f7b1-6583-4f23-985f-6e5eb7f8b209",t._sentryDebugIdIdentifier="sentry-dbid-0c03f7b1-6583-4f23-985f-6e5eb7f8b209")}catch{}})();const dt=V((function(t,a){const{companyId:n}=a;return{treasurySetupView:F(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const o=i.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(o.riskScore,ee(o)),t(Te(!0))},onUpdateFundAllocation:o=>{r.trackTreasuryAllocationAction("update",ee(o)),t(Ie(o))}}}))(Ge);function pt(){const t=L(),a=U(),n=B(),{tenantEmailDomain:r}=M(),i=_(),o=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=ze(o),s=N(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,I]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>E(w))),f=v.getSignedInUserTenant(r)?.companyId??x.companyId,C=v.getSignedInUser(),h=y((w=>F(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),T=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||T!=="Not-Started"||f==null||(u(!0),n(G()))}),[l,T,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(I(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&o==="Completed"&&t("../")}),[m,o,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx(Z,{analytics:A,onLoad:()=>{}}),e.jsx(dt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:P,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const mt=V((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ce(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:F(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:i}=a,o=r.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{z(a.analytics,"cancel",o,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{z(a.analytics,"confirm",o,m,"Transfer"),t(be())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(ke(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(He),ft=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:r}=M(),i=B(),[o,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[I,l]=p.useState(!1),u=y((T=>T.treasurySetupViewState.fetchState)),x=y((T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((T=>E(T))),h=v.getSignedInUserTenant(r)?.companyId??C.companyId,g=y((T=>we(T))),j=y((T=>F(T,h)));if(v.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(G()))}),[c,x,h,i]),p.useEffect((()=>{I||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[I,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(Z,{analytics:A,onLoad:()=>{}}),e.jsx(mt,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:o,maxInsuredAmount:5e5,onReviewClick:()=>{z(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},yt=O.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as e}from"./liveblocks-DcDE-V-o.js";import{h as L,g as P,u as U,i as M,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${t=>t.theme.colors.grey4};
9
- `,gt={overlayWidth:new We(100,100,48)},St=V((function(t,a){const n=oe(t),{companyId:r}=a;return{treasuryDetail:n,treasurySetupView:B(t,r),downloadEndPoint:`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}}),(function(t,a){const{navigate:n,currentTenant:r,location:i,handleDrawerToggle:o,analytics:m}=a,{tenantEmailDomain:s}=r;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(re(!0))},handleTreasuryOptionSelection:d=>{let c="page-not-found";d==="editPortfolio"?c=ht(s):d==="statements"?c=xt(s):d==="taxLetter"?c=It(s):d==="settings"&&(c=Tt(s));const S=Ye(i.state?.pathnameStackToGoBack,i.pathname);n(c,{state:{pathnameStackToGoBack:S}})},onColumnSortConfigChanged:(d,c)=>{t(De({uiState:{sortKey:d,sortOrder:c}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{o(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}}))(Xe);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=P(),r=L(),i=U(),o=q(),m=st(),s=y((b=>E(b))),{tenantEmailDomain:d}=M(),c=s.companyId??v.getSignedInUserTenant(d)?.companyId,[S,I]=p.useState(!1),l=y((b=>oe(b))),u=l.fetchState,x=l.accountSummary?.totalBalance?.amount,f=y((b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus)),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=Z(),g=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,j=N(h?.loggedInUserRoleMap),T=H(h?.loggedInUserRoleMap),{areTenantIdsInSync:F}=qe();p.useEffect((()=>{u==="Not-Started"&&!S&&F&&(I(!0),i(re(!0)))}),[S,i,u,F]),p.useEffect((()=>{l.transactionsFetchState.fetchState==="Completed"&&l.transactions.length===0&&!n.pathname.includes("transfer")&&j&&r("./transfer")}),[l.transactionsFetchState.fetchState,l.transactions.length,n.pathname,j,r]);const w=()=>{r("..")},[le,ue]=p.useState(!1),J=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=ct({mobileExploreReferrer:"Treasury"});Ke({isDataReady:u==="Completed"});const{useFeatureGate:X}=ie(),{isFeatureEnabled:me}=X(R.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=X(R.isAutoTransferRuleEnabled),ye=lt(c,{clearParams:u==="Completed"&&f?.fetchState==="Completed"}),ge=ve(s),Se=Ee(me,s);if(ge===!0&&Se!==!0)return e.jsx(ut,{});if(C){const b=f?.fetchState!=="Completed"||l.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[l.accountSummaryFetchState.fetchState==="Completed"&&f?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(_,{analytics:A,onLoad:()=>{}}):null,e.jsx(ot,{onClose:w,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:gt.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(wt,{onClick:he=>he.stopPropagation(),children:[t===!0?e.jsx(ft,{isFirstTransfer:l.transactions.length===0||x===0,isTransactionsLoaded:l.transactionsFetchState.fetchState!=="In-Progress"&&l.transactionsFetchState.fetchState!=="Not-Started"}):null,a===!0?e.jsx(pt,{}):null]})}),e.jsxs(yt,{windowSize:o,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:J}),e.jsx(St,{treasuryDetailsView:l,isAutoTransferRuleEnabled:fe,navigate:r,currentTenant:s,location:n,companyId:c,analytics:A,handleDrawerToggle:J,initialOpenThreadRequest:ye,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return g&&j?e.jsx(D,{to:"../setup"}):s.companyTreasuryInfo?.info&&!g&&T?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(Je,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const ht=t=>`/${t}/treasury/edit-portfolio`,xt=t=>`/${t}/treasury/statements`,It=t=>`/${t}/treasury/tax-letter`,Tt=t=>`/${t}/treasury/setup`,wt=O(rt)`
9
+ `,gt={overlayWidth:new We(100,100,48)},St=V((function(t,a){const n=oe(t),{companyId:r}=a;return{treasuryDetail:n,treasurySetupView:F(t,r),downloadEndPoint:`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}}),(function(t,a){const{navigate:n,currentTenant:r,location:i,handleDrawerToggle:o,analytics:m}=a,{tenantEmailDomain:s}=r;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(re(!0))},handleTreasuryOptionSelection:d=>{let c="page-not-found";d==="editPortfolio"?c=ht(s):d==="statements"?c=xt(s):d==="taxLetter"?c=It(s):d==="settings"&&(c=Tt(s));const S=Xe(i.state?.pathnameStackToGoBack,i.pathname);n(c,{state:{pathnameStackToGoBack:S}})},onColumnSortConfigChanged:(d,c)=>{t(De({uiState:{sortKey:d,sortOrder:c}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{o(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}}))(Ye);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=U(),r=L(),i=B(),o=q(),m=st(),s=y((b=>E(b))),{tenantEmailDomain:d}=M(),c=s.companyId??v.getSignedInUserTenant(d)?.companyId,[S,I]=p.useState(!1),l=y((b=>oe(b))),u=l.fetchState,x=l.accountSummary?.totalBalance?.amount,f=y((b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus)),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=_(),g=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,j=N(h?.loggedInUserRoleMap),T=H(h?.loggedInUserRoleMap),{areTenantIdsInSync:P}=qe();p.useEffect((()=>{u==="Not-Started"&&!S&&P&&(I(!0),i(re(!0)))}),[S,i,u,P]),p.useEffect((()=>{l.transactionsFetchState.fetchState==="Completed"&&l.transactions.length===0&&!n.pathname.includes("transfer")&&j&&r("./transfer")}),[l.transactionsFetchState.fetchState,l.transactions.length,n.pathname,j,r]);const w=()=>{r("..")},[le,ue]=p.useState(!1),J=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=ct({mobileExploreReferrer:"Treasury"});Ke({isDataReady:u==="Completed"});const{useFeatureGate:Y}=ie(),{isFeatureEnabled:me}=Y(R.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=Y(R.isAutoTransferRuleEnabled),ye=lt(c,{clearParams:u==="Completed"&&f?.fetchState==="Completed"}),ge=ve(s),Se=Ee(me,s);if(ge===!0&&Se!==!0)return e.jsx(ut,{});if(C){const b=f?.fetchState!=="Completed"||l.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[l.accountSummaryFetchState.fetchState==="Completed"&&f?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(Z,{analytics:A,onLoad:()=>{}}):null,e.jsx(ot,{onClose:w,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:gt.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(wt,{onClick:he=>he.stopPropagation(),children:[t===!0?e.jsx(ft,{isFirstTransfer:l.transactions.length===0||x===0,isTransactionsLoaded:l.transactionsFetchState.fetchState!=="In-Progress"&&l.transactionsFetchState.fetchState!=="Not-Started"}):null,a===!0?e.jsx(pt,{}):null]})}),e.jsxs(yt,{windowSize:o,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:J}),e.jsx(St,{treasuryDetailsView:l,isAutoTransferRuleEnabled:fe,navigate:r,currentTenant:s,location:n,companyId:c,analytics:A,handleDrawerToggle:J,initialOpenThreadRequest:ye,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return g&&j?e.jsx(D,{to:"../setup"}):s.companyTreasuryInfo?.info&&!g&&T?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(Je,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const ht=t=>`/${t}/treasury/edit-portfolio`,xt=t=>`/${t}/treasury/statements`,It=t=>`/${t}/treasury/tax-letter`,Tt=t=>`/${t}/treasury/setup`,wt=O(rt)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-DcDE-V-o.js";import{h as L,g as P,u as U,i as M,
18
18
  flex-direction: column;
19
19
  align-items: center;
20
20
  background-color: ${t=>t.theme.colors.grey4};
21
- `;function kt(){const t=L(),a=U(),n=q(),r=P(),i=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[o,m]=p.useState(!1),s=y((u=>Le(u)));p.useEffect((()=>{o||s.fetchState!=="Not-Started"||(m(!0),a(Pe(!1)))}),[o,s.fetchState,a]);const d=v.getSignedInUser(),c=y((u=>E(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},I=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access statements page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(Ct,{windowSize:n,children:e.jsx(Qe,{currentTenantCompanyName:I,statementListView:s,isLoading:l,onBackClick:()=>{const u=W(r.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const jt=O.div`
21
+ `;function kt(){const t=L(),a=B(),n=q(),r=U(),i=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[o,m]=p.useState(!1),s=y((u=>Le(u)));p.useEffect((()=>{o||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))}),[o,s.fetchState,a]);const d=v.getSignedInUser(),c=y((u=>E(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},I=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access statements page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(Ct,{windowSize:n,children:e.jsx(Qe,{currentTenantCompanyName:I,statementListView:s,isLoading:l,onBackClick:()=>{const u=W(r.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const jt=O.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-DcDE-V-o.js";import{h as L,g as P,u as U,i as M,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${t=>t.theme.colors.grey4};
29
- `;function At(){const t=L(),a=q(),n=P(),r=U(),i=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[o,m]=p.useState(!1),s=y((u=>Ue(u)));p.useEffect((()=>{o||s.fetchState!=="Not-Started"||(m(!0),r(Be(!1)))}),[o,s.fetchState,r]);const d=v.getSignedInUser(),c=y((u=>E(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},I=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access tax letter page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(jt,{windowSize:a,children:e.jsx(et,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:l,onBackClick:()=>{const u=W(n.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const bt=V((function(t,a){const{companyId:n}=a,r=B(t,n);return{treasurySetupView:r,isSetupComplete:r.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),(function(t,a){const{navigate:n,companyId:r}=a;return{onSetupButtonClick:()=>{t(Fe(r))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:i=>{n(i?"..":"../setup",{relative:"path"})}}}))(at),vt=()=>{const t=tt(),a=L(),n=P(),r=U(),{tenantEmailDomain:i}=M(),[o,m]=p.useState(!1),s=y((g=>E(g))),[d,c]=p.useState(!1),S=y((g=>g.treasurySetupViewState.treasuryFundsDetails?.fetchStatus));p.useEffect((()=>{d||S?.fetchState!=="Not-Started"||I==null||(c(!0),r(G()))}),[S,r]);const I=v.getSignedInUserTenant(i)?.companyId??s.companyId,l=v.getSignedInUser(),u=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=g=>{m(g)};if(l==null)throw Error("Can't access treasury promo page without signing in...");const f=Z(),C=N(f?.loggedInUserRoleMap),h=H(f?.loggedInUserRoleMap);if(u&&C)return e.jsx(D,{to:"../../treasury/setup"});if(s.company?.companyTreasuryInfo&&(!u&&C||h)){if(n.state?.message==="activation"){const g=W(n.state?.pathnameStackToGoBack);a(n.pathname,{state:{...n.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return S?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:A,onLoad:g=>(j=>j.trackTreasuryPromoView("Treasury Promo Page"))(g)}),e.jsx(ce,{isAppContentDrawerOpen:o,handleDrawerToggle:x}),e.jsx(bt,{analytics:A,navigate:a,companyId:I,meetingUrl:t("treasury_promo"),onClickMenuIcon:()=>{x(!0)}})]})}return e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})})},te=O.div`
29
+ `;function At(){const t=L(),a=q(),n=U(),r=B(),i=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[o,m]=p.useState(!1),s=y((u=>Be(u)));p.useEffect((()=>{o||s.fetchState!=="Not-Started"||(m(!0),r(Fe(!1)))}),[o,s.fetchState,r]);const d=v.getSignedInUser(),c=y((u=>E(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},I=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access tax letter page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(jt,{windowSize:a,children:e.jsx(et,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:l,onBackClick:()=>{const u=W(n.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const bt=V((function(t,a){const{companyId:n}=a,r=F(t,n);return{treasurySetupView:r,isSetupComplete:r.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),(function(t,a){const{navigate:n,companyId:r}=a;return{onSetupButtonClick:()=>{t(Pe(r))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:i=>{n(i?"..":"../setup",{relative:"path"})}}}))(at),vt=()=>{const t=tt(),a=L(),n=U(),r=B(),{tenantEmailDomain:i}=M(),[o,m]=p.useState(!1),s=y((g=>E(g))),[d,c]=p.useState(!1),S=y((g=>g.treasurySetupViewState.treasuryFundsDetails?.fetchStatus));p.useEffect((()=>{d||S?.fetchState!=="Not-Started"||I==null||(c(!0),r(G()))}),[S,r]);const I=v.getSignedInUserTenant(i)?.companyId??s.companyId,l=v.getSignedInUser(),u=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=g=>{m(g)};if(l==null)throw Error("Can't access treasury promo page without signing in...");const f=_(),C=N(f?.loggedInUserRoleMap),h=H(f?.loggedInUserRoleMap);if(u&&C)return e.jsx(D,{to:"../../treasury/setup"});if(s.company?.companyTreasuryInfo&&(!u&&C||h)){if(n.state?.message==="activation"){const g=W(n.state?.pathnameStackToGoBack);a(n.pathname,{state:{...n.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return S?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(Z,{analytics:A,onLoad:g=>(j=>j.trackTreasuryPromoView("Treasury Promo Page"))(g)}),e.jsx(ce,{isAppContentDrawerOpen:o,handleDrawerToggle:x}),e.jsx(bt,{analytics:A,navigate:a,companyId:I,meetingUrl:t("treasury_promo"),onClickMenuIcon:()=>{x(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=O.div`
30
30
  display: flex;
31
31
  width: 100%;
32
32
  height: 100%;
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-DcDE-V-o.js";import{h as L,g as P,u as U,i as M,
34
34
  justify-content: center;
35
35
  align-items: center;
36
36
  background-color: ${t=>t.theme.colors.grey5};
37
- `;function ta(){const t=P(),a=y((g=>E(g))),{useFeatureGate:n}=ie(),r=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",i=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,o=Z(),m=H(o?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),d=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Re(o?.loggedInUserRoleMap),c=Me(o?.loggedInUserRoleMap),S=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ve(o?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!s&&Ne(o?.loggedInUserRoleMap),l=r&&!s&&N(o?.loggedInUserRoleMap),{isFeatureEnabled:u}=n(R.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=n(R.isDebitCardFeatureEnabled),f=nt(a,u,x)&&!s&&Ze(o?.loggedInUserRoleMap),C=_e(o?.loggedInUserRoleMap),h=$e(o?.loggedInUserRoleMap);return e.jsxs(xe,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:c,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isUserHasOnlyBillPayAccess:c,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(kt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),r?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),l?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(it,{})})]}):i&&l?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
37
+ `;function ta(){const t=U(),a=y((g=>E(g))),{useFeatureGate:n}=ie(),r=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",i=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,o=_(),m=H(o?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),d=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Re(o?.loggedInUserRoleMap),c=Me(o?.loggedInUserRoleMap),S=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ve(o?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!s&&Ne(o?.loggedInUserRoleMap),l=r&&!s&&N(o?.loggedInUserRoleMap),{isFeatureEnabled:u}=n(R.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=n(R.isDebitCardFeatureEnabled),f=nt(a,u,x)&&!s&&_e(o?.loggedInUserRoleMap),C=Ze(o?.loggedInUserRoleMap),h=$e(o?.loggedInUserRoleMap);return e.jsxs(xe,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:c,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isUserHasOnlyBillPayAccess:c,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(kt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),r?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),l?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(it,{})})]}):i&&l?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-DcDE-V-o.js";import{a as u}from"./sentry-DB4rU-NW.js";import{h as M,u as G,i as z,j as f,l as $,g as q,n as We,o as P,N as U}from"./core-D4EC26kf.js";import{Wc as gt,Wd as Ze,R_ as et,We as vt,fI as L,h2 as ge,Wf as Tt,cF as xt,Wg as bt,F$ as yt,Wh as wt,Wi as oe,Wj as te,Wk as ve,TA as ue,TB as ke,Gf as pe,Tz as he,G2 as tt,FB as Pe,Wl as It,TC as Y,m3 as me,Wm as je,Fv as Ct,Wn as Dt,Wo as Et,Wp as _e,Wq as Ve,Wr as Ae,Ws as Re,G9 as Te,Wt as nt,FS as at,Wu as Ft,Wv as kt,Ww as Pt,Wx as jt,Wy as _t,Wz as Vt,WA as At,WB as Rt,CJ as Lt,CR as Ut,CK as Bt,SG as we,WC as Ot,WD as Wt,lj as Ie,br as Mt,WE as $t,WF as Gt,n1 as Nt,na as zt,SF as Ce,bF as Me,WG as ot,Sg as st,WH as Yt,WI as Jt,WJ as Kt,nc as qt,WK as $e,WL as Ge,WM as Ne,WN as ze,WO as Xt,n8 as Ht,WP as Qt,nb as Zt,WQ as en,WR as it,T0 as rt,mr as tn,WS as nn,WT as De,WU as dt,S_ as lt,IJ as an,WV as on,WW as sn,mL as ct,WX as rn,WY as dn,Tc as ln,vn as cn,WZ as ut,W_ as Ye,T9 as Ee,W$ as Je,X0 as un,Te as pn,X1 as hn,X2 as mn,X3 as fn,X4 as Sn,X5 as gn,vq as vn,X6 as Tn,TD as xn,Vb as bn,ST as Fe,ie as yn,Vd as wn,Vc as In,ic as Cn,X7 as Dn,X8 as En,IO as Fn,X9 as kn,Xa as Pn,Xb as jn,Xc as _n,mv as Vn,bn as An,e0 as Rn,d$ as Ln}from"./zeni-epic-state-Bl3gAQPi.js";import{$ as ne,a9 as Le,W as X,A as W,z as R,a5 as Un,aK as Bn,j,T as Ue,e as xe,at as ee,aq as se,aL as On,aM as pt,ao as Wn,a6 as Se,aN as Mn,p as K,V as $n,G as ht,aO as Gn,ac as mt,a2 as Nn,h as Ke,aP as zn,E as J,a7 as Yn,ad as ft,ae as Jn,aQ as Kn,aR as qn,N as Be,aS as Xn,aT as Hn,a1 as Qn,aU as Zn,aV as ea}from"./index-Ch-ATQTq.js";import{u as ta,D as na,n as B,S as St}from"./mui-BCH_ILdb.js";import{t as aa,A as oa}from"./AddressScreen-BOTH_mRu.js";import fe from"./NotFoundScreen-0hF8kIyY.js";import{F as sa}from"./FeaturePreviewScreen-B0SxkBd3.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-DH-G2ABB.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-CBSVhkeG.js";import{M as re}from"./MobileAppDrawer-C6gfQS8M.js";import{v as Oe,c as ua,d as pa}from"./routePaths-D0-Tropc.js";import{D as ha}from"./DrawerScreen-DquM7PdJ.js";import{a as ma,m as fa}from"./accountMappingHelper-BYw-4sqP.js";import"./recharts-BRIJ8RH5.js";import"./analytics-UPQyZr49.js";import"./plaid-a-pmhWdo.js";import"./dnd-CQ9igkkh.js";import"./stripe-cKAAJElX.js";import"./lottie-DBrmrNFb.js";import"./lexical-DvwBeJWJ.js";import"./pdf-zGCHYG6q.js";import"./utils-CU_Pr3K6.js";import"./pathToGoBack-rzbozB31.js";import"./InboxNotificationsProvider-DPgK9Ai7.js";import"./useTaskManagerAccess-CX5toJpg.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]="6b6ba9eb-9961-4a01-80af-37e297f173c2",e._sentryDebugIdIdentifier="sentry-dbid-6b6ba9eb-9961-4a01-80af-37e297f173c2")}catch{}})();const Sa={drawerLeftMargin:new Le(0,0,100,200)},ga=$((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=L(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:xt(Ue.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(Bn),va=()=>{const e=ta(),a=M(),s=G(),{scheduleDetailId:t}=z(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=z(),{useFeatureGate:p}=X(),{isFeatureEnabled:h}=p(W.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>L(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Un,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=B(St)`
1
+ import{j as o}from"./liveblocks-CRyd9n8B.js";import{a as u}from"./sentry-BOmfv4Oi.js";import{h as M,u as G,i as z,j as f,l as $,g as q,n as We,o as P,N as U}from"./core-C6dxOS4P.js";import{Wb as gt,Wc as Ze,R_ as et,Wd as vt,fI as L,h2 as ge,We as Tt,cF as xt,Wf as bt,F$ as yt,Wg as wt,Wh as oe,Wi as te,Wj as ve,Tz as ue,TA as ke,Gf as pe,Ty as he,G2 as tt,FB as Pe,Wk as It,TB as Y,m3 as me,Wl as je,Fv as Ct,Wm as Dt,Wn as Et,Wo as _e,Wp as Ve,Wq as Ae,Wr as Re,G9 as Te,Ws as nt,FS as at,Wt as Ft,Wu as kt,Wv as Pt,Ww as jt,Wx as _t,Wy as Vt,Wz as At,WA as Rt,CJ as Lt,CR as Ut,CK as Bt,SG as we,WB as Ot,WC as Wt,lj as Ie,br as Mt,WD as $t,WE as Gt,n1 as Nt,na as zt,SF as Ce,bF as Me,WF as ot,Sg as st,WG as Yt,WH as Jt,WI as Kt,nc as qt,WJ as $e,WK as Ge,WL as Ne,WM as ze,WN as Xt,n8 as Ht,WO as Qt,nb as Zt,WP as en,WQ as it,S$ as rt,mr as tn,WR as nn,WS as De,WT as dt,SZ as lt,IJ as an,WU as on,WV as sn,mL as ct,WW as rn,WX as dn,Tb as ln,vn as cn,WY as ut,WZ as Ye,T8 as Ee,W_ as Je,W$ as un,Td as pn,X0 as hn,X1 as mn,X2 as fn,X3 as Sn,X4 as gn,vq as vn,X5 as Tn,TC as xn,Va as bn,SS as Fe,ie as yn,Vc as wn,Vb as In,ic as Cn,X6 as Dn,X7 as En,IO as Fn,X8 as kn,X9 as Pn,Xa as jn,Xb as _n,mv as Vn,bn as An,e0 as Rn,d$ as Ln}from"./zeni-epic-state-C5-RfNOq.js";import{$ as ne,a9 as Le,W as X,A as W,z as R,a5 as Un,aK as Bn,h as j,R as Ue,Z as xe,at as ee,aq as se,aL as On,aM as pt,ao as Wn,a6 as Se,aN as Mn,p as K,V as $n,G as ht,aO as Gn,ac as mt,a2 as Nn,g as Ke,aP as zn,C as J,a7 as Yn,ad as ft,ae as Jn,aQ as Kn,aR as qn,K as Be,aS as Xn,aT as Hn,a1 as Qn,aU as Zn,aV as ea}from"./index-pj4u0b1G.js";import{u as ta,D as na,n as B,S as St}from"./mui-0pGBD9L4.js";import{t as aa,A as oa}from"./AddressScreen-lx_HZDfg.js";import fe from"./NotFoundScreen-BWSuWGJw.js";import{F as sa}from"./FeaturePreviewScreen-DInsBmdk.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-B6e9FDGx.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-D_lZcHX9.js";import{M as re}from"./MobileAppDrawer-CTQRP8UJ.js";import{v as Oe,c as ua,d as pa}from"./routePaths-D6noST9U.js";import{D as ha}from"./DrawerScreen-B3BZEyK7.js";import{a as ma,m as fa}from"./accountMappingHelper-CzuKXsfZ.js";import"./recharts-C9C0kAsT.js";import"./analytics-BGlrzyDz.js";import"./plaid-CO0-sO-T.js";import"./dnd-BtyoSdzG.js";import"./stripe-cKAAJElX.js";import"./lottie-CXwABHQ0.js";import"./lexical-plr3Wvpq.js";import"./pdf-c_Y6aTYi.js";import"./utils-DrAWZPZ0.js";import"./pathToGoBack-B8vmhE3I.js";import"./InboxNotificationsProvider-CJ6RDL31.js";import"./useTaskManagerAccess-DlX9f1Pd.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]="7207a4a0-3342-42ff-9ec0-f0e54e590fba",e._sentryDebugIdIdentifier="sentry-dbid-7207a4a0-3342-42ff-9ec0-f0e54e590fba")}catch{}})();const Sa={drawerLeftMargin:new Le(0,0,100,200)},ga=$((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=L(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:xt(Ue.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(Bn),va=()=>{const e=ta(),a=M(),s=G(),{scheduleDetailId:t}=z(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=z(),{useFeatureGate:p}=X(),{isFeatureEnabled:h}=p(W.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>L(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Un,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=B(St)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -0,0 +1,12 @@
1
+ import{j as o}from"./liveblocks-CRyd9n8B.js";import{a as f}from"./sentry-BOmfv4Oi.js";import{t as u,u as h,j as b,N as y}from"./core-C6dxOS4P.js";import{U_ as I,gl as w,JX as j}from"./zeni-epic-state-C5-RfNOq.js";import{z as l,a5 as x,ad as S,ae as _}from"./index-pj4u0b1G.js";import{n as c}from"./mui-0pGBD9L4.js";import"./recharts-C9C0kAsT.js";import"./analytics-BGlrzyDz.js";import"./plaid-CO0-sO-T.js";import"./dnd-BtyoSdzG.js";import"./stripe-cKAAJElX.js";import"./lottie-CXwABHQ0.js";import"./lexical-plr3Wvpq.js";import"./pdf-c_Y6aTYi.js";import"./utils-DrAWZPZ0.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]="4e444eca-7b9d-4b49-a9fb-c9d158cde1e6",e._sentryDebugIdIdentifier="sentry-dbid-4e444eca-7b9d-4b49-a9fb-c9d158cde1e6")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=b((m=>I(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{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||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(E,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},D=c.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
+ `,E=c(_.LargeRegular)`
10
+ display: flex;
11
+ color: ${S.important};
12
+ `;export{A as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-DcDE-V-o.js";import{u as _,h as ne,g as W,i as N,j as k,l as ae,N as J,n as Re,o as x}from"./core-D4EC26kf.js";import{$P as Ue,LP as Fe,$Q as $e,fI as R,H0 as _e,$R as An,cv as ee,cw as ze,GW as wn,$S as Dn,$T as kn,GZ as In,H4 as me,GT as Sn,GQ as Pn,Zm as ce,$U as bn,Pn as vn,Xi as jn,Pp as En,mM as Pe,$V as Tn,v2 as Me,uS as Ve,mD as Ze,mG as be,Xj as ve,Xk as Bn,$W as On,mF as Ln,n0 as Rn,mu as Un,kU as Fn,kT as $n,$X as _n,$Y as ge,P4 as zn,$Z as Mn,$_ as Vn,ZC as fe,$$ as je,a00 as Zn,PA as Hn,ZZ as Gn,MX as He,Cx as Ge,a01 as Wn,Px as Nn,a02 as We,db as ye,PE as Ne,d$ as Xe,e0 as xe,PC as Xn,MR as Yn,Pu as Qn,a03 as Ye,a04 as Qe,P6 as qe,Pg as Ee,a05 as qn,ZQ as Kn,PF as Jn,bq as ea,bK as na,cH as aa,bL as ta,bu as oa,UJ as sa}from"./zeni-epic-state-Bl3gAQPi.js";import{V as te,W as Z,A as V,z as b,at as Ce,a5 as le,cV as ra,$ as z,a9 as X,a2 as Ke,h as ia,n as Te,j as L,cW as ca,ac as Ae,cX as la,a6 as de,cY as da,N as we,bg as G,cZ as ua,ao as pa,aq as Je,c_ as Be,c$ as ma,p as ie,d0 as ga,ag as ha,d1 as fa,d2 as ya,g as xa,E as Ca}from"./index-Ch-ATQTq.js";import{u as U,n as F,D as Y,S as Q}from"./mui-BCH_ILdb.js";import K from"./NotFoundScreen-0hF8kIyY.js";import{S as Oe}from"./SetupPagesScreen-CIrP22mo.js";import{F as en}from"./FeaturePreviewScreen-B0SxkBd3.js";import{a as g}from"./sentry-DB4rU-NW.js";import{M as ue}from"./MobileAppDrawer-C6gfQS8M.js";import{A as Aa,D as wa,V as Da}from"./DomesticWireDetailScreen-D-XdJZt2.js";import{A as ka}from"./AddressScreen-BOTH_mRu.js";import{u as nn}from"./useAskAiCfoHostNavButtonProps-CBSVhkeG.js";import{Z as Ia}from"./ZeniAccountStatementScreen-jmmjZcA9.js";import"./recharts-BRIJ8RH5.js";import"./analytics-UPQyZr49.js";import"./plaid-a-pmhWdo.js";import"./dnd-CQ9igkkh.js";import"./stripe-cKAAJElX.js";import"./lottie-DBrmrNFb.js";import"./lexical-DvwBeJWJ.js";import"./pdf-zGCHYG6q.js";import"./utils-CU_Pr3K6.js";import"./BusinessVerificationPageScreen-CqSHzLo6.js";import"./routePaths-D0-Tropc.js";import"./analyticsHelper-nRPDDcpi.js";import"./InboxNotificationsProvider-DPgK9Ai7.js";import"./useTaskManagerAccess-CX5toJpg.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="0a752eab-14ec-4881-b789-ab74fcc44ae9",n._sentryDebugIdIdentifier="sentry-dbid-0a752eab-14ec-4881-b789-ab74fcc44ae9")}catch{}})();const Sa=F.div`
1
+ import{j as e}from"./liveblocks-CRyd9n8B.js";import{u as _,h as ne,g as W,i as N,j as k,l as ae,N as J,n as Re,o as x}from"./core-C6dxOS4P.js";import{$O as Ue,LP as Fe,$P as $e,fI as R,H0 as _e,$Q as An,cv as ee,cw as ze,GW as wn,$R as Dn,$S as kn,GZ as In,H4 as me,GT as Sn,GQ as Pn,Zl as ce,$T as bn,Pn as vn,Xh as jn,Pp as En,mM as Pe,$U as Tn,v2 as Me,uS as Ve,mD as Ze,mG as be,Xi as ve,Xj as Bn,$V as On,mF as Ln,n0 as Rn,mu as Un,kU as Fn,kT as $n,$W as _n,$X as ge,P4 as zn,$Y as Mn,$Z as Vn,ZB as he,$_ as je,$$ as Zn,PA as Hn,ZY as Gn,MX as He,Cx as Ge,a00 as Wn,Px as Nn,a01 as We,db as ye,PE as Ne,d$ as Xe,e0 as xe,PC as Xn,MR as Yn,Pu as Kn,a02 as Ye,a03 as Ke,P6 as qe,Pg as Ee,a04 as qn,ZP as Qn,PF as Jn,bq as ea,bK as na,cH as aa,bL as ta,bu as oa,UI as sa}from"./zeni-epic-state-C5-RfNOq.js";import{V as te,W as Z,A as V,z as b,at as Ce,a5 as le,cV as ra,$ as z,a9 as X,a2 as Qe,g as ia,n as Te,h as L,cW as ca,ac as Ae,cX as la,a6 as de,cY as da,K as we,bg as G,cZ as ua,ao as pa,aq as Je,c_ as Be,c$ as ma,p as ie,d0 as ga,ag as fa,d1 as ha,d2 as ya,f as xa,C as Ca}from"./index-pj4u0b1G.js";import{u as U,n as F,D as Y,S as K}from"./mui-0pGBD9L4.js";import Q from"./NotFoundScreen-BWSuWGJw.js";import{S as Oe}from"./SetupPagesScreen-u4czjChG.js";import{F as en}from"./FeaturePreviewScreen-DInsBmdk.js";import{a as g}from"./sentry-BOmfv4Oi.js";import{M as ue}from"./MobileAppDrawer-CTQRP8UJ.js";import{A as Aa,D as wa,V as Da}from"./DomesticWireDetailScreen-agLHT6HV.js";import{A as ka}from"./AddressScreen-lx_HZDfg.js";import{u as nn}from"./useAskAiCfoHostNavButtonProps-D_lZcHX9.js";import{Z as Ia}from"./ZeniAccountStatementScreen-mhMclD_-.js";import"./recharts-C9C0kAsT.js";import"./analytics-BGlrzyDz.js";import"./plaid-CO0-sO-T.js";import"./dnd-BtyoSdzG.js";import"./stripe-cKAAJElX.js";import"./lottie-CXwABHQ0.js";import"./lexical-plr3Wvpq.js";import"./pdf-c_Y6aTYi.js";import"./utils-DrAWZPZ0.js";import"./BusinessVerificationPageScreen-CqCRDHlP.js";import"./routePaths-D6noST9U.js";import"./analyticsHelper-N9KfV3Ey.js";import"./InboxNotificationsProvider-CJ6RDL31.js";import"./useTaskManagerAccess-DlX9f1Pd.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="6d4502cf-b197-4bd7-92af-5f2038a74d2c",n._sentryDebugIdIdentifier="sentry-dbid-6d4502cf-b197-4bd7-92af-5f2038a74d2c")}catch{}})();const Sa=F.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,15 +6,15 @@ import{j as e}from"./liveblocks-DcDE-V-o.js";import{u as _,h as ne,g as W,i as N
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${n=>n.theme.colors.grey4};
9
- `;function Le({isEditDrawerOpen:n}){const a=U(),[r,t]=g.useState(!1),{autoTransferRulePageProps:o,isLoading:i}=(function({isEditDrawerOpen:d=!1}={}){const c=_(),p=ne(),h=W(),{ruleId:y,tenantEmailDomain:s}=N(),l=te(),{useFeatureGate:f}=Z(),m=k((u=>Ue(u))),P=k((u=>Fe(u.depositAccountState,u.depositAccountListState))),D=k((u=>$e(u))),w=k((u=>R(u))),{isFeatureEnabled:I}=f(V.isTreasuryEnabled),C=m?.fetchState??"Not-Started",A=w?.companyId??(s==null?void 0:b.getSignedInUserTenant(s)?.companyId);g.useEffect((()=>{C==="Not-Started"&&A!=null&&c(_e(!0))}),[c,C,A]);const E=m?.fetchState!=="Completed";if(E)return{autoTransferRulePageProps:void 0,isLoading:E};const T=w?.company!=null&&An(w.company),v=!!(I&&T),j=ee(l?.loggedInUserRoleMap)||ze(l?.loggedInUserRoleMap),O=b.getSignedInUser(),S={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:w?.tenantId??""},B=!!h.state?.scrollToAddRule;return{isLoading:E,autoTransferRulePageProps:{autoTransferRuleView:m,companyName:w?.companyName??"",hasAdminLevelAccess:j,includeTreasuryOption:v,transferLimit:5e5,authParams:S,currentTenant:w,depositAccountListView:P,downloadAccountDetailEndPoint:`${Ce}/account_details`,editingRuleId:y,isEditDrawerOpen:d,scrollToAddRule:B,zeniAccountsConfigDetail:D,onBackClick:()=>p(".."),onCreateRule:()=>{c(Pn())},onUpdateRule:u=>{c(me(u))},onDeleteClick:u=>{c(Sn(u))},onPauseClick:u=>{c(me(u,!0,!1))},onResumeClick:u=>{c(me(u,!1,!0))},onActivityClick:(u,M)=>{c(In(u,M))},onUpdateRuleLocalData:u=>{c(kn(u))},clearRuleLocalData:()=>{c(Dn())},onEditClick:u=>{p(`./${u}/edit`)},onEditDrawerClose:()=>{p("../../",{relative:"path"})},onReviewClick:()=>{c(wn())}}}})({isEditDrawerOpen:n});return i||o==null?e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(Sa,{children:[e.jsx(ue,{isAppContentDrawerOpen:r,handleDrawerToggle:d=>{t(d)}}),e.jsx(ra,{...o})]})}const Pa={overlayWidth:new X(100,100,58)},ba=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=_(),o=U(),i=z();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(Y,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(va,{onClick:d=>d.stopPropagation(),children:e.jsx(Aa,{vendorIdParam:n,accountContext:"express-pay"})})})},va=F(Q)`
9
+ `;function Le({isEditDrawerOpen:n}){const a=U(),[r,t]=g.useState(!1),{autoTransferRulePageProps:o,isLoading:i}=(function({isEditDrawerOpen:d=!1}={}){const c=_(),p=ne(),f=W(),{ruleId:y,tenantEmailDomain:s}=N(),l=te(),{useFeatureGate:h}=Z(),m=k((u=>Ue(u))),P=k((u=>Fe(u.depositAccountState,u.depositAccountListState))),D=k((u=>$e(u))),w=k((u=>R(u))),{isFeatureEnabled:I}=h(V.isTreasuryEnabled),C=m?.fetchState??"Not-Started",A=w?.companyId??(s==null?void 0:b.getSignedInUserTenant(s)?.companyId);g.useEffect((()=>{C==="Not-Started"&&A!=null&&c(_e(!0))}),[c,C,A]);const E=m?.fetchState!=="Completed";if(E)return{autoTransferRulePageProps:void 0,isLoading:E};const T=w?.company!=null&&An(w.company),v=!!(I&&T),j=ee(l?.loggedInUserRoleMap)||ze(l?.loggedInUserRoleMap),O=b.getSignedInUser(),S={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:w?.tenantId??""},B=!!f.state?.scrollToAddRule;return{isLoading:E,autoTransferRulePageProps:{autoTransferRuleView:m,companyName:w?.companyName??"",hasAdminLevelAccess:j,includeTreasuryOption:v,transferLimit:5e5,authParams:S,currentTenant:w,depositAccountListView:P,downloadAccountDetailEndPoint:`${Ce}/account_details`,editingRuleId:y,isEditDrawerOpen:d,scrollToAddRule:B,zeniAccountsConfigDetail:D,onBackClick:()=>p(".."),onCreateRule:()=>{c(Pn())},onUpdateRule:u=>{c(me(u))},onDeleteClick:u=>{c(Sn(u))},onPauseClick:u=>{c(me(u,!0,!1))},onResumeClick:u=>{c(me(u,!1,!0))},onActivityClick:(u,M)=>{c(In(u,M))},onUpdateRuleLocalData:u=>{c(kn(u))},clearRuleLocalData:()=>{c(Dn())},onEditClick:u=>{p(`./${u}/edit`)},onEditDrawerClose:()=>{p("../../",{relative:"path"})},onReviewClick:()=>{c(wn())}}}})({isEditDrawerOpen:n});return i||o==null?e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(Sa,{children:[e.jsx(ue,{isAppContentDrawerOpen:r,handleDrawerToggle:d=>{t(d)}}),e.jsx(ra,{...o})]})}const Pa={overlayWidth:new X(100,100,58)},ba=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=_(),o=U(),i=z();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(Y,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(va,{onClick:d=>d.stopPropagation(),children:e.jsx(Aa,{vendorIdParam:n,accountContext:"express-pay"})})})},va=F(K)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
13
- `,ja={overlayWidth:new X(100,100,58)},Ea=({isDrawerOpen:n,closeDrawerHandler:a})=>{const r=_(),t=U(),o=z();if(b.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(Y,{onClose:()=>{a(!0),r(ce())},anchor:"right",open:n,PaperProps:{style:{width:ja.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ta,{onClick:i=>i.stopPropagation(),children:e.jsx(ka,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Ta=F(Q)`
13
+ `,ja={overlayWidth:new X(100,100,58)},Ea=({isDrawerOpen:n,closeDrawerHandler:a})=>{const r=_(),t=U(),o=z();if(b.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(Y,{onClose:()=>{a(!0),r(ce())},anchor:"right",open:n,PaperProps:{style:{width:ja.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ta,{onClick:i=>i.stopPropagation(),children:e.jsx(ka,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Ta=F(K)`
14
14
  display: flex;
15
15
  min-height: 100%;
16
16
  flex-direction: column;
17
- `,Ba={overlayWidth:new X(100,100,58)},Oa=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=_(),o=U(),i=z();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(Y,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Ba.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(La,{onClick:d=>d.stopPropagation(),children:e.jsx(wa,{vendorIdParam:n,accountContext:"express-pay"})})})},La=F(Q)`
17
+ `,Ba={overlayWidth:new X(100,100,58)},Oa=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=_(),o=U(),i=z();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(Y,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Ba.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(La,{onClick:d=>d.stopPropagation(),children:e.jsx(wa,{vendorIdParam:n,accountContext:"express-pay"})})})},La=F(K)`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  flex-direction: column;
@@ -26,15 +26,15 @@ import{j as e}from"./liveblocks-DcDE-V-o.js";import{u as _,h as ne,g as W,i as N
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${n=>n.theme.colors.grey4};
29
- `,Ua=ae((function(n,a){const r=R(n),t=b.getSignedInUser(),o=r.tenantId,i={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=jn(n,"common");return{expressPayDetails:d,fileProps:{authParams:i,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:r}=a;return{onSaveVendor:t=>{n($n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(be({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Fn({localData:t}))},onVendorSelected:t=>{t!=null&&n(Un(t,!1))},updateSelectedVendorForCreate:t=>{n(Rn(t))},initializeVendorAddress:()=>{n(Ln())},resetVendorSaveStatus:t=>{n(On({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(ve("common"))},onCancelAutoComplete:()=>{n(ve("common"))}},chooseNewVendor:t=>{n(be({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?r("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&r("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(Ze({files:t}))},onDeleteFile:t=>{n(Ve(t))},onEditFileName:(t,o)=>{n(Me(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Pe(t)),n(Pe()),n(Tn()),n(ce()),r("../",{relative:"path"})},onSchedulePayment:()=>{n(En())}}}))(ca);function se({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:r}){const t=ne(),o=W(),i=_(),[d,c]=g.useState(!1),{tenantEmailDomain:p}=N(),h=te(),y=k((u=>u.expressPayState.fetchState)),s=k((u=>R(u))),l=k((u=>bn(u))),f=l.expressPayLocalData?.vendorId,m=s.companyId??b.getSignedInUserTenant(p)?.companyId,[P,D]=g.useState(!1),[w,I]=g.useState(!1),[C,A]=g.useState(!1),E=Ke(o.state?.pathnameStackToGoBack),{poppedPathname:T}=E,v=T?.split("/"),j=v?.[v.length-1];g.useEffect((()=>{n===!0?D(!0):(D(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{a===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[a]),g.useEffect((()=>{r===!0?A(!0):(A(!1),document.body.style.overflow="auto")}),[r]),g.useEffect((()=>{y==="Not-Started"&&i(vn(!0,!0))}),[y,i]);const O=ia(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(g.useEffect((()=>{O==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&B()}),[O,l.vendorViewDetails.bankAccountCreationState?.fetchState]),b.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=u=>{c(u)},B=()=>{D(!1),I(!1),t("../",{relative:"path"})};return e.jsxs(Ra,{children:[Te(o)?e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:S}):null,P===!0?e.jsx(ba,{vendorId:f,closeDrawerHandler:B,isDrawerOpen:P}):null,w===!0?e.jsx(Oa,{vendorId:f,closeDrawerHandler:B,isDrawerOpen:w}):null,C===!0?e.jsx(Ea,{closeDrawerHandler:B,isDrawerOpen:C}):null,e.jsx(Da,{vendorId:f,isExpressPayPage:!0}),e.jsx(Ua,{navigate:t,location:o,companyId:m,accountId:j,analytics:L,currentTenant:s,vendorId:f,roleMap:h?.loggedInUserRoleMap,isSettings:Te(o),expressPayDetails:l,onClickMenuIcon:()=>{S(!0)}})]})}const Fa={overlayWidth:new X(100,100,58)},$a=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:r,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const i=U(),d=z(),c=k((s=>$e(s))),p=k((s=>R(s)));if(b.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{o(!0)},y={depositAccount:t,onDismissClick:h,zeniAccountsConfigDetail:c,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:p};return e.jsx(Y,{anchor:"right",open:r,PaperProps:{style:{width:Fa.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:e.jsx(_a,{onClick:s=>s.stopPropagation(),children:e.jsx(la,{...y})})})},_a=F(Q)`
29
+ `,Ua=ae((function(n,a){const r=R(n),t=b.getSignedInUser(),o=r.tenantId,i={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=jn(n,"common");return{expressPayDetails:d,fileProps:{authParams:i,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:r}=a;return{onSaveVendor:t=>{n($n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(be({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Fn({localData:t}))},onVendorSelected:t=>{t!=null&&n(Un(t,!1))},updateSelectedVendorForCreate:t=>{n(Rn(t))},initializeVendorAddress:()=>{n(Ln())},resetVendorSaveStatus:t=>{n(On({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(ve("common"))},onCancelAutoComplete:()=>{n(ve("common"))}},chooseNewVendor:t=>{n(be({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?r("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&r("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(Ze({files:t}))},onDeleteFile:t=>{n(Ve(t))},onEditFileName:(t,o)=>{n(Me(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Pe(t)),n(Pe()),n(Tn()),n(ce()),r("../",{relative:"path"})},onSchedulePayment:()=>{n(En())}}}))(ca);function se({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:r}){const t=ne(),o=W(),i=_(),[d,c]=g.useState(!1),{tenantEmailDomain:p}=N(),f=te(),y=k((u=>u.expressPayState.fetchState)),s=k((u=>R(u))),l=k((u=>bn(u))),h=l.expressPayLocalData?.vendorId,m=s.companyId??b.getSignedInUserTenant(p)?.companyId,[P,D]=g.useState(!1),[w,I]=g.useState(!1),[C,A]=g.useState(!1),E=Qe(o.state?.pathnameStackToGoBack),{poppedPathname:T}=E,v=T?.split("/"),j=v?.[v.length-1];g.useEffect((()=>{n===!0?D(!0):(D(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{a===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[a]),g.useEffect((()=>{r===!0?A(!0):(A(!1),document.body.style.overflow="auto")}),[r]),g.useEffect((()=>{y==="Not-Started"&&i(vn(!0,!0))}),[y,i]);const O=ia(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(g.useEffect((()=>{O==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&B()}),[O,l.vendorViewDetails.bankAccountCreationState?.fetchState]),b.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=u=>{c(u)},B=()=>{D(!1),I(!1),t("../",{relative:"path"})};return e.jsxs(Ra,{children:[Te(o)?e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:S}):null,P===!0?e.jsx(ba,{vendorId:h,closeDrawerHandler:B,isDrawerOpen:P}):null,w===!0?e.jsx(Oa,{vendorId:h,closeDrawerHandler:B,isDrawerOpen:w}):null,C===!0?e.jsx(Ea,{closeDrawerHandler:B,isDrawerOpen:C}):null,e.jsx(Da,{vendorId:h,isExpressPayPage:!0}),e.jsx(Ua,{navigate:t,location:o,companyId:m,accountId:j,analytics:L,currentTenant:s,vendorId:h,roleMap:f?.loggedInUserRoleMap,isSettings:Te(o),expressPayDetails:l,onClickMenuIcon:()=>{S(!0)}})]})}const Fa={overlayWidth:new X(100,100,58)},$a=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:r,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const i=U(),d=z(),c=k((s=>$e(s))),p=k((s=>R(s)));if(b.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const f=()=>{o(!0)},y={depositAccount:t,onDismissClick:f,zeniAccountsConfigDetail:c,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:p};return e.jsx(Y,{anchor:"right",open:r,PaperProps:{style:{width:Fa.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>f(),children:e.jsx(_a,{onClick:s=>s.stopPropagation(),children:e.jsx(la,{...y})})})},_a=F(K)`
30
30
  display: flex;
31
31
  min-height: 100%;
32
32
  flex-direction: column;
33
- `,za={overlayWidth:new X(100,100,58)},an=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const r=U(),t=z(),o=_(),i=k((s=>R(s))),d=b.getSignedInUser(),c=i.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const h=k((s=>_n(s))),y={analytics:L,checkDeposit:h,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:s=>{o(Mn(s))},updateFilesEntity:s=>{o(Ze({files:s}))},onAnotherTransferClick:()=>{o(ge())},onDeleteFile:s=>{o(Ve(s))},onEditFileName:(s,l)=>{o(Me(s,l.split(".")[0]))},onCheckDpositClick:()=>{o(zn())},onDismissClick:()=>{a(!0),o(ge())}};return e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:L,onLoad:s=>(l=>l.trackPageLoaded(we.Event.accountsDepositCheckFormViewed))(s)}),e.jsx(Y,{anchor:"right",open:n,PaperProps:{style:{width:za.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(s,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(ge())),children:e.jsx(Ma,{onClick:s=>s.stopPropagation(),children:e.jsx(da,{...y})})})]})},Ma=F(Q)`
33
+ `,za={overlayWidth:new X(100,100,58)},an=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const r=U(),t=z(),o=_(),i=k((s=>R(s))),d=b.getSignedInUser(),c=i.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const f=k((s=>_n(s))),y={analytics:L,checkDeposit:f,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:s=>{o(Mn(s))},updateFilesEntity:s=>{o(Ze({files:s}))},onAnotherTransferClick:()=>{o(ge())},onDeleteFile:s=>{o(Ve(s))},onEditFileName:(s,l)=>{o(Me(s,l.split(".")[0]))},onCheckDpositClick:()=>{o(zn())},onDismissClick:()=>{a(!0),o(ge())}};return e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:L,onLoad:s=>(l=>l.trackPageLoaded(we.Event.accountsDepositCheckFormViewed))(s)}),e.jsx(Y,{anchor:"right",open:n,PaperProps:{style:{width:za.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(s,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(ge())),children:e.jsx(Ma,{onClick:s=>s.stopPropagation(),children:e.jsx(da,{...y})})})]})},Ma=F(K)`
34
34
  display: flex;
35
35
  min-height: 100%;
36
36
  flex-direction: column;
37
- `,Va={overlayWidth:new X(100,100,58)},Za=ae((function(n,a){const r=a.currentTenant?.companyId;return{plaidConnectionDetails:Gn(n,r,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Fe(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Nn()),clearReviewTransferDetail:()=>n(Wn()),onFetchLinkTokenClick:r=>{n(Ge("external_account",r))},onEstablishConnectionClick:r=>{n(He(r,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(ua),tn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:r,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const i=k((C=>Vn(C))),d=k((C=>R(C))),c=U(),p=z(),h=_(),{accountId:y}=N(),[s,l]=g.useState("achTransfer"),[f,m]=g.useState(!1);if(b.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:P}=Z(),{configValue:D}=P(G.zeniAccountsConfig),w=fe(D),I=()=>{t(!0),h(je())};return g.useEffect((()=>{i.reviewTransferDetail.fetchState==="Completed"&&m(!0)}),[m,i.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:L,onLoad:C=>(A=>A.trackPageLoaded(we.Event.zeniAccountsTransferFormViewed))(C)}),e.jsx(Y,{onClose:()=>{(s==="achTransfer"&&f===!1||s==="achTransfer"&&f&&i.fetchState==="Completed")&&I()},anchor:"right",open:n,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ha,{onClick:C=>C.stopPropagation(),children:e.jsx(Za,{analytics:L,transferDetails:i,authParams:a,downloadAccountDetailEndPoint:r,onTransferClick:()=>{L.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(Hn(y))},onDismissClick:I,onSaveChangesToLocalStore:C=>{h(Zn(C))},onAnotherTransferClick:()=>{m(!1),h(je())},currentTenant:d,zeniAccountsConfigDetail:o,currentDrawerContent:s,setCurrentDrawerContent:l,showReviewContent:f,setShowReviewContent:m,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},Ha=F(Q)`
37
+ `,Va={overlayWidth:new X(100,100,58)},Za=ae((function(n,a){const r=a.currentTenant?.companyId;return{plaidConnectionDetails:Gn(n,r,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Fe(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Nn()),clearReviewTransferDetail:()=>n(Wn()),onFetchLinkTokenClick:r=>{n(Ge("external_account",r))},onEstablishConnectionClick:r=>{n(He(r,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(ua),tn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:r,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const i=k((C=>Vn(C))),d=k((C=>R(C))),c=U(),p=z(),f=_(),{accountId:y}=N(),[s,l]=g.useState("achTransfer"),[h,m]=g.useState(!1);if(b.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:P}=Z(),{configValue:D}=P(G.zeniAccountsConfig),w=he(D),I=()=>{t(!0),f(je())};return g.useEffect((()=>{i.reviewTransferDetail.fetchState==="Completed"&&m(!0)}),[m,i.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:L,onLoad:C=>(A=>A.trackPageLoaded(we.Event.zeniAccountsTransferFormViewed))(C)}),e.jsx(Y,{onClose:()=>{(s==="achTransfer"&&h===!1||s==="achTransfer"&&h&&i.fetchState==="Completed")&&I()},anchor:"right",open:n,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ha,{onClick:C=>C.stopPropagation(),children:e.jsx(Za,{analytics:L,transferDetails:i,authParams:a,downloadAccountDetailEndPoint:r,onTransferClick:()=>{L.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),f(Hn(y))},onDismissClick:I,onSaveChangesToLocalStore:C=>{f(Zn(C))},onAnotherTransferClick:()=>{m(!1),f(je())},currentTenant:d,zeniAccountsConfigDetail:o,currentDrawerContent:s,setCurrentDrawerContent:l,showReviewContent:h,setShowReviewContent:m,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},Ha=F(K)`
38
38
  display: flex;
39
39
  min-height: 100%;
40
40
  flex-direction: column;
@@ -46,7 +46,7 @@ import{j as e}from"./liveblocks-DcDE-V-o.js";import{u as _,h as ne,g as W,i as N
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${n=>n.theme.colors.grey4};
49
- `,Wa=ae((function(n,a){return{zeniAccountListView:We(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,companyId:i,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=a,{tenantEmailDomain:y}=t;return{onZeniAccountClick:(s,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const f=Na(y,s),m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:m}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),r("setup")},onReloadTransactions:()=>{n(Ne(!1))},handleMoveMoneyOptionSelection:(s,l)=>{let f="page-not-found";s==="sendMoney"&&(f=cn(y)),s==="payBill"?f=on(t,p,h):s==="transfer"?(f=sn(y),l!=null&&n(Ye(l))):s==="checkDeposit"&&(f=rn(y));const m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:m}})},unlinkPaymentAccount:(s,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),n(Qn(s))},onFetchLinkTokenClick:(s,l)=>{n(Ge("external_account",s,l))},onUpdatePaymentAccountStatus:(s,l,f)=>{n(Yn(s,l,"zeni_accounts","external_account",f))},onEstablishConnectionClick:s=>{n(He(s,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:s=>{n(Xn(s))},onClickMenuIcon:()=>{d(!0)},onAutoTransferClick:s=>{const l="./auto-transfer";s?r(l,{state:{...o.state,scrollToAddRule:!0}}):r(l)}}}))(ma);function he({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const r=W(),t=ne(),o=_(),i=z(),{tenantEmailDomain:d}=N(),{useDynamicConfig:c,useFeatureGate:p}=Z(),h=U(),{configValue:y}=c(G.zeniAccountsConfig),{isFeatureEnabled:s}=p(V.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p(V.isAutoTransferRuleEnabled),f=fe(y),m=k(($=>R($))),P=m.companyId??b.getSignedInUserTenant(d)?.companyId,{configValue:D}=c(G.expressPayConfig),w=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(m.tenantId),[I,C]=g.useState(!1),[A,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),S=k(($=>We($))),B=S.fetchState,u=k(($=>Ue($))),M=u?.fetchState??"Not-Started",pe=!!m.companyZeniAccountInfo?.info?.isZeniAccountEnabled,oe=te(),H=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,q=ee(oe?.loggedInUserRoleMap),ln=ye(oe?.loggedInUserRoleMap),dn=!!m.companyBillPayInfo?.info?.isBillPayEnabled,De=b.getSignedInUser(),un={userId:De?.userId??"",sessionId:De?.zeniSessionId??"",tenantId:m.tenantId??""},pn=`${Ce}/account_details`,{areTenantIdsInSync:ke}=pa();g.useEffect((()=>{!I&&ke&&(C(!0),o(Ne(!1)))}),[I,o,B,ke]),g.useEffect((()=>{!A&&M==="Not-Started"&&P&&(E(!0),o(_e(!0)))}),[A,M,P,o]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const Ie=()=>{v(!1),t("..")},[mn,gn]=g.useState(!1),Se=$=>{gn($)},{isAiCfoAccessEnabled:hn,onAskAiCfoClick:fn}=nn({mobileExploreReferrer:"Checking Accounts"});Je({isDataReady:B==="Completed"});const yn=Xe(m),xn=xe(s,m);return yn===!0&&xn!==!0?e.jsx(en,{}):pe?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&T===!1&&j===!1?e.jsx(de,{analytics:L,onLoad:$=>(Cn=>{Cn.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Be(S.summary?.totalBalance.available.amount??0),Be(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield)})($)}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Ie,isTransferDrawerOpen:T,zeniAccountsConfig:S.zeniAccountsConfig,authParams:un,downloadAccountDetailEndPoint:pn}):null,j===!0?e.jsx(an,{closeDrawerHandler:Ie,isCheckDepositDrawerOpen:j}):null,e.jsxs(Ga,{windowSize:i,children:[e.jsx(ue,{isAppContentDrawerOpen:mn,handleDrawerToggle:Se}),e.jsx(Wa,{zeniBankListView:S,navigate:t,currentTenant:m,location:r,companyId:P,analytics:L,maxInsuredAmount:f.maxInsuredAmount,isExpressPayEnabled:w,isBillPayEnabled:dn,isDebitCardFeatureEnabled:s,isAutoTransferRuleEnabled:l,handleDrawerToggle:Se,isAiCfoAccessEnabled:hn,onAskAiCfoClick:fn})]})]}):H&&q?e.jsx(J,{to:"../setup"}):m.companyZeniAccountInfo?.info&&!H&&ln?e.jsx(J,{to:"../promo",state:r.state}):e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const on=(n,a,r)=>{const t=xe(r,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},Na=(n,a)=>`/${n}/checking/${a}`,sn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,rn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,cn=n=>`/${n}/checking/express-pay`,Xa=F.div`
49
+ `,Wa=ae((function(n,a){return{zeniAccountListView:We(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,companyId:i,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:f}=a,{tenantEmailDomain:y}=t;return{onZeniAccountClick:(s,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const h=Na(y,s),m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(h,{state:{pathnameStackToGoBack:m}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),r("setup")},onReloadTransactions:()=>{n(Ne(!1))},handleMoveMoneyOptionSelection:(s,l)=>{let h="page-not-found";s==="sendMoney"&&(h=cn(y)),s==="payBill"?h=on(t,p,f):s==="transfer"?(h=sn(y),l!=null&&n(Ye(l))):s==="checkDeposit"&&(h=rn(y));const m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(h,{state:{pathnameStackToGoBack:m}})},unlinkPaymentAccount:(s,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),n(Kn(s))},onFetchLinkTokenClick:(s,l)=>{n(Ge("external_account",s,l))},onUpdatePaymentAccountStatus:(s,l,h)=>{n(Yn(s,l,"zeni_accounts","external_account",h))},onEstablishConnectionClick:s=>{n(He(s,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:s=>{n(Xn(s))},onClickMenuIcon:()=>{d(!0)},onAutoTransferClick:s=>{const l="./auto-transfer";s?r(l,{state:{...o.state,scrollToAddRule:!0}}):r(l)}}}))(ma);function fe({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const r=W(),t=ne(),o=_(),i=z(),{tenantEmailDomain:d}=N(),{useDynamicConfig:c,useFeatureGate:p}=Z(),f=U(),{configValue:y}=c(G.zeniAccountsConfig),{isFeatureEnabled:s}=p(V.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p(V.isAutoTransferRuleEnabled),h=he(y),m=k(($=>R($))),P=m.companyId??b.getSignedInUserTenant(d)?.companyId,{configValue:D}=c(G.expressPayConfig),w=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(m.tenantId),[I,C]=g.useState(!1),[A,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),S=k(($=>We($))),B=S.fetchState,u=k(($=>Ue($))),M=u?.fetchState??"Not-Started",pe=!!m.companyZeniAccountInfo?.info?.isZeniAccountEnabled,oe=te(),H=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,q=ee(oe?.loggedInUserRoleMap),ln=ye(oe?.loggedInUserRoleMap),dn=!!m.companyBillPayInfo?.info?.isBillPayEnabled,De=b.getSignedInUser(),un={userId:De?.userId??"",sessionId:De?.zeniSessionId??"",tenantId:m.tenantId??""},pn=`${Ce}/account_details`,{areTenantIdsInSync:ke}=pa();g.useEffect((()=>{!I&&ke&&(C(!0),o(Ne(!1)))}),[I,o,B,ke]),g.useEffect((()=>{!A&&M==="Not-Started"&&P&&(E(!0),o(_e(!0)))}),[A,M,P,o]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const Ie=()=>{v(!1),t("..")},[mn,gn]=g.useState(!1),Se=$=>{gn($)},{isAiCfoAccessEnabled:fn,onAskAiCfoClick:hn}=nn({mobileExploreReferrer:"Checking Accounts"});Je({isDataReady:B==="Completed"});const yn=Xe(m),xn=xe(s,m);return yn===!0&&xn!==!0?e.jsx(en,{}):pe?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&T===!1&&j===!1?e.jsx(de,{analytics:L,onLoad:$=>(Cn=>{Cn.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Be(S.summary?.totalBalance.available.amount??0),Be(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield)})($)}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Ie,isTransferDrawerOpen:T,zeniAccountsConfig:S.zeniAccountsConfig,authParams:un,downloadAccountDetailEndPoint:pn}):null,j===!0?e.jsx(an,{closeDrawerHandler:Ie,isCheckDepositDrawerOpen:j}):null,e.jsxs(Ga,{windowSize:i,children:[e.jsx(ue,{isAppContentDrawerOpen:mn,handleDrawerToggle:Se}),e.jsx(Wa,{zeniBankListView:S,navigate:t,currentTenant:m,location:r,companyId:P,analytics:L,maxInsuredAmount:h.maxInsuredAmount,isExpressPayEnabled:w,isBillPayEnabled:dn,isDebitCardFeatureEnabled:s,isAutoTransferRuleEnabled:l,handleDrawerToggle:Se,isAiCfoAccessEnabled:fn,onAskAiCfoClick:hn})]})]}):H&&q?e.jsx(J,{to:"../setup"}):m.companyZeniAccountInfo?.info&&!H&&ln?e.jsx(J,{to:"../promo",state:r.state}):e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const on=(n,a,r)=>{const t=xe(r,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},Na=(n,a)=>`/${n}/checking/${a}`,sn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,rn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,cn=n=>`/${n}/checking/express-pay`,Xa=F.div`
50
50
  display: flex;
51
51
  width: 100%;
52
52
  flex: 1 1 auto;
@@ -54,4 +54,4 @@ import{j as e}from"./liveblocks-DcDE-V-o.js";import{u as _,h as ne,g as W,i as N
54
54
  align-items: center;
55
55
  min-height: 100vh;
56
56
  background-color: ${n=>n.theme.colors.grey4};
57
- `,Ya=ae((function(n,a){const{currentTenant:r}=a,t=Qe(n,a.accountId),o=b.getSignedInUser(),i=n.tenantState.currentTenantId,d={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:i??""},c=t.accountDetail?.id??"";return{currentTenantCompanyName:r.companyName??"",authParams:d,downloadEndPoint:`${Ae.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,accountId:i}=a,{tenantEmailDomain:d}=t;return{handleMoveMoneyOptionSelection:(c,p)=>{let h="page-not-found";c==="sendMoney"?h=cn(d):c==="payBill"?h=on(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):c==="transfer"?(h=sn(d,i),p!=null&&n(Ye(p))):c==="checkDeposit"?(h=rn(d,i),p!=null&&n(qn(p))):c==="accountStatement"&&(h=qa(d,i));const y=ie(o.state?.pathnameStackToGoBack,o.pathname);r(h,{state:{pathnameStackToGoBack:y}})},onAccountDetailClick:()=>{const c=Qa(d,i),p=ie(o.state?.pathnameStackToGoBack,o.pathname);r(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{n(Ee(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{n(qe(i,!1))},onCloseAccountClick:()=>{n(Ee(i,"closeAccount",""))},onBackClick:()=>{r("../",{relative:"path"})}}}))(ga);function re({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:r}){const t=W(),o=ne(),i=_(),d=z(),{tenantEmailDomain:c,accountId:p}=N(),{useDynamicConfig:h}=Z(),{useFeatureGate:y}=Z(),{isFeatureEnabled:s}=y(V.isDebitCardFeatureEnabled),l=k((q=>R(q))),{configValue:f}=h(G.expressPayConfig),m=f.is_enable_all_tenants===!0||f.tenant_ids!=null&&f.tenant_ids.includes(l.tenantId),P=!!l.companyBillPayInfo?.info?.isBillPayEnabled,D=b.getSignedInUser(),w=l.companyId??b.getSignedInUserTenant(c)?.companyId,I={userId:D?.userId??"",sessionId:D?.zeniSessionId??"",tenantId:l.tenantId??""},C=`${Ce}/account_details`,[A,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),[S,B]=g.useState(!1),u=k((q=>Qe(q,p??""))),M=u.fetchState,{isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe}=nn({mobileExploreReferrer:"Checking Account Detail"});Je({isDataReady:M==="Completed"}),g.useEffect((()=>{A||(i(qe(p??"",!1)),E(!0))}),[A,i,M]),g.useEffect((()=>{B(r!=null&&r===!0)}),[r]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const H=()=>{B(!1),o("..")};return e.jsxs(e.Fragment,{children:[S===!0&&u.accountDetail!=null?e.jsx($a,{authParams:I,downloadAccountDetailEndPoint:C,closeDrawerHandler:H,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:u.accountDetail}):null,T===!0?e.jsx(tn,{closeDrawerHandler:H,isTransferDrawerOpen:T,zeniAccountsConfig:u.zeniAccountsConfig,authParams:I,downloadAccountDetailEndPoint:C}):null,j===!0?e.jsx(an,{closeDrawerHandler:H,isCheckDepositDrawerOpen:j}):null,e.jsx(Xa,{windowSize:d,children:e.jsx(Ya,{navigate:o,currentTenant:l,location:t,companyId:w,isDebitCardFeatureEnabled:s,accountId:p??"",isBillPayEnabled:P,isExpressPayEnabled:m,isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe})})]})}const Qa=(n,a)=>`/${n}/checking/${a}/account-info`,qa=(n,a)=>`/${n}/checking/${a}/statements`,Ka=ae((function(n,a){const{companyId:r}=a;return{zeniAccountSetupView:Kn(n,r)}}),(function(n,a){const{navigate:r,companyId:t}=a;return{onSetupButtonClick:()=>{L.trackAccountsPromoPageClicked("Setup Accounts"),n(Jn(t))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{r("../setup",{relative:"path"})}}}))(ya),Ja=()=>{const n=ne(),a=W(),{tenantEmailDomain:r}=N(),{useDynamicConfig:t}=Z(),o=ha(),i=U(),[d,c]=g.useState(!1),[p,h]=g.useState(!1),y=k((A=>R(A))),{configValue:s}=t(G.zeniAccountsConfig),l=fe(s);g.useEffect((()=>{p===!1&&a.state?.message==="activation"&&h(!0)}),[a.state]);const f=b.getSignedInUserTenant(r)?.companyId??y.companyId,m=b.getSignedInUser(),P=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,D=A=>{c(A)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const w=te(),I=ee(w?.loggedInUserRoleMap),C=ye(w?.loggedInUserRoleMap);if(P&&I)return e.jsx(J,{to:"../../checking/setup"});if(y.company?.companyZeniAccountInfo&&(!P&&I||C)){if(a.state?.message==="activation"){const A=Ke(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:A.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(fa,{showConfetti:p}),e.jsx(de,{analytics:L,onLoad:A=>(E=>E.trackPageLoaded(we.Event.accountsPromoPageViewed))(A)}),e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),e.jsx(Ka,{analytics:L,navigate:n,companyId:f,meetingUrl:o("zeni_accounts_promo"),onClickMenuIcon:()=>{D(!0)},maxAnnualPercentageYield:l.maxAnnualPercentageYield,maxInsuredAmount:l.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})};function jt(){const n=W(),a=k((S=>R(S))),r=U(),{useFeatureGate:t,useDynamicConfig:o}=Z(),i=te(),d=ee(i?.loggedInUserRoleMap),c=ye(i?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:y}=t(V.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t(V.isDebitCardFeatureEnabled),l=Xe(a),f=xe(s,a),m=a?.userRole!=null&&ea(a?.userRole),P=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!m)&&na(i?.loggedInUserRoleMap),D=aa(i?.loggedInUserRoleMap),w=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!m)&&ta(i?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!m,{configValue:C}=o(G.expressPayConfig),A=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(a.tenantId),{isFeatureEnabled:E}=t(V.isAutoTransferRuleEnabled),T=xa(a,y,s)&&!m&&oa(i?.loggedInUserRoleMap),v=sa(i?.loggedInUserRoleMap),j=I&&ee(i?.loggedInUserRoleMap),O=j||ze(i?.loggedInUserRoleMap);return e.jsxs(Re,{children:[e.jsx(x,{path:"setup",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),e.jsx(x,{path:"verification",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),E?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"auto-transfer",element:e.jsx(Le,{})}),O?e.jsx(x,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Le,{isEditDrawerOpen:!0})}):null]}):e.jsx(x,{path:"auto-transfer",element:e.jsx(K,{})}),A&&d?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"express-pay",element:e.jsx(se,{})}),e.jsx(x,{path:"express-pay/add-ach",element:e.jsx(se,{isAddACHDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire/add-address",element:e.jsx(se,{isAddAddressDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire",element:e.jsx(se,{isAddWireDrawerOpen:!0})})]}):e.jsx(x,{path:"express-pay",element:e.jsx(K,{})}),e.jsx(x,{path:"promo",element:e.jsx(Ja,{})}),l&&!f?e.jsx(x,{path:"/*",element:e.jsx(en,{})}):p?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/",element:e.jsx(he,{})}),e.jsx(x,{path:"transfer",element:e.jsx(he,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(he,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"cash_management/*",element:e.jsx(K,{})}),e.jsx(x,{path:":accountId/*",element:e.jsx(et,{})}),e.jsx(x,{path:"*",element:e.jsx(K,{})})]}):h&&d?e.jsx(x,{path:"*",element:e.jsx(J,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&c?e.jsx(x,{path:"*",element:e.jsx(J,{to:"../promo",state:n.state})}):e.jsx(x,{path:"*",element:e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${Ca.sp1} ${r.colors.dropShadowNormal}`}})})]})}function et(){return e.jsxs(Re,{children:[e.jsx(x,{path:"/",element:e.jsx(re,{})}),e.jsx(x,{path:"account-info",element:e.jsx(re,{isAccountInfoDrawerOpen:!0})}),e.jsx(x,{path:"transfer",element:e.jsx(re,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(re,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"statements",element:e.jsx(Ia,{})}),e.jsx(x,{path:"*",element:e.jsx(K,{})})]})}export{jt as default};
57
+ `,Ya=ae((function(n,a){const{currentTenant:r}=a,t=Ke(n,a.accountId),o=b.getSignedInUser(),i=n.tenantState.currentTenantId,d={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:i??""},c=t.accountDetail?.id??"";return{currentTenantCompanyName:r.companyName??"",authParams:d,downloadEndPoint:`${Ae.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,accountId:i}=a,{tenantEmailDomain:d}=t;return{handleMoveMoneyOptionSelection:(c,p)=>{let f="page-not-found";c==="sendMoney"?f=cn(d):c==="payBill"?f=on(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):c==="transfer"?(f=sn(d,i),p!=null&&n(Ye(p))):c==="checkDeposit"?(f=rn(d,i),p!=null&&n(qn(p))):c==="accountStatement"&&(f=qa(d,i));const y=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:y}})},onAccountDetailClick:()=>{const c=Ka(d,i),p=ie(o.state?.pathnameStackToGoBack,o.pathname);r(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{n(Ee(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{n(qe(i,!1))},onCloseAccountClick:()=>{n(Ee(i,"closeAccount",""))},onBackClick:()=>{r("../",{relative:"path"})}}}))(ga);function re({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:r}){const t=W(),o=ne(),i=_(),d=z(),{tenantEmailDomain:c,accountId:p}=N(),{useDynamicConfig:f}=Z(),{useFeatureGate:y}=Z(),{isFeatureEnabled:s}=y(V.isDebitCardFeatureEnabled),l=k((q=>R(q))),{configValue:h}=f(G.expressPayConfig),m=h.is_enable_all_tenants===!0||h.tenant_ids!=null&&h.tenant_ids.includes(l.tenantId),P=!!l.companyBillPayInfo?.info?.isBillPayEnabled,D=b.getSignedInUser(),w=l.companyId??b.getSignedInUserTenant(c)?.companyId,I={userId:D?.userId??"",sessionId:D?.zeniSessionId??"",tenantId:l.tenantId??""},C=`${Ce}/account_details`,[A,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),[S,B]=g.useState(!1),u=k((q=>Ke(q,p??""))),M=u.fetchState,{isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe}=nn({mobileExploreReferrer:"Checking Account Detail"});Je({isDataReady:M==="Completed"}),g.useEffect((()=>{A||(i(qe(p??"",!1)),E(!0))}),[A,i,M]),g.useEffect((()=>{B(r!=null&&r===!0)}),[r]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const H=()=>{B(!1),o("..")};return e.jsxs(e.Fragment,{children:[S===!0&&u.accountDetail!=null?e.jsx($a,{authParams:I,downloadAccountDetailEndPoint:C,closeDrawerHandler:H,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:u.accountDetail}):null,T===!0?e.jsx(tn,{closeDrawerHandler:H,isTransferDrawerOpen:T,zeniAccountsConfig:u.zeniAccountsConfig,authParams:I,downloadAccountDetailEndPoint:C}):null,j===!0?e.jsx(an,{closeDrawerHandler:H,isCheckDepositDrawerOpen:j}):null,e.jsx(Xa,{windowSize:d,children:e.jsx(Ya,{navigate:o,currentTenant:l,location:t,companyId:w,isDebitCardFeatureEnabled:s,accountId:p??"",isBillPayEnabled:P,isExpressPayEnabled:m,isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe})})]})}const Ka=(n,a)=>`/${n}/checking/${a}/account-info`,qa=(n,a)=>`/${n}/checking/${a}/statements`,Qa=ae((function(n,a){const{companyId:r}=a;return{zeniAccountSetupView:Qn(n,r)}}),(function(n,a){const{navigate:r,companyId:t}=a;return{onSetupButtonClick:()=>{L.trackAccountsPromoPageClicked("Setup Accounts"),n(Jn(t))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{r("../setup",{relative:"path"})}}}))(ya),Ja=()=>{const n=ne(),a=W(),{tenantEmailDomain:r}=N(),{useDynamicConfig:t}=Z(),o=fa(),i=U(),[d,c]=g.useState(!1),[p,f]=g.useState(!1),y=k((A=>R(A))),{configValue:s}=t(G.zeniAccountsConfig),l=he(s);g.useEffect((()=>{p===!1&&a.state?.message==="activation"&&f(!0)}),[a.state]);const h=b.getSignedInUserTenant(r)?.companyId??y.companyId,m=b.getSignedInUser(),P=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,D=A=>{c(A)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const w=te(),I=ee(w?.loggedInUserRoleMap),C=ye(w?.loggedInUserRoleMap);if(P&&I)return e.jsx(J,{to:"../../checking/setup"});if(y.company?.companyZeniAccountInfo&&(!P&&I||C)){if(a.state?.message==="activation"){const A=Qe(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:A.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(ha,{showConfetti:p}),e.jsx(de,{analytics:L,onLoad:A=>(E=>E.trackPageLoaded(we.Event.accountsPromoPageViewed))(A)}),e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),e.jsx(Qa,{analytics:L,navigate:n,companyId:h,meetingUrl:o("zeni_accounts_promo"),onClickMenuIcon:()=>{D(!0)},maxAnnualPercentageYield:l.maxAnnualPercentageYield,maxInsuredAmount:l.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})};function jt(){const n=W(),a=k((S=>R(S))),r=U(),{useFeatureGate:t,useDynamicConfig:o}=Z(),i=te(),d=ee(i?.loggedInUserRoleMap),c=ye(i?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,f=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:y}=t(V.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t(V.isDebitCardFeatureEnabled),l=Xe(a),h=xe(s,a),m=a?.userRole!=null&&ea(a?.userRole),P=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!m)&&na(i?.loggedInUserRoleMap),D=aa(i?.loggedInUserRoleMap),w=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!m)&&ta(i?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!m,{configValue:C}=o(G.expressPayConfig),A=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(a.tenantId),{isFeatureEnabled:E}=t(V.isAutoTransferRuleEnabled),T=xa(a,y,s)&&!m&&oa(i?.loggedInUserRoleMap),v=sa(i?.loggedInUserRoleMap),j=I&&ee(i?.loggedInUserRoleMap),O=j||ze(i?.loggedInUserRoleMap);return e.jsxs(Re,{children:[e.jsx(x,{path:"setup",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),e.jsx(x,{path:"verification",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),E?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"auto-transfer",element:e.jsx(Le,{})}),O?e.jsx(x,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Le,{isEditDrawerOpen:!0})}):null]}):e.jsx(x,{path:"auto-transfer",element:e.jsx(Q,{})}),A&&d?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"express-pay",element:e.jsx(se,{})}),e.jsx(x,{path:"express-pay/add-ach",element:e.jsx(se,{isAddACHDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire/add-address",element:e.jsx(se,{isAddAddressDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire",element:e.jsx(se,{isAddWireDrawerOpen:!0})})]}):e.jsx(x,{path:"express-pay",element:e.jsx(Q,{})}),e.jsx(x,{path:"promo",element:e.jsx(Ja,{})}),l&&!h?e.jsx(x,{path:"/*",element:e.jsx(en,{})}):p?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/",element:e.jsx(fe,{})}),e.jsx(x,{path:"transfer",element:e.jsx(fe,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(fe,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"cash_management/*",element:e.jsx(Q,{})}),e.jsx(x,{path:":accountId/*",element:e.jsx(et,{})}),e.jsx(x,{path:"*",element:e.jsx(Q,{})})]}):f&&d?e.jsx(x,{path:"*",element:e.jsx(J,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&c?e.jsx(x,{path:"*",element:e.jsx(J,{to:"../promo",state:n.state})}):e.jsx(x,{path:"*",element:e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${Ca.sp1} ${r.colors.dropShadowNormal}`}})})]})}function et(){return e.jsxs(Re,{children:[e.jsx(x,{path:"/",element:e.jsx(re,{})}),e.jsx(x,{path:"account-info",element:e.jsx(re,{isAccountInfoDrawerOpen:!0})}),e.jsx(x,{path:"transfer",element:e.jsx(re,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(re,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"statements",element:e.jsx(Ia,{})}),e.jsx(x,{path:"*",element:e.jsx(Q,{})})]})}export{jt as default};
@@ -0,0 +1,9 @@
1
+ import{j as i}from"./liveblocks-CRyd9n8B.js";import{a as m}from"./sentry-BOmfv4Oi.js";import{h as x,u as T,g as $,i as j,j as p}from"./core-C6dxOS4P.js";import{TI as s,TH as v,a05 as B,fI as C,a06 as z}from"./zeni-epic-state-C5-RfNOq.js";import{$ as D,ac as g,z as E,a5 as L,d3 as P,a2 as N}from"./index-pj4u0b1G.js";import{u as U,n as _}from"./mui-0pGBD9L4.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]="7ee6dedc-8bd1-4b05-a7b5-4f3569cb5a46",e._sentryDebugIdIdentifier="sentry-dbid-7ee6dedc-8bd1-4b05-a7b5-4f3569cb5a46")}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 F(){const e=x(),n=T(),d=D(),l=$();let{accountId:a}=j(),u=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,u=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[f,b]=m.useState(!1),y=U();m.useEffect((()=>{f||(b(!0),n(v(a??"",!1)))}),[f,n]);const o=p((t=>B(t,a??""))),h=()=>{const t=N(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=E.getSignedInUser(),r=p((t=>C(t))),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=z(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:y.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(P,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:h,authParams:I,downloadEndPoint:u})})}export{F as Z};
@@ -1 +1 @@
1
- import"./sentry-DB4rU-NW.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]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};
1
+ import"./sentry-BOmfv4Oi.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]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};