@zeniai/web-app-ui 5.0.88-dev → 5.0.89-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 (118) hide show
  1. package/dist/assets/AddressRoutes-SY-dhjP_.js +1 -0
  2. package/dist/assets/{AddressScreen-BgaNg0Qn.js → AddressScreen-Ctnukryb.js} +2 -2
  3. package/dist/assets/{AiCfoScreen-BY8n3owP.js → AiCfoScreen-Dwnx3Zrg.js} +3 -3
  4. package/dist/assets/{BillPayApprovalRoutes-CG8clEYB.js → BillPayApprovalRoutes-DWpeCKQ1.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-CrklWR3z.js → BillPayRoutes-CEWNKd4a.js} +10 -10
  6. package/dist/assets/{BusinessVerificationPageScreen-C-td2Gz2.js → BusinessVerificationPageScreen-BFP865c-.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-BIImgtAf.js → ChargeCardRoutes-DmmGBEVb.js} +8 -8
  8. package/dist/assets/{CompanyPassportScreen-DLguBt5O.js → CompanyPassportScreen-CUrTGAPx.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-C5CI5_R0.js → ConnectionAuthScreen-BAkm3SD5.js} +1 -1
  10. package/dist/assets/CustomerOnboardingAuthScreen-BmBMaCZh.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-ChK-o54A.js → CustomerOnboardingRoutes-DQC5OT_-.js} +3 -3
  12. package/dist/assets/{DashboardRoutes-Dk9jZRz5.js → DashboardRoutes-DjR4FttM.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-EQCVNZvu.js → DefaultTenantHome-BXapS7K_.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-CNcs_kp-.js → DomesticWireDetailScreen-CluJV1hP.js} +3 -3
  15. package/dist/assets/DrawerScreen-DTfCd2en.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-CjmHAAQ4.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-Bf4kvKbd.js → ExpenseAutomationRoutes-CNlHRTO1.js} +3 -3
  18. package/dist/assets/FeaturePreviewScreen-BWUt3LEA.js +1 -0
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-_NVW7LI5.js → HubSpotOAuthCallbackScreen-CgvAaP1t.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-BS3qbL4y.js → MagicLinkRoutes-DTgPyHRi.js} +5 -5
  21. package/dist/assets/MagicLinkSignInScreen-BxKlzsH1.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-BhM60dvk.js → MobileAppDrawer-BLGo796K.js} +1 -1
  23. package/dist/assets/NotFoundScreen-B1k_jOem.js +1 -0
  24. package/dist/assets/{NotificationRoutes-Yi8XGMv3.js → NotificationRoutes-yUtgb6NE.js} +1 -1
  25. package/dist/assets/OAuthConsentScreen-DSPFHGna.js +1 -0
  26. package/dist/assets/{PandLWithForecastRoutes-vYtv-oJN.js → PandLWithForecastRoutes-C5G3jn5O.js} +1 -1
  27. package/dist/assets/PeopleRoutes-DG9PRPQo.js +22 -0
  28. package/dist/assets/PerformanceRoutes-CdqCJZzN.js +1 -0
  29. package/dist/assets/{Preview-D9U0nUr-.js → Preview-BT6vM7mS.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-geVwV75e.js → QBOConnectionScreen-jmt8kh8_.js} +1 -1
  31. package/dist/assets/{ReferralListScreen-ChBc672l.js → ReferralListScreen-BKwWhmDP.js} +2 -2
  32. package/dist/assets/{ReimbursementApprovalRoutes-BDyufiCG.js → ReimbursementApprovalRoutes-DXxXV9_W.js} +1 -1
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DJv_b_Bz.js → ReimbursementApprovalRuleDetailScreen-DtFME-kz.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-nqPDWuH1.js → ReimbursementRoutes-q-LM-3Mz.js} +7 -7
  35. package/dist/assets/{ReportsRoutes-C2J6zIA5.js → ReportsRoutes-DZjJw2so.js} +1 -1
  36. package/dist/assets/RewardsRoutes-D41cXIrP.js +1 -0
  37. package/dist/assets/{ScreenRoutes-BTS40_ia.js → ScreenRoutes-DrDg9CqO.js} +2 -2
  38. package/dist/assets/{SettingsRoutes-B9C3tvaJ.js → SettingsRoutes-D7DVrB_r.js} +1 -1
  39. package/dist/assets/{SetupPagesScreen-XYLqa_k3.js → SetupPagesScreen-1j44PFay.js} +5 -5
  40. package/dist/assets/SignInScreen-CNbjT65A.js +1 -0
  41. package/dist/assets/SignOutScreen-CkVX4P52.js +9 -0
  42. package/dist/assets/{TaskListScreen-B6Exeljf.js → TaskListScreen-BMzXb3Gv.js} +2 -2
  43. package/dist/assets/{TaskRoutes-1TlP3n5Y.js → TaskRoutes-D5ysh0Fw.js} +2 -2
  44. package/dist/assets/TransactionDetailRoutes-BLkvSFsR.js +1 -0
  45. package/dist/assets/TransactionDetailScreen-AbBGaDF8.js +5 -0
  46. package/dist/assets/{TransactionListRoutes-CZ04gxln.js → TransactionListRoutes-CWiHUsRg.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-dKXycm8O.js → TreasuryRoutes-CocKL-Oj.js} +6 -6
  48. package/dist/assets/{VendorsRoutes-C9c1xhtj.js → VendorsRoutes-a2NCvCPG.js} +1 -1
  49. package/dist/assets/WiseConfirmationScreen-DZiJs9hh.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-CGg7ZoIY.js → ZeniAccountRoutes-CEygLs18.js} +11 -11
  51. package/dist/assets/ZeniAccountStatementScreen-DLVOSwmC.js +9 -0
  52. package/dist/assets/{accountMappingHelper-9C6A5WnC.js → accountMappingHelper-BEJScFAE.js} +1 -1
  53. package/dist/assets/{analytics-B6udoEJT.js → analytics-CQQ1PG0J.js} +1 -1
  54. package/dist/assets/{analyticsHelper-sB0sZFDB.js → analyticsHelper-COFNU8CP.js} +1 -1
  55. package/dist/assets/{core-Bv8kdUko.js → core-DSsu1iyO.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-DeA-_wid.js → decodeURIComponentSafe-CRFR6Y3w.js} +1 -1
  57. package/dist/assets/{dnd-BIjMGuxw.js → dnd-Dok8dils.js} +1 -1
  58. package/dist/assets/{empty-B0o7u5U9.js → empty-CXjJmklp.js} +1 -1
  59. package/dist/assets/{empty-C0aR76s7.js → empty-UNMNFw7c.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-CqIIeTnM.js → emptyVideoElement-tnzUOnbb.js} +1 -1
  61. package/dist/assets/{epic-CrvsC-s7.js → epic-D1i_boOy.js} +1 -1
  62. package/dist/assets/getLocaleForTenant-OYWr98Zl.js +1 -0
  63. package/dist/assets/{index-CQwJaifa.js → index-487NRPOP.js} +1 -1
  64. package/dist/assets/{index-BrmBaZjz.js → index-C20sBDka.js} +1 -1
  65. package/dist/assets/{index-DMNy_OK4.js → index-CCRUu3yu.js} +1 -1
  66. package/dist/assets/{index-Cm44je86.js → index-CPG6ITBm.js} +12068 -12060
  67. package/dist/assets/{index-D40kV0u0.js → index-CZgOkU7x.js} +1 -1
  68. package/dist/assets/{index-BUMFvFkQ.js → index-D3BIveAC.js} +2 -2
  69. package/dist/assets/{index-DdfWbiyW.js → index-XYg74ieW.js} +1 -1
  70. package/dist/assets/{index-CR9MozHS.js → index-mSdseThw.js} +1 -1
  71. package/dist/assets/{lexical-DOh49tNP.js → lexical-DO7p5ZXM.js} +1 -1
  72. package/dist/assets/{liveblocks-CCyJOwfy.js → liveblocks-D0ylGz77.js} +1 -1
  73. package/dist/assets/{lottie-DL8N42Il.js → lottie-Cu765PFn.js} +1 -1
  74. package/dist/assets/{mui-DtV_yZlj.js → mui-D9TDAUAO.js} +1 -1
  75. package/dist/assets/{pathToGoBack-CiuHSsDX.js → pathToGoBack-Ce7z8Bpw.js} +1 -1
  76. package/dist/assets/{pdf-BcmiSEKK.js → pdf-BzjCkfw3.js} +4 -4
  77. package/dist/assets/{pdf-lib-BnpCaznF.js → pdf-lib-DbsQH8ti.js} +1 -1
  78. package/dist/assets/{plaid--kCGp3zU.js → plaid-mYHRXlz3.js} +1 -1
  79. package/dist/assets/{pusher-BZDRaBu6.js → pusher-CY3dj9Ss.js} +1 -1
  80. package/dist/assets/{react-NMjvDQu7.js → react-BojljME6.js} +1 -1
  81. package/dist/assets/{react-CWO8W_RV.js → react-CjbzpIkI.js} +1 -1
  82. package/dist/assets/{react-tOJ0kYjj.js → react-D0Ns4Dzp.js} +1 -1
  83. package/dist/assets/{react-qXC97Fzp.js → react-DMOHZggG.js} +1 -1
  84. package/dist/assets/{react-7pVctLTA.js → react-D_kzyj8R.js} +1 -1
  85. package/dist/assets/{react-C-ieYYjZ.js → react-Doh3QE1A.js} +1 -1
  86. package/dist/assets/{recharts-DdIjbBfI.js → recharts-C7IODwRw.js} +1 -1
  87. package/dist/assets/{routePaths-Dh2GrAVT.js → routePaths-1uJ5ric0.js} +1 -1
  88. package/dist/assets/{sentry-Wnm-N8eT.js → sentry-C5UCCkb_.js} +1 -1
  89. package/dist/assets/{url-BIDr3jsK.js → url-BVj9PytH.js} +1 -1
  90. package/dist/assets/{url-BmD3S9u5.js → url-Bow-X1Kk.js} +1 -1
  91. package/dist/assets/useAskAiCfoHostNavButtonProps-DaoVDdk6.js +1 -0
  92. package/dist/assets/{useDeviceId-Bi73VT1N.js → useDeviceId-CD8u4vjr.js} +1 -1
  93. package/dist/assets/{useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js → useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-Dc9OG28t.js → useInitialThreadRequest-C_MqgvcA.js} +1 -1
  95. package/dist/assets/{utils-CRtSAyQU.js → utils-Cd1icpH6.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-YgRxp760.js → withTransactionSidePanel-xau0uwsY.js} +1 -1
  97. package/dist/assets/{zeni-epic-state-CIBk9-EN.js → zeni-epic-state-CFQMpWBE.js} +3 -3
  98. package/dist/index.html +1 -1
  99. package/package.json +2 -2
  100. package/dist/assets/AddressRoutes-Idr8o5Q_.js +0 -1
  101. package/dist/assets/CustomerOnboardingAuthScreen-D5J-D_gR.js +0 -1
  102. package/dist/assets/DrawerScreen-4A-8jdZK.js +0 -1
  103. package/dist/assets/EntityDetailRoutes-FAkHCqKz.js +0 -1
  104. package/dist/assets/FeaturePreviewScreen-CPoYCyoW.js +0 -1
  105. package/dist/assets/MagicLinkSignInScreen-8i0SXp70.js +0 -12
  106. package/dist/assets/NotFoundScreen-DB_m9Zh0.js +0 -1
  107. package/dist/assets/OAuthConsentScreen-CKM2d6ge.js +0 -1
  108. package/dist/assets/PeopleRoutes-Cx1WB4UN.js +0 -22
  109. package/dist/assets/PerformanceRoutes-CWOgGPU1.js +0 -1
  110. package/dist/assets/RewardsRoutes-BMmhN6i_.js +0 -1
  111. package/dist/assets/SignInScreen-DMbX8HuT.js +0 -1
  112. package/dist/assets/SignOutScreen-DicPj8v2.js +0 -9
  113. package/dist/assets/TransactionDetailRoutes-DGZsOIBF.js +0 -1
  114. package/dist/assets/TransactionDetailScreen-C9lFmDnj.js +0 -5
  115. package/dist/assets/WiseConfirmationScreen-DgM02BC4.js +0 -12
  116. package/dist/assets/ZeniAccountStatementScreen-C1jeHlhb.js +0 -9
  117. package/dist/assets/getLocaleForTenant-3FpSnKiE.js +0 -1
  118. package/dist/assets/useAskAiCfoHostNavButtonProps-CFYiOVm6.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as t}from"./liveblocks-D0ylGz77.js";import i from"./NotFoundScreen-B1k_jOem.js";import{T as r}from"./TransactionDetailScreen-AbBGaDF8.js";import"./sentry-C5UCCkb_.js";import{n as a,o}from"./core-DSsu1iyO.js";import"./zeni-epic-state-CFQMpWBE.js";import"./recharts-C7IODwRw.js";import"./index-CPG6ITBm.js";import"./mui-D9TDAUAO.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import"./decodeURIComponentSafe-CRFR6Y3w.js";import"./routePaths-1uJ5ric0.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]="eb8d9915-3f2e-47a0-a713-5db167080b95",e._sentryDebugIdIdentifier="sentry-dbid-eb8d9915-3f2e-47a0-a713-5db167080b95")}catch{}})();function q(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
@@ -0,0 +1,5 @@
1
+ import{j as k}from"./liveblocks-D0ylGz77.js";import{a as d}from"./sentry-C5UCCkb_.js";import{h as G,g as S,u as re,j as le,l as de,N as Ge,k as je}from"./core-DSsu1iyO.js";import{bn as $e,eR as W,cQ as ue,bv as me,pR as Y,Kz as w,LA as pe,LB as Q,KZ as he,jO as fe,LC as ge,L2 as J,L3 as Z,kD as Se,Hz as X,Kt as x,jI as Te,jG as ye,jS as Me,LD as He,LE as qe,tR as N,jN as ve,GR as Ee,cV as Ke,cW as We,LF as Ye,Ks as Qe,LG as Je,tV as Ze,LH as Xe,LI as ea,LJ as aa,LK as ta,LL as na,jR as oa,LM as sa,LN as ia,Ku as ca,LO as ra,LP as la,LQ as da,GL as ua,Gz as ma,H1 as pa,jT as ha,HA as ie,GI as fa}from"./zeni-epic-state-CFQMpWBE.js";import{z as De,C as ee,A as L,aK as Ce,m as ga,K as Sa,aL as Ta,E as ya,q,c as va,aM as Ea,s as K,d as be,aN as Da,aq as Ca,Y as H}from"./index-CPG6ITBm.js";import{n as ba,S as Ia,D as ka}from"./mui-D9TDAUAO.js";import{u as La}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as Aa}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import{d as Ie}from"./decodeURIComponentSafe-CRFR6Y3w.js";import{h as ke,g as Ua,e as xa,c as _a}from"./routePaths-1uJ5ric0.js";import{t as Va}from"./utils-Cd1icpH6.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="ec882ca2-dc4b-4120-8d0e-9312e6335443",a._sentryDebugIdIdentifier="sentry-dbid-ec882ca2-dc4b-4120-8d0e-9312e6335443")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(L.isChainOfThoughtEnabled);return d.useMemo(()=>$e(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ja(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>W(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(L.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(L.isExpenseAutomationEnabled),{configValue:h}=n(Ce.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,A=ae(),y=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>w(u,y)),C=S(u=>{const z=w(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return z==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[z]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),v=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),U=S(u=>Q(u)),_=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[F,V]=d.useState(!1),[R,P]=d.useState(!1),[E,c]=d.useState(!1);d.useEffect(()=>{V(!1),P(!1),c(!1)},[a,e]);const M=d.useCallback(()=>{V(!1),P(!1)},[]),[D,I]=d.useState(!1),B=_?.selectedPeriod?.timePeriod;return d.useEffect(()=>{E||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),c(!0)),p!=null&&(!i||l&&g===!1)&&(F?R||v==null||(P(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:B??v}))):(s(J()),s(Z()),V(!0),s(Se(p))))},[s,E,m?.fetchState,m?.transaction,p,i,l,g,F,R,v,B]),d.useEffect(()=>{U.newVendorState?.vendorDetailLocalData?.vendorName!=null?I(!0):I(!1)},[U.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:A,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:C,tranEntity:p,defaultTrendTransactionTimePeriod:v,vendorViewDetails:U,uiState:_,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:M,isCreateVendorDrawerOpen:D,setIsCreateVendorDrawerOpen:I}}const Pa={overlayWidth:new ya(100,100,58)},Ba=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=ga(),i=Sa(),l=G(),g=S(h=>Q(h)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return k.jsx(ka,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:k.jsx(wa,{onClick:h=>h.stopPropagation(),children:k.jsx(Ta,{...b})})})},wa=ba(Ia)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,Fa=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=G(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,b=s??Ie(l??"");let h;ke(T,b)&&(h={id:T,type:Y(b)});const f=h!=null?S(y=>w(y,h)):void 0,A=()=>{const y=q(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((C=2)=>{let p="../";for(let v=0;v<C;v++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:h,onSaveVendor:()=>{o(ve(h,void 0))},onSaveSuccess:()=>{if(f!=null&&f?.transaction&&f?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&f?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},C={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(N(m,f?.transaction?.amount.amount,C,!1,!1,i))}A()},onCancel:()=>{h!=null&&o(He({transactionId:h})),o(ye()),o(qe()),a(!0),A()}}},Ra=je(function(a,e){const s=w(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=De.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ye(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Qe(a,"common"),T=W(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${H}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${H}/transaction_attachments_accounting_provider`:`${H}/transaction_attachments`,attachmentUploadEndpoint:`${Ca.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(x("common")),e.onBackClick!=null)return void e.onBackClick();const t=q(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ae(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(fa({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(J()),a(Z());const n=K(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(_a(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(X(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):ha({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(x("common"))},onUploadAttachmentAttachment:t=>{a(pa(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ma(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(ua({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(da(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(la(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(ra({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=q(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=Va(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Ua(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${xa(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ca({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(x("common"))},onCancelAutoComplete:()=>{a(x("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(N(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ia(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(sa(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(oa({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(N(o,i,l,!1,!1,s)),a(Te({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,T=K(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:T}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(na({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(N(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(ta({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(aa(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(ea(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(Xe({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Je(t,n,o))}}})(Da);function Za(){const a=le(),e=G(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=va(),i=S(r=>W(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),T=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:b}=t(L.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(L.isExpenseAutomationEnabled),{configValue:f}=n(Ce.enableUncategorizedExpenseCategory),A=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:C}=de(),[p,v]=d.useState(!1),U=Ie(m??""),_=ke(C,U),j=S(r=>r.transactionVendorViewState),$=ae(),{isFeatureEnabled:F}=t(L.isTransactionCommentingEnabled),{isFeatureEnabled:V}=t(L.isProjectsTransactionsEnabled),R=o?.currentTenant?.companyId,P=o?.currentTenant?.companyName;let E;_&&(E={id:C,type:Y(U)});const c=E!=null?S(r=>w(r,E)):void 0,M=c?.transactionDetailLocalData.vendorUpdates?.id!=null?j.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Le(c?.transaction):void 0,I=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),B=S(r=>Q(r)),u=S(r=>D!=null?he(r.trendWithTransactionsState,D,"TransactionDetail"):void 0),z=i.company?.companyInfo.firstMonthOfFY??1,Ue=S(r=>fe(r.accountState,r.accountListState,"accountList")),[xe,te]=d.useState(!1),[_e,ne]=d.useState(!1),[Ve,Pe]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Be=Ea();d.useEffect(()=>{if(E!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(E)),oe();else if(E!=null&&c!=null&&c.fetchState==="Error"){const r=K(s.state?.pathnameStackToGoBack,s.pathname),O={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Be&&(O.message="expenseAutomation",O.origin="transaction_categorization",O.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:O})}},[E]),d.useEffect(()=>{Ve||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Pe(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&T===!1)&&(xe?_e||I==null||(ne(!0),e(X(D,"TransactionDetail",{timeframe:"month",timePeriod:u?.selectedPeriod?.timePeriod??I}))):(e(J()),e(Z()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,I,l]),d.useEffect(()=>{B.newVendorState?.vendorDetailLocalData?.vendorName!=null?v(!0):v(!1)},[B.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(x("common"))},[]);const we=[m,C].filter(r=>r!=null),{transactionId:se,onSaveVendor:Fe,onSaveSuccess:Re,onCancel:ze}=Fa({closeDrawerHandler:r=>{v(!1),a(r?"../":"../..")}}),{isAiCfoAccessEnabled:Oe,onAskAiCfoClick:Ne}=La({mobileExploreReferrer:"Transaction Details"});return Aa({isDataReady:c?.fetchState==="Completed"}),_?k.jsxs(k.Fragment,{children:[se!=null&&p&&k.jsx(Ba,{isOpen:p,transactionId:se,onSaveVendor:Fe,onSaveSuccess:Re,onCancel:ze}),k.jsx(Ra,{hideDeleteAttachment:!0,firstMonthOfFY:z,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:E,entity:D,isCOTEnabled:$,defaultTrendTransactionTimePeriod:I,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:Ue,vendorSaveStatus:M,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:A,isAiCfoAccessEnabled:Oe,onAskAiCfoClick:Ne,isTransactionCommentingEnabled:F,isProjectsTransactionsEnabled:V,companyId:R,companyName:P})]}):k.jsx(Ge,{to:Ae(we.length)})}const Ae=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=za(a),t=Oa(a);be.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},za=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Oa=a=>Ke(a)===!0?a.customer?.name??"":We(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{Ba as C,Za as T,Fa as a,Ra as b,ae as c,Ja as u};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CCyJOwfy.js";import{j as q,u as V,h as J,l as H,g as C,N as F,k as U,n as he,o as x}from"./core-Bv8kdUko.js";import{eR as N,j0 as D,OY as Z,Hq as me,bq as se,OZ as ke,jD as K,K$ as W,O_ as ie,O$ as Ye,bE as Y,Hm as pe,P0 as ve,P1 as re,P2 as Pe,Hn as fe,P3 as be,P4 as de,P5 as Ee,P6 as De,P7 as xe,P8 as je,P9 as le,ID as Me,bn as Ce}from"./zeni-epic-state-CIBk9-EN.js";import{D as ce,c as L,c6 as Q,v as w,p as X,C as Te,A as ne,W as Le,z as Oe}from"./index-Cm44je86.js";import"./mui-DtV_yZlj.js";import{a as I}from"./sentry-Wnm-N8eT.js";import{w as ee}from"./withTransactionSidePanel-YgRxp760.js";import{p as te,c as ae}from"./routePaths-Dh2GrAVT.js";import{u as Be}from"./utils-CRtSAyQU.js";import{d as P}from"./decodeURIComponentSafe-DeA-_wid.js";import{Z as ze}from"./ZeniAccountStatementScreen-C1jeHlhb.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js";import"./TransactionDetailScreen-C9lFmDnj.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="52f196a1-ca68-4141-9897-b4e71336903c",a._sentryDebugIdIdentifier="sentry-dbid-52f196a1-ca68-4141-9897-b4e71336903c")}catch{}})();const Fe=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],_=a=>Be(a),Ge=U(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,_(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=ce.getLocalizedStrings(),d=_(e.selectedAccount.tranListType),l=_e(t,n,c,d,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ie({uiState:{dateRange:l},type:_(e.selectedAccount.tranListType)})),a(me(d,D(l),!1,d==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(D(l))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ie({uiState:{scrollYOffset:t},type:_(e.selectedAccount.tranListType)}))}}})(Q),$=ee(function({...a}){const e=q(),t=V(),n=J(),c=t.pathname.split("/").find(m=>Fe.includes(m)),o=c??"uncategorized-expense",{tenantEmailDomain:d}=H(),l=ce.getLocalizedStrings(),{accountType:f,title:A,subTitle:g}=Re(o),S="month",h=C(m=>N(m)),T=h.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:k}=$e(o,T,h.bookCloseDate),[b,O]=I.useState(!1),[v,B]=I.useState(void 0),u=I.useMemo(()=>{const m=D(k);return{tranListType:o,accountType:Z(f),title:A,subTitle:g,timeframe:S,period:m}},[o,S,f,y]);I.useEffect(()=>{if(!b&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const m=_(u.tranListType);n(me(m,u.period,!0,m==="missingReceipts"?l.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[b,u,n]);let j=u;return u!=null&&v!=null&&(j={...u,period:v}),c==null||j==null?s.jsx(F,{to:"../"}):s.jsx(Ge,{firstMonthOfFY:T,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:j,referrerType:o,bookCloseDate:h.bookCloseDate,onSelectedTimePeriodChange:m=>B(m),...a})}),Re=a=>{let e="",t="";const n=ce.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=se();let c=se().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:te(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},_e=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},we=U(function(a,e){const t=ve(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ye();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(Q),Ve=ee(function({referrerType:a,...e}){const t=q(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,classIdEncoded:f,timeframe:A,startDate:g,endDate:S,titleEncoded:h}=H(),T=P(d??""),y=P(l??""),k=P(f??""),b=P(h??""),O=C(r=>Ye(r.transactionListState,y,T,k)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(r=>N(r)),G=m.company?.companyInfo.firstMonthOfFY??1;let i;const p=Ne(T,y,k,A,g,S,b);if(p){const r={startDate:Y(g,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},R=qe(O?.dateRange,r);i={accountId:y,accountType:Z(T),classId:k,title:b,timeframe:A,period:R}}I.useEffect(()=>{v||i==null||(B(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(pe(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let E=i;i!=null&&u!=null&&(E={...i,period:u});const z=[d,l,f,A,g,S,h].filter(r=>r!=null);return p&&E!=null?s.jsx(we,{firstMonthOfFY:G,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:E,referrerType:a,onSelectedTimePeriodChange:r=>j(r),...e}):s.jsx(F,{to:ye(z.length)})}),ye=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ne=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&d!=null,qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Je=U(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ae();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(fe(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(Q),He=ee(function({referrerType:a,...e}){const t=q(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,projectIdEncoded:f,timeframe:A,startDate:g,endDate:S,titleEncoded:h}=H(),T=P(d??""),y=P(l??""),k=P(f??""),b=P(h??""),O=C(r=>Pe(r.transactionListState,y,T,k)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(r=>N(r)),G=m.company?.companyInfo.firstMonthOfFY??1;let i;const p=Ue(T,y,k,A,g,S,b);if(p){const r={startDate:Y(g,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},R=Ze(O?.dateRange,r);i={accountId:y,accountType:Z(T),projectId:k,title:b,timeframe:A,period:R}}I.useEffect(()=>{v||i==null||(B(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(fe(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let E=i;i!=null&&u!=null&&(E={...i,period:u});const z=[d,l,f,A,g,S,h].filter(r=>r!=null);return p&&E!=null?s.jsx(Je,{firstMonthOfFY:G,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:E,referrerType:a,onSelectedTimePeriodChange:r=>j(r),...e}):s.jsx(F,{to:Ae(z.length)})}),Ae=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ue=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&d!=null,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Ke=U(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&je(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ge();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(le({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(De(e.selectedAccount.accountId,e.selectedAccount.accountType,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(le({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Xe(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(Q),ue=ee(function({referrerType:a,...e}){const t=q(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,timeframe:f,startDate:A,endDate:g,titleEncoded:S,excludeSubAccounts:h}=H(),T=P(d??""),y=P(l??""),k=P(S??""),b=!(h!=null&&h==="exclude_subaccounts"),O=C(M=>Ee(M.transactionListState,y,T)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(M=>N(M)),G=m.company?.featuresActivationInfo.connectedAccountProvider==="unit",i=m.company?.companyInfo.firstMonthOfFY??1;let p;const E=We(T,y,f,A,g,k);if(E){const M={startDate:Y(A,"YYYY-MM-DD"),endDate:Y(g,"YYYY-MM-DD")},Ie=Qe(O?.dateRange,M);p={accountId:y,accountType:Z(T),title:k,timeframe:f,period:Ie}}let z=p;p!=null&&u!=null&&(z={...p,period:u});const{useFeatureGate:r}=Te(),{isFeatureEnabled:R}=r(ne.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Le();I.useEffect(()=>{!v&&p!=null&&oe&&(B(!0),L.trackTransactionList(p.accountId,void 0,a,p.title),c(De(p.accountId,p.accountType,p.period,void 0,!1,b)))},[v,p,c,oe]);const Se=[d,l,f,A,g,S].filter(M=>M!=null);return E&&z!=null?s.jsx(Ke,{firstMonthOfFY:i,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:G,isTransactionCommentingEnabled:R,selectedAccount:z,referrerType:a,onSelectedTimePeriodChange:M=>j(M),...e}):s.jsx(F,{to:ge(Se.length)})}),ge=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},We=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,Qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Xe=a=>`/${a}/transactions/${Me}/statements`;function ht(){const a=V().state?.referrer,e=Oe.getSignedInUser(),t=Ce(e),{useFeatureGate:n}=Te(),{isFeatureEnabled:c}=n(ne.isExpenseAutomationEnabled),o=C(f=>f.expenseAutomationViewState.selectedPeriodByTenantId)[C(f=>N(f)).tenantId],{isFeatureEnabled:d}=n(ne.isExpenseAutomationEnabledV2),l=d||c&&t;return s.jsxs(he,{children:[s.jsx(x,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(ue,{referrerType:a})}),s.jsx(x,{path:"/zeni-clearing-account/statements",element:s.jsx(ze,{})}),s.jsx(x,{path:"/*",element:s.jsx(ue,{referrerType:a})}),s.jsx(x,{path:"/uncategorized-income/*",element:s.jsx($,{})}),s.jsx(x,{path:"/uncategorized-expense/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/miscategorized-income/*",element:s.jsx($,{})}),s.jsx(x,{path:"/miscategorized-expense/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/missing-receipts/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ve,{referrerType:a})}),s.jsx(x,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})})]})}export{ht as default};
1
+ import{j as s}from"./liveblocks-D0ylGz77.js";import{j as N,u as V,h as J,l as H,g as C,N as F,k as U,n as he,o as x}from"./core-DSsu1iyO.js";import{eR as q,j0 as D,OY as Z,Hq as me,bq as se,OZ as ke,jD as K,K$ as Q,O_ as ie,O$ as Ye,bE as Y,Hm as pe,P0 as ve,P1 as re,P2 as Pe,Hn as fe,P3 as be,P4 as de,P5 as Ee,P6 as De,P7 as xe,P8 as je,P9 as le,ID as Me,bn as Ce}from"./zeni-epic-state-CFQMpWBE.js";import{D as ce,d as L,c6 as W,s as w,q as X,C as Te,A as ne,V as Le,z as Oe}from"./index-CPG6ITBm.js";import"./mui-D9TDAUAO.js";import{a as I}from"./sentry-C5UCCkb_.js";import{w as ee}from"./withTransactionSidePanel-xau0uwsY.js";import{p as te,c as ae}from"./routePaths-1uJ5ric0.js";import{u as Be}from"./utils-Cd1icpH6.js";import{d as P}from"./decodeURIComponentSafe-CRFR6Y3w.js";import{Z as ze}from"./ZeniAccountStatementScreen-DLVOSwmC.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import"./TransactionDetailScreen-AbBGaDF8.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="73fcc389-3d15-4768-a431-f308468872e4",a._sentryDebugIdIdentifier="sentry-dbid-73fcc389-3d15-4768-a431-f308468872e4")}catch{}})();const Fe=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],_=a=>Be(a),Ge=U(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,_(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:Q(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=ce.getLocalizedStrings(),d=_(e.selectedAccount.tranListType),l=_e(t,n,c,d,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ie({uiState:{dateRange:l},type:_(e.selectedAccount.tranListType)})),a(me(d,D(l),!1,d==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(D(l))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ie({uiState:{scrollYOffset:t},type:_(e.selectedAccount.tranListType)}))}}})(W),$=ee(function({...a}){const e=N(),t=V(),n=J(),c=t.pathname.split("/").find(m=>Fe.includes(m)),o=c??"uncategorized-expense",{tenantEmailDomain:d}=H(),l=ce.getLocalizedStrings(),{accountType:f,title:A,subTitle:g}=Re(o),S="month",h=C(m=>q(m)),T=h.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:k}=$e(o,T,h.bookCloseDate),[b,O]=I.useState(!1),[v,B]=I.useState(void 0),u=I.useMemo(()=>{const m=D(k);return{tranListType:o,accountType:Z(f),title:A,subTitle:g,timeframe:S,period:m}},[o,S,f,y]);I.useEffect(()=>{if(!b&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const m=_(u.tranListType);n(me(m,u.period,!0,m==="missingReceipts"?l.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[b,u,n]);let j=u;return u!=null&&v!=null&&(j={...u,period:v}),c==null||j==null?s.jsx(F,{to:"../"}):s.jsx(Ge,{firstMonthOfFY:T,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:j,referrerType:o,bookCloseDate:h.bookCloseDate,onSelectedTimePeriodChange:m=>B(m),...a})}),Re=a=>{let e="",t="";const n=ce.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=se();let c=se().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:te(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},_e=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},we=U(function(a,e){const t=ve(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:Q(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ye();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(W),Ve=ee(function({referrerType:a,...e}){const t=N(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,classIdEncoded:f,timeframe:A,startDate:g,endDate:S,titleEncoded:h}=H(),T=P(d??""),y=P(l??""),k=P(f??""),b=P(h??""),O=C(r=>Ye(r.transactionListState,y,T,k)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(r=>q(r)),G=m.company?.companyInfo.firstMonthOfFY??1;let i;const p=qe(T,y,k,A,g,S,b);if(p){const r={startDate:Y(g,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},R=Ne(O?.dateRange,r);i={accountId:y,accountType:Z(T),classId:k,title:b,timeframe:A,period:R}}I.useEffect(()=>{v||i==null||(B(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(pe(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let E=i;i!=null&&u!=null&&(E={...i,period:u});const z=[d,l,f,A,g,S,h].filter(r=>r!=null);return p&&E!=null?s.jsx(we,{firstMonthOfFY:G,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:E,referrerType:a,onSelectedTimePeriodChange:r=>j(r),...e}):s.jsx(F,{to:ye(z.length)})}),ye=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},qe=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&d!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Je=U(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:Q(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ae();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(fe(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(W),He=ee(function({referrerType:a,...e}){const t=N(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,projectIdEncoded:f,timeframe:A,startDate:g,endDate:S,titleEncoded:h}=H(),T=P(d??""),y=P(l??""),k=P(f??""),b=P(h??""),O=C(r=>Pe(r.transactionListState,y,T,k)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(r=>q(r)),G=m.company?.companyInfo.firstMonthOfFY??1;let i;const p=Ue(T,y,k,A,g,S,b);if(p){const r={startDate:Y(g,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},R=Ze(O?.dateRange,r);i={accountId:y,accountType:Z(T),projectId:k,title:b,timeframe:A,period:R}}I.useEffect(()=>{v||i==null||(B(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(fe(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let E=i;i!=null&&u!=null&&(E={...i,period:u});const z=[d,l,f,A,g,S,h].filter(r=>r!=null);return p&&E!=null?s.jsx(Je,{firstMonthOfFY:G,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:E,referrerType:a,onSelectedTimePeriodChange:r=>j(r),...e}):s.jsx(F,{to:Ae(z.length)})}),Ae=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ue=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&d!=null,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Ke=U(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&je(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:Q(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ge();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(le({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(De(e.selectedAccount.accountId,e.selectedAccount.accountType,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(le({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Xe(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(W),ue=ee(function({referrerType:a,...e}){const t=N(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,timeframe:f,startDate:A,endDate:g,titleEncoded:S,excludeSubAccounts:h}=H(),T=P(d??""),y=P(l??""),k=P(S??""),b=!(h!=null&&h==="exclude_subaccounts"),O=C(M=>Ee(M.transactionListState,y,T)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(M=>q(M)),G=m.company?.featuresActivationInfo.connectedAccountProvider==="unit",i=m.company?.companyInfo.firstMonthOfFY??1;let p;const E=Qe(T,y,f,A,g,k);if(E){const M={startDate:Y(A,"YYYY-MM-DD"),endDate:Y(g,"YYYY-MM-DD")},Ie=We(O?.dateRange,M);p={accountId:y,accountType:Z(T),title:k,timeframe:f,period:Ie}}let z=p;p!=null&&u!=null&&(z={...p,period:u});const{useFeatureGate:r}=Te(),{isFeatureEnabled:R}=r(ne.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Le();I.useEffect(()=>{!v&&p!=null&&oe&&(B(!0),L.trackTransactionList(p.accountId,void 0,a,p.title),c(De(p.accountId,p.accountType,p.period,void 0,!1,b)))},[v,p,c,oe]);const Se=[d,l,f,A,g,S].filter(M=>M!=null);return E&&z!=null?s.jsx(Ke,{firstMonthOfFY:i,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:G,isTransactionCommentingEnabled:R,selectedAccount:z,referrerType:a,onSelectedTimePeriodChange:M=>j(M),...e}):s.jsx(F,{to:ge(Se.length)})}),ge=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Xe=a=>`/${a}/transactions/${Me}/statements`;function ht(){const a=V().state?.referrer,e=Oe.getSignedInUser(),t=Ce(e),{useFeatureGate:n}=Te(),{isFeatureEnabled:c}=n(ne.isExpenseAutomationEnabled),o=C(f=>f.expenseAutomationViewState.selectedPeriodByTenantId)[C(f=>q(f)).tenantId],{isFeatureEnabled:d}=n(ne.isExpenseAutomationEnabledV2),l=d||c&&t;return s.jsxs(he,{children:[s.jsx(x,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(ue,{referrerType:a})}),s.jsx(x,{path:"/zeni-clearing-account/statements",element:s.jsx(ze,{})}),s.jsx(x,{path:"/*",element:s.jsx(ue,{referrerType:a})}),s.jsx(x,{path:"/uncategorized-income/*",element:s.jsx($,{})}),s.jsx(x,{path:"/uncategorized-expense/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/miscategorized-income/*",element:s.jsx($,{})}),s.jsx(x,{path:"/miscategorized-expense/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/missing-receipts/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ve,{referrerType:a})}),s.jsx(x,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})})]})}export{ht as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-CCyJOwfy.js";import{j as U,u as B,h as P,l as O,g as f,N as L,k as V,n as Te,o as k}from"./core-Bv8kdUko.js";import{cm as M,eR as D,NJ as R,DP as ae,ff as H,Dx as ne,NL as Ie,DS as we,NH as Ce,NI as se,N_ as ke,BZ as je,sK as be,NN as Ae,E1 as Ee,NK as re,cP as q,wU as oe,eV as ve,eX as De,OV as Fe,OW as Le,Dy as Ue,OX as Be,Dz as Pe,DI as Re,bv as Ne,bF as Oe,cx as Ve,bG as Me,cl as _e,fe as ze,bs as $e,Jn as Ge,ck as We}from"./zeni-epic-state-CIBk9-EN.js";import{T as _,an as He,z as A,S as z,c as j,b$ as qe,c0 as Ke,c1 as W,K,m as Ze,W as Je,C as ie,A as v,F as Xe,B as Qe,c2 as Ye,aq as Z,v as et,c3 as tt,p as J,c4 as at,j as Q,c5 as nt,a6 as st}from"./index-Cm44je86.js";import{D as rt,n as N,S as ot}from"./mui-DtV_yZlj.js";import it from"./NotFoundScreen-DB_m9Zh0.js";import{S as Y}from"./SetupPagesScreen-XYLqa_k3.js";import{a as d}from"./sentry-Wnm-N8eT.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import{c as lt}from"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js";import{u as ut}from"./useInitialThreadRequest-Dc9OG28t.js";import{M as ce}from"./MobileAppDrawer-BhM60dvk.js";import{F as dt}from"./FeaturePreviewScreen-CPoYCyoW.js";import{a as ee}from"./analyticsHelper-sB0sZFDB.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./routePaths-Dh2GrAVT.js";import"./BusinessVerificationPageScreen-C-td2Gz2.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]="adc54dd5-42f8-4ce4-8545-9e7b10ff0828",t._sentryDebugIdIdentifier="sentry-dbid-adc54dd5-42f8-4ce4-8545-9e7b10ff0828")}catch{}})();const pt=V(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}})(qe);function mt(){const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=O(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=M(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,w]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(C=>R(C,y)),I=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||I!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,I,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(w(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||I!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{W(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{W(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ke),yt=({isFirstTransfer:t})=>{const a=U(),{tenantEmailDomain:n}=O(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,w]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),I=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(w(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:I,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{W(j,"review",S.treasuryTransferMoneyLocalData,I.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=N.div`
1
+ import{j as e}from"./liveblocks-D0ylGz77.js";import{j as U,u as B,h as P,l as N,g as f,N as L,k as O,n as Te,o as k}from"./core-DSsu1iyO.js";import{cm as M,eR as D,NJ as R,DP as ae,ff as H,Dx as ne,NL as Ie,DS as we,NH as Ce,NI as se,N_ as ke,BZ as je,sK as be,NN as Ae,E1 as Ee,NK as re,cP as K,wU as oe,eV as ve,eX as De,OV as Fe,OW as Le,Dy as Ue,OX as Be,Dz as Pe,DI as Re,bv as Ve,bF as Ne,cx as Oe,bG as Me,cl as _e,fe as ze,bs as $e,Jn as Ge,ck as qe}from"./zeni-epic-state-CFQMpWBE.js";import{c as _,an as He,z as A,x as z,d as j,b$ as Ke,c0 as We,c1 as q,K as W,m as Ze,V as Je,C as ie,A as v,E as Xe,B as Qe,c2 as Ye,aq as Z,s as et,c3 as tt,q as J,c4 as at,T as Q,c5 as nt,a6 as st}from"./index-CPG6ITBm.js";import{D as rt,n as V,S as ot}from"./mui-D9TDAUAO.js";import it from"./NotFoundScreen-B1k_jOem.js";import{S as Y}from"./SetupPagesScreen-1j44PFay.js";import{a as d}from"./sentry-C5UCCkb_.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as lt}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import{u as ut}from"./useInitialThreadRequest-C_MqgvcA.js";import{M as ce}from"./MobileAppDrawer-BLGo796K.js";import{F as dt}from"./FeaturePreviewScreen-BWUt3LEA.js";import{a as ee}from"./analyticsHelper-COFNU8CP.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./routePaths-1uJ5ric0.js";import"./BusinessVerificationPageScreen-BFP865c-.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]="1233d453-bbdf-48ae-83d0-7e656f858893",t._sentryDebugIdIdentifier="sentry-dbid-1233d453-bbdf-48ae-83d0-7e656f858893")}catch{}})();const pt=O(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}})(Ke);function mt(){const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=N(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=M(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,w]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(C=>R(C,y)),I=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||I!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,I,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(w(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||I!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=O(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(We),yt=({isFirstTransfer:t})=>{const a=U(),{tenantEmailDomain:n}=N(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,w]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),I=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(w(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:I,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,I.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=V.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,11 +6,11 @@ import{j as e}from"./liveblocks-CCyJOwfy.js";import{j as U,u as B,h as P,l as O,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${t=>t.theme.colors.grey4};
9
- `,ht={overlayWidth:new Xe(100,100,48)},St=V(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:l=>{let i="page-not-found";l==="editPortfolio"?i=xt(s):l==="statements"?i=Tt(s):l==="taxLetter"?i=It(s):l==="settings"&&(i=wt(s));const g=et(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:g}})},onColumnSortConfigChanged:(l,i)=>{t(Fe({uiState:{sortKey:l,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(Ye);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=B(),o=U(),p=P(),r=K(),m=Ze(),s=f(b=>D(b)),{tenantEmailDomain:l}=O(),i=s.companyId??A.getSignedInUserTenant(l)?.companyId,[g,w]=d.useState(!1),u=f(b=>re(b)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),I=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=M(S?.loggedInUserRoleMap),F=q(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Je();d.useEffect(()=>{c==="Not-Started"&&!g&&E&&(w(!0),p(oe(!0)))},[g,p,c,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const C=()=>{o("..")},[le,ue]=d.useState(!1),X=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=ct({mobileExploreReferrer:"Treasury"});lt({isDataReady:c==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:me}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=$(v.isTreasuryCommentingEnabled),ge=ut(i,{clearParams:c==="Completed"&&y?.fetchState==="Completed"}),he=ve(s),Se=De(me,s);if(he===!0&&Se!==!0)return e.jsx(dt,{});if(T){const b=y?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(rt,{onClose:C,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:u.transactions.length===0||h===0}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:X}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:X,initialOpenThreadRequest:ge,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return I&&x?e.jsx(L,{to:"../setup"}):s.companyTreasuryInfo?.info&&!I&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(Qe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,It=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,Ct=N(ot)`
9
+ `,ht={overlayWidth:new Xe(100,100,48)},St=O(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:l=>{let i="page-not-found";l==="editPortfolio"?i=xt(s):l==="statements"?i=Tt(s):l==="taxLetter"?i=It(s):l==="settings"&&(i=wt(s));const g=et(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:g}})},onColumnSortConfigChanged:(l,i)=>{t(Fe({uiState:{sortKey:l,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(Ye);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=B(),o=U(),p=P(),r=W(),m=Ze(),s=f(b=>D(b)),{tenantEmailDomain:l}=N(),i=s.companyId??A.getSignedInUserTenant(l)?.companyId,[g,w]=d.useState(!1),u=f(b=>re(b)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),I=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=M(S?.loggedInUserRoleMap),F=K(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Je();d.useEffect(()=>{c==="Not-Started"&&!g&&E&&(w(!0),p(oe(!0)))},[g,p,c,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const C=()=>{o("..")},[le,ue]=d.useState(!1),X=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=ct({mobileExploreReferrer:"Treasury"});lt({isDataReady:c==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:me}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=$(v.isTreasuryCommentingEnabled),ge=ut(i,{clearParams:c==="Completed"&&y?.fetchState==="Completed"}),he=ve(s),Se=De(me,s);if(he===!0&&Se!==!0)return e.jsx(dt,{});if(T){const b=y?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(rt,{onClose:C,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:u.transactions.length===0||h===0}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:X}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:X,initialOpenThreadRequest:ge,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return I&&x?e.jsx(L,{to:"../setup"}):s.companyTreasuryInfo?.info&&!I&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(Qe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,It=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,Ct=V(ot)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
13
- `,kt=N.div`
13
+ `,kt=V.div`
14
14
  display: flex;
15
15
  height: 100vh;
16
16
  width: 100%;
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-CCyJOwfy.js";import{j as U,u as B,h as P,l as O,
18
18
  flex-direction: column;
19
19
  align-items: center;
20
20
  background-color: ${t=>t.theme.colors.grey4};
21
- `;function jt(){const t=U(),a=P(),n=K(),o=B(),p=`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Le(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))},[r,s.fetchState,a]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(tt,{currentTenantCompanyName:w,statementListView:s,isLoading:u,onBackClick:()=>{const c=J(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const bt=N.div`
21
+ `;function jt(){const t=U(),a=P(),n=W(),o=B(),p=`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Le(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))},[r,s.fetchState,a]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(tt,{currentTenantCompanyName:w,statementListView:s,isLoading:u,onBackClick:()=>{const c=J(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const bt=V.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-CCyJOwfy.js";import{j as U,u as B,h as P,l as O,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${t=>t.theme.colors.grey4};
29
- `;function At(){const t=U(),a=K(),n=B(),o=P(),p=`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Be(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:a,children:e.jsx(at,{currentTenantCompanyName:w,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=J(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const Et=V(function(t,a){const{companyId:n}=a,o=R(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(nt),vt=()=>{const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,l]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||g==null||(l(!0),n(H()))},[i,n]);const g=A.getSignedInUserTenant(o)?.companyId??m.companyId,w=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(w==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),y=M(h?.loggedInUserRoleMap),T=q(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(L,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||T)){if(a.state?.message==="activation"){const S=J(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(Q,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:S=>(I=>I.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(Et,{analytics:j,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(Q,{size:"ExtraLarge",start:!0})})},te=N.div`
29
+ `;function At(){const t=U(),a=W(),n=B(),o=P(),p=`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Be(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:a,children:e.jsx(at,{currentTenantCompanyName:w,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=J(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const Et=O(function(t,a){const{companyId:n}=a,o=R(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(nt),vt=()=>{const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=N(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,l]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||g==null||(l(!0),n(H()))},[i,n]);const g=A.getSignedInUserTenant(o)?.companyId??m.companyId,w=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(w==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),y=M(h?.loggedInUserRoleMap),T=K(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(L,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||T)){if(a.state?.message==="activation"){const S=J(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(Q,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:S=>(I=>I.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(Et,{analytics:j,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(Q,{size:"ExtraLarge",start:!0})})},te=V.div`
30
30
  display: flex;
31
31
  width: 100%;
32
32
  height: 100%;
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-CCyJOwfy.js";import{j as U,u as B,h as P,l as O,
34
34
  justify-content: center;
35
35
  align-items: center;
36
36
  background-color: ${t=>t.theme.colors.grey5};
37
- `;function ta(){const t=B(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=q(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Ne(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Oe(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),{isFeatureEnabled:w}=n(v.isDepositAccountsFeatureEnabled),u=w&&!s&&_e(r?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!s&&M(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(v.isDebitCardFeatureEnabled),S=st(a,y,T)&&!s&&$e(r?.loggedInUserRoleMap),I=Ge(r?.loggedInUserRoleMap),x=We(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Te,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:I,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:I,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(it,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
37
+ `;function ta(){const t=B(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=K(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Ve(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Oe(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),{isFeatureEnabled:w}=n(v.isDepositAccountsFeatureEnabled),u=w&&!s&&_e(r?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!s&&M(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(v.isDebitCardFeatureEnabled),S=st(a,y,T)&&!s&&$e(r?.loggedInUserRoleMap),I=Ge(r?.loggedInUserRoleMap),x=qe(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Te,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:I,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:I,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(it,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-CCyJOwfy.js";import{a as g}from"./sentry-Wnm-N8eT.js";import{j as J,u as Y,l as R,g as S,k as G,h as z,n as at,o as B,N as K}from"./core-Bv8kdUko.js";import{eR as V,Kp as Ee,Kq as Ue,fS as X,cs as Ie,ct as be,vt as St,Kr as nt,vx as zt,Iu as ee,jD as te,vr as Yt,vl as qt,Ks as Ne,vd as Ht,vc as Wt,v6 as Qt,vi as Zt,vy as Xt,Kt as he,Ku as Me,ve as ea,Kv as pe,f0 as ft,vN as gt,vG as vt,Kw as xt,op as Tt,vB as yt,vz as Dt,Kx as Ct,vU as Et,vR as It,vC as bt,vT as Je,GR as kt,Ky as ta,Kz as aa,cv as na,KA as sa,KB as oa,KC as me,KD as ie,KE as ke,Iv as Ge,w7 as ye,It as De,vW as wt,vu as Ke,KF as la,Iw as H,KG as $e,vo as ia,KH as ca,KI as da,KJ as ze,KK as Ye,KL as qe,KM as He,w1 as we,KN as At,vK as jt,KO as ra,KP as ua,KQ as ha,KR as pa,KS as ma,KT as Sa,KU as fa,KV as ga,sW as va,sX as xa,HA as je,KW as Ta,KX as ya,j0 as Fe,bq as Da,KY as Ca,KZ as Ea,kB as Ia,kK as ba,Hz as Le,bE as st,K_ as Ft,He as Lt,K$ as ka,L0 as wa,L1 as Aa,kM as ja,L2 as ot,L3 as lt,L4 as it,L5 as ct,L6 as Fa,kI as La,L7 as Pa,kL as _a,L8 as Va,L9 as Pt,HW as _t,j$ as Ba,La as Oa,Lb as Pe,Lc as Vt,HU as Bt,yk as Ra,Ld as Ua,Le as Na,kj as Ot,Lf as Ma,Lg as Ja,I6 as Ga,qv as Ka,Lh as Rt,Li as dt,I3 as _e,Lj as rt,Lk as $a,I8 as za,Ll as Ya,Lm as qa,Ln as Ha,Lo as Wa,Lp as Qa,qy as Za,Lq as Xa,Ix as en,Lr as tn,HN as Ve,gL as an,Ls as nn,Lt as sn,gJ as on,Lu as ln,Lv as cn,yo as dn,Lw as rn,Lx as un,Ly as hn,Lz as pn,k3 as mn,bn as Sn,eX as fn,eV as gn}from"./zeni-epic-state-CIBk9-EN.js";import{z as U,an as Be,B as Ut,S as Q,c as j,Z,at as vn,v as M,D as Ce,w as ce,au as We,av as xn,aw as Tn,p as Qe,ax as yn,m as Dn,K as de,F as Ze,C as ae,A as $,ay as Cn,h as Xe,az as En,aA as Nt,W as In,aB as bn,T as kn,aC as wn,aq as Mt,aD as An,o as W,y as jn,J as Jt,M as Fn,aE as Ln,aF as Pn,e as et,aG as _n,aH as Vn,n as Bn,aI as On,aJ as Rn}from"./index-Cm44je86.js";import{n as N,D as Un,S as Gt}from"./mui-DtV_yZlj.js";import{t as Nn,A as Mn}from"./AddressScreen-BgaNg0Qn.js";import le from"./NotFoundScreen-DB_m9Zh0.js";import{F as Jn}from"./FeaturePreviewScreen-CPoYCyoW.js";import{c as q,v as tt,d as Gn}from"./routePaths-Dh2GrAVT.js";import{p as Kt}from"./pathToGoBack-CiuHSsDX.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js";import{M as ge}from"./MobileAppDrawer-BhM60dvk.js";import{D as Kn}from"./DrawerScreen-4A-8jdZK.js";import{g as $n,m as zn}from"./accountMappingHelper-9C6A5WnC.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="a8492782-c04a-42a1-a786-f4b5c4158ba1",e._sentryDebugIdIdentifier="sentry-dbid-a8492782-c04a-42a1-a786-f4b5c4158ba1")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(zt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=R(),{scheduleType:o}=R();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ee(o)??"accrued_expenses",h=U.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=Yn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ie(s.controllers),i=be(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Qn=N.div`
1
+ import{j as l}from"./liveblocks-D0ylGz77.js";import{a as g}from"./sentry-C5UCCkb_.js";import{j as J,u as Y,l as R,g as S,k as G,h as z,n as at,o as B,N as K}from"./core-DSsu1iyO.js";import{eR as V,Kp as Ee,Kq as Ue,fS as X,cs as Ie,ct as be,vt as St,Kr as nt,vx as zt,Iu as ee,jD as te,vr as Yt,vl as qt,Ks as Ne,vd as Ht,vc as Wt,v6 as Qt,vi as Zt,vy as Xt,Kt as he,Ku as Me,ve as ea,Kv as pe,f0 as ft,vN as gt,vG as vt,Kw as xt,op as Tt,vB as yt,vz as Dt,Kx as Ct,vU as Et,vR as It,vC as bt,vT as Je,GR as kt,Ky as ta,Kz as aa,cv as na,KA as sa,KB as oa,KC as me,KD as ie,KE as ke,Iv as Ge,w7 as ye,It as De,vW as wt,vu as Ke,KF as la,Iw as H,KG as $e,vo as ia,KH as ca,KI as da,KJ as ze,KK as Ye,KL as qe,KM as He,w1 as we,KN as At,vK as jt,KO as ra,KP as ua,KQ as ha,KR as pa,KS as ma,KT as Sa,KU as fa,KV as ga,sW as va,sX as xa,HA as je,KW as Ta,KX as ya,j0 as Fe,bq as Da,KY as Ca,KZ as Ea,kB as Ia,kK as ba,Hz as Le,bE as st,K_ as Ft,He as Lt,K$ as ka,L0 as wa,L1 as Aa,kM as ja,L2 as ot,L3 as lt,L4 as it,L5 as ct,L6 as Fa,kI as La,L7 as Pa,kL as _a,L8 as Va,L9 as Pt,HW as _t,j$ as Ba,La as Oa,Lb as Pe,Lc as Vt,HU as Bt,yk as Ra,Ld as Ua,Le as Na,kj as Ot,Lf as Ma,Lg as Ja,I6 as Ga,qv as Ka,Lh as Rt,Li as dt,I3 as _e,Lj as rt,Lk as $a,I8 as za,Ll as Ya,Lm as qa,Ln as Ha,Lo as Wa,Lp as Qa,qy as Za,Lq as Xa,Ix as en,Lr as tn,HN as Ve,gL as an,Ls as nn,Lt as sn,gJ as on,Lu as ln,Lv as cn,yo as dn,Lw as rn,Lx as un,Ly as hn,Lz as pn,k3 as mn,bn as Sn,eX as fn,eV as gn}from"./zeni-epic-state-CFQMpWBE.js";import{z as U,an as Be,B as Ut,x as Q,d as j,Y as Z,at as vn,s as M,D as Ce,I as ce,au as We,av as xn,aw as Tn,q as Qe,ax as yn,m as Dn,K as de,E as Ze,C as ae,A as $,ay as Cn,j as Xe,az as En,aA as Nt,V as In,aB as bn,c as kn,aC as wn,aq as Mt,aD as An,o as W,S as jn,G as Jt,H as Fn,aE as Ln,aF as Pn,f as et,aG as _n,aH as Vn,p as Bn,aI as On,aJ as Rn}from"./index-CPG6ITBm.js";import{n as N,D as Un,S as Gt}from"./mui-D9TDAUAO.js";import{t as Nn,A as Mn}from"./AddressScreen-Ctnukryb.js";import le from"./NotFoundScreen-B1k_jOem.js";import{F as Jn}from"./FeaturePreviewScreen-BWUt3LEA.js";import{c as q,v as tt,d as Gn}from"./routePaths-1uJ5ric0.js";import{p as Kt}from"./pathToGoBack-Ce7z8Bpw.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import{M as ge}from"./MobileAppDrawer-BLGo796K.js";import{D as Kn}from"./DrawerScreen-DTfCd2en.js";import{g as $n,m as zn}from"./accountMappingHelper-BEJScFAE.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="fddde742-60d2-4dfa-9d39-7333664fb925",e._sentryDebugIdIdentifier="sentry-dbid-fddde742-60d2-4dfa-9d39-7333664fb925")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(zt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=R(),{scheduleType:o}=R();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ee(o)??"accrued_expenses",h=U.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=Yn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ie(s.controllers),i=be(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Qn=N.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -0,0 +1,12 @@
1
+ import{j as o}from"./liveblocks-D0ylGz77.js";import{a as f}from"./sentry-C5UCCkb_.js";import{q as u,h,g as y,N as I}from"./core-DSsu1iyO.js";import{JG as w,eS as b,zF as x}from"./zeni-epic-state-CFQMpWBE.js";import{z as l,B as S,G as j,H as D}from"./index-CPG6ITBm.js";import{n as c}from"./mui-D9TDAUAO.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="389798c6-1282-4414-a212-3e1317fdc495",e._sentryDebugIdIdentifier="sentry-dbid-389798c6-1282-4414-a212-3e1317fdc495")}catch{}})();const P=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y(m=>w(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return b(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(p(!0),a(x(t,g,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(S,{fetchState:"In-Progress"}))},E=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
+ `,_=c(D.LargeRegular)`
10
+ display: flex;
11
+ color: ${j.important};
12
+ `;export{P as default};
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-CCyJOwfy.js";import{j as K,u as Y,h as z,l as Z,g as w,k as J,N as ne,n as Ve,o as k}from"./core-Bv8kdUko.js";import{eR as _,OA as Ce,OB as $e,cl as te,cm as Ne,fe as Ze,wS as ke,B3 as Ge,wM as Tn,OC as On,OD as Bn,wP as Fn,wW as fe,wJ as Rn,wG as Ln,Nm as le,OE as Un,En as zn,Ks as _n,Ep as Mn,kk as Oe,OF as Vn,qa as He,p_ as We,kb as Ke,ke as Be,Kt as Fe,Ku as $n,OG as Nn,kd as Zn,kA as Gn,k2 as Hn,iB as Wn,iA as Kn,OH as Yn,OI as ye,E4 as Jn,OJ as qn,OK as Qn,Nf as we,OL as Re,OM as Xn,EA as et,N_ as nt,BZ as Ye,sK as Je,ON as tt,Ex as at,OO as qe,cN as Ae,EE as Qe,ff as ot,eV as Xe,eX as De,EC as st,BT as rt,Eu as it,OP as en,OQ as nn,E6 as tn,Eg as Le,OR as ct,Ea as lt,OS as dt,NO as ut,EF as pt,bv as mt,bF as ht,cx as gt,bG as ft,bs as yt,Jn as xt}from"./zeni-epic-state-CIBk9-EN.js";import{T as ae,C as $,z as D,A as O,m as M,B as de,bP as Ct,Z as Ie,K as V,F as q,p as an,an as kt,ac as Ue,c as R,bQ as wt,aq as Se,bR as At,S as ue,bS as Dt,e as be,aK as W,bT as It,W as St,a9 as bt,bU as ze,bV as Et,v as ee,bW as vt,bX as Pt,bY as jt,bZ as Tt,a6 as Ot,o as Bt}from"./index-Cm44je86.js";import{n as L,D as Q,S as X}from"./mui-DtV_yZlj.js";import ce from"./NotFoundScreen-DB_m9Zh0.js";import{S as _e}from"./SetupPagesScreen-XYLqa_k3.js";import{F as on}from"./FeaturePreviewScreen-CPoYCyoW.js";import{a as u}from"./sentry-Wnm-N8eT.js";import{M as pe}from"./MobileAppDrawer-BhM60dvk.js";import{A as Ft,D as Rt,V as Lt}from"./DomesticWireDetailScreen-CNcs_kp-.js";import{A as Ut}from"./AddressScreen-BgaNg0Qn.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js";import{Z as zt}from"./ZeniAccountStatementScreen-C1jeHlhb.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./analyticsHelper-sB0sZFDB.js";import"./routePaths-Dh2GrAVT.js";import"./BusinessVerificationPageScreen-C-td2Gz2.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]="9d50b05a-abb4-44fe-936e-7c1637fdc059",e._sentryDebugIdIdentifier="sentry-dbid-9d50b05a-abb4-44fe-936e-7c1637fdc059")}catch{}})();const _t=L.div`
1
+ import{j as n}from"./liveblocks-D0ylGz77.js";import{j as K,u as Y,h as z,l as G,g as w,k as q,N as ne,n as Me,o as k}from"./core-DSsu1iyO.js";import{eR as V,OA as Ce,OB as $e,cl as te,cm as Ne,fe as Ge,wS as ke,B3 as Ze,wM as Tn,OC as On,OD as Bn,wP as Fn,wW as fe,wJ as Rn,wG as Ln,Nm as le,OE as Un,En as zn,Ks as Vn,Ep as _n,kk as Oe,OF as Mn,qa as He,p_ as We,kb as Ke,ke as Be,Kt as Fe,Ku as $n,OG as Nn,kd as Gn,kA as Zn,k2 as Hn,iB as Wn,iA as Kn,OH as Yn,OI as ye,E4 as qn,OJ as Jn,OK as Qn,Nf as we,OL as Re,OM as Xn,EA as et,N_ as nt,BZ as Ye,sK as qe,ON as tt,Ex as at,OO as Je,cN as Ae,EE as Qe,ff as ot,eV as Xe,eX as De,EC as st,BT as rt,Eu as it,OP as en,OQ as nn,E6 as tn,Eg as Le,OR as ct,Ea as lt,OS as dt,NO as ut,EF as pt,bv as mt,bF as ht,cx as gt,bG as ft,bs as yt,Jn as xt}from"./zeni-epic-state-CFQMpWBE.js";import{c as ae,C as $,z as D,A as O,m as _,B as de,bP as Ct,Y as Ie,K as M,E as J,q as an,an as kt,ac as Ue,d as R,bQ as wt,aq as Se,bR as At,x as ue,bS as Dt,f as be,aK as W,bT as It,V as St,a9 as bt,bU as ze,bV as Et,s as ee,bW as vt,bX as Pt,bY as jt,bZ as Tt,a6 as Ot,o as Bt}from"./index-CPG6ITBm.js";import{n as L,D as Q,S as X}from"./mui-D9TDAUAO.js";import ce from"./NotFoundScreen-B1k_jOem.js";import{S as Ve}from"./SetupPagesScreen-1j44PFay.js";import{F as on}from"./FeaturePreviewScreen-BWUt3LEA.js";import{a as u}from"./sentry-C5UCCkb_.js";import{M as pe}from"./MobileAppDrawer-BLGo796K.js";import{A as Ft,D as Rt,V as Lt}from"./DomesticWireDetailScreen-CluJV1hP.js";import{A as Ut}from"./AddressScreen-Ctnukryb.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import{Z as zt}from"./ZeniAccountStatementScreen-DLVOSwmC.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./analyticsHelper-COFNU8CP.js";import"./routePaths-1uJ5ric0.js";import"./BusinessVerificationPageScreen-BFP865c-.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]="55d888a4-4dcb-41ee-a7f0-a684ca129959",e._sentryDebugIdIdentifier="sentry-dbid-55d888a4-4dcb-41ee-a7f0-a684ca129959")}catch{}})();const Vt=L.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,19 +6,19 @@ import{j as n}from"./liveblocks-CCyJOwfy.js";import{j as K,u as Y,h as z,l as Z,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,Mt=J(function(e){return{autoTransferRuleView:Ce(e),downloadAccountDetailEndPoint:`${Ie}/account_details`,transferLimit:5e5,depositAccountListView:Ge(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(ke(a))},onCreateRule:()=>{e(Ln())},onUpdateRule:a=>{e(fe(a))},onDeleteClick:a=>{e(Rn(a))},onPauseClick:a=>{e(fe(a,!0,!1))},onResumeClick:a=>{e(fe(a,!1,!0))},onActivityClick:(a,r)=>{e(Fn(a,r))},onUpdateRuleLocalData:a=>{e(Bn(a))},clearRuleLocalData:()=>{e(On())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Tn())}}})(Ct);function Me({isEditDrawerOpen:e}){const t=K(),s=Y(),o=z(),a=ae(),{ruleId:r,tenantEmailDomain:d}=Z(),{useFeatureGate:c}=$(),[p,m]=u.useState(!1),[x,i]=u.useState(!1),l=w(y=>_(y)),h=w(y=>Ce(y)),C=h?.fetchState??"Not-Started",b=w(y=>$e(y)),g=l?.companyId??D.getSignedInUserTenant(d)?.companyId,A=te(a?.loggedInUserRoleMap)||Ne(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(O.isTreasuryEnabled),f=l?.company!=null&&Ze(l.company),S=I&&f,B=D.getSignedInUser(),U=l.tenantId,j={userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:U??""},v=l.companyName;u.useEffect(()=>{!x&&C==="Not-Started"&&g&&(i(!0),o(ke(!0)))},[x,C,g,o]);const E=y=>{m(y)},T=M(),P=!!s.state?.scrollToAddRule;return h?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(_t,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:E}),n.jsx(Mt,{navigate:t,location:s,currentTenant:l,companyName:v,handleDrawerToggle:E,isEditDrawerOpen:e,editingRuleId:r,authParams:j,includeTreasuryOption:S,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:P})]})}const Vt={overlayWidth:new q(100,100,58)},$t=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=z(),a=M(),r=V();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(Q,{onClose:()=>{s(!0),o(le())},anchor:"right",open:t,PaperProps:{style:{width:Vt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Nt,{onClick:d=>d.stopPropagation(),children:n.jsx(Ft,{vendorIdParam:e,accountContext:"express-pay"})})})},Nt=L(X)`
9
+ `,_t=q(function(e){return{autoTransferRuleView:Ce(e),downloadAccountDetailEndPoint:`${Ie}/account_details`,transferLimit:5e5,depositAccountListView:Ze(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(ke(a))},onCreateRule:()=>{e(Ln())},onUpdateRule:a=>{e(fe(a))},onDeleteClick:a=>{e(Rn(a))},onPauseClick:a=>{e(fe(a,!0,!1))},onResumeClick:a=>{e(fe(a,!1,!0))},onActivityClick:(a,r)=>{e(Fn(a,r))},onUpdateRuleLocalData:a=>{e(Bn(a))},clearRuleLocalData:()=>{e(On())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Tn())}}})(Ct);function _e({isEditDrawerOpen:e}){const t=K(),s=Y(),o=z(),a=ae(),{ruleId:r,tenantEmailDomain:d}=G(),{useFeatureGate:c}=$(),[p,m]=u.useState(!1),[x,i]=u.useState(!1),l=w(y=>V(y)),h=w(y=>Ce(y)),C=h?.fetchState??"Not-Started",b=w(y=>$e(y)),g=l?.companyId??D.getSignedInUserTenant(d)?.companyId,A=te(a?.loggedInUserRoleMap)||Ne(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(O.isTreasuryEnabled),f=l?.company!=null&&Ge(l.company),S=I&&f,B=D.getSignedInUser(),U=l.tenantId,j={userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:U??""},v=l.companyName;u.useEffect(()=>{!x&&C==="Not-Started"&&g&&(i(!0),o(ke(!0)))},[x,C,g,o]);const E=y=>{m(y)},T=_(),P=!!s.state?.scrollToAddRule;return h?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(Vt,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:E}),n.jsx(_t,{navigate:t,location:s,currentTenant:l,companyName:v,handleDrawerToggle:E,isEditDrawerOpen:e,editingRuleId:r,authParams:j,includeTreasuryOption:S,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:P})]})}const Mt={overlayWidth:new J(100,100,58)},$t=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=z(),a=_(),r=M();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(Q,{onClose:()=>{s(!0),o(le())},anchor:"right",open:t,PaperProps:{style:{width:Mt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Nt,{onClick:d=>d.stopPropagation(),children:n.jsx(Ft,{vendorIdParam:e,accountContext:"express-pay"})})})},Nt=L(X)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
13
- `,Zt={overlayWidth:new q(100,100,58)},Gt=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=z(),o=M(),a=V();if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(Q,{onClose:()=>{t(!0),s(le())},anchor:"right",open:e,PaperProps:{style:{width:Zt.overlayWidth.valuePercentage(a),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ht,{onClick:r=>r.stopPropagation(),children:n.jsx(Ut,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Ht=L(X)`
13
+ `,Gt={overlayWidth:new J(100,100,58)},Zt=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=z(),o=_(),a=M();if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(Q,{onClose:()=>{t(!0),s(le())},anchor:"right",open:e,PaperProps:{style:{width:Gt.overlayWidth.valuePercentage(a),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ht,{onClick:r=>r.stopPropagation(),children:n.jsx(Ut,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Ht=L(X)`
14
14
  display: flex;
15
15
  min-height: 100%;
16
16
  flex-direction: column;
17
- `,Wt={overlayWidth:new q(100,100,58)},Kt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=z(),a=M(),r=V();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(Q,{onClose:()=>{s(!0),o(le())},anchor:"right",open:t,PaperProps:{style:{width:Wt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Yt,{onClick:d=>d.stopPropagation(),children:n.jsx(Rt,{vendorIdParam:e,accountContext:"express-pay"})})})},Yt=L(X)`
17
+ `,Wt={overlayWidth:new J(100,100,58)},Kt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=z(),a=_(),r=M();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(Q,{onClose:()=>{s(!0),o(le())},anchor:"right",open:t,PaperProps:{style:{width:Wt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Yt,{onClick:d=>d.stopPropagation(),children:n.jsx(Rt,{vendorIdParam:e,accountContext:"express-pay"})})})},Yt=L(X)`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  flex-direction: column;
21
- `,Jt=L.div`
21
+ `,qt=L.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,15 +26,15 @@ import{j as n}from"./liveblocks-CCyJOwfy.js";import{j as K,u as Y,h as z,l as Z,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${e=>e.theme.colors.grey4};
29
- `,qt=J(function(e,t){const s=_(e),o=D.getSignedInUser(),a=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},d=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,p=_n(e,"common");return{expressPayDetails:d,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(Kn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Be({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(Wn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Hn(o,!1))},updateSelectedVendorForCreate:o=>{e(Gn(o))},initializeVendorAddress:()=>{e(Zn())},resetVendorSaveStatus:o=>{e(Nn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e($n({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Fe("common"))},onCancelAutoComplete:()=>{e(Fe("common"))}},chooseNewVendor:o=>{e(Be({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(Ke({files:o}))},onDeleteFile:o=>{e(We(o))},onEditFileName:(o,a)=>{e(He(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Oe(o)),e(Oe()),e(Vn()),e(le()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(Mn())}}})(wt);function re({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=K(),a=Y(),r=z(),[d,c]=u.useState(!1),{tenantEmailDomain:p}=Z(),m=ae(),x=w(y=>y.expressPayState.fetchState),i=w(y=>_(y)),l=w(y=>Un(y)),h=l.expressPayLocalData?.vendorId,C=i.companyId??D.getSignedInUserTenant(p)?.companyId,[b,g]=u.useState(!1),[A,I]=u.useState(!1),[f,S]=u.useState(!1),B=an(a.state?.pathnameStackToGoBack),{poppedPathname:U}=B,j=U?.split("/"),v=j?.[j.length-1];u.useEffect(()=>{e===!0?g(!0):(g(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{t===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[t]),u.useEffect(()=>{s===!0?S(!0):(S(!1),document.body.style.overflow="auto")},[s]),u.useEffect(()=>{x==="Not-Started"&&r(zn(!0,!0))},[x,r]);const E=kt(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(u.useEffect(()=>{E==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&P()},[E,l.vendorViewDetails.bankAccountCreationState?.fetchState]),D.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{c(y)},P=()=>{g(!1),I(!1),o("../",{relative:"path"})};return n.jsxs(Jt,{children:[Ue(a)?n.jsx(pe,{isAppContentDrawerOpen:d,handleDrawerToggle:T}):null,b===!0?n.jsx($t,{vendorId:h,closeDrawerHandler:P,isDrawerOpen:b}):null,A===!0?n.jsx(Kt,{vendorId:h,closeDrawerHandler:P,isDrawerOpen:A}):null,f===!0?n.jsx(Gt,{closeDrawerHandler:P,isDrawerOpen:f}):null,n.jsx(Lt,{vendorId:h,isExpressPayPage:!0}),n.jsx(qt,{navigate:o,location:a,companyId:C,accountId:v,analytics:R,currentTenant:i,vendorId:h,roleMap:m?.loggedInUserRoleMap,isSettings:Ue(a),expressPayDetails:l,onClickMenuIcon:()=>{T(!0)}})]})}const Qt={overlayWidth:new q(100,100,58)},Xt=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const r=M(),d=V(),c=w(i=>$e(i)),p=w(i=>_(i));if(D.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const m=()=>{a(!0)},x={depositAccount:o,onDismissClick:m,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:p};return n.jsx(Q,{anchor:"right",open:s,PaperProps:{style:{width:Qt.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>m(),children:n.jsx(ea,{onClick:i=>i.stopPropagation(),children:n.jsx(At,{...x})})})},ea=L(X)`
29
+ `,Jt=q(function(e,t){const s=V(e),o=D.getSignedInUser(),a=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},d=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,p=Vn(e,"common");return{expressPayDetails:d,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(Kn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Be({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(Wn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Hn(o,!1))},updateSelectedVendorForCreate:o=>{e(Zn(o))},initializeVendorAddress:()=>{e(Gn())},resetVendorSaveStatus:o=>{e(Nn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e($n({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Fe("common"))},onCancelAutoComplete:()=>{e(Fe("common"))}},chooseNewVendor:o=>{e(Be({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(Ke({files:o}))},onDeleteFile:o=>{e(We(o))},onEditFileName:(o,a)=>{e(He(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Oe(o)),e(Oe()),e(Mn()),e(le()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(_n())}}})(wt);function re({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=K(),a=Y(),r=z(),[d,c]=u.useState(!1),{tenantEmailDomain:p}=G(),m=ae(),x=w(y=>y.expressPayState.fetchState),i=w(y=>V(y)),l=w(y=>Un(y)),h=l.expressPayLocalData?.vendorId,C=i.companyId??D.getSignedInUserTenant(p)?.companyId,[b,g]=u.useState(!1),[A,I]=u.useState(!1),[f,S]=u.useState(!1),B=an(a.state?.pathnameStackToGoBack),{poppedPathname:U}=B,j=U?.split("/"),v=j?.[j.length-1];u.useEffect(()=>{e===!0?g(!0):(g(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{t===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[t]),u.useEffect(()=>{s===!0?S(!0):(S(!1),document.body.style.overflow="auto")},[s]),u.useEffect(()=>{x==="Not-Started"&&r(zn(!0,!0))},[x,r]);const E=kt(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(u.useEffect(()=>{E==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&P()},[E,l.vendorViewDetails.bankAccountCreationState?.fetchState]),D.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{c(y)},P=()=>{g(!1),I(!1),o("../",{relative:"path"})};return n.jsxs(qt,{children:[Ue(a)?n.jsx(pe,{isAppContentDrawerOpen:d,handleDrawerToggle:T}):null,b===!0?n.jsx($t,{vendorId:h,closeDrawerHandler:P,isDrawerOpen:b}):null,A===!0?n.jsx(Kt,{vendorId:h,closeDrawerHandler:P,isDrawerOpen:A}):null,f===!0?n.jsx(Zt,{closeDrawerHandler:P,isDrawerOpen:f}):null,n.jsx(Lt,{vendorId:h,isExpressPayPage:!0}),n.jsx(Jt,{navigate:o,location:a,companyId:C,accountId:v,analytics:R,currentTenant:i,vendorId:h,roleMap:m?.loggedInUserRoleMap,isSettings:Ue(a),expressPayDetails:l,onClickMenuIcon:()=>{T(!0)}})]})}const Qt={overlayWidth:new J(100,100,58)},Xt=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const r=_(),d=M(),c=w(i=>$e(i)),p=w(i=>V(i));if(D.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const m=()=>{a(!0)},x={depositAccount:o,onDismissClick:m,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:p};return n.jsx(Q,{anchor:"right",open:s,PaperProps:{style:{width:Qt.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>m(),children:n.jsx(ea,{onClick:i=>i.stopPropagation(),children:n.jsx(At,{...x})})})},ea=L(X)`
30
30
  display: flex;
31
31
  min-height: 100%;
32
32
  flex-direction: column;
33
- `,na={overlayWidth:new q(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=M(),o=V(),a=z(),r=w(i=>_(i)),d=D.getSignedInUser(),c=r.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 m=w(i=>Yn(i)),x={analytics:R,checkDeposit:m,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{a(qn(i))},updateFilesEntity:i=>{a(Ke({files:i}))},onAnotherTransferClick:()=>{a(ye())},onDeleteFile:i=>{a(We(i))},onEditFileName:(i,l)=>{a(He(i,l.split(".")[0]))},onCheckDpositClick:()=>{a(Jn())},onDismissClick:()=>{t(!0),a(ye())}};return n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:i=>(l=>l.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(Q,{anchor:"right",open:e,PaperProps:{style:{width:na.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(t(!0),void a(ye())),children:n.jsx(ta,{onClick:i=>i.stopPropagation(),children:n.jsx(Dt,{...x})})})]})},ta=L(X)`
33
+ `,na={overlayWidth:new J(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=_(),o=M(),a=z(),r=w(i=>V(i)),d=D.getSignedInUser(),c=r.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 m=w(i=>Yn(i)),x={analytics:R,checkDeposit:m,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{a(Jn(i))},updateFilesEntity:i=>{a(Ke({files:i}))},onAnotherTransferClick:()=>{a(ye())},onDeleteFile:i=>{a(We(i))},onEditFileName:(i,l)=>{a(He(i,l.split(".")[0]))},onCheckDpositClick:()=>{a(qn())},onDismissClick:()=>{t(!0),a(ye())}};return n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:i=>(l=>l.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(Q,{anchor:"right",open:e,PaperProps:{style:{width:na.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(t(!0),void a(ye())),children:n.jsx(ta,{onClick:i=>i.stopPropagation(),children:n.jsx(Dt,{...x})})})]})},ta=L(X)`
34
34
  display: flex;
35
35
  min-height: 100%;
36
36
  flex-direction: column;
37
- `,aa={overlayWidth:new q(100,100,58)},oa=J(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:nt(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ge(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(at()),clearReviewTransferDetail:()=>e(tt()),onFetchLinkTokenClick:s=>{e(Je("external_account",s))},onEstablishConnectionClick:s=>{e(Ye(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(It),ln=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const r=w(f=>Qn(f)),d=w(f=>_(f)),c=M(),p=V(),m=z(),{accountId:x}=Z(),[i,l]=u.useState("achTransfer"),[h,C]=u.useState(!1);if(D.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=$(),{configValue:g}=b(W.zeniAccountsConfig),A=we(g),I=()=>{o(!0),m(Re())};return u.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&C(!0)},[C,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:f=>(S=>S.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(Q,{onClose:()=>{(i==="achTransfer"&&h===!1||i==="achTransfer"&&h&&r.fetchState==="Completed")&&I()},anchor:"right",open:e,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(sa,{onClick:f=>f.stopPropagation(),children:n.jsx(oa,{analytics:R,transferDetails:r,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&a.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>a.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),m(et(x))},onDismissClick:I,onSaveChangesToLocalStore:f=>{m(Xn(f))},onAnotherTransferClick:()=>{C(!1),m(Re())},currentTenant:d,zeniAccountsConfigDetail:a,currentDrawerContent:i,setCurrentDrawerContent:l,showReviewContent:h,setShowReviewContent:C,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},sa=L(X)`
37
+ `,aa={overlayWidth:new J(100,100,58)},oa=q(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:nt(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ze(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(at()),clearReviewTransferDetail:()=>e(tt()),onFetchLinkTokenClick:s=>{e(qe("external_account",s))},onEstablishConnectionClick:s=>{e(Ye(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(It),ln=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const r=w(f=>Qn(f)),d=w(f=>V(f)),c=_(),p=M(),m=z(),{accountId:x}=G(),[i,l]=u.useState("achTransfer"),[h,C]=u.useState(!1);if(D.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=$(),{configValue:g}=b(W.zeniAccountsConfig),A=we(g),I=()=>{o(!0),m(Re())};return u.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&C(!0)},[C,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:f=>(S=>S.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(Q,{onClose:()=>{(i==="achTransfer"&&h===!1||i==="achTransfer"&&h&&r.fetchState==="Completed")&&I()},anchor:"right",open:e,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(sa,{onClick:f=>f.stopPropagation(),children:n.jsx(oa,{analytics:R,transferDetails:r,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&a.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>a.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),m(et(x))},onDismissClick:I,onSaveChangesToLocalStore:f=>{m(Xn(f))},onAnotherTransferClick:()=>{C(!1),m(Re())},currentTenant:d,zeniAccountsConfigDetail:a,currentDrawerContent:i,setCurrentDrawerContent:l,showReviewContent:h,setShowReviewContent:C,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},sa=L(X)`
38
38
  display: flex;
39
39
  min-height: 100%;
40
40
  flex-direction: column;
@@ -46,7 +46,7 @@ import{j as n}from"./liveblocks-CCyJOwfy.js";import{j as K,u as Y,h as z,l as Z,
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${e=>e.theme.colors.grey4};
49
- `,ia=J(function(e,t){return{zeniAccountListView:qe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:r,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:m}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const h=ca(x,i),C=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Qe(!1))},handleMoveMoneyOptionSelection:(i,l)=>{let h="page-not-found";i==="sendMoney"&&(h=mn(x)),i==="payBill"?h=dn(o,p,m):i==="transfer"?(h=un(x),l!=null&&e(en(l))):i==="checkDeposit"&&(h=pn(x));const C=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),e(it(i))},onFetchLinkTokenClick:(i,l)=>{e(Je("external_account",i,l))},onUpdatePaymentAccountStatus:(i,l,h)=>{e(rt(i,l,"zeni_accounts","external_account",h))},onEstablishConnectionClick:i=>{e(Ye(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(st(i))},onClickMenuIcon:()=>{d(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Et);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=Y(),o=K(),a=z(),r=V(),{tenantEmailDomain:d}=Z(),{useDynamicConfig:c,useFeatureGate:p}=$(),m=M(),{configValue:x}=c(W.zeniAccountsConfig),{isFeatureEnabled:i}=p(O.isTreasuryEnabled),{isFeatureEnabled:l}=p(O.isDebitCardFeatureEnabled),{isFeatureEnabled:h}=p(O.isAutoTransferRuleEnabled),{isFeatureEnabled:C}=p(O.isCheckingCommentingEnabled),b=we(x),g=w(F=>_(F)),A=g.companyId??D.getSignedInUserTenant(d)?.companyId,{configValue:I}=c(W.expressPayConfig),f=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(g.tenantId),[S,B]=u.useState(!1),[U,j]=u.useState(!1),[v,E]=u.useState(!1),[T,P]=u.useState(!1),y=w(F=>qe(F)),N=y.fetchState,oe=w(F=>Ce(F)),se=oe?.fetchState??"Not-Started",me=!!g.companyZeniAccountInfo?.info?.isZeniAccountEnabled,G=ae(),H=!!g.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,hn=!!g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,gn=te(G?.loggedInUserRoleMap),fn=Ae(G?.loggedInUserRoleMap),yn=!!g.companyBillPayInfo?.info?.isBillPayEnabled,Ee=D.getSignedInUser(),xn={userId:Ee?.userId??"",sessionId:Ee?.zeniSessionId??"",tenantId:g.tenantId??""},Cn=`${Ie}/account_details`,{areTenantIdsInSync:ve}=St();u.useEffect(()=>{!S&&ve&&(B(!0),a(Qe(!1)))},[S,a,N,ve]),u.useEffect(()=>{!U&&se==="Not-Started"&&A&&(j(!0),a(ke(!0)))},[U,se,A,a]),u.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{P(t!=null&&t===!0)},[t]);const Pe=()=>{E(!1),o("..")},[kn,wn]=u.useState(!1),je=F=>{wn(F)},{isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn}=sn({mobileExploreReferrer:"Checking Accounts"});rn({isDataReady:N==="Completed"});const In=g.company!=null&&Ze(g.company),he=(i&&In)===!0&&!hn,[Sn,bn]=u.useState(!1),ge=w(F=>F.treasurySetupViewState.treasuryFundsDetails),En=ge.fundsDetails,vn=bt(En);u.useEffect(()=>{he!==!0||Sn||ge?.fetchStatus.fetchState!=="Not-Started"||(bn(!0),a(ot()))},[ge.fetchStatus,a]);const Pn=Xe(g),jn=De(l,g);return Pn===!0&&jn!==!0?n.jsx(on,{}):me?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&v===!1&&T===!1?n.jsx(ue,{analytics:R,onLoad:F=>(Te=>{Te.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,ze(y.summary?.totalBalance.available.amount??0),ze(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Te.trackTreasuryPromoView("Checking Promo Banner")})(F)}):null,v===!0?n.jsx(ln,{closeDrawerHandler:Pe,isTransferDrawerOpen:v,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:Cn}):null,T===!0?n.jsx(cn,{closeDrawerHandler:Pe,isCheckDepositDrawerOpen:T}):null,n.jsxs(ra,{windowSize:r,children:[n.jsx(pe,{isAppContentDrawerOpen:kn,handleDrawerToggle:je}),n.jsx(ia,{zeniBankListView:y,navigate:o,currentTenant:g,location:s,companyId:A,analytics:R,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:yn,isCheckingCommentingEnabled:C,isDebitCardFeatureEnabled:l,isAutoTransferRuleEnabled:h,handleDrawerToggle:je,showTreasuryPromo:he,treasuryYieldPercentage:vn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn})]})]}):H&&gn?n.jsx(ne,{to:"../setup"}):g.companyZeniAccountInfo?.info&&!H&&fn?n.jsx(ne,{to:"../promo",state:s.state}):n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const dn=(e,t,s)=>{const o=De(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},ca=(e,t)=>`/${e}/checking/${t}`,un=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,pn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,mn=e=>`/${e}/checking/express-pay`,la=L.div`
49
+ `,ia=q(function(e,t){return{zeniAccountListView:Je(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:r,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:m}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const h=ca(x,i),C=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Qe(!1))},handleMoveMoneyOptionSelection:(i,l)=>{let h="page-not-found";i==="sendMoney"&&(h=mn(x)),i==="payBill"?h=dn(o,p,m):i==="transfer"?(h=un(x),l!=null&&e(en(l))):i==="checkDeposit"&&(h=pn(x));const C=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),e(it(i))},onFetchLinkTokenClick:(i,l)=>{e(qe("external_account",i,l))},onUpdatePaymentAccountStatus:(i,l,h)=>{e(rt(i,l,"zeni_accounts","external_account",h))},onEstablishConnectionClick:i=>{e(Ye(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(st(i))},onClickMenuIcon:()=>{d(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Et);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=Y(),o=K(),a=z(),r=M(),{tenantEmailDomain:d}=G(),{useDynamicConfig:c,useFeatureGate:p}=$(),m=_(),{configValue:x}=c(W.zeniAccountsConfig),{isFeatureEnabled:i}=p(O.isTreasuryEnabled),{isFeatureEnabled:l}=p(O.isDebitCardFeatureEnabled),{isFeatureEnabled:h}=p(O.isAutoTransferRuleEnabled),{isFeatureEnabled:C}=p(O.isCheckingCommentingEnabled),b=we(x),g=w(F=>V(F)),A=g.companyId??D.getSignedInUserTenant(d)?.companyId,{configValue:I}=c(W.expressPayConfig),f=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(g.tenantId),[S,B]=u.useState(!1),[U,j]=u.useState(!1),[v,E]=u.useState(!1),[T,P]=u.useState(!1),y=w(F=>Je(F)),N=y.fetchState,oe=w(F=>Ce(F)),se=oe?.fetchState??"Not-Started",me=!!g.companyZeniAccountInfo?.info?.isZeniAccountEnabled,Z=ae(),H=!!g.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,hn=!!g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,gn=te(Z?.loggedInUserRoleMap),fn=Ae(Z?.loggedInUserRoleMap),yn=!!g.companyBillPayInfo?.info?.isBillPayEnabled,Ee=D.getSignedInUser(),xn={userId:Ee?.userId??"",sessionId:Ee?.zeniSessionId??"",tenantId:g.tenantId??""},Cn=`${Ie}/account_details`,{areTenantIdsInSync:ve}=St();u.useEffect(()=>{!S&&ve&&(B(!0),a(Qe(!1)))},[S,a,N,ve]),u.useEffect(()=>{!U&&se==="Not-Started"&&A&&(j(!0),a(ke(!0)))},[U,se,A,a]),u.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{P(t!=null&&t===!0)},[t]);const Pe=()=>{E(!1),o("..")},[kn,wn]=u.useState(!1),je=F=>{wn(F)},{isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn}=sn({mobileExploreReferrer:"Checking Accounts"});rn({isDataReady:N==="Completed"});const In=g.company!=null&&Ge(g.company),he=(i&&In)===!0&&!hn,[Sn,bn]=u.useState(!1),ge=w(F=>F.treasurySetupViewState.treasuryFundsDetails),En=ge.fundsDetails,vn=bt(En);u.useEffect(()=>{he!==!0||Sn||ge?.fetchStatus.fetchState!=="Not-Started"||(bn(!0),a(ot()))},[ge.fetchStatus,a]);const Pn=Xe(g),jn=De(l,g);return Pn===!0&&jn!==!0?n.jsx(on,{}):me?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&v===!1&&T===!1?n.jsx(ue,{analytics:R,onLoad:F=>(Te=>{Te.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,ze(y.summary?.totalBalance.available.amount??0),ze(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Te.trackTreasuryPromoView("Checking Promo Banner")})(F)}):null,v===!0?n.jsx(ln,{closeDrawerHandler:Pe,isTransferDrawerOpen:v,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:Cn}):null,T===!0?n.jsx(cn,{closeDrawerHandler:Pe,isCheckDepositDrawerOpen:T}):null,n.jsxs(ra,{windowSize:r,children:[n.jsx(pe,{isAppContentDrawerOpen:kn,handleDrawerToggle:je}),n.jsx(ia,{zeniBankListView:y,navigate:o,currentTenant:g,location:s,companyId:A,analytics:R,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:yn,isCheckingCommentingEnabled:C,isDebitCardFeatureEnabled:l,isAutoTransferRuleEnabled:h,handleDrawerToggle:je,showTreasuryPromo:he,treasuryYieldPercentage:vn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn})]})]}):H&&gn?n.jsx(ne,{to:"../setup"}):g.companyZeniAccountInfo?.info&&!H&&fn?n.jsx(ne,{to:"../promo",state:s.state}):n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const dn=(e,t,s)=>{const o=De(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},ca=(e,t)=>`/${e}/checking/${t}`,un=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,pn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,mn=e=>`/${e}/checking/express-pay`,la=L.div`
50
50
  display: flex;
51
51
  width: 100%;
52
52
  flex: 1 1 auto;
@@ -54,7 +54,7 @@ import{j as n}from"./liveblocks-CCyJOwfy.js";import{j as K,u as Y,h as z,l as Z,
54
54
  align-items: center;
55
55
  min-height: 100vh;
56
56
  background-color: ${e=>e.theme.colors.grey4};
57
- `,da=J(function(e,t){const{currentTenant:s}=t,o=nn(e,t.accountId),a=D.getSignedInUser(),r=e.tenantState.currentTenantId,d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:d,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:r}=t,{tenantEmailDomain:d}=o;return{handleMoveMoneyOptionSelection:(c,p)=>{let m="page-not-found";c==="sendMoney"?m=mn(d):c==="payBill"?m=dn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(m=un(d,r),p!=null&&e(en(p))):c==="checkDeposit"?(m=pn(d,r),p!=null&&e(ct(p))):c==="accountStatement"&&(m=ma(d,r));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:x}})},onViewAllTransactionClick:()=>{const c=pa(d,r),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onAccountDetailClick:()=>{const c=ua(d,r),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{e(Le(r,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(tn(r,!1))},onCloseAccountClick:()=>{e(Le(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(vt);function ie({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=Y(),a=K(),r=z(),d=V(),{tenantEmailDomain:c,accountId:p}=Z(),{useDynamicConfig:m}=$(),{useFeatureGate:x}=$(),{isFeatureEnabled:i}=x(O.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=x(O.isCheckingCommentingEnabled),h=w(H=>_(H)),{configValue:C}=m(W.expressPayConfig),b=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(h.tenantId),g=!!h.companyBillPayInfo?.info?.isBillPayEnabled,A=D.getSignedInUser(),I=h.companyId??D.getSignedInUserTenant(c)?.companyId,f={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:h.tenantId??""},S=`${Ie}/account_details`,[B,U]=u.useState(!1),[j,v]=u.useState(!1),[E,T]=u.useState(!1),[P,y]=u.useState(!1),N=w(H=>nn(H,p??"")),oe=N.fetchState,{isAiCfoAccessEnabled:se,onAskAiCfoClick:me}=sn({mobileExploreReferrer:"Checking Account Detail"});rn({isDataReady:oe==="Completed"}),u.useEffect(()=>{B||(r(tn(p??"",!1)),U(!0))},[B,r,oe]),u.useEffect(()=>{y(s!=null&&s===!0)},[s]),u.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{T(t!=null&&t===!0)},[t]);const G=()=>{y(!1),a("..")};return n.jsxs(n.Fragment,{children:[P===!0&&N.accountDetail!=null?n.jsx(Xt,{authParams:f,downloadAccountDetailEndPoint:S,closeDrawerHandler:G,isAccountInfoDrawerOpen:P,zeniBankAccountDetail:N.accountDetail}):null,j===!0?n.jsx(ln,{closeDrawerHandler:G,isTransferDrawerOpen:j,zeniAccountsConfig:N.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:S}):null,E===!0?n.jsx(cn,{closeDrawerHandler:G,isCheckDepositDrawerOpen:E}):null,n.jsx(la,{windowSize:d,children:n.jsx(da,{navigate:a,currentTenant:h,location:o,companyId:I,isDebitCardFeatureEnabled:i,accountId:p??"",isBillPayEnabled:g,isCheckingCommentingEnabled:l,isExpressPayEnabled:b,isAiCfoAccessEnabled:se,onAskAiCfoClick:me})})]})}const ua=(e,t)=>`/${e}/checking/${t}/account-info`,pa=(e,t)=>`/${e}/checking/${t}/transactions`,ma=(e,t)=>`/${e}/checking/${t}/statements`,ha=L.div`
57
+ `,da=q(function(e,t){const{currentTenant:s}=t,o=nn(e,t.accountId),a=D.getSignedInUser(),r=e.tenantState.currentTenantId,d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:d,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:r}=t,{tenantEmailDomain:d}=o;return{handleMoveMoneyOptionSelection:(c,p)=>{let m="page-not-found";c==="sendMoney"?m=mn(d):c==="payBill"?m=dn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(m=un(d,r),p!=null&&e(en(p))):c==="checkDeposit"?(m=pn(d,r),p!=null&&e(ct(p))):c==="accountStatement"&&(m=ma(d,r));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:x}})},onViewAllTransactionClick:()=>{const c=pa(d,r),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onAccountDetailClick:()=>{const c=ua(d,r),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{e(Le(r,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(tn(r,!1))},onCloseAccountClick:()=>{e(Le(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(vt);function ie({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=Y(),a=K(),r=z(),d=M(),{tenantEmailDomain:c,accountId:p}=G(),{useDynamicConfig:m}=$(),{useFeatureGate:x}=$(),{isFeatureEnabled:i}=x(O.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=x(O.isCheckingCommentingEnabled),h=w(H=>V(H)),{configValue:C}=m(W.expressPayConfig),b=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(h.tenantId),g=!!h.companyBillPayInfo?.info?.isBillPayEnabled,A=D.getSignedInUser(),I=h.companyId??D.getSignedInUserTenant(c)?.companyId,f={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:h.tenantId??""},S=`${Ie}/account_details`,[B,U]=u.useState(!1),[j,v]=u.useState(!1),[E,T]=u.useState(!1),[P,y]=u.useState(!1),N=w(H=>nn(H,p??"")),oe=N.fetchState,{isAiCfoAccessEnabled:se,onAskAiCfoClick:me}=sn({mobileExploreReferrer:"Checking Account Detail"});rn({isDataReady:oe==="Completed"}),u.useEffect(()=>{B||(r(tn(p??"",!1)),U(!0))},[B,r,oe]),u.useEffect(()=>{y(s!=null&&s===!0)},[s]),u.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{T(t!=null&&t===!0)},[t]);const Z=()=>{y(!1),a("..")};return n.jsxs(n.Fragment,{children:[P===!0&&N.accountDetail!=null?n.jsx(Xt,{authParams:f,downloadAccountDetailEndPoint:S,closeDrawerHandler:Z,isAccountInfoDrawerOpen:P,zeniBankAccountDetail:N.accountDetail}):null,j===!0?n.jsx(ln,{closeDrawerHandler:Z,isTransferDrawerOpen:j,zeniAccountsConfig:N.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:S}):null,E===!0?n.jsx(cn,{closeDrawerHandler:Z,isCheckDepositDrawerOpen:E}):null,n.jsx(la,{windowSize:d,children:n.jsx(da,{navigate:a,currentTenant:h,location:o,companyId:I,isDebitCardFeatureEnabled:i,accountId:p??"",isBillPayEnabled:g,isCheckingCommentingEnabled:l,isExpressPayEnabled:b,isAiCfoAccessEnabled:se,onAskAiCfoClick:me})})]})}const ua=(e,t)=>`/${e}/checking/${t}/account-info`,pa=(e,t)=>`/${e}/checking/${t}/transactions`,ma=(e,t)=>`/${e}/checking/${t}/statements`,ha=L.div`
58
58
  display: flex;
59
59
  height: 100vh;
60
60
  width: 100%;
@@ -63,4 +63,4 @@ import{j as n}from"./liveblocks-CCyJOwfy.js";import{j as K,u as Y,h as z,l as Z,
63
63
  overflow: auto;
64
64
  align-items: center;
65
65
  background-color: ${e=>e.theme.colors.grey4};
66
- `;function ga(){const e=K(),t=z(),s=V(),{accountId:o}=Z(),{useFeatureGate:a}=$(),{isFeatureEnabled:r}=a(O.isCheckingCommentingEnabled),[d,c]=u.useState(!1);u.useEffect(()=>{d||(c(!0),t(lt(o??"",!1)))},[d,t]);const p=w(m=>dt(m,o??""));if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ha,{windowSize:s,children:n.jsx(Pt,{transactionListView:p,depositAccountId:o??"",isCheckingCommentingEnabled:r,onBackClick:()=>{e("../")}})})}const fa=J(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:ut(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),e(pt(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Tt),ya=()=>{const e=K(),t=Y(),{tenantEmailDomain:s}=Z(),{useDynamicConfig:o}=$(),a=M(),[r,d]=u.useState(!1),[c,p]=u.useState(!1),m=w(f=>_(f)),{configValue:x}=o(W.zeniAccountsConfig),i=we(x);u.useEffect(()=>{c===!1&&t.state?.message==="activation"&&p(!0)},[t.state]);const l=D.getSignedInUserTenant(s)?.companyId??m.companyId,h=D.getSignedInUser(),C=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=f=>{d(f)};if(h==null)throw Error("Can't access Zeni account promo page without signing in...");const g=ae(),A=te(g?.loggedInUserRoleMap),I=Ae(g?.loggedInUserRoleMap);if(C&&A)return n.jsx(ne,{to:"../../checking/setup"});if(m.company?.companyZeniAccountInfo&&(!C&&A||I)){if(t.state?.message==="activation"){const f=an(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(jt,{showConfetti:c}),n.jsx(ue,{analytics:R,onLoad:f=>(S=>S.trackPageLoaded(be.Event.accountsPromoPageViewed))(f)}),n.jsx(pe,{isAppContentDrawerOpen:r,handleDrawerToggle:b}),n.jsx(fa,{analytics:R,navigate:e,companyId:l,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Ha(){const e=Y(),t=w(P=>_(P)),s=M(),{useFeatureGate:o,useDynamicConfig:a}=$(),r=ae(),d=te(r?.loggedInUserRoleMap),c=Ae(r?.loggedInUserRoleMap),p=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,m=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(O.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(O.isDebitCardFeatureEnabled),l=Xe(t),h=De(i,t),C=t?.userRole!=null&&mt(t?.userRole),b=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C)&&ht(r?.loggedInUserRoleMap),g=gt(r?.loggedInUserRoleMap),A=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C)&&ft(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(O.isDepositAccountsFeatureEnabled),f=I&&!C,{configValue:S}=a(W.expressPayConfig),B=S.is_enable_all_tenants===!0||S.tenant_ids!=null&&S.tenant_ids.includes(t.tenantId),{isFeatureEnabled:U}=o(O.isAutoTransferRuleEnabled),j=Ot(t,x,i)&&!C&&yt(r?.loggedInUserRoleMap),v=xt(r?.loggedInUserRoleMap),E=f&&te(r?.loggedInUserRoleMap),T=E||Ne(r?.loggedInUserRoleMap);return n.jsxs(Ve,{children:[n.jsx(k,{path:"setup",element:n.jsx(_e,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),n.jsx(k,{path:"verification",element:n.jsx(_e,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),U?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"auto-transfer",element:n.jsx(Me,{})}),T?n.jsx(k,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Me,{isEditDrawerOpen:!0})}):null]}):n.jsx(k,{path:"auto-transfer",element:n.jsx(ce,{})}),B&&d?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"express-pay",element:n.jsx(re,{})}),n.jsx(k,{path:"express-pay/add-ach",element:n.jsx(re,{isAddACHDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire/add-address",element:n.jsx(re,{isAddAddressDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire",element:n.jsx(re,{isAddWireDrawerOpen:!0})})]}):n.jsx(k,{path:"express-pay",element:n.jsx(ce,{})}),n.jsx(k,{path:"promo",element:n.jsx(ya,{})}),l&&!h?n.jsx(k,{path:"/*",element:n.jsx(on,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"/",element:n.jsx(xe,{})}),n.jsx(k,{path:"transfer",element:n.jsx(xe,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(xe,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:":accountId/*",element:n.jsx(xa,{})}),n.jsx(k,{path:"*",element:n.jsx(ce,{})})]}):m&&d?n.jsx(k,{path:"*",element:n.jsx(ne,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(k,{path:"*",element:n.jsx(ne,{to:"../promo",state:e.state})}):n.jsx(k,{path:"*",element:n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Bt.sp1} ${s.colors.dropShadowNormal}`}})})]})}function xa(){return n.jsxs(Ve,{children:[n.jsx(k,{path:"/",element:n.jsx(ie,{})}),n.jsx(k,{path:"account-info",element:n.jsx(ie,{isAccountInfoDrawerOpen:!0})}),n.jsx(k,{path:"transfer",element:n.jsx(ie,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(ie,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:"transactions",element:n.jsx(ga,{})}),n.jsx(k,{path:"statements",element:n.jsx(zt,{})}),n.jsx(k,{path:"*",element:n.jsx(ce,{})})]})}export{Ha as default};
66
+ `;function ga(){const e=K(),t=z(),s=M(),{accountId:o}=G(),{useFeatureGate:a}=$(),{isFeatureEnabled:r}=a(O.isCheckingCommentingEnabled),[d,c]=u.useState(!1);u.useEffect(()=>{d||(c(!0),t(lt(o??"",!1)))},[d,t]);const p=w(m=>dt(m,o??""));if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ha,{windowSize:s,children:n.jsx(Pt,{transactionListView:p,depositAccountId:o??"",isCheckingCommentingEnabled:r,onBackClick:()=>{e("../")}})})}const fa=q(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:ut(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),e(pt(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Tt),ya=()=>{const e=K(),t=Y(),{tenantEmailDomain:s}=G(),{useDynamicConfig:o}=$(),a=_(),[r,d]=u.useState(!1),[c,p]=u.useState(!1),m=w(f=>V(f)),{configValue:x}=o(W.zeniAccountsConfig),i=we(x);u.useEffect(()=>{c===!1&&t.state?.message==="activation"&&p(!0)},[t.state]);const l=D.getSignedInUserTenant(s)?.companyId??m.companyId,h=D.getSignedInUser(),C=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=f=>{d(f)};if(h==null)throw Error("Can't access Zeni account promo page without signing in...");const g=ae(),A=te(g?.loggedInUserRoleMap),I=Ae(g?.loggedInUserRoleMap);if(C&&A)return n.jsx(ne,{to:"../../checking/setup"});if(m.company?.companyZeniAccountInfo&&(!C&&A||I)){if(t.state?.message==="activation"){const f=an(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(jt,{showConfetti:c}),n.jsx(ue,{analytics:R,onLoad:f=>(S=>S.trackPageLoaded(be.Event.accountsPromoPageViewed))(f)}),n.jsx(pe,{isAppContentDrawerOpen:r,handleDrawerToggle:b}),n.jsx(fa,{analytics:R,navigate:e,companyId:l,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Ha(){const e=Y(),t=w(P=>V(P)),s=_(),{useFeatureGate:o,useDynamicConfig:a}=$(),r=ae(),d=te(r?.loggedInUserRoleMap),c=Ae(r?.loggedInUserRoleMap),p=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,m=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(O.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(O.isDebitCardFeatureEnabled),l=Xe(t),h=De(i,t),C=t?.userRole!=null&&mt(t?.userRole),b=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C)&&ht(r?.loggedInUserRoleMap),g=gt(r?.loggedInUserRoleMap),A=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C)&&ft(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(O.isDepositAccountsFeatureEnabled),f=I&&!C,{configValue:S}=a(W.expressPayConfig),B=S.is_enable_all_tenants===!0||S.tenant_ids!=null&&S.tenant_ids.includes(t.tenantId),{isFeatureEnabled:U}=o(O.isAutoTransferRuleEnabled),j=Ot(t,x,i)&&!C&&yt(r?.loggedInUserRoleMap),v=xt(r?.loggedInUserRoleMap),E=f&&te(r?.loggedInUserRoleMap),T=E||Ne(r?.loggedInUserRoleMap);return n.jsxs(Me,{children:[n.jsx(k,{path:"setup",element:n.jsx(Ve,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),n.jsx(k,{path:"verification",element:n.jsx(Ve,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),U?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"auto-transfer",element:n.jsx(_e,{})}),T?n.jsx(k,{path:"auto-transfer/:ruleId/edit",element:n.jsx(_e,{isEditDrawerOpen:!0})}):null]}):n.jsx(k,{path:"auto-transfer",element:n.jsx(ce,{})}),B&&d?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"express-pay",element:n.jsx(re,{})}),n.jsx(k,{path:"express-pay/add-ach",element:n.jsx(re,{isAddACHDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire/add-address",element:n.jsx(re,{isAddAddressDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire",element:n.jsx(re,{isAddWireDrawerOpen:!0})})]}):n.jsx(k,{path:"express-pay",element:n.jsx(ce,{})}),n.jsx(k,{path:"promo",element:n.jsx(ya,{})}),l&&!h?n.jsx(k,{path:"/*",element:n.jsx(on,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"/",element:n.jsx(xe,{})}),n.jsx(k,{path:"transfer",element:n.jsx(xe,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(xe,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:":accountId/*",element:n.jsx(xa,{})}),n.jsx(k,{path:"*",element:n.jsx(ce,{})})]}):m&&d?n.jsx(k,{path:"*",element:n.jsx(ne,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(k,{path:"*",element:n.jsx(ne,{to:"../promo",state:e.state})}):n.jsx(k,{path:"*",element:n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Bt.sp1} ${s.colors.dropShadowNormal}`}})})]})}function xa(){return n.jsxs(Me,{children:[n.jsx(k,{path:"/",element:n.jsx(ie,{})}),n.jsx(k,{path:"account-info",element:n.jsx(ie,{isAccountInfoDrawerOpen:!0})}),n.jsx(k,{path:"transfer",element:n.jsx(ie,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(ie,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:"transactions",element:n.jsx(ga,{})}),n.jsx(k,{path:"statements",element:n.jsx(zt,{})}),n.jsx(k,{path:"*",element:n.jsx(ce,{})})]})}export{Ha as default};
@@ -0,0 +1,9 @@
1
+ import{j as i}from"./liveblocks-D0ylGz77.js";import{a as u}from"./sentry-C5UCCkb_.js";import{j as x,h as j,u as B,l as C,g as p}from"./core-DSsu1iyO.js";import{ID as s,IC as T,OT as $,eR as v,OU as D}from"./zeni-epic-state-CFQMpWBE.js";import{K as z,aq as g,m as E,z as L,B as P,b_ as U,q as _}from"./index-CPG6ITBm.js";import{n as N}from"./mui-D9TDAUAO.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]="41a58343-c2aa-4077-95ff-0e1a089d6f7f",e._sentryDebugIdIdentifier="sentry-dbid-41a58343-c2aa-4077-95ff-0e1a089d6f7f")}catch{}})();const q=N.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 V(){const e=x(),n=j(),d=z(),f=B();let{accountId:a}=C(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&f.pathname.includes(`${s}/statements`)&&(a=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,y]=u.useState(!1),h=E();u.useEffect(()=>{m||(y(!0),n(T(a??"",!1)))},[m,n]);const o=p(t=>$(t,a??"")),I=()=>{const t=_(f.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=L.getSignedInUser(),c=p(t=>v(t)),b={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=D(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(q,{windowSize:d,children:i.jsx(U,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:l})})}export{V as Z};
@@ -1 +1 @@
1
- import"./sentry-Wnm-N8eT.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}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 a(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{d as a,i as g,a as m};
1
+ import"./sentry-C5UCCkb_.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}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 a(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{d as a,i as g,a as m};