@zeniai/web-app-ui 5.3.71-next → 5.3.71-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/assets/{AccountMappingScreen-CfmMe_fw.js → AccountMappingScreen-Da8kjow8.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-D3C6jjK4.js → ActualMatchingMatchDetailScreen-RoPWu4_o.js} +1 -1
  3. package/dist/assets/AddressRoutes-C13OMsQB.js +1 -0
  4. package/dist/assets/{AddressScreen-CUr_aEMc.js → AddressScreen-CPpf4Cpj.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-BWl90IlM.js → AiCfoScreen-C1Zi5BWJ.js} +1 -1
  6. package/dist/assets/{AppDrawer-D5PfLYY9.js → AppDrawer-BxZ3HI7E.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-DAUa7ONB.js → BillPayApprovalRoutes-c7b3I5yJ.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-DLiB7rcg.js → BillPayRoutes-BDhRNd6v.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-0_5o_ZM_.js → BusinessVerificationPageScreen-CaVy5wIy.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-DgEHpSc7.js → CardsAiCfoScreen-BHtNOqz6.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-CGicSScL.js → ChargeCardRoutes-CWxqs0Z9.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-Cc-A-J9-.js → CompanyPassportScreen-CIym85mw.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-DFY2TNuF.js → ConnectionAuthScreen-C6aejitU.js} +1 -1
  14. package/dist/assets/CustomerOnboardingAuthScreen-abpr3s2K.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-D0tIE0Z1.js → CustomerOnboardingRoutes-DVMAQtsb.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-fO2Q95Pi.js → DashboardRoutes-Bq7IQcLO.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-CgyMoJcG.js → DefaultTenantHome-Bpge3yFF.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-lCsi4C5H.js → DomesticWireDetailScreen-ZaeUg4I5.js} +1 -1
  19. package/dist/assets/{DrawerScreen-Cc5wz0h5.js → DrawerScreen-bhsbfXgO.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-gyNpo9F4.js → EntityDetailRoutes-bilW2_CZ.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-BRpV-BG_.js → ExpenseAutomationRoutes-Dab9nQ3b.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-pBtwBr_N.js → FeaturePreviewScreen-ADHB7kMI.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-DSWdP7lt.js → HubSpotOAuthCallbackScreen-7DU1Mbfq.js} +1 -1
  24. package/dist/assets/{InboxNotificationsProvider-acJ-mQYX.js → InboxNotificationsProvider-Vlyx5Pej.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-p_zZErJa.js → InvoicingRoutes-CiTJXDwp.js} +1 -1
  26. package/dist/assets/{MagicLinkRoutes-CSV8DIoI.js → MagicLinkRoutes-DonztJNa.js} +1 -1
  27. package/dist/assets/{MagicLinkSignInScreen-D1OLFxKv.js → MagicLinkSignInScreen-DdvxD6Sl.js} +1 -1
  28. package/dist/assets/{MobileAppDrawer-jc7oeqcf.js → MobileAppDrawer-Boi7lIY0.js} +1 -1
  29. package/dist/assets/NotFoundScreen-XQ69x1V9.js +1 -0
  30. package/dist/assets/{NotificationRoutes-M5pxGUeG.js → NotificationRoutes-CjruMuyg.js} +1 -1
  31. package/dist/assets/{OAuthConsentScreen-DOREZoqh.js → OAuthConsentScreen-fv9EuWPU.js} +1 -1
  32. package/dist/assets/{PandLWithForecastRoutes-DK6RjofB.js → PandLWithForecastRoutes-CwPS1KT_.js} +1 -1
  33. package/dist/assets/{PaymentLinkScreen-n1UNE3U9.js → PaymentLinkScreen-43J_ZGED.js} +1 -1
  34. package/dist/assets/{PeopleRoutes-CNPCr-L4.js → PeopleRoutes-B4wBQVwY.js} +1 -1
  35. package/dist/assets/{PerformanceRoutes-BTjLeNmT.js → PerformanceRoutes-BaUrr9_i.js} +1 -1
  36. package/dist/assets/{Preview-CJRvnEAv.js → Preview-DqlOJJpJ.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-DTOowkWU.js → QBOConnectionScreen-Czz6muQW.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRoutes-BQnKvM2a.js → ReimbursementApprovalRoutes-BoJxAtXM.js} +1 -1
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-ChdeAEEo.js → ReimbursementApprovalRuleDetailScreen-DN9la9Dm.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-DeDFifAg.js → ReimbursementRoutes-BGNOeI_H.js} +1 -1
  41. package/dist/assets/{ReportsRoutes-ltsKJmPq.js → ReportsRoutes-D-cpB-sX.js} +1 -1
  42. package/dist/assets/{RewardsRoutes-B0axXfBN.js → RewardsRoutes-Cp5QwRpd.js} +1 -1
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-B48cCmOD.js → ScheduleDetailsPrepaidExpensesScreen-CNF1ceQn.js} +1 -1
  44. package/dist/assets/{ScreenRoutes-BrOWRtN9.js → ScreenRoutes-DSM6zpE1.js} +2 -2
  45. package/dist/assets/{SettingsRoutes-qM6FOrI_.js → SettingsRoutes-D_LLhbJv.js} +1 -1
  46. package/dist/assets/{SetupPagesScreen-CUMRQWyq.js → SetupPagesScreen-PMDfztMD.js} +1 -1
  47. package/dist/assets/{SignInScreen-Cp0FNmL9.js → SignInScreen-DXEwLRRd.js} +1 -1
  48. package/dist/assets/{SignOutScreen-Cltpt53S.js → SignOutScreen-rRGrVkZi.js} +1 -1
  49. package/dist/assets/{TaskListScreen-Cz8JRv3L.js → TaskListScreen-C_FDDeaV.js} +1 -1
  50. package/dist/assets/{TaskRoutes-BVnvgieb.js → TaskRoutes-DIOgMKYK.js} +1 -1
  51. package/dist/assets/TransactionDetailRoutes-C6i9gm0l.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-mapOUu_X.js → TransactionDetailScreen-CWo5MdmD.js} +1 -1
  53. package/dist/assets/{TransactionListRoutes-CG-fcybo.js → TransactionListRoutes-DMziXkI4.js} +1 -1
  54. package/dist/assets/{TreasuryRoutes-oCzS5EKy.js → TreasuryRoutes-B1C-ovJX.js} +1 -1
  55. package/dist/assets/{VendorsRoutes-D10u79fF.js → VendorsRoutes-DoSPbM9C.js} +1 -1
  56. package/dist/assets/{WiseConfirmationScreen-CegbLvI-.js → WiseConfirmationScreen-CYU0SXmY.js} +1 -1
  57. package/dist/assets/{ZeniAccountRoutes-CM6btkjV.js → ZeniAccountRoutes-4rPFLUgD.js} +1 -1
  58. package/dist/assets/{ZeniAccountStatementScreen-DKETk0FT.js → ZeniAccountStatementScreen-kiOSzYpp.js} +1 -1
  59. package/dist/assets/{accountMappingHelper-de51OWcB.js → accountMappingHelper-CeXF1Q4Q.js} +1 -1
  60. package/dist/assets/{analytics-DzL27tck.js → analytics-DI5uqxwC.js} +1 -1
  61. package/dist/assets/{analyticsHelper-Dbh_ZdOH.js → analyticsHelper-Df3DOmUB.js} +1 -1
  62. package/dist/assets/{core-BNc5eMdk.js → core-_cqItzd_.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-BSiJLIqU.js → decodeURIComponentSafe-CzbN3zRu.js} +1 -1
  64. package/dist/assets/{dnd-0zxechDA.js → dnd-BzHSvmGV.js} +1 -1
  65. package/dist/assets/{empty-5vTmg9PS.js → empty-CTsBwHYQ.js} +1 -1
  66. package/dist/assets/{empty-De8i1B-J.js → empty-IeCSs-Vp.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-D0I6gChS.js → emptyVideoElement-BDIFj1OP.js} +1 -1
  68. package/dist/assets/{epic-Cmq979ri.js → epic-BpPMSALI.js} +1 -1
  69. package/dist/assets/{expenseAutomationHelper-BNtWlCNK.js → expenseAutomationHelper-CTin--xN.js} +1 -1
  70. package/dist/assets/{getLocaleForTenant-DE5c6zm1.js → getLocaleForTenant-DNtLZSig.js} +1 -1
  71. package/dist/assets/{index-Bqsu77NP.js → index-B_Z1rAKT.js} +1 -1
  72. package/dist/assets/{index-DtUEcHPx.js → index-CFtxbACp.js} +1 -1
  73. package/dist/assets/{index-B7i4OQ4V.js → index-CMOD4X8_.js} +1 -1
  74. package/dist/assets/{index-BuQOQ6cA.js → index-DVhAab8j.js} +8 -8
  75. package/dist/assets/{index-DCd9c8XG.js → index-LjABwt4q.js} +1 -1
  76. package/dist/assets/{index-C01KTNGe.js → index-_QekaZI8.js} +1 -1
  77. package/dist/assets/{index-B9mu9yU0.js → index-aNhAY0yh.js} +1 -1
  78. package/dist/assets/{index-BM08vDhu.js → index-z7nFmc82.js} +2 -2
  79. package/dist/assets/{lexical-BSajFjJy.js → lexical-CXRKir6z.js} +1 -1
  80. package/dist/assets/{liveblocks-CgcSlW4Z.js → liveblocks-gNIoHksP.js} +1 -1
  81. package/dist/assets/{lottie-VLEWAz4K.js → lottie-CjJcvZ3r.js} +1 -1
  82. package/dist/assets/{mui-BCV14xpx.js → mui-CDH3xRD_.js} +1 -1
  83. package/dist/assets/{pathToGoBack-Ct0_tDyX.js → pathToGoBack-DqZRBX-C.js} +1 -1
  84. package/dist/assets/{pdf-fIozDtKP.js → pdf-BZVEJwNE.js} +3 -3
  85. package/dist/assets/{pdf-lib-ZHcF2OoC.js → pdf-lib-DnzapqoA.js} +1 -1
  86. package/dist/assets/{plaid-BGKcPjuF.js → plaid-Dvn5Z296.js} +1 -1
  87. package/dist/assets/{pusher-DF3U6TjN.js → pusher-CcIFKuUn.js} +1 -1
  88. package/dist/assets/{react-C0FU-bd-.js → react-AHfmXvhq.js} +1 -1
  89. package/dist/assets/{react-DnOLcQ-R.js → react-CPb70X99.js} +1 -1
  90. package/dist/assets/{react-CYkS38FV.js → react-CuiiYztJ.js} +1 -1
  91. package/dist/assets/{react-BEP9leHw.js → react-DAXlQZC6.js} +1 -1
  92. package/dist/assets/{react-Dl_BCpnf.js → react-DClAw2ak.js} +1 -1
  93. package/dist/assets/{react-DEqnxI-0.js → react-t3XyoKqw.js} +1 -1
  94. package/dist/assets/{recharts-B1fIlvhf.js → recharts-BgEcqT8y.js} +1 -1
  95. package/dist/assets/{routePaths-Fw-tznCi.js → routePaths-DM8AEJT0.js} +1 -1
  96. package/dist/assets/{sentry-CkAdiuiy.js → sentry-BzzHvh63.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-0Sr2Qpml.js → stripSplatSuffix-D8FyJbXM.js} +1 -1
  98. package/dist/assets/{url-BWjQ6tZk.js → url-0BMhJWUX.js} +1 -1
  99. package/dist/assets/{url-DZkAnGE1.js → url-BuE-ZvDR.js} +1 -1
  100. package/dist/assets/{useActualMatchingMatchDetail-BhC_BwjK.js → useActualMatchingMatchDetail-CQqHF-gN.js} +1 -1
  101. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Dl7t0rfD.js → useAiCfoDashboardSuggestedQuestionsChips-C6pX9M29.js} +1 -1
  102. package/dist/assets/{useAskAiCfoHostNavButtonProps-BAZ88gr3.js → useAskAiCfoHostNavButtonProps-DQSYAHEz.js} +1 -1
  103. package/dist/assets/{useChargeCardPusherEvents-B37-5iMJ.js → useChargeCardPusherEvents-pc-PEvCr.js} +1 -1
  104. package/dist/assets/{useDeviceId-iZ_-Itv9.js → useDeviceId-DYE-WS_B.js} +1 -1
  105. package/dist/assets/{useEmailConnectResultRefresh-BVltkRYL.js → useEmailConnectResultRefresh-XR0U1MaM.js} +1 -1
  106. package/dist/assets/{useInitialThreadRequest-BLqSoxJq.js → useInitialThreadRequest-CSR_bJDf.js} +1 -1
  107. package/dist/assets/{useTaskManagerAccess-CvCLmUXb.js → useTaskManagerAccess-CZYVdWyJ.js} +1 -1
  108. package/dist/assets/{useTaskManagerPusherEvents-Du_KDQdo.js → useTaskManagerPusherEvents-C0fOaGqk.js} +1 -1
  109. package/dist/assets/{utils-CqmAwzS_.js → utils-DZX8_JTm.js} +1 -1
  110. package/dist/assets/{withTransactionSidePanel-D7Qark8_.js → withTransactionSidePanel-BKXId2BT.js} +1 -1
  111. package/dist/assets/{zeni-epic-state-DGPmp0NT.js → zeni-epic-state-ClqSlu6d.js} +3 -3
  112. package/dist/index.html +1 -1
  113. package/package.json +1 -1
  114. package/dist/assets/AddressRoutes-DJR1UTd-.js +0 -1
  115. package/dist/assets/CustomerOnboardingAuthScreen-Dr48JwuC.js +0 -1
  116. package/dist/assets/NotFoundScreen-n2sZiHTP.js +0 -1
  117. package/dist/assets/TransactionDetailRoutes-3ahF1J6v.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-CgcSlW4Z.js";import{Vy as re,fI as N,m2 as _,e0 as Y,d$ as le,Sp as J,UX as de,D1 as Ee,Vz as X,CS as je,Db as Le,D5 as ce,CW as pe,D9 as Te,D6 as ve,VA as ue,sw as Ae,g9 as Ve,gG as Fe,VB as G,C_ as me,CZ as ge,De as Re,c9 as Oe}from"./zeni-epic-state-DGPmp0NT.js";import{a1 as fe,_ as Q,f as H,z as W,j as Ce,U as he,af as ye,az as be,aA as Be,ab as Se,M as R,ag as we,G as K,aB as Ze,aq as Ue,as as $e,a8 as ze,n as De,T as Ge,p as He,aC as _e,P as We}from"./index-BuQOQ6cA.js";import{D as xe,n as M,S as Ie}from"./mui-BCV14xpx.js";import ae from"./NotFoundScreen-n2sZiHTP.js";import{a as d}from"./sentry-CkAdiuiy.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Xe,n as se,o as z}from"./core-BNc5eMdk.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-BAZ88gr3.js";import{M as Ye}from"./MobileAppDrawer-jc7oeqcf.js";import"./recharts-B1fIlvhf.js";import"./analytics-DzL27tck.js";import"./plaid-BGKcPjuF.js";import"./dnd-0zxechDA.js";import"./stripe-cKAAJElX.js";import"./lottie-VLEWAz4K.js";import"./lexical-BSajFjJy.js";import"./pdf-fIozDtKP.js";import"./utils-CqmAwzS_.js";import"./InboxNotificationsProvider-acJ-mQYX.js";import"./useTaskManagerAccess-CvCLmUXb.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]="715059dc-00dc-4fd1-9a28-1eabebf0a6e4",e._sentryDebugIdIdentifier="sentry-dbid-715059dc-00dc-4fd1-9a28-1eabebf0a6e4")}catch{}})();const Je={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,B]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=Ke(),r=g((l=>re(l))),p=g((l=>N(l))),P=g((l=>_(l))),{useFeatureGate:x}=Q(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),E=Y(I,p),T=le(p),v=J(p),Z=de(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,D=!E&&P&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{m(X()),b()},A=()=>{O===!0?S(!0):h()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=Ce(p,j,I),{isCardsHidden:V}=he(p?.tenantId),y=!L||V,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:P,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:Z===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:T,onResetClick:h,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:A,isLoading:D||r.person==null},o={onOkClick:()=>{S(!1),h()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{D===!1&&w!=null&&m(Ee(w))}),[D,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&h()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Pe,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Be,{...s})]})})},ea=M(Ie)`
1
+ import{j as a}from"./liveblocks-gNIoHksP.js";import{Vy as re,fI as N,m2 as _,e0 as Y,d$ as le,Sp as J,UX as de,D1 as Ee,Vz as X,CS as je,Db as Le,D5 as ce,CW as pe,D9 as Te,D6 as ve,VA as ue,sw as Ae,g9 as Ve,gG as Fe,VB as G,C_ as me,CZ as ge,De as Re,c9 as Oe}from"./zeni-epic-state-ClqSlu6d.js";import{a1 as fe,_ as Q,f as H,z as W,j as Ce,U as he,af as ye,az as be,aA as Be,ab as Se,M as R,ag as we,G as K,aB as Ze,aq as Ue,as as $e,a8 as ze,n as De,T as Ge,p as He,aC as _e,P as We}from"./index-DVhAab8j.js";import{D as xe,n as M,S as Ie}from"./mui-CDH3xRD_.js";import ae from"./NotFoundScreen-XQ69x1V9.js";import{a as d}from"./sentry-BzzHvh63.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Xe,n as se,o as z}from"./core-_cqItzd_.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-DQSYAHEz.js";import{M as Ye}from"./MobileAppDrawer-Boi7lIY0.js";import"./recharts-BgEcqT8y.js";import"./analytics-DI5uqxwC.js";import"./plaid-Dvn5Z296.js";import"./dnd-BzHSvmGV.js";import"./stripe-cKAAJElX.js";import"./lottie-CjJcvZ3r.js";import"./lexical-CXRKir6z.js";import"./pdf-BZVEJwNE.js";import"./utils-DZX8_JTm.js";import"./InboxNotificationsProvider-Vlyx5Pej.js";import"./useTaskManagerAccess-CZYVdWyJ.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]="715059dc-00dc-4fd1-9a28-1eabebf0a6e4",e._sentryDebugIdIdentifier="sentry-dbid-715059dc-00dc-4fd1-9a28-1eabebf0a6e4")}catch{}})();const Je={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,B]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=Ke(),r=g((l=>re(l))),p=g((l=>N(l))),P=g((l=>_(l))),{useFeatureGate:x}=Q(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),E=Y(I,p),T=le(p),v=J(p),Z=de(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,D=!E&&P&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{m(X()),b()},A=()=>{O===!0?S(!0):h()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=Ce(p,j,I),{isCardsHidden:V}=he(p?.tenantId),y=!L||V,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:P,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:Z===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:T,onResetClick:h,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:A,isLoading:D||r.person==null},o={onOkClick:()=>{S(!1),h()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{D===!1&&w!=null&&m(Ee(w))}),[D,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&h()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Pe,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Be,{...s})]})})},ea=M(Ie)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CgcSlW4Z.js";import E from"./NotFoundScreen-n2sZiHTP.js";import{a as r}from"./sentry-CkAdiuiy.js";import{h as _,g as v,j as p,i as M,u as U,N as O,l as P,n as z,o as b}from"./core-BNc5eMdk.js";import{fI as N,a19 as h,bo as B,bn as F,iO as V,gk as $}from"./zeni-epic-state-DGPmp0NT.js";import{c as q,z as I,as as G,dN as H}from"./index-BuQOQ6cA.js";import"./mui-BCV14xpx.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-BAZ88gr3.js";import{M as K}from"./MobileAppDrawer-jc7oeqcf.js";import"./recharts-B1fIlvhf.js";import"./analytics-DzL27tck.js";import"./plaid-BGKcPjuF.js";import"./dnd-0zxechDA.js";import"./stripe-cKAAJElX.js";import"./lottie-VLEWAz4K.js";import"./lexical-BSajFjJy.js";import"./pdf-fIozDtKP.js";import"./utils-CqmAwzS_.js";import"./InboxNotificationsProvider-acJ-mQYX.js";import"./useTaskManagerAccess-CvCLmUXb.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]="2705c20b-da9c-45f8-b40f-7f3b5286e550",e._sentryDebugIdIdentifier="sentry-dbid-2705c20b-da9c-45f8-b40f-7f3b5286e550")}catch{}})();const L=P((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(H),Q=()=>{const e=_(),t=v(),c=q(),o=p((a=>N(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:m}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=F(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=J({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${m}/dashboard`,replace:!0})};function be(){return s.jsxs(z,{children:[s.jsx(b,{path:"*",element:s.jsx(Q,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
1
+ import{j as s}from"./liveblocks-gNIoHksP.js";import E from"./NotFoundScreen-XQ69x1V9.js";import{a as r}from"./sentry-BzzHvh63.js";import{h as _,g as v,j as p,i as M,u as U,N as O,l as P,n as z,o as b}from"./core-_cqItzd_.js";import{fI as N,a19 as h,bo as B,bn as F,iO as V,gk as $}from"./zeni-epic-state-ClqSlu6d.js";import{c as q,z as I,as as G,dN as H}from"./index-DVhAab8j.js";import"./mui-CDH3xRD_.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-DQSYAHEz.js";import{M as K}from"./MobileAppDrawer-Boi7lIY0.js";import"./recharts-BgEcqT8y.js";import"./analytics-DI5uqxwC.js";import"./plaid-Dvn5Z296.js";import"./dnd-BzHSvmGV.js";import"./stripe-cKAAJElX.js";import"./lottie-CjJcvZ3r.js";import"./lexical-CXRKir6z.js";import"./pdf-BZVEJwNE.js";import"./utils-DZX8_JTm.js";import"./InboxNotificationsProvider-Vlyx5Pej.js";import"./useTaskManagerAccess-CZYVdWyJ.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]="2705c20b-da9c-45f8-b40f-7f3b5286e550",e._sentryDebugIdIdentifier="sentry-dbid-2705c20b-da9c-45f8-b40f-7f3b5286e550")}catch{}})();const L=P((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(H),Q=()=>{const e=_(),t=v(),c=q(),o=p((a=>N(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:m}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=F(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=J({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${m}/dashboard`,replace:!0})};function be(){return s.jsxs(z,{children:[s.jsx(b,{path:"*",element:s.jsx(Q,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
@@ -1 +1 @@
1
- import{a as h,R as a}from"./sentry-CkAdiuiy.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
1
+ import{a as h,R as a}from"./sentry-BzzHvh63.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
@@ -1,4 +1,4 @@
1
- import{j as _l}from"./liveblocks-CgcSlW4Z.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-CkAdiuiy.js";import{L as ge,c0 as xc,fI as kc,U3 as Tc,UV as jl,c9 as xl}from"./zeni-epic-state-DGPmp0NT.js";import{a as pe,b as kl,c as Tl,d as Al,e as un,f as Rl,g as Pl,h as Il,i as Ve,j as Ac,k as ot,l as xt,m as Ll,o as ct,p as Nl}from"./utils-CqmAwzS_.js";import{r as cn}from"./empty-5vTmg9PS.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-ZHcF2OoC.js";import{a as Ye,r as Fl}from"./index-Bqsu77NP.js";import{r as Ul}from"./index-B9mu9yU0.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-BNc5eMdk.js";import{u as Zl,z as Rc,L as Hl,ak as Vl,al as Yl,Y as Wl,I as Kl}from"./index-BuQOQ6cA.js";import"./mui-BCV14xpx.js";import{d as It}from"./decodeURIComponentSafe-BSiJLIqU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="69fca273-6099-4131-ae78-54b16d05e660",e._sentryDebugIdIdentifier="sentry-dbid-69fca273-6099-4131-ae78-54b16d05e660")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
1
+ import{j as _l}from"./liveblocks-gNIoHksP.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-BzzHvh63.js";import{L as ge,c0 as xc,fI as kc,U3 as Tc,UV as jl,c9 as xl}from"./zeni-epic-state-ClqSlu6d.js";import{a as pe,b as kl,c as Tl,d as Al,e as un,f as Rl,g as Pl,h as Il,i as Ve,j as Ac,k as ot,l as xt,m as Ll,o as ct,p as Nl}from"./utils-DZX8_JTm.js";import{r as cn}from"./empty-CTsBwHYQ.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-DnzapqoA.js";import{a as Ye,r as Fl}from"./index-B_Z1rAKT.js";import{r as Ul}from"./index-aNhAY0yh.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-_cqItzd_.js";import{u as Zl,z as Rc,L as Hl,ak as Vl,al as Yl,Y as Wl,I as Kl}from"./index-DVhAab8j.js";import"./mui-CDH3xRD_.js";import{d as It}from"./decodeURIComponentSafe-CzbN3zRu.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="69fca273-6099-4131-ae78-54b16d05e660",e._sentryDebugIdIdentifier="sentry-dbid-69fca273-6099-4131-ae78-54b16d05e660")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
2
2
  `),I=S(E).split(`
3
3
  `),k=0,C="";if(O==="strictEqual"&&l(j)==="object"&&l(E)==="object"&&j!==null&&E!==null&&(O="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var H=R[0].length+I[0].length;if(H<=10){if(!(l(j)==="object"&&j!==null||l(E)==="object"&&E!==null||j===0&&E===0))return"".concat(_[O],`
4
4
 
@@ -1 +1 @@
1
- import{j as r}from"./liveblocks-CgcSlW4Z.js";import Z from"./NotFoundScreen-n2sZiHTP.js";import{a as p}from"./sentry-CkAdiuiy.js";import{h as C,g as N,u as V,j as u,N as D,l as k,n as z,o as g}from"./core-BNc5eMdk.js";import{fI as E,Zf as w,Zw as h,NQ as U,NM as L,NP as f,NF as B,ZV as T,NJ as F,NS as J}from"./zeni-epic-state-DGPmp0NT.js";import{z as $,w as O,ca as K,v as W,bT as M,cb as P}from"./index-BuQOQ6cA.js";import"./mui-BCV14xpx.js";import{u as Q,R as x}from"./ReimbursementApprovalRuleDetailScreen-ChdeAEEo.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]="af8b5e09-34d2-42eb-89fb-e9b3eaa027fa",e._sentryDebugIdIdentifier="sentry-dbid-af8b5e09-34d2-42eb-89fb-e9b3eaa027fa")}catch{}})();const j="reimbursement-approval-rule-update",q=k((function(e){return{approvalView:w(e),remiSetupApproverViewUpdateData:h(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(T(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(O(K)),G=({isLoading:e})=>{const s=C(),n=N(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>w(o))),b=u((o=>h(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,y,I)=>{o.endsWith(j)&&I.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(q,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",H=k((function(e){const s=w(e),n=h(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(T(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(J(t,!0))}}}))(O(P)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=M(e?.tenantId);return s?r.jsx(Y,{isLoading:n}):r.jsx(G,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=N(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>w(i)));Q();const y=u((i=>h(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(R(!0),a(F(!1,!0)))}),[v,b,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,_)=>{i.endsWith(A)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(H,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return r.jsxs(z,{children:[r.jsx(g,{path:"/",element:r.jsx(X,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(Z,{})})]})}export{le as R};
1
+ import{j as r}from"./liveblocks-gNIoHksP.js";import Z from"./NotFoundScreen-XQ69x1V9.js";import{a as p}from"./sentry-BzzHvh63.js";import{h as C,g as N,u as V,j as u,N as D,l as k,n as z,o as g}from"./core-_cqItzd_.js";import{fI as E,Zf as w,Zw as h,NQ as U,NM as L,NP as f,NF as B,ZV as T,NJ as F,NS as J}from"./zeni-epic-state-ClqSlu6d.js";import{z as $,w as O,ca as K,v as W,bT as M,cb as P}from"./index-DVhAab8j.js";import"./mui-CDH3xRD_.js";import{u as Q,R as x}from"./ReimbursementApprovalRuleDetailScreen-DN9la9Dm.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]="af8b5e09-34d2-42eb-89fb-e9b3eaa027fa",e._sentryDebugIdIdentifier="sentry-dbid-af8b5e09-34d2-42eb-89fb-e9b3eaa027fa")}catch{}})();const j="reimbursement-approval-rule-update",q=k((function(e){return{approvalView:w(e),remiSetupApproverViewUpdateData:h(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(T(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(O(K)),G=({isLoading:e})=>{const s=C(),n=N(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>w(o))),b=u((o=>h(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,y,I)=>{o.endsWith(j)&&I.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(q,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",H=k((function(e){const s=w(e),n=h(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(T(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(J(t,!0))}}}))(O(P)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=M(e?.tenantId);return s?r.jsx(Y,{isLoading:n}):r.jsx(G,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=N(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>w(i)));Q();const y=u((i=>h(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(R(!0),a(F(!1,!0)))}),[v,b,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,_)=>{i.endsWith(A)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(H,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return r.jsxs(z,{children:[r.jsx(g,{path:"/",element:r.jsx(X,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(Z,{})})]})}export{le as R};
@@ -1 +1 @@
1
- import{j as h}from"./liveblocks-CgcSlW4Z.js";import{a as f}from"./sentry-CkAdiuiy.js";import{u as U,j as g,h as _,g as O,i as V,l as N}from"./core-BNc5eMdk.js";import{mu as Z,Zw as w,Zf as x,NI as k,NV as B,NQ as A,NR as E,Zx as j,fI as z,NP as K}from"./zeni-epic-state-DGPmp0NT.js";import{z as P,E as F,a7 as $,c1 as Q,v as q,bT as W,c2 as G}from"./index-BuQOQ6cA.js";import"./mui-BCV14xpx.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]="0d0114b9-b179-4dfa-95c2-55b61bd6df61",e._sentryDebugIdIdentifier="sentry-dbid-0d0114b9-b179-4dfa-95c2-55b61bd6df61")}catch{}})();function H(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(Z({})))}),[p,t,e])}const J=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return s.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=v=>{const S=[];return v.forEach((d=>{const I=d.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),R=d.actors.selectedNonUsers.map((m=>{const y=(b=m.value,j(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=I.concat(R);S.push({action:d.stepType.selectedOption,actors:c,operator:c.length>1?d.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(Q);function M(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=P.getSignedInUser(),i=F(),r=g((n=>w(n))),l=g((n=>x(n))),[a,u]=f.useState(!1);if(f.useEffect((()=>{a||(u(!0),s(k(!0)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function pe(e){return j(e)==null}const X=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:i,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:x(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=c=>{const m=[];return c.forEach((y=>{const b=y.actorKind?.selectedOption,L=y.selectedRole?.selectedNonUsers??[];let D=[];b==="role"?D=L.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const C=y.action??"require_approval";m.push({action:C,actors:D,operator:D.length>1?C==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,d={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;d.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(d.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=S?.selection.selectedOptions??[];if(R.length>0&&(d.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(K(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(G);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=W(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(M,{})}function Y(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=P.getSignedInUser(),i=F(),r=g((n=>w(n))),l=g((n=>x(n))),[a,u]=f.useState(!1);if(H(),f.useEffect((()=>{a||(u(!0),s(k(!1)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,pe as i,H as u};
1
+ import{j as h}from"./liveblocks-gNIoHksP.js";import{a as f}from"./sentry-BzzHvh63.js";import{u as U,j as g,h as _,g as O,i as V,l as N}from"./core-_cqItzd_.js";import{mu as Z,Zw as w,Zf as x,NI as k,NV as B,NQ as A,NR as E,Zx as j,fI as z,NP as K}from"./zeni-epic-state-ClqSlu6d.js";import{z as P,E as F,a7 as $,c1 as Q,v as q,bT as W,c2 as G}from"./index-DVhAab8j.js";import"./mui-CDH3xRD_.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]="0d0114b9-b179-4dfa-95c2-55b61bd6df61",e._sentryDebugIdIdentifier="sentry-dbid-0d0114b9-b179-4dfa-95c2-55b61bd6df61")}catch{}})();function H(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(Z({})))}),[p,t,e])}const J=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return s.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=v=>{const S=[];return v.forEach((d=>{const I=d.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),R=d.actors.selectedNonUsers.map((m=>{const y=(b=m.value,j(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=I.concat(R);S.push({action:d.stepType.selectedOption,actors:c,operator:c.length>1?d.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(Q);function M(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=P.getSignedInUser(),i=F(),r=g((n=>w(n))),l=g((n=>x(n))),[a,u]=f.useState(!1);if(f.useEffect((()=>{a||(u(!0),s(k(!0)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function pe(e){return j(e)==null}const X=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:i,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:x(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=c=>{const m=[];return c.forEach((y=>{const b=y.actorKind?.selectedOption,L=y.selectedRole?.selectedNonUsers??[];let D=[];b==="role"?D=L.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const C=y.action??"require_approval";m.push({action:C,actors:D,operator:D.length>1?C==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,d={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;d.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(d.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=S?.selection.selectedOptions??[];if(R.length>0&&(d.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(K(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(G);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=W(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(M,{})}function Y(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=P.getSignedInUser(),i=F(),r=g((n=>w(n))),l=g((n=>x(n))),[a,u]=f.useState(!1);if(H(),f.useEffect((()=>{a||(u(!0),s(k(!1)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,pe as i,H as u};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-CgcSlW4Z.js";import{u as ne,j as R,h as Q,g as J,i as se,N as P,l as X,q as lt,n as mt,o as x}from"./core-BNc5eMdk.js";import{fI as V,NM as ct,__ as be,c9 as ge,MS as $e,md as dt,N5 as me,N4 as ce,_$ as ut,bn as he,gY as Ue,$0 as pt,WZ as bt,m2 as Fe,W_ as Ae,W$ as gt,kQ as ht,Z1 as ft,l3 as St,MG as It,Cj as yt,kX as vt,Nr as Le,$1 as Me,$2 as Re,$3 as kt,$4 as At,$5 as Rt,Nb as Ce,l9 as Ct,Za as wt,N3 as xt,MQ as Et,$6 as Bt,MP as Tt,$7 as Dt,MX as we,Nf as jt,Ne as $t,Na as Ut,$8 as Ne,Sp as Ft,bo as Lt,M_ as Mt,NJ as Nt,$9 as Pt,$a as _t,Nn as Ot,Nk as xe,Yx as Zt,MN as zt,$b as Pe,Oa as Ee,Oi as Gt,$c as Vt,$d as Y,$e as Wt,$f as _e,$g as Ht,$h as Oe,$i as Ze,Nz as de,bv as qt,bL as fe,cN as Se,e0 as ze,d$ as Ge,$j as Yt,gk as Kt,YK as Jt,$k as Qt,$l as Ve,YO as Xt,Zw as en,$m as tn,ZV as nn,Of as Be,Oe as an,$n as sn,$o as on,$p as rn,$q as ln,$r as mn,Zg as cn,O5 as dn,O9 as un,bq as pn,bK as bn,cH as gn,cv as hn,bu as fn,Uo as Sn,db as In,de as yn,dd as vn,cG as kn}from"./zeni-epic-state-DGPmp0NT.js";import{bT as An,c as We,a1 as He,_ as ie,f as j,z as F,cS as qe,a8 as oe,n as C,aS as Te,M as D,ae,af as Rn,G as Ye,cT as Cn,p as K,as as Ke,cU as wn,P as re,cV as xn,aq as En,ab as Bn,a7 as Ie,T as Je,w as Tn,bB as Dn,av as jn,ai as $n,E as Qe,cW as Un,j as Fn}from"./index-BuQOQ6cA.js";import{n as _,S as Ln}from"./mui-BCV14xpx.js";import ue from"./NotFoundScreen-n2sZiHTP.js";import{S as De}from"./SetupPagesScreen-CUMRQWyq.js";import{F as Xe}from"./FeaturePreviewScreen-pBtwBr_N.js";import{a as f}from"./sentry-CkAdiuiy.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-BAZ88gr3.js";import{u as et}from"./useInitialThreadRequest-BLqSoxJq.js";import{D as Mn}from"./DrawerScreen-Cc5wz0h5.js";import{M as tt}from"./MobileAppDrawer-jc7oeqcf.js";import{F as Nn}from"./ScreenRoutes-BrOWRtN9.js";import{R as Pn}from"./ReimbursementApprovalRoutes-BQnKvM2a.js";import"./recharts-B1fIlvhf.js";import"./analytics-DzL27tck.js";import"./plaid-BGKcPjuF.js";import"./dnd-0zxechDA.js";import"./stripe-cKAAJElX.js";import"./lottie-VLEWAz4K.js";import"./lexical-BSajFjJy.js";import"./pdf-fIozDtKP.js";import"./utils-CqmAwzS_.js";import"./BusinessVerificationPageScreen-0_5o_ZM_.js";import"./routePaths-Fw-tznCi.js";import"./analyticsHelper-Dbh_ZdOH.js";import"./InboxNotificationsProvider-acJ-mQYX.js";import"./useTaskManagerAccess-CvCLmUXb.js";import"./getLocaleForTenant-DE5c6zm1.js";import"./ReimbursementApprovalRuleDetailScreen-ChdeAEEo.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]="708634ce-e35a-4eee-a62e-e634f0516f1c",e._sentryDebugIdIdentifier="sentry-dbid-708634ce-e35a-4eee-a62e-e634f0516f1c")}catch{}})();const nt=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:te}}}=Ye.getLocalizedStrings(),On=X((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),c=F.getSignedInUser(),d=he(c),m=r.plaidConnectionDetails,o=Ue(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=be(e,t.reimbursementId),b=pt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,u=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=c?.userId===l.createdBy?.userId);const E=e.entityAutoCompleteState?.autoCompleteText?.common,I=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:E,entityAutoCompleteView:I},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:ge(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Fe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=F.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ce(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(we(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(we(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Tt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Bt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Et({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(xt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ce(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(wt({data:l}))},onFetchBankName:i=>{e(Ct(i))},submitRemiDetails:()=>{e(Ce("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Re({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(me({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Rt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Me()),e(Re({}));const i=nt(o),l=K(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(Cn);function je(){const e=Q(),t=ne(),n=J(),{reimbursementId:r}=se(),c=We(),d=He(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ie(),{isFeatureEnabled:b}=l(j.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(j.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:u,onAskAiCfoClick:E}=ye({mobileExploreReferrer:"Reimbursement Details"}),I=J().pathname,B=I.includes("edit"),T=I.includes("reimbursement/new"),[v,w]=f.useState(!1),h=F.getSignedInUser(),k=R((p=>V(p))),g=R((p=>be(p,r))),L=et(k?.companyId,{clearParams:g.fetchState==="Completed"}),$=ge(k?.userRole??[]);(function(){const p=ne(),M=R((N=>V(N))),O=M?.tenantId,{isApprovalRulesV3Enabled:W,isLoading:Z}=An(O),H=R((N=>N.remiSetupApproverViewState.fetchState));f.useEffect((()=>{O==null||Z||H==="Not-Started"&&p(ct(!0,!1,!1,W))}),[O,Z,W,H,p])})(),f.useEffect((()=>{(T&&!v||B&&!v&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(w(!0),t($e(!1,b,y,r)))}));const U=R((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(h==null)throw Error("Can't access address page without signing in...");const A={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||$&&g.billStatus==="rejected"||$===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(P,{to:A}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(qe,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(oe,{analytics:C,onLoad:p=>(M=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(zn,{}):null,m&&d!=="small"?s.jsx(Gn,{children:s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:k?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Vn,{children:[s.jsx(Wn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:k?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Hn,{windowSize:d,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,location:n,navigate:e,currentTenant:k,reimbursementId:r,themeState:c,uncategorizedAccounts:U,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:u,onAskAiCfoClick:E})})]})}const Zn=_.div`
1
+ import{j as s}from"./liveblocks-gNIoHksP.js";import{u as ne,j as R,h as Q,g as J,i as se,N as P,l as X,q as lt,n as mt,o as x}from"./core-_cqItzd_.js";import{fI as V,NM as ct,__ as be,c9 as ge,MS as $e,md as dt,N5 as me,N4 as ce,_$ as ut,bn as he,gY as Ue,$0 as pt,WZ as bt,m2 as Fe,W_ as Ae,W$ as gt,kQ as ht,Z1 as ft,l3 as St,MG as It,Cj as yt,kX as vt,Nr as Le,$1 as Me,$2 as Re,$3 as kt,$4 as At,$5 as Rt,Nb as Ce,l9 as Ct,Za as wt,N3 as xt,MQ as Et,$6 as Bt,MP as Tt,$7 as Dt,MX as we,Nf as jt,Ne as $t,Na as Ut,$8 as Ne,Sp as Ft,bo as Lt,M_ as Mt,NJ as Nt,$9 as Pt,$a as _t,Nn as Ot,Nk as xe,Yx as Zt,MN as zt,$b as Pe,Oa as Ee,Oi as Gt,$c as Vt,$d as Y,$e as Wt,$f as _e,$g as Ht,$h as Oe,$i as Ze,Nz as de,bv as qt,bL as fe,cN as Se,e0 as ze,d$ as Ge,$j as Yt,gk as Kt,YK as Jt,$k as Qt,$l as Ve,YO as Xt,Zw as en,$m as tn,ZV as nn,Of as Be,Oe as an,$n as sn,$o as on,$p as rn,$q as ln,$r as mn,Zg as cn,O5 as dn,O9 as un,bq as pn,bK as bn,cH as gn,cv as hn,bu as fn,Uo as Sn,db as In,de as yn,dd as vn,cG as kn}from"./zeni-epic-state-ClqSlu6d.js";import{bT as An,c as We,a1 as He,_ as ie,f as j,z as F,cS as qe,a8 as oe,n as C,aS as Te,M as D,ae,af as Rn,G as Ye,cT as Cn,p as K,as as Ke,cU as wn,P as re,cV as xn,aq as En,ab as Bn,a7 as Ie,T as Je,w as Tn,bB as Dn,av as jn,ai as $n,E as Qe,cW as Un,j as Fn}from"./index-DVhAab8j.js";import{n as _,S as Ln}from"./mui-CDH3xRD_.js";import ue from"./NotFoundScreen-XQ69x1V9.js";import{S as De}from"./SetupPagesScreen-PMDfztMD.js";import{F as Xe}from"./FeaturePreviewScreen-ADHB7kMI.js";import{a as f}from"./sentry-BzzHvh63.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-DQSYAHEz.js";import{u as et}from"./useInitialThreadRequest-CSR_bJDf.js";import{D as Mn}from"./DrawerScreen-bhsbfXgO.js";import{M as tt}from"./MobileAppDrawer-Boi7lIY0.js";import{F as Nn}from"./ScreenRoutes-DSM6zpE1.js";import{R as Pn}from"./ReimbursementApprovalRoutes-BoJxAtXM.js";import"./recharts-BgEcqT8y.js";import"./analytics-DI5uqxwC.js";import"./plaid-Dvn5Z296.js";import"./dnd-BzHSvmGV.js";import"./stripe-cKAAJElX.js";import"./lottie-CjJcvZ3r.js";import"./lexical-CXRKir6z.js";import"./pdf-BZVEJwNE.js";import"./utils-DZX8_JTm.js";import"./BusinessVerificationPageScreen-CaVy5wIy.js";import"./routePaths-DM8AEJT0.js";import"./analyticsHelper-Df3DOmUB.js";import"./InboxNotificationsProvider-Vlyx5Pej.js";import"./useTaskManagerAccess-CZYVdWyJ.js";import"./getLocaleForTenant-DNtLZSig.js";import"./ReimbursementApprovalRuleDetailScreen-DN9la9Dm.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]="708634ce-e35a-4eee-a62e-e634f0516f1c",e._sentryDebugIdIdentifier="sentry-dbid-708634ce-e35a-4eee-a62e-e634f0516f1c")}catch{}})();const nt=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:te}}}=Ye.getLocalizedStrings(),On=X((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),c=F.getSignedInUser(),d=he(c),m=r.plaidConnectionDetails,o=Ue(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=be(e,t.reimbursementId),b=pt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,u=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=c?.userId===l.createdBy?.userId);const E=e.entityAutoCompleteState?.autoCompleteText?.common,I=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:E,entityAutoCompleteView:I},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:ge(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Fe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=F.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ce(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(we(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(we(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Tt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Bt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Et({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(xt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ce(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(wt({data:l}))},onFetchBankName:i=>{e(Ct(i))},submitRemiDetails:()=>{e(Ce("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Re({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(me({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Rt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Me()),e(Re({}));const i=nt(o),l=K(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(Cn);function je(){const e=Q(),t=ne(),n=J(),{reimbursementId:r}=se(),c=We(),d=He(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ie(),{isFeatureEnabled:b}=l(j.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(j.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:u,onAskAiCfoClick:E}=ye({mobileExploreReferrer:"Reimbursement Details"}),I=J().pathname,B=I.includes("edit"),T=I.includes("reimbursement/new"),[v,w]=f.useState(!1),h=F.getSignedInUser(),k=R((p=>V(p))),g=R((p=>be(p,r))),L=et(k?.companyId,{clearParams:g.fetchState==="Completed"}),$=ge(k?.userRole??[]);(function(){const p=ne(),M=R((N=>V(N))),O=M?.tenantId,{isApprovalRulesV3Enabled:W,isLoading:Z}=An(O),H=R((N=>N.remiSetupApproverViewState.fetchState));f.useEffect((()=>{O==null||Z||H==="Not-Started"&&p(ct(!0,!1,!1,W))}),[O,Z,W,H,p])})(),f.useEffect((()=>{(T&&!v||B&&!v&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(w(!0),t($e(!1,b,y,r)))}));const U=R((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(h==null)throw Error("Can't access address page without signing in...");const A={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||$&&g.billStatus==="rejected"||$===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(P,{to:A}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(qe,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(oe,{analytics:C,onLoad:p=>(M=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(zn,{}):null,m&&d!=="small"?s.jsx(Gn,{children:s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:k?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Vn,{children:[s.jsx(Wn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:k?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Hn,{windowSize:d,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,location:n,navigate:e,currentTenant:k,reimbursementId:r,themeState:c,uncategorizedAccounts:U,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:u,onAskAiCfoClick:E})})]})}const Zn=_.div`
2
2
  display: flex;
3
3
  position: relative;
4
4
  height: 100vh;
@@ -1 +1 @@
1
- import{j as p}from"./liveblocks-CgcSlW4Z.js";import{g as Q,h as Ve,u as Fe,i as Oe,j as d,l as De,n as Ae,o as W}from"./core-BNc5eMdk.js";import{fI as q,Eh as R,UW as Pe,m2 as ne,ug as re,v5 as D,lJ as Ee,lS as A,lK as P,kN as E,kE as L,kD as Le,Dp as le,va as Me,bq as Be,UX as ve,bn as Ue,EE as xe,UY as ze,UZ as Ge,cj as g,Di as Ye,U_ as X,U$ as He,V0 as Ne,V1 as qe,V2 as $e,V3 as Ze,V4 as Je,V5 as Ke,V6 as Qe,V7 as We,V8 as Xe,V9 as ea,Va as aa,Vb as j,Vc as M,Vd as B,Ve as v,Vf as U,Vg as x,Vh as z,Vi as G,Vj as Y,Vk as H,ek as sa,Ei as ta,E5 as ee,E6 as ae,Eo as oa,Ea as se,Eu as na,Vl as ra,Vm as la,Vn as ca,Vo as ia,Vp as da,Vq as pa,Vr as _a,Vs as fa,Vt as ma,Vu as ua,e0 as ba,d$ as ha}from"./zeni-epic-state-DGPmp0NT.js";import{an as ya,ao as wa,ap as Ca,a as Sa,a1 as ga,_ as ce,f as ie,z as de,aq as Ia,P as Ra,e as Ta,ar as ja,as as ka,a8 as Va,n as N,T as Fa,B as Oa,p as pe,at as Da,au as Aa,av as Pa}from"./index-BuQOQ6cA.js";import"./mui-BCV14xpx.js";import Ea from"./NotFoundScreen-n2sZiHTP.js";import{F as La}from"./FeaturePreviewScreen-pBtwBr_N.js";import{a as u}from"./sentry-CkAdiuiy.js";import{u as Ma}from"./useInitialThreadRequest-BLqSoxJq.js";import{t as te,a as oe,b as Ba}from"./routePaths-Fw-tznCi.js";import{M as va}from"./MobileAppDrawer-jc7oeqcf.js";import"./recharts-B1fIlvhf.js";import"./analytics-DzL27tck.js";import"./plaid-BGKcPjuF.js";import"./dnd-0zxechDA.js";import"./stripe-cKAAJElX.js";import"./lottie-VLEWAz4K.js";import"./lexical-BSajFjJy.js";import"./pdf-fIozDtKP.js";import"./utils-CqmAwzS_.js";import"./InboxNotificationsProvider-acJ-mQYX.js";import"./useTaskManagerAccess-CvCLmUXb.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="52ddcbcf-bf6e-48ab-86f3-f66ae2c8c263",e._sentryDebugIdIdentifier="sentry-dbid-52ddcbcf-bf6e-48ab-86f3-f66ae2c8c263")}catch{}})();const Ua=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(H({resetLeftScroll:!0})),e(Y({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(U({resetLeftScroll:!0})),e(M({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(B({resetLeftScroll:!0}))},xa=e=>{e(la()),e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua())},za=De((function(e){const o=de.getSignedInUser(),_=e.tenantState.currentTenantId,m=q(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:Ue(o),showAccountGroups:r===!0,isAccountingClassesEnabled:ne(e),isAccountingProjectsEnabled:re(e),currentTenantCompanyName:a,statementEndPoint:`${Pa}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ra(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(na(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(ee(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(ae(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(I(a)||g(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(se({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(X({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(se(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(oa(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(ee(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ae(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(ta({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=sa(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return oe(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ba(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?oe(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=pe(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:k(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(H({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(U({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(B({scrollPosition:s}));break;case"cash_flow":e(M({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(U({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=g(t);l?(e(Ke({viewMode:a})),e(Qe({viewMode:a}))):r?(e(We({viewMode:a})),e(Xe({viewMode:a}))):(e(ea({viewMode:a})),e(aa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",k(t)),e(j(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",k(t)),e(j(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",k(t)),e(j(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{g(o.selectedReportID)?e($e({classesToFilterOut:a})):I(o.selectedReportID)?e(Ze({classesToFilterOut:a})):e(Je({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{g(o.selectedReportID)?e(He({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(X({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=g(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?L():Ye()),o.isAccountingProjectsEnabled&&e(s?A():a?E():le())},onUpdateDisplayOrder:a=>{e(Ge(a))},onUpdateReportFormat:a=>{xa(e),e(ze(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?xe(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):L(!0))}}}))(Da);function Ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=ga(),m=Aa(_),a=Ve(),s=Fe(),t=Q(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=ce(),{isFeatureEnabled:f}=l(ie.isReportsHorizontalClassLayoutSwitchEnabled),i=de.getSignedInUser(),[c,w]=u.useState(!1),[$,_e]=u.useState(!1);if(i==null)throw Error("Can't access reports page without signing in...");const V=d((n=>q(n))),fe=V.masterTOSInfo?.isMasterTOSAccepted??!1,me=V.company?.companyInfo.firstMonthOfFY??1,ue=Ma(V?.companyId),C=d((n=>R(n).fetchState)),be=d((n=>Pe(n))),{areTenantIdsInSync:b}=Ia(),F=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>ne(n))),S=d((n=>re(n))),he=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),ye=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(w(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!$&&C==="Completed"&&b&&(s(D(i.userId,!1,!0,!1)),_e(!0))}),[c,$,C,b]),u.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(F){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":S&&s(le());break;case"balance_sheet":s(Le(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":S&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":S&&s(A());break;case"cash_flow":s(Ee(h.timeframe))}}),[c,F,O,b,T,S]);const Z=Ra(),we=Z?.loggedInUserRole!=null&&Be(Z?.loggedInUserRole)!==!0,[Ce,Se]=u.useState(!1),J=n=>{Se(n)},ge=Ta(),Ie=ja();return(function(n){const{isDataReady:Re}=n,{pathname:Te}=Q(),K=ya(Te??"")==="reports",je=wa(Re),ke=u.useMemo((()=>K?Ua:void 0),[K]);Ca({canFetchSuggestedQuestions:je,pageContexts:ke})})({isDataReady:C==="Completed"}),ka({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(Va,{analytics:N,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(va,{isAppContentDrawerOpen:Ce,handleDrawerToggle:J}),p.jsx(za,{firstMonthOfFY:me,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:ye,selectedReportID:F,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:S,isCompareModeOn:he,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:J,reportsResyncFetchState:be.reportsResyncFetchState,isAiCfoAccessEnabled:Ie&&ge&&!e,onAskAiCfoClick:()=>{if(fe)if(m){const n=pe(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,initialOpenThreadRequest:ue})]})}const k=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function ps(){const e=d((s=>q(s))),{useFeatureGate:o}=ce(),{isFeatureEnabled:_}=o(ie.isDebitCardFeatureEnabled),m=ba(_,e),a=ha(e);return m===!0||a===!0?p.jsx(La,{}):p.jsxs(Ae,{children:[p.jsx(W,{path:"/",element:p.jsx(Ga,{})}),p.jsx(W,{path:"*",element:p.jsx(Ea,{})})]})}export{ps as default};
1
+ import{j as p}from"./liveblocks-gNIoHksP.js";import{g as Q,h as Ve,u as Fe,i as Oe,j as d,l as De,n as Ae,o as W}from"./core-_cqItzd_.js";import{fI as q,Eh as R,UW as Pe,m2 as ne,ug as re,v5 as D,lJ as Ee,lS as A,lK as P,kN as E,kE as L,kD as Le,Dp as le,va as Me,bq as Be,UX as ve,bn as Ue,EE as xe,UY as ze,UZ as Ge,cj as g,Di as Ye,U_ as X,U$ as He,V0 as Ne,V1 as qe,V2 as $e,V3 as Ze,V4 as Je,V5 as Ke,V6 as Qe,V7 as We,V8 as Xe,V9 as ea,Va as aa,Vb as j,Vc as M,Vd as B,Ve as v,Vf as U,Vg as x,Vh as z,Vi as G,Vj as Y,Vk as H,ek as sa,Ei as ta,E5 as ee,E6 as ae,Eo as oa,Ea as se,Eu as na,Vl as ra,Vm as la,Vn as ca,Vo as ia,Vp as da,Vq as pa,Vr as _a,Vs as fa,Vt as ma,Vu as ua,e0 as ba,d$ as ha}from"./zeni-epic-state-ClqSlu6d.js";import{an as ya,ao as wa,ap as Ca,a as Sa,a1 as ga,_ as ce,f as ie,z as de,aq as Ia,P as Ra,e as Ta,ar as ja,as as ka,a8 as Va,n as N,T as Fa,B as Oa,p as pe,at as Da,au as Aa,av as Pa}from"./index-DVhAab8j.js";import"./mui-CDH3xRD_.js";import Ea from"./NotFoundScreen-XQ69x1V9.js";import{F as La}from"./FeaturePreviewScreen-ADHB7kMI.js";import{a as u}from"./sentry-BzzHvh63.js";import{u as Ma}from"./useInitialThreadRequest-CSR_bJDf.js";import{t as te,a as oe,b as Ba}from"./routePaths-DM8AEJT0.js";import{M as va}from"./MobileAppDrawer-Boi7lIY0.js";import"./recharts-BgEcqT8y.js";import"./analytics-DI5uqxwC.js";import"./plaid-Dvn5Z296.js";import"./dnd-BzHSvmGV.js";import"./stripe-cKAAJElX.js";import"./lottie-CjJcvZ3r.js";import"./lexical-CXRKir6z.js";import"./pdf-BZVEJwNE.js";import"./utils-DZX8_JTm.js";import"./InboxNotificationsProvider-Vlyx5Pej.js";import"./useTaskManagerAccess-CZYVdWyJ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="52ddcbcf-bf6e-48ab-86f3-f66ae2c8c263",e._sentryDebugIdIdentifier="sentry-dbid-52ddcbcf-bf6e-48ab-86f3-f66ae2c8c263")}catch{}})();const Ua=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(H({resetLeftScroll:!0})),e(Y({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(U({resetLeftScroll:!0})),e(M({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(B({resetLeftScroll:!0}))},xa=e=>{e(la()),e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua())},za=De((function(e){const o=de.getSignedInUser(),_=e.tenantState.currentTenantId,m=q(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:Ue(o),showAccountGroups:r===!0,isAccountingClassesEnabled:ne(e),isAccountingProjectsEnabled:re(e),currentTenantCompanyName:a,statementEndPoint:`${Pa}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ra(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(na(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(ee(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(ae(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(I(a)||g(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(se({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(X({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(se(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(oa(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(ee(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ae(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(ta({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=sa(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return oe(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ba(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?oe(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=pe(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:k(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(H({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(U({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(B({scrollPosition:s}));break;case"cash_flow":e(M({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(U({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=g(t);l?(e(Ke({viewMode:a})),e(Qe({viewMode:a}))):r?(e(We({viewMode:a})),e(Xe({viewMode:a}))):(e(ea({viewMode:a})),e(aa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",k(t)),e(j(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",k(t)),e(j(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",k(t)),e(j(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{g(o.selectedReportID)?e($e({classesToFilterOut:a})):I(o.selectedReportID)?e(Ze({classesToFilterOut:a})):e(Je({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{g(o.selectedReportID)?e(He({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(X({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=g(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?L():Ye()),o.isAccountingProjectsEnabled&&e(s?A():a?E():le())},onUpdateDisplayOrder:a=>{e(Ge(a))},onUpdateReportFormat:a=>{xa(e),e(ze(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?xe(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):L(!0))}}}))(Da);function Ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=ga(),m=Aa(_),a=Ve(),s=Fe(),t=Q(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=ce(),{isFeatureEnabled:f}=l(ie.isReportsHorizontalClassLayoutSwitchEnabled),i=de.getSignedInUser(),[c,w]=u.useState(!1),[$,_e]=u.useState(!1);if(i==null)throw Error("Can't access reports page without signing in...");const V=d((n=>q(n))),fe=V.masterTOSInfo?.isMasterTOSAccepted??!1,me=V.company?.companyInfo.firstMonthOfFY??1,ue=Ma(V?.companyId),C=d((n=>R(n).fetchState)),be=d((n=>Pe(n))),{areTenantIdsInSync:b}=Ia(),F=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>ne(n))),S=d((n=>re(n))),he=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),ye=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(w(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!$&&C==="Completed"&&b&&(s(D(i.userId,!1,!0,!1)),_e(!0))}),[c,$,C,b]),u.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(F){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":S&&s(le());break;case"balance_sheet":s(Le(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":S&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":S&&s(A());break;case"cash_flow":s(Ee(h.timeframe))}}),[c,F,O,b,T,S]);const Z=Ra(),we=Z?.loggedInUserRole!=null&&Be(Z?.loggedInUserRole)!==!0,[Ce,Se]=u.useState(!1),J=n=>{Se(n)},ge=Ta(),Ie=ja();return(function(n){const{isDataReady:Re}=n,{pathname:Te}=Q(),K=ya(Te??"")==="reports",je=wa(Re),ke=u.useMemo((()=>K?Ua:void 0),[K]);Ca({canFetchSuggestedQuestions:je,pageContexts:ke})})({isDataReady:C==="Completed"}),ka({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(Va,{analytics:N,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(va,{isAppContentDrawerOpen:Ce,handleDrawerToggle:J}),p.jsx(za,{firstMonthOfFY:me,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:ye,selectedReportID:F,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:S,isCompareModeOn:he,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:J,reportsResyncFetchState:be.reportsResyncFetchState,isAiCfoAccessEnabled:Ie&&ge&&!e,onAskAiCfoClick:()=>{if(fe)if(m){const n=pe(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,initialOpenThreadRequest:ue})]})}const k=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function ps(){const e=d((s=>q(s))),{useFeatureGate:o}=ce(),{isFeatureEnabled:_}=o(ie.isDebitCardFeatureEnabled),m=ba(_,e),a=ha(e);return m===!0||a===!0?p.jsx(La,{}):p.jsxs(Ae,{children:[p.jsx(W,{path:"/",element:p.jsx(Ga,{})}),p.jsx(W,{path:"*",element:p.jsx(Ea,{})})]})}export{ps as default};
@@ -1 +1 @@
1
- import{j as a}from"./liveblocks-CgcSlW4Z.js";import{z as b,a8 as N,n as d,T as S,e2 as E,_ as I,f as k}from"./index-BuQOQ6cA.js";import"./mui-BCV14xpx.js";import g from"./NotFoundScreen-n2sZiHTP.js";import{a as m}from"./sentry-CkAdiuiy.js";import{u as C,j as h,h as F,g as L,l as T,n as _,o as f,N as y}from"./core-BNc5eMdk.js";import{fI as U,a28 as w,a29 as p,DY as P,q2 as V,a2a as q,DW as z}from"./zeni-epic-state-DGPmp0NT.js";import"./recharts-B1fIlvhf.js";import"./analytics-DzL27tck.js";import"./plaid-BGKcPjuF.js";import"./dnd-0zxechDA.js";import"./stripe-cKAAJElX.js";import"./lottie-VLEWAz4K.js";import"./lexical-BSajFjJy.js";import"./pdf-fIozDtKP.js";import"./utils-CqmAwzS_.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]="a51a029c-ab90-4425-8100-4b47acfce802",e._sentryDebugIdIdentifier="sentry-dbid-a51a029c-ab90-4425-8100-4b47acfce802")}catch{}})();const G=T((function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),d.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&d.trackInviteEmailClicked("cancel")}}}))(E),R=()=>{const e=C(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=h((o=>U(o))),c=F(),j=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>w(o))),x=u?.firstName!=null?u.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),m.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(N,{analytics:d,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:c,location:j,currentTenant:r,companyName:D,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(k.isReferralFeatureEnabled);return a.jsxs(_,{children:[a.jsx(f,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(R,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
1
+ import{j as a}from"./liveblocks-gNIoHksP.js";import{z as b,a8 as N,n as d,T as S,e2 as E,_ as I,f as k}from"./index-DVhAab8j.js";import"./mui-CDH3xRD_.js";import g from"./NotFoundScreen-XQ69x1V9.js";import{a as m}from"./sentry-BzzHvh63.js";import{u as C,j as h,h as F,g as L,l as T,n as _,o as f,N as y}from"./core-_cqItzd_.js";import{fI as U,a28 as w,a29 as p,DY as P,q2 as V,a2a as q,DW as z}from"./zeni-epic-state-ClqSlu6d.js";import"./recharts-BgEcqT8y.js";import"./analytics-DI5uqxwC.js";import"./plaid-Dvn5Z296.js";import"./dnd-BzHSvmGV.js";import"./stripe-cKAAJElX.js";import"./lottie-CjJcvZ3r.js";import"./lexical-CXRKir6z.js";import"./pdf-BZVEJwNE.js";import"./utils-DZX8_JTm.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]="a51a029c-ab90-4425-8100-4b47acfce802",e._sentryDebugIdIdentifier="sentry-dbid-a51a029c-ab90-4425-8100-4b47acfce802")}catch{}})();const G=T((function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),d.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&d.trackInviteEmailClicked("cancel")}}}))(E),R=()=>{const e=C(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=h((o=>U(o))),c=F(),j=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>w(o))),x=u?.firstName!=null?u.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),m.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(N,{analytics:d,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:c,location:j,currentTenant:r,companyName:D,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(k.isReferralFeatureEnabled);return a.jsxs(_,{children:[a.jsx(f,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(R,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
@@ -1,4 +1,4 @@
1
- import{j as k}from"./liveblocks-CgcSlW4Z.js";import{a as A}from"./sentry-CkAdiuiy.js";import{i as G,u as H,h as Q,g as ee,j as h,l as te}from"./core-BNc5eMdk.js";import{WU as Fe,WV as Ve,m2 as ae,sA as Me,sM as Ge,t0 as $e,s_ as Re,t1 as Ke,t3 as Ue,WW as Ye,fI as K,VT as pe,WX as Se,h1 as ne,cC as se,cD as le,Fm as ve,WY as Ce,Fq as We,gR as ce,sD as qe,tc as ze,dE as Ze,dD as Xe,Tf as fe,Fk as He,Fe as Qe,WZ as De,F6 as et,F5 as tt,F0 as at,Fb as nt,Fr as st,W_ as Y,W$ as ge,F7 as lt,VU as oe,FH as Ae,FA as Ie,X0 as xe,sG as Te,Fu as Be,Fs as Le,X1 as we,FO as Je,FL as be,Fv as je,FN as _e}from"./zeni-epic-state-DGPmp0NT.js";import{a4 as de,aY as ie,aZ as ct,z as ot,m as dt,a7 as it,a8 as ue,n as N,av as ut,a_ as rt,p as V,G as ye,c as ke,a$ as ht,b0 as mt,b1 as pt}from"./index-BuQOQ6cA.js";import{n as re}from"./mui-BCV14xpx.js";import{p as St}from"./pathToGoBack-Ct0_tDyX.js";import X from"./NotFoundScreen-n2sZiHTP.js";import{c as M}from"./routePaths-Fw-tznCi.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]="8c590aff-206b-4419-8d97-20e18140e1d5",e._sentryDebugIdIdentifier="sentry-dbid-8c590aff-206b-4419-8d97-20e18140e1d5")}catch{}})();function Rt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=G(),l=t??s,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Fe(u,l??""))),p=h((u=>Ve(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{l!=null&&d==null&&m.fetchState==="Not-Started"&&n(Me(l))}),[l,d,m.fetchState]),A.useEffect((()=>{n(Ge({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?k.jsx(X,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?k.jsx(ie,{}):k.jsx(X,{}):k.jsx(ft,{children:k.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(Ye({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(l,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n(Re(l,u,r))},onSkip:(u,r)=>{n($e(l,u,r))}})})}const ft=re.div`
1
+ import{j as k}from"./liveblocks-gNIoHksP.js";import{a as A}from"./sentry-BzzHvh63.js";import{i as G,u as H,h as Q,g as ee,j as h,l as te}from"./core-_cqItzd_.js";import{WU as Fe,WV as Ve,m2 as ae,sA as Me,sM as Ge,t0 as $e,s_ as Re,t1 as Ke,t3 as Ue,WW as Ye,fI as K,VT as pe,WX as Se,h1 as ne,cC as se,cD as le,Fm as ve,WY as Ce,Fq as We,gR as ce,sD as qe,tc as ze,dE as Ze,dD as Xe,Tf as fe,Fk as He,Fe as Qe,WZ as De,F6 as et,F5 as tt,F0 as at,Fb as nt,Fr as st,W_ as Y,W$ as ge,F7 as lt,VU as oe,FH as Ae,FA as Ie,X0 as xe,sG as Te,Fu as Be,Fs as Le,X1 as we,FO as Je,FL as be,Fv as je,FN as _e}from"./zeni-epic-state-ClqSlu6d.js";import{a4 as de,aY as ie,aZ as ct,z as ot,m as dt,a7 as it,a8 as ue,n as N,av as ut,a_ as rt,p as V,G as ye,c as ke,a$ as ht,b0 as mt,b1 as pt}from"./index-DVhAab8j.js";import{n as re}from"./mui-CDH3xRD_.js";import{p as St}from"./pathToGoBack-DqZRBX-C.js";import X from"./NotFoundScreen-XQ69x1V9.js";import{c as M}from"./routePaths-DM8AEJT0.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]="8c590aff-206b-4419-8d97-20e18140e1d5",e._sentryDebugIdIdentifier="sentry-dbid-8c590aff-206b-4419-8d97-20e18140e1d5")}catch{}})();function Rt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=G(),l=t??s,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Fe(u,l??""))),p=h((u=>Ve(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{l!=null&&d==null&&m.fetchState==="Not-Started"&&n(Me(l))}),[l,d,m.fetchState]),A.useEffect((()=>{n(Ge({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?k.jsx(X,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?k.jsx(ie,{}):k.jsx(X,{}):k.jsx(ft,{children:k.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(Ye({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(l,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n(Re(l,u,r))},onSkip:(u,r)=>{n($e(l,u,r))}})})}const ft=re.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-n2sZiHTP.js","assets/sentry-CkAdiuiy.js","assets/core-BNc5eMdk.js","assets/zeni-epic-state-DGPmp0NT.js","assets/index-BuQOQ6cA.js","assets/mui-BCV14xpx.js","assets/analytics-DzL27tck.js","assets/utils-CqmAwzS_.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-fO2Q95Pi.js","assets/withTransactionSidePanel-D7Qark8_.js","assets/useAskAiCfoHostNavButtonProps-BAZ88gr3.js","assets/TransactionDetailScreen-mapOUu_X.js","assets/decodeURIComponentSafe-BSiJLIqU.js","assets/useInitialThreadRequest-BLqSoxJq.js","assets/routePaths-Fw-tznCi.js","assets/expenseAutomationHelper-BNtWlCNK.js","assets/stripSplatSuffix-0Sr2Qpml.js","assets/analyticsHelper-Dbh_ZdOH.js","assets/CompanyPassportScreen-Cc-A-J9-.js","assets/MobileAppDrawer-jc7oeqcf.js","assets/InboxNotificationsProvider-acJ-mQYX.js","assets/useTaskManagerAccess-CvCLmUXb.js","assets/useAiCfoDashboardSuggestedQuestionsChips-Dl7t0rfD.js","assets/FeaturePreviewScreen-pBtwBr_N.js","assets/BillPayRoutes-DLiB7rcg.js","assets/AddressScreen-CUr_aEMc.js","assets/DomesticWireDetailScreen-lCsi4C5H.js","assets/BusinessVerificationPageScreen-0_5o_ZM_.js","assets/DrawerScreen-Cc5wz0h5.js","assets/SetupPagesScreen-CUMRQWyq.js","assets/BillPayApprovalRoutes-DAUa7ONB.js","assets/ReimbursementApprovalRuleDetailScreen-ChdeAEEo.js","assets/getLocaleForTenant-DE5c6zm1.js","assets/ReimbursementRoutes-DeDFifAg.js","assets/ReimbursementApprovalRoutes-BQnKvM2a.js","assets/TransactionListRoutes-CG-fcybo.js","assets/ZeniAccountStatementScreen-DKETk0FT.js","assets/SettingsRoutes-qM6FOrI_.js","assets/AccountMappingScreen-CfmMe_fw.js","assets/QBOConnectionScreen-DTOowkWU.js","assets/empty-5vTmg9PS.js","assets/index-Bqsu77NP.js","assets/url-DZkAnGE1.js","assets/index-B9mu9yU0.js","assets/accountMappingHelper-de51OWcB.js","assets/useEmailConnectResultRefresh-BVltkRYL.js","assets/ReportsRoutes-ltsKJmPq.js","assets/ChargeCardRoutes-CGicSScL.js","assets/useChargeCardPusherEvents-B37-5iMJ.js","assets/PeopleRoutes-CNPCr-L4.js","assets/ExpenseAutomationRoutes-BRpV-BG_.js","assets/useActualMatchingMatchDetail-BhC_BwjK.js","assets/ScheduleDetailsPrepaidExpensesScreen-B48cCmOD.js","assets/pathToGoBack-Ct0_tDyX.js","assets/TreasuryRoutes-oCzS5EKy.js","assets/VendorsRoutes-D10u79fF.js","assets/ZeniAccountRoutes-CM6btkjV.js","assets/AddressRoutes-DJR1UTd-.js","assets/PandLWithForecastRoutes-DK6RjofB.js","assets/CustomerOnboardingRoutes-D0tIE0Z1.js","assets/TransactionDetailRoutes-3ahF1J6v.js","assets/EntityDetailRoutes-gyNpo9F4.js","assets/InvoicingRoutes-p_zZErJa.js","assets/NotificationRoutes-M5pxGUeG.js","assets/PerformanceRoutes-BTjLeNmT.js","assets/ActualMatchingMatchDetailScreen-D3C6jjK4.js","assets/RewardsRoutes-B0axXfBN.js","assets/TaskRoutes-BVnvgieb.js","assets/TaskListScreen-Cz8JRv3L.js","assets/useTaskManagerPusherEvents-Du_KDQdo.js","assets/AiCfoScreen-BWl90IlM.js","assets/CardsAiCfoScreen-DgEHpSc7.js"])))=>i.map(i=>d[i]);
2
- import{_ as s,bn as Es,fI as hs,e0 as ps,d$ as gs,B7 as xs,dj as Rs,c9 as js,gM as Is,gc as Ts,dg as pe,cH as As,gq as bs,cz as Ds,bF as fs,br as ys,Uk as vs,v as Cs,Un as Os,bq as Us,Uo as Ps,bL as ws,bK as Fs,bu as Ls,cv as Vs,Up as ks,Uq as Hs,db as Bs,de as Ss,dd as Ns,cG as Ms,cN as Zs,pV as ge,gl as xe,g$ as $s,gn as Re,gO as je,gP as Ie,go as zs}from"./zeni-epic-state-DGPmp0NT.js";import{j as e}from"./liveblocks-CgcSlW4Z.js";import{a as P}from"./sentry-CkAdiuiy.js";import{N as u,u as Gs,h as qs,i as Ys,g as Ws,j as $,q as Te,n as Ks,o as t}from"./core-BNc5eMdk.js";import{O as l,E as Qs,u as Xs,z as y,_ as Js,e as en,g as sn,f as S,j as nn,U as tn,P as an,L as F,G as Ae,t as _,Q as on,R as rn,n as te}from"./index-BuQOQ6cA.js";import"./mui-BCV14xpx.js";import{f as be}from"./analyticsHelper-Dbh_ZdOH.js";import{t as ln}from"./getLocaleForTenant-DE5c6zm1.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="4ed25008-ae33-4238-9408-56aa7babf0a9",o._sentryDebugIdIdentifier="sentry-dbid-4ed25008-ae33-4238-9408-56aa7babf0a9")}catch{}})();const un=l((()=>s((()=>import("./NotFoundScreen-n2sZiHTP.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),dn=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),cn=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),v=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:C})=>{if(V===!0){if(o)return e.jsx(fe,{tenantEmailDomain:C});if(i)return e.jsx(De,{tenantEmailDomain:C});if(O)return e.jsx(ye,{tenantEmailDomain:C})}return o?e.jsx(fe,{tenantEmailDomain:C}):i?e.jsx(De,{tenantEmailDomain:C}):O?e.jsx(ye,{tenantEmailDomain:C}):D?e.jsx(cn,{tenantEmailDomain:C}):N?e.jsx(dn,{tenantEmailDomain:C}):e.jsx(un,{})},mn={dashboard:()=>s((()=>import("./DashboardRoutes-fO2Q95Pi.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-DLiB7rcg.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-DeDFifAg.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-CG-fcybo.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-qM6FOrI_.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-ltsKJmPq.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-CGicSScL.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-CNPCr-L4.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-BRpV-BG_.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-oCzS5EKy.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-D10u79fF.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-CM6btkjV.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},_n=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},En=l((()=>s((()=>import("./ReportsRoutes-ltsKJmPq.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),hn=l((()=>s((()=>import("./AddressRoutes-DJR1UTd-.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),pn=l((()=>s((()=>import("./PeopleRoutes-CNPCr-L4.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),gn=l((()=>s((()=>import("./PandLWithForecastRoutes-DK6RjofB.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xn=l((()=>s((()=>import("./CustomerOnboardingRoutes-D0tIE0Z1.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),Rn=l((()=>s((()=>import("./VendorsRoutes-D10u79fF.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),jn=l((()=>s((()=>import("./TransactionDetailRoutes-3ahF1J6v.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-gyNpo9F4.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),In=l((()=>s((()=>import("./DashboardRoutes-fO2Q95Pi.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),Ce=l((()=>s((()=>import("./BillPayRoutes-DLiB7rcg.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),Tn=l((()=>s((()=>import("./SettingsRoutes-qM6FOrI_.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),An=l((()=>s((()=>import("./InvoicingRoutes-p_zZErJa.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-DeDFifAg.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),bn=l((()=>s((()=>import("./ZeniAccountRoutes-CM6btkjV.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),Dn=l((()=>s((()=>import("./TreasuryRoutes-oCzS5EKy.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),fn=l((()=>s((()=>import("./TransactionListRoutes-CG-fcybo.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),yn=l((()=>s((()=>import("./ChargeCardRoutes-CGicSScL.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),vn=l((()=>s((()=>import("./NotificationRoutes-M5pxGUeG.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Cn=l((()=>s((()=>import("./PerformanceRoutes-BTjLeNmT.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),On=l((()=>s((()=>import("./ExpenseAutomationRoutes-BRpV-BG_.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Un=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-D3C6jjK4.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Pn=l((()=>s((()=>import("./RewardsRoutes-B0axXfBN.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),wn=l((()=>s((()=>import("./TaskRoutes-BVnvgieb.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),Fn=l((()=>s((()=>import("./AiCfoScreen-BWl90IlM.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-DgEHpSc7.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-n2sZiHTP.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ln=l((()=>s((()=>import("./TaskListScreen-Cz8JRv3L.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Vn=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:C,showChargeCardRoute:k})=>{if(O===!0){if(D)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return C===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),zn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=Gs(),N=qs(),{tenantEmailDomain:i}=Ys(),V=Qs().mode,{setLoading:O,clearAllLoading:C,clearLoading:k}=Xs(),f=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),K=Es(I),z=Ws(),[L,we]=P.useState(!1),r=$((a=>hs(a))),{useFeatureGate:H}=Js(),M=en(),Q=sn(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=H(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(S.isDebitCardFeatureEnabled),T=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?ps(oe,r):void 0,X=p==="Completed"||T==="Completed"?gs(r):void 0,re=p==="Completed"||T==="Completed"?xs(r)&&!Rs(r):void 0,ke=nn(r,Ve,oe),{isCardsHidden:He}=tn(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=H(S.isSettingsFeatureEnabled),{isFeatureEnabled:J}=H(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||rn==="DEV",Ze=r?.userRole!=null&&js(r.userRole),G=$((a=>Is(a)));if(i!=null){const a=y.getSignedInUserTenant(i);I!=null&&a!=null&&be(I,r,V)}const Z={tenantId:f,userId:I?.userId,sessionId:I?.zeniSessionId},ie=Ts(),h=an(),$e=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),ze=As(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,Ge=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Ge?.params.selectedPeriod,qe=$((a=>Z.tenantId!=null?bs(a,Z.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&f!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),n=fs(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();n.isAfter(d,"month")===!1?D(vs(f,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,f]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,I,D,y]),P.useLayoutEffect((()=>{!Cs(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,n){if(xe(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);n&&Ae.updateAppLocaleID(ln(n)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?te.identify(a.userId,{tenant_id:a.tenantId}):te.resetUserIdentity()})(Z,I,D,qe))}),[f]),P.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,n,d,q,B){if(c==null&&n==null)return void console.warn("There is no current tenant selected!!");const Y=n!=null&&d?.zeniSessionId!=null,cs=c==null||c.tenantId!==n,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(Y&&cs){B(Re(n));const W=y.getSignedInUserTenantWithId(n);W?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(W?.tenantEmailDomain),xe(d?.userId,d?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),B(je(d.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),B(Ie(d.userId,n)))}else Y&&ms&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),B(je(d.userId,n))),Y&&_s&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),B(Ie(d.userId,n)));if(Y){te.identify(d.userId,{tenant_id:n});const W=n==null||n!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),q(F.TENANT_FETCHING),B(zs(d.userId,n,d.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(ge(d.userId,d.zeniSessionId)))}})(T,p,r,f,I,O,D))}),[f,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&G.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(G.tenantsBaseInOrder)),I!=null&&be(I,r,V,void 0,G.tenantsBaseInOrder))}),[G,T,r,I]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(C(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=_n,A=3e3){setTimeout((()=>{const c=n=>{if(n>=a.length)return;const d=a[n],q=mn[d];q!=null?q().then((()=>ae((()=>c(n+1))))).catch((()=>ae((()=>c(n+1))))):c(n+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const U=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:Ye}=H(S.isReferralFeatureEnabled),{isFeatureEnabled:We}=H(S.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Qe=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Be&&!U,Xe=Ps(h?.loggedInUserRoleMap),Je=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",ne=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&ws(h?.loggedInUserRoleMap),_e=Fe&&!U,ss=Le&&!U,ns=ue&&Fs(h?.loggedInUserRoleMap),ts=de&&Ls(h?.loggedInUserRoleMap),as=_e&&Vs(h?.loggedInUserRoleMap),os=ks(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Bs(h?.loggedInUserRoleMap),ls=Ss(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),g=Ms(h?.loggedInUserRoleMap),x=Zs(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&x,R=_e&&is,j=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||ze===!0||Xe===!0||os===!0||rs===!0;return y.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&T!=="In-Progress"&&D(ge(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(ne===!0||K&&!ee)&&es&&Je!==!0&&E===!1&&X===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||ne!==!0||ee||K?!L||ne!==!1||ee||K?L&&r?.userRole&&E!=null&&X!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(t,{element:e.jsx(on,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Vn,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:X,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:w?e.jsx(In,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:w?e.jsx(En,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ds||w?e.jsx(pn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:w?e.jsx(gn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(xn,{})}),e.jsx(t,{path:"transaction/*",element:w&&U===!1||Ke||Qe?e.jsx(jn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:w&&U===!1?e.jsx(fn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:w&&U===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:w&&U===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(Ln,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(wn,{})}),e.jsx(t,{path:"address/*",element:ns||me||as||ts?e.jsx(hn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:R?e.jsx(bn,{}):e.jsx(b,{})}),e.jsx(t,{path:"treasury/*",element:j?e.jsx(Dn,{}):e.jsx(b,{})}),e.jsx(t,{path:"performance",element:Q===!0?e.jsx(Cn,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:Q===!0&&U===!1?e.jsx(On,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(t,{path:"expense-automation/actual-matching/:matchId",element:Q===!0&&U===!1&&We===!0?e.jsx(Un,{}):e.jsx(b,{})}),e.jsx(t,{path:"notifications/*",element:e.jsx(vn,{})}),e.jsx(t,{path:"vendors/*",element:$e?e.jsx(Rn,{}):e.jsx(b,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Se?e.jsx(Tn,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(An,{}):e.jsx(b,{})}),e.jsx(t,{path:"cards/ask",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(yn,{}):e.jsx(b,{})}),e.jsx(t,{path:"rewards/*",element:Ye?e.jsx(Pn,{}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:M?e.jsx(Fn,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(t,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,zn as S};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-XQ69x1V9.js","assets/sentry-BzzHvh63.js","assets/core-_cqItzd_.js","assets/zeni-epic-state-ClqSlu6d.js","assets/index-DVhAab8j.js","assets/mui-CDH3xRD_.js","assets/analytics-DI5uqxwC.js","assets/utils-DZX8_JTm.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-Bq7IQcLO.js","assets/withTransactionSidePanel-BKXId2BT.js","assets/useAskAiCfoHostNavButtonProps-DQSYAHEz.js","assets/TransactionDetailScreen-CWo5MdmD.js","assets/decodeURIComponentSafe-CzbN3zRu.js","assets/useInitialThreadRequest-CSR_bJDf.js","assets/routePaths-DM8AEJT0.js","assets/expenseAutomationHelper-CTin--xN.js","assets/stripSplatSuffix-D8FyJbXM.js","assets/analyticsHelper-Df3DOmUB.js","assets/CompanyPassportScreen-CIym85mw.js","assets/MobileAppDrawer-Boi7lIY0.js","assets/InboxNotificationsProvider-Vlyx5Pej.js","assets/useTaskManagerAccess-CZYVdWyJ.js","assets/useAiCfoDashboardSuggestedQuestionsChips-C6pX9M29.js","assets/FeaturePreviewScreen-ADHB7kMI.js","assets/BillPayRoutes-BDhRNd6v.js","assets/AddressScreen-CPpf4Cpj.js","assets/DomesticWireDetailScreen-ZaeUg4I5.js","assets/BusinessVerificationPageScreen-CaVy5wIy.js","assets/DrawerScreen-bhsbfXgO.js","assets/SetupPagesScreen-PMDfztMD.js","assets/BillPayApprovalRoutes-c7b3I5yJ.js","assets/ReimbursementApprovalRuleDetailScreen-DN9la9Dm.js","assets/getLocaleForTenant-DNtLZSig.js","assets/ReimbursementRoutes-BGNOeI_H.js","assets/ReimbursementApprovalRoutes-BoJxAtXM.js","assets/TransactionListRoutes-DMziXkI4.js","assets/ZeniAccountStatementScreen-kiOSzYpp.js","assets/SettingsRoutes-D_LLhbJv.js","assets/AccountMappingScreen-Da8kjow8.js","assets/QBOConnectionScreen-Czz6muQW.js","assets/empty-CTsBwHYQ.js","assets/index-B_Z1rAKT.js","assets/url-BuE-ZvDR.js","assets/index-aNhAY0yh.js","assets/accountMappingHelper-CeXF1Q4Q.js","assets/useEmailConnectResultRefresh-XR0U1MaM.js","assets/ReportsRoutes-D-cpB-sX.js","assets/ChargeCardRoutes-CWxqs0Z9.js","assets/useChargeCardPusherEvents-pc-PEvCr.js","assets/PeopleRoutes-B4wBQVwY.js","assets/ExpenseAutomationRoutes-Dab9nQ3b.js","assets/useActualMatchingMatchDetail-CQqHF-gN.js","assets/ScheduleDetailsPrepaidExpensesScreen-CNF1ceQn.js","assets/pathToGoBack-DqZRBX-C.js","assets/TreasuryRoutes-B1C-ovJX.js","assets/VendorsRoutes-DoSPbM9C.js","assets/ZeniAccountRoutes-4rPFLUgD.js","assets/AddressRoutes-C13OMsQB.js","assets/PandLWithForecastRoutes-CwPS1KT_.js","assets/CustomerOnboardingRoutes-DVMAQtsb.js","assets/TransactionDetailRoutes-C6i9gm0l.js","assets/EntityDetailRoutes-bilW2_CZ.js","assets/InvoicingRoutes-CiTJXDwp.js","assets/NotificationRoutes-CjruMuyg.js","assets/PerformanceRoutes-BaUrr9_i.js","assets/ActualMatchingMatchDetailScreen-RoPWu4_o.js","assets/RewardsRoutes-Cp5QwRpd.js","assets/TaskRoutes-DIOgMKYK.js","assets/TaskListScreen-C_FDDeaV.js","assets/useTaskManagerPusherEvents-C0fOaGqk.js","assets/AiCfoScreen-C1Zi5BWJ.js","assets/CardsAiCfoScreen-BHtNOqz6.js"])))=>i.map(i=>d[i]);
2
+ import{_ as s,bn as Es,fI as hs,e0 as ps,d$ as gs,B7 as xs,dj as Rs,c9 as js,gM as Is,gc as Ts,dg as pe,cH as As,gq as bs,cz as Ds,bF as fs,br as ys,Uk as vs,v as Cs,Un as Os,bq as Us,Uo as Ps,bL as ws,bK as Fs,bu as Ls,cv as Vs,Up as ks,Uq as Hs,db as Bs,de as Ss,dd as Ns,cG as Ms,cN as Zs,pV as ge,gl as xe,g$ as $s,gn as Re,gO as je,gP as Ie,go as zs}from"./zeni-epic-state-ClqSlu6d.js";import{j as e}from"./liveblocks-gNIoHksP.js";import{a as P}from"./sentry-BzzHvh63.js";import{N as u,u as Gs,h as qs,i as Ys,g as Ws,j as $,q as Te,n as Ks,o as t}from"./core-_cqItzd_.js";import{O as l,E as Qs,u as Xs,z as y,_ as Js,e as en,g as sn,f as S,j as nn,U as tn,P as an,L as F,G as Ae,t as _,Q as on,R as rn,n as te}from"./index-DVhAab8j.js";import"./mui-CDH3xRD_.js";import{f as be}from"./analyticsHelper-Df3DOmUB.js";import{t as ln}from"./getLocaleForTenant-DNtLZSig.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="4ed25008-ae33-4238-9408-56aa7babf0a9",o._sentryDebugIdIdentifier="sentry-dbid-4ed25008-ae33-4238-9408-56aa7babf0a9")}catch{}})();const un=l((()=>s((()=>import("./NotFoundScreen-XQ69x1V9.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),dn=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),cn=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),v=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:C})=>{if(V===!0){if(o)return e.jsx(fe,{tenantEmailDomain:C});if(i)return e.jsx(De,{tenantEmailDomain:C});if(O)return e.jsx(ye,{tenantEmailDomain:C})}return o?e.jsx(fe,{tenantEmailDomain:C}):i?e.jsx(De,{tenantEmailDomain:C}):O?e.jsx(ye,{tenantEmailDomain:C}):D?e.jsx(cn,{tenantEmailDomain:C}):N?e.jsx(dn,{tenantEmailDomain:C}):e.jsx(un,{})},mn={dashboard:()=>s((()=>import("./DashboardRoutes-Bq7IQcLO.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-BDhRNd6v.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-BGNOeI_H.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-DMziXkI4.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-D_LLhbJv.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-D-cpB-sX.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-CWxqs0Z9.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-B4wBQVwY.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-Dab9nQ3b.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-B1C-ovJX.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-DoSPbM9C.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-4rPFLUgD.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},_n=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},En=l((()=>s((()=>import("./ReportsRoutes-D-cpB-sX.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),hn=l((()=>s((()=>import("./AddressRoutes-C13OMsQB.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),pn=l((()=>s((()=>import("./PeopleRoutes-B4wBQVwY.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),gn=l((()=>s((()=>import("./PandLWithForecastRoutes-CwPS1KT_.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xn=l((()=>s((()=>import("./CustomerOnboardingRoutes-DVMAQtsb.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),Rn=l((()=>s((()=>import("./VendorsRoutes-DoSPbM9C.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),jn=l((()=>s((()=>import("./TransactionDetailRoutes-C6i9gm0l.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-bilW2_CZ.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),In=l((()=>s((()=>import("./DashboardRoutes-Bq7IQcLO.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),Ce=l((()=>s((()=>import("./BillPayRoutes-BDhRNd6v.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),Tn=l((()=>s((()=>import("./SettingsRoutes-D_LLhbJv.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),An=l((()=>s((()=>import("./InvoicingRoutes-CiTJXDwp.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-BGNOeI_H.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),bn=l((()=>s((()=>import("./ZeniAccountRoutes-4rPFLUgD.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),Dn=l((()=>s((()=>import("./TreasuryRoutes-B1C-ovJX.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),fn=l((()=>s((()=>import("./TransactionListRoutes-DMziXkI4.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),yn=l((()=>s((()=>import("./ChargeCardRoutes-CWxqs0Z9.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),vn=l((()=>s((()=>import("./NotificationRoutes-CjruMuyg.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Cn=l((()=>s((()=>import("./PerformanceRoutes-BaUrr9_i.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),On=l((()=>s((()=>import("./ExpenseAutomationRoutes-Dab9nQ3b.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Un=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-RoPWu4_o.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Pn=l((()=>s((()=>import("./RewardsRoutes-Cp5QwRpd.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),wn=l((()=>s((()=>import("./TaskRoutes-DIOgMKYK.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),Fn=l((()=>s((()=>import("./AiCfoScreen-C1Zi5BWJ.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-BHtNOqz6.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-XQ69x1V9.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ln=l((()=>s((()=>import("./TaskListScreen-C_FDDeaV.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Vn=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:C,showChargeCardRoute:k})=>{if(O===!0){if(D)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return C===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),zn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=Gs(),N=qs(),{tenantEmailDomain:i}=Ys(),V=Qs().mode,{setLoading:O,clearAllLoading:C,clearLoading:k}=Xs(),f=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),K=Es(I),z=Ws(),[L,we]=P.useState(!1),r=$((a=>hs(a))),{useFeatureGate:H}=Js(),M=en(),Q=sn(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=H(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(S.isDebitCardFeatureEnabled),T=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?ps(oe,r):void 0,X=p==="Completed"||T==="Completed"?gs(r):void 0,re=p==="Completed"||T==="Completed"?xs(r)&&!Rs(r):void 0,ke=nn(r,Ve,oe),{isCardsHidden:He}=tn(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=H(S.isSettingsFeatureEnabled),{isFeatureEnabled:J}=H(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||rn==="DEV",Ze=r?.userRole!=null&&js(r.userRole),G=$((a=>Is(a)));if(i!=null){const a=y.getSignedInUserTenant(i);I!=null&&a!=null&&be(I,r,V)}const Z={tenantId:f,userId:I?.userId,sessionId:I?.zeniSessionId},ie=Ts(),h=an(),$e=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),ze=As(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,Ge=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Ge?.params.selectedPeriod,qe=$((a=>Z.tenantId!=null?bs(a,Z.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&f!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),n=fs(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();n.isAfter(d,"month")===!1?D(vs(f,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,f]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,I,D,y]),P.useLayoutEffect((()=>{!Cs(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,n){if(xe(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);n&&Ae.updateAppLocaleID(ln(n)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?te.identify(a.userId,{tenant_id:a.tenantId}):te.resetUserIdentity()})(Z,I,D,qe))}),[f]),P.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,n,d,q,B){if(c==null&&n==null)return void console.warn("There is no current tenant selected!!");const Y=n!=null&&d?.zeniSessionId!=null,cs=c==null||c.tenantId!==n,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(Y&&cs){B(Re(n));const W=y.getSignedInUserTenantWithId(n);W?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(W?.tenantEmailDomain),xe(d?.userId,d?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),B(je(d.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),B(Ie(d.userId,n)))}else Y&&ms&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),B(je(d.userId,n))),Y&&_s&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),B(Ie(d.userId,n)));if(Y){te.identify(d.userId,{tenant_id:n});const W=n==null||n!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),q(F.TENANT_FETCHING),B(zs(d.userId,n,d.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(ge(d.userId,d.zeniSessionId)))}})(T,p,r,f,I,O,D))}),[f,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&G.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(G.tenantsBaseInOrder)),I!=null&&be(I,r,V,void 0,G.tenantsBaseInOrder))}),[G,T,r,I]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(C(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=_n,A=3e3){setTimeout((()=>{const c=n=>{if(n>=a.length)return;const d=a[n],q=mn[d];q!=null?q().then((()=>ae((()=>c(n+1))))).catch((()=>ae((()=>c(n+1))))):c(n+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const U=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:Ye}=H(S.isReferralFeatureEnabled),{isFeatureEnabled:We}=H(S.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Qe=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Be&&!U,Xe=Ps(h?.loggedInUserRoleMap),Je=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",ne=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&ws(h?.loggedInUserRoleMap),_e=Fe&&!U,ss=Le&&!U,ns=ue&&Fs(h?.loggedInUserRoleMap),ts=de&&Ls(h?.loggedInUserRoleMap),as=_e&&Vs(h?.loggedInUserRoleMap),os=ks(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Bs(h?.loggedInUserRoleMap),ls=Ss(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),g=Ms(h?.loggedInUserRoleMap),x=Zs(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&x,R=_e&&is,j=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||ze===!0||Xe===!0||os===!0||rs===!0;return y.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&T!=="In-Progress"&&D(ge(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(ne===!0||K&&!ee)&&es&&Je!==!0&&E===!1&&X===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||ne!==!0||ee||K?!L||ne!==!1||ee||K?L&&r?.userRole&&E!=null&&X!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(t,{element:e.jsx(on,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Vn,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:X,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:w?e.jsx(In,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:w?e.jsx(En,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ds||w?e.jsx(pn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:w?e.jsx(gn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(xn,{})}),e.jsx(t,{path:"transaction/*",element:w&&U===!1||Ke||Qe?e.jsx(jn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:w&&U===!1?e.jsx(fn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:w&&U===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:w&&U===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(Ln,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(wn,{})}),e.jsx(t,{path:"address/*",element:ns||me||as||ts?e.jsx(hn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:R?e.jsx(bn,{}):e.jsx(b,{})}),e.jsx(t,{path:"treasury/*",element:j?e.jsx(Dn,{}):e.jsx(b,{})}),e.jsx(t,{path:"performance",element:Q===!0?e.jsx(Cn,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:Q===!0&&U===!1?e.jsx(On,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(t,{path:"expense-automation/actual-matching/:matchId",element:Q===!0&&U===!1&&We===!0?e.jsx(Un,{}):e.jsx(b,{})}),e.jsx(t,{path:"notifications/*",element:e.jsx(vn,{})}),e.jsx(t,{path:"vendors/*",element:$e?e.jsx(Rn,{}):e.jsx(b,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Se?e.jsx(Tn,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(An,{}):e.jsx(b,{})}),e.jsx(t,{path:"cards/ask",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(yn,{}):e.jsx(b,{})}),e.jsx(t,{path:"rewards/*",element:Ye?e.jsx(Pn,{}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:M?e.jsx(Fn,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(t,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,zn as S};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-CgcSlW4Z.js";import{a as d}from"./sentry-CkAdiuiy.js";import{h as O,g as H,u as M,i as F,j as C,l as K,n as Q,o as k}from"./core-BNc5eMdk.js";import{fI as A,Zy as Pe,NM as ve,Z6 as Ae,Zf as we,c9 as X,cU as De,cV as Ue,bq as Me,df as _e,G5 as Re,Zz as Te,Pd as Be,MD as Ze,Mu as de,Mr as Ve,G9 as ue,Mx as pe,MA as ge,MG as W,Cj as ee,G8 as Ne,lx as $,lA as me,ZA as Oe,mK as Fe,Gq as Le,VN as Ge,VO as $e,lv as He,ZB as Ke,ly as qe,uK as ze,VI as Je,VJ as Qe,uO as Ye,hY as Xe,UH as J,hQ as ae,hN as We,hV as en,UI as nn,Gn as tn,ZC as an,ZD as on,MU as sn,m2 as rn,d$ as fe,e0 as he,ZE as ln,gF as cn,UX as dn,Gm as oe,gK as se,gJ as un,Gl as pn,gI as gn,gH as mn,ZF as fn,U7 as Ce,ZG as hn,ZH as Cn,ZI as yn,ZJ as Sn,ZK as bn,ZL as In,Gt as xn,ZM as En,Gk as ie,Ge as G,ZN as kn,ZO as jn,ZP as re,ZQ as Pn,dU as vn,ZR as An,ZS as wn,ZT as Dn,Uj as Un,c1 as Mn,c8 as _n,c7 as Rn,c2 as Tn,ZU as Bn,c5 as Zn,c4 as Vn,c6 as Nn,c3 as On}from"./zeni-epic-state-DGPmp0NT.js";import{bT as Fn,z as v,P as L,a7 as ne,c3 as Ln,n as q,_ as te,f as V,j as ye,U as Se,c4 as Gn,m as $n,Y as be,c5 as Hn,ai as Kn,c6 as qn,c7 as zn,aq as Jn,c8 as Qn,p as Yn,d as Ie,c9 as Xn}from"./index-BuQOQ6cA.js";import{n as B}from"./mui-BCV14xpx.js";import{u as xe}from"./useTaskManagerAccess-CvCLmUXb.js";import{U as Wn}from"./AccountMappingScreen-CfmMe_fw.js";import{t as et,A as nt}from"./AddressScreen-CUr_aEMc.js";import N from"./NotFoundScreen-n2sZiHTP.js";import{g as tt}from"./analyticsHelper-Dbh_ZdOH.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-0_5o_ZM_.js";import{C as st}from"./CompanyPassportScreen-Cc-A-J9-.js";import{M as R}from"./MobileAppDrawer-jc7oeqcf.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-BVltkRYL.js";import{q as le}from"./QBOConnectionScreen-DTOowkWU.js";import{B as lt}from"./BillPayApprovalRoutes-DAUa7ONB.js";import{R as ct}from"./ReimbursementApprovalRoutes-BQnKvM2a.js";import"./recharts-B1fIlvhf.js";import"./analytics-DzL27tck.js";import"./plaid-BGKcPjuF.js";import"./dnd-0zxechDA.js";import"./stripe-cKAAJElX.js";import"./lottie-VLEWAz4K.js";import"./lexical-BSajFjJy.js";import"./pdf-fIozDtKP.js";import"./utils-CqmAwzS_.js";import"./accountMappingHelper-de51OWcB.js";import"./routePaths-Fw-tznCi.js";import"./InboxNotificationsProvider-acJ-mQYX.js";import"./empty-5vTmg9PS.js";import"./pdf-lib-ZHcF2OoC.js";import"./index-Bqsu77NP.js";import"./url-DZkAnGE1.js";import"./index-B9mu9yU0.js";import"./decodeURIComponentSafe-BSiJLIqU.js";import"./ReimbursementApprovalRuleDetailScreen-ChdeAEEo.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="48643538-23f5-4aea-a665-d9fcccdb74d3",e._sentryDebugIdIdentifier="sentry-dbid-48643538-23f5-4aea-a665-d9fcccdb74d3")}catch{}})();const dt=B.div`
1
+ import{j as a}from"./liveblocks-gNIoHksP.js";import{a as d}from"./sentry-BzzHvh63.js";import{h as O,g as H,u as M,i as F,j as C,l as K,n as Q,o as k}from"./core-_cqItzd_.js";import{fI as A,Zy as Pe,NM as ve,Z6 as Ae,Zf as we,c9 as X,cU as De,cV as Ue,bq as Me,df as _e,G5 as Re,Zz as Te,Pd as Be,MD as Ze,Mu as de,Mr as Ve,G9 as ue,Mx as pe,MA as ge,MG as W,Cj as ee,G8 as Ne,lx as $,lA as me,ZA as Oe,mK as Fe,Gq as Le,VN as Ge,VO as $e,lv as He,ZB as Ke,ly as qe,uK as ze,VI as Je,VJ as Qe,uO as Ye,hY as Xe,UH as J,hQ as ae,hN as We,hV as en,UI as nn,Gn as tn,ZC as an,ZD as on,MU as sn,m2 as rn,d$ as fe,e0 as he,ZE as ln,gF as cn,UX as dn,Gm as oe,gK as se,gJ as un,Gl as pn,gI as gn,gH as mn,ZF as fn,U7 as Ce,ZG as hn,ZH as Cn,ZI as yn,ZJ as Sn,ZK as bn,ZL as In,Gt as xn,ZM as En,Gk as ie,Ge as G,ZN as kn,ZO as jn,ZP as re,ZQ as Pn,dU as vn,ZR as An,ZS as wn,ZT as Dn,Uj as Un,c1 as Mn,c8 as _n,c7 as Rn,c2 as Tn,ZU as Bn,c5 as Zn,c4 as Vn,c6 as Nn,c3 as On}from"./zeni-epic-state-ClqSlu6d.js";import{bT as Fn,z as v,P as L,a7 as ne,c3 as Ln,n as q,_ as te,f as V,j as ye,U as Se,c4 as Gn,m as $n,Y as be,c5 as Hn,ai as Kn,c6 as qn,c7 as zn,aq as Jn,c8 as Qn,p as Yn,d as Ie,c9 as Xn}from"./index-DVhAab8j.js";import{n as B}from"./mui-CDH3xRD_.js";import{u as xe}from"./useTaskManagerAccess-CZYVdWyJ.js";import{U as Wn}from"./AccountMappingScreen-Da8kjow8.js";import{t as et,A as nt}from"./AddressScreen-CPpf4Cpj.js";import N from"./NotFoundScreen-XQ69x1V9.js";import{g as tt}from"./analyticsHelper-Df3DOmUB.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-CaVy5wIy.js";import{C as st}from"./CompanyPassportScreen-CIym85mw.js";import{M as R}from"./MobileAppDrawer-Boi7lIY0.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-XR0U1MaM.js";import{q as le}from"./QBOConnectionScreen-Czz6muQW.js";import{B as lt}from"./BillPayApprovalRoutes-c7b3I5yJ.js";import{R as ct}from"./ReimbursementApprovalRoutes-BoJxAtXM.js";import"./recharts-BgEcqT8y.js";import"./analytics-DI5uqxwC.js";import"./plaid-Dvn5Z296.js";import"./dnd-BzHSvmGV.js";import"./stripe-cKAAJElX.js";import"./lottie-CjJcvZ3r.js";import"./lexical-CXRKir6z.js";import"./pdf-BZVEJwNE.js";import"./utils-DZX8_JTm.js";import"./accountMappingHelper-CeXF1Q4Q.js";import"./routePaths-DM8AEJT0.js";import"./InboxNotificationsProvider-Vlyx5Pej.js";import"./empty-CTsBwHYQ.js";import"./pdf-lib-DnzapqoA.js";import"./index-B_Z1rAKT.js";import"./url-BuE-ZvDR.js";import"./index-aNhAY0yh.js";import"./decodeURIComponentSafe-CzbN3zRu.js";import"./ReimbursementApprovalRuleDetailScreen-DN9la9Dm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="48643538-23f5-4aea-a665-d9fcccdb74d3",e._sentryDebugIdIdentifier="sentry-dbid-48643538-23f5-4aea-a665-d9fcccdb74d3")}catch{}})();const dt=B.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-CgcSlW4Z.js";import{h as Q,g as X,u as ee,i as H,j as v,N as j,l as G,t as Xe}from"./core-BNc5eMdk.js";import{bK as en,fI as F,cH as nn,HZ as $,Z6 as tn,Z9 as an,v1 as ne,uR as te,mC as ae,BR as L,Zb as Ce,gJ as We,gI as He,gH as Ge,Zc as sn,I6 as on,MD as he,Mu as Ie,Mr as Ae,M9 as Y,Mx as _e,MA as ke,MG as ve,Cj as Pe,h1 as cn,cC as rn,e0 as un,d$ as dn,dj as ln,bu as pn,cv as Fe,Zd as mn,L9 as de,LN as yn,Ze as fn,bL as gn,NY as le,NM as Sn,Zf as bn,Zg as Cn,O0 as hn,O4 as In,Zh as je,BK as An,Ss as _n,OC as be,Pr as pe,Zi as kn,Zj as vn,Zk as Pn,Zl as Ke,Zm as Tn,Vw as En,Yn as Dn,VL as Un,Zn as qe,Md as On,VM as wn,Mh as Fn,Zo as we,OM as Je,mK as Vn,uU as Ye,BT as xn,bF as Re,C3 as Le,cF as Bn,Zp as Qe,Oj as jn,Ok as Rn,Oo as Ln,Zq as Nn,OF as Ne,Zr as Mn,Zs as zn,Zt as Zn,Zu as $n,gY as Wn,Ji as Hn,Zv as Gn,Jn as Kn,Jm as qn}from"./zeni-epic-state-DGPmp0NT.js";import{ai as Te,P as ie,_ as me,f as J,E as Ee,z as E,a8 as se,n as D,a7 as De,T as W,bQ as Jn,ae as oe,bR as V,bi as Ve,bS as Yn,bT as Qn,bU as Xn,v as Be,bV as et,p as Me,aG as ze,a1 as nt,ab as tt,bW as at,bX as it,bY as st,w as ot}from"./index-BuQOQ6cA.js";import{a as h}from"./sentry-CkAdiuiy.js";import{n as xe,D as ct,S as rt}from"./mui-BCV14xpx.js";import{u as ut,B as Oe}from"./BusinessVerificationPageScreen-0_5o_ZM_.js";import{M as ye}from"./MobileAppDrawer-jc7oeqcf.js";import R from"./NotFoundScreen-n2sZiHTP.js";import{a as Ze}from"./analyticsHelper-Dbh_ZdOH.js";import{d as $e}from"./routePaths-Fw-tznCi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="20e74d58-9b19-4402-b6f6-6251fb735202",e._sentryDebugIdIdentifier="sentry-dbid-20e74d58-9b19-4402-b6f6-6251fb735202")}catch{}})();const dt=xe.div`
1
+ import{j as u}from"./liveblocks-gNIoHksP.js";import{h as Q,g as X,u as ee,i as H,j as v,N as j,l as G,t as Xe}from"./core-_cqItzd_.js";import{bK as en,fI as F,cH as nn,HZ as $,Z6 as tn,Z9 as an,v1 as ne,uR as te,mC as ae,BR as L,Zb as Ce,gJ as We,gI as He,gH as Ge,Zc as sn,I6 as on,MD as he,Mu as Ie,Mr as Ae,M9 as Y,Mx as _e,MA as ke,MG as ve,Cj as Pe,h1 as cn,cC as rn,e0 as un,d$ as dn,dj as ln,bu as pn,cv as Fe,Zd as mn,L9 as de,LN as yn,Ze as fn,bL as gn,NY as le,NM as Sn,Zf as bn,Zg as Cn,O0 as hn,O4 as In,Zh as je,BK as An,Ss as _n,OC as be,Pr as pe,Zi as kn,Zj as vn,Zk as Pn,Zl as Ke,Zm as Tn,Vw as En,Yn as Dn,VL as Un,Zn as qe,Md as On,VM as wn,Mh as Fn,Zo as we,OM as Je,mK as Vn,uU as Ye,BT as xn,bF as Re,C3 as Le,cF as Bn,Zp as Qe,Oj as jn,Ok as Rn,Oo as Ln,Zq as Nn,OF as Ne,Zr as Mn,Zs as zn,Zt as Zn,Zu as $n,gY as Wn,Ji as Hn,Zv as Gn,Jn as Kn,Jm as qn}from"./zeni-epic-state-ClqSlu6d.js";import{ai as Te,P as ie,_ as me,f as J,E as Ee,z as E,a8 as se,n as D,a7 as De,T as W,bQ as Jn,ae as oe,bR as V,bi as Ve,bS as Yn,bT as Qn,bU as Xn,v as Be,bV as et,p as Me,aG as ze,a1 as nt,ab as tt,bW as at,bX as it,bY as st,w as ot}from"./index-DVhAab8j.js";import{a as h}from"./sentry-BzzHvh63.js";import{n as xe,D as ct,S as rt}from"./mui-CDH3xRD_.js";import{u as ut,B as Oe}from"./BusinessVerificationPageScreen-CaVy5wIy.js";import{M as ye}from"./MobileAppDrawer-Boi7lIY0.js";import R from"./NotFoundScreen-XQ69x1V9.js";import{a as Ze}from"./analyticsHelper-Df3DOmUB.js";import{d as $e}from"./routePaths-DM8AEJT0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="20e74d58-9b19-4402-b6f6-6251fb735202",e._sentryDebugIdIdentifier="sentry-dbid-20e74d58-9b19-4402-b6f6-6251fb735202")}catch{}})();const dt=xe.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as u}from"./liveblocks-CgcSlW4Z.js";import{a as f,R as T,q as A}from"./sentry-CkAdiuiy.js";import{u as z,h as D,j as l,g as M,N as P,l as j}from"./core-BNc5eMdk.js";import{u as O,z as s,E as F,n as w,G as N,S as _,T as B,V,W,X,Y as v}from"./index-BuQOQ6cA.js";import{fI as $,U3 as q,Un as J,gl as R,gn as Y,Us as G,gX as H,dk as K,Ut as y,Uu as Q,Uv as Z,c0 as U}from"./zeni-epic-state-DGPmp0NT.js";import"./mui-BCV14xpx.js";import{u as ee}from"./useDeviceId-iZ_-Itv9.js";import{f as te}from"./analyticsHelper-Dbh_ZdOH.js";import{t as ne}from"./getLocaleForTenant-DE5c6zm1.js";import"./recharts-B1fIlvhf.js";import"./analytics-DzL27tck.js";import"./plaid-BGKcPjuF.js";import"./dnd-0zxechDA.js";import"./stripe-cKAAJElX.js";import"./lottie-VLEWAz4K.js";import"./lexical-BSajFjJy.js";import"./pdf-fIozDtKP.js";import"./utils-CqmAwzS_.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]="221a19d4-2b13-42ff-bee0-1ee3a8c66148",t._sentryDebugIdIdentifier="sentry-dbid-221a19d4-2b13-42ff-bee0-1ee3a8c66148")}catch{}})();const ie=j((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:U(c),sourceUri:U(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())}}}))(X),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=O(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:b,accountUnlockTime:E}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),L=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>$(e))),I=l((e=>q(e))),m=M(),h=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{k.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[k.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),R(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),N.updateAppLocaleID(ne(r)),te(o,r,h,void 0,I.tenantsInOrder),H().then((()=>{const e=W();e!=null&&_(e)})),setTimeout((()=>{w.trackLogin(B.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))}),2e3))}),[S,p,L,o,r,I,h,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(P,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&E!=null?u.jsx(V,{onClose:()=>i(y()),unlockDate:E}):null]})}export{ve as default};
1
+ import{j as u}from"./liveblocks-gNIoHksP.js";import{a as f,R as T,q as A}from"./sentry-BzzHvh63.js";import{u as z,h as D,j as l,g as M,N as P,l as j}from"./core-_cqItzd_.js";import{u as O,z as s,E as F,n as w,G as N,S as _,T as B,V,W,X,Y as v}from"./index-DVhAab8j.js";import{fI as $,U3 as q,Un as J,gl as R,gn as Y,Us as G,gX as H,dk as K,Ut as y,Uu as Q,Uv as Z,c0 as U}from"./zeni-epic-state-ClqSlu6d.js";import"./mui-CDH3xRD_.js";import{u as ee}from"./useDeviceId-DYE-WS_B.js";import{f as te}from"./analyticsHelper-Df3DOmUB.js";import{t as ne}from"./getLocaleForTenant-DNtLZSig.js";import"./recharts-BgEcqT8y.js";import"./analytics-DI5uqxwC.js";import"./plaid-Dvn5Z296.js";import"./dnd-BzHSvmGV.js";import"./stripe-cKAAJElX.js";import"./lottie-CjJcvZ3r.js";import"./lexical-CXRKir6z.js";import"./pdf-BZVEJwNE.js";import"./utils-DZX8_JTm.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]="221a19d4-2b13-42ff-bee0-1ee3a8c66148",t._sentryDebugIdIdentifier="sentry-dbid-221a19d4-2b13-42ff-bee0-1ee3a8c66148")}catch{}})();const ie=j((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:U(c),sourceUri:U(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())}}}))(X),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=O(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:b,accountUnlockTime:E}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),L=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>$(e))),I=l((e=>q(e))),m=M(),h=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{k.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[k.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),R(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),N.updateAppLocaleID(ne(r)),te(o,r,h,void 0,I.tenantsInOrder),H().then((()=>{const e=W();e!=null&&_(e)})),setTimeout((()=>{w.trackLogin(B.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))}),2e3))}),[S,p,L,o,r,I,h,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(P,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&E!=null?u.jsx(V,{onClose:()=>i(y()),unlockDate:E}):null]})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-CgcSlW4Z.js";import{a as i}from"./sentry-CkAdiuiy.js";import{u as c,g as l,N as u}from"./core-BNc5eMdk.js";import{z as n,n as a,T as m,a7 as p}from"./index-BuQOQ6cA.js";import{g_ as g,UJ as y}from"./zeni-epic-state-DGPmp0NT.js";import{n as b}from"./mui-BCV14xpx.js";import"./recharts-B1fIlvhf.js";import"./analytics-DzL27tck.js";import"./plaid-BGKcPjuF.js";import"./dnd-0zxechDA.js";import"./stripe-cKAAJElX.js";import"./lottie-VLEWAz4K.js";import"./lexical-BSajFjJy.js";import"./pdf-fIozDtKP.js";import"./utils-CqmAwzS_.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]="858e6da8-eade-46cb-83fa-3c388d6fde0e",e._sentryDebugIdIdentifier="sentry-dbid-858e6da8-eade-46cb-83fa-3c388d6fde0e")}catch{}})();function L(){const e=c(),t=l(),r=i.useRef(!1),d=n.isSignedIn(),o=t.state?.message==="logout"||d;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
1
+ import{j as s}from"./liveblocks-gNIoHksP.js";import{a as i}from"./sentry-BzzHvh63.js";import{u as c,g as l,N as u}from"./core-_cqItzd_.js";import{z as n,n as a,T as m,a7 as p}from"./index-DVhAab8j.js";import{g_ as g,UJ as y}from"./zeni-epic-state-ClqSlu6d.js";import{n as b}from"./mui-CDH3xRD_.js";import"./recharts-BgEcqT8y.js";import"./analytics-DI5uqxwC.js";import"./plaid-Dvn5Z296.js";import"./dnd-BzHSvmGV.js";import"./stripe-cKAAJElX.js";import"./lottie-CjJcvZ3r.js";import"./lexical-CXRKir6z.js";import"./pdf-BZVEJwNE.js";import"./utils-DZX8_JTm.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]="858e6da8-eade-46cb-83fa-3c388d6fde0e",e._sentryDebugIdIdentifier="sentry-dbid-858e6da8-eade-46cb-83fa-3c388d6fde0e")}catch{}})();function L(){const e=c(),t=l(),r=i.useRef(!1),d=n.isSignedIn(),o=t.state?.message==="logout"||d;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;