@zeniai/web-app-ui 5.0.28-dev → 5.0.29-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 (115) hide show
  1. package/dist/assets/AddressRoutes--6bpVyKF.js +1 -0
  2. package/dist/assets/AddressScreen-D33d6mlP.js +9 -0
  3. package/dist/assets/{AiCfoScreen-CNOP96Bi.js → AiCfoScreen-CjabDfue.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-DgFkK4Xc.js → BillPayApprovalRoutes-CaH89ImE.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-D-pYWAbF.js → BillPayRoutes-BQvAzZoU.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-DKrw7o8b.js → BusinessVerificationPageScreen-BUfK35_-.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-B36bJfrv.js → ChargeCardRoutes-tobNieB2.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-DHSm2BvM.js → CompanyPassportScreen-DOSfUuo8.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-B4_xqVLG.js → ConnectionAuthScreen-DXET9ibH.js} +1 -1
  10. package/dist/assets/CustomerOnboardingAuthScreen-QqJ1I7t0.js +1 -0
  11. package/dist/assets/CustomerOnboardingRoutes-BgeRv9b-.js +23 -0
  12. package/dist/assets/{DashboardRoutes-CU64wyl_.js → DashboardRoutes-BnT9clwd.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-DEjNA-Qp.js → DefaultTenantHome-BuuAm5tA.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-DtMAxBfb.js → DomesticWireDetailScreen-D7x8itbF.js} +3 -3
  15. package/dist/assets/DrawerScreen-BOmDNrND.js +1 -0
  16. package/dist/assets/{EntityDetailRoutes-Dwaf84tO.js → EntityDetailRoutes-DlGKn1gp.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-guse6js1.js → ExpenseAutomationRoutes-DBwfdeKL.js} +4 -4
  18. package/dist/assets/FeaturePreviewScreen-D1hHI8kK.js +1 -0
  19. package/dist/assets/{MagicLinkRoutes-lwVnqQEI.js → MagicLinkRoutes-DXR_BLhc.js} +18 -18
  20. package/dist/assets/MagicLinkSignInScreen-CVw2eCRn.js +12 -0
  21. package/dist/assets/{MobileAppDrawer-DI2qJWFS.js → MobileAppDrawer-51OTOFDc.js} +1 -1
  22. package/dist/assets/NotFoundScreen-DHf1NG7A.js +1 -0
  23. package/dist/assets/{NotificationRoutes-93QACq1j.js → NotificationRoutes-Hps1Ro2y.js} +1 -1
  24. package/dist/assets/{PandLWithForecastRoutes-B5iskeF2.js → PandLWithForecastRoutes-DAxBBMAA.js} +1 -1
  25. package/dist/assets/PeopleRoutes-CVmaMbUi.js +22 -0
  26. package/dist/assets/PerformanceRoutes-DZYFpQVC.js +1 -0
  27. package/dist/assets/{Preview-CcipHtv0.js → Preview-OrpXGnIM.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-mZ7XNaEF.js → QBOConnectionScreen-BpTCjjFU.js} +1 -1
  29. package/dist/assets/ReferralListScreen-BrObOx9x.js +5 -0
  30. package/dist/assets/{ReimbursementApprovalRoutes-RXgckBKl.js → ReimbursementApprovalRoutes-CjexdFZq.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DosxwBI7.js → ReimbursementApprovalRuleDetailScreen-CK4bnMd5.js} +1 -1
  32. package/dist/assets/{ReimbursementRoutes-dm5AJ_FK.js → ReimbursementRoutes-ClGFpgQk.js} +1 -1
  33. package/dist/assets/{ReportsRoutes-B3K6Cpse.js → ReportsRoutes-DuyyKCOa.js} +1 -1
  34. package/dist/assets/{RewardsRoutes-DOVZDpGF.js → RewardsRoutes-dFjX_sQy.js} +1 -1
  35. package/dist/assets/{ScreenRoutes-BHXVHS5K.js → ScreenRoutes-U6YUeNK1.js} +2 -2
  36. package/dist/assets/{SettingsRoutes-m3_cAh3n.js → SettingsRoutes-CBH4oKav.js} +1 -1
  37. package/dist/assets/{SetupPagesScreen-BYZmB6RQ.js → SetupPagesScreen-BRWFzqZr.js} +1 -1
  38. package/dist/assets/{SignInScreen-CV3JTfRt.js → SignInScreen-CO9jf9kh.js} +1 -1
  39. package/dist/assets/SignOutScreen-CWn1VOUC.js +9 -0
  40. package/dist/assets/TaskListScreen-B6lyBlHq.js +9 -0
  41. package/dist/assets/{TaskRoutes-D75AB3w_.js → TaskRoutes-DWsx4_vP.js} +1 -1
  42. package/dist/assets/TransactionDetailRoutes-B2uHT4g3.js +1 -0
  43. package/dist/assets/{TransactionDetailScreen-C43lmhQC.js → TransactionDetailScreen-i-Dd7tmX.js} +2 -2
  44. package/dist/assets/{TransactionListRoutes-De-RO3Gi.js → TransactionListRoutes-BRuytvqB.js} +1 -1
  45. package/dist/assets/{TreasuryRoutes-W6_vnWoF.js → TreasuryRoutes-Ck_TGGbk.js} +6 -6
  46. package/dist/assets/{VendorsRoutes-Tvmoq5A8.js → VendorsRoutes-DQvI0THt.js} +1 -1
  47. package/dist/assets/WiseConfirmationScreen-6mTLlRnZ.js +12 -0
  48. package/dist/assets/{ZeniAccountRoutes-D3OBE_Ss.js → ZeniAccountRoutes-Bcuic0wu.js} +8 -8
  49. package/dist/assets/ZeniAccountStatementScreen-BQfXeeVB.js +9 -0
  50. package/dist/assets/{accountMappingHelper-CZh04DwI.js → accountMappingHelper-I87iZbOB.js} +1 -1
  51. package/dist/assets/{analytics-B5o5sheK.js → analytics-DYCAui-I.js} +1 -1
  52. package/dist/assets/{analyticsHelper-u-FHaHNW.js → analyticsHelper-CoCsLWxV.js} +1 -1
  53. package/dist/assets/{core-kXknxXmM.js → core-CrySabaB.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-wIBJn5gs.js → decodeURIComponentSafe-C37138jw.js} +1 -1
  55. package/dist/assets/{dnd-D8v1Hu0d.js → dnd-CV1KjQXU.js} +1 -1
  56. package/dist/assets/{empty-oIOcDVkl.js → empty-Dqx24XYn.js} +1 -1
  57. package/dist/assets/{empty-wWqNmdcy.js → empty-DtTDHfO2.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-C7vitkya.js → emptyVideoElement-BdOiM2Cn.js} +1 -1
  59. package/dist/assets/{epic-Lmu1wsdA.js → epic-CZ6kB5GC.js} +1 -1
  60. package/dist/assets/getLocaleForTenant-VbDnYcxE.js +1 -0
  61. package/dist/assets/{index-iJlw9gxM.js → index-0XIgKFWx.js} +1 -1
  62. package/dist/assets/{index-CCGSsCQb.js → index-1DdC8Xj_.js} +2 -2
  63. package/dist/assets/{index-sfVh4bD9.js → index-6m3SwClh.js} +1 -1
  64. package/dist/assets/{index-CcfqP51k.js → index-BIUM19kB.js} +1 -1
  65. package/dist/assets/{index-qCVVoBzB.js → index-CPrzoRQS.js} +1 -1
  66. package/dist/assets/{index-r7RBj2Zs.js → index-CcFsRa7B.js} +7165 -7149
  67. package/dist/assets/{index-B9VXLjDS.js → index-CyyHtw-M.js} +1 -1
  68. package/dist/assets/{lexical-DTfvcVgU.js → lexical-Be88TDK-.js} +1 -1
  69. package/dist/assets/{liveblocks-Bl3A2p2B.js → liveblocks-DZsElvdD.js} +1 -1
  70. package/dist/assets/{lottie-B-MkWC6q.js → lottie-_mjnLDz5.js} +1 -1
  71. package/dist/assets/{mui-axh11eoI.js → mui-CZEnMS79.js} +1 -1
  72. package/dist/assets/{pathToGoBack-DfPLhZwj.js → pathToGoBack-R9qGiBS5.js} +1 -1
  73. package/dist/assets/{pdf-VFwJrwPY.js → pdf-EBByNZKe.js} +3 -3
  74. package/dist/assets/{pdf-lib-B51MNmfW.js → pdf-lib-BEOiPBal.js} +1 -1
  75. package/dist/assets/{plaid-BUPrZO5b.js → plaid-B6RZTGXN.js} +1 -1
  76. package/dist/assets/{pusher-CAQ8WE0X.js → pusher-ByEWV5_I.js} +1 -1
  77. package/dist/assets/{react-DEAMftpa.js → react-C-ASAIjO.js} +1 -1
  78. package/dist/assets/{react-CVjxRdIQ.js → react-DSf2hcsZ.js} +1 -1
  79. package/dist/assets/{react-DbTUBIfc.js → react-DWHoxqVx.js} +1 -1
  80. package/dist/assets/{react-Be8LqDD0.js → react-DfJG99Vb.js} +1 -1
  81. package/dist/assets/{react-xXVp9hUr.js → react-dfMS-CNP.js} +1 -1
  82. package/dist/assets/{react-CFX24kGb.js → react-tGpJkmVx.js} +1 -1
  83. package/dist/assets/{recharts-DUgaG0ww.js → recharts-BHXPSy2L.js} +1 -1
  84. package/dist/assets/{routePaths-CuMG5DGQ.js → routePaths-D6EDB2Yc.js} +1 -1
  85. package/dist/assets/{sentry-DDBUQl1l.js → sentry--Yuj1Jyq.js} +1 -1
  86. package/dist/assets/{url-iKcR75LE.js → url-DomYNp9o.js} +1 -1
  87. package/dist/assets/{url-DIsZgeBv.js → url-Dy7h9pac.js} +1 -1
  88. package/dist/assets/useAskAiCfoHostNavButtonProps-CpK46S_s.js +1 -0
  89. package/dist/assets/{useDeviceId-BdkLfCQj.js → useDeviceId-BXvcSVDO.js} +1 -1
  90. package/dist/assets/useFetchSuggestedQuestionsWhenReady-DpNVr89y.js +1 -0
  91. package/dist/assets/{useInitialThreadRequest-DDmfCFY0.js → useInitialThreadRequest-BrXhq4yW.js} +1 -1
  92. package/dist/assets/{utils-D61OcZ2U.js → utils-CzY-S_Ct.js} +1 -1
  93. package/dist/assets/{withTransactionSidePanel-Rd6FsTPQ.js → withTransactionSidePanel-Dh8jH8W6.js} +2 -2
  94. package/dist/assets/{zeni-epic-state-DMCSky0I.js → zeni-epic-state-B2i4I3MD.js} +7 -7
  95. package/dist/index.html +1 -1
  96. package/package.json +3 -3
  97. package/dist/assets/AddressRoutes-B2yosjDP.js +0 -1
  98. package/dist/assets/AddressScreen-Dli3WBSh.js +0 -9
  99. package/dist/assets/CustomerOnboardingAuthScreen-C5RJn3fw.js +0 -1
  100. package/dist/assets/CustomerOnboardingRoutes-Dez8AewY.js +0 -23
  101. package/dist/assets/DrawerScreen-sYvZKN3Y.js +0 -1
  102. package/dist/assets/FeaturePreviewScreen--5hLyJ_2.js +0 -1
  103. package/dist/assets/MagicLinkSignInScreen-B64QZe5w.js +0 -12
  104. package/dist/assets/NotFoundScreen-CAervBWG.js +0 -1
  105. package/dist/assets/PeopleRoutes-DVB6InmJ.js +0 -22
  106. package/dist/assets/PerformanceRoutes-DbX-AREc.js +0 -1
  107. package/dist/assets/ReferralListScreen-BV4oiI_l.js +0 -5
  108. package/dist/assets/SignOutScreen-CbejG0GQ.js +0 -9
  109. package/dist/assets/TaskListScreen-BFiFSKkl.js +0 -9
  110. package/dist/assets/TransactionDetailRoutes-BC1p1DvP.js +0 -1
  111. package/dist/assets/WiseConfirmationScreen-BMOK4iFw.js +0 -12
  112. package/dist/assets/ZeniAccountStatementScreen-CF-490Xr.js +0 -9
  113. package/dist/assets/getLocaleForTenant-CJft5E8d.js +0 -1
  114. package/dist/assets/useAskAiCfoHostNavButtonProps-BZNd8NRL.js +0 -1
  115. package/dist/assets/useFetchSuggestedQuestionsWhenReady-DiJocIaN.js +0 -1
@@ -1,5 +1,5 @@
1
- import{j as I}from"./liveblocks-Bl3A2p2B.js";import{a as d}from"./sentry-DDBUQl1l.js";import{h as K,g as S,u as re,j as le,l as de,N as Ke,k as je}from"./core-kXknxXmM.js";import{bn as $e,eN as H,cN as ue,bv as me,pk as q,Jr as w,Ks as pe,Kt as Y,JR as fe,jC as he,Ku as ge,JW as X,JX as Q,kr as Se,GA as Z,Jl as _,jw as Te,ju as ye,jG as Me,Kv as Je,Kw as We,t9 as G,jB as ve,FX as Ce,cT as He,cU as qe,Kx as Ye,Jk as Xe,Ky as Qe,td as Ze,Kz as ea,KA as aa,KB as ta,KC as na,KD as oa,jF as sa,KE as ia,KF as ca,Jm as ra,KG as la,KH as da,KI as ua,FR as ma,FF as pa,G7 as fa,jH as ha,GB as ie,FO as ga}from"./zeni-epic-state-DMCSky0I.js";import{z as Ee,a as ee,l as F,aI as De,h as Sa,K as Ta,aJ as ya,C as va,r as J,j as Ca,aK as Ea,s as W,M as Da,d as be,aL as ba,ao as Ia,R as M}from"./index-r7RBj2Zs.js";import{n as ka,S as Aa,D as Ua}from"./mui-axh11eoI.js";import{u as xa}from"./useAskAiCfoHostNavButtonProps-BZNd8NRL.js";import{c as _a}from"./useFetchSuggestedQuestionsWhenReady-DiJocIaN.js";import{d as Ie}from"./decodeURIComponentSafe-wIBJn5gs.js";import{h as ke,g as Fa,d as Va,b as Ba}from"./routePaths-CuMG5DGQ.js";import{t as wa}from"./utils-D61OcZ2U.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="787ddf8b-d967-42f4-b2ff-980c2837e4ab",a._sentryDebugIdIdentifier="sentry-dbid-787ddf8b-d967-42f4-b2ff-980c2837e4ab")}catch{}})();const ae=()=>{const a=Ee.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(F.isChainOfThoughtEnabled);return d.useMemo(()=>$e(a)&&s,[a,s])};function Ae(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Za(a,e){const s=K(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>H(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(F.isExpenseAutomationEnabled),{configValue:f}=n(De.enableUncategorizedExpenseCategory),h=f?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:q(e)}),[a,e]),m=S(u=>w(u,y)),D=S(u=>{const z=w(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return z==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[z]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Ae(m?.transaction):void 0,[m?.fetchState,m?.transaction]),C=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),A=S(u=>Y(u)),V=S(u=>{if(p!=null)return fe(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>he(u.accountState,u.accountListState,"accountList")),[P,B]=d.useState(!1),[L,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{B(!1),v(!1),O(!1)},[a,e]);const E=d.useCallback(()=>{B(!1),v(!1)},[]),[U,x]=d.useState(!1),R=V?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(P?L||C==null||(v(!0),s(Z(p,"TransactionDetail",{timeframe:"month",timePeriod:R??C}))):(s(X()),s(Q()),B(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,L,C,R]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?x(!0):x(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(_("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:h,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:D,tranEntity:p,defaultTrendTransactionTimePeriod:C,vendorViewDetails:A,uiState:V,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:E,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:x}}const Pa={overlayWidth:new va(100,100,58)},La=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Sa(),i=Ta(),l=K(),g=S(f=>Y(f)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:f=>{l(Te({vendorId:void 0,localData:f}))}};return I.jsx(Ua,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:I.jsx(Oa,{onClick:f=>f.stopPropagation(),children:I.jsx(ya,{...b})})})},Oa=ka(Aa)`
1
+ import{j as I}from"./liveblocks-DZsElvdD.js";import{a as d}from"./sentry--Yuj1Jyq.js";import{h as K,g as S,u as re,j as le,l as de,N as Ke,k as je}from"./core-CrySabaB.js";import{bn as $e,eN as H,cN as ue,bv as me,pk as q,Jr as w,Ks as pe,Kt as Y,JR as he,jC as fe,Ku as ge,JW as X,JX as Q,kr as Se,GA as Z,Jl as _,jw as Te,ju as ye,jG as Je,Kv as Me,Kw as We,t9 as G,jB as ve,FX as Ee,cT as He,cU as qe,Kx as Ye,Jk as Xe,Ky as Qe,td as Ze,Kz as ea,KA as aa,KB as ta,KC as na,KD as oa,jF as sa,KE as ia,KF as ca,Jm as ra,KG as la,KH as da,KI as ua,FR as ma,FF as pa,G7 as ha,jH as fa,GB as ie,FO as ga}from"./zeni-epic-state-B2i4I3MD.js";import{z as Ce,p as ee,l as F,aI as De,h as Sa,K as Ta,aJ as ya,E as va,s as M,j as Ea,aK as Ca,w as W,N as Da,c as be,aL as ba,ao as Ia,T as J}from"./index-CcFsRa7B.js";import{n as ka,S as Aa,D as Ua}from"./mui-CZEnMS79.js";import{u as xa}from"./useAskAiCfoHostNavButtonProps-CpK46S_s.js";import{c as _a}from"./useFetchSuggestedQuestionsWhenReady-DpNVr89y.js";import{d as Ie}from"./decodeURIComponentSafe-C37138jw.js";import{h as ke,g as Fa,d as Va,b as Ba}from"./routePaths-D6EDB2Yc.js";import{t as wa}from"./utils-CzY-S_Ct.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="8a5ca473-70cb-490e-b2dc-f92e39eae6f7",a._sentryDebugIdIdentifier="sentry-dbid-8a5ca473-70cb-490e-b2dc-f92e39eae6f7")}catch{}})();const ae=()=>{const a=Ce.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(F.isChainOfThoughtEnabled);return d.useMemo(()=>$e(a)&&s,[a,s])};function Ae(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Za(a,e){const s=K(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>H(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(F.isExpenseAutomationEnabled),{configValue:h}=n(De.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:q(e)}),[a,e]),m=S(u=>w(u,y)),D=S(u=>{const R=w(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return R==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[R]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Ae(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),A=S(u=>Y(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[P,B]=d.useState(!1),[L,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{B(!1),v(!1),O(!1)},[a,e]);const C=d.useCallback(()=>{B(!1),v(!1)},[]),[U,x]=d.useState(!1),N=V?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(P?L||E==null||(v(!0),s(Z(p,"TransactionDetail",{timeframe:"month",timePeriod:N??E}))):(s(X()),s(Q()),B(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,L,E,N]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?x(!0):x(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(_("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:D,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:A,uiState:V,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:C,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:x}}const Pa={overlayWidth:new va(100,100,58)},La=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Sa(),i=Ta(),l=K(),g=S(h=>Y(h)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(Je("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return I.jsx(Ua,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:I.jsx(Oa,{onClick:h=>h.stopPropagation(),children:I.jsx(ya,{...b})})})},Oa=ka(Aa)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
5
- `,Ra=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=K(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,b=s??Ie(l??"");let f;ke(T,b)&&(f={id:T,type:q(b)});const h=f!=null?S(y=>w(y,f)):void 0,k=()=>{const y=J(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((D=2)=>{let p="../";for(let C=0;C<D;C++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:f,onSaveVendor:()=>{o(ve(f,void 0))},onSaveSuccess:()=>{if(h!=null&&h?.transaction&&h?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&h?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=h?.transactionDetailLocalData.vendorUpdates,m={id:h?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:h?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:h?.transactionDetailLocalData.vendorUpdates?.qboId??""},D={transactionId:{id:h?.transaction?.id,type:h?.transaction?.type},transaction:h?.transaction,lineIds:h?.transaction?.lines?.map(p=>p.id)??[]};o(G(m,h?.transaction?.amount.amount,D,!1,!1,i))}k()},onCancel:()=>{f!=null&&o(Je({transactionId:f})),o(ye()),o(We()),a(!0),k()}}},za=je(function(a,e){const s=w(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=Ee.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ye(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Xe(a,"common"),T=H(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${M}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${M}/transaction_attachments_accounting_provider`:`${M}/transaction_attachments`,attachmentUploadEndpoint:`${Ia.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(_("common")),e.onBackClick!=null)return void e.onBackClick();const t=J(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ue(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(ga({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(X()),a(Q());const n=W(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Ba(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(Z(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):ha({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(_("common"))},onUploadAttachmentAttachment:t=>{a(fa(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(pa(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(ma({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(ua(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(da(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(la({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=J(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=wa(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Fa(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Va(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ce(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ra({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(_("common"))},onCancelAutoComplete:()=>{a(_("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(G(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ca(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(ia(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(sa({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s)),a(Te({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,T=W(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:T}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(oa({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(na({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ta(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(aa(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(ea({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Qe(t,n,o))}}})(ba);function et(){const a=le(),e=K(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=Ca(),i=S(r=>H(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),T=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:b}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:f}=t(F.isExpenseAutomationEnabled),{configValue:h}=n(De.enableUncategorizedExpenseCategory),k=h?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:D}=de(),[p,C]=d.useState(!1),A=Ie(m??""),V=ke(D,A),j=S(r=>r.transactionVendorViewState),$=ae(),{isFeatureEnabled:P}=t(F.isTransactionCommentingEnabled),B=o?.currentTenant?.companyId,L=o?.currentTenant?.companyName;let v;V&&(v={id:D,type:q(A)});const c=v!=null?S(r=>w(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?j.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",E=c?.fetchState==="Completed"?Ae(c?.transaction):void 0,U=S(r=>E!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,E,"month"):void 0),x=S(r=>Y(r)),R=S(r=>E!=null?fe(r.trendWithTransactionsState,E,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,z=S(r=>he(r.accountState,r.accountListState,"accountList")),[xe,te]=d.useState(!1),[_e,ne]=d.useState(!1),[Fe,Ve]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Be=Ea();d.useEffect(()=>{if(v!=null&&c!=null&&c.fetchState==="Not-Started")e(Ce(v)),oe();else if(v!=null&&c!=null&&c.fetchState==="Error"){const r=W(s.state?.pathnameStackToGoBack,s.pathname),N={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Be&&(N.message="expenseAutomation",N.origin="transaction_categorization",N.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:N})}},[v]),d.useEffect(()=>{Fe||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Ve(!0)),E==null&&c?.fetchState==="Completed"&&ce(c?.transaction),E!=null&&(!l||g&&T===!1)&&(xe?_e||U==null||(ne(!0),e(Z(E,"TransactionDetail",{timeframe:"month",timePeriod:R?.selectedPeriod?.timePeriod??U}))):(e(X()),e(Q()),ce(c?.transaction),te(!0),e(Se(E))))},[c?.fetchState,c?.transaction,U,l]),d.useEffect(()=>{x.newVendorState?.vendorDetailLocalData?.vendorName!=null?C(!0):C(!1)},[x.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(_("common"))},[]);const we=[m,D].filter(r=>r!=null),{transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}=Ra({closeDrawerHandler:r=>{C(!1),a(r?"../":"../..")}}),{isAiCfoOpen:Re,setIsAiCfoOpen:ze}=Da(),{isAiCfoAccessEnabled:Ne,onAskAiCfoClick:Ge}=xa({isAiCfoOpen:Re,setIsAiCfoOpen:ze,mobileExploreReferrer:"Transaction Details"});return _a({isDataReady:c?.fetchState==="Completed"}),V?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(La,{isOpen:p,transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}),I.jsx(za,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:v,entity:E,isCOTEnabled:$,defaultTrendTransactionTimePeriod:U,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:z,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:f,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:Ne,onAskAiCfoClick:Ge,isTransactionCommentingEnabled:P,companyId:B,companyName:L})]}):I.jsx(Ke,{to:Ue(we.length)})}const Ue=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=Na(a),t=Ga(a);be.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},Na=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Ga=a=>He(a)===!0?a.customer?.name??"":qe(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{La as C,et as T,Ra as a,za as b,ae as c,Za as u};
5
+ `,Na=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=K(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,b=s??Ie(l??"");let h;ke(T,b)&&(h={id:T,type:q(b)});const f=h!=null?S(y=>w(y,h)):void 0,k=()=>{const y=M(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((D=2)=>{let p="../";for(let E=0;E<D;E++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:h,onSaveVendor:()=>{o(ve(h,void 0))},onSaveSuccess:()=>{if(f!=null&&f?.transaction&&f?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&f?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},D={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(G(m,f?.transaction?.amount.amount,D,!1,!1,i))}k()},onCancel:()=>{h!=null&&o(Me({transactionId:h})),o(ye()),o(We()),a(!0),k()}}},Ra=je(function(a,e){const s=w(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=Ce.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ye(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Xe(a,"common"),T=H(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${J}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${J}/transaction_attachments_accounting_provider`:`${J}/transaction_attachments`,attachmentUploadEndpoint:`${Ia.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(_("common")),e.onBackClick!=null)return void e.onBackClick();const t=M(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ue(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(ga({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(X()),a(Q());const n=W(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Ba(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(Z(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):fa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(_("common"))},onUploadAttachmentAttachment:t=>{a(ha(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(pa(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(ma({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(ua(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(da(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(la({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=M(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=wa(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Fa(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Va(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ra({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(_("common"))},onCancelAutoComplete:()=>{a(_("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(G(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ca(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(ia(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(sa({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s)),a(Te({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,T=W(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:T}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(oa({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(na({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ta(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(aa(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(ea({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Qe(t,n,o))}}})(ba);function et(){const a=le(),e=K(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=Ea(),i=S(r=>H(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),T=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:b}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(F.isExpenseAutomationEnabled),{configValue:f}=n(De.enableUncategorizedExpenseCategory),k=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:D}=de(),[p,E]=d.useState(!1),A=Ie(m??""),V=ke(D,A),j=S(r=>r.transactionVendorViewState),$=ae(),{isFeatureEnabled:P}=t(F.isTransactionCommentingEnabled),B=o?.currentTenant?.companyId,L=o?.currentTenant?.companyName;let v;V&&(v={id:D,type:q(A)});const c=v!=null?S(r=>w(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?j.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",C=c?.fetchState==="Completed"?Ae(c?.transaction):void 0,U=S(r=>C!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,C,"month"):void 0),x=S(r=>Y(r)),N=S(r=>C!=null?he(r.trendWithTransactionsState,C,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,R=S(r=>fe(r.accountState,r.accountListState,"accountList")),[xe,te]=d.useState(!1),[_e,ne]=d.useState(!1),[Fe,Ve]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Be=Ca();d.useEffect(()=>{if(v!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(v)),oe();else if(v!=null&&c!=null&&c.fetchState==="Error"){const r=W(s.state?.pathnameStackToGoBack,s.pathname),z={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Be&&(z.message="expenseAutomation",z.origin="transaction_categorization",z.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:z})}},[v]),d.useEffect(()=>{Fe||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Ve(!0)),C==null&&c?.fetchState==="Completed"&&ce(c?.transaction),C!=null&&(!l||g&&T===!1)&&(xe?_e||U==null||(ne(!0),e(Z(C,"TransactionDetail",{timeframe:"month",timePeriod:N?.selectedPeriod?.timePeriod??U}))):(e(X()),e(Q()),ce(c?.transaction),te(!0),e(Se(C))))},[c?.fetchState,c?.transaction,U,l]),d.useEffect(()=>{x.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[x.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(_("common"))},[]);const we=[m,D].filter(r=>r!=null),{transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}=Na({closeDrawerHandler:r=>{E(!1),a(r?"../":"../..")}}),{isAiCfoOpen:Ne,setIsAiCfoOpen:Re}=Da(),{isAiCfoAccessEnabled:ze,onAskAiCfoClick:Ge}=xa({isAiCfoOpen:Ne,setIsAiCfoOpen:Re,mobileExploreReferrer:"Transaction Details"});return _a({isDataReady:c?.fetchState==="Completed"}),V?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(La,{isOpen:p,transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}),I.jsx(Ra,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:v,entity:C,isCOTEnabled:$,defaultTrendTransactionTimePeriod:U,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:R,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:ze,onAskAiCfoClick:Ge,isTransactionCommentingEnabled:P,companyId:B,companyName:L})]}):I.jsx(Ke,{to:Ue(we.length)})}const Ue=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=za(a),t=Ga(a);be.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},za=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Ga=a=>He(a)===!0?a.customer?.name??"":qe(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{La as C,et as T,Na as a,Ra as b,ae as c,Za as u};
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-Bl3A2p2B.js";import{j as q,u as w,h as U,l as Q,g as L,N as C,k as Z,n as Ae,o as v}from"./core-kXknxXmM.js";import{eN as R,iQ as T,NP as H,Gr as ue,bq as ie,NQ as he,jr as W,JT as X,NR as se,NS as Se,bC as x,Go as me,NT as ke,NU as re,NV as Ie,NW as pe,NX as be,NY as ve,NZ as de,HE as Ye,bn as xe}from"./zeni-epic-state-DMCSky0I.js";import{D as K,d as B,c5 as ee,s as _,r as te,a as fe,l as J,N as Ee,z as Pe}from"./index-r7RBj2Zs.js";import"./mui-axh11eoI.js";import{a as A}from"./sentry-DDBUQl1l.js";import{w as ae}from"./withTransactionSidePanel-Rd6FsTPQ.js";import{p as ne,b as ce}from"./routePaths-CuMG5DGQ.js";import{u as Le}from"./utils-D61OcZ2U.js";import{d as P}from"./decodeURIComponentSafe-wIBJn5gs.js";import{Z as je}from"./ZeniAccountStatementScreen-CF-490Xr.js";import"./recharts-DUgaG0ww.js";import"./analytics-B5o5sheK.js";import"./plaid-BUPrZO5b.js";import"./dnd-D8v1Hu0d.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-MkWC6q.js";import"./lexical-DTfvcVgU.js";import"./pdf-VFwJrwPY.js";import"./useAskAiCfoHostNavButtonProps-BZNd8NRL.js";import"./useFetchSuggestedQuestionsWhenReady-DiJocIaN.js";import"./TransactionDetailScreen-C43lmhQC.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="fff8ff24-8e24-4d3c-a010-4002804f4b10",a._sentryDebugIdIdentifier="sentry-dbid-fff8ff24-8e24-4d3c-a010-4002804f4b10")}catch{}})();const G=a=>Le(a),ze=Z(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:X(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:W(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=K.getLocalizedStrings(),r=G(e.selectedAccount.tranListType),s=Be(t,n,c,r,e.bookCloseDate);B.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:s},type:G(e.selectedAccount.tranListType)})),a(ue(r,T(s),!1,r==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(s))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),F=ae(function({...a}){const e=q(),t=w(),n=U(),c=t.pathname.substring(t.pathname.lastIndexOf("/")+1),{tenantEmailDomain:o}=Q(),r=K.getLocalizedStrings(),{accountType:s,title:u,subTitle:h}=Me(c),D="month",g=L(p=>R(p)),Y=g.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:S}=Ce(c,Y,g.bookCloseDate),[k,j]=A.useState(!1),[z,E]=A.useState(void 0),m=A.useMemo(()=>{const p=T(S);return{tranListType:c,accountType:H(s),title:u,subTitle:h,timeframe:D,period:p}},[c,D,s,y]);A.useEffect(()=>{if(!k&&m!=null){j(!0),B.trackTransactionList(void 0,void 0,void 0,m.title);const p=G(m.tranListType);n(ue(p,m.period,!0,p==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[k,m,n]);let I=m;return m!=null&&z!=null&&(I={...m,period:z}),I==null?i.jsx(C,{to:"../"}):i.jsx(ze,{firstMonthOfFY:Y,tenantEmailDomain:o,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:I,referrerType:c,bookCloseDate:g.bookCloseDate,onSelectedTimePeriodChange:p=>E(p),...a})}),Me=a=>{let e="",t="",n="";const c=K.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},Ce=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Oe=Z(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:X(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:W(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Fe=ae(function({referrerType:a,...e}){const t=q(),n=w(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,classIdEncoded:u,timeframe:h,startDate:D,endDate:g,titleEncoded:Y}=Q(),y=P(r??""),S=P(s??""),k=P(u??""),j=P(Y??""),z=L(f=>Se(f.transactionListState,S,y,k)),[E,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(f=>R(f)),$=N.company?.companyInfo.firstMonthOfFY??1;let d;const l=Ge(y,S,k,h,D,g,j);if(l){const f={startDate:x(D,"YYYY-MM-DD"),endDate:x(g,"YYYY-MM-DD")},V=Ne(z?.dateRange,f);d={accountId:S,accountType:H(y),classId:k,title:j,timeframe:h,period:V}}A.useEffect(()=>{E||d==null||(m(!0),B.trackTransactionList(d.accountId,void 0,a,d.title),c(me(d.accountId,d.accountType,d.classId,d.period)))},[E,d,c]);let M=d;d!=null&&I!=null&&(M={...d,period:I});const O=[r,s,u,h,D,g,Y].filter(f=>f!=null);return l&&M!=null?i.jsx(Oe,{firstMonthOfFY:$,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:M,referrerType:a,onSelectedTimePeriodChange:f=>p(f),...e}):i.jsx(C,{to:Te(O.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,r)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&r!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),_e=Z(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:X(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:W(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=$e(e.tenantEmailDomain),n=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=q(),n=w(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,timeframe:u,startDate:h,endDate:D,titleEncoded:g,excludeSubAccounts:Y}=Q(),y=P(r??""),S=P(s??""),k=P(g??""),j=!(Y!=null&&Y==="exclude_subaccounts"),z=L(b=>Ie(b.transactionListState,S,y)),[E,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(b=>R(b)),$=N.company?.featuresActivationInfo.connectedAccountProvider==="unit",d=N.company?.companyInfo.firstMonthOfFY??1;let l;const M=we(y,S,u,h,D,k);if(M){const b={startDate:x(h,"YYYY-MM-DD"),endDate:x(D,"YYYY-MM-DD")},ye=Re(z?.dateRange,b);l={accountId:S,accountType:H(y),title:k,timeframe:u,period:ye}}let O=l;l!=null&&I!=null&&(O={...l,period:I});const{useFeatureGate:f}=fe(),{isFeatureEnabled:V}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();A.useEffect(()=>{!E&&l!=null&&oe&&(m(!0),B.trackTransactionList(l.accountId,void 0,a,l.title),c(pe(l.accountId,l.accountType,l.period,void 0,!1,j)))},[E,l,c,oe]);const ge=[r,s,u,h,D,g].filter(b=>b!=null);return M&&O!=null?i.jsx(_e,{firstMonthOfFY:d,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:$,isTransactionCommentingEnabled:V,selectedAccount:O,referrerType:a,onSelectedTimePeriodChange:b=>p(b),...e}):i.jsx(C,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},we=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Re=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),$e=a=>`/${a}/transactions/${Ye}/statements`;function mt(){const a=w().state?.referrer,e=Pe.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=L(u=>u.expenseAutomationViewState.selectedPeriodByTenantId)[L(u=>R(u)).tenantId],{isFeatureEnabled:r}=n(J.isExpenseAutomationEnabledV2),s=r||c&&t;return i.jsxs(Ae,{children:[i.jsx(v,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(v,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/uncategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/uncategorized-expense/*",element:s?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-expense/*",element:s?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/missing-receipts/*",element:s?i.jsx(C,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Fe,{referrerType:a})})]})}export{mt as default};
1
+ import{j as i}from"./liveblocks-DZsElvdD.js";import{j as q,u as w,h as U,l as Q,g as L,N as C,k as Z,n as Ae,o as v}from"./core-CrySabaB.js";import{eN as R,iQ as T,NP as H,Gr as ue,bq as ie,NQ as he,jr as W,JT as X,NR as se,NS as Se,bC as x,Go as me,NT as ke,NU as re,NV as Ie,NW as pe,NX as be,NY as ve,NZ as de,HE as Ye,bn as xe}from"./zeni-epic-state-B2i4I3MD.js";import{D as K,c as B,c5 as ee,w as _,s as te,p as fe,l as J,O as Ee,z as Pe}from"./index-CcFsRa7B.js";import"./mui-CZEnMS79.js";import{a as A}from"./sentry--Yuj1Jyq.js";import{w as ae}from"./withTransactionSidePanel-Dh8jH8W6.js";import{p as ne,b as ce}from"./routePaths-D6EDB2Yc.js";import{u as Le}from"./utils-CzY-S_Ct.js";import{d as P}from"./decodeURIComponentSafe-C37138jw.js";import{Z as je}from"./ZeniAccountStatementScreen-BQfXeeVB.js";import"./recharts-BHXPSy2L.js";import"./analytics-DYCAui-I.js";import"./plaid-B6RZTGXN.js";import"./dnd-CV1KjQXU.js";import"./stripe-DMRn4zHo.js";import"./lottie-_mjnLDz5.js";import"./lexical-Be88TDK-.js";import"./pdf-EBByNZKe.js";import"./useAskAiCfoHostNavButtonProps-CpK46S_s.js";import"./useFetchSuggestedQuestionsWhenReady-DpNVr89y.js";import"./TransactionDetailScreen-i-Dd7tmX.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="ee05306a-c1ab-404d-90f1-719a944450d8",a._sentryDebugIdIdentifier="sentry-dbid-ee05306a-c1ab-404d-90f1-719a944450d8")}catch{}})();const G=a=>Le(a),ze=Z(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:X(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:W(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=K.getLocalizedStrings(),r=G(e.selectedAccount.tranListType),s=Be(t,n,c,r,e.bookCloseDate);B.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:s},type:G(e.selectedAccount.tranListType)})),a(ue(r,T(s),!1,r==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(s))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),F=ae(function({...a}){const e=q(),t=w(),n=U(),c=t.pathname.substring(t.pathname.lastIndexOf("/")+1),{tenantEmailDomain:o}=Q(),r=K.getLocalizedStrings(),{accountType:s,title:u,subTitle:h}=Me(c),D="month",g=L(p=>R(p)),Y=g.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:S}=Ce(c,Y,g.bookCloseDate),[k,j]=A.useState(!1),[z,E]=A.useState(void 0),m=A.useMemo(()=>{const p=T(S);return{tranListType:c,accountType:H(s),title:u,subTitle:h,timeframe:D,period:p}},[c,D,s,y]);A.useEffect(()=>{if(!k&&m!=null){j(!0),B.trackTransactionList(void 0,void 0,void 0,m.title);const p=G(m.tranListType);n(ue(p,m.period,!0,p==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[k,m,n]);let I=m;return m!=null&&z!=null&&(I={...m,period:z}),I==null?i.jsx(C,{to:"../"}):i.jsx(ze,{firstMonthOfFY:Y,tenantEmailDomain:o,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:I,referrerType:c,bookCloseDate:g.bookCloseDate,onSelectedTimePeriodChange:p=>E(p),...a})}),Me=a=>{let e="",t="",n="";const c=K.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},Ce=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Oe=Z(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:X(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:W(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Fe=ae(function({referrerType:a,...e}){const t=q(),n=w(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,classIdEncoded:u,timeframe:h,startDate:D,endDate:g,titleEncoded:Y}=Q(),y=P(r??""),S=P(s??""),k=P(u??""),j=P(Y??""),z=L(f=>Se(f.transactionListState,S,y,k)),[E,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(f=>R(f)),$=N.company?.companyInfo.firstMonthOfFY??1;let d;const l=Ge(y,S,k,h,D,g,j);if(l){const f={startDate:x(D,"YYYY-MM-DD"),endDate:x(g,"YYYY-MM-DD")},V=Ne(z?.dateRange,f);d={accountId:S,accountType:H(y),classId:k,title:j,timeframe:h,period:V}}A.useEffect(()=>{E||d==null||(m(!0),B.trackTransactionList(d.accountId,void 0,a,d.title),c(me(d.accountId,d.accountType,d.classId,d.period)))},[E,d,c]);let M=d;d!=null&&I!=null&&(M={...d,period:I});const O=[r,s,u,h,D,g,Y].filter(f=>f!=null);return l&&M!=null?i.jsx(Oe,{firstMonthOfFY:$,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:M,referrerType:a,onSelectedTimePeriodChange:f=>p(f),...e}):i.jsx(C,{to:Te(O.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,r)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&r!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),_e=Z(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:X(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:W(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=$e(e.tenantEmailDomain),n=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=q(),n=w(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,timeframe:u,startDate:h,endDate:D,titleEncoded:g,excludeSubAccounts:Y}=Q(),y=P(r??""),S=P(s??""),k=P(g??""),j=!(Y!=null&&Y==="exclude_subaccounts"),z=L(b=>Ie(b.transactionListState,S,y)),[E,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(b=>R(b)),$=N.company?.featuresActivationInfo.connectedAccountProvider==="unit",d=N.company?.companyInfo.firstMonthOfFY??1;let l;const M=we(y,S,u,h,D,k);if(M){const b={startDate:x(h,"YYYY-MM-DD"),endDate:x(D,"YYYY-MM-DD")},ye=Re(z?.dateRange,b);l={accountId:S,accountType:H(y),title:k,timeframe:u,period:ye}}let O=l;l!=null&&I!=null&&(O={...l,period:I});const{useFeatureGate:f}=fe(),{isFeatureEnabled:V}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();A.useEffect(()=>{!E&&l!=null&&oe&&(m(!0),B.trackTransactionList(l.accountId,void 0,a,l.title),c(pe(l.accountId,l.accountType,l.period,void 0,!1,j)))},[E,l,c,oe]);const ge=[r,s,u,h,D,g].filter(b=>b!=null);return M&&O!=null?i.jsx(_e,{firstMonthOfFY:d,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:$,isTransactionCommentingEnabled:V,selectedAccount:O,referrerType:a,onSelectedTimePeriodChange:b=>p(b),...e}):i.jsx(C,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},we=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Re=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),$e=a=>`/${a}/transactions/${Ye}/statements`;function mt(){const a=w().state?.referrer,e=Pe.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=L(u=>u.expenseAutomationViewState.selectedPeriodByTenantId)[L(u=>R(u)).tenantId],{isFeatureEnabled:r}=n(J.isExpenseAutomationEnabledV2),s=r||c&&t;return i.jsxs(Ae,{children:[i.jsx(v,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(v,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/uncategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/uncategorized-expense/*",element:s?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-expense/*",element:s?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/missing-receipts/*",element:s?i.jsx(C,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Fe,{referrerType:a})})]})}export{mt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-Bl3A2p2B.js";import{j as L,u as M,h as U,l as O,g as f,N as B,k as N,n as Ie,o as k}from"./core-kXknxXmM.js";import{cj as V,eN as D,MB as R,D7 as ae,fc as W,CR as ne,MD as Te,Da as we,Mz as ke,MA as se,MR as be,Bh as je,s6 as Ae,MF as Ee,Dl as ve,MC as re,cM as Z,wc as oe,eR as De,eT as Fe,NM as Be,NN as Le,CS as Me,NO as Ue,CT as Re,D0 as Pe,bv as Oe,bD as Ne,cu as Ve,bE as _e,cO as ze,fb as $e,bs as Ge,Il as He,ci as We}from"./zeni-epic-state-DMCSky0I.js";import{j as _,al as Ze,z as A,y as z,d as b,b_ as Ke,b$ as qe,c0 as H,K,h as Je,N as Qe,M as Xe,a as ie,l as v,C as Ye,B as et,c1 as tt,ao as q,s as at,c2 as nt,r as J,c3 as st,v as X,c4 as rt,a4 as ot}from"./index-r7RBj2Zs.js";import{D as it,n as P,S as ct}from"./mui-axh11eoI.js";import lt from"./NotFoundScreen-CAervBWG.js";import{S as Y}from"./SetupPagesScreen-BYZmB6RQ.js";import{a as d}from"./sentry-DDBUQl1l.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-BZNd8NRL.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-DiJocIaN.js";import{M as ce}from"./MobileAppDrawer-DI2qJWFS.js";import{F as pt}from"./FeaturePreviewScreen--5hLyJ_2.js";import{a as ee}from"./analyticsHelper-u-FHaHNW.js";import"./recharts-DUgaG0ww.js";import"./analytics-B5o5sheK.js";import"./plaid-BUPrZO5b.js";import"./dnd-D8v1Hu0d.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-MkWC6q.js";import"./lexical-DTfvcVgU.js";import"./pdf-VFwJrwPY.js";import"./utils-D61OcZ2U.js";import"./routePaths-CuMG5DGQ.js";import"./BusinessVerificationPageScreen-DKrw7o8b.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="c50cdc8a-aeb0-475a-bbdd-2c95594a1ca9",t._sentryDebugIdIdentifier="sentry-dbid-c50cdc8a-aeb0-475a-bbdd-2c95594a1ca9")}catch{}})();const mt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Te(r))}}})(Ke);function ft(){const t=L(),a=M(),n=U(),{tenantEmailDomain:o}=O(),p=_(),r=f(w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=Ze(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,T]=d.useState(!1),[u,l]=d.useState(!1),g=f(w=>D(w)),h=A.getSignedInUserTenant(o)?.companyId??g.companyId,C=A.getSignedInUser(),S=f(w=>R(w,h)),I=f(w=>w.treasurySetupViewState.fetchState),x=f(w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||I!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,I,h,n]),d.useEffect(()=>{u||F!=="Not-Started"||h==null||(l(!0),n(W()))},[u,F,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(T(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(B,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||I!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(mt,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:b})]})}const yt=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:be(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{H(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{H(a.analytics,"confirm",r,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(qe),gt=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=O(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,T]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>D(x)),C=A.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>ke(x)),I=f(x=>R(x,C));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||C==null||(s(!0),o(ae(C,!0,!1)))},[m,u,C,o]),d.useEffect(()=>{c||l!=="Not-Started"||C==null||(i(!0),o(W()))},[c,l,C,o]),d.useEffect(()=>{y||g!=="Not-Started"||C==null||(T(!0),o(ne()))},[y,g,C,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(yt,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:I,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{H(b,"review",S.treasuryTransferMoneyLocalData,I.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ht=P.div`
1
+ import{j as e}from"./liveblocks-DZsElvdD.js";import{j as L,u as M,h as U,l as P,g as f,N as B,k as N,n as Ie,o as k}from"./core-CrySabaB.js";import{cj as V,eN as D,MB as R,D7 as ae,fc as W,CR as ne,MD as Te,Da as we,Mz as ke,MA as se,MR as je,Bh as Ae,s6 as be,MF as Ee,Dl as ve,MC as re,cM as Z,wc as oe,eR as De,eT as Fe,NM as Be,NN as Le,CS as Me,NO as Ue,CT as Re,D0 as Oe,bv as Pe,bD as Ne,cu as Ve,bE as _e,cO as ze,fb as $e,bs as Ge,Il as He,ci as We}from"./zeni-epic-state-B2i4I3MD.js";import{j as _,al as Ze,z as b,y as z,c as j,b_ as Ke,b$ as qe,c0 as H,K,h as Je,O as Qe,N as Xe,p as ie,l as v,E as Ye,B as et,c1 as tt,ao as q,w as at,c2 as nt,s as J,c3 as st,v as X,c4 as rt,a4 as ot}from"./index-CcFsRa7B.js";import{D as it,n as O,S as ct}from"./mui-CZEnMS79.js";import lt from"./NotFoundScreen-DHf1NG7A.js";import{S as Y}from"./SetupPagesScreen-BRWFzqZr.js";import{a as d}from"./sentry--Yuj1Jyq.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-CpK46S_s.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-DpNVr89y.js";import{M as ce}from"./MobileAppDrawer-51OTOFDc.js";import{F as pt}from"./FeaturePreviewScreen-D1hHI8kK.js";import{a as ee}from"./analyticsHelper-CoCsLWxV.js";import"./recharts-BHXPSy2L.js";import"./analytics-DYCAui-I.js";import"./plaid-B6RZTGXN.js";import"./dnd-CV1KjQXU.js";import"./stripe-DMRn4zHo.js";import"./lottie-_mjnLDz5.js";import"./lexical-Be88TDK-.js";import"./pdf-EBByNZKe.js";import"./utils-CzY-S_Ct.js";import"./routePaths-D6EDB2Yc.js";import"./BusinessVerificationPageScreen-BUfK35_-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="ac292039-93c6-4dca-a050-d58188d9cee2",t._sentryDebugIdIdentifier="sentry-dbid-ac292039-93c6-4dca-a050-d58188d9cee2")}catch{}})();const mt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Te(r))}}})(Ke);function ft(){const t=L(),a=M(),n=U(),{tenantEmailDomain:o}=P(),p=_(),r=f(w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=Ze(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,T]=d.useState(!1),[u,l]=d.useState(!1),g=f(w=>D(w)),h=b.getSignedInUserTenant(o)?.companyId??g.companyId,C=b.getSignedInUser(),S=f(w=>R(w,h)),I=f(w=>w.treasurySetupViewState.fetchState),x=f(w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||I!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,I,h,n]),d.useEffect(()=>{u||F!=="Not-Started"||h==null||(l(!0),n(W()))},[u,F,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(T(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(B,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||I!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(mt,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const yt=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{H(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{H(a.analytics,"confirm",r,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(Ae(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(qe),gt=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=P(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,T]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>D(x)),C=b.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>ke(x)),I=f(x=>R(x,C));if(b.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||C==null||(s(!0),o(ae(C,!0,!1)))},[m,u,C,o]),d.useEffect(()=>{c||l!=="Not-Started"||C==null||(i(!0),o(W()))},[c,l,C,o]),d.useEffect(()=>{y||g!=="Not-Started"||C==null||(T(!0),o(ne()))},[y,g,C,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(yt,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:I,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{H(j,"review",S.treasuryTransferMoneyLocalData,I.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ht=O.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,11 +6,11 @@ import{j as e}from"./liveblocks-Bl3A2p2B.js";import{j as L,u as M,h as U,l as O,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${t=>t.theme.colors.grey4};
9
- `,St={overlayWidth:new Ye(100,100,48)},xt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=Ct(s):c==="statements"?i=It(s):c==="taxLetter"?i=Tt(s):c==="settings"&&(i=wt(s));const y=at(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(Be({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(tt);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=M(),o=L(),p=U(),r=K(),m=Je(),s=f(j=>D(j)),{tenantEmailDomain:c}=O(),i=s.companyId??A.getSignedInUserTenant(c)?.companyId,[y,T]=d.useState(!1),u=f(j=>re(j)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),I=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Qe();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(T(!0),p(oe(!0)))},[y,p,l,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const w=()=>{o("..")},[le,ue]=d.useState(!1),Q=j=>{ue(j)},{isAiCfoOpen:de,setIsAiCfoOpen:pe}=Xe(),{isAiCfoAccessEnabled:me,onAskAiCfoClick:fe}=ut({isAiCfoOpen:de,setIsAiCfoOpen:pe,mobileExploreReferrer:"Treasury"});dt({isDataReady:l==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:ye}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ge}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:he}=$(v.isTreasuryCommentingEnabled),Se=De(s),xe=Fe(ye,s);if(Se===!0&&xe!==!0)return e.jsx(pt,{});if(C){const j=h?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&h?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(it,{onClose:w,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(kt,{onClick:Ce=>Ce.stopPropagation(),children:[t===!0?e.jsx(gt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(ft,{}):null]})}),e.jsxs(ht,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(xt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:ge,navigate:o,currentTenant:s,location:n,companyId:i,analytics:b,isTreasuryCommentingEnabled:he,handleDrawerToggle:Q,isLoading:j,isAiCfoAccessEnabled:me,onAskAiCfoClick:fe})]})]})}return I&&x?e.jsx(B,{to:"../setup"}):s.companyTreasuryInfo?.info&&!I&&F?e.jsx(B,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const Ct=t=>`/${t}/treasury/edit-portfolio`,It=t=>`/${t}/treasury/statements`,Tt=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,kt=P(ct)`
9
+ `,St={overlayWidth:new Ye(100,100,48)},xt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=Ct(s):c==="statements"?i=It(s):c==="taxLetter"?i=Tt(s):c==="settings"&&(i=wt(s));const y=at(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(Be({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(tt);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=M(),o=L(),p=U(),r=K(),m=Je(),s=f(A=>D(A)),{tenantEmailDomain:c}=P(),i=s.companyId??b.getSignedInUserTenant(c)?.companyId,[y,T]=d.useState(!1),u=f(A=>re(A)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(A=>A.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),I=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Qe();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(T(!0),p(oe(!0)))},[y,p,l,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const w=()=>{o("..")},[le,ue]=d.useState(!1),Q=A=>{ue(A)},{isAiCfoOpen:de,setIsAiCfoOpen:pe}=Xe(),{isAiCfoAccessEnabled:me,onAskAiCfoClick:fe}=ut({isAiCfoOpen:de,setIsAiCfoOpen:pe,mobileExploreReferrer:"Treasury"});dt({isDataReady:l==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:ye}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ge}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:he}=$(v.isTreasuryCommentingEnabled),Se=De(s),xe=Fe(ye,s);if(Se===!0&&xe!==!0)return e.jsx(pt,{});if(C){const A=h?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&h?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(it,{onClose:w,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(kt,{onClick:Ce=>Ce.stopPropagation(),children:[t===!0?e.jsx(gt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(ft,{}):null]})}),e.jsxs(ht,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(xt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:ge,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:he,handleDrawerToggle:Q,isLoading:A,isAiCfoAccessEnabled:me,onAskAiCfoClick:fe})]})]})}return I&&x?e.jsx(B,{to:"../setup"}):s.companyTreasuryInfo?.info&&!I&&F?e.jsx(B,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const Ct=t=>`/${t}/treasury/edit-portfolio`,It=t=>`/${t}/treasury/statements`,Tt=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,kt=O(ct)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
13
- `,bt=P.div`
13
+ `,jt=O.div`
14
14
  display: flex;
15
15
  height: 100vh;
16
16
  width: 100%;
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-Bl3A2p2B.js";import{j as L,u as M,h as U,l as O,
18
18
  flex-direction: column;
19
19
  align-items: center;
20
20
  background-color: ${t=>t.theme.colors.grey4};
21
- `;function jt(){const t=L(),a=U(),n=K(),o=M(),p=`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Le(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Me(!1)))},[r,s.fetchState,a]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:T,statementListView:s,isLoading:u,onBackClick:()=>{const l=J(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const At=P.div`
21
+ `;function At(){const t=L(),a=U(),n=K(),o=M(),p=`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Le(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Me(!1)))},[r,s.fetchState,a]);const c=b.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(jt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:T,statementListView:s,isLoading:u,onBackClick:()=>{const l=J(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const bt=O.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-Bl3A2p2B.js";import{j as L,u as M,h as U,l as O,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${t=>t.theme.colors.grey4};
29
- `;function Et(){const t=L(),a=K(),n=M(),o=U(),p=`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Ue(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Re(!1)))},[r,s.fetchState,o]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(At,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:T,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=J(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const vt=N(function(t,a){const{companyId:n}=a,o=R(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Pe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(rt),Dt=()=>{const t=L(),a=M(),n=U(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,c]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(W()))},[i,n]);const y=A.getSignedInUserTenant(o)?.companyId??m.companyId,T=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(T==null)throw Error("Can't access treasury promo page without signing in...");const g=_(),h=V(g?.loggedInUserRoleMap),C=Z(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(B,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||C)){if(a.state?.message==="activation"){const S=J(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:S=>(I=>I.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(vt,{analytics:b,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=P.div`
29
+ `;function Et(){const t=L(),a=K(),n=M(),o=U(),p=`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Ue(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Re(!1)))},[r,s.fetchState,o]);const c=b.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:T,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=J(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const vt=N(function(t,a){const{companyId:n}=a,o=R(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Oe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(rt),Dt=()=>{const t=L(),a=M(),n=U(),{tenantEmailDomain:o}=P(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,c]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(W()))},[i,n]);const y=b.getSignedInUserTenant(o)?.companyId??m.companyId,T=b.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(T==null)throw Error("Can't access treasury promo page without signing in...");const g=_(),h=V(g?.loggedInUserRoleMap),C=Z(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(B,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||C)){if(a.state?.message==="activation"){const S=J(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:S=>(I=>I.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(vt,{analytics:j,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=O.div`
30
30
  display: flex;
31
31
  width: 100%;
32
32
  height: 100%;
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-Bl3A2p2B.js";import{j as L,u as M,h as U,l as O,
34
34
  justify-content: center;
35
35
  align-items: center;
36
36
  background-color: ${t=>t.theme.colors.grey5};
37
- `;function ta(){const t=M(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&_e(r?.loggedInUserRoleMap),{isFeatureEnabled:T}=n(v.isDepositAccountsFeatureEnabled),u=T&&!s&&ze(r?.loggedInUserRoleMap),l=a.company!=null&&$e(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:C}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,C)&&!s&&Ge(r?.loggedInUserRoleMap),I=He(r?.loggedInUserRoleMap),x=We(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Ie,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:I,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:I,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(lt,{})})]}):p&&g?e.jsx(k,{path:"*",element:e.jsx(B,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(B,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
37
+ `;function ta(){const t=M(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Pe(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&_e(r?.loggedInUserRoleMap),{isFeatureEnabled:T}=n(v.isDepositAccountsFeatureEnabled),u=T&&!s&&ze(r?.loggedInUserRoleMap),l=a.company!=null&&$e(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:C}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,C)&&!s&&Ge(r?.loggedInUserRoleMap),I=He(r?.loggedInUserRoleMap),x=We(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Ie,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:I,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:I,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(lt,{})})]}):p&&g?e.jsx(k,{path:"*",element:e.jsx(B,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(B,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-Bl3A2p2B.js";import{a as g}from"./sentry-DDBUQl1l.js";import{j as M,u as q,l as J,g as S,k as G,h as Y,n as nt,o as B,N as K}from"./core-kXknxXmM.js";import{eN as O,Jh as Ee,Ji as Ue,fP as ee,cp as be,cq as ke,uN as ft,Jj as st,uR as Yt,Hv as te,jr as ae,uL as qt,uF as Ht,Jk as Ne,ux as Wt,uw as Qt,uq as Zt,uC as Xt,uS as ea,Jl as pe,Jm as Me,uy as ta,Jn as he,eY as gt,v5 as vt,u_ as xt,Jo as Tt,nT as Ct,uV as yt,uT as Dt,Jp as It,vc as Et,v9 as bt,uW as kt,vb as Ge,FX as wt,Jq as aa,Jr as na,cs as sa,Js as oa,Jt as la,Ju as me,Jv as ce,Jw as we,Hw as $e,vr as ye,Hu as De,ve as At,uO as Ke,Jx as ia,Hx as W,Jy as ze,uI as ca,Jz as da,JA as ra,JB as Ye,JC as qe,JD as He,JE as We,vl as Ae,JF as jt,v2 as Ft,JG as ua,JH as pa,JI as ha,JJ as ma,JK as Sa,JL as fa,JM as ga,JN as va,si as xa,sj as Ta,GB as Fe,JO as Ca,JP as ya,iQ as Pe,bq as Da,JQ as Ia,JR as Ea,kp as ba,ky as ka,GA as _e,bC as ot,JS as Pt,Gg as _t,JT as wa,JU as Aa,JV as ja,kA as Fa,JW as lt,JX as it,JY as ct,JZ as dt,J_ as Pa,kw as _a,J$ as Va,kz as La,K0 as Oa,K1 as Vt,GX as Lt,jP as Ba,K2 as Ja,K3 as Ve,K4 as Ot,GV as Bt,xE as Ra,K5 as Ua,K6 as Na,k7 as Jt,K7 as Ma,K8 as Ga,H7 as $a,p_ as Ka,K9 as Rt,Ka as rt,H4 as Le,Kb as ut,Kc as za,H9 as Ya,Kd as qa,Ke as Ha,Kf as Wa,Kg as Qa,Kh as Za,q1 as Xa,Ki as en,Hy as tn,Kj as an,GO as Oe,gy as nn,Kk as sn,Kl as on,gw as ln,Km as cn,Kn as dn,xI as rn,Ko as un,Kp as pn,Kq as hn,Kr as mn,jT as Sn,bn as fn,eT as gn,eR as vn}from"./zeni-epic-state-DMCSky0I.js";import{z as R,al as Be,B as Ut,y as Z,d as P,R as X,ar as xn,s as N,D as Ie,A as de,as as Qe,at as Tn,au as Cn,r as Ze,av as yn,h as Dn,K as re,C as Xe,a as ne,l as z,aw as In,m as et,M as Se,ax as En,ay as Nt,N as bn,az as kn,j as wn,aA as An,ao as Mt,aB as jn,o as Q,S as Fn,G as Gt,H as Pn,aC as _n,aD as Vn,g as tt,aE as Ln,aF as On,q as Bn,aG as Jn,aH as Rn}from"./index-r7RBj2Zs.js";import{n as U,D as Un,S as $t}from"./mui-axh11eoI.js";import{t as Nn,A as Mn}from"./AddressScreen-Dli3WBSh.js";import ie from"./NotFoundScreen-CAervBWG.js";import{F as Gn}from"./FeaturePreviewScreen--5hLyJ_2.js";import{b as H,v as at,c as $n}from"./routePaths-CuMG5DGQ.js";import{p as Kt}from"./pathToGoBack-DfPLhZwj.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-BZNd8NRL.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-DiJocIaN.js";import{M as ve}from"./MobileAppDrawer-DI2qJWFS.js";import{D as Kn}from"./DrawerScreen-sYvZKN3Y.js";import{g as zn,m as Yn}from"./accountMappingHelper-CZh04DwI.js";import"./recharts-DUgaG0ww.js";import"./analytics-B5o5sheK.js";import"./plaid-BUPrZO5b.js";import"./dnd-D8v1Hu0d.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-MkWC6q.js";import"./lexical-DTfvcVgU.js";import"./pdf-VFwJrwPY.js";import"./utils-D61OcZ2U.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]="dbed7c5e-3269-4a85-a4c8-c66c9f7b2fa5",e._sentryDebugIdIdentifier="sentry-dbid-dbed7c5e-3269-4a85-a4c8-c66c9f7b2fa5")}catch{}})();const qn=Ie.getLocalizedStrings(),Hn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(st({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(st({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${H(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(ft(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(xn),Wn=({setShouldNavigateBack:e})=>{const a=M(),s=q(),{scheduleDetailId:t,tenantEmailDomain:n}=J(),{scheduleType:o}=J();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>O(f)),d=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,d)),m=i.selectedJELinkRowIndex,r=S(f=>ee(f,c.companyId)),p=Be(i.updateStatus.fetchState);g.useEffect(()=>{p==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[p,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const h=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[h===!0?l.jsx(Z,{analytics:P,onLoad:()=>{Qn(i,d,r)}}):null,l.jsx(Hn,{signedInUser:u,attachmentEndPoint:`${X}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:d,navigate:a,analytics:P,controllerUserDetails:r,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=qn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Qn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,d=c.some(m=>m.isRecommendedTransaction===!0),u=be(s.controllers),i=ke(s.controllerUserIds);t!=null&&P.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:d,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:i})},Zn=U.div`
1
+ import{j as l}from"./liveblocks-DZsElvdD.js";import{a as g}from"./sentry--Yuj1Jyq.js";import{j as M,u as q,l as J,g as S,k as G,h as Y,n as nt,o as B,N as K}from"./core-CrySabaB.js";import{eN as O,Jh as Ee,Ji as Ue,fP as ee,cp as be,cq as ke,uN as ft,Jj as st,uR as Yt,Hv as te,jr as ae,uL as qt,uF as Ht,Jk as Ne,ux as Wt,uw as Qt,uq as Zt,uC as Xt,uS as ea,Jl as pe,Jm as Me,uy as ta,Jn as he,eY as gt,v5 as vt,u_ as xt,Jo as Tt,nT as Ct,uV as yt,uT as Dt,Jp as It,vc as Et,v9 as bt,uW as kt,vb as Ge,FX as wt,Jq as aa,Jr as na,cs as sa,Js as oa,Jt as la,Ju as me,Jv as ce,Jw as we,Hw as $e,vr as ye,Hu as De,ve as At,uO as Ke,Jx as ia,Hx as W,Jy as ze,uI as ca,Jz as da,JA as ra,JB as Ye,JC as qe,JD as He,JE as We,vl as Ae,JF as jt,v2 as Ft,JG as ua,JH as pa,JI as ha,JJ as ma,JK as Sa,JL as fa,JM as ga,JN as va,si as xa,sj as Ta,GB as Fe,JO as Ca,JP as ya,iQ as Pe,bq as Da,JQ as Ia,JR as Ea,kp as ba,ky as ka,GA as _e,bC as ot,JS as Pt,Gg as _t,JT as wa,JU as Aa,JV as ja,kA as Fa,JW as lt,JX as it,JY as ct,JZ as dt,J_ as Pa,kw as _a,J$ as Va,kz as La,K0 as Oa,K1 as Vt,GX as Lt,jP as Ba,K2 as Ja,K3 as Ve,K4 as Ot,GV as Bt,xE as Ra,K5 as Ua,K6 as Na,k7 as Jt,K7 as Ma,K8 as Ga,H7 as $a,p_ as Ka,K9 as Rt,Ka as rt,H4 as Le,Kb as ut,Kc as za,H9 as Ya,Kd as qa,Ke as Ha,Kf as Wa,Kg as Qa,Kh as Za,q1 as Xa,Ki as en,Hy as tn,Kj as an,GO as Oe,gy as nn,Kk as sn,Kl as on,gw as ln,Km as cn,Kn as dn,xI as rn,Ko as un,Kp as pn,Kq as hn,Kr as mn,jT as Sn,bn as fn,eT as gn,eR as vn}from"./zeni-epic-state-B2i4I3MD.js";import{z as R,al as Be,B as Ut,y as Z,c as P,T as X,ar as xn,w as N,D as Ie,x as de,as as Qe,at as Tn,au as Cn,s as Ze,av as yn,h as Dn,K as re,E as Xe,p as ne,l as z,aw as In,k as et,N as Se,ax as En,ay as Nt,O as bn,az as kn,j as wn,aA as An,ao as Mt,aB as jn,o as Q,C as Fn,H as Gt,J as Pn,aC as _n,aD as Vn,f as tt,aE as Ln,aF as On,r as Bn,aG as Jn,aH as Rn}from"./index-CcFsRa7B.js";import{n as U,D as Un,S as $t}from"./mui-CZEnMS79.js";import{t as Nn,A as Mn}from"./AddressScreen-D33d6mlP.js";import ie from"./NotFoundScreen-DHf1NG7A.js";import{F as Gn}from"./FeaturePreviewScreen-D1hHI8kK.js";import{b as H,v as at,c as $n}from"./routePaths-D6EDB2Yc.js";import{p as Kt}from"./pathToGoBack-R9qGiBS5.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-CpK46S_s.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-DpNVr89y.js";import{M as ve}from"./MobileAppDrawer-51OTOFDc.js";import{D as Kn}from"./DrawerScreen-BOmDNrND.js";import{g as zn,m as Yn}from"./accountMappingHelper-I87iZbOB.js";import"./recharts-BHXPSy2L.js";import"./analytics-DYCAui-I.js";import"./plaid-B6RZTGXN.js";import"./dnd-CV1KjQXU.js";import"./stripe-DMRn4zHo.js";import"./lottie-_mjnLDz5.js";import"./lexical-Be88TDK-.js";import"./pdf-EBByNZKe.js";import"./utils-CzY-S_Ct.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]="77345bd0-8d90-45b2-aa02-586156498163",e._sentryDebugIdIdentifier="sentry-dbid-77345bd0-8d90-45b2-aa02-586156498163")}catch{}})();const qn=Ie.getLocalizedStrings(),Hn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(st({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(st({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${H(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(ft(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(xn),Wn=({setShouldNavigateBack:e})=>{const a=M(),s=q(),{scheduleDetailId:t,tenantEmailDomain:n}=J(),{scheduleType:o}=J();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>O(f)),d=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,d)),m=i.selectedJELinkRowIndex,r=S(f=>ee(f,c.companyId)),p=Be(i.updateStatus.fetchState);g.useEffect(()=>{p==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[p,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const h=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[h===!0?l.jsx(Z,{analytics:P,onLoad:()=>{Qn(i,d,r)}}):null,l.jsx(Hn,{signedInUser:u,attachmentEndPoint:`${X}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:d,navigate:a,analytics:P,controllerUserDetails:r,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=qn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Qn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,d=c.some(m=>m.isRecommendedTransaction===!0),u=be(s.controllers),i=ke(s.controllerUserIds);t!=null&&P.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:d,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:i})},Zn=U.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -0,0 +1,12 @@
1
+ import{j as o}from"./liveblocks-DZsElvdD.js";import{a as d}from"./sentry--Yuj1Jyq.js";import{q as u,h,g as y,N as I}from"./core-CrySabaB.js";import{IE as b,eO as w,yZ as x}from"./zeni-epic-state-B2i4I3MD.js";import{z as l,B as j,H as S,J as E}from"./index-CcFsRa7B.js";import{n as g}from"./mui-CZEnMS79.js";import"./recharts-BHXPSy2L.js";import"./analytics-DYCAui-I.js";import"./plaid-B6RZTGXN.js";import"./dnd-CV1KjQXU.js";import"./stripe-DMRn4zHo.js";import"./lottie-_mjnLDz5.js";import"./lexical-Be88TDK-.js";import"./pdf-EBByNZKe.js";import"./utils-CzY-S_Ct.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]="d4358ec8-6848-4f51-93ff-8d709fbf63af",e._sentryDebugIdIdentifier="sentry-dbid-d4358ec8-6848-4f51-93ff-8d709fbf63af")}catch{}})();const R=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,c]=d.useState(!1),a=h(),i=y(m=>b(m)),r=l.getSignedInUser(),f=l.getSignedInUserTenantWithId(s);if(r==null||f==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,f?.tenantId),d.useEffect(()=>{n||(c(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=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(E.LargeRegular)`
10
+ display: flex;
11
+ color: ${S.important};
12
+ `;export{R as default};
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-Bl3A2p2B.js";import{j as Z,u as W,h as _,l as H,g as k,k as Y,N as ne,n as $e,o as C}from"./core-kXknxXmM.js";import{eN as N,Nr as we,Ns as He,cO as te,cj as Ge,fb as Ze,wa as Ae,An as We,w4 as Fn,Nt as Rn,Nu as Un,w7 as Ln,we as Ce,w1 as zn,v_ as Mn,Me as pe,Nv as _n,DH as Nn,Jk as Vn,DJ as $n,k8 as Fe,Nw as Hn,pF as Ye,pt as Je,j$ as Ke,k2 as Re,Jl as Ue,Jm as Gn,Nx as Zn,k1 as Wn,ko as Yn,jS as Jn,ip as Kn,io as qn,Ny as Qn,Nz as xe,Do as Xn,NA as et,NB as nt,M7 as De,NC as Le,ND as tt,DU as at,MR as ot,Bh as qe,s6 as Qe,NE as st,DR as rt,NF as Xe,cK as Ie,DY as en,fc as it,eR as nn,eT as Se,DW as ct,Bb as lt,DO as dt,NG as tn,NH as an,Dq as on,DA as ze,NI as ut,Du as pt,NJ as mt,MG as ft,DZ as ht,bv as gt,bD as yt,cu as Ct,bE as xt,bs as kt,Il as wt}from"./zeni-epic-state-DMCSky0I.js";import{j as ae,a as $,z as A,l as B,h as L,B as oe,bO as At,R as be,K as V,C as J,r as sn,al as Dt,aa as Me,d as U,bP as It,ao as ve,bQ as St,y as me,bR as bt,g as Ee,aI as G,bS as vt,N as Et,M as rn,a7 as jt,bT as _e,bU as Pt,s as ee,bV as Tt,bW as Ot,bX as Bt,bY as Ft,a4 as Rt,o as Ut}from"./index-r7RBj2Zs.js";import{n as z,D as K,S as q}from"./mui-axh11eoI.js";import ue from"./NotFoundScreen-CAervBWG.js";import{S as Ne}from"./SetupPagesScreen-BYZmB6RQ.js";import{F as cn}from"./FeaturePreviewScreen--5hLyJ_2.js";import{a as d}from"./sentry-DDBUQl1l.js";import{M as fe}from"./MobileAppDrawer-DI2qJWFS.js";import{A as Lt,D as zt,V as Mt}from"./DomesticWireDetailScreen-DtMAxBfb.js";import{A as _t}from"./AddressScreen-Dli3WBSh.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-BZNd8NRL.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-DiJocIaN.js";import{Z as Nt}from"./ZeniAccountStatementScreen-CF-490Xr.js";import"./recharts-DUgaG0ww.js";import"./analytics-B5o5sheK.js";import"./plaid-BUPrZO5b.js";import"./dnd-D8v1Hu0d.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-MkWC6q.js";import"./lexical-DTfvcVgU.js";import"./pdf-VFwJrwPY.js";import"./utils-D61OcZ2U.js";import"./analyticsHelper-u-FHaHNW.js";import"./routePaths-CuMG5DGQ.js";import"./BusinessVerificationPageScreen-DKrw7o8b.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]="fc16e09e-f3a0-4dff-9011-cf478420949f",e._sentryDebugIdIdentifier="sentry-dbid-fc16e09e-f3a0-4dff-9011-cf478420949f")}catch{}})();const Vt=z.div`
1
+ import{j as n}from"./liveblocks-DZsElvdD.js";import{j as Z,u as W,h as _,l as H,g as k,k as Y,N as ne,n as $e,o as C}from"./core-CrySabaB.js";import{eN as N,Nr as we,Ns as He,cO as te,cj as Ge,fb as Ze,wa as Ae,An as We,w4 as Fn,Nt as Rn,Nu as Un,w7 as Ln,we as Ce,w1 as zn,v_ as Mn,Me as pe,Nv as _n,DH as Nn,Jk as Vn,DJ as $n,k8 as Fe,Nw as Hn,pF as Ye,pt as Je,j$ as Ke,k2 as Re,Jl as Ue,Jm as Gn,Nx as Zn,k1 as Wn,ko as Yn,jS as Jn,ip as Kn,io as qn,Ny as Qn,Nz as xe,Do as Xn,NA as et,NB as nt,M7 as De,NC as Le,ND as tt,DU as at,MR as ot,Bh as qe,s6 as Qe,NE as st,DR as rt,NF as Xe,cK as Ie,DY as en,fc as it,eR as nn,eT as Se,DW as ct,Bb as lt,DO as dt,NG as tn,NH as an,Dq as on,DA as ze,NI as ut,Du as pt,NJ as mt,MG as ht,DZ as gt,bv as ft,bD as yt,cu as Ct,bE as xt,bs as kt,Il as wt}from"./zeni-epic-state-B2i4I3MD.js";import{j as ae,p as $,z as A,l as B,h as L,B as oe,bO as At,T as be,K as V,E as J,s as sn,al as Dt,aa as Me,c as U,bP as It,ao as ve,bQ as St,y as me,bR as bt,f as Ee,aI as G,bS as vt,O as Et,N as rn,a7 as jt,bT as _e,bU as Pt,w as ee,bV as Tt,bW as Ot,bX as Bt,bY as Ft,a4 as Rt,o as Ut}from"./index-CcFsRa7B.js";import{n as z,D as K,S as q}from"./mui-CZEnMS79.js";import ue from"./NotFoundScreen-DHf1NG7A.js";import{S as Ne}from"./SetupPagesScreen-BRWFzqZr.js";import{F as cn}from"./FeaturePreviewScreen-D1hHI8kK.js";import{a as d}from"./sentry--Yuj1Jyq.js";import{M as he}from"./MobileAppDrawer-51OTOFDc.js";import{A as Lt,D as zt,V as Mt}from"./DomesticWireDetailScreen-D7x8itbF.js";import{A as _t}from"./AddressScreen-D33d6mlP.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-CpK46S_s.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-DpNVr89y.js";import{Z as Nt}from"./ZeniAccountStatementScreen-BQfXeeVB.js";import"./recharts-BHXPSy2L.js";import"./analytics-DYCAui-I.js";import"./plaid-B6RZTGXN.js";import"./dnd-CV1KjQXU.js";import"./stripe-DMRn4zHo.js";import"./lottie-_mjnLDz5.js";import"./lexical-Be88TDK-.js";import"./pdf-EBByNZKe.js";import"./utils-CzY-S_Ct.js";import"./analyticsHelper-CoCsLWxV.js";import"./routePaths-D6EDB2Yc.js";import"./BusinessVerificationPageScreen-BUfK35_-.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]="0ca884bd-e00a-49c5-97a4-01342dc31762",e._sentryDebugIdIdentifier="sentry-dbid-0ca884bd-e00a-49c5-97a4-01342dc31762")}catch{}})();const Vt=z.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as n}from"./liveblocks-Bl3A2p2B.js";import{j as Z,u as W,h as _,l as H,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,$t=Y(function(e){return{autoTransferRuleView:we(e),downloadAccountDetailEndPoint:`${be}/account_details`,transferLimit:5e5,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(Ae(a))},onCreateRule:()=>{e(Mn())},onUpdateRule:a=>{e(Ce(a))},onDeleteClick:a=>{e(zn(a))},onPauseClick:a=>{e(Ce(a,!0,!1))},onResumeClick:a=>{e(Ce(a,!1,!0))},onActivityClick:(a,r)=>{e(Ln(a,r))},onUpdateRuleLocalData:a=>{e(Un(a))},clearRuleLocalData:()=>{e(Rn())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Fn())}}})(At);function Ve({isEditDrawerOpen:e}){const t=Z(),s=W(),o=_(),a=ae(),{ruleId:r,tenantEmailDomain:l}=H(),{useFeatureGate:c}=$(),[u,f]=d.useState(!1),[x,i]=d.useState(!1),p=k(S=>N(S)),m=k(S=>we(S)),h=m?.fetchState??"Not-Started",v=k(S=>He(S)),y=p?.companyId??A.getSignedInUserTenant(l)?.companyId,w=te(a?.loggedInUserRoleMap)||Ge(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(B.isTreasuryEnabled),g=p?.company!=null&&Ze(p.company),D=I&&g,T=A.getSignedInUser(),M=p.tenantId,F={userId:T?.userId??"",sessionId:T?.zeniSessionId??"",tenantId:M??""};d.useEffect(()=>{!x&&h==="Not-Started"&&y&&(i(!0),o(Ae(!0)))},[x,h,y,o]);const E=S=>{f(S)},P=L(),O=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:P.colors.grey5}}):n.jsxs(Vt,{children:[n.jsx(fe,{isAppContentDrawerOpen:u,handleDrawerToggle:E}),n.jsx($t,{navigate:t,location:s,currentTenant:p,handleDrawerToggle:E,isEditDrawerOpen:e,editingRuleId:r,authParams:F,includeTreasuryOption:D,hasAdminLevelAccess:w,zeniAccountsConfigDetail:v,scrollToAddRule:O})]})}const Ht={overlayWidth:new J(100,100,58)},Gt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=_(),a=L(),r=V();if(A.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(pe())},anchor:"right",open:t,PaperProps:{style:{width:Ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Zt,{onClick:l=>l.stopPropagation(),children:n.jsx(Lt,{vendorIdParam:e,accountContext:"express-pay"})})})},Zt=z(q)`
9
+ `,$t=Y(function(e){return{autoTransferRuleView:we(e),downloadAccountDetailEndPoint:`${be}/account_details`,transferLimit:5e5,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(Ae(a))},onCreateRule:()=>{e(Mn())},onUpdateRule:a=>{e(Ce(a))},onDeleteClick:a=>{e(zn(a))},onPauseClick:a=>{e(Ce(a,!0,!1))},onResumeClick:a=>{e(Ce(a,!1,!0))},onActivityClick:(a,r)=>{e(Ln(a,r))},onUpdateRuleLocalData:a=>{e(Un(a))},clearRuleLocalData:()=>{e(Rn())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Fn())}}})(At);function Ve({isEditDrawerOpen:e}){const t=Z(),s=W(),o=_(),a=ae(),{ruleId:r,tenantEmailDomain:l}=H(),{useFeatureGate:c}=$(),[u,h]=d.useState(!1),[x,i]=d.useState(!1),p=k(S=>N(S)),m=k(S=>we(S)),g=m?.fetchState??"Not-Started",v=k(S=>He(S)),y=p?.companyId??A.getSignedInUserTenant(l)?.companyId,w=te(a?.loggedInUserRoleMap)||Ge(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(B.isTreasuryEnabled),f=p?.company!=null&&Ze(p.company),D=I&&f,T=A.getSignedInUser(),M=p.tenantId,F={userId:T?.userId??"",sessionId:T?.zeniSessionId??"",tenantId:M??""};d.useEffect(()=>{!x&&g==="Not-Started"&&y&&(i(!0),o(Ae(!0)))},[x,g,y,o]);const E=S=>{h(S)},P=L(),O=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:P.colors.grey5}}):n.jsxs(Vt,{children:[n.jsx(he,{isAppContentDrawerOpen:u,handleDrawerToggle:E}),n.jsx($t,{navigate:t,location:s,currentTenant:p,handleDrawerToggle:E,isEditDrawerOpen:e,editingRuleId:r,authParams:F,includeTreasuryOption:D,hasAdminLevelAccess:w,zeniAccountsConfigDetail:v,scrollToAddRule:O})]})}const Ht={overlayWidth:new J(100,100,58)},Gt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=_(),a=L(),r=V();if(A.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(pe())},anchor:"right",open:t,PaperProps:{style:{width:Ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Zt,{onClick:l=>l.stopPropagation(),children:n.jsx(Lt,{vendorIdParam:e,accountContext:"express-pay"})})})},Zt=z(q)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
@@ -26,15 +26,15 @@ import{j as n}from"./liveblocks-Bl3A2p2B.js";import{j as Z,u as W,h as _,l as H,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${e=>e.theme.colors.grey4};
29
- `,ea=Y(function(e,t){const s=N(e),o=A.getSignedInUser(),a=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},l=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,u=Vn(e,"common");return{expressPayDetails:l,fileProps:{authParams:r,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:u},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(qn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Re({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(Kn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Jn(o,!1))},updateSelectedVendorForCreate:o=>{e(Yn(o))},initializeVendorAddress:()=>{e(Wn())},resetVendorSaveStatus:o=>{e(Zn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e(Gn({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Ue("common"))},onCancelAutoComplete:()=>{e(Ue("common"))}},chooseNewVendor:o=>{e(Re({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(Ke({files:o}))},onDeleteFile:o=>{e(Je(o))},onEditFileName:(o,a)=>{e(Ye(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Hn()),e(pe()),s("../",{relative:"path"})},onSchedulePayment:()=>{e($n())}}})(It);function le({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=Z(),a=W(),r=_(),[l,c]=d.useState(!1),{tenantEmailDomain:u}=H(),f=ae(),x=L(),i=k(j=>j.expressPayState.fetchState),p=k(j=>N(j)),m=k(j=>_n(j)),h=m.expressPayLocalData?.vendorId,v=p.companyId??A.getSignedInUserTenant(u)?.companyId,[y,w]=d.useState(!1),[I,g]=d.useState(!1),[D,T]=d.useState(!1),M=sn(a.state?.pathnameStackToGoBack),{poppedPathname:F}=M,E=F?.split("/"),P=E?.[E.length-1];d.useEffect(()=>{e===!0?w(!0):(w(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{t===!0?g(!0):(g(!1),document.body.style.overflow="auto")},[t]),d.useEffect(()=>{s===!0?T(!0):(T(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{i==="Not-Started"&&r(Nn(!0,!0))},[i,r]);const O=Dt(m.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{O==="In-Progress"&&m.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&b()},[O,m.vendorViewDetails.bankAccountCreationState?.fetchState]),A.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=j=>{c(j)},b=()=>{w(!1),g(!1),o("../",{relative:"path"})};return m.fetchState==="Completed"?n.jsxs(Xt,{children:[Me(a)?n.jsx(fe,{isAppContentDrawerOpen:l,handleDrawerToggle:S}):null,y===!0?n.jsx(Gt,{vendorId:h,closeDrawerHandler:b,isDrawerOpen:y}):null,I===!0?n.jsx(qt,{vendorId:h,closeDrawerHandler:b,isDrawerOpen:I}):null,D===!0?n.jsx(Yt,{closeDrawerHandler:b,isDrawerOpen:D}):null,n.jsx(Mt,{vendorId:h,isExpressPayPage:!0}),n.jsx(ea,{navigate:o,location:a,companyId:v,accountId:P,analytics:U,currentTenant:p,vendorId:h,roleMap:f?.loggedInUserRoleMap,isSettings:Me(a),expressPayDetails:m,onClickMenuIcon:()=>{S(!0)}})]}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:x.colors.grey5}})}const na={overlayWidth:new J(100,100,58)},ta=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const r=L(),l=V(),c=k(i=>He(i)),u=k(i=>N(i));if(A.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const f=()=>{a(!0)},x={depositAccount:o,onDismissClick:f,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:u};return n.jsx(K,{anchor:"right",open:s,PaperProps:{style:{width:na.overlayWidth.valuePercentage(l),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>f(),children:n.jsx(aa,{onClick:i=>i.stopPropagation(),children:n.jsx(St,{...x})})})},aa=z(q)`
29
+ `,ea=Y(function(e,t){const s=N(e),o=A.getSignedInUser(),a=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},l=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,u=Vn(e,"common");return{expressPayDetails:l,fileProps:{authParams:r,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:u},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(qn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Re({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(Kn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Jn(o,!1))},updateSelectedVendorForCreate:o=>{e(Yn(o))},initializeVendorAddress:()=>{e(Wn())},resetVendorSaveStatus:o=>{e(Zn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e(Gn({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Ue("common"))},onCancelAutoComplete:()=>{e(Ue("common"))}},chooseNewVendor:o=>{e(Re({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(Ke({files:o}))},onDeleteFile:o=>{e(Je(o))},onEditFileName:(o,a)=>{e(Ye(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Hn()),e(pe()),s("../",{relative:"path"})},onSchedulePayment:()=>{e($n())}}})(It);function le({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=Z(),a=W(),r=_(),[l,c]=d.useState(!1),{tenantEmailDomain:u}=H(),h=ae(),x=L(),i=k(j=>j.expressPayState.fetchState),p=k(j=>N(j)),m=k(j=>_n(j)),g=m.expressPayLocalData?.vendorId,v=p.companyId??A.getSignedInUserTenant(u)?.companyId,[y,w]=d.useState(!1),[I,f]=d.useState(!1),[D,T]=d.useState(!1),M=sn(a.state?.pathnameStackToGoBack),{poppedPathname:F}=M,E=F?.split("/"),P=E?.[E.length-1];d.useEffect(()=>{e===!0?w(!0):(w(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{t===!0?f(!0):(f(!1),document.body.style.overflow="auto")},[t]),d.useEffect(()=>{s===!0?T(!0):(T(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{i==="Not-Started"&&r(Nn(!0,!0))},[i,r]);const O=Dt(m.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{O==="In-Progress"&&m.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&b()},[O,m.vendorViewDetails.bankAccountCreationState?.fetchState]),A.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=j=>{c(j)},b=()=>{w(!1),f(!1),o("../",{relative:"path"})};return m.fetchState==="Completed"?n.jsxs(Xt,{children:[Me(a)?n.jsx(he,{isAppContentDrawerOpen:l,handleDrawerToggle:S}):null,y===!0?n.jsx(Gt,{vendorId:g,closeDrawerHandler:b,isDrawerOpen:y}):null,I===!0?n.jsx(qt,{vendorId:g,closeDrawerHandler:b,isDrawerOpen:I}):null,D===!0?n.jsx(Yt,{closeDrawerHandler:b,isDrawerOpen:D}):null,n.jsx(Mt,{vendorId:g,isExpressPayPage:!0}),n.jsx(ea,{navigate:o,location:a,companyId:v,accountId:P,analytics:U,currentTenant:p,vendorId:g,roleMap:h?.loggedInUserRoleMap,isSettings:Me(a),expressPayDetails:m,onClickMenuIcon:()=>{S(!0)}})]}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:x.colors.grey5}})}const na={overlayWidth:new J(100,100,58)},ta=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const r=L(),l=V(),c=k(i=>He(i)),u=k(i=>N(i));if(A.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{a(!0)},x={depositAccount:o,onDismissClick:h,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:u};return n.jsx(K,{anchor:"right",open:s,PaperProps:{style:{width:na.overlayWidth.valuePercentage(l),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:n.jsx(aa,{onClick:i=>i.stopPropagation(),children:n.jsx(St,{...x})})})},aa=z(q)`
30
30
  display: flex;
31
31
  min-height: 100%;
32
32
  flex-direction: column;
33
- `,oa={overlayWidth:new J(100,100,58)},un=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=L(),o=V(),a=_(),r=k(i=>N(i)),l=A.getSignedInUser(),c=r.tenantId,u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:c??""};if(l==null)throw Error("Can't access check deposit page without signing in...");const f=k(i=>Qn(i)),x={analytics:U,checkDeposit:f,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`,authParams:u,onSaveChangesToLocalStore:i=>{a(et(i))},updateFilesEntity:i=>{a(Ke({files:i}))},onAnotherTransferClick:()=>{a(xe())},onDeleteFile:i=>{a(Je(i))},onEditFileName:(i,p)=>{a(Ye(i,p.split(".")[0]))},onCheckDpositClick:()=>{a(Xn())},onDismissClick:()=>{t(!0),a(xe())}};return n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:U,onLoad:i=>(p=>p.trackPageLoaded(Ee.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(K,{anchor:"right",open:e,PaperProps:{style:{width:oa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,p)=>(p==="backdropClick"||p==="escapeKeyDown")&&(t(!0),void a(xe())),children:n.jsx(sa,{onClick:i=>i.stopPropagation(),children:n.jsx(bt,{...x})})})]})},sa=z(q)`
33
+ `,oa={overlayWidth:new J(100,100,58)},un=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=L(),o=V(),a=_(),r=k(i=>N(i)),l=A.getSignedInUser(),c=r.tenantId,u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:c??""};if(l==null)throw Error("Can't access check deposit page without signing in...");const h=k(i=>Qn(i)),x={analytics:U,checkDeposit:h,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`,authParams:u,onSaveChangesToLocalStore:i=>{a(et(i))},updateFilesEntity:i=>{a(Ke({files:i}))},onAnotherTransferClick:()=>{a(xe())},onDeleteFile:i=>{a(Je(i))},onEditFileName:(i,p)=>{a(Ye(i,p.split(".")[0]))},onCheckDpositClick:()=>{a(Xn())},onDismissClick:()=>{t(!0),a(xe())}};return n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:U,onLoad:i=>(p=>p.trackPageLoaded(Ee.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(K,{anchor:"right",open:e,PaperProps:{style:{width:oa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,p)=>(p==="backdropClick"||p==="escapeKeyDown")&&(t(!0),void a(xe())),children:n.jsx(sa,{onClick:i=>i.stopPropagation(),children:n.jsx(bt,{...x})})})]})},sa=z(q)`
34
34
  display: flex;
35
35
  min-height: 100%;
36
36
  flex-direction: column;
37
- `,ra={overlayWidth:new J(100,100,58)},ia=Y(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:ot(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(rt()),clearReviewTransferDetail:()=>e(st()),onFetchLinkTokenClick:s=>{e(Qe("external_account",s))},onEstablishConnectionClick:s=>{e(qe(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(vt),pn=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const r=k(g=>nt(g)),l=k(g=>N(g)),c=L(),u=V(),f=_(),{accountId:x}=H(),[i,p]=d.useState("achTransfer"),[m,h]=d.useState(!1);if(A.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:v}=$(),{configValue:y}=v(G.zeniAccountsConfig),w=De(y),I=()=>{o(!0),f(Le())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&h(!0)},[h,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:U,onLoad:g=>(D=>D.trackPageLoaded(Ee.Event.zeniAccountsTransferFormViewed))(g)}),n.jsx(K,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&I()},anchor:"right",open:e,PaperProps:{style:{width:ra.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(ca,{onClick:g=>g.stopPropagation(),children:n.jsx(ia,{analytics:U,transferDetails:r,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{U.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&a.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>a.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),f(at(x))},onDismissClick:I,onSaveChangesToLocalStore:g=>{f(tt(g))},onAnotherTransferClick:()=>{h(!1),f(Le())},currentTenant:l,zeniAccountsConfigDetail:a,currentDrawerContent:i,setCurrentDrawerContent:p,showReviewContent:m,setShowReviewContent:h,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},ca=z(q)`
37
+ `,ra={overlayWidth:new J(100,100,58)},ia=Y(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:ot(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(rt()),clearReviewTransferDetail:()=>e(st()),onFetchLinkTokenClick:s=>{e(Qe("external_account",s))},onEstablishConnectionClick:s=>{e(qe(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(vt),pn=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const r=k(f=>nt(f)),l=k(f=>N(f)),c=L(),u=V(),h=_(),{accountId:x}=H(),[i,p]=d.useState("achTransfer"),[m,g]=d.useState(!1);if(A.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:v}=$(),{configValue:y}=v(G.zeniAccountsConfig),w=De(y),I=()=>{o(!0),h(Le())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&g(!0)},[g,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:U,onLoad:f=>(D=>D.trackPageLoaded(Ee.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(K,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&I()},anchor:"right",open:e,PaperProps:{style:{width:ra.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(ca,{onClick:f=>f.stopPropagation(),children:n.jsx(ia,{analytics:U,transferDetails:r,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{U.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&a.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>a.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(at(x))},onDismissClick:I,onSaveChangesToLocalStore:f=>{h(tt(f))},onAnotherTransferClick:()=>{g(!1),h(Le())},currentTenant:l,zeniAccountsConfigDetail:a,currentDrawerContent:i,setCurrentDrawerContent:p,showReviewContent:m,setShowReviewContent:g,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},ca=z(q)`
38
38
  display: flex;
39
39
  min-height: 100%;
40
40
  flex-direction: column;
@@ -46,7 +46,7 @@ import{j as n}from"./liveblocks-Bl3A2p2B.js";import{j as Z,u as W,h as _,l as H,
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${e=>e.theme.colors.grey4};
49
- `,da=Y(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:r,handleDrawerToggle:l,analytics:c,isBillPayEnabled:u,isDebitCardFeatureEnabled:f}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,p)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",p,"active");const m=ua(x,i),h=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:h}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(i,p)=>{let m="page-not-found";i==="sendMoney"&&(m=gn(x)),i==="payBill"?m=mn(o,u,f):i==="transfer"?(m=fn(x),p!=null&&e(tn(p))):i==="checkDeposit"&&(m=hn(x));const h=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:h}})},unlinkPaymentAccount:(i,p)=>{c.trackAccountsListPageClicked("Unlink Account",p),e(dt(i))},onFetchLinkTokenClick:(i,p)=>{e(Qe("external_account",i,p))},onUpdatePaymentAccountStatus:(i,p,m)=>{e(lt(i,p,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(qe(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(ct(i))},onClickMenuIcon:()=>{l(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Pt);function ke({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=W(),o=Z(),a=_(),r=V(),{tenantEmailDomain:l}=H(),{useDynamicConfig:c,useFeatureGate:u}=$(),f=L(),{configValue:x}=c(G.zeniAccountsConfig),{isFeatureEnabled:i}=u(B.isTreasuryEnabled),{isFeatureEnabled:p}=u(B.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=u(B.isAutoTransferRuleEnabled),{isFeatureEnabled:h}=u(B.isCheckingCommentingEnabled),v=De(x),y=k(R=>N(R)),w=y.companyId??A.getSignedInUserTenant(l)?.companyId,{configValue:I}=c(G.expressPayConfig),g=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(y.tenantId),[D,T]=d.useState(!1),[M,F]=d.useState(!1),[E,P]=d.useState(!1),[O,S]=d.useState(!1),b=k(R=>Xe(R)),j=b.fetchState,se=k(R=>we(R)),re=se?.fetchState??"Not-Started",he=!!y.companyZeniAccountInfo?.info?.isZeniAccountEnabled,ie=ae(),ce=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,Q=!!y.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,X=te(ie?.loggedInUserRoleMap),yn=Ie(ie?.loggedInUserRoleMap),Cn=!!y.companyBillPayInfo?.info?.isBillPayEnabled,je=A.getSignedInUser(),xn={userId:je?.userId??"",sessionId:je?.zeniSessionId??"",tenantId:y.tenantId??""},kn=`${be}/account_details`,{areTenantIdsInSync:Pe}=Et();d.useEffect(()=>{!D&&Pe&&(T(!0),a(en(!1)))},[D,a,j,Pe]),d.useEffect(()=>{!M&&re==="Not-Started"&&w&&(F(!0),a(Ae(!0)))},[M,re,w,a]),d.useEffect(()=>{e!=null&&e===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{S(t!=null&&t===!0)},[t]);const Te=()=>{P(!1),o("..")},[wn,An]=d.useState(!1),Oe=R=>{An(R)},{isAiCfoOpen:Dn,setIsAiCfoOpen:In}=rn(),{isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn}=ln({isAiCfoOpen:Dn,setIsAiCfoOpen:In,mobileExploreReferrer:"Checking Accounts"});dn({isDataReady:j==="Completed"});const vn=y.company!=null&&Ze(y.company),ge=(i&&vn)===!0&&!Q,[En,jn]=d.useState(!1),ye=k(R=>R.treasurySetupViewState.treasuryFundsDetails),Pn=ye.fundsDetails,Tn=jt(Pn);d.useEffect(()=>{ge!==!0||En||ye?.fetchStatus.fetchState!=="Not-Started"||(jn(!0),a(it()))},[ye.fetchStatus,a]);const On=nn(y),Bn=Se(p,y);return On===!0&&Bn!==!0?n.jsx(cn,{}):he?n.jsxs(n.Fragment,{children:[b.fetchState==="Completed"&&E===!1&&O===!1?n.jsx(me,{analytics:U,onLoad:R=>(Be=>{Be.trackAccountsListPageViewed(b.depositAccountsSelectorView.depositAccounts.length,b.externalAccountsSelectorView.paymentAccounts.length,_e(b.summary?.totalBalance.available.amount??0),_e(b.summary?.totalInterest.available.amount??0),b.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),ge&&Be.trackTreasuryPromoView("Checking Promo Banner")})(R)}):null,E===!0?n.jsx(pn,{closeDrawerHandler:Te,isTransferDrawerOpen:E,zeniAccountsConfig:b.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:kn}):null,O===!0?n.jsx(un,{closeDrawerHandler:Te,isCheckDepositDrawerOpen:O}):null,n.jsxs(la,{windowSize:r,children:[n.jsx(fe,{isAppContentDrawerOpen:wn,handleDrawerToggle:Oe}),n.jsx(da,{zeniBankListView:b,navigate:o,currentTenant:y,location:s,companyId:w,analytics:U,maxInsuredAmount:v.maxInsuredAmount,isExpressPayEnabled:g,isBillPayEnabled:Cn,isCheckingCommentingEnabled:h,isDebitCardFeatureEnabled:p,isAutoTransferRuleEnabled:m,handleDrawerToggle:Oe,showTreasuryPromo:ge,treasuryYieldPercentage:Tn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn})]})]}):ce&&X?n.jsx(ne,{to:"../setup"}):y.companyZeniAccountInfo?.info&&!ce&&yn?n.jsx(ne,{to:"../promo",state:s.state}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const mn=(e,t,s)=>{const o=Se(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},ua=(e,t)=>`/${e}/checking/${t}`,fn=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,hn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,gn=e=>`/${e}/checking/express-pay`,pa=z.div`
49
+ `,da=Y(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:r,handleDrawerToggle:l,analytics:c,isBillPayEnabled:u,isDebitCardFeatureEnabled:h}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,p)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",p,"active");const m=ua(x,i),g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(i,p)=>{let m="page-not-found";i==="sendMoney"&&(m=fn(x)),i==="payBill"?m=mn(o,u,h):i==="transfer"?(m=hn(x),p!=null&&e(tn(p))):i==="checkDeposit"&&(m=gn(x));const g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},unlinkPaymentAccount:(i,p)=>{c.trackAccountsListPageClicked("Unlink Account",p),e(dt(i))},onFetchLinkTokenClick:(i,p)=>{e(Qe("external_account",i,p))},onUpdatePaymentAccountStatus:(i,p,m)=>{e(lt(i,p,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(qe(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(ct(i))},onClickMenuIcon:()=>{l(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Pt);function ke({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=W(),o=Z(),a=_(),r=V(),{tenantEmailDomain:l}=H(),{useDynamicConfig:c,useFeatureGate:u}=$(),h=L(),{configValue:x}=c(G.zeniAccountsConfig),{isFeatureEnabled:i}=u(B.isTreasuryEnabled),{isFeatureEnabled:p}=u(B.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=u(B.isAutoTransferRuleEnabled),{isFeatureEnabled:g}=u(B.isCheckingCommentingEnabled),v=De(x),y=k(R=>N(R)),w=y.companyId??A.getSignedInUserTenant(l)?.companyId,{configValue:I}=c(G.expressPayConfig),f=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(y.tenantId),[D,T]=d.useState(!1),[M,F]=d.useState(!1),[E,P]=d.useState(!1),[O,S]=d.useState(!1),b=k(R=>Xe(R)),j=b.fetchState,se=k(R=>we(R)),re=se?.fetchState??"Not-Started",ge=!!y.companyZeniAccountInfo?.info?.isZeniAccountEnabled,ie=ae(),ce=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,Q=!!y.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,X=te(ie?.loggedInUserRoleMap),yn=Ie(ie?.loggedInUserRoleMap),Cn=!!y.companyBillPayInfo?.info?.isBillPayEnabled,je=A.getSignedInUser(),xn={userId:je?.userId??"",sessionId:je?.zeniSessionId??"",tenantId:y.tenantId??""},kn=`${be}/account_details`,{areTenantIdsInSync:Pe}=Et();d.useEffect(()=>{!D&&Pe&&(T(!0),a(en(!1)))},[D,a,j,Pe]),d.useEffect(()=>{!M&&re==="Not-Started"&&w&&(F(!0),a(Ae(!0)))},[M,re,w,a]),d.useEffect(()=>{e!=null&&e===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{S(t!=null&&t===!0)},[t]);const Te=()=>{P(!1),o("..")},[wn,An]=d.useState(!1),Oe=R=>{An(R)},{isAiCfoOpen:Dn,setIsAiCfoOpen:In}=rn(),{isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn}=ln({isAiCfoOpen:Dn,setIsAiCfoOpen:In,mobileExploreReferrer:"Checking Accounts"});dn({isDataReady:j==="Completed"});const vn=y.company!=null&&Ze(y.company),fe=(i&&vn)===!0&&!Q,[En,jn]=d.useState(!1),ye=k(R=>R.treasurySetupViewState.treasuryFundsDetails),Pn=ye.fundsDetails,Tn=jt(Pn);d.useEffect(()=>{fe!==!0||En||ye?.fetchStatus.fetchState!=="Not-Started"||(jn(!0),a(it()))},[ye.fetchStatus,a]);const On=nn(y),Bn=Se(p,y);return On===!0&&Bn!==!0?n.jsx(cn,{}):ge?n.jsxs(n.Fragment,{children:[b.fetchState==="Completed"&&E===!1&&O===!1?n.jsx(me,{analytics:U,onLoad:R=>(Be=>{Be.trackAccountsListPageViewed(b.depositAccountsSelectorView.depositAccounts.length,b.externalAccountsSelectorView.paymentAccounts.length,_e(b.summary?.totalBalance.available.amount??0),_e(b.summary?.totalInterest.available.amount??0),b.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),fe&&Be.trackTreasuryPromoView("Checking Promo Banner")})(R)}):null,E===!0?n.jsx(pn,{closeDrawerHandler:Te,isTransferDrawerOpen:E,zeniAccountsConfig:b.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:kn}):null,O===!0?n.jsx(un,{closeDrawerHandler:Te,isCheckDepositDrawerOpen:O}):null,n.jsxs(la,{windowSize:r,children:[n.jsx(he,{isAppContentDrawerOpen:wn,handleDrawerToggle:Oe}),n.jsx(da,{zeniBankListView:b,navigate:o,currentTenant:y,location:s,companyId:w,analytics:U,maxInsuredAmount:v.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:Cn,isCheckingCommentingEnabled:g,isDebitCardFeatureEnabled:p,isAutoTransferRuleEnabled:m,handleDrawerToggle:Oe,showTreasuryPromo:fe,treasuryYieldPercentage:Tn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn})]})]}):ce&&X?n.jsx(ne,{to:"../setup"}):y.companyZeniAccountInfo?.info&&!ce&&yn?n.jsx(ne,{to:"../promo",state:s.state}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const mn=(e,t,s)=>{const o=Se(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},ua=(e,t)=>`/${e}/checking/${t}`,hn=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,gn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,fn=e=>`/${e}/checking/express-pay`,pa=z.div`
50
50
  display: flex;
51
51
  width: 100%;
52
52
  flex: 1 1 auto;
@@ -54,7 +54,7 @@ import{j as n}from"./liveblocks-Bl3A2p2B.js";import{j as Z,u as W,h as _,l as H,
54
54
  align-items: center;
55
55
  min-height: 100vh;
56
56
  background-color: ${e=>e.theme.colors.grey4};
57
- `,ma=Y(function(e,t){const{currentTenant:s}=t,o=an(e,t.accountId),a=A.getSignedInUser(),r=e.tenantState.currentTenantId,l={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:l,downloadEndPoint:`${ve.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:r}=t,{tenantEmailDomain:l}=o;return{handleMoveMoneyOptionSelection:(c,u)=>{let f="page-not-found";c==="sendMoney"?f=gn(l):c==="payBill"?f=mn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(f=fn(l,r),u!=null&&e(tn(u))):c==="checkDeposit"?(f=hn(l,r),u!=null&&e(ut(u))):c==="accountStatement"&&(f=ga(l,r));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(f,{state:{pathnameStackToGoBack:x}})},onViewAllTransactionClick:()=>{const c=ha(l,r),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onAccountDetailClick:()=>{const c=fa(l,r),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onEditNameClick:c=>{e(ze(r,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(on(r,!1))},onCloseAccountClick:()=>{e(ze(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(Tt);function de({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=W(),a=Z(),r=_(),l=V(),{tenantEmailDomain:c,accountId:u}=H(),{useDynamicConfig:f}=$(),{useFeatureGate:x}=$(),{isFeatureEnabled:i}=x(B.isDebitCardFeatureEnabled),{isFeatureEnabled:p}=x(B.isCheckingCommentingEnabled),m=k(X=>N(X)),{configValue:h}=f(G.expressPayConfig),v=h.is_enable_all_tenants===!0||h.tenant_ids!=null&&h.tenant_ids.includes(m.tenantId),y=!!m.companyBillPayInfo?.info?.isBillPayEnabled,w=A.getSignedInUser(),I=m.companyId??A.getSignedInUserTenant(c)?.companyId,g={userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:m.tenantId??""},D=`${be}/account_details`,[T,M]=d.useState(!1),[F,E]=d.useState(!1),[P,O]=d.useState(!1),[S,b]=d.useState(!1),j=k(X=>an(X,u??"")),se=j.fetchState,{isAiCfoOpen:re,setIsAiCfoOpen:he}=rn(),{isAiCfoAccessEnabled:ie,onAskAiCfoClick:ce}=ln({isAiCfoOpen:re,setIsAiCfoOpen:he,mobileExploreReferrer:"Checking Account Detail"});dn({isDataReady:se==="Completed"}),d.useEffect(()=>{T||(r(on(u??"",!1)),M(!0))},[T,r,se]),d.useEffect(()=>{b(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{O(t!=null&&t===!0)},[t]);const Q=()=>{b(!1),a("..")};return n.jsxs(n.Fragment,{children:[S===!0&&j.accountDetail!=null?n.jsx(ta,{authParams:g,downloadAccountDetailEndPoint:D,closeDrawerHandler:Q,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:j.accountDetail}):null,F===!0?n.jsx(pn,{closeDrawerHandler:Q,isTransferDrawerOpen:F,zeniAccountsConfig:j.zeniAccountsConfig,authParams:g,downloadAccountDetailEndPoint:D}):null,P===!0?n.jsx(un,{closeDrawerHandler:Q,isCheckDepositDrawerOpen:P}):null,n.jsx(pa,{windowSize:l,children:n.jsx(ma,{navigate:a,currentTenant:m,location:o,companyId:I,isDebitCardFeatureEnabled:i,accountId:u??"",isBillPayEnabled:y,isCheckingCommentingEnabled:p,isExpressPayEnabled:v,isAiCfoAccessEnabled:ie,onAskAiCfoClick:ce})})]})}const fa=(e,t)=>`/${e}/checking/${t}/account-info`,ha=(e,t)=>`/${e}/checking/${t}/transactions`,ga=(e,t)=>`/${e}/checking/${t}/statements`,ya=z.div`
57
+ `,ma=Y(function(e,t){const{currentTenant:s}=t,o=an(e,t.accountId),a=A.getSignedInUser(),r=e.tenantState.currentTenantId,l={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:l,downloadEndPoint:`${ve.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:r}=t,{tenantEmailDomain:l}=o;return{handleMoveMoneyOptionSelection:(c,u)=>{let h="page-not-found";c==="sendMoney"?h=fn(l):c==="payBill"?h=mn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(h=hn(l,r),u!=null&&e(tn(u))):c==="checkDeposit"?(h=gn(l,r),u!=null&&e(ut(u))):c==="accountStatement"&&(h=fa(l,r));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onViewAllTransactionClick:()=>{const c=ga(l,r),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onAccountDetailClick:()=>{const c=ha(l,r),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onEditNameClick:c=>{e(ze(r,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(on(r,!1))},onCloseAccountClick:()=>{e(ze(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(Tt);function de({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=W(),a=Z(),r=_(),l=V(),{tenantEmailDomain:c,accountId:u}=H(),{useDynamicConfig:h}=$(),{useFeatureGate:x}=$(),{isFeatureEnabled:i}=x(B.isDebitCardFeatureEnabled),{isFeatureEnabled:p}=x(B.isCheckingCommentingEnabled),m=k(X=>N(X)),{configValue:g}=h(G.expressPayConfig),v=g.is_enable_all_tenants===!0||g.tenant_ids!=null&&g.tenant_ids.includes(m.tenantId),y=!!m.companyBillPayInfo?.info?.isBillPayEnabled,w=A.getSignedInUser(),I=m.companyId??A.getSignedInUserTenant(c)?.companyId,f={userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:m.tenantId??""},D=`${be}/account_details`,[T,M]=d.useState(!1),[F,E]=d.useState(!1),[P,O]=d.useState(!1),[S,b]=d.useState(!1),j=k(X=>an(X,u??"")),se=j.fetchState,{isAiCfoOpen:re,setIsAiCfoOpen:ge}=rn(),{isAiCfoAccessEnabled:ie,onAskAiCfoClick:ce}=ln({isAiCfoOpen:re,setIsAiCfoOpen:ge,mobileExploreReferrer:"Checking Account Detail"});dn({isDataReady:se==="Completed"}),d.useEffect(()=>{T||(r(on(u??"",!1)),M(!0))},[T,r,se]),d.useEffect(()=>{b(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{O(t!=null&&t===!0)},[t]);const Q=()=>{b(!1),a("..")};return n.jsxs(n.Fragment,{children:[S===!0&&j.accountDetail!=null?n.jsx(ta,{authParams:f,downloadAccountDetailEndPoint:D,closeDrawerHandler:Q,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:j.accountDetail}):null,F===!0?n.jsx(pn,{closeDrawerHandler:Q,isTransferDrawerOpen:F,zeniAccountsConfig:j.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:D}):null,P===!0?n.jsx(un,{closeDrawerHandler:Q,isCheckDepositDrawerOpen:P}):null,n.jsx(pa,{windowSize:l,children:n.jsx(ma,{navigate:a,currentTenant:m,location:o,companyId:I,isDebitCardFeatureEnabled:i,accountId:u??"",isBillPayEnabled:y,isCheckingCommentingEnabled:p,isExpressPayEnabled:v,isAiCfoAccessEnabled:ie,onAskAiCfoClick:ce})})]})}const ha=(e,t)=>`/${e}/checking/${t}/account-info`,ga=(e,t)=>`/${e}/checking/${t}/transactions`,fa=(e,t)=>`/${e}/checking/${t}/statements`,ya=z.div`
58
58
  display: flex;
59
59
  height: 100vh;
60
60
  width: 100%;
@@ -63,4 +63,4 @@ import{j as n}from"./liveblocks-Bl3A2p2B.js";import{j as Z,u as W,h as _,l as H,
63
63
  overflow: auto;
64
64
  align-items: center;
65
65
  background-color: ${e=>e.theme.colors.grey4};
66
- `;function Ca(){const e=Z(),t=_(),s=V(),{accountId:o}=H(),{useFeatureGate:a}=$(),{isFeatureEnabled:r}=a(B.isCheckingCommentingEnabled),[l,c]=d.useState(!1);d.useEffect(()=>{l||(c(!0),t(pt(o??"",!1)))},[l,t]);const u=k(f=>mt(f,o??""));if(A.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ya,{windowSize:s,children:n.jsx(Ot,{transactionListView:u,depositAccountId:o??"",isCheckingCommentingEnabled:r,onBackClick:()=>{e("../")}})})}const xa=Y(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:ft(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{U.trackAccountsPromoPageClicked("Setup Accounts"),e(ht(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Ft),ka=()=>{const e=Z(),t=W(),{tenantEmailDomain:s}=H(),{useDynamicConfig:o}=$(),a=L(),[r,l]=d.useState(!1),[c,u]=d.useState(!1),f=k(g=>N(g)),{configValue:x}=o(G.zeniAccountsConfig),i=De(x);d.useEffect(()=>{c===!1&&t.state?.message==="activation"&&u(!0)},[t.state]);const p=A.getSignedInUserTenant(s)?.companyId??f.companyId,m=A.getSignedInUser(),h=!!f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,v=g=>{l(g)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const y=ae(),w=te(y?.loggedInUserRoleMap),I=Ie(y?.loggedInUserRoleMap);if(h&&w)return n.jsx(ne,{to:"../../checking/setup"});if(f.company?.companyZeniAccountInfo&&(!h&&w||I)){if(t.state?.message==="activation"){const g=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Bt,{showConfetti:c}),n.jsx(me,{analytics:U,onLoad:g=>(D=>D.trackPageLoaded(Ee.Event.accountsPromoPageViewed))(g)}),n.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:v}),n.jsx(xa,{analytics:U,navigate:e,companyId:p,onClickMenuIcon:()=>{v(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Ja(){const e=W(),t=k(S=>N(S)),s=L(),{useFeatureGate:o,useDynamicConfig:a}=$(),r=ae(),l=te(r?.loggedInUserRoleMap),c=Ie(r?.loggedInUserRoleMap),u=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,f=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(B.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(B.isDebitCardFeatureEnabled),p=nn(t),m=Se(i,t),h=t?.userRole!=null&&gt(t?.userRole),v=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h)&&yt(r?.loggedInUserRoleMap),y=Ct(r?.loggedInUserRoleMap),w=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!h)&&xt(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(B.isDepositAccountsFeatureEnabled),g=I&&!h,{configValue:D}=a(G.expressPayConfig),T=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(t.tenantId),{isFeatureEnabled:M}=o(B.isAutoTransferRuleEnabled),F=Rt(t,x,i)&&!h&&kt(r?.loggedInUserRoleMap),E=wt(r?.loggedInUserRoleMap),P=g&&te(r?.loggedInUserRoleMap),O=P||Ge(r?.loggedInUserRoleMap);return n.jsxs($e,{children:[n.jsx(C,{path:"setup",element:n.jsx(Ne,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"setup"})}),n.jsx(C,{path:"verification",element:n.jsx(Ne,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"verification"})}),M?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"auto-transfer",element:n.jsx(Ve,{})}),O?n.jsx(C,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Ve,{isEditDrawerOpen:!0})}):null]}):n.jsx(C,{path:"auto-transfer",element:n.jsx(ue,{})}),T&&l?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"express-pay",element:n.jsx(le,{})}),n.jsx(C,{path:"express-pay/add-ach",element:n.jsx(le,{isAddACHDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire/add-address",element:n.jsx(le,{isAddAddressDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire",element:n.jsx(le,{isAddWireDrawerOpen:!0})})]}):n.jsx(C,{path:"express-pay",element:n.jsx(ue,{})}),n.jsx(C,{path:"promo",element:n.jsx(ka,{})}),p&&!m?n.jsx(C,{path:"/*",element:n.jsx(cn,{})}):u?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"/",element:n.jsx(ke,{})}),n.jsx(C,{path:"transfer",element:n.jsx(ke,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(ke,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:":accountId/*",element:n.jsx(wa,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]}):f&&l?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../promo",state:e.state})}):n.jsx(C,{path:"*",element:n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Ut.sp1} ${s.colors.dropShadowNormal}`}})})]})}function wa(){return n.jsxs($e,{children:[n.jsx(C,{path:"/",element:n.jsx(de,{})}),n.jsx(C,{path:"account-info",element:n.jsx(de,{isAccountInfoDrawerOpen:!0})}),n.jsx(C,{path:"transfer",element:n.jsx(de,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(de,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:"transactions",element:n.jsx(Ca,{})}),n.jsx(C,{path:"statements",element:n.jsx(Nt,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]})}export{Ja as default};
66
+ `;function Ca(){const e=Z(),t=_(),s=V(),{accountId:o}=H(),{useFeatureGate:a}=$(),{isFeatureEnabled:r}=a(B.isCheckingCommentingEnabled),[l,c]=d.useState(!1);d.useEffect(()=>{l||(c(!0),t(pt(o??"",!1)))},[l,t]);const u=k(h=>mt(h,o??""));if(A.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ya,{windowSize:s,children:n.jsx(Ot,{transactionListView:u,depositAccountId:o??"",isCheckingCommentingEnabled:r,onBackClick:()=>{e("../")}})})}const xa=Y(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:ht(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{U.trackAccountsPromoPageClicked("Setup Accounts"),e(gt(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Ft),ka=()=>{const e=Z(),t=W(),{tenantEmailDomain:s}=H(),{useDynamicConfig:o}=$(),a=L(),[r,l]=d.useState(!1),[c,u]=d.useState(!1),h=k(f=>N(f)),{configValue:x}=o(G.zeniAccountsConfig),i=De(x);d.useEffect(()=>{c===!1&&t.state?.message==="activation"&&u(!0)},[t.state]);const p=A.getSignedInUserTenant(s)?.companyId??h.companyId,m=A.getSignedInUser(),g=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,v=f=>{l(f)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const y=ae(),w=te(y?.loggedInUserRoleMap),I=Ie(y?.loggedInUserRoleMap);if(g&&w)return n.jsx(ne,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!g&&w||I)){if(t.state?.message==="activation"){const f=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Bt,{showConfetti:c}),n.jsx(me,{analytics:U,onLoad:f=>(D=>D.trackPageLoaded(Ee.Event.accountsPromoPageViewed))(f)}),n.jsx(he,{isAppContentDrawerOpen:r,handleDrawerToggle:v}),n.jsx(xa,{analytics:U,navigate:e,companyId:p,onClickMenuIcon:()=>{v(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Ja(){const e=W(),t=k(S=>N(S)),s=L(),{useFeatureGate:o,useDynamicConfig:a}=$(),r=ae(),l=te(r?.loggedInUserRoleMap),c=Ie(r?.loggedInUserRoleMap),u=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(B.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(B.isDebitCardFeatureEnabled),p=nn(t),m=Se(i,t),g=t?.userRole!=null&&ft(t?.userRole),v=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!g)&&yt(r?.loggedInUserRoleMap),y=Ct(r?.loggedInUserRoleMap),w=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!g)&&xt(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(B.isDepositAccountsFeatureEnabled),f=I&&!g,{configValue:D}=a(G.expressPayConfig),T=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(t.tenantId),{isFeatureEnabled:M}=o(B.isAutoTransferRuleEnabled),F=Rt(t,x,i)&&!g&&kt(r?.loggedInUserRoleMap),E=wt(r?.loggedInUserRoleMap),P=f&&te(r?.loggedInUserRoleMap),O=P||Ge(r?.loggedInUserRoleMap);return n.jsxs($e,{children:[n.jsx(C,{path:"setup",element:n.jsx(Ne,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"setup"})}),n.jsx(C,{path:"verification",element:n.jsx(Ne,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"verification"})}),M?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"auto-transfer",element:n.jsx(Ve,{})}),O?n.jsx(C,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Ve,{isEditDrawerOpen:!0})}):null]}):n.jsx(C,{path:"auto-transfer",element:n.jsx(ue,{})}),T&&l?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"express-pay",element:n.jsx(le,{})}),n.jsx(C,{path:"express-pay/add-ach",element:n.jsx(le,{isAddACHDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire/add-address",element:n.jsx(le,{isAddAddressDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire",element:n.jsx(le,{isAddWireDrawerOpen:!0})})]}):n.jsx(C,{path:"express-pay",element:n.jsx(ue,{})}),n.jsx(C,{path:"promo",element:n.jsx(ka,{})}),p&&!m?n.jsx(C,{path:"/*",element:n.jsx(cn,{})}):u?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"/",element:n.jsx(ke,{})}),n.jsx(C,{path:"transfer",element:n.jsx(ke,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(ke,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:":accountId/*",element:n.jsx(wa,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]}):h&&l?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../promo",state:e.state})}):n.jsx(C,{path:"*",element:n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Ut.sp1} ${s.colors.dropShadowNormal}`}})})]})}function wa(){return n.jsxs($e,{children:[n.jsx(C,{path:"/",element:n.jsx(de,{})}),n.jsx(C,{path:"account-info",element:n.jsx(de,{isAccountInfoDrawerOpen:!0})}),n.jsx(C,{path:"transfer",element:n.jsx(de,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(de,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:"transactions",element:n.jsx(Ca,{})}),n.jsx(C,{path:"statements",element:n.jsx(Nt,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]})}export{Ja as default};
@@ -0,0 +1,9 @@
1
+ import{j as c}from"./liveblocks-DZsElvdD.js";import{a as u}from"./sentry--Yuj1Jyq.js";import{j as x,h as B,u as N,l as $,g as p}from"./core-CrySabaB.js";import{HE as s,HD as j,NK as v,eN as C,NL as D}from"./zeni-epic-state-B2i4I3MD.js";import{K as E,ao as g,h as L,z as T,B as z,bZ as P,s as U}from"./index-CcFsRa7B.js";import{n as _}from"./mui-CZEnMS79.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="afb5a217-3a08-4a90-b21b-0d6814f9e855",e._sentryDebugIdIdentifier="sentry-dbid-afb5a217-3a08-4a90-b21b-0d6814f9e855")}catch{}})();const G=_.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `;function q(){const e=x(),n=B(),d=E(),l=N();let{accountId:a}=$(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,b]=u.useState(!1),h=L();u.useEffect(()=>{m||(b(!0),n(j(a??"",!1)))},[m,n]);const o=p(t=>v(t,a??"")),y=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=T.getSignedInUser(),i=p(t=>C(t)),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i.tenantId??""},w=D(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=i.company?.companyInfo.companyLegalName??i.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?c.jsx(z,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):c.jsx(G,{windowSize:d,children:c.jsx(P,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:y,authParams:I,downloadEndPoint:f})})}export{q as Z};
@@ -1 +1 @@
1
- import"./sentry-DDBUQl1l.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};
1
+ import"./sentry--Yuj1Jyq.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};