@zeniai/web-app-ui 5.3.46-dev → 5.3.46-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-CfueHDEF.js → AccountMappingScreen-BT617fFT.js} +1 -1
- package/dist/assets/{ActualMatchingMatchDetailScreen-fiSieMf_.js → ActualMatchingMatchDetailScreen-B8f2yDaP.js} +1 -1
- package/dist/assets/{AddressRoutes-nZx4HWhJ.js → AddressRoutes-kiur36N3.js} +1 -1
- package/dist/assets/{AddressScreen-D06QouT5.js → AddressScreen-5ZLJ7_Lf.js} +1 -1
- package/dist/assets/{AiCfoScreen-V8xy8p4b.js → AiCfoScreen-CW5K1JhC.js} +1 -1
- package/dist/assets/{AppDrawer-CyBGsFud.js → AppDrawer-D5UtqVeE.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-C1N-qtHk.js → BillPayApprovalRoutes-DwyJret-.js} +1 -1
- package/dist/assets/{BillPayRoutes-CdYxJOPQ.js → BillPayRoutes-DFm7lkFc.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BScFHNdu.js → BusinessVerificationPageScreen-BL6H7JF-.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BQ4Zn40f.js → CardsAiCfoScreen-C-_PDYQc.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-tPmmU_fw.js → ChargeCardRoutes-Brg8E0b9.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CMIjHc5k.js → CompanyPassportScreen-CEuR94fF.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-BdMANdwF.js → ConnectionAuthScreen-uvgGU2za.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-BjVB3FB2.js → CustomerOnboardingAuthScreen-C-d3MNce.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-BqAwy1Go.js → CustomerOnboardingRoutes-BffNdH_l.js} +1 -1
- package/dist/assets/{DashboardRoutes-C3Q7vlXr.js → DashboardRoutes-CdQzvjb3.js} +1 -1
- package/dist/assets/{DefaultTenantHome-CPPof4Nd.js → DefaultTenantHome-Bve2xDaJ.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-Bo5pk1NL.js → DomesticWireDetailScreen-Dj3JCDGh.js} +1 -1
- package/dist/assets/{DrawerScreen-DYwMLd1Q.js → DrawerScreen-CxKP-6Rf.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-_eEqLjSQ.js → EntityDetailRoutes-CRL6OrqO.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-D17PZLn2.js → ExpenseAutomationRoutes-BYSJ88to.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BE9pWqir.js → FeaturePreviewScreen-LeLfD5pA.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-CDOpB-J7.js → HubSpotOAuthCallbackScreen-DAHGdPOy.js} +1 -1
- package/dist/assets/{InvoicingRoutes-rYerhkHV.js → InvoicingRoutes-CvkWcLdT.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-D8pvaYpW.js → MagicLinkRoutes-CC75kCuL.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CW3gjVTf.js → MagicLinkSignInScreen-CWvMyhrQ.js} +1 -1
- package/dist/assets/{MobileAppDrawer-Dubbrc5R.js → MobileAppDrawer-DExJFFmi.js} +1 -1
- package/dist/assets/{NotFoundScreen-r2t5kGnd.js → NotFoundScreen-sryCVGSu.js} +1 -1
- package/dist/assets/{NotificationRoutes-C0XszwDJ.js → NotificationRoutes-njgUFBoj.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CS66Nuk1.js → OAuthConsentScreen-BCgV9bma.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-tEXmnuYa.js → PandLWithForecastRoutes-CZ27RjQE.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-Ba8XuIED.js → PaymentLinkScreen-BrTP8y76.js} +1 -1
- package/dist/assets/{PeopleRoutes-MPpefoB8.js → PeopleRoutes-CulbMsz3.js} +1 -1
- package/dist/assets/{PerformanceRoutes-v3vPCjna.js → PerformanceRoutes-BYcI02aB.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CAoS33ZU.js → QBOConnectionScreen-CbxnK800.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-BqXyuFCU.js → ReimbursementApprovalRoutes-DeN7vJtz.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B9f-fas4.js → ReimbursementApprovalRuleDetailScreen-DTKS2oJ9.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-IZQbGrfA.js → ReimbursementRoutes-_NvdZWfU.js} +1 -1
- package/dist/assets/{ReportsRoutes-R5Ca0XU-.js → ReportsRoutes-BAGPRsE0.js} +1 -1
- package/dist/assets/{RewardsRoutes-CRQWx3J1.js → RewardsRoutes-BUOCW-CT.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-BMDMlpQa.js → ScheduleDetailsPrepaidExpensesScreen-B5q5sAGy.js} +1 -1
- package/dist/assets/{ScreenRoutes-Cwhq-96H.js → ScreenRoutes-BHHy1uXx.js} +2 -2
- package/dist/assets/{SettingsRoutes-CMH4A66d.js → SettingsRoutes-BtUbt9zq.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BzKWg1IS.js → SetupPagesScreen-D0fdMGb4.js} +1 -1
- package/dist/assets/{SignInScreen-Niy78Kvo.js → SignInScreen-5_sPhLr0.js} +1 -1
- package/dist/assets/{SignOutScreen-z5R4ARFQ.js → SignOutScreen-DrcdcbqC.js} +1 -1
- package/dist/assets/{TaskListScreen-CQ5GSVtZ.js → TaskListScreen-OEgAVE9M.js} +1 -1
- package/dist/assets/{TaskRoutes-BLHPB9C2.js → TaskRoutes-DpYRDMWP.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-DWH8l2BY.js → TransactionDetailRoutes-eA90CTkf.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Cyr21RUS.js → TransactionDetailScreen-CjwF3ORf.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DeHnVgrc.js → TransactionListRoutes-2fGCqEq5.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CH1V36gd.js → TreasuryRoutes-CuPpvoic.js} +1 -1
- package/dist/assets/{VendorsRoutes-D5fLbpGk.js → VendorsRoutes-B_Yg40bd.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-B4K2TMeC.js → WiseConfirmationScreen-ChaM_jYJ.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-B_-Cub3b.js → ZeniAccountRoutes-CfMUrMqe.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-Cg7a4ZMC.js → ZeniAccountStatementScreen-BgdXcTdx.js} +1 -1
- package/dist/assets/{analyticsHelper-BZsIqD3O.js → analyticsHelper-DcvdGte-.js} +1 -1
- package/dist/assets/{getLocaleForTenant-DffZrhDN.js → getLocaleForTenant-C3wVeXiS.js} +1 -1
- package/dist/assets/{index-lv0eG9-7.js → index-DvW7BRlL.js} +939 -939
- package/dist/assets/{routePaths-BxLZuqJn.js → routePaths-GYFjoelZ.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-Bq60hvvx.js → useActualMatchingMatchDetail-BkDnJbPg.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-sigyClkp.js → useAiCfoDashboardSuggestedQuestionsChips-D_Ro-9Tt.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-Cgk5vvuH.js → useAskAiCfoHostNavButtonProps-DV4bjx-y.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-gKhYa0T8.js → useChargeCardPusherEvents-1X1JYShz.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-DefipxZh.js → useEmailConnectResultRefresh-dVylO6qh.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BXjZ5prE.js → useInitialThreadRequest-BwX5Js6P.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-CncuT8wV.js → useTaskManagerAccess-daSMnBbA.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BY_v_z2c.js → withTransactionSidePanel-CPG02lKM.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DKqwsBQp.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-DKqwsBQp.js";import E from"./NotFoundScreen-sryCVGSu.js";import{a as r}from"./sentry-CxSdF_rC.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as z,n as F,o as h}from"./core-D6EV-11Y.js";import{fF as O,a0R as b,bo as B,bn as N,iL as V,gh as L}from"./zeni-epic-state-CZbm731W.js";import{c as $,z as I,as as q,dP as G}from"./index-DvW7BRlL.js";import"./mui-qouWiIWk.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-DV4bjx-y.js";import{M as J}from"./MobileAppDrawer-DExJFFmi.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";import"./InboxNotificationsProvider-gj6fT2eX.js";import"./useTaskManagerAccess-daSMnBbA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5935802f-4f24-4a49-9d21-9b2d0739b091",e._sentryDebugIdIdentifier="sentry-dbid-5935802f-4f24-4a49-9d21-9b2d0739b091")}catch{}})();const K=z((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),Q=()=>{const e=_(),t=v(),d=$(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,c=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(L({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[n?.fetchState,c]),R=r.useCallback(((a,i)=>{c(a,i,!1)}),[c]),g=a=>{S(a)},{isAiCfoAccessEnabled:j,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:R,handleDrawerToggle:g,isAiCfoAccessEnabled:j,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function he(){return s.jsxs(F,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-DKqwsBQp.js";import{p as Q,d as kc,c as an,g as jl,a as xl}from"./sentry-CxSdF_rC.js";import{L as dt,b$ as Tc,fF as Ac,TL as Rc,UB as kl,c8 as Tl}from"./zeni-epic-state-CZbm731W.js";import{a as lt,b as Al,c as Rl,d as Il,e as un,f as Pl,g as Nl,h as Ll,i as Vt,j as Ic,k as oe,l as je,m as $l,o as Yt,p as ue,q as Ml}from"./utils-D8aAQJhF.js";import{r as cn}from"./empty-DQLKD1Hp.js";import{r as Dl,a as Cl,b as Fl,c as Bl}from"./pdf-lib-DndwkHl6.js";import{r as Ul}from"./index-8ioAZPP6.js";import{r as ql}from"./index-EnAqWoDC.js";import{h as Gl,g as zl,u as Zl,j as _n,l as Hl}from"./core-D6EV-11Y.js";import{u as Vl,z as Pc,L as Yl,ak as Kl,al as Wl,Z as Jl,D as Xl}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-DKqwsBQp.js";import{p as Q,d as kc,c as an,g as jl,a as xl}from"./sentry-CxSdF_rC.js";import{L as dt,b$ as Tc,fF as Ac,TL as Rc,UB as kl,c8 as Tl}from"./zeni-epic-state-CZbm731W.js";import{a as lt,b as Al,c as Rl,d as Il,e as un,f as Pl,g as Nl,h as Ll,i as Vt,j as Ic,k as oe,l as je,m as $l,o as Yt,p as ue,q as Ml}from"./utils-D8aAQJhF.js";import{r as cn}from"./empty-DQLKD1Hp.js";import{r as Dl,a as Cl,b as Fl,c as Bl}from"./pdf-lib-DndwkHl6.js";import{r as Ul}from"./index-8ioAZPP6.js";import{r as ql}from"./index-EnAqWoDC.js";import{h as Gl,g as zl,u as Zl,j as _n,l as Hl}from"./core-D6EV-11Y.js";import{u as Vl,z as Pc,L as Yl,ak as Kl,al as Wl,Z as Jl,D as Xl}from"./index-DvW7BRlL.js";import"./mui-qouWiIWk.js";import{d as Pe}from"./decodeURIComponentSafe-MQV5aj_5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="e59ecbdb-8203-4ba2-9fa7-be0c352150d1",t._sentryDebugIdIdentifier="sentry-dbid-e59ecbdb-8203-4ba2-9fa7-be0c352150d1")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,In,Pn,Nn,Ne,Ln,$n,Mn,Dn,Cn,Fn,Bn,Un,qn,Gn,zn,Le,Zn,Hn,Vn,Yn,Kn,Wn,Jn,$e,Xn,Qn,to,eo,ro,no,oo,Me={exports:{}},De={exports:{}},Ce={};function Nc(){if(jn)return Ce;function t(r){return t=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},t(r)}function u(r,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},u(r,e)}function d(r){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var a,p=o(r);if(e){var h=o(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return(function(m,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g})(m)})(this,a)}}function o(r){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(r)}jn=1;var c,i,n={};function s(r,e,a){a||(a=Error);var p=(function(h){(function(l,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(y&&y.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),y&&u(l,y)})(g,h);var m,b=d(g);function g(l,y,v){var S;return(function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")})(this,g),S=b.call(this,(function(w,_,M){return typeof e=="string"?e:e(w,_,M)})(l,y,v)),S.code=r,S}return m=g,Object.defineProperty(m,"prototype",{writable:!1}),m})(a);n[r]=p}function f(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map((function(p){return String(p)})),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(r,e,a){var p,h,m;if(c===void 0&&(c=ie()),c(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",(function(g,l,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-l.length,y)===l})(r," argument"))m="The ".concat(r," ").concat(p," ").concat(f(e,"type"));else{var b=(function(g,l,y){return typeof y!="number"&&(y=0),!(y+l.length>g.length)&&g.indexOf(l,y)!==-1})(r,".")?"property":"argument";m='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(f(e,"type"))}return m+=". Received type ".concat(t(a))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";i===void 0&&(i=lt());var p=i.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)}),TypeError),s("ERR_INVALID_RETURN_VALUE",(function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")}),TypeError),s("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];c===void 0&&(c=ie()),c(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map((function(m){return'"'.concat(m,'"')})),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")}),TypeError),Ce.codes=n,Ce}function Ql(){if(kn)return xn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter((function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable}))),j.push.apply(j,x)}return j}function u(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach((function(x){d(k,x,j[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach((function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))}))}return k}function d(k,E,j){return(E=c(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function o(k,E,j){return E&&(function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,c(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function c(k){var E=(function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)})(k,"string");return p(E)==="symbol"?E:String(E)}function i(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function s(k){var E=typeof Map=="function"?new Map:void 0;return s=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return f(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},s(k)}function f(k,E,j){return f=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},f.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 e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=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},p(k)}kn=1;var h=lt().inspect,m=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",l="",y="",v="",S={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(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach((function(x){j[x]=k[x]})),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-DKqwsBQp.js";import Z from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-DKqwsBQp.js";import Z from"./NotFoundScreen-sryCVGSu.js";import{a as p}from"./sentry-CxSdF_rC.js";import{h as C,g as N,u as D,j as u,N as V,l as k,n as q,o as g}from"./core-D6EV-11Y.js";import{fF as E,YW as w,Zb as h,Nw as U,Ns as L,Nv as f,Nl as B,ZA as $,Np as z,Ny as F}from"./zeni-epic-state-CZbm731W.js";import{z as T,w as W,c9 as K,q as O,bS as Y,ca as G}from"./index-DvW7BRlL.js";import"./mui-qouWiIWk.js";import{u as H,R as x}from"./ReimbursementApprovalRuleDetailScreen-DTKS2oJ9.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]="06c52fe2-41e2-4e75-8a82-c7cd5fba14f4",e._sentryDebugIdIdentifier="sentry-dbid-06c52fe2-41e2-4e75-8a82-c7cd5fba14f4")}catch{}})();const A="reimbursement-approval-rule-update",J=k((function(e){return{approvalView:w(e),remiSetupApproverViewUpdateData:h(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e($(!1))},onBackClick:()=>{O(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(W(K)),M=({isLoading:e})=>{const s=C(),n=N(),a=D(),[t,l]=p.useState(!1),[v,y]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>w(o))),b=u((o=>h(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(y(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${A}`]:[],eventCallback:(o,R,j)=>{o.endsWith(A)&&j.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(V,{to:"../../promo"}):r.jsx(J,{currentTenant:c,location:n,navigate:s,...m})},I="reimbursement-approval-rule-update",P=k((function(e){const s=w(e),n=h(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e($(!1))},onBackClick:()=>{O(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(F(t,!0))}}}))(W(G)),Q=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=Y(e?.tenantId);return s?r.jsx(X,{isLoading:n}):r.jsx(M,{isLoading:n})},X=({isLoading:e})=>{const s=C(),n=N(),a=D(),[t,l]=p.useState(!1),[v,y]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>w(i)));H();const R=u((i=>h(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{R?.updateStatus.fetchState==="Completed"&&a(U())}),[R]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(y(!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 j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${I}`]:[],eventCallback:(i,ee,_)=>{i.endsWith(I)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(V,{to:"../../promo"}):r.jsx(P,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function le(){return r.jsxs(q,{children:[r.jsx(g,{path:"/",element:r.jsx(Q,{})}),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-DKqwsBQp.js";import{a as f}from"./sentry-CxSdF_rC.js";import{u as U,j as g,h as _,g as O,i as V,l as N}from"./core-D6EV-11Y.js";import{mr as W,Zb as w,YW as x,No as k,NB as B,Nw as A,Nx as E,Zc as j,fF as Z,Nv as z}from"./zeni-epic-state-CZbm731W.js";import{z as F,E as P,a7 as q,c0 as K,q as $,bS as Y,c1 as G}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-DKqwsBQp.js";import{a as f}from"./sentry-CxSdF_rC.js";import{u as U,j as g,h as _,g as O,i as V,l as N}from"./core-D6EV-11Y.js";import{mr as W,Zb as w,YW as x,No as k,NB as B,Nw as A,Nx as E,Zc as j,fF as Z,Nv as z}from"./zeni-epic-state-CZbm731W.js";import{z as F,E as P,a7 as q,c0 as K,q as $,bS as Y,c1 as G}from"./index-DvW7BRlL.js";import"./mui-qouWiIWk.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]="35f50e1f-4700-4bf2-ae76-5f385dde811a",e._sentryDebugIdIdentifier="sentry-dbid-35f50e1f-4700-4bf2-ae76-5f385dde811a")}catch{}})();function H(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(W({})))}),[p,t,e])}const J=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return s.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach((u=>{const R=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=u.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:u.stepType.selectedOption,actors:c,operator:c.length>1?u.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:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):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("../")}}}))(K);function M(){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,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!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(q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function pe(e){return j(e)==null}const Q=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=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=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,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const b=S?.selection.selectedOptions??[];if(b.length>0&&(u.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:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):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(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(G);function ne(){const e=g((t=>Z(t))),{isApprovalRulesV3Enabled:s}=Y(e?.tenantId);return s?h.jsx(X,{}):h.jsx(M,{})}function X(){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,d]=f.useState(!1);if(H(),f.useEffect((()=>{a||(d(!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(q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(Q,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,pe as i,H as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DKqwsBQp.js";import{u as ae,j as v,h as Q,g as J,i as ie,N as M,l as ee,q as ct,n as dt,o as w}from"./core-D6EV-11Y.js";import{fF as V,Ns as ut,_G as ge,c8 as he,My as Le,ma as pt,MN as ce,MM as de,_H as bt,bn as fe,gV as _e,_I as gt,WF as ht,l$ as $e,WG as Ce,WH as ft,kN as St,YI as It,l0 as yt,Mm as Rt,C5 as vt,kU as At,N7 as Me,_J as Pe,_K as Ee,_L as kt,_M as Ct,_N as Et,MT as we,l6 as wt,YR as xt,ML as Bt,Mw as Tt,_O as Dt,Mv as jt,_P as Ft,MD as xe,MX as Ut,MW as Lt,MS as _t,_Q as Ne,S5 as $t,bo as Mt,MG as Pt,Np as Nt,_R as Ot,_S as Gt,N3 as zt,N0 as Be,Yc as Zt,Mt as Vt,_T as Oe,NS as Te,N_ as Wt,_U as Ht,_V as q,_W as Yt,_X as Ge,_Y as qt,_Z as ze,__ as Ze,Nf as ue,bu as Xt,bK as Se,cM as Ie,d_ as Ve,dZ as We,_$ as Jt,gh as Kt,Yp as Qt,$0 as en,$1 as He,Yt as tn,Zb as nn,$2 as an,ZA as sn,NX as De,NW as on,$3 as rn,$4 as ln,$5 as mn,$6 as cn,$7 as dn,YX as un,NN as pn,NR as bn,bq as gn,bJ as hn,cG as fn,cu as Sn,bt as In,U4 as yn,da as Rn,dd as vn,dc as An,cF as kn}from"./zeni-epic-state-CZbm731W.js";import{bS as Cn,c as Ye,a1 as qe,N as oe,d as x,z as _,cT as Xe,a8 as re,l as C,aS as je,I as F,ae as se,af as En,G as Je,cU as wn,p as X,as as Ke,cV as xn,U as le,cW as Bn,aq as Tn,ab as Dn,a7 as ye,T as Qe,w as jn,bA as Fn,av as Un,ai as Ln,E as et,cX as _n,j as $n}from"./index-lv0eG9-7.js";import{n as P,S as Mn}from"./mui-qouWiIWk.js";import pe from"./NotFoundScreen-r2t5kGnd.js";import{S as Fe}from"./SetupPagesScreen-BzKWg1IS.js";import{F as tt}from"./FeaturePreviewScreen-BE9pWqir.js";import{a as h}from"./sentry-CxSdF_rC.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-Cgk5vvuH.js";import{u as nt}from"./useInitialThreadRequest-BXjZ5prE.js";import{D as Pn}from"./DrawerScreen-DYwMLd1Q.js";import{M as at}from"./MobileAppDrawer-Dubbrc5R.js";import{F as Nn}from"./ScreenRoutes-Cwhq-96H.js";import{R as On}from"./ReimbursementApprovalRoutes-BqXyuFCU.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";import"./BusinessVerificationPageScreen-BScFHNdu.js";import"./routePaths-BxLZuqJn.js";import"./analyticsHelper-BZsIqD3O.js";import"./InboxNotificationsProvider-gj6fT2eX.js";import"./useTaskManagerAccess-CncuT8wV.js";import"./getLocaleForTenant-DffZrhDN.js";import"./ReimbursementApprovalRuleDetailScreen-B9f-fas4.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]="5c75e5fc-3fda-4ee1-9a1b-d34e2516f67b",e._sentryDebugIdIdentifier="sentry-dbid-5c75e5fc-3fda-4ee1-9a1b-d34e2516f67b")}catch{}})();const st=e=>`/${e}/reimbursements`,Gn=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}}}=Je.getLocalizedStrings(),zn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(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:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.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(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},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=X(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Me(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=J(),{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=J().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>V(p))),g=v((p=>ge(p,r))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((K=>V(K))),O=N?.tenantId,{isApprovalRulesV3Enabled:G,isLoading:W}=Cn(O),H=v((K=>K.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||W||H==="Not-Started"&&p(ut(!0,!1,!1,G))}),[O,W,G,H,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!1,b,y,r)))}));const $=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"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Xe,{isNewReimbursement:r==null}):s.jsxs(Zn,{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(Gn,{})}),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:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Zn=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-DKqwsBQp.js";import{u as ae,j as v,h as Q,g as J,i as ie,N as M,l as ee,q as ct,n as dt,o as w}from"./core-D6EV-11Y.js";import{fF as V,Ns as ut,_G as ge,c8 as he,My as Le,ma as pt,MN as ce,MM as de,_H as bt,bn as fe,gV as _e,_I as gt,WF as ht,l$ as $e,WG as Ce,WH as ft,kN as St,YI as It,l0 as yt,Mm as Rt,C5 as vt,kU as At,N7 as Me,_J as Pe,_K as Ee,_L as kt,_M as Ct,_N as Et,MT as we,l6 as wt,YR as xt,ML as Bt,Mw as Tt,_O as Dt,Mv as jt,_P as Ft,MD as xe,MX as Ut,MW as Lt,MS as _t,_Q as Ne,S5 as $t,bo as Mt,MG as Pt,Np as Nt,_R as Ot,_S as Gt,N3 as zt,N0 as Be,Yc as Zt,Mt as Vt,_T as Oe,NS as Te,N_ as Wt,_U as Ht,_V as q,_W as Yt,_X as Ge,_Y as qt,_Z as ze,__ as Ze,Nf as ue,bu as Xt,bK as Se,cM as Ie,d_ as Ve,dZ as We,_$ as Jt,gh as Kt,Yp as Qt,$0 as en,$1 as He,Yt as tn,Zb as nn,$2 as an,ZA as sn,NX as De,NW as on,$3 as rn,$4 as ln,$5 as mn,$6 as cn,$7 as dn,YX as un,NN as pn,NR as bn,bq as gn,bJ as hn,cG as fn,cu as Sn,bt as In,U4 as yn,da as Rn,dd as vn,dc as An,cF as kn}from"./zeni-epic-state-CZbm731W.js";import{bS as Cn,c as Ye,a1 as qe,N as oe,d as x,z as _,cT as Xe,a8 as re,l as C,aS as je,I as F,ae as se,af as En,G as Je,cU as wn,p as X,as as Ke,cV as xn,U as le,cW as Bn,aq as Tn,ab as Dn,a7 as ye,T as Qe,w as jn,bA as Fn,av as Un,ai as Ln,E as et,cX as _n,j as $n}from"./index-DvW7BRlL.js";import{n as P,S as Mn}from"./mui-qouWiIWk.js";import pe from"./NotFoundScreen-sryCVGSu.js";import{S as Fe}from"./SetupPagesScreen-D0fdMGb4.js";import{F as tt}from"./FeaturePreviewScreen-LeLfD5pA.js";import{a as h}from"./sentry-CxSdF_rC.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-DV4bjx-y.js";import{u as nt}from"./useInitialThreadRequest-BwX5Js6P.js";import{D as Pn}from"./DrawerScreen-CxKP-6Rf.js";import{M as at}from"./MobileAppDrawer-DExJFFmi.js";import{F as Nn}from"./ScreenRoutes-BHHy1uXx.js";import{R as On}from"./ReimbursementApprovalRoutes-DeN7vJtz.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";import"./BusinessVerificationPageScreen-BL6H7JF-.js";import"./routePaths-GYFjoelZ.js";import"./analyticsHelper-DcvdGte-.js";import"./InboxNotificationsProvider-gj6fT2eX.js";import"./useTaskManagerAccess-daSMnBbA.js";import"./getLocaleForTenant-C3wVeXiS.js";import"./ReimbursementApprovalRuleDetailScreen-DTKS2oJ9.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]="5c75e5fc-3fda-4ee1-9a1b-d34e2516f67b",e._sentryDebugIdIdentifier="sentry-dbid-5c75e5fc-3fda-4ee1-9a1b-d34e2516f67b")}catch{}})();const st=e=>`/${e}/reimbursements`,Gn=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}}}=Je.getLocalizedStrings(),zn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(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:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.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(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},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=X(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Me(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=J(),{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=J().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>V(p))),g=v((p=>ge(p,r))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((K=>V(K))),O=N?.tenantId,{isApprovalRulesV3Enabled:G,isLoading:W}=Cn(O),H=v((K=>K.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||W||H==="Not-Started"&&p(ut(!0,!1,!1,G))}),[O,W,G,H,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!1,b,y,r)))}));const $=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"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Xe,{isNewReimbursement:r==null}):s.jsxs(Zn,{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(Gn,{})}),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:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Zn=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-DKqwsBQp.js";import{g as J,h as Oe,u as De,i as Ue,j as d,l as Ae,n as Pe,o as ee}from"./core-D6EV-11Y.js";import{fF as q,E1 as R,UC as Ee,l$ as le,u6 as ce,uX as U,lG as Ve,lP as A,lH as P,kK as E,kB as V,kA as Le,Db as ie,v0 as Me,bq as Be,UD as ve,bn as xe,Eo as ze,UE as Ge,UF as He,ci as g,D4 as Ye,UG as ae,UH as Ne,UI as $e,UJ as qe,UK as Ze,UL as Ke,UM as Qe,UN as We,UO as Xe,UP as Je,UQ as ea,UR as aa,US as sa,UT as j,UU as L,UV as M,UW as B,UX as v,UY as x,UZ as z,U_ as G,U$ as H,V0 as Y,ei as ta,E2 as oa,DR as se,DS as te,E8 as na,DW as oe,Ee as ra,V1 as la,V2 as ca,V3 as ia,V4 as da,V5 as pa,V6 as _a,V7 as fa,V8 as ma,V9 as ua,Va as ba,d_ as ha,dZ as ya}from"./zeni-epic-state-CZbm731W.js";import{an as Ca,ao as wa,ap as Sa,a as ga,a1 as Ia,N as de,d as N,z as pe,aq as Ra,U as Ta,f as ja,ar as ka,as as Fa,a8 as Oa,l as $,T as Da,y as Ua,p as _e,at as Aa,au as Pa,av as Ea}from"./index-lv0eG9-7.js";import"./mui-qouWiIWk.js";import Va from"./NotFoundScreen-r2t5kGnd.js";import{F as La}from"./FeaturePreviewScreen-BE9pWqir.js";import{a as u}from"./sentry-CxSdF_rC.js";import{u as Ma}from"./useInitialThreadRequest-BXjZ5prE.js";import{t as ne,a as re,b as Ba}from"./routePaths-BxLZuqJn.js";import{M as va}from"./MobileAppDrawer-Dubbrc5R.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";import"./InboxNotificationsProvider-gj6fT2eX.js";import"./useTaskManagerAccess-CncuT8wV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="566440e7-2ef9-431a-9d47-066e7ec35f5e",e._sentryDebugIdIdentifier="sentry-dbid-566440e7-2ef9-431a-9d47-066e7ec35f5e")}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:$,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(U(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((C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="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)||g(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=g(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=>{g(o.selectedReportID)?e(Ze({classesToFilterOut:a})):I(o.selectedReportID)?e(Ke({classesToFilterOut:a})):e(Qe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{g(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):I(o.selectedReportID)?e($e({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=g(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?V():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):V(!0))}}}))(Aa);function Ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ga(),_=Ia(),m=Pa(_),a=Oe(),s=De(),t=J(),{tenantEmailDomain:r}=Ue(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(N.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,C]=u.useState(!1),[Z,fe]=u.useState(!1),{isFeatureEnabled:K}=l(N.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(K?F?.companyId:void 0),w=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:b}=Ra(),O=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),S=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),D=d((n=>R(n).selectedReportAndTimeframeFetchState)),Ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(C(!0),s(U(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!Z&&w==="Completed"&&b&&(s(U(i.userId,!1,!0,!1)),fe(!0))}),[c,Z,w,b]),u.useEffect((()=>{if(c&&D.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":S&&s(ie());break;case"balance_sheet":s(Le(h.timeframe));break;case"balance_sheet_by_classes":T&&s(V());break;case"balance_sheet_by_projects":S&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":S&&s(A());break;case"cash_flow":s(Ve(h.timeframe))}}),[c,O,D,b,T,S]);const Q=Ta(),we=Q?.loggedInUserRole!=null&&Be(Q?.loggedInUserRole)!==!0,[Se,ge]=u.useState(!1),W=n=>{ge(n)},Ie=ja(),Re=ka();return(function(n){const{isDataReady:Te}=n,{pathname:je}=J(),X=Ca(je??"")==="reports",ke=wa(Te),Fe=u.useMemo((()=>X?xa:void 0),[X]);Sa({canFetchSuggestedQuestions:ke,pageContexts:Fe})})({isDataReady:w==="Completed"}),Fa({isDataReady:w==="Completed"}),p.jsxs(p.Fragment,{children:[w==="Completed"?p.jsx(Oa,{analytics:$,onLoad:n=>n.trackPageLoaded(Da.Event.reports)}):null,p.jsx(va,{isAppContentDrawerOpen:Se,handleDrawerToggle:W}),p.jsx(Ga,{firstMonthOfFY:ue,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:Ce,selectedReportID:O,analytics:$,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:S,isCompareModeOn:ye,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:D,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 Ua({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:K,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(N.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(Va,{})})]})}export{_s as default};
|
|
1
|
+
import{j as p}from"./liveblocks-DKqwsBQp.js";import{g as J,h as Oe,u as De,i as Ue,j as d,l as Ae,n as Pe,o as ee}from"./core-D6EV-11Y.js";import{fF as q,E1 as R,UC as Ee,l$ as le,u6 as ce,uX as U,lG as Ve,lP as A,lH as P,kK as E,kB as V,kA as Le,Db as ie,v0 as Me,bq as Be,UD as ve,bn as xe,Eo as ze,UE as Ge,UF as He,ci as g,D4 as Ye,UG as ae,UH as Ne,UI as $e,UJ as qe,UK as Ze,UL as Ke,UM as Qe,UN as We,UO as Xe,UP as Je,UQ as ea,UR as aa,US as sa,UT as j,UU as L,UV as M,UW as B,UX as v,UY as x,UZ as z,U_ as G,U$ as H,V0 as Y,ei as ta,E2 as oa,DR as se,DS as te,E8 as na,DW as oe,Ee as ra,V1 as la,V2 as ca,V3 as ia,V4 as da,V5 as pa,V6 as _a,V7 as fa,V8 as ma,V9 as ua,Va as ba,d_ as ha,dZ as ya}from"./zeni-epic-state-CZbm731W.js";import{an as Ca,ao as wa,ap as Sa,a as ga,a1 as Ia,N as de,d as N,z as pe,aq as Ra,U as Ta,f as ja,ar as ka,as as Fa,a8 as Oa,l as $,T as Da,y as Ua,p as _e,at as Aa,au as Pa,av as Ea}from"./index-DvW7BRlL.js";import"./mui-qouWiIWk.js";import Va from"./NotFoundScreen-sryCVGSu.js";import{F as La}from"./FeaturePreviewScreen-LeLfD5pA.js";import{a as u}from"./sentry-CxSdF_rC.js";import{u as Ma}from"./useInitialThreadRequest-BwX5Js6P.js";import{t as ne,a as re,b as Ba}from"./routePaths-GYFjoelZ.js";import{M as va}from"./MobileAppDrawer-DExJFFmi.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";import"./InboxNotificationsProvider-gj6fT2eX.js";import"./useTaskManagerAccess-daSMnBbA.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]="566440e7-2ef9-431a-9d47-066e7ec35f5e",e._sentryDebugIdIdentifier="sentry-dbid-566440e7-2ef9-431a-9d47-066e7ec35f5e")}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:$,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(U(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((C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="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)||g(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=g(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=>{g(o.selectedReportID)?e(Ze({classesToFilterOut:a})):I(o.selectedReportID)?e(Ke({classesToFilterOut:a})):e(Qe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{g(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):I(o.selectedReportID)?e($e({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=g(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?V():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):V(!0))}}}))(Aa);function Ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ga(),_=Ia(),m=Pa(_),a=Oe(),s=De(),t=J(),{tenantEmailDomain:r}=Ue(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(N.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,C]=u.useState(!1),[Z,fe]=u.useState(!1),{isFeatureEnabled:K}=l(N.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(K?F?.companyId:void 0),w=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:b}=Ra(),O=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),S=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),D=d((n=>R(n).selectedReportAndTimeframeFetchState)),Ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(C(!0),s(U(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!Z&&w==="Completed"&&b&&(s(U(i.userId,!1,!0,!1)),fe(!0))}),[c,Z,w,b]),u.useEffect((()=>{if(c&&D.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":S&&s(ie());break;case"balance_sheet":s(Le(h.timeframe));break;case"balance_sheet_by_classes":T&&s(V());break;case"balance_sheet_by_projects":S&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":S&&s(A());break;case"cash_flow":s(Ve(h.timeframe))}}),[c,O,D,b,T,S]);const Q=Ta(),we=Q?.loggedInUserRole!=null&&Be(Q?.loggedInUserRole)!==!0,[Se,ge]=u.useState(!1),W=n=>{ge(n)},Ie=ja(),Re=ka();return(function(n){const{isDataReady:Te}=n,{pathname:je}=J(),X=Ca(je??"")==="reports",ke=wa(Te),Fe=u.useMemo((()=>X?xa:void 0),[X]);Sa({canFetchSuggestedQuestions:ke,pageContexts:Fe})})({isDataReady:w==="Completed"}),Fa({isDataReady:w==="Completed"}),p.jsxs(p.Fragment,{children:[w==="Completed"?p.jsx(Oa,{analytics:$,onLoad:n=>n.trackPageLoaded(Da.Event.reports)}):null,p.jsx(va,{isAppContentDrawerOpen:Se,handleDrawerToggle:W}),p.jsx(Ga,{firstMonthOfFY:ue,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:Ce,selectedReportID:O,analytics:$,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:S,isCompareModeOn:ye,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:D,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 Ua({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:K,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(N.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(Va,{})})]})}export{_s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-DKqwsBQp.js";import{z as w,a8 as S,l as u,T as D,e4 as E,N as I,d as k}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-DKqwsBQp.js";import{z as w,a8 as S,l as u,T as D,e4 as E,N as I,d as k}from"./index-DvW7BRlL.js";import"./mui-qouWiIWk.js";import g from"./NotFoundScreen-sryCVGSu.js";import{a as c}from"./sentry-CxSdF_rC.js";import{u as C,j as h,h as F,g as L,l as T,n as U,o as f,N as y}from"./core-D6EV-11Y.js";import{fF as _,a1M as j,a1N as p,DI as P,p$ as V,a1O as G,DG as z}from"./zeni-epic-state-CZbm731W.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="378628ad-3404-4c6f-9a51-2d5bfe3f24ef",e._sentryDebugIdIdentifier="sentry-dbid-378628ad-3404-4c6f-9a51-2d5bfe3f24ef")}catch{}})();const M=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=w.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(z())},onUpdateInviteFormLocalData:s=>{e(G({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(E),O=()=>{const e=C(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),l=F(),x=L(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>j(o))),N=d?.firstName!=null?d.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 b=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(S,{analytics:u,onLoad:o=>(v=>v.trackPageLoaded(D.Event.inviteEmailViewed))(o)}):null,a.jsx(M,{navigate:l,location:x,currentTenant:r,companyName:b,userName:N,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(k.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(O,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-DKqwsBQp.js";import{a as A}from"./sentry-CxSdF_rC.js";import{i as G,u as H,h as Q,g as ee,j as h,l as te}from"./core-D6EV-11Y.js";import{WA as Fe,WB as Ve,l$ as ae,sr as Me,sD as Ge,sT as Re,sR as $e,sU as Ke,sW as Ue,WC as Ye,fF as K,Vz as pe,WD as Se,g_ as ne,cB as se,cC as le,F6 as ve,WE as Ce,Fa as We,gO as ce,su as ze,t2 as qe,dD as Ze,dC as Xe,SX as fe,F4 as He,E_ as Qe,WF as De,ES as et,ER as tt,EM as at,EX as nt,Fb as st,WG as Y,WH as ge,ET as lt,VA as oe,Fr as Ae,Fk as Ie,WI as xe,sx as Te,Fe as Be,Fc as be,WJ as Le,Fy as Je,Fv as we,Ff as je,Fx as _e}from"./zeni-epic-state-CZbm731W.js";import{a4 as de,aY as ie,aZ as ct,z as ot,k as dt,a7 as it,a8 as ue,l as N,av as ut,a_ as rt,p as V,G as Ee,c as ke,a$ as ht,b0 as mt,b1 as pt}from"./index-
|
|
1
|
+
import{j as k}from"./liveblocks-DKqwsBQp.js";import{a as A}from"./sentry-CxSdF_rC.js";import{i as G,u as H,h as Q,g as ee,j as h,l as te}from"./core-D6EV-11Y.js";import{WA as Fe,WB as Ve,l$ as ae,sr as Me,sD as Ge,sT as Re,sR as $e,sU as Ke,sW as Ue,WC as Ye,fF as K,Vz as pe,WD as Se,g_ as ne,cB as se,cC as le,F6 as ve,WE as Ce,Fa as We,gO as ce,su as ze,t2 as qe,dD as Ze,dC as Xe,SX as fe,F4 as He,E_ as Qe,WF as De,ES as et,ER as tt,EM as at,EX as nt,Fb as st,WG as Y,WH as ge,ET as lt,VA as oe,Fr as Ae,Fk as Ie,WI as xe,sx as Te,Fe as Be,Fc as be,WJ as Le,Fy as Je,Fv as we,Ff as je,Fx as _e}from"./zeni-epic-state-CZbm731W.js";import{a4 as de,aY as ie,aZ as ct,z as ot,k as dt,a7 as it,a8 as ue,l as N,av as ut,a_ as rt,p as V,G as Ee,c as ke,a$ as ht,b0 as mt,b1 as pt}from"./index-DvW7BRlL.js";import{n as re}from"./mui-qouWiIWk.js";import{p as St}from"./pathToGoBack-DMRqTTJ7.js";import X from"./NotFoundScreen-sryCVGSu.js";import{c as M}from"./routePaths-GYFjoelZ.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]="b5681a82-e4ad-41d0-83be-bda8101de5b3",e._sentryDebugIdIdentifier="sentry-dbid-b5681a82-e4ad-41d0-83be-bda8101de5b3")}catch{}})();function $t({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=G(),l=t??s,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Fe(u,l??""))),p=h((u=>Ve(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{l!=null&&d==null&&m.fetchState==="Not-Started"&&n(Me(l))}),[l,d,m.fetchState]),A.useEffect((()=>{n(Ge({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?k.jsx(X,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?k.jsx(ie,{}):k.jsx(X,{}):k.jsx(ft,{children:k.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(Ye({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(l,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n($e(l,u,r))},onSkip:(u,r)=>{n(Re(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 Es,fF as hs,d_ as ps,dZ as xs,AV as gs,di as Rs,c8 as js,gJ as Is,g9 as Ts,df as pe,cG as As,gn as fs,cy as Ds,bE as bs,br as ys,U0 as Cs,v as vs,U3 as Us,bq as Os,U4 as Ps,bK as ws,bJ as Fs,bt as Ls,cu as Vs,U5 as ks,U6 as Hs,da as Ss,dd as Bs,dc as Ns,cF as Ms,cM as Zs,pS as xe,gi as ge,gY as Gs,gk as Re,gL as je,gM as Ie,gl as $s}from"./zeni-epic-state-CZbm731W.js";import{j as e}from"./liveblocks-DKqwsBQp.js";import{a as P}from"./sentry-CxSdF_rC.js";import{N as u,u as zs,h as Ys,i as qs,g as Js,j as G,q as Te,n as Ws,o as n}from"./core-D6EV-11Y.js";import{K as l,E as Ks,u as Qs,z as y,N as Xs,f as et,g as st,d as B,j as tt,O as nt,U as at,L as F,G as Ae,t as _,P as ot,Q as rt,l as ne}from"./index-lv0eG9-7.js";import"./mui-qouWiIWk.js";import{f as fe}from"./analyticsHelper-BZsIqD3O.js";import{t as it}from"./getLocaleForTenant-DffZrhDN.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]="d4fefd11-cef4-4699-9866-d314a3170b3a",o._sentryDebugIdIdentifier="sentry-dbid-d4fefd11-cef4-4699-9866-d314a3170b3a")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-r2t5kGnd.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({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`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:U,tenantEmailDomain:v})=>{if(V===!0){if(o)return e.jsx(be,{tenantEmailDomain:v});if(i)return e.jsx(De,{tenantEmailDomain:v});if(U)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(be,{tenantEmailDomain:v}):i?e.jsx(De,{tenantEmailDomain:v}):U?e.jsx(ye,{tenantEmailDomain:v}):D?e.jsx(dt,{tenantEmailDomain:v}):N?e.jsx(ut,{tenantEmailDomain:v}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-C3Q7vlXr.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-CdYxJOPQ.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-IZQbGrfA.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-DeHnVgrc.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-CMH4A66d.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-R5Ca0XU-.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-tPmmU_fw.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-MPpefoB8.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-D17PZLn2.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-CH1V36gd.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-D5fLbpGk.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-B_-Cub3b.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]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-R5Ca0XU-.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),Et=l((()=>s((()=>import("./AddressRoutes-nZx4HWhJ.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),ht=l((()=>s((()=>import("./PeopleRoutes-MPpefoB8.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-tEXmnuYa.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-BqAwy1Go.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-D5fLbpGk.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-DWH8l2BY.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-_eEqLjSQ.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),jt=l((()=>s((()=>import("./DashboardRoutes-C3Q7vlXr.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])))),ve=l((()=>s((()=>import("./BillPayRoutes-CdYxJOPQ.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])))),It=l((()=>s((()=>import("./SettingsRoutes-CMH4A66d.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])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-rYerhkHV.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-IZQbGrfA.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])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-B_-Cub3b.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])))),ft=l((()=>s((()=>import("./TreasuryRoutes-CH1V36gd.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),Dt=l((()=>s((()=>import("./TransactionListRoutes-DeHnVgrc.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),bt=l((()=>s((()=>import("./ChargeCardRoutes-tPmmU_fw.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),yt=l((()=>s((()=>import("./NotificationRoutes-C0XszwDJ.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ct=l((()=>s((()=>import("./PerformanceRoutes-v3vPCjna.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),vt=l((()=>s((()=>import("./ExpenseAutomationRoutes-D17PZLn2.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])))),Ut=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-fiSieMf_.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Ot=l((()=>s((()=>import("./RewardsRoutes-CRQWx3J1.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Pt=l((()=>s((()=>import("./TaskRoutes-BLHPB9C2.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-V8xy8p4b.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,23,54,15,8])))),Oe=l((()=>s((()=>import("./CardsAiCfoScreen-BQ4Zn40f.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,8])))),f=l((()=>s((()=>import("./NotFoundScreen-r2t5kGnd.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-CQ5GSVtZ.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:U,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(U===!0){if(D)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),Gt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=zs(),N=Ys(),{tenantEmailDomain:i}=qs(),V=Ks().mode,{setLoading:U,clearAllLoading:v,clearLoading:k}=Qs(),b=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),W=Es(I),$=Js(),[L,we]=P.useState(!1),r=G((a=>hs(a))),{useFeatureGate:H}=Xs(),M=et(),K=st(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=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"?ps(oe,r):void 0,Q=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,ke=tt(r,Ve,oe),{isCardsHidden:He}=nt(r?.tenantId),Se=!ke||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:X}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||rt==="DEV",Ze=r?.userRole!=null&&js(r.userRole),z=G((a=>Is(a)));if(i!=null){const a=y.getSignedInUserTenant(i);I!=null&&a!=null&&fe(I,r,V)}const Z={tenantId:b,userId:I?.userId,sessionId:I?.zeniSessionId},ie=Ts(),h=at(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=As(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?fs(a,Z.tenantId):void 0));P.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&b!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=bs(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();t.isAfter(d,"month")===!1?D(Cs(b,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,b]),P.useEffect((()=>{L||(we(!0),U(F.TENANT_FETCHING))}),[L,Z,ie,I,D,y]),P.useLayoutEffect((()=>{!vs(ie,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c(Gs(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(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,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(q&&cs){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&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&_s&&_.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($s(d.userId,t,d.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,r,b,I,U,D))}),[b,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Us(z.tenantsBaseInOrder)),I!=null&&fe(I,r,V,void 0,z.tenantsBaseInOrder))}),[z,T,r,I]),P.useEffect((()=>{p==="In-Progress"&&U(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),k(F.TENANT_FETCHING),k(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=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=ct[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=r?.userRole!=null&&Os(r?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:Je}=H(B.isAccrualEnabled),We=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,de=!Se&&!O,Qe=Ps(h?.loggedInUserRoleMap),Xe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&ws(h?.loggedInUserRoleMap),_e=Fe&&!O,ss=Le&&!O,ts=ue&&Fs(h?.loggedInUserRoleMap),ns=de&&Ls(h?.loggedInUserRoleMap),as=_e&&Vs(h?.loggedInUserRoleMap),os=ks(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),x=Ms(h?.loggedInUserRoleMap),g=Zs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&is,j=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Qe===!0||os===!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)&&es&&Xe!==!0&&E===!1&&Q===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||W?!L||te!==!1||ee||W?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ws,{children:e.jsxs(n,{element:e.jsx(ot,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{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(jt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&O===!1||We||Ke?e.jsx(Rt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&O===!1?e.jsx(Dt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&O===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&O===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Pt,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(Et,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(f,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(ft,{}):e.jsx(f,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Ct,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&O===!1?e.jsx(vt,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&O===!1&&Je===!0?e.jsx(Ut,{}):e.jsx(f,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(yt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(gt,{}):e.jsx(f,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(It,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):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(bt,{}):e.jsx(f,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(Ot,{}):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(wt,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"*",element:e.jsx(f,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,Gt as S};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-sryCVGSu.js","assets/sentry-CxSdF_rC.js","assets/core-D6EV-11Y.js","assets/zeni-epic-state-CZbm731W.js","assets/index-DvW7BRlL.js","assets/mui-qouWiIWk.js","assets/analytics-wktvfErl.js","assets/utils-D8aAQJhF.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-CdQzvjb3.js","assets/withTransactionSidePanel-CPG02lKM.js","assets/useAskAiCfoHostNavButtonProps-DV4bjx-y.js","assets/TransactionDetailScreen-CjwF3ORf.js","assets/decodeURIComponentSafe-MQV5aj_5.js","assets/useInitialThreadRequest-BwX5Js6P.js","assets/routePaths-GYFjoelZ.js","assets/expenseAutomationHelper-DEOPVtcg.js","assets/stripSplatSuffix-CYVrHv_0.js","assets/analyticsHelper-DcvdGte-.js","assets/CompanyPassportScreen-CEuR94fF.js","assets/MobileAppDrawer-DExJFFmi.js","assets/InboxNotificationsProvider-gj6fT2eX.js","assets/useTaskManagerAccess-daSMnBbA.js","assets/useAiCfoDashboardSuggestedQuestionsChips-D_Ro-9Tt.js","assets/FeaturePreviewScreen-LeLfD5pA.js","assets/BillPayRoutes-DFm7lkFc.js","assets/AddressScreen-5ZLJ7_Lf.js","assets/DomesticWireDetailScreen-Dj3JCDGh.js","assets/BusinessVerificationPageScreen-BL6H7JF-.js","assets/DrawerScreen-CxKP-6Rf.js","assets/SetupPagesScreen-D0fdMGb4.js","assets/BillPayApprovalRoutes-DwyJret-.js","assets/ReimbursementApprovalRuleDetailScreen-DTKS2oJ9.js","assets/getLocaleForTenant-C3wVeXiS.js","assets/ReimbursementRoutes-_NvdZWfU.js","assets/ReimbursementApprovalRoutes-DeN7vJtz.js","assets/TransactionListRoutes-2fGCqEq5.js","assets/ZeniAccountStatementScreen-BgdXcTdx.js","assets/SettingsRoutes-BtUbt9zq.js","assets/AccountMappingScreen-BT617fFT.js","assets/QBOConnectionScreen-CbxnK800.js","assets/empty-DQLKD1Hp.js","assets/index-8ioAZPP6.js","assets/url-Ej5v3O6d.js","assets/index-EnAqWoDC.js","assets/accountMappingHelper-DWzrp9Pr.js","assets/useEmailConnectResultRefresh-dVylO6qh.js","assets/ReportsRoutes-BAGPRsE0.js","assets/ChargeCardRoutes-Brg8E0b9.js","assets/useChargeCardPusherEvents-1X1JYShz.js","assets/PeopleRoutes-CulbMsz3.js","assets/ExpenseAutomationRoutes-BYSJ88to.js","assets/useActualMatchingMatchDetail-BkDnJbPg.js","assets/ScheduleDetailsPrepaidExpensesScreen-B5q5sAGy.js","assets/pathToGoBack-DMRqTTJ7.js","assets/TreasuryRoutes-CuPpvoic.js","assets/VendorsRoutes-B_Yg40bd.js","assets/ZeniAccountRoutes-CfMUrMqe.js","assets/AddressRoutes-kiur36N3.js","assets/PandLWithForecastRoutes-CZ27RjQE.js","assets/CustomerOnboardingRoutes-BffNdH_l.js","assets/TransactionDetailRoutes-eA90CTkf.js","assets/EntityDetailRoutes-CRL6OrqO.js","assets/InvoicingRoutes-CvkWcLdT.js","assets/NotificationRoutes-njgUFBoj.js","assets/PerformanceRoutes-BYcI02aB.js","assets/ActualMatchingMatchDetailScreen-B8f2yDaP.js","assets/RewardsRoutes-BUOCW-CT.js","assets/TaskRoutes-DpYRDMWP.js","assets/TaskListScreen-OEgAVE9M.js","assets/AiCfoScreen-CW5K1JhC.js","assets/CardsAiCfoScreen-C-_PDYQc.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as Es,fF as hs,d_ as ps,dZ as xs,AV as gs,di as Rs,c8 as js,gJ as Is,g9 as Ts,df as pe,cG as As,gn as fs,cy as Ds,bE as bs,br as ys,U0 as Cs,v as vs,U3 as Us,bq as Os,U4 as Ps,bK as ws,bJ as Fs,bt as Ls,cu as Vs,U5 as ks,U6 as Hs,da as Ss,dd as Bs,dc as Ns,cF as Ms,cM as Zs,pS as xe,gi as ge,gY as Gs,gk as Re,gL as je,gM as Ie,gl as $s}from"./zeni-epic-state-CZbm731W.js";import{j as e}from"./liveblocks-DKqwsBQp.js";import{a as P}from"./sentry-CxSdF_rC.js";import{N as u,u as zs,h as Ys,i as qs,g as Js,j as G,q as Te,n as Ws,o as n}from"./core-D6EV-11Y.js";import{K as l,E as Ks,u as Qs,z as y,N as Xs,f as et,g as st,d as B,j as tt,O as nt,U as at,L as F,G as Ae,t as _,P as ot,Q as rt,l as ne}from"./index-DvW7BRlL.js";import"./mui-qouWiIWk.js";import{f as fe}from"./analyticsHelper-DcvdGte-.js";import{t as it}from"./getLocaleForTenant-C3wVeXiS.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]="d4fefd11-cef4-4699-9866-d314a3170b3a",o._sentryDebugIdIdentifier="sentry-dbid-d4fefd11-cef4-4699-9866-d314a3170b3a")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-sryCVGSu.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({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`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:U,tenantEmailDomain:v})=>{if(V===!0){if(o)return e.jsx(be,{tenantEmailDomain:v});if(i)return e.jsx(De,{tenantEmailDomain:v});if(U)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(be,{tenantEmailDomain:v}):i?e.jsx(De,{tenantEmailDomain:v}):U?e.jsx(ye,{tenantEmailDomain:v}):D?e.jsx(dt,{tenantEmailDomain:v}):N?e.jsx(ut,{tenantEmailDomain:v}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-CdQzvjb3.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-DFm7lkFc.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-_NvdZWfU.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-2fGCqEq5.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-BtUbt9zq.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-BAGPRsE0.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-Brg8E0b9.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-CulbMsz3.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-BYSJ88to.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-CuPpvoic.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-B_Yg40bd.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-CfMUrMqe.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]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-BAGPRsE0.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),Et=l((()=>s((()=>import("./AddressRoutes-kiur36N3.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),ht=l((()=>s((()=>import("./PeopleRoutes-CulbMsz3.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-CZ27RjQE.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-BffNdH_l.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-B_Yg40bd.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-eA90CTkf.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-CRL6OrqO.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),jt=l((()=>s((()=>import("./DashboardRoutes-CdQzvjb3.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])))),ve=l((()=>s((()=>import("./BillPayRoutes-DFm7lkFc.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])))),It=l((()=>s((()=>import("./SettingsRoutes-BtUbt9zq.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])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-CvkWcLdT.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-_NvdZWfU.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])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-CfMUrMqe.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])))),ft=l((()=>s((()=>import("./TreasuryRoutes-CuPpvoic.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),Dt=l((()=>s((()=>import("./TransactionListRoutes-2fGCqEq5.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),bt=l((()=>s((()=>import("./ChargeCardRoutes-Brg8E0b9.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),yt=l((()=>s((()=>import("./NotificationRoutes-njgUFBoj.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ct=l((()=>s((()=>import("./PerformanceRoutes-BYcI02aB.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),vt=l((()=>s((()=>import("./ExpenseAutomationRoutes-BYSJ88to.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])))),Ut=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-B8f2yDaP.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Ot=l((()=>s((()=>import("./RewardsRoutes-BUOCW-CT.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Pt=l((()=>s((()=>import("./TaskRoutes-DpYRDMWP.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-CW5K1JhC.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,23,54,15,8])))),Oe=l((()=>s((()=>import("./CardsAiCfoScreen-C-_PDYQc.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,8])))),f=l((()=>s((()=>import("./NotFoundScreen-sryCVGSu.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-OEgAVE9M.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:U,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(U===!0){if(D)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),Gt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=zs(),N=Ys(),{tenantEmailDomain:i}=qs(),V=Ks().mode,{setLoading:U,clearAllLoading:v,clearLoading:k}=Qs(),b=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),W=Es(I),$=Js(),[L,we]=P.useState(!1),r=G((a=>hs(a))),{useFeatureGate:H}=Xs(),M=et(),K=st(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=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"?ps(oe,r):void 0,Q=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,ke=tt(r,Ve,oe),{isCardsHidden:He}=nt(r?.tenantId),Se=!ke||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:X}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||rt==="DEV",Ze=r?.userRole!=null&&js(r.userRole),z=G((a=>Is(a)));if(i!=null){const a=y.getSignedInUserTenant(i);I!=null&&a!=null&&fe(I,r,V)}const Z={tenantId:b,userId:I?.userId,sessionId:I?.zeniSessionId},ie=Ts(),h=at(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=As(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?fs(a,Z.tenantId):void 0));P.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&b!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=bs(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();t.isAfter(d,"month")===!1?D(Cs(b,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,b]),P.useEffect((()=>{L||(we(!0),U(F.TENANT_FETCHING))}),[L,Z,ie,I,D,y]),P.useLayoutEffect((()=>{!vs(ie,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c(Gs(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(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,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(q&&cs){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&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&_s&&_.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($s(d.userId,t,d.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,r,b,I,U,D))}),[b,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Us(z.tenantsBaseInOrder)),I!=null&&fe(I,r,V,void 0,z.tenantsBaseInOrder))}),[z,T,r,I]),P.useEffect((()=>{p==="In-Progress"&&U(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),k(F.TENANT_FETCHING),k(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=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=ct[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=r?.userRole!=null&&Os(r?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:Je}=H(B.isAccrualEnabled),We=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,de=!Se&&!O,Qe=Ps(h?.loggedInUserRoleMap),Xe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&ws(h?.loggedInUserRoleMap),_e=Fe&&!O,ss=Le&&!O,ts=ue&&Fs(h?.loggedInUserRoleMap),ns=de&&Ls(h?.loggedInUserRoleMap),as=_e&&Vs(h?.loggedInUserRoleMap),os=ks(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),x=Ms(h?.loggedInUserRoleMap),g=Zs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&is,j=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Qe===!0||os===!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)&&es&&Xe!==!0&&E===!1&&Q===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||W?!L||te!==!1||ee||W?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ws,{children:e.jsxs(n,{element:e.jsx(ot,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{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(jt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&O===!1||We||Ke?e.jsx(Rt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&O===!1?e.jsx(Dt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&O===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&O===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Pt,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(Et,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(f,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(ft,{}):e.jsx(f,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Ct,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&O===!1?e.jsx(vt,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&O===!1&&Je===!0?e.jsx(Ut,{}):e.jsx(f,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(yt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(gt,{}):e.jsx(f,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(It,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):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(bt,{}):e.jsx(f,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(Ot,{}):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(wt,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"*",element:e.jsx(f,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,Gt as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-DKqwsBQp.js";import{a as d}from"./sentry-CxSdF_rC.js";import{h as N,g as H,u as _,i as O,j as C,l as K,n as Y,o as k}from"./core-D6EV-11Y.js";import{fF as w,Zd as Pe,Ns as ve,YN as we,YW as Ae,c8 as W,cT as De,cU as Ue,bq as _e,de as Re,FR as Te,Ze as Me,OV as Be,Mj as Ze,Ma as de,M7 as Fe,FV as ue,Md as pe,Mg as ge,Mm as X,C5 as ee,FU as Ve,lu as $,lx as me,Zf as Ne,mH as Oe,Gb as Le,Vt as Ge,Vu as $e,ls as He,Zg as Ke,lv as qe,uA as ze,Vo as Qe,Vp as Ye,uE as Je,hV as We,Un as Q,hN as ae,hK as Xe,hS as en,Uo as nn,G8 as tn,Zh as an,Zi as on,MA as sn,l$ as rn,dZ as fe,d_ as he,Zj as ln,gC as cn,UD as dn,G7 as oe,gH as se,gG as un,G6 as pn,gF as gn,gE as mn,Zk as fn,TP as Ce,Zl as hn,Zm as Cn,Zn as yn,Zo as Sn,Zp as bn,Zq as In,Ge as xn,Zr as En,G5 as ie,F$ as G,Zs as kn,Zt as jn,Zu as re,Zv as Pn,dS as vn,Zw as wn,Zx as An,Zy as Dn,T$ as Un,c0 as _n,c7 as Rn,c6 as Tn,c1 as Mn,Zz as Bn,c4 as Zn,c3 as Fn,c5 as Vn,c2 as Nn}from"./zeni-epic-state-CZbm731W.js";import{bS as On,z as v,U as L,a7 as ne,c2 as Ln,l as q,N as te,d as F,j as ye,O as Se,c3 as Gn,k as $n,Z as be,c4 as Hn,ai as Kn,c5 as qn,c6 as zn,aq as Qn,c7 as Yn,p as Jn,e as Ie,c8 as Wn}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-DKqwsBQp.js";import{a as d}from"./sentry-CxSdF_rC.js";import{h as N,g as H,u as _,i as O,j as C,l as K,n as Y,o as k}from"./core-D6EV-11Y.js";import{fF as w,Zd as Pe,Ns as ve,YN as we,YW as Ae,c8 as W,cT as De,cU as Ue,bq as _e,de as Re,FR as Te,Ze as Me,OV as Be,Mj as Ze,Ma as de,M7 as Fe,FV as ue,Md as pe,Mg as ge,Mm as X,C5 as ee,FU as Ve,lu as $,lx as me,Zf as Ne,mH as Oe,Gb as Le,Vt as Ge,Vu as $e,ls as He,Zg as Ke,lv as qe,uA as ze,Vo as Qe,Vp as Ye,uE as Je,hV as We,Un as Q,hN as ae,hK as Xe,hS as en,Uo as nn,G8 as tn,Zh as an,Zi as on,MA as sn,l$ as rn,dZ as fe,d_ as he,Zj as ln,gC as cn,UD as dn,G7 as oe,gH as se,gG as un,G6 as pn,gF as gn,gE as mn,Zk as fn,TP as Ce,Zl as hn,Zm as Cn,Zn as yn,Zo as Sn,Zp as bn,Zq as In,Ge as xn,Zr as En,G5 as ie,F$ as G,Zs as kn,Zt as jn,Zu as re,Zv as Pn,dS as vn,Zw as wn,Zx as An,Zy as Dn,T$ as Un,c0 as _n,c7 as Rn,c6 as Tn,c1 as Mn,Zz as Bn,c4 as Zn,c3 as Fn,c5 as Vn,c2 as Nn}from"./zeni-epic-state-CZbm731W.js";import{bS as On,z as v,U as L,a7 as ne,c2 as Ln,l as q,N as te,d as F,j as ye,O as Se,c3 as Gn,k as $n,Z as be,c4 as Hn,ai as Kn,c5 as qn,c6 as zn,aq as Qn,c7 as Yn,p as Jn,e as Ie,c8 as Wn}from"./index-DvW7BRlL.js";import{n as B}from"./mui-qouWiIWk.js";import{u as xe}from"./useTaskManagerAccess-daSMnBbA.js";import{U as Xn}from"./AccountMappingScreen-BT617fFT.js";import{t as et,A as nt}from"./AddressScreen-5ZLJ7_Lf.js";import V from"./NotFoundScreen-sryCVGSu.js";import{g as tt}from"./analyticsHelper-DcvdGte-.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-BL6H7JF-.js";import{C as st}from"./CompanyPassportScreen-CEuR94fF.js";import{M as T}from"./MobileAppDrawer-DExJFFmi.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-dVylO6qh.js";import{q as le}from"./QBOConnectionScreen-CbxnK800.js";import{B as lt}from"./BillPayApprovalRoutes-DwyJret-.js";import{R as ct}from"./ReimbursementApprovalRoutes-DeN7vJtz.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";import"./accountMappingHelper-DWzrp9Pr.js";import"./routePaths-GYFjoelZ.js";import"./InboxNotificationsProvider-gj6fT2eX.js";import"./empty-DQLKD1Hp.js";import"./pdf-lib-DndwkHl6.js";import"./index-8ioAZPP6.js";import"./url-Ej5v3O6d.js";import"./index-EnAqWoDC.js";import"./decodeURIComponentSafe-MQV5aj_5.js";import"./ReimbursementApprovalRuleDetailScreen-DTKS2oJ9.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]="51c03a40-8799-4c00-82e3-366ae2dc4b01",e._sentryDebugIdIdentifier="sentry-dbid-51c03a40-8799-4c00-82e3-366ae2dc4b01")}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-DKqwsBQp.js";import{h as Q,g as X,u as ee,i as G,j as v,N as j,l as H,t as Xe}from"./core-D6EV-11Y.js";import{bJ as en,fF as F,cG as nn,HG as $,YN as tn,YQ as an,uT as ne,uH as te,mz as ae,BD as R,YS as Ce,gG as We,gF as Ge,gE as He,YT as sn,HP as on,Mj as he,Ma as Ie,M7 as Ae,LR as J,Md as _e,Mg as ke,Mm as ve,C5 as Pe,g_ as cn,cB as rn,d_ as un,dZ as dn,di as ln,bt as pn,cu as Fe,YU as mn,KR as de,Lt as yn,YV as fn,bK as gn,NE as le,Ns as Sn,YW as bn,YX as Cn,NI as hn,NM as In,YY as je,Bw as An,S8 as _n,Oi as be,P7 as pe,YZ as kn,Y_ as vn,Y$ as Pn,Z0 as Ye,Z1 as Tn,Vc as En,Y2 as Dn,Vr as Un,Z2 as Ke,LV as wn,Vs as On,LZ as Fn,Z3 as Oe,Os as qe,mH as Vn,uK as Je,BF as xn,bE as Ne,BR as Re,cE as Bn,Z4 as Qe,N$ as jn,O0 as Nn,O4 as Rn,Z5 as Ln,Ol as Le,Z6 as Mn,Z7 as zn,Z8 as Zn,Z9 as $n,gV as Wn,I_ as Gn,Za as Hn,J3 as Yn,J2 as Kn}from"./zeni-epic-state-CZbm731W.js";import{ai as Te,U as ie,N as me,d as q,E as Ee,z as E,a8 as se,l as D,a7 as De,T as W,bP as qn,ae as oe,bQ as V,bi as Ve,bR as Jn,bS as Qn,bT as Xn,q as Be,bU as et,p as Me,aG as ze,a1 as nt,ab as tt,bV as at,bW as it,bX as st,w as ot}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-DKqwsBQp.js";import{h as Q,g as X,u as ee,i as G,j as v,N as j,l as H,t as Xe}from"./core-D6EV-11Y.js";import{bJ as en,fF as F,cG as nn,HG as $,YN as tn,YQ as an,uT as ne,uH as te,mz as ae,BD as R,YS as Ce,gG as We,gF as Ge,gE as He,YT as sn,HP as on,Mj as he,Ma as Ie,M7 as Ae,LR as J,Md as _e,Mg as ke,Mm as ve,C5 as Pe,g_ as cn,cB as rn,d_ as un,dZ as dn,di as ln,bt as pn,cu as Fe,YU as mn,KR as de,Lt as yn,YV as fn,bK as gn,NE as le,Ns as Sn,YW as bn,YX as Cn,NI as hn,NM as In,YY as je,Bw as An,S8 as _n,Oi as be,P7 as pe,YZ as kn,Y_ as vn,Y$ as Pn,Z0 as Ye,Z1 as Tn,Vc as En,Y2 as Dn,Vr as Un,Z2 as Ke,LV as wn,Vs as On,LZ as Fn,Z3 as Oe,Os as qe,mH as Vn,uK as Je,BF as xn,bE as Ne,BR as Re,cE as Bn,Z4 as Qe,N$ as jn,O0 as Nn,O4 as Rn,Z5 as Ln,Ol as Le,Z6 as Mn,Z7 as zn,Z8 as Zn,Z9 as $n,gV as Wn,I_ as Gn,Za as Hn,J3 as Yn,J2 as Kn}from"./zeni-epic-state-CZbm731W.js";import{ai as Te,U as ie,N as me,d as q,E as Ee,z as E,a8 as se,l as D,a7 as De,T as W,bP as qn,ae as oe,bQ as V,bi as Ve,bR as Jn,bS as Qn,bT as Xn,q as Be,bU as et,p as Me,aG as ze,a1 as nt,ab as tt,bV as at,bW as it,bX as st,w as ot}from"./index-DvW7BRlL.js";import{a as h}from"./sentry-CxSdF_rC.js";import{n as xe,D as ct,S as rt}from"./mui-qouWiIWk.js";import{u as ut,B as we}from"./BusinessVerificationPageScreen-BL6H7JF-.js";import{M as ye}from"./MobileAppDrawer-DExJFFmi.js";import N from"./NotFoundScreen-sryCVGSu.js";import{a as Ze}from"./analyticsHelper-DcvdGte-.js";import{d as $e}from"./routePaths-GYFjoelZ.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]="9bc95200-356d-44f3-a384-97553a17239a",e._sentryDebugIdIdentifier="sentry-dbid-9bc95200-356d-44f3-a384-97553a17239a")}catch{}})();const dt=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-DKqwsBQp.js";import{a as u,R as T,q as A}from"./sentry-CxSdF_rC.js";import{u as z,h as D,j as l,g as j,N as F,l as M}from"./core-D6EV-11Y.js";import{u as O,z as s,E as P,l as w,G as N,S as _,T as B,V,X as $,Y as q,Z as v}from"./index-
|
|
1
|
+
import{j as f}from"./liveblocks-DKqwsBQp.js";import{a as u,R as T,q as A}from"./sentry-CxSdF_rC.js";import{u as z,h as D,j as l,g as j,N as F,l as M}from"./core-D6EV-11Y.js";import{u as O,z as s,E as P,l as w,G as N,S as _,T as B,V,X as $,Y as q,Z as v}from"./index-DvW7BRlL.js";import{fF as J,TL as R,U3 as W,gi as X,gk as Y,U8 as G,gU as H,dj as Z,U9 as y,Ua as K,Ub as Q,b$ as U}from"./zeni-epic-state-CZbm731W.js";import"./mui-qouWiIWk.js";import{u as ee}from"./useDeviceId-RToKfM0O.js";import{f as te}from"./analyticsHelper-DcvdGte-.js";import{t as ne}from"./getLocaleForTenant-C3wVeXiS.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";(function(){try{var 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]="8c35f72b-4383-4283-85dd-65fe13c68efa",t._sentryDebugIdIdentifier="sentry-dbid-8c35f72b-4383-4283-85dd-65fe13c68efa")}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(Q({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(K(n,a)))},clearSignInError:()=>{t(y())}}}))(q),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=O(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:L,accountLocked:b,accountUnlockTime:k}=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=>J(e))),I=l((e=>R(e))),m=j(),E=P().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{L.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[L.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.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(W(I.tenantsInOrder),o.zeniSessionId),X(o.userId,o.zeniSessionId,r.tenantId),i(Y(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",Z(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 f.jsx(F,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&k!=null?f.jsx(V,{onClose:()=>i(y()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DKqwsBQp.js";import{a as i}from"./sentry-CxSdF_rC.js";import{u as f,g as d,N as u}from"./core-D6EV-11Y.js";import{z as n,l as a,T as m,a7 as p}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-DKqwsBQp.js";import{a as i}from"./sentry-CxSdF_rC.js";import{u as f,g as d,N as u}from"./core-D6EV-11Y.js";import{z as n,l as a,T as m,a7 as p}from"./index-DvW7BRlL.js";import{gX as g,Up as y}from"./zeni-epic-state-CZbm731W.js";import{n as b}from"./mui-qouWiIWk.js";import"./recharts-C9zWmt1W.js";import"./analytics-wktvfErl.js";import"./plaid-deRHM6gT.js";import"./dnd-CkchuQYc.js";import"./stripe-cKAAJElX.js";import"./lottie-BwhdO6jl.js";import"./lexical-C6tQwGBF.js";import"./pdf-DcGn_mX8.js";import"./utils-D8aAQJhF.js";(function(){try{var 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]="4e78b738-ee5a-4720-985c-02719b0e526e",e._sentryDebugIdIdentifier="sentry-dbid-4e78b738-ee5a-4720-985c-02719b0e526e")}catch{}})();function N(){const e=f(),t=d(),r=i.useRef(!1),l=n.isSignedIn(),o=t.state?.message==="logout"||l;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(c){console.error("Error during sign out:",c)}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 C}from"./liveblocks-DKqwsBQp.js";import{a as f}from"./sentry-CxSdF_rC.js";import{h as pe,u as Te,g as fe,k as ge,j as F,i as _e,l as me}from"./core-D6EV-11Y.js";import{aK as De,aL as be,z as x,N as Se,d as G,as as he,a8 as Ee,l as ye,T as Ae,e7 as Ce,p as R,a4 as Ge}from"./index-
|
|
1
|
+
import{j as C}from"./liveblocks-DKqwsBQp.js";import{a as f}from"./sentry-CxSdF_rC.js";import{h as pe,u as Te,g as fe,k as ge,j as F,i as _e,l as me}from"./core-D6EV-11Y.js";import{aK as De,aL as be,z as x,N as Se,d as G,as as he,a8 as Ee,l as ye,T as Ae,e7 as Ce,p as R,a4 as Ge}from"./index-DvW7BRlL.js";import{fF as Ie,a1T as H,QW as B,a1U as J,a1P as Be,Qi as M,a1V as Ke,Qq as W,Q0 as Le,PE as ve,QX as V,a1W as q,gh as we,QN as Re,QS as Ue,QF as Pe,QD as X,QT as Fe,QA as je,a1X as xe,a1Y as $e,a1Z as Ne,a1_ as Qe,a1$ as I,dx as Oe,dw as Ze,a20 as ze,PZ as Me}from"./zeni-epic-state-CZbm731W.js";import{n as We}from"./mui-qouWiIWk.js";import{u as Ve}from"./useAskAiCfoHostNavButtonProps-DV4bjx-y.js";import{M as qe}from"./MobileAppDrawer-DExJFFmi.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="fe6d3ccb-ea8e-451e-949d-9ec2d0475d19",a._sentryDebugIdIdentifier="sentry-dbid-fe6d3ccb-ea8e-451e-949d-9ec2d0475d19")}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"},Xe=(a,e)=>a==null||a===""?[]:e.map((n=>`private-encrypted-${a}.${n}`)),Ye=(a,e)=>a==null||a===""?[]:e.map((n=>`private-encrypted-${a}.${n}`)),U=a=>Array.isArray(a)&&a.every((e=>typeof e=="string")),He=a=>{if(a==null||typeof a!="object")return null;const e=a,n=typeof e.task_id=="string"?e.task_id:typeof e.id=="string"?e.id:null;if(n==null||typeof e.tenant_id!="string"||typeof e.event_type!="string")return null;const o={task_id:n,tenant_id:e.tenant_id,event_type:e.event_type};return typeof e.is_private=="boolean"&&(o.is_private=e.is_private),U(e.assignees)&&(o.assignees=e.assignees),U(e.direct_assignees)&&(o.direct_assignees=e.direct_assignees),typeof e.created_by=="string"&&(o.created_by=e.created_by),U(e.task_group_ids)&&(o.task_group_ids=e.task_group_ids),typeof e.name=="string"&&(o.name=e.name),typeof e.parent_task_id=="string"&&(o.parent_task_id=e.parent_task_id),o},Je=a=>{if(a==null||typeof a!="object")return null;const e=a;return U(e.task_ids)?{task_ids:e.task_ids}:null},pa=a=>{if(a==null||typeof a!="object")return null;const e=a;return typeof e.task_id!="string"?null:{task_id:e.task_id}},ea=a=>{const{events:e,onEvent:n,onSubscribed:o}=a,i=De(),g=f.useRef(n),l=f.useRef(o),_=f.useRef(0);f.useEffect((()=>{g.current=n}),[n]),f.useEffect((()=>{l.current=o}),[o]);const t=f.useMemo((()=>[...e].sort().join("|")),[e]);f.useEffect((()=>{if(i==null||e.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return e.forEach((m=>{const[D,b]=be(m);if(b==="")return;const E=i.channel(D),y=T=>{g.current(b,T)};let k;if(E?.subscribed===!0){if(k=E,k.bind(b,y),!p.has(D)){p.add(D),S();const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{E.unbind(b,y)}))}else{if(k=E??i.subscribe(D),k.bind(b,y),!p.has(D)){p.add(D);const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{k.unbind(b,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},aa=We.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|