@zeniai/web-app-ui 5.3.45-qa → 5.3.46-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 (126) hide show
  1. package/dist/assets/{AccountMappingScreen-EqyOLk0W.js → AccountMappingScreen-CfueHDEF.js} +2 -2
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-B_Hxuz1x.js → ActualMatchingMatchDetailScreen-fiSieMf_.js} +1 -1
  3. package/dist/assets/AddressRoutes-nZx4HWhJ.js +1 -0
  4. package/dist/assets/AddressScreen-D06QouT5.js +9 -0
  5. package/dist/assets/{AiCfoScreen-DgiomMQs.js → AiCfoScreen-V8xy8p4b.js} +1 -1
  6. package/dist/assets/{AppDrawer-C9JSspSl.js → AppDrawer-CyBGsFud.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-CtPNwVvl.js → BillPayApprovalRoutes-C1N-qtHk.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-Duz6Vx7D.js → BillPayRoutes-CdYxJOPQ.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-BAWcvg1q.js → BusinessVerificationPageScreen-BScFHNdu.js} +2 -2
  10. package/dist/assets/CardsAiCfoScreen-BQ4Zn40f.js +14 -0
  11. package/dist/assets/{ChargeCardRoutes-B08xwpTq.js → ChargeCardRoutes-tPmmU_fw.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-CbwVCSdf.js → CompanyPassportScreen-CMIjHc5k.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-BcoTZa8L.js → ConnectionAuthScreen-BdMANdwF.js} +1 -1
  14. package/dist/assets/CustomerOnboardingAuthScreen-BjVB3FB2.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-BP006ys9.js → CustomerOnboardingRoutes-BqAwy1Go.js} +3 -3
  16. package/dist/assets/{DashboardRoutes-DKsy8kjy.js → DashboardRoutes-C3Q7vlXr.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-h9sstg-6.js → DefaultTenantHome-CPPof4Nd.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-DdrkO-LG.js → DomesticWireDetailScreen-Bo5pk1NL.js} +3 -3
  19. package/dist/assets/DrawerScreen-DYwMLd1Q.js +1 -0
  20. package/dist/assets/{EntityDetailRoutes-TJfEMlzp.js → EntityDetailRoutes-_eEqLjSQ.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-FRK8lYq7.js → ExpenseAutomationRoutes-D17PZLn2.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-R_rh5xYj.js → FeaturePreviewScreen-BE9pWqir.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-Bf48Zrcv.js → HubSpotOAuthCallbackScreen-CDOpB-J7.js} +1 -1
  24. package/dist/assets/{InboxNotificationsProvider-CMirleoY.js → InboxNotificationsProvider-gj6fT2eX.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-D9DMbY6F.js → InvoicingRoutes-rYerhkHV.js} +1 -1
  26. package/dist/assets/{MagicLinkRoutes-DVS2kuyq.js → MagicLinkRoutes-D8pvaYpW.js} +6 -6
  27. package/dist/assets/MagicLinkSignInScreen-CW3gjVTf.js +12 -0
  28. package/dist/assets/{MobileAppDrawer-DEm85bH8.js → MobileAppDrawer-Dubbrc5R.js} +1 -1
  29. package/dist/assets/NotFoundScreen-r2t5kGnd.js +1 -0
  30. package/dist/assets/{NotificationRoutes-DlVY8cS0.js → NotificationRoutes-C0XszwDJ.js} +1 -1
  31. package/dist/assets/{OAuthConsentScreen-0eyA85wD.js → OAuthConsentScreen-CS66Nuk1.js} +1 -1
  32. package/dist/assets/{PandLWithForecastRoutes-Ciu8QGi3.js → PandLWithForecastRoutes-tEXmnuYa.js} +1 -1
  33. package/dist/assets/{PaymentLinkScreen-DSvOcNW8.js → PaymentLinkScreen-Ba8XuIED.js} +1 -1
  34. package/dist/assets/{PeopleRoutes-B29gnv2-.js → PeopleRoutes-MPpefoB8.js} +9 -9
  35. package/dist/assets/{PerformanceRoutes-C-oSemZm.js → PerformanceRoutes-v3vPCjna.js} +1 -1
  36. package/dist/assets/{Preview-DPyEVqHc.js → Preview-j2_daqeV.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-CUhLSYvc.js → QBOConnectionScreen-CAoS33ZU.js} +23 -23
  38. package/dist/assets/{ReimbursementApprovalRoutes-CS9p1qcB.js → ReimbursementApprovalRoutes-BqXyuFCU.js} +1 -1
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CJnxkFoz.js → ReimbursementApprovalRuleDetailScreen-B9f-fas4.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-DaGg2TTR.js → ReimbursementRoutes-IZQbGrfA.js} +1 -1
  41. package/dist/assets/{ReportsRoutes-BsvYUCIx.js → ReportsRoutes-R5Ca0XU-.js} +1 -1
  42. package/dist/assets/RewardsRoutes-CRQWx3J1.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-CJ28c5Wc.js → ScheduleDetailsPrepaidExpensesScreen-BMDMlpQa.js} +4 -4
  44. package/dist/assets/{ScreenRoutes-Lei7nnrR.js → ScreenRoutes-Cwhq-96H.js} +2 -2
  45. package/dist/assets/{SettingsRoutes-DJiPiJIZ.js → SettingsRoutes-CMH4A66d.js} +1 -1
  46. package/dist/assets/{SetupPagesScreen-BzPNt5Xb.js → SetupPagesScreen-BzKWg1IS.js} +1 -1
  47. package/dist/assets/SignInScreen-Niy78Kvo.js +1 -0
  48. package/dist/assets/SignOutScreen-z5R4ARFQ.js +9 -0
  49. package/dist/assets/TaskListScreen-CQ5GSVtZ.js +9 -0
  50. package/dist/assets/{TaskRoutes-BAifN0A-.js → TaskRoutes-BLHPB9C2.js} +2 -2
  51. package/dist/assets/TransactionDetailRoutes-DWH8l2BY.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-C32uKUIF.js → TransactionDetailScreen-Cyr21RUS.js} +2 -2
  53. package/dist/assets/{TransactionListRoutes-Ebou9bMl.js → TransactionListRoutes-DeHnVgrc.js} +1 -1
  54. package/dist/assets/{TreasuryRoutes-Bq4RVae3.js → TreasuryRoutes-CH1V36gd.js} +5 -5
  55. package/dist/assets/{VendorsRoutes-dtzf2p8G.js → VendorsRoutes-D5fLbpGk.js} +1 -1
  56. package/dist/assets/{WiseConfirmationScreen-Dzz50WS2.js → WiseConfirmationScreen-B4K2TMeC.js} +1 -1
  57. package/dist/assets/{ZeniAccountRoutes-C2FWt_0o.js → ZeniAccountRoutes-B_-Cub3b.js} +1 -1
  58. package/dist/assets/ZeniAccountStatementScreen-Cg7a4ZMC.js +9 -0
  59. package/dist/assets/{accountMappingHelper-B5wpHG39.js → accountMappingHelper-DWzrp9Pr.js} +1 -1
  60. package/dist/assets/{analytics-5LJ4BXQX.js → analytics-wktvfErl.js} +1 -1
  61. package/dist/assets/{analyticsHelper-k_Sp-PwA.js → analyticsHelper-BZsIqD3O.js} +1 -1
  62. package/dist/assets/{core-BI5oX4mx.js → core-D6EV-11Y.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-B7oIXSPO.js → decodeURIComponentSafe-MQV5aj_5.js} +1 -1
  64. package/dist/assets/{dnd-D6wtGmk9.js → dnd-CkchuQYc.js} +1 -1
  65. package/dist/assets/{empty-D1y42ZwI.js → empty-DQLKD1Hp.js} +1 -1
  66. package/dist/assets/{empty-PW7BYANj.js → empty-PZV8n_Ql.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-DRIlZkGm.js → emptyVideoElement-CnlqukSR.js} +1 -1
  68. package/dist/assets/{epic-BgEnH7Qf.js → epic-CVdAQuh9.js} +1 -1
  69. package/dist/assets/{expenseAutomationHelper-CqPrLTRM.js → expenseAutomationHelper-DEOPVtcg.js} +1 -1
  70. package/dist/assets/{getLocaleForTenant-Cv6I-eSM.js → getLocaleForTenant-DffZrhDN.js} +1 -1
  71. package/dist/assets/{index-BT5wSX8Z.js → index-8ioAZPP6.js} +1 -1
  72. package/dist/assets/{index-BgSgl7o0.js → index-B5kf_qFj.js} +1 -1
  73. package/dist/assets/{index-Cnd56s5E.js → index-BlnK23AJ.js} +1 -1
  74. package/dist/assets/{index-ChUBWLsO.js → index-CBlRXIxp.js} +1 -1
  75. package/dist/assets/{index-C8KisrNI.js → index-CKDPlCKN.js} +2 -2
  76. package/dist/assets/{index-Cf-PV9pR.js → index-EnAqWoDC.js} +1 -1
  77. package/dist/assets/{index-C2L5Bzwa.js → index-lv0eG9-7.js} +13420 -13420
  78. package/dist/assets/{index-COJM8F4x.js → index-qI_nnuux.js} +1 -1
  79. package/dist/assets/{lexical-BLu7UAko.js → lexical-C6tQwGBF.js} +1 -1
  80. package/dist/assets/{liveblocks-CW9yScMF.js → liveblocks-DKqwsBQp.js} +1 -1
  81. package/dist/assets/{lottie-lQbJqTc2.js → lottie-BwhdO6jl.js} +1 -1
  82. package/dist/assets/{mui-KP5Ep0NX.js → mui-qouWiIWk.js} +1 -1
  83. package/dist/assets/{pathToGoBack-Ddmf68xx.js → pathToGoBack-DMRqTTJ7.js} +1 -1
  84. package/dist/assets/{pdf-DflcYtDk.js → pdf-DcGn_mX8.js} +4 -4
  85. package/dist/assets/{pdf-lib-iL5hUpKl.js → pdf-lib-DndwkHl6.js} +1 -1
  86. package/dist/assets/{plaid-BrgJMdej.js → plaid-deRHM6gT.js} +1 -1
  87. package/dist/assets/{pusher-CN7UYIVv.js → pusher-BmM2v3Ys.js} +1 -1
  88. package/dist/assets/{react-C3b5GjIN.js → react-1c5WrJsc.js} +1 -1
  89. package/dist/assets/{react-D7C_-SWb.js → react-D6U1M1pt.js} +1 -1
  90. package/dist/assets/{react-Ow08-_5J.js → react-DFunsRdI.js} +1 -1
  91. package/dist/assets/{react-XJ6XyB9N.js → react-DZ82GBCj.js} +1 -1
  92. package/dist/assets/{react-C3_gvmu5.js → react-DiQLb4cq.js} +1 -1
  93. package/dist/assets/{react-BvzziK5i.js → react-QkGRtVkE.js} +1 -1
  94. package/dist/assets/{recharts-DRl2ZsSW.js → recharts-C9zWmt1W.js} +1 -1
  95. package/dist/assets/{routePaths-BrIEdo8u.js → routePaths-BxLZuqJn.js} +1 -1
  96. package/dist/assets/{sentry-C_uJQK1a.js → sentry-CxSdF_rC.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-CSXpdRK5.js → stripSplatSuffix-CYVrHv_0.js} +1 -1
  98. package/dist/assets/{url-Csr3E4Sb.js → url-BSgCM0lM.js} +1 -1
  99. package/dist/assets/{url-0wqXxJRo.js → url-Ej5v3O6d.js} +1 -1
  100. package/dist/assets/{useActualMatchingMatchDetail-C-OzIN8B.js → useActualMatchingMatchDetail-Bq60hvvx.js} +1 -1
  101. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CZodBcrZ.js → useAiCfoDashboardSuggestedQuestionsChips-sigyClkp.js} +1 -1
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-Cgk5vvuH.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-B3svLsmE.js → useChargeCardPusherEvents-gKhYa0T8.js} +1 -1
  104. package/dist/assets/{useDeviceId-CAlK1w38.js → useDeviceId-RToKfM0O.js} +1 -1
  105. package/dist/assets/{useEmailConnectResultRefresh-CIZ_wxDt.js → useEmailConnectResultRefresh-DefipxZh.js} +1 -1
  106. package/dist/assets/{useInitialThreadRequest-BNsRpSRE.js → useInitialThreadRequest-BXjZ5prE.js} +1 -1
  107. package/dist/assets/{useTaskManagerAccess-Bhr2JI_X.js → useTaskManagerAccess-CncuT8wV.js} +1 -1
  108. package/dist/assets/{utils-BzQpFQvw.js → utils-D8aAQJhF.js} +1 -1
  109. package/dist/assets/{withTransactionSidePanel-mkP2Wc9X.js → withTransactionSidePanel-BY_v_z2c.js} +1 -1
  110. package/dist/assets/{zeni-epic-state-CIizsNeB.js → zeni-epic-state-CZbm731W.js} +3 -3
  111. package/dist/index.html +1 -1
  112. package/package.json +3 -3
  113. package/dist/assets/AddressRoutes-ByQnL6Ep.js +0 -1
  114. package/dist/assets/AddressScreen-C2qj6tYr.js +0 -9
  115. package/dist/assets/CardsAiCfoScreen-BdTJBLec.js +0 -14
  116. package/dist/assets/CustomerOnboardingAuthScreen-BpGFH1t5.js +0 -1
  117. package/dist/assets/DrawerScreen-KSeYe6Xi.js +0 -1
  118. package/dist/assets/MagicLinkSignInScreen-CmaiVv9M.js +0 -12
  119. package/dist/assets/NotFoundScreen-CS6UgwGr.js +0 -1
  120. package/dist/assets/RewardsRoutes-BeNSEmB_.js +0 -1
  121. package/dist/assets/SignInScreen-OFMK0Fhv.js +0 -1
  122. package/dist/assets/SignOutScreen-Duww-LZM.js +0 -9
  123. package/dist/assets/TaskListScreen-Dy6L1Gr_.js +0 -9
  124. package/dist/assets/TransactionDetailRoutes-KEbThb3n.js +0 -1
  125. package/dist/assets/ZeniAccountStatementScreen-CJtdjYJW.js +0 -9
  126. package/dist/assets/useAskAiCfoHostNavButtonProps-4TGjNsPg.js +0 -1
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-CW9yScMF.js";import{a as r}from"./sentry-C_uJQK1a.js";import{u as A,g as j,j as o,N as C}from"./core-BI5oX4mx.js";import{Uq as P,fF as x,gm as z,Ur as D,Us as M,Ut as R,Uu as q,pS as k,T5 as L}from"./zeni-epic-state-CIizsNeB.js";import{z as h,ah as I}from"./index-C2L5Bzwa.js";import"./mui-KP5Ep0NX.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="338f0360-45c2-4936-9963-db6197550231",n._sentryDebugIdIdentifier="sentry-dbid-338f0360-45c2-4936-9963-db6197550231")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo((()=>P(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o((e=>x(e))),l=o((e=>z(e))),d=o((e=>e.tenantState.fetchState)),y=o(D),S=o(M),u=o(R),[U,v]=r.useState(null),[b,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(q())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const _=r.useMemo((()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[m?.tenantId,l]),c=U??_;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:v,approveError:b??S,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(L(a.userId,a.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
1
+ import{j as f}from"./liveblocks-DKqwsBQp.js";import{a as r}from"./sentry-CxSdF_rC.js";import{u as A,g as j,j as o,N as C}from"./core-D6EV-11Y.js";import{Uq as P,fF as x,gm as z,Ur as D,Us as M,Ut as R,Uu as q,pS as k,T5 as L}from"./zeni-epic-state-CZbm731W.js";import{z as h,ah as I}from"./index-lv0eG9-7.js";import"./mui-qouWiIWk.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="338f0360-45c2-4936-9963-db6197550231",n._sentryDebugIdIdentifier="sentry-dbid-338f0360-45c2-4936-9963-db6197550231")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo((()=>P(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o((e=>x(e))),l=o((e=>z(e))),d=o((e=>e.tenantState.fetchState)),y=o(D),S=o(M),u=o(R),[U,v]=r.useState(null),[b,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(q())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const _=r.useMemo((()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[m?.tenantId,l]),c=U??_;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:v,approveError:b??S,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(L(a.userId,a.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -1 +1 @@
1
- import{j as n}from"./liveblocks-CW9yScMF.js";import{h as H,u as J,g as K,i as Q,j as d,l as X,n as ee,o as C}from"./core-BI5oX4mx.js";import{fF as M,A4 as O,v1 as ae,Vi as w,uY as T,bq as te,b$ as se,uZ as oe,Vj as re,V0 as S,ei as ne,DS as ce,Vk as ie,Ee as le,d_ as de,dZ as me}from"./zeni-epic-state-CIizsNeB.js";import{ai as fe,z as pe,aq as ue,as as he,U as Fe,N as _,d as N,a8 as ge,k as V,aD as Ie,p as be}from"./index-C2L5Bzwa.js";import"./mui-KP5Ep0NX.js";import Ce from"./NotFoundScreen-CS6UgwGr.js";import{F as Se}from"./FeaturePreviewScreen-R_rh5xYj.js";import{a as F}from"./sentry-C_uJQK1a.js";import{u as Te}from"./useAskAiCfoHostNavButtonProps-4TGjNsPg.js";import{u as ye}from"./useInitialThreadRequest-BNsRpSRE.js";import{t as Ae}from"./routePaths-BrIEdo8u.js";import{M as De}from"./MobileAppDrawer-DEm85bH8.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./InboxNotificationsProvider-CMirleoY.js";import"./useTaskManagerAccess-Bhr2JI_X.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="0a34278c-8e07-471a-8f30-ee3a593f48fc",s._sentryDebugIdIdentifier="sentry-dbid-0a34278c-8e07-471a-8f30-ee3a593f48fc")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=X((function(s){const e=re(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:V}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(le(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ce(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=ne(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Ae(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=be(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(Ie);function v(){const s=fe(),e=H(),a=J(),o=K(),{forecastId:r,tenantEmailDomain:c}=Q(),[p,u]=F.useState(!1),[m,A]=F.useState(!1),g=pe.getSignedInUser(),D=d((t=>M(t))),$=D.company?.companyInfo.firstMonthOfFY??1,i=d((t=>O(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),k=d((t=>t.profitAndLossState)),x=d((t=>t.reportUIOptionsState.selectedForecast)),j=t=>k.pandLByForecastID[t]!=null&&oe(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=ue();he({isDataReady:l});const{isAiCfoAccessEnabled:q,onAskAiCfoClick:B}=Te({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&I)u(!0),l||a(ae());else if(l&&!m){A(!0);const t=((f,R,U)=>R!=null?f.forecasts.findIndex((b=>b.id===R)):U!=null?f.forecasts.findIndex((b=>b.id===U)):f.forecasts.length>0?0:-1)(i,r,x?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=x?.index?(a(w(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!j(i.forecasts[t].id)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,O,T,I]);const E=Fe(),G=E?.loggedInUserRole!=null&&te(E.loggedInUserRole),{useFeatureGate:W}=_(),{isFeatureEnabled:L}=W(N.isReportsCommentingEnabled),Y=ye(L?D?.companyId:void 0,{clearParams:l&&m}),[Z,z]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const P=t=>{z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ge,{analytics:V,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(De,{isAppContentDrawerOpen:Z,handleDrawerToggle:P}),n.jsx(ke,{firstMonthOfFY:$,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:j,meetingUrl:se(h.toString()),hasTransactionAccess:G,isAiCfoAccessEnabled:q,onAskAiCfoClick:B,isReportsCommentingEnabled:L,initialOpenThreadRequest:Y,onClickMenuIcon:()=>{P(!0)}})]})}function Je(){const s=d((c=>M(c))),{useFeatureGate:e}=_(),{isFeatureEnabled:a}=e(N.isDebitCardFeatureEnabled),o=de(a,s),r=me(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Je as default};
1
+ import{j as n}from"./liveblocks-DKqwsBQp.js";import{h as H,u as J,g as K,i as Q,j as d,l as X,n as ee,o as C}from"./core-D6EV-11Y.js";import{fF as M,A4 as O,v1 as ae,Vi as w,uY as T,bq as te,b$ as se,uZ as oe,Vj as re,V0 as S,ei as ne,DS as ce,Vk as ie,Ee as le,d_ as de,dZ as me}from"./zeni-epic-state-CZbm731W.js";import{ai as fe,z as pe,aq as ue,as as he,U as be,N as _,d as N,a8 as Fe,l as V,aD as ge,p as Ie}from"./index-lv0eG9-7.js";import"./mui-qouWiIWk.js";import Ce from"./NotFoundScreen-r2t5kGnd.js";import{F as Se}from"./FeaturePreviewScreen-BE9pWqir.js";import{a as b}from"./sentry-CxSdF_rC.js";import{u as Te}from"./useAskAiCfoHostNavButtonProps-Cgk5vvuH.js";import{u as ye}from"./useInitialThreadRequest-BXjZ5prE.js";import{t as Ae}from"./routePaths-BxLZuqJn.js";import{M as De}from"./MobileAppDrawer-Dubbrc5R.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";import"./InboxNotificationsProvider-gj6fT2eX.js";import"./useTaskManagerAccess-CncuT8wV.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="a94c76fb-e4fa-4f77-b34b-c3727abdb911",s._sentryDebugIdIdentifier="sentry-dbid-a94c76fb-e4fa-4f77-b34b-c3727abdb911")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},xe=X((function(s){const e=re(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:V}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(le(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ce(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=ne(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Ae(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=Ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ge);function v(){const s=fe(),e=H(),a=J(),o=K(),{forecastId:r,tenantEmailDomain:c}=Q(),[p,u]=b.useState(!1),[m,A]=b.useState(!1),F=pe.getSignedInUser(),D=d((t=>M(t))),$=D.company?.companyInfo.firstMonthOfFY??1,i=d((t=>O(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),j=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>x.pandLByForecastID[t]!=null&&oe(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=ue();he({isDataReady:l});const{isAiCfoAccessEnabled:q,onAskAiCfoClick:B}=Te({mobileExploreReferrer:"Forecast"});b.useEffect((()=>{if(!p&&g)u(!0),l||a(ae());else if(l&&!m){A(!0);const t=((f,R,U)=>R!=null?f.forecasts.findIndex((I=>I.id===R)):U!=null?f.forecasts.findIndex((I=>I.id===U)):f.forecasts.length>0?0:-1)(i,r,j?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.index?(a(w(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!k(i.forecasts[t].id)&&g&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,O,T,g]);const E=be(),G=E?.loggedInUserRole!=null&&te(E.loggedInUserRole),{useFeatureGate:W}=_(),{isFeatureEnabled:L}=W(N.isReportsCommentingEnabled),Y=ye(L?D?.companyId:void 0,{clearParams:l&&m}),[Z,z]=b.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const P=t=>{z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:V,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(De,{isAppContentDrawerOpen:Z,handleDrawerToggle:P}),n.jsx(xe,{firstMonthOfFY:$,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:k,meetingUrl:se(h.toString()),hasTransactionAccess:G,isAiCfoAccessEnabled:q,onAskAiCfoClick:B,isReportsCommentingEnabled:L,initialOpenThreadRequest:Y,onClickMenuIcon:()=>{P(!0)}})]})}function Je(){const s=d((c=>M(c))),{useFeatureGate:e}=_(),{isFeatureEnabled:a}=e(N.isDebitCardFeatureEnabled),o=de(a,s),r=me(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Je as default};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-CW9yScMF.js";import{a as p}from"./sentry-C_uJQK1a.js";import{H as c,I as r,a9 as m,ad as f,ae as h}from"./index-C2L5Bzwa.js";import"./mui-KP5Ep0NX.js";import{i as y}from"./core-BI5oX4mx.js";import"./zeni-epic-state-CIizsNeB.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.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]="a04db822-8766-4f56-9a88-ff18fc054a0c",e._sentryDebugIdIdentifier="sentry-dbid-a04db822-8766-4f56-9a88-ff18fc054a0c")}catch{}})();const g=c("div")`
1
+ import{j as a}from"./liveblocks-DKqwsBQp.js";import{a as p}from"./sentry-CxSdF_rC.js";import{H as c,I as r,a9 as m,ad as f,ae as h}from"./index-lv0eG9-7.js";import"./mui-qouWiIWk.js";import{i as y}from"./core-D6EV-11Y.js";import"./zeni-epic-state-CZbm731W.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.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]="a04db822-8766-4f56-9a88-ff18fc054a0c",e._sentryDebugIdIdentifier="sentry-dbid-a04db822-8766-4f56-9a88-ff18fc054a0c")}catch{}})();const g=c("div")`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -1,22 +1,22 @@
1
- import{j as a}from"./liveblocks-CW9yScMF.js";import{Ve as re,fF as X,l$ as G,d_ as Y,dZ as le,S5 as J,UD as de,CP as Pe,Vf as N,CE as je,CZ as Le,CT as ce,CI as pe,CX as Te,CU as ve,Vg as ue,sl as Ve,g6 as Ae,gD as Fe,Vh as _,CM as me,CL as ge,D0 as Re,c8 as Oe}from"./zeni-epic-state-CIizsNeB.js";import{a1 as fe,N as Q,d as H,z as K,h as Ce,K as he,af as ye,az as be,aA as Ze,ab as Se,I as R,ag as we,G as M,aB as Ue,aq as Be,as as $e,a8 as ze,k as De,S as _e,p as He,aC as Ge,U as Ke}from"./index-C2L5Bzwa.js";import{D as xe,n as W,S as Ie}from"./mui-KP5Ep0NX.js";import ae from"./NotFoundScreen-CS6UgwGr.js";import{a as d}from"./sentry-C_uJQK1a.js";import{u as ee,i as Me,j as g,h as We,g as qe,l as Ne,n as se,o as z}from"./core-BI5oX4mx.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-4TGjNsPg.js";import{M as Ye}from"./MobileAppDrawer-DEm85bH8.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./InboxNotificationsProvider-CMirleoY.js";import"./useTaskManagerAccess-Bhr2JI_X.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]="136f0fe0-583a-4200-8d34-db9e1a230c8c",e._sentryDebugIdIdentifier="sentry-dbid-136f0fe0-583a-4200-8d34-db9e1a230c8c")}catch{}})();const Je={overlayWidth:new Se(100,100,48)},te=M.getLocalizedStrings().peoplePage.invitePage,ne=M.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,Z]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=Me(),r=g((l=>re(l))),p=g((l=>X(l))),E=g((l=>G(l))),{useFeatureGate:x}=Q(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=Y(I,p),T=le(p),v=J(p),U=de(p),B=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,D=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{m(N()),b()},V=()=>{O===!0?S(!0):h()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=Ce(p,j,I),{isCardsHidden:A}=he(p?.tenantId),y=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:h,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:V,isLoading:D||r.person==null},o={onOkClick:()=>{S(!1),h()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{D===!1&&w!=null&&m(Pe(w))}),[D,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&h()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:V,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{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=W(Ie)`
1
+ import{j as a}from"./liveblocks-DKqwsBQp.js";import{Ve as re,fF as X,l$ as G,d_ as Y,dZ as le,S5 as J,UD as ce,CP as Pe,Vf as N,CE as je,CZ as Le,CT as de,CI as pe,CX as Te,CU as ve,Vg as ue,sl as Ve,g6 as Ae,gD as Fe,Vh as _,CM as me,CL as ge,D0 as Oe,c8 as Re}from"./zeni-epic-state-CZbm731W.js";import{a1 as fe,N as Q,d as H,z as K,j as Ce,O as he,af as ye,az as be,aA as Ze,ab as Se,I as O,ag as we,G as M,aB as Ue,aq as Be,as as $e,a8 as ze,l as De,T as _e,p as He,aC as Ge,U as Ke}from"./index-lv0eG9-7.js";import{D as xe,n as W,S as Ie}from"./mui-qouWiIWk.js";import ae from"./NotFoundScreen-r2t5kGnd.js";import{a as c}from"./sentry-CxSdF_rC.js";import{u as ee,i as Me,j as g,h as We,g as qe,l as Ne,n as se,o as z}from"./core-D6EV-11Y.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-Cgk5vvuH.js";import{M as Ye}from"./MobileAppDrawer-Dubbrc5R.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";import"./InboxNotificationsProvider-gj6fT2eX.js";import"./useTaskManagerAccess-CncuT8wV.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]="23555173-6ec4-41df-8fe5-be4ece08b17a",e._sentryDebugIdIdentifier="sentry-dbid-23555173-6ec4-41df-8fe5-be4ece08b17a")}catch{}})();const Je={overlayWidth:new Se(100,100,48)},te=M.getLocalizedStrings().peoplePage.invitePage,ne=M.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[R,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=Me(),r=g((l=>re(l))),p=g((l=>X(l))),E=g((l=>G(l))),{useFeatureGate:x}=Q(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=Y(I,p),T=le(p),v=J(p),U=ce(p),B=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,D=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{m(N()),b()},V=()=>{R===!0?S(!0):h()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=Ce(p,j,I),{isCardsHidden:A}=he(p?.tenantId),y=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:h,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(v))},onCloseClick:V,isLoading:D||r.person==null},o={onOkClick:()=>{S(!1),h()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{D===!1&&w!=null&&m(Pe(w))}),[D,w]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&h()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:V,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{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=W(Ie)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
5
5
  `,ke=W(we.H6Regular)`
6
- margin-top: ${R.sp7};
7
- padding-left: ${R.sp8};
8
- padding-right: ${R.sp8};
6
+ margin-top: ${O.sp7};
7
+ padding-left: ${O.sp8};
8
+ padding-right: ${O.sp8};
9
9
  color: ${e=>e.theme.colors.primary};
10
10
  word-break: break-word;
11
11
  `,Ee=W(we.LargeRegularSp)`
12
12
  color: ${e=>e.theme.colors.hero};
13
- padding-left: ${R.sp8};
14
- padding-right: ${R.sp8};
13
+ padding-left: ${O.sp8};
14
+ padding-right: ${O.sp8};
15
15
  margin-bottom: 30px;
16
- margin-top: ${R.sp4};
16
+ margin-top: ${O.sp4};
17
17
  white-space: pre-line;
18
- `,aa={overlayWidth:new Se(100,100,48)},oe=M.getLocalizedStrings().peoplePage.invitePage,ie=M.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,Z]=d.useState(!1),[k,S]=d.useState(!1),w=g((o=>re(o))),r=g((o=>X(o))),p=g((o=>G(o))),{useFeatureGate:E}=Q(),{isFeatureEnabled:x}=E(H.isDebitCardFeatureEnabled),I=Y(x,r),P=le(r),T=J(r),v=de(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const D=()=>{b(),m(N())},h=()=>{O===!0?S(!0):D()},V={onOkClick:()=>{S(!1),D()},onCancelClick:()=>{S(!1)}},$=c.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(H.isChargeCardFeatureEnabled),L=Ce(r,j,x),{isCardsHidden:A}=he(r?.tenantId),y=!L||A,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(ce({peopleLocalData:o})),Z(!0)},onResetClick:D,onSaveClick:()=>{m(f==="zeni_only"?Te(e):ve())},onCloseClick:h,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:B};return d.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(N()))}),[w.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:h,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:V}):null,a.jsx(Ue,{...s})]})})},ta=W(Ie)`
18
+ `,aa={overlayWidth:new Se(100,100,48)},oe=M.getLocalizedStrings().peoplePage.invitePage,ie=M.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[R,Z]=c.useState(!1),[k,S]=c.useState(!1),w=g((o=>re(o))),r=g((o=>X(o))),p=g((o=>G(o))),{useFeatureGate:E}=Q(),{isFeatureEnabled:x}=E(H.isDebitCardFeatureEnabled),I=Y(x,r),P=le(r),T=J(r),v=ce(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const D=()=>{b(),m(N())},h=()=>{R===!0?S(!0):D()},V={onOkClick:()=>{S(!1),D()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(H.isChargeCardFeatureEnabled),L=Ce(r,j,x),{isCardsHidden:A}=he(r?.tenantId),y=!L||A,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),Z(!0)},onResetClick:D,onSaveClick:()=>{m(f==="zeni_only"?Te(e):ve())},onCloseClick:h,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:B};return c.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(N()))}),[w.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:h,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:V}):null,a.jsx(Ue,{...s})]})})},ta=W(Ie)`
19
19
  display: flex;
20
20
  min-height: 100%;
21
21
  flex-direction: column;
22
- `,na=Ne((function(e,t){const c=ue(e),n=K.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:De}}),(function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(_({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(_({searchText:i}))}}}}))(Ge);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=We(),n=ee(),f=qe(),{areTenantIdsInSync:i}=Be(),b=K.getSignedInUser(),C=g((s=>X(s))),{useFeatureGate:m}=Q(),{isFeatureEnabled:O}=m(H.isDebitCardFeatureEnabled),Z=g((s=>G(s))),k=!Y(O,C)&&Z,S=J(C),w=C?.tenantId,{tenantEmailDomain:r}=C,[p,E]=d.useState(!1),[x,I]=d.useState(!1),[P,T]=d.useState(!1),[v,U]=d.useState("off"),[B,D]=d.useState(!1),h=s=>{D(s)},{isAiCfoAccessEnabled:V,onAskAiCfoClick:$}=Xe({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ve(s.classState,s.classListState))),L=g((s=>Ae(s.userState,s.userRoleState,s.userListViewState,"manager"))),A=g((s=>Fe(s))),y=C?.companyId;d.useEffect((()=>{p&&v===u.uiState.mode||!i||(n(_({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(me()))}),[p,b,w,n,u.uiState.mode,i]),d.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),d.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),d.useEffect((()=>{n(_({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),T(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:De,onLoad:s=>s.trackPageLoaded(_e.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Qe,{closeDrawerHandler:F,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ye,{isAppContentDrawerOpen:B,handleDrawerToggle:h}),a.jsx(na,{navigate:c,signedInUser:b,isZeni:C.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(_({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=He(f.state?.pathnameStackToGoBack,f.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{h(!0)},isAiCfoAccessEnabled:V,onAskAiCfoClick:$})]})}function ka(){const e=Ke();return Oe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
22
+ `,na=Ne((function(e,t){const d=ue(e),n=K.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:De}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(_({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(_({searchText:i}))}}}}))(Ge);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=We(),n=ee(),f=qe(),{areTenantIdsInSync:i}=Be(),b=K.getSignedInUser(),C=g((s=>X(s))),{useFeatureGate:m}=Q(),{isFeatureEnabled:R}=m(H.isDebitCardFeatureEnabled),Z=g((s=>G(s))),k=!Y(R,C)&&Z,S=J(C),w=C?.tenantId,{tenantEmailDomain:r}=C,[p,E]=c.useState(!1),[x,I]=c.useState(!1),[P,T]=c.useState(!1),[v,U]=c.useState("off"),[B,D]=c.useState(!1),h=s=>{D(s)},{isAiCfoAccessEnabled:V,onAskAiCfoClick:$}=Xe({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ve(s.classState,s.classListState))),L=g((s=>Ae(s.userState,s.userRoleState,s.userListViewState,"manager"))),A=g((s=>Fe(s))),y=C?.companyId;c.useEffect((()=>{p&&v===u.uiState.mode||!i||(n(_({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(me()))}),[p,b,w,n,u.uiState.mode,i]),c.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(_({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),T(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:De,onLoad:s=>s.trackPageLoaded(_e.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Qe,{closeDrawerHandler:F,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ye,{isAppContentDrawerOpen:B,handleDrawerToggle:h}),a.jsx(na,{navigate:d,signedInUser:b,isZeni:C.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(_({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=He(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{h(!0)},isAiCfoAccessEnabled:V,onAskAiCfoClick:$})]})}function ka(){const e=Ke();return Re(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CW9yScMF.js";import T from"./NotFoundScreen-CS6UgwGr.js";import{a as r}from"./sentry-C_uJQK1a.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as z,n as F,o as h}from"./core-BI5oX4mx.js";import{fF as O,a0R as b,bo as B,bn as N,iL as V,gh as L}from"./zeni-epic-state-CIizsNeB.js";import{E as $,z as I,as as q,dP as G}from"./index-C2L5Bzwa.js";import"./mui-KP5Ep0NX.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-4TGjNsPg.js";import{M as J}from"./MobileAppDrawer-DEm85bH8.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./InboxNotificationsProvider-CMirleoY.js";import"./useTaskManagerAccess-Bhr2JI_X.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]="dfa3d069-28a9-44f3-ba40-d96c86921784",e._sentryDebugIdIdentifier="sentry-dbid-dfa3d069-28a9-44f3-ba40-d96c86921784")}catch{}})();const K=z((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),Q=()=>{const e=_(),t=v(),d=$(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,c=r.useCallback(((a,i,E)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:E}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(L({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[n?.fetchState,c]),R=r.useCallback(((a,i)=>{c(a,i,!1)}),[c]),g=a=>{S(a)},{isAiCfoAccessEnabled:j,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:R,handleDrawerToggle:g,isAiCfoAccessEnabled:j,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function he(){return s.jsxs(F,{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-DKqwsBQp.js";import E from"./NotFoundScreen-r2t5kGnd.js";import{a as r}from"./sentry-CxSdF_rC.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as z,n as F,o as h}from"./core-D6EV-11Y.js";import{fF as O,a0R as b,bo as B,bn as N,iL as V,gh as L}from"./zeni-epic-state-CZbm731W.js";import{c as $,z as I,as as q,dP as G}from"./index-lv0eG9-7.js";import"./mui-qouWiIWk.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-Cgk5vvuH.js";import{M as J}from"./MobileAppDrawer-Dubbrc5R.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";import"./InboxNotificationsProvider-gj6fT2eX.js";import"./useTaskManagerAccess-CncuT8wV.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]="5935802f-4f24-4a49-9d21-9b2d0739b091",e._sentryDebugIdIdentifier="sentry-dbid-5935802f-4f24-4a49-9d21-9b2d0739b091")}catch{}})();const K=z((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),Q=()=>{const e=_(),t=v(),d=$(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,c=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(L({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[n?.fetchState,c]),R=r.useCallback(((a,i)=>{c(a,i,!1)}),[c]),g=a=>{S(a)},{isAiCfoAccessEnabled:j,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:R,handleDrawerToggle:g,isAiCfoAccessEnabled:j,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function he(){return s.jsxs(F,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
@@ -1 +1 @@
1
- import{a as h,R as a}from"./sentry-C_uJQK1a.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-CxSdF_rC.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};