@zeniai/web-app-ui 5.3.56-dev → 5.3.56-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-BJKuQUQK.js → AccountMappingScreen-lCCsdddb.js} +1 -1
- package/dist/assets/{ActualMatchingMatchDetailScreen-CkH9aaHO.js → ActualMatchingMatchDetailScreen-BacEJjWx.js} +1 -1
- package/dist/assets/{AddressRoutes-CHBmN4QX.js → AddressRoutes-B6tEU932.js} +1 -1
- package/dist/assets/{AddressScreen-DVcm6rtP.js → AddressScreen-MugNTUQN.js} +1 -1
- package/dist/assets/{AiCfoScreen-DLhxVK3m.js → AiCfoScreen-eLMR3UOf.js} +1 -1
- package/dist/assets/{AppDrawer-DFw9ygHT.js → AppDrawer-clWlGOjP.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CrSvpjTF.js → BillPayApprovalRoutes-Dbk7Y24s.js} +1 -1
- package/dist/assets/{BillPayRoutes-D25IkCRG.js → BillPayRoutes-BtdQLqKt.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-C3i585S_.js → BusinessVerificationPageScreen-TQO8LD4K.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-CGVXrGo3.js → CardsAiCfoScreen-Ck1QRRJU.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-Be1yd7vs.js → ChargeCardRoutes-GyAZvGbK.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-BbxvKQ4h.js → CompanyPassportScreen-2jMavKQz.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DW_RpnUG.js → ConnectionAuthScreen-AXukMUj1.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-B9oqAEpw.js → CustomerOnboardingAuthScreen-_LDVNTpd.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-DZPhXsuR.js → CustomerOnboardingRoutes-C1OFU7eR.js} +1 -1
- package/dist/assets/{DashboardRoutes-BNQ_G2Ja.js → DashboardRoutes-sID4RBmv.js} +1 -1
- package/dist/assets/{DefaultTenantHome-CQb3BNY_.js → DefaultTenantHome-DdLGZGI-.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-B1WqjoYC.js → DomesticWireDetailScreen-BHVEhcDi.js} +1 -1
- package/dist/assets/{DrawerScreen-BjVCvYOx.js → DrawerScreen-CafG26MO.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-DPPxLcP3.js → EntityDetailRoutes-B8kK6g4X.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-Beqj_B98.js → ExpenseAutomationRoutes-CtGpjaz6.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-DrZBk8z9.js → FeaturePreviewScreen-Cxg43n9j.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-uMS-Wn41.js → HubSpotOAuthCallbackScreen-wG7V8GGr.js} +1 -1
- package/dist/assets/{InvoicingRoutes-B7hVOPnd.js → InvoicingRoutes-DFN0Rx6F.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-0XNlBf8h.js → MagicLinkRoutes-Mtj_tMLd.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CmEuq8yZ.js → MagicLinkSignInScreen-CpCtrH1A.js} +1 -1
- package/dist/assets/{MobileAppDrawer-C4BbqfYY.js → MobileAppDrawer-CM7t-ZvL.js} +1 -1
- package/dist/assets/{NotFoundScreen-BudPMncf.js → NotFoundScreen-D6I6Wsee.js} +1 -1
- package/dist/assets/{NotificationRoutes-ui3la9Pl.js → NotificationRoutes-DVU6vblh.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BxSGmmYb.js → OAuthConsentScreen-BoSOwZdg.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CQxitPGl.js → PandLWithForecastRoutes-BBlFCOcU.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-DZFH9-Dr.js → PaymentLinkScreen-CWqNCKyv.js} +1 -1
- package/dist/assets/{PeopleRoutes-CTbqr9KR.js → PeopleRoutes-CBQUaiY2.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DqqsTiLL.js → PerformanceRoutes-Bj5_Gk3V.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-83wGiY1-.js → QBOConnectionScreen-CSqa-l0H.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CefdRKJA.js → ReimbursementApprovalRoutes-D0jGkzqM.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DVIQ0iGz.js → ReimbursementApprovalRuleDetailScreen-CCOn4kZU.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-CYSobdK2.js → ReimbursementRoutes-BrXDZflp.js} +1 -1
- package/dist/assets/{ReportsRoutes-C0_U8cPe.js → ReportsRoutes-9hHKJQNP.js} +1 -1
- package/dist/assets/{RewardsRoutes-Cuv6zmgH.js → RewardsRoutes-BdVi-__F.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-BQ_Jeykv.js → ScheduleDetailsPrepaidExpensesScreen-CmKsiN11.js} +1 -1
- package/dist/assets/{ScreenRoutes-CWs8sPE7.js → ScreenRoutes-BfFuT3Am.js} +2 -2
- package/dist/assets/{SettingsRoutes-tupY8NX6.js → SettingsRoutes-BRXtJ_i3.js} +1 -1
- package/dist/assets/{SetupPagesScreen-IP9GnMvD.js → SetupPagesScreen-CF8rN7nl.js} +1 -1
- package/dist/assets/{SignInScreen-C_QB0DLT.js → SignInScreen-DrQomfpD.js} +1 -1
- package/dist/assets/{SignOutScreen-Dlg2jHAz.js → SignOutScreen-DD07J9n2.js} +1 -1
- package/dist/assets/{TaskListScreen-BLrDzaze.js → TaskListScreen-CETWRLY0.js} +1 -1
- package/dist/assets/{TaskRoutes-D1AnOebo.js → TaskRoutes-Cqhy8GTh.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-aJqQLpSX.js → TransactionDetailRoutes-DXMnE9Ej.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DVTW16A1.js → TransactionDetailScreen-D-_ejGlb.js} +1 -1
- package/dist/assets/{TransactionListRoutes-7PO54jHW.js → TransactionListRoutes-C61f2Hs7.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BLoMlu93.js → TreasuryRoutes-Epfy4sq_.js} +1 -1
- package/dist/assets/{VendorsRoutes-u3UbdNbB.js → VendorsRoutes-D0D2AK1y.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-BwqpmX8S.js → WiseConfirmationScreen-BBcs-b0M.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-CDbRnTrg.js → ZeniAccountRoutes-xPKKMrma.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-lhzrOeGm.js → ZeniAccountStatementScreen-BYeqmNu8.js} +1 -1
- package/dist/assets/{analyticsHelper-DvdruwkE.js → analyticsHelper-okAQXWGL.js} +1 -1
- package/dist/assets/{getLocaleForTenant-omtGYMrM.js → getLocaleForTenant-DbdT0Ypo.js} +1 -1
- package/dist/assets/{index-BdE3bEFg.js → index-BA9wY0HE.js} +5 -5
- package/dist/assets/{routePaths-znAFGC3M.js → routePaths-CQGkjOU4.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-BATx-hw7.js → useActualMatchingMatchDetail-CjMeDmY7.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-RBwji9iv.js → useAiCfoDashboardSuggestedQuestionsChips-Bcnkzeqc.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-yiVAQfVL.js → useAskAiCfoHostNavButtonProps-DCXPTpvr.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-D6w93u1p.js → useChargeCardPusherEvents-CojGt5Ev.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-BuXXdg7d.js → useEmailConnectResultRefresh-BMz8xUDh.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CRJTlzEQ.js → useInitialThreadRequest-DX25oqkA.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-CtzHb9vx.js → useTaskManagerAccess-DTWsCdjC.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-BsdLgh09.js → useTaskManagerPusherEvents-CkYHu9co.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BrwXnQ2x.js → withTransactionSidePanel-Bkj9vjb3.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CVtnm86a.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-CVtnm86a.js";import E from"./NotFoundScreen-D6I6Wsee.js";import{a as r}from"./sentry-BzkfMVrG.js";import{h as _,g as U,j as p,i as v,u as M,N as O,l as P,n as z,o as h}from"./core-BtMsWhj9.js";import{fF as F,a10 as b,bo as B,bn as N,iL as V,gh as L}from"./zeni-epic-state-xhG_euwn.js";import{U as $,z as I,at as q,dO as G}from"./index-BA9wY0HE.js";import"./mui-DdZ2UeI1.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-DCXPTpvr.js";import{M as J}from"./MobileAppDrawer-CM7t-ZvL.js";import"./recharts-DhwkC6iY.js";import"./analytics-B3pE_Rhv.js";import"./plaid-nsaMWH8B.js";import"./dnd-NbF88ub7.js";import"./stripe-cKAAJElX.js";import"./lottie-DX_KUXtr.js";import"./lexical-OFbGuPVJ.js";import"./pdf-Ck6JVYdq.js";import"./utils-BrzWPNCR.js";import"./InboxNotificationsProvider-0KkUrcUF.js";import"./useTaskManagerAccess-DTWsCdjC.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]="ed94e94a-5199-4f79-8af9-c0e9e3ff7fab",e._sentryDebugIdIdentifier="sentry-dbid-ed94e94a-5199-4f79-8af9-c0e9e3ff7fab")}catch{}})();const K=P((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{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=U(),c=$(),o=p((a=>F(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:m}=v(),u=M(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u(L({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=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:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${m}/dashboard`,replace:!0})};function he(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as _l}from"./liveblocks-CVtnm86a.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-BzkfMVrG.js";import{L as ge,b$ as xc,fF as kc,TX as Tc,UN as jl,c8 as xl}from"./zeni-epic-state-xhG_euwn.js";import{a as pe,b as kl,c as Tl,d as Al,e as un,f as Rl,g as Pl,h as Il,i as Ve,j as Ac,k as ot,l as xt,m as Ll,o as ct,p as Nl}from"./utils-BrzWPNCR.js";import{r as cn}from"./empty-Cx0IX9BK.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-BXXBaukU.js";import{a as Ye,r as Fl}from"./index-D4z6ymU4.js";import{r as Ul}from"./index-CgkBXLPm.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-BtMsWhj9.js";import{u as Zl,z as Rc,L as Hl,al as Vl,am as Yl,Z as Wl,B as Kl}from"./index-
|
|
1
|
+
import{j as _l}from"./liveblocks-CVtnm86a.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-BzkfMVrG.js";import{L as ge,b$ as xc,fF as kc,TX as Tc,UN as jl,c8 as xl}from"./zeni-epic-state-xhG_euwn.js";import{a as pe,b as kl,c as Tl,d as Al,e as un,f as Rl,g as Pl,h as Il,i as Ve,j as Ac,k as ot,l as xt,m as Ll,o as ct,p as Nl}from"./utils-BrzWPNCR.js";import{r as cn}from"./empty-Cx0IX9BK.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-BXXBaukU.js";import{a as Ye,r as Fl}from"./index-D4z6ymU4.js";import{r as Ul}from"./index-CgkBXLPm.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-BtMsWhj9.js";import{u as Zl,z as Rc,L as Hl,al as Vl,am as Yl,Z as Wl,B as Kl}from"./index-BA9wY0HE.js";import"./mui-DdZ2UeI1.js";import{d as It}from"./decodeURIComponentSafe-roe2OgG2.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]="17959d37-eca0-41c1-a1d5-ff292b13b05a",e._sentryDebugIdIdentifier="sentry-dbid-17959d37-eca0-41c1-a1d5-ff292b13b05a")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
|
|
2
2
|
`),I=S(E).split(`
|
|
3
3
|
`),k=0,C="";if(O==="strictEqual"&&l(j)==="object"&&l(E)==="object"&&j!==null&&E!==null&&(O="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var H=R[0].length+I[0].length;if(H<=10){if(!(l(j)==="object"&&j!==null||l(E)==="object"&&E!==null||j===0&&E===0))return"".concat(_[O],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-CVtnm86a.js";import Z from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-CVtnm86a.js";import Z from"./NotFoundScreen-D6I6Wsee.js";import{a as p}from"./sentry-BzkfMVrG.js";import{h as C,g as N,u as D,j as u,N as V,l as k,n as K,o as g}from"./core-BtMsWhj9.js";import{fF as E,Z6 as h,Zn as w,NI as U,NE as B,NH as f,Nx as L,ZM as $,NB as z,NK as F}from"./zeni-epic-state-xhG_euwn.js";import{z as T,w as O,cb as H,n as W,bU as M,cc as q}from"./index-BA9wY0HE.js";import"./mui-DdZ2UeI1.js";import{u as G,R as x}from"./ReimbursementApprovalRuleDetailScreen-CCOn4kZU.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]="0686295f-b10b-4fdb-a8c5-f42589d54321",e._sentryDebugIdIdentifier="sentry-dbid-0686295f-b10b-4fdb-a8c5-f42589d54321")}catch{}})();const j="reimbursement-approval-rule-update",J=k((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($(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(O(H)),P=({isLoading:e})=>{const s=C(),n=N(),a=D(),[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))),b=u((o=>w(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!1)))}),[t,S,e,a]),T.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(V,{to:"../../promo"}):r.jsx(J,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",Q=k((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($(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(F(t,!0))}}}))(O(q)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=M(e?.tenantId);return s?r.jsx(Y,{isLoading:n}):r.jsx(P,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=N(),a=D(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));G();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(B(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(R(!0),a(z(!1,!0)))}),[v,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,_)=>{i.endsWith(A)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(V,{to:"../../promo"}):r.jsx(Q,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return r.jsxs(K,{children:[r.jsx(g,{path:"/",element:r.jsx(X,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(Z,{})})]})}export{le as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-CVtnm86a.js";import{a as f}from"./sentry-BzkfMVrG.js";import{u as U,j as g,h as _,g as O,i as V,l as N}from"./core-BtMsWhj9.js";import{mr as Z,Zn as w,Z6 as x,NA as k,NN as B,NI as A,NJ as E,Zo as j,fF as z,NH as H}from"./zeni-epic-state-xhG_euwn.js";import{z as F,E as P,a8 as $,c2 as J,n as q,bU as K,c3 as W}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-CVtnm86a.js";import{a as f}from"./sentry-BzkfMVrG.js";import{u as U,j as g,h as _,g as O,i as V,l as N}from"./core-BtMsWhj9.js";import{mr as Z,Zn as w,Z6 as x,NA as k,NN as B,NI as A,NJ as E,Zo as j,fF as z,NH as H}from"./zeni-epic-state-xhG_euwn.js";import{z as F,E as P,a8 as $,c2 as J,n as q,bU as K,c3 as W}from"./index-BA9wY0HE.js";import"./mui-DdZ2UeI1.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]="44f5d341-0ca1-4058-8f9b-97f8b185d01d",e._sentryDebugIdIdentifier="sentry-dbid-44f5d341-0ca1-4058-8f9b-97f8b185d01d")}catch{}})();function G(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(Z({})))}),[p,t,e])}const M=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return s.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=v=>{const S=[];return v.forEach((d=>{const R=d.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=d.actors.selectedNonUsers.map((m=>{const y=(I=m.value,j(I)==null);var I;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=R.concat(b);S.push({action:d.stepType.selectedOption,actors:c,operator:c.length>1?d.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(J);function Q(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=P(),r=g((n=>w(n))),l=g((n=>x(n))),[a,u]=f.useState(!1);if(f.useEffect((()=>{a||(u(!0),s(k(!0)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function pe(e){return j(e)==null}const X=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:i,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:x(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=c=>{const m=[];return c.forEach((y=>{const I=y.actorKind?.selectedOption,L=y.selectedRole?.selectedNonUsers??[];let D=[];I==="role"?D=L.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):I==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const C=y.action??"require_approval";m.push({action:C,actors:D,operator:D.length>1?C==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,d={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;d.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(d.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const b=S?.selection.selectedOptions??[];if(b.length>0&&(d.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(H(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(W);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(Q,{})}function Y(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=P(),r=g((n=>w(n))),l=g((n=>x(n))),[a,u]=f.useState(!1);if(G(),f.useEffect((()=>{a||(u(!0),s(k(!1)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,pe as i,G as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CVtnm86a.js";import{u as ae,j as v,h as Q,g as X,i as ie,N as _,l as ee,q as ct,n as dt,o as w}from"./core-BtMsWhj9.js";import{fF as V,NE as ut,_R as ge,c8 as he,MK as $e,ma as pt,MZ as ce,MY as de,_S as bt,bn as fe,gV as Le,_T as gt,WR as ht,l$ as Me,WS as Ce,WT as ft,kN as St,YU as It,l0 as yt,My as Rt,Cd as vt,kU as At,Nj as _e,_U as Pe,_V as Ee,_W as kt,_X as Ct,_Y as Et,N3 as we,l6 as wt,Z1 as xt,MX as Bt,MI as Tt,_Z as Dt,MH as jt,__ as Ft,MP as xe,N7 as Ut,N6 as $t,N2 as Lt,_$ as Ne,Sh as Mt,bo as _t,MS as Pt,NB as Nt,$0 as Ot,$1 as Zt,Nf as zt,Nc as Be,Yo as Gt,MF as Vt,$2 as Oe,O2 as Te,Oa as Wt,$3 as Ht,$4 as q,$5 as Yt,$6 as Ze,$7 as qt,$8 as ze,$9 as Ge,Nr as ue,bu as Kt,bK as Se,cM as Ie,d_ as Ve,dZ as We,$a as Xt,gh as Jt,YB as Qt,$b as en,$c as He,YF as tn,Zn as nn,$d as an,ZM as sn,O7 as De,O6 as on,$e as rn,$f as ln,$g as mn,$h as cn,$i as dn,Z7 as un,NZ as pn,O1 as bn,bq as gn,bJ as hn,cG as fn,cu as Sn,bt as In,Ug as yn,da as Rn,dd as vn,dc as An,cF as kn}from"./zeni-epic-state-xhG_euwn.js";import{bU as Cn,U as Ye,a2 as qe,c as oe,v as x,z as L,cT as Ke,a9 as re,j as C,aT as je,H as F,af as se,ag as En,G as Xe,cU as wn,p as K,at as Je,cV as xn,Q as le,cW as Bn,ar as Tn,ac as Dn,a8 as ye,T as Qe,w as jn,bC as Fn,aw as Un,aj as $n,E as et,cX as Ln,g as Mn}from"./index-BdE3bEFg.js";import{n as P,S as _n}from"./mui-DdZ2UeI1.js";import pe from"./NotFoundScreen-BudPMncf.js";import{S as Fe}from"./SetupPagesScreen-IP9GnMvD.js";import{F as tt}from"./FeaturePreviewScreen-DrZBk8z9.js";import{a as h}from"./sentry-BzkfMVrG.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-yiVAQfVL.js";import{u as nt}from"./useInitialThreadRequest-CRJTlzEQ.js";import{D as Pn}from"./DrawerScreen-BjVCvYOx.js";import{M as at}from"./MobileAppDrawer-C4BbqfYY.js";import{F as Nn}from"./ScreenRoutes-CWs8sPE7.js";import{R as On}from"./ReimbursementApprovalRoutes-CefdRKJA.js";import"./recharts-DhwkC6iY.js";import"./analytics-B3pE_Rhv.js";import"./plaid-nsaMWH8B.js";import"./dnd-NbF88ub7.js";import"./stripe-cKAAJElX.js";import"./lottie-DX_KUXtr.js";import"./lexical-OFbGuPVJ.js";import"./pdf-Ck6JVYdq.js";import"./utils-BrzWPNCR.js";import"./BusinessVerificationPageScreen-C3i585S_.js";import"./routePaths-znAFGC3M.js";import"./analyticsHelper-DvdruwkE.js";import"./InboxNotificationsProvider-0KkUrcUF.js";import"./useTaskManagerAccess-CtzHb9vx.js";import"./getLocaleForTenant-omtGYMrM.js";import"./ReimbursementApprovalRuleDetailScreen-DVIQ0iGz.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]="aadd0ae6-9991-4343-b078-e41c1e11e887",e._sentryDebugIdIdentifier="sentry-dbid-aadd0ae6-9991-4343-b078-e41c1e11e887")}catch{}})();const st=e=>`/${e}/reimbursements`,Zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:Y,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Xe.getLocalizedStrings(),zn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=L.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=Le(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=L.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Lt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(xe(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ee({}));const i=st(o),l=K(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(_e(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Ue(){const e=Q(),t=ae(),n=X(),{reimbursementId:r}=ie(),c=Ye(),d=qe(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=X().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=L.getSignedInUser(),I=v((p=>V(p))),g=v((p=>ge(p,r))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),$=he(I?.userRole??[]);(function(){const p=ae(),N=v((J=>V(J))),O=N?.tenantId,{isApprovalRulesV3Enabled:Z,isLoading:W}=Cn(O),H=v((J=>J.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||W||H==="Not-Started"&&p(ut(!0,!1,!1,Z))}),[O,W,Z,H,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t($e(!1,b,y,r)))}));const M=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||$&&g.billStatus==="rejected"||$===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ke,{isNewReimbursement:r==null}):s.jsxs(Gn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:Y.upload,single:ne.dropReceipt.single,or:Y.texts.or,multiple:ne.dropReceipt.multiple,receipts:Y.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Hn,{children:[s.jsx(Yn,{onClick:()=>o(!1),children:s.jsx(Zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:Y.upload,single:ne.dropReceipt.single,or:Y.texts.or,multiple:ne.dropReceipt.multiple,receipts:Y.texts.receipts2}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(zn,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Gn=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-CVtnm86a.js";import{u as ae,j as v,h as Q,g as X,i as ie,N as _,l as ee,q as ct,n as dt,o as w}from"./core-BtMsWhj9.js";import{fF as V,NE as ut,_R as ge,c8 as he,MK as $e,ma as pt,MZ as ce,MY as de,_S as bt,bn as fe,gV as Le,_T as gt,WR as ht,l$ as Me,WS as Ce,WT as ft,kN as St,YU as It,l0 as yt,My as Rt,Cd as vt,kU as At,Nj as _e,_U as Pe,_V as Ee,_W as kt,_X as Ct,_Y as Et,N3 as we,l6 as wt,Z1 as xt,MX as Bt,MI as Tt,_Z as Dt,MH as jt,__ as Ft,MP as xe,N7 as Ut,N6 as $t,N2 as Lt,_$ as Ne,Sh as Mt,bo as _t,MS as Pt,NB as Nt,$0 as Ot,$1 as Zt,Nf as zt,Nc as Be,Yo as Gt,MF as Vt,$2 as Oe,O2 as Te,Oa as Wt,$3 as Ht,$4 as q,$5 as Yt,$6 as Ze,$7 as qt,$8 as ze,$9 as Ge,Nr as ue,bu as Kt,bK as Se,cM as Ie,d_ as Ve,dZ as We,$a as Xt,gh as Jt,YB as Qt,$b as en,$c as He,YF as tn,Zn as nn,$d as an,ZM as sn,O7 as De,O6 as on,$e as rn,$f as ln,$g as mn,$h as cn,$i as dn,Z7 as un,NZ as pn,O1 as bn,bq as gn,bJ as hn,cG as fn,cu as Sn,bt as In,Ug as yn,da as Rn,dd as vn,dc as An,cF as kn}from"./zeni-epic-state-xhG_euwn.js";import{bU as Cn,U as Ye,a2 as qe,c as oe,v as x,z as L,cT as Ke,a9 as re,j as C,aT as je,H as F,af as se,ag as En,G as Xe,cU as wn,p as K,at as Je,cV as xn,Q as le,cW as Bn,ar as Tn,ac as Dn,a8 as ye,T as Qe,w as jn,bC as Fn,aw as Un,aj as $n,E as et,cX as Ln,g as Mn}from"./index-BA9wY0HE.js";import{n as P,S as _n}from"./mui-DdZ2UeI1.js";import pe from"./NotFoundScreen-D6I6Wsee.js";import{S as Fe}from"./SetupPagesScreen-CF8rN7nl.js";import{F as tt}from"./FeaturePreviewScreen-Cxg43n9j.js";import{a as h}from"./sentry-BzkfMVrG.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-DCXPTpvr.js";import{u as nt}from"./useInitialThreadRequest-DX25oqkA.js";import{D as Pn}from"./DrawerScreen-CafG26MO.js";import{M as at}from"./MobileAppDrawer-CM7t-ZvL.js";import{F as Nn}from"./ScreenRoutes-BfFuT3Am.js";import{R as On}from"./ReimbursementApprovalRoutes-D0jGkzqM.js";import"./recharts-DhwkC6iY.js";import"./analytics-B3pE_Rhv.js";import"./plaid-nsaMWH8B.js";import"./dnd-NbF88ub7.js";import"./stripe-cKAAJElX.js";import"./lottie-DX_KUXtr.js";import"./lexical-OFbGuPVJ.js";import"./pdf-Ck6JVYdq.js";import"./utils-BrzWPNCR.js";import"./BusinessVerificationPageScreen-TQO8LD4K.js";import"./routePaths-CQGkjOU4.js";import"./analyticsHelper-okAQXWGL.js";import"./InboxNotificationsProvider-0KkUrcUF.js";import"./useTaskManagerAccess-DTWsCdjC.js";import"./getLocaleForTenant-DbdT0Ypo.js";import"./ReimbursementApprovalRuleDetailScreen-CCOn4kZU.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]="aadd0ae6-9991-4343-b078-e41c1e11e887",e._sentryDebugIdIdentifier="sentry-dbid-aadd0ae6-9991-4343-b078-e41c1e11e887")}catch{}})();const st=e=>`/${e}/reimbursements`,Zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:Y,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Xe.getLocalizedStrings(),zn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=L.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=Le(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=L.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Lt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(xe(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ee({}));const i=st(o),l=K(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(_e(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Ue(){const e=Q(),t=ae(),n=X(),{reimbursementId:r}=ie(),c=Ye(),d=qe(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=X().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=L.getSignedInUser(),I=v((p=>V(p))),g=v((p=>ge(p,r))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),$=he(I?.userRole??[]);(function(){const p=ae(),N=v((J=>V(J))),O=N?.tenantId,{isApprovalRulesV3Enabled:Z,isLoading:W}=Cn(O),H=v((J=>J.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||W||H==="Not-Started"&&p(ut(!0,!1,!1,Z))}),[O,W,Z,H,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t($e(!1,b,y,r)))}));const M=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||$&&g.billStatus==="rejected"||$===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ke,{isNewReimbursement:r==null}):s.jsxs(Gn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:Y.upload,single:ne.dropReceipt.single,or:Y.texts.or,multiple:ne.dropReceipt.multiple,receipts:Y.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Hn,{children:[s.jsx(Yn,{onClick:()=>o(!1),children:s.jsx(Zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:Y.upload,single:ne.dropReceipt.single,or:Y.texts.or,multiple:ne.dropReceipt.multiple,receipts:Y.texts.receipts2}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(zn,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Gn=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-CVtnm86a.js";import{g as J,h as Oe,u as Ve,i as De,j as d,l as Ae,n as Pe,o as ee}from"./core-BtMsWhj9.js";import{fF as q,E9 as R,UO as Ee,l$ as le,ua as ce,u$ as D,lG as Ue,lP as A,lH as P,kK as E,kB as U,kA as Le,Dj as ie,v4 as Me,bq as Be,UP as ve,bn as xe,Ew as ze,UQ as Ge,UR as He,ci as S,Dc as Ye,US as ae,UT as $e,UU as Ne,UV as qe,UW as Ze,UX as Qe,UY as Ke,UZ as We,U_ as Xe,U$ as Je,V0 as ea,V1 as aa,V2 as sa,V3 as j,V4 as L,V5 as M,V6 as B,V7 as v,V8 as x,V9 as z,Va as G,Vb as H,Vc as Y,ei as ta,Ea as oa,DZ as se,D_ as te,Eg as na,E2 as oe,Em as ra,Vd as la,Ve as ca,Vf as ia,Vg as da,Vh as pa,Vi as _a,Vj as fa,Vk as ma,Vl as ua,Vm as ba,d_ as ha,dZ as ya}from"./zeni-epic-state-xhG_euwn.js";import{ao as wa,ap as Ca,aq as ga,a as Sa,a2 as Ia,c as de,v as $,z as pe,ar as Ra,Q as Ta,e as ja,as as ka,at as Fa,a9 as Oa,j as N,T as Va,s as Da,p as _e,au as Aa,av as Pa,aw as Ea}from"./index-BdE3bEFg.js";import"./mui-DdZ2UeI1.js";import Ua from"./NotFoundScreen-BudPMncf.js";import{F as La}from"./FeaturePreviewScreen-DrZBk8z9.js";import{a as u}from"./sentry-BzkfMVrG.js";import{u as Ma}from"./useInitialThreadRequest-CRJTlzEQ.js";import{t as ne,a as re,b as Ba}from"./routePaths-znAFGC3M.js";import{M as va}from"./MobileAppDrawer-C4BbqfYY.js";import"./recharts-DhwkC6iY.js";import"./analytics-B3pE_Rhv.js";import"./plaid-nsaMWH8B.js";import"./dnd-NbF88ub7.js";import"./stripe-cKAAJElX.js";import"./lottie-DX_KUXtr.js";import"./lexical-OFbGuPVJ.js";import"./pdf-Ck6JVYdq.js";import"./utils-BrzWPNCR.js";import"./InboxNotificationsProvider-0KkUrcUF.js";import"./useTaskManagerAccess-CtzHb9vx.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]="fa2d9a73-ad26-4977-a35d-6313cbc1838a",e._sentryDebugIdIdentifier="sentry-dbid-fa2d9a73-ad26-4977-a35d-6313cbc1838a")}catch{}})();const xa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(Y({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(L({resetLeftScroll:!0})),e(B({resetLeftScroll:!0})),e(M({resetLeftScroll:!0}))},za=e=>{e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua()),e(ba())},Ga=Ae((function(e){const o=pe.getSignedInUser(),_=e.tenantState.currentTenantId,m=q(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:xe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:le(e),isAccountingProjectsEnabled:ce(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(la(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ra(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(se(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(te(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(I(a)||S(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(oe({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ae({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(oe(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(na(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(se(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(te(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(oa({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=ta(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return re(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ba(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?re(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=_e(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:k(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(v({scrollPosition:s}));break;case"cash_flow_by_classes":e(B({scrollPosition:s}));break;case"cash_flow_by_projects":e(M({scrollPosition:s}));break;case"cash_flow":e(L({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(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(L({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=S(t);l?(e(We({viewMode:a})),e(Xe({viewMode:a}))):r?(e(Je({viewMode:a})),e(ea({viewMode:a}))):(e(aa({viewMode:a})),e(sa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",k(t)),e(j(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",k(t)),e(j(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",k(t)),e(j(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e(Ze({classesToFilterOut:a})):I(o.selectedReportID)?e(Qe({classesToFilterOut:a})):e(Ke({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{S(o.selectedReportID)?e($e({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=S(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?U():Ye()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(He(a))},onUpdateReportFormat:a=>{za(e),e(Ge(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"?ze(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):U(!0))}}}))(Aa);function Ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=Ia(),m=Pa(_),a=Oe(),s=Ve(),t=J(),{tenantEmailDomain:r}=De(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l($.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,w]=u.useState(!1),[Z,fe]=u.useState(!1),{isFeatureEnabled:Q}=l($.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const F=d((n=>q(n))),me=F.masterTOSInfo?.isMasterTOSAccepted??!1,ue=F.company?.companyInfo.firstMonthOfFY??1,be=Ma(Q?F?.companyId:void 0),C=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:b}=Ra(),O=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),g=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),V=d((n=>R(n).selectedReportAndTimeframeFetchState)),we=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(w(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!Z&&C==="Completed"&&b&&(s(D(i.userId,!1,!0,!1)),fe(!0))}),[c,Z,C,b]),u.useEffect((()=>{if(c&&V.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(O){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":g&&s(ie());break;case"balance_sheet":s(Le(h.timeframe));break;case"balance_sheet_by_classes":T&&s(U());break;case"balance_sheet_by_projects":g&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(A());break;case"cash_flow":s(Ue(h.timeframe))}}),[c,O,V,b,T,g]);const K=Ta(),Ce=K?.loggedInUserRole!=null&&Be(K?.loggedInUserRole)!==!0,[ge,Se]=u.useState(!1),W=n=>{Se(n)},Ie=ja(),Re=ka();return(function(n){const{isDataReady:Te}=n,{pathname:je}=J(),X=wa(je??"")==="reports",ke=Ca(Te),Fe=u.useMemo((()=>X?xa:void 0),[X]);ga({canFetchSuggestedQuestions:ke,pageContexts:Fe})})({isDataReady:C==="Completed"}),Fa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(Oa,{analytics:N,onLoad:n=>n.trackPageLoaded(Va.Event.reports)}):null,p.jsx(va,{isAppContentDrawerOpen:ge,handleDrawerToggle:W}),p.jsx(Ga,{firstMonthOfFY:ue,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:we,selectedReportID:O,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ye,hasTransactionAccess:Ce,signedInUser:i,selectedReportAndTimeframeFetchState:V,handleDrawerToggle:W,reportsResyncFetchState:he.reportsResyncFetchState,isAiCfoAccessEnabled:Re&&Ie&&!e,onAskAiCfoClick:()=>{if(me)if(m){const n=_e(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Da({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:Q,initialOpenThreadRequest:be})]})}const k=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function _s(){const e=d((s=>q(s))),{useFeatureGate:o}=de(),{isFeatureEnabled:_}=o($.isDebitCardFeatureEnabled),m=ha(_,e),a=ya(e);return m===!0||a===!0?p.jsx(La,{}):p.jsxs(Pe,{children:[p.jsx(ee,{path:"/",element:p.jsx(Ha,{})}),p.jsx(ee,{path:"*",element:p.jsx(Ua,{})})]})}export{_s as default};
|
|
1
|
+
import{j as p}from"./liveblocks-CVtnm86a.js";import{g as J,h as Oe,u as Ve,i as De,j as d,l as Ae,n as Pe,o as ee}from"./core-BtMsWhj9.js";import{fF as q,E9 as R,UO as Ee,l$ as le,ua as ce,u$ as D,lG as Ue,lP as A,lH as P,kK as E,kB as U,kA as Le,Dj as ie,v4 as Me,bq as Be,UP as ve,bn as xe,Ew as ze,UQ as Ge,UR as He,ci as S,Dc as Ye,US as ae,UT as $e,UU as Ne,UV as qe,UW as Ze,UX as Qe,UY as Ke,UZ as We,U_ as Xe,U$ as Je,V0 as ea,V1 as aa,V2 as sa,V3 as j,V4 as L,V5 as M,V6 as B,V7 as v,V8 as x,V9 as z,Va as G,Vb as H,Vc as Y,ei as ta,Ea as oa,DZ as se,D_ as te,Eg as na,E2 as oe,Em as ra,Vd as la,Ve as ca,Vf as ia,Vg as da,Vh as pa,Vi as _a,Vj as fa,Vk as ma,Vl as ua,Vm as ba,d_ as ha,dZ as ya}from"./zeni-epic-state-xhG_euwn.js";import{ao as wa,ap as Ca,aq as ga,a as Sa,a2 as Ia,c as de,v as $,z as pe,ar as Ra,Q as Ta,e as ja,as as ka,at as Fa,a9 as Oa,j as N,T as Va,s as Da,p as _e,au as Aa,av as Pa,aw as Ea}from"./index-BA9wY0HE.js";import"./mui-DdZ2UeI1.js";import Ua from"./NotFoundScreen-D6I6Wsee.js";import{F as La}from"./FeaturePreviewScreen-Cxg43n9j.js";import{a as u}from"./sentry-BzkfMVrG.js";import{u as Ma}from"./useInitialThreadRequest-DX25oqkA.js";import{t as ne,a as re,b as Ba}from"./routePaths-CQGkjOU4.js";import{M as va}from"./MobileAppDrawer-CM7t-ZvL.js";import"./recharts-DhwkC6iY.js";import"./analytics-B3pE_Rhv.js";import"./plaid-nsaMWH8B.js";import"./dnd-NbF88ub7.js";import"./stripe-cKAAJElX.js";import"./lottie-DX_KUXtr.js";import"./lexical-OFbGuPVJ.js";import"./pdf-Ck6JVYdq.js";import"./utils-BrzWPNCR.js";import"./InboxNotificationsProvider-0KkUrcUF.js";import"./useTaskManagerAccess-DTWsCdjC.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]="fa2d9a73-ad26-4977-a35d-6313cbc1838a",e._sentryDebugIdIdentifier="sentry-dbid-fa2d9a73-ad26-4977-a35d-6313cbc1838a")}catch{}})();const xa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(Y({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(L({resetLeftScroll:!0})),e(B({resetLeftScroll:!0})),e(M({resetLeftScroll:!0}))},za=e=>{e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua()),e(ba())},Ga=Ae((function(e){const o=pe.getSignedInUser(),_=e.tenantState.currentTenantId,m=q(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:xe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:le(e),isAccountingProjectsEnabled:ce(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(la(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ra(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(se(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(te(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(I(a)||S(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(oe({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ae({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(oe(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(na(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(se(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(te(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(oa({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=ta(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return re(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ba(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?re(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=_e(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:k(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(v({scrollPosition:s}));break;case"cash_flow_by_classes":e(B({scrollPosition:s}));break;case"cash_flow_by_projects":e(M({scrollPosition:s}));break;case"cash_flow":e(L({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(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(L({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=S(t);l?(e(We({viewMode:a})),e(Xe({viewMode:a}))):r?(e(Je({viewMode:a})),e(ea({viewMode:a}))):(e(aa({viewMode:a})),e(sa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",k(t)),e(j(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",k(t)),e(j(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",k(t)),e(j(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e(Ze({classesToFilterOut:a})):I(o.selectedReportID)?e(Qe({classesToFilterOut:a})):e(Ke({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{S(o.selectedReportID)?e($e({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=S(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?U():Ye()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(He(a))},onUpdateReportFormat:a=>{za(e),e(Ge(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"?ze(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):U(!0))}}}))(Aa);function Ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=Ia(),m=Pa(_),a=Oe(),s=Ve(),t=J(),{tenantEmailDomain:r}=De(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l($.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,w]=u.useState(!1),[Z,fe]=u.useState(!1),{isFeatureEnabled:Q}=l($.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const F=d((n=>q(n))),me=F.masterTOSInfo?.isMasterTOSAccepted??!1,ue=F.company?.companyInfo.firstMonthOfFY??1,be=Ma(Q?F?.companyId:void 0),C=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:b}=Ra(),O=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),g=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),V=d((n=>R(n).selectedReportAndTimeframeFetchState)),we=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(w(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!Z&&C==="Completed"&&b&&(s(D(i.userId,!1,!0,!1)),fe(!0))}),[c,Z,C,b]),u.useEffect((()=>{if(c&&V.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(O){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":g&&s(ie());break;case"balance_sheet":s(Le(h.timeframe));break;case"balance_sheet_by_classes":T&&s(U());break;case"balance_sheet_by_projects":g&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(A());break;case"cash_flow":s(Ue(h.timeframe))}}),[c,O,V,b,T,g]);const K=Ta(),Ce=K?.loggedInUserRole!=null&&Be(K?.loggedInUserRole)!==!0,[ge,Se]=u.useState(!1),W=n=>{Se(n)},Ie=ja(),Re=ka();return(function(n){const{isDataReady:Te}=n,{pathname:je}=J(),X=wa(je??"")==="reports",ke=Ca(Te),Fe=u.useMemo((()=>X?xa:void 0),[X]);ga({canFetchSuggestedQuestions:ke,pageContexts:Fe})})({isDataReady:C==="Completed"}),Fa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(Oa,{analytics:N,onLoad:n=>n.trackPageLoaded(Va.Event.reports)}):null,p.jsx(va,{isAppContentDrawerOpen:ge,handleDrawerToggle:W}),p.jsx(Ga,{firstMonthOfFY:ue,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:we,selectedReportID:O,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ye,hasTransactionAccess:Ce,signedInUser:i,selectedReportAndTimeframeFetchState:V,handleDrawerToggle:W,reportsResyncFetchState:he.reportsResyncFetchState,isAiCfoAccessEnabled:Re&&Ie&&!e,onAskAiCfoClick:()=>{if(me)if(m){const n=_e(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Da({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:Q,initialOpenThreadRequest:be})]})}const k=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function _s(){const e=d((s=>q(s))),{useFeatureGate:o}=de(),{isFeatureEnabled:_}=o($.isDebitCardFeatureEnabled),m=ha(_,e),a=ya(e);return m===!0||a===!0?p.jsx(La,{}):p.jsxs(Pe,{children:[p.jsx(ee,{path:"/",element:p.jsx(Ha,{})}),p.jsx(ee,{path:"*",element:p.jsx(Ua,{})})]})}export{_s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CVtnm86a.js";import{z as b,a9 as S,j as u,T as D,e3 as E,c as k,v as I}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-CVtnm86a.js";import{z as b,a9 as S,j as u,T as D,e3 as E,c as k,v as I}from"./index-BA9wY0HE.js";import"./mui-DdZ2UeI1.js";import g from"./NotFoundScreen-D6I6Wsee.js";import{a as c}from"./sentry-BzkfMVrG.js";import{u as C,j as h,h as F,g as L,l as T,n as _,o as d,N as y}from"./core-BtMsWhj9.js";import{fF as U,a1Y as j,a1Z as p,DQ as P,p$ as V,a1_ as z,DO as G}from"./zeni-epic-state-xhG_euwn.js";import"./recharts-DhwkC6iY.js";import"./analytics-B3pE_Rhv.js";import"./plaid-nsaMWH8B.js";import"./dnd-NbF88ub7.js";import"./stripe-cKAAJElX.js";import"./lottie-DX_KUXtr.js";import"./lexical-OFbGuPVJ.js";import"./pdf-Ck6JVYdq.js";import"./utils-BrzWPNCR.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]="d41bbb9c-169e-4728-a9a9-05e208fd35ed",e._sentryDebugIdIdentifier="sentry-dbid-d41bbb9c-169e-4728-a9a9-05e208fd35ed")}catch{}})();const O=T((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(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(G())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(E),Q=()=>{const e=C(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>U(o))),l=F(),w=L(),f=b.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>j(o))),x=f?.firstName!=null?f.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(S,{analytics:u,onLoad:o=>(N=>N.trackPageLoaded(D.Event.inviteEmailViewed))(o)}):null,a.jsx(O,{navigate:l,location:w,currentTenant:r,companyName:v,userName:x,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(_,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(Q,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as y}from"./liveblocks-CVtnm86a.js";import{a as A}from"./sentry-BzkfMVrG.js";import{i as G,u as X,h as H,g as ee,j as h,l as te}from"./core-BtMsWhj9.js";import{WM as Fe,WN as Ve,l$ as ae,su as Me,sG as Ge,sW as $e,sU as Re,sX as Ue,sZ as Ke,WO as Ye,fF as U,VL as pe,WP as Se,g_ as ne,cB as se,cC as le,Fe as ve,WQ as Ce,Fi as We,gO as ce,sx as ze,t6 as Ze,dD as qe,dC as Qe,T7 as fe,Fc as Xe,F6 as He,WR as De,E_ as et,EZ as tt,EU as at,F3 as nt,Fj as st,WS as Y,WT as ge,E$ as lt,VM as oe,Fz as Ae,Fs as Ie,WU as xe,sA as Te,Fm as be,Fk as Be,WV as Le,FG as we,FD as Je,Fn as je,FF as _e}from"./zeni-epic-state-xhG_euwn.js";import{a5 as de,aZ as ie,a_ as ct,z as ot,h as dt,a8 as it,a9 as ue,j as N,aw as ut,a$ as rt,p as V,G as Ee,U as ye,b0 as ht,b1 as mt,b2 as pt}from"./index-
|
|
1
|
+
import{j as y}from"./liveblocks-CVtnm86a.js";import{a as A}from"./sentry-BzkfMVrG.js";import{i as G,u as X,h as H,g as ee,j as h,l as te}from"./core-BtMsWhj9.js";import{WM as Fe,WN as Ve,l$ as ae,su as Me,sG as Ge,sW as $e,sU as Re,sX as Ue,sZ as Ke,WO as Ye,fF as U,VL as pe,WP as Se,g_ as ne,cB as se,cC as le,Fe as ve,WQ as Ce,Fi as We,gO as ce,sx as ze,t6 as Ze,dD as qe,dC as Qe,T7 as fe,Fc as Xe,F6 as He,WR as De,E_ as et,EZ as tt,EU as at,F3 as nt,Fj as st,WS as Y,WT as ge,E$ as lt,VM as oe,Fz as Ae,Fs as Ie,WU as xe,sA as Te,Fm as be,Fk as Be,WV as Le,FG as we,FD as Je,Fn as je,FF as _e}from"./zeni-epic-state-xhG_euwn.js";import{a5 as de,aZ as ie,a_ as ct,z as ot,h as dt,a8 as it,a9 as ue,j as N,aw as ut,a$ as rt,p as V,G as Ee,U as ye,b0 as ht,b1 as mt,b2 as pt}from"./index-BA9wY0HE.js";import{n as re}from"./mui-DdZ2UeI1.js";import{p as St}from"./pathToGoBack-DUa0cp7d.js";import Q from"./NotFoundScreen-D6I6Wsee.js";import{c as M}from"./routePaths-CQGkjOU4.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]="37abb1ff-19bb-4742-9843-9b6b9405ced9",e._sentryDebugIdIdentifier="sentry-dbid-37abb1ff-19bb-4742-9843-9b6b9405ced9")}catch{}})();function Rt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=G(),l=t??s,n=X(),i=H(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Fe(u,l??""))),p=h((u=>Ve(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{l!=null&&d==null&&m.fetchState==="Not-Started"&&n(Me(l))}),[l,d,m.fetchState]),A.useEffect((()=>{n(Ge({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?y.jsx(Q,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?y.jsx(ie,{}):y.jsx(Q,{}):y.jsx(ft,{children:y.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(Ye({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ke({accrualId:u}))},onApproveAndPost:u=>{n(Ue(l,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n(Re(l,u,r))},onSkip:(u,r)=>{n($e(l,u,r))}})})}const ft=re.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-
|
|
2
|
-
import{_ as s,bn as hs,fF as ps,d_ as xs,dZ as gs,B1 as Rs,di as js,c8 as Is,gJ as Ts,g9 as As,df as pe,cG as fs,gn as Ds,cy as bs,bE as ys,br as vs,Uc as Cs,v as Us,Uf as Os,bq as Ps,Ug as ws,bK as Fs,bJ as Ls,bt as ks,cu as Vs,Uh as Hs,Ui as Ss,da as Bs,dd as Ns,dc as Ms,cF as Zs,cM as Gs,pS as xe,gi as ge,gY as $s,gk as Re,gL as je,gM as Ie,gl as zs}from"./zeni-epic-state-xhG_euwn.js";import{j as e}from"./liveblocks-CVtnm86a.js";import{a as P}from"./sentry-BzkfMVrG.js";import{N as u,u as Ys,h as qs,i as Js,g as Ws,j as G,q as Te,n as Ks,o as n}from"./core-BtMsWhj9.js";import{J as l,E as Qs,u as Xs,z as y,c as et,e as st,Y as tt,v as B,g as nt,K as at,Q as ot,L as F,G as Ae,t as _,M as it,N as rt,R as lt,j as ne}from"./index-BdE3bEFg.js";import"./mui-DdZ2UeI1.js";import{f as fe}from"./analyticsHelper-DvdruwkE.js";import{t as ut}from"./getLocaleForTenant-omtGYMrM.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="247e5f46-1980-4ae0-8645-1f3e47a6be25",o._sentryDebugIdIdentifier="sentry-dbid-247e5f46-1980-4ae0-8645-1f3e47a6be25")}catch{}})();const dt=l((()=>s((()=>import("./NotFoundScreen-BudPMncf.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ct=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),mt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),be=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),v=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:r,isTenantBankingOnly:k,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(k===!0){if(o)return e.jsx(be,{tenantEmailDomain:C});if(r)return e.jsx(De,{tenantEmailDomain:C});if(U)return e.jsx(ye,{tenantEmailDomain:C})}return o?e.jsx(be,{tenantEmailDomain:C}):r?e.jsx(De,{tenantEmailDomain:C}):U?e.jsx(ye,{tenantEmailDomain:C}):D?e.jsx(mt,{tenantEmailDomain:C}):N?e.jsx(ct,{tenantEmailDomain:C}):e.jsx(dt,{})},_t={dashboard:()=>s((()=>import("./DashboardRoutes-BNQ_G2Ja.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-D25IkCRG.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-CYSobdK2.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-7PO54jHW.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-tupY8NX6.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-C0_U8cPe.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-Be1yd7vs.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-CTbqr9KR.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-Beqj_B98.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-BLoMlu93.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-u3UbdNbB.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-CDbRnTrg.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},Et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},ht=l((()=>s((()=>import("./ReportsRoutes-C0_U8cPe.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),pt=l((()=>s((()=>import("./AddressRoutes-CHBmN4QX.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),xt=l((()=>s((()=>import("./PeopleRoutes-CTbqr9KR.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),gt=l((()=>s((()=>import("./PandLWithForecastRoutes-CQxitPGl.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),Rt=l((()=>s((()=>import("./CustomerOnboardingRoutes-DZPhXsuR.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),jt=l((()=>s((()=>import("./VendorsRoutes-u3UbdNbB.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),It=l((()=>s((()=>import("./TransactionDetailRoutes-aJqQLpSX.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-DPPxLcP3.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),Tt=l((()=>s((()=>import("./DashboardRoutes-BNQ_G2Ja.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),Ce=l((()=>s((()=>import("./BillPayRoutes-D25IkCRG.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),At=l((()=>s((()=>import("./SettingsRoutes-tupY8NX6.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),ft=l((()=>s((()=>import("./InvoicingRoutes-B7hVOPnd.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Ue=l((()=>s((()=>import("./ReimbursementRoutes-CYSobdK2.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),Dt=l((()=>s((()=>import("./ZeniAccountRoutes-CDbRnTrg.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),bt=l((()=>s((()=>import("./TreasuryRoutes-BLoMlu93.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),yt=l((()=>s((()=>import("./TransactionListRoutes-7PO54jHW.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),vt=l((()=>s((()=>import("./ChargeCardRoutes-Be1yd7vs.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),Ct=l((()=>s((()=>import("./NotificationRoutes-ui3la9Pl.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ut=l((()=>s((()=>import("./PerformanceRoutes-DqqsTiLL.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ot=l((()=>s((()=>import("./ExpenseAutomationRoutes-Beqj_B98.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Pt=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-CkH9aaHO.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),wt=l((()=>s((()=>import("./RewardsRoutes-Cuv6zmgH.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Ft=l((()=>s((()=>import("./TaskRoutes-D1AnOebo.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),Lt=l((()=>s((()=>import("./AiCfoScreen-DLhxVK3m.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Oe=l((()=>s((()=>import("./CardsAiCfoScreen-CGVXrGo3.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),f=l((()=>s((()=>import("./NotFoundScreen-BudPMncf.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),kt=l((()=>s((()=>import("./TaskListScreen-BLrDzaze.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Vt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:r,showTreasuryRoute:k,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:V})=>{if(U===!0){if(D)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return C===!0&&V?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):r?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),zt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=Ys(),N=qs(),{tenantEmailDomain:r}=Js(),k=Qs().mode,{setLoading:U,clearAllLoading:C,clearLoading:V}=Xs(),b=y.getSignedInUserTenant(r)?.tenantId,I=y.getSignedInUser(),W=hs(I),$=Ws(),[L,we]=P.useState(!1),i=G((a=>ps(a))),{useFeatureGate:H}=et(),M=st(),K=tt(),Fe=!!i.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=i.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=H(B.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(B.isDebitCardFeatureEnabled),T=G((a=>a.tenantState.fetchState)),p=G((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?xs(oe,i):void 0,Q=p==="Completed"||T==="Completed"?gs(i):void 0,ie=p==="Completed"||T==="Completed"?Rs(i)&&!js(i):void 0,Ve=nt(i,ke,oe),{isCardsHidden:He}=at(i?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:X}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||lt==="DEV",Ze=i?.userRole!=null&&Is(i.userRole),z=G((a=>Ts(a)));if(r!=null){const a=y.getSignedInUserTenant(r);I!=null&&a!=null&&fe(I,i,k)}const Z={tenantId:b,userId:I?.userId,sessionId:I?.zeniSessionId},re=As(),h=ot(),Ge=i.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=fs(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,Ye=G((a=>Z.tenantId!=null?Ds(a,Z.tenantId):void 0));P.useEffect((()=>{U(F.TENANT_FETCHING),o(r)}),[r]),P.useEffect((()=>{if(se!=null&&b!=null){const a=se.split("-");if(a.length===2){const A=bs(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=vs();t.isAfter(d,"month")===!1?D(Cs(b,{month:A,year:c})):N(`/${r}/month_end_close_checks/review`)}}}),[se,r,b]),P.useEffect((()=>{L||(we(!0),U(F.TENANT_FETCHING))}),[L,Z,re,I,D,y]),P.useLayoutEffect((()=>{!Us(re,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(ut(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,D,Ye))}),[b]),P.useEffect((()=>{y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t,d,Y,S){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const q=t!=null&&d?.zeniSessionId!=null,ms=c==null||c.tenantId!==t,_s=c!=null&&c.excludedResources==null,Es=c!=null&&c.externalConnections==null;if(q&&ms){S(Re(t));const J=y.getSignedInUserTenantWithId(t);J?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)))}else q&&_s&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&Es&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)));if(q){ne.identify(d.userId,{tenant_id:t});const J=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),Y(F.TENANT_FETCHING),S(zs(d.userId,t,d.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,i,b,I,U,D))}),[b,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),I!=null&&fe(I,i,k,void 0,z.tenantsBaseInOrder))}),[z,T,i,I]),P.useEffect((()=>{p==="In-Progress"&&U(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(C(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=Et,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=_t[d];Y!=null?Y().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const O=i?.userRole!=null&&Ps(i?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:Je}=H(B.isAccrualEnabled),We=it(),Ke=i?.userRole!=null&&i.userRole.includes("charge_card_user"),Qe=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),w=i?.userRole!=null&&pe(i.userRole),ue=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,de=!Se&&!O,Xe=ws(h?.loggedInUserRoleMap),es=i.externalConnections?.accounting[0]?.isValid,ss=i.externalConnections?.fetchState==="Completed",te=i.company?.companyOnboardingInfo.isOnboardingCompleted,ce=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&Fs(h?.loggedInUserRoleMap),_e=Fe&&!O,ts=Le&&!O,ns=ue&&Ls(h?.loggedInUserRoleMap),as=de&&ks(h?.loggedInUserRoleMap),os=_e&&Vs(h?.loggedInUserRoleMap),is=Hs(h?.loggedInUserRoleMap),rs=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),ds=Ms(h?.loggedInUserRoleMap),x=Zs(h?.loggedInUserRoleMap),g=Gs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&ls,j=ts&&us,m=de&&ds,cs=i.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Xe===!0||is===!0||rs===!0;return y.isSignedIn()?b==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&T!=="In-Progress"&&D(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||W&&!ee)&&ss&&es!==!0&&E===!1&&Q===!1&&ie===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||ie!==!0||te!==!0||ee||W?!L||te!==!1||ee||W?L&&i?.userRole&&E!=null&&Q!=null&&r!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(rt,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Vt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(Tt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(ht,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"people/*",element:cs||w?e.jsx(xt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(gt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(Rt,{})}),e.jsx(n,{path:"transaction/*",element:w&&O===!1||Ke||Qe?e.jsx(It,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"transactions/*",element:w&&O===!1?e.jsx(yt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"customer/*",element:w&&O===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"vendor/*",element:w&&O===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"tasks",element:e.jsx(kt,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ft,{})}),e.jsx(n,{path:"address/*",element:ns||me||os||as?e.jsx(pt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(Dt,{}):e.jsx(f,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(bt,{}):e.jsx(f,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Ut,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&O===!1?e.jsx(Ot,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&O===!1&&Je===!0&&We===!0?e.jsx(Pt,{}):e.jsx(f,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(Ct,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(jt,{}):e.jsx(f,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Ue,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Ue,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(At,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(ft,{}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(vt,{}):e.jsx(f,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(wt,{}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(Lt,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"*",element:e.jsx(f,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${r}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${r}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,zt as S};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-D6I6Wsee.js","assets/sentry-BzkfMVrG.js","assets/core-BtMsWhj9.js","assets/zeni-epic-state-xhG_euwn.js","assets/index-BA9wY0HE.js","assets/mui-DdZ2UeI1.js","assets/analytics-B3pE_Rhv.js","assets/utils-BrzWPNCR.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-sID4RBmv.js","assets/withTransactionSidePanel-Bkj9vjb3.js","assets/useAskAiCfoHostNavButtonProps-DCXPTpvr.js","assets/TransactionDetailScreen-D-_ejGlb.js","assets/decodeURIComponentSafe-roe2OgG2.js","assets/useInitialThreadRequest-DX25oqkA.js","assets/routePaths-CQGkjOU4.js","assets/expenseAutomationHelper-oTNGiYVa.js","assets/stripSplatSuffix-BORWr7jN.js","assets/analyticsHelper-okAQXWGL.js","assets/CompanyPassportScreen-2jMavKQz.js","assets/MobileAppDrawer-CM7t-ZvL.js","assets/InboxNotificationsProvider-0KkUrcUF.js","assets/useTaskManagerAccess-DTWsCdjC.js","assets/useAiCfoDashboardSuggestedQuestionsChips-Bcnkzeqc.js","assets/FeaturePreviewScreen-Cxg43n9j.js","assets/BillPayRoutes-BtdQLqKt.js","assets/AddressScreen-MugNTUQN.js","assets/DomesticWireDetailScreen-BHVEhcDi.js","assets/BusinessVerificationPageScreen-TQO8LD4K.js","assets/DrawerScreen-CafG26MO.js","assets/SetupPagesScreen-CF8rN7nl.js","assets/BillPayApprovalRoutes-Dbk7Y24s.js","assets/ReimbursementApprovalRuleDetailScreen-CCOn4kZU.js","assets/getLocaleForTenant-DbdT0Ypo.js","assets/ReimbursementRoutes-BrXDZflp.js","assets/ReimbursementApprovalRoutes-D0jGkzqM.js","assets/TransactionListRoutes-C61f2Hs7.js","assets/ZeniAccountStatementScreen-BYeqmNu8.js","assets/SettingsRoutes-BRXtJ_i3.js","assets/AccountMappingScreen-lCCsdddb.js","assets/QBOConnectionScreen-CSqa-l0H.js","assets/empty-Cx0IX9BK.js","assets/index-D4z6ymU4.js","assets/url-B1VibTls.js","assets/index-CgkBXLPm.js","assets/accountMappingHelper-DAAt9xyM.js","assets/useEmailConnectResultRefresh-BMz8xUDh.js","assets/ReportsRoutes-9hHKJQNP.js","assets/ChargeCardRoutes-GyAZvGbK.js","assets/useChargeCardPusherEvents-CojGt5Ev.js","assets/PeopleRoutes-CBQUaiY2.js","assets/ExpenseAutomationRoutes-CtGpjaz6.js","assets/useActualMatchingMatchDetail-CjMeDmY7.js","assets/ScheduleDetailsPrepaidExpensesScreen-CmKsiN11.js","assets/pathToGoBack-DUa0cp7d.js","assets/TreasuryRoutes-Epfy4sq_.js","assets/VendorsRoutes-D0D2AK1y.js","assets/ZeniAccountRoutes-xPKKMrma.js","assets/AddressRoutes-B6tEU932.js","assets/PandLWithForecastRoutes-BBlFCOcU.js","assets/CustomerOnboardingRoutes-C1OFU7eR.js","assets/TransactionDetailRoutes-DXMnE9Ej.js","assets/EntityDetailRoutes-B8kK6g4X.js","assets/InvoicingRoutes-DFN0Rx6F.js","assets/NotificationRoutes-DVU6vblh.js","assets/PerformanceRoutes-Bj5_Gk3V.js","assets/ActualMatchingMatchDetailScreen-BacEJjWx.js","assets/RewardsRoutes-BdVi-__F.js","assets/TaskRoutes-Cqhy8GTh.js","assets/TaskListScreen-CETWRLY0.js","assets/useTaskManagerPusherEvents-CkYHu9co.js","assets/AiCfoScreen-eLMR3UOf.js","assets/CardsAiCfoScreen-Ck1QRRJU.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as hs,fF as ps,d_ as xs,dZ as gs,B1 as Rs,di as js,c8 as Is,gJ as Ts,g9 as As,df as pe,cG as fs,gn as Ds,cy as bs,bE as ys,br as vs,Uc as Cs,v as Us,Uf as Os,bq as Ps,Ug as ws,bK as Fs,bJ as Ls,bt as ks,cu as Vs,Uh as Hs,Ui as Ss,da as Bs,dd as Ns,dc as Ms,cF as Zs,cM as Gs,pS as xe,gi as ge,gY as $s,gk as Re,gL as je,gM as Ie,gl as zs}from"./zeni-epic-state-xhG_euwn.js";import{j as e}from"./liveblocks-CVtnm86a.js";import{a as P}from"./sentry-BzkfMVrG.js";import{N as u,u as Ys,h as qs,i as Js,g as Ws,j as G,q as Te,n as Ks,o as n}from"./core-BtMsWhj9.js";import{J as l,E as Qs,u as Xs,z as y,c as et,e as st,Y as tt,v as B,g as nt,K as at,Q as ot,L as F,G as Ae,t as _,M as it,N as rt,R as lt,j as ne}from"./index-BA9wY0HE.js";import"./mui-DdZ2UeI1.js";import{f as fe}from"./analyticsHelper-okAQXWGL.js";import{t as ut}from"./getLocaleForTenant-DbdT0Ypo.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="247e5f46-1980-4ae0-8645-1f3e47a6be25",o._sentryDebugIdIdentifier="sentry-dbid-247e5f46-1980-4ae0-8645-1f3e47a6be25")}catch{}})();const dt=l((()=>s((()=>import("./NotFoundScreen-D6I6Wsee.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ct=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),mt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),be=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),v=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:r,isTenantBankingOnly:k,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(k===!0){if(o)return e.jsx(be,{tenantEmailDomain:C});if(r)return e.jsx(De,{tenantEmailDomain:C});if(U)return e.jsx(ye,{tenantEmailDomain:C})}return o?e.jsx(be,{tenantEmailDomain:C}):r?e.jsx(De,{tenantEmailDomain:C}):U?e.jsx(ye,{tenantEmailDomain:C}):D?e.jsx(mt,{tenantEmailDomain:C}):N?e.jsx(ct,{tenantEmailDomain:C}):e.jsx(dt,{})},_t={dashboard:()=>s((()=>import("./DashboardRoutes-sID4RBmv.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-BtdQLqKt.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-BrXDZflp.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-C61f2Hs7.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-BRXtJ_i3.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-9hHKJQNP.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-GyAZvGbK.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-CBQUaiY2.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-CtGpjaz6.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-Epfy4sq_.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-D0D2AK1y.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-xPKKMrma.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},Et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},ht=l((()=>s((()=>import("./ReportsRoutes-9hHKJQNP.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),pt=l((()=>s((()=>import("./AddressRoutes-B6tEU932.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),xt=l((()=>s((()=>import("./PeopleRoutes-CBQUaiY2.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),gt=l((()=>s((()=>import("./PandLWithForecastRoutes-BBlFCOcU.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),Rt=l((()=>s((()=>import("./CustomerOnboardingRoutes-C1OFU7eR.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),jt=l((()=>s((()=>import("./VendorsRoutes-D0D2AK1y.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),It=l((()=>s((()=>import("./TransactionDetailRoutes-DXMnE9Ej.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-B8kK6g4X.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),Tt=l((()=>s((()=>import("./DashboardRoutes-sID4RBmv.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),Ce=l((()=>s((()=>import("./BillPayRoutes-BtdQLqKt.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),At=l((()=>s((()=>import("./SettingsRoutes-BRXtJ_i3.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),ft=l((()=>s((()=>import("./InvoicingRoutes-DFN0Rx6F.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Ue=l((()=>s((()=>import("./ReimbursementRoutes-BrXDZflp.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),Dt=l((()=>s((()=>import("./ZeniAccountRoutes-xPKKMrma.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),bt=l((()=>s((()=>import("./TreasuryRoutes-Epfy4sq_.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),yt=l((()=>s((()=>import("./TransactionListRoutes-C61f2Hs7.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),vt=l((()=>s((()=>import("./ChargeCardRoutes-GyAZvGbK.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),Ct=l((()=>s((()=>import("./NotificationRoutes-DVU6vblh.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ut=l((()=>s((()=>import("./PerformanceRoutes-Bj5_Gk3V.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ot=l((()=>s((()=>import("./ExpenseAutomationRoutes-CtGpjaz6.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Pt=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-BacEJjWx.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),wt=l((()=>s((()=>import("./RewardsRoutes-BdVi-__F.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Ft=l((()=>s((()=>import("./TaskRoutes-Cqhy8GTh.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),Lt=l((()=>s((()=>import("./AiCfoScreen-eLMR3UOf.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Oe=l((()=>s((()=>import("./CardsAiCfoScreen-Ck1QRRJU.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),f=l((()=>s((()=>import("./NotFoundScreen-D6I6Wsee.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),kt=l((()=>s((()=>import("./TaskListScreen-CETWRLY0.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Vt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:r,showTreasuryRoute:k,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:V})=>{if(U===!0){if(D)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return C===!0&&V?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):r?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),zt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=Ys(),N=qs(),{tenantEmailDomain:r}=Js(),k=Qs().mode,{setLoading:U,clearAllLoading:C,clearLoading:V}=Xs(),b=y.getSignedInUserTenant(r)?.tenantId,I=y.getSignedInUser(),W=hs(I),$=Ws(),[L,we]=P.useState(!1),i=G((a=>ps(a))),{useFeatureGate:H}=et(),M=st(),K=tt(),Fe=!!i.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=i.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=H(B.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(B.isDebitCardFeatureEnabled),T=G((a=>a.tenantState.fetchState)),p=G((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?xs(oe,i):void 0,Q=p==="Completed"||T==="Completed"?gs(i):void 0,ie=p==="Completed"||T==="Completed"?Rs(i)&&!js(i):void 0,Ve=nt(i,ke,oe),{isCardsHidden:He}=at(i?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:X}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||lt==="DEV",Ze=i?.userRole!=null&&Is(i.userRole),z=G((a=>Ts(a)));if(r!=null){const a=y.getSignedInUserTenant(r);I!=null&&a!=null&&fe(I,i,k)}const Z={tenantId:b,userId:I?.userId,sessionId:I?.zeniSessionId},re=As(),h=ot(),Ge=i.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=fs(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,Ye=G((a=>Z.tenantId!=null?Ds(a,Z.tenantId):void 0));P.useEffect((()=>{U(F.TENANT_FETCHING),o(r)}),[r]),P.useEffect((()=>{if(se!=null&&b!=null){const a=se.split("-");if(a.length===2){const A=bs(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=vs();t.isAfter(d,"month")===!1?D(Cs(b,{month:A,year:c})):N(`/${r}/month_end_close_checks/review`)}}}),[se,r,b]),P.useEffect((()=>{L||(we(!0),U(F.TENANT_FETCHING))}),[L,Z,re,I,D,y]),P.useLayoutEffect((()=>{!Us(re,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(ut(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,D,Ye))}),[b]),P.useEffect((()=>{y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t,d,Y,S){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const q=t!=null&&d?.zeniSessionId!=null,ms=c==null||c.tenantId!==t,_s=c!=null&&c.excludedResources==null,Es=c!=null&&c.externalConnections==null;if(q&&ms){S(Re(t));const J=y.getSignedInUserTenantWithId(t);J?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)))}else q&&_s&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&Es&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)));if(q){ne.identify(d.userId,{tenant_id:t});const J=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),Y(F.TENANT_FETCHING),S(zs(d.userId,t,d.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,i,b,I,U,D))}),[b,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),I!=null&&fe(I,i,k,void 0,z.tenantsBaseInOrder))}),[z,T,i,I]),P.useEffect((()=>{p==="In-Progress"&&U(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(C(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=Et,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=_t[d];Y!=null?Y().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const O=i?.userRole!=null&&Ps(i?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:Je}=H(B.isAccrualEnabled),We=it(),Ke=i?.userRole!=null&&i.userRole.includes("charge_card_user"),Qe=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),w=i?.userRole!=null&&pe(i.userRole),ue=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,de=!Se&&!O,Xe=ws(h?.loggedInUserRoleMap),es=i.externalConnections?.accounting[0]?.isValid,ss=i.externalConnections?.fetchState==="Completed",te=i.company?.companyOnboardingInfo.isOnboardingCompleted,ce=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&Fs(h?.loggedInUserRoleMap),_e=Fe&&!O,ts=Le&&!O,ns=ue&&Ls(h?.loggedInUserRoleMap),as=de&&ks(h?.loggedInUserRoleMap),os=_e&&Vs(h?.loggedInUserRoleMap),is=Hs(h?.loggedInUserRoleMap),rs=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),ds=Ms(h?.loggedInUserRoleMap),x=Zs(h?.loggedInUserRoleMap),g=Gs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&ls,j=ts&&us,m=de&&ds,cs=i.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Xe===!0||is===!0||rs===!0;return y.isSignedIn()?b==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&T!=="In-Progress"&&D(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||W&&!ee)&&ss&&es!==!0&&E===!1&&Q===!1&&ie===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||ie!==!0||te!==!0||ee||W?!L||te!==!1||ee||W?L&&i?.userRole&&E!=null&&Q!=null&&r!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(rt,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Vt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(Tt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(ht,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"people/*",element:cs||w?e.jsx(xt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(gt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(Rt,{})}),e.jsx(n,{path:"transaction/*",element:w&&O===!1||Ke||Qe?e.jsx(It,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"transactions/*",element:w&&O===!1?e.jsx(yt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"customer/*",element:w&&O===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"vendor/*",element:w&&O===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"tasks",element:e.jsx(kt,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ft,{})}),e.jsx(n,{path:"address/*",element:ns||me||os||as?e.jsx(pt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(Dt,{}):e.jsx(f,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(bt,{}):e.jsx(f,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Ut,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&O===!1?e.jsx(Ot,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&O===!1&&Je===!0&&We===!0?e.jsx(Pt,{}):e.jsx(f,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(Ct,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(jt,{}):e.jsx(f,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Ue,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Ue,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(At,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(ft,{}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(vt,{}):e.jsx(f,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(wt,{}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(Lt,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"*",element:e.jsx(f,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${r}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${r}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,zt as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CVtnm86a.js";import{a as d}from"./sentry-BzkfMVrG.js";import{h as N,g as H,u as _,i as O,j as C,l as K,n as J,o as k}from"./core-BtMsWhj9.js";import{fF as w,Zp as ve,NE as Pe,YZ as we,Z6 as Ae,c8 as W,cT as De,cU as Ue,bq as _e,de as Me,FZ as Re,Zq as Te,P5 as Be,Mv as Ze,Mm as de,Mj as Fe,G1 as ue,Mp as pe,Ms as ge,My as X,Cd as ee,G0 as Ve,lu as $,lx as me,Zr as Ne,mH as Oe,Gi as Le,VF as Ge,VG as $e,ls as He,Zs as Ke,lv as qe,uE as ze,VA as Qe,VB as Je,uI as Ye,hV as We,Uz as Q,hN as ae,hK as Xe,hS as en,UA as nn,Gf as tn,Zt as an,Zu as on,MM as sn,l$ as rn,dZ as fe,d_ as he,Zv as ln,gC as cn,UP as dn,Ge as oe,gH as se,gG as un,Gd as pn,gF as gn,gE as mn,Zw as fn,T$ as Ce,Zx as hn,Zy as Cn,Zz as yn,ZA as Sn,ZB as bn,ZC as In,Gl as xn,ZD as En,Gc as ie,G6 as G,ZE as kn,ZF as jn,ZG as re,ZH as vn,dS as Pn,ZI as wn,ZJ as An,ZK as Dn,Ub as Un,c0 as _n,c7 as Mn,c6 as Rn,c1 as Tn,ZL as Bn,c4 as Zn,c3 as Fn,c5 as Vn,c2 as Nn}from"./zeni-epic-state-xhG_euwn.js";import{bU as On,z as P,Q as L,a8 as ne,c4 as Ln,j as q,c as te,v as F,g as ye,K as Se,c5 as Gn,h as $n,Z as be,c6 as Hn,aj as Kn,c7 as qn,c8 as zn,ar as Qn,c9 as Jn,p as Yn,d as Ie,ca as Wn}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-CVtnm86a.js";import{a as d}from"./sentry-BzkfMVrG.js";import{h as N,g as H,u as _,i as O,j as C,l as K,n as J,o as k}from"./core-BtMsWhj9.js";import{fF as w,Zp as ve,NE as Pe,YZ as we,Z6 as Ae,c8 as W,cT as De,cU as Ue,bq as _e,de as Me,FZ as Re,Zq as Te,P5 as Be,Mv as Ze,Mm as de,Mj as Fe,G1 as ue,Mp as pe,Ms as ge,My as X,Cd as ee,G0 as Ve,lu as $,lx as me,Zr as Ne,mH as Oe,Gi as Le,VF as Ge,VG as $e,ls as He,Zs as Ke,lv as qe,uE as ze,VA as Qe,VB as Je,uI as Ye,hV as We,Uz as Q,hN as ae,hK as Xe,hS as en,UA as nn,Gf as tn,Zt as an,Zu as on,MM as sn,l$ as rn,dZ as fe,d_ as he,Zv as ln,gC as cn,UP as dn,Ge as oe,gH as se,gG as un,Gd as pn,gF as gn,gE as mn,Zw as fn,T$ as Ce,Zx as hn,Zy as Cn,Zz as yn,ZA as Sn,ZB as bn,ZC as In,Gl as xn,ZD as En,Gc as ie,G6 as G,ZE as kn,ZF as jn,ZG as re,ZH as vn,dS as Pn,ZI as wn,ZJ as An,ZK as Dn,Ub as Un,c0 as _n,c7 as Mn,c6 as Rn,c1 as Tn,ZL as Bn,c4 as Zn,c3 as Fn,c5 as Vn,c2 as Nn}from"./zeni-epic-state-xhG_euwn.js";import{bU as On,z as P,Q as L,a8 as ne,c4 as Ln,j as q,c as te,v as F,g as ye,K as Se,c5 as Gn,h as $n,Z as be,c6 as Hn,aj as Kn,c7 as qn,c8 as zn,ar as Qn,c9 as Jn,p as Yn,d as Ie,ca as Wn}from"./index-BA9wY0HE.js";import{n as B}from"./mui-DdZ2UeI1.js";import{u as xe}from"./useTaskManagerAccess-DTWsCdjC.js";import{U as Xn}from"./AccountMappingScreen-lCCsdddb.js";import{t as et,A as nt}from"./AddressScreen-MugNTUQN.js";import V from"./NotFoundScreen-D6I6Wsee.js";import{g as tt}from"./analyticsHelper-okAQXWGL.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-TQO8LD4K.js";import{C as st}from"./CompanyPassportScreen-2jMavKQz.js";import{M as R}from"./MobileAppDrawer-CM7t-ZvL.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-BMz8xUDh.js";import{q as le}from"./QBOConnectionScreen-CSqa-l0H.js";import{B as lt}from"./BillPayApprovalRoutes-Dbk7Y24s.js";import{R as ct}from"./ReimbursementApprovalRoutes-D0jGkzqM.js";import"./recharts-DhwkC6iY.js";import"./analytics-B3pE_Rhv.js";import"./plaid-nsaMWH8B.js";import"./dnd-NbF88ub7.js";import"./stripe-cKAAJElX.js";import"./lottie-DX_KUXtr.js";import"./lexical-OFbGuPVJ.js";import"./pdf-Ck6JVYdq.js";import"./utils-BrzWPNCR.js";import"./accountMappingHelper-DAAt9xyM.js";import"./routePaths-CQGkjOU4.js";import"./InboxNotificationsProvider-0KkUrcUF.js";import"./empty-Cx0IX9BK.js";import"./pdf-lib-BXXBaukU.js";import"./index-D4z6ymU4.js";import"./url-B1VibTls.js";import"./index-CgkBXLPm.js";import"./decodeURIComponentSafe-roe2OgG2.js";import"./ReimbursementApprovalRuleDetailScreen-CCOn4kZU.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]="187ea84e-3257-4201-9ae4-ecabdfedbf7d",e._sentryDebugIdIdentifier="sentry-dbid-187ea84e-3257-4201-9ae4-ecabdfedbf7d")}catch{}})();const dt=B.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-CVtnm86a.js";import{h as Q,g as X,u as ee,i as W,j as v,N as j,l as G,t as Xe}from"./core-BtMsWhj9.js";import{bJ as en,fF as F,cG as nn,HR as $,YZ as tn,Z0 as an,uX as ne,uL as te,mz as ae,BL as R,Z2 as Ce,gG as He,gF as We,gE as Ge,Z3 as sn,H_ as on,Mv as he,Mm as Ie,Mj as Ae,M1 as Y,Mp as _e,Ms as ke,My as ve,Cd as Pe,g_ as cn,cB as rn,d_ as un,dZ as dn,di as ln,bt as pn,cu as Fe,Z4 as mn,L1 as de,LF as yn,Z5 as fn,bK as gn,NQ as le,NE as Sn,Z6 as bn,Z7 as Cn,NU as hn,NY as In,Z8 as je,BE as An,Sk as _n,Ou as be,Pj as pe,Z9 as kn,Za as vn,Zb as Pn,Zc as qe,Zd as En,Vo as Tn,Ye as Dn,VD as Un,Ze as Je,M5 as On,VE as wn,M9 as Fn,Zf as we,OE as Ke,mH as Vn,uO as Ye,BN as xn,bE as Ne,BZ as Re,cE as Bn,Zg as Qe,Ob as jn,Oc as Nn,Og as Rn,Zh as Ln,Ox as Le,Zi as Mn,Zj as zn,Zk as Zn,Zl as $n,gV as Hn,Ja as Wn,Zm as Gn,Jf as qn,Je as Jn}from"./zeni-epic-state-xhG_euwn.js";import{aj as Ee,Q as ie,c as me,v as K,E as Te,z as T,a9 as se,j as D,a8 as De,T as H,bR as Kn,af as oe,bS as V,bj as Ve,bT as Yn,bU as Qn,bV as Xn,n as Be,bW as et,p as Me,aH as ze,a2 as nt,ac as tt,bX as at,bY as it,bZ as st,w as ot}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-CVtnm86a.js";import{h as Q,g as X,u as ee,i as W,j as v,N as j,l as G,t as Xe}from"./core-BtMsWhj9.js";import{bJ as en,fF as F,cG as nn,HR as $,YZ as tn,Z0 as an,uX as ne,uL as te,mz as ae,BL as R,Z2 as Ce,gG as He,gF as We,gE as Ge,Z3 as sn,H_ as on,Mv as he,Mm as Ie,Mj as Ae,M1 as Y,Mp as _e,Ms as ke,My as ve,Cd as Pe,g_ as cn,cB as rn,d_ as un,dZ as dn,di as ln,bt as pn,cu as Fe,Z4 as mn,L1 as de,LF as yn,Z5 as fn,bK as gn,NQ as le,NE as Sn,Z6 as bn,Z7 as Cn,NU as hn,NY as In,Z8 as je,BE as An,Sk as _n,Ou as be,Pj as pe,Z9 as kn,Za as vn,Zb as Pn,Zc as qe,Zd as En,Vo as Tn,Ye as Dn,VD as Un,Ze as Je,M5 as On,VE as wn,M9 as Fn,Zf as we,OE as Ke,mH as Vn,uO as Ye,BN as xn,bE as Ne,BZ as Re,cE as Bn,Zg as Qe,Ob as jn,Oc as Nn,Og as Rn,Zh as Ln,Ox as Le,Zi as Mn,Zj as zn,Zk as Zn,Zl as $n,gV as Hn,Ja as Wn,Zm as Gn,Jf as qn,Je as Jn}from"./zeni-epic-state-xhG_euwn.js";import{aj as Ee,Q as ie,c as me,v as K,E as Te,z as T,a9 as se,j as D,a8 as De,T as H,bR as Kn,af as oe,bS as V,bj as Ve,bT as Yn,bU as Qn,bV as Xn,n as Be,bW as et,p as Me,aH as ze,a2 as nt,ac as tt,bX as at,bY as it,bZ as st,w as ot}from"./index-BA9wY0HE.js";import{a as h}from"./sentry-BzkfMVrG.js";import{n as xe,D as ct,S as rt}from"./mui-DdZ2UeI1.js";import{u as ut,B as Oe}from"./BusinessVerificationPageScreen-TQO8LD4K.js";import{M as ye}from"./MobileAppDrawer-CM7t-ZvL.js";import N from"./NotFoundScreen-D6I6Wsee.js";import{a as Ze}from"./analyticsHelper-okAQXWGL.js";import{d as $e}from"./routePaths-CQGkjOU4.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]="c3cd8ba0-fd3d-4148-8f9d-743fe93bb641",e._sentryDebugIdIdentifier="sentry-dbid-c3cd8ba0-fd3d-4148-8f9d-743fe93bb641")}catch{}})();const dt=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-CVtnm86a.js";import{a as f,R as T,q as A}from"./sentry-BzkfMVrG.js";import{u as j,h as z,j as l,g as D,N as F,l as M}from"./core-BtMsWhj9.js";import{u as P,z as s,E as O,j as w,G as N,S as _,T as B,V,W as $,X as W,Z as v}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-CVtnm86a.js";import{a as f,R as T,q as A}from"./sentry-BzkfMVrG.js";import{u as j,h as z,j as l,g as D,N as F,l as M}from"./core-BtMsWhj9.js";import{u as P,z as s,E as O,j as w,G as N,S as _,T as B,V,W as $,X as W,Z as v}from"./index-BA9wY0HE.js";import{fF as X,TX as q,Uf as J,gi as R,gk as Z,Uk as G,gU as H,dj as K,Ul as y,Um as Q,Un as Y,b$ as U}from"./zeni-epic-state-xhG_euwn.js";import"./mui-DdZ2UeI1.js";import{u as ee}from"./useDeviceId-Cvm1S2SE.js";import{f as te}from"./analyticsHelper-okAQXWGL.js";import{t as ne}from"./getLocaleForTenant-DbdT0Ypo.js";import"./recharts-DhwkC6iY.js";import"./analytics-B3pE_Rhv.js";import"./plaid-nsaMWH8B.js";import"./dnd-NbF88ub7.js";import"./stripe-cKAAJElX.js";import"./lottie-DX_KUXtr.js";import"./lexical-OFbGuPVJ.js";import"./pdf-Ck6JVYdq.js";import"./utils-BrzWPNCR.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="2d9809fd-9083-4097-902b-bd055d7e7ec7",t._sentryDebugIdIdentifier="sentry-dbid-2d9809fd-9083-4097-902b-bd055d7e7ec7")}catch{}})();const ie=M((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Y({authCode:n,oauthProvider:a,appType:"web",redirectUri:U(c),sourceUri:U(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Q(n,a)))},clearSignInError:()=>{t(y())}}}))(W),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=j(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:b,accountUnlockTime:L}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),h=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>X(e))),I=l((e=>q(e))),m=D(),E=O().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{k.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[k.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&h!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),R(o.userId,o.zeniSessionId,r.tenantId),i(Z(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),N.updateAppLocaleID(ne(r)),te(o,r,E,void 0,I.tenantsInOrder),H().then((()=>{const e=$();e!=null&&_(e)})),setTimeout((()=>{w.trackLogin(B.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))}),2e3))}),[S,p,h,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(F,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&L!=null?u.jsx(V,{onClose:()=>i(y()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CVtnm86a.js";import{a}from"./sentry-BzkfMVrG.js";import{u as l,g as d,N as u}from"./core-BtMsWhj9.js";import{z as i,j as n,T as m,a8 as p}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-CVtnm86a.js";import{a}from"./sentry-BzkfMVrG.js";import{u as l,g as d,N as u}from"./core-BtMsWhj9.js";import{z as i,j as n,T as m,a8 as p}from"./index-BA9wY0HE.js";import{gX as g,UB as y}from"./zeni-epic-state-xhG_euwn.js";import{n as b}from"./mui-DdZ2UeI1.js";import"./recharts-DhwkC6iY.js";import"./analytics-B3pE_Rhv.js";import"./plaid-nsaMWH8B.js";import"./dnd-NbF88ub7.js";import"./stripe-cKAAJElX.js";import"./lottie-DX_KUXtr.js";import"./lexical-OFbGuPVJ.js";import"./pdf-Ck6JVYdq.js";import"./utils-BrzWPNCR.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]="faf99514-59a7-4cee-ac4b-674a2b1a976c",e._sentryDebugIdIdentifier="sentry-dbid-faf99514-59a7-4cee-ac4b-674a2b1a976c")}catch{}})();function L(){const e=l(),t=d(),r=a.useRef(!1),c=i.isSignedIn(),o=t.state?.message==="logout"||c;return a.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),n.trackLogout(m.Event.logoutSuccess),n.resetUserIdentity(),i.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-CVtnm86a.js";import{a as A}from"./sentry-BzkfMVrG.js";import{h as pa,u as Ta,g as fa,k as ga,j as v,i as _a,l as ma}from"./core-BtMsWhj9.js";import{z as w,c as Da,v as _,at as Sa,a9 as ya,j as Ea,T as ba,e6 as ha,p as C,a5 as Aa}from"./index-
|
|
1
|
+
import{j as g}from"./liveblocks-CVtnm86a.js";import{a as A}from"./sentry-BzkfMVrG.js";import{h as pa,u as Ta,g as fa,k as ga,j as v,i as _a,l as ma}from"./core-BtMsWhj9.js";import{z as w,c as Da,v as _,at as Sa,a9 as ya,j as Ea,T as ba,e6 as ha,p as C,a5 as Aa}from"./index-BA9wY0HE.js";import{fF as Ca,a24 as V,R6 as D,a25 as W,a20 as Ga,Qu as N,a26 as Ia,QC as O,Qc as Ba,PQ as Ka,R7 as Q,a27 as Z,gh as La,QZ as va,R2 as Ra,QR as wa,QP as z,R3 as Ua,QM as Pa,a28 as Fa,a29 as ja,a2a as xa,a2b as $a,a2c as m,dx as Na,dw as Oa,a2d as Qa,Q9 as Za}from"./zeni-epic-state-xhG_euwn.js";import{n as za}from"./mui-DdZ2UeI1.js";import{u as Ma}from"./useAskAiCfoHostNavButtonProps-DCXPTpvr.js";import{M as Va}from"./MobileAppDrawer-CM7t-ZvL.js";import{u as Wa}from"./useTaskManagerPusherEvents-CkYHu9co.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="ff64b5cd-f3ec-482c-9435-9fcd685b9af9",e._sentryDebugIdIdentifier="sentry-dbid-ff64b5cd-f3ec-482c-9435-9fcd685b9af9")}catch{}})();const c={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},qa=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Ha=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),G=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Ja=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const i={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(i.is_private=a.is_private),G(a.assignees)&&(i.assignees=a.assignees),G(a.direct_assignees)&&(i.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(i.created_by=a.created_by),G(a.task_group_ids)&&(i.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(i.name=a.name),typeof a.parent_task_id=="string"&&(i.parent_task_id=a.parent_task_id),i},Xa=e=>{if(e==null||typeof e!="object")return null;const a=e;return G(a.task_ids)?{task_ids:a.task_ids}:null},ke=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},Ya=za.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|