@zeniai/web-app-ui 5.2.4-dev → 5.2.4-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/{AddressRoutes-BXnlTnkY.js → AddressRoutes-Bin_-K_m.js} +1 -1
- package/dist/assets/{AddressScreen-CB9yyUzu.js → AddressScreen-DPky5m5p.js} +1 -1
- package/dist/assets/{AiCfoScreen-CKqIopzI.js → AiCfoScreen-CZ7ChzrU.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BmW8MwVg.js → BillPayApprovalRoutes-DxZ6VlCA.js} +1 -1
- package/dist/assets/{BillPayRoutes-DyoJo0OV.js → BillPayRoutes-DgKQh94m.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-ZC7zpCv9.js → BusinessVerificationPageScreen-KgJTV7Is.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BUjO4McZ.js → CardsAiCfoScreen-id-ok7dm.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BDv3hLUk.js → ChargeCardRoutes-CUM1XRJC.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-K4hqR_Of.js → CompanyPassportScreen-H0QfpM1f.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DAezivTp.js → ConnectionAuthScreen-r4ARxp1N.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-C_cijkIN.js → CustomerOnboardingAuthScreen-DcXY4hVl.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-DCxx1Kil.js → CustomerOnboardingRoutes-BJ-pDPua.js} +1 -1
- package/dist/assets/{DashboardRoutes-Btf5qopD.js → DashboardRoutes-BjEybUEO.js} +1 -1
- package/dist/assets/{DefaultTenantHome-B_OJQApA.js → DefaultTenantHome-DXe7duY4.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-CQ4WVqeB.js → DomesticWireDetailScreen-BHH-3Zfz.js} +1 -1
- package/dist/assets/{DrawerScreen-CKbiBlQ7.js → DrawerScreen-CbHABUlJ.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CXOFU7L0.js → EntityDetailRoutes-Bw3yJXeA.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CBWPXFBc.js → ExpenseAutomationRoutes-CZg6wwTP.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BpeRjZY3.js → FeaturePreviewScreen-BtXMKquo.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-DlYkrIqG.js → HubSpotOAuthCallbackScreen-BsXYwpqT.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CaXk_v56.js → MagicLinkRoutes-BU76CdTB.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-vuzJ-6hl.js → MagicLinkSignInScreen-C9-ykp4a.js} +1 -1
- package/dist/assets/{MobileAppDrawer-mJR72DtA.js → MobileAppDrawer-RaFZojI2.js} +1 -1
- package/dist/assets/{NotFoundScreen-pjqYHD4T.js → NotFoundScreen-BfdMMfOd.js} +1 -1
- package/dist/assets/{NotificationRoutes-ByaUuLZp.js → NotificationRoutes-B6Fho7CZ.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BS4pnhQZ.js → OAuthConsentScreen-DIQpmOn6.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-BuWtsXet.js → PandLWithForecastRoutes-uEOcxynq.js} +1 -1
- package/dist/assets/{PeopleRoutes-D5NuJRM4.js → PeopleRoutes-CTZ5Ab9z.js} +1 -1
- package/dist/assets/{PerformanceRoutes-C-yfLnvY.js → PerformanceRoutes-DI6Gk7ru.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-jkZ_cdH1.js → QBOConnectionScreen-BzHolJYM.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CqCLBt6r.js → ReimbursementApprovalRoutes-DqsLGNjl.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CKegjQI1.js → ReimbursementApprovalRuleDetailScreen-DTbwLilz.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-B-igsw0G.js → ReimbursementRoutes-BOOguVf8.js} +1 -1
- package/dist/assets/{ReportsRoutes-BycueTT3.js → ReportsRoutes-Xr75d9QG.js} +1 -1
- package/dist/assets/{RewardsRoutes-Ch6pfaDA.js → RewardsRoutes-B5t90hW9.js} +1 -1
- package/dist/assets/{ScreenRoutes-xFFl0XFK.js → ScreenRoutes-s_Chyeso.js} +2 -2
- package/dist/assets/{SettingsRoutes-DRVdoSec.js → SettingsRoutes-oYnSHuDu.js} +1 -1
- package/dist/assets/{SetupPagesScreen-DAr5O2oq.js → SetupPagesScreen-CsxRnYId.js} +1 -1
- package/dist/assets/{SignInScreen-Ba-ThhTj.js → SignInScreen-C1h66mzA.js} +1 -1
- package/dist/assets/{SignOutScreen-CeSek43w.js → SignOutScreen-CwtEJnaE.js} +1 -1
- package/dist/assets/{TaskListScreen-DVm-Drto.js → TaskListScreen-I-OxNnjm.js} +1 -1
- package/dist/assets/{TaskRoutes-D3gd8Kav.js → TaskRoutes-BP3wb_Xk.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-DcF4U6JF.js → TransactionDetailRoutes-Bou9_9v6.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DEAM6N6x.js → TransactionDetailScreen-Dnm1o3gy.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DE5hGaE1.js → TransactionListRoutes-DgbRRWdV.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DF39pPb4.js → TreasuryRoutes-DMeTx-NL.js} +1 -1
- package/dist/assets/{VendorsRoutes-CaSeST5s.js → VendorsRoutes-CHJQpOtj.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-B7lAVdPL.js → WiseConfirmationScreen-Cg5IVzZr.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-CZD4gpA3.js → ZeniAccountRoutes-DJOehvVf.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BThXS9vz.js → ZeniAccountStatementScreen-Bh1xYJTJ.js} +1 -1
- package/dist/assets/{analyticsHelper-CI2hKrei.js → analyticsHelper-u_wRIr-A.js} +1 -1
- package/dist/assets/{getLocaleForTenant-C8WDJQ34.js → getLocaleForTenant-C9HoG54f.js} +1 -1
- package/dist/assets/{index-DSrpVU5Y.js → index-slT6Cmx8.js} +5 -5
- package/dist/assets/{routePaths-c5aFJU-F.js → routePaths-C58Oct92.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BvBKI7vl.js → useAiCfoDashboardSuggestedQuestionsChips-COhzCx2s.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-DndeBqh3.js → useAskAiCfoHostNavButtonProps-EdOjchhB.js} +1 -1
- package/dist/assets/{useCashManagementBanner-gscfpQYY.js → useCashManagementBanner-BrwTPpdL.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-BZ0crBRh.js → useChargeCardPusherEvents-BBew6xbf.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-DHdvN73b.js → useEmailConnectResultRefresh-CYew-P-Z.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CvusWtwP.js → useInitialThreadRequest-Dcty95yd.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-B9Gn_Jtc.js → withTransactionSidePanel-C_PdEYzg.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-C01HsTej.js";import{g as G,h as ge,u as Ce,i as we,j as d,n as Ie,o as Se,p as H}from"./core-DI1Smcxr.js";import{eW as L,fS as w,Mt as Te,kA as K,qU as Q,rJ as A,ko as Re,js as Me,vg as X,rO as Oe,bs as Ae,Mu as Fe,bn as ke,wp as De,Mv as je,Mw as Ee,v8 as Pe,Mx as Y,My as Le,Mz as ve,MA as Be,MB as Ve,MC as I,MD as F,ME as k,MF as N,MG as D,MH as j,dI as Ue,w5 as xe,vV as $,vW as q,wb as ze,v_ as J,wh as Ge,MI as He,MJ as Ye,MK as Ne,ML as $e,MM as qe,fD as Je,fB as Ze}from"./zeni-epic-state-CGEUbbPd.js";import{U as We,V as Ke,Y as Qe,Z as Xe,J as ea,C as ee,G as E,z as ae,_ as aa,T as sa,c as ta,$ as oa,a0 as na,x as ra,e as P,g as ia,a1 as la,s as se,a2 as ca,a3 as da,a4 as pa}from"./index-DSrpVU5Y.js";import"./mui-DZ-Vvmtg.js";import fa from"./NotFoundScreen-pjqYHD4T.js";import{F as ma}from"./FeaturePreviewScreen-BpeRjZY3.js";import{a as _}from"./sentry-B-4V3RdH.js";import{u as ua}from"./useInitialThreadRequest-CvusWtwP.js";import{t as Z,a as W,b as _a}from"./routePaths-c5aFJU-F.js";import{M as ha}from"./MobileAppDrawer-mJR72DtA.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.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]="a346743f-14d0-422f-89b9-d0299edb7dc3",e._sentryDebugIdIdentifier="sentry-dbid-a346743f-14d0-422f-89b9-d0299edb7dc3")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(Ne()),e($e()),e(qe())},ga=Ie((function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=Fe(u);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,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:K(e),isAccountingProjectsEnabled:Q(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(He(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter((g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year"))),e($(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(J({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(J(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(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(xe({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=Ue(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 m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(N({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({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(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(ve({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ya(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}}))(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Xe(),f=ea(),u=da(f),a=ge(),s=Ce(),t=G(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[v,te]=_.useState(!1),{isFeatureEnabled:B}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d((n=>L(n))),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d((n=>w(n).fetchState)),ie=d((n=>Te(n))),{areTenantIdsInSync:h}=aa(),R=d((n=>n.financeStatementState.selectedReportId)),V=d((n=>K(n))),M=d((n=>Q(n))),le=d((n=>w(n).isCompareModeOn)),b=d((n=>w(n).filter)),O=d((n=>w(n).selectedReportAndTimeframeFetchState)),ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));_.useEffect((()=>{!i&&h&&(g(!0),s(A(c.userId,!0,!0,!1)))}),[i,c,s,h]),_.useEffect((()=>{i&&!v&&C==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))}),[i,v,C,h]),_.useEffect((()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":M&&s(X());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}}),[i,R,O,h,V,M]);const U=sa(),de=U?.loggedInUserRole!=null&&Ae(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return(function(n){const{isDataReady:_e}=n,{pathname:he}=G(),z=We(he??"")==="reports",be=Ke(_e),ye=_.useMemo((()=>z?ba:void 0),[z]);Qe({canFetchSuggestedQuestions:be,pageContexts:ye})})({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d((s=>L(s))),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Je(f,e),a=Ze(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(H,{path:"/",element:p.jsx(Ca,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
1
|
+
import{j as p}from"./liveblocks-C01HsTej.js";import{g as G,h as ge,u as Ce,i as we,j as d,n as Ie,o as Se,p as H}from"./core-DI1Smcxr.js";import{eW as L,fS as w,Mt as Te,kA as K,qU as Q,rJ as A,ko as Re,js as Me,vg as X,rO as Oe,bs as Ae,Mu as Fe,bn as ke,wp as De,Mv as je,Mw as Ee,v8 as Pe,Mx as Y,My as Le,Mz as ve,MA as Be,MB as Ve,MC as I,MD as F,ME as k,MF as N,MG as D,MH as j,dI as Ue,w5 as xe,vV as $,vW as q,wb as ze,v_ as J,wh as Ge,MI as He,MJ as Ye,MK as Ne,ML as $e,MM as qe,fD as Je,fB as Ze}from"./zeni-epic-state-CGEUbbPd.js";import{U as We,V as Ke,Y as Qe,Z as Xe,J as ea,C as ee,G as E,z as ae,_ as aa,T as sa,c as ta,$ as oa,a0 as na,x as ra,e as P,g as ia,a1 as la,s as se,a2 as ca,a3 as da,a4 as pa}from"./index-slT6Cmx8.js";import"./mui-DZ-Vvmtg.js";import fa from"./NotFoundScreen-BfdMMfOd.js";import{F as ma}from"./FeaturePreviewScreen-BtXMKquo.js";import{a as _}from"./sentry-B-4V3RdH.js";import{u as ua}from"./useInitialThreadRequest-Dcty95yd.js";import{t as Z,a as W,b as _a}from"./routePaths-C58Oct92.js";import{M as ha}from"./MobileAppDrawer-RaFZojI2.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.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]="a346743f-14d0-422f-89b9-d0299edb7dc3",e._sentryDebugIdIdentifier="sentry-dbid-a346743f-14d0-422f-89b9-d0299edb7dc3")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(Ne()),e($e()),e(qe())},ga=Ie((function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=Fe(u);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,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:K(e),isAccountingProjectsEnabled:Q(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(He(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter((g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year"))),e($(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(J({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(J(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(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(xe({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=Ue(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 m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(N({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({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(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(ve({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ya(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}}))(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Xe(),f=ea(),u=da(f),a=ge(),s=Ce(),t=G(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[v,te]=_.useState(!1),{isFeatureEnabled:B}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d((n=>L(n))),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d((n=>w(n).fetchState)),ie=d((n=>Te(n))),{areTenantIdsInSync:h}=aa(),R=d((n=>n.financeStatementState.selectedReportId)),V=d((n=>K(n))),M=d((n=>Q(n))),le=d((n=>w(n).isCompareModeOn)),b=d((n=>w(n).filter)),O=d((n=>w(n).selectedReportAndTimeframeFetchState)),ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));_.useEffect((()=>{!i&&h&&(g(!0),s(A(c.userId,!0,!0,!1)))}),[i,c,s,h]),_.useEffect((()=>{i&&!v&&C==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))}),[i,v,C,h]),_.useEffect((()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":M&&s(X());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}}),[i,R,O,h,V,M]);const U=sa(),de=U?.loggedInUserRole!=null&&Ae(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return(function(n){const{isDataReady:_e}=n,{pathname:he}=G(),z=We(he??"")==="reports",be=Ke(_e),ye=_.useMemo((()=>z?ba:void 0),[z]);Qe({canFetchSuggestedQuestions:be,pageContexts:ye})})({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d((s=>L(s))),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Je(f,e),a=Ze(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(H,{path:"/",element:p.jsx(Ca,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-C01HsTej.js";import{z as b,x as S,e as f,g as C,d7 as E,C as k,G as I}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-C01HsTej.js";import{z as b,x as S,e as f,g as C,d7 as E,C as k,G as I}from"./index-slT6Cmx8.js";import"./mui-DZ-Vvmtg.js";import g from"./NotFoundScreen-BfdMMfOd.js";import{a as c}from"./sentry-B-4V3RdH.js";import{u as D,j as h,h as F,g as T,n as L,o as U,p as u,N as y}from"./core-DI1Smcxr.js";import{eW as _,TE as w,TF as p,vM as G,fJ as P,TG as V,vK as z}from"./zeni-epic-state-CGEUbbPd.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.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]="6c5873ca-213b-4886-8085-4e562b0a2bb1",e._sentryDebugIdIdentifier="sentry-dbid-6c5873ca-213b-4886-8085-4e562b0a2bb1")}catch{}})();const J=L((function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(V({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(E),K=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),m=F(),x=T(),d=b.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>w(o))),j=d?.firstName!=null?d.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(G()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(P(!0)))}),[l.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(S,{analytics:f,onLoad:o=>(N=>N.trackPageLoaded(C.Event.inviteEmailViewed))(o)}):null,a.jsx(J,{navigate:m,location:x,currentTenant:r,companyName:v,userName:j,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(u,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(K,{}):a.jsx(g,{})}),a.jsx(u,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as t,bn as us,eW as cs,fD as ds,fB as ms,gl as _s,fq as hs,cW as Ee,cC as ps,fT as Es,cu as Rs,bE as xs,bo as gs,fX as Is,v as Ts,L$ as js,bs as As,M0 as fs,bK as Ds,bJ as ys,bt as bs,cq as Cs,M1 as vs,M2 as Us,cS as ws,cV as Os,cU as Ps,cB as Fs,cI as Ls,oc as Re,fz as xe,gv as Hs,f$ as ge,gs as Ie,gt as Te,g0 as ks}from"./zeni-epic-state-CGEUbbPd.js";import{j as e}from"./liveblocks-C01HsTej.js";import{a as O}from"./sentry-B-4V3RdH.js";import{u as Bs,h as Vs,i as Ss,g as Ns,j as z,l as je,N as u,o as Ms,p as a}from"./core-DI1Smcxr.js";import{y as Zs,u as zs,z as D,C as Gs,c as $s,P as Ws,G,i as qs,X as Ys,T as Xs,L as F,a as Ae,t as _,d as Js,e as Q,l}from"./index-DSrpVU5Y.js";import"./mui-DZ-Vvmtg.js";import{f as fe}from"./analyticsHelper-CI2hKrei.js";import{t as Ks}from"./getLocaleForTenant-C8WDJQ34.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},j=new o.Error().stack;j&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[j]="492ecada-138c-4b2d-af44-c0e9425745e9",o._sentryDebugIdIdentifier="sentry-dbid-492ecada-138c-4b2d-af44-c0e9425745e9")}catch{}})();const Qs={dashboard:()=>t((()=>import("./DashboardRoutes-Btf5qopD.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>t((()=>import("./BillPayRoutes-DyoJo0OV.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t((()=>import("./ReimbursementRoutes-B-igsw0G.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t((()=>import("./TransactionListRoutes-DE5hGaE1.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t((()=>import("./SettingsRoutes-DRVdoSec.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t((()=>import("./ReportsRoutes-BycueTT3.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-BDv3hLUk.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t((()=>import("./PeopleRoutes-D5NuJRM4.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-CBWPXFBc.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t((()=>import("./TreasuryRoutes-DF39pPb4.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t((()=>import("./VendorsRoutes-CaSeST5s.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t((()=>import("./ZeniAccountRoutes-CZD4gpA3.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},st=l((()=>t((()=>import("./ReportsRoutes-BycueTT3.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])))),tt=l((()=>t((()=>import("./AddressRoutes-BXnlTnkY.js")),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20])))),nt=l((()=>t((()=>import("./PeopleRoutes-D5NuJRM4.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])))),at=l((()=>t((()=>import("./PandLWithForecastRoutes-BuWtsXet.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20])))),ot=l((()=>t((()=>import("./CustomerOnboardingRoutes-DCxx1Kil.js")),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20])))),rt=l((()=>t((()=>import("./VendorsRoutes-CaSeST5s.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])))),it=l((()=>t((()=>import("./TransactionDetailRoutes-DcF4U6JF.js")),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20])))),De=l((()=>t((()=>import("./EntityDetailRoutes-CXOFU7L0.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20])))),lt=l((()=>t((()=>import("./DashboardRoutes-Btf5qopD.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))),ye=l((()=>t((()=>import("./BillPayRoutes-DyoJo0OV.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])))),ut=l((()=>t((()=>import("./SettingsRoutes-DRVdoSec.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])))),be=l((()=>t((()=>import("./ReimbursementRoutes-B-igsw0G.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])))),ct=l((()=>t((()=>import("./ZeniAccountRoutes-CZD4gpA3.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20])))),dt=l((()=>t((()=>import("./TreasuryRoutes-DF39pPb4.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])))),mt=l((()=>t((()=>import("./TransactionListRoutes-DE5hGaE1.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])))),_t=l((()=>t((()=>import("./ChargeCardRoutes-BDv3hLUk.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])))),ht=l((()=>t((()=>import("./NotificationRoutes-ByaUuLZp.js")),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20])))),pt=l((()=>t((()=>import("./PerformanceRoutes-C-yfLnvY.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20])))),Et=l((()=>t((()=>import("./ExpenseAutomationRoutes-CBWPXFBc.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])))),Rt=l((()=>t((()=>import("./RewardsRoutes-Ch6pfaDA.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20])))),xt=l((()=>t((()=>import("./TaskRoutes-D3gd8Kav.js")),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20])))),gt=l((()=>t((()=>import("./AiCfoScreen-CKqIopzI.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20])))),Ce=l((()=>t((()=>import("./CardsAiCfoScreen-BUjO4McZ.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,20])))),b=l((()=>t((()=>import("./NotFoundScreen-pjqYHD4T.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,20])))),It=l((()=>t((()=>import("./TaskListScreen-DVm-Drto.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20]))));function Nt({setTenantEmailDomain:o}){const j=Bs(),B=Vs(),{tenantEmailDomain:i}=Ss(),L=Zs().mode,{setLoading:U,clearAllLoading:C,clearLoading:H}=zs(),v=D.getSignedInUserTenant(i)?.tenantId,I=D.getSignedInUser(),se=us(I),$=Ns(),[V,Pe]=O.useState(!1),r=z((n=>cs(n))),{useFeatureGate:N}=Gs(),M=$s(),te=Ws(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:He}=N(G.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(G.isDebitCardFeatureEnabled),A=z((n=>n.tenantState.fetchState)),T=z((n=>n.tenantState.activeTenantFetchState.fetchState)),h=T==="Completed"||A==="Completed"?ds(ne,r):void 0,X=T==="Completed"||A==="Completed"?ms(r):void 0,ke=qs(r,He,ne),{isCardsHidden:Be}=Ys(r?.tenantId),Ve=!ke||!!Be,{isFeatureEnabled:Se}=N(G.isSettingsFeatureEnabled),{isFeatureEnabled:J}=N(G.isAiCfoFileUploadEnabled),W=z((n=>_s(n)));if(i!=null){const n=D.getSignedInUserTenant(i);I!=null&&n!=null&&fe(I,r,L)}const Z={tenantId:v,userId:I?.userId,sessionId:I?.zeniSessionId},ae=hs(),p=Xs(),Ne=r.company==null||p?.loggedInUserRoleMap!=null&&Ee(p.loggedInUserRole),Me=ps(p?.loggedInUserRoleMap),oe=O.useRef(!0),re=je("/:tenantEmailDomain/onboarding/*")!==null,K=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ze=z((n=>Z.tenantId!=null?Es(n,Z.tenantId):void 0));O.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),O.useEffect((()=>{if(K!=null&&v!=null){const n=K.params.selectedPeriod;if(n!=null){const f=n.split("-");if(f.length===2){const c=Rs(Number(f[0])),s=Number(f[1]),d=xs(`01-${c<10?`0${c}`:c}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=gs();d.isAfter(S,"month")===!1?j(Is(v,{month:c,year:s})):B("./month_end_close_checks/review")}}}}),[K,v]),O.useEffect((()=>{V||(Pe(!0),U(F.TENANT_FETCHING)),oe.current?oe.current=!1:!Ts(ae,Z)&&D.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,c,s){if(xe(f?.userId,f?.zeniSessionId,n.tenantId),c(Hs(!0)),c(ge(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const d=D.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Ks(s)),d?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}n.userId!=null?Q.identify(n.userId,{tenant_id:n.tenantId}):Q.resetUserIdentity()})(Z,I,j,Ze))}),[Z,ae,I,j,D]),O.useEffect((()=>{D.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,c,s,d,S,k){if(c==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&d?.zeniSessionId!=null,rs=c==null||c.tenantId!==s,is=c!=null&&c.excludedResources==null,ls=c!=null&&c.externalConnections==null;if(q&&rs){k(ge(s));const Y=D.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),xe(d?.userId,d?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(d.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Te(d.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(d.userId,s))),q&&ls&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Te(d.userId,s)));if(q){Q.identify(d.userId,{tenant_id:s});const Y=s==null||s!=null&&(f==="Completed"||f==="Error");n==="Completed"||f!=="Not-Started"&&f!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),k(ks(d.userId,s,d.zeniSessionId))),Y&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Re(d.userId,d.zeniSessionId)))}})(A,T,r,v,I,U,j))}),[v,T]),O.useEffect((()=>{D.isSignedIn()&&A==="Completed"&&W.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),D.saveSignedInUserTenants(js(W.tenantsBaseInOrder)),I!=null&&fe(I,r,L,void 0,W.tenantsBaseInOrder))}),[W,A,r,I]),O.useEffect((()=>{T==="In-Progress"&&U(F.TENANT_FETCHING),T!=="Completed"&&T!=="Error"||(T==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):T==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())}),[T,A,v,V]);const ie=O.useRef(!1);O.useEffect((()=>{!ie.current&&T==="Completed"&&V&&(ie.current=!0,(function(n=et,f=3e3){setTimeout((()=>{const c=s=>{if(s>=n.length)return;const d=n[s],S=Qs[d];S!=null?S().then((()=>ee((()=>c(s+1))))).catch((()=>ee((()=>c(s+1))))):c(s+1)};ee((()=>c(0)))}),f)})())}),[T,V]);const w=r?.userRole!=null&&As(r?.userRole),{isFeatureEnabled:ze}=N(G.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&Ee(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!w,ue=!Ve&&!w,We=fs(p?.loggedInUserRoleMap),qe=r.externalConnections?.accounting[0]?.isValid,Ye=r.externalConnections?.fetchState==="Completed",ce=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!w,me=de&&Ds(p?.loggedInUserRoleMap),_e=Fe&&!w,Xe=Le&&!w,Je=le&&ys(p?.loggedInUserRoleMap),Ke=ue&&bs(p?.loggedInUserRoleMap),Qe=_e&&Cs(p?.loggedInUserRoleMap),es=vs(p?.loggedInUserRoleMap),ss=Us(p?.loggedInUserRoleMap),ts=ws(p?.loggedInUserRoleMap),ns=Os(p?.loggedInUserRoleMap),as=Ps(p?.loggedInUserRoleMap),E=Fs(p?.loggedInUserRoleMap),R=Ls(p?.loggedInUserRoleMap),he=le&&E,pe=de&&R,x=_e&&ts,g=Xe&&ns,m=ue&&as,os=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Me===!0||We===!0||es===!0||ss===!0;return D.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&A!=="In-Progress"&&j(Re(I.userId,I.zeniSessionId)),null):T!=="In-Progress"&&T!=="Not-Started"||A==="Completed"?(ce===!0||se&&!re)&&Ye&&qe!==!0&&h===!1&&X===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||ce!==!1||re||se?V&&r?.userRole&&h!=null&&X!=null&&i!=null&&Object.keys(p.loggedInUserRoleMap).length>0?e.jsx(Ms,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(Tt,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:X,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(lt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(st,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:os||P?e.jsx(nt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(at,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(ot,{})}),e.jsx(a,{path:"transaction/*",element:P&&w===!1||Ge||$e?e.jsx(it,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&w===!1?e.jsx(mt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&w===!1?e.jsx(De,{entityType:"customer"}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&w===!1?e.jsx(De,{entityType:"vendor"}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(It,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(xt,{})}),e.jsx(a,{path:"address/*",element:Je||me||Qe||Ke?e.jsx(tt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(ct,{}):e.jsx(b,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(b,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(pt,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&w===!1?e.jsx(Et,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(ht,{})}),e.jsx(a,{path:"vendors/*",element:Ne?e.jsx(rt,{}):e.jsx(b,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(ye,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(ye,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:pe?e.jsx(be,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:pe?e.jsx(be,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Se?e.jsx(ut,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(_t,{}):e.jsx(b,{})}),e.jsx(a,{path:"rewards/*",element:ze?e.jsx(Rt,{}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(gt,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(a,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Tt=({isDashboardAccess:o,showZeniAccountRoute:j,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:H})=>{if(U===!0){if(j)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return C===!0&&H?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):j?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},y=({showZeniAccountRoute:o,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(i)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(we,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):i?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(we,{tenantEmailDomain:C}):j?e.jsx(At,{tenantEmailDomain:C}):B?e.jsx(jt,{tenantEmailDomain:C}):e.jsx(b,{})},jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),At=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{y as FallBackRoute,Nt as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BjEybUEO.js","assets/sentry-B-4V3RdH.js","assets/core-DI1Smcxr.js","assets/zeni-epic-state-CGEUbbPd.js","assets/index-slT6Cmx8.js","assets/mui-DZ-Vvmtg.js","assets/analytics-CcXSo3IR.js","assets/utils-BOGrYMhV.js","assets/withTransactionSidePanel-C_PdEYzg.js","assets/useAskAiCfoHostNavButtonProps-EdOjchhB.js","assets/TransactionDetailScreen-Dnm1o3gy.js","assets/decodeURIComponentSafe-C0NEXntv.js","assets/routePaths-C58Oct92.js","assets/NotFoundScreen-BfdMMfOd.js","assets/useInitialThreadRequest-Dcty95yd.js","assets/analyticsHelper-u_wRIr-A.js","assets/CompanyPassportScreen-H0QfpM1f.js","assets/MobileAppDrawer-RaFZojI2.js","assets/useAiCfoDashboardSuggestedQuestionsChips-COhzCx2s.js","assets/FeaturePreviewScreen-BtXMKquo.js","assets/index-Czu7h9lW.css","assets/BillPayRoutes-DgKQh94m.js","assets/AddressScreen-DPky5m5p.js","assets/DomesticWireDetailScreen-BHH-3Zfz.js","assets/DrawerScreen-CbHABUlJ.js","assets/SetupPagesScreen-CsxRnYId.js","assets/BusinessVerificationPageScreen-KgJTV7Is.js","assets/BillPayApprovalRoutes-DxZ6VlCA.js","assets/ReimbursementApprovalRuleDetailScreen-DTbwLilz.js","assets/getLocaleForTenant-C9HoG54f.js","assets/ReimbursementRoutes-BOOguVf8.js","assets/ReimbursementApprovalRoutes-DqsLGNjl.js","assets/TransactionListRoutes-DgbRRWdV.js","assets/ZeniAccountStatementScreen-Bh1xYJTJ.js","assets/SettingsRoutes-oYnSHuDu.js","assets/accountMappingHelper-apHEXO4i.js","assets/useEmailConnectResultRefresh-CYew-P-Z.js","assets/QBOConnectionScreen-BzHolJYM.js","assets/empty-C6aToBsY.js","assets/index-cOvc-dm-.js","assets/url-BOiTnNyh.js","assets/index-M61CzUcb.js","assets/ReportsRoutes-Xr75d9QG.js","assets/ChargeCardRoutes-CUM1XRJC.js","assets/useChargeCardPusherEvents-BBew6xbf.js","assets/PeopleRoutes-CTZ5Ab9z.js","assets/ExpenseAutomationRoutes-CZg6wwTP.js","assets/TreasuryRoutes-DMeTx-NL.js","assets/useCashManagementBanner-BrwTPpdL.js","assets/VendorsRoutes-CHJQpOtj.js","assets/pathToGoBack-CSeQw6jm.js","assets/ZeniAccountRoutes-DJOehvVf.js","assets/AddressRoutes-Bin_-K_m.js","assets/PandLWithForecastRoutes-uEOcxynq.js","assets/CustomerOnboardingRoutes-BJ-pDPua.js","assets/TransactionDetailRoutes-Bou9_9v6.js","assets/EntityDetailRoutes-Bw3yJXeA.js","assets/NotificationRoutes-B6Fho7CZ.js","assets/PerformanceRoutes-DI6Gk7ru.js","assets/RewardsRoutes-B5t90hW9.js","assets/TaskRoutes-BP3wb_Xk.js","assets/TaskListScreen-I-OxNnjm.js","assets/AiCfoScreen-CZ7ChzrU.js","assets/CardsAiCfoScreen-id-ok7dm.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as t,bn as us,eW as cs,fD as ds,fB as ms,gl as _s,fq as hs,cW as Ee,cC as ps,fT as Es,cu as Rs,bE as xs,bo as gs,fX as Is,v as Ts,L$ as js,bs as As,M0 as fs,bK as Ds,bJ as ys,bt as bs,cq as Cs,M1 as vs,M2 as Us,cS as ws,cV as Os,cU as Ps,cB as Fs,cI as Ls,oc as Re,fz as xe,gv as Hs,f$ as ge,gs as Ie,gt as Te,g0 as ks}from"./zeni-epic-state-CGEUbbPd.js";import{j as e}from"./liveblocks-C01HsTej.js";import{a as O}from"./sentry-B-4V3RdH.js";import{u as Bs,h as Vs,i as Ss,g as Ns,j as z,l as je,N as u,o as Ms,p as a}from"./core-DI1Smcxr.js";import{y as Zs,u as zs,z as D,C as Gs,c as $s,P as Ws,G,i as qs,X as Ys,T as Xs,L as F,a as Ae,t as _,d as Js,e as Q,l}from"./index-slT6Cmx8.js";import"./mui-DZ-Vvmtg.js";import{f as fe}from"./analyticsHelper-u_wRIr-A.js";import{t as Ks}from"./getLocaleForTenant-C9HoG54f.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},j=new o.Error().stack;j&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[j]="492ecada-138c-4b2d-af44-c0e9425745e9",o._sentryDebugIdIdentifier="sentry-dbid-492ecada-138c-4b2d-af44-c0e9425745e9")}catch{}})();const Qs={dashboard:()=>t((()=>import("./DashboardRoutes-BjEybUEO.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>t((()=>import("./BillPayRoutes-DgKQh94m.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t((()=>import("./ReimbursementRoutes-BOOguVf8.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t((()=>import("./TransactionListRoutes-DgbRRWdV.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t((()=>import("./SettingsRoutes-oYnSHuDu.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t((()=>import("./ReportsRoutes-Xr75d9QG.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-CUM1XRJC.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t((()=>import("./PeopleRoutes-CTZ5Ab9z.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-CZg6wwTP.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t((()=>import("./TreasuryRoutes-DMeTx-NL.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t((()=>import("./VendorsRoutes-CHJQpOtj.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t((()=>import("./ZeniAccountRoutes-DJOehvVf.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},st=l((()=>t((()=>import("./ReportsRoutes-Xr75d9QG.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])))),tt=l((()=>t((()=>import("./AddressRoutes-Bin_-K_m.js")),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20])))),nt=l((()=>t((()=>import("./PeopleRoutes-CTZ5Ab9z.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])))),at=l((()=>t((()=>import("./PandLWithForecastRoutes-uEOcxynq.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20])))),ot=l((()=>t((()=>import("./CustomerOnboardingRoutes-BJ-pDPua.js")),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20])))),rt=l((()=>t((()=>import("./VendorsRoutes-CHJQpOtj.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])))),it=l((()=>t((()=>import("./TransactionDetailRoutes-Bou9_9v6.js")),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20])))),De=l((()=>t((()=>import("./EntityDetailRoutes-Bw3yJXeA.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20])))),lt=l((()=>t((()=>import("./DashboardRoutes-BjEybUEO.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))),ye=l((()=>t((()=>import("./BillPayRoutes-DgKQh94m.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])))),ut=l((()=>t((()=>import("./SettingsRoutes-oYnSHuDu.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])))),be=l((()=>t((()=>import("./ReimbursementRoutes-BOOguVf8.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])))),ct=l((()=>t((()=>import("./ZeniAccountRoutes-DJOehvVf.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20])))),dt=l((()=>t((()=>import("./TreasuryRoutes-DMeTx-NL.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])))),mt=l((()=>t((()=>import("./TransactionListRoutes-DgbRRWdV.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])))),_t=l((()=>t((()=>import("./ChargeCardRoutes-CUM1XRJC.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])))),ht=l((()=>t((()=>import("./NotificationRoutes-B6Fho7CZ.js")),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20])))),pt=l((()=>t((()=>import("./PerformanceRoutes-DI6Gk7ru.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20])))),Et=l((()=>t((()=>import("./ExpenseAutomationRoutes-CZg6wwTP.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])))),Rt=l((()=>t((()=>import("./RewardsRoutes-B5t90hW9.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20])))),xt=l((()=>t((()=>import("./TaskRoutes-BP3wb_Xk.js")),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20])))),gt=l((()=>t((()=>import("./AiCfoScreen-CZ7ChzrU.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20])))),Ce=l((()=>t((()=>import("./CardsAiCfoScreen-id-ok7dm.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,20])))),b=l((()=>t((()=>import("./NotFoundScreen-BfdMMfOd.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,20])))),It=l((()=>t((()=>import("./TaskListScreen-I-OxNnjm.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20]))));function Nt({setTenantEmailDomain:o}){const j=Bs(),B=Vs(),{tenantEmailDomain:i}=Ss(),L=Zs().mode,{setLoading:U,clearAllLoading:C,clearLoading:H}=zs(),v=D.getSignedInUserTenant(i)?.tenantId,I=D.getSignedInUser(),se=us(I),$=Ns(),[V,Pe]=O.useState(!1),r=z((n=>cs(n))),{useFeatureGate:N}=Gs(),M=$s(),te=Ws(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:He}=N(G.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(G.isDebitCardFeatureEnabled),A=z((n=>n.tenantState.fetchState)),T=z((n=>n.tenantState.activeTenantFetchState.fetchState)),h=T==="Completed"||A==="Completed"?ds(ne,r):void 0,X=T==="Completed"||A==="Completed"?ms(r):void 0,ke=qs(r,He,ne),{isCardsHidden:Be}=Ys(r?.tenantId),Ve=!ke||!!Be,{isFeatureEnabled:Se}=N(G.isSettingsFeatureEnabled),{isFeatureEnabled:J}=N(G.isAiCfoFileUploadEnabled),W=z((n=>_s(n)));if(i!=null){const n=D.getSignedInUserTenant(i);I!=null&&n!=null&&fe(I,r,L)}const Z={tenantId:v,userId:I?.userId,sessionId:I?.zeniSessionId},ae=hs(),p=Xs(),Ne=r.company==null||p?.loggedInUserRoleMap!=null&&Ee(p.loggedInUserRole),Me=ps(p?.loggedInUserRoleMap),oe=O.useRef(!0),re=je("/:tenantEmailDomain/onboarding/*")!==null,K=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ze=z((n=>Z.tenantId!=null?Es(n,Z.tenantId):void 0));O.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),O.useEffect((()=>{if(K!=null&&v!=null){const n=K.params.selectedPeriod;if(n!=null){const f=n.split("-");if(f.length===2){const c=Rs(Number(f[0])),s=Number(f[1]),d=xs(`01-${c<10?`0${c}`:c}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=gs();d.isAfter(S,"month")===!1?j(Is(v,{month:c,year:s})):B("./month_end_close_checks/review")}}}}),[K,v]),O.useEffect((()=>{V||(Pe(!0),U(F.TENANT_FETCHING)),oe.current?oe.current=!1:!Ts(ae,Z)&&D.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,c,s){if(xe(f?.userId,f?.zeniSessionId,n.tenantId),c(Hs(!0)),c(ge(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const d=D.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Ks(s)),d?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}n.userId!=null?Q.identify(n.userId,{tenant_id:n.tenantId}):Q.resetUserIdentity()})(Z,I,j,Ze))}),[Z,ae,I,j,D]),O.useEffect((()=>{D.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,c,s,d,S,k){if(c==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&d?.zeniSessionId!=null,rs=c==null||c.tenantId!==s,is=c!=null&&c.excludedResources==null,ls=c!=null&&c.externalConnections==null;if(q&&rs){k(ge(s));const Y=D.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),xe(d?.userId,d?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(d.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Te(d.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(d.userId,s))),q&&ls&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Te(d.userId,s)));if(q){Q.identify(d.userId,{tenant_id:s});const Y=s==null||s!=null&&(f==="Completed"||f==="Error");n==="Completed"||f!=="Not-Started"&&f!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),k(ks(d.userId,s,d.zeniSessionId))),Y&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Re(d.userId,d.zeniSessionId)))}})(A,T,r,v,I,U,j))}),[v,T]),O.useEffect((()=>{D.isSignedIn()&&A==="Completed"&&W.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),D.saveSignedInUserTenants(js(W.tenantsBaseInOrder)),I!=null&&fe(I,r,L,void 0,W.tenantsBaseInOrder))}),[W,A,r,I]),O.useEffect((()=>{T==="In-Progress"&&U(F.TENANT_FETCHING),T!=="Completed"&&T!=="Error"||(T==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):T==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())}),[T,A,v,V]);const ie=O.useRef(!1);O.useEffect((()=>{!ie.current&&T==="Completed"&&V&&(ie.current=!0,(function(n=et,f=3e3){setTimeout((()=>{const c=s=>{if(s>=n.length)return;const d=n[s],S=Qs[d];S!=null?S().then((()=>ee((()=>c(s+1))))).catch((()=>ee((()=>c(s+1))))):c(s+1)};ee((()=>c(0)))}),f)})())}),[T,V]);const w=r?.userRole!=null&&As(r?.userRole),{isFeatureEnabled:ze}=N(G.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&Ee(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!w,ue=!Ve&&!w,We=fs(p?.loggedInUserRoleMap),qe=r.externalConnections?.accounting[0]?.isValid,Ye=r.externalConnections?.fetchState==="Completed",ce=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!w,me=de&&Ds(p?.loggedInUserRoleMap),_e=Fe&&!w,Xe=Le&&!w,Je=le&&ys(p?.loggedInUserRoleMap),Ke=ue&&bs(p?.loggedInUserRoleMap),Qe=_e&&Cs(p?.loggedInUserRoleMap),es=vs(p?.loggedInUserRoleMap),ss=Us(p?.loggedInUserRoleMap),ts=ws(p?.loggedInUserRoleMap),ns=Os(p?.loggedInUserRoleMap),as=Ps(p?.loggedInUserRoleMap),E=Fs(p?.loggedInUserRoleMap),R=Ls(p?.loggedInUserRoleMap),he=le&&E,pe=de&&R,x=_e&&ts,g=Xe&&ns,m=ue&&as,os=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Me===!0||We===!0||es===!0||ss===!0;return D.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&A!=="In-Progress"&&j(Re(I.userId,I.zeniSessionId)),null):T!=="In-Progress"&&T!=="Not-Started"||A==="Completed"?(ce===!0||se&&!re)&&Ye&&qe!==!0&&h===!1&&X===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||ce!==!1||re||se?V&&r?.userRole&&h!=null&&X!=null&&i!=null&&Object.keys(p.loggedInUserRoleMap).length>0?e.jsx(Ms,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(Tt,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:X,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(lt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(st,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:os||P?e.jsx(nt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(at,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(ot,{})}),e.jsx(a,{path:"transaction/*",element:P&&w===!1||Ge||$e?e.jsx(it,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&w===!1?e.jsx(mt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&w===!1?e.jsx(De,{entityType:"customer"}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&w===!1?e.jsx(De,{entityType:"vendor"}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(It,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(xt,{})}),e.jsx(a,{path:"address/*",element:Je||me||Qe||Ke?e.jsx(tt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(ct,{}):e.jsx(b,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(b,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(pt,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&w===!1?e.jsx(Et,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(ht,{})}),e.jsx(a,{path:"vendors/*",element:Ne?e.jsx(rt,{}):e.jsx(b,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(ye,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(ye,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:pe?e.jsx(be,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:pe?e.jsx(be,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Se?e.jsx(ut,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(_t,{}):e.jsx(b,{})}),e.jsx(a,{path:"rewards/*",element:ze?e.jsx(Rt,{}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(gt,{isFileUploadEnabled:J}):e.jsx(b,{})}),e.jsx(a,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Tt=({isDashboardAccess:o,showZeniAccountRoute:j,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:H})=>{if(U===!0){if(j)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return C===!0&&H?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):j?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},y=({showZeniAccountRoute:o,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(i)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(we,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):i?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(we,{tenantEmailDomain:C}):j?e.jsx(At,{tenantEmailDomain:C}):B?e.jsx(jt,{tenantEmailDomain:C}):e.jsx(b,{})},jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),At=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{y as FallBackRoute,Nt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-C01HsTej.js";import{a as u}from"./sentry-B-4V3RdH.js";import{h as L,g as $,u as U,j as S,s as re,n as G,i as H,o as ne,p as v}from"./core-DI1Smcxr.js";import{bn as De,eW as P,gq as Te,n2 as le,Ok as Me,hG as he,Ob as Ue,qU as _e,kA as be,m_ as Be,hI as Re,Od as Fe,Oc as Oe,QA as Ve,zn as ze,EQ as Le,Q9 as Ne,Qi as Qe,c7 as ae,cN as $e,cO as Ge,bs as He,Mc as Ze,xP as Ke,QB as qe,Hf as Je,Ew as We,En as Se,Ek as Xe,xT as ye,Eq as Ce,Et as Ie,Ez as oe,ud as se,xS as Ye,kc as W,kf as Ae,QC as en,lg as nn,y6 as tn,N3 as an,N4 as on,ka as sn,QD as cn,kd as rn,rm as ln,M_ as dn,M$ as un,rq as pn,hr as gn,Mk as ee,hj as de,hg as mn,ho as fn,Ml as hn,y3 as bn,QE as Sn,QF as yn,EN as Cn,fB as Ee,fD as xe,QG as In,ge as An,Mu as En,y2 as ue,gj as pe,gi as xn,y1 as vn,gh as kn,gg as wn,QH as jn,fG as ve,QI as Pn,QJ as Dn,y9 as Tn,y0 as ge,QK as Mn,fW as Un,xZ as _n,b_ as Bn,c6 as Rn,c5 as Fn,b$ as On,c3 as Vn,c2 as zn,c1 as Ln,c4 as Nn,c0 as Qn}from"./zeni-epic-state-CGEUbbPd.js";import{C as X,G as O,z as w,ag as ke,bR as $n,e as Z,g as Gn,bC as Hn,T as K,B as ie,bS as Zn,i as we,X as je,bT as Kn,ar as qn,j as Pe,bU as Jn,bV as Wn,bW as Xn,_ as Yn,bX as et,s as nt,bY as tt}from"./index-
|
|
1
|
+
import{j as o}from"./liveblocks-C01HsTej.js";import{a as u}from"./sentry-B-4V3RdH.js";import{h as L,g as $,u as U,j as S,s as re,n as G,i as H,o as ne,p as v}from"./core-DI1Smcxr.js";import{bn as De,eW as P,gq as Te,n2 as le,Ok as Me,hG as he,Ob as Ue,qU as _e,kA as be,m_ as Be,hI as Re,Od as Fe,Oc as Oe,QA as Ve,zn as ze,EQ as Le,Q9 as Ne,Qi as Qe,c7 as ae,cN as $e,cO as Ge,bs as He,Mc as Ze,xP as Ke,QB as qe,Hf as Je,Ew as We,En as Se,Ek as Xe,xT as ye,Eq as Ce,Et as Ie,Ez as oe,ud as se,xS as Ye,kc as W,kf as Ae,QC as en,lg as nn,y6 as tn,N3 as an,N4 as on,ka as sn,QD as cn,kd as rn,rm as ln,M_ as dn,M$ as un,rq as pn,hr as gn,Mk as ee,hj as de,hg as mn,ho as fn,Ml as hn,y3 as bn,QE as Sn,QF as yn,EN as Cn,fB as Ee,fD as xe,QG as In,ge as An,Mu as En,y2 as ue,gj as pe,gi as xn,y1 as vn,gh as kn,gg as wn,QH as jn,fG as ve,QI as Pn,QJ as Dn,y9 as Tn,y0 as ge,QK as Mn,fW as Un,xZ as _n,b_ as Bn,c6 as Rn,c5 as Fn,b$ as On,c3 as Vn,c2 as zn,c1 as Ln,c4 as Nn,c0 as Qn}from"./zeni-epic-state-CGEUbbPd.js";import{C as X,G as O,z as w,ag as ke,bR as $n,e as Z,g as Gn,bC as Hn,T as K,B as ie,bS as Zn,i as we,X as je,bT as Kn,ar as qn,j as Pe,bU as Jn,bV as Wn,bW as Xn,_ as Yn,bX as et,s as nt,bY as tt}from"./index-slT6Cmx8.js";import{n as V}from"./mui-DZ-Vvmtg.js";import{M as R}from"./MobileAppDrawer-RaFZojI2.js";import{a as q,g as J,m as at}from"./accountMappingHelper-apHEXO4i.js";import{t as ot,A as st}from"./AddressScreen-DPky5m5p.js";import Q from"./NotFoundScreen-BfdMMfOd.js";import{g as it}from"./analyticsHelper-u_wRIr-A.js";import{B as ct}from"./BusinessVerificationPageScreen-KgJTV7Is.js";import{C as rt}from"./CompanyPassportScreen-H0QfpM1f.js";import{u as lt,a as dt}from"./useEmailConnectResultRefresh-CYew-P-Z.js";import{q as me}from"./QBOConnectionScreen-BzHolJYM.js";import{B as ut}from"./BillPayApprovalRoutes-DxZ6VlCA.js";import{R as pt}from"./ReimbursementApprovalRoutes-DqsLGNjl.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.js";import"./routePaths-C58Oct92.js";import"./empty-C6aToBsY.js";import"./pdf-lib-B0_dT7At.js";import"./index-cOvc-dm-.js";import"./url-BOiTnNyh.js";import"./index-M61CzUcb.js";import"./decodeURIComponentSafe-C0NEXntv.js";import"./ReimbursementApprovalRuleDetailScreen-DTbwLilz.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="84c20f81-835b-4c4c-b809-9d41fae60a85",e._sentryDebugIdIdentifier="sentry-dbid-84c20f81-835b-4c4c-b809-9d41fae60a85")}catch{}})();const gt=V.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-C01HsTej.js";import{h as Y,g as ee,u as ne,i as G,j as P,N as B,n as W,t as en}from"./core-DI1Smcxr.js";import{bJ as nn,cq as Ce,PZ as ye,eW as V,cC as tn,zD as Q,zn as an,Q9 as sn,Qc as on,rF as te,rt as ae,l8 as ie,tL as z,Qe as Ie,gi as $e,gh as Ge,gg as We,Qf as cn,zM as rn,Ew as Ae,En as ke,Ek as _e,E2 as J,Eq as Ee,Et as ve,Ez as Pe,ud as Te,gx as un,cx as dn,fD as ln,fB as pn,fC as mn,bt as yn,Qg as fn,D2 as le,DG as gn,Qh as bn,bK as Sn,FP as pe,EQ as hn,Qi as Cn,Qj as In,FT as An,FX as kn,tE as _n,Kl as En,Gs as he,Hs as me,Qk as vn,Ql as Pn,Qm as Tn,Qn as He,Qo as wn,MO as Dn,Pp as Un,N1 as On,Qp as qe,E6 as Fn,N2 as Vn,Ea as xn,Qq as Oe,GO as Ke,lg as Bn,rw as Je,tN as jn,bE as Re,tZ as Ne,cA as Rn,Qr as Xe,fV as Nn,Ga as zn,Ge as Ln,Qs as Mn,Gv as ze,Qt as Zn,Qu as Qn,Qv as $n,Qw as Gn,gq as Wn,AX as Hn,Qx as qn,B0 as Kn,A$ as Jn}from"./zeni-epic-state-CGEUbbPd.js";import{T as se,C as oe,G as K,y as we,aS as X,bC as Ye,z as U,x as ce,e as O,B as De,g as $,bD as Xn,au as re,bE as x,bF as Yn,bG as et,ag as Be,bH as nt,s as Le,av as Me,J as tt,A as at,bI as it,bJ as st,bK as ot,a9 as ct}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-C01HsTej.js";import{h as Y,g as ee,u as ne,i as G,j as P,N as B,n as W,t as en}from"./core-DI1Smcxr.js";import{bJ as nn,cq as Ce,PZ as ye,eW as V,cC as tn,zD as Q,zn as an,Q9 as sn,Qc as on,rF as te,rt as ae,l8 as ie,tL as z,Qe as Ie,gi as $e,gh as Ge,gg as We,Qf as cn,zM as rn,Ew as Ae,En as ke,Ek as _e,E2 as J,Eq as Ee,Et as ve,Ez as Pe,ud as Te,gx as un,cx as dn,fD as ln,fB as pn,fC as mn,bt as yn,Qg as fn,D2 as le,DG as gn,Qh as bn,bK as Sn,FP as pe,EQ as hn,Qi as Cn,Qj as In,FT as An,FX as kn,tE as _n,Kl as En,Gs as he,Hs as me,Qk as vn,Ql as Pn,Qm as Tn,Qn as He,Qo as wn,MO as Dn,Pp as Un,N1 as On,Qp as qe,E6 as Fn,N2 as Vn,Ea as xn,Qq as Oe,GO as Ke,lg as Bn,rw as Je,tN as jn,bE as Re,tZ as Ne,cA as Rn,Qr as Xe,fV as Nn,Ga as zn,Ge as Ln,Qs as Mn,Gv as ze,Qt as Zn,Qu as Qn,Qv as $n,Qw as Gn,gq as Wn,AX as Hn,Qx as qn,B0 as Kn,A$ as Jn}from"./zeni-epic-state-CGEUbbPd.js";import{T as se,C as oe,G as K,y as we,aS as X,bC as Ye,z as U,x as ce,e as O,B as De,g as $,bD as Xn,au as re,bE as x,bF as Yn,bG as et,ag as Be,bH as nt,s as Le,av as Me,J as tt,A as at,bI as it,bJ as st,bK as ot,a9 as ct}from"./index-slT6Cmx8.js";import{a as h}from"./sentry-B-4V3RdH.js";import{n as Fe,D as rt,S as ut}from"./mui-DZ-Vvmtg.js";import{M as fe}from"./MobileAppDrawer-RaFZojI2.js";import N from"./NotFoundScreen-BfdMMfOd.js";import{a as Ze}from"./analyticsHelper-u_wRIr-A.js";import{d as Qe}from"./routePaths-C58Oct92.js";import{B as Ue}from"./BusinessVerificationPageScreen-KgJTV7Is.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]="c627c08d-8835-45d3-b1b8-c853b3df2238",e._sentryDebugIdIdentifier="sentry-dbid-c627c08d-8835-45d3-b1b8-c853b3df2238")}catch{}})();const dt=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-C01HsTej.js";import{a as f,b as T,q as A}from"./sentry-B-4V3RdH.js";import{u as M,h as z,j as l,g as D,N as j,n as O}from"./core-DI1Smcxr.js";import{u as P,z as s,y as _,e as E,a as F,f as $,g as B,p as N,h as q,q as V,j as v}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-C01HsTej.js";import{a as f,b as T,q as A}from"./sentry-B-4V3RdH.js";import{u as M,h as z,j as l,g as D,N as j,n as O}from"./core-DI1Smcxr.js";import{u as P,z as s,y as _,e as E,a as F,f as $,g as B,p as N,h as q,q as V,j as v}from"./index-slT6Cmx8.js";import{eW as W,L_ as Z,L$ as J,fz as G,f$ as H,M4 as K,gp as Q,cZ as R,M5 as b,M6 as X,M7 as Y,bZ as y}from"./zeni-epic-state-CGEUbbPd.js";import"./mui-DZ-Vvmtg.js";import{u as ee}from"./useDeviceId-C-gS-i4X.js";import{f as te}from"./analyticsHelper-u_wRIr-A.js";import{t as ne}from"./getLocaleForTenant-C9HoG54f.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.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]="0584da80-ee95-487e-a0ca-68bdb2e25ede",t._sentryDebugIdIdentifier="sentry-dbid-0584da80-ee95-487e-a0ca-68bdb2e25ede")}catch{}})();const ie=O((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Y({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(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(X(n,a)))},clearSignInError:()=>{t(b())}}}))(V),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=M(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:L}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),k=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>W(e))),I=l((e=>Z(e))),m=D(),w=_().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),G(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Q().then((()=>{const e=q();e!=null&&$(e)})),setTimeout((()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))}),2e3))}),[S,p,k,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(j,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&L!=null?u.jsx(N,{onClose:()=>i(b()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-C01HsTej.js";import{a as i}from"./sentry-B-4V3RdH.js";import{u as f,g as l,N as u}from"./core-DI1Smcxr.js";import{z as n,e as a,g as m,B as g}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-C01HsTej.js";import{a as i}from"./sentry-B-4V3RdH.js";import{u as f,g as l,N as u}from"./core-DI1Smcxr.js";import{z as n,e as a,g as m,B as g}from"./index-slT6Cmx8.js";import{gu as p,Mm as y}from"./zeni-epic-state-CGEUbbPd.js";import{n as b}from"./mui-DZ-Vvmtg.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.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]="cc973a0d-f7d7-4ad5-83ed-8bf7c6d6926c",e._sentryDebugIdIdentifier="sentry-dbid-cc973a0d-f7d7-4ad5-83ed-8bf7c6d6926c")}catch{}})();function M(){const e=f(),t=l(),r=i.useRef(!1),d=n.isSignedIn(),o=t.state?.message==="logout"||d;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(p()),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(g,{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 u}from"./liveblocks-C01HsTej.js";import{a as G}from"./sentry-B-4V3RdH.js";import{h as v,u as _,g as K,j as b,i as z,n as J}from"./core-DI1Smcxr.js";import{z as R,C as M,G as p,a0 as O,x as Q,e as V,g as W,da as Z,s as g,r as H}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-C01HsTej.js";import{a as G}from"./sentry-B-4V3RdH.js";import{h as v,u as _,g as K,j as b,i as z,n as J}from"./core-DI1Smcxr.js";import{z as R,C as M,G as p,a0 as O,x as Q,e as V,g as W,da as Z,s as g,r as H}from"./index-slT6Cmx8.js";import{eW as q,TL as F,J7 as I,TM as x,TH as X,Iv as y,TN as Y,ID as E,HZ as aa,J8 as S,TO as B,fy as ea,I_ as ta,J3 as sa,IS as oa,IQ as w,J4 as na,IN as ia,TP as la,TQ as ra,TR as ka,TS as ca,TT as T,eh as da,TU as ua,TV as pa}from"./zeni-epic-state-CGEUbbPd.js";import{n as Ta}from"./mui-DZ-Vvmtg.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-EdOjchhB.js";import{M as ga}from"./MobileAppDrawer-RaFZojI2.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.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]="59d70e33-3715-4ffe-a1ed-8890558e8a46",e._sentryDebugIdIdentifier="sentry-dbid-59d70e33-3715-4ffe-a1ed-8890558e8a46")}catch{}})();const fa=Ta.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-C01HsTej.js";import se from"./NotFoundScreen-
|
|
1
|
+
import{j as n}from"./liveblocks-C01HsTej.js";import se from"./NotFoundScreen-BfdMMfOd.js";import{a as c}from"./sentry-B-4V3RdH.js";import{h as O,u as Z,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-DI1Smcxr.js";import{Ia as H,Id as le,I7 as de,eW as M,TH as Q,Ir as J,I4 as pe,IX as ue,IQ as ke,TI as X,TJ as N,I0 as me,HZ as fe,rF as ge,rt as he,l8 as Ie,Il as Se,TK as Te,IC as be,Iz as Ce,Ig as Ee,Iw as Ge,Iv as De}from"./zeni-epic-state-CGEUbbPd.js";import{z as G,d8 as xe,Q as je,C as ye,G as b,r as K,s as v,x as we,e as V,g as ve,d9 as Re,j as A,au as Fe}from"./index-slT6Cmx8.js";import{n as Be}from"./mui-DZ-Vvmtg.js";import{u as Pe}from"./useInitialThreadRequest-Dcty95yd.js";import{M as Ue}from"./MobileAppDrawer-RaFZojI2.js";import Le from"./TaskListScreen-I-OxNnjm.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.js";import"./useAskAiCfoHostNavButtonProps-EdOjchhB.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]="ba549d54-cf9b-4af8-a294-f5adb2fc6e3e",e._sentryDebugIdIdentifier="sentry-dbid-ba549d54-cf9b-4af8-a294-f5adb2fc6e3e")}catch{}})();function $e(){const e=O(),t=Z(),s=G.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g((o=>o.cannedResponsesState)),l=c.useCallback((()=>{t(H())}),[t]),k=c.useCallback(((o,h,I)=>{t(le({name:o,content:h,cannedResponseId:I}))}),[t]),a=c.useCallback((o=>{t(de({cannedResponseId:o}))}),[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let _,q=[];const ze=re((function(e,t){const{location:s,taskGroupId:u}=t,r=X(e,t.taskId),d=M(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=G.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=Q(e),{tenantEmailDomain:D}=d,C=r.recurringSourceTaskId,x=C!=null?`${A.appUrl}/${D}/tasks/${encodeURIComponent(C)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:G.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==_&&(_=S,q=Object.values(S)),q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((p=>N(e.taskGroupState,p))).filter((p=>p!=null&&!p.isDeleted)).map((p=>({id:p.id,name:p.name,isDefault:p.isDefault})))}}),(function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Ce(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=K(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=v(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(J(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(H())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}}))(Re);function w(){const e=O(),t=Z(),s=ne(),u=je(),{taskId:r,taskGroupId:d}=oe(),l=g((i=>M(i))),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:C}=a(b.isTaskGroupAssigneesEnabled),[x,S]=c.useState(!1),[p,W]=c.useState(!1),[F,Y]=c.useState(!1),[B,ee]=c.useState(!1),[P,j]=c.useState(!1),T=c.useRef(!1),E=g((i=>i.taskListState.updateTasksFetchState.fetchState)),U=g((i=>Q(i))),L=g((i=>i.taskGroupViewState.fetchState));c.useEffect((()=>{p||(W(!0),t(J(!1,r)))}),[p,t]),c.useEffect((()=>{F||U.fetchState==="Completed"||(Y(!0),t(pe()))}),[F,t,U.fetchState]),c.useEffect((()=>{B||L==="Completed"||(ee(!0),t(ue()))}),[B,t,L]);const ae=c.useCallback((()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),j(!0))}),[t,r]);c.useEffect((()=>{if(P)if(E!=="In-Progress"){if(T.current){if(E==="Error")return j(!1),void(T.current=!1);if(E==="Completed"){j(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=K(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:v(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0}),[P,E,l,s,e]);const $=g((i=>X(i,r))),y=$.fetchState,z=G.getSignedInUser();if(z==null)throw Error("Can't access task detail page without signing in...");if(y==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=R(i),te=v(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(we,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(ze,{analytics:V,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:z,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:C})]})]})}const Ne=Be.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{TransactionDetailRoutes-DcF4U6JF.js → TransactionDetailRoutes-Bou9_9v6.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-C01HsTej.js";import i from"./NotFoundScreen-
|
|
1
|
+
import{j as t}from"./liveblocks-C01HsTej.js";import i from"./NotFoundScreen-BfdMMfOd.js";import{T as r}from"./TransactionDetailScreen-Dnm1o3gy.js";import"./sentry-B-4V3RdH.js";import{o as s,p as o}from"./core-DI1Smcxr.js";import"./zeni-epic-state-CGEUbbPd.js";import"./recharts-Qx4ifl34.js";import"./index-slT6Cmx8.js";import"./mui-DZ-Vvmtg.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.js";import"./useAskAiCfoHostNavButtonProps-EdOjchhB.js";import"./decodeURIComponentSafe-C0NEXntv.js";import"./routePaths-C58Oct92.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4852925-22e4-4d6c-b9c0-7fe8ce24ec96",e._sentryDebugIdIdentifier="sentry-dbid-a4852925-22e4-4d6c-b9c0-7fe8ce24ec96")}catch{}})();function k(){return t.jsxs(s,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
|
package/dist/assets/{TransactionDetailScreen-DEAM6N6x.js → TransactionDetailScreen-Dnm1o3gy.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as x}from"./liveblocks-C01HsTej.js";import{a as i}from"./sentry-B-4V3RdH.js";import{u as W,k as Ke,j as S,s as fe,g as ge,h as Te,i as Ee,N as Qe,n as Xe}from"./core-DI1Smcxr.js";import{nR as he,eW as Q,gq as Ze,Ok as et,n2 as tt,mM as at,bn as nt,cW as be,bs as Ie,rd as q,Nj as J,Ol as ve,Om as oe,NJ as De,kL as Ce,On as ke,NO as se,NP as ce,lA as Ae,Ke as ie,Nd as M,kF as Oe,kD as Ue,kP as ot,nE as st,Oo as ct,Op as it,vt as K,kK as xe,Jz as we,cj as rt,c_ as lt,Oq as dt,Nc as ut,Or as mt,vp as pt,Os as ft,Ot as ht,Ou as yt,Ov as St,Ow as gt,kO as Tt,Ox as Et,Oy as bt,Ne as It,Oz as vt,OA as Dt,OB as Ct,Jt as kt,Jj as At,JI as Ot,kQ as Ut,Kf as ye,nJ as xt}from"./zeni-epic-state-CGEUbbPd.js";import{C as H,G as w,z as Pe,aS as _e,y as wt,J as Pt,aT as _t,A as Ft,r as ae,T as Vt,aU as Bt,s as ne,a0 as Nt,aV as zt,e as Fe,aW as Rt,au as Lt,a4 as te}from"./index-
|
|
1
|
+
import{j as x}from"./liveblocks-C01HsTej.js";import{a as i}from"./sentry-B-4V3RdH.js";import{u as W,k as Ke,j as S,s as fe,g as ge,h as Te,i as Ee,N as Qe,n as Xe}from"./core-DI1Smcxr.js";import{nR as he,eW as Q,gq as Ze,Ok as et,n2 as tt,mM as at,bn as nt,cW as be,bs as Ie,rd as q,Nj as J,Ol as ve,Om as oe,NJ as De,kL as Ce,On as ke,NO as se,NP as ce,lA as Ae,Ke as ie,Nd as M,kF as Oe,kD as Ue,kP as ot,nE as st,Oo as ct,Op as it,vt as K,kK as xe,Jz as we,cj as rt,c_ as lt,Oq as dt,Nc as ut,Or as mt,vp as pt,Os as ft,Ot as ht,Ou as yt,Ov as St,Ow as gt,kO as Tt,Ox as Et,Oy as bt,Ne as It,Oz as vt,OA as Dt,OB as Ct,Jt as kt,Jj as At,JI as Ot,kQ as Ut,Kf as ye,nJ as xt}from"./zeni-epic-state-CGEUbbPd.js";import{C as H,G as w,z as Pe,aS as _e,y as wt,J as Pt,aT as _t,A as Ft,r as ae,T as Vt,aU as Bt,s as ne,a0 as Nt,aV as zt,e as Fe,aW as Rt,au as Lt,a4 as te}from"./index-slT6Cmx8.js";import{n as Gt,S as jt,D as $t}from"./mui-DZ-Vvmtg.js";import{u as Mt}from"./useAskAiCfoHostNavButtonProps-EdOjchhB.js";import{d as Ve}from"./decodeURIComponentSafe-C0NEXntv.js";import{h as Be,c as Ne,g as Wt,e as qt}from"./routePaths-C58Oct92.js";import{u as Jt}from"./utils-BOGrYMhV.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e6b49d6d-4f1c-4497-8637-a6d21eeac268",t._sentryDebugIdIdentifier="sentry-dbid-e6b49d6d-4f1c-4497-8637-a6d21eeac268")}catch{}})();function Ht(t=!0){const e=W(),s=Ke(),{useFeatureGate:a}=H(),{isFeatureEnabled:n}=a(w.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||n!==!0)return;const o=c=>{const r=s.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return r!=="In-Progress"&&r!=="Completed"};o("transferEntryEligible")&&e(he({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(he({kind:"creditCardOnlyEligible"}))}),[t,n,e,s])}function Yt(t,e){const s=(function(){const r=W(),[p,g]=i.useState(!1),[A,y]=i.useState(null),[m,O]=i.useState(null),{useDynamicConfig:T}=H(),{configValue:f,isDynamicConfigLoading:C}=T("transaction_categorization_config"),v=!C&&f?.capitalization_enabled===!0,k=S((h=>Q(h))),E=k.companyId,U=S((h=>Ze(h.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:P,capitalizableAccountOverrides:B,dismissedAccounts:L}=S((h=>{const b=h.tenantState.currentTenantId,u=b!=null?h.tenantState.tenantsById[b]:void 0;return{capitalizableAccounts:u?.capitalizableAccounts??null,capitalizableAccountOverrides:u?.capitalizableAccountOverrides??null,dismissedAccounts:u?.capitalizationOnboardingDismissedAccounts??null}}),fe),G=i.useRef(P);G.current=P;const N=i.useRef(B);N.current=B;const _=i.useRef(L);_.current=L;const z=S((h=>et(h.accountState)),fe),I=i.useMemo((()=>{const h={};for(const b of z)b.accountId!=null&&b.accountName!=null&&(h[b.accountId]=b.accountName);return h}),[z]),l=m!=null?I[m]??null:null,j=i.useCallback((h=>{if(!v)return;const b=G.current;if(b==null)return;const u=b.accounts??[],$=new Set(h),X=N.current??{},Y=_.current;for(const R of u)if($.has(R.accountId)&&X[R.accountId]==null&&Y?.[R.accountId]==null)return y(R.classificationType),O(R.accountId),void g(!0)}),[v]),D=i.useCallback(((h,b)=>{r(tt(E,h,b,!0)),g(!1),y(null),O(null)}),[r,E]),F=i.useCallback((()=>{m!=null&&(r(at(E,m)),g(!1),y(null),O(null))}),[r,E,m]);return{showPopup:p&&v,popupType:A,popupAccountId:m,popupAccountName:l,currencySymbol:U,checkAndShowPopup:j,handleSubmit:D,handleDismiss:F}})(),a=i.useRef(void 0),n=i.useRef([]),o=i.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(n.current=c.current()),t==="Completed"&&a.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),a.current=t}),[t]),s}const re=()=>{const t=Pe.getSignedInUser(),{useFeatureGate:e}=H(),{isFeatureEnabled:s}=e(w.isChainOfThoughtEnabled);return i.useMemo((()=>nt(t)&&s),[t,s])};function ze(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function ha(t,e){const s=W(),{useFeatureGate:a,useDynamicConfig:n}=H(),o=S((u=>Q(u))),c=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),r=o.userRole!=null&&be(o.userRole),p=o.userRole!=null&&Ie(o.userRole),{isFeatureEnabled:g}=a(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:A}=a(w.isExpenseAutomationEnabled),{configValue:y}=n(_e.enableUncategorizedExpenseCategory),m=y?.uncategorized_expense_category_enabled===!0,O=re(),T=i.useMemo((()=>({id:t,type:q(e)})),[t,e]),f=S((u=>J(u,T))),C=f?.transactionDetailUpdateStatus?.fetchState,v=f?.transactionDetailLocalData?.lineItemById,k=S((u=>{const $=J(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return $==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[$]?.saveStatus.fetchState??"Not-Started"})),E=i.useMemo((()=>f?.fetchState==="Completed"?ze(f?.transaction):void 0),[f?.fetchState,f?.transaction]),U=S((u=>{if(E!=null)return ve(u.customerIncomeState,u.vendorExpenseState,u.trendState,E,"month")})),P=S((u=>oe(u))),B=S((u=>{if(E!=null)return De(u.trendWithTransactionsState,E,"TransactionDetail")})),L=o.company?.companyInfo.firstMonthOfFY??1,G=S((u=>Ce(u.accountState,u.accountListState,"accountList"))),[N,_]=i.useState(!1),[z,I]=i.useState(!1),[l,j]=i.useState(!1);i.useEffect((()=>{_(!1),I(!1),j(!1)}),[t,e]);const D=i.useCallback((()=>{_(!1),I(!1)}),[]),[F,h]=i.useState(!1),b=B?.selectedPeriod?.timePeriod;return i.useEffect((()=>{l||f==null||f.transaction==null||(s(ke({id:f.transaction.id,type:f.transaction.type})),j(!0)),E!=null&&(!c||r&&p===!1)&&(N?z||U==null||(I(!0),s(ie(E,"TransactionDetail",{timeframe:"month",timePeriod:b??U}))):(s(se()),s(ce()),_(!0),s(Ae(E))))}),[s,l,f?.fetchState,f?.transaction,E,c,r,p,N,z,U,b]),i.useEffect((()=>{P.newVendorState?.vendorDetailLocalData?.vendorName!=null?h(!0):h(!1)}),[P.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{s(M("common"))}),[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:c,isUserHasDashboardAccess:r,isUserHasInvestorOrBankerAccess:p,isVendorBulkUpdateOnTransactionEnabled:g,isExpenseAutomationEnabled:A,isUncategorizedExpenseCategoryEnabled:m,isChainOfThoughtEnabled:O,selectedTransaction:T,transactionDetail:f,rawDetailSaveStatus:C,rawDetailLineItemById:v,vendorSaveStatus:k,tranEntity:E,defaultTrendTransactionTimePeriod:U,vendorViewDetails:P,uiState:B,firstMonthOfFY:L,uncategorizedAccounts:G,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:F,setIsCreateVendorDrawerOpen:h}}const Kt={overlayWidth:new Ft(100,100,58)},Qt=({isOpen:t,onSaveVendor:e,onSaveSuccess:s,onCancel:a,vendorViewDetails:n})=>{const o=wt(),c=Pt(),r=W(),p=S((y=>oe(y))),g=()=>{a()},A={vendorDetailView:n??p,onSaveSuccess:()=>{r(Ue()),r(ot("Not-Started")),s()},onSaveVendor:e,onCancelClick:g,saveVendorDetailLocalData:y=>{r(Oe({vendorId:void 0,localData:y}))}};return x.jsx($t,{anchor:"right",open:t,PaperProps:{style:{width:Kt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:g,children:x.jsx(Xt,{onClick:y=>y.stopPropagation(),children:x.jsx(_t,{...A})})})},Xt=Gt(jt)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-C01HsTej.js";import{h as H,g as V,u as Q,i as W,j as h,N as z,n as Z,o as ve,p as j}from"./core-DI1Smcxr.js";import{eW as K,qU as X,jZ as u,RH as ee,K5 as De,bo as le,RI as Pe,kA as te,NL as ae,RJ as ue,RK as Ee,bE as Y,K1 as ye,RL as be,RM as me,RN as je,K4 as Ae,RO as xe,RP as pe,RQ as Me,RR as ge,RS as Le,RT as Ce,RU as fe,Lh as Be}from"./zeni-epic-state-CGEUbbPd.js";import{a as de,C as ne,G as q,e as G,co as ce,s as U,r as oe,_ as Fe,P as Oe}from"./index-DSrpVU5Y.js";import"./mui-DZ-Vvmtg.js";import{a as g}from"./sentry-B-4V3RdH.js";import{w as se}from"./withTransactionSidePanel-B9Gn_Jtc.js";import{p as ie,c as re}from"./routePaths-c5aFJU-F.js";import{v as Re}from"./utils-BOGrYMhV.js";import{d as P}from"./decodeURIComponentSafe-C0NEXntv.js";import{Z as Ge}from"./ZeniAccountStatementScreen-BThXS9vz.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./useAskAiCfoHostNavButtonProps-DndeBqh3.js";import"./TransactionDetailScreen-DEAM6N6x.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]="355ddc8c-e950-4ca9-94dc-d19d329ec9cc",a._sentryDebugIdIdentifier="sentry-dbid-355ddc8c-e950-4ca9-94dc-d19d329ec9cc")}catch{}})();const ze=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Re(a),we=Z((function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=J(e.selectedAccount.tranListType),m=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:J(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(ce),N=se((function({...a}){const e=H(),t=V(),n=Q(),c=t.pathname.split("/").find((r=>ze.includes(r))),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),m=de.getLocalizedStrings(),{accountType:S,title:T,subTitle:D}=_e(o),y="month",I=h((r=>K(r))),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(q.isProjectsTransactionsEnabled),x=h((r=>X(r)))&&k,{dataAvailable:C,initialTimeframeTick:E}=$e(o,p,I.bookCloseDate),[B,b]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo((()=>{const r=u(E);return{tranListType:o,accountType:ee(S),title:T,subTitle:D,timeframe:y,period:r}}),[o,y,S,C]);g.useEffect((()=>{if(!B&&f!=null){b(!0),G.trackTransactionList(void 0,void 0,void 0,f.title);const r=J(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}}),[B,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(z,{to:"../"}):s.jsx(we,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})})),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ne=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Je=Z((function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(ce),qe=se((function({referrerType:a,...e}){const t=H(),n=V(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=P(l??""),A=P(m??""),k=P(S??""),x=P(I??""),C=h((d=>Ee(d.transactionListState,A,p,k))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h((d=>K(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),w=h((d=>X(d)))&&r;let i;const R=Ue(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=Ve(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{E||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))}),[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const $=[l,m,S,T,D,y,I].filter((d=>d!=null));return R&&L!=null?s.jsx(Je,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:he($.length)})})),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ue=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ke=Z((function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(ce),He=se((function({referrerType:a,...e}){const t=H(),n=V(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=P(l??""),A=P(m??""),k=P(S??""),x=P(I??""),C=h((d=>je(d.transactionListState,A,p,k))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h((d=>K(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),w=h((d=>X(d)))&&r;let i;const R=Qe(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=We(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{E||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))}),[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const $=[l,m,S,T,D,y,I].filter((d=>d!=null));return R&&L!=null?s.jsx(Ke,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:Se($.length)})})),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ze=Z((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(ce),Te=se((function({referrerType:a,...e}){const t=H(),n=V(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:S,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=W(),p=P(l??""),A=P(m??""),k=P(y??""),x=!(I!=null&&I==="exclude_subaccounts"),C=h((v=>Me(v.transactionListState,A,p))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h((v=>K(v))),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const w=Xe(p,A,S,T,D,k);if(w){const v={startDate:Y(T,"YYYY-MM-DD"),endDate:Y(D,"YYYY-MM-DD")},Ye=et(C?.dateRange,v);r={accountId:A,accountType:ee(p),title:k,timeframe:S,period:Ye}}let i=r;r!=null&&b!=null&&(i={...r,period:b});const{useFeatureGate:R}=ne(),{isFeatureEnabled:L}=R(q.isTransactionCommentingEnabled),{isFeatureEnabled:$}=R(q.isProjectsTransactionsEnabled),d=h((v=>X(v)))&&$,{areTenantIdsInSync:_}=Fe();g.useEffect((()=>{!E&&r!=null&&_&&(B(!0),G.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))}),[E,r,c,_]);const ke=[l,m,S,T,D,y].filter((v=>v!=null));return w&&i!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:v=>F(v),...e}):s.jsx(z,{to:Ie(ke.length)})})),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=V().state?.referrer,e=h((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[h((n=>K(n))).tenantId],t=Oe();return s.jsxs(ve,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(Ge,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(qe,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})})]})}export{kt as default};
|
|
1
|
+
import{j as s}from"./liveblocks-C01HsTej.js";import{h as H,g as V,u as Q,i as W,j as h,N as z,n as Z,o as ve,p as j}from"./core-DI1Smcxr.js";import{eW as K,qU as X,jZ as u,RH as ee,K5 as De,bo as le,RI as Pe,kA as te,NL as ae,RJ as ue,RK as Ee,bE as Y,K1 as ye,RL as be,RM as me,RN as je,K4 as Ae,RO as xe,RP as pe,RQ as Me,RR as ge,RS as Le,RT as Ce,RU as fe,Lh as Be}from"./zeni-epic-state-CGEUbbPd.js";import{a as de,C as ne,G as q,e as G,co as ce,s as U,r as oe,_ as Fe,P as Oe}from"./index-slT6Cmx8.js";import"./mui-DZ-Vvmtg.js";import{a as g}from"./sentry-B-4V3RdH.js";import{w as se}from"./withTransactionSidePanel-C_PdEYzg.js";import{p as ie,c as re}from"./routePaths-C58Oct92.js";import{v as Re}from"./utils-BOGrYMhV.js";import{d as P}from"./decodeURIComponentSafe-C0NEXntv.js";import{Z as Ge}from"./ZeniAccountStatementScreen-Bh1xYJTJ.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./useAskAiCfoHostNavButtonProps-EdOjchhB.js";import"./TransactionDetailScreen-Dnm1o3gy.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]="355ddc8c-e950-4ca9-94dc-d19d329ec9cc",a._sentryDebugIdIdentifier="sentry-dbid-355ddc8c-e950-4ca9-94dc-d19d329ec9cc")}catch{}})();const ze=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Re(a),we=Z((function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=J(e.selectedAccount.tranListType),m=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:J(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(ce),N=se((function({...a}){const e=H(),t=V(),n=Q(),c=t.pathname.split("/").find((r=>ze.includes(r))),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),m=de.getLocalizedStrings(),{accountType:S,title:T,subTitle:D}=_e(o),y="month",I=h((r=>K(r))),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(q.isProjectsTransactionsEnabled),x=h((r=>X(r)))&&k,{dataAvailable:C,initialTimeframeTick:E}=$e(o,p,I.bookCloseDate),[B,b]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo((()=>{const r=u(E);return{tranListType:o,accountType:ee(S),title:T,subTitle:D,timeframe:y,period:r}}),[o,y,S,C]);g.useEffect((()=>{if(!B&&f!=null){b(!0),G.trackTransactionList(void 0,void 0,void 0,f.title);const r=J(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}}),[B,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(z,{to:"../"}):s.jsx(we,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})})),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ne=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Je=Z((function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(ce),qe=se((function({referrerType:a,...e}){const t=H(),n=V(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=P(l??""),A=P(m??""),k=P(S??""),x=P(I??""),C=h((d=>Ee(d.transactionListState,A,p,k))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h((d=>K(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),w=h((d=>X(d)))&&r;let i;const R=Ue(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=Ve(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{E||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))}),[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const $=[l,m,S,T,D,y,I].filter((d=>d!=null));return R&&L!=null?s.jsx(Je,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:he($.length)})})),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ue=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ke=Z((function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(ce),He=se((function({referrerType:a,...e}){const t=H(),n=V(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=P(l??""),A=P(m??""),k=P(S??""),x=P(I??""),C=h((d=>je(d.transactionListState,A,p,k))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h((d=>K(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),w=h((d=>X(d)))&&r;let i;const R=Qe(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=We(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{E||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))}),[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const $=[l,m,S,T,D,y,I].filter((d=>d!=null));return R&&L!=null?s.jsx(Ke,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:Se($.length)})})),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ze=Z((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(ce),Te=se((function({referrerType:a,...e}){const t=H(),n=V(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:S,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=W(),p=P(l??""),A=P(m??""),k=P(y??""),x=!(I!=null&&I==="exclude_subaccounts"),C=h((v=>Me(v.transactionListState,A,p))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h((v=>K(v))),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const w=Xe(p,A,S,T,D,k);if(w){const v={startDate:Y(T,"YYYY-MM-DD"),endDate:Y(D,"YYYY-MM-DD")},Ye=et(C?.dateRange,v);r={accountId:A,accountType:ee(p),title:k,timeframe:S,period:Ye}}let i=r;r!=null&&b!=null&&(i={...r,period:b});const{useFeatureGate:R}=ne(),{isFeatureEnabled:L}=R(q.isTransactionCommentingEnabled),{isFeatureEnabled:$}=R(q.isProjectsTransactionsEnabled),d=h((v=>X(v)))&&$,{areTenantIdsInSync:_}=Fe();g.useEffect((()=>{!E&&r!=null&&_&&(B(!0),G.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))}),[E,r,c,_]);const ke=[l,m,S,T,D,y].filter((v=>v!=null));return w&&i!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:v=>F(v),...e}):s.jsx(z,{to:Ie(ke.length)})})),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=V().state?.referrer,e=h((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[h((n=>K(n))).tenantId],t=Oe();return s.jsxs(ve,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(Ge,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(qe,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})})]})}export{kt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-C01HsTej.js";import{h as F,g as B,u as L,i as O,j as g,N as D,n as G,o as we,p as k}from"./core-DI1Smcxr.js";import{cr as N,eW as E,Qr as U,Gs as ae,fV as H,Ga as ne,Qt as Ie,Gv as ke,Qp as je,Qq as se,QF as be,Ez as Ae,ud as Ee,Qv as ve,GO as De,Qs as re,cV as q,yw as oe,fB as Fe,fD as Be,RE as Le,RF as Ue,Gb as Pe,RG as Re,Gc as Me,Gl as Ve,bs as Oe,bJ as Ge,cC as Ne,bK as _e,cq as ze,bt as $e,M0 as Qe,cp as He}from"./zeni-epic-state-CGEUbbPd.js";import{T as _,ar as qe,z as A,x as z,e as j,ch as Ze,ci as We,cj as Q,J as Z,y as Je,_ as Ke,a0 as Xe,C as ie,G as v,A as Ye,B as et,ck as tt,au as W,s as at,cl as nt,r as J,cm as st,H as X,cn as rt,i as ot}from"./index-
|
|
1
|
+
import{j as e}from"./liveblocks-C01HsTej.js";import{h as F,g as B,u as L,i as O,j as g,N as D,n as G,o as we,p as k}from"./core-DI1Smcxr.js";import{cr as N,eW as E,Qr as U,Gs as ae,fV as H,Ga as ne,Qt as Ie,Gv as ke,Qp as je,Qq as se,QF as be,Ez as Ae,ud as Ee,Qv as ve,GO as De,Qs as re,cV as q,yw as oe,fB as Fe,fD as Be,RE as Le,RF as Ue,Gb as Pe,RG as Re,Gc as Me,Gl as Ve,bs as Oe,bJ as Ge,cC as Ne,bK as _e,cq as ze,bt as $e,M0 as Qe,cp as He}from"./zeni-epic-state-CGEUbbPd.js";import{T as _,ar as qe,z as A,x as z,e as j,ch as Ze,ci as We,cj as Q,J as Z,y as Je,_ as Ke,a0 as Xe,C as ie,G as v,A as Ye,B as et,ck as tt,au as W,s as at,cl as nt,r as J,cm as st,H as X,cn as rt,i as ot}from"./index-slT6Cmx8.js";import{D as it,n as R,S as ct}from"./mui-DZ-Vvmtg.js";import lt from"./NotFoundScreen-BfdMMfOd.js";import{S as Y}from"./SetupPagesScreen-CsxRnYId.js";import{a as p}from"./sentry-B-4V3RdH.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-EdOjchhB.js";import{u as dt}from"./useInitialThreadRequest-Dcty95yd.js";import{u as pt}from"./useCashManagementBanner-BrwTPpdL.js";import{M as ce}from"./MobileAppDrawer-RaFZojI2.js";import{F as mt}from"./FeaturePreviewScreen-BtXMKquo.js";import{a as ee}from"./analyticsHelper-u_wRIr-A.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.js";import"./routePaths-C58Oct92.js";import"./BusinessVerificationPageScreen-KgJTV7Is.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="4a40b1e5-dd2a-45d1-be31-ac8ec3ed986a",t._sentryDebugIdIdentifier="sentry-dbid-4a40b1e5-dd2a-45d1-be31-ac8ec3ed986a")}catch{}})();const ft=G((function(t,a){const{companyId:n}=a;return{treasurySetupView:U(t,n),analytics:j}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:m}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const s=m.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(s.riskScore,ee(s)),t(ke(!0))},onUpdateFundAllocation:s=>{r.trackTreasuryAllocationAction("update",ee(s)),t(Ie(s))}}}))(Ze);function yt(){const t=F(),a=B(),n=L(),{tenantEmailDomain:r}=O(),m=_(),s=g((I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),f=qe(s),o=N(m?.loggedInUserRoleMap),[u,i]=p.useState(!1),[d,T]=p.useState(!1),[c,l]=p.useState(!1),S=g((I=>E(I))),y=A.getSignedInUserTenant(r)?.companyId??S.companyId,x=A.getSignedInUser(),h=g((I=>U(I,y))),w=g((I=>I.treasurySetupViewState.fetchState)),C=g((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),M=g((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(x==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{u||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))}),[u,w,y,n]),p.useEffect((()=>{c||M!=="Not-Started"||y==null||(l(!0),n(H()))}),[c,M,y,n]),p.useEffect((()=>{d||C!=="Not-Started"||y==null||(T(!0),n(ne()))}),[d,C,y,n]),p.useEffect((()=>{f==="In-Progress"&&s==="Completed"&&t("../")}),[f,s,t]),S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:P,isReadOnly:!o,treasurySetupView:h,analytics:j})]})}const gt=G((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:be(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:U(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:m}=a,s=r.treasuryTransferMoneyLocalData,f=m.fundAllocationLocalData;return{onCancelClick:()=>{Q(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Q(a.analytics,"confirm",s,f,"Transfer"),t(De())},onSaveChangesToLocalStore:o=>{t(ve(o))},onFetchLinkTokenClick:o=>{t(Ee("treasury_setup",o))},onEstablishConnectionClick:o=>{t(Ae(o,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(We),ht=({isFirstTransfer:t})=>{const a=F(),{tenantEmailDomain:n}=O(),r=L(),[m,s]=p.useState(!1),[f,o]=p.useState(!1),[u,i]=p.useState(!1),[d,T]=p.useState(!1),c=g((C=>C.treasurySetupViewState.fetchState)),l=g((C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),S=g((C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),y=g((C=>E(C))),x=A.getSignedInUserTenant(n)?.companyId??y.companyId,h=g((C=>je(C))),w=g((C=>U(C,x)));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{f||c!=="Not-Started"||x==null||(o(!0),r(ae(x,!0,!1)))}),[f,c,x,r]),p.useEffect((()=>{u||l!=="Not-Started"||x==null||(i(!0),r(H()))}),[u,l,x,r]),p.useEffect((()=>{d||S!=="Not-Started"||x==null||(T(!0),r(ne()))}),[d,S,x,r]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(gt,{analytics:j,navigate:a,transferDetails:h,onAnotherTransferClick:()=>{s(!1),r(se())},currentTenant:y,treasurySetupView:w,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{Q(j,"review",h.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),s(!0)},isFirstTransfer:t,setShowReviewContent:s,onBackClick:()=>{}})]})},St=R.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-C01HsTej.js";import{a as f}from"./sentry-B-4V3RdH.js";import{h as J,g as Y,i as B,j as S,n as G,u as z,o as at,p as N,N as $}from"./core-DI1Smcxr.js";import{eW as L,N9 as Ee,Na as Re,gx as X,cx as be,cy as Ie,x5 as St,Nb as nt,x9 as zt,L8 as ee,kA as te,x3 as Yt,wZ as qt,Nc as Ue,wR as Ht,wQ as Qt,wK as Wt,wW as Zt,xa as Xt,Nd as he,Ne as Me,wS as ea,Nf as pe,fI as ft,xp as gt,xi as vt,Ng as xt,pK as Tt,xd as yt,xb as Dt,Nh as Ct,xw as Et,xt as bt,xe as It,xv as Je,Jz as wt,Ni as ta,Nj as aa,cA as na,Nk as sa,Nl as oa,Nm as me,Nn as ie,No as we,L9 as Ge,xL as ye,L7 as De,xy as kt,x6 as $e,Np as la,La as H,Nq as Ke,x0 as ia,Nr as ca,Ns as da,Nt as ze,Nu as Ye,Nv as qe,Nw as He,xF as ke,Nx as At,xm as jt,Ny as ra,Nz as ua,NA as ha,NB as pa,NC as ma,ND as Sa,NE as fa,NF as ga,up as va,ux as xa,uq as Ta,Kf as je,NG as ya,NH as Da,jZ as Fe,bo as Ca,NI as Ea,NJ as ba,ly as Ia,lH as wa,Ke as Pe,bE as st,NK as Ft,JR as Pt,NL as ka,NM as Aa,NN as ja,lJ as Fa,NO as ot,NP as lt,NQ as it,NR as ct,NS as Pa,lF as _a,NT as Va,lI as La,NU as Na,NV as _t,KA as Vt,kY as Oa,NW as Ba,NX as _e,NY as Lt,Ky as Nt,A1 as Ra,NZ as Ua,N_ as Ma,lg as Ot,N$ as Ja,O0 as Ga,KM as $a,r_ as Ka,O1 as Bt,O2 as dt,KJ as Ve,O3 as rt,O4 as za,KO as Ya,O5 as qa,O6 as Ha,O7 as Qa,O8 as Wa,O9 as Za,s1 as Xa,Oa as en,Lb as tn,Ob as an,Kr as Le,hI as nn,Oc as sn,Od as on,hG as ln,Oe as cn,Of as dn,A5 as rn,Og as un,Oh as hn,Oi as pn,Oj as mn,l0 as Sn,bn as fn,fD as gn,fB as vn}from"./zeni-epic-state-CGEUbbPd.js";import{z as R,ar as Ne,B as Rt,x as W,e as j,a4 as Z,aB as xn,s as M,a as Ce,Q as ce,aC as Qe,aD as Tn,aE as yn,r as We,aF as Dn,y as Cn,J as de,A as Ze,C as ae,G as K,aG as En,j as Xe,a0 as Se,aH as bn,aI as Ut,_ as In,aJ as wn,T as kn,aK as An,au as Mt,aL as jn,o as Q,S as Fn,E as Jt,F as Pn,aM as _n,aN as Vn,g as et,aO as Ln,aP as Nn,w as On,aQ as Bn,aR as Rn}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-C01HsTej.js";import{a as f}from"./sentry-B-4V3RdH.js";import{h as J,g as Y,i as B,j as S,n as G,u as z,o as at,p as N,N as $}from"./core-DI1Smcxr.js";import{eW as L,N9 as Ee,Na as Re,gx as X,cx as be,cy as Ie,x5 as St,Nb as nt,x9 as zt,L8 as ee,kA as te,x3 as Yt,wZ as qt,Nc as Ue,wR as Ht,wQ as Qt,wK as Wt,wW as Zt,xa as Xt,Nd as he,Ne as Me,wS as ea,Nf as pe,fI as ft,xp as gt,xi as vt,Ng as xt,pK as Tt,xd as yt,xb as Dt,Nh as Ct,xw as Et,xt as bt,xe as It,xv as Je,Jz as wt,Ni as ta,Nj as aa,cA as na,Nk as sa,Nl as oa,Nm as me,Nn as ie,No as we,L9 as Ge,xL as ye,L7 as De,xy as kt,x6 as $e,Np as la,La as H,Nq as Ke,x0 as ia,Nr as ca,Ns as da,Nt as ze,Nu as Ye,Nv as qe,Nw as He,xF as ke,Nx as At,xm as jt,Ny as ra,Nz as ua,NA as ha,NB as pa,NC as ma,ND as Sa,NE as fa,NF as ga,up as va,ux as xa,uq as Ta,Kf as je,NG as ya,NH as Da,jZ as Fe,bo as Ca,NI as Ea,NJ as ba,ly as Ia,lH as wa,Ke as Pe,bE as st,NK as Ft,JR as Pt,NL as ka,NM as Aa,NN as ja,lJ as Fa,NO as ot,NP as lt,NQ as it,NR as ct,NS as Pa,lF as _a,NT as Va,lI as La,NU as Na,NV as _t,KA as Vt,kY as Oa,NW as Ba,NX as _e,NY as Lt,Ky as Nt,A1 as Ra,NZ as Ua,N_ as Ma,lg as Ot,N$ as Ja,O0 as Ga,KM as $a,r_ as Ka,O1 as Bt,O2 as dt,KJ as Ve,O3 as rt,O4 as za,KO as Ya,O5 as qa,O6 as Ha,O7 as Qa,O8 as Wa,O9 as Za,s1 as Xa,Oa as en,Lb as tn,Ob as an,Kr as Le,hI as nn,Oc as sn,Od as on,hG as ln,Oe as cn,Of as dn,A5 as rn,Og as un,Oh as hn,Oi as pn,Oj as mn,l0 as Sn,bn as fn,fD as gn,fB as vn}from"./zeni-epic-state-CGEUbbPd.js";import{z as R,ar as Ne,B as Rt,x as W,e as j,a4 as Z,aB as xn,s as M,a as Ce,Q as ce,aC as Qe,aD as Tn,aE as yn,r as We,aF as Dn,y as Cn,J as de,A as Ze,C as ae,G as K,aG as En,j as Xe,a0 as Se,aH as bn,aI as Ut,_ as In,aJ as wn,T as kn,aK as An,au as Mt,aL as jn,o as Q,S as Fn,E as Jt,F as Pn,aM as _n,aN as Vn,g as et,aO as Ln,aP as Nn,w as On,aQ as Bn,aR as Rn}from"./index-slT6Cmx8.js";import{n as U,D as Un,S as Gt}from"./mui-DZ-Vvmtg.js";import{t as Mn,A as Jn}from"./AddressScreen-DPky5m5p.js";import le from"./NotFoundScreen-BfdMMfOd.js";import{F as Gn}from"./FeaturePreviewScreen-BtXMKquo.js";import{c as q,v as tt,d as $n}from"./routePaths-C58Oct92.js";import{p as $t}from"./pathToGoBack-CSeQw6jm.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-EdOjchhB.js";import{M as ge}from"./MobileAppDrawer-RaFZojI2.js";import{D as Kn}from"./DrawerScreen-CbHABUlJ.js";import{g as zn,m as Yn}from"./accountMappingHelper-apHEXO4i.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="b1b3a63e-f019-46e6-a8c8-934ad0102f60",e._sentryDebugIdIdentifier="sentry-dbid-b1b3a63e-f019-46e6-a8c8-934ad0102f60")}catch{}})();const qn=Ce.getLocalizedStrings(),Hn=G((function(e,a){const s=Re(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}}),(function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(zt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(xn),Qn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=B(),{scheduleType:o}=B();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S((g=>L(g))),r=Ee(o)??"accrued_expenses",h=R.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S((g=>Re(g,r))),p=i.selectedJELinkRowIndex,d=S((g=>X(g,c.companyId))),u=Ne(i.updateStatus.fetchState);f.useEffect((()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})}),[u,i.updateStatus.fetchState]),f.useEffect((()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]),f.useEffect((()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})}),[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const m=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&p!=null?l.jsxs(l.Fragment,{children:[m===!0?l.jsx(W,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(Hn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[p]})]}):null})},Kt=e=>{const a=qn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some((p=>p.isRecommendedTransaction===!0)),h=be(s.controllers),i=Ie(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...Kt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Zn=U.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{WiseConfirmationScreen-B7lAVdPL.js → WiseConfirmationScreen-Cg5IVzZr.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-C01HsTej.js";import{a as f}from"./sentry-B-4V3RdH.js";import{t as u,u as h,j as y,N as I}from"./core-DI1Smcxr.js";import{Mj as w,fz as b,Bm as j}from"./zeni-epic-state-CGEUbbPd.js";import{z as l,B as x,E as S,F as E}from"./index-
|
|
1
|
+
import{j as o}from"./liveblocks-C01HsTej.js";import{a as f}from"./sentry-B-4V3RdH.js";import{t as u,u as h,j as y,N as I}from"./core-DI1Smcxr.js";import{Mj as w,fz as b,Bm as j}from"./zeni-epic-state-CGEUbbPd.js";import{z as l,B as x,E as S,F as E}from"./index-slT6Cmx8.js";import{n as p}from"./mui-DZ-Vvmtg.js";import"./recharts-Qx4ifl34.js";import"./analytics-CcXSo3IR.js";import"./plaid-qc1oAYdM.js";import"./dnd-B-Vr2ZPo.js";import"./stripe-cKAAJElX.js";import"./lottie-CizKqEXu.js";import"./lexical-DXoIaDj4.js";import"./pdf-Baibwqlo.js";import"./utils-BOGrYMhV.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]="cf61487a-a696-49a7-a997-7a620e41a0e7",e._sentryDebugIdIdentifier="sentry-dbid-cf61487a-a696-49a7-a997-7a620e41a0e7")}catch{}})();const q=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",c=e.get("profileId")??"",[i,g]=f.useState(!1),n=h(),a=y((m=>w(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return b(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{i||(g(!0),n(j(t,c,s)))}),[i,n]),a.fetchState==="Error"?o.jsx(D,{children:o.jsx(_,{children:a.error?.message??""})}):(a.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},D=p.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100vh;
|