@zeniai/web-app-ui 5.1.61-qa → 5.1.62-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 (136) hide show
  1. package/dist/assets/AddressRoutes-DvuqFlm5.js +1 -0
  2. package/dist/assets/AddressScreen-D7DCNUGo.js +9 -0
  3. package/dist/assets/{AiCfoScreen-It5Iqwvu.js → AiCfoScreen-Bv6DgXwH.js} +2 -2
  4. package/dist/assets/{BillPayApprovalRoutes-BzW0b3Z-.js → BillPayApprovalRoutes-DxIJLeU6.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-BM10Ap-2.js → BillPayRoutes-CxAjptk9.js} +9 -9
  6. package/dist/assets/{BusinessVerificationPageScreen-tq2Pq8-k.js → BusinessVerificationPageScreen-HLhTZBjl.js} +2 -2
  7. package/dist/assets/CardsAiCfoScreen-BQXIEsXX.js +14 -0
  8. package/dist/assets/{ChargeCardRoutes-BKpbGgWX.js → ChargeCardRoutes-CF9hoDo5.js} +11 -11
  9. package/dist/assets/CompanyPassportScreen-Dd-P8T6z.js +1 -0
  10. package/dist/assets/ConnectionAuthScreen-BWQPD0qS.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-BycVZ7K6.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-DC4e3Ogu.js → CustomerOnboardingRoutes-B4tFhrDj.js} +4 -4
  13. package/dist/assets/{DashboardRoutes-BpHU2Qkf.js → DashboardRoutes-uPgpLI1W.js} +3 -3
  14. package/dist/assets/{DefaultTenantHome-TmE6YsRf.js → DefaultTenantHome-Bhp_uriR.js} +1 -1
  15. package/dist/assets/DomesticWireDetailScreen-YZRErnfJ.js +18 -0
  16. package/dist/assets/DrawerScreen-BqYmVuny.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-DbpAgwXS.js +1 -0
  18. package/dist/assets/{ExpenseAutomationRoutes-CGrxhlUE.js → ExpenseAutomationRoutes-ChVJkArc.js} +4 -4
  19. package/dist/assets/FeaturePreviewScreen-kp5WtNsg.js +1 -0
  20. package/dist/assets/HubSpotOAuthCallbackScreen-BAfTUuIq.js +1 -0
  21. package/dist/assets/MagicLinkRoutes-CGh8IMWW.js +72 -0
  22. package/dist/assets/MagicLinkSignInScreen-BFMyglUM.js +12 -0
  23. package/dist/assets/MobileAppDrawer-BuakBUGx.js +1 -0
  24. package/dist/assets/NotFoundScreen-AsC21qGx.js +1 -0
  25. package/dist/assets/NotificationRoutes-B06j6V42.js +1 -0
  26. package/dist/assets/{OAuthConsentScreen-DXJTz5MU.js → OAuthConsentScreen-B6euKfvQ.js} +1 -1
  27. package/dist/assets/PandLWithForecastRoutes-DfEV7guz.js +1 -0
  28. package/dist/assets/{PeopleRoutes-DM0B31yg.js → PeopleRoutes-qz_hXV4C.js} +4 -4
  29. package/dist/assets/{PerformanceRoutes-yT4nKfMt.js → PerformanceRoutes-v5FcQW2N.js} +1 -1
  30. package/dist/assets/{Preview-DgYvT3D-.js → Preview-lrK4F27Y.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-Dxk5EKMF.js → QBOConnectionScreen-Cx74YOuE.js} +1 -1
  32. package/dist/assets/ReferralListScreen-G8WgDfU8.js +5 -0
  33. package/dist/assets/ReimbursementApprovalRoutes-yvcY1FyR.js +1 -0
  34. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Btjx5v4l.js → ReimbursementApprovalRuleDetailScreen-s9Cc-PAW.js} +1 -1
  35. package/dist/assets/{ReimbursementRoutes-CLjD-rz3.js → ReimbursementRoutes-vHQ3hpWm.js} +11 -11
  36. package/dist/assets/{ReportsRoutes-DIvKwgKT.js → ReportsRoutes-DIUc8s5q.js} +1 -1
  37. package/dist/assets/RewardsRoutes-lnm6cAkX.js +1 -0
  38. package/dist/assets/ScreenRoutes-CAtz09zv.js +2 -0
  39. package/dist/assets/{SettingsRoutes-CwZJeFhH.js → SettingsRoutes-B4g8CJnG.js} +8 -8
  40. package/dist/assets/{SetupPagesScreen-DHP6inkV.js → SetupPagesScreen-BkPb95y9.js} +5 -5
  41. package/dist/assets/SignInScreen-Dhh5qz65.js +1 -0
  42. package/dist/assets/SignOutScreen-3sXSL_QM.js +9 -0
  43. package/dist/assets/TaskListScreen-DGOHeeuZ.js +9 -0
  44. package/dist/assets/TaskRoutes-CDomkVrp.js +9 -0
  45. package/dist/assets/{TransactionDetailRoutes-DWs1Egcj.js → TransactionDetailRoutes-BXwhj2nX.js} +1 -1
  46. package/dist/assets/{TransactionDetailScreen-BbsGsqi_.js → TransactionDetailScreen-DUZV5JDK.js} +2 -2
  47. package/dist/assets/{TransactionListRoutes-Co9duxwX.js → TransactionListRoutes-CDDcflri.js} +1 -1
  48. package/dist/assets/TreasuryRoutes-CZyF8G2k.js +37 -0
  49. package/dist/assets/{VendorsRoutes-puD2Dgk7.js → VendorsRoutes-B0mGOZoL.js} +23 -23
  50. package/dist/assets/WiseConfirmationScreen-B3-wTx7l.js +12 -0
  51. package/dist/assets/{ZeniAccountRoutes-CbulRVVe.js → ZeniAccountRoutes-BeZsG6M5.js} +11 -11
  52. package/dist/assets/ZeniAccountStatementScreen-CU5lpB3Y.js +9 -0
  53. package/dist/assets/{accountMappingHelper-BPz1owqi.js → accountMappingHelper-CSvCSQoY.js} +1 -1
  54. package/dist/assets/{analytics-C-A3qVJh.js → analytics-DCrhd8oB.js} +1 -1
  55. package/dist/assets/{analyticsHelper-CewoJ3Hu.js → analyticsHelper-CQXeRvKo.js} +1 -1
  56. package/dist/assets/{core-SRRzy8qJ.js → core-DmAftQ4g.js} +1 -1
  57. package/dist/assets/{decodeURIComponentSafe-Bz-26BXW.js → decodeURIComponentSafe-C70tsXnj.js} +1 -1
  58. package/dist/assets/{dnd-CR8sMRK3.js → dnd-3F1D24DQ.js} +1 -1
  59. package/dist/assets/{empty-BjaZv87n.js → empty-B3YzB_Zh.js} +1 -1
  60. package/dist/assets/{empty-Btqk4ZK3.js → empty-CDCfsLV4.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-CcSCePHi.js → emptyVideoElement-CFNhZ55F.js} +1 -1
  62. package/dist/assets/epic-Bmb0p0Me.js +2 -0
  63. package/dist/assets/getLocaleForTenant-C55KVru2.js +1 -0
  64. package/dist/assets/{index-CejiZfG4.js → index-B2dyNLwa.js} +1 -1
  65. package/dist/assets/{index-JPErnqsm.js → index-BJ17Ijlb.js} +2 -2
  66. package/dist/assets/{index-CxtVVz4g.js → index-BTn1WqO7.js} +1 -1
  67. package/dist/assets/{index-CEFX9nem.js → index-BpGaPboJ.js} +1 -1
  68. package/dist/assets/{index-rTYnRLvf.js → index-DPrh5XVZ.js} +1 -1
  69. package/dist/assets/{index-6PBzTIZ2.js → index-DniSRtks.js} +1 -1
  70. package/dist/assets/{index-BnX1nS7p.js → index-DsVH62ZK.js} +13159 -13147
  71. package/dist/assets/{index-DiKyQs4W.js → index-EyTFjAAZ.js} +1 -1
  72. package/dist/assets/{lexical-qJrDnJMV.js → lexical-PVlNGkpS.js} +1 -1
  73. package/dist/assets/{liveblocks-DS8sOLD1.js → liveblocks-evjZPqs_.js} +1 -1
  74. package/dist/assets/{lottie-Coq2aDEW.js → lottie-CmTLY-9t.js} +1 -1
  75. package/dist/assets/{mui-DQ-jfgFM.js → mui-PcDpEhsm.js} +1 -1
  76. package/dist/assets/{pathToGoBack-BmSmVqnZ.js → pathToGoBack-Dt8AwbCr.js} +1 -1
  77. package/dist/assets/{pdf-D2Xq7623.js → pdf-CbXlPYUs.js} +4 -4
  78. package/dist/assets/{pdf-lib-fB9Fkl6A.js → pdf-lib-CU5FhbnZ.js} +1 -1
  79. package/dist/assets/{plaid-DWZgMqW3.js → plaid-DSnXUEUK.js} +1 -1
  80. package/dist/assets/{pusher-Xj81uOBz.js → pusher-Cwyg5VVV.js} +1 -1
  81. package/dist/assets/{react-eGjCUI9Z.js → react-CDqmK3AW.js} +1 -1
  82. package/dist/assets/{react-BlqDZveQ.js → react-CJ1HWQ69.js} +1 -1
  83. package/dist/assets/{react-CgdBA-iC.js → react-CY1ZQ6op.js} +1 -1
  84. package/dist/assets/{react-DRyTZBkZ.js → react-Cf5hLxOq.js} +1 -1
  85. package/dist/assets/{react-DyXk5i5q.js → react-EoTfQhVb.js} +1 -1
  86. package/dist/assets/{react-DrjKWElm.js → react-ymB_cbpE.js} +1 -1
  87. package/dist/assets/{recharts-CHATJmXy.js → recharts-CgEqsrFw.js} +1 -1
  88. package/dist/assets/routePaths-Dq5U7lhs.js +1 -0
  89. package/dist/assets/{sentry-B2Aew07S.js → sentry-CCZGmBkl.js} +1 -1
  90. package/dist/assets/{url-BOKPP8B2.js → url-9kg5cual.js} +1 -1
  91. package/dist/assets/{url-BfvldWlU.js → url-BKaTO14S.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DiiAXpvy.js → useAiCfoDashboardSuggestedQuestionsChips-BzB3gTK8.js} +1 -1
  93. package/dist/assets/{useAskAiCfoHostNavButtonProps-RYFll1PC.js → useAskAiCfoHostNavButtonProps-uVGdd0zj.js} +1 -1
  94. package/dist/assets/useCashManagementBanner-BB3WgTJ-.js +1 -0
  95. package/dist/assets/{useChargeCardPusherEvents-iVaYEDl9.js → useChargeCardPusherEvents-BOkZNaGv.js} +1 -1
  96. package/dist/assets/{useDeviceId-obtSvxuy.js → useDeviceId-DGJPBja9.js} +1 -1
  97. package/dist/assets/useEmailConnectResultRefresh-FRZ2xd4V.js +1 -0
  98. package/dist/assets/{useInitialThreadRequest-8loDIspA.js → useInitialThreadRequest-D9ebiXdA.js} +1 -1
  99. package/dist/assets/{utils-D8kKiFqT.js → utils--mWNe9J7.js} +1 -1
  100. package/dist/assets/{withTransactionSidePanel-CpddR0Hs.js → withTransactionSidePanel-iGXE6khP.js} +2 -2
  101. package/dist/assets/{zeni-epic-state-DcKqCCCg.js → zeni-epic-state-vtQ66nN6.js} +6 -6
  102. package/dist/index.html +1 -1
  103. package/package.json +3 -3
  104. package/dist/assets/AddressRoutes-DYu6X0mE.js +0 -1
  105. package/dist/assets/AddressScreen-DmitYkw7.js +0 -9
  106. package/dist/assets/CardsAiCfoScreen-DWCPoMx2.js +0 -14
  107. package/dist/assets/CompanyPassportScreen-CdbgEPbH.js +0 -1
  108. package/dist/assets/ConnectionAuthScreen-B6ApFE5A.js +0 -11
  109. package/dist/assets/CustomerOnboardingAuthScreen-BC6kPGo0.js +0 -1
  110. package/dist/assets/DomesticWireDetailScreen-Bg4mE0II.js +0 -18
  111. package/dist/assets/DrawerScreen-Q_Fkogtz.js +0 -1
  112. package/dist/assets/EntityDetailRoutes-FVCOQ4xF.js +0 -1
  113. package/dist/assets/FeaturePreviewScreen-D35UAPet.js +0 -1
  114. package/dist/assets/HubSpotOAuthCallbackScreen-CqLWzeL5.js +0 -1
  115. package/dist/assets/MagicLinkRoutes-Cy9sY1KO.js +0 -72
  116. package/dist/assets/MagicLinkSignInScreen-CTQVJ1D1.js +0 -12
  117. package/dist/assets/MobileAppDrawer-DChLZMjE.js +0 -1
  118. package/dist/assets/NotFoundScreen-DRRoMVDk.js +0 -1
  119. package/dist/assets/NotificationRoutes-DC-UVqrq.js +0 -1
  120. package/dist/assets/PandLWithForecastRoutes-DtN54cOv.js +0 -1
  121. package/dist/assets/ReferralListScreen-DoZyTHjO.js +0 -5
  122. package/dist/assets/ReimbursementApprovalRoutes-AEJXMIeN.js +0 -1
  123. package/dist/assets/RewardsRoutes-B_SjWYxl.js +0 -1
  124. package/dist/assets/ScreenRoutes-DrzMUCeq.js +0 -2
  125. package/dist/assets/SignInScreen-B5h77NMY.js +0 -1
  126. package/dist/assets/SignOutScreen-MsTaSP0q.js +0 -9
  127. package/dist/assets/TaskListScreen-BDTDGrzi.js +0 -9
  128. package/dist/assets/TaskRoutes-CNamnrYQ.js +0 -9
  129. package/dist/assets/TreasuryRoutes-B_Dv4GZ7.js +0 -37
  130. package/dist/assets/WiseConfirmationScreen-DAi_rrl_.js +0 -12
  131. package/dist/assets/ZeniAccountStatementScreen-DbJvbotJ.js +0 -9
  132. package/dist/assets/epic-DDYIjE2A.js +0 -2
  133. package/dist/assets/getLocaleForTenant-DHWNDQcY.js +0 -1
  134. package/dist/assets/routePaths-DyfF54Mg.js +0 -1
  135. package/dist/assets/useCashManagementBanner-DeSZsTvv.js +0 -1
  136. package/dist/assets/useEmailConnectResultRefresh-DEaO6bJX.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-DS8sOLD1.js";import{a as p}from"./sentry-B2Aew07S.js";import{h as V,g as Q,u as T,j as h,s as ce,n as $,i as G,o as q,p as A}from"./core-SRRzy8qJ.js";import{bn as je,eV as M,gm as Pe,mY as le,Oc as Me,hC as he,O3 as De,qO as Ue,ku as fe,mU as Te,hE as _e,O5 as Re,O4 as Fe,Qu as Oe,ze as Be,EI as Ve,Q3 as ze,Qc as Le,c6 as ee,cL as Ne,cM as Qe,M3 as $e,Qv as Ge,M4 as Ke,xG as Ze,Qw as He,H7 as Je,Eo as We,Ef as be,Ec as qe,xK as Se,Ei as ye,El as Ce,Er as ne,u8 as te,xJ as Ye,k6 as Y,k9 as Ie,Qx as Xe,la as en,xZ as nn,MZ as tn,M_ as an,k4 as on,Qy as sn,k7 as cn,rg as ln,MU as rn,MV as dn,rk as un,hn as pn,Mc as W,hf as re,hc as gn,hk as mn,Md as hn,xW as fn,Qz as bn,QA as Sn,EF as yn,fy as xe,fA as Ee,QB as Cn,ga as In,Mm as xn,xV as de,gf as ue,ge as En,xU as An,gd as vn,gc as wn,QC as kn,fD as Ae,QD as jn,QE as Pn,y0 as Mn,xT as pe,QF as Dn,fU as Un,xQ as Tn,bZ as _n,c5 as Rn,c4 as Fn,b_ as On,c2 as Bn,c1 as Vn,c0 as zn,c3 as Ln,b$ as Nn}from"./zeni-epic-state-DcKqCCCg.js";import{W as ae,U as R,z as j,af as ve,bR as Qn,d as J,f as $n,bC as Gn,I as K,w as oe,bS as Kn,bT as Zn,ar as Hn,i as we,bU as Jn,bV as Wn,bW as qn,a9 as Yn,V as Xn,bX as et,s as nt,bY as tt}from"./index-BnX1nS7p.js";import{n as F}from"./mui-DQ-jfgFM.js";import{M as _}from"./MobileAppDrawer-DChLZMjE.js";import{a as Z,g as H,m as at}from"./accountMappingHelper-BPz1owqi.js";import{t as ot,A as st}from"./AddressScreen-DmitYkw7.js";import N from"./NotFoundScreen-DRRoMVDk.js";import{g as it}from"./analyticsHelper-CewoJ3Hu.js";import{B as ct}from"./BusinessVerificationPageScreen-tq2Pq8-k.js";import{C as lt}from"./CompanyPassportScreen-CdbgEPbH.js";import{q as ge}from"./QBOConnectionScreen-Dxk5EKMF.js";import{u as rt}from"./useEmailConnectResultRefresh-DEaO6bJX.js";import{B as dt}from"./BillPayApprovalRoutes-BzW0b3Z-.js";import{R as ut}from"./ReimbursementApprovalRoutes-AEJXMIeN.js";import"./recharts-CHATJmXy.js";import"./analytics-C-A3qVJh.js";import"./plaid-DWZgMqW3.js";import"./dnd-CR8sMRK3.js";import"./stripe-DMRn4zHo.js";import"./lottie-Coq2aDEW.js";import"./lexical-qJrDnJMV.js";import"./pdf-D2Xq7623.js";import"./utils-D8kKiFqT.js";import"./routePaths-DyfF54Mg.js";import"./empty-Btqk4ZK3.js";import"./pdf-lib-fB9Fkl6A.js";import"./index-DiKyQs4W.js";import"./url-BOKPP8B2.js";import"./index-6PBzTIZ2.js";import"./decodeURIComponentSafe-Bz-26BXW.js";import"./ReimbursementApprovalRuleDetailScreen-Btjx5v4l.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]="246db98f-60ba-4662-9b56-db795c22859c",e._sentryDebugIdIdentifier="sentry-dbid-246db98f-60ba-4662-9b56-db795c22859c")}catch{}})();const pt=F.div`
1
+ import{j as o}from"./liveblocks-evjZPqs_.js";import{a as p}from"./sentry-CCZGmBkl.js";import{h as V,g as Q,u as T,j as h,s as ce,n as $,i as G,o as J,p as A}from"./core-DmAftQ4g.js";import{bn as je,eW as M,gn as Pe,mZ as le,Od as Me,hD as he,O4 as De,qP as Ue,kv as fe,mV as Te,hF as _e,O6 as Re,O5 as Be,Qv as Fe,zf as Oe,EJ as Ve,Q4 as ze,Qd as Le,c6 as ee,cL as Ne,cM as Qe,M4 as $e,Qw as Ge,M5 as Ke,xH as He,Qx as Ze,H8 as We,Ep as qe,Eg as be,Ed as Je,xL as Se,Ej as ye,Em as Ce,Es as ne,u9 as te,xK as Xe,k7 as X,ka as Ie,Qy as Ye,lb as en,x_ as nn,M_ as tn,M$ as an,k5 as on,Qz as sn,k8 as cn,rh as ln,MV as rn,MW as dn,rl as un,ho as pn,Md as q,hg as re,hd as gn,hl as mn,Me as hn,xX as fn,QA as bn,QB as Sn,EG as yn,fz as xe,fB as Ee,QC as Cn,gb as In,Mn as xn,xW as de,gg as ue,gf as En,xV as An,ge as vn,gd as wn,QD as kn,fE as Ae,QE as jn,QF as Pn,y1 as Mn,xU as pe,QG as Dn,fV as Un,xR as Tn,bZ as _n,c5 as Rn,c4 as Bn,b_ as Fn,c2 as On,c1 as Vn,c0 as zn,c3 as Ln,b$ as Nn}from"./zeni-epic-state-vtQ66nN6.js";import{W as ae,U as R,z as j,af as ve,bR as Qn,c as W,e as $n,bC as Gn,I as K,B as oe,bS as Kn,bT as Hn,ar as Zn,i as we,bU as Wn,bV as qn,bW as Jn,a9 as Xn,X as Yn,bX as et,q as nt,bY as tt}from"./index-DsVH62ZK.js";import{n as B}from"./mui-PcDpEhsm.js";import{M as _}from"./MobileAppDrawer-BuakBUGx.js";import{a as H,g as Z,m as at}from"./accountMappingHelper-CSvCSQoY.js";import{t as ot,A as st}from"./AddressScreen-D7DCNUGo.js";import N from"./NotFoundScreen-AsC21qGx.js";import{g as it}from"./analyticsHelper-CQXeRvKo.js";import{B as ct}from"./BusinessVerificationPageScreen-HLhTZBjl.js";import{C as lt}from"./CompanyPassportScreen-Dd-P8T6z.js";import{q as ge}from"./QBOConnectionScreen-Cx74YOuE.js";import{u as rt}from"./useEmailConnectResultRefresh-FRZ2xd4V.js";import{B as dt}from"./BillPayApprovalRoutes-DxIJLeU6.js";import{R as ut}from"./ReimbursementApprovalRoutes-yvcY1FyR.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.js";import"./routePaths-Dq5U7lhs.js";import"./empty-CDCfsLV4.js";import"./pdf-lib-CU5FhbnZ.js";import"./index-EyTFjAAZ.js";import"./url-9kg5cual.js";import"./index-DniSRtks.js";import"./decodeURIComponentSafe-C70tsXnj.js";import"./ReimbursementApprovalRuleDetailScreen-s9Cc-PAW.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]="3ac6a534-cf81-47df-b787-68495eee9355",e._sentryDebugIdIdentifier="sentry-dbid-3ac6a534-cf81-47df-b787-68495eee9355")}catch{}})();const pt=B.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as o}from"./liveblocks-DS8sOLD1.js";import{a as p}from"./sentry-B2Aew07
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,gt=$(function(e,t){return{accountMappingView:t.accountMappingView,isFiling1099FeatureEnabled:t.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:t.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:fe(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Ue(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:t.isCapitalizationFeatureEnabled,capitalizableAccounts:t.capitalizableAccounts,accountNamesById:t.accountNamesById,capitalizableAccountOverrides:t.capitalizableAccountOverrides,isCapitalizationThresholdSaving:t.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:t.onSaveCapitalizationAccountThreshold}},function(e,t){const{navigate:s,location:r,isFiling1099FeatureEnabled:i}=t;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:a,billsAccountSection:c,reimbursementsAccountSection:u,vendorsAccountSection:d,filing1099Section:m}=n,{incomeAccount:f,expenseAccount:g}=a,{billPayAccount:l}=c,{reimbursementsAccount:C}=u,{prepaidExpensesAccount:I,fixedAssetsAccount:P,accruedExpensesAccount:v}=d,{bankAccount:y,expenseCategory1099:E}=m,w=Z(t.accountMappingView.incomeAccountList,f.selectedOption),O=Z(t.accountMappingView.expenseAccountList,g.selectedOption),z=Z(t.accountMappingView.billPayAccountList,l.selectedOption),L=Z(t.accountMappingView.reimbursementsAccountList,C.selectedOption),B=H(t.accountMappingView.prepaidExpensesAccountList,I.selectedOptions),b=H(t.accountMappingView.fixedAssetsAccountList,P.selectedOptions),D=H(t.accountMappingView.accruedExpensesAccountList,v.selectedOptions),S=H(t.accountMappingView.bankAccounts1099FilingAccountList,y.selectedOptions),x=at(t.accountMappingView.expenseAccounts1099FilingAccountList,E),U={selectedIncomeAccountId:w?.accountId,selectedExpenseAccountId:O?.accountId,selectedBillPayAccountId:z?.accountId,selectedReimbursementsAccountId:L?.accountId,selectedPrepaidExpensesAccountIds:B.map(k=>k.accountId),selectedFixedAssetsAccountIds:b.map(k=>k.accountId),selectedAccruedExpensesAccountIds:D.map(k=>k.accountId),selectedBankAccounts1099FilingAccountIds:S.map(k=>k.accountId),selectedExpenseAccounts1099FilingAccountIds:x};e(Fe({data:U}))},onBackClick:()=>{ve(r)===!1?(s("../../dashboard"),e(Re())):e(he())},onSaveClick:()=>{e(_e()),i&&J.track($n.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(Te(t.currentTenant.companyId,n))}}})(Qn),mt=()=>{const e=V(),t=Q(),s=T(),{useFeatureGate:r,useDynamicConfig:i}=ae(),{isFeatureEnabled:n}=r(R.isFiling1099FeatureEnabled),{isFeatureEnabled:a}=r(R.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:c,isDynamicConfigLoading:u}=i("transaction_categorization_config"),d=!u&&c?.capitalization_enabled===!0,m=j.getSignedInUser(),f=je(m),g=h(S=>M(S)),{capitalizableAccounts:l,capitalizableAccountOverrides:C,isCapitalizationThresholdSaving:I,currencySymbol:P}=h(S=>{const x=S.tenantState.currentTenantId,U=x!=null?S.tenantState.tenantsById[x]:void 0,k=Pe(S.companyState,g.companyId);return{capitalizableAccounts:U?.capitalizableAccounts??null,capitalizableAccountOverrides:U?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:S.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:k?.company.companyLocaleInfo?.currencySymbol??"$"}},ce),v=p.useCallback((S,x)=>{s(le(g.companyId,S,x))},[s,g.companyId]),y=p.useCallback(S=>{const x={...C??{}},U=Object.entries(S);for(const[se,ie]of U)ie===null?delete x[se]:x[se]=ie;const[k,ke]=U[0]??[];k!=null&&s(le(g.companyId,k,ke,void 0,Object.keys(x).length>0?x:null))},[s,g.companyId,C]),E=h(S=>Me(S.accountState),ce),w=p.useMemo(()=>{const S={};for(const x of E)x.accountId!=null&&x.accountName!=null&&(S[x.accountId]=x.accountName);return S},[E]),[O,z]=p.useState(!1),[L,B]=p.useState(!1);p.useEffect(()=>{O===!1&&(s(he()),z(!0))},[O]);const b=h(S=>De(S)),D=S=>{B(S)};return o.jsxs(pt,{children:[o.jsx(_,{isAppContentDrawerOpen:L,handleDrawerToggle:D}),o.jsx(gt,{currentTenant:g,navigate:e,accountMappingView:b,isFiling1099FeatureEnabled:n&&f,isAccruedExpensesFeatureEnabled:a,isCapitalizationFeatureEnabled:d,capitalizableAccounts:l,accountNamesById:w,capitalizableAccountOverrides:C,currencySymbol:P,isCapitalizationThresholdSaving:I,onSaveCapitalizationAccountThreshold:v,onSaveCapitalizationAccountThresholds:y,location:t,isSettings:ve(t),onClickMenuIcon:()=>D(!0)})]})},ht=F.div`
9
+ `,gt=$(function(e,t){return{accountMappingView:t.accountMappingView,isFiling1099FeatureEnabled:t.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:t.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:fe(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Ue(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:t.isCapitalizationFeatureEnabled,capitalizableAccounts:t.capitalizableAccounts,accountNamesById:t.accountNamesById,capitalizableAccountOverrides:t.capitalizableAccountOverrides,isCapitalizationThresholdSaving:t.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:t.onSaveCapitalizationAccountThreshold}},function(e,t){const{navigate:s,location:r,isFiling1099FeatureEnabled:i}=t;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:a,billsAccountSection:c,reimbursementsAccountSection:u,vendorsAccountSection:d,filing1099Section:m}=n,{incomeAccount:f,expenseAccount:g}=a,{billPayAccount:l}=c,{reimbursementsAccount:C}=u,{prepaidExpensesAccount:I,fixedAssetsAccount:P,accruedExpensesAccount:v}=d,{bankAccount:y,expenseCategory1099:E}=m,w=H(t.accountMappingView.incomeAccountList,f.selectedOption),F=H(t.accountMappingView.expenseAccountList,g.selectedOption),z=H(t.accountMappingView.billPayAccountList,l.selectedOption),L=H(t.accountMappingView.reimbursementsAccountList,C.selectedOption),O=Z(t.accountMappingView.prepaidExpensesAccountList,I.selectedOptions),b=Z(t.accountMappingView.fixedAssetsAccountList,P.selectedOptions),D=Z(t.accountMappingView.accruedExpensesAccountList,v.selectedOptions),S=Z(t.accountMappingView.bankAccounts1099FilingAccountList,y.selectedOptions),x=at(t.accountMappingView.expenseAccounts1099FilingAccountList,E),U={selectedIncomeAccountId:w?.accountId,selectedExpenseAccountId:F?.accountId,selectedBillPayAccountId:z?.accountId,selectedReimbursementsAccountId:L?.accountId,selectedPrepaidExpensesAccountIds:O.map(k=>k.accountId),selectedFixedAssetsAccountIds:b.map(k=>k.accountId),selectedAccruedExpensesAccountIds:D.map(k=>k.accountId),selectedBankAccounts1099FilingAccountIds:S.map(k=>k.accountId),selectedExpenseAccounts1099FilingAccountIds:x};e(Be({data:U}))},onBackClick:()=>{ve(r)===!1?(s("../../dashboard"),e(Re())):e(he())},onSaveClick:()=>{e(_e()),i&&W.track($n.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(Te(t.currentTenant.companyId,n))}}})(Qn),mt=()=>{const e=V(),t=Q(),s=T(),{useFeatureGate:r,useDynamicConfig:i}=ae(),{isFeatureEnabled:n}=r(R.isFiling1099FeatureEnabled),{isFeatureEnabled:a}=r(R.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:c,isDynamicConfigLoading:u}=i("transaction_categorization_config"),d=!u&&c?.capitalization_enabled===!0,m=j.getSignedInUser(),f=je(m),g=h(S=>M(S)),{capitalizableAccounts:l,capitalizableAccountOverrides:C,isCapitalizationThresholdSaving:I,currencySymbol:P}=h(S=>{const x=S.tenantState.currentTenantId,U=x!=null?S.tenantState.tenantsById[x]:void 0,k=Pe(S.companyState,g.companyId);return{capitalizableAccounts:U?.capitalizableAccounts??null,capitalizableAccountOverrides:U?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:S.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:k?.company.companyLocaleInfo?.currencySymbol??"$"}},ce),v=p.useCallback((S,x)=>{s(le(g.companyId,S,x))},[s,g.companyId]),y=p.useCallback(S=>{const x={...C??{}},U=Object.entries(S);for(const[se,ie]of U)ie===null?delete x[se]:x[se]=ie;const[k,ke]=U[0]??[];k!=null&&s(le(g.companyId,k,ke,void 0,Object.keys(x).length>0?x:null))},[s,g.companyId,C]),E=h(S=>Me(S.accountState),ce),w=p.useMemo(()=>{const S={};for(const x of E)x.accountId!=null&&x.accountName!=null&&(S[x.accountId]=x.accountName);return S},[E]),[F,z]=p.useState(!1),[L,O]=p.useState(!1);p.useEffect(()=>{F===!1&&(s(he()),z(!0))},[F]);const b=h(S=>De(S)),D=S=>{O(S)};return o.jsxs(pt,{children:[o.jsx(_,{isAppContentDrawerOpen:L,handleDrawerToggle:D}),o.jsx(gt,{currentTenant:g,navigate:e,accountMappingView:b,isFiling1099FeatureEnabled:n&&f,isAccruedExpensesFeatureEnabled:a,isCapitalizationFeatureEnabled:d,capitalizableAccounts:l,accountNamesById:w,capitalizableAccountOverrides:C,currencySymbol:P,isCapitalizationThresholdSaving:I,onSaveCapitalizationAccountThreshold:v,onSaveCapitalizationAccountThresholds:y,location:t,isSettings:ve(t),onClickMenuIcon:()=>D(!0)})]})},ht=B.div`
10
10
  display: flex;
11
11
  height: 100%;
12
12
  width: 100%;
@@ -14,7 +14,7 @@ import{j as o}from"./liveblocks-DS8sOLD1.js";import{a as p}from"./sentry-B2Aew07
14
14
  flex-direction: column;
15
15
  align-items: center;
16
16
  background-color: ${e=>e.theme.colors.grey4};
17
- `,ft=$(function(e,t){const s=M(e),r=ze(e),i=Le(e),n=t.roleMap.bill_pay_admin;return{isDisabled:(ee(s?.userRole??[])||n)&&"readonly",billpayApprovalView:r,remiApproverView:i,analytics:J}},function(e,t){const{navigate:s,currentTenant:r}=t;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Kn),bt=()=>{const e=V(),t=Q(),s=T(),{tenantEmailDomain:r}=G(),[i,n]=p.useState(!1),[a,c]=p.useState(!1),[u,d]=p.useState(!1),m=h(E=>M(E)),f=h(E=>E.billPaySetupApproverViewState.fetchState),g=h(E=>E.remiSetupApproverViewState.fetchState),l=h(E=>Oe(E)),{isApprovalRulesV3Enabled:C,isLoading:I}=Gn(m?.tenantId),P=m.companyId??j.getSignedInUserTenant(r)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const v=K();p.useEffect(()=>{u||f!=="Not-Started"||I||(d(!0),s(Be(!0,!0,C)))},[u,f,I,C,s]),p.useEffect(()=>{a||g!=="Not-Started"||I||(c(!0),s(Ve(!0,!1,!1,C)))},[a,g,I,C,s]);const y=E=>{n(E)};return v?.loggedInUserRoleMap!=null?o.jsxs(ht,{children:[o.jsx(_,{isAppContentDrawerOpen:i,handleDrawerToggle:y}),o.jsx(ft,{navigate:e,location:t,companyId:P,currentTenant:m,roleMap:v.loggedInUserRoleMap,onClickMenuIcon:()=>{y(!0)}})]}):o.jsx(oe,{fetchState:l.fetchState})},St=F.div`
17
+ `,ft=$(function(e,t){const s=M(e),r=ze(e),i=Le(e),n=t.roleMap.bill_pay_admin;return{isDisabled:(ee(s?.userRole??[])||n)&&"readonly",billpayApprovalView:r,remiApproverView:i,analytics:W}},function(e,t){const{navigate:s,currentTenant:r}=t;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Kn),bt=()=>{const e=V(),t=Q(),s=T(),{tenantEmailDomain:r}=G(),[i,n]=p.useState(!1),[a,c]=p.useState(!1),[u,d]=p.useState(!1),m=h(E=>M(E)),f=h(E=>E.billPaySetupApproverViewState.fetchState),g=h(E=>E.remiSetupApproverViewState.fetchState),l=h(E=>Fe(E)),{isApprovalRulesV3Enabled:C,isLoading:I}=Gn(m?.tenantId),P=m.companyId??j.getSignedInUserTenant(r)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const v=K();p.useEffect(()=>{u||f!=="Not-Started"||I||(d(!0),s(Oe(!0,!0,C)))},[u,f,I,C,s]),p.useEffect(()=>{a||g!=="Not-Started"||I||(c(!0),s(Ve(!0,!1,!1,C)))},[a,g,I,C,s]);const y=E=>{n(E)};return v?.loggedInUserRoleMap!=null?o.jsxs(ht,{children:[o.jsx(_,{isAppContentDrawerOpen:i,handleDrawerToggle:y}),o.jsx(ft,{navigate:e,location:t,companyId:P,currentTenant:m,roleMap:v.loggedInUserRoleMap,onClickMenuIcon:()=>{y(!0)}})]}):o.jsx(oe,{fetchState:l.fetchState})},St=B.div`
18
18
  display: flex;
19
19
  height: 100%;
20
20
  width: 100%;
@@ -22,7 +22,7 @@ import{j as o}from"./liveblocks-DS8sOLD1.js";import{a as p}from"./sentry-B2Aew07
22
22
  flex-direction: column;
23
23
  align-items: center;
24
24
  background-color: ${e=>e.theme.colors.grey4};
25
- `,yt=$(function(e,t){const{companyId:s,isZeniAccountEnabled:r,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:a,isTreasuryEnabled:c}=t,u=M(e);return{bankSetupView:He(e,s,n,a,r,i,c),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:J}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a,c)=>{e(te(a,n,c))},onEstablishConnectionClick:(n,a,c)=>{e(ne(n,i,a,c))},onUpdatePaymentAccountStatus:(n,a,c,u,d)=>{e(Ce(n,a,d,u,c))},onUpdatePaymentAccountLoginStatus:(n,a,c,u)=>{e(ye(!1,n,u,c,a))},onEstablishConnectionSuccess:(n,a)=>{e(Se(a,n))},onUpdateAccountClick:(n,a,c,u,d)=>{e(d==="paymentAccount"?be(n,a,c,u):qe(u,n,a))},onUpdatePrimaryFundingAccount:(n,a,c)=>{e(We(i,a,n,c))},onRemoveConnection:n=>{e(Je(n))},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Zn),Ct=()=>{const e=V(),t=Q(),s=T(),{tenantEmailDomain:r}=G(),i=K(),[n,a]=p.useState(!1),[c,u]=p.useState(!1),d=h(y=>M(y)),m=h(y=>y.settingsViewState.bankConnection.fetchState),f=Ne(d,i?.loggedInUserRoleMap),g=Qe(d,i?.loggedInUserRoleMap),l=$e(d,i?.loggedInUserRoleMap),C=Ge(d,i?.loggedInUserRoleMap),I=Ke(d,i?.loggedInUserRoleMap),P=d.companyId??j.getSignedInUserTenant(r)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");p.useEffect(()=>{c||m==="Completed"||(u(!0),s(Ze(!1)))},[c,s,m]);const v=y=>{a(y)};return f||l||g||I?o.jsxs(St,{children:[o.jsx(_,{isAppContentDrawerOpen:n,handleDrawerToggle:v}),o.jsx(yt,{navigate:e,location:t,companyId:P,currentTenant:d,roleMap:i.loggedInUserRoleMap,isBillPayEnabled:f,isRemiEnabled:g,isZeniAccountEnabled:l,isChargeCardEnabled:I,isTreasuryEnabled:C,onClickMenuIcon:()=>{v(!0)}})]}):o.jsx(N,{})},It=F.div`
25
+ `,yt=$(function(e,t){const{companyId:s,isZeniAccountEnabled:r,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:a,isTreasuryEnabled:c}=t,u=M(e);return{bankSetupView:Ze(e,s,n,a,r,i,c),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:W}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a,c)=>{e(te(a,n,c))},onEstablishConnectionClick:(n,a,c)=>{e(ne(n,i,a,c))},onUpdatePaymentAccountStatus:(n,a,c,u,d)=>{e(Ce(n,a,d,u,c))},onUpdatePaymentAccountLoginStatus:(n,a,c,u)=>{e(ye(!1,n,u,c,a))},onEstablishConnectionSuccess:(n,a)=>{e(Se(a,n))},onUpdateAccountClick:(n,a,c,u,d)=>{e(d==="paymentAccount"?be(n,a,c,u):Je(u,n,a))},onUpdatePrimaryFundingAccount:(n,a,c)=>{e(qe(i,a,n,c))},onRemoveConnection:n=>{e(We(n))},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Hn),Ct=()=>{const e=V(),t=Q(),s=T(),{tenantEmailDomain:r}=G(),i=K(),[n,a]=p.useState(!1),[c,u]=p.useState(!1),d=h(y=>M(y)),m=h(y=>y.settingsViewState.bankConnection.fetchState),f=Ne(d,i?.loggedInUserRoleMap),g=Qe(d,i?.loggedInUserRoleMap),l=$e(d,i?.loggedInUserRoleMap),C=Ge(d,i?.loggedInUserRoleMap),I=Ke(d,i?.loggedInUserRoleMap),P=d.companyId??j.getSignedInUserTenant(r)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");p.useEffect(()=>{c||m==="Completed"||(u(!0),s(He(!1)))},[c,s,m]);const v=y=>{a(y)};return f||l||g||I?o.jsxs(St,{children:[o.jsx(_,{isAppContentDrawerOpen:n,handleDrawerToggle:v}),o.jsx(yt,{navigate:e,location:t,companyId:P,currentTenant:d,roleMap:i.loggedInUserRoleMap,isBillPayEnabled:f,isRemiEnabled:g,isZeniAccountEnabled:l,isChargeCardEnabled:I,isTreasuryEnabled:C,onClickMenuIcon:()=>{v(!0)}})]}):o.jsx(N,{})},It=B.div`
26
26
  display: flex;
27
27
  height: 100%;
28
28
  width: 100%;
@@ -30,7 +30,7 @@ import{j as o}from"./liveblocks-DS8sOLD1.js";import{a as p}from"./sentry-B2Aew07
30
30
  flex-direction: column;
31
31
  align-items: center;
32
32
  background-color: ${e=>e.theme.colors.grey4};
33
- `,xt=$(function(e,t){const{companyId:s}=t,r=M(e),i=t.roleMap.bill_pay_admin,n=Xe(e,s),{uiState:a}=n,c=(ee(r?.userRole??[])||i)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:a,stripeKey:we.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:c,analytics:J}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a)=>{e(te("billing_setup",n,a))},onEstablishConnectionClick:n=>{e(ne(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(Se("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,a,c)=>{e(Ce(n,a,"billing","billing_setup",c))},onUpdatePaymentAccountLoginStatus:(n,a)=>{e(ye(!1,n,"billing","billing_setup",a))},onUpdateAccountClick:(n,a)=>{e(be(n,a,"billing","billing_setup"))},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(Ie(n))},handleConfirmCardSetupIntent:n=>{e(cn(n))},updateCardPaymentModalState:n=>{e(sn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,a,c)=>{e(on(n,a,c))},handleFetchPaymentSources:()=>{e(Y())},resetCardPaymentViewState:()=>{e(an())},handleResetCardPaymentErrorStatuses:()=>{e(tn())},onBillingAddressSave:n=>{e(nn(n))},onAddressEditHandler:n=>{if(n!=null){const a=ot(n);e(en({addressType:"subscription_billing_address",addressToCreate:a}))}}}})(Jn),Et=()=>{const e=V(),t=Q(),s=T(),{tenantEmailDomain:r}=G(),[i,n]=p.useState(!1),[a,c]=p.useState(!1),[u,d]=p.useState(!1),m=h(y=>M(y)),f=h(y=>y.cardPaymentViewState),g=h(y=>y.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=Hn(f.addCardPaymentSourceStatus.fetchState),C=f.addCardPaymentSourceStatus.fetchState,I=m.companyId??j.getSignedInUserTenant(r)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const P=K();p.useEffect(()=>{I!=null&&s(Ye(I,!1))},[I,s]),p.useEffect(()=>{a||(c(!0),s(Y()))},[a,s]),p.useEffect(()=>{u||(Ie(["card"]),d(!0))},[u]),p.useEffect(()=>{l==="In-Progress"&&C==="Completed"&&s(Y())},[l,C]);const v=y=>{n(y)};return P?.loggedInUserRoleMap!=null?o.jsxs(It,{children:[o.jsx(_,{isAppContentDrawerOpen:i,handleDrawerToggle:v}),o.jsx(xt,{navigate:e,location:t,companyId:I,currentTenant:m,roleMap:P.loggedInUserRoleMap,onClickMenuIcon:()=>{v(!0)},googleAPIKey:we.googleMapsAPIKey})]}):o.jsx(oe,{fetchState:g})},X="external_integrations",At=$(function(e){const t=dn(e,X);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(t.map(s=>s.additionalInfo).filter(s=>s!=null))}},function(e,t){const{navigate:s,integrationsView:r,signedInUserEmail:i,tenantEmailDomain:n,tenantId:a}=t;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{ge.init("/connection/auth",n),ge.handleClick()},onRefreshClick:()=>{r.integrations.refreshQBO.fetchState!=="In-Progress"&&e(fn())},onSaveChargeBeeCredentials:(c,u)=>{const d=r.externalConnections?.revenue?.find(m=>m.connectionName==="chargebee")?.connectionId;d!=null&&e(mn(a,d,W("revenue"),hn("chargebee"),{api_key:c,site:u}))},onConnectHubSpot:(c,u)=>{const d=r.externalConnections?.revenue?.find(m=>m.connectionName==="hubspot")?.connectionId;if(d!=null){const m=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:c,client_secret:u,connection_id:d,redirect_uri:m,tenant_id:a}));const f="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(c)}&scope=${encodeURIComponent(f)}&redirect_uri=${encodeURIComponent(m)}`}},onDisconnect:(c,u)=>{e(gn(a,c,W(u)))},onConnectGmail:()=>{e(re(a,"gmail",window.location.href))},onConnectOutlook:()=>{e(re(a,"outlook",window.location.href))},onSaveConnectorCredentials:c=>{e(pn(a,W("payments"),c))},onNotifyMe:c=>{e(un(X,c,i))}}})(Wn),vt=()=>{const e=V(),t=T(),{tenantEmailDomain:s}=G();rt();const[r,i]=p.useState(!1),n=h(l=>l.tenantState.fetchState),a=h(l=>M(l)),c=a.companyId??j.getSignedInUserTenant(s)?.companyId,u=j.getSignedInUser(),d=K(),m=ee(a.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");p.useEffect(()=>{t(ln(X))},[t]);const f=l=>{i(l)},g=h(l=>rn(l,c));return d?.loggedInUserRoleMap!=null?o.jsxs(wt,{children:[o.jsx(_,{isAppContentDrawerOpen:r,handleDrawerToggle:f}),o.jsx(At,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:m,integrationsView:g,signedInUserEmail:u.userEmail??"",tenantEmailDomain:a.tenantEmailDomain??s??"",tenantId:a.tenantId,saveChargeBeeState:g.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:g.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:g.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:g.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:g.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(g.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map(([l,C])=>[l,C?.message])),deleteConnectionState:g.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:g.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress"})]}):o.jsx(oe,{fetchState:n})},wt=F.div`
33
+ `,xt=$(function(e,t){const{companyId:s}=t,r=M(e),i=t.roleMap.bill_pay_admin,n=Ye(e,s),{uiState:a}=n,c=(ee(r?.userRole??[])||i)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:a,stripeKey:we.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:c,analytics:W}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a)=>{e(te("billing_setup",n,a))},onEstablishConnectionClick:n=>{e(ne(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(Se("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,a,c)=>{e(Ce(n,a,"billing","billing_setup",c))},onUpdatePaymentAccountLoginStatus:(n,a)=>{e(ye(!1,n,"billing","billing_setup",a))},onUpdateAccountClick:(n,a)=>{e(be(n,a,"billing","billing_setup"))},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(Ie(n))},handleConfirmCardSetupIntent:n=>{e(cn(n))},updateCardPaymentModalState:n=>{e(sn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,a,c)=>{e(on(n,a,c))},handleFetchPaymentSources:()=>{e(X())},resetCardPaymentViewState:()=>{e(an())},handleResetCardPaymentErrorStatuses:()=>{e(tn())},onBillingAddressSave:n=>{e(nn(n))},onAddressEditHandler:n=>{if(n!=null){const a=ot(n);e(en({addressType:"subscription_billing_address",addressToCreate:a}))}}}})(Wn),Et=()=>{const e=V(),t=Q(),s=T(),{tenantEmailDomain:r}=G(),[i,n]=p.useState(!1),[a,c]=p.useState(!1),[u,d]=p.useState(!1),m=h(y=>M(y)),f=h(y=>y.cardPaymentViewState),g=h(y=>y.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=Zn(f.addCardPaymentSourceStatus.fetchState),C=f.addCardPaymentSourceStatus.fetchState,I=m.companyId??j.getSignedInUserTenant(r)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const P=K();p.useEffect(()=>{I!=null&&s(Xe(I,!1))},[I,s]),p.useEffect(()=>{a||(c(!0),s(X()))},[a,s]),p.useEffect(()=>{u||(Ie(["card"]),d(!0))},[u]),p.useEffect(()=>{l==="In-Progress"&&C==="Completed"&&s(X())},[l,C]);const v=y=>{n(y)};return P?.loggedInUserRoleMap!=null?o.jsxs(It,{children:[o.jsx(_,{isAppContentDrawerOpen:i,handleDrawerToggle:v}),o.jsx(xt,{navigate:e,location:t,companyId:I,currentTenant:m,roleMap:P.loggedInUserRoleMap,onClickMenuIcon:()=>{v(!0)},googleAPIKey:we.googleMapsAPIKey})]}):o.jsx(oe,{fetchState:g})},Y="external_integrations",At=$(function(e){const t=dn(e,Y);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(t.map(s=>s.additionalInfo).filter(s=>s!=null))}},function(e,t){const{navigate:s,integrationsView:r,signedInUserEmail:i,tenantEmailDomain:n,tenantId:a}=t;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{ge.init("/connection/auth",n),ge.handleClick()},onRefreshClick:()=>{r.integrations.refreshQBO.fetchState!=="In-Progress"&&e(fn())},onSaveChargeBeeCredentials:(c,u)=>{const d=r.externalConnections?.revenue?.find(m=>m.connectionName==="chargebee")?.connectionId;d!=null&&e(mn(a,d,q("revenue"),hn("chargebee"),{api_key:c,site:u}))},onConnectHubSpot:(c,u)=>{const d=r.externalConnections?.revenue?.find(m=>m.connectionName==="hubspot")?.connectionId;if(d!=null){const m=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:c,client_secret:u,connection_id:d,redirect_uri:m,tenant_id:a}));const f="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(c)}&scope=${encodeURIComponent(f)}&redirect_uri=${encodeURIComponent(m)}`}},onDisconnect:(c,u)=>{e(gn(a,c,q(u)))},onConnectGmail:()=>{e(re(a,"gmail",window.location.href))},onConnectOutlook:()=>{e(re(a,"outlook",window.location.href))},onSaveConnectorCredentials:c=>{e(pn(a,q("payments"),c))},onNotifyMe:c=>{e(un(Y,c,i))}}})(qn),vt=()=>{const e=V(),t=T(),{tenantEmailDomain:s}=G();rt();const[r,i]=p.useState(!1),n=h(l=>l.tenantState.fetchState),a=h(l=>M(l)),c=a.companyId??j.getSignedInUserTenant(s)?.companyId,u=j.getSignedInUser(),d=K(),m=ee(a.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");p.useEffect(()=>{t(ln(Y))},[t]);const f=l=>{i(l)},g=h(l=>rn(l,c));return d?.loggedInUserRoleMap!=null?o.jsxs(wt,{children:[o.jsx(_,{isAppContentDrawerOpen:r,handleDrawerToggle:f}),o.jsx(At,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:m,integrationsView:g,signedInUserEmail:u.userEmail??"",tenantEmailDomain:a.tenantEmailDomain??s??"",tenantId:a.tenantId,saveChargeBeeState:g.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:g.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:g.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:g.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:g.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(g.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map(([l,C])=>[l,C?.message])),deleteConnectionState:g.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:g.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress"})]}):o.jsx(oe,{fetchState:n})},wt=B.div`
34
34
  display: flex;
35
35
  height: 100%;
36
36
  width: 100%;
@@ -38,7 +38,7 @@ import{j as o}from"./liveblocks-DS8sOLD1.js";import{a as p}from"./sentry-B2Aew07
38
38
  flex-direction: column;
39
39
  align-items: center;
40
40
  background-color: ${e=>e.theme.colors.grey4};
41
- `,kt=F.div`
41
+ `,kt=B.div`
42
42
  display: flex;
43
43
  height: 100%;
44
44
  width: 100%;
@@ -46,7 +46,7 @@ import{j as o}from"./liveblocks-DS8sOLD1.js";import{a as p}from"./sentry-B2Aew07
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${e=>e.theme.colors.grey4};
49
- `,jt=()=>{const e=T(),{tenantEmailDomain:t}=G(),[s,r]=p.useState(!1),i=h(l=>M(l)).companyId??j.getSignedInUserTenant(t)?.companyId,n=j.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const a=h(l=>bn(l,n.userId)),c=h(l=>Sn(l,i,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=c,d=l=>{r(l)},m=p.useCallback(l=>{e(te("user_reimbursement_account",l))},[]),f=p.useCallback(l=>{e(ne(l,i,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);p.useEffect(()=>{a.fetchState!=="Completed"&&a.fetchState!=="In-Progress"&&e(yn(n.userId))},[n.userId,a.fetchState]);const g=a.fetchState==="Not-Started"||a.fetchState==="In-Progress";return o.jsxs(kt,{children:[o.jsx(_,{isAppContentDrawerOpen:s,handleDrawerToggle:d}),o.jsx(qn,{plaidConnectionDetails:u,isLoading:g,myBankConnectionsView:a,onFetchLinkTokenClick:m,onEstablishConnectionClick:f,onClickMenuIcon:()=>{d(!0)}})]})},Pt=F.div`
49
+ `,jt=()=>{const e=T(),{tenantEmailDomain:t}=G(),[s,r]=p.useState(!1),i=h(l=>M(l)).companyId??j.getSignedInUserTenant(t)?.companyId,n=j.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const a=h(l=>bn(l,n.userId)),c=h(l=>Sn(l,i,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=c,d=l=>{r(l)},m=p.useCallback(l=>{e(te("user_reimbursement_account",l))},[]),f=p.useCallback(l=>{e(ne(l,i,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);p.useEffect(()=>{a.fetchState!=="Completed"&&a.fetchState!=="In-Progress"&&e(yn(n.userId))},[n.userId,a.fetchState]);const g=a.fetchState==="Not-Started"||a.fetchState==="In-Progress";return o.jsxs(kt,{children:[o.jsx(_,{isAppContentDrawerOpen:s,handleDrawerToggle:d}),o.jsx(Jn,{plaidConnectionDetails:u,isLoading:g,myBankConnectionsView:a,onFetchLinkTokenClick:m,onEstablishConnectionClick:f,onClickMenuIcon:()=>{d(!0)}})]})},Pt=B.div`
50
50
  display: flex;
51
51
  height: 100%;
52
52
  width: 100%;
@@ -54,4 +54,4 @@ import{j as o}from"./liveblocks-DS8sOLD1.js";import{a as p}from"./sentry-B2Aew07
54
54
  flex-direction: column;
55
55
  align-items: center;
56
56
  background-color: ${e=>e.theme.colors.grey4};
57
- `,me=({appContent:e})=>{const t=T(),s=V(),r=Q(),[i,n]=p.useState(!1),a=h(b=>M(b)),{tenantEmailDomain:c}=a,u=a.companyId??j.getSignedInUserTenant(c)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=ae(),{isFeatureEnabled:m}=d(R.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=d(R.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=d(R.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(R.isTreasuryEnabled),C=h(b=>fe(b)),I=xe(a),P=Ee(g,a),v=!P&&C,y=Yn(a,f,g),{areTenantIdsInSync:E}=Xn();p.useEffect(()=>{E&&t(Cn(u,v))},[u,t,v,E]);const w=h(b=>In(b,v)),O=w.fetchState==="Not-Started"||w.fetchState==="In-Progress"||u==null,z=xn(a),L=!!a.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=b=>{n(b)};return o.jsxs(Pt,{children:[o.jsx(_,{isAppContentDrawerOpen:i,handleDrawerToggle:B}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(et,{myProfileView:w,isAccountingClassesEnabled:C,isReimbursementDisabled:L===!1,isZeniAccountsDisabled:m===!1,isChargeCardDisabled:y===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:z===!1,onClickMenuIcon:()=>{B(!0)},isLoading:O,isBankingOnlyTenant:P,isCardsOnlyTenant:I,onAddressClick:b=>{const D=function(x,U){let k=`/${x}/settings/my_profile`;return k=k.concat(`/new/${U}`),k}(c,b),S=nt(r.state?.pathnameStackToGoBack,r.pathname);s(D,{state:{pathnameStackToGoBack:S}})},onGetOtp:b=>{const D={...w.myProfileLocalData,phone:b};t(de({localData:D})),t(wn(b,"MyProfile"))},onResendOtp:b=>{t(vn(b,"MyProfile"))},onCancelClick:()=>{t(An())},onSaveClick:()=>{t(ue("MyProfile",w.myProfileLocalData.phone,w.myProfileLocalData.otpChallenge,w.myProfileLocalData.dateOfBirth,w.addressData?.addressToCreate))},onVerifyOtp:(b,D)=>{t(En(b,D,"MyProfile"))},onVerifyOtpSuccess:b=>{b!=null&&j.saveZeniOtpToken(b),t(ue("MyProfile",w.myProfileLocalData.phone,w.myProfileLocalData.otpChallenge,w.myProfileLocalData.dateOfBirth,w.addressData?.addressToCreate))},updateMyProfileLocalData:b=>{t(de({localData:b}))}})]})};function Mt(){const e=T(),t=h(l=>M(l)).companyId,s=h(l=>kn(l)),r=h(l=>Ae(l)),i=j.getSignedInUser(),[n,a]=p.useState(!1),c=p.useCallback(l=>{a(l)},[]),u=p.useCallback(l=>{e(jn(l))},[]),d=p.useCallback(()=>{i?.userEmail!=null&&e(Pn({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),m=p.useCallback(()=>{e(Mn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const f=p.useCallback(()=>{const l=r.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(pe(l,t))},[t,r.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=p.useCallback(()=>{e(Dn())},[]);return p.useEffect(()=>{if(r.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const l=r.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(pe(l,t))}},[s.fetchState,t,r.notificationSettings.monthEndInsightsNotificationSettings.enabled,r.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(_,{isAppContentDrawerOpen:n,handleDrawerToggle:c}),o.jsx(tt,{notificationSettingsView:s,onFormDataChange:u,onCancel:d,onSave:m,onClickMenuIcon:()=>{c(!0)},signedInUser:i,onRefresh:f,resetUpdateStatus:g})]})}function pa(e){const[t,s]=p.useState(!1),r=h(l=>Ae(l)),i=h(l=>M(l)),n=K(),a=j.getSignedInUser(),c=T(),{useFeatureGate:u}=ae(),{isFeatureEnabled:d}=u(R.isDebitCardFeatureEnabled),m=a?.userEmail==null||r.fetchState!=="Completed"||Un(r.notificationSettings,a.userEmail,d,i);p.useEffect(()=>{r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"&&t===!1&&(s(!0),c(Tn()))},[r.fetchState,t]);const f=Ee(d,i),g=xe(i);return r.fetchState!=="In-Progress"&&r.fetchState!=="Not-Started"||m!==!0?_n(i)?o.jsxs(q,{children:[Rn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"accounting/*",element:o.jsx(mt,{})}),Fn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"approval_rules/*",element:o.jsx(Dt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),On(i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"my_bank_connections",element:o.jsx(jt,{})}),Bn(i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"bank_connections",element:o.jsx(Ct,{})}),Vn(i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"business_verification",element:o.jsx(ct,{productType:f?"zeni_accounts":g?"charge_cards":it(i,n?.loggedInUserRoleMap)})}),zn(n?.loggedInUserRole??[],i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"company_details",element:o.jsx(lt,{})}),Ln(n?.loggedInUserRole??[],i)&&o.jsx(A,{path:"billing",element:o.jsx(Et,{})}),Nn(n?.loggedInUserRole??[],d,i)&&o.jsx(A,{path:"integrations",element:o.jsx(vt,{})}),o.jsx(A,{path:"my_profile/new/:addressType",element:o.jsx(me,{appContent:o.jsx(st,{isSubPage:!1})})}),o.jsx(A,{path:"my_profile",element:o.jsx(me,{})}),m&&o.jsx(A,{path:"notifications",element:o.jsx(Mt,{})}),o.jsx(A,{path:"*",element:o.jsx(N,{})})]}):o.jsx(q,{children:o.jsx(A,{path:"*",element:o.jsx(N,{})})}):null}function Dt(e){return o.jsxs(q,{children:[o.jsx(A,{path:"/",element:o.jsx(bt,{})}),o.jsx(A,{path:"bills/approval-rules/*",element:o.jsx(dt,{})}),o.jsx(A,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(ut,{}):o.jsx(N,{})}),o.jsx(A,{path:"*",element:o.jsx(N,{})})]})}export{pa as default};
57
+ `,me=({appContent:e})=>{const t=T(),s=V(),r=Q(),[i,n]=p.useState(!1),a=h(b=>M(b)),{tenantEmailDomain:c}=a,u=a.companyId??j.getSignedInUserTenant(c)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=ae(),{isFeatureEnabled:m}=d(R.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=d(R.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=d(R.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(R.isTreasuryEnabled),C=h(b=>fe(b)),I=xe(a),P=Ee(g,a),v=!P&&C,y=Xn(a,f,g),{areTenantIdsInSync:E}=Yn();p.useEffect(()=>{E&&t(Cn(u,v))},[u,t,v,E]);const w=h(b=>In(b,v)),F=w.fetchState==="Not-Started"||w.fetchState==="In-Progress"||u==null,z=xn(a),L=!!a.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,O=b=>{n(b)};return o.jsxs(Pt,{children:[o.jsx(_,{isAppContentDrawerOpen:i,handleDrawerToggle:O}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(et,{myProfileView:w,isAccountingClassesEnabled:C,isReimbursementDisabled:L===!1,isZeniAccountsDisabled:m===!1,isChargeCardDisabled:y===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:z===!1,onClickMenuIcon:()=>{O(!0)},isLoading:F,isBankingOnlyTenant:P,isCardsOnlyTenant:I,onAddressClick:b=>{const D=function(x,U){let k=`/${x}/settings/my_profile`;return k=k.concat(`/new/${U}`),k}(c,b),S=nt(r.state?.pathnameStackToGoBack,r.pathname);s(D,{state:{pathnameStackToGoBack:S}})},onGetOtp:b=>{const D={...w.myProfileLocalData,phone:b};t(de({localData:D})),t(wn(b,"MyProfile"))},onResendOtp:b=>{t(vn(b,"MyProfile"))},onCancelClick:()=>{t(An())},onSaveClick:()=>{t(ue("MyProfile",w.myProfileLocalData.phone,w.myProfileLocalData.otpChallenge,w.myProfileLocalData.dateOfBirth,w.addressData?.addressToCreate))},onVerifyOtp:(b,D)=>{t(En(b,D,"MyProfile"))},onVerifyOtpSuccess:b=>{b!=null&&j.saveZeniOtpToken(b),t(ue("MyProfile",w.myProfileLocalData.phone,w.myProfileLocalData.otpChallenge,w.myProfileLocalData.dateOfBirth,w.addressData?.addressToCreate))},updateMyProfileLocalData:b=>{t(de({localData:b}))}})]})};function Mt(){const e=T(),t=h(l=>M(l)).companyId,s=h(l=>kn(l)),r=h(l=>Ae(l)),i=j.getSignedInUser(),[n,a]=p.useState(!1),c=p.useCallback(l=>{a(l)},[]),u=p.useCallback(l=>{e(jn(l))},[]),d=p.useCallback(()=>{i?.userEmail!=null&&e(Pn({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),m=p.useCallback(()=>{e(Mn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const f=p.useCallback(()=>{const l=r.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(pe(l,t))},[t,r.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=p.useCallback(()=>{e(Dn())},[]);return p.useEffect(()=>{if(r.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const l=r.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(pe(l,t))}},[s.fetchState,t,r.notificationSettings.monthEndInsightsNotificationSettings.enabled,r.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(_,{isAppContentDrawerOpen:n,handleDrawerToggle:c}),o.jsx(tt,{notificationSettingsView:s,onFormDataChange:u,onCancel:d,onSave:m,onClickMenuIcon:()=>{c(!0)},signedInUser:i,onRefresh:f,resetUpdateStatus:g})]})}function pa(e){const[t,s]=p.useState(!1),r=h(l=>Ae(l)),i=h(l=>M(l)),n=K(),a=j.getSignedInUser(),c=T(),{useFeatureGate:u}=ae(),{isFeatureEnabled:d}=u(R.isDebitCardFeatureEnabled),m=a?.userEmail==null||r.fetchState!=="Completed"||Un(r.notificationSettings,a.userEmail,d,i);p.useEffect(()=>{r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"&&t===!1&&(s(!0),c(Tn()))},[r.fetchState,t]);const f=Ee(d,i),g=xe(i);return r.fetchState!=="In-Progress"&&r.fetchState!=="Not-Started"||m!==!0?_n(i)?o.jsxs(J,{children:[Rn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"accounting/*",element:o.jsx(mt,{})}),Bn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"approval_rules/*",element:o.jsx(Dt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Fn(i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"my_bank_connections",element:o.jsx(jt,{})}),On(i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"bank_connections",element:o.jsx(Ct,{})}),Vn(i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"business_verification",element:o.jsx(ct,{productType:f?"zeni_accounts":g?"charge_cards":it(i,n?.loggedInUserRoleMap)})}),zn(n?.loggedInUserRole??[],i,n?.loggedInUserRoleMap)&&o.jsx(A,{path:"company_details",element:o.jsx(lt,{})}),Ln(n?.loggedInUserRole??[],i)&&o.jsx(A,{path:"billing",element:o.jsx(Et,{})}),Nn(n?.loggedInUserRole??[],d,i)&&o.jsx(A,{path:"integrations",element:o.jsx(vt,{})}),o.jsx(A,{path:"my_profile/new/:addressType",element:o.jsx(me,{appContent:o.jsx(st,{isSubPage:!1})})}),o.jsx(A,{path:"my_profile",element:o.jsx(me,{})}),m&&o.jsx(A,{path:"notifications",element:o.jsx(Mt,{})}),o.jsx(A,{path:"*",element:o.jsx(N,{})})]}):o.jsx(J,{children:o.jsx(A,{path:"*",element:o.jsx(N,{})})}):null}function Dt(e){return o.jsxs(J,{children:[o.jsx(A,{path:"/",element:o.jsx(bt,{})}),o.jsx(A,{path:"bills/approval-rules/*",element:o.jsx(dt,{})}),o.jsx(A,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(ut,{}):o.jsx(N,{})}),o.jsx(A,{path:"*",element:o.jsx(N,{})})]})}export{pa as default};
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-DS8sOLD1.js";import{h as X,g as Y,u as ee,i as $,j as v,N as j,n as W,t as Ye}from"./core-SRRzy8qJ.js";import{bJ as en,co as Ie,PT as ye,eV as V,cA as nn,zu as Q,ze as tn,Q3 as an,Q6 as on,rz as ne,rn as te,l2 as ae,tG as L,Q8 as Ae,ge as Qe,gd as Ge,gc as $e,Q9 as sn,zD as cn,Eo as ke,Ef as _e,Ec as ve,DW as K,Ei as Pe,El as Ee,Er as Te,u8 as we,gt as rn,cv as un,fA as dn,fy as ln,fz as pn,bt as mn,Qa as yn,CW as le,Dy as fn,Qb as gn,bK as Sn,FH as pe,EI as bn,Qc as hn,Qd as Cn,FL as In,FP as An,tz as kn,Kd as _n,Gk as Ce,Hk as me,Qe as vn,Qf as Pn,Qg as En,Qh as We,Qi as Tn,MG as wn,Pg as Dn,MX as Un,Qj as He,D_ as On,MY as Fn,E2 as Vn,Qk as Ve,GG as qe,la as xn,rq as Ke,tI as Bn,bE as je,tU as Re,cy as jn,Ql as Je,fT as Rn,G2 as zn,G6 as Nn,Qm as Ln,Gn as ze,Qn as Mn,Qo as Zn,Qp as Qn,Qq as Gn,gm as $n,AO as Wn,Qr as Hn,AT as qn,AS as Kn}from"./zeni-epic-state-DcKqCCCg.js";import{I as ie,W as oe,U as de,m as De,aQ as J,bC as Xe,z as D,x as se,d as U,w as Ue,f as G,bD as Jn,au as ce,bE as x,bF as Xn,bG as Yn,af as Be,bH as et,s as Ne,av as Le,q as nt,y as tt,bI as at,bJ as it,bK as ot,a7 as st}from"./index-BnX1nS7p.js";import{a as C}from"./sentry-B2Aew07S.js";import{n as xe,D as ct,S as rt}from"./mui-DQ-jfgFM.js";import{M as fe}from"./MobileAppDrawer-DChLZMjE.js";import N from"./NotFoundScreen-DRRoMVDk.js";import{a as Me}from"./analyticsHelper-CewoJ3Hu.js";import{d as Ze}from"./routePaths-DyfF54Mg.js";import{B as Fe}from"./BusinessVerificationPageScreen-tq2Pq8-k.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="961f3188-8294-4079-9416-8fac291663b3",e._sentryDebugIdIdentifier="sentry-dbid-961f3188-8294-4079-9416-8fac291663b3")}catch{}})();const ut=xe.div`
1
+ import{j as u}from"./liveblocks-evjZPqs_.js";import{h as X,g as Y,u as ee,i as G,j as v,N as j,n as H,t as Ye}from"./core-DmAftQ4g.js";import{bJ as en,co as Ie,PU as ye,eW as V,cA as nn,zv as Q,zf as tn,Q4 as an,Q7 as on,rA as ne,ro as te,l3 as ae,tH as L,Q9 as Ae,gf as Qe,ge as $e,gd as Ge,Qa as sn,zE as cn,Ep as ke,Eg as _e,Ed as ve,DX as K,Ej as Pe,Em as Ee,Es as Te,u9 as we,gu as rn,cv as un,fB as dn,fz as ln,fA as pn,bt as mn,Qb as yn,CX as le,Dz as fn,Qc as gn,bK as Sn,FI as pe,EJ as bn,Qd as hn,Qe as Cn,FM as In,FQ as An,tA as kn,Ke as _n,Gl as Ce,Hl as me,Qf as vn,Qg as Pn,Qh as En,Qi as He,Qj as Tn,MH as wn,Ph as Dn,MY as Un,Qk as We,D$ as On,MZ as Fn,E3 as Vn,Ql as Ve,GH as qe,lb as Bn,rr as Ke,tJ as xn,bE as je,tV as Re,cy as jn,Qm as Je,fU as Rn,G3 as zn,G7 as Nn,Qn as Ln,Go as ze,Qo as Mn,Qp as Zn,Qq as Qn,Qr as $n,gn as Gn,AP as Hn,Qs as Wn,AU as qn,AT as Kn}from"./zeni-epic-state-vtQ66nN6.js";import{I as ie,W as oe,U as de,m as De,aQ as J,bC as Xe,z as D,x as se,c as U,B as Ue,e as $,bD as Jn,au as ce,bE as B,bF as Xn,bG as Yn,af as xe,bH as et,q as Ne,av as Le,Z as nt,y as tt,bI as at,bJ as it,bK as ot,a7 as st}from"./index-DsVH62ZK.js";import{a as C}from"./sentry-CCZGmBkl.js";import{n as Be,D as ct,S as rt}from"./mui-PcDpEhsm.js";import{M as fe}from"./MobileAppDrawer-BuakBUGx.js";import N from"./NotFoundScreen-AsC21qGx.js";import{a as Me}from"./analyticsHelper-CQXeRvKo.js";import{d as Ze}from"./routePaths-Dq5U7lhs.js";import{B as Fe}from"./BusinessVerificationPageScreen-HLhTZBjl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="35e7d7c4-1760-4d1d-a481-ba4de3040c93",e._sentryDebugIdIdentifier="sentry-dbid-35e7d7c4-1760-4d1d-a481-ba4de3040c93")}catch{}})();const ut=Be.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as u}from"./liveblocks-DS8sOLD1.js";import{h as X,g as Y,u as ee,i as $
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,dt=W(function(e,s){const{isUserBillPayAdmin:t,companyId:a}=s,c=V(e),n=an(e),o=D.getSignedInUser(),l=c.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:l??""},r=on(e,a),p=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",f=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{billPaySetupView:r,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,showIntlWiseWidget:s.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,meetingUrl:"https://meetings.hubspot.com/snehals/demo-bill-pay?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:i}},function(e,s){const{navigate:t,companyId:a,currentTenant:c}=s;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyBillPayInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(Q(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,o)=>{e(we("bill_pay_setup",n,o))},onEstablishConnectionClick:n=>{e(Te(n,a,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,o,l)=>{e(Ee(n,o,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,o)=>{e(Pe(!1,n,"bill_pay","bill_pay_setup",o))},onEstablishConnectionSuccess:()=>{e(Q(a,!0))},onEnableBillPayClick:()=>{e(K(a,"bill_pay"))},onUpdateAccountClick:(n,o,l)=>{e(l==="paymentAccount"?_e(n,o,"bill_pay","bill_pay_setup"):ve("reimbursement_setup",n,o))},onUpdatePrimaryFundingAccount:(n,o)=>{e(ke(a,"bill_pay_setup",n,o))},onEnableBillPaySuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?t("../.."):t("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(cn(a))},onAcceptUpdatedTOSSuccess:()=>{e(Q(a,!0))},onGetOtp:(n,o)=>{e($e(n,"SpendManagementSetup")),o!=null&&e(sn({officerType:o,phone:n}))},onResendOtp:n=>{e(Ge(n,"SpendManagementSetup"))},onVerifyOtp:(n,o)=>{e(Qe(n,o,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,o)=>{n!=null&&o!=null&&e(L(a,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{t("../../dashboard")},onNavigateToSettings:()=>{t("../bills/setup")},onInternationPaymentSetUpClick:()=>{t("../international-wire")},onCompanyOfficerUpdated:(n,o)=>{e(Ae({officerType:n,fileIds:o}))},onSendForVerificationClick:n=>{e(L(a,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,o)=>{e(ne(n,o.split(".")[0]))},onSignUpClick:()=>{s.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Jn),lt=()=>{const e=X(),s=Y(),t=ee(),{tenantEmailDomain:a}=$(),c=ie(),n=en(c?.loggedInUserRoleMap),o=Ie(c?.loggedInUserRoleMap),{useFeatureGate:l,useDynamicConfig:i}=oe(),{isFeatureEnabled:r}=l(de.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:p}=l(de.isBillPayLocalCurrencyFeatureEnabled),f=De(),{configValue:A}=i(J.zeniAccountsConfig),d=ye(A),[y,b]=C.useState(!1),_=C.useRef(!1),[g,S]=C.useState(!1),T=v(E=>E.billPaySetupViewState.fetchState),I=v(E=>V(E)),h=v(E=>E.billPaySetupApproverViewState.fetchState),{isApprovalRulesV3Enabled:w,isLoading:k}=Xe(I?.tenantId),m=I.companyId??D.getSignedInUserTenant(a)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const P=!!I.companyBillPayInfo?.info?.isBillPayTOSAccepted,R=nn(c?.loggedInUserRoleMap);C.useEffect(()=>{_.current||T!=="Not-Started"||m==null?_.current||T!=="Completed"||m==null||I.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(_.current=!0,t(Q(m,!1,!0))):(_.current=!0,t(Q(m,!0)))},[T,m,t]),C.useEffect(()=>{g||h!=="Not-Started"||k||(S(!0),t(tn(!0,!0,w)))},[g,h,k,w,t]);const F=E=>{b(E)};if(P===!1||R&&!c?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(j,{to:"../promo"});if(P===!0&&c?.loggedInUserRoleMap!=null){const E=z=>z.trackPageLoaded(G.Event.billPaySetup);return u.jsxs(ut,{children:[u.jsx(se,{analytics:U,onLoad:z=>E(z)}),u.jsx(fe,{isAppContentDrawerOpen:y,handleDrawerToggle:F}),u.jsx(dt,{navigate:e,location:s,companyId:m,currentTenant:I,isUserBillPayAdmin:n,showIntlWiseWidget:r,onClickMenuIcon:()=>{F(!0)},hasZeniAccountsAdminAccess:o,accountsPromoConfig:d,isLocalCurrencyEnabled:p})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})},Zt=(e,s)=>e!=null&&function(t){return t==="debit"||t==="credit"||t==="debit_and_credit"}(e)?e:s,Qt=e=>`/${e}/cards`,Gt=e=>`/${e}/cards/setup`,$t=e=>`/${e}/cards/onboard`,Wt=(e,s,t,a,c=!1)=>{let n=`/${e}/cards/${encodeURIComponent(s)}`;return a==null||a.status.code!=="inactive"||a.cardHolderUserId!==t.userId||a.type.code!=="business_physical_credit_card"&&a.type.code!=="business_physical_debit_card"?a!=null&&a.status.code==="active"&&a.cardHolderUserId===t.userId&&a.type.code==="business_physical_credit_card"&&c===!0?n+="/addToWallet":a==null||a.type.code!=="business_physical_debit_card"&&a.type.code!=="business_virtual_debit_card"||a.status.code!=="active"||a.cardHolderUserId!==t.userId||a.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},Ht=(e,s)=>e.find(t=>t.id===s),qt=(e,s,t)=>!e||!s||t.fetchState==="Completed",pt=(e,s,t,a)=>({isCreditCardOffered:e,isDebitCardOffered:s,isDebitCardEnabled:t,isCreditCardEnabled:a}),Kt=(e,s)=>e?{creditCardCashbackOffer:`${s.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${s.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:x(s.cashbackSummary.cashbackEarned.amount),redeemedCashback:x(s.cashbackSummary.cashbackRedeemed.amount),availableCashback:x(s.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:s.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:s.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Jt=(e,s,t,a,c)=>e&&s&&t?{creditAccountId:a.id,creditAccountLimit:x(a.limit.amount),creditAccountAvailableAmount:x(a.available.amount),creditAccountSpentAmount:x(a.balance.amount+a.hold.amount),creditAccountStatus:a.status,outstandingBalance:x(c.remainingAmountDue.amount)}:void 0,Xt=(e,s,t,a,c)=>e&&s&&t?{debitAccountId:a.depositAccounts.map(n=>n.id),debitAccountName:a.depositAccounts.map(n=>n.accountName),debitAccountBalance:a.depositAccounts.map(n=>x(n.accountBalance.available.amount)),debitCardsSpend:x(c?.currentMonthSpends.amount??0),debitAccountStatus:a.depositAccounts.map(n=>n.accountStatus)}:void 0,Yt=(e,s)=>e&&s.depositAccountLimit!=null&&s.chargeCard!=null?{debitAccountId:s.depositAccountLimit.id,debitAccountName:s.depositAccountLimit?.accountName??s.connectedAccount?.accountName,debitAccountBalance:x(s.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:x(s.chargeCard.limit.amount-s.chargeCard.available.amount),debitAccountStatus:s.depositAccountLimit?.accountStatus??s.connectedAccount?.accountStatus}:void 0,ea=80,na=80,ta=e=>e.companyId??D.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,mt=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:s})=>s||e,yt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:s,isBookKeepingTenant:t,isDebitCardProductVisible:a,chargeCardsCreditAccountLimit:c})=>(e||s||t)&&(!a||c>0),aa=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:s,isBookKeepingTenant:t})=>e||s||t,ia=({cardInfo:e,isProductVisible:s,isTOSAccepted:t,isSetupEnabled:a,isUserHasCardsAdminLevelAccess:c,isUserHasCardsAccess:n})=>!!e&&s&&(!t&&c||n&&!c&&!a),ft=W(function(e,s){const{isUserChargeCardAdmin:t,chargeCardSetUpView:a,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n}=s,o=V(e),l=D.getSignedInUser(),i=o.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},p=t&&a.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&a.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",f=!!o.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{chargeCardSetUpView:a,connectedAccountProvider:o.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,isDisabled:p,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:r}},function(e,s){const{navigate:t,companyId:a,currentTenant:c,chargeCardSetUpView:n,isDebitCardTOSAccepted:o,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:i,isDebitCardSetupEnabled:r,productInformation:p,controllerEmails:f,businessVerificationStatus:A}=s;return{onBusinessVerificationSectionClick:()=>{U.trackCardsVerifyIdentityCompanyDetailsClick(f,p,A?.code),t("../verification"),c?.company?.companyChargeCardInfo!=null&&c.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(a,!1,!0))},onCardPolicySectionClick:()=>{t("../policy")},onFetchLinkTokenClick:(d,y)=>{e(we("charge_card_setup",d,y))},onEstablishConnectionClick:d=>{e(Te(d,a,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,y,b)=>{e(Ee(d,y,"charge_cards","charge_card_setup",b))},onUpdatePaymentAccountLoginStatus:(d,y)=>{e(Pe(!1,d,"charge_cards","charge_card_setup",y))},onEstablishConnectionSuccess:()=>{e(le(a,!0))},onEnableChargeCardClick:()=>{U.trackCardsEnableCardsClick(f,p,"Cards Card Setup"),l===!0&&o===!0&&i===!1&&r===!1?e(K(a,"charge_cards__debit_cards")):l===!0&&i===!1?e(K(a,"charge_cards")):o===!0&&r===!1&&e(K(a,"debit_cards"))},onUpdateChargeCardClick:(d,y,b)=>{const _=n.allBankAccounts.find(S=>S.accountId===n.primaryFundingAccount?.zeniAccountId),g=n.allBankAccounts.find(S=>S.accountId===d);U.trackCardsZeniCashAccountChangeClick(f,p,{oldZeniCashAccount:_?.accountName??"",newZeniCashAccount:g?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex(S=>S.accountId===n.primaryFundingAccount?.zeniAccountId)+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex(S=>S.accountId===d)+1,numberOfCashAccounts:n.allBankAccounts.length}),e(b==="paymentAccount"?_e(d,y,"charge_cards","charge_card_setup"):ve("charge_card_setup",d,y))},onUpdatePrimaryFundingAccount:(d,y)=>{const b=n.allFundingAccounts.find(S=>S.id===d),_=n.allFundingAccounts.findIndex(S=>S.id===n.primaryFundingAccount?.id)+1,g=n.allFundingAccounts.findIndex(S=>S.id===d)+1;U.trackCardsPaymentAccountChangeClick(f,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:x(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:b?.label??"",newPaymentAccountBalance:x(b?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:b?.accType==="depositAccount",oldPaymentAccountPosition:_,newPaymentAccountPosition:g,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(ke(a,"charge_card_setup",d,y))},onEnableChargeCardSuccess:()=>{e(gn()),t("../",{relative:"path"})},onBackClick:()=>{c?.companyChargeCardInfo?.info?.isChargeCardEnabled||c?.companyDebitCardInfo?.info?.isDebitCardEnabled?t("../",{relative:"path"}):t("../..",{relative:"path"})},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(d,y)=>{e(Ae({officerType:d,fileIds:y}))},onSendForVerificationClick:d=>{l===!0&&o===!0?e(L(a,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(L(a,d,"charge_cards",!0,!0,!0)):o===!0&&e(L(a,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]))},onSignUpClick:()=>{s.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onUpdateAutoPayClick:d=>{e(fn(a,d))}}})(Xn),gt=()=>{const e=X(),s=Y(),t=ee(),{tenantEmailDomain:a}=$(),c=ie(),n=v(M=>V(M)),{useDynamicConfig:o,useFeatureGate:l}=oe(),i=s.state?.pathnameStackToGoBack?.[0],{configValue:r}=o(J.zeniAccountsConfig),{configValue:p}=o(J.zeniCardsConfig),f=p.credit_card_auto_pay_threshold_by_company_id?.[n.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:A}=l(de.isDebitCardFeatureEnabled),{isFeatureEnabled:d}=l(de.isChargeCardFeatureEnabled),{isFeatureEnabled:y}=l(de.isEarlyPayFeatureEnabled),b=v(M=>rn(M,n.companyId)),_=un(b.controllers),g=!!n.company?.companyChargeCardInfo.isChargeCardEnabled,S=!!n.company?.companyDebitCardInfo.isDebitCardEnabled,T=dn(A,n),I=mt({isDebitCardFeatureEnabled:A,isBankingOnlyTenant:T}),h=ln(n),w=pn(n),k=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,m=yt({isCardsOnlyTenant:h,isChargeCardFeatureEnabled:d,isBookKeepingTenant:w,isDebitCardProductVisible:I,chargeCardsCreditAccountLimit:k}),P=I&&m===!1,R=I===!1&&m,F=ye(r),E=mn(c?.loggedInUserRoleMap),z=Ie(c?.loggedInUserRoleMap),[H,ge]=C.useState(!1),[q,re]=C.useState(!1),Z=v(M=>M.chargeCardSetupViewState.fetchState),B=D.getSignedInUserTenant(a)?.companyId??n.companyId,O=D.getSignedInUser(),Oe=M=>{ge(M)},Se=v(M=>yn(M,B));if(O==null)throw Error("Can't access charge card setup page without signing in...");C.useEffect(()=>{q||Z!=="Not-Started"||B==null?q||Z!=="Completed"||B==null||n.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(le(B,!1,!0)):(re(!0),t(le(B,!0)))},[q,Z,B,t]);const be=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,he=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=pt(m,I,S,g);return be||he?be||he?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:U,onLoad:()=>{U.trackPageLoaded(G.Event.cardsSetupVisited),U.trackCardsCardSetupView(_,ue,i==null?"Cards Setup":i.includes("cards/promo")?"Promo":i.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(fe,{isAppContentDrawerOpen:H,handleDrawerToggle:Oe}),u.jsx(ft,{autoPayThreshold:f,navigate:e,location:s,companyId:B,currentTenant:n,isEarlyPayEnabled:y,isChargeCardTOSAccepted:be,isDebitCardTOSAccepted:he,isUserChargeCardAdmin:E,isDebitCardOnlyEnabled:P,isCreditCardOnlyEnabled:R,chargeCardSetUpView:Se,isCreditCardProductVisible:m,isDebitCardFeatureEnabled:I,isChargeCardSetupEnabled:g,isDebitCardSetupEnabled:S,businessVerificationStatus:n.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:_,productInformation:ue,onClickMenuIcon:()=>{Oe(!0)},hasZeniAccountsAdminAccess:z,accountsPromoConfig:F})]}):u.jsx(Ue,{fetchState:"Not-Started"}):u.jsx(j,{to:"../promo"})},St=xe.div`
9
+ `,dt=H(function(e,s){const{isUserBillPayAdmin:t,companyId:a}=s,c=V(e),n=an(e),o=D.getSignedInUser(),l=c.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:l??""},r=on(e,a),p=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",f=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{billPaySetupView:r,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,showIntlWiseWidget:s.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,meetingUrl:"https://meetings.hubspot.com/snehals/demo-bill-pay?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:i}},function(e,s){const{navigate:t,companyId:a,currentTenant:c}=s;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyBillPayInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(Q(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,o)=>{e(we("bill_pay_setup",n,o))},onEstablishConnectionClick:n=>{e(Te(n,a,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,o,l)=>{e(Ee(n,o,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,o)=>{e(Pe(!1,n,"bill_pay","bill_pay_setup",o))},onEstablishConnectionSuccess:()=>{e(Q(a,!0))},onEnableBillPayClick:()=>{e(K(a,"bill_pay"))},onUpdateAccountClick:(n,o,l)=>{e(l==="paymentAccount"?_e(n,o,"bill_pay","bill_pay_setup"):ve("reimbursement_setup",n,o))},onUpdatePrimaryFundingAccount:(n,o)=>{e(ke(a,"bill_pay_setup",n,o))},onEnableBillPaySuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?t("../.."):t("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(cn(a))},onAcceptUpdatedTOSSuccess:()=>{e(Q(a,!0))},onGetOtp:(n,o)=>{e(Ge(n,"SpendManagementSetup")),o!=null&&e(sn({officerType:o,phone:n}))},onResendOtp:n=>{e($e(n,"SpendManagementSetup"))},onVerifyOtp:(n,o)=>{e(Qe(n,o,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,o)=>{n!=null&&o!=null&&e(L(a,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{t("../../dashboard")},onNavigateToSettings:()=>{t("../bills/setup")},onInternationPaymentSetUpClick:()=>{t("../international-wire")},onCompanyOfficerUpdated:(n,o)=>{e(Ae({officerType:n,fileIds:o}))},onSendForVerificationClick:n=>{e(L(a,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,o)=>{e(ne(n,o.split(".")[0]))},onSignUpClick:()=>{s.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Jn),lt=()=>{const e=X(),s=Y(),t=ee(),{tenantEmailDomain:a}=G(),c=ie(),n=en(c?.loggedInUserRoleMap),o=Ie(c?.loggedInUserRoleMap),{useFeatureGate:l,useDynamicConfig:i}=oe(),{isFeatureEnabled:r}=l(de.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:p}=l(de.isBillPayLocalCurrencyFeatureEnabled),f=De(),{configValue:A}=i(J.zeniAccountsConfig),d=ye(A),[y,b]=C.useState(!1),_=C.useRef(!1),[g,S]=C.useState(!1),T=v(E=>E.billPaySetupViewState.fetchState),I=v(E=>V(E)),h=v(E=>E.billPaySetupApproverViewState.fetchState),{isApprovalRulesV3Enabled:w,isLoading:k}=Xe(I?.tenantId),m=I.companyId??D.getSignedInUserTenant(a)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const P=!!I.companyBillPayInfo?.info?.isBillPayTOSAccepted,R=nn(c?.loggedInUserRoleMap);C.useEffect(()=>{_.current||T!=="Not-Started"||m==null?_.current||T!=="Completed"||m==null||I.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(_.current=!0,t(Q(m,!1,!0))):(_.current=!0,t(Q(m,!0)))},[T,m,t]),C.useEffect(()=>{g||h!=="Not-Started"||k||(S(!0),t(tn(!0,!0,w)))},[g,h,k,w,t]);const F=E=>{b(E)};if(P===!1||R&&!c?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(j,{to:"../promo"});if(P===!0&&c?.loggedInUserRoleMap!=null){const E=z=>z.trackPageLoaded($.Event.billPaySetup);return u.jsxs(ut,{children:[u.jsx(se,{analytics:U,onLoad:z=>E(z)}),u.jsx(fe,{isAppContentDrawerOpen:y,handleDrawerToggle:F}),u.jsx(dt,{navigate:e,location:s,companyId:m,currentTenant:I,isUserBillPayAdmin:n,showIntlWiseWidget:r,onClickMenuIcon:()=>{F(!0)},hasZeniAccountsAdminAccess:o,accountsPromoConfig:d,isLocalCurrencyEnabled:p})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})},Zt=(e,s)=>e!=null&&function(t){return t==="debit"||t==="credit"||t==="debit_and_credit"}(e)?e:s,Qt=e=>`/${e}/cards`,$t=e=>`/${e}/cards/setup`,Gt=e=>`/${e}/cards/onboard`,Ht=(e,s,t,a,c=!1)=>{let n=`/${e}/cards/${encodeURIComponent(s)}`;return a==null||a.status.code!=="inactive"||a.cardHolderUserId!==t.userId||a.type.code!=="business_physical_credit_card"&&a.type.code!=="business_physical_debit_card"?a!=null&&a.status.code==="active"&&a.cardHolderUserId===t.userId&&a.type.code==="business_physical_credit_card"&&c===!0?n+="/addToWallet":a==null||a.type.code!=="business_physical_debit_card"&&a.type.code!=="business_virtual_debit_card"||a.status.code!=="active"||a.cardHolderUserId!==t.userId||a.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},Wt=(e,s)=>e.find(t=>t.id===s),qt=(e,s,t)=>!e||!s||t.fetchState==="Completed",pt=(e,s,t,a)=>({isCreditCardOffered:e,isDebitCardOffered:s,isDebitCardEnabled:t,isCreditCardEnabled:a}),Kt=(e,s)=>e?{creditCardCashbackOffer:`${s.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${s.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:B(s.cashbackSummary.cashbackEarned.amount),redeemedCashback:B(s.cashbackSummary.cashbackRedeemed.amount),availableCashback:B(s.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:s.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:s.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Jt=(e,s,t,a,c)=>e&&s&&t?{creditAccountId:a.id,creditAccountLimit:B(a.limit.amount),creditAccountAvailableAmount:B(a.available.amount),creditAccountSpentAmount:B(a.balance.amount+a.hold.amount),creditAccountStatus:a.status,outstandingBalance:B(c.remainingAmountDue.amount)}:void 0,Xt=(e,s,t,a,c)=>e&&s&&t?{debitAccountId:a.depositAccounts.map(n=>n.id),debitAccountName:a.depositAccounts.map(n=>n.accountName),debitAccountBalance:a.depositAccounts.map(n=>B(n.accountBalance.available.amount)),debitCardsSpend:B(c?.currentMonthSpends.amount??0),debitAccountStatus:a.depositAccounts.map(n=>n.accountStatus)}:void 0,Yt=(e,s)=>e&&s.depositAccountLimit!=null&&s.chargeCard!=null?{debitAccountId:s.depositAccountLimit.id,debitAccountName:s.depositAccountLimit?.accountName??s.connectedAccount?.accountName,debitAccountBalance:B(s.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:B(s.chargeCard.limit.amount-s.chargeCard.available.amount),debitAccountStatus:s.depositAccountLimit?.accountStatus??s.connectedAccount?.accountStatus}:void 0,ea=80,na=80,ta=e=>e.companyId??D.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,mt=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:s})=>s||e,yt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:s,isBookKeepingTenant:t,isDebitCardProductVisible:a,chargeCardsCreditAccountLimit:c})=>(e||s||t)&&(!a||c>0),aa=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:s,isBookKeepingTenant:t})=>e||s||t,ia=({cardInfo:e,isProductVisible:s,isTOSAccepted:t,isSetupEnabled:a,isUserHasCardsAdminLevelAccess:c,isUserHasCardsAccess:n})=>!!e&&s&&(!t&&c||n&&!c&&!a),ft=H(function(e,s){const{isUserChargeCardAdmin:t,chargeCardSetUpView:a,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n}=s,o=V(e),l=D.getSignedInUser(),i=o.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},p=t&&a.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&a.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",f=!!o.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{chargeCardSetUpView:a,connectedAccountProvider:o.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,isDisabled:p,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:r}},function(e,s){const{navigate:t,companyId:a,currentTenant:c,chargeCardSetUpView:n,isDebitCardTOSAccepted:o,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:i,isDebitCardSetupEnabled:r,productInformation:p,controllerEmails:f,businessVerificationStatus:A}=s;return{onBusinessVerificationSectionClick:()=>{U.trackCardsVerifyIdentityCompanyDetailsClick(f,p,A?.code),t("../verification"),c?.company?.companyChargeCardInfo!=null&&c.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(a,!1,!0))},onCardPolicySectionClick:()=>{t("../policy")},onFetchLinkTokenClick:(d,y)=>{e(we("charge_card_setup",d,y))},onEstablishConnectionClick:d=>{e(Te(d,a,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,y,b)=>{e(Ee(d,y,"charge_cards","charge_card_setup",b))},onUpdatePaymentAccountLoginStatus:(d,y)=>{e(Pe(!1,d,"charge_cards","charge_card_setup",y))},onEstablishConnectionSuccess:()=>{e(le(a,!0))},onEnableChargeCardClick:()=>{U.trackCardsEnableCardsClick(f,p,"Cards Card Setup"),l===!0&&o===!0&&i===!1&&r===!1?e(K(a,"charge_cards__debit_cards")):l===!0&&i===!1?e(K(a,"charge_cards")):o===!0&&r===!1&&e(K(a,"debit_cards"))},onUpdateChargeCardClick:(d,y,b)=>{const _=n.allBankAccounts.find(S=>S.accountId===n.primaryFundingAccount?.zeniAccountId),g=n.allBankAccounts.find(S=>S.accountId===d);U.trackCardsZeniCashAccountChangeClick(f,p,{oldZeniCashAccount:_?.accountName??"",newZeniCashAccount:g?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex(S=>S.accountId===n.primaryFundingAccount?.zeniAccountId)+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex(S=>S.accountId===d)+1,numberOfCashAccounts:n.allBankAccounts.length}),e(b==="paymentAccount"?_e(d,y,"charge_cards","charge_card_setup"):ve("charge_card_setup",d,y))},onUpdatePrimaryFundingAccount:(d,y)=>{const b=n.allFundingAccounts.find(S=>S.id===d),_=n.allFundingAccounts.findIndex(S=>S.id===n.primaryFundingAccount?.id)+1,g=n.allFundingAccounts.findIndex(S=>S.id===d)+1;U.trackCardsPaymentAccountChangeClick(f,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:B(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:b?.label??"",newPaymentAccountBalance:B(b?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:b?.accType==="depositAccount",oldPaymentAccountPosition:_,newPaymentAccountPosition:g,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(ke(a,"charge_card_setup",d,y))},onEnableChargeCardSuccess:()=>{e(gn()),t("../",{relative:"path"})},onBackClick:()=>{c?.companyChargeCardInfo?.info?.isChargeCardEnabled||c?.companyDebitCardInfo?.info?.isDebitCardEnabled?t("../",{relative:"path"}):t("../..",{relative:"path"})},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(d,y)=>{e(Ae({officerType:d,fileIds:y}))},onSendForVerificationClick:d=>{l===!0&&o===!0?e(L(a,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(L(a,d,"charge_cards",!0,!0,!0)):o===!0&&e(L(a,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]))},onSignUpClick:()=>{s.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onUpdateAutoPayClick:d=>{e(fn(a,d))}}})(Xn),gt=()=>{const e=X(),s=Y(),t=ee(),{tenantEmailDomain:a}=G(),c=ie(),n=v(M=>V(M)),{useDynamicConfig:o,useFeatureGate:l}=oe(),i=s.state?.pathnameStackToGoBack?.[0],{configValue:r}=o(J.zeniAccountsConfig),{configValue:p}=o(J.zeniCardsConfig),f=p.credit_card_auto_pay_threshold_by_company_id?.[n.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:A}=l(de.isDebitCardFeatureEnabled),{isFeatureEnabled:d}=l(de.isChargeCardFeatureEnabled),{isFeatureEnabled:y}=l(de.isEarlyPayFeatureEnabled),b=v(M=>rn(M,n.companyId)),_=un(b.controllers),g=!!n.company?.companyChargeCardInfo.isChargeCardEnabled,S=!!n.company?.companyDebitCardInfo.isDebitCardEnabled,T=dn(A,n),I=mt({isDebitCardFeatureEnabled:A,isBankingOnlyTenant:T}),h=ln(n),w=pn(n),k=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,m=yt({isCardsOnlyTenant:h,isChargeCardFeatureEnabled:d,isBookKeepingTenant:w,isDebitCardProductVisible:I,chargeCardsCreditAccountLimit:k}),P=I&&m===!1,R=I===!1&&m,F=ye(r),E=mn(c?.loggedInUserRoleMap),z=Ie(c?.loggedInUserRoleMap),[W,ge]=C.useState(!1),[q,re]=C.useState(!1),Z=v(M=>M.chargeCardSetupViewState.fetchState),x=D.getSignedInUserTenant(a)?.companyId??n.companyId,O=D.getSignedInUser(),Oe=M=>{ge(M)},Se=v(M=>yn(M,x));if(O==null)throw Error("Can't access charge card setup page without signing in...");C.useEffect(()=>{q||Z!=="Not-Started"||x==null?q||Z!=="Completed"||x==null||n.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(le(x,!1,!0)):(re(!0),t(le(x,!0)))},[q,Z,x,t]);const be=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,he=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=pt(m,I,S,g);return be||he?be||he?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:U,onLoad:()=>{U.trackPageLoaded($.Event.cardsSetupVisited),U.trackCardsCardSetupView(_,ue,i==null?"Cards Setup":i.includes("cards/promo")?"Promo":i.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(fe,{isAppContentDrawerOpen:W,handleDrawerToggle:Oe}),u.jsx(ft,{autoPayThreshold:f,navigate:e,location:s,companyId:x,currentTenant:n,isEarlyPayEnabled:y,isChargeCardTOSAccepted:be,isDebitCardTOSAccepted:he,isUserChargeCardAdmin:E,isDebitCardOnlyEnabled:P,isCreditCardOnlyEnabled:R,chargeCardSetUpView:Se,isCreditCardProductVisible:m,isDebitCardFeatureEnabled:I,isChargeCardSetupEnabled:g,isDebitCardSetupEnabled:S,businessVerificationStatus:n.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:_,productInformation:ue,onClickMenuIcon:()=>{Oe(!0)},hasZeniAccountsAdminAccess:z,accountsPromoConfig:F})]}):u.jsx(Ue,{fetchState:"Not-Started"}):u.jsx(j,{to:"../promo"})},St=Be.div`
10
10
  display: flex;
11
11
  height: 100%;
12
12
  width: 100%;
@@ -14,11 +14,11 @@ import{j as u}from"./liveblocks-DS8sOLD1.js";import{h as X,g as Y,u as ee,i as $
14
14
  flex-direction: column;
15
15
  align-items: center;
16
16
  background-color: ${e=>e.theme.colors.grey4};
17
- `,bt=W(function(e,s){const{isUserRemiAdmin:t,companyId:a}=s,c=V(e),n=hn(e),o=Cn(e,a),l=D.getSignedInUser(),i=c.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},p=t&&o.updateStatus.fetchState!=="In-Progress"&&o.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&o.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&o.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",f=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{remiSetupView:o,isDisabled:p,remiApprovalView:n,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:r}},function(e,s){const{navigate:t,companyId:a,currentTenant:c}=s;return{updateMileageDetails:n=>{const{mileageAmount:o,mileageUnit:l,mileageCurrencyCode:i,mileageCurrencySymbol:r,denomination:p,denominationSymbol:f,mileageAmountInDenomination:A,description:d}=n;e(An({mileageDetails:{mileageUnitAmount:{amount:o,currencyCode:i,currencySymbol:r},denomination:p,denominationSymbol:f,mileageAmountInDenomination:A,mileageCurrencyCode:i,mileageCurrencySymbol:r,mileageUnit:l,description:d}}))},onSaveMileageClick:n=>{e(In(a)),U.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyReimbursementInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,o)=>{e(we("reimbursement_setup",n,o))},onEstablishConnectionClick:n=>{e(Te(n,a,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,o,l)=>{e(Ee(n,o,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,o)=>{e(Pe(!1,n,"reimbursement","reimbursement_setup",o))},onEstablishConnectionSuccess:()=>{e(pe(a,!0))},onEnableRemiClick:()=>{e(K(a,"reimbursement"))},onUpdateAccountClick:(n,o,l)=>{e(l==="paymentAccount"?_e(n,o,"reimbursement","reimbursement_setup"):ve("reimbursement_setup",n,o))},onEnableRemiSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&c.companyReimbursementInfo.info.isReimbursementEnabled===!1?t("../.."):t("../",{relative:"path"})},onCompanyOfficerUpdated:(n,o)=>{e(Ae({officerType:n,fileIds:o}))},onSendForVerificationClick:n=>{e(L(a,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,o)=>{e(ne(n,o.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,o)=>{e(ke(a,"reimbursement_setup",n,o))},onSignUpClick:()=>{s.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Yn),ht=()=>{const e=X(),s=Y(),t=ee(),{tenantEmailDomain:a}=$(),c=ie(),{useDynamicConfig:n}=oe(),o=De(),{configValue:l}=n(J.zeniAccountsConfig),i=ye(l),r=Sn(c?.loggedInUserRoleMap),p=Ie(c?.loggedInUserRoleMap),[f,A]=C.useState(!1),d=C.useRef(!1),[y,b]=C.useState(!1),_=v(m=>m.remiSetupViewState.fetchState),g=v(m=>V(m)),S=v(m=>m.remiSetupApproverViewState.fetchState),{isApprovalRulesV3Enabled:T,isLoading:I}=Xe(g?.tenantId),h=D.getSignedInUserTenant(a)?.companyId??g.companyId,w=D.getSignedInUser(),k=m=>{A(m)};if(w==null)throw Error("Can't access reimbursement setup page without signing in...");if(C.useEffect(()=>{d.current||_!=="Not-Started"||h==null?d.current||_!=="Completed"||h==null||g.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(d.current=!0,t(pe(h,!1,!0))):(d.current=!0,t(pe(h,!0)))},[_,h,t]),C.useEffect(()=>{y||S!=="Not-Started"||I||(b(!0),t(bn(!0,!1,!1,T)))},[y,S,I,T,t]),g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(j,{to:"../promo"});if(g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const m=P=>P.trackPageLoaded(G.Event.reimbursementSetup);return u.jsxs(St,{children:[u.jsx(se,{analytics:U,onLoad:P=>m(P)}),u.jsx(fe,{isAppContentDrawerOpen:f,handleDrawerToggle:k}),u.jsx(bt,{navigate:e,location:s,companyId:h,currentTenant:g,isUserRemiAdmin:r,onClickMenuIcon:()=>{k(!0)},hasZeniAccountsAdminAccess:p,accountsPromoConfig:i})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:o.colors.grey5}})},Ct=W(function(e,s){const{businessVerificationDetails:t,productType:a}=s,c=V(e),n=D.getSignedInUser(),o=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""},i=wn(s.roleMap)&&t.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",r=Dn(e.companyConfigState),p=Un(e.userRoleConfigState),f=a==="zeni_treasury"?He(e):void 0;return{businessVerificationDetails:t,verficationDetailsFetchState:t.fetchState,isRefreshingViewInBackground:t.isRefreshingViewInBackground,allNationalityCountries:t.allNationalityCountries,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:i,allIndustries:r.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:f}},function(e,s){const{companyId:t,productType:a,currentTenant:c,navigate:n,location:o}=s,{tenantEmailDomain:l}=c;return{onCompanyDetailsChanged:i=>{const{companyDescription:r,companyIndustry:p,companyIndustryType:f,companyLegalName:A,companyTaxId:d,companyWebsite:y,companyPhone:b,primaryContactEmail:_,primaryContactName:g,primaryContactUserId:S,primaryContactSyncToken:T,syncToken:I,fileIds:h,incDate:w,typeOfIncorporation:k,stateOfIncorporation:m,sourceOfFunds:P,companySubIndustry:R,countriesOfOperations:F,companySourceOfFunds:E,companySourceOfFundsDescription:z,transactionVolume:H,transactionVolumeDescription:ge,purposeOfAccount:q,purposeOfAccountDescription:re,regulatedStatus:Z,regulatedStatusDescription:B,usNexus:O,usNexusTypes:Oe}=i,Se=f?.selectedOption,be={companyId:t,companyDescription:r,companyIndustry:p.selectedOption,companyIndustryType:Se==null||Se===""?void 0:Se,companyLegalName:A,taxIdOrEIN:d,website:y!=""&&y!=null?jn(y):void 0,phone:b,syncToken:I,fileIds:h,incDate:w!=null?je(w?.toString()):w,typeOfIncorporation:k?.selectedOption??"",stateOfIncorporation:m?.selectedOption??"",sourceOfFunds:P?.selectedOption??"",companySubIndustry:R?.selectedOption??"",countriesOfOperations:F?.selectedOptions.map(ue=>ue.length===2?ue:Le(ue))??[],companySourceOfFunds:E?.selectedOption??"",companySourceOfFundsDescription:z,transactionVolume:H?.selectedOption??"",transactionVolumeDescription:ge,purposeOfAccount:q?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:Z??"",regulatedStatusDescription:B,usNexus:O,usNexusTypes:Oe?.selectedOptions??[]},he={userId:S,firstName:g.firstName,lastName:g.lastName,email:_,syncToken:T};e(Re({companyDetails:be,primaryContactDetails:he}))},onCompanyOfficerUpdated:i=>{const r=i.map(p=>{const{officerType:f,userId:A,name:d,email:y,nationalityCountryCode:b,ssn:_,dob:g,phone:S,syncToken:T,selectDocument:I,role:h,ownership:w,isSelectedForVerification:k,userVerificationStatus:m,treasuryUserVerificationStatus:P,fileIds:R}=p;let F;return I.selectDocumentType==="driverLicense"?F="driving_license":I.selectDocumentType==="passport"?F="passport":I.selectDocumentType==="stateId"?F="id_document":I.selectDocumentType==="ssnCard"&&(F="social_security_card"),{officerType:f,userId:A,firstName:d.firstName,lastName:d.lastName,email:y,ssn:_,nationalityCountryCode:b?.selectedOption!=null?Le(b.selectedOption):void 0,phone:S,birthday:g!=null?je(g?.toString()):g,syncToken:T,titleAtCompany:h.selectedOption,ownershipInCompany:w,documentTypeSelectedForVerification:F,isSelectedForVerification:k,userVerificationStatus:m,treasuryUserVerificationStatus:P,fileIds:R,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(Re({officers:r}))},onSaveDetailsClick:i=>{e(L(t,i,a))},onSendForVerificationClick:i=>{e(L(t,i,a,!0))},onAddressClick:i=>{const r=Ze(l,i),p=Ne(o.state?.pathnameStackToGoBack,o.pathname),f=new URLSearchParams(o.search),A={};f.forEach((d,y)=>{A[y]=d}),n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(A).length>0?A:void 0}})},onRegisteredAddressClick:i=>{const r=Ze(l,i),p=Ne(o.state?.pathnameStackToGoBack,o.pathname),f=new URLSearchParams(o.search),A=Object.fromEntries(f.entries());n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(A).length>0?A:void 0}})},onBackClick:()=>{e(Bn({companyId:t})),n("../setup")},updateFilesEntity:i=>{e(ae({files:i}))},onDeleteFile:i=>{e(te(i))},onDeleteFileList:i=>{e(Ke(i))},onEditFileName:(i,r)=>{e(ne(i,r.split(".")[0]))},onGetOtp:i=>{e($e(i,"SpendManagementSetup"))},onResendOtp:i=>{e(Ge(i,"SpendManagementSetup"))},onVerifyOtp:(i,r)=>{e(Qe(i,r,"SpendManagementSetup"))},saveNewAddressInLocalStore:(i,r)=>{e(xn({addressType:i,addressToCreate:r}))},onExecuteTreasuryTransfer:()=>{e(qe())},onOverlayClose:()=>{e(Ve())},onIdentityDocumentUploadedForAutofill:i=>{if(t==null)return;const r=Fn(i.documentType);r!=null&&e(Vn({target:"setup",companyId:t,officerType:i.officerType,fileId:i.fileId,documentType:r}))},onCompanyDocumentUploadedForAutofill:i=>{t!=null&&e(On({target:"setup",companyId:t,fileId:i.fileId,documentType:i.documentType}))}}})(et),It=({productType:e,isBusinessVerificationDrawerOpen:s,closeDrawerHandler:t})=>{const a=X(),c=Y(),n=ee(),[o]=Ye(),l=o.get("showStepProgress"),i=o.get("isTransferInitiated"),[r,p]=C.useState(!1),{tenantEmailDomain:f}=$(),A=ie(),{useDynamicConfig:d}=oe(),y=De(),{configValue:b}=d(J.zeniAccountsConfig),_=ye(b),g=v(m=>{switch(e){case"zeni_accounts":return m.zeniAccountSetupViewState.fetchState;case"reimbursement":return m.remiSetupViewState.fetchState;case"charge_cards":return m.chargeCardSetupViewState.fetchState;case"zeni_treasury":return m.treasurySetupViewState.fetchState;default:return m.billPaySetupViewState.fetchState}}),S=v(m=>m.companyConfigState.fetchState),T=v(m=>m.userRoleConfigState.fetchState),I=v(m=>V(m)),h=I.companyId??D.getSignedInUserTenant(f)?.companyId;if(C.useEffect(()=>{S==="Not-Started"&&n(kn()),T==="Not-Started"&&n(_n(!0))},[S,T,n]),C.useEffect(()=>{if(!r&&g==="Not-Started"&&h!=null)switch(p(!0),e){case"zeni_accounts":n(me(h,!0));break;case"zeni_treasury":n(Ce(h,!0));break;case"reimbursement":n(pe(h,!0));break;case"charge_cards":n(le(h,!0));break;default:n(Q(h,!0))}},[r,g,h,n]),D.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let w;switch(e){case"zeni_accounts":w=I.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":w=I.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":w=I.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||I.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":w=I.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:w=I.companyBillPayInfo?.info?.isBillPayTOSAccepted}const k=v(m=>{let P;switch(e){case"zeni_accounts":P=Tn(m,h);break;case"zeni_treasury":P=We(m,h);break;case"charge_cards":P=En(m,h);break;case"reimbursement":P=Pn(m,h);break;default:P=vn(m,h)}return P});return w===!1?null:k.fetchState==="Completed"&&w===!0&&A?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:U,onLoad:m=>(P=>{switch(e){case"zeni_accounts":return P.trackPageLoaded(G.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return P.trackPageLoaded(G.Event.reimbursementBusinessVerification);default:return P.trackPageLoaded(G.Event.billPayBusinessVerification,Be(c)?"Settings":void 0)}})(m)}),u.jsx(Ct,{businessVerificationDetails:k,navigate:a,location:c,companyId:h,analytics:U,currentTenant:I,productType:e,roleMap:A.loggedInUserRoleMap,isSettings:Be(c),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:i!=null,onClickMenuIcon:()=>{},maxInsuredAmount:_.maxInsuredAmount,isBusinessVerificationDrawerOpen:s,closeDrawerHandler:t})]}):u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}})},At={overlayWidth:new tt(100,100,59)},kt=W(function(e,s){const{isUserZeniAccountsAdmin:t,companyId:a,accountsPromoConfig:c}=s,n=V(e),o=D.getSignedInUser(),l=n.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:l??""},r=Je(e,a),p=We(e,a),f=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",A=Ln(e),d=A.transactions,y=He(e),b=A.accountSummary?.totalBalance?.amount,_=d.length===0||b===0;return{treasurySetupView:r,businessVerificationDetails:p,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:d,transferDetails:y,isFirstTransfer:_,isDisabled:f,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:i,isOnSetup:!0,maxInsuredAmount:c.maxInsuredAmount}},function(e,s){const{navigate:t,companyId:a,currentTenant:c,isAllocationDone:n,analytics:o,treasurySetupView:l}=s;return{onTransferSaveChangesToLocalStore:i=>{e(Qn(i))},onBusinessVerificationSectionClick:(i,r)=>{let p="../verification";i&&(p+="?showStepProgress=true",r&&(p+="&isTransferInitiated=true")),t(p),c?.company?.companyTreasuryInfo!=null&&c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(Ce(a,!1,!0))},onFetchLinkTokenClick:(i,r)=>{e(we("treasury_setup",i,r))},onEstablishConnectionClick:i=>{e(Te(i,a,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(i,r,p)=>{e(Ee(i,r,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(i,r)=>{e(Pe(!1,i,"zeni_treasury","treasury_setup",r))},onEstablishConnectionSuccess:()=>{e(Ce(a,!0))},onEnableTreasuryClick:()=>{e(K(a,"zeni_treasury"))},onUpdateTreasuryClick:(i,r,p)=>{e(p==="paymentAccount"?_e(i,r,"zeni_treasury","treasury_setup"):ve("treasury_setup",i,r))},onUpdatePrimaryFundingAccount:(i,r)=>{e(ke(a,"treasury_setup",i,r))},onNavigateToDashboard:()=>{t(c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(i,r)=>{e(Ae({officerType:i,fileIds:r}))},onSendForVerificationClick:(i,r)=>{if(e(L(a,i,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(p.riskScore,Me(p)),e(ze(!1))}r===!0&&e(qe())},updateFilesEntity:i=>{e(ae({files:i}))},onDeleteFile:i=>{e(te(i))},onEditFileName:(i,r)=>{e(ne(i,r.split(".")[0]))},onAdditionalVerificationFieldsChanged:i=>{const{sourceOfFunds:r}=i;e(Zn({sourceOfFunds:r?.selectedOption??""}))},onUpdateFundAllocation:i=>{o.trackTreasuryAllocationAction("update",Me(i)),e(Mn(i))},onConfirmFundAllocation:()=>{e(ze(n))},onSignUpClick:()=>{s.isUserZeniAccountsAdmin?window.open("../checking/promo","_blank","noopener,noreferrer"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank","noopener,noreferrer")},onOverlayClose:()=>{e(Ve())}}})(at),_t=()=>{const e=X(),s=Y(),t=ee(),a=De(),c=nt(),{tenantEmailDomain:n}=$(),{useDynamicConfig:o}=oe(),l=ie(),[i,r]=C.useState(!1),p=Ie(l?.loggedInUserRoleMap),{configValue:f}=o(J.zeniAccountsConfig),A=ye(f),[d,y]=C.useState(!1),[b,_]=C.useState(!1),[g,S]=C.useState(!1),[T,I]=C.useState(!1),[h,w]=C.useState(!1),k=v(O=>O.treasurySetupViewState.fetchState),m=v(O=>O.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),P=v(O=>O.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),R=v(O=>O.treasuryDetailState.transactionsState?.fetchState),F=v(O=>V(O)),E=D.getSignedInUserTenant(n)?.companyId??F.companyId,z=v(O=>Je(O,E)),H=z.isAtomicAccountExists,ge=!!F.companyZeniAccountInfo?.info?.isZeniAccountEnabled,q=D.getSignedInUser(),re=O=>{y(O)};if(q==null)throw Error("Can't access treasury setup page without signing in...");C.useEffect(()=>{b||k!=="Not-Started"||E==null||(_(!0),t(Ce(E,!0,!1)))},[b,k,E,t]),C.useEffect(()=>{g||m!=="Not-Started"||E==null||(S(!0),t(Rn()))},[g,m,E,t]),C.useEffect(()=>{T||P!=="Not-Started"||E==null||(I(!0),t(zn()))},[T,P,E,t]),C.useEffect(()=>{h||R!=="Not-Started"||E==null||(w(!0),t(Nn(!0)))},[h,R,E,t]);const Z=F.companyTreasuryInfo?.info?.businessVerificationStatus?.code,B=Z==="pending_review"||Z==="verified";return C.useEffect(()=>{i||k!=="Completed"||H||B||!s.pathname.includes("setup")||r(!0)},[k,H,B]),F.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(j,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:U,onLoad:()=>{}}),u.jsx(fe,{isAppContentDrawerOpen:d,handleDrawerToggle:re}),u.jsx(ct,{onClose:()=>{t(Ve()),e("../setup")},anchor:"right",open:s.pathname.includes("verification"),transitionDuration:i?0:250,PaperProps:{style:{width:At.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i?"transparent":a.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(vt,{onClick:O=>O.stopPropagation(),children:u.jsx(It,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Ve()),e("../setup")}})})}),u.jsx(kt,{navigate:e,location:s,companyId:E,currentTenant:F,isUserZeniAccountsAdmin:p,accountsPromoConfig:A,isAccountsEnabled:ge,isAllocationDone:H,analytics:U,treasurySetupView:z,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:i,setShowTreasurySetupOverlay:r})]})},vt=xe(rt)`
17
+ `,bt=H(function(e,s){const{isUserRemiAdmin:t,companyId:a}=s,c=V(e),n=hn(e),o=Cn(e,a),l=D.getSignedInUser(),i=c.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},p=t&&o.updateStatus.fetchState!=="In-Progress"&&o.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&o.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&o.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",f=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{remiSetupView:o,isDisabled:p,remiApprovalView:n,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:r}},function(e,s){const{navigate:t,companyId:a,currentTenant:c}=s;return{updateMileageDetails:n=>{const{mileageAmount:o,mileageUnit:l,mileageCurrencyCode:i,mileageCurrencySymbol:r,denomination:p,denominationSymbol:f,mileageAmountInDenomination:A,description:d}=n;e(An({mileageDetails:{mileageUnitAmount:{amount:o,currencyCode:i,currencySymbol:r},denomination:p,denominationSymbol:f,mileageAmountInDenomination:A,mileageCurrencyCode:i,mileageCurrencySymbol:r,mileageUnit:l,description:d}}))},onSaveMileageClick:n=>{e(In(a)),U.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyReimbursementInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,o)=>{e(we("reimbursement_setup",n,o))},onEstablishConnectionClick:n=>{e(Te(n,a,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,o,l)=>{e(Ee(n,o,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,o)=>{e(Pe(!1,n,"reimbursement","reimbursement_setup",o))},onEstablishConnectionSuccess:()=>{e(pe(a,!0))},onEnableRemiClick:()=>{e(K(a,"reimbursement"))},onUpdateAccountClick:(n,o,l)=>{e(l==="paymentAccount"?_e(n,o,"reimbursement","reimbursement_setup"):ve("reimbursement_setup",n,o))},onEnableRemiSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&c.companyReimbursementInfo.info.isReimbursementEnabled===!1?t("../.."):t("../",{relative:"path"})},onCompanyOfficerUpdated:(n,o)=>{e(Ae({officerType:n,fileIds:o}))},onSendForVerificationClick:n=>{e(L(a,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,o)=>{e(ne(n,o.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,o)=>{e(ke(a,"reimbursement_setup",n,o))},onSignUpClick:()=>{s.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Yn),ht=()=>{const e=X(),s=Y(),t=ee(),{tenantEmailDomain:a}=G(),c=ie(),{useDynamicConfig:n}=oe(),o=De(),{configValue:l}=n(J.zeniAccountsConfig),i=ye(l),r=Sn(c?.loggedInUserRoleMap),p=Ie(c?.loggedInUserRoleMap),[f,A]=C.useState(!1),d=C.useRef(!1),[y,b]=C.useState(!1),_=v(m=>m.remiSetupViewState.fetchState),g=v(m=>V(m)),S=v(m=>m.remiSetupApproverViewState.fetchState),{isApprovalRulesV3Enabled:T,isLoading:I}=Xe(g?.tenantId),h=D.getSignedInUserTenant(a)?.companyId??g.companyId,w=D.getSignedInUser(),k=m=>{A(m)};if(w==null)throw Error("Can't access reimbursement setup page without signing in...");if(C.useEffect(()=>{d.current||_!=="Not-Started"||h==null?d.current||_!=="Completed"||h==null||g.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(d.current=!0,t(pe(h,!1,!0))):(d.current=!0,t(pe(h,!0)))},[_,h,t]),C.useEffect(()=>{y||S!=="Not-Started"||I||(b(!0),t(bn(!0,!1,!1,T)))},[y,S,I,T,t]),g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(j,{to:"../promo"});if(g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const m=P=>P.trackPageLoaded($.Event.reimbursementSetup);return u.jsxs(St,{children:[u.jsx(se,{analytics:U,onLoad:P=>m(P)}),u.jsx(fe,{isAppContentDrawerOpen:f,handleDrawerToggle:k}),u.jsx(bt,{navigate:e,location:s,companyId:h,currentTenant:g,isUserRemiAdmin:r,onClickMenuIcon:()=>{k(!0)},hasZeniAccountsAdminAccess:p,accountsPromoConfig:i})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:o.colors.grey5}})},Ct=H(function(e,s){const{businessVerificationDetails:t,productType:a}=s,c=V(e),n=D.getSignedInUser(),o=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""},i=wn(s.roleMap)&&t.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",r=Dn(e.companyConfigState),p=Un(e.userRoleConfigState),f=a==="zeni_treasury"?We(e):void 0;return{businessVerificationDetails:t,verficationDetailsFetchState:t.fetchState,isRefreshingViewInBackground:t.isRefreshingViewInBackground,allNationalityCountries:t.allNationalityCountries,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:i,allIndustries:r.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:f}},function(e,s){const{companyId:t,productType:a,currentTenant:c,navigate:n,location:o}=s,{tenantEmailDomain:l}=c;return{onCompanyDetailsChanged:i=>{const{companyDescription:r,companyIndustry:p,companyIndustryType:f,companyLegalName:A,companyTaxId:d,companyWebsite:y,companyPhone:b,primaryContactEmail:_,primaryContactName:g,primaryContactUserId:S,primaryContactSyncToken:T,syncToken:I,fileIds:h,incDate:w,typeOfIncorporation:k,stateOfIncorporation:m,sourceOfFunds:P,companySubIndustry:R,countriesOfOperations:F,companySourceOfFunds:E,companySourceOfFundsDescription:z,transactionVolume:W,transactionVolumeDescription:ge,purposeOfAccount:q,purposeOfAccountDescription:re,regulatedStatus:Z,regulatedStatusDescription:x,usNexus:O,usNexusTypes:Oe}=i,Se=f?.selectedOption,be={companyId:t,companyDescription:r,companyIndustry:p.selectedOption,companyIndustryType:Se==null||Se===""?void 0:Se,companyLegalName:A,taxIdOrEIN:d,website:y!=""&&y!=null?jn(y):void 0,phone:b,syncToken:I,fileIds:h,incDate:w!=null?je(w?.toString()):w,typeOfIncorporation:k?.selectedOption??"",stateOfIncorporation:m?.selectedOption??"",sourceOfFunds:P?.selectedOption??"",companySubIndustry:R?.selectedOption??"",countriesOfOperations:F?.selectedOptions.map(ue=>ue.length===2?ue:Le(ue))??[],companySourceOfFunds:E?.selectedOption??"",companySourceOfFundsDescription:z,transactionVolume:W?.selectedOption??"",transactionVolumeDescription:ge,purposeOfAccount:q?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:Z??"",regulatedStatusDescription:x,usNexus:O,usNexusTypes:Oe?.selectedOptions??[]},he={userId:S,firstName:g.firstName,lastName:g.lastName,email:_,syncToken:T};e(Re({companyDetails:be,primaryContactDetails:he}))},onCompanyOfficerUpdated:i=>{const r=i.map(p=>{const{officerType:f,userId:A,name:d,email:y,nationalityCountryCode:b,ssn:_,dob:g,phone:S,syncToken:T,selectDocument:I,role:h,ownership:w,isSelectedForVerification:k,userVerificationStatus:m,treasuryUserVerificationStatus:P,fileIds:R}=p;let F;return I.selectDocumentType==="driverLicense"?F="driving_license":I.selectDocumentType==="passport"?F="passport":I.selectDocumentType==="stateId"?F="id_document":I.selectDocumentType==="ssnCard"&&(F="social_security_card"),{officerType:f,userId:A,firstName:d.firstName,lastName:d.lastName,email:y,ssn:_,nationalityCountryCode:b?.selectedOption!=null?Le(b.selectedOption):void 0,phone:S,birthday:g!=null?je(g?.toString()):g,syncToken:T,titleAtCompany:h.selectedOption,ownershipInCompany:w,documentTypeSelectedForVerification:F,isSelectedForVerification:k,userVerificationStatus:m,treasuryUserVerificationStatus:P,fileIds:R,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(Re({officers:r}))},onSaveDetailsClick:i=>{e(L(t,i,a))},onSendForVerificationClick:i=>{e(L(t,i,a,!0))},onAddressClick:i=>{const r=Ze(l,i),p=Ne(o.state?.pathnameStackToGoBack,o.pathname),f=new URLSearchParams(o.search),A={};f.forEach((d,y)=>{A[y]=d}),n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(A).length>0?A:void 0}})},onRegisteredAddressClick:i=>{const r=Ze(l,i),p=Ne(o.state?.pathnameStackToGoBack,o.pathname),f=new URLSearchParams(o.search),A=Object.fromEntries(f.entries());n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(A).length>0?A:void 0}})},onBackClick:()=>{e(xn({companyId:t})),n("../setup")},updateFilesEntity:i=>{e(ae({files:i}))},onDeleteFile:i=>{e(te(i))},onDeleteFileList:i=>{e(Ke(i))},onEditFileName:(i,r)=>{e(ne(i,r.split(".")[0]))},onGetOtp:i=>{e(Ge(i,"SpendManagementSetup"))},onResendOtp:i=>{e($e(i,"SpendManagementSetup"))},onVerifyOtp:(i,r)=>{e(Qe(i,r,"SpendManagementSetup"))},saveNewAddressInLocalStore:(i,r)=>{e(Bn({addressType:i,addressToCreate:r}))},onExecuteTreasuryTransfer:()=>{e(qe())},onOverlayClose:()=>{e(Ve())},onIdentityDocumentUploadedForAutofill:i=>{if(t==null)return;const r=Fn(i.documentType);r!=null&&e(Vn({target:"setup",companyId:t,officerType:i.officerType,fileId:i.fileId,documentType:r}))},onCompanyDocumentUploadedForAutofill:i=>{t!=null&&e(On({target:"setup",companyId:t,fileId:i.fileId,documentType:i.documentType}))}}})(et),It=({productType:e,isBusinessVerificationDrawerOpen:s,closeDrawerHandler:t})=>{const a=X(),c=Y(),n=ee(),[o]=Ye(),l=o.get("showStepProgress"),i=o.get("isTransferInitiated"),[r,p]=C.useState(!1),{tenantEmailDomain:f}=G(),A=ie(),{useDynamicConfig:d}=oe(),y=De(),{configValue:b}=d(J.zeniAccountsConfig),_=ye(b),g=v(m=>{switch(e){case"zeni_accounts":return m.zeniAccountSetupViewState.fetchState;case"reimbursement":return m.remiSetupViewState.fetchState;case"charge_cards":return m.chargeCardSetupViewState.fetchState;case"zeni_treasury":return m.treasurySetupViewState.fetchState;default:return m.billPaySetupViewState.fetchState}}),S=v(m=>m.companyConfigState.fetchState),T=v(m=>m.userRoleConfigState.fetchState),I=v(m=>V(m)),h=I.companyId??D.getSignedInUserTenant(f)?.companyId;if(C.useEffect(()=>{S==="Not-Started"&&n(kn()),T==="Not-Started"&&n(_n(!0))},[S,T,n]),C.useEffect(()=>{if(!r&&g==="Not-Started"&&h!=null)switch(p(!0),e){case"zeni_accounts":n(me(h,!0));break;case"zeni_treasury":n(Ce(h,!0));break;case"reimbursement":n(pe(h,!0));break;case"charge_cards":n(le(h,!0));break;default:n(Q(h,!0))}},[r,g,h,n]),D.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let w;switch(e){case"zeni_accounts":w=I.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":w=I.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":w=I.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||I.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":w=I.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:w=I.companyBillPayInfo?.info?.isBillPayTOSAccepted}const k=v(m=>{let P;switch(e){case"zeni_accounts":P=Tn(m,h);break;case"zeni_treasury":P=He(m,h);break;case"charge_cards":P=En(m,h);break;case"reimbursement":P=Pn(m,h);break;default:P=vn(m,h)}return P});return w===!1?null:k.fetchState==="Completed"&&w===!0&&A?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:U,onLoad:m=>(P=>{switch(e){case"zeni_accounts":return P.trackPageLoaded($.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return P.trackPageLoaded($.Event.reimbursementBusinessVerification);default:return P.trackPageLoaded($.Event.billPayBusinessVerification,xe(c)?"Settings":void 0)}})(m)}),u.jsx(Ct,{businessVerificationDetails:k,navigate:a,location:c,companyId:h,analytics:U,currentTenant:I,productType:e,roleMap:A.loggedInUserRoleMap,isSettings:xe(c),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:i!=null,onClickMenuIcon:()=>{},maxInsuredAmount:_.maxInsuredAmount,isBusinessVerificationDrawerOpen:s,closeDrawerHandler:t})]}):u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}})},At={overlayWidth:new tt(100,100,59)},kt=H(function(e,s){const{isUserZeniAccountsAdmin:t,companyId:a,accountsPromoConfig:c}=s,n=V(e),o=D.getSignedInUser(),l=n.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:l??""},r=Je(e,a),p=He(e,a),f=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",A=Ln(e),d=A.transactions,y=We(e),b=A.accountSummary?.totalBalance?.amount,_=d.length===0||b===0;return{treasurySetupView:r,businessVerificationDetails:p,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:d,transferDetails:y,isFirstTransfer:_,isDisabled:f,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:i,isOnSetup:!0,maxInsuredAmount:c.maxInsuredAmount}},function(e,s){const{navigate:t,companyId:a,currentTenant:c,isAllocationDone:n,analytics:o,treasurySetupView:l}=s;return{onTransferSaveChangesToLocalStore:i=>{e(Qn(i))},onBusinessVerificationSectionClick:(i,r)=>{let p="../verification";i&&(p+="?showStepProgress=true",r&&(p+="&isTransferInitiated=true")),t(p),c?.company?.companyTreasuryInfo!=null&&c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(Ce(a,!1,!0))},onFetchLinkTokenClick:(i,r)=>{e(we("treasury_setup",i,r))},onEstablishConnectionClick:i=>{e(Te(i,a,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(i,r,p)=>{e(Ee(i,r,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(i,r)=>{e(Pe(!1,i,"zeni_treasury","treasury_setup",r))},onEstablishConnectionSuccess:()=>{e(Ce(a,!0))},onEnableTreasuryClick:()=>{e(K(a,"zeni_treasury"))},onUpdateTreasuryClick:(i,r,p)=>{e(p==="paymentAccount"?_e(i,r,"zeni_treasury","treasury_setup"):ve("treasury_setup",i,r))},onUpdatePrimaryFundingAccount:(i,r)=>{e(ke(a,"treasury_setup",i,r))},onNavigateToDashboard:()=>{t(c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(i,r)=>{e(Ae({officerType:i,fileIds:r}))},onSendForVerificationClick:(i,r)=>{if(e(L(a,i,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(p.riskScore,Me(p)),e(ze(!1))}r===!0&&e(qe())},updateFilesEntity:i=>{e(ae({files:i}))},onDeleteFile:i=>{e(te(i))},onEditFileName:(i,r)=>{e(ne(i,r.split(".")[0]))},onAdditionalVerificationFieldsChanged:i=>{const{sourceOfFunds:r}=i;e(Zn({sourceOfFunds:r?.selectedOption??""}))},onUpdateFundAllocation:i=>{o.trackTreasuryAllocationAction("update",Me(i)),e(Mn(i))},onConfirmFundAllocation:()=>{e(ze(n))},onSignUpClick:()=>{s.isUserZeniAccountsAdmin?window.open("../checking/promo","_blank","noopener,noreferrer"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank","noopener,noreferrer")},onOverlayClose:()=>{e(Ve())}}})(at),_t=()=>{const e=X(),s=Y(),t=ee(),a=De(),c=nt(),{tenantEmailDomain:n}=G(),{useDynamicConfig:o}=oe(),l=ie(),[i,r]=C.useState(!1),p=Ie(l?.loggedInUserRoleMap),{configValue:f}=o(J.zeniAccountsConfig),A=ye(f),[d,y]=C.useState(!1),[b,_]=C.useState(!1),[g,S]=C.useState(!1),[T,I]=C.useState(!1),[h,w]=C.useState(!1),k=v(O=>O.treasurySetupViewState.fetchState),m=v(O=>O.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),P=v(O=>O.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),R=v(O=>O.treasuryDetailState.transactionsState?.fetchState),F=v(O=>V(O)),E=D.getSignedInUserTenant(n)?.companyId??F.companyId,z=v(O=>Je(O,E)),W=z.isAtomicAccountExists,ge=!!F.companyZeniAccountInfo?.info?.isZeniAccountEnabled,q=D.getSignedInUser(),re=O=>{y(O)};if(q==null)throw Error("Can't access treasury setup page without signing in...");C.useEffect(()=>{b||k!=="Not-Started"||E==null||(_(!0),t(Ce(E,!0,!1)))},[b,k,E,t]),C.useEffect(()=>{g||m!=="Not-Started"||E==null||(S(!0),t(Rn()))},[g,m,E,t]),C.useEffect(()=>{T||P!=="Not-Started"||E==null||(I(!0),t(zn()))},[T,P,E,t]),C.useEffect(()=>{h||R!=="Not-Started"||E==null||(w(!0),t(Nn(!0)))},[h,R,E,t]);const Z=F.companyTreasuryInfo?.info?.businessVerificationStatus?.code,x=Z==="pending_review"||Z==="verified";return C.useEffect(()=>{i||k!=="Completed"||W||x||!s.pathname.includes("setup")||r(!0)},[k,W,x]),F.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(j,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:U,onLoad:()=>{}}),u.jsx(fe,{isAppContentDrawerOpen:d,handleDrawerToggle:re}),u.jsx(ct,{onClose:()=>{t(Ve()),e("../setup")},anchor:"right",open:s.pathname.includes("verification"),transitionDuration:i?0:250,PaperProps:{style:{width:At.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i?"transparent":a.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(vt,{onClick:O=>O.stopPropagation(),children:u.jsx(It,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Ve()),e("../setup")}})})}),u.jsx(kt,{navigate:e,location:s,companyId:E,currentTenant:F,isUserZeniAccountsAdmin:p,accountsPromoConfig:A,isAccountsEnabled:ge,isAllocationDone:W,analytics:U,treasurySetupView:z,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:i,setShowTreasurySetupOverlay:r})]})},vt=Be(rt)`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  flex-direction: column;
21
- `,Pt=W(function(e,s){const{isUserZeniAccountsAdmin:t,companyId:a}=s,c=V(e),n=D.getSignedInUser(),o=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""},i=Gn(e,a),r=t&&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";return{zeniAccountSetUpView:i,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:l}},function(e,s){const{navigate:t,companyId:a,currentTenant:c}=s;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyZeniAccountInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(me(a,!1,!0))},onFetchLinkTokenClick:(n,o)=>{e(we("account_setup",n,o))},onEstablishConnectionClick:n=>{e(Te(n,a,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,o,l)=>{e(Ee(n,o,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,o)=>{e(Pe(!1,n,"zeni_accounts","account_setup",o))},onEstablishConnectionSuccess:()=>{e(me(a,!0))},onEnableZeniAccountClick:()=>{e(K(a,"zeni_accounts"))},onUpdateZeniAccountClick:(n,o,l)=>{e(l==="paymentAccount"?_e(n,o,"zeni_accounts","account_setup"):ve("account_setup",n,o))},onUpdatePrimaryFundingAccount:(n,o)=>{e(ke(a,"account_setup",n,o))},onEnableZeniAccountSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?t("../"):t("../../")},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(n,o)=>{e(Ae({officerType:n,fileIds:o}))},onSendForVerificationClick:n=>{e(L(a,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,o)=>{e(ne(n,o.split(".")[0]))}}})(it),Et=()=>{const e=X(),s=Y(),t=ee(),{tenantEmailDomain:a}=$(),{useDynamicConfig:c}=oe(),n=ie(),o=Ie(n?.loggedInUserRoleMap),{configValue:l}=c(J.zeniAccountsConfig),i=ye(l),[r,p]=C.useState(!1),[f,A]=C.useState(!1),d=v(S=>S.zeniAccountSetupViewState.fetchState),y=v(S=>V(S)),b=D.getSignedInUserTenant(a)?.companyId??y.companyId,_=D.getSignedInUser(),g=S=>{p(S)};if(_==null)throw Error("Can't access zeni bank account setup page without signing in...");if(C.useEffect(()=>{f||d!=="Not-Started"||b==null?f||d!=="Completed"||b==null||y.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(me(b,!1,!0)):(A(!0),t(me(b,!0)))},[f,d,b,t]),y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(j,{to:"../promo"});{const S=T=>T.trackPageLoaded(G.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:U,onLoad:T=>S(T)}),u.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:g}),u.jsx(Pt,{navigate:e,location:s,companyId:b,currentTenant:y,isUserZeniAccountsAdmin:o,accountsPromoConfig:i,onClickMenuIcon:()=>{g(!0)}})]})}},Tt=xe.div`
21
+ `,Pt=H(function(e,s){const{isUserZeniAccountsAdmin:t,companyId:a}=s,c=V(e),n=D.getSignedInUser(),o=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""},i=$n(e,a),r=t&&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";return{zeniAccountSetUpView:i,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:l}},function(e,s){const{navigate:t,companyId:a,currentTenant:c}=s;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyZeniAccountInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(me(a,!1,!0))},onFetchLinkTokenClick:(n,o)=>{e(we("account_setup",n,o))},onEstablishConnectionClick:n=>{e(Te(n,a,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,o,l)=>{e(Ee(n,o,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,o)=>{e(Pe(!1,n,"zeni_accounts","account_setup",o))},onEstablishConnectionSuccess:()=>{e(me(a,!0))},onEnableZeniAccountClick:()=>{e(K(a,"zeni_accounts"))},onUpdateZeniAccountClick:(n,o,l)=>{e(l==="paymentAccount"?_e(n,o,"zeni_accounts","account_setup"):ve("account_setup",n,o))},onUpdatePrimaryFundingAccount:(n,o)=>{e(ke(a,"account_setup",n,o))},onEnableZeniAccountSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?t("../"):t("../../")},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(n,o)=>{e(Ae({officerType:n,fileIds:o}))},onSendForVerificationClick:n=>{e(L(a,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,o)=>{e(ne(n,o.split(".")[0]))}}})(it),Et=()=>{const e=X(),s=Y(),t=ee(),{tenantEmailDomain:a}=G(),{useDynamicConfig:c}=oe(),n=ie(),o=Ie(n?.loggedInUserRoleMap),{configValue:l}=c(J.zeniAccountsConfig),i=ye(l),[r,p]=C.useState(!1),[f,A]=C.useState(!1),d=v(S=>S.zeniAccountSetupViewState.fetchState),y=v(S=>V(S)),b=D.getSignedInUserTenant(a)?.companyId??y.companyId,_=D.getSignedInUser(),g=S=>{p(S)};if(_==null)throw Error("Can't access zeni bank account setup page without signing in...");if(C.useEffect(()=>{f||d!=="Not-Started"||b==null?f||d!=="Completed"||b==null||y.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(me(b,!1,!0)):(A(!0),t(me(b,!0)))},[f,d,b,t]),y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(j,{to:"../promo"});{const S=T=>T.trackPageLoaded($.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:U,onLoad:T=>S(T)}),u.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:g}),u.jsx(Pt,{navigate:e,location:s,companyId:b,currentTenant:y,isUserZeniAccountsAdmin:o,accountsPromoConfig:i,onClickMenuIcon:()=>{g(!0)}})]})}},Tt=Be.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,4 +26,4 @@ import{j as u}from"./liveblocks-DS8sOLD1.js";import{h as X,g as Y,u as ee,i as $
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${e=>e.theme.colors.grey4};
29
- `,wt=W(function(e,s){const t=V(e),a=D.getSignedInUser(),c=t.tenantId,n={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:c??""};return{internationalOnboardingDetails:Hn(e),isReadonly:s.isFormReadonly,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:n,analytics:U}},function(e,s){const{navigate:t}=s;return{onFormDataChange:a=>{e(Kn(a))},onSubmitClick:()=>{e(qn(s.companyId))},onCancelClick:()=>{t("../setup")},updateFilesEntity:a=>{e(ae({files:a}))},onDeleteFile:a=>{e(te(a))},onDeleteFileList:a=>{e(Ke(a))},onEditFileName:(a,c)=>{e(ne(a,c.split(".")[0]))}}})(ot),Dt=()=>{const e=X(),s=Y(),t=ee(),[a,c]=C.useState(!1),[n,o]=C.useState(!1),[l,i]=C.useState(!1),{tenantEmailDomain:r}=$(),p=ie(),{useFeatureGate:f}=oe(),{isFeatureEnabled:A}=f(de.isBillPayLocalCurrencyFeatureEnabled),d=v(k=>k.internationalWireVerificationState.verificationFormFetchState.fetchState),y=v(k=>k.billPaySetupViewState.fetchState),b=v(k=>V(k)),_=De(),g=b.companyId??D.getSignedInUserTenant(r)?.companyId,S=v(k=>$n(k.companyState,b.companyId)),T=S?.company.companyBillPayInfo.internationalWireOnboardingStatus,I=T?.code==="onboarding_status_not_started"?void 0:"readonly";if(C.useEffect(()=>{a||d!=="Not-Started"||g==null||(c(!0),t(Wn(g)))},[a,d,g,t]),C.useEffect(()=>{n||y!=="Not-Started"||g==null||(o(!0),t(Q(g,!0)))},[y,n,g,t]),D.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const h=b.companyBillPayInfo?.info?.isBillPayTOSAccepted,w=k=>{i(k)};return h===!1?u.jsx(j,{to:"../promo"}):h===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(Tt,{children:[u.jsx(se,{analytics:U,onLoad:k=>(m=>m.trackPageLoaded(G.Event.billPayBusinessVerification,void 0))(k)}),Be(s)?u.jsx(fe,{isAppContentDrawerOpen:l,handleDrawerToggle:w}):null,u.jsx(wt,{navigate:e,location:s,companyId:g,analytics:U,currentTenant:b,roleMap:p.loggedInUserRoleMap,isFormReadonly:I,isLocalCurrencyEnabled:A})]}):u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:_.colors.grey5}})},Ut=W(function(){return{}},function(e,s){const{companyId:t,productType:a}=s;return{onEventReceived:c=>{switch(c){case"bill-pay-set-up-verification-update":case"bill-pay-wise-setup":switch(a){case"reimbursement":e(pe(t,!0,!0));break;case"zeni_accounts":e(me(t,!0,!0));break;case"charge_cards":e(le(t,!0,!0));break;case"zeni_treasury":e(Ce(t,!0,!0));break;default:e(Q(t,!0,!0))}}}}})(st(e=>{const{isBillPayAdminLevelAccess:s,isUserHasOnlyBillPayAccess:t,isReimbursementAdminLevelAccess:a,isZeniAccountAdminLevelAccess:c,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:o,isUserHasOnlyCardAccess:l,productType:i,type:r}=e;switch(i){case"bill_pay":switch(r){case"verification":return s?u.jsx(Fe,{productType:i}):t?u.jsx(j,{to:"../"}):u.jsx(N,{});case"international-wire":return s?u.jsx(Dt,{}):t?u.jsx(j,{to:"../"}):u.jsx(N,{});default:return s?u.jsx(lt,{}):t?u.jsx(j,{to:"../"}):u.jsx(N,{})}case"reimbursement":return r==="verification"?a?u.jsx(Fe,{productType:i}):u.jsx(N,{}):a?u.jsx(ht,{}):u.jsx(N,{});case"zeni_accounts":return r==="verification"?c?u.jsx(Fe,{productType:"zeni_accounts"}):u.jsx(N,{}):c?u.jsx(Et,{}):u.jsx(N,{});case"zeni_treasury":return n===!0?u.jsx(_t,{}):u.jsx(N,{});case"charge_cards":return r==="verification"?o?u.jsx(Fe,{productType:"charge_cards"}):l?u.jsx(j,{to:"../"}):u.jsx(N,{}):o?u.jsx(gt,{}):l?u.jsx(j,{to:"../"}):u.jsx(N,{})}}));function oa(e){const{tenantEmailDomain:s}=$(),t=v(c=>V(c)).companyId??D.getSignedInUserTenant(s)?.companyId,a={events:t!=null?[`private-encrypted-${t}.bill-pay-set-up-verification-update`,`private-encrypted-${t}.bill-pay-wise-setup`]:[],eventCallback:(c,n,o)=>{o.onEventReceived(c)}};if(D.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(Ut,{...e,companyId:t,...a})}export{ea as A,na as P,oa as S,Jt as a,Yt as b,mt as c,yt as d,pt as e,ta as f,Wt as g,Qt as h,Kt as i,Xt as j,aa as k,qt as l,Ht as m,Gt as n,$t as o,Zt as p,ia as s};
29
+ `,wt=H(function(e,s){const t=V(e),a=D.getSignedInUser(),c=t.tenantId,n={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:c??""};return{internationalOnboardingDetails:Wn(e),isReadonly:s.isFormReadonly,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:n,analytics:U}},function(e,s){const{navigate:t}=s;return{onFormDataChange:a=>{e(Kn(a))},onSubmitClick:()=>{e(qn(s.companyId))},onCancelClick:()=>{t("../setup")},updateFilesEntity:a=>{e(ae({files:a}))},onDeleteFile:a=>{e(te(a))},onDeleteFileList:a=>{e(Ke(a))},onEditFileName:(a,c)=>{e(ne(a,c.split(".")[0]))}}})(ot),Dt=()=>{const e=X(),s=Y(),t=ee(),[a,c]=C.useState(!1),[n,o]=C.useState(!1),[l,i]=C.useState(!1),{tenantEmailDomain:r}=G(),p=ie(),{useFeatureGate:f}=oe(),{isFeatureEnabled:A}=f(de.isBillPayLocalCurrencyFeatureEnabled),d=v(k=>k.internationalWireVerificationState.verificationFormFetchState.fetchState),y=v(k=>k.billPaySetupViewState.fetchState),b=v(k=>V(k)),_=De(),g=b.companyId??D.getSignedInUserTenant(r)?.companyId,S=v(k=>Gn(k.companyState,b.companyId)),T=S?.company.companyBillPayInfo.internationalWireOnboardingStatus,I=T?.code==="onboarding_status_not_started"?void 0:"readonly";if(C.useEffect(()=>{a||d!=="Not-Started"||g==null||(c(!0),t(Hn(g)))},[a,d,g,t]),C.useEffect(()=>{n||y!=="Not-Started"||g==null||(o(!0),t(Q(g,!0)))},[y,n,g,t]),D.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const h=b.companyBillPayInfo?.info?.isBillPayTOSAccepted,w=k=>{i(k)};return h===!1?u.jsx(j,{to:"../promo"}):h===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(Tt,{children:[u.jsx(se,{analytics:U,onLoad:k=>(m=>m.trackPageLoaded($.Event.billPayBusinessVerification,void 0))(k)}),xe(s)?u.jsx(fe,{isAppContentDrawerOpen:l,handleDrawerToggle:w}):null,u.jsx(wt,{navigate:e,location:s,companyId:g,analytics:U,currentTenant:b,roleMap:p.loggedInUserRoleMap,isFormReadonly:I,isLocalCurrencyEnabled:A})]}):u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:_.colors.grey5}})},Ut=H(function(){return{}},function(e,s){const{companyId:t,productType:a}=s;return{onEventReceived:c=>{switch(c){case"bill-pay-set-up-verification-update":case"bill-pay-wise-setup":switch(a){case"reimbursement":e(pe(t,!0,!0));break;case"zeni_accounts":e(me(t,!0,!0));break;case"charge_cards":e(le(t,!0,!0));break;case"zeni_treasury":e(Ce(t,!0,!0));break;default:e(Q(t,!0,!0))}}}}})(st(e=>{const{isBillPayAdminLevelAccess:s,isUserHasOnlyBillPayAccess:t,isReimbursementAdminLevelAccess:a,isZeniAccountAdminLevelAccess:c,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:o,isUserHasOnlyCardAccess:l,productType:i,type:r}=e;switch(i){case"bill_pay":switch(r){case"verification":return s?u.jsx(Fe,{productType:i}):t?u.jsx(j,{to:"../"}):u.jsx(N,{});case"international-wire":return s?u.jsx(Dt,{}):t?u.jsx(j,{to:"../"}):u.jsx(N,{});default:return s?u.jsx(lt,{}):t?u.jsx(j,{to:"../"}):u.jsx(N,{})}case"reimbursement":return r==="verification"?a?u.jsx(Fe,{productType:i}):u.jsx(N,{}):a?u.jsx(ht,{}):u.jsx(N,{});case"zeni_accounts":return r==="verification"?c?u.jsx(Fe,{productType:"zeni_accounts"}):u.jsx(N,{}):c?u.jsx(Et,{}):u.jsx(N,{});case"zeni_treasury":return n===!0?u.jsx(_t,{}):u.jsx(N,{});case"charge_cards":return r==="verification"?o?u.jsx(Fe,{productType:"charge_cards"}):l?u.jsx(j,{to:"../"}):u.jsx(N,{}):o?u.jsx(gt,{}):l?u.jsx(j,{to:"../"}):u.jsx(N,{})}}));function oa(e){const{tenantEmailDomain:s}=G(),t=v(c=>V(c)).companyId??D.getSignedInUserTenant(s)?.companyId,a={events:t!=null?[`private-encrypted-${t}.bill-pay-set-up-verification-update`,`private-encrypted-${t}.bill-pay-wise-setup`]:[],eventCallback:(c,n,o)=>{o.onEventReceived(c)}};if(D.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(Ut,{...e,companyId:t,...a})}export{ea as A,na as P,oa as S,Jt as a,Yt as b,mt as c,yt as d,pt as e,ta as f,Ht as g,Qt as h,Kt as i,Xt as j,aa as k,qt as l,Wt as m,$t as n,Gt as o,Zt as p,ia as s};
@@ -0,0 +1 @@
1
+ import{j as f}from"./liveblocks-evjZPqs_.js";import{a as u,b as T,q as A}from"./sentry-CCZGmBkl.js";import{u as z,h as D,j as c,g as M,N as O,n as _}from"./core-DmAftQ4g.js";import{u as j,z as s,m as P,c as E,O as F,d as B,e as N,f as $,g as V,h as W,i as b}from"./index-DsVH62ZK.js";import{eW as q,LT as J,LU as X,fx as Y,f_ as H,LZ as Z,gm as G,cX as K,L_ as y,L$ as Q,M0 as R,bY as v}from"./zeni-epic-state-vtQ66nN6.js";import"./mui-PcDpEhsm.js";import{u as ee}from"./useDeviceId-DGJPBja9.js";import{f as te}from"./analyticsHelper-CQXeRvKo.js";import{t as ne}from"./getLocaleForTenant-C55KVru2.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="36e0bbcd-be4d-4592-9a9c-e122ffb1b913",t._sentryDebugIdIdentifier="sentry-dbid-36e0bbcd-be4d-4592-9a9c-e122ffb1b913")}catch{}})();const ie=_(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:b.googleClientId,microsoftClientId:b.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(R({authCode:n,oauthProvider:a,appType:"web",redirectUri:v(l),sourceUri:v(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(Q(n,a)))},clearSignInError:()=>{t(y())}}})(W),ae=T.memo(ie);function be({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=j(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:L,accountLocked:U,accountUnlockTime:h}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),k=c(e=>e.tenantState.activeTenantFetchState.fetchState),S=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>q(e)),I=c(e=>J(e)),m=M(),w=P().mode,x=m.state?.magicLinkExpired,C=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{L.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[L.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(X(I.tenantsInOrder),o.zeniSessionId),Y(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(Z("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),G().then(()=>{const e=V();e!=null&&B(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))},2e3))},[S,p,k,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!x,magicLinkAlreadyUsed:!!C,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&h!=null?f.jsx($,{onClose:()=>i(y()),unlockDate:h}):null]})}export{be as default};
@@ -0,0 +1,9 @@
1
+ import{j as s}from"./liveblocks-evjZPqs_.js";import{a}from"./sentry-CCZGmBkl.js";import{u,g as m,h as g,N as p}from"./core-DmAftQ4g.js";import{z as d,B as b,t as y,c,e as h}from"./index-DsVH62ZK.js";import{gr as x,gs as I,Mf as w}from"./zeni-epic-state-vtQ66nN6.js";import{n as j}from"./mui-PcDpEhsm.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="0b2be4e0-e755-48b1-998d-d88dce2935e0",e._sentryDebugIdIdentifier="sentry-dbid-0b2be4e0-e755-48b1-998d-d88dce2935e0")}catch{}})();function $(){const e=u(),t=m(),i=g(),n=a.useRef(!1),f=d.isSignedIn(),r=t.state?.message==="logout",o=r||f;return a.useEffect(()=>{o&&!n.current&&(n.current=!0,setTimeout(()=>{try{d.clearAll(),e(x()),e(I(!1)),w(),y.reset(),c.trackLogout(h.Event.logoutSuccess),c.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(p,{to:"../",replace:!0})}const v=j.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `;export{$ as default};
@@ -0,0 +1,9 @@
1
+ import{j as u}from"./liveblocks-evjZPqs_.js";import{a as D}from"./sentry-CCZGmBkl.js";import{h as K,u as _,g as v,j as G,i as z,n as J}from"./core-DmAftQ4g.js";import{z as R,W,U as p,_ as M,x as O,c as Z,e as q,d9 as Q,q as g,p as V}from"./index-DsVH62ZK.js";import{eW as H,TI as F,J0 as C,TJ as x,TE as Y,Io as E,TK as X,Iw as y,HS as aa,J1 as S,TL as w,fw as ea,IT as ta,IY as sa,IL as oa,IJ as B,IZ as na,IG as ia,TM as la,TN as ra,TO as ca,TP as ka,TQ as T,ei as da,TR as ua,TS as pa}from"./zeni-epic-state-vtQ66nN6.js";import{n as Ta}from"./mui-PcDpEhsm.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-uVGdd0zj.js";import{M as ga}from"./MobileAppDrawer-BuakBUGx.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="8bcb6c3d-e19a-4dd2-be4a-7ddbe11fff99",e._sentryDebugIdIdentifier="sentry-dbid-8bcb6c3d-e19a-4dd2-be4a-7ddbe11fff99")}catch{}})();const fa=Ta.div`
2
+ display: flex;
3
+ min-height: 100%;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `,ba=J(function(e,t){const o=F(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,n=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o,d=Y(e),i=R.isZeniUser();return{taskListView:n,tagListView:d,localData:n.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:i}},function(e,t){const{navigate:o,currentTenant:c,location:n,isTaskTemplatesEnabled:d}=t,{tenantEmailDomain:i}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(i,a),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(C(!0,d))},onTabChange:a=>{e(ka(a))},onParentTaskClick:a=>{const s=L(i,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(B(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=I(i,t.localData.defaultTaskGroupId),s=g(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(w({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ca({filters:a}))},onSearchTextChanged:a=>{e(ra({searchText:a}))},onReloadCards:()=>{e(C(!0,d))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=V(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(la({localData:a}))},resetLocalData:()=>{e(x({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ia(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(B(t.localData.selectedTaskIds,a,na(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(oa(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=ha(l,a);e(E({taskDetailLocalData:s}));const k=I(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),f=g(n.state?.pathnameStackToGoBack,n.pathname);o(k,{state:{pathnameStackToGoBack:f,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(sa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(ta(a,s))},onTimeSpentUpdate:(a,s)=>{e(S({task:a,updates:s}))},onShowToast:a=>{e(ea(a))},onGroupByFilterChange:a=>{e(w({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(S({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(aa(a,s))},handleGroupTemplateClick:a=>{e(y(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(y(a,[s]))},handleNewTaskInitialization:a=>{if(e(E({taskDetailLocalData:{...X,name:a}})),t.localData.defaultTaskGroupId!=null){const s=I(i,t.localData.defaultTaskGroupId),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${i}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${i}/tasks/quick-responses`)}}})(Q);function ja(){const e=K(),t=_(),o=v(),c=R.getSignedInUser(),n=G(r=>H(r)),{taskGroupId:d}=z(),{useFeatureGate:i}=W(),{isFeatureEnabled:l}=i(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=i(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=i(p.isTaskCategorizationEnabled),{isFeatureEnabled:k}=i(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:f}=i(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=i(p.isTaskRecurringParentEnabled),[P,N]=D.useState(!1),b=G(r=>F(r,l)),h=G(r=>r.taskGroupState),m=b.fetchState,{isAiCfoAccessEnabled:$,onAskAiCfoClick:j}=ma({mobileExploreReferrer:"Task Checklist"});if(M({isDataReady:m==="Completed"}),D.useEffect(()=>{t(C(!1,l))},[n?.tenantId,t,l]),D.useEffect(()=>{m==="Completed"&&t(x({taskGroupById:h.taskGroupById}))},[m,h.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return u.jsxs(u.Fragment,{children:[m==="Completed"?u.jsx(O,{analytics:Z,onLoad:r=>(U=>U.trackPageLoaded(q.Event.taskListPage))(r)}):null,u.jsxs(fa,{children:[u.jsx(ga,{isAppContentDrawerOpen:P,handleDrawerToggle:r=>{N(r)}}),u.jsx(ba,{location:o,navigate:e,currentTenant:n,taskGroupId:d,taskGroupState:h,localData:b.localData,uiState:b.uiState,isTaskTemplatesEnabled:l,taskListFetchState:m,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:f,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:$,onAskAiCfoClick:j})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,I=(e,t)=>`/${e}/tasks/new/${t}`,ha=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...T.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=da(t);return{...T.taskDetailLocalData,priority:o}}if(e==="status"){const o=ua(t);return{...T.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...T.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=pa(t);return{...T.taskDetailLocalData,dueDate:o}}return{...T.taskDetailLocalData}};export{ja as default};
@@ -0,0 +1,9 @@
1
+ import{j as n}from"./liveblocks-evjZPqs_.js";import se from"./NotFoundScreen-AsC21qGx.js";import{a as c}from"./sentry-CCZGmBkl.js";import{h as _,u as H,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-DmAftQ4g.js";import{I3 as O,I6 as le,I0 as de,eW as M,TE as W,Ik as J,HZ as pe,IQ as ue,IJ as ke,TF as Q,TG as V,HV as me,HS as fe,rA as ge,ro as he,l3 as Ie,Ie as Se,TH as Te,Iv as be,Is as Ee,I9 as Ge,Ip as Ce,Io as De}from"./zeni-epic-state-vtQ66nN6.js";import{z as C,d7 as xe,v as ye,W as je,U as b,p as X,q as w,x as ve,c as z,e as we,d8 as Re,i as A,au as Fe}from"./index-DsVH62ZK.js";import{n as Ue}from"./mui-PcDpEhsm.js";import{u as Be}from"./useInitialThreadRequest-D9ebiXdA.js";import{M as Pe}from"./MobileAppDrawer-BuakBUGx.js";import Le from"./TaskListScreen-DGOHeeuZ.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.js";import"./useAskAiCfoHostNavButtonProps-uVGdd0zj.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]="3a9543af-7f93-4595-a464-338cfbebdcf6",e._sentryDebugIdIdentifier="sentry-dbid-3a9543af-7f93-4595-a464-338cfbebdcf6")}catch{}})();function $e(){const e=_(),t=H(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(O())},[t]),k=c.useCallback((o,h,I)=>{t(le({name:o,content:h,cannedResponseId:I}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let q,Z=[];const Ne=re(function(e,t){const{location:s,taskGroupId:u}=t,r=Q(e,t.taskId),d=M(e),l=r.taskGroupId??u,k=l!=null?V(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=W(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${A.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==q&&(q=S,Z=Object.values(S)),Z),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>V(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ge(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=X(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(J(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(O())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(Re);function v(){const e=_(),t=H(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>M(i)),k=Be(l?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,S]=c.useState(!1),[p,Y]=c.useState(!1),[F,K]=c.useState(!1),[U,ee]=c.useState(!1),[B,y]=c.useState(!1),T=c.useRef(!1),G=g(i=>i.taskListState.updateTasksFetchState.fetchState),P=g(i=>W(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(Y(!0),t(J(!1,r)))},[p,t]),c.useEffect(()=>{F||P.fetchState==="Completed"||(K(!0),t(pe()))},[F,t,P.fetchState]),c.useEffect(()=>{U||L==="Completed"||(ee(!0),t(ue()))},[U,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))},[t,r]);c.useEffect(()=>{if(B)if(G!=="In-Progress"){if(T.current){if(G==="Error")return y(!1),void(T.current=!1);if(G==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[B,G,l,s,e]);const $=g(i=>Q(i,r)),j=$.fetchState,N=C.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=R(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(ve,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ve,{children:[n.jsx(Pe,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(Ne,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ve=Ue.div`
2
+ display: flex;
3
+ min-height: 100%;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `,R=e=>`/${e}/tasks`;function ia(){return n.jsxs(ce,{children:[n.jsx(f,{path:"/new",element:n.jsx(v,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(v,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(v,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
@@ -1 +1 @@
1
- import{j as t}from"./liveblocks-DS8sOLD1.js";import i from"./NotFoundScreen-DRRoMVDk.js";import{T as r}from"./TransactionDetailScreen-BbsGsqi_.js";import"./sentry-B2Aew07S.js";import{o as s,p as o}from"./core-SRRzy8qJ.js";import"./zeni-epic-state-DcKqCCCg.js";import"./recharts-CHATJmXy.js";import"./index-BnX1nS7p.js";import"./mui-DQ-jfgFM.js";import"./analytics-C-A3qVJh.js";import"./plaid-DWZgMqW3.js";import"./dnd-CR8sMRK3.js";import"./stripe-DMRn4zHo.js";import"./lottie-Coq2aDEW.js";import"./lexical-qJrDnJMV.js";import"./pdf-D2Xq7623.js";import"./utils-D8kKiFqT.js";import"./useAskAiCfoHostNavButtonProps-RYFll1PC.js";import"./decodeURIComponentSafe-Bz-26BXW.js";import"./routePaths-DyfF54Mg.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]="a4852925-22e4-4d6c-b9c0-7fe8ce24ec96",e._sentryDebugIdIdentifier="sentry-dbid-a4852925-22e4-4d6c-b9c0-7fe8ce24ec96")}catch{}})();function k(){return t.jsxs(s,{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{k as default};
1
+ import{j as t}from"./liveblocks-evjZPqs_.js";import i from"./NotFoundScreen-AsC21qGx.js";import{T as r}from"./TransactionDetailScreen-DUZV5JDK.js";import"./sentry-CCZGmBkl.js";import{o as s,p as o}from"./core-DmAftQ4g.js";import"./zeni-epic-state-vtQ66nN6.js";import"./recharts-CgEqsrFw.js";import"./index-DsVH62ZK.js";import"./mui-PcDpEhsm.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.js";import"./useAskAiCfoHostNavButtonProps-uVGdd0zj.js";import"./decodeURIComponentSafe-C70tsXnj.js";import"./routePaths-Dq5U7lhs.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]="a4852925-22e4-4d6c-b9c0-7fe8ce24ec96",e._sentryDebugIdIdentifier="sentry-dbid-a4852925-22e4-4d6c-b9c0-7fe8ce24ec96")}catch{}})();function k(){return t.jsxs(s,{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{k as default};