@zeniai/web-app-ui 5.3.38-qa → 5.3.39-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/assets/{AccountMappingScreen-CrS7Kdhn.js → AccountMappingScreen-FWj5nDCB.js} +2 -2
  2. package/dist/assets/AddressRoutes-dITHyqGL.js +1 -0
  3. package/dist/assets/{AddressScreen-FiUJPHkQ.js → AddressScreen-BIEQJvnM.js} +1 -1
  4. package/dist/assets/{AiCfoScreen-q_7YX_nM.js → AiCfoScreen-Cz0j_M5z.js} +1 -1
  5. package/dist/assets/AppDrawer-BuP9gKqv.js +10 -0
  6. package/dist/assets/{BillPayApprovalRoutes-BfVotXG7.js → BillPayApprovalRoutes-qxr0yuTv.js} +1 -1
  7. package/dist/assets/BillPayRoutes-ttvWs4tK.js +119 -0
  8. package/dist/assets/{BusinessVerificationPageScreen-BbEcHB5F.js → BusinessVerificationPageScreen-CLz9Vhow.js} +2 -2
  9. package/dist/assets/{CardsAiCfoScreen-B5HD60oM.js → CardsAiCfoScreen-DHb-4cGz.js} +1 -1
  10. package/dist/assets/{ChargeCardRoutes-BHltIna0.js → ChargeCardRoutes-DeuDoclT.js} +1 -1
  11. package/dist/assets/CompanyPassportScreen-j7OCjtB_.js +1 -0
  12. package/dist/assets/{ConnectionAuthScreen-PqiWgpgl.js → ConnectionAuthScreen-Bt13WQgM.js} +2 -2
  13. package/dist/assets/CustomerOnboardingAuthScreen-op0Bb-DP.js +1 -0
  14. package/dist/assets/{CustomerOnboardingRoutes-cRAk7rF8.js → CustomerOnboardingRoutes-CBVh4ilH.js} +1 -1
  15. package/dist/assets/{DashboardRoutes-BXnean8e.js → DashboardRoutes-BrF1lo9A.js} +1 -1
  16. package/dist/assets/{DefaultTenantHome-BUpeXXFg.js → DefaultTenantHome-2ECnohy5.js} +1 -1
  17. package/dist/assets/DomesticWireDetailScreen-DVTNWHf6.js +18 -0
  18. package/dist/assets/{DrawerScreen-CfBaFUKA.js → DrawerScreen-DkSWP8ho.js} +1 -1
  19. package/dist/assets/{EntityDetailRoutes-CxGDk0UB.js → EntityDetailRoutes-Cm53bHLv.js} +1 -1
  20. package/dist/assets/{ExpenseAutomationRoutes-DaMemxd2.js → ExpenseAutomationRoutes-D2vZzdqI.js} +1 -1
  21. package/dist/assets/FeaturePreviewScreen-DjxhsBnU.js +1 -0
  22. package/dist/assets/{HubSpotOAuthCallbackScreen-OFmJvPcA.js → HubSpotOAuthCallbackScreen-D50cHVg9.js} +1 -1
  23. package/dist/assets/{InboxNotificationsProvider-BSgZT9XB.js → InboxNotificationsProvider-8Zmc_gz4.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-Bw8uyf_X.js → InvoicingRoutes-D9GR_W5o.js} +1 -1
  25. package/dist/assets/{MagicLinkRoutes-D3Bpse1r.js → MagicLinkRoutes-j2CEjUSl.js} +18 -18
  26. package/dist/assets/{MagicLinkSignInScreen-74RUTSaI.js → MagicLinkSignInScreen-B0BIotEJ.js} +1 -1
  27. package/dist/assets/MobileAppDrawer-k5UN-ZVo.js +1 -0
  28. package/dist/assets/NotFoundScreen-DsHUR7rB.js +1 -0
  29. package/dist/assets/{NotificationRoutes-B86tRrCv.js → NotificationRoutes-NcOHp3Rt.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-CQT6ZRIz.js → OAuthConsentScreen-CeflpTfa.js} +1 -1
  31. package/dist/assets/PandLWithForecastRoutes-7gkjqDl7.js +1 -0
  32. package/dist/assets/PaymentLinkScreen-DTV-Pj9Z.js +21 -0
  33. package/dist/assets/PeopleRoutes-B8cAEqrr.js +22 -0
  34. package/dist/assets/{PerformanceRoutes-U2KpwSXR.js → PerformanceRoutes-B8bQPf4Z.js} +1 -1
  35. package/dist/assets/{Preview-BowrR3Lc.js → Preview-DWkLgR2o.js} +1 -1
  36. package/dist/assets/{QBOConnectionScreen-DpBki0yd.js → QBOConnectionScreen-D_CvuPpu.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRoutes-CDiE4oCm.js → ReimbursementApprovalRoutes-BuNkcrV5.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Cr-o3b5d.js → ReimbursementApprovalRuleDetailScreen-BjlM_mON.js} +1 -1
  39. package/dist/assets/{ReimbursementRoutes-DTF60Z_6.js → ReimbursementRoutes-i4PYSWi1.js} +1 -1
  40. package/dist/assets/{ReportsRoutes-Ky-HWwEx.js → ReportsRoutes-0G-HMg8l.js} +1 -1
  41. package/dist/assets/RewardsRoutes-CsB0ZcvU.js +1 -0
  42. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-Sv3ki1z7.js → ScheduleDetailsPrepaidExpensesScreen-0OK7ToFy.js} +4 -4
  43. package/dist/assets/{ScreenRoutes-D-c6C0zC.js → ScreenRoutes-vlNTU8kU.js} +2 -2
  44. package/dist/assets/{SettingsRoutes-BPnYMW-X.js → SettingsRoutes-Bt4-uRzg.js} +1 -1
  45. package/dist/assets/{SetupPagesScreen-D-xfgaAT.js → SetupPagesScreen-f0SRzJjQ.js} +5 -5
  46. package/dist/assets/{SignInScreen-Dydn9CFH.js → SignInScreen-CtB5-K2A.js} +1 -1
  47. package/dist/assets/{SignOutScreen-CU7CgvpO.js → SignOutScreen-G2jd57YT.js} +1 -1
  48. package/dist/assets/{TaskListScreen-lSA8hF_F.js → TaskListScreen-CdQh3lN1.js} +2 -2
  49. package/dist/assets/{TaskRoutes-Bq4tzQOr.js → TaskRoutes-DdHB85T2.js} +1 -1
  50. package/dist/assets/TransactionDetailRoutes-CV_cfeg-.js +1 -0
  51. package/dist/assets/{TransactionDetailScreen-ChIu7aYA.js → TransactionDetailScreen-42QtBhCQ.js} +2 -2
  52. package/dist/assets/{TransactionListRoutes-CGI1oWmx.js → TransactionListRoutes-B2bsdM-b.js} +1 -1
  53. package/dist/assets/{TreasuryRoutes-BeboHVes.js → TreasuryRoutes-vIX4VvXk.js} +5 -5
  54. package/dist/assets/{VendorsRoutes-Ba5yfHiE.js → VendorsRoutes-CTCv940U.js} +1 -1
  55. package/dist/assets/{WiseConfirmationScreen-BXeU-_Jp.js → WiseConfirmationScreen-IVMtqt-F.js} +1 -1
  56. package/dist/assets/{ZeniAccountRoutes-dATmiEff.js → ZeniAccountRoutes-zMcMqczO.js} +7 -7
  57. package/dist/assets/{ZeniAccountStatementScreen-Dz5DmZUw.js → ZeniAccountStatementScreen-g-TFof3Y.js} +1 -1
  58. package/dist/assets/{accountMappingHelper-D1ooT5ik.js → accountMappingHelper-65Fk5KmX.js} +1 -1
  59. package/dist/assets/{analytics-B-TvIB4L.js → analytics-MT8j1Arr.js} +1 -1
  60. package/dist/assets/{analyticsHelper-h8-gsFza.js → analyticsHelper-CPeGk6N0.js} +1 -1
  61. package/dist/assets/{core-DCcrGtvx.js → core-DHfFJrfH.js} +1 -1
  62. package/dist/assets/{decodeURIComponentSafe-DRhUPcmy.js → decodeURIComponentSafe-DnV8TwS0.js} +1 -1
  63. package/dist/assets/{dnd-2zpntaNq.js → dnd-DG4Q4PBR.js} +1 -1
  64. package/dist/assets/{empty-B19z0k-e.js → empty-C4nhKt0e.js} +1 -1
  65. package/dist/assets/{empty-Dxu9O_8o.js → empty-Hx6SHn8J.js} +1 -1
  66. package/dist/assets/{emptyVideoElement-CnRa5yg_.js → emptyVideoElement-CC_ubHbs.js} +1 -1
  67. package/dist/assets/{epic-BY-2iLAv.js → epic-DB3K9lI8.js} +1 -1
  68. package/dist/assets/{expenseAutomationHelper-f_QoLd6I.js → expenseAutomationHelper-_DN5nYaA.js} +1 -1
  69. package/dist/assets/{getLocaleForTenant-D5JM1AN5.js → getLocaleForTenant-D_V8_IAs.js} +1 -1
  70. package/dist/assets/{index-BZiRU33w.js → index-Bhv9wCBS.js} +2 -2
  71. package/dist/assets/{index-Bw4k26Lh.js → index-BxJdVany.js} +24843 -24851
  72. package/dist/assets/{index-aKBWBndf.js → index-DvBr-xKR.js} +1 -1
  73. package/dist/assets/{index-B-oucDGH.js → index-_NjLBS-r.js} +1 -1
  74. package/dist/assets/{index-CIXC3jYt.js → index-dAj1V_OM.js} +1 -1
  75. package/dist/assets/{index-CInKAei6.js → index-jFW7Wxrg.js} +1 -1
  76. package/dist/assets/{index-C08EGy81.js → index-scA92wXl.js} +1 -1
  77. package/dist/assets/{index-_CCFU0py.js → index-x4bVdiy8.js} +1 -1
  78. package/dist/assets/{lexical-YhB7nNuN.js → lexical-Ds-L3Ehk.js} +1 -1
  79. package/dist/assets/{liveblocks-CyXsV56c.js → liveblocks-CPy_3T4M.js} +1 -1
  80. package/dist/assets/{lottie-ZAIvsM-R.js → lottie-CPIsfbGQ.js} +1 -1
  81. package/dist/assets/{mui-ezTHtwEe.js → mui-BCtxe7Uc.js} +1 -1
  82. package/dist/assets/{pathToGoBack-DjwL7c1l.js → pathToGoBack-XPlRz7Jt.js} +1 -1
  83. package/dist/assets/{pdf-D6N9uxwe.js → pdf-BNLZqB1A.js} +3 -3
  84. package/dist/assets/{pdf-lib-CWh0RHiG.js → pdf-lib-Dl0EkJKh.js} +1 -1
  85. package/dist/assets/{plaid-5PXB6whD.js → plaid-BSrnBML8.js} +1 -1
  86. package/dist/assets/{pusher-BrWux37o.js → pusher-D9fNEiyx.js} +1 -1
  87. package/dist/assets/{react-jjljLSIT.js → react-B1T-uU2u.js} +1 -1
  88. package/dist/assets/{react-B_u4EDFn.js → react-C71wZa-Q.js} +1 -1
  89. package/dist/assets/{react-BPaY-v1j.js → react-C9cd30B-.js} +1 -1
  90. package/dist/assets/{react-CuxyhjyV.js → react-D09h339w.js} +1 -1
  91. package/dist/assets/{react-DMw0lXKh.js → react-DQcNWoQy.js} +1 -1
  92. package/dist/assets/{react-C_d_o6Oe.js → react-pCiX7yPg.js} +1 -1
  93. package/dist/assets/{recharts-Chyhxc02.js → recharts-B2QzdJEJ.js} +1 -1
  94. package/dist/assets/{routePaths-Bd9tk_bd.js → routePaths-T6NVNRXw.js} +1 -1
  95. package/dist/assets/{sentry-T7AA_ij8.js → sentry-B8WE62R1.js} +1 -1
  96. package/dist/assets/{url-BYMzLIWK.js → url-Bh2rmQ6M.js} +1 -1
  97. package/dist/assets/{url-C0mgG0pG.js → url-Cgny8pWv.js} +1 -1
  98. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-99a1ae26.js → useAiCfoDashboardSuggestedQuestionsChips-ByuEaj9g.js} +1 -1
  99. package/dist/assets/useAskAiCfoHostNavButtonProps-BjFaoyi3.js +1 -0
  100. package/dist/assets/{useChargeCardPusherEvents-BhhLoHJr.js → useChargeCardPusherEvents-DwnR999Q.js} +1 -1
  101. package/dist/assets/{useDeviceId-DwxriMvh.js → useDeviceId-E6nWdXlP.js} +1 -1
  102. package/dist/assets/{useEmailConnectResultRefresh-bG2MR1TT.js → useEmailConnectResultRefresh-CgnDEvXl.js} +1 -1
  103. package/dist/assets/{useInitialThreadRequest-CLczj5aZ.js → useInitialThreadRequest-CYNlLID-.js} +1 -1
  104. package/dist/assets/useTaskManagerAccess-D10G2ni1.js +1 -0
  105. package/dist/assets/{utils-oeHkWTt8.js → utils-BAMwHjCz.js} +1 -1
  106. package/dist/assets/{withTransactionSidePanel-Mm6xVtPH.js → withTransactionSidePanel-BVm7iKO9.js} +2 -2
  107. package/dist/assets/{zeni-epic-state-B9l_W9RQ.js → zeni-epic-state-CgS-13Rp.js} +3 -3
  108. package/dist/index.html +1 -1
  109. package/package.json +2 -2
  110. package/dist/assets/AddressRoutes-CnuQ5eOb.js +0 -1
  111. package/dist/assets/AppDrawer-Dxyb3J5C.js +0 -10
  112. package/dist/assets/BillPayRoutes-C8UQhVLe.js +0 -119
  113. package/dist/assets/CompanyPassportScreen-BxZDXrE5.js +0 -1
  114. package/dist/assets/CustomerOnboardingAuthScreen-9EZl2Oqz.js +0 -1
  115. package/dist/assets/DomesticWireDetailScreen-DpUYXmlE.js +0 -18
  116. package/dist/assets/FeaturePreviewScreen-DS5Xpxt9.js +0 -1
  117. package/dist/assets/MobileAppDrawer-NUU2GCIb.js +0 -1
  118. package/dist/assets/NotFoundScreen-BjZ5T-Ms.js +0 -1
  119. package/dist/assets/PandLWithForecastRoutes-BjMY7Xav.js +0 -1
  120. package/dist/assets/PaymentLinkScreen-DqUkmI8r.js +0 -21
  121. package/dist/assets/PeopleRoutes-D20wm9nB.js +0 -22
  122. package/dist/assets/RewardsRoutes-Dio-zanl.js +0 -1
  123. package/dist/assets/TransactionDetailRoutes-OBP39QoV.js +0 -1
  124. package/dist/assets/useAskAiCfoHostNavButtonProps-C0OwLWSS.js +0 -1
  125. package/dist/assets/useTaskManagerAccess-JxICb6EI.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-BjZ5T-Ms.js","assets/sentry-T7AA_ij8.js","assets/core-DCcrGtvx.js","assets/zeni-epic-state-B9l_W9RQ.js","assets/index-Bw4k26Lh.js","assets/mui-ezTHtwEe.js","assets/analytics-B-TvIB4L.js","assets/utils-oeHkWTt8.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-BXnean8e.js","assets/withTransactionSidePanel-Mm6xVtPH.js","assets/useAskAiCfoHostNavButtonProps-C0OwLWSS.js","assets/TransactionDetailScreen-ChIu7aYA.js","assets/decodeURIComponentSafe-DRhUPcmy.js","assets/useInitialThreadRequest-CLczj5aZ.js","assets/routePaths-Bd9tk_bd.js","assets/expenseAutomationHelper-f_QoLd6I.js","assets/analyticsHelper-h8-gsFza.js","assets/CompanyPassportScreen-BxZDXrE5.js","assets/MobileAppDrawer-NUU2GCIb.js","assets/InboxNotificationsProvider-BSgZT9XB.js","assets/useTaskManagerAccess-JxICb6EI.js","assets/useAiCfoDashboardSuggestedQuestionsChips-99a1ae26.js","assets/FeaturePreviewScreen-DS5Xpxt9.js","assets/BillPayRoutes-C8UQhVLe.js","assets/AddressScreen-FiUJPHkQ.js","assets/DomesticWireDetailScreen-DpUYXmlE.js","assets/BusinessVerificationPageScreen-BbEcHB5F.js","assets/DrawerScreen-CfBaFUKA.js","assets/SetupPagesScreen-D-xfgaAT.js","assets/BillPayApprovalRoutes-BfVotXG7.js","assets/ReimbursementApprovalRuleDetailScreen-Cr-o3b5d.js","assets/getLocaleForTenant-D5JM1AN5.js","assets/ReimbursementRoutes-DTF60Z_6.js","assets/ReimbursementApprovalRoutes-CDiE4oCm.js","assets/TransactionListRoutes-CGI1oWmx.js","assets/ZeniAccountStatementScreen-Dz5DmZUw.js","assets/SettingsRoutes-BPnYMW-X.js","assets/AccountMappingScreen-CrS7Kdhn.js","assets/QBOConnectionScreen-DpBki0yd.js","assets/empty-Dxu9O_8o.js","assets/index-C08EGy81.js","assets/url-C0mgG0pG.js","assets/index-CIXC3jYt.js","assets/accountMappingHelper-D1ooT5ik.js","assets/useEmailConnectResultRefresh-bG2MR1TT.js","assets/ReportsRoutes-Ky-HWwEx.js","assets/ChargeCardRoutes-BHltIna0.js","assets/useChargeCardPusherEvents-BhhLoHJr.js","assets/PeopleRoutes-D20wm9nB.js","assets/ExpenseAutomationRoutes-DaMemxd2.js","assets/ScheduleDetailsPrepaidExpensesScreen-Sv3ki1z7.js","assets/pathToGoBack-DjwL7c1l.js","assets/TreasuryRoutes-BeboHVes.js","assets/VendorsRoutes-Ba5yfHiE.js","assets/ZeniAccountRoutes-dATmiEff.js","assets/AddressRoutes-CnuQ5eOb.js","assets/PandLWithForecastRoutes-BjMY7Xav.js","assets/CustomerOnboardingRoutes-cRAk7rF8.js","assets/TransactionDetailRoutes-OBP39QoV.js","assets/EntityDetailRoutes-CxGDk0UB.js","assets/InvoicingRoutes-Bw8uyf_X.js","assets/NotificationRoutes-B86tRrCv.js","assets/PerformanceRoutes-U2KpwSXR.js","assets/RewardsRoutes-Dio-zanl.js","assets/TaskRoutes-Bq4tzQOr.js","assets/TaskListScreen-lSA8hF_F.js","assets/AiCfoScreen-q_7YX_nM.js","assets/CardsAiCfoScreen-B5HD60oM.js"])))=>i.map(i=>d[i]);
2
- import{_ as s,bn as ms,fE as _s,dY as Es,dX as hs,Al as ps,dh as gs,c8 as Rs,gI as xs,g8 as js,de as pe,cG as Is,gm as Ts,cy as As,bE as bs,br as ys,Ts as Ds,v as fs,Tv as Cs,bq as vs,Tw as Os,bK as Ps,bJ as ws,bt as Us,cu as Fs,Tx as Ls,Ty as ks,d9 as Vs,dc as Hs,db as Ss,cF as Bs,cM as Ns,pR as ge,gh as Re,gX as Ms,gj as xe,gK as je,gL as Ie,gk as Zs}from"./zeni-epic-state-B9l_W9RQ.js";import{j as e}from"./liveblocks-CyXsV56c.js";import{a as w}from"./sentry-T7AA_ij8.js";import{N as u,u as Gs,h as $s,i as zs,g as Ys,j as $,q as Te,n as qs,o as t}from"./core-DCcrGtvx.js";import{P as l,E as Ws,u as Xs,z as D,O as Ks,e as Qs,m as Js,c as M,g as en,Q as sn,V as nn,L as F,G as Ae,t as _,R as tn,S as an,j as ne}from"./index-Bw4k26Lh.js";import"./mui-ezTHtwEe.js";import{f as be}from"./analyticsHelper-h8-gsFza.js";import{t as on}from"./getLocaleForTenant-D5JM1AN5.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},A=new a.Error().stack;A&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[A]="b6829187-3665-430e-b825-ac1fce448371",a._sentryDebugIdIdentifier="sentry-dbid-b6829187-3665-430e-b825-ac1fce448371")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-BjZ5T-Ms.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ln=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),un=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),fe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),f=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:S,showTreasuryRoute:i,isTenantBankingOnly:k,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(k===!0){if(a)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(ye,{tenantEmailDomain:v});if(O)return e.jsx(fe,{tenantEmailDomain:v})}return a?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(ye,{tenantEmailDomain:v}):O?e.jsx(fe,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):S?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-BXnean8e.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])),bills:()=>s((()=>import("./BillPayRoutes-C8UQhVLe.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-DTF60Z_6.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])),transactions:()=>s((()=>import("./TransactionListRoutes-CGI1oWmx.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-BPnYMW-X.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])),reports:()=>s((()=>import("./ReportsRoutes-Ky-HWwEx.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-BHltIna0.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])),people:()=>s((()=>import("./PeopleRoutes-D20wm9nB.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-DaMemxd2.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-BeboHVes.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-Ba5yfHiE.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-dATmiEff.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},cn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},mn=l((()=>s((()=>import("./ReportsRoutes-Ky-HWwEx.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes-CnuQ5eOb.js")),__vite__mapDeps([56,1,2,3,25,4,5,6,7,0,8])))),En=l((()=>s((()=>import("./PeopleRoutes-D20wm9nB.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),hn=l((()=>s((()=>import("./PandLWithForecastRoutes-BjMY7Xav.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-cRAk7rF8.js")),__vite__mapDeps([58,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),gn=l((()=>s((()=>import("./VendorsRoutes-Ba5yfHiE.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])))),Rn=l((()=>s((()=>import("./TransactionDetailRoutes-OBP39QoV.js")),__vite__mapDeps([59,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-CxGDk0UB.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),xn=l((()=>s((()=>import("./DashboardRoutes-BXnean8e.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-C8UQhVLe.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])))),jn=l((()=>s((()=>import("./SettingsRoutes-BPnYMW-X.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])))),In=l((()=>s((()=>import("./InvoicingRoutes-Bw8uyf_X.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-DTF60Z_6.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])))),Tn=l((()=>s((()=>import("./ZeniAccountRoutes-dATmiEff.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),An=l((()=>s((()=>import("./TreasuryRoutes-BeboHVes.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),bn=l((()=>s((()=>import("./TransactionListRoutes-CGI1oWmx.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),yn=l((()=>s((()=>import("./ChargeCardRoutes-BHltIna0.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),Dn=l((()=>s((()=>import("./NotificationRoutes-B86tRrCv.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,21,8])))),fn=l((()=>s((()=>import("./PerformanceRoutes-U2KpwSXR.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-DaMemxd2.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-Dio-zanl.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-Bq4tzQOr.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,14,19,20,21,66,11,8])))),Pn=l((()=>s((()=>import("./AiCfoScreen-q_7YX_nM.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,22,52,15,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-B5HD60oM.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-BjZ5T-Ms.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),wn=l((()=>s((()=>import("./TaskListScreen-lSA8hF_F.js").then((a=>a.f))),__vite__mapDeps([66,1,2,3,4,5,6,7,11,19,20,21,8])))),Un=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:i,showTreasuryRoute:k,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return v===!0&&V?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):S?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},we=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Mn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Gs(),S=$s(),{tenantEmailDomain:i}=zs(),k=Ws().mode,{setLoading:O,clearAllLoading:v,clearLoading:V}=Xs(),b=D.getSignedInUserTenant(i)?.tenantId,I=D.getSignedInUser(),X=ms(I),z=Ys(),[L,Ue]=w.useState(!1),r=$((o=>_s(o))),{useFeatureGate:B}=Ks(),Z=Qs(),ae=Js(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=B(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=B(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?Es(oe,r):void 0,K=p==="Completed"||T==="Completed"?hs(r):void 0,re=p==="Completed"||T==="Completed"?ps(r)&&!gs(r):void 0,Ve=en(r,ke,oe),{isCardsHidden:He}=sn(r?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=B(M.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=B(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=B(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||an==="DEV",Ze=r?.userRole!=null&&Rs(r.userRole),Y=$((o=>xs(o)));if(i!=null){const o=D.getSignedInUserTenant(i);I!=null&&o!=null&&be(I,r,k)}const G={tenantId:b,userId:I?.userId,sessionId:I?.zeniSessionId},ie=js(),h=nn(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=Is(h?.loggedInUserRoleMap),J=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ze=$((o=>G.tenantId!=null?Ts(o,G.tenantId):void 0));w.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),w.useEffect((()=>{if(ee!=null&&b!=null){const o=ee.params.selectedPeriod;if(o!=null){const y=o.split("-");if(y.length===2){const d=As(Number(y[0])),n=Number(y[1]),c=bs(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=ys();c.isAfter(N,"month")===!1?A(Ds(b,{month:d,year:n})):S(`/${i}/month_end_close_checks/review`)}}}}),[ee,b]),w.useEffect((()=>{L||(Ue(!0),O(F.TENANT_FETCHING))}),[L,G,ie,I,A,D]),w.useLayoutEffect((()=>{!fs(ie,G)&&D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,y,d,n){if(Re(y?.userId,y?.zeniSessionId,o.tenantId),d(Ms(!0)),d(xe(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=D.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(on(n)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})(G,I,A,ze))}),[b]),w.useEffect((()=>{D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,y,d,n,c,N,H){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const q=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(q&&us){H(xe(n));const W=D.getSignedInUserTenantWithId(n);W?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(W?.tenantEmailDomain),Re(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(je(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(Ie(c.userId,n)))}else q&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(je(c.userId,n))),q&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(Ie(c.userId,n)));if(q){ne.identify(c.userId,{tenant_id:n});const W=n==null||n!=null&&(y==="Completed"||y==="Error");o==="Completed"||y!=="Not-Started"&&y!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),H(Zs(c.userId,n,c.zeniSessionId))),W&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(T,p,r,b,I,O,A))}),[b,p]),w.useEffect((()=>{D.isSignedIn()&&T==="Completed"&&Y.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),D.saveSignedInUserTenants(Cs(Y.tenantsBaseInOrder)),I!=null&&be(I,r,k,void 0,Y.tenantsBaseInOrder))}),[Y,T,r,I]),w.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=w.useRef(!1);w.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,y=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=dn[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),y)})())}),[p,L]);const P=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:Ye}=B(M.isReferralFeatureEnabled),qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),We=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),U=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Se&&!P,Xe=Os(h?.loggedInUserRoleMap),Ke=r.externalConnections?.accounting[0]?.isValid,Qe=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&Ps(h?.loggedInUserRoleMap),_e=Fe&&!P,Je=Le&&!P,es=ue&&ws(h?.loggedInUserRoleMap),ss=de&&Us(h?.loggedInUserRoleMap),ns=_e&&Fs(h?.loggedInUserRoleMap),ts=Ls(h?.loggedInUserRoleMap),as=ks(h?.loggedInUserRoleMap),os=Vs(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Ss(h?.loggedInUserRoleMap),g=Bs(h?.loggedInUserRoleMap),R=Ns(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&R,x=_e&&os,j=Je&&rs,m=de&&is,ls=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||$e===!0||Xe===!0||ts===!0||as===!0;return D.isSignedIn()?b==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&T!=="In-Progress"&&A(ge(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||X&&!J)&&Qe&&Ke!==!0&&E===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||J||X?!L||se!==!1||J||X?L&&r?.userRole&&E!=null&&K!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(qs,{children:e.jsxs(t,{element:e.jsx(tn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Un,{isDashboardAccess:U,showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:U?e.jsx(xn,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:U?e.jsx(mn,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ls||U?e.jsx(En,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:U?e.jsx(hn,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(pn,{})}),e.jsx(t,{path:"transaction/*",element:U&&P===!1||qe||We?e.jsx(Rn,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:U&&P===!1?e.jsx(bn,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:U&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:U&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(wn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(On,{})}),e.jsx(t,{path:"address/*",element:es||me||ns||ss?e.jsx(_n,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:x?e.jsx(Tn,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:j?e.jsx(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(fn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(Cn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(Dn,{})}),e.jsx(t,{path:"vendors/*",element:Ge?e.jsx(gn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Be?e.jsx(jn,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(In,{}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(yn,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:Ye?e.jsx(vn,{}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Pn,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"*",element:e.jsx(C,{})})]})}):null:(a(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(a(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),a(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{f as F,Mn as S};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-DsHUR7rB.js","assets/sentry-B8WE62R1.js","assets/core-DHfFJrfH.js","assets/zeni-epic-state-CgS-13Rp.js","assets/index-BxJdVany.js","assets/mui-BCtxe7Uc.js","assets/analytics-MT8j1Arr.js","assets/utils-BAMwHjCz.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-BrF1lo9A.js","assets/withTransactionSidePanel-BVm7iKO9.js","assets/useAskAiCfoHostNavButtonProps-BjFaoyi3.js","assets/TransactionDetailScreen-42QtBhCQ.js","assets/decodeURIComponentSafe-DnV8TwS0.js","assets/useInitialThreadRequest-CYNlLID-.js","assets/routePaths-T6NVNRXw.js","assets/expenseAutomationHelper-_DN5nYaA.js","assets/analyticsHelper-CPeGk6N0.js","assets/CompanyPassportScreen-j7OCjtB_.js","assets/MobileAppDrawer-k5UN-ZVo.js","assets/InboxNotificationsProvider-8Zmc_gz4.js","assets/useTaskManagerAccess-D10G2ni1.js","assets/useAiCfoDashboardSuggestedQuestionsChips-ByuEaj9g.js","assets/FeaturePreviewScreen-DjxhsBnU.js","assets/BillPayRoutes-ttvWs4tK.js","assets/AddressScreen-BIEQJvnM.js","assets/DomesticWireDetailScreen-DVTNWHf6.js","assets/BusinessVerificationPageScreen-CLz9Vhow.js","assets/DrawerScreen-DkSWP8ho.js","assets/SetupPagesScreen-f0SRzJjQ.js","assets/BillPayApprovalRoutes-qxr0yuTv.js","assets/ReimbursementApprovalRuleDetailScreen-BjlM_mON.js","assets/getLocaleForTenant-D_V8_IAs.js","assets/ReimbursementRoutes-i4PYSWi1.js","assets/ReimbursementApprovalRoutes-BuNkcrV5.js","assets/TransactionListRoutes-B2bsdM-b.js","assets/ZeniAccountStatementScreen-g-TFof3Y.js","assets/SettingsRoutes-Bt4-uRzg.js","assets/AccountMappingScreen-FWj5nDCB.js","assets/QBOConnectionScreen-D_CvuPpu.js","assets/empty-Hx6SHn8J.js","assets/index-scA92wXl.js","assets/url-Cgny8pWv.js","assets/index-dAj1V_OM.js","assets/accountMappingHelper-65Fk5KmX.js","assets/useEmailConnectResultRefresh-CgnDEvXl.js","assets/ReportsRoutes-0G-HMg8l.js","assets/ChargeCardRoutes-DeuDoclT.js","assets/useChargeCardPusherEvents-DwnR999Q.js","assets/PeopleRoutes-B8cAEqrr.js","assets/ExpenseAutomationRoutes-D2vZzdqI.js","assets/ScheduleDetailsPrepaidExpensesScreen-0OK7ToFy.js","assets/pathToGoBack-XPlRz7Jt.js","assets/TreasuryRoutes-vIX4VvXk.js","assets/VendorsRoutes-CTCv940U.js","assets/ZeniAccountRoutes-zMcMqczO.js","assets/AddressRoutes-dITHyqGL.js","assets/PandLWithForecastRoutes-7gkjqDl7.js","assets/CustomerOnboardingRoutes-CBVh4ilH.js","assets/TransactionDetailRoutes-CV_cfeg-.js","assets/EntityDetailRoutes-Cm53bHLv.js","assets/InvoicingRoutes-D9GR_W5o.js","assets/NotificationRoutes-NcOHp3Rt.js","assets/PerformanceRoutes-B8bQPf4Z.js","assets/RewardsRoutes-CsB0ZcvU.js","assets/TaskRoutes-DdHB85T2.js","assets/TaskListScreen-CdQh3lN1.js","assets/AiCfoScreen-Cz0j_M5z.js","assets/CardsAiCfoScreen-DHb-4cGz.js"])))=>i.map(i=>d[i]);
2
+ import{_ as s,bn as ms,fE as _s,dY as Es,dX as hs,Al as ps,dh as Rs,c8 as gs,gI as xs,g8 as js,de as pe,cG as Is,gm as Ts,cy as As,bE as fs,br as ys,Ts as Ds,v as bs,Tv as Cs,bq as vs,Tw as Os,bK as Ps,bJ as ws,bt as Us,cu as Fs,Tx as Ls,Ty as ks,d9 as Vs,dc as Hs,db as Ss,cF as Bs,cM as Ns,pR as Re,gh as ge,gX as Ms,gj as xe,gK as je,gL as Ie,gk as Zs}from"./zeni-epic-state-CgS-13Rp.js";import{j as e}from"./liveblocks-CPy_3T4M.js";import{a as w}from"./sentry-B8WE62R1.js";import{N as u,u as Gs,h as $s,i as zs,g as Ys,j as $,q as Te,n as qs,o as t}from"./core-DHfFJrfH.js";import{P as l,E as Ws,u as Xs,z as D,M as Ks,d as Qs,p as Js,y as M,f as en,Q as sn,V as nn,L as F,G as Ae,t as _,R as tn,S as an,j as ne}from"./index-BxJdVany.js";import"./mui-BCtxe7Uc.js";import{f as fe}from"./analyticsHelper-CPeGk6N0.js";import{t as on}from"./getLocaleForTenant-D_V8_IAs.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},A=new a.Error().stack;A&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[A]="fc2f7c5f-8653-4282-9265-d64c6c7e2a90",a._sentryDebugIdIdentifier="sentry-dbid-fc2f7c5f-8653-4282-9265-d64c6c7e2a90")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-DsHUR7rB.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ln=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),un=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),be=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),b=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:S,showTreasuryRoute:i,isTenantBankingOnly:k,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(k===!0){if(a)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(ye,{tenantEmailDomain:v});if(O)return e.jsx(be,{tenantEmailDomain:v})}return a?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(ye,{tenantEmailDomain:v}):O?e.jsx(be,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):S?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-BrF1lo9A.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])),bills:()=>s((()=>import("./BillPayRoutes-ttvWs4tK.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-i4PYSWi1.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])),transactions:()=>s((()=>import("./TransactionListRoutes-B2bsdM-b.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-Bt4-uRzg.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])),reports:()=>s((()=>import("./ReportsRoutes-0G-HMg8l.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-DeuDoclT.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])),people:()=>s((()=>import("./PeopleRoutes-B8cAEqrr.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-D2vZzdqI.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-vIX4VvXk.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-CTCv940U.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-zMcMqczO.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},cn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},mn=l((()=>s((()=>import("./ReportsRoutes-0G-HMg8l.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes-dITHyqGL.js")),__vite__mapDeps([56,1,2,3,25,4,5,6,7,0,8])))),En=l((()=>s((()=>import("./PeopleRoutes-B8cAEqrr.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),hn=l((()=>s((()=>import("./PandLWithForecastRoutes-7gkjqDl7.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-CBVh4ilH.js")),__vite__mapDeps([58,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),Rn=l((()=>s((()=>import("./VendorsRoutes-CTCv940U.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])))),gn=l((()=>s((()=>import("./TransactionDetailRoutes-CV_cfeg-.js")),__vite__mapDeps([59,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-Cm53bHLv.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),xn=l((()=>s((()=>import("./DashboardRoutes-BrF1lo9A.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-ttvWs4tK.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])))),jn=l((()=>s((()=>import("./SettingsRoutes-Bt4-uRzg.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])))),In=l((()=>s((()=>import("./InvoicingRoutes-D9GR_W5o.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-i4PYSWi1.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])))),Tn=l((()=>s((()=>import("./ZeniAccountRoutes-zMcMqczO.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),An=l((()=>s((()=>import("./TreasuryRoutes-vIX4VvXk.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),fn=l((()=>s((()=>import("./TransactionListRoutes-B2bsdM-b.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),yn=l((()=>s((()=>import("./ChargeCardRoutes-DeuDoclT.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),Dn=l((()=>s((()=>import("./NotificationRoutes-NcOHp3Rt.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,21,8])))),bn=l((()=>s((()=>import("./PerformanceRoutes-B8bQPf4Z.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-D2vZzdqI.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-CsB0ZcvU.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-DdHB85T2.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,14,19,20,21,66,11,8])))),Pn=l((()=>s((()=>import("./AiCfoScreen-Cz0j_M5z.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,22,52,15,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-DHb-4cGz.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-DsHUR7rB.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),wn=l((()=>s((()=>import("./TaskListScreen-CdQh3lN1.js").then((a=>a.f))),__vite__mapDeps([66,1,2,3,4,5,6,7,11,19,20,21,8])))),Un=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:i,showTreasuryRoute:k,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return v===!0&&V?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):S?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},we=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Mn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Gs(),S=$s(),{tenantEmailDomain:i}=zs(),k=Ws().mode,{setLoading:O,clearAllLoading:v,clearLoading:V}=Xs(),f=D.getSignedInUserTenant(i)?.tenantId,I=D.getSignedInUser(),X=ms(I),z=Ys(),[L,Ue]=w.useState(!1),r=$((o=>_s(o))),{useFeatureGate:B}=Ks(),Z=Qs(),ae=Js(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=B(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=B(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?Es(oe,r):void 0,K=p==="Completed"||T==="Completed"?hs(r):void 0,re=p==="Completed"||T==="Completed"?ps(r)&&!Rs(r):void 0,Ve=en(r,ke,oe),{isCardsHidden:He}=sn(r?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=B(M.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=B(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=B(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||an==="DEV",Ze=r?.userRole!=null&&gs(r.userRole),Y=$((o=>xs(o)));if(i!=null){const o=D.getSignedInUserTenant(i);I!=null&&o!=null&&fe(I,r,k)}const G={tenantId:f,userId:I?.userId,sessionId:I?.zeniSessionId},ie=js(),h=nn(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=Is(h?.loggedInUserRoleMap),J=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ze=$((o=>G.tenantId!=null?Ts(o,G.tenantId):void 0));w.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),w.useEffect((()=>{if(ee!=null&&f!=null){const o=ee.params.selectedPeriod;if(o!=null){const y=o.split("-");if(y.length===2){const d=As(Number(y[0])),n=Number(y[1]),c=fs(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=ys();c.isAfter(N,"month")===!1?A(Ds(f,{month:d,year:n})):S(`/${i}/month_end_close_checks/review`)}}}}),[ee,f]),w.useEffect((()=>{L||(Ue(!0),O(F.TENANT_FETCHING))}),[L,G,ie,I,A,D]),w.useLayoutEffect((()=>{!bs(ie,G)&&D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,y,d,n){if(ge(y?.userId,y?.zeniSessionId,o.tenantId),d(Ms(!0)),d(xe(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=D.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(on(n)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})(G,I,A,ze))}),[f]),w.useEffect((()=>{D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,y,d,n,c,N,H){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const q=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(q&&us){H(xe(n));const W=D.getSignedInUserTenantWithId(n);W?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(W?.tenantEmailDomain),ge(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(je(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(Ie(c.userId,n)))}else q&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(je(c.userId,n))),q&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(Ie(c.userId,n)));if(q){ne.identify(c.userId,{tenant_id:n});const W=n==null||n!=null&&(y==="Completed"||y==="Error");o==="Completed"||y!=="Not-Started"&&y!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),H(Zs(c.userId,n,c.zeniSessionId))),W&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(Re(c.userId,c.zeniSessionId)))}})(T,p,r,f,I,O,A))}),[f,p]),w.useEffect((()=>{D.isSignedIn()&&T==="Completed"&&Y.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),D.saveSignedInUserTenants(Cs(Y.tenantsBaseInOrder)),I!=null&&fe(I,r,k,void 0,Y.tenantsBaseInOrder))}),[Y,T,r,I]),w.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(v(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=w.useRef(!1);w.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,y=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=dn[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),y)})())}),[p,L]);const P=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:Ye}=B(M.isReferralFeatureEnabled),qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),We=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),U=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Se&&!P,Xe=Os(h?.loggedInUserRoleMap),Ke=r.externalConnections?.accounting[0]?.isValid,Qe=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&Ps(h?.loggedInUserRoleMap),_e=Fe&&!P,Je=Le&&!P,es=ue&&ws(h?.loggedInUserRoleMap),ss=de&&Us(h?.loggedInUserRoleMap),ns=_e&&Fs(h?.loggedInUserRoleMap),ts=Ls(h?.loggedInUserRoleMap),as=ks(h?.loggedInUserRoleMap),os=Vs(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Ss(h?.loggedInUserRoleMap),R=Bs(h?.loggedInUserRoleMap),g=Ns(h?.loggedInUserRoleMap),Ee=ue&&R,he=ce&&g,x=_e&&os,j=Je&&rs,m=de&&is,ls=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||$e===!0||Xe===!0||ts===!0||as===!0;return D.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&T!=="In-Progress"&&A(Re(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||X&&!J)&&Qe&&Ke!==!0&&E===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||J||X?!L||se!==!1||J||X?L&&r?.userRole&&E!=null&&K!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(qs,{children:e.jsxs(t,{element:e.jsx(tn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Un,{isDashboardAccess:U,showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:U?e.jsx(xn,{}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:U?e.jsx(mn,{}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ls||U?e.jsx(En,{}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:U?e.jsx(hn,{}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(pn,{})}),e.jsx(t,{path:"transaction/*",element:U&&P===!1||qe||We?e.jsx(gn,{}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:U&&P===!1?e.jsx(fn,{}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:U&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:U&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(wn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(On,{})}),e.jsx(t,{path:"address/*",element:es||me||ns||ss?e.jsx(_n,{}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:x?e.jsx(Tn,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:j?e.jsx(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(bn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(Cn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(Dn,{})}),e.jsx(t,{path:"vendors/*",element:Ge?e.jsx(Rn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(b,{showZeniAccountRoute:x,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Be?e.jsx(jn,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(In,{}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(yn,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:Ye?e.jsx(vn,{}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Pn,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"*",element:e.jsx(C,{})})]})}):null:(a(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(a(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),a(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{b as F,Mn as S};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-CyXsV56c.js";import{a as d}from"./sentry-T7AA_ij8.js";import{h as V,g as $,u as T,i as Y,j as C,l as H,n as z,o as k}from"./core-DCcrGtvx.js";import{fE as w,YE as je,MU as ve,Yc as we,Yl as Ae,c8 as X,cT as De,cU as Ue,bq as Te,dd as _e,Fh as Re,YF as Me,Ol as Be,LL as Fe,LC as de,Lz as Le,Fl as ue,LF as pe,LI as ge,LO as W,Bx as ee,Fk as Oe,lt as Z,lw as me,YG as Ve,mG as Ye,FD as Ne,UU as Ge,UV as Ze,lr as $e,YH as He,lu as Ke,u2 as Qe,UP as qe,UQ as ze,u6 as Je,hU as Xe,TP as q,hM as ae,hJ as We,hR as en,TQ as nn,FA as tn,YI as an,YJ as on,M0 as sn,l_ as rn,dX as fe,dY as he,YK as ln,gB as cn,U2 as dn,Fz as oe,gG as se,gF as un,Fy as pn,gE as gn,gD as mn,YL as fn,Tf as Ce,YM as hn,YN as Cn,YO as yn,YP as Sn,YQ as bn,YR as In,FG as xn,YS as En,Fx as ie,Fr as G,YT as kn,YU as Pn,YV as re,YW as jn,dQ as vn,YX as wn,YY as An,YZ as Dn,Tr as Un,c0 as Tn,c7 as _n,c6 as Rn,c1 as Mn,Y_ as Bn,c4 as Fn,c3 as Ln,c5 as On,c2 as Vn}from"./zeni-epic-state-B9l_W9RQ.js";import{bS as Yn,z as v,V as N,a7 as ne,c2 as Nn,j as K,O as te,c as L,g as ye,Q as Se,c3 as Gn,l as Zn,Z as be,c4 as $n,ai as Hn,c5 as Kn,c6 as Qn,aq as qn,c7 as zn,p as Jn,d as Ie,c8 as Xn}from"./index-Bw4k26Lh.js";import{n as B}from"./mui-ezTHtwEe.js";import{u as xe}from"./useTaskManagerAccess-JxICb6EI.js";import{U as Wn}from"./AccountMappingScreen-CrS7Kdhn.js";import{t as et,A as nt}from"./AddressScreen-FiUJPHkQ.js";import O from"./NotFoundScreen-BjZ5T-Ms.js";import{g as tt}from"./analyticsHelper-h8-gsFza.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-BbEcHB5F.js";import{C as st}from"./CompanyPassportScreen-BxZDXrE5.js";import{M as R}from"./MobileAppDrawer-NUU2GCIb.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-bG2MR1TT.js";import{q as le}from"./QBOConnectionScreen-DpBki0yd.js";import{B as lt}from"./BillPayApprovalRoutes-BfVotXG7.js";import{R as ct}from"./ReimbursementApprovalRoutes-CDiE4oCm.js";import"./recharts-Chyhxc02.js";import"./analytics-B-TvIB4L.js";import"./plaid-5PXB6whD.js";import"./dnd-2zpntaNq.js";import"./stripe-cKAAJElX.js";import"./lottie-ZAIvsM-R.js";import"./lexical-YhB7nNuN.js";import"./pdf-D6N9uxwe.js";import"./utils-oeHkWTt8.js";import"./accountMappingHelper-D1ooT5ik.js";import"./routePaths-Bd9tk_bd.js";import"./InboxNotificationsProvider-BSgZT9XB.js";import"./empty-Dxu9O_8o.js";import"./pdf-lib-CWh0RHiG.js";import"./index-C08EGy81.js";import"./url-C0mgG0pG.js";import"./index-CIXC3jYt.js";import"./decodeURIComponentSafe-DRhUPcmy.js";import"./ReimbursementApprovalRuleDetailScreen-Cr-o3b5d.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="b4b28488-95ea-408a-ba63-1e0392bf308c",e._sentryDebugIdIdentifier="sentry-dbid-b4b28488-95ea-408a-ba63-1e0392bf308c")}catch{}})();const dt=B.div`
1
+ import{j as a}from"./liveblocks-CPy_3T4M.js";import{a as d}from"./sentry-B8WE62R1.js";import{h as V,g as $,u as T,i as Y,j as C,l as H,n as z,o as k}from"./core-DHfFJrfH.js";import{fE as w,YE as je,MU as ve,Yc as we,Yl as Ae,c8 as X,cT as De,cU as Ue,bq as Te,dd as _e,Fh as Re,YF as Me,Ol as Be,LL as Fe,LC as de,Lz as Le,Fl as ue,LF as pe,LI as ge,LO as W,Bx as ee,Fk as Oe,lt as Z,lw as me,YG as Ve,mG as Ye,FD as Ne,UU as Ge,UV as Ze,lr as $e,YH as He,lu as Ke,u2 as Qe,UP as qe,UQ as ze,u6 as Je,hU as Xe,TP as q,hM as ae,hJ as We,hR as en,TQ as nn,FA as tn,YI as an,YJ as on,M0 as sn,l_ as rn,dX as fe,dY as he,YK as ln,gB as cn,U2 as dn,Fz as oe,gG as se,gF as un,Fy as pn,gE as gn,gD as mn,YL as fn,Tf as Ce,YM as hn,YN as Cn,YO as yn,YP as Sn,YQ as bn,YR as In,FG as xn,YS as En,Fx as ie,Fr as G,YT as kn,YU as Pn,YV as re,YW as jn,dQ as vn,YX as wn,YY as An,YZ as Dn,Tr as Un,c0 as Tn,c7 as _n,c6 as Rn,c1 as Mn,Y_ as Bn,c4 as Fn,c3 as Ln,c5 as On,c2 as Vn}from"./zeni-epic-state-CgS-13Rp.js";import{bS as Yn,z as v,V as N,a7 as ne,c2 as Nn,j as K,M as te,y as L,f as ye,Q as Se,c3 as Gn,l as Zn,Z as be,c4 as $n,ai as Hn,c5 as Kn,c6 as Qn,aq as qn,c7 as zn,k as Jn,c as Ie,c8 as Xn}from"./index-BxJdVany.js";import{n as B}from"./mui-BCtxe7Uc.js";import{u as xe}from"./useTaskManagerAccess-D10G2ni1.js";import{U as Wn}from"./AccountMappingScreen-FWj5nDCB.js";import{t as et,A as nt}from"./AddressScreen-BIEQJvnM.js";import O from"./NotFoundScreen-DsHUR7rB.js";import{g as tt}from"./analyticsHelper-CPeGk6N0.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-CLz9Vhow.js";import{C as st}from"./CompanyPassportScreen-j7OCjtB_.js";import{M as R}from"./MobileAppDrawer-k5UN-ZVo.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-CgnDEvXl.js";import{q as le}from"./QBOConnectionScreen-D_CvuPpu.js";import{B as lt}from"./BillPayApprovalRoutes-qxr0yuTv.js";import{R as ct}from"./ReimbursementApprovalRoutes-BuNkcrV5.js";import"./recharts-B2QzdJEJ.js";import"./analytics-MT8j1Arr.js";import"./plaid-BSrnBML8.js";import"./dnd-DG4Q4PBR.js";import"./stripe-cKAAJElX.js";import"./lottie-CPIsfbGQ.js";import"./lexical-Ds-L3Ehk.js";import"./pdf-BNLZqB1A.js";import"./utils-BAMwHjCz.js";import"./accountMappingHelper-65Fk5KmX.js";import"./routePaths-T6NVNRXw.js";import"./InboxNotificationsProvider-8Zmc_gz4.js";import"./empty-Hx6SHn8J.js";import"./pdf-lib-Dl0EkJKh.js";import"./index-scA92wXl.js";import"./url-Cgny8pWv.js";import"./index-dAj1V_OM.js";import"./decodeURIComponentSafe-DnV8TwS0.js";import"./ReimbursementApprovalRuleDetailScreen-BjlM_mON.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="e4f9c1e7-b386-4bf3-999c-a4fd89eb2267",e._sentryDebugIdIdentifier="sentry-dbid-e4f9c1e7-b386-4bf3-999c-a4fd89eb2267")}catch{}})();const dt=B.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-CyXsV56c.js";import{h as J,g as Q,u as ee,i as W,j as v,N as j,l as G,t as Qe}from"./core-DCcrGtvx.js";import{bJ as en,fE as F,cG as nn,H6 as Z,Yc as tn,Yf as an,ul as ne,u9 as te,my as ae,B3 as L,Yh as Ce,gF as $e,gE as We,gD as Ge,Yi as sn,Hf as on,LL as he,LC as Ie,Lz as Ae,Lh as X,LF as _e,LI as ke,LO as ve,Bx as Pe,gZ as cn,cB as rn,dY as un,dX as dn,dh as ln,bt as pn,cu as Fe,Yj as mn,Kh as de,KV as yn,Yk as fn,bK as gn,N4 as le,MU as Sn,Yl as bn,Ym as Cn,N8 as hn,Nc as In,Yn as je,AY as An,RA as _n,NK as be,Oz as pe,Yo as kn,Yp as vn,Yq as Pn,Yr as He,Ys as Tn,UD as En,Xt as Dn,US as Un,Yt as Ke,Ll as wn,UT as On,Lp as Fn,Yu as Oe,NU as qe,mG as xn,uc as Xe,B5 as Vn,bE as Ne,Bh as Le,cE as Bn,Yv as Je,Nr as jn,Ns as Nn,Nw as Ln,Yw as Rn,NN as Re,Yx as zn,Yy as Mn,Yz as Yn,YA as Zn,gU as $n,Iq as Wn,YB as Gn,Iv as Hn,Iu as Kn}from"./zeni-epic-state-B9l_W9RQ.js";import{ai as Te,V as ie,O as me,c as q,E as Ee,z as E,a8 as se,j as D,a7 as De,U as $,bP as qn,ae as oe,bQ as x,bi as xe,bR as Xn,bS as Jn,bT as Qn,s as Be,bU as et,p as ze,aG as Me,a1 as nt,ab as tt,bV as at,bW as it,bX as st,w as ot}from"./index-Bw4k26Lh.js";import{a as h}from"./sentry-T7AA_ij8.js";import{n as Ve,D as ct,S as rt}from"./mui-ezTHtwEe.js";import{u as ut,B as we}from"./BusinessVerificationPageScreen-BbEcHB5F.js";import{M as ye}from"./MobileAppDrawer-NUU2GCIb.js";import N from"./NotFoundScreen-BjZ5T-Ms.js";import{a as Ye}from"./analyticsHelper-h8-gsFza.js";import{d as Ze}from"./routePaths-Bd9tk_bd.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]="067cc3dd-c2a1-4210-aa3a-445e581983ae",e._sentryDebugIdIdentifier="sentry-dbid-067cc3dd-c2a1-4210-aa3a-445e581983ae")}catch{}})();const dt=Ve.div`
1
+ import{j as u}from"./liveblocks-CPy_3T4M.js";import{h as J,g as Q,u as ee,i as W,j as v,N as j,l as G,t as Qe}from"./core-DHfFJrfH.js";import{bJ as en,fE as F,cG as nn,H6 as Z,Yc as tn,Yf as an,ul as ne,u9 as te,my as ae,B3 as L,Yh as Ce,gF as $e,gE as We,gD as Ge,Yi as sn,Hf as on,LL as he,LC as Ie,Lz as Ae,Lh as X,LF as ke,LI as _e,LO as ve,Bx as Pe,gZ as cn,cB as rn,dY as un,dX as dn,dh as ln,bt as pn,cu as Fe,Yj as mn,Kh as de,KV as yn,Yk as fn,bK as gn,N4 as le,MU as Sn,Yl as bn,Ym as Cn,N8 as hn,Nc as In,Yn as je,AY as An,RA as kn,NK as be,Oz as pe,Yo as _n,Yp as vn,Yq as Pn,Yr as He,Ys as Tn,UD as En,Xt as Dn,US as Un,Yt as Ke,Ll as wn,UT as On,Lp as Fn,Yu as Oe,NU as qe,mG as xn,uc as Xe,B5 as Vn,bE as Ne,Bh as Le,cE as Bn,Yv as Je,Nr as jn,Ns as Nn,Nw as Ln,Yw as Rn,NN as Re,Yx as zn,Yy as Mn,Yz as Yn,YA as Zn,gU as $n,Iq as Wn,YB as Gn,Iv as Hn,Iu as Kn}from"./zeni-epic-state-CgS-13Rp.js";import{ai as Te,V as ie,M as me,y as q,E as Ee,z as E,a8 as se,j as D,a7 as De,U as $,bP as qn,ae as oe,bQ as x,bi as xe,bR as Xn,bS as Jn,bT as Qn,r as Be,bU as et,k as ze,aG as Me,a1 as nt,ab as tt,bV as at,bW as it,bX as st,w as ot}from"./index-BxJdVany.js";import{a as h}from"./sentry-B8WE62R1.js";import{n as Ve,D as ct,S as rt}from"./mui-BCtxe7Uc.js";import{u as ut,B as we}from"./BusinessVerificationPageScreen-CLz9Vhow.js";import{M as ye}from"./MobileAppDrawer-k5UN-ZVo.js";import N from"./NotFoundScreen-DsHUR7rB.js";import{a as Ye}from"./analyticsHelper-CPeGk6N0.js";import{d as Ze}from"./routePaths-T6NVNRXw.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]="c442a817-f285-4d83-99fd-5c0f1b9e0e85",e._sentryDebugIdIdentifier="sentry-dbid-c442a817-f285-4d83-99fd-5c0f1b9e0e85")}catch{}})();const dt=Ve.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as u}from"./liveblocks-CyXsV56c.js";import{h as J,g as Q,u as ee,i as W
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,lt=G((function(e,o){const{isUserBillPayAdmin:a,companyId:t}=o,r=F(e),n=tn(e),i=E.getSignedInUser(),l=r.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},c=an(e,t),p=a&&c.updateStatus.fetchState!=="In-Progress"&&c.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&c.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&c.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{billPaySetupView:c,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r}=o;return{onBusinessVerificationSectionClick:()=>{a("../verification"),r?.company?.companyBillPayInfo!=null&&r?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(Z(t,!1,!0))},onSetupApprovalRulesSectionClick:()=>{a("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Pe("bill_pay_setup",n,i))},onEstablishConnectionClick:n=>{e(ve(n,t,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(ke(n,i,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(_e(!1,n,"bill_pay","bill_pay_setup",i))},onEstablishConnectionSuccess:()=>{e(Z(t,!0))},onEnableBillPayClick:()=>{e(X(t,"bill_pay"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Ie(n,i,"bill_pay","bill_pay_setup"):Ae("reimbursement_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(he(t,"bill_pay_setup",n,i))},onEnableBillPaySuccess:()=>{a("../",{relative:"path"})},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?a("../.."):a("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(on(t))},onAcceptUpdatedTOSSuccess:()=>{e(Z(t,!0))},onGetOtp:(n,i)=>{e(Ge(n,"SpendManagementSetup")),i!=null&&e(sn({officerType:i,phone:n}))},onResendOtp:n=>{e(We(n,"SpendManagementSetup"))},onVerifyOtp:(n,i)=>{e($e(n,i,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,i)=>{n!=null&&i!=null&&e(L(t,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{a("../../dashboard")},onNavigateToSettings:()=>{a("../bills/setup")},onInternationPaymentSetUpClick:()=>{a("../international-wire")},onCompanyOfficerUpdated:(n,i)=>{e(Ce({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(t,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))}}}))(qn),pt=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),n=ie(),i=en(n?.loggedInUserRoleMap),{useFeatureGate:l}=me(),{isFeatureEnabled:s}=l(q.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:c}=l(q.isBillPayLocalCurrencyFeatureEnabled),p=Ee(),[g,S]=h.useState(!1),_=h.useRef(!1),I=v((m=>m.billPaySetupViewState.fetchState)),d=v((m=>F(m)));ut();const y=d.companyId??E.getSignedInUserTenant(r)?.companyId;if(E.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const f=!!d.companyBillPayInfo?.info?.isBillPayTOSAccepted,P=nn(n?.loggedInUserRoleMap);h.useEffect((()=>{_.current||I!=="Not-Started"||y==null?_.current||I!=="Completed"||y==null||d.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(_.current=!0,t(Z(y,!1,!0))):(_.current=!0,t(Z(y,!0)))}),[I,y,t]);const b=m=>{S(m)};if(f===!1||P&&!n?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(j,{to:"../promo"});if(f===!0&&n?.loggedInUserRoleMap!=null){const m=C=>C.trackPageLoaded($.Event.billPaySetup);return u.jsxs(dt,{children:[u.jsx(se,{analytics:D,onLoad:C=>m(C)}),u.jsx(ye,{isAppContentDrawerOpen:g,handleDrawerToggle:b}),u.jsx(lt,{navigate:o,location:a,companyId:y,currentTenant:d,isUserBillPayAdmin:i,showIntlWiseWidget:s,meetingUrl:e("bill_pay_setup"),onClickMenuIcon:()=>{b(!0)},isLocalCurrencyEnabled:c})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:p.colors.grey5}})},Zt=(e,o)=>e!=null&&(function(a){return a==="debit"||a==="credit"||a==="debit_and_credit"})(e)?e:o,$t=e=>`/${e}/cards`,Wt=e=>`/${e}/cards/setup`,Gt=e=>`/${e}/cards/onboard`,Ht=(e,o,a,t,r=!1)=>{let n=`/${e}/cards/${encodeURIComponent(o)}`;return t==null||t.status.code!=="inactive"||t.cardHolderUserId!==a.userId||t.type.code!=="business_physical_credit_card"&&t.type.code!=="business_physical_debit_card"?t!=null&&t.status.code==="active"&&t.cardHolderUserId===a.userId&&t.type.code==="business_physical_credit_card"&&r===!0?n+="/addToWallet":t==null||t.type.code!=="business_physical_debit_card"&&t.type.code!=="business_virtual_debit_card"||t.status.code!=="active"||t.cardHolderUserId!==a.userId||t.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},Kt=(e,o)=>e.find((a=>a.id===o)),qt=(e,o,a)=>!e||!o||a.fetchState==="Completed",mt=(e,o,a,t)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:a,isCreditCardEnabled:t}),Xt=(e,o)=>e?{creditCardCashbackOffer:`${o.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${o.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:x(o.cashbackSummary.cashbackEarned.amount),redeemedCashback:x(o.cashbackSummary.cashbackRedeemed.amount),availableCashback:x(o.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:o.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:o.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Jt=(e,o,a,t,r)=>e&&o&&a?{creditAccountId:t.id,creditAccountLimit:x(t.limit.amount),creditAccountAvailableAmount:x(t.available.amount),creditAccountSpentAmount:x(t.balance.amount+t.hold.amount),creditAccountStatus:t.status,outstandingBalance:x(r.remainingAmountDue.amount)}:void 0,Qt=(e,o,a,t,r)=>e&&o&&a?{debitAccountId:t.depositAccounts.map((n=>n.id)),debitAccountName:t.depositAccounts.map((n=>n.accountName)),debitAccountBalance:t.depositAccounts.map((n=>x(n.accountBalance.available.amount))),debitCardsSpend:x(r?.currentMonthSpends.amount??0),debitAccountStatus:t.depositAccounts.map((n=>n.accountStatus))}:void 0,ea=(e,o)=>e&&o.depositAccountLimit!=null&&o.chargeCard!=null?{debitAccountId:o.depositAccountLimit.id,debitAccountName:o.depositAccountLimit?.accountName??o.connectedAccount?.accountName,debitAccountBalance:x(o.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:x(o.chargeCard.limit.amount-o.chargeCard.available.amount),debitAccountStatus:o.depositAccountLimit?.accountStatus??o.connectedAccount?.accountStatus}:void 0,na=80,ta=80,aa=e=>e.companyId??E.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,yt=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,ft=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:a,isDebitCardProductVisible:t,chargeCardsCreditAccountLimit:r})=>(e||o||a)&&(!t||r>0),ia=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:a})=>e||o||a,sa=({cardInfo:e,isProductVisible:o,isTOSAccepted:a,isSetupEnabled:t,isUserHasCardsAdminLevelAccess:r,isUserHasCardsAccess:n})=>!!e&&o&&(!a&&r||n&&!r&&!t),gt=G((function(e,o){const{isUserChargeCardAdmin:a,chargeCardSetUpView:t,isDebitCardOnlyEnabled:r,isCreditCardOnlyEnabled:n}=o,i=F(e),l=E.getSignedInUser(),s=i.tenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=a&&t.updateStatus.fetchState!=="In-Progress"&&t.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&t.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&t.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{chargeCardSetUpView:t,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:p,analytics:D,isDebitCardOnlyEnabled:r,isCreditCardOnlyEnabled:n,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:c}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r,chargeCardSetUpView:n,isDebitCardTOSAccepted:i,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:s,isDebitCardSetupEnabled:c,productInformation:p,controllerEmails:g,businessVerificationStatus:S,isCardPolicyEnabled:_,isUserChargeCardAdmin:I}=o;return{onBusinessVerificationSectionClick:()=>{D.trackCardsVerifyIdentityCompanyDetailsClick(g,p,S?.code),a("../verification"),r?.company?.companyChargeCardInfo!=null&&r.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(de(t,!1,!0))},...I&&_?{onCardPolicySectionClick:()=>{a("../policy")}}:{},onFetchLinkTokenClick:(d,y)=>{e(Pe("charge_card_setup",d,y))},onEstablishConnectionClick:d=>{e(ve(d,t,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,y,f)=>{e(ke(d,y,"charge_cards","charge_card_setup",f))},onUpdatePaymentAccountLoginStatus:(d,y)=>{e(_e(!1,d,"charge_cards","charge_card_setup",y))},onEstablishConnectionSuccess:()=>{e(de(t,!0))},onEnableChargeCardClick:()=>{D.trackCardsEnableCardsClick(g,p,"Cards Card Setup"),l===!0&&i===!0&&s===!1&&c===!1?e(X(t,"charge_cards__debit_cards")):l===!0&&s===!1?e(X(t,"charge_cards")):i===!0&&c===!1&&e(X(t,"debit_cards"))},onUpdateChargeCardClick:(d,y,f)=>{const P=n.allBankAccounts.find((m=>m.accountId===n.primaryFundingAccount?.zeniAccountId)),b=n.allBankAccounts.find((m=>m.accountId===d));D.trackCardsZeniCashAccountChangeClick(g,p,{oldZeniCashAccount:P?.accountName??"",newZeniCashAccount:b?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex((m=>m.accountId===n.primaryFundingAccount?.zeniAccountId))+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex((m=>m.accountId===d))+1,numberOfCashAccounts:n.allBankAccounts.length}),e(f==="paymentAccount"?Ie(d,y,"charge_cards","charge_card_setup"):Ae("charge_card_setup",d,y))},onUpdatePrimaryFundingAccount:(d,y)=>{const f=n.allFundingAccounts.find((m=>m.id===d)),P=n.allFundingAccounts.findIndex((m=>m.id===n.primaryFundingAccount?.id))+1,b=n.allFundingAccounts.findIndex((m=>m.id===d))+1;D.trackCardsPaymentAccountChangeClick(g,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:x(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:f?.label??"",newPaymentAccountBalance:x(f?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:f?.accType==="depositAccount",oldPaymentAccountPosition:P,newPaymentAccountPosition:b,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(he(t,"charge_card_setup",d,y))},onEnableChargeCardSuccess:()=>{e(fn()),a("../",{relative:"path"})},onBackClick:()=>{r?.companyChargeCardInfo?.info?.isChargeCardEnabled||r?.companyDebitCardInfo?.info?.isDebitCardEnabled?a("../",{relative:"path"}):a("../..",{relative:"path"})},onNavigateToDashboard:()=>{a("../../dashboard")},onCompanyOfficerUpdated:(d,y)=>{e(Ce({officerType:d,fileIds:y}))},onSendForVerificationClick:d=>{l===!0&&i===!0?e(L(t,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(L(t,d,"charge_cards",!0,!0,!0)):i===!0&&e(L(t,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(ae({files:d}))},onDeleteFile:d=>{e(te(d))},onEditFileName:(d,y)=>{e(ne(d,y.split(".")[0]))},onUpdateAutoPayClick:d=>{e(yn(t,d))}}}))(Xn),St=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),n=ie(),i=v((R=>F(R))),{useDynamicConfig:l,useFeatureGate:s}=me(),c=a.state?.pathnameStackToGoBack?.[0],{configValue:p}=l(xe.zeniCardsConfig),g=p.credit_card_auto_pay_threshold_by_company_id?.[i.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:S}=s(q.isDebitCardFeatureEnabled),{isFeatureEnabled:_}=s(q.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=s(q.isEarlyPayFeatureEnabled),{isFeatureEnabled:d}=s(q.isCardPolicyEnabled),y=v((R=>cn(R,i.companyId))),f=rn(y.controllers),P=!!i.company?.companyChargeCardInfo.isChargeCardEnabled,b=!!i.company?.companyDebitCardInfo.isDebitCardEnabled,m=un(S,i),C=yt({isDebitCardFeatureEnabled:S,isBankingOnlyTenant:m}),k=dn(i),T=ln(i),A=i.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,U=ft({isCardsOnlyTenant:k,isChargeCardFeatureEnabled:_,isBookKeepingTenant:T,isDebitCardProductVisible:C,chargeCardsCreditAccountLimit:A}),z=C&&U===!1,V=C===!1&&U,M=pn(n?.loggedInUserRoleMap),O=Fe(n?.loggedInUserRoleMap),[ce,H]=h.useState(!1),[K,re]=h.useState(!1),Y=v((R=>R.chargeCardSetupViewState.fetchState)),B=E.getSignedInUserTenant(r)?.companyId??i.companyId,w=E.getSignedInUser(),Ue=R=>{H(R)},fe=v((R=>mn(R,B)));if(w==null)throw Error("Can't access charge card setup page without signing in...");h.useEffect((()=>{K||Y!=="Not-Started"||B==null?K||Y!=="Completed"||B==null||i.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(de(B,!1,!0)):(re(!0),t(de(B,!0)))}),[K,Y,B,t]);const ge=!!i.company?.companyChargeCardInfo.isChargeCardTOSAccepted,Se=!!i.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=mt(U,C,b,P);return ge||Se?ge||Se?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:()=>{D.trackPageLoaded($.Event.cardsSetupVisited),D.trackCardsCardSetupView(f,ue,c==null?"Cards Setup":c.includes("cards/promo")?"Promo":c.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(ye,{isAppContentDrawerOpen:ce,handleDrawerToggle:Ue}),u.jsx(gt,{autoPayThreshold:g,navigate:o,meetingUrl:e("charge_card_setup"),location:a,companyId:B,currentTenant:i,isEarlyPayEnabled:I,isChargeCardTOSAccepted:ge,isDebitCardTOSAccepted:Se,isUserChargeCardAdmin:M,isCardPolicyEnabled:d,isDebitCardOnlyEnabled:z,isCreditCardOnlyEnabled:V,chargeCardSetUpView:fe,isCreditCardProductVisible:U,isDebitCardFeatureEnabled:C,isChargeCardSetupEnabled:P,isDebitCardSetupEnabled:b,businessVerificationStatus:i.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:f,productInformation:ue,onClickMenuIcon:()=>{Ue(!0)},hasZeniAccountsAdminAccess:O})]}):u.jsx(De,{fetchState:"Not-Started"}):u.jsx(j,{to:"../promo"})},bt=Ve.div`
9
+ `,lt=G((function(e,o){const{isUserBillPayAdmin:a,companyId:t}=o,r=F(e),n=tn(e),i=E.getSignedInUser(),l=r.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},c=an(e,t),p=a&&c.updateStatus.fetchState!=="In-Progress"&&c.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&c.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&c.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{billPaySetupView:c,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r}=o;return{onBusinessVerificationSectionClick:()=>{a("../verification"),r?.company?.companyBillPayInfo!=null&&r?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(Z(t,!1,!0))},onSetupApprovalRulesSectionClick:()=>{a("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Pe("bill_pay_setup",n,i))},onEstablishConnectionClick:n=>{e(ve(n,t,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(_e(n,i,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(ke(!1,n,"bill_pay","bill_pay_setup",i))},onEstablishConnectionSuccess:()=>{e(Z(t,!0))},onEnableBillPayClick:()=>{e(X(t,"bill_pay"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Ie(n,i,"bill_pay","bill_pay_setup"):Ae("reimbursement_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(he(t,"bill_pay_setup",n,i))},onEnableBillPaySuccess:()=>{a("../",{relative:"path"})},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?a("../.."):a("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(on(t))},onAcceptUpdatedTOSSuccess:()=>{e(Z(t,!0))},onGetOtp:(n,i)=>{e(Ge(n,"SpendManagementSetup")),i!=null&&e(sn({officerType:i,phone:n}))},onResendOtp:n=>{e(We(n,"SpendManagementSetup"))},onVerifyOtp:(n,i)=>{e($e(n,i,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,i)=>{n!=null&&i!=null&&e(L(t,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{a("../../dashboard")},onNavigateToSettings:()=>{a("../bills/setup")},onInternationPaymentSetUpClick:()=>{a("../international-wire")},onCompanyOfficerUpdated:(n,i)=>{e(Ce({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(t,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))}}}))(qn),pt=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),n=ie(),i=en(n?.loggedInUserRoleMap),{useFeatureGate:l}=me(),{isFeatureEnabled:s}=l(q.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:c}=l(q.isBillPayLocalCurrencyFeatureEnabled),p=Ee(),[g,S]=h.useState(!1),k=h.useRef(!1),I=v((m=>m.billPaySetupViewState.fetchState)),d=v((m=>F(m)));ut();const y=d.companyId??E.getSignedInUserTenant(r)?.companyId;if(E.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const f=!!d.companyBillPayInfo?.info?.isBillPayTOSAccepted,P=nn(n?.loggedInUserRoleMap);h.useEffect((()=>{k.current||I!=="Not-Started"||y==null?k.current||I!=="Completed"||y==null||d.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(k.current=!0,t(Z(y,!1,!0))):(k.current=!0,t(Z(y,!0)))}),[I,y,t]);const b=m=>{S(m)};if(f===!1||P&&!n?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(j,{to:"../promo"});if(f===!0&&n?.loggedInUserRoleMap!=null){const m=C=>C.trackPageLoaded($.Event.billPaySetup);return u.jsxs(dt,{children:[u.jsx(se,{analytics:D,onLoad:C=>m(C)}),u.jsx(ye,{isAppContentDrawerOpen:g,handleDrawerToggle:b}),u.jsx(lt,{navigate:o,location:a,companyId:y,currentTenant:d,isUserBillPayAdmin:i,showIntlWiseWidget:s,meetingUrl:e("bill_pay_setup"),onClickMenuIcon:()=>{b(!0)},isLocalCurrencyEnabled:c})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:p.colors.grey5}})},Zt=(e,o)=>e!=null&&(function(a){return a==="debit"||a==="credit"||a==="debit_and_credit"})(e)?e:o,$t=e=>`/${e}/cards`,Wt=e=>`/${e}/cards/setup`,Gt=e=>`/${e}/cards/onboard`,Ht=(e,o,a,t,r=!1)=>{let n=`/${e}/cards/${encodeURIComponent(o)}`;return t==null||t.status.code!=="inactive"||t.cardHolderUserId!==a.userId||t.type.code!=="business_physical_credit_card"&&t.type.code!=="business_physical_debit_card"?t!=null&&t.status.code==="active"&&t.cardHolderUserId===a.userId&&t.type.code==="business_physical_credit_card"&&r===!0?n+="/addToWallet":t==null||t.type.code!=="business_physical_debit_card"&&t.type.code!=="business_virtual_debit_card"||t.status.code!=="active"||t.cardHolderUserId!==a.userId||t.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},Kt=(e,o)=>e.find((a=>a.id===o)),qt=(e,o,a)=>!e||!o||a.fetchState==="Completed",mt=(e,o,a,t)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:a,isCreditCardEnabled:t}),Xt=(e,o)=>e?{creditCardCashbackOffer:`${o.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${o.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:x(o.cashbackSummary.cashbackEarned.amount),redeemedCashback:x(o.cashbackSummary.cashbackRedeemed.amount),availableCashback:x(o.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:o.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:o.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Jt=(e,o,a,t,r)=>e&&o&&a?{creditAccountId:t.id,creditAccountLimit:x(t.limit.amount),creditAccountAvailableAmount:x(t.available.amount),creditAccountSpentAmount:x(t.balance.amount+t.hold.amount),creditAccountStatus:t.status,outstandingBalance:x(r.remainingAmountDue.amount)}:void 0,Qt=(e,o,a,t,r)=>e&&o&&a?{debitAccountId:t.depositAccounts.map((n=>n.id)),debitAccountName:t.depositAccounts.map((n=>n.accountName)),debitAccountBalance:t.depositAccounts.map((n=>x(n.accountBalance.available.amount))),debitCardsSpend:x(r?.currentMonthSpends.amount??0),debitAccountStatus:t.depositAccounts.map((n=>n.accountStatus))}:void 0,ea=(e,o)=>e&&o.depositAccountLimit!=null&&o.chargeCard!=null?{debitAccountId:o.depositAccountLimit.id,debitAccountName:o.depositAccountLimit?.accountName??o.connectedAccount?.accountName,debitAccountBalance:x(o.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:x(o.chargeCard.limit.amount-o.chargeCard.available.amount),debitAccountStatus:o.depositAccountLimit?.accountStatus??o.connectedAccount?.accountStatus}:void 0,na=80,ta=80,aa=e=>e.companyId??E.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,yt=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,ft=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:a,isDebitCardProductVisible:t,chargeCardsCreditAccountLimit:r})=>(e||o||a)&&(!t||r>0),ia=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:a})=>e||o||a,sa=({cardInfo:e,isProductVisible:o,isTOSAccepted:a,isSetupEnabled:t,isUserHasCardsAdminLevelAccess:r,isUserHasCardsAccess:n})=>!!e&&o&&(!a&&r||n&&!r&&!t),gt=G((function(e,o){const{isUserChargeCardAdmin:a,chargeCardSetUpView:t,isDebitCardOnlyEnabled:r,isCreditCardOnlyEnabled:n}=o,i=F(e),l=E.getSignedInUser(),s=i.tenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=a&&t.updateStatus.fetchState!=="In-Progress"&&t.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&t.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&t.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{chargeCardSetUpView:t,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:p,analytics:D,isDebitCardOnlyEnabled:r,isCreditCardOnlyEnabled:n,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:c}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r,chargeCardSetUpView:n,isDebitCardTOSAccepted:i,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:s,isDebitCardSetupEnabled:c,productInformation:p,controllerEmails:g,businessVerificationStatus:S,isCardPolicyEnabled:k,isUserChargeCardAdmin:I}=o;return{onBusinessVerificationSectionClick:()=>{D.trackCardsVerifyIdentityCompanyDetailsClick(g,p,S?.code),a("../verification"),r?.company?.companyChargeCardInfo!=null&&r.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(de(t,!1,!0))},...I&&k?{onCardPolicySectionClick:()=>{a("../policy")}}:{},onFetchLinkTokenClick:(d,y)=>{e(Pe("charge_card_setup",d,y))},onEstablishConnectionClick:d=>{e(ve(d,t,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,y,f)=>{e(_e(d,y,"charge_cards","charge_card_setup",f))},onUpdatePaymentAccountLoginStatus:(d,y)=>{e(ke(!1,d,"charge_cards","charge_card_setup",y))},onEstablishConnectionSuccess:()=>{e(de(t,!0))},onEnableChargeCardClick:()=>{D.trackCardsEnableCardsClick(g,p,"Cards Card Setup"),l===!0&&i===!0&&s===!1&&c===!1?e(X(t,"charge_cards__debit_cards")):l===!0&&s===!1?e(X(t,"charge_cards")):i===!0&&c===!1&&e(X(t,"debit_cards"))},onUpdateChargeCardClick:(d,y,f)=>{const P=n.allBankAccounts.find((m=>m.accountId===n.primaryFundingAccount?.zeniAccountId)),b=n.allBankAccounts.find((m=>m.accountId===d));D.trackCardsZeniCashAccountChangeClick(g,p,{oldZeniCashAccount:P?.accountName??"",newZeniCashAccount:b?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex((m=>m.accountId===n.primaryFundingAccount?.zeniAccountId))+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex((m=>m.accountId===d))+1,numberOfCashAccounts:n.allBankAccounts.length}),e(f==="paymentAccount"?Ie(d,y,"charge_cards","charge_card_setup"):Ae("charge_card_setup",d,y))},onUpdatePrimaryFundingAccount:(d,y)=>{const f=n.allFundingAccounts.find((m=>m.id===d)),P=n.allFundingAccounts.findIndex((m=>m.id===n.primaryFundingAccount?.id))+1,b=n.allFundingAccounts.findIndex((m=>m.id===d))+1;D.trackCardsPaymentAccountChangeClick(g,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:x(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:f?.label??"",newPaymentAccountBalance:x(f?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:f?.accType==="depositAccount",oldPaymentAccountPosition:P,newPaymentAccountPosition:b,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(he(t,"charge_card_setup",d,y))},onEnableChargeCardSuccess:()=>{e(fn()),a("../",{relative:"path"})},onBackClick:()=>{r?.companyChargeCardInfo?.info?.isChargeCardEnabled||r?.companyDebitCardInfo?.info?.isDebitCardEnabled?a("../",{relative:"path"}):a("../..",{relative:"path"})},onNavigateToDashboard:()=>{a("../../dashboard")},onCompanyOfficerUpdated:(d,y)=>{e(Ce({officerType:d,fileIds:y}))},onSendForVerificationClick:d=>{l===!0&&i===!0?e(L(t,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(L(t,d,"charge_cards",!0,!0,!0)):i===!0&&e(L(t,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(ae({files:d}))},onDeleteFile:d=>{e(te(d))},onEditFileName:(d,y)=>{e(ne(d,y.split(".")[0]))},onUpdateAutoPayClick:d=>{e(yn(t,d))}}}))(Xn),St=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),n=ie(),i=v((R=>F(R))),{useDynamicConfig:l,useFeatureGate:s}=me(),c=a.state?.pathnameStackToGoBack?.[0],{configValue:p}=l(xe.zeniCardsConfig),g=p.credit_card_auto_pay_threshold_by_company_id?.[i.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:S}=s(q.isDebitCardFeatureEnabled),{isFeatureEnabled:k}=s(q.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=s(q.isEarlyPayFeatureEnabled),{isFeatureEnabled:d}=s(q.isCardPolicyEnabled),y=v((R=>cn(R,i.companyId))),f=rn(y.controllers),P=!!i.company?.companyChargeCardInfo.isChargeCardEnabled,b=!!i.company?.companyDebitCardInfo.isDebitCardEnabled,m=un(S,i),C=yt({isDebitCardFeatureEnabled:S,isBankingOnlyTenant:m}),_=dn(i),T=ln(i),A=i.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,U=ft({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:k,isBookKeepingTenant:T,isDebitCardProductVisible:C,chargeCardsCreditAccountLimit:A}),z=C&&U===!1,V=C===!1&&U,M=pn(n?.loggedInUserRoleMap),O=Fe(n?.loggedInUserRoleMap),[ce,H]=h.useState(!1),[K,re]=h.useState(!1),Y=v((R=>R.chargeCardSetupViewState.fetchState)),B=E.getSignedInUserTenant(r)?.companyId??i.companyId,w=E.getSignedInUser(),Ue=R=>{H(R)},fe=v((R=>mn(R,B)));if(w==null)throw Error("Can't access charge card setup page without signing in...");h.useEffect((()=>{K||Y!=="Not-Started"||B==null?K||Y!=="Completed"||B==null||i.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(de(B,!1,!0)):(re(!0),t(de(B,!0)))}),[K,Y,B,t]);const ge=!!i.company?.companyChargeCardInfo.isChargeCardTOSAccepted,Se=!!i.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=mt(U,C,b,P);return ge||Se?ge||Se?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:()=>{D.trackPageLoaded($.Event.cardsSetupVisited),D.trackCardsCardSetupView(f,ue,c==null?"Cards Setup":c.includes("cards/promo")?"Promo":c.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(ye,{isAppContentDrawerOpen:ce,handleDrawerToggle:Ue}),u.jsx(gt,{autoPayThreshold:g,navigate:o,meetingUrl:e("charge_card_setup"),location:a,companyId:B,currentTenant:i,isEarlyPayEnabled:I,isChargeCardTOSAccepted:ge,isDebitCardTOSAccepted:Se,isUserChargeCardAdmin:M,isCardPolicyEnabled:d,isDebitCardOnlyEnabled:z,isCreditCardOnlyEnabled:V,chargeCardSetUpView:fe,isCreditCardProductVisible:U,isDebitCardFeatureEnabled:C,isChargeCardSetupEnabled:P,isDebitCardSetupEnabled:b,businessVerificationStatus:i.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:f,productInformation:ue,onClickMenuIcon:()=>{Ue(!0)},hasZeniAccountsAdminAccess:O})]}):u.jsx(De,{fetchState:"Not-Started"}):u.jsx(j,{to:"../promo"})},bt=Ve.div`
10
10
  display: flex;
11
11
  height: 100%;
12
12
  width: 100%;
@@ -14,11 +14,11 @@ import{j as u}from"./liveblocks-CyXsV56c.js";import{h as J,g as Q,u as ee,i as W
14
14
  flex-direction: column;
15
15
  align-items: center;
16
16
  background-color: ${e=>e.theme.colors.grey4};
17
- `,Ct=G((function(e,o){const{isUserRemiAdmin:a,companyId:t}=o,r=F(e),n=bn(e),i=Cn(e,t),l=E.getSignedInUser(),s=r.tenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""};return{remiSetupView:i,isDisabled:a&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",remiApprovalView:n,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:c}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r}=o;return{updateMileageDetails:n=>{const{mileageAmount:i,mileageUnit:l,mileageCurrencyCode:s,mileageCurrencySymbol:c,denomination:p,denominationSymbol:g,mileageAmountInDenomination:S,description:_}=n;e(In({mileageDetails:{mileageUnitAmount:{amount:i,currencyCode:s,currencySymbol:c},denomination:p,denominationSymbol:g,mileageAmountInDenomination:S,mileageCurrencyCode:s,mileageCurrencySymbol:c,mileageUnit:l,description:_}}))},onSaveMileageClick:n=>{e(hn(t)),D.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{a("../verification"),r?.company?.companyReimbursementInfo!=null&&r?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(t,!1,!0))},onSetupApprovalRulesSectionClick:()=>{a("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Pe("reimbursement_setup",n,i))},onEstablishConnectionClick:n=>{e(ve(n,t,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(ke(n,i,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(_e(!1,n,"reimbursement","reimbursement_setup",i))},onEstablishConnectionSuccess:()=>{e(le(t,!0))},onEnableRemiClick:()=>{e(X(t,"reimbursement"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Ie(n,i,"reimbursement","reimbursement_setup"):Ae("reimbursement_setup",n,i))},onEnableRemiSuccess:()=>{a("../",{relative:"path"})},onBackClick:()=>{r?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&r.companyReimbursementInfo.info.isReimbursementEnabled===!1?a("../.."):a("../",{relative:"path"})},onCompanyOfficerUpdated:(n,i)=>{e(Ce({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(t,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,i)=>{e(he(t,"reimbursement_setup",n,i))}}}))(Qn),ht=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),n=ie(),i=Ee(),l=gn(n?.loggedInUserRoleMap),s=Fe(n?.loggedInUserRoleMap),[c,p]=h.useState(!1),g=h.useRef(!1),[S,_]=h.useState(!1),I=v((k=>k.remiSetupViewState.fetchState)),d=v((k=>F(k))),y=v((k=>k.remiSetupApproverViewState.fetchState)),{isApprovalRulesV3Enabled:f,isLoading:P}=Jn(d?.tenantId),b=E.getSignedInUserTenant(r)?.companyId??d.companyId,m=E.getSignedInUser(),C=k=>{p(k)};if(m==null)throw Error("Can't access reimbursement setup page without signing in...");if(h.useEffect((()=>{g.current||I!=="Not-Started"||b==null?g.current||I!=="Completed"||b==null||d.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(g.current=!0,t(le(b,!1,!0))):(g.current=!0,t(le(b,!0)))}),[I,b,t]),h.useEffect((()=>{S||y!=="Not-Started"||P||(_(!0),t(Sn(!0,!1,!1,f)))}),[S,y,P,f,t]),d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(j,{to:"../promo"});if(d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const k=T=>T.trackPageLoaded($.Event.reimbursementSetup);return u.jsxs(bt,{children:[u.jsx(se,{analytics:D,onLoad:T=>k(T)}),u.jsx(ye,{isAppContentDrawerOpen:c,handleDrawerToggle:C}),u.jsx(Ct,{navigate:o,location:a,companyId:b,currentTenant:d,isUserRemiAdmin:l,meetingUrl:e("reimbursement_setup"),onClickMenuIcon:()=>{C(!0)},hasZeniAccountsAdminAccess:s})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})},It=G((function(e,o){const{businessVerificationDetails:a,productType:t}=o,r=F(e),n=E.getSignedInUser(),i=r.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=En(o.roleMap)&&a.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",c=Dn(e.companyConfigState),p=Un(e.userRoleConfigState),g=t==="zeni_treasury"?Ke(e):void 0;return{businessVerificationDetails:a,verficationDetailsFetchState:a.fetchState,isRefreshingViewInBackground:a.isRefreshingViewInBackground,allNationalityCountries:a.allNationalityCountries,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:s,allIndustries:c.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:g}}),(function(e,o){const{companyId:a,productType:t,currentTenant:r,navigate:n,location:i}=o,{tenantEmailDomain:l}=r;return{onCompanyDetailsChanged:s=>{const{companyDescription:c,companyIndustry:p,companyIndustryType:g,companyLegalName:S,companyTaxId:_,companyWebsite:I,companyPhone:d,primaryContactEmail:y,primaryContactName:f,primaryContactUserId:P,primaryContactSyncToken:b,syncToken:m,fileIds:C,incDate:k,typeOfIncorporation:T,stateOfIncorporation:A,sourceOfFunds:U,companySubIndustry:z,countriesOfOperations:V,companySourceOfFunds:M,companySourceOfFundsDescription:O,transactionVolume:ce,transactionVolumeDescription:H,purposeOfAccount:K,purposeOfAccountDescription:re,regulatedStatus:Y,regulatedStatusDescription:B,usNexus:w,usNexusTypes:Ue}=s,fe=g?.selectedOption,ge={companyId:a,companyDescription:c,companyIndustry:p.selectedOption,companyIndustryType:fe==null||fe===""?void 0:fe,companyLegalName:S,taxIdOrEIN:_,website:I!=""&&I!=null?Bn(I):void 0,phone:d,syncToken:m,fileIds:C,incDate:k!=null?Ne(k?.toString()):k,typeOfIncorporation:T?.selectedOption??"",stateOfIncorporation:A?.selectedOption??"",sourceOfFunds:U?.selectedOption??"",companySubIndustry:z?.selectedOption??"",countriesOfOperations:V?.selectedOptions.map((ue=>ue.length===2?ue:Me(ue)))??[],companySourceOfFunds:M?.selectedOption??"",companySourceOfFundsDescription:O,transactionVolume:ce?.selectedOption??"",transactionVolumeDescription:H,purposeOfAccount:K?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:Y??"",regulatedStatusDescription:B,usNexus:w,usNexusTypes:Ue?.selectedOptions??[]},Se={userId:P,firstName:f.firstName,lastName:f.lastName,email:y,syncToken:b};e(Le({companyDetails:ge,primaryContactDetails:Se}))},onCompanyOfficerUpdated:s=>{const c=s.map((p=>{const{officerType:g,userId:S,name:_,email:I,nationalityCountryCode:d,ssn:y,dob:f,phone:P,syncToken:b,selectDocument:m,role:C,ownership:k,isSelectedForVerification:T,userVerificationStatus:A,treasuryUserVerificationStatus:U,fileIds:z}=p;let V;return m.selectDocumentType==="driverLicense"?V="driving_license":m.selectDocumentType==="passport"?V="passport":m.selectDocumentType==="stateId"?V="id_document":m.selectDocumentType==="ssnCard"&&(V="social_security_card"),{officerType:g,userId:S,firstName:_.firstName,lastName:_.lastName,email:I,ssn:y,nationalityCountryCode:d?.selectedOption!=null?Me(d.selectedOption):void 0,phone:P,birthday:f!=null?Ne(f?.toString()):f,syncToken:b,titleAtCompany:C.selectedOption,ownershipInCompany:k,documentTypeSelectedForVerification:V,isSelectedForVerification:T,userVerificationStatus:A,treasuryUserVerificationStatus:U,fileIds:z,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(Le({officers:c}))},onSaveDetailsClick:s=>{e(L(a,s,t))},onSendForVerificationClick:s=>{e(L(a,s,t,!0))},onAddressClick:s=>{const c=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),g=new URLSearchParams(i.search),S={};g.forEach(((_,I)=>{S[I]=_})),n(c,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(S).length>0?S:void 0}})},onRegisteredAddressClick:s=>{const c=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),g=new URLSearchParams(i.search),S=Object.fromEntries(g.entries());n(c,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(S).length>0?S:void 0}})},onBackClick:()=>{e(Vn({companyId:a})),n("../setup")},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onDeleteFileList:s=>{e(Xe(s))},onEditFileName:(s,c)=>{e(ne(s,c.split(".")[0]))},onGetOtp:s=>{e(Ge(s,"SpendManagementSetup"))},onResendOtp:s=>{e(We(s,"SpendManagementSetup"))},onVerifyOtp:(s,c)=>{e($e(s,c,"SpendManagementSetup"))},saveNewAddressInLocalStore:(s,c)=>{e(xn({addressType:s,addressToCreate:c}))},onExecuteTreasuryTransfer:()=>{e(qe())},onOverlayClose:()=>{e(Oe())},onIdentityDocumentUploadedForAutofill:s=>{if(a==null)return;const c=On(s.documentType);c!=null&&e(Fn({target:"setup",companyId:a,officerType:s.officerType,fileId:s.fileId,documentType:c}))},onCompanyDocumentUploadedForAutofill:s=>{a!=null&&e(wn({target:"setup",companyId:a,fileId:s.fileId,documentType:s.documentType}))}}}))(et),At=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:a})=>{const t=J(),r=Q(),n=ee(),[i]=Qe(),l=i.get("showStepProgress"),s=i.get("isTransferInitiated"),[c,p]=h.useState(!1),{tenantEmailDomain:g}=W(),S=ie(),{useDynamicConfig:_}=me(),I=Ee(),{configValue:d}=_(xe.zeniAccountsConfig),y=je(d),f=v((A=>{switch(e){case"zeni_accounts":return A.zeniAccountSetupViewState.fetchState;case"reimbursement":return A.remiSetupViewState.fetchState;case"charge_cards":return A.chargeCardSetupViewState.fetchState;case"zeni_treasury":return A.treasurySetupViewState.fetchState;default:return A.billPaySetupViewState.fetchState}})),P=v((A=>A.companyConfigState.fetchState)),b=v((A=>A.userRoleConfigState.fetchState)),m=v((A=>F(A))),C=m.companyId??E.getSignedInUserTenant(g)?.companyId;if(h.useEffect((()=>{P==="Not-Started"&&n(An()),b==="Not-Started"&&n(_n(!0))}),[P,b,n]),h.useEffect((()=>{if(!c&&f==="Not-Started"&&C!=null)switch(p(!0),e){case"zeni_accounts":n(pe(C,!0));break;case"zeni_treasury":n(be(C,!0));break;case"reimbursement":n(le(C,!0));break;case"charge_cards":n(de(C,!0));break;default:n(Z(C,!0))}}),[c,f,C,n]),E.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let k;switch(e){case"zeni_accounts":k=m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":k=m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":k=m.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||m.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":k=m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:k=m.companyBillPayInfo?.info?.isBillPayTOSAccepted}const T=v((A=>{let U;switch(e){case"zeni_accounts":U=Tn(A,C);break;case"zeni_treasury":U=He(A,C);break;case"charge_cards":U=Pn(A,C);break;case"reimbursement":U=vn(A,C);break;default:U=kn(A,C)}return U}));return k===!1?null:T.fetchState==="Completed"&&k===!0&&S?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:A=>(U=>{switch(e){case"zeni_accounts":return U.trackPageLoaded($.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return U.trackPageLoaded($.Event.reimbursementBusinessVerification);default:return U.trackPageLoaded($.Event.billPayBusinessVerification,Be(r)?"Settings":void 0)}})(A)}),u.jsx(It,{businessVerificationDetails:T,navigate:t,location:r,companyId:C,analytics:D,currentTenant:m,productType:e,roleMap:S.loggedInUserRoleMap,isSettings:Be(r),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:s!=null,onClickMenuIcon:()=>{},maxInsuredAmount:y.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:a})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:I.colors.grey5}})},_t={overlayWidth:new tt(100,100,59)},kt=G((function(e,o){const{isUserZeniAccountsAdmin:a,companyId:t}=o,r=F(e),n=E.getSignedInUser(),i=r.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Je(e,t),c=He(e,t),p=a&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",g=Rn(e),S=g.transactions,_=Ke(e),I=g.accountSummary?.totalBalance?.amount,d=S.length===0||I===0;return{treasurySetupView:s,businessVerificationDetails:c,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:S,transferDetails:_,isFirstTransfer:d,isDisabled:p,analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isOnSetup:!0,maxInsuredAmount:o.maxInsuredAmount}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r,isAllocationDone:n,analytics:i,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:s=>{e(Yn(s))},onBusinessVerificationSectionClick:(s,c)=>{let p="../verification";s&&(p+="?showStepProgress=true",c&&(p+="&isTransferInitiated=true")),a(p),r?.company?.companyTreasuryInfo!=null&&r?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(be(t,!1,!0))},onFetchLinkTokenClick:(s,c)=>{e(Pe("treasury_setup",s,c))},onEstablishConnectionClick:s=>{e(ve(s,t,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(s,c,p)=>{e(ke(s,c,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(s,c)=>{e(_e(!1,s,"zeni_treasury","treasury_setup",c))},onEstablishConnectionSuccess:()=>{e(be(t,!0))},onEnableTreasuryClick:()=>{e(X(t,"zeni_treasury"))},onUpdateTreasuryClick:(s,c,p)=>{e(p==="paymentAccount"?Ie(s,c,"zeni_treasury","treasury_setup"):Ae("treasury_setup",s,c))},onUpdatePrimaryFundingAccount:(s,c)=>{e(he(t,"treasury_setup",s,c))},onNavigateToDashboard:()=>{a(r?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(s,c)=>{e(Ce({officerType:s,fileIds:c}))},onSendForVerificationClick:(s,c)=>{if(e(L(t,s,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;i.trackTreasuryPortfolioConfirm(p.riskScore,Ye(p)),e(Re(!1))}c===!0&&e(qe())},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onEditFileName:(s,c)=>{e(ne(s,c.split(".")[0]))},onAdditionalVerificationFieldsChanged:s=>{const{sourceOfFunds:c}=s;e(Mn({sourceOfFunds:c?.selectedOption??""}))},onUpdateFundAllocation:s=>{i.trackTreasuryAllocationAction("update",Ye(s)),e(zn(s))},onConfirmFundAllocation:()=>{e(Re(n))},onOverlayClose:()=>{e(Oe())}}}))(at),vt=()=>{const e=Te(),o=J(),a=Q(),t=ee(),r=Ee(),n=nt(),{tenantEmailDomain:i}=W(),{useDynamicConfig:l}=me(),s=ie(),[c,p]=h.useState(!1),g=Fe(s?.loggedInUserRoleMap),{configValue:S}=l(xe.zeniAccountsConfig),_=je(S),[I,d]=h.useState(!1),[y,f]=h.useState(!1),[P,b]=h.useState(!1),[m,C]=h.useState(!1),[k,T]=h.useState(!1),A=v((w=>w.treasurySetupViewState.fetchState)),U=v((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),z=v((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),V=v((w=>w.treasuryDetailState.transactionsState?.fetchState)),M=v((w=>F(w))),O=E.getSignedInUserTenant(i)?.companyId??M.companyId,ce=v((w=>Je(w,O))),H=ce.isAtomicAccountExists,K=E.getSignedInUser(),re=w=>{d(w)};if(K==null)throw Error("Can't access treasury setup page without signing in...");h.useEffect((()=>{y||A!=="Not-Started"||O==null||(f(!0),t(be(O,!0,!1)))}),[y,A,O,t]),h.useEffect((()=>{P||U!=="Not-Started"||O==null||(b(!0),t(jn()))}),[P,U,O,t]),h.useEffect((()=>{m||z!=="Not-Started"||O==null||(C(!0),t(Nn()))}),[m,z,O,t]),h.useEffect((()=>{k||V!=="Not-Started"||O==null||(T(!0),t(Ln(!0)))}),[k,V,O,t]);const Y=M.companyTreasuryInfo?.info?.businessVerificationStatus?.code,B=Y==="pending_review"||Y==="verified";return h.useEffect((()=>{c||A!=="Completed"||H||B||!a.pathname.includes("setup")||p(!0)}),[A,H,B]),M.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(j,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:()=>{}}),u.jsx(ye,{isAppContentDrawerOpen:I,handleDrawerToggle:re}),u.jsx(ct,{onClose:()=>{t(Oe()),o("../setup")},anchor:"right",open:a.pathname.includes("verification"),transitionDuration:c?0:250,PaperProps:{style:{width:_t.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c?"transparent":r.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(Pt,{onClick:w=>w.stopPropagation(),children:u.jsx(At,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Oe()),o("../setup")}})})}),u.jsx(kt,{navigate:o,location:a,companyId:O,currentTenant:M,isUserZeniAccountsAdmin:g,meetingUrl:e("treasury_setup"),maxInsuredAmount:_.maxInsuredAmount,isAllocationDone:H,analytics:D,treasurySetupView:ce,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:c,setShowTreasurySetupOverlay:p})]})},Pt=Ve(rt)`
17
+ `,Ct=G((function(e,o){const{isUserRemiAdmin:a,companyId:t}=o,r=F(e),n=bn(e),i=Cn(e,t),l=E.getSignedInUser(),s=r.tenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""};return{remiSetupView:i,isDisabled:a&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",remiApprovalView:n,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:c}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r}=o;return{updateMileageDetails:n=>{const{mileageAmount:i,mileageUnit:l,mileageCurrencyCode:s,mileageCurrencySymbol:c,denomination:p,denominationSymbol:g,mileageAmountInDenomination:S,description:k}=n;e(In({mileageDetails:{mileageUnitAmount:{amount:i,currencyCode:s,currencySymbol:c},denomination:p,denominationSymbol:g,mileageAmountInDenomination:S,mileageCurrencyCode:s,mileageCurrencySymbol:c,mileageUnit:l,description:k}}))},onSaveMileageClick:n=>{e(hn(t)),D.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{a("../verification"),r?.company?.companyReimbursementInfo!=null&&r?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(t,!1,!0))},onSetupApprovalRulesSectionClick:()=>{a("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Pe("reimbursement_setup",n,i))},onEstablishConnectionClick:n=>{e(ve(n,t,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(_e(n,i,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(ke(!1,n,"reimbursement","reimbursement_setup",i))},onEstablishConnectionSuccess:()=>{e(le(t,!0))},onEnableRemiClick:()=>{e(X(t,"reimbursement"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Ie(n,i,"reimbursement","reimbursement_setup"):Ae("reimbursement_setup",n,i))},onEnableRemiSuccess:()=>{a("../",{relative:"path"})},onBackClick:()=>{r?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&r.companyReimbursementInfo.info.isReimbursementEnabled===!1?a("../.."):a("../",{relative:"path"})},onCompanyOfficerUpdated:(n,i)=>{e(Ce({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(t,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,i)=>{e(he(t,"reimbursement_setup",n,i))}}}))(Qn),ht=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),n=ie(),i=Ee(),l=gn(n?.loggedInUserRoleMap),s=Fe(n?.loggedInUserRoleMap),[c,p]=h.useState(!1),g=h.useRef(!1),[S,k]=h.useState(!1),I=v((_=>_.remiSetupViewState.fetchState)),d=v((_=>F(_))),y=v((_=>_.remiSetupApproverViewState.fetchState)),{isApprovalRulesV3Enabled:f,isLoading:P}=Jn(d?.tenantId),b=E.getSignedInUserTenant(r)?.companyId??d.companyId,m=E.getSignedInUser(),C=_=>{p(_)};if(m==null)throw Error("Can't access reimbursement setup page without signing in...");if(h.useEffect((()=>{g.current||I!=="Not-Started"||b==null?g.current||I!=="Completed"||b==null||d.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(g.current=!0,t(le(b,!1,!0))):(g.current=!0,t(le(b,!0)))}),[I,b,t]),h.useEffect((()=>{S||y!=="Not-Started"||P||(k(!0),t(Sn(!0,!1,!1,f)))}),[S,y,P,f,t]),d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(j,{to:"../promo"});if(d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const _=T=>T.trackPageLoaded($.Event.reimbursementSetup);return u.jsxs(bt,{children:[u.jsx(se,{analytics:D,onLoad:T=>_(T)}),u.jsx(ye,{isAppContentDrawerOpen:c,handleDrawerToggle:C}),u.jsx(Ct,{navigate:o,location:a,companyId:b,currentTenant:d,isUserRemiAdmin:l,meetingUrl:e("reimbursement_setup"),onClickMenuIcon:()=>{C(!0)},hasZeniAccountsAdminAccess:s})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})},It=G((function(e,o){const{businessVerificationDetails:a,productType:t}=o,r=F(e),n=E.getSignedInUser(),i=r.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=En(o.roleMap)&&a.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",c=Dn(e.companyConfigState),p=Un(e.userRoleConfigState),g=t==="zeni_treasury"?Ke(e):void 0;return{businessVerificationDetails:a,verficationDetailsFetchState:a.fetchState,isRefreshingViewInBackground:a.isRefreshingViewInBackground,allNationalityCountries:a.allNationalityCountries,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:s,allIndustries:c.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:g}}),(function(e,o){const{companyId:a,productType:t,currentTenant:r,navigate:n,location:i}=o,{tenantEmailDomain:l}=r;return{onCompanyDetailsChanged:s=>{const{companyDescription:c,companyIndustry:p,companyIndustryType:g,companyLegalName:S,companyTaxId:k,companyWebsite:I,companyPhone:d,primaryContactEmail:y,primaryContactName:f,primaryContactUserId:P,primaryContactSyncToken:b,syncToken:m,fileIds:C,incDate:_,typeOfIncorporation:T,stateOfIncorporation:A,sourceOfFunds:U,companySubIndustry:z,countriesOfOperations:V,companySourceOfFunds:M,companySourceOfFundsDescription:O,transactionVolume:ce,transactionVolumeDescription:H,purposeOfAccount:K,purposeOfAccountDescription:re,regulatedStatus:Y,regulatedStatusDescription:B,usNexus:w,usNexusTypes:Ue}=s,fe=g?.selectedOption,ge={companyId:a,companyDescription:c,companyIndustry:p.selectedOption,companyIndustryType:fe==null||fe===""?void 0:fe,companyLegalName:S,taxIdOrEIN:k,website:I!=""&&I!=null?Bn(I):void 0,phone:d,syncToken:m,fileIds:C,incDate:_!=null?Ne(_?.toString()):_,typeOfIncorporation:T?.selectedOption??"",stateOfIncorporation:A?.selectedOption??"",sourceOfFunds:U?.selectedOption??"",companySubIndustry:z?.selectedOption??"",countriesOfOperations:V?.selectedOptions.map((ue=>ue.length===2?ue:Me(ue)))??[],companySourceOfFunds:M?.selectedOption??"",companySourceOfFundsDescription:O,transactionVolume:ce?.selectedOption??"",transactionVolumeDescription:H,purposeOfAccount:K?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:Y??"",regulatedStatusDescription:B,usNexus:w,usNexusTypes:Ue?.selectedOptions??[]},Se={userId:P,firstName:f.firstName,lastName:f.lastName,email:y,syncToken:b};e(Le({companyDetails:ge,primaryContactDetails:Se}))},onCompanyOfficerUpdated:s=>{const c=s.map((p=>{const{officerType:g,userId:S,name:k,email:I,nationalityCountryCode:d,ssn:y,dob:f,phone:P,syncToken:b,selectDocument:m,role:C,ownership:_,isSelectedForVerification:T,userVerificationStatus:A,treasuryUserVerificationStatus:U,fileIds:z}=p;let V;return m.selectDocumentType==="driverLicense"?V="driving_license":m.selectDocumentType==="passport"?V="passport":m.selectDocumentType==="stateId"?V="id_document":m.selectDocumentType==="ssnCard"&&(V="social_security_card"),{officerType:g,userId:S,firstName:k.firstName,lastName:k.lastName,email:I,ssn:y,nationalityCountryCode:d?.selectedOption!=null?Me(d.selectedOption):void 0,phone:P,birthday:f!=null?Ne(f?.toString()):f,syncToken:b,titleAtCompany:C.selectedOption,ownershipInCompany:_,documentTypeSelectedForVerification:V,isSelectedForVerification:T,userVerificationStatus:A,treasuryUserVerificationStatus:U,fileIds:z,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(Le({officers:c}))},onSaveDetailsClick:s=>{e(L(a,s,t))},onSendForVerificationClick:s=>{e(L(a,s,t,!0))},onAddressClick:s=>{const c=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),g=new URLSearchParams(i.search),S={};g.forEach(((k,I)=>{S[I]=k})),n(c,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(S).length>0?S:void 0}})},onRegisteredAddressClick:s=>{const c=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),g=new URLSearchParams(i.search),S=Object.fromEntries(g.entries());n(c,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(S).length>0?S:void 0}})},onBackClick:()=>{e(Vn({companyId:a})),n("../setup")},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onDeleteFileList:s=>{e(Xe(s))},onEditFileName:(s,c)=>{e(ne(s,c.split(".")[0]))},onGetOtp:s=>{e(Ge(s,"SpendManagementSetup"))},onResendOtp:s=>{e(We(s,"SpendManagementSetup"))},onVerifyOtp:(s,c)=>{e($e(s,c,"SpendManagementSetup"))},saveNewAddressInLocalStore:(s,c)=>{e(xn({addressType:s,addressToCreate:c}))},onExecuteTreasuryTransfer:()=>{e(qe())},onOverlayClose:()=>{e(Oe())},onIdentityDocumentUploadedForAutofill:s=>{if(a==null)return;const c=On(s.documentType);c!=null&&e(Fn({target:"setup",companyId:a,officerType:s.officerType,fileId:s.fileId,documentType:c}))},onCompanyDocumentUploadedForAutofill:s=>{a!=null&&e(wn({target:"setup",companyId:a,fileId:s.fileId,documentType:s.documentType}))}}}))(et),At=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:a})=>{const t=J(),r=Q(),n=ee(),[i]=Qe(),l=i.get("showStepProgress"),s=i.get("isTransferInitiated"),[c,p]=h.useState(!1),{tenantEmailDomain:g}=W(),S=ie(),{useDynamicConfig:k}=me(),I=Ee(),{configValue:d}=k(xe.zeniAccountsConfig),y=je(d),f=v((A=>{switch(e){case"zeni_accounts":return A.zeniAccountSetupViewState.fetchState;case"reimbursement":return A.remiSetupViewState.fetchState;case"charge_cards":return A.chargeCardSetupViewState.fetchState;case"zeni_treasury":return A.treasurySetupViewState.fetchState;default:return A.billPaySetupViewState.fetchState}})),P=v((A=>A.companyConfigState.fetchState)),b=v((A=>A.userRoleConfigState.fetchState)),m=v((A=>F(A))),C=m.companyId??E.getSignedInUserTenant(g)?.companyId;if(h.useEffect((()=>{P==="Not-Started"&&n(An()),b==="Not-Started"&&n(kn(!0))}),[P,b,n]),h.useEffect((()=>{if(!c&&f==="Not-Started"&&C!=null)switch(p(!0),e){case"zeni_accounts":n(pe(C,!0));break;case"zeni_treasury":n(be(C,!0));break;case"reimbursement":n(le(C,!0));break;case"charge_cards":n(de(C,!0));break;default:n(Z(C,!0))}}),[c,f,C,n]),E.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let _;switch(e){case"zeni_accounts":_=m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":_=m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":_=m.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||m.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":_=m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:_=m.companyBillPayInfo?.info?.isBillPayTOSAccepted}const T=v((A=>{let U;switch(e){case"zeni_accounts":U=Tn(A,C);break;case"zeni_treasury":U=He(A,C);break;case"charge_cards":U=Pn(A,C);break;case"reimbursement":U=vn(A,C);break;default:U=_n(A,C)}return U}));return _===!1?null:T.fetchState==="Completed"&&_===!0&&S?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:A=>(U=>{switch(e){case"zeni_accounts":return U.trackPageLoaded($.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return U.trackPageLoaded($.Event.reimbursementBusinessVerification);default:return U.trackPageLoaded($.Event.billPayBusinessVerification,Be(r)?"Settings":void 0)}})(A)}),u.jsx(It,{businessVerificationDetails:T,navigate:t,location:r,companyId:C,analytics:D,currentTenant:m,productType:e,roleMap:S.loggedInUserRoleMap,isSettings:Be(r),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:s!=null,onClickMenuIcon:()=>{},maxInsuredAmount:y.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:a})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:I.colors.grey5}})},kt={overlayWidth:new tt(100,100,59)},_t=G((function(e,o){const{isUserZeniAccountsAdmin:a,companyId:t}=o,r=F(e),n=E.getSignedInUser(),i=r.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Je(e,t),c=He(e,t),p=a&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",g=Rn(e),S=g.transactions,k=Ke(e),I=g.accountSummary?.totalBalance?.amount,d=S.length===0||I===0;return{treasurySetupView:s,businessVerificationDetails:c,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:S,transferDetails:k,isFirstTransfer:d,isDisabled:p,analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isOnSetup:!0,maxInsuredAmount:o.maxInsuredAmount}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r,isAllocationDone:n,analytics:i,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:s=>{e(Yn(s))},onBusinessVerificationSectionClick:(s,c)=>{let p="../verification";s&&(p+="?showStepProgress=true",c&&(p+="&isTransferInitiated=true")),a(p),r?.company?.companyTreasuryInfo!=null&&r?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(be(t,!1,!0))},onFetchLinkTokenClick:(s,c)=>{e(Pe("treasury_setup",s,c))},onEstablishConnectionClick:s=>{e(ve(s,t,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(s,c,p)=>{e(_e(s,c,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(s,c)=>{e(ke(!1,s,"zeni_treasury","treasury_setup",c))},onEstablishConnectionSuccess:()=>{e(be(t,!0))},onEnableTreasuryClick:()=>{e(X(t,"zeni_treasury"))},onUpdateTreasuryClick:(s,c,p)=>{e(p==="paymentAccount"?Ie(s,c,"zeni_treasury","treasury_setup"):Ae("treasury_setup",s,c))},onUpdatePrimaryFundingAccount:(s,c)=>{e(he(t,"treasury_setup",s,c))},onNavigateToDashboard:()=>{a(r?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(s,c)=>{e(Ce({officerType:s,fileIds:c}))},onSendForVerificationClick:(s,c)=>{if(e(L(t,s,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;i.trackTreasuryPortfolioConfirm(p.riskScore,Ye(p)),e(Re(!1))}c===!0&&e(qe())},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onEditFileName:(s,c)=>{e(ne(s,c.split(".")[0]))},onAdditionalVerificationFieldsChanged:s=>{const{sourceOfFunds:c}=s;e(Mn({sourceOfFunds:c?.selectedOption??""}))},onUpdateFundAllocation:s=>{i.trackTreasuryAllocationAction("update",Ye(s)),e(zn(s))},onConfirmFundAllocation:()=>{e(Re(n))},onOverlayClose:()=>{e(Oe())}}}))(at),vt=()=>{const e=Te(),o=J(),a=Q(),t=ee(),r=Ee(),n=nt(),{tenantEmailDomain:i}=W(),{useDynamicConfig:l}=me(),s=ie(),[c,p]=h.useState(!1),g=Fe(s?.loggedInUserRoleMap),{configValue:S}=l(xe.zeniAccountsConfig),k=je(S),[I,d]=h.useState(!1),[y,f]=h.useState(!1),[P,b]=h.useState(!1),[m,C]=h.useState(!1),[_,T]=h.useState(!1),A=v((w=>w.treasurySetupViewState.fetchState)),U=v((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),z=v((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),V=v((w=>w.treasuryDetailState.transactionsState?.fetchState)),M=v((w=>F(w))),O=E.getSignedInUserTenant(i)?.companyId??M.companyId,ce=v((w=>Je(w,O))),H=ce.isAtomicAccountExists,K=E.getSignedInUser(),re=w=>{d(w)};if(K==null)throw Error("Can't access treasury setup page without signing in...");h.useEffect((()=>{y||A!=="Not-Started"||O==null||(f(!0),t(be(O,!0,!1)))}),[y,A,O,t]),h.useEffect((()=>{P||U!=="Not-Started"||O==null||(b(!0),t(jn()))}),[P,U,O,t]),h.useEffect((()=>{m||z!=="Not-Started"||O==null||(C(!0),t(Nn()))}),[m,z,O,t]),h.useEffect((()=>{_||V!=="Not-Started"||O==null||(T(!0),t(Ln(!0)))}),[_,V,O,t]);const Y=M.companyTreasuryInfo?.info?.businessVerificationStatus?.code,B=Y==="pending_review"||Y==="verified";return h.useEffect((()=>{c||A!=="Completed"||H||B||!a.pathname.includes("setup")||p(!0)}),[A,H,B]),M.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(j,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:()=>{}}),u.jsx(ye,{isAppContentDrawerOpen:I,handleDrawerToggle:re}),u.jsx(ct,{onClose:()=>{t(Oe()),o("../setup")},anchor:"right",open:a.pathname.includes("verification"),transitionDuration:c?0:250,PaperProps:{style:{width:kt.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c?"transparent":r.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(Pt,{onClick:w=>w.stopPropagation(),children:u.jsx(At,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Oe()),o("../setup")}})})}),u.jsx(_t,{navigate:o,location:a,companyId:O,currentTenant:M,isUserZeniAccountsAdmin:g,meetingUrl:e("treasury_setup"),maxInsuredAmount:k.maxInsuredAmount,isAllocationDone:H,analytics:D,treasurySetupView:ce,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:c,setShowTreasurySetupOverlay:p})]})},Pt=Ve(rt)`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  flex-direction: column;
21
- `,Tt=G((function(e,o){const{isUserZeniAccountsAdmin:a,companyId:t}=o,r=F(e),n=E.getSignedInUser(),i=r.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Zn(e,t),c=a&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{zeniAccountSetUpView:s,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:c,analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r}=o;return{onBusinessVerificationSectionClick:()=>{a("../verification"),r?.company?.companyZeniAccountInfo!=null&&r?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(t,!1,!0))},onFetchLinkTokenClick:(n,i)=>{e(Pe("account_setup",n,i))},onEstablishConnectionClick:n=>{e(ve(n,t,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(ke(n,i,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(_e(!1,n,"zeni_accounts","account_setup",i))},onEstablishConnectionSuccess:()=>{e(pe(t,!0))},onEnableZeniAccountClick:()=>{e(X(t,"zeni_accounts"))},onUpdateZeniAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Ie(n,i,"zeni_accounts","account_setup"):Ae("account_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(he(t,"account_setup",n,i))},onEnableZeniAccountSuccess:()=>{a("../",{relative:"path"})},onBackClick:()=>{r?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?a("../"):a("../../")},onNavigateToDashboard:()=>{a("../../dashboard")},onCompanyOfficerUpdated:(n,i)=>{e(Ce({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(t,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))}}}))(it),Et=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),{useDynamicConfig:n}=me(),i=ie(),l=Fe(i?.loggedInUserRoleMap),{configValue:s}=n(xe.zeniAccountsConfig),c=je(s),[p,g]=h.useState(!1),[S,_]=h.useState(!1),I=v((b=>b.zeniAccountSetupViewState.fetchState)),d=v((b=>F(b))),y=E.getSignedInUserTenant(r)?.companyId??d.companyId,f=E.getSignedInUser(),P=b=>{g(b)};if(f==null)throw Error("Can't access zeni bank account setup page without signing in...");if(h.useEffect((()=>{S||I!=="Not-Started"||y==null?S||I!=="Completed"||y==null||d.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(pe(y,!1,!0)):(_(!0),t(pe(y,!0)))}),[S,I,y,t]),d.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(j,{to:"../promo"});{const b=m=>m.trackPageLoaded($.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:m=>b(m)}),u.jsx(ye,{isAppContentDrawerOpen:p,handleDrawerToggle:P}),u.jsx(Tt,{navigate:o,location:a,companyId:y,currentTenant:d,isUserZeniAccountsAdmin:l,accountsPromoConfig:c,meetingUrl:e("zeni_accounts_setup"),onClickMenuIcon:()=>{P(!0)}})]})}},Dt=Ve.div`
21
+ `,Tt=G((function(e,o){const{isUserZeniAccountsAdmin:a,companyId:t}=o,r=F(e),n=E.getSignedInUser(),i=r.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Zn(e,t),c=a&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{zeniAccountSetUpView:s,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:c,analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r}=o;return{onBusinessVerificationSectionClick:()=>{a("../verification"),r?.company?.companyZeniAccountInfo!=null&&r?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(t,!1,!0))},onFetchLinkTokenClick:(n,i)=>{e(Pe("account_setup",n,i))},onEstablishConnectionClick:n=>{e(ve(n,t,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(_e(n,i,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(ke(!1,n,"zeni_accounts","account_setup",i))},onEstablishConnectionSuccess:()=>{e(pe(t,!0))},onEnableZeniAccountClick:()=>{e(X(t,"zeni_accounts"))},onUpdateZeniAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Ie(n,i,"zeni_accounts","account_setup"):Ae("account_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(he(t,"account_setup",n,i))},onEnableZeniAccountSuccess:()=>{a("../",{relative:"path"})},onBackClick:()=>{r?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?a("../"):a("../../")},onNavigateToDashboard:()=>{a("../../dashboard")},onCompanyOfficerUpdated:(n,i)=>{e(Ce({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(t,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))}}}))(it),Et=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),{useDynamicConfig:n}=me(),i=ie(),l=Fe(i?.loggedInUserRoleMap),{configValue:s}=n(xe.zeniAccountsConfig),c=je(s),[p,g]=h.useState(!1),[S,k]=h.useState(!1),I=v((b=>b.zeniAccountSetupViewState.fetchState)),d=v((b=>F(b))),y=E.getSignedInUserTenant(r)?.companyId??d.companyId,f=E.getSignedInUser(),P=b=>{g(b)};if(f==null)throw Error("Can't access zeni bank account setup page without signing in...");if(h.useEffect((()=>{S||I!=="Not-Started"||y==null?S||I!=="Completed"||y==null||d.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(pe(y,!1,!0)):(k(!0),t(pe(y,!0)))}),[S,I,y,t]),d.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(j,{to:"../promo"});{const b=m=>m.trackPageLoaded($.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:m=>b(m)}),u.jsx(ye,{isAppContentDrawerOpen:p,handleDrawerToggle:P}),u.jsx(Tt,{navigate:o,location:a,companyId:y,currentTenant:d,isUserZeniAccountsAdmin:l,accountsPromoConfig:c,meetingUrl:e("zeni_accounts_setup"),onClickMenuIcon:()=>{P(!0)}})]})}},Dt=Ve.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,4 +26,4 @@ import{j as u}from"./liveblocks-CyXsV56c.js";import{h as J,g as Q,u as ee,i as W
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${e=>e.theme.colors.grey4};
29
- `,Ut=G((function(e,o){const a=F(e),t=E.getSignedInUser(),r=a.tenantId,n={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""};return{internationalOnboardingDetails:Gn(e),isReadonly:o.isFormReadonly,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:n,analytics:D}}),(function(e,o){const{navigate:a}=o;return{onFormDataChange:t=>{e(Kn(t))},onSubmitClick:()=>{e(Hn(o.companyId))},onCancelClick:()=>{a("../setup")},updateFilesEntity:t=>{e(ae({files:t}))},onDeleteFile:t=>{e(te(t))},onDeleteFileList:t=>{e(Xe(t))},onEditFileName:(t,r)=>{e(ne(t,r.split(".")[0]))}}}))(st),wt=()=>{const e=J(),o=Q(),a=ee(),[t,r]=h.useState(!1),[n,i]=h.useState(!1),[l,s]=h.useState(!1),{tenantEmailDomain:c}=W(),p=ie(),{useFeatureGate:g}=me(),{isFeatureEnabled:S}=g(q.isBillPayLocalCurrencyFeatureEnabled),_=v((T=>T.internationalWireVerificationState.verificationFormFetchState.fetchState)),I=v((T=>T.billPaySetupViewState.fetchState)),d=v((T=>F(T))),y=Ee(),f=d.companyId??E.getSignedInUserTenant(c)?.companyId,P=v((T=>$n(T.companyState,d.companyId))),b=P?.company.companyBillPayInfo.internationalWireOnboardingStatus,m=b?.code==="onboarding_status_not_started"?void 0:"readonly";if(h.useEffect((()=>{t||_!=="Not-Started"||f==null||(r(!0),a(Wn(f)))}),[t,_,f,a]),h.useEffect((()=>{n||I!=="Not-Started"||f==null||(i(!0),a(Z(f,!0)))}),[I,n,f,a]),E.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const C=d.companyBillPayInfo?.info?.isBillPayTOSAccepted,k=T=>{s(T)};return C===!1?u.jsx(j,{to:"../promo"}):C===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(Dt,{children:[u.jsx(se,{analytics:D,onLoad:T=>(A=>A.trackPageLoaded($.Event.billPayBusinessVerification,void 0))(T)}),Be(o)?u.jsx(ye,{isAppContentDrawerOpen:l,handleDrawerToggle:k}):null,u.jsx(Ut,{navigate:e,location:o,companyId:f,analytics:D,currentTenant:d,roleMap:p.loggedInUserRoleMap,isFormReadonly:m,isLocalCurrencyEnabled:S})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}})},Ot=G((function(){return{}}),(function(e,o){const{companyId:a,productType:t}=o;return{onEventReceived:r=>{switch(r){case"bill-pay-set-up-verification-update":case"bill-pay-wise-setup":switch(t){case"reimbursement":e(le(a,!0,!0));break;case"zeni_accounts":e(pe(a,!0,!0));break;case"charge_cards":e(de(a,!0,!0));break;case"zeni_treasury":e(be(a,!0,!0));break;default:e(Z(a,!0,!0))}}}}}))(ot((e=>{const{isBillPayAdminLevelAccess:o,isUserHasOnlyBillPayAccess:a,isReimbursementAdminLevelAccess:t,isZeniAccountAdminLevelAccess:r,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:i,isUserHasOnlyCardAccess:l,productType:s,type:c}=e;switch(s){case"bill_pay":switch(c){case"verification":return o?u.jsx(we,{productType:s}):a?u.jsx(j,{to:"../"}):u.jsx(N,{});case"international-wire":return o?u.jsx(wt,{}):a?u.jsx(j,{to:"../"}):u.jsx(N,{});default:return o?u.jsx(pt,{}):a?u.jsx(j,{to:"../"}):u.jsx(N,{})}case"reimbursement":return c==="verification"?t?u.jsx(we,{productType:s}):u.jsx(N,{}):t?u.jsx(ht,{}):u.jsx(N,{});case"zeni_accounts":return c==="verification"?r?u.jsx(we,{productType:"zeni_accounts"}):u.jsx(N,{}):r?u.jsx(Et,{}):u.jsx(N,{});case"zeni_treasury":return n===!0?u.jsx(vt,{}):u.jsx(N,{});case"charge_cards":return c==="verification"?i?u.jsx(we,{productType:"charge_cards"}):l?u.jsx(j,{to:"../"}):u.jsx(N,{}):i?u.jsx(St,{}):l?u.jsx(j,{to:"../"}):u.jsx(N,{})}})));function oa(e){const{tenantEmailDomain:o}=W(),a=v((r=>F(r))).companyId??E.getSignedInUserTenant(o)?.companyId,t={events:a!=null?[`private-encrypted-${a}.bill-pay-set-up-verification-update`,`private-encrypted-${a}.bill-pay-wise-setup`]:[],eventCallback:(r,n,i)=>{i.onEventReceived(r)}};if(E.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(Ot,{...e,companyId:a,...t})}export{na as A,ta as P,oa as S,Jt as a,ea as b,yt as c,ft as d,mt as e,aa as f,Ht as g,$t as h,Xt as i,Qt as j,ia as k,qt as l,Kt as m,Wt as n,Gt as o,Zt as p,sa as s};
29
+ `,Ut=G((function(e,o){const a=F(e),t=E.getSignedInUser(),r=a.tenantId,n={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""};return{internationalOnboardingDetails:Gn(e),isReadonly:o.isFormReadonly,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:n,analytics:D}}),(function(e,o){const{navigate:a}=o;return{onFormDataChange:t=>{e(Kn(t))},onSubmitClick:()=>{e(Hn(o.companyId))},onCancelClick:()=>{a("../setup")},updateFilesEntity:t=>{e(ae({files:t}))},onDeleteFile:t=>{e(te(t))},onDeleteFileList:t=>{e(Xe(t))},onEditFileName:(t,r)=>{e(ne(t,r.split(".")[0]))}}}))(st),wt=()=>{const e=J(),o=Q(),a=ee(),[t,r]=h.useState(!1),[n,i]=h.useState(!1),[l,s]=h.useState(!1),{tenantEmailDomain:c}=W(),p=ie(),{useFeatureGate:g}=me(),{isFeatureEnabled:S}=g(q.isBillPayLocalCurrencyFeatureEnabled),k=v((T=>T.internationalWireVerificationState.verificationFormFetchState.fetchState)),I=v((T=>T.billPaySetupViewState.fetchState)),d=v((T=>F(T))),y=Ee(),f=d.companyId??E.getSignedInUserTenant(c)?.companyId,P=v((T=>$n(T.companyState,d.companyId))),b=P?.company.companyBillPayInfo.internationalWireOnboardingStatus,m=b?.code==="onboarding_status_not_started"?void 0:"readonly";if(h.useEffect((()=>{t||k!=="Not-Started"||f==null||(r(!0),a(Wn(f)))}),[t,k,f,a]),h.useEffect((()=>{n||I!=="Not-Started"||f==null||(i(!0),a(Z(f,!0)))}),[I,n,f,a]),E.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const C=d.companyBillPayInfo?.info?.isBillPayTOSAccepted,_=T=>{s(T)};return C===!1?u.jsx(j,{to:"../promo"}):C===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(Dt,{children:[u.jsx(se,{analytics:D,onLoad:T=>(A=>A.trackPageLoaded($.Event.billPayBusinessVerification,void 0))(T)}),Be(o)?u.jsx(ye,{isAppContentDrawerOpen:l,handleDrawerToggle:_}):null,u.jsx(Ut,{navigate:e,location:o,companyId:f,analytics:D,currentTenant:d,roleMap:p.loggedInUserRoleMap,isFormReadonly:m,isLocalCurrencyEnabled:S})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}})},Ot=G((function(){return{}}),(function(e,o){const{companyId:a,productType:t}=o;return{onEventReceived:r=>{switch(r){case"bill-pay-set-up-verification-update":case"bill-pay-wise-setup":switch(t){case"reimbursement":e(le(a,!0,!0));break;case"zeni_accounts":e(pe(a,!0,!0));break;case"charge_cards":e(de(a,!0,!0));break;case"zeni_treasury":e(be(a,!0,!0));break;default:e(Z(a,!0,!0))}}}}}))(ot((e=>{const{isBillPayAdminLevelAccess:o,isUserHasOnlyBillPayAccess:a,isReimbursementAdminLevelAccess:t,isZeniAccountAdminLevelAccess:r,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:i,isUserHasOnlyCardAccess:l,productType:s,type:c}=e;switch(s){case"bill_pay":switch(c){case"verification":return o?u.jsx(we,{productType:s}):a?u.jsx(j,{to:"../"}):u.jsx(N,{});case"international-wire":return o?u.jsx(wt,{}):a?u.jsx(j,{to:"../"}):u.jsx(N,{});default:return o?u.jsx(pt,{}):a?u.jsx(j,{to:"../"}):u.jsx(N,{})}case"reimbursement":return c==="verification"?t?u.jsx(we,{productType:s}):u.jsx(N,{}):t?u.jsx(ht,{}):u.jsx(N,{});case"zeni_accounts":return c==="verification"?r?u.jsx(we,{productType:"zeni_accounts"}):u.jsx(N,{}):r?u.jsx(Et,{}):u.jsx(N,{});case"zeni_treasury":return n===!0?u.jsx(vt,{}):u.jsx(N,{});case"charge_cards":return c==="verification"?i?u.jsx(we,{productType:"charge_cards"}):l?u.jsx(j,{to:"../"}):u.jsx(N,{}):i?u.jsx(St,{}):l?u.jsx(j,{to:"../"}):u.jsx(N,{})}})));function oa(e){const{tenantEmailDomain:o}=W(),a=v((r=>F(r))).companyId??E.getSignedInUserTenant(o)?.companyId,t={events:a!=null?[`private-encrypted-${a}.bill-pay-set-up-verification-update`,`private-encrypted-${a}.bill-pay-wise-setup`]:[],eventCallback:(r,n,i)=>{i.onEventReceived(r)}};if(E.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(Ot,{...e,companyId:a,...t})}export{na as A,ta as P,oa as S,Jt as a,ea as b,yt as c,ft as d,mt as e,aa as f,Ht as g,$t as h,Xt as i,Qt as j,ia as k,qt as l,Kt as m,Wt as n,Gt as o,Zt as p,sa as s};
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-CyXsV56c.js";import{a as u,R as x,q as A}from"./sentry-T7AA_ij8.js";import{u as D,h as j,j as l,g as z,N as M,l as O}from"./core-DCcrGtvx.js";import{u as P,z as s,E as B,j as w,G as F,T as _,U as N,W as $,X as V,Y as W,Z as v}from"./index-Bw4k26Lh.js";import{fE as q,Tb as J,Tv as R,gh as X,gj as Y,TA as G,gT as H,di as Z,TB as T,TC as K,TD as Q,b$ as y}from"./zeni-epic-state-B9l_W9RQ.js";import"./mui-ezTHtwEe.js";import{u as ee}from"./useDeviceId-DwxriMvh.js";import{f as te}from"./analyticsHelper-h8-gsFza.js";import{t as ne}from"./getLocaleForTenant-D5JM1AN5.js";import"./recharts-Chyhxc02.js";import"./analytics-B-TvIB4L.js";import"./plaid-5PXB6whD.js";import"./dnd-2zpntaNq.js";import"./stripe-cKAAJElX.js";import"./lottie-ZAIvsM-R.js";import"./lexical-YhB7nNuN.js";import"./pdf-D6N9uxwe.js";import"./utils-oeHkWTt8.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]="082854f3-b32f-4a80-9992-8f7a26dbffd7",t._sentryDebugIdIdentifier="sentry-dbid-082854f3-b32f-4a80-9992-8f7a26dbffd7")}catch{}})();const ie=O((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Q({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),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(K(n,a)))},clearSignInError:()=>{t(T())}}}))(W),ae=x.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=j(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:b,accountUnlockTime:E}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),L=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>q(e))),I=l((e=>J(e))),m=z(),k=B().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(I.tenantsInOrder),o.zeniSessionId),X(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,k,void 0,I.tenantsInOrder),H().then((()=>{const e=V();e!=null&&_(e)})),setTimeout((()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Z(r.productSettings))}),2e3))}),[S,p,L,o,r,I,k,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(M,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&E!=null?f.jsx($,{onClose:()=>i(T()),unlockDate:E}):null]})}export{ve as default};
1
+ import{j as f}from"./liveblocks-CPy_3T4M.js";import{a as u,R as x,q as A}from"./sentry-B8WE62R1.js";import{u as D,h as j,j as l,g as z,N as M,l as O}from"./core-DHfFJrfH.js";import{u as P,z as s,E as B,j as w,G as F,T as _,U as N,W as $,X as V,Y as W,Z as v}from"./index-BxJdVany.js";import{fE as q,Tb as J,Tv as R,gh as X,gj as Y,TA as G,gT as H,di as Z,TB as T,TC as K,TD as Q,b$ as y}from"./zeni-epic-state-CgS-13Rp.js";import"./mui-BCtxe7Uc.js";import{u as ee}from"./useDeviceId-E6nWdXlP.js";import{f as te}from"./analyticsHelper-CPeGk6N0.js";import{t as ne}from"./getLocaleForTenant-D_V8_IAs.js";import"./recharts-B2QzdJEJ.js";import"./analytics-MT8j1Arr.js";import"./plaid-BSrnBML8.js";import"./dnd-DG4Q4PBR.js";import"./stripe-cKAAJElX.js";import"./lottie-CPIsfbGQ.js";import"./lexical-Ds-L3Ehk.js";import"./pdf-BNLZqB1A.js";import"./utils-BAMwHjCz.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]="082854f3-b32f-4a80-9992-8f7a26dbffd7",t._sentryDebugIdIdentifier="sentry-dbid-082854f3-b32f-4a80-9992-8f7a26dbffd7")}catch{}})();const ie=O((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Q({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),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(K(n,a)))},clearSignInError:()=>{t(T())}}}))(W),ae=x.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=j(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:b,accountUnlockTime:E}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),L=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>q(e))),I=l((e=>J(e))),m=z(),k=B().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(I.tenantsInOrder),o.zeniSessionId),X(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,k,void 0,I.tenantsInOrder),H().then((()=>{const e=V();e!=null&&_(e)})),setTimeout((()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Z(r.productSettings))}),2e3))}),[S,p,L,o,r,I,k,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(M,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&E!=null?f.jsx($,{onClose:()=>i(T()),unlockDate:E}):null]})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-CyXsV56c.js";import{a as i}from"./sentry-T7AA_ij8.js";import{u as c,g as l,N as u}from"./core-DCcrGtvx.js";import{z as n,j as a,U as m,a7 as p}from"./index-Bw4k26Lh.js";import{gW as g,TR as y}from"./zeni-epic-state-B9l_W9RQ.js";import{n as b}from"./mui-ezTHtwEe.js";import"./recharts-Chyhxc02.js";import"./analytics-B-TvIB4L.js";import"./plaid-5PXB6whD.js";import"./dnd-2zpntaNq.js";import"./stripe-cKAAJElX.js";import"./lottie-ZAIvsM-R.js";import"./lexical-YhB7nNuN.js";import"./pdf-D6N9uxwe.js";import"./utils-oeHkWTt8.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]="d371f67f-90dd-4652-9abd-36cda4edc325",e._sentryDebugIdIdentifier="sentry-dbid-d371f67f-90dd-4652-9abd-36cda4edc325")}catch{}})();function L(){const e=c(),t=l(),r=i.useRef(!1),d=n.isSignedIn(),o=t.state?.message==="logout"||d;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
1
+ import{j as s}from"./liveblocks-CPy_3T4M.js";import{a as i}from"./sentry-B8WE62R1.js";import{u as c,g as l,N as u}from"./core-DHfFJrfH.js";import{z as n,j as a,U as m,a7 as p}from"./index-BxJdVany.js";import{gW as g,TR as y}from"./zeni-epic-state-CgS-13Rp.js";import{n as b}from"./mui-BCtxe7Uc.js";import"./recharts-B2QzdJEJ.js";import"./analytics-MT8j1Arr.js";import"./plaid-BSrnBML8.js";import"./dnd-DG4Q4PBR.js";import"./stripe-cKAAJElX.js";import"./lottie-CPIsfbGQ.js";import"./lexical-Ds-L3Ehk.js";import"./pdf-BNLZqB1A.js";import"./utils-BAMwHjCz.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]="d371f67f-90dd-4652-9abd-36cda4edc325",e._sentryDebugIdIdentifier="sentry-dbid-d371f67f-90dd-4652-9abd-36cda4edc325")}catch{}})();function L(){const e=c(),t=l(),r=i.useRef(!1),d=n.isSignedIn(),o=t.state?.message==="logout"||d;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as C}from"./liveblocks-CyXsV56c.js";import{a as f}from"./sentry-T7AA_ij8.js";import{h as pa,u as Ta,g as fa,k as ga,j,i as _a,l as ma}from"./core-DCcrGtvx.js";import{aK as Da,aL as Sa,z as x,O as ba,c as G,as as ha,a8 as Ea,j as ya,U as Aa,e4 as Ca,p as R,a4 as Ga}from"./index-Bw4k26Lh.js";import{fE as Ia,a1e as X,Qm as B,a1f as Y,a1a as Ba,PK as M,a1g as Ka,PS as V,Ps as va,P4 as La,Qn as W,a1h as q,gg as wa,Qd as Ra,Qi as Ua,Q5 as Pa,Q3 as H,Qj as ja,Q0 as Fa,a1i as xa,a1j as Oa,a1k as $a,a1l as Na,a1m as I,dw as Qa,dv as za,a1n as Za,Pp as Ma}from"./zeni-epic-state-B9l_W9RQ.js";import{n as Va}from"./mui-ezTHtwEe.js";import{u as Wa}from"./useAskAiCfoHostNavButtonProps-C0OwLWSS.js";import{M as qa}from"./MobileAppDrawer-NUU2GCIb.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]="24df00d9-c7ae-4fa5-a1d4-175c9de31629",e._sentryDebugIdIdentifier="sentry-dbid-24df00d9-c7ae-4fa5-a1d4-175c9de31629")}catch{}})();const c={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},Ha=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Ja=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),U=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Xa=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const o={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(o.is_private=a.is_private),U(a.assignees)&&(o.assignees=a.assignees),U(a.direct_assignees)&&(o.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(o.created_by=a.created_by),U(a.task_group_ids)&&(o.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(o.name=a.name),typeof a.parent_task_id=="string"&&(o.parent_task_id=a.parent_task_id),o},Ya=e=>{if(e==null||typeof e!="object")return null;const a=e;return U(a.task_ids)?{task_ids:a.task_ids}:null},pe=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},ae=e=>{const{events:a,onEvent:n,onSubscribed:o}=e,i=Da(),g=f.useRef(n),l=f.useRef(o),_=f.useRef(0);f.useEffect((()=>{g.current=n}),[n]),f.useEffect((()=>{l.current=o}),[o]);const t=f.useMemo((()=>[...a].sort().join("|")),[a]);f.useEffect((()=>{if(i==null||a.length===0)return;const s=[],p=new Set,b=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return a.forEach((m=>{const[D,S]=Sa(m);if(S==="")return;const E=i.channel(D),y=T=>{g.current(S,T)};let k;if(E?.subscribed===!0){if(k=E,k.bind(S,y),!p.has(D)){p.add(D),b();const T=()=>{b()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{E.unbind(S,y)}))}else{if(k=E??i.subscribe(D),k.bind(S,y),!p.has(D)){p.add(D);const T=()=>{b()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{k.unbind(S,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},ee=Va.div`
1
+ import{j as C}from"./liveblocks-CPy_3T4M.js";import{a as T}from"./sentry-B8WE62R1.js";import{h as pa,u as fa,g as Ta,k as ga,j,i as _a,l as ba}from"./core-DHfFJrfH.js";import{aK as ma,aL as Da,z as x,M as Sa,y as G,as as ha,a8 as Ea,j as ya,U as Aa,e4 as Ca,k as R,a4 as Ga}from"./index-BxJdVany.js";import{fE as Ia,a1e as X,Qm as B,a1f as Y,a1a as Ba,PK as Z,a1g as Ka,PS as V,Ps as va,P4 as La,Qn as W,a1h as q,gg as wa,Qd as Ra,Qi as Ua,Q5 as Pa,Q3 as H,Qj as ja,Q0 as Fa,a1i as xa,a1j as $a,a1k as Na,a1l as Oa,a1m as I,dw as Qa,dv as za,a1n as Ma,Pp as Za}from"./zeni-epic-state-CgS-13Rp.js";import{n as Va}from"./mui-BCtxe7Uc.js";import{u as Wa}from"./useAskAiCfoHostNavButtonProps-BjFaoyi3.js";import{M as qa}from"./MobileAppDrawer-k5UN-ZVo.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]="6bf4ab6a-767c-4abc-affc-793702b1ab5a",e._sentryDebugIdIdentifier="sentry-dbid-6bf4ab6a-767c-4abc-affc-793702b1ab5a")}catch{}})();const d={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},Ha=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Ja=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),U=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Xa=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const o={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(o.is_private=a.is_private),U(a.assignees)&&(o.assignees=a.assignees),U(a.direct_assignees)&&(o.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(o.created_by=a.created_by),U(a.task_group_ids)&&(o.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(o.name=a.name),typeof a.parent_task_id=="string"&&(o.parent_task_id=a.parent_task_id),o},Ya=e=>{if(e==null||typeof e!="object")return null;const a=e;return U(a.task_ids)?{task_ids:a.task_ids}:null},pe=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},ae=e=>{const{events:a,onEvent:n,onSubscribed:o}=e,i=ma(),g=T.useRef(n),l=T.useRef(o),_=T.useRef(0);T.useEffect((()=>{g.current=n}),[n]),T.useEffect((()=>{l.current=o}),[o]);const t=T.useMemo((()=>[...a].sort().join("|")),[a]);T.useEffect((()=>{if(i==null||a.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const b=Date.now();b-_.current<5e3||(_.current=b,l.current())};return a.forEach((b=>{const[m,D]=Da(b);if(D==="")return;const E=i.channel(m),y=f=>{g.current(D,f)};let k;if(E?.subscribed===!0){if(k=E,k.bind(D,y),!p.has(m)){p.add(m),S();const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{E.unbind(D,y)}))}else{if(k=E??i.subscribe(m),k.bind(D,y),!p.has(m)){p.add(m);const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{k.unbind(D,y)}))}})),()=>{s.forEach((b=>b()))}}),[i,t])},ee=Va.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,4 +6,4 @@ import{j as C}from"./liveblocks-CyXsV56c.js";import{a as f}from"./sentry-T7AA_ij
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,te=ma((function(e,a){const n=X(e,a.isTaskTemplatesEnabled),{taskGroupId:o}=a,i=o!=null&&o!==""?{...n,taskGroupsWithTasksList:n.taskGroupsWithTasksList.map((t=>({...t,tasks:t.tasks.filter((s=>s.taskGroupIds.includes(o)))}))).filter((t=>t.tasks.length>0))}:n,g=Ba(e),l=x.isZeniUser(),_=e.taskDetailState?.subTaskCreateStatus?.fetchState;return{taskListView:i,tagListView:g,localData:i.localData,isTaskTemplatesEnabled:a.isTaskTemplatesEnabled,isZeniUser:l,subTaskCreateStatus:_}}),(function(e,a){const{navigate:n,currentTenant:o,location:i,isTaskTemplatesEnabled:g}=a,{tenantEmailDomain:l}=o,{groupByKey:_}=a.uiState;return{onTaskManagementRowClick:t=>{const s=J(l,t),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{e(B(!0,g))},onTabChange:t=>{e(Na(t))},onParentTaskClick:t=>{const s=J(l,t);window.open(s,"_blank","noopener")},bulkUpdateTasks:(t,s)=>{e(H(t,null,s))},onNewTaskClick:()=>{if(a.localData.defaultTaskGroupId!=null){const t=F(l,a.localData.defaultTaskGroupId),s=R(i.state?.pathnameStackToGoBack,i.pathname);n(t,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(t,s)=>{e(q({uiState:{sortKey:t,sortOrder:s}}))},onFiltersChange:t=>{e($a({filters:t}))},onSearchTextChanged:t=>{e(Oa({searchText:t}))},onReloadCards:()=>{e(B(!0,g))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const t=Ga(i.state?.pathnameStackToGoBack),s=t.poppedPathname??"../";n(s,{state:{pathnameStackToGoBack:t.newStack}})}else n("../")},updateLocalData:t=>{e(xa({localData:t}))},resetLocalData:()=>{e(Y({taskGroupById:a.taskGroupState.taskGroupById}))},handleCreateGroup:t=>{e(Fa(a.localData.newTaskGroupName,t))},assignGroupToTasks:t=>{e(H(a.localData.selectedTaskIds,t,ja(a.uiState.groupByKey,t)))},onDeleteTaskGroup:t=>{e(Pa(t))},onAddNewTaskToTaskGroup:t=>{if(a.localData.defaultTaskGroupId!=null){const s=ne(_,t);e(M({taskDetailLocalData:s}));const p=F(l,a.uiState.groupByKey==="groupName"?t:a.localData.defaultTaskGroupId),b=R(i.state?.pathnameStackToGoBack,i.pathname);n(p,{state:{pathnameStackToGoBack:b,message:"comingFromTaskListPage"}})}},onDragNDrop:(t,s)=>{e(Ua(a.localData.selectedTaskIds.length>0?a.localData.selectedTaskIds:[t],s))},onTaskGroupRename:(t,s)=>{e(Ra(t,s))},onTimeSpentUpdate:(t,s)=>{e(W({task:t,updates:s}))},onShowToast:t=>{e(wa(t))},onGroupByFilterChange:t=>{e(q({uiState:{groupByKey:t}}))},updateTask:(t,s)=>{e(W({task:t,updates:s}))},onCreateTagClick:(t,s)=>{e(La(t,s))},onSubtaskCreation:(t,s)=>{e(va({...s,parentTaskId:t}))},handleGroupTemplateClick:t=>{e(V(t,[]))},handleGroupTemplateTaskClick:(t,s)=>{e(V(t,[s]))},handleNewTaskInitialization:t=>{if(e(M({taskDetailLocalData:{...Ka,name:t}})),a.localData.defaultTaskGroupId!=null){const s=F(l,a.localData.defaultTaskGroupId),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:t=>{n(`/${l}/tasks/group/${t}`)},onQuickResponsesClick:()=>{n(`/${l}/tasks/quick-responses`)}}}))(Ca);function se(){const e=pa(),a=Ta(),n=fa(),o=x.getSignedInUser(),i=x.isZeniUser(),g=ga(),l=j((u=>Ia(u))),{taskGroupId:_}=_a(),{useFeatureGate:t}=ba(),{isFeatureEnabled:s}=t(G.isTaskTemplatesEnabled),{isFeatureEnabled:p}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:b}=t(G.isTaskCategorizationEnabled),{isFeatureEnabled:m}=t(G.isTaskBulkResolutionEnabled),{isFeatureEnabled:D}=t(G.isTaskGroupAssigneesEnabled),{isFeatureEnabled:S}=t(G.isTaskRecurringParentEnabled),[E,y]=f.useState(!1),k=j((u=>X(u,s))),T=j((u=>u.taskGroupState)),K=k.fetchState,{isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea}=Wa({mobileExploreReferrer:"Task Checklist"});ha({isDataReady:K==="Completed"}),f.useEffect((()=>{a(B(!1,s))}),[l?.tenantId,a,s]);const ta=f.useMemo((()=>{const u=[c.TASK_CREATED,c.TASK_UPDATED,c.TASKS_BULK_UPDATED,c.TASKS_BULK_DELETED],A=[c.TASK_CREATED,c.TASK_UPDATED,c.TASK_SNOOZE_RESURFACED,c.TASKS_BULK_UPDATED];return[...Ha(l?.companyId,u),...Ja(o?.userId,A)]}),[l?.companyId,o?.userId]);if(ae({events:ta,onEvent:(u,A)=>{switch(u){case c.TASK_CREATED:case c.TASK_UPDATED:{const r=Xa(A);if(r!=null){const w=g.getState(),O=r.task_id,h=O!=null?w.taskState.taskByID?.[O]:void 0,P=h!=null;if(!i)if(r.is_private===!0){if(!P)return}else{const v=o?.userId,L=new Set([...r.assignees??[],...r.direct_assignees??[]]);if(r.created_by!=null&&r.created_by!==""&&L.add(r.created_by),!(v!=null&&L.has(v))&&!P)return}if(u===c.TASK_UPDATED&&P&&h!=null&&Array.isArray(r.task_group_ids)){const v=new Set(Object.values(w.taskGroupState.taskGroupById??{}).filter((d=>d!=null&&!d.isDeleted)).map((d=>d.id))),L=(h.taskGroupIds??[]).filter((d=>v.has(d))),$=(r.task_group_ids??[]).filter((d=>v.has(d))),sa=L.length===$.length&&L.every((d=>$.includes(d))),N=h.taskGroupIds??[],Q=r.task_group_ids??[],na=N.length!==Q.length||!N.every((d=>Q.includes(d))),oa=(d,da)=>{const z=d??[],Z=da??[];if(z.length!==Z.length)return!1;const ca=new Set(Z);return z.every((ka=>ca.has(ka)))},ra=r.name==null||r.name===h.name,ia=r.is_private==null||r.is_private===h.isPrivate,la=r.assignees==null||oa(r.assignees,h.assignees),ua=r.direct_assignees==null;if(sa&&na&&ra&&ia&&la&&ua)return}}return void a(B(!0,s))}case c.TASKS_BULK_DELETED:{const r=Ya(A);return r==null?void 0:void r.task_ids.forEach((w=>a(Ma(w))))}case c.TASKS_BULK_UPDATED:case c.TASK_SNOOZE_RESURFACED:return void a(B(!0,s))}},onSubscribed:()=>{a(B(!0,s))}}),f.useEffect((()=>{K==="Completed"&&a(Y({taskGroupById:T.taskGroupById}))}),[K,T.taskGroupById]),o==null)throw Error("Can't access task list page without signing in...");return C.jsxs(C.Fragment,{children:[K==="Completed"?C.jsx(Ea,{analytics:ya,onLoad:u=>(A=>A.trackPageLoaded(Aa.Event.taskListPage))(u)}):null,C.jsxs(ee,{children:[C.jsx(qa,{isAppContentDrawerOpen:E,handleDrawerToggle:u=>{y(u)}}),C.jsx(te,{location:n,navigate:e,currentTenant:l,taskGroupId:_,taskGroupState:T,localData:k.localData,uiState:k.uiState,isTaskTemplatesEnabled:s,taskListFetchState:K,isTaskCategorizationEnabled:b,isTaskCannedResponsesEnabled:p,isTaskBulkResolutionEnabled:m,isTaskGroupAssigneesEnabled:D,isTaskRecurringParentEnabled:S,isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea})]})]})}const J=(e,a)=>`/${e}/tasks/${encodeURIComponent(a)}`,F=(e,a)=>`/${e}/tasks/new/${a}`,ne=(e,a)=>{if(e==="assignee"){const n=a.split(",");return{...I.taskDetailLocalData,assignee:n}}if(e==="priority"){const n=Qa(a);return{...I.taskDetailLocalData,priority:n}}if(e==="status"){const n=za(a);return{...I.taskDetailLocalData,status:n}}if(e==="tag"){const n=a.split(",");return{...I.taskDetailLocalData,tagIds:n}}if(e==="dueDate"){const n=Za(a);return{...I.taskDetailLocalData,dueDate:n}}return{...I.taskDetailLocalData}},Te=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"}));export{c as T,Ja as a,Ha as b,Ya as c,Xa as d,se as e,Te as f,pe as t,ae as u};
9
+ `,te=ba((function(e,a){const n=X(e,a.isTaskTemplatesEnabled),{taskGroupId:o}=a,i=o!=null&&o!==""?{...n,taskGroupsWithTasksList:n.taskGroupsWithTasksList.map((t=>({...t,tasks:t.tasks.filter((s=>s.taskGroupIds.includes(o)))}))).filter((t=>t.tasks.length>0))}:n,g=Ba(e),l=x.isZeniUser(),_=e.taskDetailState?.subTaskCreateStatus?.fetchState;return{taskListView:i,tagListView:g,localData:i.localData,isTaskTemplatesEnabled:a.isTaskTemplatesEnabled,isZeniUser:l,subTaskCreateStatus:_}}),(function(e,a){const{navigate:n,currentTenant:o,location:i,isTaskTemplatesEnabled:g}=a,{tenantEmailDomain:l}=o,{groupByKey:_}=a.uiState;return{onTaskManagementRowClick:t=>{const s=J(l,t),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{e(B(!0,g))},onTabChange:t=>{e(Oa(t))},onParentTaskClick:t=>{const s=J(l,t);window.open(s,"_blank","noopener")},bulkUpdateTasks:(t,s)=>{e(H(t,null,s))},onNewTaskClick:()=>{if(a.localData.defaultTaskGroupId!=null){const t=F(l,a.localData.defaultTaskGroupId),s=R(i.state?.pathnameStackToGoBack,i.pathname);n(t,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(t,s)=>{e(q({uiState:{sortKey:t,sortOrder:s}}))},onFiltersChange:t=>{e(Na({filters:t}))},onSearchTextChanged:t=>{e($a({searchText:t}))},onReloadCards:()=>{e(B(!0,g))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const t=Ga(i.state?.pathnameStackToGoBack),s=t.poppedPathname??"../";n(s,{state:{pathnameStackToGoBack:t.newStack}})}else n("../")},updateLocalData:t=>{e(xa({localData:t}))},resetLocalData:()=>{e(Y({taskGroupById:a.taskGroupState.taskGroupById}))},handleCreateGroup:t=>{e(Fa(a.localData.newTaskGroupName,t))},assignGroupToTasks:t=>{e(H(a.localData.selectedTaskIds,t,ja(a.uiState.groupByKey,t)))},onDeleteTaskGroup:t=>{e(Pa(t))},onAddNewTaskToTaskGroup:t=>{if(a.localData.defaultTaskGroupId!=null){const s=ne(_,t);e(Z({taskDetailLocalData:s}));const p=F(l,a.uiState.groupByKey==="groupName"?t:a.localData.defaultTaskGroupId),S=R(i.state?.pathnameStackToGoBack,i.pathname);n(p,{state:{pathnameStackToGoBack:S,message:"comingFromTaskListPage"}})}},onDragNDrop:(t,s)=>{e(Ua(a.localData.selectedTaskIds.length>0?a.localData.selectedTaskIds:[t],s))},onTaskGroupRename:(t,s)=>{e(Ra(t,s))},onTimeSpentUpdate:(t,s)=>{e(W({task:t,updates:s}))},onShowToast:t=>{e(wa(t))},onGroupByFilterChange:t=>{e(q({uiState:{groupByKey:t}}))},updateTask:(t,s)=>{e(W({task:t,updates:s}))},onCreateTagClick:(t,s)=>{e(La(t,s))},onSubtaskCreation:(t,s)=>{e(va({...s,parentTaskId:t}))},handleGroupTemplateClick:t=>{e(V(t,[]))},handleGroupTemplateTaskClick:(t,s)=>{e(V(t,[s]))},handleNewTaskInitialization:t=>{if(e(Z({taskDetailLocalData:{...Ka,name:t}})),a.localData.defaultTaskGroupId!=null){const s=F(l,a.localData.defaultTaskGroupId),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:t=>{n(`/${l}/tasks/group/${t}`)},onQuickResponsesClick:()=>{n(`/${l}/tasks/quick-responses`)}}}))(Ca);function se(){const e=pa(),a=fa(),n=Ta(),o=x.getSignedInUser(),i=x.isZeniUser(),g=ga(),l=j((u=>Ia(u))),{taskGroupId:_}=_a(),{useFeatureGate:t}=Sa(),{isFeatureEnabled:s}=t(G.isTaskTemplatesEnabled),{isFeatureEnabled:p}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:S}=t(G.isTaskCategorizationEnabled),{isFeatureEnabled:b}=t(G.isTaskBulkResolutionEnabled),{isFeatureEnabled:m}=t(G.isTaskGroupAssigneesEnabled),{isFeatureEnabled:D}=t(G.isTaskRecurringParentEnabled),[E,y]=T.useState(!1),k=j((u=>X(u,s))),f=j((u=>u.taskGroupState)),K=k.fetchState,{isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea}=Wa({mobileExploreReferrer:"Task Checklist"});ha({isDataReady:K==="Completed"}),T.useEffect((()=>{a(B(!1,s))}),[l?.tenantId,a,s]);const ta=T.useMemo((()=>{const u=[d.TASK_CREATED,d.TASK_UPDATED,d.TASKS_BULK_UPDATED,d.TASKS_BULK_DELETED],A=[d.TASK_CREATED,d.TASK_UPDATED,d.TASK_SNOOZE_RESURFACED,d.TASKS_BULK_UPDATED];return[...Ha(l?.companyId,u),...Ja(o?.userId,A)]}),[l?.companyId,o?.userId]);if(ae({events:ta,onEvent:(u,A)=>{switch(u){case d.TASK_CREATED:case d.TASK_UPDATED:{const r=Xa(A);if(r!=null){const w=g.getState(),$=r.task_id,h=$!=null?w.taskState.taskByID?.[$]:void 0,P=h!=null;if(!i)if(r.is_private===!0){if(!P)return}else{const v=o?.userId,L=new Set([...r.assignees??[],...r.direct_assignees??[]]);if(r.created_by!=null&&r.created_by!==""&&L.add(r.created_by),!(v!=null&&L.has(v))&&!P)return}if(u===d.TASK_UPDATED&&P&&h!=null&&Array.isArray(r.task_group_ids)){const v=new Set(Object.values(w.taskGroupState.taskGroupById??{}).filter((c=>c!=null&&!c.isDeleted)).map((c=>c.id))),L=(h.taskGroupIds??[]).filter((c=>v.has(c))),N=(r.task_group_ids??[]).filter((c=>v.has(c))),sa=L.length===N.length&&L.every((c=>N.includes(c))),O=h.taskGroupIds??[],Q=r.task_group_ids??[],na=O.length!==Q.length||!O.every((c=>Q.includes(c))),oa=(c,ca)=>{const z=c??[],M=ca??[];if(z.length!==M.length)return!1;const da=new Set(M);return z.every((ka=>da.has(ka)))},ra=r.name==null||r.name===h.name,ia=r.is_private==null||r.is_private===h.isPrivate,la=r.assignees==null||oa(r.assignees,h.assignees),ua=r.direct_assignees==null;if(sa&&na&&ra&&ia&&la&&ua)return}}return void a(B(!0,s))}case d.TASKS_BULK_DELETED:{const r=Ya(A);return r==null?void 0:void r.task_ids.forEach((w=>a(Za(w))))}case d.TASKS_BULK_UPDATED:case d.TASK_SNOOZE_RESURFACED:return void a(B(!0,s))}},onSubscribed:()=>{a(B(!0,s))}}),T.useEffect((()=>{K==="Completed"&&a(Y({taskGroupById:f.taskGroupById}))}),[K,f.taskGroupById]),o==null)throw Error("Can't access task list page without signing in...");return C.jsxs(C.Fragment,{children:[K==="Completed"?C.jsx(Ea,{analytics:ya,onLoad:u=>(A=>A.trackPageLoaded(Aa.Event.taskListPage))(u)}):null,C.jsxs(ee,{children:[C.jsx(qa,{isAppContentDrawerOpen:E,handleDrawerToggle:u=>{y(u)}}),C.jsx(te,{location:n,navigate:e,currentTenant:l,taskGroupId:_,taskGroupState:f,localData:k.localData,uiState:k.uiState,isTaskTemplatesEnabled:s,taskListFetchState:K,isTaskCategorizationEnabled:S,isTaskCannedResponsesEnabled:p,isTaskBulkResolutionEnabled:b,isTaskGroupAssigneesEnabled:m,isTaskRecurringParentEnabled:D,isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea})]})]})}const J=(e,a)=>`/${e}/tasks/${encodeURIComponent(a)}`,F=(e,a)=>`/${e}/tasks/new/${a}`,ne=(e,a)=>{if(e==="assignee"){const n=a.split(",");return{...I.taskDetailLocalData,assignee:n}}if(e==="priority"){const n=Qa(a);return{...I.taskDetailLocalData,priority:n}}if(e==="status"){const n=za(a);return{...I.taskDetailLocalData,status:n}}if(e==="tag"){const n=a.split(",");return{...I.taskDetailLocalData,tagIds:n}}if(e==="dueDate"){const n=Ma(a);return{...I.taskDetailLocalData,dueDate:n}}return{...I.taskDetailLocalData}},fe=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"}));export{d as T,Ja as a,Ha as b,Ya as c,Xa as d,se as e,fe as f,pe as t,ae as u};
@@ -1,4 +1,4 @@
1
- import{j as r}from"./liveblocks-CyXsV56c.js";import ue from"./NotFoundScreen-BjZ5T-Ms.js";import{a as k}from"./sentry-T7AA_ij8.js";import{h as H,u as ee,j as E,g as de,i as ke,N as pe,l as me,n as Se,o as b}from"./core-DCcrGtvx.js";import{Ph as ae,Pk as fe,Pe as Te,Z6 as ge,fE as te,a1a as se,PG as g,Py as T,Pb as he,Qa as be,Q3 as Ee,a1b as ne,gg as oe,a1c as q,P7 as Ie,P4 as De,ul as Ce,u9 as Ge,my as Pe,Pw as ye,a1d as _e,Qn as Re,Ps as Ue,PR as we,PO as xe,Pn as Be,PL as je,PK as ve}from"./zeni-epic-state-B9l_W9RQ.js";import{z as y,e2 as Ae,K as Le,O as Fe,c as G,a4 as ie,p as P,a8 as Ke,j as M,U as $e,e3 as Ne,Z as Q,ae as Oe}from"./index-Bw4k26Lh.js";import{n as Ze}from"./mui-ezTHtwEe.js";import{u as ze}from"./useInitialThreadRequest-CLczj5aZ.js";import{M as Ve}from"./MobileAppDrawer-NUU2GCIb.js";import{b as qe,a as Me,u as Qe,T as f,t as Je,c as J,d as W,e as We}from"./TaskListScreen-lSA8hF_F.js";import"./recharts-Chyhxc02.js";import"./analytics-B-TvIB4L.js";import"./plaid-5PXB6whD.js";import"./dnd-2zpntaNq.js";import"./stripe-cKAAJElX.js";import"./lottie-ZAIvsM-R.js";import"./lexical-YhB7nNuN.js";import"./pdf-D6N9uxwe.js";import"./utils-oeHkWTt8.js";import"./InboxNotificationsProvider-BSgZT9XB.js";import"./useTaskManagerAccess-JxICb6EI.js";import"./useAskAiCfoHostNavButtonProps-C0OwLWSS.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]="5b55d6ac-bbb2-4e94-9e85-86d19f9592e6",e._sentryDebugIdIdentifier="sentry-dbid-5b55d6ac-bbb2-4e94-9e85-86d19f9592e6")}catch{}})();function Xe(){const e=H(),a=ee(),n=y.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:u}=E((o=>o.cannedResponsesState)),d=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Ae,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:u==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:d,onSave:m})}const F=e=>e?.taskState?.taskByID,A=(e,a)=>{const n=F(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},Ye=ge([A,(e,a)=>{const n=A(e,a),c=F(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=A(e,a),c=F(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let X,Y=[];const He=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),u=te(e),d=Ye(e,a.taskId),m=s.taskGroupId??c,t=m!=null?q(e.taskGroupState,m):void 0,o=y.getSignedInUser(),I=u.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},w=se(e),{tenantEmailDomain:x}=u,_=s.recurringSourceTaskId,B=_!=null?`${Q.appUrl}/${x}/tasks/${encodeURIComponent(_)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:y.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==X&&(X=h,Y=Object.values(h)),Y),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Oe.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${Q.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:B,tagListView:w,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>q(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:u,taskGroupId:d}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(ve({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(je(n,t??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(Be(a.taskId))},onSnoozeTask:(t,o)=>{e(xe(t,o))},onUnsnoozeTask:t=>{e(we(t))},onCreateSubtask:(t,o)=>{e(Ue({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(Re({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(u.state?.pathnameStackToGoBack,u.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(u.state?.pathnameStackToGoBack,u.pathname)}})},onDismissClick:()=>{if(u.state?.message==="triggerBackClick"){const t=ie(u.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=U(m),o=P(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(_e({taskId:n}))},onDeleteTaskClick:()=>{e(ye(n))},updateFilesEntity:t=>{e(Pe({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))(Ne);function L(){const e=H(),a=ee(),n=de(),c=Le(),{taskId:s,taskGroupId:u}=ke(),d=E((i=>te(i))),m=ze(d?.companyId),{useFeatureGate:t}=Fe(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:w}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:x}=t(G.isTaskGroupAssigneesEnabled),[_,B]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[$,j]=k.useState(!1),C=k.useRef(!1),R=E((i=>i.taskListState.updateTasksFetchState.fetchState)),N=E((i=>se(i))),O=E((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const Z=y.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...qe(d?.companyId,i),...Me(Z,l)]}),[d?.companyId,Z]);Qe({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{W(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=W(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=J(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=J(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),d?.tenantEmailDomain!=null&&e(U(d.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{Je(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||N.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,N.fetchState]),k.useEffect((()=>{K||O==="Completed"||(re(!0),a(be()))}),[K,a,O]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(Ee([s],null,{isArchived:!1})),j(!0))}),[a,s]);k.useEffect((()=>{if($)if(R!=="In-Progress"){if(C.current){if(R==="Error")return j(!1),void(C.current=!1);if(R==="Completed"){j(!1),C.current=!1;const{tenantEmailDomain:i}=d;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=U(i);e(l,{state:{pathnameStackToGoBack:P(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[$,R,d,n,e]);const z=E((i=>ne(i,s))),v=z.fetchState,V=y.getSignedInUser();if(V==null)throw Error("Can't access task detail page without signing in...");if(v==="Error"&&z.error?.code===400){const{tenantEmailDomain:i}=d,l=U(i),p=P(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[v==="Completed"?r.jsx(Ke,{analytics:M,onLoad:i=>(l=>l.trackPageLoaded($e.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(Ve,{isAppContentDrawerOpen:_,handleDrawerToggle:i=>{B(i)}}),r.jsx(He,{analytics:M,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:V,navigate:e,taskGroupId:u,taskId:s,taskDetailFetchState:v,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:w,isTaskGroupAssigneesEnabled:x})]})]})}const ea=Ze.div`
1
+ import{j as r}from"./liveblocks-CPy_3T4M.js";import ue from"./NotFoundScreen-DsHUR7rB.js";import{a as k}from"./sentry-B8WE62R1.js";import{h as H,u as ee,j as E,g as de,i as ke,N as pe,l as me,n as Se,o as b}from"./core-DHfFJrfH.js";import{Ph as ae,Pk as fe,Pe as Te,Z6 as ge,fE as te,a1a as se,PG as g,Py as T,Pb as he,Qa as be,Q3 as Ee,a1b as ne,gg as oe,a1c as M,P7 as Ie,P4 as De,ul as Ce,u9 as Ge,my as Pe,Pw as ye,a1d as _e,Qn as Re,Ps as Ue,PR as we,PO as xe,Pn as Be,PL as je,PK as ve}from"./zeni-epic-state-CgS-13Rp.js";import{z as y,e2 as Ae,K as Le,M as Fe,y as G,a4 as ie,k as P,a8 as Ke,j as q,U as $e,e3 as Ne,Z as Q,ae as Oe}from"./index-BxJdVany.js";import{n as Ze}from"./mui-BCtxe7Uc.js";import{u as ze}from"./useInitialThreadRequest-CYNlLID-.js";import{M as Ve}from"./MobileAppDrawer-k5UN-ZVo.js";import{b as Me,a as qe,u as Qe,T as f,t as Je,c as J,d as W,e as We}from"./TaskListScreen-CdQh3lN1.js";import"./recharts-B2QzdJEJ.js";import"./analytics-MT8j1Arr.js";import"./plaid-BSrnBML8.js";import"./dnd-DG4Q4PBR.js";import"./stripe-cKAAJElX.js";import"./lottie-CPIsfbGQ.js";import"./lexical-Ds-L3Ehk.js";import"./pdf-BNLZqB1A.js";import"./utils-BAMwHjCz.js";import"./InboxNotificationsProvider-8Zmc_gz4.js";import"./useTaskManagerAccess-D10G2ni1.js";import"./useAskAiCfoHostNavButtonProps-BjFaoyi3.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]="c3faf0f1-2637-49ee-8abb-8d7d65b314b7",e._sentryDebugIdIdentifier="sentry-dbid-c3faf0f1-2637-49ee-8abb-8d7d65b314b7")}catch{}})();function Xe(){const e=H(),a=ee(),n=y.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:u}=E((o=>o.cannedResponsesState)),d=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Ae,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:u==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:d,onSave:m})}const F=e=>e?.taskState?.taskByID,A=(e,a)=>{const n=F(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},Ye=ge([A,(e,a)=>{const n=A(e,a),c=F(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=A(e,a),c=F(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let X,Y=[];const He=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),u=te(e),d=Ye(e,a.taskId),m=s.taskGroupId??c,t=m!=null?M(e.taskGroupState,m):void 0,o=y.getSignedInUser(),I=u.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},w=se(e),{tenantEmailDomain:x}=u,_=s.recurringSourceTaskId,B=_!=null?`${Q.appUrl}/${x}/tasks/${encodeURIComponent(_)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:y.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==X&&(X=h,Y=Object.values(h)),Y),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Oe.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${Q.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:B,tagListView:w,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>M(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:u,taskGroupId:d}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(ve({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(je(n,t??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(Be(a.taskId))},onSnoozeTask:(t,o)=>{e(xe(t,o))},onUnsnoozeTask:t=>{e(we(t))},onCreateSubtask:(t,o)=>{e(Ue({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(Re({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(u.state?.pathnameStackToGoBack,u.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(u.state?.pathnameStackToGoBack,u.pathname)}})},onDismissClick:()=>{if(u.state?.message==="triggerBackClick"){const t=ie(u.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=U(m),o=P(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(_e({taskId:n}))},onDeleteTaskClick:()=>{e(ye(n))},updateFilesEntity:t=>{e(Pe({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))(Ne);function L(){const e=H(),a=ee(),n=de(),c=Le(),{taskId:s,taskGroupId:u}=ke(),d=E((i=>te(i))),m=ze(d?.companyId),{useFeatureGate:t}=Fe(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:w}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:x}=t(G.isTaskGroupAssigneesEnabled),[_,B]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[$,j]=k.useState(!1),C=k.useRef(!1),R=E((i=>i.taskListState.updateTasksFetchState.fetchState)),N=E((i=>se(i))),O=E((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const Z=y.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...Me(d?.companyId,i),...qe(Z,l)]}),[d?.companyId,Z]);Qe({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{W(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=W(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=J(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=J(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),d?.tenantEmailDomain!=null&&e(U(d.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{Je(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||N.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,N.fetchState]),k.useEffect((()=>{K||O==="Completed"||(re(!0),a(be()))}),[K,a,O]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(Ee([s],null,{isArchived:!1})),j(!0))}),[a,s]);k.useEffect((()=>{if($)if(R!=="In-Progress"){if(C.current){if(R==="Error")return j(!1),void(C.current=!1);if(R==="Completed"){j(!1),C.current=!1;const{tenantEmailDomain:i}=d;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=U(i);e(l,{state:{pathnameStackToGoBack:P(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[$,R,d,n,e]);const z=E((i=>ne(i,s))),v=z.fetchState,V=y.getSignedInUser();if(V==null)throw Error("Can't access task detail page without signing in...");if(v==="Error"&&z.error?.code===400){const{tenantEmailDomain:i}=d,l=U(i),p=P(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[v==="Completed"?r.jsx(Ke,{analytics:q,onLoad:i=>(l=>l.trackPageLoaded($e.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(Ve,{isAppContentDrawerOpen:_,handleDrawerToggle:i=>{B(i)}}),r.jsx(He,{analytics:q,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:V,navigate:e,taskGroupId:u,taskId:s,taskDetailFetchState:v,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:w,isTaskGroupAssigneesEnabled:x})]})]})}const ea=Ze.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -0,0 +1 @@
1
+ import{j as t}from"./liveblocks-CPy_3T4M.js";import i from"./NotFoundScreen-DsHUR7rB.js";import{T as r}from"./TransactionDetailScreen-42QtBhCQ.js";import"./sentry-B8WE62R1.js";import{n as d,o}from"./core-DHfFJrfH.js";import"./zeni-epic-state-CgS-13Rp.js";import"./recharts-B2QzdJEJ.js";import"./index-BxJdVany.js";import"./mui-BCtxe7Uc.js";import"./analytics-MT8j1Arr.js";import"./plaid-BSrnBML8.js";import"./dnd-DG4Q4PBR.js";import"./stripe-cKAAJElX.js";import"./lottie-CPIsfbGQ.js";import"./lexical-Ds-L3Ehk.js";import"./pdf-BNLZqB1A.js";import"./utils-BAMwHjCz.js";import"./useAskAiCfoHostNavButtonProps-BjFaoyi3.js";import"./decodeURIComponentSafe-DnV8TwS0.js";import"./useInitialThreadRequest-CYNlLID-.js";import"./routePaths-T6NVNRXw.js";import"./expenseAutomationHelper-_DN5nYaA.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]="07c2895c-270d-414b-a4ec-49ceb0cdd05a",e._sentryDebugIdIdentifier="sentry-dbid-07c2895c-270d-414b-a4ec-49ceb0cdd05a")}catch{}})();function z(){return t.jsxs(d,{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{z as default};