@zeniai/web-app-ui 5.4.11-dev → 5.4.12-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/assets/{AccountMappingScreen-CMj3JkGt.js → AccountMappingScreen-CtnQtVOI.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-Dd_vJSSr.js → ActualMatchingMatchDetailScreen-COb45lJn.js} +1 -1
  3. package/dist/assets/AddressRoutes-CXRpuLt0.js +1 -0
  4. package/dist/assets/{AddressScreen-BbgME8aO.js → AddressScreen-CiPLLpNX.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-CU1e2Oi8.js → AiCfoScreen-DPuJRDN-.js} +1 -1
  6. package/dist/assets/{AppDrawer-Dm9C8j__.js → AppDrawer-Bxmzf_KR.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-GN_PKZBM.js → BillPayApprovalRoutes-Bhwrq5tr.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-7abJ7Y81.js → BillPayRoutes-CQCAwPWX.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-8VbyEZWD.js → BusinessVerificationPageScreen-71JxUYXB.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-BcEHiZtA.js → CardsAiCfoScreen-Dze-_SQs.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-BR5_qY8y.js → ChargeCardRoutes-CvC_JvPH.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-L6OY8AwA.js → CompanyPassportScreen-dRN2jnGn.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-F-iZ536h.js → ConnectionAuthScreen-CrQ3LZFB.js} +1 -1
  14. package/dist/assets/CustomerOnboardingAuthScreen-BUiUC1A4.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-3OH4ZWPk.js → CustomerOnboardingRoutes-BMrjyYZ8.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-X31R7cQf.js → DashboardRoutes-DYfRGtw5.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-FpeIWNLr.js → DefaultTenantHome-DmRqFqlc.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-BZbvzqXc.js → DomesticWireDetailScreen-YfGiQgSo.js} +1 -1
  19. package/dist/assets/{DrawerScreen-CmgVB1Zi.js → DrawerScreen-DH40ycW6.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-5IMi-E-b.js → EntityDetailRoutes-BgqO6DqU.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-DH5uN2wQ.js → ExpenseAutomationRoutes-Bks-mNnn.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-Cnh2Fe6t.js → FeaturePreviewScreen-B9UACzAC.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-C94ZBMtd.js → HubSpotOAuthCallbackScreen-BjEMURaY.js} +1 -1
  24. package/dist/assets/{InboxNotificationsProvider-CJt6vmnU.js → InboxNotificationsProvider-Cd4NxEtR.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-Q-6aUqgu.js → InvoicingRoutes-UHPes0q9.js} +1 -1
  26. package/dist/assets/{MagicLinkRoutes-CR6ShXCQ.js → MagicLinkRoutes-BQns5k2S.js} +1 -1
  27. package/dist/assets/{MagicLinkSignInScreen-CBjgwG_1.js → MagicLinkSignInScreen-IXnuvHt3.js} +1 -1
  28. package/dist/assets/{MobileAppDrawer-B4_Hh2uX.js → MobileAppDrawer-rCVKr3J3.js} +1 -1
  29. package/dist/assets/NotFoundScreen-C94S-cmy.js +1 -0
  30. package/dist/assets/{NotificationRoutes-CDa5TISi.js → NotificationRoutes-h53g4kBO.js} +1 -1
  31. package/dist/assets/{OAuthConsentScreen-D8WvwiVN.js → OAuthConsentScreen-35XPz7Vp.js} +1 -1
  32. package/dist/assets/{PandLWithForecastRoutes-CiaozOzI.js → PandLWithForecastRoutes-OnVWoGgX.js} +1 -1
  33. package/dist/assets/{PaymentLinkScreen-BN13u2tw.js → PaymentLinkScreen-BADSNyXp.js} +1 -1
  34. package/dist/assets/{PeopleRoutes-B5eZw1Xs.js → PeopleRoutes-CnmV1pW5.js} +1 -1
  35. package/dist/assets/{PerformanceRoutes-B5KqyHoS.js → PerformanceRoutes-MYTxvcMA.js} +1 -1
  36. package/dist/assets/{Preview-gj_-pUjR.js → Preview-DGZHmpgt.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-BD6w4pxT.js → QBOConnectionScreen-C1Kn9y8q.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRoutes-_wQ1m-SZ.js → ReimbursementApprovalRoutes-CsG7QtOs.js} +1 -1
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CQJ7WhRf.js → ReimbursementApprovalRuleDetailScreen-BzhkgPjS.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-mHGAbMEo.js → ReimbursementRoutes-BcjYsUHB.js} +1 -1
  41. package/dist/assets/{ReportsRoutes-DNdr9gVu.js → ReportsRoutes-Bcm2EvxJ.js} +1 -1
  42. package/dist/assets/{RewardsRoutes-CRQaDmuu.js → RewardsRoutes-Do7moyFI.js} +1 -1
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-Bgrqk-Br.js → ScheduleDetailsPrepaidExpensesScreen-v3zw3e0R.js} +1 -1
  44. package/dist/assets/{ScreenRoutes-Cix6ynkH.js → ScreenRoutes-vTLuTGuW.js} +2 -2
  45. package/dist/assets/{SettingsRoutes-CXzUd0P6.js → SettingsRoutes-CwW3Kcyz.js} +1 -1
  46. package/dist/assets/{SetupPagesScreen-DzLiX5R5.js → SetupPagesScreen-DPnnq4jj.js} +1 -1
  47. package/dist/assets/{SignInScreen-VX0iUVME.js → SignInScreen-ColMnPgQ.js} +1 -1
  48. package/dist/assets/{SignOutScreen-BXVxv4o-.js → SignOutScreen-DILD5ueP.js} +1 -1
  49. package/dist/assets/{TaskListScreen-Dv5TjArL.js → TaskListScreen-aizYXFWj.js} +1 -1
  50. package/dist/assets/{TaskRoutes-aDI7RZCK.js → TaskRoutes-CWWa57kf.js} +1 -1
  51. package/dist/assets/{TransactionDetailRoutes-C0gGgGik.js → TransactionDetailRoutes-DWXM95sG.js} +1 -1
  52. package/dist/assets/{TransactionDetailScreen-BsGN3Yd5.js → TransactionDetailScreen-CNMo1Iyr.js} +2 -2
  53. package/dist/assets/{TransactionListRoutes-_bc9UoMG.js → TransactionListRoutes-aYhnWH8H.js} +1 -1
  54. package/dist/assets/{TreasuryRoutes-C7ABXX2A.js → TreasuryRoutes-DnAsQTrn.js} +1 -1
  55. package/dist/assets/{VendorsRoutes-BlorNbi4.js → VendorsRoutes-QudM99vQ.js} +1 -1
  56. package/dist/assets/{WiseConfirmationScreen-DhPTIeWc.js → WiseConfirmationScreen-CkFHmO99.js} +1 -1
  57. package/dist/assets/{ZeniAccountRoutes-QObrERl4.js → ZeniAccountRoutes-DeSodvmm.js} +1 -1
  58. package/dist/assets/{ZeniAccountStatementScreen-BHlw6cTG.js → ZeniAccountStatementScreen-DKVtRt3N.js} +1 -1
  59. package/dist/assets/{accountMappingHelper-BbISzw1n.js → accountMappingHelper-7kGWRPlV.js} +1 -1
  60. package/dist/assets/{analytics-C4ICDJLl.js → analytics-BfKlFVdJ.js} +4 -4
  61. package/dist/assets/{analyticsHelper-CPHVprda.js → analyticsHelper-Cn2rORl_.js} +1 -1
  62. package/dist/assets/{core-C4Vfz6Ll.js → core-BWRpGVdr.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-CYsmEPcV.js → decodeURIComponentSafe-DN9u1X8y.js} +1 -1
  64. package/dist/assets/{dnd-kAQqqaX2.js → dnd-wLfPcqQ_.js} +1 -1
  65. package/dist/assets/{empty-uRyODf4S.js → empty-BxjviaN4.js} +1 -1
  66. package/dist/assets/{empty-asCy4wrm.js → empty-CKwCpajm.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-79iYt27c.js → emptyVideoElement-BURd-WPn.js} +1 -1
  68. package/dist/assets/epic-Nc2-Ka61.js +2 -0
  69. package/dist/assets/{expenseAutomationHelper-hmRJBbGd.js → expenseAutomationHelper-Dr99xbt1.js} +1 -1
  70. package/dist/assets/{getLocaleForTenant-DJIJUZ-c.js → getLocaleForTenant-BNAJG7gN.js} +1 -1
  71. package/dist/assets/{index-CJ_pjNEa.js → index-9pdMsp-M.js} +7 -7
  72. package/dist/assets/{index-E3novWwq.js → index-BXpurrfG.js} +1 -1
  73. package/dist/assets/{index-B_kv_EmZ.js → index-BtcZVjM1.js} +1 -1
  74. package/dist/assets/{index-UMoTq5JU.js → index-CcNUb4uI.js} +2 -2
  75. package/dist/assets/{index-Doknm_HP.js → index-D6O1UsWW.js} +1 -1
  76. package/dist/assets/{index-BTd7WWV0.js → index-DYK9WSJX.js} +1 -1
  77. package/dist/assets/{index-Bg8f4cim.js → index-DwbDgvVM.js} +1 -1
  78. package/dist/assets/{index-pA4BduR_.js → index-mJCZBkgN.js} +1 -1
  79. package/dist/assets/{lexical-SeD-pdYj.js → lexical-ljfsYSTd.js} +1 -1
  80. package/dist/assets/{liveblocks-DZUXZ-JO.js → liveblocks-V5YQZeeY.js} +1 -1
  81. package/dist/assets/{lottie-txhqSe8x.js → lottie-ByqRhfis.js} +1 -1
  82. package/dist/assets/{mui-C0PYnbt1.js → mui-BmHHlwSU.js} +1 -1
  83. package/dist/assets/{pathToGoBack-DF1y-0ht.js → pathToGoBack-Dr_s0YFt.js} +1 -1
  84. package/dist/assets/{pdf-bOGTjHnz.js → pdf-C42gprG9.js} +3 -3
  85. package/dist/assets/{pdf-lib-BsfRp21l.js → pdf-lib-D4o6Nk27.js} +1 -1
  86. package/dist/assets/{plaid-hQES7k9Y.js → plaid-CNV6JDhi.js} +1 -1
  87. package/dist/assets/{pusher-BoH5mrch.js → pusher-DvjXiGU0.js} +1 -1
  88. package/dist/assets/{react-Boil267a.js → react-CFX1RFZH.js} +1 -1
  89. package/dist/assets/{react-BgJrrMxk.js → react-CFwPpD-1.js} +1 -1
  90. package/dist/assets/{react-ZM05SSz2.js → react-CdlDO5TG.js} +1 -1
  91. package/dist/assets/{react-BQ6jUfzX.js → react-Ct2ZzE_U.js} +1 -1
  92. package/dist/assets/{react-DXSBT-1v.js → react-DJxNpxcE.js} +1 -1
  93. package/dist/assets/{react-qLaRPrw4.js → react-s5yBxYCg.js} +1 -1
  94. package/dist/assets/{recharts-rN5v_P87.js → recharts-BXLxGQ-T.js} +1 -1
  95. package/dist/assets/{reportTimeframe-C5AD1AL2.js → reportTimeframe-tJTkNTvP.js} +1 -1
  96. package/dist/assets/{routePaths-DYebh4Li.js → routePaths--TXDBUUo.js} +1 -1
  97. package/dist/assets/{sentry-DfoGRlTp.js → sentry-bpmZUW7k.js} +1 -1
  98. package/dist/assets/{stripSplatSuffix-Db8ayksN.js → stripSplatSuffix-Bizh1-Tx.js} +1 -1
  99. package/dist/assets/{url-B-JScRaX.js → url-8ONn8gmN.js} +1 -1
  100. package/dist/assets/{url-BtS-4pap.js → url-Cc_9bwX-.js} +1 -1
  101. package/dist/assets/{useActualMatchingMatchDetail-DPtaMcdm.js → useActualMatchingMatchDetail-Mft821vz.js} +1 -1
  102. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-D2InIpSO.js → useAiCfoDashboardSuggestedQuestionsChips-3ayut61P.js} +1 -1
  103. package/dist/assets/{useAskAiCfoHostNavButtonProps-k11tYjVi.js → useAskAiCfoHostNavButtonProps-E2UGdnp9.js} +1 -1
  104. package/dist/assets/{useChargeCardPusherEvents-Bf7Vv0PE.js → useChargeCardPusherEvents-DVeqwUB9.js} +1 -1
  105. package/dist/assets/{useDeviceId-_3Ay4Sah.js → useDeviceId-3o80RPjJ.js} +1 -1
  106. package/dist/assets/{useEmailConnectResultRefresh-BCLtP2Ad.js → useEmailConnectResultRefresh-F8OBO8EU.js} +1 -1
  107. package/dist/assets/{useEnsureVendorListLoaded-Bud-c91I.js → useEnsureVendorListLoaded-CKZrwkQQ.js} +1 -1
  108. package/dist/assets/{useInitialThreadRequest-BVMcY486.js → useInitialThreadRequest-Df-inltN.js} +1 -1
  109. package/dist/assets/{useTaskManagerAccess-Cp8R2Cu9.js → useTaskManagerAccess-Bq9TDvwr.js} +1 -1
  110. package/dist/assets/{useTaskManagerPusherEvents-p1TIydvw.js → useTaskManagerPusherEvents-Ctn5L7kn.js} +1 -1
  111. package/dist/assets/{utils-CmKqkYr5.js → utils-CXFQdt3d.js} +1 -1
  112. package/dist/assets/{withTransactionSidePanel-btBdqPWA.js → withTransactionSidePanel-DOV8YzFf.js} +1 -1
  113. package/dist/assets/{zeni-epic-state-DmXGRK_Y.js → zeni-epic-state-BlWDBO75.js} +3 -3
  114. package/dist/index.html +1 -1
  115. package/package.json +3 -3
  116. package/dist/assets/AddressRoutes-7FdlQcLM.js +0 -1
  117. package/dist/assets/CustomerOnboardingAuthScreen-Gnqx1b1N.js +0 -1
  118. package/dist/assets/NotFoundScreen-CxVO6BUm.js +0 -1
  119. package/dist/assets/epic-B2pHLhBD.js +0 -2
@@ -1,4 +1,4 @@
1
- import{j as r}from"./liveblocks-DZUXZ-JO.js";import{a as d}from"./sentry-DfoGRlTp.js";import{K as a,a8 as u,ac as f,ad as h}from"./index-CJ_pjNEa.js";import{s as c}from"./mui-C0PYnbt1.js";import{i as y}from"./core-C4Vfz6Ll.js";import"./recharts-rN5v_P87.js";import"./zeni-epic-state-DmXGRK_Y.js";import"./analytics-C4ICDJLl.js";import"./plaid-hQES7k9Y.js";import"./dnd-kAQqqaX2.js";import"./stripe-cKAAJElX.js";import"./lottie-txhqSe8x.js";import"./lexical-SeD-pdYj.js";import"./pdf-bOGTjHnz.js";import"./utils-CmKqkYr5.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]="b9672464-58e8-4a68-9fc2-0281c7e83237",e._sentryDebugIdIdentifier="sentry-dbid-b9672464-58e8-4a68-9fc2-0281c7e83237")}catch{}})();const g=c("div")`
1
+ import{j as r}from"./liveblocks-V5YQZeeY.js";import{a as d}from"./sentry-bpmZUW7k.js";import{K as a,a8 as u,ac as f,ad as h}from"./index-9pdMsp-M.js";import{s as c}from"./mui-BmHHlwSU.js";import{i as y}from"./core-BWRpGVdr.js";import"./recharts-BXLxGQ-T.js";import"./zeni-epic-state-BlWDBO75.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.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]="b9672464-58e8-4a68-9fc2-0281c7e83237",e._sentryDebugIdIdentifier="sentry-dbid-b9672464-58e8-4a68-9fc2-0281c7e83237")}catch{}})();const g=c("div")`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-DZUXZ-JO.js";import{Wb as re,fE as X,l$ as _,dZ as N,dY as le,S$ as J,Vz as ce,Di as Pe,Wc as Y,D7 as je,Ds as Le,Dm as de,Db as pe,Dq as ve,Dn as Te,Wd as ue,sx as Ae,g5 as Ve,gC as Oe,We as W,Df as me,De as ge,Dv as Re,c6 as Fe}from"./zeni-epic-state-DmXGRK_Y.js";import{a0 as fe,p as Q,c as H,z as G,j as he,O as Ce,ae as be,ay as ye,az as Ze,aa as Se,K as R,af as De,G as K,aA as Be,ap as Ue,ar as $e,a7 as ze,m as we,S as We,n as He,aB as _e,V as Ge}from"./index-CJ_pjNEa.js";import{D as xe,n as M,S as Ie}from"./mui-C0PYnbt1.js";import ae from"./NotFoundScreen-CxVO6BUm.js";import{a as c}from"./sentry-DfoGRlTp.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Ye,n as se,o as z}from"./core-C4Vfz6Ll.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-k11tYjVi.js";import{M as Ne}from"./MobileAppDrawer-B4_Hh2uX.js";import"./recharts-rN5v_P87.js";import"./analytics-C4ICDJLl.js";import"./plaid-hQES7k9Y.js";import"./dnd-kAQqqaX2.js";import"./stripe-cKAAJElX.js";import"./lottie-txhqSe8x.js";import"./lexical-SeD-pdYj.js";import"./pdf-bOGTjHnz.js";import"./utils-CmKqkYr5.js";import"./InboxNotificationsProvider-CJt6vmnU.js";import"./useTaskManagerAccess-Cp8R2Cu9.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]="4e3470c9-1f86-45fb-a44b-34b1a9e7146a",e._sentryDebugIdIdentifier="sentry-dbid-4e3470c9-1f86-45fb-a44b-34b1a9e7146a")}catch{}})();const Je={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=fe(),m=ee(),[F,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>X(l))),E=g((l=>_(l))),{useFeatureGate:x}=Q(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=N(I,p),v=le(p),T=J(p),B=ce(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Y()),y()},A=()=>{F===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:V}=Ce(p?.tenantId),b=!L||V,O=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:O===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(T))},onCloseClick:A,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(ye,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ze,{...s})]})})},ea=M(Ie)`
1
+ import{j as a}from"./liveblocks-V5YQZeeY.js";import{Wb as re,fE as X,l$ as _,dZ as N,dY as le,S$ as J,Vz as ce,Di as Pe,Wc as Y,D7 as je,Ds as Le,Dm as de,Db as pe,Dq as ve,Dn as Te,Wd as ue,sx as Ae,g5 as Ve,gC as Oe,We as W,Df as me,De as ge,Dv as Re,c6 as Fe}from"./zeni-epic-state-BlWDBO75.js";import{a0 as fe,p as Q,c as H,z as G,j as he,O as Ce,ae as be,ay as ye,az as Ze,aa as Se,K as R,af as De,G as K,aA as Be,ap as Ue,ar as $e,a7 as ze,m as we,S as We,n as He,aB as _e,V as Ge}from"./index-9pdMsp-M.js";import{D as xe,n as M,S as Ie}from"./mui-BmHHlwSU.js";import ae from"./NotFoundScreen-C94S-cmy.js";import{a as c}from"./sentry-bpmZUW7k.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Ye,n as se,o as z}from"./core-BWRpGVdr.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-E2UGdnp9.js";import{M as Ne}from"./MobileAppDrawer-rCVKr3J3.js";import"./recharts-BXLxGQ-T.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.js";import"./InboxNotificationsProvider-Cd4NxEtR.js";import"./useTaskManagerAccess-Bq9TDvwr.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]="4e3470c9-1f86-45fb-a44b-34b1a9e7146a",e._sentryDebugIdIdentifier="sentry-dbid-4e3470c9-1f86-45fb-a44b-34b1a9e7146a")}catch{}})();const Je={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=fe(),m=ee(),[F,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>X(l))),E=g((l=>_(l))),{useFeatureGate:x}=Q(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=N(I,p),v=le(p),T=J(p),B=ce(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Y()),y()},A=()=>{F===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:V}=Ce(p?.tenantId),b=!L||V,O=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:O===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(T))},onCloseClick:A,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(ye,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ze,{...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-DZUXZ-JO.js";import T from"./NotFoundScreen-CxVO6BUm.js";import{a as n}from"./sentry-DfoGRlTp.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 h}from"./core-C4Vfz6Ll.js";import{fE as B,a21 as b,bk as F,bj as N,iL as V,gg as L}from"./zeni-epic-state-DmXGRK_Y.js";import{g as $,z as I,ar as q,dO as G}from"./index-CJ_pjNEa.js";import"./mui-C0PYnbt1.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-k11tYjVi.js";import{M as J}from"./MobileAppDrawer-B4_Hh2uX.js";import"./recharts-rN5v_P87.js";import"./analytics-C4ICDJLl.js";import"./plaid-hQES7k9Y.js";import"./dnd-kAQqqaX2.js";import"./stripe-cKAAJElX.js";import"./lottie-txhqSe8x.js";import"./lexical-SeD-pdYj.js";import"./pdf-bOGTjHnz.js";import"./utils-CmKqkYr5.js";import"./InboxNotificationsProvider-CJt6vmnU.js";import"./useTaskManagerAccess-Cp8R2Cu9.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]="c30de27d-27d0-4518-a9f6-b290035be40d",e._sentryDebugIdIdentifier="sentry-dbid-c30de27d-27d0-4518-a9f6-b290035be40d")}catch{}})();const K=P((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:r}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:r}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),Q=()=>{const e=_(),t=v(),d=$(),o=p((a=>B(a))),{aggregatedReportViewState:r}=p((a=>b(a))),{tenantEmailDomain:g}=M(),f=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=n.useRef(!1),[w,S]=n.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,j=N(l),x=C||k||j,c=n.useCallback(((a,i,E)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:E}))}),[]);n.useEffect((()=>{r?.fetchState==="Completed"&&m.current&&(f(L({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[r?.fetchState]);const y=n.useCallback(((a,i)=>{r!=null&&r?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[r?.fetchState,c]),D=n.useCallback(((a,i)=>{c(a,i,!1)}),[c]),u=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:r?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:u}),s.jsx(K,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:g,onReload:y,onTimeRangeSelect:D,handleDrawerToggle:u,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${g}/dashboard`,replace:!0})};function he(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(T,{})})]})}export{he as default};
1
+ import{j as s}from"./liveblocks-V5YQZeeY.js";import T from"./NotFoundScreen-C94S-cmy.js";import{a as n}from"./sentry-bpmZUW7k.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 h}from"./core-BWRpGVdr.js";import{fE as B,a21 as b,bk as F,bj as N,iL as V,gg as L}from"./zeni-epic-state-BlWDBO75.js";import{g as $,z as I,ar as q,dO as G}from"./index-9pdMsp-M.js";import"./mui-BmHHlwSU.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-E2UGdnp9.js";import{M as J}from"./MobileAppDrawer-rCVKr3J3.js";import"./recharts-BXLxGQ-T.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.js";import"./InboxNotificationsProvider-Cd4NxEtR.js";import"./useTaskManagerAccess-Bq9TDvwr.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]="c30de27d-27d0-4518-a9f6-b290035be40d",e._sentryDebugIdIdentifier="sentry-dbid-c30de27d-27d0-4518-a9f6-b290035be40d")}catch{}})();const K=P((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:r}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:r}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),Q=()=>{const e=_(),t=v(),d=$(),o=p((a=>B(a))),{aggregatedReportViewState:r}=p((a=>b(a))),{tenantEmailDomain:g}=M(),f=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=n.useRef(!1),[w,S]=n.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,j=N(l),x=C||k||j,c=n.useCallback(((a,i,E)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:E}))}),[]);n.useEffect((()=>{r?.fetchState==="Completed"&&m.current&&(f(L({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[r?.fetchState]);const y=n.useCallback(((a,i)=>{r!=null&&r?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[r?.fetchState,c]),D=n.useCallback(((a,i)=>{c(a,i,!1)}),[c]),u=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:r?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:u}),s.jsx(K,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:g,onReload:y,onTimeRangeSelect:D,handleDrawerToggle:u,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${g}/dashboard`,replace:!0})};function he(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(T,{})})]})}export{he as default};
@@ -1 +1 @@
1
- import{a as h,R as a}from"./sentry-DfoGRlTp.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-bpmZUW7k.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 Gl}from"./liveblocks-DZUXZ-JO.js";import{p as te,d as Bc,c as qc,g as Hl,a as zl}from"./sentry-DfoGRlTp.js";import{H as ge,bZ as Gc,fE as Hc,UG as zc,Vx as Zl,c6 as Vl}from"./zeni-epic-state-DmXGRK_Y.js";import{a as pe,b as Yl,c as Kl,d as Wl,e as pn,f as Jl,g as Xl,h as Ql,i as Ve,j as Zc,k as rt,l as kt,m as ef,o as at,p as tf}from"./utils-CmKqkYr5.js";import{r as rf}from"./url-BtS-4pap.js";import{r as hn}from"./empty-uRyODf4S.js";import{r as nf,a as of,b as sf,c as af}from"./pdf-lib-BsfRp21l.js";import{a as Ye,r as uf}from"./index-BTd7WWV0.js";import{r as cf}from"./index-E3novWwq.js";import{h as lf,g as ff,u as pf,j as kn,l as hf}from"./core-C4Vfz6Ll.js";import{u as df,z as Vc,L as mf,aj as yf,ak as gf,X as vf,I as bf}from"./index-CJ_pjNEa.js";import"./mui-C0PYnbt1.js";import{d as Lt}from"./decodeURIComponentSafe-CYsmEPcV.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new r.Error().stack;u&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[u]="b84d900e-cae9-473f-a2d2-03b3ddfa5394",r._sentryDebugIdIdentifier="sentry-dbid-b84d900e-cae9-473f-a2d2-03b3ddfa5394")}catch{}})();var An,Rn={exports:{}},Pn,In,Nn,Ln,$n,Mn,Cn,Dn,Fn,$t,Un,Bn,qn,Gn,Hn,zn,Zn,Vn,Yn,Kn,Wn,Mt,Jn,Xn,Qn,eo,to,ro,no,Ct,oo,io,so,ao,uo,co,lo,Dt={exports:{}},Ft={exports:{}},Ut={};function Yc(){if(Pn)return Ut;function r(t){return r=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},r(t)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},u(t,e)}function m(t){var e=(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 o,c=i(t);if(e){var a=i(this).constructor;o=Reflect.construct(c,arguments,a)}else o=c.apply(this,arguments);return(function(f,b){if(b&&(r(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v})(f)})(this,o)}}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(t)}Pn=1;var s,p,h={};function l(t,e,o){o||(o=Error);var c=(function(a){(function(d,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(y&&y.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),Object.defineProperty(d,"prototype",{writable:!1}),y&&u(d,y)})(v,a);var f,b=m(v);function v(d,y,g){var _;return(function(E,O){if(!(E instanceof O))throw new TypeError("Cannot call a class as a function")})(this,v),_=b.call(this,(function(E,O,$){return typeof e=="string"?e:e(E,O,$)})(d,y,g)),_.code=t,_}return f=v,Object.defineProperty(f,"prototype",{writable:!1}),f})(o);h[t]=c}function n(t,e){if(Array.isArray(t)){var o=t.length;return t=t.map((function(c){return String(c)})),o>2?"one of ".concat(e," ").concat(t.slice(0,o-1).join(", "),", or ")+t[o-1]:o===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}return l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",(function(t,e,o){var c,a,f;if(s===void 0&&(s=nt()),s(typeof t=="string","'name' must be a string"),typeof e=="string"&&(a="not ",e.substr(0,a.length)===a)?(c="must not be",e=e.replace(/^not /,"")):c="must be",(function(v,d,y){return(y===void 0||y>v.length)&&(y=v.length),v.substring(y-d.length,y)===d})(t," argument"))f="The ".concat(t," ").concat(c," ").concat(n(e,"type"));else{var b=(function(v,d,y){return typeof y!="number"&&(y=0),!(y+d.length>v.length)&&v.indexOf(d,y)!==-1})(t,".")?"property":"argument";f='The "'.concat(t,'" ').concat(b," ").concat(c," ").concat(n(e,"type"))}return f+=". Received type ".concat(r(o))}),TypeError),l("ERR_INVALID_ARG_VALUE",(function(t,e){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var c=p.inspect(e);return c.length>128&&(c="".concat(c.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(o,". Received ").concat(c)}),TypeError),l("ERR_INVALID_RETURN_VALUE",(function(t,e,o){var c;return c=o&&o.constructor&&o.constructor.name?"instance of ".concat(o.constructor.name):"type ".concat(r(o)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(c,".")}),TypeError),l("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];s===void 0&&(s=nt()),s(e.length>0,"At least one arg needs to be specified");var c="The ",a=e.length;switch(e=e.map((function(f){return'"'.concat(f,'"')})),a){case 1:c+="".concat(e[0]," argument");break;case 2:c+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:c+=e.slice(0,a-1).join(", "),c+=", and ".concat(e[a-1]," arguments")}return"".concat(c," must be specified")}),TypeError),Ut.codes=h,Ut}function wf(){if(Nn)return In;function r(j,w){var S=Object.keys(j);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(j);w&&(R=R.filter((function(T){return Object.getOwnPropertyDescriptor(j,T).enumerable}))),S.push.apply(S,R)}return S}function u(j){for(var w=1;w<arguments.length;w++){var S=arguments[w]!=null?arguments[w]:{};w%2?r(Object(S),!0).forEach((function(R){m(j,R,S[R])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(S)):r(Object(S)).forEach((function(R){Object.defineProperty(j,R,Object.getOwnPropertyDescriptor(S,R))}))}return j}function m(j,w,S){return(w=s(w))in j?Object.defineProperty(j,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):j[w]=S,j}function i(j,w,S){return w&&(function(R,T){for(var U=0;U<T.length;U++){var N=T[U];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(R,s(N.key),N)}})(j.prototype,w),Object.defineProperty(j,"prototype",{writable:!1}),j}function s(j){var w=(function(S,R){if(c(S)!=="object"||S===null)return S;var T=S[Symbol.toPrimitive];if(T!==void 0){var U=T.call(S,R);if(c(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(S)})(j,"string");return c(w)==="symbol"?w:String(w)}function p(j,w){if(w&&(c(w)==="object"||typeof w=="function"))return w;if(w!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h(j)}function h(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function l(j){var w=typeof Map=="function"?new Map:void 0;return l=function(S){if(S===null||(R=S,Function.toString.call(R).indexOf("[native code]")===-1))return S;var R;if(typeof S!="function")throw new TypeError("Super expression must either be null or a function");if(w!==void 0){if(w.has(S))return w.get(S);w.set(S,T)}function T(){return n(S,arguments,o(this).constructor)}return T.prototype=Object.create(S.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),e(T,S)},l(j)}function n(j,w,S){return n=t()?Reflect.construct.bind():function(R,T,U){var N=[null];N.push.apply(N,T);var A=new(Function.bind.apply(R,N));return U&&e(A,U.prototype),A},n.apply(null,arguments)}function t(){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 e(j,w){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(S,R){return S.__proto__=R,S},e(j,w)}function o(j){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(w){return w.__proto__||Object.getPrototypeOf(w)},o(j)}function c(j){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},c(j)}Nn=1;var a=pe().inspect,f=Yc().codes.ERR_INVALID_ARG_TYPE;function b(j,w,S){return(S===void 0||S>j.length)&&(S=j.length),j.substring(S-w.length,S)===w}var v="",d="",y="",g="",_={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 E(j){var w=Object.keys(j),S=Object.create(Object.getPrototypeOf(j));return w.forEach((function(R){S[R]=j[R]})),Object.defineProperty(S,"message",{value:j.message}),S}function O(j){return a(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function $(j,w,S){var R="",T="",U=0,N="",A=!1,H=O(j),P=H.split(`
1
+ import{j as Gl}from"./liveblocks-V5YQZeeY.js";import{p as te,d as Bc,c as qc,g as Hl,a as zl}from"./sentry-bpmZUW7k.js";import{H as ge,bZ as Gc,fE as Hc,UG as zc,Vx as Zl,c6 as Vl}from"./zeni-epic-state-BlWDBO75.js";import{a as pe,b as Yl,c as Kl,d as Wl,e as pn,f as Jl,g as Xl,h as Ql,i as Ve,j as Zc,k as rt,l as kt,m as ef,o as at,p as tf}from"./utils-CXFQdt3d.js";import{r as rf}from"./url-Cc_9bwX-.js";import{r as hn}from"./empty-BxjviaN4.js";import{r as nf,a as of,b as sf,c as af}from"./pdf-lib-D4o6Nk27.js";import{a as Ye,r as uf}from"./index-DYK9WSJX.js";import{r as cf}from"./index-BXpurrfG.js";import{h as lf,g as ff,u as pf,j as kn,l as hf}from"./core-BWRpGVdr.js";import{u as df,z as Vc,L as mf,aj as yf,ak as gf,X as vf,I as bf}from"./index-9pdMsp-M.js";import"./mui-BmHHlwSU.js";import{d as Lt}from"./decodeURIComponentSafe-DN9u1X8y.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new r.Error().stack;u&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[u]="b84d900e-cae9-473f-a2d2-03b3ddfa5394",r._sentryDebugIdIdentifier="sentry-dbid-b84d900e-cae9-473f-a2d2-03b3ddfa5394")}catch{}})();var An,Rn={exports:{}},Pn,In,Nn,Ln,$n,Mn,Cn,Dn,Fn,$t,Un,Bn,qn,Gn,Hn,zn,Zn,Vn,Yn,Kn,Wn,Mt,Jn,Xn,Qn,eo,to,ro,no,Ct,oo,io,so,ao,uo,co,lo,Dt={exports:{}},Ft={exports:{}},Ut={};function Yc(){if(Pn)return Ut;function r(t){return r=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},r(t)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},u(t,e)}function m(t){var e=(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 o,c=i(t);if(e){var a=i(this).constructor;o=Reflect.construct(c,arguments,a)}else o=c.apply(this,arguments);return(function(f,b){if(b&&(r(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v})(f)})(this,o)}}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(t)}Pn=1;var s,p,h={};function l(t,e,o){o||(o=Error);var c=(function(a){(function(d,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(y&&y.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),Object.defineProperty(d,"prototype",{writable:!1}),y&&u(d,y)})(v,a);var f,b=m(v);function v(d,y,g){var _;return(function(E,O){if(!(E instanceof O))throw new TypeError("Cannot call a class as a function")})(this,v),_=b.call(this,(function(E,O,$){return typeof e=="string"?e:e(E,O,$)})(d,y,g)),_.code=t,_}return f=v,Object.defineProperty(f,"prototype",{writable:!1}),f})(o);h[t]=c}function n(t,e){if(Array.isArray(t)){var o=t.length;return t=t.map((function(c){return String(c)})),o>2?"one of ".concat(e," ").concat(t.slice(0,o-1).join(", "),", or ")+t[o-1]:o===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}return l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",(function(t,e,o){var c,a,f;if(s===void 0&&(s=nt()),s(typeof t=="string","'name' must be a string"),typeof e=="string"&&(a="not ",e.substr(0,a.length)===a)?(c="must not be",e=e.replace(/^not /,"")):c="must be",(function(v,d,y){return(y===void 0||y>v.length)&&(y=v.length),v.substring(y-d.length,y)===d})(t," argument"))f="The ".concat(t," ").concat(c," ").concat(n(e,"type"));else{var b=(function(v,d,y){return typeof y!="number"&&(y=0),!(y+d.length>v.length)&&v.indexOf(d,y)!==-1})(t,".")?"property":"argument";f='The "'.concat(t,'" ').concat(b," ").concat(c," ").concat(n(e,"type"))}return f+=". Received type ".concat(r(o))}),TypeError),l("ERR_INVALID_ARG_VALUE",(function(t,e){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var c=p.inspect(e);return c.length>128&&(c="".concat(c.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(o,". Received ").concat(c)}),TypeError),l("ERR_INVALID_RETURN_VALUE",(function(t,e,o){var c;return c=o&&o.constructor&&o.constructor.name?"instance of ".concat(o.constructor.name):"type ".concat(r(o)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(c,".")}),TypeError),l("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];s===void 0&&(s=nt()),s(e.length>0,"At least one arg needs to be specified");var c="The ",a=e.length;switch(e=e.map((function(f){return'"'.concat(f,'"')})),a){case 1:c+="".concat(e[0]," argument");break;case 2:c+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:c+=e.slice(0,a-1).join(", "),c+=", and ".concat(e[a-1]," arguments")}return"".concat(c," must be specified")}),TypeError),Ut.codes=h,Ut}function wf(){if(Nn)return In;function r(j,w){var S=Object.keys(j);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(j);w&&(R=R.filter((function(T){return Object.getOwnPropertyDescriptor(j,T).enumerable}))),S.push.apply(S,R)}return S}function u(j){for(var w=1;w<arguments.length;w++){var S=arguments[w]!=null?arguments[w]:{};w%2?r(Object(S),!0).forEach((function(R){m(j,R,S[R])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(S)):r(Object(S)).forEach((function(R){Object.defineProperty(j,R,Object.getOwnPropertyDescriptor(S,R))}))}return j}function m(j,w,S){return(w=s(w))in j?Object.defineProperty(j,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):j[w]=S,j}function i(j,w,S){return w&&(function(R,T){for(var U=0;U<T.length;U++){var N=T[U];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(R,s(N.key),N)}})(j.prototype,w),Object.defineProperty(j,"prototype",{writable:!1}),j}function s(j){var w=(function(S,R){if(c(S)!=="object"||S===null)return S;var T=S[Symbol.toPrimitive];if(T!==void 0){var U=T.call(S,R);if(c(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(S)})(j,"string");return c(w)==="symbol"?w:String(w)}function p(j,w){if(w&&(c(w)==="object"||typeof w=="function"))return w;if(w!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h(j)}function h(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function l(j){var w=typeof Map=="function"?new Map:void 0;return l=function(S){if(S===null||(R=S,Function.toString.call(R).indexOf("[native code]")===-1))return S;var R;if(typeof S!="function")throw new TypeError("Super expression must either be null or a function");if(w!==void 0){if(w.has(S))return w.get(S);w.set(S,T)}function T(){return n(S,arguments,o(this).constructor)}return T.prototype=Object.create(S.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),e(T,S)},l(j)}function n(j,w,S){return n=t()?Reflect.construct.bind():function(R,T,U){var N=[null];N.push.apply(N,T);var A=new(Function.bind.apply(R,N));return U&&e(A,U.prototype),A},n.apply(null,arguments)}function t(){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 e(j,w){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(S,R){return S.__proto__=R,S},e(j,w)}function o(j){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(w){return w.__proto__||Object.getPrototypeOf(w)},o(j)}function c(j){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},c(j)}Nn=1;var a=pe().inspect,f=Yc().codes.ERR_INVALID_ARG_TYPE;function b(j,w,S){return(S===void 0||S>j.length)&&(S=j.length),j.substring(S-w.length,S)===w}var v="",d="",y="",g="",_={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 E(j){var w=Object.keys(j),S=Object.create(Object.getPrototypeOf(j));return w.forEach((function(R){S[R]=j[R]})),Object.defineProperty(S,"message",{value:j.message}),S}function O(j){return a(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function $(j,w,S){var R="",T="",U=0,N="",A=!1,H=O(j),P=H.split(`
2
2
  `),I=O(w).split(`
3
3
  `),x=0,C="";if(S==="strictEqual"&&c(j)==="object"&&c(w)==="object"&&j!==null&&w!==null&&(S="strictEqualObject"),P.length===1&&I.length===1&&P[0]!==I[0]){var Z=P[0].length+I[0].length;if(Z<=10){if(!(c(j)==="object"&&j!==null||c(w)==="object"&&w!==null||j===0&&w===0))return"".concat(_[S],`
4
4
 
@@ -1 +1 @@
1
- import{j as r}from"./liveblocks-DZUXZ-JO.js";import z from"./NotFoundScreen-CxVO6BUm.js";import{a as p}from"./sentry-DfoGRlTp.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as K,o as b}from"./core-C4Vfz6Ll.js";import{fE as E,_5 as h,_n as w,Oe as U,Oa as L,Od as f,O3 as N,_M as B,O7 as M,Og as q}from"./zeni-epic-state-DmXGRK_Y.js";import{z as _,w as T,cc as F,x as $,bV as G,cd as H}from"./index-CJ_pjNEa.js";import"./mui-C0PYnbt1.js";import{u as J}from"./useEnsureVendorListLoaded-Bud-c91I.js";import{R as x}from"./ReimbursementApprovalRuleDetailScreen-CQJ7WhRf.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]="248a537f-75b8-4b0e-a06a-51e788334f58",e._sentryDebugIdIdentifier="sentry-dbid-248a537f-75b8-4b0e-a06a-51e788334f58")}catch{}})();const j="reimbursement-approval-rule-update",P=O((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(T(F)),Q=({isLoading:e})=>{const s=C(),n=D(),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=>h(o))),g=u((o=>w(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{g?.updateStatus.fetchState==="Completed"&&a(U())}),[g]),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(k,{to:"../../promo"}):r.jsx(P,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",X=O((function(e){const s=h(e),n=w(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(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(q(t,!0))}}}))(T(H)),Y=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=G(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(Q,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),g=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));J();const y=u((i=>w(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||g!=="Not-Started"||e||(R(!0),a(M(!1,!0)))}),[v,g,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,W)=>{i.endsWith(A)&&W.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(X,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function ue(){return r.jsxs(K,{children:[r.jsx(b,{path:"/",element:r.jsx(Y,{})}),r.jsx(b,{path:"/new",element:r.jsx(x,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(b,{path:"*",element:r.jsx(z,{})})]})}export{ue as R};
1
+ import{j as r}from"./liveblocks-V5YQZeeY.js";import z from"./NotFoundScreen-C94S-cmy.js";import{a as p}from"./sentry-bpmZUW7k.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as K,o as b}from"./core-BWRpGVdr.js";import{fE as E,_5 as h,_n as w,Oe as U,Oa as L,Od as f,O3 as N,_M as B,O7 as M,Og as q}from"./zeni-epic-state-BlWDBO75.js";import{z as _,w as T,cc as F,x as $,bV as G,cd as H}from"./index-9pdMsp-M.js";import"./mui-BmHHlwSU.js";import{u as J}from"./useEnsureVendorListLoaded-CKZrwkQQ.js";import{R as x}from"./ReimbursementApprovalRuleDetailScreen-BzhkgPjS.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]="248a537f-75b8-4b0e-a06a-51e788334f58",e._sentryDebugIdIdentifier="sentry-dbid-248a537f-75b8-4b0e-a06a-51e788334f58")}catch{}})();const j="reimbursement-approval-rule-update",P=O((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(T(F)),Q=({isLoading:e})=>{const s=C(),n=D(),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=>h(o))),g=u((o=>w(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{g?.updateStatus.fetchState==="Completed"&&a(U())}),[g]),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(k,{to:"../../promo"}):r.jsx(P,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",X=O((function(e){const s=h(e),n=w(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(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(q(t,!0))}}}))(T(H)),Y=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=G(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(Q,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),g=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));J();const y=u((i=>w(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||g!=="Not-Started"||e||(R(!0),a(M(!1,!0)))}),[v,g,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,W)=>{i.endsWith(A)&&W.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(X,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function ue(){return r.jsxs(K,{children:[r.jsx(b,{path:"/",element:r.jsx(Y,{})}),r.jsx(b,{path:"/new",element:r.jsx(x,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(b,{path:"*",element:r.jsx(z,{})})]})}export{ue as R};
@@ -1 +1 @@
1
- import{j as g}from"./liveblocks-DZUXZ-JO.js";import{a as y}from"./sentry-DfoGRlTp.js";import{h as U,u as x,g as C,i as V,j as R,l as k}from"./core-C4Vfz6Ll.js";import{_n as _,_5 as O,O6 as j,Oj as B,Oe as A,Of as E,_o as F,fE as K,Od as L}from"./zeni-epic-state-DmXGRK_Y.js";import{z as N,a6 as P,c3 as W,x as $,bV as G,c4 as H}from"./index-CJ_pjNEa.js";import{u as q}from"./mui-C0PYnbt1.js";import{u as J}from"./useEnsureVendorListLoaded-Bud-c91I.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]="98f36186-6368-4850-a7c1-cf21b7694019",e._sentryDebugIdIdentifier="sentry-dbid-98f36186-6368-4850-a7c1-cf21b7694019")}catch{}})();const M=k((function(e,o){const t=_(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return o.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===o.approvalRuleId))===0),{localData:t,hideUpperBoundField:s,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const I=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=u.actors.selectedNonUsers.map((m=>{const f=(S=m.value,F(S)==null);var S;return{type:f?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!f}})),c=I.concat(b);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},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:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(W);function Q(){const e=U(),o=x(),t=C(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>_(n))),l=R((n=>O(n))),[a,d]=y.useState(!1);if(y.useEffect((()=>{a||(d(!0),o(j(!0)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function se(e){return F(e)==null}const X=k((function(e,o){const t=_(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(s.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:s,vendorNamesById:i,editingRuleId:p==="approval_update"?o.approvalRuleId:void 0,allApprovalRulesWithUser:O(e).allApprovalRules}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((f=>{const S=f.actorKind?.selectedOption,z=f.selectedRole?.selectedNonUsers??[];let D=[];S==="role"?D=z.map((w=>({type:"attribute",subType:w.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):S==="specific_person"&&(D=(f.persons?.selectedUsers??[]).map((w=>({type:"user",subType:void 0,userId:w.userId,idType:"user",isImplicitActor:!1}))));const T=f.action??"require_approval";m.push({action:T,actors:D,operator:D.length>1?T==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.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&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const b=h?.selection.selectedOptions??[];if(b.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(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:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(L(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=R((t=>K(t))),{isApprovalRulesV3Enabled:o}=G(e?.tenantId);return o?g.jsx(Y,{}):g.jsx(Q,{})}function Y(){const e=U(),o=x(),t=C(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>_(n))),l=R((n=>O(n))),[a,d]=y.useState(!1);if(J(),y.useEffect((()=>{a||(d(!0),o(j(!1)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,se as i};
1
+ import{j as g}from"./liveblocks-V5YQZeeY.js";import{a as y}from"./sentry-bpmZUW7k.js";import{h as U,u as x,g as C,i as V,j as R,l as k}from"./core-BWRpGVdr.js";import{_n as _,_5 as O,O6 as j,Oj as B,Oe as A,Of as E,_o as F,fE as K,Od as L}from"./zeni-epic-state-BlWDBO75.js";import{z as N,a6 as P,c3 as W,x as $,bV as G,c4 as H}from"./index-9pdMsp-M.js";import{u as q}from"./mui-BmHHlwSU.js";import{u as J}from"./useEnsureVendorListLoaded-CKZrwkQQ.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]="98f36186-6368-4850-a7c1-cf21b7694019",e._sentryDebugIdIdentifier="sentry-dbid-98f36186-6368-4850-a7c1-cf21b7694019")}catch{}})();const M=k((function(e,o){const t=_(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return o.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===o.approvalRuleId))===0),{localData:t,hideUpperBoundField:s,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const I=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=u.actors.selectedNonUsers.map((m=>{const f=(S=m.value,F(S)==null);var S;return{type:f?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!f}})),c=I.concat(b);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},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:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(W);function Q(){const e=U(),o=x(),t=C(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>_(n))),l=R((n=>O(n))),[a,d]=y.useState(!1);if(y.useEffect((()=>{a||(d(!0),o(j(!0)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function se(e){return F(e)==null}const X=k((function(e,o){const t=_(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(s.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:s,vendorNamesById:i,editingRuleId:p==="approval_update"?o.approvalRuleId:void 0,allApprovalRulesWithUser:O(e).allApprovalRules}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((f=>{const S=f.actorKind?.selectedOption,z=f.selectedRole?.selectedNonUsers??[];let D=[];S==="role"?D=z.map((w=>({type:"attribute",subType:w.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):S==="specific_person"&&(D=(f.persons?.selectedUsers??[]).map((w=>({type:"user",subType:void 0,userId:w.userId,idType:"user",isImplicitActor:!1}))));const T=f.action??"require_approval";m.push({action:T,actors:D,operator:D.length>1?T==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.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&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const b=h?.selection.selectedOptions??[];if(b.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(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:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(L(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=R((t=>K(t))),{isApprovalRulesV3Enabled:o}=G(e?.tenantId);return o?g.jsx(Y,{}):g.jsx(Q,{})}function Y(){const e=U(),o=x(),t=C(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>_(n))),l=R((n=>O(n))),[a,d]=y.useState(!1);if(J(),y.useEffect((()=>{a||(d(!0),o(j(!1)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,se as i};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-DZUXZ-JO.js";import{u as ae,j as v,h as Q,g as Y,i as ie,N,l as ee,q as lt,n as mt,o as x}from"./core-C4Vfz6Ll.js";import{fE as H,Oa as ct,$S as ge,c6 as he,Ng as Fe,ma as dt,Nv as ce,Nu as de,$T as ut,bj as fe,gV as Le,$U as pt,XC as bt,l$ as $e,XD as ke,XE as gt,kN as ht,ZT as ft,l0 as St,N4 as It,CA as yt,kU as At,NR as Ne,$V as Pe,$W as Ce,$X as Rt,$Y as vt,$Z as kt,NB as Ee,l6 as Ct,_0 as Et,Nt as wt,Ne as xt,$_ as Bt,Nd as Tt,$$ as Dt,Nl as we,NF as jt,NE as Ut,NA as Ft,a00 as _e,S$ as Lt,bk as $t,No as Nt,O7 as Pt,a01 as _t,a02 as Mt,NN as Ot,NK as xe,Zn as Zt,Nb as zt,a03 as Me,OA as Be,OI as Gt,a04 as Vt,a05 as X,a06 as Ht,a07 as Oe,a08 as Wt,a09 as Ze,a0a as ze,NZ as ue,br as qt,bI as Se,cK as Ie,dZ as Ge,dY as Ve,a0b as Xt,gg as Kt,ZA as Yt,a0c as Jt,a0d as He,ZE as Qt,_n as en,a0e as tn,_M as nn,OF as Te,OE as an,a0f as sn,a0g as on,a0h as rn,a0i as ln,a0j as mn,_6 as cn,Ov as dn,Oz as un,bm as pn,bH as bn,cE as gn,cs as hn,bq as fn,U$ as Sn,d8 as In,db as yn,da as An,cD as Rn}from"./zeni-epic-state-DmXGRK_Y.js";import{bV as vn,g as We,a0 as qe,p as oe,c as F,z as L,cT as Xe,a7 as re,m as w,aR as De,K as j,ad as se,ae as kn,G as Ke,cU as Cn,n as K,ar as Ye,cV as En,V as le,cW as wn,ap as xn,aa as Bn,a6 as ye,S as Je,w as Tn,bD as Dn,au as jn,ah as Un,cX as Fn,j as Ln}from"./index-CJ_pjNEa.js";import{n as P,S as $n,u as Qe}from"./mui-C0PYnbt1.js";import pe from"./NotFoundScreen-CxVO6BUm.js";import{S as je}from"./SetupPagesScreen-DzLiX5R5.js";import{F as et}from"./FeaturePreviewScreen-Cnh2Fe6t.js";import{a as g}from"./sentry-DfoGRlTp.js";import{u as Ae}from"./useAskAiCfoHostNavButtonProps-k11tYjVi.js";import{u as tt}from"./useInitialThreadRequest-BVMcY486.js";import{D as Nn}from"./DrawerScreen-CmgVB1Zi.js";import{M as nt}from"./MobileAppDrawer-B4_Hh2uX.js";import{F as Pn}from"./ScreenRoutes-Cix6ynkH.js";import{R as _n}from"./ReimbursementApprovalRoutes-_wQ1m-SZ.js";import"./recharts-rN5v_P87.js";import"./analytics-C4ICDJLl.js";import"./plaid-hQES7k9Y.js";import"./dnd-kAQqqaX2.js";import"./stripe-cKAAJElX.js";import"./lottie-txhqSe8x.js";import"./lexical-SeD-pdYj.js";import"./pdf-bOGTjHnz.js";import"./utils-CmKqkYr5.js";import"./BusinessVerificationPageScreen-8VbyEZWD.js";import"./routePaths-DYebh4Li.js";import"./analyticsHelper-CPHVprda.js";import"./InboxNotificationsProvider-CJt6vmnU.js";import"./useTaskManagerAccess-Cp8R2Cu9.js";import"./getLocaleForTenant-DJIJUZ-c.js";import"./useEnsureVendorListLoaded-Bud-c91I.js";import"./ReimbursementApprovalRuleDetailScreen-CQJ7WhRf.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]="b0adaa4c-3674-4275-bbd7-fb8720a318a5",e._sentryDebugIdIdentifier="sentry-dbid-b0adaa4c-3674-4275-bbd7-fb8720a318a5")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Ke.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:w,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(we(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ft(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(we(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(wt({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(Ee(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(Et({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(Ee("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(vt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(Rt({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=K(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(w.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Ue(){const e=Q(),t=ae(),n=Y(),{reimbursementId:r}=ie(),m=We(),c=qe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(F.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(F.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Ae({mobileExploreReferrer:"Reimbursement Details"}),B=Y().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,A]=g.useState(!1),S=L.getSignedInUser(),E=v((b=>H(b))),h=v((b=>ge(b,r))),$=tt(E?.companyId,{clearParams:h.fetchState==="Completed"}),U=he(E?.userRole??[]);(function(){const b=ae(),M=v((J=>H(J))),O=M?.tenantId,{isApprovalRulesV3Enabled:Z,isLoading:W}=vn(O),z=v((J=>J.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||z==="Not-Started"&&b(ct(!0,!1,!1,Z))}),[O,W,Z,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(A(!0),t(Fe(!1,I,u,r)))}));const R=v((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||U&&h.billStatus==="rejected"||U===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Zn,{windowSize:c,children:[s.jsx(re,{analytics:w,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:E?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:E?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:E,reimbursementId:r,themeState:m,uncategorizedAccounts:R,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Xe,{isNewReimbursement:r==null})}const Zn=P.div`
1
+ import{j as s}from"./liveblocks-V5YQZeeY.js";import{u as ae,j as v,h as Q,g as Y,i as ie,N,l as ee,q as lt,n as mt,o as x}from"./core-BWRpGVdr.js";import{fE as H,Oa as ct,$S as ge,c6 as he,Ng as Fe,ma as dt,Nv as ce,Nu as de,$T as ut,bj as fe,gV as Le,$U as pt,XC as bt,l$ as $e,XD as ke,XE as gt,kN as ht,ZT as ft,l0 as St,N4 as It,CA as yt,kU as At,NR as Ne,$V as Pe,$W as Ce,$X as Rt,$Y as vt,$Z as kt,NB as Ee,l6 as Ct,_0 as Et,Nt as wt,Ne as xt,$_ as Bt,Nd as Tt,$$ as Dt,Nl as we,NF as jt,NE as Ut,NA as Ft,a00 as _e,S$ as Lt,bk as $t,No as Nt,O7 as Pt,a01 as _t,a02 as Mt,NN as Ot,NK as xe,Zn as Zt,Nb as zt,a03 as Me,OA as Be,OI as Gt,a04 as Vt,a05 as X,a06 as Ht,a07 as Oe,a08 as Wt,a09 as Ze,a0a as ze,NZ as ue,br as qt,bI as Se,cK as Ie,dZ as Ge,dY as Ve,a0b as Xt,gg as Kt,ZA as Yt,a0c as Jt,a0d as He,ZE as Qt,_n as en,a0e as tn,_M as nn,OF as Te,OE as an,a0f as sn,a0g as on,a0h as rn,a0i as ln,a0j as mn,_6 as cn,Ov as dn,Oz as un,bm as pn,bH as bn,cE as gn,cs as hn,bq as fn,U$ as Sn,d8 as In,db as yn,da as An,cD as Rn}from"./zeni-epic-state-BlWDBO75.js";import{bV as vn,g as We,a0 as qe,p as oe,c as F,z as L,cT as Xe,a7 as re,m as w,aR as De,K as j,ad as se,ae as kn,G as Ke,cU as Cn,n as K,ar as Ye,cV as En,V as le,cW as wn,ap as xn,aa as Bn,a6 as ye,S as Je,w as Tn,bD as Dn,au as jn,ah as Un,cX as Fn,j as Ln}from"./index-9pdMsp-M.js";import{n as P,S as $n,u as Qe}from"./mui-BmHHlwSU.js";import pe from"./NotFoundScreen-C94S-cmy.js";import{S as je}from"./SetupPagesScreen-DPnnq4jj.js";import{F as et}from"./FeaturePreviewScreen-B9UACzAC.js";import{a as g}from"./sentry-bpmZUW7k.js";import{u as Ae}from"./useAskAiCfoHostNavButtonProps-E2UGdnp9.js";import{u as tt}from"./useInitialThreadRequest-Df-inltN.js";import{D as Nn}from"./DrawerScreen-DH40ycW6.js";import{M as nt}from"./MobileAppDrawer-rCVKr3J3.js";import{F as Pn}from"./ScreenRoutes-vTLuTGuW.js";import{R as _n}from"./ReimbursementApprovalRoutes-CsG7QtOs.js";import"./recharts-BXLxGQ-T.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.js";import"./BusinessVerificationPageScreen-71JxUYXB.js";import"./routePaths--TXDBUUo.js";import"./analyticsHelper-Cn2rORl_.js";import"./InboxNotificationsProvider-Cd4NxEtR.js";import"./useTaskManagerAccess-Bq9TDvwr.js";import"./getLocaleForTenant-BNAJG7gN.js";import"./useEnsureVendorListLoaded-CKZrwkQQ.js";import"./ReimbursementApprovalRuleDetailScreen-BzhkgPjS.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]="b0adaa4c-3674-4275-bbd7-fb8720a318a5",e._sentryDebugIdIdentifier="sentry-dbid-b0adaa4c-3674-4275-bbd7-fb8720a318a5")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Ke.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:w,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(we(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ft(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(we(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(wt({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(Ee(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(Et({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(Ee("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(vt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(Rt({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=K(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(w.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Ue(){const e=Q(),t=ae(),n=Y(),{reimbursementId:r}=ie(),m=We(),c=qe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(F.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(F.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Ae({mobileExploreReferrer:"Reimbursement Details"}),B=Y().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,A]=g.useState(!1),S=L.getSignedInUser(),E=v((b=>H(b))),h=v((b=>ge(b,r))),$=tt(E?.companyId,{clearParams:h.fetchState==="Completed"}),U=he(E?.userRole??[]);(function(){const b=ae(),M=v((J=>H(J))),O=M?.tenantId,{isApprovalRulesV3Enabled:Z,isLoading:W}=vn(O),z=v((J=>J.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||z==="Not-Started"&&b(ct(!0,!1,!1,Z))}),[O,W,Z,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(A(!0),t(Fe(!1,I,u,r)))}));const R=v((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||U&&h.billStatus==="rejected"||U===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Zn,{windowSize:c,children:[s.jsx(re,{analytics:w,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:E?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:E?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:E,reimbursementId:r,themeState:m,uncategorizedAccounts:R,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Xe,{isNewReimbursement:r==null})}const Zn=P.div`
2
2
  display: flex;
3
3
  position: relative;
4
4
  height: 100vh;
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-DZUXZ-JO.js";import{g as te,h as ve,u as Ye,i as Ue,j as _,l as xe,n as ze,o as oe}from"./core-C4Vfz6Ll.js";import{fE as J,ED as S,Vy as Ge,l$ as ue,uh as he,v6 as Y,lG as O,lP as F,lH as V,kK as P,kB as A,kA as E,DG as U,vb as ye,bm as He,Vz as We,bj as Ne,E$ as $e,VA as qe,VB as Ze,cg as R,Dz as ne,VC as re,VD as Ke,VE as Qe,VF as Je,VG as Xe,VH as ea,VI as aa,VJ as sa,VK as ta,VL as oa,VM as na,VN as ra,VO as la,VP as j,VQ as x,VR as z,VS as G,VT as H,VU as W,VV as N,VW as $,VX as q,VY as Z,eg as ca,EF as ia,Er as le,Es as ce,EL as da,Ew as ie,bC as k,VZ as de,de as pe,Ex as _e,ER as pa,V_ as _a,V$ as fa,W0 as ba,W1 as ma,W2 as ua,W3 as ha,W4 as ya,W5 as Ca,W6 as wa,W7 as ga,dZ as Ra,dY as Ia}from"./zeni-epic-state-DmXGRK_Y.js";import{am as Sa,an as Ta,ao as ja,a as ka,a0 as Da,p as Ce,c as K,z as we,ap as Oa,V as Fa,e as Va,aq as Pa,ar as Aa,a7 as Ea,m as Q,S as Ma,D as Ba,n as ge,as as La,at as va,au as Ya}from"./index-CJ_pjNEa.js";import"./mui-C0PYnbt1.js";import Ua from"./NotFoundScreen-CxVO6BUm.js";import{F as xa}from"./FeaturePreviewScreen-Cnh2Fe6t.js";import{a as u}from"./sentry-DfoGRlTp.js";import{u as za}from"./useInitialThreadRequest-BVMcY486.js";import{t as fe,a as be,b as Ga}from"./routePaths-DYebh4Li.js";import{t as me}from"./reportTimeframe-C5AD1AL2.js";import{M as Ha}from"./MobileAppDrawer-B4_Hh2uX.js";import"./recharts-rN5v_P87.js";import"./analytics-C4ICDJLl.js";import"./plaid-hQES7k9Y.js";import"./dnd-kAQqqaX2.js";import"./stripe-cKAAJElX.js";import"./lottie-txhqSe8x.js";import"./lexical-SeD-pdYj.js";import"./pdf-bOGTjHnz.js";import"./utils-CmKqkYr5.js";import"./InboxNotificationsProvider-CJt6vmnU.js";import"./useTaskManagerAccess-Cp8R2Cu9.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]="9e2af523-c507-45a5-a656-2420cd620bc5",e._sentryDebugIdIdentifier="sentry-dbid-9e2af523-c507-45a5-a656-2420cd620bc5")}catch{}})();const Wa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(Z({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(W({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0}))},Na=e=>{e(fa()),e(ba()),e(ma()),e(ua()),e(ha()),e(ya()),e(Ca()),e(wa()),e(ga())},$a=xe((function(e){const o=we.getSignedInUser(),b=e.tenantState.currentTenantId,m=J(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=S(e),n=We(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:Q,isZeniUser:Ne(o),showAccountGroups:n===!0,isAccountingClassesEnabled:ue(e),isAccountingProjectsEnabled:he(e),currentTenantCompanyName:a,statementEndPoint:`${Ya}/statement`,authParams:s,isZeniCOAUsed:n}}),(function(e,o){const{navigate:b,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(Y(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(_a(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(pa(a)),s){const{isCompareModeOn:n,filter:r}=o,{additionalBalances:i,balancesRange:d}=r;let c=[...i];a==="year"&&(c=c.filter((p=>p!=="this_period_vs_same_period_last_year"&&p!=="this_period_vs_same_period_last_year_percent"&&p!=="same_period_last_year"))),e(le(o.firstMonthOfFY,n,d.numberOfPeriods<1?1:d.numberOfPeriods,c)),i.length>0&&e(ce(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",d.numberOfPeriods<1?1:d.numberOfPeriods,c))}t!==!0&&setTimeout((()=>h(e)),50)},onInitialDateRangeAvailable:(a,s)=>{const{filter:t}=o,n=me(t.timeframe),r=k(a),i=k(s),d=de(o.firstMonthOfFY,n,{startDate:r,endDate:i})??t.balancesRange.numberOfPeriods,{startOfTimeframeFY:c,endOfTimeframeFY:p}=pe(i,o.firstMonthOfFY,n);e(_e({numberOfPeriods:d,orderBy:t.balancesRange.orderBy,thisPeriod:{startDate:c,endDate:p}}))},onCustomDateRangeChanged:(a,s,t)=>{const{filter:n}=o,r=me(t??n.timeframe);switch(o.selectedReportID){case"profit_and_loss":case"profit_and_loss_by_classes":e(ye(r,void 0,!0,!1,a,s)),o.selectedReportID==="profit_and_loss_by_classes"&&o.isAccountingClassesEnabled&&e(ne());break;case"profit_and_loss_by_projects":o.isAccountingProjectsEnabled&&e(U());break;case"balance_sheet":e(E(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(E(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(A());break;case"balance_sheet_by_projects":e(E(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(P());break;case"cash_flow":e(O(r,!0,a,s));break;case"cash_flow_by_classes":e(O(r,!0,a,s)),o.isAccountingClassesEnabled&&e(V());break;case"cash_flow_by_projects":e(O(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(F())}const i=k(a),d=k(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:M}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:M}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(I(a)||R(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ga(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,i,n,r):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?be(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],i,n,r):a.accountType!=null?fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r):void 0})();if(d!=null){const c=ge(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:D(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Z({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(q({scrollPosition:s}));break;case"profit_and_loss_by_projects":e($({scrollPosition:s}));break;case"balance_sheet":e(N({scrollPosition:s}));break;case"balance_sheet_by_classes":e(W({scrollPosition:s}));break;case"balance_sheet_by_projects":e(H({scrollPosition:s}));break;case"cash_flow_by_classes":e(G({scrollPosition:s}));break;case"cash_flow_by_projects":e(z({scrollPosition:s}));break;case"cash_flow":e(x({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(Z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(q({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(W({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{b("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,n=I(t),r=R(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",D(t)),e(j(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",D(t)),e(j(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",D(t)),e(j(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{R(o.selectedReportID)?e(Xe({classesToFilterOut:a})):I(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{R(o.selectedReportID)?e(Ke({projectsToFilterOut:a})):I(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):e(Je({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=R(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?V():a?A():ne()),o.isAccountingProjectsEnabled&&e(s?F():a?P():U())},onUpdateDisplayOrder:a=>{e(Ze(a))},onUpdateReportFormat:a=>{Na(e),e(qe(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"?$e(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):F(!0):V(!0):P(!0):A(!0))}}}))(La);function qa(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ka(),b=Da(),m=va(b),a=ve(),s=Ye(),t=te(),{tenantEmailDomain:n}=Ue(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(K.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(K.isReportsCustomDateRangeEnabled),c=we.getSignedInUser(),[p,M]=u.useState(!1),[X,Re]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const B=_((l=>J(l))),Ie=B.masterTOSInfo?.isMasterTOSAccepted??!1,Se=B.company?.companyInfo.firstMonthOfFY??1,Te=za(B?.companyId),w=_((l=>S(l).fetchState)),je=_((l=>Ge(l))),{areTenantIdsInSync:y}=Oa(),L=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),g=_((l=>he(l))),ke=_((l=>S(l).isCompareModeOn)),C=_((l=>S(l).filter)),v=_((l=>S(l).selectedReportAndTimeframeFetchState)),De=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(M(!0),s(Y(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!X&&w==="Completed"&&y&&(s(Y(c.userId,!1,!0,!1)),Re(!0))}),[p,X,w,y]),u.useEffect((()=>{if(p&&v.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(L){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":g&&s(U());break;case"balance_sheet":s(E(C.timeframe));break;case"balance_sheet_by_classes":T&&s(A());break;case"balance_sheet_by_projects":g&&s(P());break;case"cash_flow_by_classes":T&&s(V());break;case"cash_flow_by_projects":g&&s(F());break;case"cash_flow":s(O(C.timeframe))}}),[p,L,v,y,T,g]);const ee=Fa(),Oe=ee?.loggedInUserRole!=null&&He(ee?.loggedInUserRole)!==!0,[Fe,Ve]=u.useState(!1),ae=l=>{Ve(l)},Pe=Va(),Ae=Pa();return(function(l){const{isDataReady:Ee}=l,{pathname:Me}=te(),se=Sa(Me??"")==="reports",Be=Ta(Ee),Le=u.useMemo((()=>se?Wa:void 0),[se]);ja({canFetchSuggestedQuestions:Be,pageContexts:Le})})({isDataReady:w==="Completed"}),Aa({isDataReady:w==="Completed"}),f.jsxs(f.Fragment,{children:[w==="Completed"?f.jsx(Ea,{analytics:Q,onLoad:l=>l.trackPageLoaded(Ma.Event.reports)}):null,f.jsx(Ha,{isAppContentDrawerOpen:Fe,handleDrawerToggle:ae}),f.jsx($a,{firstMonthOfFY:Se,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:De,selectedReportID:L,analytics:Q,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ke,hasTransactionAccess:Oe,signedInUser:c,selectedReportAndTimeframeFetchState:v,handleDrawerToggle:ae,reportsResyncFetchState:je.reportsResyncFetchState,isAiCfoAccessEnabled:Ae&&Pe&&!e,onAskAiCfoClick:()=>{if(Ie)if(m){const l=ge(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else Ba({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const D=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 ys(){const e=_((s=>J(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(K.isDebitCardFeatureEnabled),m=Ra(b,e),a=Ia(e);return m===!0||a===!0?f.jsx(xa,{}):f.jsxs(ze,{children:[f.jsx(oe,{path:"/",element:f.jsx(qa,{})}),f.jsx(oe,{path:"*",element:f.jsx(Ua,{})})]})}export{ys as default};
1
+ import{j as f}from"./liveblocks-V5YQZeeY.js";import{g as te,h as ve,u as Ye,i as Ue,j as _,l as xe,n as ze,o as oe}from"./core-BWRpGVdr.js";import{fE as J,ED as S,Vy as Ge,l$ as ue,uh as he,v6 as Y,lG as O,lP as F,lH as V,kK as P,kB as A,kA as E,DG as U,vb as ye,bm as He,Vz as We,bj as Ne,E$ as $e,VA as qe,VB as Ze,cg as R,Dz as ne,VC as re,VD as Ke,VE as Qe,VF as Je,VG as Xe,VH as ea,VI as aa,VJ as sa,VK as ta,VL as oa,VM as na,VN as ra,VO as la,VP as j,VQ as x,VR as z,VS as G,VT as H,VU as W,VV as N,VW as $,VX as q,VY as Z,eg as ca,EF as ia,Er as le,Es as ce,EL as da,Ew as ie,bC as k,VZ as de,de as pe,Ex as _e,ER as pa,V_ as _a,V$ as fa,W0 as ba,W1 as ma,W2 as ua,W3 as ha,W4 as ya,W5 as Ca,W6 as wa,W7 as ga,dZ as Ra,dY as Ia}from"./zeni-epic-state-BlWDBO75.js";import{am as Sa,an as Ta,ao as ja,a as ka,a0 as Da,p as Ce,c as K,z as we,ap as Oa,V as Fa,e as Va,aq as Pa,ar as Aa,a7 as Ea,m as Q,S as Ma,D as Ba,n as ge,as as La,at as va,au as Ya}from"./index-9pdMsp-M.js";import"./mui-BmHHlwSU.js";import Ua from"./NotFoundScreen-C94S-cmy.js";import{F as xa}from"./FeaturePreviewScreen-B9UACzAC.js";import{a as u}from"./sentry-bpmZUW7k.js";import{u as za}from"./useInitialThreadRequest-Df-inltN.js";import{t as fe,a as be,b as Ga}from"./routePaths--TXDBUUo.js";import{t as me}from"./reportTimeframe-tJTkNTvP.js";import{M as Ha}from"./MobileAppDrawer-rCVKr3J3.js";import"./recharts-BXLxGQ-T.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.js";import"./InboxNotificationsProvider-Cd4NxEtR.js";import"./useTaskManagerAccess-Bq9TDvwr.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]="9e2af523-c507-45a5-a656-2420cd620bc5",e._sentryDebugIdIdentifier="sentry-dbid-9e2af523-c507-45a5-a656-2420cd620bc5")}catch{}})();const Wa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(Z({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(W({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0}))},Na=e=>{e(fa()),e(ba()),e(ma()),e(ua()),e(ha()),e(ya()),e(Ca()),e(wa()),e(ga())},$a=xe((function(e){const o=we.getSignedInUser(),b=e.tenantState.currentTenantId,m=J(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=S(e),n=We(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:Q,isZeniUser:Ne(o),showAccountGroups:n===!0,isAccountingClassesEnabled:ue(e),isAccountingProjectsEnabled:he(e),currentTenantCompanyName:a,statementEndPoint:`${Ya}/statement`,authParams:s,isZeniCOAUsed:n}}),(function(e,o){const{navigate:b,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(Y(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(_a(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(pa(a)),s){const{isCompareModeOn:n,filter:r}=o,{additionalBalances:i,balancesRange:d}=r;let c=[...i];a==="year"&&(c=c.filter((p=>p!=="this_period_vs_same_period_last_year"&&p!=="this_period_vs_same_period_last_year_percent"&&p!=="same_period_last_year"))),e(le(o.firstMonthOfFY,n,d.numberOfPeriods<1?1:d.numberOfPeriods,c)),i.length>0&&e(ce(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",d.numberOfPeriods<1?1:d.numberOfPeriods,c))}t!==!0&&setTimeout((()=>h(e)),50)},onInitialDateRangeAvailable:(a,s)=>{const{filter:t}=o,n=me(t.timeframe),r=k(a),i=k(s),d=de(o.firstMonthOfFY,n,{startDate:r,endDate:i})??t.balancesRange.numberOfPeriods,{startOfTimeframeFY:c,endOfTimeframeFY:p}=pe(i,o.firstMonthOfFY,n);e(_e({numberOfPeriods:d,orderBy:t.balancesRange.orderBy,thisPeriod:{startDate:c,endDate:p}}))},onCustomDateRangeChanged:(a,s,t)=>{const{filter:n}=o,r=me(t??n.timeframe);switch(o.selectedReportID){case"profit_and_loss":case"profit_and_loss_by_classes":e(ye(r,void 0,!0,!1,a,s)),o.selectedReportID==="profit_and_loss_by_classes"&&o.isAccountingClassesEnabled&&e(ne());break;case"profit_and_loss_by_projects":o.isAccountingProjectsEnabled&&e(U());break;case"balance_sheet":e(E(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(E(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(A());break;case"balance_sheet_by_projects":e(E(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(P());break;case"cash_flow":e(O(r,!0,a,s));break;case"cash_flow_by_classes":e(O(r,!0,a,s)),o.isAccountingClassesEnabled&&e(V());break;case"cash_flow_by_projects":e(O(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(F())}const i=k(a),d=k(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:M}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:M}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(I(a)||R(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ga(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,i,n,r):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?be(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],i,n,r):a.accountType!=null?fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r):void 0})();if(d!=null){const c=ge(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:D(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Z({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(q({scrollPosition:s}));break;case"profit_and_loss_by_projects":e($({scrollPosition:s}));break;case"balance_sheet":e(N({scrollPosition:s}));break;case"balance_sheet_by_classes":e(W({scrollPosition:s}));break;case"balance_sheet_by_projects":e(H({scrollPosition:s}));break;case"cash_flow_by_classes":e(G({scrollPosition:s}));break;case"cash_flow_by_projects":e(z({scrollPosition:s}));break;case"cash_flow":e(x({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(Z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(q({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(W({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{b("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,n=I(t),r=R(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",D(t)),e(j(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",D(t)),e(j(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",D(t)),e(j(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{R(o.selectedReportID)?e(Xe({classesToFilterOut:a})):I(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{R(o.selectedReportID)?e(Ke({projectsToFilterOut:a})):I(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):e(Je({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=R(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?V():a?A():ne()),o.isAccountingProjectsEnabled&&e(s?F():a?P():U())},onUpdateDisplayOrder:a=>{e(Ze(a))},onUpdateReportFormat:a=>{Na(e),e(qe(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"?$e(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):F(!0):V(!0):P(!0):A(!0))}}}))(La);function qa(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ka(),b=Da(),m=va(b),a=ve(),s=Ye(),t=te(),{tenantEmailDomain:n}=Ue(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(K.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(K.isReportsCustomDateRangeEnabled),c=we.getSignedInUser(),[p,M]=u.useState(!1),[X,Re]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const B=_((l=>J(l))),Ie=B.masterTOSInfo?.isMasterTOSAccepted??!1,Se=B.company?.companyInfo.firstMonthOfFY??1,Te=za(B?.companyId),w=_((l=>S(l).fetchState)),je=_((l=>Ge(l))),{areTenantIdsInSync:y}=Oa(),L=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),g=_((l=>he(l))),ke=_((l=>S(l).isCompareModeOn)),C=_((l=>S(l).filter)),v=_((l=>S(l).selectedReportAndTimeframeFetchState)),De=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(M(!0),s(Y(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!X&&w==="Completed"&&y&&(s(Y(c.userId,!1,!0,!1)),Re(!0))}),[p,X,w,y]),u.useEffect((()=>{if(p&&v.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(L){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":g&&s(U());break;case"balance_sheet":s(E(C.timeframe));break;case"balance_sheet_by_classes":T&&s(A());break;case"balance_sheet_by_projects":g&&s(P());break;case"cash_flow_by_classes":T&&s(V());break;case"cash_flow_by_projects":g&&s(F());break;case"cash_flow":s(O(C.timeframe))}}),[p,L,v,y,T,g]);const ee=Fa(),Oe=ee?.loggedInUserRole!=null&&He(ee?.loggedInUserRole)!==!0,[Fe,Ve]=u.useState(!1),ae=l=>{Ve(l)},Pe=Va(),Ae=Pa();return(function(l){const{isDataReady:Ee}=l,{pathname:Me}=te(),se=Sa(Me??"")==="reports",Be=Ta(Ee),Le=u.useMemo((()=>se?Wa:void 0),[se]);ja({canFetchSuggestedQuestions:Be,pageContexts:Le})})({isDataReady:w==="Completed"}),Aa({isDataReady:w==="Completed"}),f.jsxs(f.Fragment,{children:[w==="Completed"?f.jsx(Ea,{analytics:Q,onLoad:l=>l.trackPageLoaded(Ma.Event.reports)}):null,f.jsx(Ha,{isAppContentDrawerOpen:Fe,handleDrawerToggle:ae}),f.jsx($a,{firstMonthOfFY:Se,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:De,selectedReportID:L,analytics:Q,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ke,hasTransactionAccess:Oe,signedInUser:c,selectedReportAndTimeframeFetchState:v,handleDrawerToggle:ae,reportsResyncFetchState:je.reportsResyncFetchState,isAiCfoAccessEnabled:Ae&&Pe&&!e,onAskAiCfoClick:()=>{if(Ie)if(m){const l=ge(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else Ba({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const D=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 ys(){const e=_((s=>J(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(K.isDebitCardFeatureEnabled),m=Ra(b,e),a=Ia(e);return m===!0||a===!0?f.jsx(xa,{}):f.jsxs(ze,{children:[f.jsx(oe,{path:"/",element:f.jsx(qa,{})}),f.jsx(oe,{path:"*",element:f.jsx(Ua,{})})]})}export{ys as default};
@@ -1 +1 @@
1
- import{j as a}from"./liveblocks-DZUXZ-JO.js";import{z as b,a7 as v,m as p,S as N,e6 as k,p as C,c as I}from"./index-CJ_pjNEa.js";import"./mui-C0PYnbt1.js";import g from"./NotFoundScreen-CxVO6BUm.js";import{a as c}from"./sentry-DfoGRlTp.js";import{u as D,j as h,h as F,g as L,l as _,n as T,o as f,N as y}from"./core-C4Vfz6Ll.js";import{fE as U,a2_ as j,a2$ as d,Ei as P,q3 as V,a30 as q,Eg as z}from"./zeni-epic-state-DmXGRK_Y.js";import"./recharts-rN5v_P87.js";import"./analytics-C4ICDJLl.js";import"./plaid-hQES7k9Y.js";import"./dnd-kAQqqaX2.js";import"./stripe-cKAAJElX.js";import"./lottie-txhqSe8x.js";import"./lexical-SeD-pdYj.js";import"./pdf-bOGTjHnz.js";import"./utils-CmKqkYr5.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]="f1ef5168-04b8-4cea-9102-187bac372833",e._sentryDebugIdIdentifier="sentry-dbid-f1ef5168-04b8-4cea-9102-187bac372833")}catch{}})();const G=_((function(e,t){const n=j(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(d()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),p.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(d())},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}}))(k),R=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>U(o))),m=F(),w=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),x=u?.firstName!=null?u.firstName:"User";c.useEffect((()=>{e(d()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(v,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(N.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:m,location:w,currentTenant:r,companyName:E,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=C(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{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-V5YQZeeY.js";import{z as b,a7 as v,m as p,S as N,e6 as k,p as C,c as I}from"./index-9pdMsp-M.js";import"./mui-BmHHlwSU.js";import g from"./NotFoundScreen-C94S-cmy.js";import{a as c}from"./sentry-bpmZUW7k.js";import{u as D,j as h,h as F,g as L,l as _,n as T,o as f,N as y}from"./core-BWRpGVdr.js";import{fE as U,a2_ as j,a2$ as d,Ei as P,q3 as V,a30 as q,Eg as z}from"./zeni-epic-state-BlWDBO75.js";import"./recharts-BXLxGQ-T.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.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]="f1ef5168-04b8-4cea-9102-187bac372833",e._sentryDebugIdIdentifier="sentry-dbid-f1ef5168-04b8-4cea-9102-187bac372833")}catch{}})();const G=_((function(e,t){const n=j(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(d()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),p.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(d())},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}}))(k),R=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>U(o))),m=F(),w=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),x=u?.firstName!=null?u.firstName:"User";c.useEffect((()=>{e(d()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(v,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(N.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:m,location:w,currentTenant:r,companyName:E,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=C(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{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 E}from"./liveblocks-DZUXZ-JO.js";import{a as v}from"./sentry-DfoGRlTp.js";import{i as M,u as W,h as Q,g as ee,j as r,l as te}from"./core-C4Vfz6Ll.js";import{Xx as Fe,Xy as Ge,l$ as ae,sB as Ve,sN as Me,t1 as $e,s$ as Re,t2 as Ke,t4 as Ue,Xz as Ye,fE as K,Ww as pe,XA as Se,g_ as ne,cz as le,cA as se,FJ as ve,XB as Ce,FN as Xe,gO as ce,sE as ze,td as qe,dB as Ze,dA as He,TS as fe,FH as We,FB as Qe,XC as De,Ft as et,Fs as tt,Fn as at,Fy as nt,FO as lt,XD as Y,XE as ge,Fu as st,Wx as oe,G2 as Ae,FX as Ie,XF as xe,sH as Te,FR as Be,FP as Le,XG as Je,G9 as we,G6 as be,FS as je,G8 as Ne}from"./zeni-epic-state-DmXGRK_Y.js";import{a3 as de,aX as ie,aY as ct,z as ot,l as dt,a6 as it,a7 as ue,m as _,au as ut,aZ as rt,n as G,G as ye,g as Ee,a_ as ht,a$ as mt,b0 as pt}from"./index-CJ_pjNEa.js";import{n as re}from"./mui-C0PYnbt1.js";import{p as St}from"./pathToGoBack-DF1y-0ht.js";import{u as ft}from"./useActualMatchingMatchDetail-DPtaMcdm.js";import H from"./NotFoundScreen-CxVO6BUm.js";import{c as V}from"./routePaths-DYebh4Li.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]="373f2410-e0b0-4d8c-9bc7-c027622e4126",e._sentryDebugIdIdentifier="sentry-dbid-373f2410-e0b0-4d8c-9bc7-c027622e4126")}catch{}})();function Ut({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:l}=M(),s=t??l,n=W(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:h,localData:A}=r((u=>Fe(u,s??""))),m=r((u=>Ge(u))),C=r((u=>ae(u))),y=ft(),S=v.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),I=v.useRef(!1);return v.useEffect((()=>{o.fetchState!=="In-Progress"&&I.current&&o.fetchState==="Completed"&&(I.current=!1,S())}),[o.fetchState,S]),v.useEffect((()=>{s!=null&&d==null&&h.fetchState==="Not-Started"&&n(Ve(s))}),[s,d,h.fetchState]),v.useEffect((()=>{n(Me({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),s==null?E.jsx(H,{}):d==null?h.fetchState==="Not-Started"||h.fetchState==="In-Progress"?E.jsx(ie,{}):E.jsx(H,{}):E.jsx(Dt,{children:E.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:A,newAccrualAccountsView:m,onAccrualFormChange:(u,f)=>{n(Ye({accrualId:u,localData:f}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(s,u))},onNavigateBack:c??S,onOpenJournalEntry:y,onRevert:(u,f)=>{I.current=!0,n(Re(s,u,f))},onSkip:(u,f)=>{n($e(s,u,f))}})})}const Dt=re.div`
1
+ import{j as E}from"./liveblocks-V5YQZeeY.js";import{a as v}from"./sentry-bpmZUW7k.js";import{i as M,u as W,h as Q,g as ee,j as r,l as te}from"./core-BWRpGVdr.js";import{Xx as Fe,Xy as Ge,l$ as ae,sB as Ve,sN as Me,t1 as $e,s$ as Re,t2 as Ke,t4 as Ue,Xz as Ye,fE as K,Ww as pe,XA as Se,g_ as ne,cz as le,cA as se,FJ as ve,XB as Ce,FN as Xe,gO as ce,sE as ze,td as qe,dB as Ze,dA as He,TS as fe,FH as We,FB as Qe,XC as De,Ft as et,Fs as tt,Fn as at,Fy as nt,FO as lt,XD as Y,XE as ge,Fu as st,Wx as oe,G2 as Ae,FX as Ie,XF as xe,sH as Te,FR as Be,FP as Le,XG as Je,G9 as we,G6 as be,FS as je,G8 as Ne}from"./zeni-epic-state-BlWDBO75.js";import{a3 as de,aX as ie,aY as ct,z as ot,l as dt,a6 as it,a7 as ue,m as _,au as ut,aZ as rt,n as G,G as ye,g as Ee,a_ as ht,a$ as mt,b0 as pt}from"./index-9pdMsp-M.js";import{n as re}from"./mui-BmHHlwSU.js";import{p as St}from"./pathToGoBack-Dr_s0YFt.js";import{u as ft}from"./useActualMatchingMatchDetail-Mft821vz.js";import H from"./NotFoundScreen-C94S-cmy.js";import{c as V}from"./routePaths--TXDBUUo.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]="373f2410-e0b0-4d8c-9bc7-c027622e4126",e._sentryDebugIdIdentifier="sentry-dbid-373f2410-e0b0-4d8c-9bc7-c027622e4126")}catch{}})();function Ut({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:l}=M(),s=t??l,n=W(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:h,localData:A}=r((u=>Fe(u,s??""))),m=r((u=>Ge(u))),C=r((u=>ae(u))),y=ft(),S=v.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),I=v.useRef(!1);return v.useEffect((()=>{o.fetchState!=="In-Progress"&&I.current&&o.fetchState==="Completed"&&(I.current=!1,S())}),[o.fetchState,S]),v.useEffect((()=>{s!=null&&d==null&&h.fetchState==="Not-Started"&&n(Ve(s))}),[s,d,h.fetchState]),v.useEffect((()=>{n(Me({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),s==null?E.jsx(H,{}):d==null?h.fetchState==="Not-Started"||h.fetchState==="In-Progress"?E.jsx(ie,{}):E.jsx(H,{}):E.jsx(Dt,{children:E.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:A,newAccrualAccountsView:m,onAccrualFormChange:(u,f)=>{n(Ye({accrualId:u,localData:f}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(s,u))},onNavigateBack:c??S,onOpenJournalEntry:y,onRevert:(u,f)=>{I.current=!0,n(Re(s,u,f))},onSkip:(u,f)=>{n($e(s,u,f))}})})}const Dt=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-CxVO6BUm.js","assets/sentry-DfoGRlTp.js","assets/core-C4Vfz6Ll.js","assets/zeni-epic-state-DmXGRK_Y.js","assets/index-CJ_pjNEa.js","assets/mui-C0PYnbt1.js","assets/analytics-C4ICDJLl.js","assets/utils-CmKqkYr5.js","assets/index-BQ3cXEYt.css","assets/DashboardRoutes-X31R7cQf.js","assets/withTransactionSidePanel-btBdqPWA.js","assets/useAskAiCfoHostNavButtonProps-k11tYjVi.js","assets/TransactionDetailScreen-BsGN3Yd5.js","assets/decodeURIComponentSafe-CYsmEPcV.js","assets/useInitialThreadRequest-BVMcY486.js","assets/routePaths-DYebh4Li.js","assets/expenseAutomationHelper-hmRJBbGd.js","assets/stripSplatSuffix-Db8ayksN.js","assets/reportTimeframe-C5AD1AL2.js","assets/analyticsHelper-CPHVprda.js","assets/CompanyPassportScreen-L6OY8AwA.js","assets/MobileAppDrawer-B4_Hh2uX.js","assets/InboxNotificationsProvider-CJt6vmnU.js","assets/useTaskManagerAccess-Cp8R2Cu9.js","assets/useAiCfoDashboardSuggestedQuestionsChips-D2InIpSO.js","assets/FeaturePreviewScreen-Cnh2Fe6t.js","assets/BillPayRoutes-7abJ7Y81.js","assets/AddressScreen-BbgME8aO.js","assets/DomesticWireDetailScreen-BZbvzqXc.js","assets/BusinessVerificationPageScreen-8VbyEZWD.js","assets/DrawerScreen-CmgVB1Zi.js","assets/SetupPagesScreen-DzLiX5R5.js","assets/BillPayApprovalRoutes-GN_PKZBM.js","assets/useEnsureVendorListLoaded-Bud-c91I.js","assets/ReimbursementApprovalRuleDetailScreen-CQJ7WhRf.js","assets/getLocaleForTenant-DJIJUZ-c.js","assets/ReimbursementRoutes-mHGAbMEo.js","assets/ReimbursementApprovalRoutes-_wQ1m-SZ.js","assets/TransactionListRoutes-_bc9UoMG.js","assets/ZeniAccountStatementScreen-BHlw6cTG.js","assets/SettingsRoutes-CXzUd0P6.js","assets/AccountMappingScreen-CMj3JkGt.js","assets/QBOConnectionScreen-BD6w4pxT.js","assets/url-BtS-4pap.js","assets/empty-uRyODf4S.js","assets/index-BTd7WWV0.js","assets/index-E3novWwq.js","assets/accountMappingHelper-BbISzw1n.js","assets/useEmailConnectResultRefresh-BCLtP2Ad.js","assets/ReportsRoutes-DNdr9gVu.js","assets/ChargeCardRoutes-BR5_qY8y.js","assets/useChargeCardPusherEvents-Bf7Vv0PE.js","assets/PeopleRoutes-B5eZw1Xs.js","assets/ExpenseAutomationRoutes-DH5uN2wQ.js","assets/useActualMatchingMatchDetail-DPtaMcdm.js","assets/ScheduleDetailsPrepaidExpensesScreen-Bgrqk-Br.js","assets/pathToGoBack-DF1y-0ht.js","assets/TreasuryRoutes-C7ABXX2A.js","assets/VendorsRoutes-BlorNbi4.js","assets/ZeniAccountRoutes-QObrERl4.js","assets/AddressRoutes-7FdlQcLM.js","assets/PandLWithForecastRoutes-CiaozOzI.js","assets/CustomerOnboardingRoutes-3OH4ZWPk.js","assets/TransactionDetailRoutes-C0gGgGik.js","assets/EntityDetailRoutes-5IMi-E-b.js","assets/InvoicingRoutes-Q-6aUqgu.js","assets/NotificationRoutes-CDa5TISi.js","assets/PerformanceRoutes-B5KqyHoS.js","assets/ActualMatchingMatchDetailScreen-Dd_vJSSr.js","assets/RewardsRoutes-CRQaDmuu.js","assets/TaskRoutes-aDI7RZCK.js","assets/TaskListScreen-Dv5TjArL.js","assets/useTaskManagerPusherEvents-p1TIydvw.js","assets/AiCfoScreen-CU1e2Oi8.js","assets/CardsAiCfoScreen-BcEHiZtA.js"])))=>i.map(i=>d[i]);
2
- import{_ as s,bj as hs,fE as Es,dZ as ps,dY as xs,Bo as js,dg as gs,c6 as Rs,gI as Is,g8 as As,dd as xe,cE as Ts,gm as bs,cw as fs,bC as Ds,bn as ys,UX as Cs,v as vs,U_ as ws,bm as Os,U$ as Ps,bI as Us,bH as ks,bq as Fs,cs as Ls,V0 as Vs,V1 as Hs,d8 as Ss,db as Bs,da as Ns,cD as Zs,cK as Ms,pW as je,gh as ge,gY as $s,gj as Re,gK as Ie,gL as Ae,gk as zs}from"./zeni-epic-state-DmXGRK_Y.js";import{j as e}from"./liveblocks-DZUXZ-JO.js";import{a as U}from"./sentry-DfoGRlTp.js";import{N as d,u as Gs,h as Ys,i as qs,g as Ws,j as z,q as Te,n as Ks,o as a}from"./core-C4Vfz6Ll.js";import{N as l,u as Xs,z as C,p as Qs,e as Js,f as en,c as Z,j as sn,O as nn,V as tn,L as F,G as be,t as _,P as an,m as ae,Q as on,Z as rn}from"./index-CJ_pjNEa.js";import{u as ln}from"./mui-C0PYnbt1.js";import{f as fe}from"./analyticsHelper-CPHVprda.js";import{t as dn}from"./getLocaleForTenant-DJIJUZ-c.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new t.Error().stack;p&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[p]="4cc4e28b-24b5-4a57-b82a-b3fae305843e",t._sentryDebugIdIdentifier="sentry-dbid-4cc4e28b-24b5-4a57-b82a-b3fae305843e")}catch{}})();const cn=l((()=>s((()=>import("./NotFoundScreen-CxVO6BUm.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),un=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/reimbursements`}),mn=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/bills`}),De=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/treasury`}),ye=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/checking`}),Ce=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/cards`}),v=({showZeniAccountRoute:t,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:L,showTreasuryRoute:i,isTenantBankingOnly:H,showChargeCardRoute:O,tenantEmailDomain:w})=>{if(H===!0){if(t)return e.jsx(ye,{tenantEmailDomain:w});if(i)return e.jsx(De,{tenantEmailDomain:w});if(O)return e.jsx(Ce,{tenantEmailDomain:w})}return t?e.jsx(ye,{tenantEmailDomain:w}):i?e.jsx(De,{tenantEmailDomain:w}):O?e.jsx(Ce,{tenantEmailDomain:w}):p?e.jsx(mn,{tenantEmailDomain:w}):L?e.jsx(un,{tenantEmailDomain:w}):e.jsx(cn,{})},_n={dashboard:()=>s((()=>import("./DashboardRoutes-X31R7cQf.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,25,8])),bills:()=>s((()=>import("./BillPayRoutes-7abJ7Y81.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-mHGAbMEo.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])),transactions:()=>s((()=>import("./TransactionListRoutes-_bc9UoMG.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])),settings:()=>s((()=>import("./SettingsRoutes-CXzUd0P6.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])),reports:()=>s((()=>import("./ReportsRoutes-DNdr9gVu.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-BR5_qY8y.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])),people:()=>s((()=>import("./PeopleRoutes-B5eZw1Xs.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-DH5uN2wQ.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])),treasury:()=>s((()=>import("./TreasuryRoutes-C7ABXX2A.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])),vendors:()=>s((()=>import("./VendorsRoutes-BlorNbi4.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,54,17,13,15,11,21,22,23,30,47,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-QObrERl4.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8]))},hn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],oe=t=>{"requestIdleCallback"in window?requestIdleCallback(t):setTimeout(t,100)},En=l((()=>s((()=>import("./ReportsRoutes-DNdr9gVu.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])))),pn=l((()=>s((()=>import("./AddressRoutes-7FdlQcLM.js")),__vite__mapDeps([60,1,2,3,27,4,5,6,7,0,8])))),xn=l((()=>s((()=>import("./PeopleRoutes-B5eZw1Xs.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])))),jn=l((()=>s((()=>import("./PandLWithForecastRoutes-CiaozOzI.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,0,25,11,14,15,21,22,23,8])))),gn=l((()=>s((()=>import("./CustomerOnboardingRoutes-3OH4ZWPk.js")),__vite__mapDeps([62,1,2,3,27,4,5,6,7,0,42,43,44,45,46,13,48,51,8])))),Rn=l((()=>s((()=>import("./VendorsRoutes-BlorNbi4.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,54,17,13,15,11,21,22,23,30,47,8])))),In=l((()=>s((()=>import("./TransactionDetailRoutes-C0gGgGik.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,13,33,12,11,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-5IMi-E-b.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),An=l((()=>s((()=>import("./DashboardRoutes-X31R7cQf.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,25,8])))),we=l((()=>s((()=>import("./BillPayRoutes-7abJ7Y81.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])))),Tn=l((()=>s((()=>import("./SettingsRoutes-CXzUd0P6.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])))),bn=l((()=>s((()=>import("./InvoicingRoutes-Q-6aUqgu.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,27,0,21,22,23,42,43,44,45,46,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-mHGAbMEo.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])))),fn=l((()=>s((()=>import("./ZeniAccountRoutes-QObrERl4.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8])))),Dn=l((()=>s((()=>import("./TreasuryRoutes-C7ABXX2A.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])))),yn=l((()=>s((()=>import("./TransactionListRoutes-_bc9UoMG.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])))),Cn=l((()=>s((()=>import("./ChargeCardRoutes-BR5_qY8y.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])))),vn=l((()=>s((()=>import("./NotificationRoutes-CDa5TISi.js")),__vite__mapDeps([66,1,2,3,0,4,5,6,7,11,23,8])))),wn=l((()=>s((()=>import("./PerformanceRoutes-B5KqyHoS.js")),__vite__mapDeps([67,1,2,3,0,4,5,6,7,11,21,22,23,8])))),On=l((()=>s((()=>import("./ExpenseAutomationRoutes-DH5uN2wQ.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])))),Pn=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-Dd_vJSSr.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,54,17,13,15,0,8])))),Un=l((()=>s((()=>import("./RewardsRoutes-CRQaDmuu.js")),__vite__mapDeps([69,1,2,3,4,5,6,7,0,8])))),kn=l((()=>s((()=>import("./TaskRoutes-aDI7RZCK.js")),__vite__mapDeps([70,1,2,3,0,4,5,6,7,14,21,22,23,71,11,72,8])))),Fn=l((()=>s((()=>import("./AiCfoScreen-CU1e2Oi8.js")),__vite__mapDeps([73,1,2,3,4,5,6,7,24,56,15,72,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-BcEHiZtA.js")),__vite__mapDeps([74,1,2,3,4,5,6,7,8])))),D=l((()=>s((()=>import("./NotFoundScreen-CxVO6BUm.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ln=l((()=>s((()=>import("./TaskListScreen-Dv5TjArL.js").then((t=>t.f))),__vite__mapDeps([71,1,2,3,4,5,6,7,11,21,22,23,72,8])))),Vn=({isDashboardAccess:t,showZeniAccountRoute:p,isUserHasBillPayAccess:L,isUserHasReimbursementAccess:i,showTreasuryRoute:H,isTenantBankingOnly:O,isTenantCardsOnly:w,showChargeCardRoute:S})=>{if(O===!0){if(p)return e.jsx(d,{to:"checking"});if(H)return e.jsx(d,{to:"treasury"});if(S)return e.jsx(d,{to:"cards"})}return w===!0&&S?e.jsx(d,{to:"cards"}):t?e.jsx(d,{to:"dashboard"}):p?e.jsx(d,{to:"checking"}):H?e.jsx(d,{to:"treasury"}):S?e.jsx(d,{to:"cards"}):L?e.jsx(d,{to:"bills"}):i?e.jsx(d,{to:"reimbursements"}):e.jsx(d,{to:"dashboard"})},A=({children:t,fallback:p,isAllowed:L})=>{const i=on();return L?t:i?e.jsx(rn,{fetchState:"In-Progress"}):p},Ue=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/dashboard`}),Gn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:t}){const p=Gs(),L=Ys(),{tenantEmailDomain:i}=qs(),H=ln().mode,{setLoading:O,clearAllLoading:w,clearLoading:S}=Xs(),y=C.getSignedInUserTenant(i)?.tenantId,T=C.getSignedInUser(),X=hs(T),G=Ws(),[V,ke]=U.useState(!1),r=z((o=>Es(o))),{useFeatureGate:B}=Qs(),M=Js(),Q=en(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=B(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:ie}=B(Z.isDebitCardFeatureEnabled),b=z((o=>o.tenantState.fetchState)),x=z((o=>o.tenantState.activeTenantFetchState.fetchState)),h=x==="Completed"||b==="Completed"?ps(ie,r):void 0,J=x==="Completed"||b==="Completed"?xs(r):void 0,re=x==="Completed"||b==="Completed"?js(r)&&!gs(r):void 0,He=sn(r,Ve,ie),{isCardsHidden:Se}=nn(r?.tenantId),Be=!He||!!Se,{isFeatureEnabled:Ne}=B(Z.isSettingsFeatureEnabled),{isFeatureEnabled:ee}=B(Z.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ze}=B(Z.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=r?.userRole!=null&&Rs(r.userRole),Y=z((o=>Is(o)));if(i!=null){const o=C.getSignedInUserTenant(i);T!=null&&o!=null&&fe(T,r,H)}const $={tenantId:y,userId:T?.userId,sessionId:T?.zeniSessionId},le=As(),E=tn(),$e=r.company==null||E?.loggedInUserRoleMap!=null&&xe(E.loggedInUserRole),ze=Ts(E?.loggedInUserRoleMap),se=Te("/:tenantEmailDomain/onboarding/*")!==null,Ge=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ne=Ge?.params.selectedPeriod,Ye=z((o=>$.tenantId!=null?bs(o,$.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),t(i)}),[i]),U.useEffect((()=>{if(ne!=null&&y!=null){const o=ne.split("-");if(o.length===2){const f=fs(Number(o[0])),u=Number(o[1]),n=Ds(`01-${f<10?`0${f}`:f}-${u}`,be.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),c=ys();n.isAfter(c,"month")===!1?p(Cs(y,{month:f,year:u})):L(`/${i}/month_end_close_checks/review`)}}}),[ne,i,y]),U.useEffect((()=>{V||(ke(!0),O(F.TENANT_FETCHING))}),[V,$,le,T,p,C]),U.useLayoutEffect((()=>{!vs(le,$)&&C.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,u,n){if(ge(f?.userId,f?.zeniSessionId,o.tenantId),u($s(!0)),u(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=C.getSignedInUserTenantWithId(o.tenantId);n&&be.updateAppLocaleID(dn(n)),c?.tenantEmailDomain!=null&&C.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ae.identify(o.userId,{tenant_id:o.tenantId}):ae.resetUserIdentity()})($,T,p,Ye))}),[y]),U.useEffect((()=>{C.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,u,n,c,q,N){if(u==null&&n==null)return void console.warn("There is no current tenant selected!!");const W=n!=null&&c?.zeniSessionId!=null,us=u==null||u.tenantId!==n,ms=u!=null&&u.excludedResources==null,_s=u!=null&&u.externalConnections==null;if(W&&us){N(Re(n));const K=C.getSignedInUserTenantWithId(n);K?.tenantEmailDomain!=null&&C.saveActiveTenantDomainForUser(K?.tenantEmailDomain),ge(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),N(Ie(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),N(Ae(c.userId,n)))}else W&&ms&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),N(Ie(c.userId,n))),W&&_s&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),N(Ae(c.userId,n)));if(W){ae.identify(c.userId,{tenant_id:n});const K=n==null||n!=null&&(f==="Completed"||f==="Error");o==="Completed"||f!=="Not-Started"&&f!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),q(F.TENANT_FETCHING),N(zs(c.userId,n,c.zeniSessionId))),K&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),N(je(c.userId,c.zeniSessionId)))}})(b,x,r,y,T,O,p))}),[y,x]),U.useEffect((()=>{C.isSignedIn()&&b==="Completed"&&Y.tenantsBaseInOrder.length>0&&(S(F.TENANT_FETCHING),C.saveSignedInUserTenants(ws(Y.tenantsBaseInOrder)),T!=null&&fe(T,r,H,void 0,Y.tenantsBaseInOrder))}),[Y,b,r,T]),U.useEffect((()=>{x==="In-Progress"&&O(F.TENANT_FETCHING),x!=="Completed"&&x!=="Error"||(x==="Completed"&&y!=null?(w(),_.markActiveTenantFetchCompleted(y)):x==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),S(F.TENANT_FETCHING),S(F.TENANT_SWITCHING))),b!=="Completed"&&b!=="Error"||(b==="Completed"?_.markAllTenantsFetchCompleted():b==="Error"&&_.markAllTenantsFetchFailed())}),[x,b,y,V]);const de=U.useRef(!1);U.useEffect((()=>{!de.current&&x==="Completed"&&V&&(de.current=!0,(function(o=hn,f=3e3){setTimeout((()=>{const u=n=>{if(n>=o.length)return;const c=o[n],q=_n[c];q!=null?q().then((()=>oe((()=>u(n+1))))).catch((()=>oe((()=>u(n+1))))):u(n+1)};oe((()=>u(0)))}),f)})())}),[x,V]);const P=r?.userRole!=null&&Os(r?.userRole),{isFeatureEnabled:qe}=B(Z.isReferralFeatureEnabled),{isFeatureEnabled:We}=B(Z.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Xe=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),k=r?.userRole!=null&&xe(r.userRole),ce=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,ue=!Be&&!P,Qe=Ps(E?.loggedInUserRoleMap),Je=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,me=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,_e=me&&Us(E?.loggedInUserRoleMap),he=Fe&&!P,ss=Le&&!P,ns=ce&&ks(E?.loggedInUserRoleMap),ts=ue&&Fs(E?.loggedInUserRoleMap),as=he&&Ls(E?.loggedInUserRoleMap),os=Vs(E?.loggedInUserRoleMap),is=Hs(E?.loggedInUserRoleMap),rs=Ss(E?.loggedInUserRoleMap),ls=Bs(E?.loggedInUserRoleMap),ds=Ns(E?.loggedInUserRoleMap),j=Zs(E?.loggedInUserRoleMap),g=Ms(E?.loggedInUserRoleMap),Ee=ce&&j,pe=me&&g,R=he&&rs,I=ss&&ls,m=ue&&ds,cs=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||ze===!0||Qe===!0||os===!0||is===!0;return C.isSignedIn()?y==null?b==="Completed"?e.jsx(d,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(T!=null&&b!=="In-Progress"&&p(je(T.userId,T.zeniSessionId)),null):x!=="In-Progress"&&x!=="Not-Started"||b==="Completed"?(te===!0||X&&!se)&&es&&Je!==!0&&h===!1&&J===!1&&re===!1?(t(void 0),e.jsx(d,{to:"/connection/auth",replace:!0})):!V||re!==!0||te!==!0||se||X?!V||te!==!1||se||X?V&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(a,{element:e.jsx(an,{}),children:[e.jsx(a,{path:"/",element:e.jsx(Vn,{isDashboardAccess:k,showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:k?e.jsx(An,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:k?e.jsx(En,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:cs||k?e.jsx(xn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:k?e.jsx(jn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(gn,{})}),e.jsx(a,{path:"transaction/*",element:k&&P===!1||Ke||Xe?e.jsx(In,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:k&&P===!1?e.jsx(yn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:k&&P===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:k&&P===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(Ln,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(kn,{})}),e.jsx(a,{path:"address/*",element:ns||_e||as||ts?e.jsx(pn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:e.jsx(A,{isAllowed:R,fallback:e.jsx(D,{}),children:e.jsx(fn,{})})}),e.jsx(a,{path:"treasury/*",element:e.jsx(A,{isAllowed:I,fallback:e.jsx(D,{}),children:e.jsx(Dn,{})})}),e.jsx(a,{path:"performance",element:e.jsx(A,{isAllowed:Q,fallback:e.jsx(Ue,{tenantEmailDomain:i}),children:e.jsx(wn,{})})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:e.jsx(A,{isAllowed:Q&&!P,fallback:e.jsx(Ue,{tenantEmailDomain:i}),children:e.jsx(On,{})})}),e.jsx(a,{path:"expense-automation/actual-matching/:matchId",element:e.jsx(A,{isAllowed:Q&&!P&&We,fallback:e.jsx(D,{}),children:e.jsx(Pn,{})})}),e.jsx(a,{path:"notifications/*",element:e.jsx(vn,{})}),e.jsx(a,{path:"vendors/*",element:e.jsx(A,{isAllowed:$e,fallback:e.jsx(D,{}),children:e.jsx(Rn,{})})}),e.jsx(a,{path:"bill/*",element:Ee?e.jsx(we,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:Ee?e.jsx(we,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:pe?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:pe?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:e.jsx(A,{isAllowed:Ne,fallback:e.jsx(D,{}),children:e.jsx(Tn,{hasAdminLevelAccess:_e})})}),e.jsx(a,{path:"invoicing/*",element:e.jsx(A,{isAllowed:Ze&&Me,fallback:e.jsx(D,{}),children:e.jsx(bn,{})})}),e.jsx(a,{path:"cards/ask",element:e.jsx(A,{isAllowed:m&&M,fallback:e.jsx(D,{}),children:e.jsx(Pe,{isFileUploadEnabled:ee})})}),e.jsx(a,{path:"cards/ask/:session_id",element:e.jsx(A,{isAllowed:m&&M,fallback:e.jsx(D,{}),children:e.jsx(Pe,{isFileUploadEnabled:ee})})}),e.jsx(a,{path:"cards/*",element:e.jsx(A,{isAllowed:m,fallback:e.jsx(D,{}),children:e.jsx(Cn,{})})}),e.jsx(a,{path:"rewards/*",element:e.jsx(A,{isAllowed:qe,fallback:e.jsx(D,{}),children:e.jsx(Un,{})})}),e.jsx(a,{path:"/ai-cfo",element:e.jsx(A,{isAllowed:M,fallback:e.jsx(D,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(a,{path:"/ai-cfo/",element:e.jsx(A,{isAllowed:M,fallback:e.jsx(D,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:e.jsx(A,{isAllowed:M,fallback:e.jsx(D,{}),children:e.jsx(Fn,{isFileUploadEnabled:ee})})}),e.jsx(a,{path:"*",element:e.jsx(D,{})})]})}):null:(t(void 0),e.jsx(d,{to:`/${i}/onboarding`,replace:!0})):(t(void 0),e.jsx(d,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),t(void 0),e.jsx(d,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,Gn as S};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-C94S-cmy.js","assets/sentry-bpmZUW7k.js","assets/core-BWRpGVdr.js","assets/zeni-epic-state-BlWDBO75.js","assets/index-9pdMsp-M.js","assets/mui-BmHHlwSU.js","assets/analytics-BfKlFVdJ.js","assets/utils-CXFQdt3d.js","assets/index-BQ3cXEYt.css","assets/DashboardRoutes-DYfRGtw5.js","assets/withTransactionSidePanel-DOV8YzFf.js","assets/useAskAiCfoHostNavButtonProps-E2UGdnp9.js","assets/TransactionDetailScreen-CNMo1Iyr.js","assets/decodeURIComponentSafe-DN9u1X8y.js","assets/useInitialThreadRequest-Df-inltN.js","assets/routePaths--TXDBUUo.js","assets/expenseAutomationHelper-Dr99xbt1.js","assets/stripSplatSuffix-Bizh1-Tx.js","assets/reportTimeframe-tJTkNTvP.js","assets/analyticsHelper-Cn2rORl_.js","assets/CompanyPassportScreen-dRN2jnGn.js","assets/MobileAppDrawer-rCVKr3J3.js","assets/InboxNotificationsProvider-Cd4NxEtR.js","assets/useTaskManagerAccess-Bq9TDvwr.js","assets/useAiCfoDashboardSuggestedQuestionsChips-3ayut61P.js","assets/FeaturePreviewScreen-B9UACzAC.js","assets/BillPayRoutes-CQCAwPWX.js","assets/AddressScreen-CiPLLpNX.js","assets/DomesticWireDetailScreen-YfGiQgSo.js","assets/BusinessVerificationPageScreen-71JxUYXB.js","assets/DrawerScreen-DH40ycW6.js","assets/SetupPagesScreen-DPnnq4jj.js","assets/BillPayApprovalRoutes-Bhwrq5tr.js","assets/useEnsureVendorListLoaded-CKZrwkQQ.js","assets/ReimbursementApprovalRuleDetailScreen-BzhkgPjS.js","assets/getLocaleForTenant-BNAJG7gN.js","assets/ReimbursementRoutes-BcjYsUHB.js","assets/ReimbursementApprovalRoutes-CsG7QtOs.js","assets/TransactionListRoutes-aYhnWH8H.js","assets/ZeniAccountStatementScreen-DKVtRt3N.js","assets/SettingsRoutes-CwW3Kcyz.js","assets/AccountMappingScreen-CtnQtVOI.js","assets/QBOConnectionScreen-C1Kn9y8q.js","assets/url-Cc_9bwX-.js","assets/empty-BxjviaN4.js","assets/index-DYK9WSJX.js","assets/index-BXpurrfG.js","assets/accountMappingHelper-7kGWRPlV.js","assets/useEmailConnectResultRefresh-F8OBO8EU.js","assets/ReportsRoutes-Bcm2EvxJ.js","assets/ChargeCardRoutes-CvC_JvPH.js","assets/useChargeCardPusherEvents-DVeqwUB9.js","assets/PeopleRoutes-CnmV1pW5.js","assets/ExpenseAutomationRoutes-Bks-mNnn.js","assets/useActualMatchingMatchDetail-Mft821vz.js","assets/ScheduleDetailsPrepaidExpensesScreen-v3zw3e0R.js","assets/pathToGoBack-Dr_s0YFt.js","assets/TreasuryRoutes-DnAsQTrn.js","assets/VendorsRoutes-QudM99vQ.js","assets/ZeniAccountRoutes-DeSodvmm.js","assets/AddressRoutes-CXRpuLt0.js","assets/PandLWithForecastRoutes-OnVWoGgX.js","assets/CustomerOnboardingRoutes-BMrjyYZ8.js","assets/TransactionDetailRoutes-DWXM95sG.js","assets/EntityDetailRoutes-BgqO6DqU.js","assets/InvoicingRoutes-UHPes0q9.js","assets/NotificationRoutes-h53g4kBO.js","assets/PerformanceRoutes-MYTxvcMA.js","assets/ActualMatchingMatchDetailScreen-COb45lJn.js","assets/RewardsRoutes-Do7moyFI.js","assets/TaskRoutes-CWWa57kf.js","assets/TaskListScreen-aizYXFWj.js","assets/useTaskManagerPusherEvents-Ctn5L7kn.js","assets/AiCfoScreen-DPuJRDN-.js","assets/CardsAiCfoScreen-Dze-_SQs.js"])))=>i.map(i=>d[i]);
2
+ import{_ as s,bj as hs,fE as Es,dZ as ps,dY as xs,Bo as js,dg as gs,c6 as Rs,gI as Is,g8 as As,dd as xe,cE as Ts,gm as bs,cw as fs,bC as Ds,bn as ys,UX as Cs,v as vs,U_ as ws,bm as Os,U$ as Ps,bI as Us,bH as ks,bq as Fs,cs as Ls,V0 as Vs,V1 as Hs,d8 as Ss,db as Bs,da as Ns,cD as Zs,cK as Ms,pW as je,gh as ge,gY as $s,gj as Re,gK as Ie,gL as Ae,gk as zs}from"./zeni-epic-state-BlWDBO75.js";import{j as e}from"./liveblocks-V5YQZeeY.js";import{a as U}from"./sentry-bpmZUW7k.js";import{N as d,u as Gs,h as Ys,i as qs,g as Ws,j as z,q as Te,n as Ks,o as a}from"./core-BWRpGVdr.js";import{N as l,u as Xs,z as C,p as Qs,e as Js,f as en,c as Z,j as sn,O as nn,V as tn,L as F,G as be,t as _,P as an,m as ae,Q as on,Z as rn}from"./index-9pdMsp-M.js";import{u as ln}from"./mui-BmHHlwSU.js";import{f as fe}from"./analyticsHelper-Cn2rORl_.js";import{t as dn}from"./getLocaleForTenant-BNAJG7gN.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new t.Error().stack;p&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[p]="4cc4e28b-24b5-4a57-b82a-b3fae305843e",t._sentryDebugIdIdentifier="sentry-dbid-4cc4e28b-24b5-4a57-b82a-b3fae305843e")}catch{}})();const cn=l((()=>s((()=>import("./NotFoundScreen-C94S-cmy.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),un=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/reimbursements`}),mn=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/bills`}),De=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/treasury`}),ye=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/checking`}),Ce=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/cards`}),v=({showZeniAccountRoute:t,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:L,showTreasuryRoute:i,isTenantBankingOnly:H,showChargeCardRoute:O,tenantEmailDomain:w})=>{if(H===!0){if(t)return e.jsx(ye,{tenantEmailDomain:w});if(i)return e.jsx(De,{tenantEmailDomain:w});if(O)return e.jsx(Ce,{tenantEmailDomain:w})}return t?e.jsx(ye,{tenantEmailDomain:w}):i?e.jsx(De,{tenantEmailDomain:w}):O?e.jsx(Ce,{tenantEmailDomain:w}):p?e.jsx(mn,{tenantEmailDomain:w}):L?e.jsx(un,{tenantEmailDomain:w}):e.jsx(cn,{})},_n={dashboard:()=>s((()=>import("./DashboardRoutes-DYfRGtw5.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,25,8])),bills:()=>s((()=>import("./BillPayRoutes-CQCAwPWX.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-BcjYsUHB.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])),transactions:()=>s((()=>import("./TransactionListRoutes-aYhnWH8H.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])),settings:()=>s((()=>import("./SettingsRoutes-CwW3Kcyz.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])),reports:()=>s((()=>import("./ReportsRoutes-Bcm2EvxJ.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-CvC_JvPH.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])),people:()=>s((()=>import("./PeopleRoutes-CnmV1pW5.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-Bks-mNnn.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])),treasury:()=>s((()=>import("./TreasuryRoutes-DnAsQTrn.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])),vendors:()=>s((()=>import("./VendorsRoutes-QudM99vQ.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,54,17,13,15,11,21,22,23,30,47,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-DeSodvmm.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8]))},hn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],oe=t=>{"requestIdleCallback"in window?requestIdleCallback(t):setTimeout(t,100)},En=l((()=>s((()=>import("./ReportsRoutes-Bcm2EvxJ.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])))),pn=l((()=>s((()=>import("./AddressRoutes-CXRpuLt0.js")),__vite__mapDeps([60,1,2,3,27,4,5,6,7,0,8])))),xn=l((()=>s((()=>import("./PeopleRoutes-CnmV1pW5.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])))),jn=l((()=>s((()=>import("./PandLWithForecastRoutes-OnVWoGgX.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,0,25,11,14,15,21,22,23,8])))),gn=l((()=>s((()=>import("./CustomerOnboardingRoutes-BMrjyYZ8.js")),__vite__mapDeps([62,1,2,3,27,4,5,6,7,0,42,43,44,45,46,13,48,51,8])))),Rn=l((()=>s((()=>import("./VendorsRoutes-QudM99vQ.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,54,17,13,15,11,21,22,23,30,47,8])))),In=l((()=>s((()=>import("./TransactionDetailRoutes-DWXM95sG.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,13,33,12,11,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-BgqO6DqU.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),An=l((()=>s((()=>import("./DashboardRoutes-DYfRGtw5.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,25,8])))),we=l((()=>s((()=>import("./BillPayRoutes-CQCAwPWX.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])))),Tn=l((()=>s((()=>import("./SettingsRoutes-CwW3Kcyz.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])))),bn=l((()=>s((()=>import("./InvoicingRoutes-UHPes0q9.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,27,0,21,22,23,42,43,44,45,46,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-BcjYsUHB.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])))),fn=l((()=>s((()=>import("./ZeniAccountRoutes-DeSodvmm.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8])))),Dn=l((()=>s((()=>import("./TreasuryRoutes-DnAsQTrn.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])))),yn=l((()=>s((()=>import("./TransactionListRoutes-aYhnWH8H.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])))),Cn=l((()=>s((()=>import("./ChargeCardRoutes-CvC_JvPH.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])))),vn=l((()=>s((()=>import("./NotificationRoutes-h53g4kBO.js")),__vite__mapDeps([66,1,2,3,0,4,5,6,7,11,23,8])))),wn=l((()=>s((()=>import("./PerformanceRoutes-MYTxvcMA.js")),__vite__mapDeps([67,1,2,3,0,4,5,6,7,11,21,22,23,8])))),On=l((()=>s((()=>import("./ExpenseAutomationRoutes-Bks-mNnn.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])))),Pn=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-COb45lJn.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,54,17,13,15,0,8])))),Un=l((()=>s((()=>import("./RewardsRoutes-Do7moyFI.js")),__vite__mapDeps([69,1,2,3,4,5,6,7,0,8])))),kn=l((()=>s((()=>import("./TaskRoutes-CWWa57kf.js")),__vite__mapDeps([70,1,2,3,0,4,5,6,7,14,21,22,23,71,11,72,8])))),Fn=l((()=>s((()=>import("./AiCfoScreen-DPuJRDN-.js")),__vite__mapDeps([73,1,2,3,4,5,6,7,24,56,15,72,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-Dze-_SQs.js")),__vite__mapDeps([74,1,2,3,4,5,6,7,8])))),D=l((()=>s((()=>import("./NotFoundScreen-C94S-cmy.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ln=l((()=>s((()=>import("./TaskListScreen-aizYXFWj.js").then((t=>t.f))),__vite__mapDeps([71,1,2,3,4,5,6,7,11,21,22,23,72,8])))),Vn=({isDashboardAccess:t,showZeniAccountRoute:p,isUserHasBillPayAccess:L,isUserHasReimbursementAccess:i,showTreasuryRoute:H,isTenantBankingOnly:O,isTenantCardsOnly:w,showChargeCardRoute:S})=>{if(O===!0){if(p)return e.jsx(d,{to:"checking"});if(H)return e.jsx(d,{to:"treasury"});if(S)return e.jsx(d,{to:"cards"})}return w===!0&&S?e.jsx(d,{to:"cards"}):t?e.jsx(d,{to:"dashboard"}):p?e.jsx(d,{to:"checking"}):H?e.jsx(d,{to:"treasury"}):S?e.jsx(d,{to:"cards"}):L?e.jsx(d,{to:"bills"}):i?e.jsx(d,{to:"reimbursements"}):e.jsx(d,{to:"dashboard"})},A=({children:t,fallback:p,isAllowed:L})=>{const i=on();return L?t:i?e.jsx(rn,{fetchState:"In-Progress"}):p},Ue=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/dashboard`}),Gn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:t}){const p=Gs(),L=Ys(),{tenantEmailDomain:i}=qs(),H=ln().mode,{setLoading:O,clearAllLoading:w,clearLoading:S}=Xs(),y=C.getSignedInUserTenant(i)?.tenantId,T=C.getSignedInUser(),X=hs(T),G=Ws(),[V,ke]=U.useState(!1),r=z((o=>Es(o))),{useFeatureGate:B}=Qs(),M=Js(),Q=en(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=B(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:ie}=B(Z.isDebitCardFeatureEnabled),b=z((o=>o.tenantState.fetchState)),x=z((o=>o.tenantState.activeTenantFetchState.fetchState)),h=x==="Completed"||b==="Completed"?ps(ie,r):void 0,J=x==="Completed"||b==="Completed"?xs(r):void 0,re=x==="Completed"||b==="Completed"?js(r)&&!gs(r):void 0,He=sn(r,Ve,ie),{isCardsHidden:Se}=nn(r?.tenantId),Be=!He||!!Se,{isFeatureEnabled:Ne}=B(Z.isSettingsFeatureEnabled),{isFeatureEnabled:ee}=B(Z.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ze}=B(Z.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=r?.userRole!=null&&Rs(r.userRole),Y=z((o=>Is(o)));if(i!=null){const o=C.getSignedInUserTenant(i);T!=null&&o!=null&&fe(T,r,H)}const $={tenantId:y,userId:T?.userId,sessionId:T?.zeniSessionId},le=As(),E=tn(),$e=r.company==null||E?.loggedInUserRoleMap!=null&&xe(E.loggedInUserRole),ze=Ts(E?.loggedInUserRoleMap),se=Te("/:tenantEmailDomain/onboarding/*")!==null,Ge=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ne=Ge?.params.selectedPeriod,Ye=z((o=>$.tenantId!=null?bs(o,$.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),t(i)}),[i]),U.useEffect((()=>{if(ne!=null&&y!=null){const o=ne.split("-");if(o.length===2){const f=fs(Number(o[0])),u=Number(o[1]),n=Ds(`01-${f<10?`0${f}`:f}-${u}`,be.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),c=ys();n.isAfter(c,"month")===!1?p(Cs(y,{month:f,year:u})):L(`/${i}/month_end_close_checks/review`)}}}),[ne,i,y]),U.useEffect((()=>{V||(ke(!0),O(F.TENANT_FETCHING))}),[V,$,le,T,p,C]),U.useLayoutEffect((()=>{!vs(le,$)&&C.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,u,n){if(ge(f?.userId,f?.zeniSessionId,o.tenantId),u($s(!0)),u(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=C.getSignedInUserTenantWithId(o.tenantId);n&&be.updateAppLocaleID(dn(n)),c?.tenantEmailDomain!=null&&C.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ae.identify(o.userId,{tenant_id:o.tenantId}):ae.resetUserIdentity()})($,T,p,Ye))}),[y]),U.useEffect((()=>{C.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,u,n,c,q,N){if(u==null&&n==null)return void console.warn("There is no current tenant selected!!");const W=n!=null&&c?.zeniSessionId!=null,us=u==null||u.tenantId!==n,ms=u!=null&&u.excludedResources==null,_s=u!=null&&u.externalConnections==null;if(W&&us){N(Re(n));const K=C.getSignedInUserTenantWithId(n);K?.tenantEmailDomain!=null&&C.saveActiveTenantDomainForUser(K?.tenantEmailDomain),ge(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),N(Ie(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),N(Ae(c.userId,n)))}else W&&ms&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),N(Ie(c.userId,n))),W&&_s&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),N(Ae(c.userId,n)));if(W){ae.identify(c.userId,{tenant_id:n});const K=n==null||n!=null&&(f==="Completed"||f==="Error");o==="Completed"||f!=="Not-Started"&&f!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),q(F.TENANT_FETCHING),N(zs(c.userId,n,c.zeniSessionId))),K&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),N(je(c.userId,c.zeniSessionId)))}})(b,x,r,y,T,O,p))}),[y,x]),U.useEffect((()=>{C.isSignedIn()&&b==="Completed"&&Y.tenantsBaseInOrder.length>0&&(S(F.TENANT_FETCHING),C.saveSignedInUserTenants(ws(Y.tenantsBaseInOrder)),T!=null&&fe(T,r,H,void 0,Y.tenantsBaseInOrder))}),[Y,b,r,T]),U.useEffect((()=>{x==="In-Progress"&&O(F.TENANT_FETCHING),x!=="Completed"&&x!=="Error"||(x==="Completed"&&y!=null?(w(),_.markActiveTenantFetchCompleted(y)):x==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),S(F.TENANT_FETCHING),S(F.TENANT_SWITCHING))),b!=="Completed"&&b!=="Error"||(b==="Completed"?_.markAllTenantsFetchCompleted():b==="Error"&&_.markAllTenantsFetchFailed())}),[x,b,y,V]);const de=U.useRef(!1);U.useEffect((()=>{!de.current&&x==="Completed"&&V&&(de.current=!0,(function(o=hn,f=3e3){setTimeout((()=>{const u=n=>{if(n>=o.length)return;const c=o[n],q=_n[c];q!=null?q().then((()=>oe((()=>u(n+1))))).catch((()=>oe((()=>u(n+1))))):u(n+1)};oe((()=>u(0)))}),f)})())}),[x,V]);const P=r?.userRole!=null&&Os(r?.userRole),{isFeatureEnabled:qe}=B(Z.isReferralFeatureEnabled),{isFeatureEnabled:We}=B(Z.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Xe=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),k=r?.userRole!=null&&xe(r.userRole),ce=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,ue=!Be&&!P,Qe=Ps(E?.loggedInUserRoleMap),Je=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,me=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,_e=me&&Us(E?.loggedInUserRoleMap),he=Fe&&!P,ss=Le&&!P,ns=ce&&ks(E?.loggedInUserRoleMap),ts=ue&&Fs(E?.loggedInUserRoleMap),as=he&&Ls(E?.loggedInUserRoleMap),os=Vs(E?.loggedInUserRoleMap),is=Hs(E?.loggedInUserRoleMap),rs=Ss(E?.loggedInUserRoleMap),ls=Bs(E?.loggedInUserRoleMap),ds=Ns(E?.loggedInUserRoleMap),j=Zs(E?.loggedInUserRoleMap),g=Ms(E?.loggedInUserRoleMap),Ee=ce&&j,pe=me&&g,R=he&&rs,I=ss&&ls,m=ue&&ds,cs=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||ze===!0||Qe===!0||os===!0||is===!0;return C.isSignedIn()?y==null?b==="Completed"?e.jsx(d,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(T!=null&&b!=="In-Progress"&&p(je(T.userId,T.zeniSessionId)),null):x!=="In-Progress"&&x!=="Not-Started"||b==="Completed"?(te===!0||X&&!se)&&es&&Je!==!0&&h===!1&&J===!1&&re===!1?(t(void 0),e.jsx(d,{to:"/connection/auth",replace:!0})):!V||re!==!0||te!==!0||se||X?!V||te!==!1||se||X?V&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(a,{element:e.jsx(an,{}),children:[e.jsx(a,{path:"/",element:e.jsx(Vn,{isDashboardAccess:k,showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:k?e.jsx(An,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:k?e.jsx(En,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:cs||k?e.jsx(xn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:k?e.jsx(jn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(gn,{})}),e.jsx(a,{path:"transaction/*",element:k&&P===!1||Ke||Xe?e.jsx(In,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:k&&P===!1?e.jsx(yn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:k&&P===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:k&&P===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(Ln,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(kn,{})}),e.jsx(a,{path:"address/*",element:ns||_e||as||ts?e.jsx(pn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:e.jsx(A,{isAllowed:R,fallback:e.jsx(D,{}),children:e.jsx(fn,{})})}),e.jsx(a,{path:"treasury/*",element:e.jsx(A,{isAllowed:I,fallback:e.jsx(D,{}),children:e.jsx(Dn,{})})}),e.jsx(a,{path:"performance",element:e.jsx(A,{isAllowed:Q,fallback:e.jsx(Ue,{tenantEmailDomain:i}),children:e.jsx(wn,{})})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:e.jsx(A,{isAllowed:Q&&!P,fallback:e.jsx(Ue,{tenantEmailDomain:i}),children:e.jsx(On,{})})}),e.jsx(a,{path:"expense-automation/actual-matching/:matchId",element:e.jsx(A,{isAllowed:Q&&!P&&We,fallback:e.jsx(D,{}),children:e.jsx(Pn,{})})}),e.jsx(a,{path:"notifications/*",element:e.jsx(vn,{})}),e.jsx(a,{path:"vendors/*",element:e.jsx(A,{isAllowed:$e,fallback:e.jsx(D,{}),children:e.jsx(Rn,{})})}),e.jsx(a,{path:"bill/*",element:Ee?e.jsx(we,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:Ee?e.jsx(we,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:pe?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:pe?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:e.jsx(A,{isAllowed:Ne,fallback:e.jsx(D,{}),children:e.jsx(Tn,{hasAdminLevelAccess:_e})})}),e.jsx(a,{path:"invoicing/*",element:e.jsx(A,{isAllowed:Ze&&Me,fallback:e.jsx(D,{}),children:e.jsx(bn,{})})}),e.jsx(a,{path:"cards/ask",element:e.jsx(A,{isAllowed:m&&M,fallback:e.jsx(D,{}),children:e.jsx(Pe,{isFileUploadEnabled:ee})})}),e.jsx(a,{path:"cards/ask/:session_id",element:e.jsx(A,{isAllowed:m&&M,fallback:e.jsx(D,{}),children:e.jsx(Pe,{isFileUploadEnabled:ee})})}),e.jsx(a,{path:"cards/*",element:e.jsx(A,{isAllowed:m,fallback:e.jsx(D,{}),children:e.jsx(Cn,{})})}),e.jsx(a,{path:"rewards/*",element:e.jsx(A,{isAllowed:qe,fallback:e.jsx(D,{}),children:e.jsx(Un,{})})}),e.jsx(a,{path:"/ai-cfo",element:e.jsx(A,{isAllowed:M,fallback:e.jsx(D,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(a,{path:"/ai-cfo/",element:e.jsx(A,{isAllowed:M,fallback:e.jsx(D,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:e.jsx(A,{isAllowed:M,fallback:e.jsx(D,{}),children:e.jsx(Fn,{isFileUploadEnabled:ee})})}),e.jsx(a,{path:"*",element:e.jsx(D,{})})]})}):null:(t(void 0),e.jsx(d,{to:`/${i}/onboarding`,replace:!0})):(t(void 0),e.jsx(d,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),t(void 0),e.jsx(d,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,Gn as S};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-DZUXZ-JO.js";import{a as d}from"./sentry-DfoGRlTp.js";import{h as O,g as H,u as U,i as L,j as C,l as K,n as J,o as k}from"./core-C4Vfz6Ll.js";import{fE as v,_p as je,Oa as Pe,ZY as ve,_5 as we,c6 as X,cR as Ae,cS as De,bm as Ue,dc as Re,Gs as Te,_q as Me,PD as Be,N1 as Ne,MU as de,MR as Ve,Gw as ue,MX as pe,M_ as ge,N4 as Y,CA as ee,Gv as Fe,lu as Z,lx as me,_r as Oe,mH as Le,GN as Ge,Wq as $e,Wr as Ze,ls as He,_s as Ke,lv as qe,uL as ze,Wl as We,Wm as Je,uP as Qe,hV as Xe,Vi as W,hN as ae,hK as Ye,hS as en,Vj as nn,GK as tn,_t as an,_u as on,Ni as sn,l$ as rn,dY as fe,dZ as he,_v as ln,gB as cn,Vz as dn,GJ as oe,gG as se,gF as un,GI as pn,gE as gn,gD as mn,_w as fn,UK as Ce,_x as hn,_y as Cn,_z as yn,_A as Sn,_B as bn,_C as In,GQ as xn,_D as En,GH as ie,GB as $,_E as kn,_F as _n,_G as re,_H as jn,dR as Pn,_I as vn,_J as wn,_K as An,UW as Dn,b_ as Un,c5 as Rn,c4 as Tn,b$ as Mn,_L as Bn,c2 as Nn,c1 as Vn,c3 as Fn,c0 as On}from"./zeni-epic-state-DmXGRK_Y.js";import{bV as Ln,z as P,V as G,a6 as ne,c5 as Gn,m as q,p as te,c as V,j as ye,O as Se,c6 as $n,l as Zn,X as be,c7 as Hn,ah as Kn,c8 as qn,c9 as zn,ap as Wn,ca as Jn,n as Qn,d as Ie,cb as Xn}from"./index-CJ_pjNEa.js";import{n as B}from"./mui-C0PYnbt1.js";import{u as xe}from"./useTaskManagerAccess-Cp8R2Cu9.js";import{U as Yn}from"./AccountMappingScreen-CMj3JkGt.js";import{t as et,A as nt}from"./AddressScreen-BbgME8aO.js";import F from"./NotFoundScreen-CxVO6BUm.js";import{g as tt}from"./analyticsHelper-CPHVprda.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-8VbyEZWD.js";import{C as st}from"./CompanyPassportScreen-L6OY8AwA.js";import{M as T}from"./MobileAppDrawer-B4_Hh2uX.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-BCLtP2Ad.js";import{q as le}from"./QBOConnectionScreen-BD6w4pxT.js";import{B as lt}from"./BillPayApprovalRoutes-GN_PKZBM.js";import{R as ct}from"./ReimbursementApprovalRoutes-_wQ1m-SZ.js";import"./recharts-rN5v_P87.js";import"./analytics-C4ICDJLl.js";import"./plaid-hQES7k9Y.js";import"./dnd-kAQqqaX2.js";import"./stripe-cKAAJElX.js";import"./lottie-txhqSe8x.js";import"./lexical-SeD-pdYj.js";import"./pdf-bOGTjHnz.js";import"./utils-CmKqkYr5.js";import"./accountMappingHelper-BbISzw1n.js";import"./routePaths-DYebh4Li.js";import"./InboxNotificationsProvider-CJt6vmnU.js";import"./url-BtS-4pap.js";import"./empty-uRyODf4S.js";import"./pdf-lib-BsfRp21l.js";import"./index-BTd7WWV0.js";import"./index-E3novWwq.js";import"./decodeURIComponentSafe-CYsmEPcV.js";import"./useEnsureVendorListLoaded-Bud-c91I.js";import"./ReimbursementApprovalRuleDetailScreen-CQJ7WhRf.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]="24d2f4a5-4fc8-47f1-8481-7ac62be76efd",e._sentryDebugIdIdentifier="sentry-dbid-24d2f4a5-4fc8-47f1-8481-7ac62be76efd")}catch{}})();const dt=B.div`
1
+ import{j as a}from"./liveblocks-V5YQZeeY.js";import{a as d}from"./sentry-bpmZUW7k.js";import{h as O,g as H,u as U,i as L,j as C,l as K,n as J,o as k}from"./core-BWRpGVdr.js";import{fE as v,_p as je,Oa as Pe,ZY as ve,_5 as we,c6 as X,cR as Ae,cS as De,bm as Ue,dc as Re,Gs as Te,_q as Me,PD as Be,N1 as Ne,MU as de,MR as Ve,Gw as ue,MX as pe,M_ as ge,N4 as Y,CA as ee,Gv as Fe,lu as Z,lx as me,_r as Oe,mH as Le,GN as Ge,Wq as $e,Wr as Ze,ls as He,_s as Ke,lv as qe,uL as ze,Wl as We,Wm as Je,uP as Qe,hV as Xe,Vi as W,hN as ae,hK as Ye,hS as en,Vj as nn,GK as tn,_t as an,_u as on,Ni as sn,l$ as rn,dY as fe,dZ as he,_v as ln,gB as cn,Vz as dn,GJ as oe,gG as se,gF as un,GI as pn,gE as gn,gD as mn,_w as fn,UK as Ce,_x as hn,_y as Cn,_z as yn,_A as Sn,_B as bn,_C as In,GQ as xn,_D as En,GH as ie,GB as $,_E as kn,_F as _n,_G as re,_H as jn,dR as Pn,_I as vn,_J as wn,_K as An,UW as Dn,b_ as Un,c5 as Rn,c4 as Tn,b$ as Mn,_L as Bn,c2 as Nn,c1 as Vn,c3 as Fn,c0 as On}from"./zeni-epic-state-BlWDBO75.js";import{bV as Ln,z as P,V as G,a6 as ne,c5 as Gn,m as q,p as te,c as V,j as ye,O as Se,c6 as $n,l as Zn,X as be,c7 as Hn,ah as Kn,c8 as qn,c9 as zn,ap as Wn,ca as Jn,n as Qn,d as Ie,cb as Xn}from"./index-9pdMsp-M.js";import{n as B}from"./mui-BmHHlwSU.js";import{u as xe}from"./useTaskManagerAccess-Bq9TDvwr.js";import{U as Yn}from"./AccountMappingScreen-CtnQtVOI.js";import{t as et,A as nt}from"./AddressScreen-CiPLLpNX.js";import F from"./NotFoundScreen-C94S-cmy.js";import{g as tt}from"./analyticsHelper-Cn2rORl_.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-71JxUYXB.js";import{C as st}from"./CompanyPassportScreen-dRN2jnGn.js";import{M as T}from"./MobileAppDrawer-rCVKr3J3.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-F8OBO8EU.js";import{q as le}from"./QBOConnectionScreen-C1Kn9y8q.js";import{B as lt}from"./BillPayApprovalRoutes-Bhwrq5tr.js";import{R as ct}from"./ReimbursementApprovalRoutes-CsG7QtOs.js";import"./recharts-BXLxGQ-T.js";import"./analytics-BfKlFVdJ.js";import"./plaid-CNV6JDhi.js";import"./dnd-wLfPcqQ_.js";import"./stripe-cKAAJElX.js";import"./lottie-ByqRhfis.js";import"./lexical-ljfsYSTd.js";import"./pdf-C42gprG9.js";import"./utils-CXFQdt3d.js";import"./accountMappingHelper-7kGWRPlV.js";import"./routePaths--TXDBUUo.js";import"./InboxNotificationsProvider-Cd4NxEtR.js";import"./url-Cc_9bwX-.js";import"./empty-BxjviaN4.js";import"./pdf-lib-D4o6Nk27.js";import"./index-DYK9WSJX.js";import"./index-BXpurrfG.js";import"./decodeURIComponentSafe-DN9u1X8y.js";import"./useEnsureVendorListLoaded-CKZrwkQQ.js";import"./ReimbursementApprovalRuleDetailScreen-BzhkgPjS.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]="24d2f4a5-4fc8-47f1-8481-7ac62be76efd",e._sentryDebugIdIdentifier="sentry-dbid-24d2f4a5-4fc8-47f1-8481-7ac62be76efd")}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 d}from"./liveblocks-DZUXZ-JO.js";import{h as X,g as Q,u as ee,i as W,j as k,N as R,l as H,t as en}from"./core-C4Vfz6Ll.js";import{bH as nn,fE as V,cE as tn,Ik as J,ZY as an,Z$ as sn,v2 as ne,uS as te,mz as ae,C6 as L,_1 as be,gF as He,gE as Ge,gD as Ke,_2 as on,It as cn,N1 as Ce,MU as he,MR as Ie,Mw as Y,MX as Ae,M_ as _e,N4 as ke,CA as ve,g_ as rn,cz as dn,dZ as un,dY as ln,dg as pn,bq as mn,cs as Fe,_3 as yn,Lw as fe,M8 as fn,_4 as gn,bI as Sn,Om as ge,Oa as bn,_5 as Cn,_6 as hn,Oq as In,Ou as An,_7 as je,B$ as _n,T3 as kn,_8 as vn,_9 as Pn,_a as Tn,_b as qe,_c as En,_d as Dn,W9 as Un,Zd as On,Wo as wn,_e as Je,MI as Fn,MA as Vn,Wp as xn,ME as Bn,_f as Oe,Pa as Ye,mH as jn,uV as Xe,C8 as Rn,bC as Re,Ck as Ne,cC as Nn,_g as Qe,P0 as we,OJ as Ln,OK as Mn,OO as zn,_h as Zn,P3 as Le,_i as $n,_j as Wn,_k as Hn,PR as Se,_l as Gn,gV as Kn,JF as qn,_m as Jn,JK as Yn,JJ as Xn}from"./zeni-epic-state-DmXGRK_Y.js";import{ah as Pe,V as ie,p as ue,c as q,z as E,a7 as se,m as D,a6 as Te,S as $,bS as Qn,ad as oe,bT as x,bk as Ve,bU as et,bV as nt,bW as tt,x as Be,bX as at,n as Me,aF as ze,a0 as it,aa as st,bY as ot,bZ as ct,b_ as rt,w as dt}from"./index-CJ_pjNEa.js";import{a as h}from"./sentry-DfoGRlTp.js";import{u as Ee,n as xe,D as ut,S as lt}from"./mui-C0PYnbt1.js";import{u as pt,d as Ze,B as Ue}from"./BusinessVerificationPageScreen-8VbyEZWD.js";import{M as le}from"./MobileAppDrawer-B4_Hh2uX.js";import N from"./NotFoundScreen-CxVO6BUm.js";import{a as $e}from"./analyticsHelper-CPHVprda.js";import{d as We}from"./routePaths-DYebh4Li.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]="72d2bda9-be75-48d3-930b-6ad1bd650721",e._sentryDebugIdIdentifier="sentry-dbid-72d2bda9-be75-48d3-930b-6ad1bd650721")}catch{}})();const mt=xe.div`
1
+ import{j as d}from"./liveblocks-V5YQZeeY.js";import{h as X,g as Q,u as ee,i as W,j as k,N as R,l as H,t as en}from"./core-BWRpGVdr.js";import{bH as nn,fE as V,cE as tn,Ik as J,ZY as an,Z$ as sn,v2 as ne,uS as te,mz as ae,C6 as L,_1 as be,gF as He,gE as Ge,gD as Ke,_2 as on,It as cn,N1 as Ce,MU as he,MR as Ie,Mw as Y,MX as Ae,M_ as _e,N4 as ke,CA as ve,g_ as rn,cz as dn,dZ as un,dY as ln,dg as pn,bq as mn,cs as Fe,_3 as yn,Lw as fe,M8 as fn,_4 as gn,bI as Sn,Om as ge,Oa as bn,_5 as Cn,_6 as hn,Oq as In,Ou as An,_7 as je,B$ as _n,T3 as kn,_8 as vn,_9 as Pn,_a as Tn,_b as qe,_c as En,_d as Dn,W9 as Un,Zd as On,Wo as wn,_e as Je,MI as Fn,MA as Vn,Wp as xn,ME as Bn,_f as Oe,Pa as Ye,mH as jn,uV as Xe,C8 as Rn,bC as Re,Ck as Ne,cC as Nn,_g as Qe,P0 as we,OJ as Ln,OK as Mn,OO as zn,_h as Zn,P3 as Le,_i as $n,_j as Wn,_k as Hn,PR as Se,_l as Gn,gV as Kn,JF as qn,_m as Jn,JK as Yn,JJ as Xn}from"./zeni-epic-state-BlWDBO75.js";import{ah as Pe,V as ie,p as ue,c as q,z as E,a7 as se,m as D,a6 as Te,S as $,bS as Qn,ad as oe,bT as x,bk as Ve,bU as et,bV as nt,bW as tt,x as Be,bX as at,n as Me,aF as ze,a0 as it,aa as st,bY as ot,bZ as ct,b_ as rt,w as dt}from"./index-9pdMsp-M.js";import{a as h}from"./sentry-bpmZUW7k.js";import{u as Ee,n as xe,D as ut,S as lt}from"./mui-BmHHlwSU.js";import{u as pt,d as Ze,B as Ue}from"./BusinessVerificationPageScreen-71JxUYXB.js";import{M as le}from"./MobileAppDrawer-rCVKr3J3.js";import N from"./NotFoundScreen-C94S-cmy.js";import{a as $e}from"./analyticsHelper-Cn2rORl_.js";import{d as We}from"./routePaths--TXDBUUo.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]="72d2bda9-be75-48d3-930b-6ad1bd650721",e._sentryDebugIdIdentifier="sentry-dbid-72d2bda9-be75-48d3-930b-6ad1bd650721")}catch{}})();const mt=xe.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;