@zeniai/web-app-ui 5.0.78-next → 5.0.78-prod

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 (103) hide show
  1. package/dist/assets/AddressRoutes-D1tOHYbp.js +1 -0
  2. package/dist/assets/{AddressScreen-DLY0B5X2.js → AddressScreen-YA46n52j.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-BrFGp0Rw.js → AiCfoScreen-A8Awkqi8.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-DGTEW0Ts.js → BillPayApprovalRoutes-NVMWEPu0.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-B4DyZg9q.js → BillPayRoutes-Dq3yQ57P.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-CJhDGXDa.js → BusinessVerificationPageScreen-CgOqYGYR.js} +1 -1
  7. package/dist/assets/{ChargeCardRoutes-ouivBCgA.js → ChargeCardRoutes-DP2t_uhH.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-Cv1RmmZ2.js → CompanyPassportScreen-CJkXrH5j.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-BGLgRykg.js → ConnectionAuthScreen-DkkZ1Fif.js} +1 -1
  10. package/dist/assets/CustomerOnboardingAuthScreen-CaRVOe5Q.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-CCJ8rzxG.js → CustomerOnboardingRoutes-BOQ5oKh7.js} +1 -1
  12. package/dist/assets/{DashboardRoutes-DpMwQkOO.js → DashboardRoutes-CAQmzY7M.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-BjKn1NRZ.js → DefaultTenantHome-BuA42TgC.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-Da3AjbNa.js → DomesticWireDetailScreen-2MNzySFr.js} +1 -1
  15. package/dist/assets/{DrawerScreen-BtlXa6K0.js → DrawerScreen-uJ_3Dk8M.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-DwRVDUuS.js → EntityDetailRoutes-DAqHSgtY.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-UwZsuZMU.js → ExpenseAutomationRoutes-Ctsyj1qb.js} +1 -1
  18. package/dist/assets/{FeaturePreviewScreen-CUAIKz1i.js → FeaturePreviewScreen-BGV0ZXxB.js} +1 -1
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-vr1PQzA9.js → HubSpotOAuthCallbackScreen-DceAiXdK.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-pq1cqXvR.js → MagicLinkRoutes-c-ICkHeA.js} +1 -1
  21. package/dist/assets/{MagicLinkSignInScreen-CJZyHulf.js → MagicLinkSignInScreen-BCvwxuHv.js} +1 -1
  22. package/dist/assets/{MobileAppDrawer-DSdJwfd5.js → MobileAppDrawer-DSgPRxOv.js} +1 -1
  23. package/dist/assets/NotFoundScreen-B9fIdZtZ.js +1 -0
  24. package/dist/assets/{NotificationRoutes-BpqbcrT3.js → NotificationRoutes-CtZRU3jC.js} +1 -1
  25. package/dist/assets/{OAuthConsentScreen-Cr5NZApw.js → OAuthConsentScreen-BfiVtm7S.js} +1 -1
  26. package/dist/assets/{PandLWithForecastRoutes-CrHHjUmh.js → PandLWithForecastRoutes-Bco3KBub.js} +1 -1
  27. package/dist/assets/{PeopleRoutes-DjAv-Cbm.js → PeopleRoutes-CpJmRoUV.js} +1 -1
  28. package/dist/assets/{PerformanceRoutes-ap8B_-S5.js → PerformanceRoutes-BJ4hq_vo.js} +1 -1
  29. package/dist/assets/{Preview-BlbTJX4y.js → Preview-CzTmVH5B.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-gihlHabK.js → QBOConnectionScreen-DVWXlQxR.js} +1 -1
  31. package/dist/assets/{ReferralListScreen-DiGYqmEw.js → ReferralListScreen-Dk4OhEOh.js} +1 -1
  32. package/dist/assets/{ReimbursementApprovalRoutes-Dkrm7ab1.js → ReimbursementApprovalRoutes-SuUGS_MC.js} +1 -1
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B-jeaK-0.js → ReimbursementApprovalRuleDetailScreen-CvAjyFdG.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-Df1rene3.js → ReimbursementRoutes-LJv5ZEhb.js} +1 -1
  35. package/dist/assets/{ReportsRoutes-01ZBxNzi.js → ReportsRoutes-DWgChqq3.js} +1 -1
  36. package/dist/assets/{RewardsRoutes-C_RjM3wM.js → RewardsRoutes-IbwzyTA0.js} +1 -1
  37. package/dist/assets/{ScreenRoutes-XUGVTlJU.js → ScreenRoutes-Bzr1Pddu.js} +2 -2
  38. package/dist/assets/{SettingsRoutes-DgDaKTnp.js → SettingsRoutes-CN1RB2Kk.js} +1 -1
  39. package/dist/assets/{SetupPagesScreen-DFNkJSDZ.js → SetupPagesScreen-B1u5XXT5.js} +1 -1
  40. package/dist/assets/{SignInScreen-4QpxmPGm.js → SignInScreen-DLqX9QIL.js} +1 -1
  41. package/dist/assets/{SignOutScreen-B8MdXYvN.js → SignOutScreen-pxwuoR_l.js} +1 -1
  42. package/dist/assets/{TaskListScreen-BDFYRBL0.js → TaskListScreen-DTiPtOdu.js} +1 -1
  43. package/dist/assets/{TaskRoutes-DT2WLVpc.js → TaskRoutes-Bnccp3rk.js} +1 -1
  44. package/dist/assets/TransactionDetailRoutes-DEPQW9cF.js +1 -0
  45. package/dist/assets/{TransactionDetailScreen-Ci4ZELq0.js → TransactionDetailScreen-CVJIejMp.js} +1 -1
  46. package/dist/assets/{TransactionListRoutes-BvA_L1Bn.js → TransactionListRoutes-nDA_htng.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-CCwpqIb0.js → TreasuryRoutes-BNUkMK5W.js} +1 -1
  48. package/dist/assets/{VendorsRoutes-CEucFn4v.js → VendorsRoutes-CpWLxCM4.js} +1 -1
  49. package/dist/assets/{WiseConfirmationScreen-74LRyISH.js → WiseConfirmationScreen-2PZ32Ekb.js} +1 -1
  50. package/dist/assets/{ZeniAccountRoutes-C_yIwLbb.js → ZeniAccountRoutes-Db8jzNqV.js} +1 -1
  51. package/dist/assets/{ZeniAccountStatementScreen-C7x2WOwU.js → ZeniAccountStatementScreen-BudCs1Qh.js} +1 -1
  52. package/dist/assets/{accountMappingHelper-dm9IDhd5.js → accountMappingHelper-CT28maj0.js} +1 -1
  53. package/dist/assets/{analytics-LRXDxB9U.js → analytics-Br8sYi51.js} +1 -1
  54. package/dist/assets/{analyticsHelper-CM7-DzIH.js → analyticsHelper-CUa_2Hxt.js} +1 -1
  55. package/dist/assets/{core-DrFqYlht.js → core-BUa4y4mL.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-BIE62qI8.js → decodeURIComponentSafe-CRJGdpaG.js} +1 -1
  57. package/dist/assets/{dnd-DjCTgA16.js → dnd-Dl4N7fBZ.js} +1 -1
  58. package/dist/assets/{empty-B_1j7UZd.js → empty-B90Uv9-T.js} +1 -1
  59. package/dist/assets/{empty-Btqpa3Dn.js → empty-BR4JY50t.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-DUjVh48Y.js → emptyVideoElement-tnCNovqO.js} +1 -1
  61. package/dist/assets/{epic-DUdYUOqK.js → epic-BsQGAan2.js} +1 -1
  62. package/dist/assets/{getLocaleForTenant-CtOQ1QSt.js → getLocaleForTenant-Crr4jHK_.js} +1 -1
  63. package/dist/assets/{index-vvusuUAb.js → index-2Xf81mMP.js} +1 -1
  64. package/dist/assets/{index-g9hTOOdd.js → index-B46Qh1vA.js} +1 -1
  65. package/dist/assets/{index-BUJjaTE7.js → index-BChjK39b.js} +2 -2
  66. package/dist/assets/{index-CuGjO8q5.js → index-BlE_QRZ7.js} +1 -1
  67. package/dist/assets/{index-BxB1wE84.js → index-BphHrMlb.js} +1 -1
  68. package/dist/assets/{index-gIHwUZJz.js → index-BqVUPrfN.js} +7 -7
  69. package/dist/assets/{index-BIdZz-Lu.js → index-CHewEF_r.js} +1 -1
  70. package/dist/assets/{index-B7-w4njp.js → index-xcm_ApEH.js} +1 -1
  71. package/dist/assets/{lexical-BvSd63VE.js → lexical-gklPXKki.js} +1 -1
  72. package/dist/assets/{liveblocks-C6NDyiJv.js → liveblocks-JFc2ySVL.js} +1 -1
  73. package/dist/assets/{lottie-CRrBZj94.js → lottie-tfFSHGOM.js} +1 -1
  74. package/dist/assets/{mui-BfKuxuES.js → mui-RJ5XtWIj.js} +1 -1
  75. package/dist/assets/{pathToGoBack-CUljzXbA.js → pathToGoBack-UH0xKv_w.js} +1 -1
  76. package/dist/assets/{pdf-WyHfBZP8.js → pdf-DyXQZDfv.js} +3 -3
  77. package/dist/assets/{pdf-lib-Ni58cQtF.js → pdf-lib-DQ75GOuH.js} +1 -1
  78. package/dist/assets/{plaid-BfLcb-Mu.js → plaid-M6xkDuEc.js} +1 -1
  79. package/dist/assets/{pusher-BetHGDvL.js → pusher-9Pzhq4pa.js} +1 -1
  80. package/dist/assets/{react-CKFyZHqR.js → react-B-lMEwuQ.js} +1 -1
  81. package/dist/assets/{react-DPXh3mWt.js → react-CbK-iBIw.js} +1 -1
  82. package/dist/assets/{react-BWdafFx3.js → react-Cy7gL0rm.js} +1 -1
  83. package/dist/assets/{react-D7NpAKPT.js → react-Dm8DL33B.js} +1 -1
  84. package/dist/assets/{react-CdUYyNlS.js → react-DtBTgNL_.js} +1 -1
  85. package/dist/assets/{react-CZxiptYj.js → react-tmTSBFJN.js} +1 -1
  86. package/dist/assets/{recharts-DzFRpM3n.js → recharts-CPOd-6nk.js} +1 -1
  87. package/dist/assets/{routePaths-DwqXZ9IC.js → routePaths-FsWFCrEG.js} +1 -1
  88. package/dist/assets/{sentry-DorFMwQU.js → sentry-DbhlVCDx.js} +1 -1
  89. package/dist/assets/{url-CkJQeQOD.js → url-BVyZWqxl.js} +1 -1
  90. package/dist/assets/{url-yU2RR5Y5.js → url-BdgRfFdn.js} +1 -1
  91. package/dist/assets/{useAskAiCfoHostNavButtonProps-SdJdV09H.js → useAskAiCfoHostNavButtonProps-CzbTY4Ry.js} +1 -1
  92. package/dist/assets/{useDeviceId-B51M4N2b.js → useDeviceId-BqTcE7B1.js} +1 -1
  93. package/dist/assets/{useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js → useFetchSuggestedQuestionsWhenReady-HdAnpaOw.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-C8hN7EcF.js → useInitialThreadRequest-BwBVCvna.js} +1 -1
  95. package/dist/assets/{utils-BiDInqYy.js → utils-jfneV6S1.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-51Ock1rJ.js → withTransactionSidePanel-_HCg7dnz.js} +1 -1
  97. package/dist/assets/{zeni-epic-state-vpQnS6PI.js → zeni-epic-state-CGaNHYyd.js} +3 -3
  98. package/dist/index.html +1 -1
  99. package/package.json +1 -1
  100. package/dist/assets/AddressRoutes-Bs0ffT2X.js +0 -1
  101. package/dist/assets/CustomerOnboardingAuthScreen-xT3UtszS.js +0 -1
  102. package/dist/assets/NotFoundScreen-Du1hgJnA.js +0 -1
  103. package/dist/assets/TransactionDetailRoutes-Buw31_AN.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-DpMwQkOO.js","assets/sentry-DorFMwQU.js","assets/core-DrFqYlht.js","assets/zeni-epic-state-vpQnS6PI.js","assets/index-gIHwUZJz.js","assets/mui-BfKuxuES.js","assets/analytics-LRXDxB9U.js","assets/utils-BiDInqYy.js","assets/withTransactionSidePanel-51Ock1rJ.js","assets/useAskAiCfoHostNavButtonProps-SdJdV09H.js","assets/useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js","assets/TransactionDetailScreen-Ci4ZELq0.js","assets/decodeURIComponentSafe-BIE62qI8.js","assets/routePaths-DwqXZ9IC.js","assets/NotFoundScreen-Du1hgJnA.js","assets/analyticsHelper-CM7-DzIH.js","assets/CompanyPassportScreen-Cv1RmmZ2.js","assets/MobileAppDrawer-DSdJwfd5.js","assets/FeaturePreviewScreen-CUAIKz1i.js","assets/ReferralListScreen-DiGYqmEw.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-B4DyZg9q.js","assets/AddressScreen-DLY0B5X2.js","assets/DomesticWireDetailScreen-Da3AjbNa.js","assets/useInitialThreadRequest-C8hN7EcF.js","assets/DrawerScreen-BtlXa6K0.js","assets/SetupPagesScreen-DFNkJSDZ.js","assets/BusinessVerificationPageScreen-CJhDGXDa.js","assets/BillPayApprovalRoutes-DGTEW0Ts.js","assets/ReimbursementApprovalRuleDetailScreen-B-jeaK-0.js","assets/getLocaleForTenant-CtOQ1QSt.js","assets/ReimbursementRoutes-Df1rene3.js","assets/ReimbursementApprovalRoutes-Dkrm7ab1.js","assets/TransactionListRoutes-BvA_L1Bn.js","assets/ZeniAccountStatementScreen-C7x2WOwU.js","assets/SettingsRoutes-DgDaKTnp.js","assets/accountMappingHelper-dm9IDhd5.js","assets/QBOConnectionScreen-gihlHabK.js","assets/empty-Btqpa3Dn.js","assets/index-CuGjO8q5.js","assets/url-yU2RR5Y5.js","assets/index-BIdZz-Lu.js","assets/ReportsRoutes-01ZBxNzi.js","assets/ChargeCardRoutes-ouivBCgA.js","assets/PeopleRoutes-DjAv-Cbm.js","assets/ExpenseAutomationRoutes-UwZsuZMU.js","assets/TreasuryRoutes-CCwpqIb0.js","assets/VendorsRoutes-CEucFn4v.js","assets/pathToGoBack-CUljzXbA.js","assets/ZeniAccountRoutes-C_yIwLbb.js","assets/AddressRoutes-Bs0ffT2X.js","assets/PandLWithForecastRoutes-CrHHjUmh.js","assets/CustomerOnboardingRoutes-CCJ8rzxG.js","assets/TransactionDetailRoutes-Buw31_AN.js","assets/EntityDetailRoutes-DwRVDUuS.js","assets/NotificationRoutes-BpqbcrT3.js","assets/PerformanceRoutes-ap8B_-S5.js","assets/RewardsRoutes-C_RjM3wM.js","assets/TaskRoutes-DT2WLVpc.js","assets/TaskListScreen-BDFYRBL0.js","assets/AiCfoScreen-BrFGp0Rw.js"])))=>i.map(i=>d[i]);
2
- import{_ as n,bn as os,eO as ls,eU as cs,eS as ds,eT as ms,fD as us,eQ as _s,cP as Ee,cw as Es,f9 as As,co as ps,bD as Is,bq as Ts,fe as gs,v as xs,IR as hs,bv as js,IS as Us,bF as bs,fb as Ds,bE as Hs,bs as Rs,ck as ys,IT as fs,IU as Cs,cM as vs,cO as Os,cN as Ps,cv as Fs,cB as Ls,mv as Ae,eP as pe,fN as Bs,fi as Ie,fK as Te,fL as ge,fj as ks}from"./zeni-epic-state-vpQnS6PI.js";import{j as e}from"./liveblocks-C6NDyiJv.js";import{a as v}from"./sentry-DorFMwQU.js";import{h as Ss,j as Vs,l as Ns,u as Ms,g as z,i as xe,N as c,n as Zs,o as t}from"./core-DrFqYlht.js";import{m as ws,u as zs,z as D,y as Gs,a as $s,T as Ys,S as L,k as qs,L as B,D as he,t as _,P as Ws,c as X,l}from"./index-gIHwUZJz.js";import"./mui-BfKuxuES.js";import{f as je}from"./analyticsHelper-CM7-DzIH.js";import{t as Ks}from"./getLocaleForTenant-CtOQ1QSt.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="8d57101d-d10e-42f1-81f7-56a8235a5bb9",i._sentryDebugIdIdentifier="sentry-dbid-8d57101d-d10e-42f1-81f7-56a8235a5bb9")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-DpMwQkOO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-B4DyZg9q.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-Df1rene3.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-BvA_L1Bn.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-DgDaKTnp.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-01ZBxNzi.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-ouivBCgA.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-DjAv-Cbm.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-UwZsuZMU.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-CCwpqIb0.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-CEucFn4v.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-C_yIwLbb.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Js=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-01ZBxNzi.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-Bs0ffT2X.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-DjAv-Cbm.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-CrHHjUmh.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-CCJ8rzxG.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-CEucFn4v.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-Buw31_AN.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-DwRVDUuS.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-DpMwQkOO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),be=l(()=>n(()=>import("./BillPayRoutes-B4DyZg9q.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-DgDaKTnp.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),De=l(()=>n(()=>import("./ReimbursementRoutes-Df1rene3.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-C_yIwLbb.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-CCwpqIb0.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-BvA_L1Bn.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-ouivBCgA.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-BpqbcrT3.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),En=l(()=>n(()=>import("./PerformanceRoutes-ap8B_-S5.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-UwZsuZMU.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-C_RjM3wM.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-DT2WLVpc.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Tn=l(()=>n(()=>import("./AiCfoScreen-BrFGp0Rw.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-Du1hgJnA.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),gn=l(()=>n(()=>import("./TaskListScreen-BDFYRBL0.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Ss(),S=Vs(),{tenantEmailDomain:o}=Ns(),V=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),R=D.getSignedInUserTenant(o)?.tenantId,h=D.getSignedInUser(),K=os(h),G=Ms(),[N,Re]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=Gs(),Q=$s(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&K,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(a=>a.tenantState.fetchState),A=z(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Se}=P(L.isAiCfoFileUploadEnabled),Y=z(a=>us(a));if(o!=null){const a=D.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,V)}const w={tenantId:R,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=qs(),Ve=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=xe("/:tenantEmailDomain/onboarding/*")!==null,J=xe("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(J!=null&&R!=null){const a=J.params.selectedPeriod;if(a!=null){const b=a.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=Ts();m.isAfter(M,"month")===!1?U(gs(R,{month:d,year:s})):S("./month_end_close_checks/review")}}}},[J,R]),v.useEffect(()=>{N||(Re(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!xs(ne,w)&&D.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s){if(pe(b?.userId,b?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=D.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Ks(s)),m?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,D]),v.useEffect(()=>{D.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=D.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(b==="Completed"||b==="Error");a==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,R,h,f,U))},[R,A]),v.useEffect(()=>{D.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),D.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,V,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&R!=null?(O(),_.markActiveTenantFetchCompleted(R)):A==="Error"&&R!=null&&(_.markActiveTenantFetchFailed(R),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,R,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Js,b=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(E?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Ds(r.company),qe=Pe&&Ye===!0&&!C,We=re&&Hs(E?.loggedInUserRoleMap),Ke=oe&&Rs(E?.loggedInUserRoleMap),Qe=me&&ys(E?.loggedInUserRoleMap),Je=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),I=Os(E?.loggedInUserRoleMap),T=Ps(E?.loggedInUserRoleMap),g=Fs(E?.loggedInUserRoleMap),x=Ls(E?.loggedInUserRoleMap),ue=re&&g,_e=ce&&x,es=me&&p,ss=qe&&I,ns=oe&&T,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||Ge===!0||Je===!0||Xe===!0;return D.isSignedIn()?R==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||K&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||K?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(gn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Qe||Ke?e.jsx(en,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(He,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(He,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Ve?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(De,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(De,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?e.jsx(Tn,{isFileUploadEnabled:Se}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const xn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:S,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:V,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):S?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):V?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),H=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:V,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(bn,{tenantEmailDomain:O}):V?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Dn,{tenantEmailDomain:O}):S?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),bn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Dn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),He=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{H as FallBackRoute,wn as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-CAQmzY7M.js","assets/sentry-DbhlVCDx.js","assets/core-BUa4y4mL.js","assets/zeni-epic-state-CGaNHYyd.js","assets/index-BqVUPrfN.js","assets/mui-RJ5XtWIj.js","assets/analytics-Br8sYi51.js","assets/utils-jfneV6S1.js","assets/withTransactionSidePanel-_HCg7dnz.js","assets/useAskAiCfoHostNavButtonProps-CzbTY4Ry.js","assets/useFetchSuggestedQuestionsWhenReady-HdAnpaOw.js","assets/TransactionDetailScreen-CVJIejMp.js","assets/decodeURIComponentSafe-CRJGdpaG.js","assets/routePaths-FsWFCrEG.js","assets/NotFoundScreen-B9fIdZtZ.js","assets/analyticsHelper-CUa_2Hxt.js","assets/CompanyPassportScreen-CJkXrH5j.js","assets/MobileAppDrawer-DSgPRxOv.js","assets/FeaturePreviewScreen-BGV0ZXxB.js","assets/ReferralListScreen-Dk4OhEOh.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-Dq3yQ57P.js","assets/AddressScreen-YA46n52j.js","assets/DomesticWireDetailScreen-2MNzySFr.js","assets/useInitialThreadRequest-BwBVCvna.js","assets/DrawerScreen-uJ_3Dk8M.js","assets/SetupPagesScreen-B1u5XXT5.js","assets/BusinessVerificationPageScreen-CgOqYGYR.js","assets/BillPayApprovalRoutes-NVMWEPu0.js","assets/ReimbursementApprovalRuleDetailScreen-CvAjyFdG.js","assets/getLocaleForTenant-Crr4jHK_.js","assets/ReimbursementRoutes-LJv5ZEhb.js","assets/ReimbursementApprovalRoutes-SuUGS_MC.js","assets/TransactionListRoutes-nDA_htng.js","assets/ZeniAccountStatementScreen-BudCs1Qh.js","assets/SettingsRoutes-CN1RB2Kk.js","assets/accountMappingHelper-CT28maj0.js","assets/QBOConnectionScreen-DVWXlQxR.js","assets/empty-BR4JY50t.js","assets/index-BlE_QRZ7.js","assets/url-BdgRfFdn.js","assets/index-CHewEF_r.js","assets/ReportsRoutes-DWgChqq3.js","assets/ChargeCardRoutes-DP2t_uhH.js","assets/PeopleRoutes-CpJmRoUV.js","assets/ExpenseAutomationRoutes-Ctsyj1qb.js","assets/TreasuryRoutes-BNUkMK5W.js","assets/VendorsRoutes-CpWLxCM4.js","assets/pathToGoBack-UH0xKv_w.js","assets/ZeniAccountRoutes-Db8jzNqV.js","assets/AddressRoutes-D1tOHYbp.js","assets/PandLWithForecastRoutes-Bco3KBub.js","assets/CustomerOnboardingRoutes-BOQ5oKh7.js","assets/TransactionDetailRoutes-DEPQW9cF.js","assets/EntityDetailRoutes-DAqHSgtY.js","assets/NotificationRoutes-CtZRU3jC.js","assets/PerformanceRoutes-BJ4hq_vo.js","assets/RewardsRoutes-IbwzyTA0.js","assets/TaskRoutes-Bnccp3rk.js","assets/TaskListScreen-DTiPtOdu.js","assets/AiCfoScreen-A8Awkqi8.js"])))=>i.map(i=>d[i]);
2
+ import{_ as n,bn as os,eO as ls,eU as cs,eS as ds,eT as ms,fD as us,eQ as _s,cP as Ee,cw as Es,f9 as As,co as ps,bD as Is,bq as Ts,fe as gs,v as xs,IR as hs,bv as js,IS as Us,bF as bs,fb as Ds,bE as Hs,bs as Rs,ck as ys,IT as fs,IU as Cs,cM as vs,cO as Os,cN as Ps,cv as Fs,cB as Ls,mv as Ae,eP as pe,fN as Bs,fi as Ie,fK as Te,fL as ge,fj as ks}from"./zeni-epic-state-CGaNHYyd.js";import{j as e}from"./liveblocks-JFc2ySVL.js";import{a as v}from"./sentry-DbhlVCDx.js";import{h as Ss,j as Vs,l as Ns,u as Ms,g as z,i as xe,N as c,n as Zs,o as t}from"./core-BUa4y4mL.js";import{m as ws,u as zs,z as D,y as Gs,a as $s,T as Ys,S as L,k as qs,L as B,D as he,t as _,P as Ws,c as X,l}from"./index-BqVUPrfN.js";import"./mui-RJ5XtWIj.js";import{f as je}from"./analyticsHelper-CUa_2Hxt.js";import{t as Ks}from"./getLocaleForTenant-Crr4jHK_.js";import"./recharts-CPOd-6nk.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./utils-jfneV6S1.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="8d57101d-d10e-42f1-81f7-56a8235a5bb9",i._sentryDebugIdIdentifier="sentry-dbid-8d57101d-d10e-42f1-81f7-56a8235a5bb9")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-CAQmzY7M.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-Dq3yQ57P.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-LJv5ZEhb.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-nDA_htng.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-CN1RB2Kk.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-DWgChqq3.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-DP2t_uhH.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-CpJmRoUV.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-Ctsyj1qb.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-BNUkMK5W.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-CpWLxCM4.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-Db8jzNqV.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Js=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-DWgChqq3.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-D1tOHYbp.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-CpJmRoUV.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-Bco3KBub.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-BOQ5oKh7.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-CpWLxCM4.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-DEPQW9cF.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-DAqHSgtY.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-CAQmzY7M.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),be=l(()=>n(()=>import("./BillPayRoutes-Dq3yQ57P.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-CN1RB2Kk.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),De=l(()=>n(()=>import("./ReimbursementRoutes-LJv5ZEhb.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-Db8jzNqV.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-BNUkMK5W.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-nDA_htng.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-DP2t_uhH.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-CtZRU3jC.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),En=l(()=>n(()=>import("./PerformanceRoutes-BJ4hq_vo.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-Ctsyj1qb.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-IbwzyTA0.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-Bnccp3rk.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Tn=l(()=>n(()=>import("./AiCfoScreen-A8Awkqi8.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-B9fIdZtZ.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),gn=l(()=>n(()=>import("./TaskListScreen-DTiPtOdu.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Ss(),S=Vs(),{tenantEmailDomain:o}=Ns(),V=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),R=D.getSignedInUserTenant(o)?.tenantId,h=D.getSignedInUser(),K=os(h),G=Ms(),[N,Re]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=Gs(),Q=$s(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&K,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(a=>a.tenantState.fetchState),A=z(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Se}=P(L.isAiCfoFileUploadEnabled),Y=z(a=>us(a));if(o!=null){const a=D.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,V)}const w={tenantId:R,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=qs(),Ve=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=xe("/:tenantEmailDomain/onboarding/*")!==null,J=xe("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(J!=null&&R!=null){const a=J.params.selectedPeriod;if(a!=null){const b=a.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=Ts();m.isAfter(M,"month")===!1?U(gs(R,{month:d,year:s})):S("./month_end_close_checks/review")}}}},[J,R]),v.useEffect(()=>{N||(Re(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!xs(ne,w)&&D.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s){if(pe(b?.userId,b?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=D.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Ks(s)),m?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,D]),v.useEffect(()=>{D.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=D.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(b==="Completed"||b==="Error");a==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,R,h,f,U))},[R,A]),v.useEffect(()=>{D.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),D.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,V,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&R!=null?(O(),_.markActiveTenantFetchCompleted(R)):A==="Error"&&R!=null&&(_.markActiveTenantFetchFailed(R),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,R,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Js,b=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(E?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Ds(r.company),qe=Pe&&Ye===!0&&!C,We=re&&Hs(E?.loggedInUserRoleMap),Ke=oe&&Rs(E?.loggedInUserRoleMap),Qe=me&&ys(E?.loggedInUserRoleMap),Je=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),I=Os(E?.loggedInUserRoleMap),T=Ps(E?.loggedInUserRoleMap),g=Fs(E?.loggedInUserRoleMap),x=Ls(E?.loggedInUserRoleMap),ue=re&&g,_e=ce&&x,es=me&&p,ss=qe&&I,ns=oe&&T,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||Ge===!0||Je===!0||Xe===!0;return D.isSignedIn()?R==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||K&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||K?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(gn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Qe||Ke?e.jsx(en,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(He,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(He,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Ve?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(De,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(De,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?e.jsx(Tn,{isFileUploadEnabled:Se}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const xn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:S,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:V,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):S?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):V?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),H=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:V,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(bn,{tenantEmailDomain:O}):V?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Dn,{tenantEmailDomain:O}):S?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),bn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Dn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),He=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{H as FallBackRoute,wn as default};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-C6NDyiJv.js";import{a as p}from"./sentry-DorFMwQU.js";import{j as _,u as B,h as k,g as h,k as R,l as F,n as X,o as C}from"./core-DrFqYlht.js";import{bn as xe,eO as j,gG as de,KX as Ee,Jk as Ae,jA as ue,lT as we,gI as je,KZ as ve,KY as ke,Nm as Pe,xj as De,BO as Ue,MX as Me,N4 as _e,c1 as W,cG as Te,cH as Be,J1 as Re,Nn as Fe,J2 as Ve,vL as Ne,No as Oe,E2 as Le,Bu as $e,Bl as pe,Bi as Je,vP as ge,Bo as me,Br as fe,Bx as ee,sm as ne,vO as ze,jc as Q,jf as he,Np as Ge,kg as Ke,w2 as Ze,JS as He,JT as qe,ja as Xe,Nq as Qe,jd as Ye,qM as We,Nr as en,Ns as nn,qQ as tn,gi as an,Ja as se,gp as sn,Jb as on,v$ as cn,Nt as rn,Nu as ln,BL as dn,eS as be,eU as Se,Nv as un,fw as pn,Jl as gn,v_ as oe,fB as ie,fA as mn,vZ as fn,fz as hn,fy as bn,Nw as Sn,eX as ye,Nx as yn,Ny as In,w5 as Cn,vY as ce,Nz as xn,fd as En,vV as An,bU as wn,c0 as jn,b$ as vn,bV as kn,bZ as Pn,bY as Dn,bX as Un,b_ as Mn,bW as _n}from"./zeni-epic-state-vpQnS6PI.js";import{y as te,S as U,z as x,ac as Ie,bB as Tn,c as J,e as Bn,k as V,B as ae,bC as Rn,bD as Fn,an as Vn,f as Ce,bE as Nn,bF as On,bG as Ln,a6 as $n,V as Jn,bH as zn,r as Gn,bI as Kn}from"./index-gIHwUZJz.js";import{n as M}from"./mui-BfKuxuES.js";import{M as P}from"./MobileAppDrawer-DSdJwfd5.js";import{a as L,g as $,m as Zn}from"./accountMappingHelper-dm9IDhd5.js";import{t as Hn,A as qn}from"./AddressScreen-DLY0B5X2.js";import T from"./NotFoundScreen-Du1hgJnA.js";import{g as Xn}from"./analyticsHelper-CM7-DzIH.js";import{B as Qn}from"./BusinessVerificationPageScreen-CJhDGXDa.js";import{C as Yn}from"./CompanyPassportScreen-Cv1RmmZ2.js";import{q as re}from"./QBOConnectionScreen-gihlHabK.js";import{B as Wn}from"./BillPayApprovalRoutes-DGTEW0Ts.js";import{R as et}from"./ReimbursementApprovalRoutes-Dkrm7ab1.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.js";import"./routePaths-DwqXZ9IC.js";import"./empty-Btqpa3Dn.js";import"./pdf-lib-Ni58cQtF.js";import"./index-CuGjO8q5.js";import"./url-yU2RR5Y5.js";import"./index-BIdZz-Lu.js";import"./decodeURIComponentSafe-BIE62qI8.js";import"./ReimbursementApprovalRuleDetailScreen-B-jeaK-0.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]="141754f2-c264-4b87-ac68-41723230eb79",e._sentryDebugIdIdentifier="sentry-dbid-141754f2-c264-4b87-ac68-41723230eb79")}catch{}})();const nt=M.div`
1
+ import{j as a}from"./liveblocks-JFc2ySVL.js";import{a as p}from"./sentry-DbhlVCDx.js";import{j as _,u as B,h as k,g as h,k as R,l as F,n as X,o as C}from"./core-BUa4y4mL.js";import{bn as xe,eO as j,gG as de,KX as Ee,Jk as Ae,jA as ue,lT as we,gI as je,KZ as ve,KY as ke,Nm as Pe,xj as De,BO as Ue,MX as Me,N4 as _e,c1 as W,cG as Te,cH as Be,J1 as Re,Nn as Fe,J2 as Ve,vL as Ne,No as Oe,E2 as Le,Bu as $e,Bl as pe,Bi as Je,vP as ge,Bo as me,Br as fe,Bx as ee,sm as ne,vO as ze,jc as Q,jf as he,Np as Ge,kg as Ke,w2 as Ze,JS as He,JT as qe,ja as Xe,Nq as Qe,jd as Ye,qM as We,Nr as en,Ns as nn,qQ as tn,gi as an,Ja as se,gp as sn,Jb as on,v$ as cn,Nt as rn,Nu as ln,BL as dn,eS as be,eU as Se,Nv as un,fw as pn,Jl as gn,v_ as oe,fB as ie,fA as mn,vZ as fn,fz as hn,fy as bn,Nw as Sn,eX as ye,Nx as yn,Ny as In,w5 as Cn,vY as ce,Nz as xn,fd as En,vV as An,bU as wn,c0 as jn,b$ as vn,bV as kn,bZ as Pn,bY as Dn,bX as Un,b_ as Mn,bW as _n}from"./zeni-epic-state-CGaNHYyd.js";import{y as te,S as U,z as x,ac as Ie,bB as Tn,c as J,e as Bn,k as V,B as ae,bC as Rn,bD as Fn,an as Vn,f as Ce,bE as Nn,bF as On,bG as Ln,a6 as $n,V as Jn,bH as zn,r as Gn,bI as Kn}from"./index-BqVUPrfN.js";import{n as M}from"./mui-RJ5XtWIj.js";import{M as P}from"./MobileAppDrawer-DSgPRxOv.js";import{a as L,g as $,m as Zn}from"./accountMappingHelper-CT28maj0.js";import{t as Hn,A as qn}from"./AddressScreen-YA46n52j.js";import T from"./NotFoundScreen-B9fIdZtZ.js";import{g as Xn}from"./analyticsHelper-CUa_2Hxt.js";import{B as Qn}from"./BusinessVerificationPageScreen-CgOqYGYR.js";import{C as Yn}from"./CompanyPassportScreen-CJkXrH5j.js";import{q as re}from"./QBOConnectionScreen-DVWXlQxR.js";import{B as Wn}from"./BillPayApprovalRoutes-NVMWEPu0.js";import{R as et}from"./ReimbursementApprovalRoutes-SuUGS_MC.js";import"./recharts-CPOd-6nk.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./utils-jfneV6S1.js";import"./routePaths-FsWFCrEG.js";import"./empty-BR4JY50t.js";import"./pdf-lib-DQ75GOuH.js";import"./index-BlE_QRZ7.js";import"./url-BdgRfFdn.js";import"./index-CHewEF_r.js";import"./decodeURIComponentSafe-CRJGdpaG.js";import"./ReimbursementApprovalRuleDetailScreen-CvAjyFdG.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]="141754f2-c264-4b87-ac68-41723230eb79",e._sentryDebugIdIdentifier="sentry-dbid-141754f2-c264-4b87-ac68-41723230eb79")}catch{}})();const nt=M.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-C6NDyiJv.js";import{j as X,u as Q,h as Y,l as W,g as E,N as j,k as G,q as Qe}from"./core-DrFqYlht.js";import{bE as Ye,ck as Ie,ML as ye,eO as x,cw as en,xu as Z,xj as nn,MX as tn,M_ as an,pO as ee,pC as ne,k8 as te,rU as z,N0 as Ae,fA as $e,fz as We,fy as Ge,N1 as sn,xD as on,Bu as ke,Bl as _e,Bi as ve,B9 as K,Bo as Pe,Br as Ee,Bx as we,sm as Te,fP as cn,cr as rn,eU as un,eS as dn,eT as ln,bs as pn,N2 as mn,Ab as le,AP as yn,N3 as fn,bF as gn,CK as pe,BO as Sn,N4 as bn,N5 as hn,CO as Cn,CS as In,rN as An,Ha as kn,Dn as Ce,Eg as me,N6 as _n,N7 as vn,N8 as Pn,N9 as He,Na as En,JF as wn,M8 as Tn,JR as Dn,Nb as qe,Nc as Fe,DB as Ke,kg as Un,pF as Je,rW as On,bD as Ne,s6 as je,cu as Bn,Nd as Xe,fc as Fn,D5 as xn,D9 as Vn,Ne as Nn,Dq as Re,Nf as jn,Ng as Rn,Nh as zn,Ni as Ln,fI as Mn,yO as Zn,Nj as $n,yT as Wn,yS as Gn}from"./zeni-epic-state-vpQnS6PI.js";import{k as ae,y as ie,S as de,m as De,aK as J,z as T,A as se,c as w,B as Ue,e as $,bq as Hn,aq as oe,br as V,bs as qn,bt as Kn,ac as Ve,bu as Jn,r as ze,ar as Le,Z as Xn,G as Qn,bv as Yn,bw as et,bx as nt,a3 as tt}from"./index-gIHwUZJz.js";import{a as C}from"./sentry-DorFMwQU.js";import{n as xe,D as at,S as it}from"./mui-BfKuxuES.js";import{M as fe}from"./MobileAppDrawer-DSdJwfd5.js";import R from"./NotFoundScreen-Du1hgJnA.js";import{a as Me}from"./analyticsHelper-CM7-DzIH.js";import{c as Ze}from"./routePaths-DwqXZ9IC.js";import{B as Be}from"./BusinessVerificationPageScreen-CJhDGXDa.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="be71a3c4-cfb5-4f64-a782-e413733118b2",e._sentryDebugIdIdentifier="sentry-dbid-be71a3c4-cfb5-4f64-a782-e413733118b2")}catch{}})();const st=xe.div`
1
+ import{j as u}from"./liveblocks-JFc2ySVL.js";import{j as X,u as Q,h as Y,l as W,g as E,N as j,k as G,q as Qe}from"./core-BUa4y4mL.js";import{bE as Ye,ck as Ie,ML as ye,eO as x,cw as en,xu as Z,xj as nn,MX as tn,M_ as an,pO as ee,pC as ne,k8 as te,rU as z,N0 as Ae,fA as $e,fz as We,fy as Ge,N1 as sn,xD as on,Bu as ke,Bl as _e,Bi as ve,B9 as K,Bo as Pe,Br as Ee,Bx as we,sm as Te,fP as cn,cr as rn,eU as un,eS as dn,eT as ln,bs as pn,N2 as mn,Ab as le,AP as yn,N3 as fn,bF as gn,CK as pe,BO as Sn,N4 as bn,N5 as hn,CO as Cn,CS as In,rN as An,Ha as kn,Dn as Ce,Eg as me,N6 as _n,N7 as vn,N8 as Pn,N9 as He,Na as En,JF as wn,M8 as Tn,JR as Dn,Nb as qe,Nc as Fe,DB as Ke,kg as Un,pF as Je,rW as On,bD as Ne,s6 as je,cu as Bn,Nd as Xe,fc as Fn,D5 as xn,D9 as Vn,Ne as Nn,Dq as Re,Nf as jn,Ng as Rn,Nh as zn,Ni as Ln,fI as Mn,yO as Zn,Nj as $n,yT as Wn,yS as Gn}from"./zeni-epic-state-CGaNHYyd.js";import{k as ae,y as ie,S as de,m as De,aK as J,z as T,A as se,c as w,B as Ue,e as $,bq as Hn,aq as oe,br as V,bs as qn,bt as Kn,ac as Ve,bu as Jn,r as ze,ar as Le,Z as Xn,G as Qn,bv as Yn,bw as et,bx as nt,a3 as tt}from"./index-BqVUPrfN.js";import{a as C}from"./sentry-DbhlVCDx.js";import{n as xe,D as at,S as it}from"./mui-RJ5XtWIj.js";import{M as fe}from"./MobileAppDrawer-DSgPRxOv.js";import R from"./NotFoundScreen-B9fIdZtZ.js";import{a as Me}from"./analyticsHelper-CUa_2Hxt.js";import{c as Ze}from"./routePaths-FsWFCrEG.js";import{B as Be}from"./BusinessVerificationPageScreen-CgOqYGYR.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="be71a3c4-cfb5-4f64-a782-e413733118b2",e._sentryDebugIdIdentifier="sentry-dbid-be71a3c4-cfb5-4f64-a782-e413733118b2")}catch{}})();const st=xe.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-C6NDyiJv.js";import{a as u,b as T,q as A}from"./sentry-DorFMwQU.js";import{h as D,j as z,g as c,u as M,N as O,k as P}from"./core-DrFqYlht.js";import{u as j,z as s,m as F,c as E,D as B,d as _,e as N,v as V,g as W,s as $,f as v}from"./index-gIHwUZJz.js";import{eO as q,IQ as H,IR as J,eP as Q,fi as R,IW as X,fH as Y,cT as Z,IX as b,IY as G,IZ as K,bS as y}from"./zeni-epic-state-vpQnS6PI.js";import"./mui-BfKuxuES.js";import{u as ee}from"./useDeviceId-B51M4N2b.js";import{f as te}from"./analyticsHelper-CM7-DzIH.js";import{t as ne}from"./getLocaleForTenant-CtOQ1QSt.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.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]="b5d98948-9206-465c-af91-af3db5706c6a",t._sentryDebugIdIdentifier="sentry-dbid-b5d98948-9206-465c-af91-af3db5706c6a")}catch{}})();const ie=P(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},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 l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(K({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(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(G(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=j(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),I=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>q(e)),S=c(e=>H(e)),m=M(),w=F().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(S.tenantsInOrder),o.zeniSessionId),Q(o.userId,o.zeniSessionId,r.tenantId),i(R(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(X("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Z(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(V,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
1
+ import{j as f}from"./liveblocks-JFc2ySVL.js";import{a as u,b as T,q as A}from"./sentry-DbhlVCDx.js";import{h as D,j as z,g as c,u as M,N as O,k as P}from"./core-BUa4y4mL.js";import{u as j,z as s,m as F,c as E,D as B,d as _,e as N,v as V,g as W,s as $,f as v}from"./index-BqVUPrfN.js";import{eO as q,IQ as H,IR as J,eP as Q,fi as R,IW as X,fH as Y,cT as Z,IX as b,IY as G,IZ as K,bS as y}from"./zeni-epic-state-CGaNHYyd.js";import"./mui-RJ5XtWIj.js";import{u as ee}from"./useDeviceId-BqTcE7B1.js";import{f as te}from"./analyticsHelper-CUa_2Hxt.js";import{t as ne}from"./getLocaleForTenant-Crr4jHK_.js";import"./recharts-CPOd-6nk.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./utils-jfneV6S1.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]="b5d98948-9206-465c-af91-af3db5706c6a",t._sentryDebugIdIdentifier="sentry-dbid-b5d98948-9206-465c-af91-af3db5706c6a")}catch{}})();const ie=P(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},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 l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(K({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(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(G(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=j(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),I=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>q(e)),S=c(e=>H(e)),m=M(),w=F().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(S.tenantsInOrder),o.zeniSessionId),Q(o.userId,o.zeniSessionId,r.tenantId),i(R(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(X("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Z(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(V,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-C6NDyiJv.js";import{a as n}from"./sentry-DorFMwQU.js";import{h as u,u as m,j as p,N as g}from"./core-DrFqYlht.js";import{z as f,B as y,t as h,c as d,e as b}from"./index-gIHwUZJz.js";import{fM as x,fN as I,Jc as j}from"./zeni-epic-state-vpQnS6PI.js";import{n as w}from"./mui-BfKuxuES.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.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]="d1de2f4c-23a1-424a-adfc-b26950971633",e._sentryDebugIdIdentifier="sentry-dbid-d1de2f4c-23a1-424a-adfc-b26950971633")}catch{}})();function U(){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)),j(),h.reset(),d.trackLogout(b.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=w.div`
1
+ import{j as s}from"./liveblocks-JFc2ySVL.js";import{a as n}from"./sentry-DbhlVCDx.js";import{h as u,u as m,j as p,N as g}from"./core-BUa4y4mL.js";import{z as f,B as y,t as h,c as d,e as b}from"./index-BqVUPrfN.js";import{fM as x,fN as I,Jc as j}from"./zeni-epic-state-CGaNHYyd.js";import{n as w}from"./mui-RJ5XtWIj.js";import"./recharts-CPOd-6nk.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./utils-jfneV6S1.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]="d1de2f4c-23a1-424a-adfc-b26950971633",e._sentryDebugIdIdentifier="sentry-dbid-d1de2f4c-23a1-424a-adfc-b26950971633")}catch{}})();function U(){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)),j(),h.reset(),d.trackLogout(b.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=w.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as p}from"./liveblocks-C6NDyiJv.js";import{a as g}from"./sentry-DorFMwQU.js";import{j as U,h as _,u as z,g as b,l as O,k as M}from"./core-DrFqYlht.js";import{z as R,y as Z,S as d,A as q,c as V,e as W,cI as H,r as f,q as J}from"./index-gIHwUZJz.js";import{eO as X,Q1 as x,FO as y,Q2 as A,PZ as Y,Fe as S,Q3 as aa,Fi as I,EN as ea,FP as F,Q4 as B,gM as ta,FF as sa,FK as oa,Fx as na,Fv as w,FL as ia,Fs as la,Q5 as ra,Q6 as ca,Q7 as ka,Q8 as ua,Q9 as m,ea as pa,Qa as da,Qb as ma}from"./zeni-epic-state-vpQnS6PI.js";import{n as Ta}from"./mui-BfKuxuES.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-SdJdV09H.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js";import{M as ha}from"./MobileAppDrawer-DSdJwfd5.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.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]="c4a73224-82a9-4e2d-9bcc-1f34a5e64463",e._sentryDebugIdIdentifier="sentry-dbid-c4a73224-82a9-4e2d-9bcc-1f34a5e64463")}catch{}})();const Da=Ta.div`
1
+ import{j as p}from"./liveblocks-JFc2ySVL.js";import{a as g}from"./sentry-DbhlVCDx.js";import{j as U,h as _,u as z,g as b,l as O,k as M}from"./core-BUa4y4mL.js";import{z as R,y as Z,S as d,A as q,c as V,e as W,cI as H,r as f,q as J}from"./index-BqVUPrfN.js";import{eO as X,Q1 as x,FO as y,Q2 as A,PZ as Y,Fe as S,Q3 as aa,Fi as I,EN as ea,FP as F,Q4 as B,gM as ta,FF as sa,FK as oa,Fx as na,Fv as w,FL as ia,Fs as la,Q5 as ra,Q6 as ca,Q7 as ka,Q8 as ua,Q9 as m,ea as pa,Qa as da,Qb as ma}from"./zeni-epic-state-CGaNHYyd.js";import{n as Ta}from"./mui-RJ5XtWIj.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-CzbTY4Ry.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-HdAnpaOw.js";import{M as ha}from"./MobileAppDrawer-DSgPRxOv.js";import"./recharts-CPOd-6nk.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./utils-jfneV6S1.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]="c4a73224-82a9-4e2d-9bcc-1f34a5e64463",e._sentryDebugIdIdentifier="sentry-dbid-c4a73224-82a9-4e2d-9bcc-1f34a5e64463")}catch{}})();const Da=Ta.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-C6NDyiJv.js";import se from"./NotFoundScreen-Du1hgJnA.js";import{a as c}from"./sentry-DorFMwQU.js";import{j as O,h as Z,g as f,u as ne,l as oe,N as ie,k as re,n as ce,o as g}from"./core-DrFqYlht.js";import{FS as M,FV as le,FY as de,eO as Q,PZ as H,Fa as J,EU as pe,FC as ue,Fv as ke,P_ as K,P$ as V,EQ as me,EN as ge,pO as fe,pC as he,k8 as Se,F0 as Ie,Q0 as Te,F5 as Ee,F2 as be,EX as Ce,Ff as Ge,Fe as De}from"./zeni-epic-state-vpQnS6PI.js";import{z as G,cG as Fe,w as xe,y as ye,S as E,q as W,r as j,A as je,c as z,e as we,cH as ve,f as A,aq as Re}from"./index-gIHwUZJz.js";import{n as Pe}from"./mui-BfKuxuES.js";import{u as Be}from"./useInitialThreadRequest-C8hN7EcF.js";import{M as Ue}from"./MobileAppDrawer-DSdJwfd5.js";import Le from"./TaskListScreen-BDFYRBL0.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.js";import"./useAskAiCfoHostNavButtonProps-SdJdV09H.js";import"./useFetchSuggestedQuestionsWhenReady-1RkvixCJ.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]="14196173-aa19-4ed6-a193-020eb4ac7423",e._sentryDebugIdIdentifier="sentry-dbid-14196173-aa19-4ed6-a193-020eb4ac7423")}catch{}})();function $e(){const e=O(),t=Z(),s=G.getSignedInUser(),{cannedResponses:d,fetchState:r,saveFetchState:p}=f(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[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:d,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:p==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let _,q=[];const Ne=re(function(e,t){const{location:s,taskGroupId:d}=t,r=K(e,t.taskId),p=Q(e),l=d!=null?V(e.taskGroupState,d):void 0,k=G.getSignedInUser(),a=p.tenantId,o={userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:a??""},h=H(e),{tenantEmailDomain:S}=p,b=r.recurringSourceTaskId,D=b!=null?`${A.appUrl}/${S}/tasks/${encodeURIComponent(b)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:o,isZeniUser:G.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==_&&(_=I,q=Object.values(I)),q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:D,tagListView:h,taskGroupName:d!=null&&l!=null&&l.isDefault===!1?l.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(u=>V(e.taskGroupState,u)).filter(u=>u!=null&&!u.isDeleted).map(u=>({id:u.id,name:u.name,isDefault:u.isDefault}))}},function(e,t){const{taskId:s,navigate:d,currentTenant:r,location:p,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(be(a,o))},onUnsnoozeTask:a=>{e(Ee(a))},onDismissClick:()=>{if(p.state?.message==="triggerBackClick"){const a=W(p.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";d(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=w(k),o=j(p.state?.pathnameStackToGoBack,p.pathname);d(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(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(J(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{d(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function y(){const e=O(),t=Z(),s=ne(),d=xe(),{taskId:r,taskGroupId:p}=oe(),l=f(i=>Q(i)),k=Be(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(E.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(E.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(E.isTaskCannedResponsesEnabled),{isFeatureEnabled:b}=a(E.isTaskRecurringParentEnabled),{isFeatureEnabled:D}=a(E.isTaskGroupAssigneesEnabled),[I,u]=c.useState(!1),[v,X]=c.useState(!1),[R,Y]=c.useState(!1),[P,ee]=c.useState(!1),[B,F]=c.useState(!1),T=c.useRef(!1),C=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>H(i)),L=f(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{v||(X(!0),t(J(!1,r)))},[v,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(Y(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{P||L==="Completed"||(ee(!0),t(ue()))},[P,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),F(!0))},[t,r]);c.useEffect(()=>{if(B)if(C!=="In-Progress"){if(T.current){if(C==="Error")return F(!1),void(T.current=!1);if(C==="Completed"){F(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=w(i);e(m,{state:{pathnameStackToGoBack:j(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[B,C,l,s,e]);const $=f(i=>K(i,r)),x=$.fetchState,N=G.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(x==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=w(i),te=j(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[x==="Completed"?n.jsx(je,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ve,{children:[n.jsx(Ue,{isAppContentDrawerOpen:I,handleDrawerToggle:i=>{u(i)}}),n.jsx(Ne,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{d.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:p,taskId:r,taskDetailFetchState:x,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:b,isTaskGroupAssigneesEnabled:D})]})]})}const Ve=Pe.div`
1
+ import{j as n}from"./liveblocks-JFc2ySVL.js";import se from"./NotFoundScreen-B9fIdZtZ.js";import{a as c}from"./sentry-DbhlVCDx.js";import{j as O,h as Z,g as f,u as ne,l as oe,N as ie,k as re,n as ce,o as g}from"./core-BUa4y4mL.js";import{FS as M,FV as le,FY as de,eO as Q,PZ as H,Fa as J,EU as pe,FC as ue,Fv as ke,P_ as K,P$ as V,EQ as me,EN as ge,pO as fe,pC as he,k8 as Se,F0 as Ie,Q0 as Te,F5 as Ee,F2 as be,EX as Ce,Ff as Ge,Fe as De}from"./zeni-epic-state-CGaNHYyd.js";import{z as G,cG as Fe,w as xe,y as ye,S as E,q as W,r as j,A as je,c as z,e as we,cH as ve,f as A,aq as Re}from"./index-BqVUPrfN.js";import{n as Pe}from"./mui-RJ5XtWIj.js";import{u as Be}from"./useInitialThreadRequest-BwBVCvna.js";import{M as Ue}from"./MobileAppDrawer-DSgPRxOv.js";import Le from"./TaskListScreen-DTiPtOdu.js";import"./recharts-CPOd-6nk.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./utils-jfneV6S1.js";import"./useAskAiCfoHostNavButtonProps-CzbTY4Ry.js";import"./useFetchSuggestedQuestionsWhenReady-HdAnpaOw.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]="14196173-aa19-4ed6-a193-020eb4ac7423",e._sentryDebugIdIdentifier="sentry-dbid-14196173-aa19-4ed6-a193-020eb4ac7423")}catch{}})();function $e(){const e=O(),t=Z(),s=G.getSignedInUser(),{cannedResponses:d,fetchState:r,saveFetchState:p}=f(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[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:d,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:p==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let _,q=[];const Ne=re(function(e,t){const{location:s,taskGroupId:d}=t,r=K(e,t.taskId),p=Q(e),l=d!=null?V(e.taskGroupState,d):void 0,k=G.getSignedInUser(),a=p.tenantId,o={userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:a??""},h=H(e),{tenantEmailDomain:S}=p,b=r.recurringSourceTaskId,D=b!=null?`${A.appUrl}/${S}/tasks/${encodeURIComponent(b)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:o,isZeniUser:G.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==_&&(_=I,q=Object.values(I)),q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:D,tagListView:h,taskGroupName:d!=null&&l!=null&&l.isDefault===!1?l.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(u=>V(e.taskGroupState,u)).filter(u=>u!=null&&!u.isDeleted).map(u=>({id:u.id,name:u.name,isDefault:u.isDefault}))}},function(e,t){const{taskId:s,navigate:d,currentTenant:r,location:p,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(be(a,o))},onUnsnoozeTask:a=>{e(Ee(a))},onDismissClick:()=>{if(p.state?.message==="triggerBackClick"){const a=W(p.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";d(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=w(k),o=j(p.state?.pathnameStackToGoBack,p.pathname);d(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(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(J(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{d(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function y(){const e=O(),t=Z(),s=ne(),d=xe(),{taskId:r,taskGroupId:p}=oe(),l=f(i=>Q(i)),k=Be(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(E.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(E.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(E.isTaskCannedResponsesEnabled),{isFeatureEnabled:b}=a(E.isTaskRecurringParentEnabled),{isFeatureEnabled:D}=a(E.isTaskGroupAssigneesEnabled),[I,u]=c.useState(!1),[v,X]=c.useState(!1),[R,Y]=c.useState(!1),[P,ee]=c.useState(!1),[B,F]=c.useState(!1),T=c.useRef(!1),C=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>H(i)),L=f(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{v||(X(!0),t(J(!1,r)))},[v,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(Y(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{P||L==="Completed"||(ee(!0),t(ue()))},[P,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),F(!0))},[t,r]);c.useEffect(()=>{if(B)if(C!=="In-Progress"){if(T.current){if(C==="Error")return F(!1),void(T.current=!1);if(C==="Completed"){F(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=w(i);e(m,{state:{pathnameStackToGoBack:j(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[B,C,l,s,e]);const $=f(i=>K(i,r)),x=$.fetchState,N=G.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(x==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=w(i),te=j(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[x==="Completed"?n.jsx(je,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ve,{children:[n.jsx(Ue,{isAppContentDrawerOpen:I,handleDrawerToggle:i=>{u(i)}}),n.jsx(Ne,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{d.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:p,taskId:r,taskDetailFetchState:x,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:b,isTaskGroupAssigneesEnabled:D})]})]})}const Ve=Pe.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -0,0 +1 @@
1
+ import{j as t}from"./liveblocks-JFc2ySVL.js";import i from"./NotFoundScreen-B9fIdZtZ.js";import{T as r}from"./TransactionDetailScreen-CVJIejMp.js";import"./sentry-DbhlVCDx.js";import{n as a,o}from"./core-BUa4y4mL.js";import"./zeni-epic-state-CGaNHYyd.js";import"./recharts-CPOd-6nk.js";import"./index-BqVUPrfN.js";import"./mui-RJ5XtWIj.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./utils-jfneV6S1.js";import"./useAskAiCfoHostNavButtonProps-CzbTY4Ry.js";import"./useFetchSuggestedQuestionsWhenReady-HdAnpaOw.js";import"./decodeURIComponentSafe-CRJGdpaG.js";import"./routePaths-FsWFCrEG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="eb8d9915-3f2e-47a0-a713-5db167080b95",e._sentryDebugIdIdentifier="sentry-dbid-eb8d9915-3f2e-47a0-a713-5db167080b95")}catch{}})();function q(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-C6NDyiJv.js";import{a as d}from"./sentry-DorFMwQU.js";import{h as j,g as S,u as re,j as le,l as de,N as Re,k as Ge}from"./core-DrFqYlht.js";import{bn as je,eO as K,cP as ue,bv as me,pt as Y,K3 as B,L4 as pe,L5 as J,Kt as he,jL as fe,L6 as ge,Ky as Z,Kz as Q,kA as Se,H2 as X,JZ as x,jF as ye,jD as Te,jP as $e,L7 as Me,L8 as qe,tp as G,jK as ve,Gp as Ee,cU as He,cV as We,L9 as Ke,JY as Ye,La as Je,tt as Ze,Lb as Qe,Lc as Xe,Ld as ea,Le as aa,Lf as ta,jO as na,Lg as oa,Lh as sa,J_ as ia,Li as ca,Lj as ra,Lk as la,Gj as da,G7 as ua,GB as ma,jQ as pa,H3 as ie,Gg as ha}from"./zeni-epic-state-vpQnS6PI.js";import{z as De,y as ee,S as _,aK as be,m as fa,Z as ga,aL as Sa,G as ya,q as H,k as Ta,aM as va,r as W,c as Ce,aN as Ea,aq as Da,Y as q}from"./index-gIHwUZJz.js";import{n as ba,S as Ca,D as Ia}from"./mui-BfKuxuES.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-SdJdV09H.js";import{c as La}from"./useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js";import{d as Ie}from"./decodeURIComponentSafe-BIE62qI8.js";import{h as ke,g as Ua,d as Aa,b as xa}from"./routePaths-DwqXZ9IC.js";import{t as _a}from"./utils-BiDInqYy.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]="258773a8-1b6f-44d1-b6ae-0b54aa072ca3",a._sentryDebugIdIdentifier="sentry-dbid-258773a8-1b6f-44d1-b6ae-0b54aa072ca3")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ja(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(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:y}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:C}=t(_.isExpenseAutomationEnabled),{configValue:h}=n(be.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),T=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>B(u,T)),b=S(u=>{const N=B(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),L=S(u=>J(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),$=o.company?.companyInfo.firstMonthOfFY??1,M=S(u=>fe(u.accountState,u.accountListState,"accountList")),[w,P]=d.useState(!1),[F,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{P(!1),v(!1),O(!1)},[a,e]);const D=d.useCallback(()=>{P(!1),v(!1)},[]),[U,A]=d.useState(!1),z=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)&&(w?F||E==null||(v(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:z??E}))):(s(Z()),s(Q()),P(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,w,F,E,z]),d.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?A(!0):A(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:y,isExpenseAutomationEnabled:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:T,transactionDetail:m,vendorSaveStatus:b,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:L,uiState:V,firstMonthOfFY:$,uncategorizedAccounts:M,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:A}}const Va={overlayWidth:new ya(100,100,58)},Pa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>J(h)),y=()=>{t()},C={vendorDetailView:n??g,onSaveSuccess:()=>{l(Te()),l($e("Not-Started")),s()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:h=>{l(ye({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:I.jsx(Ba,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...C})})})},Ba=ba(Ca)`
1
+ import{j as I}from"./liveblocks-JFc2ySVL.js";import{a as d}from"./sentry-DbhlVCDx.js";import{h as j,g as S,u as re,j as le,l as de,N as Re,k as Ge}from"./core-BUa4y4mL.js";import{bn as je,eO as K,cP as ue,bv as me,pt as Y,K3 as B,L4 as pe,L5 as J,Kt as he,jL as fe,L6 as ge,Ky as Z,Kz as Q,kA as Se,H2 as X,JZ as x,jF as ye,jD as Te,jP as $e,L7 as Me,L8 as qe,tp as G,jK as ve,Gp as Ee,cU as He,cV as We,L9 as Ke,JY as Ye,La as Je,tt as Ze,Lb as Qe,Lc as Xe,Ld as ea,Le as aa,Lf as ta,jO as na,Lg as oa,Lh as sa,J_ as ia,Li as ca,Lj as ra,Lk as la,Gj as da,G7 as ua,GB as ma,jQ as pa,H3 as ie,Gg as ha}from"./zeni-epic-state-CGaNHYyd.js";import{z as De,y as ee,S as _,aK as be,m as fa,Z as ga,aL as Sa,G as ya,q as H,k as Ta,aM as va,r as W,c as Ce,aN as Ea,aq as Da,Y as q}from"./index-BqVUPrfN.js";import{n as ba,S as Ca,D as Ia}from"./mui-RJ5XtWIj.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-CzbTY4Ry.js";import{c as La}from"./useFetchSuggestedQuestionsWhenReady-HdAnpaOw.js";import{d as Ie}from"./decodeURIComponentSafe-CRJGdpaG.js";import{h as ke,g as Ua,d as Aa,b as xa}from"./routePaths-FsWFCrEG.js";import{t as _a}from"./utils-jfneV6S1.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]="258773a8-1b6f-44d1-b6ae-0b54aa072ca3",a._sentryDebugIdIdentifier="sentry-dbid-258773a8-1b6f-44d1-b6ae-0b54aa072ca3")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ja(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(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:y}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:C}=t(_.isExpenseAutomationEnabled),{configValue:h}=n(be.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),T=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>B(u,T)),b=S(u=>{const N=B(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),L=S(u=>J(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),$=o.company?.companyInfo.firstMonthOfFY??1,M=S(u=>fe(u.accountState,u.accountListState,"accountList")),[w,P]=d.useState(!1),[F,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{P(!1),v(!1),O(!1)},[a,e]);const D=d.useCallback(()=>{P(!1),v(!1)},[]),[U,A]=d.useState(!1),z=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)&&(w?F||E==null||(v(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:z??E}))):(s(Z()),s(Q()),P(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,w,F,E,z]),d.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?A(!0):A(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:y,isExpenseAutomationEnabled:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:T,transactionDetail:m,vendorSaveStatus:b,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:L,uiState:V,firstMonthOfFY:$,uncategorizedAccounts:M,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:A}}const Va={overlayWidth:new ya(100,100,58)},Pa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>J(h)),y=()=>{t()},C={vendorDetailView:n??g,onSaveSuccess:()=>{l(Te()),l($e("Not-Started")),s()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:h=>{l(ye({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:I.jsx(Ba,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...C})})})},Ba=ba(Ca)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-C6NDyiJv.js";import{j as N,u as R,h as U,l as Z,g as j,N as C,k as H,n as Ae,o as b}from"./core-DrFqYlht.js";import{eO as $,iZ as T,Os as K,GV as ue,bq as ie,Ot as he,jA as Q,Kv as W,Ou as se,Ov as Se,bD as x,GS as me,Ow as ke,Ox as re,Oy as Ie,Oz as pe,OA as be,OB as ve,OC as de,I6 as Ye,bn as xe}from"./zeni-epic-state-vpQnS6PI.js";import{D as X,c as z,c6 as ee,r as w,q as te,y as fe,S as J,V as Ee,z as Pe}from"./index-gIHwUZJz.js";import"./mui-BfKuxuES.js";import{a as y}from"./sentry-DorFMwQU.js";import{w as ae}from"./withTransactionSidePanel-51Ock1rJ.js";import{p as ne,b as ce}from"./routePaths-DwqXZ9IC.js";import{u as Oe}from"./utils-BiDInqYy.js";import{d as O}from"./decodeURIComponentSafe-BIE62qI8.js";import{Z as je}from"./ZeniAccountStatementScreen-C7x2WOwU.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./useAskAiCfoHostNavButtonProps-SdJdV09H.js";import"./useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js";import"./TransactionDetailScreen-Ci4ZELq0.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]="2b92ecf5-ae50-496d-95fc-093f9272c83f",a._sentryDebugIdIdentifier="sentry-dbid-2b92ecf5-ae50-496d-95fc-093f9272c83f")}catch{}})();const Le=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],_=a=>Oe(a),Ce=H(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,_(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Q(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=X.getLocalizedStrings(),s=_(e.selectedAccount.tranListType),r=Me(t,n,c,s,e.bookCloseDate);z.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:_(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:_(e.selectedAccount.tranListType)}))}}})(ee),G=ae(function({...a}){const e=N(),t=R(),n=U(),c=t.pathname.split("/").find(d=>Le.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=Z(),r=X.getLocalizedStrings(),{accountType:p,title:A,subTitle:h}=ze(o),S="month",k=j(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Be(o,D,k.bookCloseDate),[E,B]=y.useState(!1),[Y,M]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:K(p),title:A,subTitle:h,timeframe:S,period:d}},[o,S,p,g]);y.useEffect(()=>{if(!E&&l!=null){B(!0),z.trackTransactionList(void 0,void 0,void 0,l.title);const d=_(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&Y!=null&&(P={...l,period:Y}),c==null||P==null?i.jsx(C,{to:"../"}):i.jsx(Ce,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>M(d),...a})}),ze=a=>{let e="",t="";const n=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Be=(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}}},Me=(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},Fe=H(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:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Q(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)}`),z.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=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Ge=ae(function({referrerType:a,...e}){const t=N(),n=R(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:h,endDate:S,titleEncoded:k}=Z(),D=O(s??""),g=O(r??""),v=O(p??""),E=O(k??""),B=j(f=>Se(f.transactionListState,g,D,v)),[Y,M]=y.useState(!1),[l,P]=y.useState(void 0),d=j(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=_e(D,g,v,A,h,S,E);if(m){const f={startDate:x(h,"YYYY-MM-DD"),endDate:x(S,"YYYY-MM-DD")},q=we(B?.dateRange,f);u={accountId:g,accountType:K(D),classId:v,title:E,timeframe:A,period:q}}y.useEffect(()=>{Y||u==null||(M(!0),z.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[Y,u,c]);let L=u;u!=null&&l!=null&&(L={...u,period:l});const F=[s,r,p,A,h,S,k].filter(f=>f!=null);return m&&L!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(C,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},_e=(a,e,t,n,c,o,s)=>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()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=H(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:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:Q(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)}`),z.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=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=qe(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=N(),n=R(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:h,titleEncoded:S,excludeSubAccounts:k}=Z(),D=O(s??""),g=O(r??""),v=O(S??""),E=!(k!=null&&k==="exclude_subaccounts"),B=j(I=>Ie(I.transactionListState,g,D)),[Y,M]=y.useState(!1),[l,P]=y.useState(void 0),d=j(I=>$(I)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const L=$e(D,g,p,A,h,v);if(L){const I={startDate:x(A,"YYYY-MM-DD"),endDate:x(h,"YYYY-MM-DD")},ye=Ve(B?.dateRange,I);m={accountId:g,accountType:K(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:q}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!Y&&m!=null&&oe&&(M(!0),z.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[Y,m,c,oe]);const ge=[s,r,p,A,h,S].filter(I=>I!=null);return L&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:q,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:I=>P(I),...e}):i.jsx(C,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(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,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),qe=a=>`/${a}/transactions/${Ye}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=j(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[j(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(J.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(b,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(b,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/uncategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/uncategorized-expense/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-expense/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/missing-receipts/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Ge,{referrerType:a})})]})}export{pt as default};
1
+ import{j as i}from"./liveblocks-JFc2ySVL.js";import{j as N,u as R,h as U,l as Z,g as j,N as C,k as H,n as Ae,o as b}from"./core-BUa4y4mL.js";import{eO as $,iZ as T,Os as K,GV as ue,bq as ie,Ot as he,jA as Q,Kv as W,Ou as se,Ov as Se,bD as x,GS as me,Ow as ke,Ox as re,Oy as Ie,Oz as pe,OA as be,OB as ve,OC as de,I6 as Ye,bn as xe}from"./zeni-epic-state-CGaNHYyd.js";import{D as X,c as z,c6 as ee,r as w,q as te,y as fe,S as J,V as Ee,z as Pe}from"./index-BqVUPrfN.js";import"./mui-RJ5XtWIj.js";import{a as y}from"./sentry-DbhlVCDx.js";import{w as ae}from"./withTransactionSidePanel-_HCg7dnz.js";import{p as ne,b as ce}from"./routePaths-FsWFCrEG.js";import{u as Oe}from"./utils-jfneV6S1.js";import{d as O}from"./decodeURIComponentSafe-CRJGdpaG.js";import{Z as je}from"./ZeniAccountStatementScreen-BudCs1Qh.js";import"./recharts-CPOd-6nk.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./useAskAiCfoHostNavButtonProps-CzbTY4Ry.js";import"./useFetchSuggestedQuestionsWhenReady-HdAnpaOw.js";import"./TransactionDetailScreen-CVJIejMp.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]="2b92ecf5-ae50-496d-95fc-093f9272c83f",a._sentryDebugIdIdentifier="sentry-dbid-2b92ecf5-ae50-496d-95fc-093f9272c83f")}catch{}})();const Le=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],_=a=>Oe(a),Ce=H(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,_(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Q(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=X.getLocalizedStrings(),s=_(e.selectedAccount.tranListType),r=Me(t,n,c,s,e.bookCloseDate);z.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:_(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:_(e.selectedAccount.tranListType)}))}}})(ee),G=ae(function({...a}){const e=N(),t=R(),n=U(),c=t.pathname.split("/").find(d=>Le.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=Z(),r=X.getLocalizedStrings(),{accountType:p,title:A,subTitle:h}=ze(o),S="month",k=j(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Be(o,D,k.bookCloseDate),[E,B]=y.useState(!1),[Y,M]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:K(p),title:A,subTitle:h,timeframe:S,period:d}},[o,S,p,g]);y.useEffect(()=>{if(!E&&l!=null){B(!0),z.trackTransactionList(void 0,void 0,void 0,l.title);const d=_(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&Y!=null&&(P={...l,period:Y}),c==null||P==null?i.jsx(C,{to:"../"}):i.jsx(Ce,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>M(d),...a})}),ze=a=>{let e="",t="";const n=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Be=(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}}},Me=(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},Fe=H(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:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Q(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)}`),z.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=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Ge=ae(function({referrerType:a,...e}){const t=N(),n=R(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:h,endDate:S,titleEncoded:k}=Z(),D=O(s??""),g=O(r??""),v=O(p??""),E=O(k??""),B=j(f=>Se(f.transactionListState,g,D,v)),[Y,M]=y.useState(!1),[l,P]=y.useState(void 0),d=j(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=_e(D,g,v,A,h,S,E);if(m){const f={startDate:x(h,"YYYY-MM-DD"),endDate:x(S,"YYYY-MM-DD")},q=we(B?.dateRange,f);u={accountId:g,accountType:K(D),classId:v,title:E,timeframe:A,period:q}}y.useEffect(()=>{Y||u==null||(M(!0),z.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[Y,u,c]);let L=u;u!=null&&l!=null&&(L={...u,period:l});const F=[s,r,p,A,h,S,k].filter(f=>f!=null);return m&&L!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(C,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},_e=(a,e,t,n,c,o,s)=>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()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=H(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:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:Q(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)}`),z.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=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=qe(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=N(),n=R(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:h,titleEncoded:S,excludeSubAccounts:k}=Z(),D=O(s??""),g=O(r??""),v=O(S??""),E=!(k!=null&&k==="exclude_subaccounts"),B=j(I=>Ie(I.transactionListState,g,D)),[Y,M]=y.useState(!1),[l,P]=y.useState(void 0),d=j(I=>$(I)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const L=$e(D,g,p,A,h,v);if(L){const I={startDate:x(A,"YYYY-MM-DD"),endDate:x(h,"YYYY-MM-DD")},ye=Ve(B?.dateRange,I);m={accountId:g,accountType:K(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:q}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!Y&&m!=null&&oe&&(M(!0),z.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[Y,m,c,oe]);const ge=[s,r,p,A,h,S].filter(I=>I!=null);return L&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:q,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:I=>P(I),...e}):i.jsx(C,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(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,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),qe=a=>`/${a}/transactions/${Ye}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=j(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[j(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(J.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(b,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(b,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/uncategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/uncategorized-expense/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-expense/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/missing-receipts/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Ge,{referrerType:a})})]})}export{pt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-C6NDyiJv.js";import{j as B,u as L,h as P,l as N,g as f,N as U,k as V,n as xe,o as C}from"./core-DrFqYlht.js";import{cl as M,eO as D,Nd as R,Dn as ae,fc as H,D5 as ne,Nf as we,Dq as Te,Nb as Ie,Nc as se,Nu as ke,Bx as Ce,sm as be,Nh as je,DB as Ae,Ne as re,cO as Z,ws as oe,eS as Ee,eU as ve,Op as De,Oq as Fe,D6 as Ue,Or as Be,D7 as Le,Dg as Pe,bv as Re,bE as Oe,cw as Ne,bF as Ve,ck as Me,fb as _e,bs as ze,IS as $e,cj as Ge}from"./zeni-epic-state-vpQnS6PI.js";import{k as _,an as qe,z as A,A as z,c as b,b$ as He,c0 as Ze,c1 as q,Z as W,m as We,V as Je,y as ie,S as v,G as Ke,B as Qe,c2 as Xe,aq as J,r as Ye,c3 as et,q as K,c4 as tt,i as X,c5 as at,a6 as nt}from"./index-gIHwUZJz.js";import{D as st,n as O,S as rt}from"./mui-BfKuxuES.js";import ot from"./NotFoundScreen-Du1hgJnA.js";import{S as Y}from"./SetupPagesScreen-DFNkJSDZ.js";import{a as d}from"./sentry-DorFMwQU.js";import{u as it}from"./useAskAiCfoHostNavButtonProps-SdJdV09H.js";import{c as ct}from"./useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js";import{M as ce}from"./MobileAppDrawer-DSdJwfd5.js";import{F as lt}from"./FeaturePreviewScreen-CUAIKz1i.js";import{a as ee}from"./analyticsHelper-CM7-DzIH.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.js";import"./routePaths-DwqXZ9IC.js";import"./BusinessVerificationPageScreen-CJhDGXDa.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]="8aa36665-e27b-43cc-8a47-31ea1d0f4479",t._sentryDebugIdIdentifier="sentry-dbid-8aa36665-e27b-43cc-8a47-31ea1d0f4479")}catch{}})();const ut=V(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(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(He);function dt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=N(),p=_(),r=f(k=>k.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=qe(r),s=M(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(k=>D(k)),S=A.getSignedInUserTenant(o)?.companyId??g.companyId,w=A.getSignedInUser(),h=f(k=>R(k,S)),T=f(k=>k.treasurySetupViewState.fetchState),x=f(k=>k.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(k=>k.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||T!=="Not-Started"||S==null||(i(!0),n(ae(S,!0,!1)))},[c,T,S,n]),d.useEffect(()=>{u||F!=="Not-Started"||S==null||(l(!0),n(H()))},[u,F,S,n]),d.useEffect(()=>{y||x!=="Not-Started"||S==null||(I(!0),n(ne()))},[y,x,S,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(U,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(ut,{navigate:t,location:a,companyId:S,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:h,analytics:b})]})}const pt=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(je(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(Ce(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),mt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=N(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,I]=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),S=f(x=>D(x)),w=A.getSignedInUserTenant(n)?.companyId??S.companyId,h=f(x=>Ie(x)),T=f(x=>R(x,w));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{c||l!=="Not-Started"||w==null||(i(!0),o(H()))},[c,l,w,o]),d.useEffect(()=>{y||g!=="Not-Started"||w==null||(I(!0),o(ne()))},[y,g,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(pt,{analytics:b,navigate:a,transferDetails:h,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:S,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(b,"review",h.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ft=O.div`
1
+ import{j as e}from"./liveblocks-JFc2ySVL.js";import{j as B,u as L,h as P,l as N,g as f,N as U,k as V,n as xe,o as C}from"./core-BUa4y4mL.js";import{cl as M,eO as D,Nd as R,Dn as ae,fc as H,D5 as ne,Nf as we,Dq as Te,Nb as Ie,Nc as se,Nu as ke,Bx as Ce,sm as be,Nh as je,DB as Ae,Ne as re,cO as Z,ws as oe,eS as Ee,eU as ve,Op as De,Oq as Fe,D6 as Ue,Or as Be,D7 as Le,Dg as Pe,bv as Re,bE as Oe,cw as Ne,bF as Ve,ck as Me,fb as _e,bs as ze,IS as $e,cj as Ge}from"./zeni-epic-state-CGaNHYyd.js";import{k as _,an as qe,z as A,A as z,c as b,b$ as He,c0 as Ze,c1 as q,Z as W,m as We,V as Je,y as ie,S as v,G as Ke,B as Qe,c2 as Xe,aq as J,r as Ye,c3 as et,q as K,c4 as tt,i as X,c5 as at,a6 as nt}from"./index-BqVUPrfN.js";import{D as st,n as O,S as rt}from"./mui-RJ5XtWIj.js";import ot from"./NotFoundScreen-B9fIdZtZ.js";import{S as Y}from"./SetupPagesScreen-B1u5XXT5.js";import{a as d}from"./sentry-DbhlVCDx.js";import{u as it}from"./useAskAiCfoHostNavButtonProps-CzbTY4Ry.js";import{c as ct}from"./useFetchSuggestedQuestionsWhenReady-HdAnpaOw.js";import{M as ce}from"./MobileAppDrawer-DSgPRxOv.js";import{F as lt}from"./FeaturePreviewScreen-BGV0ZXxB.js";import{a as ee}from"./analyticsHelper-CUa_2Hxt.js";import"./recharts-CPOd-6nk.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./utils-jfneV6S1.js";import"./routePaths-FsWFCrEG.js";import"./BusinessVerificationPageScreen-CgOqYGYR.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]="8aa36665-e27b-43cc-8a47-31ea1d0f4479",t._sentryDebugIdIdentifier="sentry-dbid-8aa36665-e27b-43cc-8a47-31ea1d0f4479")}catch{}})();const ut=V(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(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(He);function dt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=N(),p=_(),r=f(k=>k.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=qe(r),s=M(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(k=>D(k)),S=A.getSignedInUserTenant(o)?.companyId??g.companyId,w=A.getSignedInUser(),h=f(k=>R(k,S)),T=f(k=>k.treasurySetupViewState.fetchState),x=f(k=>k.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(k=>k.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||T!=="Not-Started"||S==null||(i(!0),n(ae(S,!0,!1)))},[c,T,S,n]),d.useEffect(()=>{u||F!=="Not-Started"||S==null||(l(!0),n(H()))},[u,F,S,n]),d.useEffect(()=>{y||x!=="Not-Started"||S==null||(I(!0),n(ne()))},[y,x,S,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(U,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(ut,{navigate:t,location:a,companyId:S,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:h,analytics:b})]})}const pt=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(je(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(Ce(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),mt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=N(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,I]=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),S=f(x=>D(x)),w=A.getSignedInUserTenant(n)?.companyId??S.companyId,h=f(x=>Ie(x)),T=f(x=>R(x,w));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{c||l!=="Not-Started"||w==null||(i(!0),o(H()))},[c,l,w,o]),d.useEffect(()=>{y||g!=="Not-Started"||w==null||(I(!0),o(ne()))},[y,g,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(pt,{analytics:b,navigate:a,transferDetails:h,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:S,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(b,"review",h.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ft=O.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-C6NDyiJv.js";import{a as g}from"./sentry-DorFMwQU.js";import{j as J,u as z,l as U,g as S,k as M,h as Y,n as at,o as B,N as G}from"./core-DrFqYlht.js";import{eO as L,JV as be,JW as Ke,fP as X,cr as Ee,cs as Ie,v1 as St,JX as nt,v5 as Yt,HZ as ee,jA as te,u$ as zt,uV as qt,JY as Re,uN as Ht,uM as Zt,uG as Wt,uS as Qt,v6 as Xt,JZ as he,J_ as Ne,uO as ea,J$ as pe,eZ as ft,vl as gt,ve as vt,K0 as xt,o1 as Tt,v9 as yt,v7 as Dt,K1 as Ct,vs as bt,vp as Et,va as It,vr as Je,Gp as kt,K2 as ta,K3 as aa,cu as na,K4 as sa,K5 as oa,K6 as me,K7 as ie,K8 as ke,H_ as Me,vH as ye,HY as De,vu as wt,v2 as Ge,K9 as la,H$ as H,Ka as $e,uY as ia,Kb as ca,Kc as da,Kd as Ye,Ke as ze,Kf as qe,Kg as He,vB as we,Kh as At,vi as jt,Ki as ra,Kj as ua,Kk as ha,Kl as pa,Km as ma,Kn as Sa,Ko as fa,Kp as ga,sy as va,sz as xa,H3 as je,Kq as Ta,Kr as ya,iZ as Fe,bq as Da,Ks as Ca,Kt as ba,ky as Ea,kH as Ia,H2 as Pe,bD as st,Ku as Ft,GK as Pt,Kv as ka,Kw as wa,Kx as Aa,kJ as ja,Ky as ot,Kz as lt,KA as it,KB as ct,KC as Fa,kF as Pa,KD as _a,kI as Va,KE as La,KF as _t,Hp as Vt,jY as Ba,KG as Oa,KH as _e,KI as Lt,Hn as Bt,xU as Ua,KJ as Ka,KK as Ra,kg as Ot,KL as Na,KM as Ja,HB as Ma,q7 as Ga,KN as Ut,KO as dt,Hy as Ve,KP as rt,KQ as $a,HD as Ya,KR as za,KS as qa,KT as Ha,KU as Za,KV as Wa,qa as Qa,KW as Xa,I0 as en,KX as tn,Hg as Le,gI as an,KY as nn,KZ as sn,gG as on,K_ as ln,K$ as cn,xY as dn,L0 as rn,L1 as un,L2 as hn,L3 as pn,k0 as mn,bn as Sn,eU as fn,eS as gn}from"./zeni-epic-state-vpQnS6PI.js";import{z as K,an as Be,B as Kt,A as W,c as j,Y as Q,at as vn,r as N,D as Ce,w as ce,au as Ze,av as xn,aw as Tn,q as We,ax as yn,m as Dn,Z as de,G as Qe,y as ae,S as $,ay as Cn,f as Xe,az as bn,aA as Rt,V as En,aB as In,k as kn,aC as wn,aq as Nt,aD as An,o as Z,C as jn,I as Jt,J as Fn,aE as Pn,aF as _n,e as et,aG as Vn,aH as Ln,p as Bn,aI as On,aJ as Un}from"./index-gIHwUZJz.js";import{n as R,D as Kn,S as Mt}from"./mui-BfKuxuES.js";import{t as Rn,A as Nn}from"./AddressScreen-DLY0B5X2.js";import le from"./NotFoundScreen-Du1hgJnA.js";import{F as Jn}from"./FeaturePreviewScreen-CUAIKz1i.js";import{b as q,v as tt,c as Mn}from"./routePaths-DwqXZ9IC.js";import{p as Gt}from"./pathToGoBack-CUljzXbA.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-SdJdV09H.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js";import{M as ge}from"./MobileAppDrawer-DSdJwfd5.js";import{D as Gn}from"./DrawerScreen-BtlXa6K0.js";import{g as $n,m as Yn}from"./accountMappingHelper-dm9IDhd5.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.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]="742bbb34-d1b6-4f49-9f55-e2462261136b",e._sentryDebugIdIdentifier="sentry-dbid-742bbb34-d1b6-4f49-9f55-e2462261136b")}catch{}})();const zn=Ce.getLocalizedStrings(),qn=M(function(e,a){const s=Ke(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=z(),{scheduleDetailId:t,tenantEmailDomain:n}=U(),{scheduleType:o}=U();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>L(f)),r=be(o)??"accrued_expenses",h=K.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ke(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Kt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(W,{analytics:j,onLoad:()=>{Zn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Q}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=zn.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}},Zn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ee(s.controllers),i=Ie(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Wn=R.div`
1
+ import{j as l}from"./liveblocks-JFc2ySVL.js";import{a as g}from"./sentry-DbhlVCDx.js";import{j as J,u as z,l as U,g as S,k as M,h as Y,n as at,o as B,N as G}from"./core-BUa4y4mL.js";import{eO as L,JV as be,JW as Ke,fP as X,cr as Ee,cs as Ie,v1 as St,JX as nt,v5 as Yt,HZ as ee,jA as te,u$ as zt,uV as qt,JY as Re,uN as Ht,uM as Zt,uG as Wt,uS as Qt,v6 as Xt,JZ as he,J_ as Ne,uO as ea,J$ as pe,eZ as ft,vl as gt,ve as vt,K0 as xt,o1 as Tt,v9 as yt,v7 as Dt,K1 as Ct,vs as bt,vp as Et,va as It,vr as Je,Gp as kt,K2 as ta,K3 as aa,cu as na,K4 as sa,K5 as oa,K6 as me,K7 as ie,K8 as ke,H_ as Me,vH as ye,HY as De,vu as wt,v2 as Ge,K9 as la,H$ as H,Ka as $e,uY as ia,Kb as ca,Kc as da,Kd as Ye,Ke as ze,Kf as qe,Kg as He,vB as we,Kh as At,vi as jt,Ki as ra,Kj as ua,Kk as ha,Kl as pa,Km as ma,Kn as Sa,Ko as fa,Kp as ga,sy as va,sz as xa,H3 as je,Kq as Ta,Kr as ya,iZ as Fe,bq as Da,Ks as Ca,Kt as ba,ky as Ea,kH as Ia,H2 as Pe,bD as st,Ku as Ft,GK as Pt,Kv as ka,Kw as wa,Kx as Aa,kJ as ja,Ky as ot,Kz as lt,KA as it,KB as ct,KC as Fa,kF as Pa,KD as _a,kI as Va,KE as La,KF as _t,Hp as Vt,jY as Ba,KG as Oa,KH as _e,KI as Lt,Hn as Bt,xU as Ua,KJ as Ka,KK as Ra,kg as Ot,KL as Na,KM as Ja,HB as Ma,q7 as Ga,KN as Ut,KO as dt,Hy as Ve,KP as rt,KQ as $a,HD as Ya,KR as za,KS as qa,KT as Ha,KU as Za,KV as Wa,qa as Qa,KW as Xa,I0 as en,KX as tn,Hg as Le,gI as an,KY as nn,KZ as sn,gG as on,K_ as ln,K$ as cn,xY as dn,L0 as rn,L1 as un,L2 as hn,L3 as pn,k0 as mn,bn as Sn,eU as fn,eS as gn}from"./zeni-epic-state-CGaNHYyd.js";import{z as K,an as Be,B as Kt,A as W,c as j,Y as Q,at as vn,r as N,D as Ce,w as ce,au as Ze,av as xn,aw as Tn,q as We,ax as yn,m as Dn,Z as de,G as Qe,y as ae,S as $,ay as Cn,f as Xe,az as bn,aA as Rt,V as En,aB as In,k as kn,aC as wn,aq as Nt,aD as An,o as Z,C as jn,I as Jt,J as Fn,aE as Pn,aF as _n,e as et,aG as Vn,aH as Ln,p as Bn,aI as On,aJ as Un}from"./index-BqVUPrfN.js";import{n as R,D as Kn,S as Mt}from"./mui-RJ5XtWIj.js";import{t as Rn,A as Nn}from"./AddressScreen-YA46n52j.js";import le from"./NotFoundScreen-B9fIdZtZ.js";import{F as Jn}from"./FeaturePreviewScreen-BGV0ZXxB.js";import{b as q,v as tt,c as Mn}from"./routePaths-FsWFCrEG.js";import{p as Gt}from"./pathToGoBack-UH0xKv_w.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-CzbTY4Ry.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-HdAnpaOw.js";import{M as ge}from"./MobileAppDrawer-DSgPRxOv.js";import{D as Gn}from"./DrawerScreen-uJ_3Dk8M.js";import{g as $n,m as Yn}from"./accountMappingHelper-CT28maj0.js";import"./recharts-CPOd-6nk.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./utils-jfneV6S1.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]="742bbb34-d1b6-4f49-9f55-e2462261136b",e._sentryDebugIdIdentifier="sentry-dbid-742bbb34-d1b6-4f49-9f55-e2462261136b")}catch{}})();const zn=Ce.getLocalizedStrings(),qn=M(function(e,a){const s=Ke(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=z(),{scheduleDetailId:t,tenantEmailDomain:n}=U(),{scheduleType:o}=U();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>L(f)),r=be(o)??"accrued_expenses",h=K.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ke(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Kt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(W,{analytics:j,onLoad:()=>{Zn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Q}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=zn.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}},Zn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ee(s.controllers),i=Ie(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Wn=R.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-C6NDyiJv.js";import{a as f}from"./sentry-DorFMwQU.js";import{q as u,h,g as y,N as I}from"./core-DrFqYlht.js";import{J9 as b,eP as w,zd as x}from"./zeni-epic-state-vpQnS6PI.js";import{z as l,B as j,I as S,J as D}from"./index-gIHwUZJz.js";import{n as c}from"./mui-BfKuxuES.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.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]="6f347e3c-20d6-4a47-9ebc-8d311abc05e9",e._sentryDebugIdIdentifier="sentry-dbid-6f347e3c-20d6-4a47-9ebc-8d311abc05e9")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y(m=>b(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(p(!0),a(x(t,g,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=c.div`
1
+ import{j as o}from"./liveblocks-JFc2ySVL.js";import{a as f}from"./sentry-DbhlVCDx.js";import{q as u,h,g as y,N as I}from"./core-BUa4y4mL.js";import{J9 as b,eP as w,zd as x}from"./zeni-epic-state-CGaNHYyd.js";import{z as l,B as j,I as S,J as D}from"./index-BqVUPrfN.js";import{n as c}from"./mui-RJ5XtWIj.js";import"./recharts-CPOd-6nk.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./utils-jfneV6S1.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]="6f347e3c-20d6-4a47-9ebc-8d311abc05e9",e._sentryDebugIdIdentifier="sentry-dbid-6f347e3c-20d6-4a47-9ebc-8d311abc05e9")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y(m=>b(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(p(!0),a(x(t,g,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=c.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100vh;
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-C6NDyiJv.js";import{j as Y,u as J,h as z,l as G,g as w,k as K,N as ne,n as _e,o as k}from"./core-DrFqYlht.js";import{eO as M,O4 as Ce,O5 as $e,ck as te,cl as Ze,fb as Ge,wq as ke,AD as He,wk as Tn,O6 as On,O7 as Bn,wn as Fn,wu as fe,wh as Rn,we as Ln,MS as le,O8 as Un,DX as zn,JY as Mn,DZ as Vn,kh as Oe,O9 as _n,pO as Ne,pC as We,k8 as Ye,kb as Be,JZ as Fe,J_ as $n,Oa as Zn,ka as Gn,kx as Hn,j$ as Nn,iy as Wn,ix as Yn,Ob as Jn,Oc as ye,DE as Kn,Od as qn,Oe as Qn,ML as we,Of as Re,Og as Xn,E8 as et,Nu as nt,Bx as Je,sm as Ke,Oh as tt,E5 as at,Oi as qe,cM as Ae,Ec as Qe,fc as ot,eS as Xe,eU as De,Ea as st,Br as rt,E2 as it,Oj as en,Ok as nn,DG as tn,DQ as Le,Ol as ct,DK as lt,Om as dt,Ni as ut,Ed as pt,bv as mt,bE as ht,cw as gt,bF as ft,bs as yt,IS as xt}from"./zeni-epic-state-vpQnS6PI.js";import{k as ae,y as $,z as D,S as O,m as V,B as de,bP as Ct,Y as Ie,Z as _,G as q,q as an,an as kt,ac as Ue,c as R,bQ as wt,aq as Se,bR as At,A as ue,bS as Dt,e as be,aK as W,bT as It,V as St,a9 as bt,bU as ze,bV as Et,r as ee,bW as vt,bX as jt,bY as Pt,bZ as Tt,a6 as Ot,o as Bt}from"./index-gIHwUZJz.js";import{n as L,D as Q,S as X}from"./mui-BfKuxuES.js";import ce from"./NotFoundScreen-Du1hgJnA.js";import{S as Me}from"./SetupPagesScreen-DFNkJSDZ.js";import{F as on}from"./FeaturePreviewScreen-CUAIKz1i.js";import{a as u}from"./sentry-DorFMwQU.js";import{M as pe}from"./MobileAppDrawer-DSdJwfd5.js";import{A as Ft,D as Rt,V as Lt}from"./DomesticWireDetailScreen-Da3AjbNa.js";import{A as Ut}from"./AddressScreen-DLY0B5X2.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-SdJdV09H.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js";import{Z as zt}from"./ZeniAccountStatementScreen-C7x2WOwU.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.js";import"./analyticsHelper-CM7-DzIH.js";import"./routePaths-DwqXZ9IC.js";import"./BusinessVerificationPageScreen-CJhDGXDa.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]="dfc03150-8a3c-4abe-a908-83b0775f3632",e._sentryDebugIdIdentifier="sentry-dbid-dfc03150-8a3c-4abe-a908-83b0775f3632")}catch{}})();const Mt=L.div`
1
+ import{j as n}from"./liveblocks-JFc2ySVL.js";import{j as Y,u as J,h as z,l as G,g as w,k as K,N as ne,n as _e,o as k}from"./core-BUa4y4mL.js";import{eO as M,O4 as Ce,O5 as $e,ck as te,cl as Ze,fb as Ge,wq as ke,AD as He,wk as Tn,O6 as On,O7 as Bn,wn as Fn,wu as fe,wh as Rn,we as Ln,MS as le,O8 as Un,DX as zn,JY as Mn,DZ as Vn,kh as Oe,O9 as _n,pO as Ne,pC as We,k8 as Ye,kb as Be,JZ as Fe,J_ as $n,Oa as Zn,ka as Gn,kx as Hn,j$ as Nn,iy as Wn,ix as Yn,Ob as Jn,Oc as ye,DE as Kn,Od as qn,Oe as Qn,ML as we,Of as Re,Og as Xn,E8 as et,Nu as nt,Bx as Je,sm as Ke,Oh as tt,E5 as at,Oi as qe,cM as Ae,Ec as Qe,fc as ot,eS as Xe,eU as De,Ea as st,Br as rt,E2 as it,Oj as en,Ok as nn,DG as tn,DQ as Le,Ol as ct,DK as lt,Om as dt,Ni as ut,Ed as pt,bv as mt,bE as ht,cw as gt,bF as ft,bs as yt,IS as xt}from"./zeni-epic-state-CGaNHYyd.js";import{k as ae,y as $,z as D,S as O,m as V,B as de,bP as Ct,Y as Ie,Z as _,G as q,q as an,an as kt,ac as Ue,c as R,bQ as wt,aq as Se,bR as At,A as ue,bS as Dt,e as be,aK as W,bT as It,V as St,a9 as bt,bU as ze,bV as Et,r as ee,bW as vt,bX as jt,bY as Pt,bZ as Tt,a6 as Ot,o as Bt}from"./index-BqVUPrfN.js";import{n as L,D as Q,S as X}from"./mui-RJ5XtWIj.js";import ce from"./NotFoundScreen-B9fIdZtZ.js";import{S as Me}from"./SetupPagesScreen-B1u5XXT5.js";import{F as on}from"./FeaturePreviewScreen-BGV0ZXxB.js";import{a as u}from"./sentry-DbhlVCDx.js";import{M as pe}from"./MobileAppDrawer-DSgPRxOv.js";import{A as Ft,D as Rt,V as Lt}from"./DomesticWireDetailScreen-2MNzySFr.js";import{A as Ut}from"./AddressScreen-YA46n52j.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-CzbTY4Ry.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-HdAnpaOw.js";import{Z as zt}from"./ZeniAccountStatementScreen-BudCs1Qh.js";import"./recharts-CPOd-6nk.js";import"./analytics-Br8sYi51.js";import"./plaid-M6xkDuEc.js";import"./dnd-Dl4N7fBZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-tfFSHGOM.js";import"./lexical-gklPXKki.js";import"./pdf-DyXQZDfv.js";import"./utils-jfneV6S1.js";import"./analyticsHelper-CUa_2Hxt.js";import"./routePaths-FsWFCrEG.js";import"./BusinessVerificationPageScreen-CgOqYGYR.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]="dfc03150-8a3c-4abe-a908-83b0775f3632",e._sentryDebugIdIdentifier="sentry-dbid-dfc03150-8a3c-4abe-a908-83b0775f3632")}catch{}})();const Mt=L.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as i}from"./liveblocks-C6NDyiJv.js";import{a as f}from"./sentry-DorFMwQU.js";import{j as x,h as j,u as B,l as $,g as p}from"./core-DrFqYlht.js";import{I6 as s,I5 as v,On as C,eO as T,Oo as z}from"./zeni-epic-state-vpQnS6PI.js";import{Z as D,aq as g,m as E,z as L,B as P,b_ as _,q as N}from"./index-gIHwUZJz.js";import{n as O}from"./mui-BfKuxuES.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]="84947135-4f99-4b67-a39d-99e9c4dbae94",e._sentryDebugIdIdentifier="sentry-dbid-84947135-4f99-4b67-a39d-99e9c4dbae94")}catch{}})();const U=O.div`
1
+ import{j as i}from"./liveblocks-JFc2ySVL.js";import{a as f}from"./sentry-DbhlVCDx.js";import{j as x,h as j,u as B,l as $,g as p}from"./core-BUa4y4mL.js";import{I6 as s,I5 as v,On as C,eO as T,Oo as z}from"./zeni-epic-state-CGaNHYyd.js";import{Z as D,aq as g,m as E,z as L,B as P,b_ as _,q as N}from"./index-BqVUPrfN.js";import{n as O}from"./mui-RJ5XtWIj.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]="84947135-4f99-4b67-a39d-99e9c4dbae94",e._sentryDebugIdIdentifier="sentry-dbid-84947135-4f99-4b67-a39d-99e9c4dbae94")}catch{}})();const U=O.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import"./sentry-DorFMwQU.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-DbhlVCDx.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};