@zeniai/web-app-ui 5.3.43-dev → 5.3.44-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 (146) hide show
  1. package/dist/assets/{AccountMappingScreen-MfXsPj8M.js → AccountMappingScreen-UqzolSvj.js} +2 -2
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-DPtLhEgD.js → ActualMatchingMatchDetailScreen-DvnLcSva.js} +1 -1
  3. package/dist/assets/AddressRoutes-CcJSg_44.js +1 -0
  4. package/dist/assets/{AddressScreen-tI262EI8.js → AddressScreen-gQBK8ckZ.js} +2 -2
  5. package/dist/assets/AiCfoScreen-rhd63jOS.js +22 -0
  6. package/dist/assets/{AppDrawer-CK8Oi_Um.js → AppDrawer-Dlrqb_DI.js} +2 -2
  7. package/dist/assets/{BillPayApprovalRoutes-BG4wkb9h.js → BillPayApprovalRoutes-J2csFmUv.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-B82H1r4T.js → BillPayRoutes-BuX7Ysfe.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-BLwno7qB.js → BusinessVerificationPageScreen-CYmgKyWB.js} +2 -2
  10. package/dist/assets/{CardsAiCfoScreen-BJxdbSYR.js → CardsAiCfoScreen-D5bmWtQj.js} +2 -2
  11. package/dist/assets/{ChargeCardRoutes-CMUVGkhr.js → ChargeCardRoutes-qFznVjyh.js} +9 -9
  12. package/dist/assets/CompanyPassportScreen-Cw4qPFsz.js +1 -0
  13. package/dist/assets/ConnectionAuthScreen-DpnCIn36.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-fFnxBFsG.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-CbzfyCjZ.js → CustomerOnboardingRoutes-DADpm1-R.js} +3 -3
  16. package/dist/assets/{DashboardRoutes-BeQuxWvV.js → DashboardRoutes-RTl8SBKF.js} +3 -3
  17. package/dist/assets/{DefaultTenantHome-RKPiTReZ.js → DefaultTenantHome-BCQyKjss.js} +1 -1
  18. package/dist/assets/DomesticWireDetailScreen-B2Dv5N-8.js +18 -0
  19. package/dist/assets/DrawerScreen-B3usdaEN.js +1 -0
  20. package/dist/assets/EntityDetailRoutes-BsIY7KLk.js +1 -0
  21. package/dist/assets/{ExpenseAutomationRoutes-CurjmTHm.js → ExpenseAutomationRoutes-BZuDhvV9.js} +5 -5
  22. package/dist/assets/FeaturePreviewScreen-Dq-gMmD5.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-ti-vGVVM.js +1 -0
  24. package/dist/assets/InboxNotificationsProvider-CMdsyY0A.js +1 -0
  25. package/dist/assets/InvoicingRoutes-BAZ_wYhc.js +2 -0
  26. package/dist/assets/{MagicLinkRoutes-VkRBz-4x.js → MagicLinkRoutes-Cp7W5OaZ.js} +6 -6
  27. package/dist/assets/MagicLinkSignInScreen-Hg-dBKwT.js +12 -0
  28. package/dist/assets/MobileAppDrawer-DA5tIumN.js +1 -0
  29. package/dist/assets/NotFoundScreen-BgAFt-5i.js +1 -0
  30. package/dist/assets/NotificationRoutes-CA8OfvWh.js +1 -0
  31. package/dist/assets/OAuthConsentScreen-DuymkWfG.js +1 -0
  32. package/dist/assets/PandLWithForecastRoutes-BYaLWmQK.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-xK_McxjH.js → PaymentLinkScreen-SzWjdXHe.js} +7 -7
  34. package/dist/assets/PeopleRoutes-DGZOBj_n.js +22 -0
  35. package/dist/assets/PerformanceRoutes-Rd2cy2wG.js +1 -0
  36. package/dist/assets/{Preview-DKbH4DZo.js → Preview-DEgobwYA.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-CqIFgusE.js → QBOConnectionScreen-Pep2m7tL.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRoutes-B2dZhJk9.js → ReimbursementApprovalRoutes-FyVCnT2D.js} +1 -1
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-NYDKW5M_.js → ReimbursementApprovalRuleDetailScreen-ujR5DhGT.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-B4vB3DWh.js → ReimbursementRoutes-D6hHkmNY.js} +7 -7
  41. package/dist/assets/{ReportsRoutes-QNTHdw6g.js → ReportsRoutes-CSRrLesZ.js} +1 -1
  42. package/dist/assets/RewardsRoutes-D3NucCvR.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-YdcDOaAu.js → ScheduleDetailsPrepaidExpensesScreen-CoKqzu6u.js} +5 -5
  44. package/dist/assets/ScreenRoutes-DrXZscTn.js +2 -0
  45. package/dist/assets/{SettingsRoutes-DIXSeHUD.js → SettingsRoutes-CeF4sDpp.js} +6 -6
  46. package/dist/assets/{SetupPagesScreen-DV-Hyv78.js → SetupPagesScreen-xbVRY5FM.js} +5 -5
  47. package/dist/assets/SignInScreen-3TXPLKBf.js +1 -0
  48. package/dist/assets/SignOutScreen-DJJZrQ7n.js +9 -0
  49. package/dist/assets/{TaskListScreen-CbiI2IGU.js → TaskListScreen-DeFmRGCq.js} +2 -2
  50. package/dist/assets/TaskRoutes-C_gQqYfz.js +9 -0
  51. package/dist/assets/TransactionDetailRoutes-CUuBppM-.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-DA_15rvE.js → TransactionDetailScreen-Dc3CB9-k.js} +2 -2
  53. package/dist/assets/{TransactionListRoutes-DUel89dv.js → TransactionListRoutes-CyfLxIjr.js} +1 -1
  54. package/dist/assets/{TreasuryRoutes-DNsqL_xe.js → TreasuryRoutes-Cg6sof_M.js} +6 -6
  55. package/dist/assets/{VendorsRoutes-DENWe8ir.js → VendorsRoutes-B8PjBX37.js} +11 -11
  56. package/dist/assets/WiseConfirmationScreen-ClpBhyuK.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-BzmSgvJI.js → ZeniAccountRoutes-s0zzwNig.js} +11 -11
  58. package/dist/assets/ZeniAccountStatementScreen-CUt_2P5O.js +9 -0
  59. package/dist/assets/{accountMappingHelper-CQrmB6jj.js → accountMappingHelper-Djr6f8Xt.js} +1 -1
  60. package/dist/assets/{analytics-BTvt2K3S.js → analytics-B06OpwA-.js} +1 -1
  61. package/dist/assets/{analyticsHelper-BwLj34Ys.js → analyticsHelper-D34fCnq4.js} +1 -1
  62. package/dist/assets/{core-BwK6FGJd.js → core-Bl4MLhFi.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-iAavL6tS.js → decodeURIComponentSafe-Buybgpqw.js} +1 -1
  64. package/dist/assets/{dnd-Cbdx7tVf.js → dnd-CimhpTrK.js} +1 -1
  65. package/dist/assets/{empty-CTWnX7jn.js → empty-B4WpR10s.js} +1 -1
  66. package/dist/assets/{empty-DbO4voXD.js → empty-BTbLiTP7.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-BdvQlKL1.js → emptyVideoElement-Do1ktOmR.js} +1 -1
  68. package/dist/assets/epic-Ck-sEMUn.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-CkBJgYs_.js +1 -0
  70. package/dist/assets/{getLocaleForTenant-DzgzmDle.js → getLocaleForTenant-CoMy5DMb.js} +1 -1
  71. package/dist/assets/{index-Bexws62p.js → index-BKWyG8Iu.js} +1 -1
  72. package/dist/assets/{index-DCOMaDuK.js → index-BXYzwgW0.js} +1 -1
  73. package/dist/assets/{index-SQoDfHg2.js → index-Bmwrrrme.js} +1 -1
  74. package/dist/assets/{index-BhX9D2PW.js → index-CivWMXxp.js} +1 -1
  75. package/dist/assets/{index-DstkpwOZ.js → index-DFR56SYR.js} +2 -2
  76. package/dist/assets/{index-DTZt8DRK.js → index-DdFMa5Bp.js} +26965 -26965
  77. package/dist/assets/{index-D2_EUTG6.js → index-H-kll8aI.js} +1 -1
  78. package/dist/assets/{index-B_VJsceg.js → index-jyJQzleF.js} +1 -1
  79. package/dist/assets/{lexical-DRfKJLK3.js → lexical-BbBoQdpc.js} +1 -1
  80. package/dist/assets/{liveblocks-y3zMPGKB.js → liveblocks-BXyXenK7.js} +2 -2
  81. package/dist/assets/{lottie-BQlGSG2c.js → lottie-2qUppQdg.js} +1 -1
  82. package/dist/assets/{mui-CxIkaR9n.js → mui-CyP-P4av.js} +1 -1
  83. package/dist/assets/{pathToGoBack-QMp9zrtx.js → pathToGoBack-sGBxvK0B.js} +1 -1
  84. package/dist/assets/{pdf-DGzvSuDl.js → pdf-BENieWk6.js} +4 -4
  85. package/dist/assets/{pdf-lib-Bm6tpkCo.js → pdf-lib-CLkFJB86.js} +1 -1
  86. package/dist/assets/{plaid-CQqwPn97.js → plaid-C0aCR9wu.js} +1 -1
  87. package/dist/assets/{pusher-DpL50lnb.js → pusher-B9dsvvYE.js} +1 -1
  88. package/dist/assets/{react-8Gpe_kpB.js → react-BqELFJJh.js} +1 -1
  89. package/dist/assets/{react-ZBsIhK1t.js → react-BvpkKAe3.js} +1 -1
  90. package/dist/assets/{react-Tycrsh8q.js → react-C4fns4CR.js} +1 -1
  91. package/dist/assets/{react-CwBUDYOl.js → react-DEsZRrdi.js} +1 -1
  92. package/dist/assets/{react-12W2NDka.js → react-DIwVQX4M.js} +1 -1
  93. package/dist/assets/{react-CCyW6CxJ.js → react-Do3Z3oDl.js} +1 -1
  94. package/dist/assets/{recharts-CoAMGh71.js → recharts-CZKBTuPa.js} +1 -1
  95. package/dist/assets/{routePaths-CPqwWbPN.js → routePaths-oqx5AHwx.js} +1 -1
  96. package/dist/assets/{sentry-Jm7O5sR0.js → sentry-D4svnzxK.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-nQAZVh5Z.js → stripSplatSuffix-G7yC23v6.js} +1 -1
  98. package/dist/assets/{url-D9zjpdeS.js → url-SRUWz_6t.js} +1 -1
  99. package/dist/assets/{url-B9xXiyVk.js → url-m7LStd7o.js} +1 -1
  100. package/dist/assets/useActualMatchingMatchDetail-B-RVJebe.js +1 -0
  101. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-C3x9GIES.js → useAiCfoDashboardSuggestedQuestionsChips-CRZx6_Vo.js} +1 -1
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-noW3mVAb.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-aPfygpSV.js → useChargeCardPusherEvents-CNMEwaVx.js} +1 -1
  104. package/dist/assets/{useDeviceId-DdPl1EVl.js → useDeviceId-4WJY9vuN.js} +1 -1
  105. package/dist/assets/useEmailConnectResultRefresh-BhDAqhV0.js +1 -0
  106. package/dist/assets/{useInitialThreadRequest-BWyM3F-W.js → useInitialThreadRequest-CfcBXZPI.js} +1 -1
  107. package/dist/assets/useTaskManagerAccess-DNpJRUSa.js +1 -0
  108. package/dist/assets/{utils-BVIT21dc.js → utils-Bycom664.js} +1 -1
  109. package/dist/assets/{withTransactionSidePanel-Cd_M2p_z.js → withTransactionSidePanel-ovjS6IUs.js} +2 -2
  110. package/dist/assets/{zeni-epic-state-BugXGzus.js → zeni-epic-state-UM7IPCLf.js} +6 -6
  111. package/dist/index.html +1 -1
  112. package/package.json +3 -3
  113. package/dist/assets/AddressRoutes-CQjpNxne.js +0 -1
  114. package/dist/assets/AiCfoScreen-DMyEpPj8.js +0 -22
  115. package/dist/assets/CompanyPassportScreen-C_r9krre.js +0 -1
  116. package/dist/assets/ConnectionAuthScreen-DckWKyp-.js +0 -11
  117. package/dist/assets/CustomerOnboardingAuthScreen--oM8fIUf.js +0 -1
  118. package/dist/assets/DomesticWireDetailScreen-42PVSRte.js +0 -18
  119. package/dist/assets/DrawerScreen-DQY8vrlv.js +0 -1
  120. package/dist/assets/EntityDetailRoutes-Br-C_K-o.js +0 -1
  121. package/dist/assets/FeaturePreviewScreen-C8dKuiF7.js +0 -1
  122. package/dist/assets/HubSpotOAuthCallbackScreen-Ct9QwCVK.js +0 -1
  123. package/dist/assets/InboxNotificationsProvider-ozJWRqdQ.js +0 -1
  124. package/dist/assets/InvoicingRoutes-B_3tGcpp.js +0 -2
  125. package/dist/assets/MagicLinkSignInScreen-D6KHJfXd.js +0 -12
  126. package/dist/assets/MobileAppDrawer-plEMRzd-.js +0 -1
  127. package/dist/assets/NotFoundScreen-DVcHaqdZ.js +0 -1
  128. package/dist/assets/NotificationRoutes-DporIbci.js +0 -1
  129. package/dist/assets/OAuthConsentScreen-Bwiy1dZe.js +0 -1
  130. package/dist/assets/PandLWithForecastRoutes-4dzVDYi7.js +0 -1
  131. package/dist/assets/PeopleRoutes-CzBniqLj.js +0 -22
  132. package/dist/assets/PerformanceRoutes-DQVFxHI8.js +0 -1
  133. package/dist/assets/RewardsRoutes-B7P2nmYk.js +0 -1
  134. package/dist/assets/ScreenRoutes-Cy1wpKTY.js +0 -2
  135. package/dist/assets/SignInScreen-DvhFy3xy.js +0 -1
  136. package/dist/assets/SignOutScreen-C5uG0eM1.js +0 -9
  137. package/dist/assets/TaskRoutes-DNWDTIHG.js +0 -9
  138. package/dist/assets/TransactionDetailRoutes-CGamazG6.js +0 -1
  139. package/dist/assets/WiseConfirmationScreen-CO8k4M88.js +0 -12
  140. package/dist/assets/ZeniAccountStatementScreen-CuxmtWXH.js +0 -9
  141. package/dist/assets/epic-BUtbsU0k.js +0 -2
  142. package/dist/assets/expenseAutomationHelper-MxNxlZNN.js +0 -1
  143. package/dist/assets/useActualMatchingMatchDetail-Asb0lSO5.js +0 -1
  144. package/dist/assets/useAskAiCfoHostNavButtonProps-DzjGv8Xy.js +0 -1
  145. package/dist/assets/useEmailConnectResultRefresh-CCE7kCjs.js +0 -1
  146. package/dist/assets/useTaskManagerAccess-DRF4urEw.js +0 -1
@@ -1,8 +1,8 @@
1
- import{j as o}from"./liveblocks-y3zMPGKB.js";import{a as u}from"./sentry-Jm7O5sR0.js";import{h as N,u as G,i as z,j as f,l as $,g as q,n as Me,o as V,N as L}from"./core-BwK6FGJd.js";import{Vw as gt,Vx as Ze,Rj as et,Vy as vt,fE as U,gZ as ge,Vz as xt,cE as Tt,VA as bt,Fu as yt,VB as wt,VC as oe,VD as te,VE as ve,SU as ue,SV as ke,FK as pe,ST as he,Fx as tt,F4 as Ve,VF as It,SW as Y,l_ as me,VG as je,E_ as Ct,VH as Dt,VI as Et,VJ as Pe,VK as _e,VL as Ae,VM as Re,FE as xe,VN as nt,Fl as at,VO as Ft,VP as kt,VQ as Vt,VR as jt,VS as Pt,VT as _t,VU as At,VV as Rt,Ce as Ut,Cm as Lt,Cf as Bt,R$ as we,VW as Ot,VX as Mt,le as Ie,br as Nt,VY as $t,VZ as Gt,mY as Wt,n5 as zt,R_ as Ce,bE as Ne,V_ as ot,RB as st,V$ as Yt,W0 as Jt,W1 as Kt,n7 as qt,W2 as $e,W3 as Ge,W4 as We,W5 as ze,W6 as Ht,n3 as Qt,W7 as Xt,n6 as Zt,W8 as en,W9 as it,Sk as rt,mm as tn,Wa as nn,Wb as De,Wc as dt,Si as lt,I1 as an,Wd as on,We as sn,mG as ct,Wf as rn,Wg as dn,Sw as ln,vb as cn,Wh as ut,Wi as Ye,St as Ee,Wj as Je,Wk as un,Sy as pn,Wl as hn,Wm as mn,Wn as fn,Wo as Sn,Wp as gn,ve as vn,Wq as xn,SX as Tn,Uv as bn,Sb as Fe,i9 as yn,Ux as wn,Uw as In,i7 as Cn,Wr as Dn,Ws as En,I6 as Fn,Wt as kn,Wu as Vn,Wv as jn,Ww as Pn,mq as _n,bn as An,dZ as Rn,dY as Un}from"./zeni-epic-state-BugXGzus.js";import{E as Ln,a1 as ne,ab as Ue,O as H,c as M,z as R,a7 as Bn,aM as On,k as j,X as Le,$ as Te,av as ee,as as se,aN as Mn,aO as pt,aq as Nn,a8 as Se,aP as $n,p as K,U as Gn,G as ht,aQ as Wn,ae as mt,a4 as zn,j as Ke,aR as Yn,J,a9 as Jn,af as ft,ag as Kn,aS as qn,aT as Hn,T as Be,aU as Qn,aV as Xn,a3 as Zn,aW as ea,aX as ta}from"./index-DTZt8DRK.js";import{D as na,n as B,S as St}from"./mui-CxIkaR9n.js";import{t as aa,A as oa}from"./AddressScreen-tI262EI8.js";import fe from"./NotFoundScreen-DVcHaqdZ.js";import{F as sa}from"./FeaturePreviewScreen-C8dKuiF7.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-YdcDOaAu.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-DzjGv8Xy.js";import{M as re}from"./MobileAppDrawer-plEMRzd-.js";import{v as Oe,c as ua,d as pa}from"./routePaths-CPqwWbPN.js";import{D as ha}from"./DrawerScreen-DQY8vrlv.js";import{a as ma,m as fa}from"./accountMappingHelper-CQrmB6jj.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./pathToGoBack-QMp9zrtx.js";import"./InboxNotificationsProvider-ozJWRqdQ.js";import"./useTaskManagerAccess-DRF4urEw.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]="00970186-ca4c-4bcc-9a2d-5d9a40288b6a",e._sentryDebugIdIdentifier="sentry-dbid-00970186-ca4c-4bcc-9a2d-5d9a40288b6a")}catch{}})();const Sa={drawerLeftMargin:new Ue(0,0,100,200)},ga=$((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=U(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?xt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,x={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},T=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:x,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:T,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:Tt(Le.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(On),va=()=>{const e=Ln(),a=N(),s=G(),{scheduleDetailId:t}=z(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=z(),{useFeatureGate:p}=H(),{isFeatureEnabled:h}=p(M.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,x=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,T=x?.type==="recommended"?x.recommendedTransactionID:x?.transactionDetailID;u.useEffect((()=>{T!=null&&s(et(T))}),[]),u.useEffect((()=>{x?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>U(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(xa,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Bn,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},xa=B(St)`
1
+ import{j as o}from"./liveblocks-BXyXenK7.js";import{a as u}from"./sentry-D4svnzxK.js";import{h as N,u as W,i as z,j as f,l as G,g as K,n as Me,o as V,N as L}from"./core-Bl4MLhFi.js";import{Vy as gt,Vz as Xe,Rl as et,VA as vt,fE as U,gZ as ge,VB as xt,cE as Tt,VC as bt,Fw as yt,VD as wt,VE as oe,VF as te,VG as ve,SW as ue,SX as ke,FM as pe,SV as he,Fz as tt,F6 as Ve,VH as It,SY as Y,l_ as me,VI as je,F0 as Ct,VJ as Dt,VK as Et,VL as Pe,VM as _e,VN as Ae,VO as Re,FG as xe,VP as nt,Fn as at,VQ as Ft,VR as kt,VS as Vt,VT as jt,VU as Pt,VV as _t,VW as At,VX as Rt,Cg as Ut,Co as Lt,Ch as Bt,S1 as we,VY as Ot,VZ as Mt,le as Ie,br as Nt,V_ as Gt,V$ as Wt,mY as $t,n5 as zt,S0 as Ce,bE as Ne,W0 as ot,RD as st,W1 as Yt,W2 as Jt,W3 as qt,n7 as Kt,W4 as Ge,W5 as We,W6 as $e,W7 as ze,W8 as Ht,n3 as Qt,W9 as Zt,n6 as Xt,Wa as en,Wb as it,Sm as rt,mm as tn,Wc as nn,Wd as De,We as dt,Sk as lt,I3 as an,Wf as on,Wg as sn,mG as ct,Wh as rn,Wi as dn,Sy as ln,vb as cn,Wj as ut,Wk as Ye,Sv as Ee,Wl as Je,Wm as un,SA as pn,Wn as hn,Wo as mn,Wp as fn,Wq as Sn,Wr as gn,ve as vn,Ws as xn,SZ as Tn,Ux as bn,Sd as Fe,i9 as yn,Uz as wn,Uy as In,i7 as Cn,Wt as Dn,Wu as En,I8 as Fn,Wv as kn,Ww as Vn,Wx as jn,Wy as Pn,mq as _n,bn as An,dZ as Rn,dY as Un}from"./zeni-epic-state-UM7IPCLf.js";import{c as Ln,a1 as ne,ab as Ue,N as H,d as M,z as R,a7 as Bn,aM as On,k as j,Z as Le,E as Te,av as ee,as as se,aN as Mn,aO as pt,aq as Nn,a8 as Se,aP as Gn,p as q,U as Wn,G as ht,aQ as $n,ae as mt,a4 as zn,j as qe,aR as Yn,H as J,a9 as Jn,af as ft,ag as qn,aS as Kn,aT as Hn,S as Be,aU as Qn,aV as Zn,a3 as Xn,aW as ea,aX as ta}from"./index-DdFMa5Bp.js";import{D as na,n as B,S as St}from"./mui-CyP-P4av.js";import{t as aa,A as oa}from"./AddressScreen-gQBK8ckZ.js";import fe from"./NotFoundScreen-BgAFt-5i.js";import{F as sa}from"./FeaturePreviewScreen-Dq-gMmD5.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-CoKqzu6u.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-noW3mVAb.js";import{M as re}from"./MobileAppDrawer-DA5tIumN.js";import{v as Oe,c as ua,d as pa}from"./routePaths-oqx5AHwx.js";import{D as ha}from"./DrawerScreen-B3usdaEN.js";import{a as ma,m as fa}from"./accountMappingHelper-Djr6f8Xt.js";import"./recharts-CZKBTuPa.js";import"./analytics-B06OpwA-.js";import"./plaid-C0aCR9wu.js";import"./dnd-CimhpTrK.js";import"./stripe-cKAAJElX.js";import"./lottie-2qUppQdg.js";import"./lexical-BbBoQdpc.js";import"./pdf-BENieWk6.js";import"./utils-Bycom664.js";import"./pathToGoBack-sGBxvK0B.js";import"./InboxNotificationsProvider-CMdsyY0A.js";import"./useTaskManagerAccess-DNpJRUSa.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]="a902f77f-6c15-4bb0-85a7-285247e16239",e._sentryDebugIdIdentifier="sentry-dbid-a902f77f-6c15-4bb0-85a7-285247e16239")}catch{}})();const Sa={drawerLeftMargin:new Ue(0,0,100,200)},ga=G((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Xe(e,a.scheduleType),h=U(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?xt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,x={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},T=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:x,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:T,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:Tt(Le.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(On),va=()=>{const e=Ln(),a=N(),s=W(),{scheduleDetailId:t}=z(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=z(),{useFeatureGate:p}=H(),{isFeatureEnabled:h}=p(M.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Xe(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,x=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,T=x?.type==="recommended"?x.recommendedTransactionID:x?.transactionDetailID;u.useEffect((()=>{T!=null&&s(et(T))}),[]),u.useEffect((()=>{x?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>U(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(xa,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Bn,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},xa=B(St)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
5
- `,de=e=>{switch(e){case"vendors_tab":return"../summary";case"filing_1099":return"../filing_1099";case"prepaid_expenses":return"../schedules/prepaid_expenses";case"fixed_assets":return"../schedules/fixed_assets";case"accrued_expenses":return"../schedules/accrued_expenses";default:return"../opex"}},le=e=>{switch(e){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"operating_expenses_by_vendor":return"operating_expenses";default:return"vendors_list"}},ce=()=>{const e=q(),a=G(),s=f((t=>oe(t)));return u.useEffect((()=>{const t=e.pathname.split("/").pop();if(t!=null){const n=(i=>{switch(i){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"opex":return"operating_expenses";case"filing_1099":return"filing_1099";default:return"vendors_list"}})(t);n!==s.currentTab&&a(te(n))}}),[e.pathname,s.currentTab,a]),s},Q="accrued_expenses",Ta=$((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Q,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Q,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:Q,searchText:t}))},onReloadReport:()=>{e(tt(Q))},onScroll:t=>{e(Pe({scheduleType:Q,scrollYOffset:t}))},onClickNewButton:()=>{e(Dt()),e(Et()),j.trackScheduleAccruedDetailsNewRequested({scheduleType:"accrued_expenses"}),s("details/new")},onClickSchedule:t=>{e(Ct({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeAccruedSchedules.find((i=>i.jeAccruedScheduleKey===t));s(`details/${n?.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:Q,fetchState:t}))}}}))(Mn),ba=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),[i,l]=u.useState(!1),p=N(),h=G(),{useFeatureGate:v}=H(),m=Te();ce();const{isFeatureEnabled:r,isFeatureGateLoading:d}=v(M.isOpexByVendorFeatureEnabled),c=R.getSignedInUser(),x=f((S=>U(S))),T={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:x.tenantId},g=u.useMemo((()=>({authParams:T,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:x.companyName})),[]),[y,b]=u.useState(!1),I=f((S=>ue(S))),E=f((S=>ke(S,"accrued_expenses"))),C=e.includes("prepaid_expenses"),w=e.includes("fixed_assets"),A=e.includes("accrued_expenses");u.useEffect((()=>{(C||w||A)&&y===!1&&I!=="Completed"&&(h(pe()),b(!0))}),[y]),u.useEffect((()=>{d===!1&&(h(he({shouldFetchAccruedExpenses:A,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:C,shouldFetchOpexByVendor:r,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[I,w,d,r]),u.useEffect((()=>{t===!1&&E==="Completed"&&h(tt("accrued_expenses",{selectedTimeframe:Ve("accrued_expenses"),selectedCategoryId:"all"},!0))}),[t,E]);const P=f((S=>It(S,Q))),{isAiCfoAccessEnabled:O,onAskAiCfoClick:F}=ie({mobileExploreReferrer:"Vendors — Accrued Expenses"});se({isDataReady:P.fetchState==="Completed"});const D=f((S=>Y(S).isReportGenerated));f((S=>Y(S).fetchState))!=="Completed"||D!==!0||r!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),A||p("../opex");const k=f((S=>ge(S,x.companyId))),W=S=>{l(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:i,handleDrawerToggle:W}),o.jsx(Ta,{navigate:p,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:P,downloadParams:g,themeState:m,vendorTabsToShow:e,analytics:j,controllerUserDetails:k,isAiCfoAccessEnabled:O,onAskAiCfoClick:F,onClickMenuIcon:()=>W(!0)})]})},X="fixed_assets",ya=$((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:X,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:X,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:X,searchText:t}))},onReloadReport:()=>{e(xe(X))},onScroll:t=>{e(Pe({scheduleType:X,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:X,fetchState:t}))}}}))(pt),wa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=N(),l=G();ce();const{useFeatureGate:p}=H(),h=Te(),{isFeatureEnabled:v,isFeatureGateLoading:m}=p(M.isOpexByVendorFeatureEnabled),r=R.getSignedInUser(),d=f((S=>U(S))),c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d.tenantId},x=u.useMemo((()=>({authParams:c,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[T,g]=u.useState(!1),y=f((S=>ue(S))),b=f((S=>ke(S,"fixed_assets"))),I=e.includes("prepaid_expenses"),E=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||E||C)&&T===!1&&y!=="Completed"&&(l(pe()),g(!0))}),[T]),u.useEffect((()=>{m===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:I,shouldFetchOpexByVendor:v,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[y,E,m,v]),u.useEffect((()=>{t===!1&&b==="Completed"&&l(xe("fixed_assets",{selectedTimeframe:Ve("fixed_assets"),selectedCategoryId:"all"},!0))}),[t,b]);const w=f((S=>nt(S,X))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:P}=ie({mobileExploreReferrer:"Vendors — Fixed Assets"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>Y(S).isReportGenerated));f((S=>Y(S).fetchState))!=="Completed"||O!==!0||v!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),E||i("../opex");const F=f((S=>ge(S,d.companyId))),[D,k]=u.useState(!1),W=S=>{k(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:W}),o.jsx(ya,{navigate:i,scheduleListReport:w,downloadParams:x,previousTabPosition:a,setPreviousTabPosition:s,themeState:h,vendorTabsToShow:e,analytics:j,controllerUserDetails:F,isAiCfoAccessEnabled:A,onAskAiCfoClick:P,onClickMenuIcon:()=>{W(!0)}})]})},Ia=B.div`
5
+ `,de=e=>{switch(e){case"vendors_tab":return"../summary";case"filing_1099":return"../filing_1099";case"prepaid_expenses":return"../schedules/prepaid_expenses";case"fixed_assets":return"../schedules/fixed_assets";case"accrued_expenses":return"../schedules/accrued_expenses";default:return"../opex"}},le=e=>{switch(e){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"operating_expenses_by_vendor":return"operating_expenses";default:return"vendors_list"}},ce=()=>{const e=K(),a=W(),s=f((t=>oe(t)));return u.useEffect((()=>{const t=e.pathname.split("/").pop();if(t!=null){const n=(i=>{switch(i){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"opex":return"operating_expenses";case"filing_1099":return"filing_1099";default:return"vendors_list"}})(t);n!==s.currentTab&&a(te(n))}}),[e.pathname,s.currentTab,a]),s},Q="accrued_expenses",Ta=G((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Q,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Q,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:Q,searchText:t}))},onReloadReport:()=>{e(tt(Q))},onScroll:t=>{e(Pe({scheduleType:Q,scrollYOffset:t}))},onClickNewButton:()=>{e(Dt()),e(Et()),j.trackScheduleAccruedDetailsNewRequested({scheduleType:"accrued_expenses"}),s("details/new")},onClickSchedule:t=>{e(Ct({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeAccruedSchedules.find((i=>i.jeAccruedScheduleKey===t));s(`details/${n?.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:Q,fetchState:t}))}}}))(Mn),ba=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),[i,l]=u.useState(!1),p=N(),h=W(),{useFeatureGate:v}=H(),m=Te();ce();const{isFeatureEnabled:r,isFeatureGateLoading:d}=v(M.isOpexByVendorFeatureEnabled),c=R.getSignedInUser(),x=f((S=>U(S))),T={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:x.tenantId},g=u.useMemo((()=>({authParams:T,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:x.companyName})),[]),[y,b]=u.useState(!1),I=f((S=>ue(S))),E=f((S=>ke(S,"accrued_expenses"))),C=e.includes("prepaid_expenses"),w=e.includes("fixed_assets"),A=e.includes("accrued_expenses");u.useEffect((()=>{(C||w||A)&&y===!1&&I!=="Completed"&&(h(pe()),b(!0))}),[y]),u.useEffect((()=>{d===!1&&(h(he({shouldFetchAccruedExpenses:A,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:C,shouldFetchOpexByVendor:r,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[I,w,d,r]),u.useEffect((()=>{t===!1&&E==="Completed"&&h(tt("accrued_expenses",{selectedTimeframe:Ve("accrued_expenses"),selectedCategoryId:"all"},!0))}),[t,E]);const P=f((S=>It(S,Q))),{isAiCfoAccessEnabled:O,onAskAiCfoClick:F}=ie({mobileExploreReferrer:"Vendors — Accrued Expenses"});se({isDataReady:P.fetchState==="Completed"});const D=f((S=>Y(S).isReportGenerated));f((S=>Y(S).fetchState))!=="Completed"||D!==!0||r!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),A||p("../opex");const k=f((S=>ge(S,x.companyId))),$=S=>{l(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:i,handleDrawerToggle:$}),o.jsx(Ta,{navigate:p,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:P,downloadParams:g,themeState:m,vendorTabsToShow:e,analytics:j,controllerUserDetails:k,isAiCfoAccessEnabled:O,onAskAiCfoClick:F,onClickMenuIcon:()=>$(!0)})]})},Z="fixed_assets",ya=G((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Z,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Z,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:Z,searchText:t}))},onReloadReport:()=>{e(xe(Z))},onScroll:t=>{e(Pe({scheduleType:Z,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:Z,fetchState:t}))}}}))(pt),wa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=N(),l=W();ce();const{useFeatureGate:p}=H(),h=Te(),{isFeatureEnabled:v,isFeatureGateLoading:m}=p(M.isOpexByVendorFeatureEnabled),r=R.getSignedInUser(),d=f((S=>U(S))),c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d.tenantId},x=u.useMemo((()=>({authParams:c,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[T,g]=u.useState(!1),y=f((S=>ue(S))),b=f((S=>ke(S,"fixed_assets"))),I=e.includes("prepaid_expenses"),E=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||E||C)&&T===!1&&y!=="Completed"&&(l(pe()),g(!0))}),[T]),u.useEffect((()=>{m===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:I,shouldFetchOpexByVendor:v,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[y,E,m,v]),u.useEffect((()=>{t===!1&&b==="Completed"&&l(xe("fixed_assets",{selectedTimeframe:Ve("fixed_assets"),selectedCategoryId:"all"},!0))}),[t,b]);const w=f((S=>nt(S,Z))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:P}=ie({mobileExploreReferrer:"Vendors — Fixed Assets"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>Y(S).isReportGenerated));f((S=>Y(S).fetchState))!=="Completed"||O!==!0||v!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),E||i("../opex");const F=f((S=>ge(S,d.companyId))),[D,k]=u.useState(!1),$=S=>{k(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:$}),o.jsx(ya,{navigate:i,scheduleListReport:w,downloadParams:x,previousTabPosition:a,setPreviousTabPosition:s,themeState:h,vendorTabsToShow:e,analytics:j,controllerUserDetails:F,isAiCfoAccessEnabled:A,onAskAiCfoClick:P,onClickMenuIcon:()=>{$(!0)}})]})},Ia=B.div`
6
6
  display: flex;
7
7
  min-height: 100%;
8
8
  width: 100%;
@@ -10,7 +10,7 @@ import{j as o}from"./liveblocks-y3zMPGKB.js";import{a as u}from"./sentry-Jm7O5sR
10
10
  flex-direction: column;
11
11
  align-items: center;
12
12
  background-color: ${e=>e.theme.colors.grey4};
13
- `,Ca=$((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=U(e),i=n?.companyName??"",l={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},p=Y(e),h=Ft(e);return{report:p,uiState:h,isAccountingClassesEnabled:me(e),analytics:j,vendorTabsToShow:a.vendorTabsToShow,downloadParams:{downloadState:h.downloadState,currentTenantCompanyName:i,statementEndPoint:`${ee}/opexByVendor`,authParams:l,timezone:ve()}}}),(function(e,a){const{navigate:s}=a;return{onFetchOpExByVendors:(t,n,i)=>{e(Bt(t,n,i))},onVendorNameAndBalanceClicked:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t.id,t.qboId,a.tenantEmailDomain,n),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Operating Expenses By Vendor"}})}},onRefresh:()=>{e(Lt())},onReloadReport:()=>{e(Ut(!0))},onBackClick:()=>{s("../../dashboard")},onTimeframeSelectionChanged:t=>{e(Rt(t))},onAdditionalBalanceSelectionChanged:(t,n)=>{e(At({isCompareModeOn:t,additionalBalances:n}))},onSortOrderChanged:(t,n,i)=>{e(_t({sortkey:n,sortOrder:t,timeframe:i}))},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrSearchStarted:t=>{e(Pt(t))},onPageFetchStarted:()=>{e(jt(!0))},updateDownloadStateHandler:t=>{e(Vt(t))},onClearSearch:t=>{e(kt({timeframe:t}))}}}))($n);function Da({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=G(),i=q(),{tenantEmailDomain:l}=z(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=H(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled),d=f((F=>Y(F)));if(h==null)throw Error("Can't access opex by vendor page without signing in...");ce();const[c,x]=u.useState(!1),T=f((F=>ue(F))),g=e.includes("prepaid_expenses"),y=e.includes("fixed_assets"),b=e.includes("accrued_expenses"),I=f((F=>oe(F))),{isAiCfoAccessEnabled:E,onAskAiCfoClick:C}=ie({mobileExploreReferrer:"Vendors — Operating Expenses by Vendor"});se({isDataReady:d.fetchState==="Completed"&&d.isReportGenerated===!0});const{areTenantIdsInSync:w}=Nn();u.useEffect((()=>{(g||y||b)&&c===!1&&T!=="Completed"&&w&&(n(pe()),x(!0))}),[c,w]),u.useEffect((()=>{w&&n(he({shouldFetchAccruedExpenses:b,shouldFetchFixedAssets:y,shouldFetchPrepaidExpenses:g,shouldFetchOpexByVendor:m===!0&&r===!1,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1}))}),[T,y,r,m,w]),d.fetchState!=="Completed"||d.isReportGenerated!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),u.useEffect((()=>{w&&(d.isReportGenerated===!1&&d.fetchState==="Completed"||m===!1&&r===!1)&&t("../summary")}),[w,d.isReportGenerated,d.fetchState,m,r,t]);const[A,P]=u.useState(!1),O=F=>{P(F)};return o.jsxs(Ia,{windowSize:p,children:[d.fetchState==="Completed"?o.jsx(Se,{analytics:j,onLoad:F=>{I.previousTab==null?F.trackVendorOperatingExpensesPageLoaded("Side Panel"):F.trackVendorOperatingExpenses(I.currentTab,I.previousTab??null)}}):null,o.jsx(re,{isAppContentDrawerOpen:A,handleDrawerToggle:O}),o.jsx(Ca,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:E,onAskAiCfoClick:C,onClickMenuIcon:()=>{O(!0)}})]})}const Z="prepaid_expenses",Ea=$((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Z,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Z,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:Z,searchText:t}))},onReloadReport:()=>{e(xe(Z))},onScroll:t=>{e(Pe({scheduleType:Z,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:Z,fetchState:t}))}}}))(pt),Fa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=N(),l=G(),{useFeatureGate:p}=H(),h=Te();ce();const v=R.getSignedInUser(),{isFeatureEnabled:m,isFeatureGateLoading:r}=p(M.isOpexByVendorFeatureEnabled),d=f((S=>U(S))),c=f((S=>ke(S,"prepaid_expenses"))),x={userId:v?.userId??"",sessionId:v?.zeniSessionId??"",tenantId:d.tenantId},T=u.useMemo((()=>({authParams:x,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[g,y]=u.useState(!1),b=f((S=>ue(S))),I=e.includes("prepaid_expenses"),E=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||E||C)&&g===!1&&b!=="Completed"&&(l(pe()),y(!0))}),[g]),u.useEffect((()=>{t===!1&&c==="Completed"&&l(xe("prepaid_expenses",{selectedTimeframe:Ve("prepaid_expenses"),selectedCategoryId:"all"},!0))}),[t,c]),u.useEffect((()=>{r===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:E,shouldFetchPrepaidExpenses:!0,shouldFetchOpexByVendor:m,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[b,E,r,m]);const w=f((S=>nt(S,Z))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:P}=ie({mobileExploreReferrer:"Vendors — Prepaid Expenses"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>Y(S).isReportGenerated));f((S=>Y(S).fetchState))!=="Completed"||O!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),I||i("../opex");const F=f((S=>ge(S,d.companyId))),[D,k]=u.useState(!1),W=S=>{k(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:W}),o.jsx(Ea,{navigate:i,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:w,downloadParams:T,themeState:h,vendorTabsToShow:e,analytics:j,controllerUserDetails:F,isAiCfoAccessEnabled:A,onAskAiCfoClick:P,onClickMenuIcon:()=>{W(!0)}})]})},ka=B.div`
13
+ `,Ca=G((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=U(e),i=n?.companyName??"",l={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},p=Y(e),h=Ft(e);return{report:p,uiState:h,isAccountingClassesEnabled:me(e),analytics:j,vendorTabsToShow:a.vendorTabsToShow,downloadParams:{downloadState:h.downloadState,currentTenantCompanyName:i,statementEndPoint:`${ee}/opexByVendor`,authParams:l,timezone:ve()}}}),(function(e,a){const{navigate:s}=a;return{onFetchOpExByVendors:(t,n,i)=>{e(Bt(t,n,i))},onVendorNameAndBalanceClicked:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t.id,t.qboId,a.tenantEmailDomain,n),l=q(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Operating Expenses By Vendor"}})}},onRefresh:()=>{e(Lt())},onReloadReport:()=>{e(Ut(!0))},onBackClick:()=>{s("../../dashboard")},onTimeframeSelectionChanged:t=>{e(Rt(t))},onAdditionalBalanceSelectionChanged:(t,n)=>{e(At({isCompareModeOn:t,additionalBalances:n}))},onSortOrderChanged:(t,n,i)=>{e(_t({sortkey:n,sortOrder:t,timeframe:i}))},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrSearchStarted:t=>{e(Pt(t))},onPageFetchStarted:()=>{e(jt(!0))},updateDownloadStateHandler:t=>{e(Vt(t))},onClearSearch:t=>{e(kt({timeframe:t}))}}}))(Gn);function Da({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=W(),i=K(),{tenantEmailDomain:l}=z(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=H(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled),d=f((F=>Y(F)));if(h==null)throw Error("Can't access opex by vendor page without signing in...");ce();const[c,x]=u.useState(!1),T=f((F=>ue(F))),g=e.includes("prepaid_expenses"),y=e.includes("fixed_assets"),b=e.includes("accrued_expenses"),I=f((F=>oe(F))),{isAiCfoAccessEnabled:E,onAskAiCfoClick:C}=ie({mobileExploreReferrer:"Vendors — Operating Expenses by Vendor"});se({isDataReady:d.fetchState==="Completed"&&d.isReportGenerated===!0});const{areTenantIdsInSync:w}=Nn();u.useEffect((()=>{(g||y||b)&&c===!1&&T!=="Completed"&&w&&(n(pe()),x(!0))}),[c,w]),u.useEffect((()=>{w&&n(he({shouldFetchAccruedExpenses:b,shouldFetchFixedAssets:y,shouldFetchPrepaidExpenses:g,shouldFetchOpexByVendor:m===!0&&r===!1,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1}))}),[T,y,r,m,w]),d.fetchState!=="Completed"||d.isReportGenerated!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),u.useEffect((()=>{w&&(d.isReportGenerated===!1&&d.fetchState==="Completed"||m===!1&&r===!1)&&t("../summary")}),[w,d.isReportGenerated,d.fetchState,m,r,t]);const[A,P]=u.useState(!1),O=F=>{P(F)};return o.jsxs(Ia,{windowSize:p,children:[d.fetchState==="Completed"?o.jsx(Se,{analytics:j,onLoad:F=>{I.previousTab==null?F.trackVendorOperatingExpensesPageLoaded("Side Panel"):F.trackVendorOperatingExpenses(I.currentTab,I.previousTab??null)}}):null,o.jsx(re,{isAppContentDrawerOpen:A,handleDrawerToggle:O}),o.jsx(Ca,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:E,onAskAiCfoClick:C,onClickMenuIcon:()=>{O(!0)}})]})}const X="prepaid_expenses",Ea=G((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:X,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:X,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:X,searchText:t}))},onReloadReport:()=>{e(xe(X))},onScroll:t=>{e(Pe({scheduleType:X,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:X,fetchState:t}))}}}))(pt),Fa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=N(),l=W(),{useFeatureGate:p}=H(),h=Te();ce();const v=R.getSignedInUser(),{isFeatureEnabled:m,isFeatureGateLoading:r}=p(M.isOpexByVendorFeatureEnabled),d=f((S=>U(S))),c=f((S=>ke(S,"prepaid_expenses"))),x={userId:v?.userId??"",sessionId:v?.zeniSessionId??"",tenantId:d.tenantId},T=u.useMemo((()=>({authParams:x,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[g,y]=u.useState(!1),b=f((S=>ue(S))),I=e.includes("prepaid_expenses"),E=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||E||C)&&g===!1&&b!=="Completed"&&(l(pe()),y(!0))}),[g]),u.useEffect((()=>{t===!1&&c==="Completed"&&l(xe("prepaid_expenses",{selectedTimeframe:Ve("prepaid_expenses"),selectedCategoryId:"all"},!0))}),[t,c]),u.useEffect((()=>{r===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:E,shouldFetchPrepaidExpenses:!0,shouldFetchOpexByVendor:m,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[b,E,r,m]);const w=f((S=>nt(S,X))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:P}=ie({mobileExploreReferrer:"Vendors — Prepaid Expenses"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>Y(S).isReportGenerated));f((S=>Y(S).fetchState))!=="Completed"||O!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),I||i("../opex");const F=f((S=>ge(S,d.companyId))),[D,k]=u.useState(!1),$=S=>{k(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:$}),o.jsx(Ea,{navigate:i,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:w,downloadParams:T,themeState:h,vendorTabsToShow:e,analytics:j,controllerUserDetails:F,isAiCfoAccessEnabled:A,onAskAiCfoClick:P,onClickMenuIcon:()=>{$(!0)}})]})},ka=B.div`
14
14
  display: flex;
15
15
  min-height: 100%;
16
16
  width: 100%;
@@ -18,7 +18,7 @@ import{j as o}from"./liveblocks-y3zMPGKB.js";import{a as u}from"./sentry-Jm7O5sR
18
18
  flex-direction: column;
19
19
  align-items: center;
20
20
  background-color: ${e=>e.theme.colors.grey4};
21
- `,Va=$((function(e,a){const{isFiling1099FeatureEnabled:s,vendorDetailView:t,selectedVendor:n,firstMonthOfFY:i,currentTenant:l,currentUserRoleMap:p}=a,h=R.getSignedInUser(),v={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:l.tenantId??""};return{firstMonthOfFY:i,isFiling1099FeatureEnabled:s,vendorDetailView:t,allTransactions:t?.allVendorTransactionsView,allTransactionsTabData:t?.allTransactionsTabData!=null?{timePeriod:Yt(t?.allTransactionsTabData.timePeriod),numberOfQuartersFetched:t?.allTransactionsTabData.numberOfQuartersFetched}:void 0,vendorLogo:n?.logo,readOnlyMode:p?.bookkeeping_user===!0,filesEndPoint:mt.fileMicroServiceBaseUrl,authParams:v,scrollToTrend:a.isTrendPeriodSelected}}),(function(e,a){const{navigate:s,vendorDetailView:t,vendorId:n,defaultTransactionTimePeriod:i,vendorEntity:l,tenantEmailDomain:p,location:h,firstMonthOfFY:v}=a,m=()=>{const r=zn(h.state?.pathnameStackToGoBack),d=r.poppedPathname??((c=2)=>{let x=c;a.isTrendPeriodSelected===!0&&(x=5);let T="../";for(let g=0;g<x;g++)T=`${T}../`;return T})(1);s(d,{state:{pathnameStackToGoBack:r.newStack}})};return{onSaveVendor:()=>{t!=null&&((r,d)=>{const{vendorId:c,vendorName:x,existingCategory:T,existingClass:g,existingOwner:y,selectedCategory:b,selectedClass:I,selectedOwner:E,isRecommendedCategorySelected:C,isRecommendedClassSelected:w,categoryRecommendationTypeSelected:A,classRecommendationTypeSelected:P}=en(r,d);c!=null&&j.trackVendorDetailsSave(c,x??"",T,g,y,b,I,E,C,w,A,P)})(t?.vendorViewDetails,t?.vendorViewDetails.ownerList),n!=null&&e(Zt(n,void 0))},onVendorSpendTrendFilterTabClick:r=>{e(Xt(r))},saveVendorDetailLocalData:r=>{n!=null&&e(Qt({vendorId:n,localData:r}))},saveContactsInVendorTabDetailLocalData:(r,d)=>{e(Ht({vendorId:r,localData:{contacts:d}}))},onCancelClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView.vendorBasic).id!=null&&j.trackVendorDetailsCancel(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email),e($e()),e(Ge()),e(We()),e(ze()),m()},handleSpendTrendPercentChangeClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView?.vendorBasic,r.id!=null&&j.trackVendorDetailsSpendTrendHotlinkClicked(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email))},onSaveSuccess:()=>{n!=null&&e(qt("Not-Started",n)),e($e()),e(Ge()),e(We()),e(ze()),m()},onTrendSelectedPeriodChange:r=>{if(r==null)i!=null&&e(we(l,"EntityDetail",{timeframe:"quarter",timePeriod:i}));else{const d=r.currentTimePeriod==null?r.addTimePeriod:{startDate:r.addTimePeriod.startDate,endDate:r.currentTimePeriod.endDate};e(Ce(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:r.addTimePeriod},v)),e(we(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:d}))}},onVendorTabSelectionChanged:r=>{e(Kt(r))},onAddressClick:(r,d)=>{if(p==null)return;const c=pa(p,r,d),x=K(h.state?.pathnameStackToGoBack,h.pathname);s(c,{state:{pathnameStackToGoBack:x}})},onVendorDetailUIChange:r=>{e(Jt({collapsableStatus:r}))},onTransactionItemClick:r=>{const d=`${ua(r,p)}`,c=K(h.state?.pathnameStackToGoBack,h.pathname);s(d,{state:{pathnameStackToGoBack:c}})},onLoadPreviousTransactionsClick:(r,d)=>{e(ot({timePeriod:Ie(r),numberOfQuartersFetched:d})),e(st(l,Ie(r),!0,!0))}}}))(Wn);function qe({referrerType:e,isFiling1099FeatureEnabled:a}){const s=G(),t=q(),n=N(),i=Gn(),[l,p]=u.useState(!1),[h,v]=u.useState(!1),[m,r]=u.useState(!1),d=z(),c=d.vendorId,x=d.qboId,{tenantEmailDomain:T,timeframe:g,startDate:y,endDate:b}=d,I={id:x??"",name:"",type:"vendor",zeniId:c??"",qboId:x??""};u.useEffect((()=>{g!=null&&y!=null&&b!=null?p(!0):(p(!1),m===!1&&(r(!0),s(we(I,"EntityDetail"))))}),[g,y,b]);const E=ne(),C=f((_=>U(_))),w=f((_=>c!=null?Ot(_,c,I):void 0)),A=f((_=>_.vendorState.vendorByID[c??""])),P=f((_=>U(_).company?.companyInfo.firstMonthOfFY??1)),O=f((()=>Mt(P,2))),F=Ie({startDate:O.startDate,endDate:Nt()}),D=$t(P),k=f((_=>Gt(_.trendWithTransactionsState,I,"EntityDetail"))),[W,S]=u.useState(!1),be=l===!1&&m===!1?void 0:k?.selectedPeriod?.timePeriod??D;return u.useEffect((()=>(e==null&&w?.fetchState!=="Not-Started"||c==null||s(Wt(c,I)),()=>{e!=null&&c!=null&&s(zt(c))})),[c,t.state,s]),u.useEffect((()=>{w?.fetchState==="Completed"&&w?.vendorViewDetails.vendorView?.vendorBasic!=null&&((_,ae,ye)=>{_.id!=null&&j.trackVendorDetails(_.id,_.name,ye,_.account?.accountName,_.class?.className,_.owner?.email,ae.percentChange,ae.last30DaysSpend,ae.last90DaysSpend,ae.yearToDateSpend)})(w?.vendorViewDetails.vendorView?.vendorBasic,w?.vendorSpend,e),S(!1)}),[w?.fetchState]),u.useEffect((()=>{if(w?.fetchState==="Completed"&&W===!1){be!=null&&l===!1&&(s(Ce(I,"EntityDetail",{timeframe:k?.selectedPeriod?.timeframe??"quarter",timePeriod:be},P)),S(!0));const _=ht.getLocalizedStrings().dateFormat.analytics;if(l===!0&&g!=null&&y!=null&&b!=null){S(!0);const ae=g,ye={startDate:Ne(y,_.YYYYDashMMDashDDFormat),endDate:Ne(b,_.YYYYDashMMDashDDFormat)};s(Ce(I,"EntityDetail",{timeframe:ae,timePeriod:ye}))}}}),[w?.fetchState,be,k?.selectedPeriod?.timeframe,l,P]),u.useEffect((()=>{w?.fetchState==="Completed"&&h===!1&&(s(ot({timePeriod:F,numberOfQuartersFetched:3})),s(st(I,w.allTransactionsTabData?.timePeriod??F,!1,!0)),v(!0))}),[w?.fetchState,h]),c==null?o.jsx(fe,{}):o.jsx(ka,{windowSize:E,children:o.jsx(Va,{location:t,navigate:n,isFiling1099FeatureEnabled:a,vendorDetailView:w,vendorId:c,currentTenant:C,selectedVendor:A,firstMonthOfFY:P,isTrendPeriodSelected:l,selectedPeriodTimePeriod:k?.selectedPeriod?.timePeriod,defaultTransactionTimePeriod:D,vendorEntity:I,currentUserRoleMap:i?.loggedInUserRoleMap,tenantEmailDomain:T})})}const ja=ht.getLocalizedStrings().spendManagement.billPay.vendorCreation.vendorDetails,Pa={containerWidth:new Ue(100,58)},_a=B(Jn)`
21
+ `,Va=G((function(e,a){const{isFiling1099FeatureEnabled:s,vendorDetailView:t,selectedVendor:n,firstMonthOfFY:i,currentTenant:l,currentUserRoleMap:p}=a,h=R.getSignedInUser(),v={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:l.tenantId??""};return{firstMonthOfFY:i,isFiling1099FeatureEnabled:s,vendorDetailView:t,allTransactions:t?.allVendorTransactionsView,allTransactionsTabData:t?.allTransactionsTabData!=null?{timePeriod:Yt(t?.allTransactionsTabData.timePeriod),numberOfQuartersFetched:t?.allTransactionsTabData.numberOfQuartersFetched}:void 0,vendorLogo:n?.logo,readOnlyMode:p?.bookkeeping_user===!0,filesEndPoint:mt.fileMicroServiceBaseUrl,authParams:v,scrollToTrend:a.isTrendPeriodSelected}}),(function(e,a){const{navigate:s,vendorDetailView:t,vendorId:n,defaultTransactionTimePeriod:i,vendorEntity:l,tenantEmailDomain:p,location:h,firstMonthOfFY:v}=a,m=()=>{const r=zn(h.state?.pathnameStackToGoBack),d=r.poppedPathname??((c=2)=>{let x=c;a.isTrendPeriodSelected===!0&&(x=5);let T="../";for(let g=0;g<x;g++)T=`${T}../`;return T})(1);s(d,{state:{pathnameStackToGoBack:r.newStack}})};return{onSaveVendor:()=>{t!=null&&((r,d)=>{const{vendorId:c,vendorName:x,existingCategory:T,existingClass:g,existingOwner:y,selectedCategory:b,selectedClass:I,selectedOwner:E,isRecommendedCategorySelected:C,isRecommendedClassSelected:w,categoryRecommendationTypeSelected:A,classRecommendationTypeSelected:P}=en(r,d);c!=null&&j.trackVendorDetailsSave(c,x??"",T,g,y,b,I,E,C,w,A,P)})(t?.vendorViewDetails,t?.vendorViewDetails.ownerList),n!=null&&e(Xt(n,void 0))},onVendorSpendTrendFilterTabClick:r=>{e(Zt(r))},saveVendorDetailLocalData:r=>{n!=null&&e(Qt({vendorId:n,localData:r}))},saveContactsInVendorTabDetailLocalData:(r,d)=>{e(Ht({vendorId:r,localData:{contacts:d}}))},onCancelClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView.vendorBasic).id!=null&&j.trackVendorDetailsCancel(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email),e(Ge()),e(We()),e($e()),e(ze()),m()},handleSpendTrendPercentChangeClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView?.vendorBasic,r.id!=null&&j.trackVendorDetailsSpendTrendHotlinkClicked(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email))},onSaveSuccess:()=>{n!=null&&e(Kt("Not-Started",n)),e(Ge()),e(We()),e($e()),e(ze()),m()},onTrendSelectedPeriodChange:r=>{if(r==null)i!=null&&e(we(l,"EntityDetail",{timeframe:"quarter",timePeriod:i}));else{const d=r.currentTimePeriod==null?r.addTimePeriod:{startDate:r.addTimePeriod.startDate,endDate:r.currentTimePeriod.endDate};e(Ce(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:r.addTimePeriod},v)),e(we(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:d}))}},onVendorTabSelectionChanged:r=>{e(qt(r))},onAddressClick:(r,d)=>{if(p==null)return;const c=pa(p,r,d),x=q(h.state?.pathnameStackToGoBack,h.pathname);s(c,{state:{pathnameStackToGoBack:x}})},onVendorDetailUIChange:r=>{e(Jt({collapsableStatus:r}))},onTransactionItemClick:r=>{const d=`${ua(r,p)}`,c=q(h.state?.pathnameStackToGoBack,h.pathname);s(d,{state:{pathnameStackToGoBack:c}})},onLoadPreviousTransactionsClick:(r,d)=>{e(ot({timePeriod:Ie(r),numberOfQuartersFetched:d})),e(st(l,Ie(r),!0,!0))}}}))($n);function Ke({referrerType:e,isFiling1099FeatureEnabled:a}){const s=W(),t=K(),n=N(),i=Wn(),[l,p]=u.useState(!1),[h,v]=u.useState(!1),[m,r]=u.useState(!1),d=z(),c=d.vendorId,x=d.qboId,{tenantEmailDomain:T,timeframe:g,startDate:y,endDate:b}=d,I={id:x??"",name:"",type:"vendor",zeniId:c??"",qboId:x??""};u.useEffect((()=>{g!=null&&y!=null&&b!=null?p(!0):(p(!1),m===!1&&(r(!0),s(we(I,"EntityDetail"))))}),[g,y,b]);const E=ne(),C=f((_=>U(_))),w=f((_=>c!=null?Ot(_,c,I):void 0)),A=f((_=>_.vendorState.vendorByID[c??""])),P=f((_=>U(_).company?.companyInfo.firstMonthOfFY??1)),O=f((()=>Mt(P,2))),F=Ie({startDate:O.startDate,endDate:Nt()}),D=Gt(P),k=f((_=>Wt(_.trendWithTransactionsState,I,"EntityDetail"))),[$,S]=u.useState(!1),be=l===!1&&m===!1?void 0:k?.selectedPeriod?.timePeriod??D;return u.useEffect((()=>(e==null&&w?.fetchState!=="Not-Started"||c==null||s($t(c,I)),()=>{e!=null&&c!=null&&s(zt(c))})),[c,t.state,s]),u.useEffect((()=>{w?.fetchState==="Completed"&&w?.vendorViewDetails.vendorView?.vendorBasic!=null&&((_,ae,ye)=>{_.id!=null&&j.trackVendorDetails(_.id,_.name,ye,_.account?.accountName,_.class?.className,_.owner?.email,ae.percentChange,ae.last30DaysSpend,ae.last90DaysSpend,ae.yearToDateSpend)})(w?.vendorViewDetails.vendorView?.vendorBasic,w?.vendorSpend,e),S(!1)}),[w?.fetchState]),u.useEffect((()=>{if(w?.fetchState==="Completed"&&$===!1){be!=null&&l===!1&&(s(Ce(I,"EntityDetail",{timeframe:k?.selectedPeriod?.timeframe??"quarter",timePeriod:be},P)),S(!0));const _=ht.getLocalizedStrings().dateFormat.analytics;if(l===!0&&g!=null&&y!=null&&b!=null){S(!0);const ae=g,ye={startDate:Ne(y,_.YYYYDashMMDashDDFormat),endDate:Ne(b,_.YYYYDashMMDashDDFormat)};s(Ce(I,"EntityDetail",{timeframe:ae,timePeriod:ye}))}}}),[w?.fetchState,be,k?.selectedPeriod?.timeframe,l,P]),u.useEffect((()=>{w?.fetchState==="Completed"&&h===!1&&(s(ot({timePeriod:F,numberOfQuartersFetched:3})),s(st(I,w.allTransactionsTabData?.timePeriod??F,!1,!0)),v(!0))}),[w?.fetchState,h]),c==null?o.jsx(fe,{}):o.jsx(ka,{windowSize:E,children:o.jsx(Va,{location:t,navigate:n,isFiling1099FeatureEnabled:a,vendorDetailView:w,vendorId:c,currentTenant:C,selectedVendor:A,firstMonthOfFY:P,isTrendPeriodSelected:l,selectedPeriodTimePeriod:k?.selectedPeriod?.timePeriod,defaultTransactionTimePeriod:D,vendorEntity:I,currentUserRoleMap:i?.loggedInUserRoleMap,tenantEmailDomain:T})})}const ja=ht.getLocalizedStrings().spendManagement.billPay.vendorCreation.vendorDetails,Pa={containerWidth:new Ue(100,58)},_a=B(Jn)`
22
22
  width: ${J.sp4};
23
23
  height: ${J.sp4};
24
24
  cursor: pointer;
@@ -35,7 +35,7 @@ import{j as o}from"./liveblocks-y3zMPGKB.js";import{a as u}from"./sentry-Jm7O5sR
35
35
  flex-direction: column;
36
36
  width: ${e=>`${Pa.containerWidth.value(e.windowSize)}%`};
37
37
  ${e=>e.windowSize!=="small"?"overflow: auto;":""}
38
- `,Ua=$((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},i=e.vendorFiling1099UploadDetailsState,l=e.vendorFiling1099UploadDetailsState;let p={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(p=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{uploadInvoiceEndPoint:`${mt.documentAIMicroServiceBaseUrl}`,vendorFiling1099UploadDetailsState:i,vendorFiling1099UploadDetailsViewState:l,uploadStaus:l.w9FormUploadStatus,authParams:n,billId:a.billId,vendorId:a.vendorId,file:a.file,showAutofill:a.showAutofill,type:a.type,analytics:j,entityId:a.billId,fetchVendorFetchStatus:p,vendorLegalName:a.vendorLegalName}}),(function(e,a){const s=a.vendorId;return{onInvoiceUpload:t=>{if((function(n){return n!=null&&"w9_form"in n})(t)&&(e(on({w9FormFile:t.files[0]})),t.w9_form[0]!=null)){e(sn({ocrData:t.w9_form[0],vendorId:s}));const n=(i=>({street:[i.street.join(" ")],city:i.city,state:i.state,postalCode:i.postal_code,countryCode:i.country_code??void 0,country:i.country??""}))(t.w9_form[0].address);e(ct({addressType:"vendor_address",addressToCreate:n}))}},updateInvoiceUploadFetchState:t=>{e(De({fetchState:t,error:void 0}))},onSkipAutofill:t=>{e(an(t))},onVendorFiling1099UploadDetailsSave:t=>{e(lt(t))},onDeleteClick:()=>{e(De({fetchState:"Not-Started",error:void 0})),e(dt({vendorId:s,w9Documents:[]}))}}}))(qn);function He({appContent:e,showFullScreenSkeletonWhileLoading:a}){const s=G(),t=N(),{vendorId:n}=z(),i=ne(),l=Te(),p=R.getSignedInUser(),[h,v]=u.useState(!1),{useFeatureGate:m}=H(),{isFeatureEnabled:r}=m(M.isVendorRecommendationFeatureEnabled),d=f((D=>U(D))).companyName,c=new AbortController,x=c.signal;let T,g,y,b,I;if(n==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");T=f((D=>it(D,n))),g=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsSaveStatus)),y=f((D=>D.vendorViewState.editVendorStateById[n]?.fetchStatus)),I=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsLocalData.w9Documents?.[0])),b=f((D=>D.vendorFiling1099UploadDetailsState));const E=y?.fetchState==="In-Progress"||b?.w9FormUploadStatus?.fetchState==="In-Progress",C=()=>{l.toggle()};u.useEffect((()=>()=>{c.abort(),s(rt(n))}),[]),u.useEffect((()=>{h||n!=null&&(v(!0),s(tn(!1,n,x)))}),[n]);const w=Ke(y?.fetchState),A=Ke(g?.fetchState),P=T.vendor?.contactIds,O=P?.[P.length-1],F=f((D=>D.contactState.contactById[O]));if(u.useEffect((()=>{n!=null&&w==="In-Progress"&&y?.fetchState==="Completed"&&T?.vendor!=null&&(s(nn(n,T.vendor,F)),T?.vendor.filing1099W9Files?.[0]!=null&&s(De({fetchState:"Completed",error:void 0})))}),[n,T?.vendor]),u.useEffect((()=>{A==="In-Progress"&&g?.fetchState==="Completed"&&t("../../vendors/filing_1099")}),[g?.fetchState]),a===!0&&y?.fetchState!=="Completed"&&y?.fetchState!=="Error")return o.jsx(Na,{children:o.jsx(Yn,{})});if(p==null)throw Error("Can't access VendorFiling1099UploadScreen without signing in...");return o.jsxs(Aa,{windowSize:i,children:[i!=="small"?o.jsxs(Ba,{children:[o.jsx(_a,{onClick:C}),o.jsxs(La,{showContent:p.userEmailDomain==="zeni.ai",children:[o.jsx(Oa,{showAutofill:!1}),o.jsx(Ma,{showAutofill:!1,children:d})]})]}):null,o.jsx(Ua,{vendorId:n,file:I,showAutofill:!1,type:"w9",isVendorRecommendationEnabled:r,pdfTitle:I?ja.w9FormTitle:void 0,showTitlebar:!0,showTitlebarIcon:!0,vendorLegalName:T?.vendor?.legalName,isLoading:E}),o.jsx(Ra,{windowSize:i,children:e})]})}const La=B.div`
38
+ `,Ua=G((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},i=e.vendorFiling1099UploadDetailsState,l=e.vendorFiling1099UploadDetailsState;let p={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(p=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{uploadInvoiceEndPoint:`${mt.documentAIMicroServiceBaseUrl}`,vendorFiling1099UploadDetailsState:i,vendorFiling1099UploadDetailsViewState:l,uploadStaus:l.w9FormUploadStatus,authParams:n,billId:a.billId,vendorId:a.vendorId,file:a.file,showAutofill:a.showAutofill,type:a.type,analytics:j,entityId:a.billId,fetchVendorFetchStatus:p,vendorLegalName:a.vendorLegalName}}),(function(e,a){const s=a.vendorId;return{onInvoiceUpload:t=>{if((function(n){return n!=null&&"w9_form"in n})(t)&&(e(on({w9FormFile:t.files[0]})),t.w9_form[0]!=null)){e(sn({ocrData:t.w9_form[0],vendorId:s}));const n=(i=>({street:[i.street.join(" ")],city:i.city,state:i.state,postalCode:i.postal_code,countryCode:i.country_code??void 0,country:i.country??""}))(t.w9_form[0].address);e(ct({addressType:"vendor_address",addressToCreate:n}))}},updateInvoiceUploadFetchState:t=>{e(De({fetchState:t,error:void 0}))},onSkipAutofill:t=>{e(an(t))},onVendorFiling1099UploadDetailsSave:t=>{e(lt(t))},onDeleteClick:()=>{e(De({fetchState:"Not-Started",error:void 0})),e(dt({vendorId:s,w9Documents:[]}))}}}))(Kn);function He({appContent:e,showFullScreenSkeletonWhileLoading:a}){const s=W(),t=N(),{vendorId:n}=z(),i=ne(),l=Te(),p=R.getSignedInUser(),[h,v]=u.useState(!1),{useFeatureGate:m}=H(),{isFeatureEnabled:r}=m(M.isVendorRecommendationFeatureEnabled),d=f((D=>U(D))).companyName,c=new AbortController,x=c.signal;let T,g,y,b,I;if(n==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");T=f((D=>it(D,n))),g=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsSaveStatus)),y=f((D=>D.vendorViewState.editVendorStateById[n]?.fetchStatus)),I=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsLocalData.w9Documents?.[0])),b=f((D=>D.vendorFiling1099UploadDetailsState));const E=y?.fetchState==="In-Progress"||b?.w9FormUploadStatus?.fetchState==="In-Progress",C=()=>{l.toggle()};u.useEffect((()=>()=>{c.abort(),s(rt(n))}),[]),u.useEffect((()=>{h||n!=null&&(v(!0),s(tn(!1,n,x)))}),[n]);const w=qe(y?.fetchState),A=qe(g?.fetchState),P=T.vendor?.contactIds,O=P?.[P.length-1],F=f((D=>D.contactState.contactById[O]));if(u.useEffect((()=>{n!=null&&w==="In-Progress"&&y?.fetchState==="Completed"&&T?.vendor!=null&&(s(nn(n,T.vendor,F)),T?.vendor.filing1099W9Files?.[0]!=null&&s(De({fetchState:"Completed",error:void 0})))}),[n,T?.vendor]),u.useEffect((()=>{A==="In-Progress"&&g?.fetchState==="Completed"&&t("../../vendors/filing_1099")}),[g?.fetchState]),a===!0&&y?.fetchState!=="Completed"&&y?.fetchState!=="Error")return o.jsx(Na,{children:o.jsx(Yn,{})});if(p==null)throw Error("Can't access VendorFiling1099UploadScreen without signing in...");return o.jsxs(Aa,{windowSize:i,children:[i!=="small"?o.jsxs(Ba,{children:[o.jsx(_a,{onClick:C}),o.jsxs(La,{showContent:p.userEmailDomain==="zeni.ai",children:[o.jsx(Oa,{showAutofill:!1}),o.jsx(Ma,{showAutofill:!1,children:d})]})]}):null,o.jsx(Ua,{vendorId:n,file:I,showAutofill:!1,type:"w9",isVendorRecommendationEnabled:r,pdfTitle:I?ja.w9FormTitle:void 0,showTitlebar:!0,showTitlebarIcon:!0,vendorLegalName:T?.vendor?.legalName,isLoading:E}),o.jsx(Ra,{windowSize:i,children:e})]})}const La=B.div`
39
39
  display: ${e=>e.showContent?"flex":"none"};
40
40
  align-items: center;
41
41
  `,Ba=B.div`
@@ -50,14 +50,14 @@ import{j as o}from"./liveblocks-y3zMPGKB.js";import{a as u}from"./sentry-Jm7O5sR
50
50
  height: ${J.sp3};
51
51
  margin: ${J.sp0} ${J.sp3};
52
52
  background-color: ${e=>e.showAutofill?ft.neutralGrey1Light:e.theme.colors.hero};
53
- `,Ma=B(Kn.StandardMedium)`
53
+ `,Ma=B(qn.StandardMedium)`
54
54
  color: ${e=>e.showAutofill?ft.neutralGrey5Light:e.theme.colors.primary};
55
55
  `,Na=B.div`
56
56
  width: 100%;
57
57
  height: 100vh;
58
58
  overflow: hidden;
59
59
  background-color: ${e=>e.theme.colors.grey4};
60
- `,$a=$((function(e){const a=rn(e);return{vendorDetailView:dn(e),globalMerchantView:a}}),(function(e,a){const{navigate:s}=a;return{updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t}))},fetchRecommendation:t=>{e(cn("tenant",t))},onSaveClick:()=>{e(ln())},onBackClick:()=>{s("../review")}}}))(Hn);function Ga(){const e=N();return o.jsx($a,{navigate:e})}const Wa=B.div`
60
+ `,Ga=G((function(e){const a=rn(e);return{vendorDetailView:dn(e),globalMerchantView:a}}),(function(e,a){const{navigate:s}=a;return{updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t}))},fetchRecommendation:t=>{e(cn("tenant",t))},onSaveClick:()=>{e(ln())},onBackClick:()=>{s("../review")}}}))(Hn);function Wa(){const e=N();return o.jsx(Ga,{navigate:e})}const $a=B.div`
61
61
  display: flex;
62
62
  min-height: 100%;
63
63
  width: 100%;
@@ -65,11 +65,11 @@ import{j as o}from"./liveblocks-y3zMPGKB.js";import{a as u}from"./sentry-Jm7O5sR
65
65
  flex-direction: column;
66
66
  align-items: center;
67
67
  background-color: ${e=>e.theme.colors.grey4};
68
- `,za=$((function(e,a){const{vendorFirstReviewDetails:s}=a,t=e.globalMerchantAutoCompleteState.autoCompleteText,n=R.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},p=U(e);return{vendorFirstReviewView:s,globalMerchantAutoCompleteData:{globalMerchantAutoCompleteView:s.globalMerchantAutoCompleteView,autoCompleteText:t},analytics:j,authParams:l,attachmentEndpoint:p.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${ee}/vendor_attachments_accounting_provider`:`${ee}/vendor_attachments`}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorReviewView:(t,n,i)=>{e(Ee(t,n,i))},onGlobalMerchantAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?e(vn({searchString:t,globalMerchantType:n??"vendor"})):t.trim().length===0&&e(Je())},onUpdateLocalData:(t,n,i,l)=>{if(n!=null){const p=Ya(n);e(gn({vendorId:t,currentSelection:p,selectedGlobalMerchantId:i,vendorRenamedText:l}))}},onResetVendorLocalData:t=>{e(Sn({vendorId:t}))},onVendorNameClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onUpdatePageToken:t=>{e(fn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(mn({sortOrder:t,sortKey:n}))},onUpdateScrollYOffset:t=>{e(hn({scrollYOffset:t}))},onClickSave:(t,n,i)=>{e(pn(t,n,i))},onClickCancelPopup:()=>{e(un())},onClearGlobalMerchantAutoCompleteResults:()=>{e(Je())},onClickRedirectToQBO:()=>{window.open(`${Le.qboRedirectionUrl}/vendors`,"_blank")},updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t})),s(`./vendor/${t.id}`)},onBackClick:()=>{s("../..")},onReloadList:()=>{e(Ee(null))}}}))(Qn);function Qe(){const e=N(),a=G(),s=q(),{tenantEmailDomain:t}=z(),n=ne(),i=R.getSignedInUser(),{vendorId:l}=z(),p=f((d=>Ye(d))),[h,v]=u.useState(!1),m=f((d=>Ye(d).fetchState));if(u.useEffect((()=>{m==="Not-Started"&&h===!1&&(a(Ee(null)),v(!0))}),[]),i==null)throw Error("Can't access first review page without signing in...");const r=d=>d.trackPageLoaded(Be.Event.vendorTenantReviewListPage);return o.jsxs(o.Fragment,{children:[m==="Completed"?o.jsx(Se,{analytics:j,onLoad:r}):null,o.jsx(Se,{analytics:j,onLoad:r}),o.jsx(ha,{isOpen:l!=null,drawerLeftMargin:new Ue(0,0,300,600),onClose:()=>{e("../review")},children:o.jsx(Ja,{onClick:d=>d.stopPropagation(),children:o.jsx(Ga,{})})}),o.jsx(Wa,{windowSize:n,children:o.jsx(za,{location:s,navigate:e,vendorFirstReviewDetails:p,tenantEmailDomain:t})})]})}const Ya=e=>e.recommendedFirst===!0?"recommendedFirst":e.recommendedSecond===!0?"recommendedSecond":e.retain===!0?"retain":e.rename===!0?"rename":e.customMerchant===!0?"customMerchant":null,Ja=B(St)`
68
+ `,za=G((function(e,a){const{vendorFirstReviewDetails:s}=a,t=e.globalMerchantAutoCompleteState.autoCompleteText,n=R.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},p=U(e);return{vendorFirstReviewView:s,globalMerchantAutoCompleteData:{globalMerchantAutoCompleteView:s.globalMerchantAutoCompleteView,autoCompleteText:t},analytics:j,authParams:l,attachmentEndpoint:p.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${ee}/vendor_attachments_accounting_provider`:`${ee}/vendor_attachments`}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorReviewView:(t,n,i)=>{e(Ee(t,n,i))},onGlobalMerchantAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?e(vn({searchString:t,globalMerchantType:n??"vendor"})):t.trim().length===0&&e(Je())},onUpdateLocalData:(t,n,i,l)=>{if(n!=null){const p=Ya(n);e(gn({vendorId:t,currentSelection:p,selectedGlobalMerchantId:i,vendorRenamedText:l}))}},onResetVendorLocalData:t=>{e(Sn({vendorId:t}))},onVendorNameClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=q(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onUpdatePageToken:t=>{e(fn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(mn({sortOrder:t,sortKey:n}))},onUpdateScrollYOffset:t=>{e(hn({scrollYOffset:t}))},onClickSave:(t,n,i)=>{e(pn(t,n,i))},onClickCancelPopup:()=>{e(un())},onClearGlobalMerchantAutoCompleteResults:()=>{e(Je())},onClickRedirectToQBO:()=>{window.open(`${Le.qboRedirectionUrl}/vendors`,"_blank")},updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t})),s(`./vendor/${t.id}`)},onBackClick:()=>{s("../..")},onReloadList:()=>{e(Ee(null))}}}))(Qn);function Qe(){const e=N(),a=W(),s=K(),{tenantEmailDomain:t}=z(),n=ne(),i=R.getSignedInUser(),{vendorId:l}=z(),p=f((d=>Ye(d))),[h,v]=u.useState(!1),m=f((d=>Ye(d).fetchState));if(u.useEffect((()=>{m==="Not-Started"&&h===!1&&(a(Ee(null)),v(!0))}),[]),i==null)throw Error("Can't access first review page without signing in...");const r=d=>d.trackPageLoaded(Be.Event.vendorTenantReviewListPage);return o.jsxs(o.Fragment,{children:[m==="Completed"?o.jsx(Se,{analytics:j,onLoad:r}):null,o.jsx(Se,{analytics:j,onLoad:r}),o.jsx(ha,{isOpen:l!=null,drawerLeftMargin:new Ue(0,0,300,600),onClose:()=>{e("../review")},children:o.jsx(Ja,{onClick:d=>d.stopPropagation(),children:o.jsx(Wa,{})})}),o.jsx($a,{windowSize:n,children:o.jsx(za,{location:s,navigate:e,vendorFirstReviewDetails:p,tenantEmailDomain:t})})]})}const Ya=e=>e.recommendedFirst===!0?"recommendedFirst":e.recommendedSecond===!0?"recommendedSecond":e.retain===!0?"retain":e.rename===!0?"rename":e.customMerchant===!0?"customMerchant":null,Ja=B(St)`
69
69
  display: flex;
70
70
  min-height: 100%;
71
71
  flex-direction: column;
72
- `,Ka=$((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=e.vendorFiling1099UploadDetailsState,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""};let l={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(l=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{analytics:j,vendorFiling1099UploadDetailsViewState:n,authParams:i,googleAPIKey:Le.googleMapsAPIKey,vendorId:a.vendorId,fetchVendorFetchStatus:l,vendor:a.vendorFiling1099UploadDetails?.vendor}}),(function(e,a){const{currentTenant:s,navigate:t,location:n,vendorId:i,vendorFiling1099UploadDetails:l}=a,{tenantEmailDomain:p}=s;return{onVendorFiling1099UploadDetailsSave:h=>{e(lt(h)),j.trackVendor1099DetailSave(l.vendor.legalName??"")},onSaveChangesToLocalStore:h=>{e(dt(h))},onResetVendorFiling1099FormStatus:()=>{e(xn())},onAddressEditHandler:h=>{const v=aa((m=>({street:m.vendor1099FilingSectionId.street,suite:m.vendor1099FilingSectionId.suite,city:m.vendor1099FilingSectionId.city,state:m.vendor1099FilingSectionId.state,country:m.vendor1099FilingSectionId.country,countryCode:m.vendor1099FilingSectionId.countryCode,postalCode:m.vendor1099FilingSectionId.postalCode,secondaryInfo:m.vendor1099FilingSectionId.secondaryInfo}))(h));e(ct({addressType:"vendor_address",addressToCreate:v}))},goBackToListPage:()=>{e(rt(i));const h=`/${p}/vendors/filing_1099/`,v=K(n.state?.pathnameStackToGoBack,n.pathname);t(h,{state:{pathnameStackToGoBack:v}})},onAddressClick:h=>{const v=(function(r,d,c){let x=`/${r}/vendors/filing_1099/upload/${c}/edit`;return x=x.concat(`/new/${d}`),x})(p,h,i),m=K(n.state?.pathnameStackToGoBack,n.pathname);t(v,{state:{pathnameStackToGoBack:m}})},AddressFormPage:Zn}}))(Xn);function qa(){const e=N(),a=q(),{vendorId:s}=z(),t=f((p=>U(p)));let n;if(s==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");n=f((p=>it(p,s)));const{tenantEmailDomain:i}=t,l=t.companyId??R.getSignedInUserTenant(i)?.companyId;if(l==null)throw new Error("Company ID not found for Vendor Filing 1099 Details Screen");return o.jsx(Ka,{location:a,navigate:e,currentTenant:t,vendorId:s,vendorFiling1099UploadDetails:n,companyId:l})}const Ha=B.div`
72
+ `,qa=G((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=e.vendorFiling1099UploadDetailsState,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""};let l={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(l=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{analytics:j,vendorFiling1099UploadDetailsViewState:n,authParams:i,googleAPIKey:Le.googleMapsAPIKey,vendorId:a.vendorId,fetchVendorFetchStatus:l,vendor:a.vendorFiling1099UploadDetails?.vendor}}),(function(e,a){const{currentTenant:s,navigate:t,location:n,vendorId:i,vendorFiling1099UploadDetails:l}=a,{tenantEmailDomain:p}=s;return{onVendorFiling1099UploadDetailsSave:h=>{e(lt(h)),j.trackVendor1099DetailSave(l.vendor.legalName??"")},onSaveChangesToLocalStore:h=>{e(dt(h))},onResetVendorFiling1099FormStatus:()=>{e(xn())},onAddressEditHandler:h=>{const v=aa((m=>({street:m.vendor1099FilingSectionId.street,suite:m.vendor1099FilingSectionId.suite,city:m.vendor1099FilingSectionId.city,state:m.vendor1099FilingSectionId.state,country:m.vendor1099FilingSectionId.country,countryCode:m.vendor1099FilingSectionId.countryCode,postalCode:m.vendor1099FilingSectionId.postalCode,secondaryInfo:m.vendor1099FilingSectionId.secondaryInfo}))(h));e(ct({addressType:"vendor_address",addressToCreate:v}))},goBackToListPage:()=>{e(rt(i));const h=`/${p}/vendors/filing_1099/`,v=q(n.state?.pathnameStackToGoBack,n.pathname);t(h,{state:{pathnameStackToGoBack:v}})},onAddressClick:h=>{const v=(function(r,d,c){let x=`/${r}/vendors/filing_1099/upload/${c}/edit`;return x=x.concat(`/new/${d}`),x})(p,h,i),m=q(n.state?.pathnameStackToGoBack,n.pathname);t(v,{state:{pathnameStackToGoBack:m}})},AddressFormPage:Xn}}))(Zn);function Ka(){const e=N(),a=K(),{vendorId:s}=z(),t=f((p=>U(p)));let n;if(s==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");n=f((p=>it(p,s)));const{tenantEmailDomain:i}=t,l=t.companyId??R.getSignedInUserTenant(i)?.companyId;if(l==null)throw new Error("Company ID not found for Vendor Filing 1099 Details Screen");return o.jsx(qa,{location:a,navigate:e,currentTenant:t,vendorId:s,vendorFiling1099UploadDetails:n,companyId:l})}const Ha=B.div`
73
73
  display: flex;
74
74
  min-height: 100%;
75
75
  width: 100%;
@@ -77,7 +77,7 @@ import{j as o}from"./liveblocks-y3zMPGKB.js";import{a as u}from"./sentry-Jm7O5sR
77
77
  flex-direction: column;
78
78
  align-items: center;
79
79
  background-color: ${e=>e.theme.colors.grey4};
80
- `,Qa=$((function(e,a){const{vendorsFiling1099ListDetails:s,accountMappingView:t,analytics:n}=a;return{analytics:n,vendorsFiling1099List:s.vendors,isVendor1099Populated:s.isVendor1099Populated,accountMappingView:t,fetchState:s.fetchState,uiState:s.uiState,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow}}),(function(e,a){const{navigate:s,analytics:t}=a;return{onUpdateSortUiState:(n,i)=>{e(En({sortOrder:n,sortKey:i}))},onUpdateSearchUiState:n=>{e(Dn({searchString:n}))},onVendorRowClick:n=>{if(a.tenantEmailDomain!=null){const i=`/${a.tenantEmailDomain}/vendors/filing_1099/upload/${encodeURIComponent(n)}/edit`,l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onReloadVendors:()=>{e(Fe(!0))},onBackClick:()=>{e(In()),e(Cn())},onVendorTabSelectionChanged:n=>{const i=de(n);s(i),e(te(le(n)))},onAccountMappingChange:n=>{const{filing1099:i}=n,{bankAccount:l,expenseCategory1099:p}=i,h=ma(a.accountMappingView.bankAccounts1099FilingAccountList,l.selectedOptions),v=fa(a.accountMappingView.expenseAccounts1099FilingAccountList,p),m={selectedBankAccounts1099FilingAccountIds:h.map((r=>r.accountId)),selectedExpenseAccounts1099FilingAccountIds:v};e(wn({data:m}))},onSaveClick:()=>{e(yn()),t.track(Be.Event.vendor1099TabSettingsSave)}}}))(ea);function Xe({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=G(),i=q(),{tenantEmailDomain:l}=z(),p=ne(),h=R.getSignedInUser(),[v,m]=u.useState(!1),[r,d]=u.useState(!1);if(h==null)throw Error("Can't access vendor filing 1099 page without signing in...");ce();const c=f((C=>Tn(C))),x=f((C=>bn(C))),{isAiCfoAccessEnabled:T,onAskAiCfoClick:g}=ie({mobileExploreReferrer:"Vendors — 1099"});se({isDataReady:c.fetchState==="Completed"}),u.useEffect((()=>{r||(d(!0),n(Fe(!1)))}),[r,d]),u.useEffect((()=>{x.saveState.fetchState==="Completed"&&n(Fe(!1))}),[x.saveState.fetchState]);const y=C=>{m(C)},b=f((C=>U(C))),I={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:b.tenantId},E=u.useMemo((()=>({authParams:I,tenantName:b.companyName,filing1099ReportEndPoint:`${ee}/filing1099Reports`})),[]);return o.jsxs(o.Fragment,{children:[c.fetchState==="Completed"?o.jsx(o.Fragment,{children:o.jsx(Se,{analytics:j,onLoad:()=>j.trackPageLoaded(Be.Event.vendor1099ListPage)})}):null,o.jsxs(Ha,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:v,handleDrawerToggle:y}),o.jsx(Qa,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,analytics:j,vendorsFiling1099ListDetails:c,vendorTypeList:c.vendorTypeList,accountMappingView:x,downloadParams:E,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:T,onAskAiCfoClick:g,onClickMenuIcon:()=>{y(!0)}})]})]})}const Xa=B.div`
80
+ `,Qa=G((function(e,a){const{vendorsFiling1099ListDetails:s,accountMappingView:t,analytics:n}=a;return{analytics:n,vendorsFiling1099List:s.vendors,isVendor1099Populated:s.isVendor1099Populated,accountMappingView:t,fetchState:s.fetchState,uiState:s.uiState,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow}}),(function(e,a){const{navigate:s,analytics:t}=a;return{onUpdateSortUiState:(n,i)=>{e(En({sortOrder:n,sortKey:i}))},onUpdateSearchUiState:n=>{e(Dn({searchString:n}))},onVendorRowClick:n=>{if(a.tenantEmailDomain!=null){const i=`/${a.tenantEmailDomain}/vendors/filing_1099/upload/${encodeURIComponent(n)}/edit`,l=q(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onReloadVendors:()=>{e(Fe(!0))},onBackClick:()=>{e(In()),e(Cn())},onVendorTabSelectionChanged:n=>{const i=de(n);s(i),e(te(le(n)))},onAccountMappingChange:n=>{const{filing1099:i}=n,{bankAccount:l,expenseCategory1099:p}=i,h=ma(a.accountMappingView.bankAccounts1099FilingAccountList,l.selectedOptions),v=fa(a.accountMappingView.expenseAccounts1099FilingAccountList,p),m={selectedBankAccounts1099FilingAccountIds:h.map((r=>r.accountId)),selectedExpenseAccounts1099FilingAccountIds:v};e(wn({data:m}))},onSaveClick:()=>{e(yn()),t.track(Be.Event.vendor1099TabSettingsSave)}}}))(ea);function Ze({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=W(),i=K(),{tenantEmailDomain:l}=z(),p=ne(),h=R.getSignedInUser(),[v,m]=u.useState(!1),[r,d]=u.useState(!1);if(h==null)throw Error("Can't access vendor filing 1099 page without signing in...");ce();const c=f((C=>Tn(C))),x=f((C=>bn(C))),{isAiCfoAccessEnabled:T,onAskAiCfoClick:g}=ie({mobileExploreReferrer:"Vendors — 1099"});se({isDataReady:c.fetchState==="Completed"}),u.useEffect((()=>{r||(d(!0),n(Fe(!1)))}),[r,d]),u.useEffect((()=>{x.saveState.fetchState==="Completed"&&n(Fe(!1))}),[x.saveState.fetchState]);const y=C=>{m(C)},b=f((C=>U(C))),I={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:b.tenantId},E=u.useMemo((()=>({authParams:I,tenantName:b.companyName,filing1099ReportEndPoint:`${ee}/filing1099Reports`})),[]);return o.jsxs(o.Fragment,{children:[c.fetchState==="Completed"?o.jsx(o.Fragment,{children:o.jsx(Se,{analytics:j,onLoad:()=>j.trackPageLoaded(Be.Event.vendor1099ListPage)})}):null,o.jsxs(Ha,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:v,handleDrawerToggle:y}),o.jsx(Qa,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,analytics:j,vendorsFiling1099ListDetails:c,vendorTypeList:c.vendorTypeList,accountMappingView:x,downloadParams:E,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:T,onAskAiCfoClick:g,onClickMenuIcon:()=>{y(!0)}})]})]})}const Za=B.div`
81
81
  display: flex;
82
82
  min-height: 100%;
83
83
  width: 100%;
@@ -85,4 +85,4 @@ import{j as o}from"./liveblocks-y3zMPGKB.js";import{a as u}from"./sentry-Jm7O5sR
85
85
  flex-direction: column;
86
86
  align-items: center;
87
87
  background-color: ${e=>e.theme.colors.grey4};
88
- `,Za=$((function(e,a){const{vendorsListDetails:s}=a;return{vendorsList:s.vendors,totalVendorCount:s.totalVendorCount,fetchState:s.fetchState,uiState:s.uiState,searchText:s.searchString,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow,isAccountingClassesEnabled:me(e),analytics:j}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorsList:(t="",n,i)=>{e(_n({searchString:t,keepExistingListItems:n,view:"vendorsTab",pageToken:i}))},onUpdatePageToken:t=>{e(Pn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(jn({sortOrder:t,sortkey:n}))},onUpdateCurrentYTDSelection:t=>{e(Vn({ytdSpendSelection:t}))},onVendorRowClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Vendor List"}})}},onReloadVendors:()=>{console.log("Reload vendors")},onUpdateScrollYOffset:t=>{e(kn({scrollYOffset:t}))},onBackClick:()=>{s("../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))}}}))(ta);function eo({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=G(),i=q(),{tenantEmailDomain:l}=z(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=H(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled);ce();const d=e.includes("prepaid_expenses"),c=e.includes("fixed_assets"),x=e.includes("accrued_expenses"),T=f((k=>oe(k)));let g={};g=f((k=>Fn(k,"vendorsTab")));const[y,b]=u.useState(!1),{isAiCfoAccessEnabled:I,onAskAiCfoClick:E}=ie({mobileExploreReferrer:"Vendors Summary"});se({isDataReady:g.fetchState==="Completed"});const C=f((k=>ue(k))),w=f((k=>Y(k).isReportGenerated));f((k=>Y(k).fetchState))==="Completed"&&w&&m&&!e.includes("operating_expenses_by_vendor")&&e.splice(1,0,"operating_expenses_by_vendor");const[A,P]=u.useState(!1);if(u.useEffect((()=>{(d||c)&&A===!1&&C!=="Completed"&&(n(pe()),P(!0))}),[A]),u.useEffect((()=>{n(he({shouldFetchAccruedExpenses:x,shouldFetchFixedAssets:c,shouldFetchPrepaidExpenses:d,shouldFetchOpexByVendor:m&&r===!1,shouldFetchVendorsList:!0,shouldFetchFiling1099Vendor:!1}))}),[C,c,r,m]),u.useEffect((()=>{y||g.fetchState!=="Completed"||(b(!0),j.trackVendorList(T.currentTab,T.previousTab??null,g.totalVendorCount,g.uiState.sortKey,g.uiState.ytdSpendSelection))}),[g.fetchState]),h==null)throw Error("Can't access address page without signing in...");const[O,F]=u.useState(!1),D=k=>{F(k)};return o.jsxs(Xa,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:O,handleDrawerToggle:D}),o.jsx(Za,{location:i,navigate:t,vendorsListDetails:g,tenantEmailDomain:l,vendorTabsToShow:e,onClickMenuIcon:()=>{D(!0)},previousTabPosition:a,setPreviousTabPosition:s,isAiCfoAccessEnabled:I,onAskAiCfoClick:E})]})}function ko(){const{useFeatureGate:e}=H(),a=q().state?.referrer,[s,t]=u.useState(!1),[n,i]=u.useState(0),l=R.getSignedInUser(),p=An(l),{isFeatureEnabled:h}=e(M.isOpexByVendorFeatureEnabled),{isFeatureEnabled:v}=e(M.isVendorReviewFeatureEnabled),{isFeatureEnabled:m}=e(M.isScheduledJEPrepaidExpensesFeatureEnabled),{isFeatureEnabled:r}=e(M.isScheduledJEFixedAssetsFeatureEnabled),{isFeatureEnabled:d}=e(M.isScheduledJEAccruedExpensesFeatureEnabled),{isFeatureEnabled:c}=e(M.isFiling1099FeatureEnabled),x=f((E=>U(E))),T=x?.externalConnections?.accounting[0]?.connectionName,g=["vendors_tab"];T!=="netsuite"&&m===!0&&g.push("prepaid_expenses"),T!=="netsuite"&&r===!0&&g.push("fixed_assets"),T!=="netsuite"&&d===!0&&g.push("accrued_expenses"),T!=="netsuite"&&c&&p&&(g.push("filing_1099"),h&&g.splice(1,0,"operating_expenses_by_vendor"));const{isFeatureEnabled:y}=e(M.isDebitCardFeatureEnabled),b=Rn(y,x),I=Un(x);return b===!0||I===!0?o.jsx(Me,{children:o.jsx(V,{path:"/*",element:o.jsx(sa,{})})}):o.jsxs(Me,{children:[o.jsx(V,{path:"/opex",element:h===!0?o.jsx(Da,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../summary"})}),o.jsx(V,{path:"/summary",element:o.jsx(eo,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g})}),o.jsx(V,{path:"schedules/fixed_assets/details/:scheduleDetailId",element:r===!0?o.jsx(ia,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/accrued_expenses/details/:scheduleDetailId",element:r===!0?o.jsx(ra,{shouldNavigateBack:s,setShouldNavigateBack:t}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/one_time_accrual/details/:accrualId",element:d===!0?o.jsx(da,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/:scheduleType/details/:scheduleDetailId",element:m===!0?o.jsx(la,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/:scheduleType/details/:scheduleDetailId/edit_link",element:m===!0||r===!0?o.jsx(va,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/accrued_expenses/details/:scheduleDetailId/edit_link",element:d===!0?o.jsx(ca,{setShouldNavigateBack:t}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/prepaid_expenses",element:m===!0?o.jsx(Fa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"schedules/fixed_assets",element:r===!0?o.jsx(wa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"schedules/accrued_expenses",element:d===!0?o.jsx(ba,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"/filing_1099",element:c&&p?o.jsx(Xe,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"/filing_1099/:vendorId",element:c&&p?o.jsx(Xe,{vendorTabsToShow:g,previousTabPosition:n,setPreviousTabPosition:i}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"/filing_1099/upload/:vendorId/edit",element:c&&p?o.jsx(He,{appContent:o.jsx(qa,{}),showFullScreenSkeletonWhileLoading:!0}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"/filing_1099/upload/:vendorId/edit/new/:addressType",element:c&&p?o.jsx(He,{appContent:o.jsx(oa,{isSubPage:!0,hideAddressBackButton:!0,hideAddressSubTitle:!0})}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"/summary/:vendorId/:qboId",element:o.jsx(qe,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(V,{path:"/summary/:vendorId/:qboId/:timeframe/:startDate/:endDate",element:o.jsx(qe,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(V,{path:"/review",element:v===!0?o.jsx(Qe,{}):o.jsx(fe,{})}),o.jsx(V,{path:"/review/vendor/:vendorId",element:v?o.jsx(Qe,{}):o.jsx(fe,{})}),o.jsx(V,{path:"/",element:o.jsx(L,{to:"summary"})}),o.jsx(V,{path:"*",element:o.jsx(fe,{})})]})}export{ko as default};
88
+ `,Xa=G((function(e,a){const{vendorsListDetails:s}=a;return{vendorsList:s.vendors,totalVendorCount:s.totalVendorCount,fetchState:s.fetchState,uiState:s.uiState,searchText:s.searchString,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow,isAccountingClassesEnabled:me(e),analytics:j}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorsList:(t="",n,i)=>{e(_n({searchString:t,keepExistingListItems:n,view:"vendorsTab",pageToken:i}))},onUpdatePageToken:t=>{e(Pn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(jn({sortOrder:t,sortkey:n}))},onUpdateCurrentYTDSelection:t=>{e(Vn({ytdSpendSelection:t}))},onVendorRowClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=q(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Vendor List"}})}},onReloadVendors:()=>{console.log("Reload vendors")},onUpdateScrollYOffset:t=>{e(kn({scrollYOffset:t}))},onBackClick:()=>{s("../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))}}}))(ta);function eo({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=W(),i=K(),{tenantEmailDomain:l}=z(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=H(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled);ce();const d=e.includes("prepaid_expenses"),c=e.includes("fixed_assets"),x=e.includes("accrued_expenses"),T=f((k=>oe(k)));let g={};g=f((k=>Fn(k,"vendorsTab")));const[y,b]=u.useState(!1),{isAiCfoAccessEnabled:I,onAskAiCfoClick:E}=ie({mobileExploreReferrer:"Vendors Summary"});se({isDataReady:g.fetchState==="Completed"});const C=f((k=>ue(k))),w=f((k=>Y(k).isReportGenerated));f((k=>Y(k).fetchState))==="Completed"&&w&&m&&!e.includes("operating_expenses_by_vendor")&&e.splice(1,0,"operating_expenses_by_vendor");const[A,P]=u.useState(!1);if(u.useEffect((()=>{(d||c)&&A===!1&&C!=="Completed"&&(n(pe()),P(!0))}),[A]),u.useEffect((()=>{n(he({shouldFetchAccruedExpenses:x,shouldFetchFixedAssets:c,shouldFetchPrepaidExpenses:d,shouldFetchOpexByVendor:m&&r===!1,shouldFetchVendorsList:!0,shouldFetchFiling1099Vendor:!1}))}),[C,c,r,m]),u.useEffect((()=>{y||g.fetchState!=="Completed"||(b(!0),j.trackVendorList(T.currentTab,T.previousTab??null,g.totalVendorCount,g.uiState.sortKey,g.uiState.ytdSpendSelection))}),[g.fetchState]),h==null)throw Error("Can't access address page without signing in...");const[O,F]=u.useState(!1),D=k=>{F(k)};return o.jsxs(Za,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:O,handleDrawerToggle:D}),o.jsx(Xa,{location:i,navigate:t,vendorsListDetails:g,tenantEmailDomain:l,vendorTabsToShow:e,onClickMenuIcon:()=>{D(!0)},previousTabPosition:a,setPreviousTabPosition:s,isAiCfoAccessEnabled:I,onAskAiCfoClick:E})]})}function ko(){const{useFeatureGate:e}=H(),a=K().state?.referrer,[s,t]=u.useState(!1),[n,i]=u.useState(0),l=R.getSignedInUser(),p=An(l),{isFeatureEnabled:h}=e(M.isOpexByVendorFeatureEnabled),{isFeatureEnabled:v}=e(M.isVendorReviewFeatureEnabled),{isFeatureEnabled:m}=e(M.isScheduledJEPrepaidExpensesFeatureEnabled),{isFeatureEnabled:r}=e(M.isScheduledJEFixedAssetsFeatureEnabled),{isFeatureEnabled:d}=e(M.isScheduledJEAccruedExpensesFeatureEnabled),{isFeatureEnabled:c}=e(M.isFiling1099FeatureEnabled),x=f((E=>U(E))),T=x?.externalConnections?.accounting[0]?.connectionName,g=["vendors_tab"];T!=="netsuite"&&m===!0&&g.push("prepaid_expenses"),T!=="netsuite"&&r===!0&&g.push("fixed_assets"),T!=="netsuite"&&d===!0&&g.push("accrued_expenses"),T!=="netsuite"&&c&&p&&(g.push("filing_1099"),h&&g.splice(1,0,"operating_expenses_by_vendor"));const{isFeatureEnabled:y}=e(M.isDebitCardFeatureEnabled),b=Rn(y,x),I=Un(x);return b===!0||I===!0?o.jsx(Me,{children:o.jsx(V,{path:"/*",element:o.jsx(sa,{})})}):o.jsxs(Me,{children:[o.jsx(V,{path:"/opex",element:h===!0?o.jsx(Da,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../summary"})}),o.jsx(V,{path:"/summary",element:o.jsx(eo,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g})}),o.jsx(V,{path:"schedules/fixed_assets/details/:scheduleDetailId",element:r===!0?o.jsx(ia,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/accrued_expenses/details/:scheduleDetailId",element:r===!0?o.jsx(ra,{shouldNavigateBack:s,setShouldNavigateBack:t}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/one_time_accrual/details/:accrualId",element:d===!0?o.jsx(da,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/:scheduleType/details/:scheduleDetailId",element:m===!0?o.jsx(la,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/:scheduleType/details/:scheduleDetailId/edit_link",element:m===!0||r===!0?o.jsx(va,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/accrued_expenses/details/:scheduleDetailId/edit_link",element:d===!0?o.jsx(ca,{setShouldNavigateBack:t}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(V,{path:"schedules/prepaid_expenses",element:m===!0?o.jsx(Fa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"schedules/fixed_assets",element:r===!0?o.jsx(wa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"schedules/accrued_expenses",element:d===!0?o.jsx(ba,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"/filing_1099",element:c&&p?o.jsx(Ze,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"/filing_1099/:vendorId",element:c&&p?o.jsx(Ze,{vendorTabsToShow:g,previousTabPosition:n,setPreviousTabPosition:i}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"/filing_1099/upload/:vendorId/edit",element:c&&p?o.jsx(He,{appContent:o.jsx(Ka,{}),showFullScreenSkeletonWhileLoading:!0}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"/filing_1099/upload/:vendorId/edit/new/:addressType",element:c&&p?o.jsx(He,{appContent:o.jsx(oa,{isSubPage:!0,hideAddressBackButton:!0,hideAddressSubTitle:!0})}):o.jsx(L,{to:"../opex"})}),o.jsx(V,{path:"/summary/:vendorId/:qboId",element:o.jsx(Ke,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(V,{path:"/summary/:vendorId/:qboId/:timeframe/:startDate/:endDate",element:o.jsx(Ke,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(V,{path:"/review",element:v===!0?o.jsx(Qe,{}):o.jsx(fe,{})}),o.jsx(V,{path:"/review/vendor/:vendorId",element:v?o.jsx(Qe,{}):o.jsx(fe,{})}),o.jsx(V,{path:"/",element:o.jsx(L,{to:"summary"})}),o.jsx(V,{path:"*",element:o.jsx(fe,{})})]})}export{ko as default};
@@ -0,0 +1,12 @@
1
+ import{j as o}from"./liveblocks-BXyXenK7.js";import{a as f}from"./sentry-D4svnzxK.js";import{t as u,u as h,j as b,N as y}from"./core-Bl4MLhFi.js";import{Ul as I,gh as w,Jo as j}from"./zeni-epic-state-UM7IPCLf.js";import{z as l,a7 as x,af as S,ag as D}from"./index-DdFMa5Bp.js";import{n as g}from"./mui-CyP-P4av.js";import"./recharts-CZKBTuPa.js";import"./analytics-B06OpwA-.js";import"./plaid-C0aCR9wu.js";import"./dnd-CimhpTrK.js";import"./stripe-cKAAJElX.js";import"./lottie-2qUppQdg.js";import"./lexical-BbBoQdpc.js";import"./pdf-BENieWk6.js";import"./utils-Bycom664.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]="849fa40d-5a7a-4c82-bdf5-44f2b09d6b98",e._sentryDebugIdIdentifier="sentry-dbid-849fa40d-5a7a-4c82-bdf5-44f2b09d6b98")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,c]=f.useState(!1),a=h(),i=b((m=>I(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(c(!0),a(j(t,p,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=g.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
+ `,_=g(D.LargeRegular)`
10
+ display: flex;
11
+ color: ${S.important};
12
+ `;export{B as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-y3zMPGKB.js";import{u as z,h as ae,g as W,i as N,j as D,l as te,N as ee,n as $e,o as C}from"./core-BwK6FGJd.js";import{$6 as Fe,Le as Ue,$7 as _e,fE as R,Gw as ze,$8 as kn,cu as ne,cv as Me,Gq as wn,$9 as Dn,$a as In,Gt as Sn,GA as ge,Gn as bn,Gk as Pn,YF as le,$b as jn,OL as vn,WC as En,ON as Tn,mH as Pe,$c as On,uS as Ve,uG as Ze,my as Ge,mB as je,WD as ve,WE as Bn,$d as Ln,mA as Rn,mX as $n,mp as Fn,kP as Un,kO as _n,$e as zn,$f as fe,Os as Mn,$g as Vn,$h as Zn,YV as ye,$i as Ee,$j as Gn,OY as Hn,Zf as Wn,Mj as He,C2 as We,$k as Nn,OV as Yn,$l as Ne,d9 as xe,P0 as Ye,dY as qe,dZ as Ce,O_ as qn,Md as Jn,OS as Kn,$m as Je,$n as Ke,Ou as Xe,OE as Te,$o as Xn,Z6 as Qn,P1 as ea,bq as na,bJ as aa,cG as ta,bK as oa,bt as sa,U1 as ia}from"./zeni-epic-state-BugXGzus.js";import{U as oe,O as Z,c as _,z as b,av as Ae,E as $,a7 as de,cY as ra,a1 as V,ab as Y,a4 as Qe,j as ca,o as Oe,k as O,cZ as la,ae as ke,c_ as da,a8 as ue,c$ as ua,T as we,bi as H,d0 as pa,aq as ma,as as en,d1 as Be,d2 as ga,p as ce,d3 as fa,ai as ha,d4 as ya,d5 as xa,g as Ca,J as Aa}from"./index-DTZt8DRK.js";import{n as F,D as q,S as J}from"./mui-CxIkaR9n.js";import Q from"./NotFoundScreen-DVcHaqdZ.js";import{S as Le}from"./SetupPagesScreen-DV-Hyv78.js";import{F as nn}from"./FeaturePreviewScreen-C8dKuiF7.js";import{a as m}from"./sentry-Jm7O5sR0.js";import{M as pe}from"./MobileAppDrawer-plEMRzd-.js";import{A as ka,D as wa,V as Da}from"./DomesticWireDetailScreen-42PVSRte.js";import{A as Ia}from"./AddressScreen-tI262EI8.js";import{u as an}from"./useAskAiCfoHostNavButtonProps-DzjGv8Xy.js";import{Z as Sa}from"./ZeniAccountStatementScreen-CuxmtWXH.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./BusinessVerificationPageScreen-BLwno7qB.js";import"./routePaths-CPqwWbPN.js";import"./analyticsHelper-BwLj34Ys.js";import"./InboxNotificationsProvider-ozJWRqdQ.js";import"./useTaskManagerAccess-DRF4urEw.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="fbfec81b-2d77-47fe-a369-cc3e3ccc4395",n._sentryDebugIdIdentifier="sentry-dbid-fbfec81b-2d77-47fe-a369-cc3e3ccc4395")}catch{}})();const ba=F.div`
1
+ import{j as e}from"./liveblocks-BXyXenK7.js";import{u as z,h as ae,g as N,i as W,j as D,l as te,N as ee,n as Ue,o as C}from"./core-Bl4MLhFi.js";import{$7 as $e,Lg as Fe,$8 as _e,fE as R,Gy as ze,$9 as wn,cu as ne,cv as Me,Gs as kn,$a as Dn,$b as In,Gv as Sn,GC as ge,Gp as bn,Gm as Pn,YH as le,$c as vn,ON as jn,WE as En,OP as Tn,mH as Pe,$d as On,uS as Ve,uG as Ze,my as Ge,mB as ve,WF as je,WG as Bn,$e as Ln,mA as Rn,mX as Un,mp as $n,kP as Fn,kO as _n,$f as zn,$g as he,Ou as Mn,$h as Vn,$i as Zn,YX as ye,$j as Ee,$k as Gn,O_ as Hn,Zh as Nn,Ml as He,C4 as Ne,$l as Wn,OX as Yn,$m as We,d9 as xe,P2 as Ye,dY as Xe,dZ as Ce,P0 as Xn,Mf as Kn,OU as qn,$n as Ke,$o as qe,Ow as Je,OG as Te,$p as Jn,Z8 as Qn,P3 as ea,bq as na,bJ as aa,cG as ta,bK as oa,bt as sa,U3 as ia}from"./zeni-epic-state-UM7IPCLf.js";import{U as oe,N as Z,d as _,z as b,av as Ae,c as U,a7 as de,cY as ra,a1 as V,ab as Y,a4 as Qe,j as ca,o as Oe,k as O,cZ as la,ae as we,c_ as da,a8 as ue,c$ as ua,S as ke,bi as H,d0 as pa,aq as ma,as as en,d1 as Be,d2 as ga,p as ce,d3 as ha,ai as fa,d4 as ya,d5 as xa,h as Ca,H as Aa}from"./index-DdFMa5Bp.js";import{n as $,D as X,S as K}from"./mui-CyP-P4av.js";import Q from"./NotFoundScreen-BgAFt-5i.js";import{S as Le}from"./SetupPagesScreen-xbVRY5FM.js";import{F as nn}from"./FeaturePreviewScreen-Dq-gMmD5.js";import{a as m}from"./sentry-D4svnzxK.js";import{M as pe}from"./MobileAppDrawer-DA5tIumN.js";import{A as wa,D as ka,V as Da}from"./DomesticWireDetailScreen-B2Dv5N-8.js";import{A as Ia}from"./AddressScreen-gQBK8ckZ.js";import{u as an}from"./useAskAiCfoHostNavButtonProps-noW3mVAb.js";import{Z as Sa}from"./ZeniAccountStatementScreen-CUt_2P5O.js";import"./recharts-CZKBTuPa.js";import"./analytics-B06OpwA-.js";import"./plaid-C0aCR9wu.js";import"./dnd-CimhpTrK.js";import"./stripe-cKAAJElX.js";import"./lottie-2qUppQdg.js";import"./lexical-BbBoQdpc.js";import"./pdf-BENieWk6.js";import"./utils-Bycom664.js";import"./BusinessVerificationPageScreen-CYmgKyWB.js";import"./routePaths-oqx5AHwx.js";import"./analyticsHelper-D34fCnq4.js";import"./InboxNotificationsProvider-CMdsyY0A.js";import"./useTaskManagerAccess-DNpJRUSa.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="812ef7fb-c37a-4b8b-a768-c3764952f30a",n._sentryDebugIdIdentifier="sentry-dbid-812ef7fb-c37a-4b8b-a768-c3764952f30a")}catch{}})();const ba=$.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,19 +6,19 @@ import{j as e}from"./liveblocks-y3zMPGKB.js";import{u as z,h as ae,g as W,i as N
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${n=>n.theme.colors.grey4};
9
- `;function Re({isEditDrawerOpen:n}){const a=$(),[i,t]=m.useState(!1),{autoTransferRulePageProps:o,isLoading:r}=(function({isEditDrawerOpen:d=!1}={}){const c=z(),p=ae(),f=W(),{ruleId:h,tenantEmailDomain:s}=N(),l=oe(),{useFeatureGate:g}=Z(),y=D((u=>Fe(u))),A=D((u=>Ue(u.depositAccountState,u.depositAccountListState))),I=D((u=>_e(u))),k=D((u=>R(u))),{isFeatureEnabled:P}=g(_.isTreasuryEnabled),x=y?.fetchState??"Not-Started",w=k?.companyId??(s==null?void 0:b.getSignedInUserTenant(s)?.companyId);m.useEffect((()=>{x==="Not-Started"&&w!=null&&c(ze(!0))}),[c,x,w]);const j=y?.fetchState!=="Completed";if(j)return{autoTransferRulePageProps:void 0,isLoading:j};const B=k?.company!=null&&kn(k.company),v=!!(P&&B),E=ne(l?.loggedInUserRoleMap)||Me(l?.loggedInUserRoleMap),T=b.getSignedInUser(),L={userId:T?.userId??"",sessionId:T?.zeniSessionId??"",tenantId:k?.tenantId??""},S=!!f.state?.scrollToAddRule;return{isLoading:j,autoTransferRulePageProps:{autoTransferRuleView:y,companyName:k?.companyName??"",hasAdminLevelAccess:E,includeTreasuryOption:v,transferLimit:5e5,authParams:L,currentTenant:k,depositAccountListView:A,downloadAccountDetailEndPoint:`${Ae}/account_details`,editingRuleId:h,isEditDrawerOpen:d,scrollToAddRule:S,zeniAccountsConfigDetail:I,onBackClick:()=>p(".."),onCreateRule:()=>{c(Pn())},onUpdateRule:u=>{c(ge(u))},onDeleteClick:u=>{c(bn(u))},onPauseClick:u=>{c(ge(u,!0,!1))},onResumeClick:u=>{c(ge(u,!1,!0))},onActivityClick:(u,M)=>{c(Sn(u,M))},onUpdateRuleLocalData:u=>{c(In(u))},clearRuleLocalData:()=>{c(Dn())},onEditClick:u=>{p(`./${u}/edit`)},onEditDrawerClose:()=>{p("../../",{relative:"path"})},onReviewClick:()=>{c(wn())}}}})({isEditDrawerOpen:n});return r||o==null?e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(ba,{children:[e.jsx(pe,{isAppContentDrawerOpen:i,handleDrawerToggle:d=>{t(d)}}),e.jsx(ra,{...o})]})}const Pa={overlayWidth:new Y(100,100,58)},ja=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:i})=>{const t=z(),o=$(),r=V();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(q,{onClose:()=>{i(!0),t(le())},anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(va,{onClick:d=>d.stopPropagation(),children:e.jsx(ka,{vendorIdParam:n,accountContext:"express-pay"})})})},va=F(J)`
9
+ `;function Re({isEditDrawerOpen:n}){const a=U(),[i,t]=m.useState(!1),{autoTransferRulePageProps:o,isLoading:r}=(function({isEditDrawerOpen:d=!1}={}){const c=z(),p=ae(),h=N(),{ruleId:f,tenantEmailDomain:s}=W(),l=oe(),{useFeatureGate:g}=Z(),y=D((u=>$e(u))),A=D((u=>Fe(u.depositAccountState,u.depositAccountListState))),I=D((u=>_e(u))),w=D((u=>R(u))),{isFeatureEnabled:P}=g(_.isTreasuryEnabled),x=y?.fetchState??"Not-Started",k=w?.companyId??(s==null?void 0:b.getSignedInUserTenant(s)?.companyId);m.useEffect((()=>{x==="Not-Started"&&k!=null&&c(ze(!0))}),[c,x,k]);const v=y?.fetchState!=="Completed";if(v)return{autoTransferRulePageProps:void 0,isLoading:v};const B=w?.company!=null&&wn(w.company),j=!!(P&&B),E=ne(l?.loggedInUserRoleMap)||Me(l?.loggedInUserRoleMap),T=b.getSignedInUser(),L={userId:T?.userId??"",sessionId:T?.zeniSessionId??"",tenantId:w?.tenantId??""},S=!!h.state?.scrollToAddRule;return{isLoading:v,autoTransferRulePageProps:{autoTransferRuleView:y,companyName:w?.companyName??"",hasAdminLevelAccess:E,includeTreasuryOption:j,transferLimit:5e5,authParams:L,currentTenant:w,depositAccountListView:A,downloadAccountDetailEndPoint:`${Ae}/account_details`,editingRuleId:f,isEditDrawerOpen:d,scrollToAddRule:S,zeniAccountsConfigDetail:I,onBackClick:()=>p(".."),onCreateRule:()=>{c(Pn())},onUpdateRule:u=>{c(ge(u))},onDeleteClick:u=>{c(bn(u))},onPauseClick:u=>{c(ge(u,!0,!1))},onResumeClick:u=>{c(ge(u,!1,!0))},onActivityClick:(u,M)=>{c(Sn(u,M))},onUpdateRuleLocalData:u=>{c(In(u))},clearRuleLocalData:()=>{c(Dn())},onEditClick:u=>{p(`./${u}/edit`)},onEditDrawerClose:()=>{p("../../",{relative:"path"})},onReviewClick:()=>{c(kn())}}}})({isEditDrawerOpen:n});return r||o==null?e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(ba,{children:[e.jsx(pe,{isAppContentDrawerOpen:i,handleDrawerToggle:d=>{t(d)}}),e.jsx(ra,{...o})]})}const Pa={overlayWidth:new Y(100,100,58)},va=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:i})=>{const t=z(),o=U(),r=V();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(X,{onClose:()=>{i(!0),t(le())},anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ja,{onClick:d=>d.stopPropagation(),children:e.jsx(wa,{vendorIdParam:n,accountContext:"express-pay"})})})},ja=$(K)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
13
- `,Ea={overlayWidth:new Y(100,100,58)},Ta=({isDrawerOpen:n,closeDrawerHandler:a})=>{const i=z(),t=$(),o=V();if(b.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(q,{onClose:()=>{a(!0),i(le())},anchor:"right",open:n,PaperProps:{style:{width:Ea.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Oa,{onClick:r=>r.stopPropagation(),children:e.jsx(Ia,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Oa=F(J)`
13
+ `,Ea={overlayWidth:new Y(100,100,58)},Ta=({isDrawerOpen:n,closeDrawerHandler:a})=>{const i=z(),t=U(),o=V();if(b.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(X,{onClose:()=>{a(!0),i(le())},anchor:"right",open:n,PaperProps:{style:{width:Ea.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Oa,{onClick:r=>r.stopPropagation(),children:e.jsx(Ia,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Oa=$(K)`
14
14
  display: flex;
15
15
  min-height: 100%;
16
16
  flex-direction: column;
17
- `,Ba={overlayWidth:new Y(100,100,58)},La=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:i})=>{const t=z(),o=$(),r=V();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(q,{onClose:()=>{i(!0),t(le())},anchor:"right",open:a,PaperProps:{style:{width:Ba.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ra,{onClick:d=>d.stopPropagation(),children:e.jsx(wa,{vendorIdParam:n,accountContext:"express-pay"})})})},Ra=F(J)`
17
+ `,Ba={overlayWidth:new Y(100,100,58)},La=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:i})=>{const t=z(),o=U(),r=V();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(X,{onClose:()=>{i(!0),t(le())},anchor:"right",open:a,PaperProps:{style:{width:Ba.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ra,{onClick:d=>d.stopPropagation(),children:e.jsx(ka,{vendorIdParam:n,accountContext:"express-pay"})})})},Ra=$(K)`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  flex-direction: column;
21
- `,$a=F.div`
21
+ `,Ua=$.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,19 +26,19 @@ import{j as e}from"./liveblocks-y3zMPGKB.js";import{u as z,h as ae,g as W,i as N
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${n=>n.theme.colors.grey4};
29
- `,Fa=te((function(n,a){const i=R(n),t=b.getSignedInUser(),o=i.tenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=En(n,"common");return{expressPayDetails:d,fileProps:{authParams:r,filesEndPoint:`${ke.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:i}=a;return{onSaveVendor:t=>{n(_n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(je({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Un({localData:t}))},onVendorSelected:t=>{t!=null&&n(Fn(t,!1))},updateSelectedVendorForCreate:t=>{n($n(t))},initializeVendorAddress:()=>{n(Rn())},resetVendorSaveStatus:t=>{n(Ln({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(ve("common"))},onCancelAutoComplete:()=>{n(ve("common"))}},chooseNewVendor:t=>{n(je({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?i("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&i("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(Ge({files:t}))},onDeleteFile:t=>{n(Ze(t))},onEditFileName:(t,o)=>{n(Ve(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Pe(t)),n(Pe()),n(On()),n(le()),i("../",{relative:"path"})},onSchedulePayment:()=>{n(Tn())}}}))(la);function ie({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:i}){const t=ae(),o=W(),r=z(),[d,c]=m.useState(!1),{tenantEmailDomain:p}=N(),f=oe(),h=D((u=>u.expressPayState.fetchState)),s=D((u=>R(u))),l=D((u=>jn(u))),g=l.expressPayLocalData?.vendorId,y=s.companyId??b.getSignedInUserTenant(p)?.companyId,[A,I]=m.useState(!1),[k,P]=m.useState(!1),[x,w]=m.useState(!1),j=Qe(o.state?.pathnameStackToGoBack),{poppedPathname:B}=j,v=B?.split("/"),E=v?.[v.length-1];m.useEffect((()=>{n===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[n]),m.useEffect((()=>{a===!0?P(!0):(P(!1),document.body.style.overflow="auto")}),[a]),m.useEffect((()=>{i===!0?w(!0):(w(!1),document.body.style.overflow="auto")}),[i]),m.useEffect((()=>{h==="Not-Started"&&r(vn(!0,!0))}),[h,r]);const T=ca(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(m.useEffect((()=>{T==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&S()}),[T,l.vendorViewDetails.bankAccountCreationState?.fetchState]),b.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const L=u=>{c(u)},S=()=>{I(!1),P(!1),t("../",{relative:"path"})};return e.jsxs($a,{children:[Oe(o)?e.jsx(pe,{isAppContentDrawerOpen:d,handleDrawerToggle:L}):null,A===!0?e.jsx(ja,{vendorId:g,closeDrawerHandler:S,isDrawerOpen:A}):null,k===!0?e.jsx(La,{vendorId:g,closeDrawerHandler:S,isDrawerOpen:k}):null,x===!0?e.jsx(Ta,{closeDrawerHandler:S,isDrawerOpen:x}):null,e.jsx(Da,{vendorId:g,isExpressPayPage:!0}),e.jsx(Fa,{navigate:t,location:o,companyId:y,accountId:E,analytics:O,currentTenant:s,vendorId:g,roleMap:f?.loggedInUserRoleMap,isSettings:Oe(o),expressPayDetails:l,onClickMenuIcon:()=>{L(!0)}})]})}const Ua={overlayWidth:new Y(100,100,58)},_a=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:i,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const r=$(),d=V(),c=D((s=>_e(s))),p=D((s=>R(s)));if(b.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const f=()=>{o(!0)},h={depositAccount:t,onDismissClick:f,zeniAccountsConfigDetail:c,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:p};return e.jsx(q,{anchor:"right",open:i,PaperProps:{style:{width:Ua.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>f(),children:e.jsx(za,{onClick:s=>s.stopPropagation(),children:e.jsx(da,{...h})})})},za=F(J)`
29
+ `,$a=te((function(n,a){const i=R(n),t=b.getSignedInUser(),o=i.tenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=En(n,"common");return{expressPayDetails:d,fileProps:{authParams:r,filesEndPoint:`${we.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:i}=a;return{onSaveVendor:t=>{n(_n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(ve({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Fn({localData:t}))},onVendorSelected:t=>{t!=null&&n($n(t,!1))},updateSelectedVendorForCreate:t=>{n(Un(t))},initializeVendorAddress:()=>{n(Rn())},resetVendorSaveStatus:t=>{n(Ln({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(je("common"))},onCancelAutoComplete:()=>{n(je("common"))}},chooseNewVendor:t=>{n(ve({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?i("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&i("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(Ge({files:t}))},onDeleteFile:t=>{n(Ze(t))},onEditFileName:(t,o)=>{n(Ve(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Pe(t)),n(Pe()),n(On()),n(le()),i("../",{relative:"path"})},onSchedulePayment:()=>{n(Tn())}}}))(la);function ie({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:i}){const t=ae(),o=N(),r=z(),[d,c]=m.useState(!1),{tenantEmailDomain:p}=W(),h=oe(),f=D((u=>u.expressPayState.fetchState)),s=D((u=>R(u))),l=D((u=>vn(u))),g=l.expressPayLocalData?.vendorId,y=s.companyId??b.getSignedInUserTenant(p)?.companyId,[A,I]=m.useState(!1),[w,P]=m.useState(!1),[x,k]=m.useState(!1),v=Qe(o.state?.pathnameStackToGoBack),{poppedPathname:B}=v,j=B?.split("/"),E=j?.[j.length-1];m.useEffect((()=>{n===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[n]),m.useEffect((()=>{a===!0?P(!0):(P(!1),document.body.style.overflow="auto")}),[a]),m.useEffect((()=>{i===!0?k(!0):(k(!1),document.body.style.overflow="auto")}),[i]),m.useEffect((()=>{f==="Not-Started"&&r(jn(!0,!0))}),[f,r]);const T=ca(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(m.useEffect((()=>{T==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&S()}),[T,l.vendorViewDetails.bankAccountCreationState?.fetchState]),b.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const L=u=>{c(u)},S=()=>{I(!1),P(!1),t("../",{relative:"path"})};return e.jsxs(Ua,{children:[Oe(o)?e.jsx(pe,{isAppContentDrawerOpen:d,handleDrawerToggle:L}):null,A===!0?e.jsx(va,{vendorId:g,closeDrawerHandler:S,isDrawerOpen:A}):null,w===!0?e.jsx(La,{vendorId:g,closeDrawerHandler:S,isDrawerOpen:w}):null,x===!0?e.jsx(Ta,{closeDrawerHandler:S,isDrawerOpen:x}):null,e.jsx(Da,{vendorId:g,isExpressPayPage:!0}),e.jsx($a,{navigate:t,location:o,companyId:y,accountId:E,analytics:O,currentTenant:s,vendorId:g,roleMap:h?.loggedInUserRoleMap,isSettings:Oe(o),expressPayDetails:l,onClickMenuIcon:()=>{L(!0)}})]})}const Fa={overlayWidth:new Y(100,100,58)},_a=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:i,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const r=U(),d=V(),c=D((s=>_e(s))),p=D((s=>R(s)));if(b.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{o(!0)},f={depositAccount:t,onDismissClick:h,zeniAccountsConfigDetail:c,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:p};return e.jsx(X,{anchor:"right",open:i,PaperProps:{style:{width:Fa.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:e.jsx(za,{onClick:s=>s.stopPropagation(),children:e.jsx(da,{...f})})})},za=$(K)`
30
30
  display: flex;
31
31
  min-height: 100%;
32
32
  flex-direction: column;
33
- `,Ma={overlayWidth:new Y(100,100,58)},tn=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const i=$(),t=V(),o=z(),r=D((s=>R(s))),d=b.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 f=D((s=>zn(s))),h={analytics:O,checkDeposit:f,filesEndPoint:`${ke.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:s=>{o(Vn(s))},updateFilesEntity:s=>{o(Ge({files:s}))},onAnotherTransferClick:()=>{o(fe())},onDeleteFile:s=>{o(Ze(s))},onEditFileName:(s,l)=>{o(Ve(s,l.split(".")[0]))},onCheckDpositClick:()=>{o(Mn())},onDismissClick:()=>{a(!0),o(fe())}};return e.jsxs(e.Fragment,{children:[e.jsx(ue,{analytics:O,onLoad:s=>(l=>l.trackPageLoaded(we.Event.accountsDepositCheckFormViewed))(s)}),e.jsx(q,{anchor:"right",open:n,PaperProps:{style:{width:Ma.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(s,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(fe())),children:e.jsx(Va,{onClick:s=>s.stopPropagation(),children:e.jsx(ua,{...h})})})]})},Va=F(J)`
33
+ `,Ma={overlayWidth:new Y(100,100,58)},tn=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const i=U(),t=V(),o=z(),r=D((s=>R(s))),d=b.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 h=D((s=>zn(s))),f={analytics:O,checkDeposit:h,filesEndPoint:`${we.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:s=>{o(Vn(s))},updateFilesEntity:s=>{o(Ge({files:s}))},onAnotherTransferClick:()=>{o(he())},onDeleteFile:s=>{o(Ze(s))},onEditFileName:(s,l)=>{o(Ve(s,l.split(".")[0]))},onCheckDpositClick:()=>{o(Mn())},onDismissClick:()=>{a(!0),o(he())}};return e.jsxs(e.Fragment,{children:[e.jsx(ue,{analytics:O,onLoad:s=>(l=>l.trackPageLoaded(ke.Event.accountsDepositCheckFormViewed))(s)}),e.jsx(X,{anchor:"right",open:n,PaperProps:{style:{width:Ma.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(s,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(he())),children:e.jsx(Va,{onClick:s=>s.stopPropagation(),children:e.jsx(ua,{...f})})})]})},Va=$(K)`
34
34
  display: flex;
35
35
  min-height: 100%;
36
36
  flex-direction: column;
37
- `,Za={overlayWidth:new Y(100,100,58)},Ga=te((function(n,a){const i=a.currentTenant?.companyId;return{plaidConnectionDetails:Wn(n,i,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ue(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Yn()),clearReviewTransferDetail:()=>n(Nn()),onFetchLinkTokenClick:i=>{n(We("external_account",i))},onEstablishConnectionClick:i=>{n(He(i,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(pa),on=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:i,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const r=D((x=>Zn(x))),d=D((x=>R(x))),c=$(),p=V(),f=z(),{accountId:h}=N(),[s,l]=m.useState("achTransfer"),[g,y]=m.useState(!1);if(b.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:A}=Z(),{configValue:I}=A(H.zeniAccountsConfig),k=ye(I),P=()=>{t(!0),f(Ee())};return m.useEffect((()=>{r.reviewTransferDetail.fetchState==="Completed"&&y(!0)}),[y,r.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(ue,{analytics:O,onLoad:x=>(w=>w.trackPageLoaded(we.Event.zeniAccountsTransferFormViewed))(x)}),e.jsx(q,{onClose:()=>{(s==="achTransfer"&&g===!1||s==="achTransfer"&&g&&r.fetchState==="Completed")&&P()},anchor:"right",open:n,PaperProps:{style:{width:Za.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ha,{onClick:x=>x.stopPropagation(),children:e.jsx(Ga,{analytics:O,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:i,onTransferClick:()=>{O.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"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),f(Hn(h))},onDismissClick:P,onSaveChangesToLocalStore:x=>{f(Gn(x))},onAnotherTransferClick:()=>{y(!1),f(Ee())},currentTenant:d,zeniAccountsConfigDetail:o,currentDrawerContent:s,setCurrentDrawerContent:l,showReviewContent:g,setShowReviewContent:y,onBackClick:()=>{},maxInsuredAmount:k.maxInsuredAmount})})})]})},Ha=F(J)`
37
+ `,Za={overlayWidth:new Y(100,100,58)},Ga=te((function(n,a){const i=a.currentTenant?.companyId;return{plaidConnectionDetails:Nn(n,i,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Fe(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Yn()),clearReviewTransferDetail:()=>n(Wn()),onFetchLinkTokenClick:i=>{n(Ne("external_account",i))},onEstablishConnectionClick:i=>{n(He(i,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(pa),on=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:i,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const r=D((x=>Zn(x))),d=D((x=>R(x))),c=U(),p=V(),h=z(),{accountId:f}=W(),[s,l]=m.useState("achTransfer"),[g,y]=m.useState(!1);if(b.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:A}=Z(),{configValue:I}=A(H.zeniAccountsConfig),w=ye(I),P=()=>{t(!0),h(Ee())};return m.useEffect((()=>{r.reviewTransferDetail.fetchState==="Completed"&&y(!0)}),[y,r.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(ue,{analytics:O,onLoad:x=>(k=>k.trackPageLoaded(ke.Event.zeniAccountsTransferFormViewed))(x)}),e.jsx(X,{onClose:()=>{(s==="achTransfer"&&g===!1||s==="achTransfer"&&g&&r.fetchState==="Completed")&&P()},anchor:"right",open:n,PaperProps:{style:{width:Za.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ha,{onClick:x=>x.stopPropagation(),children:e.jsx(Ga,{analytics:O,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:i,onTransferClick:()=>{O.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"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(Hn(f))},onDismissClick:P,onSaveChangesToLocalStore:x=>{h(Gn(x))},onAnotherTransferClick:()=>{y(!1),h(Ee())},currentTenant:d,zeniAccountsConfigDetail:o,currentDrawerContent:s,setCurrentDrawerContent:l,showReviewContent:g,setShowReviewContent:y,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},Ha=$(K)`
38
38
  display: flex;
39
39
  min-height: 100%;
40
40
  flex-direction: column;
41
- `,Wa=F.div`
41
+ `,Na=$.div`
42
42
  display: flex;
43
43
  min-height: 100%;
44
44
  width: 100%;
@@ -46,7 +46,7 @@ import{j as e}from"./liveblocks-y3zMPGKB.js";import{u as z,h as ae,g as W,i as N
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${n=>n.theme.colors.grey4};
49
- `,Na=te((function(n,a){return{zeniAccountListView:Ne(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:i,currentTenant:t,location:o,companyId:r,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:f}=a,{tenantEmailDomain:h}=t;return{onZeniAccountClick:(s,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const g=Ya(h,s),y=ce(o.state?.pathnameStackToGoBack,o.pathname);i(g,{state:{pathnameStackToGoBack:y}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),i("setup")},onReloadTransactions:()=>{n(Ye(!1))},handleMoveMoneyOptionSelection:(s,l)=>{let g="page-not-found";s==="sendMoney"&&(g=ln(h)),s==="payBill"?g=sn(t,p,f):s==="transfer"?(g=rn(h),l!=null&&n(Je(l))):s==="checkDeposit"&&(g=cn(h));const y=ce(o.state?.pathnameStackToGoBack,o.pathname);i(g,{state:{pathnameStackToGoBack:y}})},unlinkPaymentAccount:(s,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),n(Kn(s))},onFetchLinkTokenClick:(s,l)=>{n(We("external_account",s,l))},onUpdatePaymentAccountStatus:(s,l,g)=>{n(Jn(s,l,"zeni_accounts","external_account",g))},onEstablishConnectionClick:s=>{n(He(s,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:s=>{n(qn(s))},onClickMenuIcon:()=>{d(!0)},onAutoTransferClick:s=>{const l="./auto-transfer";s?i(l,{state:{...o.state,scrollToAddRule:!0}}):i(l)}}}))(ga);function he({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const i=W(),t=ae(),o=z(),r=V(),{tenantEmailDomain:d}=N(),{useDynamicConfig:c,useFeatureGate:p}=Z(),f=$(),{configValue:h}=c(H.zeniAccountsConfig),{isFeatureEnabled:s}=p(_.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p(_.isAutoTransferRuleEnabled),{isFeatureEnabled:g}=p(_.isCheckingCommentingEnabled),y=ye(h),A=D((U=>R(U))),I=A.companyId??b.getSignedInUserTenant(d)?.companyId,{configValue:k}=c(H.expressPayConfig),P=k.is_enable_all_tenants===!0||k.tenant_ids!=null&&k.tenant_ids.includes(A.tenantId),[x,w]=m.useState(!1),[j,B]=m.useState(!1),[v,E]=m.useState(!1),[T,L]=m.useState(!1),S=D((U=>Ne(U))),u=S.fetchState,M=D((U=>Fe(U))),K=M?.fetchState??"Not-Started",me=!!A.companyZeniAccountInfo?.info?.isZeniAccountEnabled,se=oe(),G=!!A.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,X=ne(se?.loggedInUserRoleMap),dn=xe(se?.loggedInUserRoleMap),un=!!A.companyBillPayInfo?.info?.isBillPayEnabled,De=b.getSignedInUser(),pn={userId:De?.userId??"",sessionId:De?.zeniSessionId??"",tenantId:A.tenantId??""},mn=`${Ae}/account_details`,{areTenantIdsInSync:Ie}=ma();m.useEffect((()=>{!x&&Ie&&(w(!0),o(Ye(!1)))}),[x,o,u,Ie]),m.useEffect((()=>{!j&&K==="Not-Started"&&I&&(B(!0),o(ze(!0)))}),[j,K,I,o]),m.useEffect((()=>{n!=null&&n===!0?E(!0):(E(!1),document.body.style.overflow="auto")}),[n]),m.useEffect((()=>{L(a!=null&&a===!0)}),[a]);const Se=()=>{E(!1),t("..")},[gn,fn]=m.useState(!1),be=U=>{fn(U)},{isAiCfoAccessEnabled:hn,onAskAiCfoClick:yn}=an({mobileExploreReferrer:"Checking Accounts"});en({isDataReady:u==="Completed"});const xn=qe(A),Cn=Ce(s,A);return xn===!0&&Cn!==!0?e.jsx(nn,{}):me?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&v===!1&&T===!1?e.jsx(ue,{analytics:O,onLoad:U=>(An=>{An.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Be(S.summary?.totalBalance.available.amount??0),Be(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield)})(U)}):null,v===!0?e.jsx(on,{closeDrawerHandler:Se,isTransferDrawerOpen:v,zeniAccountsConfig:S.zeniAccountsConfig,authParams:pn,downloadAccountDetailEndPoint:mn}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Se,isCheckDepositDrawerOpen:T}):null,e.jsxs(Wa,{windowSize:r,children:[e.jsx(pe,{isAppContentDrawerOpen:gn,handleDrawerToggle:be}),e.jsx(Na,{zeniBankListView:S,navigate:t,currentTenant:A,location:i,companyId:I,analytics:O,maxInsuredAmount:y.maxInsuredAmount,isExpressPayEnabled:P,isBillPayEnabled:un,isCheckingCommentingEnabled:g,isDebitCardFeatureEnabled:s,isAutoTransferRuleEnabled:l,handleDrawerToggle:be,isAiCfoAccessEnabled:hn,onAskAiCfoClick:yn})]})]}):G&&X?e.jsx(ee,{to:"../setup"}):A.companyZeniAccountInfo?.info&&!G&&dn?e.jsx(ee,{to:"../promo",state:i.state}):e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const sn=(n,a,i)=>{const t=Ce(i,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},Ya=(n,a)=>`/${n}/checking/${a}`,rn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,cn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,ln=n=>`/${n}/checking/express-pay`,qa=F.div`
49
+ `,Wa=te((function(n,a){return{zeniAccountListView:We(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:i,currentTenant:t,location:o,companyId:r,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=a,{tenantEmailDomain:f}=t;return{onZeniAccountClick:(s,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const g=Ya(f,s),y=ce(o.state?.pathnameStackToGoBack,o.pathname);i(g,{state:{pathnameStackToGoBack:y}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),i("setup")},onReloadTransactions:()=>{n(Ye(!1))},handleMoveMoneyOptionSelection:(s,l)=>{let g="page-not-found";s==="sendMoney"&&(g=ln(f)),s==="payBill"?g=sn(t,p,h):s==="transfer"?(g=rn(f),l!=null&&n(Ke(l))):s==="checkDeposit"&&(g=cn(f));const y=ce(o.state?.pathnameStackToGoBack,o.pathname);i(g,{state:{pathnameStackToGoBack:y}})},unlinkPaymentAccount:(s,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),n(qn(s))},onFetchLinkTokenClick:(s,l)=>{n(Ne("external_account",s,l))},onUpdatePaymentAccountStatus:(s,l,g)=>{n(Kn(s,l,"zeni_accounts","external_account",g))},onEstablishConnectionClick:s=>{n(He(s,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:s=>{n(Xn(s))},onClickMenuIcon:()=>{d(!0)},onAutoTransferClick:s=>{const l="./auto-transfer";s?i(l,{state:{...o.state,scrollToAddRule:!0}}):i(l)}}}))(ga);function fe({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const i=N(),t=ae(),o=z(),r=V(),{tenantEmailDomain:d}=W(),{useDynamicConfig:c,useFeatureGate:p}=Z(),h=U(),{configValue:f}=c(H.zeniAccountsConfig),{isFeatureEnabled:s}=p(_.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p(_.isAutoTransferRuleEnabled),{isFeatureEnabled:g}=p(_.isCheckingCommentingEnabled),y=ye(f),A=D((F=>R(F))),I=A.companyId??b.getSignedInUserTenant(d)?.companyId,{configValue:w}=c(H.expressPayConfig),P=w.is_enable_all_tenants===!0||w.tenant_ids!=null&&w.tenant_ids.includes(A.tenantId),[x,k]=m.useState(!1),[v,B]=m.useState(!1),[j,E]=m.useState(!1),[T,L]=m.useState(!1),S=D((F=>We(F))),u=S.fetchState,M=D((F=>$e(F))),q=M?.fetchState??"Not-Started",me=!!A.companyZeniAccountInfo?.info?.isZeniAccountEnabled,se=oe(),G=!!A.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,J=ne(se?.loggedInUserRoleMap),dn=xe(se?.loggedInUserRoleMap),un=!!A.companyBillPayInfo?.info?.isBillPayEnabled,De=b.getSignedInUser(),pn={userId:De?.userId??"",sessionId:De?.zeniSessionId??"",tenantId:A.tenantId??""},mn=`${Ae}/account_details`,{areTenantIdsInSync:Ie}=ma();m.useEffect((()=>{!x&&Ie&&(k(!0),o(Ye(!1)))}),[x,o,u,Ie]),m.useEffect((()=>{!v&&q==="Not-Started"&&I&&(B(!0),o(ze(!0)))}),[v,q,I,o]),m.useEffect((()=>{n!=null&&n===!0?E(!0):(E(!1),document.body.style.overflow="auto")}),[n]),m.useEffect((()=>{L(a!=null&&a===!0)}),[a]);const Se=()=>{E(!1),t("..")},[gn,hn]=m.useState(!1),be=F=>{hn(F)},{isAiCfoAccessEnabled:fn,onAskAiCfoClick:yn}=an({mobileExploreReferrer:"Checking Accounts"});en({isDataReady:u==="Completed"});const xn=Xe(A),Cn=Ce(s,A);return xn===!0&&Cn!==!0?e.jsx(nn,{}):me?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&j===!1&&T===!1?e.jsx(ue,{analytics:O,onLoad:F=>(An=>{An.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Be(S.summary?.totalBalance.available.amount??0),Be(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield)})(F)}):null,j===!0?e.jsx(on,{closeDrawerHandler:Se,isTransferDrawerOpen:j,zeniAccountsConfig:S.zeniAccountsConfig,authParams:pn,downloadAccountDetailEndPoint:mn}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Se,isCheckDepositDrawerOpen:T}):null,e.jsxs(Na,{windowSize:r,children:[e.jsx(pe,{isAppContentDrawerOpen:gn,handleDrawerToggle:be}),e.jsx(Wa,{zeniBankListView:S,navigate:t,currentTenant:A,location:i,companyId:I,analytics:O,maxInsuredAmount:y.maxInsuredAmount,isExpressPayEnabled:P,isBillPayEnabled:un,isCheckingCommentingEnabled:g,isDebitCardFeatureEnabled:s,isAutoTransferRuleEnabled:l,handleDrawerToggle:be,isAiCfoAccessEnabled:fn,onAskAiCfoClick:yn})]})]}):G&&J?e.jsx(ee,{to:"../setup"}):A.companyZeniAccountInfo?.info&&!G&&dn?e.jsx(ee,{to:"../promo",state:i.state}):e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const sn=(n,a,i)=>{const t=Ce(i,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},Ya=(n,a)=>`/${n}/checking/${a}`,rn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,cn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,ln=n=>`/${n}/checking/express-pay`,Xa=$.div`
50
50
  display: flex;
51
51
  width: 100%;
52
52
  flex: 1 1 auto;
@@ -54,4 +54,4 @@ import{j as e}from"./liveblocks-y3zMPGKB.js";import{u as z,h as ae,g as W,i as N
54
54
  align-items: center;
55
55
  min-height: 100vh;
56
56
  background-color: ${n=>n.theme.colors.grey4};
57
- `,Ja=te((function(n,a){const{currentTenant:i}=a,t=Ke(n,a.accountId),o=b.getSignedInUser(),r=n.tenantState.currentTenantId,d={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:r??""},c=t.accountDetail?.id??"";return{currentTenantCompanyName:i.companyName??"",authParams:d,downloadEndPoint:`${ke.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:i,currentTenant:t,location:o,accountId:r}=a,{tenantEmailDomain:d}=t;return{handleMoveMoneyOptionSelection:(c,p)=>{let f="page-not-found";c==="sendMoney"?f=ln(d):c==="payBill"?f=sn(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):c==="transfer"?(f=rn(d,r),p!=null&&n(Je(p))):c==="checkDeposit"?(f=cn(d,r),p!=null&&n(Xn(p))):c==="accountStatement"&&(f=Xa(d,r));const h=ce(o.state?.pathnameStackToGoBack,o.pathname);i(f,{state:{pathnameStackToGoBack:h}})},onAccountDetailClick:()=>{const c=Ka(d,r),p=ce(o.state?.pathnameStackToGoBack,o.pathname);i(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{n(Te(r,"editName",c))},onReloadZeniAccountDetailPage:()=>{n(Xe(r,!1))},onCloseAccountClick:()=>{n(Te(r,"closeAccount",""))},onBackClick:()=>{i("../",{relative:"path"})}}}))(fa);function re({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:i}){const t=W(),o=ae(),r=z(),d=V(),{tenantEmailDomain:c,accountId:p}=N(),{useDynamicConfig:f}=Z(),{useFeatureGate:h}=Z(),{isFeatureEnabled:s}=h(_.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=h(_.isCheckingCommentingEnabled),g=D((X=>R(X))),{configValue:y}=f(H.expressPayConfig),A=y.is_enable_all_tenants===!0||y.tenant_ids!=null&&y.tenant_ids.includes(g.tenantId),I=!!g.companyBillPayInfo?.info?.isBillPayEnabled,k=b.getSignedInUser(),P=g.companyId??b.getSignedInUserTenant(c)?.companyId,x={userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:g.tenantId??""},w=`${Ae}/account_details`,[j,B]=m.useState(!1),[v,E]=m.useState(!1),[T,L]=m.useState(!1),[S,u]=m.useState(!1),M=D((X=>Ke(X,p??""))),K=M.fetchState,{isAiCfoAccessEnabled:me,onAskAiCfoClick:se}=an({mobileExploreReferrer:"Checking Account Detail"});en({isDataReady:K==="Completed"}),m.useEffect((()=>{j||(r(Xe(p??"",!1)),B(!0))}),[j,r,K]),m.useEffect((()=>{u(i!=null&&i===!0)}),[i]),m.useEffect((()=>{n!=null&&n===!0?E(!0):(E(!1),document.body.style.overflow="auto")}),[n]),m.useEffect((()=>{L(a!=null&&a===!0)}),[a]);const G=()=>{u(!1),o("..")};return e.jsxs(e.Fragment,{children:[S===!0&&M.accountDetail!=null?e.jsx(_a,{authParams:x,downloadAccountDetailEndPoint:w,closeDrawerHandler:G,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:M.accountDetail}):null,v===!0?e.jsx(on,{closeDrawerHandler:G,isTransferDrawerOpen:v,zeniAccountsConfig:M.zeniAccountsConfig,authParams:x,downloadAccountDetailEndPoint:w}):null,T===!0?e.jsx(tn,{closeDrawerHandler:G,isCheckDepositDrawerOpen:T}):null,e.jsx(qa,{windowSize:d,children:e.jsx(Ja,{navigate:o,currentTenant:g,location:t,companyId:P,isDebitCardFeatureEnabled:s,accountId:p??"",isBillPayEnabled:I,isCheckingCommentingEnabled:l,isExpressPayEnabled:A,isAiCfoAccessEnabled:me,onAskAiCfoClick:se})})]})}const Ka=(n,a)=>`/${n}/checking/${a}/account-info`,Xa=(n,a)=>`/${n}/checking/${a}/statements`,Qa=te((function(n,a){const{companyId:i}=a;return{zeniAccountSetupView:Qn(n,i)}}),(function(n,a){const{navigate:i,companyId:t}=a;return{onSetupButtonClick:()=>{O.trackAccountsPromoPageClicked("Setup Accounts"),n(ea(t))},onBackClick:()=>{i("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{i("../setup",{relative:"path"})}}}))(xa),et=()=>{const n=ae(),a=W(),{tenantEmailDomain:i}=N(),{useDynamicConfig:t}=Z(),o=ha(),r=$(),[d,c]=m.useState(!1),[p,f]=m.useState(!1),h=D((w=>R(w))),{configValue:s}=t(H.zeniAccountsConfig),l=ye(s);m.useEffect((()=>{p===!1&&a.state?.message==="activation"&&f(!0)}),[a.state]);const g=b.getSignedInUserTenant(i)?.companyId??h.companyId,y=b.getSignedInUser(),A=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,I=w=>{c(w)};if(y==null)throw Error("Can't access Zeni account promo page without signing in...");const k=oe(),P=ne(k?.loggedInUserRoleMap),x=xe(k?.loggedInUserRoleMap);if(A&&P)return e.jsx(ee,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!A&&P||x)){if(a.state?.message==="activation"){const w=Qe(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:w.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(ya,{showConfetti:p}),e.jsx(ue,{analytics:O,onLoad:w=>(j=>j.trackPageLoaded(we.Event.accountsPromoPageViewed))(w)}),e.jsx(pe,{isAppContentDrawerOpen:d,handleDrawerToggle:I}),e.jsx(Qa,{analytics:O,navigate:n,companyId:g,meetingUrl:o("zeni_accounts_promo"),onClickMenuIcon:()=>{I(!0)},maxAnnualPercentageYield:l.maxAnnualPercentageYield,maxInsuredAmount:l.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Et(){const n=W(),a=D((L=>R(L))),i=$(),{useFeatureGate:t,useDynamicConfig:o}=Z(),r=oe(),d=ne(r?.loggedInUserRoleMap),c=xe(r?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,f=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:h}=t(_.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t(_.isDebitCardFeatureEnabled),l=qe(a),g=Ce(s,a),y=a?.userRole!=null&&na(a?.userRole),A=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!y)&&aa(r?.loggedInUserRoleMap),I=ta(r?.loggedInUserRoleMap),k=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!y)&&oa(r?.loggedInUserRoleMap),P=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!y,{configValue:x}=o(H.expressPayConfig),w=x.is_enable_all_tenants===!0||x.tenant_ids!=null&&x.tenant_ids.includes(a.tenantId),{isFeatureEnabled:j}=t(_.isAutoTransferRuleEnabled),B=Ca(a,h,s)&&!y&&sa(r?.loggedInUserRoleMap),v=ia(r?.loggedInUserRoleMap),E=P&&ne(r?.loggedInUserRoleMap),T=E||Me(r?.loggedInUserRoleMap);return e.jsxs($e,{children:[e.jsx(C,{path:"setup",element:e.jsx(Le,{isBillPayAdminLevelAccess:A,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),e.jsx(C,{path:"verification",element:e.jsx(Le,{isBillPayAdminLevelAccess:A,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),j?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"auto-transfer",element:e.jsx(Re,{})}),T?e.jsx(C,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Re,{isEditDrawerOpen:!0})}):null]}):e.jsx(C,{path:"auto-transfer",element:e.jsx(Q,{})}),w&&d?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"express-pay",element:e.jsx(ie,{})}),e.jsx(C,{path:"express-pay/add-ach",element:e.jsx(ie,{isAddACHDrawerOpen:!0})}),e.jsx(C,{path:"express-pay/add-wire/add-address",element:e.jsx(ie,{isAddAddressDrawerOpen:!0})}),e.jsx(C,{path:"express-pay/add-wire",element:e.jsx(ie,{isAddWireDrawerOpen:!0})})]}):e.jsx(C,{path:"express-pay",element:e.jsx(Q,{})}),e.jsx(C,{path:"promo",element:e.jsx(et,{})}),l&&!g?e.jsx(C,{path:"/*",element:e.jsx(nn,{})}):p?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"/",element:e.jsx(he,{})}),e.jsx(C,{path:"transfer",element:e.jsx(he,{isTransferDrawerOpen:!0})}),e.jsx(C,{path:"check-deposit",element:e.jsx(he,{isCheckDepositDrawerOpen:!0})}),e.jsx(C,{path:"cash_management/*",element:e.jsx(Q,{})}),e.jsx(C,{path:":accountId/*",element:e.jsx(nt,{})}),e.jsx(C,{path:"*",element:e.jsx(Q,{})})]}):f&&d?e.jsx(C,{path:"*",element:e.jsx(ee,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&c?e.jsx(C,{path:"*",element:e.jsx(ee,{to:"../promo",state:n.state})}):e.jsx(C,{path:"*",element:e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5,boxShadow:`0px 2px ${Aa.sp1} ${i.colors.dropShadowNormal}`}})})]})}function nt(){return e.jsxs($e,{children:[e.jsx(C,{path:"/",element:e.jsx(re,{})}),e.jsx(C,{path:"account-info",element:e.jsx(re,{isAccountInfoDrawerOpen:!0})}),e.jsx(C,{path:"transfer",element:e.jsx(re,{isTransferDrawerOpen:!0})}),e.jsx(C,{path:"check-deposit",element:e.jsx(re,{isCheckDepositDrawerOpen:!0})}),e.jsx(C,{path:"statements",element:e.jsx(Sa,{})}),e.jsx(C,{path:"*",element:e.jsx(Q,{})})]})}export{Et as default};
57
+ `,Ka=te((function(n,a){const{currentTenant:i}=a,t=qe(n,a.accountId),o=b.getSignedInUser(),r=n.tenantState.currentTenantId,d={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:r??""},c=t.accountDetail?.id??"";return{currentTenantCompanyName:i.companyName??"",authParams:d,downloadEndPoint:`${we.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:i,currentTenant:t,location:o,accountId:r}=a,{tenantEmailDomain:d}=t;return{handleMoveMoneyOptionSelection:(c,p)=>{let h="page-not-found";c==="sendMoney"?h=ln(d):c==="payBill"?h=sn(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):c==="transfer"?(h=rn(d,r),p!=null&&n(Ke(p))):c==="checkDeposit"?(h=cn(d,r),p!=null&&n(Jn(p))):c==="accountStatement"&&(h=Ja(d,r));const f=ce(o.state?.pathnameStackToGoBack,o.pathname);i(h,{state:{pathnameStackToGoBack:f}})},onAccountDetailClick:()=>{const c=qa(d,r),p=ce(o.state?.pathnameStackToGoBack,o.pathname);i(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{n(Te(r,"editName",c))},onReloadZeniAccountDetailPage:()=>{n(Je(r,!1))},onCloseAccountClick:()=>{n(Te(r,"closeAccount",""))},onBackClick:()=>{i("../",{relative:"path"})}}}))(ha);function re({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:i}){const t=N(),o=ae(),r=z(),d=V(),{tenantEmailDomain:c,accountId:p}=W(),{useDynamicConfig:h}=Z(),{useFeatureGate:f}=Z(),{isFeatureEnabled:s}=f(_.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=f(_.isCheckingCommentingEnabled),g=D((J=>R(J))),{configValue:y}=h(H.expressPayConfig),A=y.is_enable_all_tenants===!0||y.tenant_ids!=null&&y.tenant_ids.includes(g.tenantId),I=!!g.companyBillPayInfo?.info?.isBillPayEnabled,w=b.getSignedInUser(),P=g.companyId??b.getSignedInUserTenant(c)?.companyId,x={userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:g.tenantId??""},k=`${Ae}/account_details`,[v,B]=m.useState(!1),[j,E]=m.useState(!1),[T,L]=m.useState(!1),[S,u]=m.useState(!1),M=D((J=>qe(J,p??""))),q=M.fetchState,{isAiCfoAccessEnabled:me,onAskAiCfoClick:se}=an({mobileExploreReferrer:"Checking Account Detail"});en({isDataReady:q==="Completed"}),m.useEffect((()=>{v||(r(Je(p??"",!1)),B(!0))}),[v,r,q]),m.useEffect((()=>{u(i!=null&&i===!0)}),[i]),m.useEffect((()=>{n!=null&&n===!0?E(!0):(E(!1),document.body.style.overflow="auto")}),[n]),m.useEffect((()=>{L(a!=null&&a===!0)}),[a]);const G=()=>{u(!1),o("..")};return e.jsxs(e.Fragment,{children:[S===!0&&M.accountDetail!=null?e.jsx(_a,{authParams:x,downloadAccountDetailEndPoint:k,closeDrawerHandler:G,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:M.accountDetail}):null,j===!0?e.jsx(on,{closeDrawerHandler:G,isTransferDrawerOpen:j,zeniAccountsConfig:M.zeniAccountsConfig,authParams:x,downloadAccountDetailEndPoint:k}):null,T===!0?e.jsx(tn,{closeDrawerHandler:G,isCheckDepositDrawerOpen:T}):null,e.jsx(Xa,{windowSize:d,children:e.jsx(Ka,{navigate:o,currentTenant:g,location:t,companyId:P,isDebitCardFeatureEnabled:s,accountId:p??"",isBillPayEnabled:I,isCheckingCommentingEnabled:l,isExpressPayEnabled:A,isAiCfoAccessEnabled:me,onAskAiCfoClick:se})})]})}const qa=(n,a)=>`/${n}/checking/${a}/account-info`,Ja=(n,a)=>`/${n}/checking/${a}/statements`,Qa=te((function(n,a){const{companyId:i}=a;return{zeniAccountSetupView:Qn(n,i)}}),(function(n,a){const{navigate:i,companyId:t}=a;return{onSetupButtonClick:()=>{O.trackAccountsPromoPageClicked("Setup Accounts"),n(ea(t))},onBackClick:()=>{i("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{i("../setup",{relative:"path"})}}}))(xa),et=()=>{const n=ae(),a=N(),{tenantEmailDomain:i}=W(),{useDynamicConfig:t}=Z(),o=fa(),r=U(),[d,c]=m.useState(!1),[p,h]=m.useState(!1),f=D((k=>R(k))),{configValue:s}=t(H.zeniAccountsConfig),l=ye(s);m.useEffect((()=>{p===!1&&a.state?.message==="activation"&&h(!0)}),[a.state]);const g=b.getSignedInUserTenant(i)?.companyId??f.companyId,y=b.getSignedInUser(),A=!!f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,I=k=>{c(k)};if(y==null)throw Error("Can't access Zeni account promo page without signing in...");const w=oe(),P=ne(w?.loggedInUserRoleMap),x=xe(w?.loggedInUserRoleMap);if(A&&P)return e.jsx(ee,{to:"../../checking/setup"});if(f.company?.companyZeniAccountInfo&&(!A&&P||x)){if(a.state?.message==="activation"){const k=Qe(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:k.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(ya,{showConfetti:p}),e.jsx(ue,{analytics:O,onLoad:k=>(v=>v.trackPageLoaded(ke.Event.accountsPromoPageViewed))(k)}),e.jsx(pe,{isAppContentDrawerOpen:d,handleDrawerToggle:I}),e.jsx(Qa,{analytics:O,navigate:n,companyId:g,meetingUrl:o("zeni_accounts_promo"),onClickMenuIcon:()=>{I(!0)},maxAnnualPercentageYield:l.maxAnnualPercentageYield,maxInsuredAmount:l.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Et(){const n=N(),a=D((L=>R(L))),i=U(),{useFeatureGate:t,useDynamicConfig:o}=Z(),r=oe(),d=ne(r?.loggedInUserRoleMap),c=xe(r?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:f}=t(_.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t(_.isDebitCardFeatureEnabled),l=Xe(a),g=Ce(s,a),y=a?.userRole!=null&&na(a?.userRole),A=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!y)&&aa(r?.loggedInUserRoleMap),I=ta(r?.loggedInUserRoleMap),w=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!y)&&oa(r?.loggedInUserRoleMap),P=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!y,{configValue:x}=o(H.expressPayConfig),k=x.is_enable_all_tenants===!0||x.tenant_ids!=null&&x.tenant_ids.includes(a.tenantId),{isFeatureEnabled:v}=t(_.isAutoTransferRuleEnabled),B=Ca(a,f,s)&&!y&&sa(r?.loggedInUserRoleMap),j=ia(r?.loggedInUserRoleMap),E=P&&ne(r?.loggedInUserRoleMap),T=E||Me(r?.loggedInUserRoleMap);return e.jsxs(Ue,{children:[e.jsx(C,{path:"setup",element:e.jsx(Le,{isBillPayAdminLevelAccess:A,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"setup"})}),e.jsx(C,{path:"verification",element:e.jsx(Le,{isBillPayAdminLevelAccess:A,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"verification"})}),v?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"auto-transfer",element:e.jsx(Re,{})}),T?e.jsx(C,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Re,{isEditDrawerOpen:!0})}):null]}):e.jsx(C,{path:"auto-transfer",element:e.jsx(Q,{})}),k&&d?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"express-pay",element:e.jsx(ie,{})}),e.jsx(C,{path:"express-pay/add-ach",element:e.jsx(ie,{isAddACHDrawerOpen:!0})}),e.jsx(C,{path:"express-pay/add-wire/add-address",element:e.jsx(ie,{isAddAddressDrawerOpen:!0})}),e.jsx(C,{path:"express-pay/add-wire",element:e.jsx(ie,{isAddWireDrawerOpen:!0})})]}):e.jsx(C,{path:"express-pay",element:e.jsx(Q,{})}),e.jsx(C,{path:"promo",element:e.jsx(et,{})}),l&&!g?e.jsx(C,{path:"/*",element:e.jsx(nn,{})}):p?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"/",element:e.jsx(fe,{})}),e.jsx(C,{path:"transfer",element:e.jsx(fe,{isTransferDrawerOpen:!0})}),e.jsx(C,{path:"check-deposit",element:e.jsx(fe,{isCheckDepositDrawerOpen:!0})}),e.jsx(C,{path:"cash_management/*",element:e.jsx(Q,{})}),e.jsx(C,{path:":accountId/*",element:e.jsx(nt,{})}),e.jsx(C,{path:"*",element:e.jsx(Q,{})})]}):h&&d?e.jsx(C,{path:"*",element:e.jsx(ee,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&c?e.jsx(C,{path:"*",element:e.jsx(ee,{to:"../promo",state:n.state})}):e.jsx(C,{path:"*",element:e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5,boxShadow:`0px 2px ${Aa.sp1} ${i.colors.dropShadowNormal}`}})})]})}function nt(){return e.jsxs(Ue,{children:[e.jsx(C,{path:"/",element:e.jsx(re,{})}),e.jsx(C,{path:"account-info",element:e.jsx(re,{isAccountInfoDrawerOpen:!0})}),e.jsx(C,{path:"transfer",element:e.jsx(re,{isTransferDrawerOpen:!0})}),e.jsx(C,{path:"check-deposit",element:e.jsx(re,{isCheckDepositDrawerOpen:!0})}),e.jsx(C,{path:"statements",element:e.jsx(Sa,{})}),e.jsx(C,{path:"*",element:e.jsx(Q,{})})]})}export{Et as default};
@@ -0,0 +1,9 @@
1
+ import{j as i}from"./liveblocks-BXyXenK7.js";import{a as u}from"./sentry-D4svnzxK.js";import{h as $,u as x,g as T,i as j,j as p}from"./core-Bl4MLhFi.js";import{T3 as s,T2 as v,$q as B,fE as C,$r as E}from"./zeni-epic-state-UM7IPCLf.js";import{a1 as z,ae as g,c as D,z as L,a7 as P,d6 as N,a4 as U}from"./index-DdFMa5Bp.js";import{n as _}from"./mui-CyP-P4av.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="ea4be3a6-8615-4f2d-a30a-8fa3aa2ec5d2",a._sentryDebugIdIdentifier="sentry-dbid-ea4be3a6-8615-4f2d-a30a-8fa3aa2ec5d2")}catch{}})();const G=_.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${a=>a.theme.colors.grey4};
9
+ `;function H(){const a=$(),n=x(),d=z(),l=T();let{accountId:e}=j(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${e}`;e==null&&l.pathname.includes(`${s}/statements`)&&(e=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,h]=u.useState(!1),y=D();u.useEffect((()=>{m||(h(!0),n(v(e??"",!1)))}),[m,n]);const o=p((t=>B(t,e??""))),I=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";a(S,{state:{pathnameStackToGoBack:t.newStack}})},r=L.getSignedInUser(),c=p((t=>C(t))),b={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=E(e??"")===!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:y.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:f})})}export{H as Z};
@@ -1 +1 @@
1
- import"./sentry-Jm7O5sR0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};
1
+ import"./sentry-D4svnzxK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};