@zeniai/web-app-ui 5.1.0-qa → 5.1.1-qa

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 (132) hide show
  1. package/dist/assets/AddressRoutes-vmmj39bI.js +1 -0
  2. package/dist/assets/AddressScreen-BQg21lZo.js +9 -0
  3. package/dist/assets/{AiCfoScreen-CQa5ItH4.js → AiCfoScreen-CqTcdUXn.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-Xo_8VlLm.js → BillPayApprovalRoutes-Gh3ueCXk.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-BQfA_lqB.js → BillPayRoutes-Bld4vFpj.js} +34 -34
  6. package/dist/assets/BusinessVerificationPageScreen-M64Fwk0d.js +9 -0
  7. package/dist/assets/{ChargeCardRoutes-DoW53daX.js → ChargeCardRoutes-DoRL-nly.js} +9 -9
  8. package/dist/assets/{CompanyPassportScreen-B9iidOPX.js → CompanyPassportScreen-CxbTMbsr.js} +1 -1
  9. package/dist/assets/ConnectionAuthScreen-Dz0XW9Wu.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-DcY3AOg2.js +1 -0
  11. package/dist/assets/CustomerOnboardingRoutes-DL9j1OxA.js +23 -0
  12. package/dist/assets/{DashboardRoutes-3b-gPGbS.js → DashboardRoutes-DZKyjrVL.js} +4 -4
  13. package/dist/assets/DefaultTenantHome-BmdEPESz.js +1 -0
  14. package/dist/assets/DomesticWireDetailScreen-CXBhANZZ.js +18 -0
  15. package/dist/assets/DrawerScreen-cTSYZyox.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-vCUbVyen.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-B8qugNvv.js → ExpenseAutomationRoutes-kmtrCOwX.js} +4 -4
  18. package/dist/assets/{FeaturePreviewScreen-2sZbQFFY.js → FeaturePreviewScreen-CWfM9Jk8.js} +1 -1
  19. package/dist/assets/HubSpotOAuthCallbackScreen-Dj_EqIQq.js +1 -0
  20. package/dist/assets/{MagicLinkRoutes-s0DUJoUP.js → MagicLinkRoutes-OHP8OeWp.js} +8 -8
  21. package/dist/assets/MagicLinkSignInScreen-COoXHjdM.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-CauZkmKt.js → MobileAppDrawer-CwnQHoOA.js} +1 -1
  23. package/dist/assets/NotFoundScreen-DFiVy4ud.js +1 -0
  24. package/dist/assets/{NotificationRoutes-DI_YHIP-.js → NotificationRoutes-BTLoatnc.js} +1 -1
  25. package/dist/assets/OAuthConsentScreen-CSaKmuxP.js +1 -0
  26. package/dist/assets/PandLWithForecastRoutes-BXHUEwzw.js +1 -0
  27. package/dist/assets/PeopleRoutes-TuTQkk9P.js +22 -0
  28. package/dist/assets/PerformanceRoutes-DYwRzrMW.js +1 -0
  29. package/dist/assets/{Preview-BUAJ-eUg.js → Preview-D04eX301.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-6dxsH7JH.js → QBOConnectionScreen-DDRc2nV-.js} +1 -1
  31. package/dist/assets/ReferralListScreen-eEcWOgW6.js +5 -0
  32. package/dist/assets/ReimbursementApprovalRoutes-DBDyZtRD.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CFyyWLbh.js → ReimbursementApprovalRuleDetailScreen-CWmPt6s_.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-BnOHYcSE.js → ReimbursementRoutes-DuO-Vjlf.js} +9 -9
  35. package/dist/assets/ReportsRoutes-DLUfBV2v.js +1 -0
  36. package/dist/assets/RewardsRoutes-C4ynpaxR.js +1 -0
  37. package/dist/assets/ScreenRoutes-CuzOsRVm.js +2 -0
  38. package/dist/assets/SettingsRoutes-CmvJpojw.js +57 -0
  39. package/dist/assets/{SetupPagesScreen-DkLkXN5_.js → SetupPagesScreen-jXyXSrL3.js} +5 -5
  40. package/dist/assets/SignInScreen-DSXRJIAR.js +1 -0
  41. package/dist/assets/SignOutScreen-NXVWjKHp.js +9 -0
  42. package/dist/assets/TaskListScreen-BtohLKY9.js +9 -0
  43. package/dist/assets/TaskRoutes-DoNZFXYX.js +9 -0
  44. package/dist/assets/{TransactionDetailRoutes-B1Ta49zV.js → TransactionDetailRoutes-CYJ-HjfV.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-Djj-k-wD.js → TransactionDetailScreen-CQvhX2oI.js} +2 -2
  46. package/dist/assets/{TransactionListRoutes-tBOcWfFT.js → TransactionListRoutes-DpXVeJmK.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes--UiYfpy9.js → TreasuryRoutes-CqyCjepg.js} +6 -6
  48. package/dist/assets/{VendorsRoutes-GqxOjFUe.js → VendorsRoutes-Bee4w3Qp.js} +22 -22
  49. package/dist/assets/WiseConfirmationScreen-C8l07kSZ.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-D058Pk5-.js → ZeniAccountRoutes-ugpck20Y.js} +10 -10
  51. package/dist/assets/ZeniAccountStatementScreen-akUo_OOb.js +9 -0
  52. package/dist/assets/{accountMappingHelper-IfoJ8K2B.js → accountMappingHelper-VWhQY_6n.js} +1 -1
  53. package/dist/assets/{analytics-MTtjejam.js → analytics-DOcq8-16.js} +1 -1
  54. package/dist/assets/analyticsHelper-nCkiEXoR.js +1 -0
  55. package/dist/assets/{core-DmryIEGD.js → core-B2oeYHrf.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-Cx3PpYBp.js → decodeURIComponentSafe-Dvm7n442.js} +1 -1
  57. package/dist/assets/{dnd-DI8c9zzw.js → dnd-DwDc-Li-.js} +1 -1
  58. package/dist/assets/{empty-Bv8XHN5e.js → empty-B0kYKoxi.js} +1 -1
  59. package/dist/assets/{empty-eR4lOyh_.js → empty-KpwZq82W.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-Y9uuPxr4.js → emptyVideoElement-DOTARJXU.js} +1 -1
  61. package/dist/assets/epic-DyxHnK6P.js +2 -0
  62. package/dist/assets/getLocaleForTenant-Cpyq8Dm3.js +1 -0
  63. package/dist/assets/{index-DiGJqp65.js → index-D6oyO24Z.js} +1 -1
  64. package/dist/assets/{index-Ejf3WsgB.js → index-DC-3Qf7N.js} +1 -1
  65. package/dist/assets/{index-BZ6H7w2X.js → index-DPKilnME.js} +1 -1
  66. package/dist/assets/{index-Bf8tPSdT.js → index-Dy7ERgzH.js} +1 -1
  67. package/dist/assets/{index-BT-aHNaB.js → index-JrrW6r9c.js} +12905 -12901
  68. package/dist/assets/{index-_Og9WXez.js → index-YgDod2A-.js} +1 -1
  69. package/dist/assets/{index-DkmRO6RU.js → index-ZC7XuNNg.js} +1 -1
  70. package/dist/assets/{index-D3gmuRiT.js → index-z93nhubg.js} +2 -2
  71. package/dist/assets/{lexical-B_Q0gC_l.js → lexical-DGKnc7bI.js} +1 -1
  72. package/dist/assets/{liveblocks-B4A-86UW.js → liveblocks-Cy_MnPa_.js} +1 -1
  73. package/dist/assets/{lottie-Ciwq4FhY.js → lottie-B3tQ3uYn.js} +1 -1
  74. package/dist/assets/{mui-jLdveXE7.js → mui-DIYZNz3L.js} +1 -1
  75. package/dist/assets/{pathToGoBack-DpXjj7uO.js → pathToGoBack-B5mEVhcV.js} +1 -1
  76. package/dist/assets/{pdf-8aZteHiD.js → pdf-DZ9XIykO.js} +4 -4
  77. package/dist/assets/{pdf-lib-DKr08rus.js → pdf-lib-ZNHFXmuC.js} +1 -1
  78. package/dist/assets/{plaid-D05yz2vK.js → plaid-BK71q3Le.js} +1 -1
  79. package/dist/assets/{pusher-D46cBxSv.js → pusher-YcqIrHUJ.js} +1 -1
  80. package/dist/assets/{react-BYL3f5o7.js → react-1aspnaj-.js} +1 -1
  81. package/dist/assets/{react-CnYwpevi.js → react-BmeEPegG.js} +1 -1
  82. package/dist/assets/{react-DegWw8lA.js → react-CpmKRGOw.js} +1 -1
  83. package/dist/assets/{react-CeyAGyBf.js → react-DTOm-70P.js} +1 -1
  84. package/dist/assets/{react-CPyVuPPp.js → react-DbCoL3Zh.js} +1 -1
  85. package/dist/assets/{react-EJ2ViBa2.js → react-IflAavpX.js} +1 -1
  86. package/dist/assets/{recharts-CrT1dYsO.js → recharts-C6U_7_At.js} +1 -1
  87. package/dist/assets/{routePaths-BX47iVNr.js → routePaths-BR5HzSsy.js} +1 -1
  88. package/dist/assets/{sentry-Buhd1WxP.js → sentry-Blrslipw.js} +1 -1
  89. package/dist/assets/{url-BonQxxvl.js → url-ClS08een.js} +1 -1
  90. package/dist/assets/{url-Cdob9OiS.js → url-V9UydsVE.js} +1 -1
  91. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Bqmqvdpe.js → useAiCfoDashboardSuggestedQuestionsChips-DGH7GUIw.js} +1 -1
  92. package/dist/assets/useAskAiCfoHostNavButtonProps-DtxnHQxU.js +1 -0
  93. package/dist/assets/{useDeviceId-DgpZz8Zn.js → useDeviceId-DlAGyxDN.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-CaFTTJZC.js → useInitialThreadRequest-BIwgH4Ex.js} +1 -1
  95. package/dist/assets/{utils-DhsIWAcD.js → utils-D3pwfxQv.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-BL14oogN.js → withTransactionSidePanel-B3j3DcFZ.js} +2 -2
  97. package/dist/assets/{zeni-epic-state-D5Qz6xwn.js → zeni-epic-state-BREUit58.js} +5 -5
  98. package/dist/index.html +1 -1
  99. package/package.json +3 -3
  100. package/dist/assets/AddressRoutes-Bxv62Fya.js +0 -1
  101. package/dist/assets/AddressScreen-o2LN3Z9v.js +0 -9
  102. package/dist/assets/BusinessVerificationPageScreen-DuClzVqk.js +0 -9
  103. package/dist/assets/ConnectionAuthScreen-CHjlrX62.js +0 -11
  104. package/dist/assets/CustomerOnboardingAuthScreen-DBhERgST.js +0 -1
  105. package/dist/assets/CustomerOnboardingRoutes-Cc2k_NEK.js +0 -23
  106. package/dist/assets/DefaultTenantHome-BLHKU-bT.js +0 -1
  107. package/dist/assets/DomesticWireDetailScreen-vTZEg3ZE.js +0 -18
  108. package/dist/assets/DrawerScreen-BQ2cdf0D.js +0 -1
  109. package/dist/assets/EntityDetailRoutes-BQ7tM0E0.js +0 -1
  110. package/dist/assets/HubSpotOAuthCallbackScreen-CSnaWBFR.js +0 -1
  111. package/dist/assets/MagicLinkSignInScreen-B6O6fVJi.js +0 -12
  112. package/dist/assets/NotFoundScreen-D5okhi0Y.js +0 -1
  113. package/dist/assets/OAuthConsentScreen-Cd1spKZ0.js +0 -1
  114. package/dist/assets/PandLWithForecastRoutes-CNCn_yDk.js +0 -1
  115. package/dist/assets/PeopleRoutes-BiVTUcLf.js +0 -22
  116. package/dist/assets/PerformanceRoutes-C_rIxqR9.js +0 -1
  117. package/dist/assets/ReferralListScreen-DT8WPM6k.js +0 -5
  118. package/dist/assets/ReimbursementApprovalRoutes-CC0ht6MU.js +0 -1
  119. package/dist/assets/ReportsRoutes-D9-P8eSZ.js +0 -1
  120. package/dist/assets/RewardsRoutes-Vunu_NHe.js +0 -1
  121. package/dist/assets/ScreenRoutes-BSxyUBjJ.js +0 -2
  122. package/dist/assets/SettingsRoutes-Ca23-4JM.js +0 -57
  123. package/dist/assets/SignInScreen-BKSmBrzg.js +0 -1
  124. package/dist/assets/SignOutScreen-CXzWGPNw.js +0 -9
  125. package/dist/assets/TaskListScreen-D52_wjZm.js +0 -9
  126. package/dist/assets/TaskRoutes-BGnpLMQF.js +0 -9
  127. package/dist/assets/WiseConfirmationScreen-BRBPcnT1.js +0 -12
  128. package/dist/assets/ZeniAccountStatementScreen-B1HvrObv.js +0 -9
  129. package/dist/assets/analyticsHelper-B-NOtmgb.js +0 -1
  130. package/dist/assets/epic-DgFvBUIw.js +0 -2
  131. package/dist/assets/getLocaleForTenant-RIINHFf-.js +0 -1
  132. package/dist/assets/useAskAiCfoHostNavButtonProps-D2PBuxdE.js +0 -1
@@ -1,57 +0,0 @@
1
- import{j as a}from"./liveblocks-B4A-86UW.js";import{a as p}from"./sentry-Buhd1WxP.js";import{h as _,g as R,u as k,j as h,n as F,i as B,o as q,p as C}from"./core-DmryIEGD.js";import{bn as xe,eP as j,gK as de,Lr as Ee,py as Ae,jD as ue,lW as we,gM as je,Lt as Pe,Ls as ke,NS as ve,xL as De,Ce as Me,Nr as Ue,NA as _e,c2 as X,cH as Te,cI as Re,Jy as Fe,NT as Be,Jz as Oe,wb as Ve,NU as Ne,Eu as Le,BW as $e,BN as pe,BK as Ke,wf as ge,BQ as me,BT as fe,BZ as ee,sM as ne,we as ze,jf as Q,ji as he,NV as Je,kj as Ze,wu as Ge,Km as He,Kn as We,jd as qe,NW as Qe,jg as Ye,ra as Xe,NX as en,NY as nn,re as tn,gm as an,JH as se,gt as sn,JI as on,wr as cn,NZ as rn,N_ as ln,Cb as dn,eY as be,e_ as Se,N$ as un,fA as pn,JR as gn,wq as oe,fF as ie,fE as mn,wp as fn,fD as hn,fC as bn,O0 as Sn,f1 as ye,O1 as yn,O2 as In,wx as Cn,wo as ce,O3 as xn,fi as En,wl as An,bV as wn,c1 as jn,c0 as Pn,bW as kn,b_ as vn,bZ as Dn,bY as Mn,b$ as Un,bX as _n}from"./zeni-epic-state-D5Qz6xwn.js";import{$ as te,T as M,z as x,af as Ie,bI as Tn,c as K,e as Rn,k as O,s as ae,bJ as Fn,bK as Bn,aq as On,f as Ce,bL as Vn,bM as Nn,bN as Ln,a9 as $n,N as Kn,bO as zn,n as Jn,bP as Zn}from"./index-BT-aHNaB.js";import{n as U}from"./mui-jLdveXE7.js";import{M as v}from"./MobileAppDrawer-CauZkmKt.js";import{a as L,g as $,m as Gn}from"./accountMappingHelper-IfoJ8K2B.js";import{t as Hn,A as Wn}from"./AddressScreen-o2LN3Z9v.js";import T from"./NotFoundScreen-D5okhi0Y.js";import{g as qn}from"./analyticsHelper-B-NOtmgb.js";import{B as Qn}from"./BusinessVerificationPageScreen-DuClzVqk.js";import{C as Yn}from"./CompanyPassportScreen-B9iidOPX.js";import{q as re}from"./QBOConnectionScreen-6dxsH7JH.js";import{B as Xn}from"./BillPayApprovalRoutes-Xo_8VlLm.js";import{R as et}from"./ReimbursementApprovalRoutes-CC0ht6MU.js";import"./recharts-CrT1dYsO.js";import"./analytics-MTtjejam.js";import"./plaid-D05yz2vK.js";import"./dnd-DI8c9zzw.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ciwq4FhY.js";import"./lexical-B_Q0gC_l.js";import"./pdf-8aZteHiD.js";import"./utils-DhsIWAcD.js";import"./routePaths-BX47iVNr.js";import"./empty-Bv8XHN5e.js";import"./pdf-lib-DKr08rus.js";import"./index-DkmRO6RU.js";import"./url-BonQxxvl.js";import"./index-Ejf3WsgB.js";import"./decodeURIComponentSafe-Cx3PpYBp.js";import"./ReimbursementApprovalRuleDetailScreen-CFyyWLbh.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="cee502a4-434e-4d54-a0f4-b2dc436cfea6",e._sentryDebugIdIdentifier="sentry-dbid-cee502a4-434e-4d54-a0f4-b2dc436cfea6")}catch{}})();const nt=U.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,tt=F(function(e,s){return{accountMappingView:s.accountMappingView,isFiling1099FeatureEnabled:s.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:s.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:ue(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Ae(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(e,s){const{navigate:o,location:c,isFiling1099FeatureEnabled:i}=s;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:t,billsAccountSection:r,reimbursementsAccountSection:u,vendorsAccountSection:d,filing1099Section:g}=n,{incomeAccount:f,expenseAccount:m}=t,{billPayAccount:l}=r,{reimbursementsAccount:E}=u,{prepaidExpensesAccount:y,fixedAssetsAccount:w,accruedExpensesAccount:S}=d,{bankAccount:I,expenseCategory1099:V}=g,A=L(s.accountMappingView.incomeAccountList,f.selectedOption),z=L(s.accountMappingView.expenseAccountList,m.selectedOption),J=L(s.accountMappingView.billPayAccountList,l.selectedOption),Z=L(s.accountMappingView.reimbursementsAccountList,E.selectedOption),N=$(s.accountMappingView.prepaidExpensesAccountList,y.selectedOptions),b=$(s.accountMappingView.fixedAssetsAccountList,w.selectedOptions),D=$(s.accountMappingView.accruedExpensesAccountList,S.selectedOptions),G=$(s.accountMappingView.bankAccounts1099FilingAccountList,I.selectedOptions),H=Gn(s.accountMappingView.expenseAccounts1099FilingAccountList,V),W={selectedIncomeAccountId:A?.accountId,selectedExpenseAccountId:z?.accountId,selectedBillPayAccountId:J?.accountId,selectedReimbursementsAccountId:Z?.accountId,selectedPrepaidExpensesAccountIds:N.map(P=>P.accountId),selectedFixedAssetsAccountIds:b.map(P=>P.accountId),selectedAccruedExpensesAccountIds:D.map(P=>P.accountId),selectedBankAccounts1099FilingAccountIds:G.map(P=>P.accountId),selectedExpenseAccounts1099FilingAccountIds:H};e(ke({data:W}))},onBackClick:()=>{Ie(c)===!1?(o("../../dashboard"),e(Pe())):e(de())},onSaveClick:()=>{e(je()),i&&K.track(Rn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(we(s.currentTenant.companyId,n))}}})(Tn),at=()=>{const e=_(),s=R(),o=k(),{useFeatureGate:c}=te(),{isFeatureEnabled:i}=c(M.isFiling1099FeatureEnabled),{isFeatureEnabled:n}=c(M.isScheduledJEAccruedExpensesFeatureEnabled),t=x.getSignedInUser(),r=xe(t),u=h(y=>j(y)),[d,g]=p.useState(!1),[f,m]=p.useState(!1);p.useEffect(()=>{d===!1&&(o(de()),g(!0))},[d]);const l=h(y=>Ee(y)),E=y=>{m(y)};return a.jsxs(nt,{children:[a.jsx(v,{isAppContentDrawerOpen:f,handleDrawerToggle:E}),a.jsx(tt,{currentTenant:u,navigate:e,accountMappingView:l,isFiling1099FeatureEnabled:i&&r,isAccruedExpensesFeatureEnabled:n,location:s,isSettings:Ie(s),onClickMenuIcon:()=>E(!0)})]})},st=U.div`
10
- display: flex;
11
- height: 100%;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- `,ot=F(function(e,s){const o=j(e),c=Ue(e),i=_e(e),n=s.roleMap.bill_pay_admin;return{isDisabled:(X(o?.userRole??[])||n)&&"readonly",billpayApprovalView:c,remiApproverView:i,analytics:K}},function(e,s){const{navigate:o,currentTenant:c}=s;return{onSetupApprovalRulesBillPaySectionClick:()=>{o("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{o("reimbursements/approval-rules")},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}})(Fn),it=()=>{const e=_(),s=R(),o=k(),{tenantEmailDomain:c}=B(),[i,n]=p.useState(!1),[t,r]=p.useState(!1),[u,d]=p.useState(!1),g=h(S=>j(S)),f=h(S=>S.billPaySetupApproverViewState.fetchState),m=h(S=>S.remiSetupApproverViewState.fetchState),l=h(S=>ve(S)),E=g.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const y=O();p.useEffect(()=>{u||f!=="Not-Started"||(d(!0),o(De(!0)))},[u,f,o]),p.useEffect(()=>{t||m!=="Not-Started"||(r(!0),o(Me(!0)))},[t,m,o]);const w=S=>{n(S)};return y?.loggedInUserRoleMap!=null?a.jsxs(st,{children:[a.jsx(v,{isAppContentDrawerOpen:i,handleDrawerToggle:w}),a.jsx(ot,{navigate:e,location:s,companyId:E,currentTenant:g,roleMap:y.loggedInUserRoleMap,onClickMenuIcon:()=>{w(!0)}})]}):a.jsx(ae,{fetchState:l.fetchState})},ct=U.div`
18
- display: flex;
19
- height: 100%;
20
- width: 100%;
21
- flex: 1 1 auto;
22
- flex-direction: column;
23
- align-items: center;
24
- background-color: ${e=>e.theme.colors.grey4};
25
- `,rt=F(function(e,s){const{companyId:o,isZeniAccountEnabled:c,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:r}=s,u=j(e);return{bankSetupView:Ne(e,o,n,t,c,i,r),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:K}},function(e,s){const{navigate:o,currentTenant:c,companyId:i}=s;return{onFetchLinkTokenClick:(n,t,r)=>{e(ne(t,n,r))},onEstablishConnectionClick:(n,t,r)=>{e(ee(n,i,t,r))},onUpdatePaymentAccountStatus:(n,t,r,u,d)=>{e(fe(n,t,d,u,r))},onUpdatePaymentAccountLoginStatus:(n,t,r,u)=>{e(me(!1,n,u,r,t))},onEstablishConnectionSuccess:(n,t)=>{e(ge(t,n))},onUpdateAccountClick:(n,t,r,u,d)=>{e(d==="paymentAccount"?pe(n,t,r,u):Ke(u,n,t))},onUpdatePrimaryFundingAccount:(n,t,r)=>{e($e(i,t,n,r))},onRemoveConnection:n=>{e(Le(n))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}})(Bn),lt=()=>{const e=_(),s=R(),o=k(),{tenantEmailDomain:c}=B(),i=O(),[n,t]=p.useState(!1),[r,u]=p.useState(!1),d=h(I=>j(I)),g=h(I=>I.settingsViewState.bankConnection.fetchState),f=Te(d,i?.loggedInUserRoleMap),m=Re(d,i?.loggedInUserRoleMap),l=Fe(d,i?.loggedInUserRoleMap),E=Be(d,i?.loggedInUserRoleMap),y=Oe(d,i?.loggedInUserRoleMap),w=d.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");p.useEffect(()=>{r||g==="Completed"||(u(!0),o(Ve(!1)))},[r,o,g]);const S=I=>{t(I)};return f||l||m||y?a.jsxs(ct,{children:[a.jsx(v,{isAppContentDrawerOpen:n,handleDrawerToggle:S}),a.jsx(rt,{navigate:e,location:s,companyId:w,currentTenant:d,roleMap:i.loggedInUserRoleMap,isBillPayEnabled:f,isRemiEnabled:m,isZeniAccountEnabled:l,isChargeCardEnabled:y,isTreasuryEnabled:E,onClickMenuIcon:()=>{S(!0)}})]}):a.jsx(T,{})},dt=U.div`
26
- display: flex;
27
- height: 100%;
28
- width: 100%;
29
- flex: 1 1 auto;
30
- flex-direction: column;
31
- align-items: center;
32
- background-color: ${e=>e.theme.colors.grey4};
33
- `,ut=F(function(e,s){const{companyId:o}=s,c=j(e),i=s.roleMap.bill_pay_admin,n=Je(e,o),{uiState:t}=n,r=(X(c?.userRole??[])||i)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:t,stripeKey:Ce.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,analytics:K}},function(e,s){const{navigate:o,currentTenant:c,companyId:i}=s;return{onFetchLinkTokenClick:(n,t)=>{e(ne("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(ee(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ge("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,r)=>{e(fe(n,t,"billing","billing_setup",r))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(me(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(pe(n,t,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")},handleCreateCardSetupIntent:n=>{e(he(n))},handleConfirmCardSetupIntent:n=>{e(Ye(n))},updateCardPaymentModalState:n=>{e(Qe({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,r)=>{e(qe(n,t,r))},handleFetchPaymentSources:()=>{e(Q())},resetCardPaymentViewState:()=>{e(We())},handleResetCardPaymentErrorStatuses:()=>{e(He())},onBillingAddressSave:n=>{e(Ge(n))},onAddressEditHandler:n=>{if(n!=null){const t=Hn(n);e(Ze({addressType:"subscription_billing_address",addressToCreate:t}))}}}})(Vn),pt=()=>{const e=_(),s=R(),o=k(),{tenantEmailDomain:c}=B(),[i,n]=p.useState(!1),[t,r]=p.useState(!1),[u,d]=p.useState(!1),g=h(I=>j(I)),f=h(I=>I.cardPaymentViewState),m=h(I=>I.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=On(f.addCardPaymentSourceStatus.fetchState),E=f.addCardPaymentSourceStatus.fetchState,y=g.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const w=O();p.useEffect(()=>{y!=null&&o(ze(y,!1))},[y,o]),p.useEffect(()=>{t||(r(!0),o(Q()))},[t,o]),p.useEffect(()=>{u||(he(["card"]),d(!0))},[u]),p.useEffect(()=>{l==="In-Progress"&&E==="Completed"&&o(Q())},[l,E]);const S=I=>{n(I)};return w?.loggedInUserRoleMap!=null?a.jsxs(dt,{children:[a.jsx(v,{isAppContentDrawerOpen:i,handleDrawerToggle:S}),a.jsx(ut,{navigate:e,location:s,companyId:y,currentTenant:g,roleMap:w.loggedInUserRoleMap,onClickMenuIcon:()=>{S(!0)},googleAPIKey:Ce.googleMapsAPIKey})]}):a.jsx(ae,{fetchState:m})},Y="external_integrations",gt=F(function(e){const s=nn(e,Y);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(s.map(o=>o.additionalInfo).filter(o=>o!=null))}},function(e,s){const{navigate:o,integrationsView:c,signedInUserEmail:i,tenantEmailDomain:n,tenantId:t}=s;return{onBackClick:()=>{o("../")},onNavigateToDashboard:()=>{o("../dashboard")},onReconnectQBO:()=>{re.init("/connection/auth",n),re.handleClick()},onRefreshClick:()=>{c.integrations.refreshQBO.fetchState!=="In-Progress"&&e(cn())},onSaveChargeBeeCredentials:(r,u)=>{const d=c.externalConnections?.revenue?.find(g=>g.connectionName==="chargebee")?.connectionId;d!=null&&e(sn(t,d,se("revenue"),on("chargebee"),{api_key:r,site:u}))},onConnectHubSpot:(r,u)=>{const d=c.externalConnections?.revenue?.find(g=>g.connectionName==="hubspot")?.connectionId;if(d!=null){const g=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:r,client_secret:u,connection_id:d,redirect_uri:g,tenant_id:t}));const f="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(r)}&scope=${encodeURIComponent(f)}&redirect_uri=${encodeURIComponent(g)}`}},onDisconnect:(r,u)=>{e(an(t,r,se(u)))},onNotifyMe:r=>{e(tn(Y,r,i))}}})(Nn),mt=()=>{const e=_(),s=k(),{tenantEmailDomain:o}=B(),[c,i]=p.useState(!1),n=h(l=>l.tenantState.fetchState),t=h(l=>j(l)),r=t.companyId??x.getSignedInUserTenant(o)?.companyId,u=x.getSignedInUser(),d=O(),g=X(t.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");p.useEffect(()=>{s(Xe(Y))},[s]);const f=l=>{i(l)},m=h(l=>en(l,r));return d?.loggedInUserRoleMap!=null?a.jsxs(ft,{children:[a.jsx(v,{isAppContentDrawerOpen:c,handleDrawerToggle:f}),a.jsx(gt,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:g,integrationsView:m,signedInUserEmail:u.userEmail??"",tenantEmailDomain:t.tenantEmailDomain??o??"",tenantId:t.tenantId,saveChargeBeeState:m.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:m.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:m.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:m.externalConnections?.saveOAuthConnectionError?.message,deleteConnectionState:m.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:m.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress"})]}):a.jsx(ae,{fetchState:n})},ft=U.div`
34
- display: flex;
35
- height: 100%;
36
- width: 100%;
37
- flex: 1 1 auto;
38
- flex-direction: column;
39
- align-items: center;
40
- background-color: ${e=>e.theme.colors.grey4};
41
- `,ht=U.div`
42
- display: flex;
43
- height: 100%;
44
- width: 100%;
45
- flex: 1 1 auto;
46
- flex-direction: column;
47
- align-items: center;
48
- background-color: ${e=>e.theme.colors.grey4};
49
- `,bt=()=>{const e=k(),{tenantEmailDomain:s}=B(),[o,c]=p.useState(!1),i=h(l=>j(l)).companyId??x.getSignedInUserTenant(s)?.companyId,n=x.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=h(l=>rn(l,n.userId)),r=h(l=>ln(l,i,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=r,d=l=>{c(l)},g=p.useCallback(l=>{e(ne("user_reimbursement_account",l))},[]),f=p.useCallback(l=>{e(ee(l,i,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);p.useEffect(()=>{t.fetchState!=="Completed"&&t.fetchState!=="In-Progress"&&e(dn(n.userId))},[n.userId,t.fetchState]);const m=t.fetchState==="Not-Started"||t.fetchState==="In-Progress";return a.jsxs(ht,{children:[a.jsx(v,{isAppContentDrawerOpen:o,handleDrawerToggle:d}),a.jsx(Ln,{plaidConnectionDetails:u,isLoading:m,myBankConnectionsView:t,onFetchLinkTokenClick:g,onEstablishConnectionClick:f,onClickMenuIcon:()=>{d(!0)}})]})},St=U.div`
50
- display: flex;
51
- height: 100%;
52
- width: 100%;
53
- flex: 1 1 auto;
54
- flex-direction: column;
55
- align-items: center;
56
- background-color: ${e=>e.theme.colors.grey4};
57
- `,le=({appContent:e})=>{const s=k(),o=_(),c=R(),[i,n]=p.useState(!1),t=h(b=>j(b)),{tenantEmailDomain:r}=t,u=t.companyId??x.getSignedInUserTenant(r)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=te(),{isFeatureEnabled:g}=d(M.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=d(M.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=d(M.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(M.isTreasuryEnabled),E=h(b=>ue(b)),y=be(t),w=Se(m,t),S=!w&&E,I=$n(t,f,m),{areTenantIdsInSync:V}=Kn();p.useEffect(()=>{V&&s(un(u,S))},[u,s,S,V]);const A=h(b=>pn(b,S)),z=A.fetchState==="Not-Started"||A.fetchState==="In-Progress"||u==null,J=gn(t),Z=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,N=b=>{n(b)};return a.jsxs(St,{children:[a.jsx(v,{isAppContentDrawerOpen:i,handleDrawerToggle:N}),e!=null?a.jsx(a.Fragment,{children:e}):a.jsx(zn,{myProfileView:A,isAccountingClassesEnabled:E,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:g===!1,isChargeCardDisabled:I===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:J===!1,onClickMenuIcon:()=>{N(!0)},isLoading:z,isBankingOnlyTenant:w,isCardsOnlyTenant:y,onAddressClick:b=>{const D=function(H,W){let P=`/${H}/settings/my_profile`;return P=P.concat(`/new/${W}`),P}(r,b),G=Jn(c.state?.pathnameStackToGoBack,c.pathname);o(D,{state:{pathnameStackToGoBack:G}})},onGetOtp:b=>{const D={...A.myProfileLocalData,phone:b};s(oe({localData:D})),s(bn(b,"MyProfile"))},onResendOtp:b=>{s(hn(b,"MyProfile"))},onCancelClick:()=>{s(fn())},onSaveClick:()=>{s(ie("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},onVerifyOtp:(b,D)=>{s(mn(b,D,"MyProfile"))},onVerifyOtpSuccess:b=>{b!=null&&x.saveZeniOtpToken(b),s(ie("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},updateMyProfileLocalData:b=>{s(oe({localData:b}))}})]})};function yt(){const e=k(),s=h(l=>j(l)).companyId,o=h(l=>Sn(l)),c=h(l=>ye(l)),i=x.getSignedInUser(),[n,t]=p.useState(!1),r=p.useCallback(l=>{t(l)},[]),u=p.useCallback(l=>{e(yn(l))},[]),d=p.useCallback(()=>{i?.userEmail!=null&&e(In({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),g=p.useCallback(()=>{e(Cn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const f=p.useCallback(()=>{const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ce(l,s))},[s,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),m=p.useCallback(()=>{e(xn())},[]);return p.useEffect(()=>{if(c.fetchState==="Completed"&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"){const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ce(l,s))}},[o.fetchState,s,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),a.jsxs(a.Fragment,{children:[a.jsx(v,{isAppContentDrawerOpen:n,handleDrawerToggle:r}),a.jsx(Zn,{notificationSettingsView:o,onFormDataChange:u,onCancel:d,onSave:g,onClickMenuIcon:()=>{r(!0)},signedInUser:i,onRefresh:f,resetUpdateStatus:m})]})}function ea(e){const[s,o]=p.useState(!1),c=h(l=>ye(l)),i=h(l=>j(l)),n=O(),t=x.getSignedInUser(),r=k(),{useFeatureGate:u}=te(),{isFeatureEnabled:d}=u(M.isDebitCardFeatureEnabled),g=t?.userEmail==null||c.fetchState!=="Completed"||En(c.notificationSettings,t.userEmail,d,i);p.useEffect(()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&s===!1&&(o(!0),r(An()))},[c.fetchState,s]);const f=Se(d,i),m=be(i);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||g!==!0?wn(i)?a.jsxs(q,{children:[jn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"accounting/*",element:a.jsx(at,{})}),Pn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"approval_rules/*",element:a.jsx(It,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),kn(i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"my_bank_connections",element:a.jsx(bt,{})}),vn(i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"bank_connections",element:a.jsx(lt,{})}),Dn(i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"business_verification",element:a.jsx(Qn,{productType:f?"zeni_accounts":m?"charge_cards":qn(i,n?.loggedInUserRoleMap)})}),Mn(n?.loggedInUserRole??[],i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"company_details",element:a.jsx(Yn,{})}),Un(n?.loggedInUserRole??[],i)&&a.jsx(C,{path:"billing",element:a.jsx(pt,{})}),_n(n?.loggedInUserRole??[],d,i)&&a.jsx(C,{path:"integrations",element:a.jsx(mt,{})}),a.jsx(C,{path:"my_profile/new/:addressType",element:a.jsx(le,{appContent:a.jsx(Wn,{isSubPage:!1})})}),a.jsx(C,{path:"my_profile",element:a.jsx(le,{})}),g&&a.jsx(C,{path:"notifications",element:a.jsx(yt,{})}),a.jsx(C,{path:"*",element:a.jsx(T,{})})]}):a.jsx(q,{children:a.jsx(C,{path:"*",element:a.jsx(T,{})})}):null}function It(e){return a.jsxs(q,{children:[a.jsx(C,{path:"/",element:a.jsx(it,{})}),a.jsx(C,{path:"bills/approval-rules/*",element:a.jsx(Xn,{})}),a.jsx(C,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?a.jsx(et,{}):a.jsx(T,{})}),a.jsx(C,{path:"*",element:a.jsx(T,{})})]})}export{ea as default};
@@ -1 +0,0 @@
1
- import{j as u}from"./liveblocks-B4A-86UW.js";import{a as f,b as T,q as A}from"./sentry-Buhd1WxP.js";import{u as D,h as z,j as l,g as J,N as M,n as O}from"./core-DmryIEGD.js";import{u as P,z as s,h as j,c as E,D as F,d as _,e as B,R as N,g as V,x as W,f as v}from"./index-BT-aHNaB.js";import{eP as $,Jl as q,Jm as R,eW as G,fn as H,Jr as K,fL as Q,cT as X,Js as y,Jt as Y,Ju as Z,bT as b}from"./zeni-epic-state-D5Qz6xwn.js";import"./mui-jLdveXE7.js";import{u as ee}from"./useDeviceId-DgpZz8Zn.js";import{f as te}from"./analyticsHelper-B-NOtmgb.js";import{t as ne}from"./getLocaleForTenant-RIINHFf-.js";import"./recharts-CrT1dYsO.js";import"./analytics-MTtjejam.js";import"./plaid-D05yz2vK.js";import"./dnd-DI8c9zzw.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ciwq4FhY.js";import"./lexical-B_Q0gC_l.js";import"./pdf-8aZteHiD.js";import"./utils-DhsIWAcD.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="b7b474b0-6481-4e92-b586-68f6de7272d0",t._sentryDebugIdIdentifier="sentry-dbid-b7b474b0-6481-4e92-b586-68f6de7272d0")}catch{}})();const ie=O(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:b(c),sourceUri:b(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(y())}}})(W),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:x,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>$(e)),I=l(e=>q(e)),m=J(),w=j().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(f.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),f.useEffect(()=>{t(void 0)},[]),f.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(I.tenantsInOrder),o.zeniSessionId),G(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Q().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(M,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),x===!0&&k!=null?u.jsx(N,{onClose:()=>i(y()),unlockDate:k}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-B4A-86UW.js";import{a as n}from"./sentry-Buhd1WxP.js";import{u,g as m,h as p,N as g}from"./core-DmryIEGD.js";import{z as f,s as y,t as b,c as d,e as h}from"./index-BT-aHNaB.js";import{fQ as x,fR as I,JJ as w}from"./zeni-epic-state-D5Qz6xwn.js";import{n as j}from"./mui-jLdveXE7.js";import"./recharts-CrT1dYsO.js";import"./analytics-MTtjejam.js";import"./plaid-D05yz2vK.js";import"./dnd-DI8c9zzw.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ciwq4FhY.js";import"./lexical-B_Q0gC_l.js";import"./pdf-8aZteHiD.js";import"./utils-DhsIWAcD.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]="5ab5d2ea-e6d1-433f-80cd-274dfbe5098f",e._sentryDebugIdIdentifier="sentry-dbid-5ab5d2ea-e6d1-433f-80cd-274dfbe5098f")}catch{}})();function $(){const e=u(),t=m(),i=p(),a=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),w(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=j.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;export{$ as default};
@@ -1,9 +0,0 @@
1
- import{j as u}from"./liveblocks-B4A-86UW.js";import{a as g}from"./sentry-Buhd1WxP.js";import{h as v,u as _,g as z,j as b,i as Z,n as M}from"./core-DmryIEGD.js";import{z as Q,$ as O,T as p,U as V,v as W,c as q,e as H,cP as J,n as f,p as X}from"./index-BT-aHNaB.js";import{eP as Y,QA as R,Ge as E,QB as A,Qw as aa,FG as S,QC as ea,FK as I,Fd as ta,Gf as B,QD as w,gQ as sa,G5 as oa,Ga as na,FZ as ia,FX as F,Gb as la,FU as ra,QE as ca,QF as ka,QG as da,QH as ua,QI as m,ec as pa,QJ as ma,QK as Ta}from"./zeni-epic-state-D5Qz6xwn.js";import{n as ga}from"./mui-jLdveXE7.js";import{u as fa}from"./useAskAiCfoHostNavButtonProps-D2PBuxdE.js";import{M as Ga}from"./MobileAppDrawer-CauZkmKt.js";import"./recharts-CrT1dYsO.js";import"./analytics-MTtjejam.js";import"./plaid-D05yz2vK.js";import"./dnd-DI8c9zzw.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ciwq4FhY.js";import"./lexical-B_Q0gC_l.js";import"./pdf-8aZteHiD.js";import"./utils-DhsIWAcD.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]="3dcd3ec4-71a7-44eb-9ef7-499cdc9057fd",e._sentryDebugIdIdentifier="sentry-dbid-3dcd3ec4-71a7-44eb-9ef7-499cdc9057fd")}catch{}})();const ha=ga.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,Da=M(function(e,t){const o=R(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,i=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o,d=aa(e),n=Q.isZeniUser();return{taskListView:i,tagListView:d,localData:i.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:n}},function(e,t){const{navigate:o,currentTenant:c,location:i,isTaskTemplatesEnabled:d}=t,{tenantEmailDomain:n}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(n,a),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(E(!0,d))},onTabChange:a=>{e(ua(a))},onParentTaskClick:a=>{const s=L(n,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(F(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(n,t.localData.defaultTaskGroupId),s=f(i.state?.pathnameStackToGoBack,i.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(w({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(da({filters:a}))},onSearchTextChanged:a=>{e(ka({searchText:a}))},onReloadCards:()=>{e(E(!0,d))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const a=X(i.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(ca({localData:a}))},resetLocalData:()=>{e(A({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ra(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(F(t.localData.selectedTaskIds,a,la(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(ia(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=ba(l,a);e(S({taskDetailLocalData:s}));const k=C(n,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),G=f(i.state?.pathnameStackToGoBack,i.pathname);o(k,{state:{pathnameStackToGoBack:G,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(na(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(oa(a,s))},onTimeSpentUpdate:(a,s)=>{e(B({task:a,updates:s}))},onShowToast:a=>{e(sa(a))},onGroupByFilterChange:a=>{e(w({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(B({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(ta(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(S({taskDetailLocalData:{...ea,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(n,t.localData.defaultTaskGroupId),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${n}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${n}/tasks/quick-responses`)}}})(J);function Na(){const e=v(),t=_(),o=z(),c=Q.getSignedInUser(),i=b(r=>Y(r)),{taskGroupId:d}=Z(),{useFeatureGate:n}=O(),{isFeatureEnabled:l}=n(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=n(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=n(p.isTaskCategorizationEnabled),{isFeatureEnabled:k}=n(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:G}=n(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:x}=n(p.isTaskRecurringParentEnabled),[y,P]=g.useState(!1),[$,U]=g.useState(!1),h=b(r=>R(r,l)),D=b(r=>r.taskGroupState),T=h.fetchState,{isAiCfoAccessEnabled:j,onAskAiCfoClick:N}=fa({mobileExploreReferrer:"Task Checklist"});if(V({isDataReady:T==="Completed"}),g.useEffect(()=>{y||(P(!0),t(E(!1,l)))},[y,t]),g.useEffect(()=>{T==="Completed"&&t(A({taskGroupById:D.taskGroupById}))},[T,D.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return u.jsxs(u.Fragment,{children:[T==="Completed"?u.jsx(W,{analytics:q,onLoad:r=>(K=>K.trackPageLoaded(H.Event.taskListPage))(r)}):null,u.jsxs(ha,{children:[u.jsx(Ga,{isAppContentDrawerOpen:$,handleDrawerToggle:r=>{U(r)}}),u.jsx(Da,{location:o,navigate:e,currentTenant:i,taskGroupId:d,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:l,taskListFetchState:T,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:G,isTaskRecurringParentEnabled:x,isAiCfoAccessEnabled:j,onAskAiCfoClick:N})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,ba=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...m.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=pa(t);return{...m.taskDetailLocalData,priority:o}}if(e==="status"){const o=ma(t);return{...m.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...m.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=Ta(t);return{...m.taskDetailLocalData,dueDate:o}}return{...m.taskDetailLocalData}};export{Na as default};
@@ -1,9 +0,0 @@
1
- import{j as n}from"./liveblocks-B4A-86UW.js";import se from"./NotFoundScreen-D5okhi0Y.js";import{a as c}from"./sentry-Buhd1WxP.js";import{h as _,u as O,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-DmryIEGD.js";import{Gi as Z,Gl as le,Go as de,eP as M,Qw as H,FC as X,Fk as pe,G2 as ue,FX as ke,Qx as W,Qy as z,Fg as me,Fd as fe,qc as ge,q0 as he,kb as Se,Fs as Ie,Qz as Te,Fx as be,Fu as Ge,Fn as Ee,FH as Ce,FG as De}from"./zeni-epic-state-D5Qz6xwn.js";import{z as C,cN as Fe,V as xe,$ as ye,T as b,p as Y,n as w,v as je,c as V,e as we,cO as ve,f as q,at as Re}from"./index-BT-aHNaB.js";import{n as Be}from"./mui-jLdveXE7.js";import{u as Pe}from"./useInitialThreadRequest-CaFTTJZC.js";import{M as Ue}from"./MobileAppDrawer-CauZkmKt.js";import Le from"./TaskListScreen-D52_wjZm.js";import"./recharts-CrT1dYsO.js";import"./analytics-MTtjejam.js";import"./plaid-D05yz2vK.js";import"./dnd-DI8c9zzw.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ciwq4FhY.js";import"./lexical-B_Q0gC_l.js";import"./pdf-8aZteHiD.js";import"./utils-DhsIWAcD.js";import"./useAskAiCfoHostNavButtonProps-D2PBuxdE.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]="bfe7925e-9952-44aa-a7ca-4a147b8f1cd7",e._sentryDebugIdIdentifier="sentry-dbid-bfe7925e-9952-44aa-a7ca-4a147b8f1cd7")}catch{}})();function Ne(){const e=_(),t=O(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(Z())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(Fe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let A,Q=[];const $e=re(function(e,t){const{location:s,taskGroupId:u}=t,r=W(e,t.taskId),d=M(e),l=r.taskGroupId??u,k=l!=null?z(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=H(e),{tenantEmailDomain:D}=d,G=r.recurringSourceTaskId,F=G!=null?`${q.appUrl}/${D}/tasks/${encodeURIComponent(G)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=I,Q=Object.values(I)),Q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${q.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:F,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>z(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Ge(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=Y(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(X(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=_(),t=O(),s=ne(),u=xe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>M(i)),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[F,I]=c.useState(!1),[p,J]=c.useState(!1),[R,K]=c.useState(!1),[B,ee]=c.useState(!1),[P,x]=c.useState(!1),T=c.useRef(!1),E=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>H(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(J(!0),t(X(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(K(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(T.current){if(E==="Error")return x(!1),void(T.current=!1);if(E==="Completed"){x(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=Y(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,E,l,s,e]);const N=g(i=>W(i,r)),y=N.fetchState,$=C.getSignedInUser();if($==null)throw Error("Can't access task detail page without signing in...");if(y==="Error"&&N.error?.code===400){const{tenantEmailDomain:i}=l,m=v(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(je,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(ze,{children:[n.jsx(Ue,{isAppContentDrawerOpen:F,handleDrawerToggle:i=>{I(i)}}),n.jsx($e,{analytics:V,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:$,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:G})]})]})}const ze=Be.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,v=e=>`/${e}/tasks`;function ia(){return n.jsxs(ce,{children:[n.jsx(f,{path:"/new",element:n.jsx(j,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(j,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx(Ne,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(j,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-B4A-86UW.js";import{a as d}from"./sentry-Buhd1WxP.js";import{s as u,u as h,j as y,N as I}from"./core-DmryIEGD.js";import{JG as b,eW as w,zF as j}from"./zeni-epic-state-D5Qz6xwn.js";import{z as l,s as x,A as S,C as D}from"./index-BT-aHNaB.js";import{n as p}from"./mui-jLdveXE7.js";import"./recharts-CrT1dYsO.js";import"./analytics-MTtjejam.js";import"./plaid-D05yz2vK.js";import"./dnd-DI8c9zzw.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ciwq4FhY.js";import"./lexical-B_Q0gC_l.js";import"./pdf-8aZteHiD.js";import"./utils-DhsIWAcD.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]="1968ca78-9664-4dd7-a7ff-08af789bff27",e._sentryDebugIdIdentifier="sentry-dbid-1968ca78-9664-4dd7-a7ff-08af789bff27")}catch{}})();const R=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",c=e.get("profileId")??"",[n,g]=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||(g(!0),a(j(t,c,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=p.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
- `,_=p(D.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{R as default};
@@ -1,9 +0,0 @@
1
- import{j as c}from"./liveblocks-B4A-86UW.js";import{a as f}from"./sentry-Buhd1WxP.js";import{h as x,u as j,g as C,i as T,j as p}from"./core-DmryIEGD.js";import{ID as s,IC as $,OT as v,eP as B,OU as D}from"./zeni-epic-state-D5Qz6xwn.js";import{J as P,at as g,h as z,z as E,s as L,c5 as U,p as N}from"./index-BT-aHNaB.js";import{n as _}from"./mui-jLdveXE7.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]="b9686f58-d617-4aae-a182-9841d73e0a6a",e._sentryDebugIdIdentifier="sentry-dbid-b9686f58-d617-4aae-a182-9841d73e0a6a")}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=j(),d=P(),l=C();let{accountId:a}=T(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,y]=f.useState(!1),h=z();f.useEffect(()=>{u||(y(!0),n($(a??"",!1)))},[u,n]);const o=p(t=>v(t,a??"")),I=()=>{const t=N(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=E.getSignedInUser(),i=p(t=>B(t)),b={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(L,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):c.jsx(G,{windowSize:d,children:c.jsx(U,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:m})})}export{q as Z};
@@ -1 +0,0 @@
1
- import{cH as m,cI as l,Jy as _,Jz as d}from"./zeni-epic-state-D5Qz6xwn.js";import{c as u}from"./index-BT-aHNaB.js";import"./sentry-Buhd1WxP.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]="183aece1-8207-474e-8806-0b7eed37ab92",e._sentryDebugIdIdentifier="sentry-dbid-183aece1-8207-474e-8806-0b7eed37ab92")}catch{}})();const b=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},h=(e,a,o,i,s)=>{const r=[],c=[];let t=[];s?.forEach(n=>{r.push(n.companyId),c.push(n.companyName),t=t.concat(n.userRole)}),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:i,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?r:void 0,company_names:s!=null?c:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":l(e,a)?"reimbursement":_(e,a)?"zeni_accounts":d(e,a)?"charge_cards":"bill_pay",I=e=>Object.values(e.allocation).map(String).join("-");export{I as a,h as f,g,b as t};