@zeniai/web-app-ui 5.1.77-qa → 5.1.78-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-CopqFAp1.js +1 -0
- package/dist/assets/{AddressScreen-DjHFWXZd.js → AddressScreen-i5gotzuk.js} +1 -1
- package/dist/assets/{AiCfoScreen-Coov-9Lq.js → AiCfoScreen-BhtLFPTG.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-5yoLyMdf.js → BillPayApprovalRoutes-30N80mL5.js} +1 -1
- package/dist/assets/{BillPayRoutes-BJdksoIS.js → BillPayRoutes-DRRIZ3Q8.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CxMuID_0.js → BusinessVerificationPageScreen-masGBZeu.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-7MbovH-h.js → CardsAiCfoScreen-B-NEK8ZL.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-ZORkbkMi.js → ChargeCardRoutes-B88g2-RN.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-3LH__AFc.js → CompanyPassportScreen-Cou1LOBy.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-E5uYsUYy.js → ConnectionAuthScreen-bdpKxsv7.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DowBUNOX.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-D2KSoqf9.js +30 -0
- package/dist/assets/DashboardRoutes-BGgQbiCK.js +20 -0
- package/dist/assets/{DefaultTenantHome-D9TcJdht.js → DefaultTenantHome-Z6dq5Wia.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DZ8naknM.js → DomesticWireDetailScreen-MDrXSwzc.js} +1 -1
- package/dist/assets/{DrawerScreen-enq1kex3.js → DrawerScreen-h-FlEl5-.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-1jh84Y19.js → EntityDetailRoutes-COC06q_F.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CCWIfo0Y.js → ExpenseAutomationRoutes-CpFh0FNS.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-9qGkTofX.js → FeaturePreviewScreen-Dwcfifiq.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-DV60QBAP.js → HubSpotOAuthCallbackScreen-BC7lKqXB.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-ZrciaOYE.js → MagicLinkRoutes-Cp6zHXS6.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-Bx2G9lAV.js → MagicLinkSignInScreen-CJfL7pG2.js} +1 -1
- package/dist/assets/MobileAppDrawer-BWlyoZ5H.js +1 -0
- package/dist/assets/NotFoundScreen-DUbgOxtV.js +1 -0
- package/dist/assets/{NotificationRoutes-DMjWy9uH.js → NotificationRoutes-B3l76euP.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-g04Ja_FY.js → OAuthConsentScreen-MJOiLgzg.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CQW3cuEJ.js → PandLWithForecastRoutes-tm_-vcHI.js} +1 -1
- package/dist/assets/{PeopleRoutes-C4dcMrZ_.js → PeopleRoutes-CsYdDADF.js} +1 -1
- package/dist/assets/{PerformanceRoutes-C70AcB2c.js → PerformanceRoutes-BcdWaWU7.js} +1 -1
- package/dist/assets/{Preview-C-vmj6G_.js → Preview-OwLuXuSq.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CXuCwnVv.js → QBOConnectionScreen-CT7lcL6d.js} +1 -1
- package/dist/assets/{ReferralListScreen-CAuT5MkH.js → ReferralListScreen-Ducj4p6E.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-D7K2CtZa.js → ReimbursementApprovalRoutes-CpA19fZc.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Co6mqX7V.js → ReimbursementApprovalRuleDetailScreen-B-TxPzjy.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Dc6yhpRS.js → ReimbursementRoutes-Cy284BiZ.js} +1 -1
- package/dist/assets/{ReportsRoutes-0B9PMrKM.js → ReportsRoutes-CKF0YdG_.js} +1 -1
- package/dist/assets/{RewardsRoutes-BIy5lqI9.js → RewardsRoutes-CM-3646D.js} +1 -1
- package/dist/assets/{ScreenRoutes-S4iuOC-S.js → ScreenRoutes-BnBgN3W5.js} +2 -2
- package/dist/assets/{SettingsRoutes-Bo4skXXS.js → SettingsRoutes-7COJ-AnF.js} +1 -1
- package/dist/assets/{SetupPagesScreen-C5uQEz7K.js → SetupPagesScreen-Bq6uwGXt.js} +1 -1
- package/dist/assets/{SignInScreen-DNgt_9L_.js → SignInScreen-Ba9lfxyV.js} +1 -1
- package/dist/assets/SignOutScreen-hXPJAKI1.js +9 -0
- package/dist/assets/{TaskListScreen-DF5lH-3k.js → TaskListScreen-VpyFooYG.js} +1 -1
- package/dist/assets/{TaskRoutes-8GtswDRs.js → TaskRoutes-CiVbYlZq.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-BaHmdvMt.js → TransactionDetailRoutes-XxuJfStV.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-D6QDGxGu.js → TransactionDetailScreen-BWNXQ74m.js} +1 -1
- package/dist/assets/{TransactionListRoutes-Bhdw74c5.js → TransactionListRoutes-CLB1SrQJ.js} +1 -1
- package/dist/assets/{TreasuryRoutes-Tn0wVhtU.js → TreasuryRoutes-L8Gy3bVs.js} +1 -1
- package/dist/assets/{VendorsRoutes-COmvFuAL.js → VendorsRoutes-BxMnZGjy.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-BSHHYeUX.js → WiseConfirmationScreen-CahTNmLm.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-CteciRDO.js → ZeniAccountRoutes-DQyrwlq9.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-WWIAEGl-.js → ZeniAccountStatementScreen-DwZsGAJ8.js} +1 -1
- package/dist/assets/{accountMappingHelper-talErUKy.js → accountMappingHelper-xxDKbgY6.js} +1 -1
- package/dist/assets/{analytics-ChMmdjNV.js → analytics-D9LLahJK.js} +1 -1
- package/dist/assets/{analyticsHelper-Bq2cX6hw.js → analyticsHelper-CLUANO_-.js} +1 -1
- package/dist/assets/{core-BoNEfvLs.js → core-BXHWSH6o.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-v7XwPgPo.js → decodeURIComponentSafe-DEgBTC44.js} +1 -1
- package/dist/assets/{dnd-DvJtEb2B.js → dnd-D1FusWvE.js} +1 -1
- package/dist/assets/{empty-dNqnyFZ3.js → empty-D3a7Terp.js} +1 -1
- package/dist/assets/{empty-b5TFvQkm.js → empty-rUUW8qXy.js} +1 -1
- package/dist/assets/{emptyVideoElement-CHUUTLZE.js → emptyVideoElement-ByolhRbs.js} +1 -1
- package/dist/assets/{epic-DBs37iOr.js → epic-BZy2OdlW.js} +1 -1
- package/dist/assets/{getLocaleForTenant-B4Of7eQD.js → getLocaleForTenant-CxY698t_.js} +1 -1
- package/dist/assets/{index-BkGSE7D5.js → index-0msqddxr.js} +7 -7
- package/dist/assets/{index-drCPF-LE.js → index-BPjVdT23.js} +1 -1
- package/dist/assets/{index-DcWwIWd7.js → index-BSQcTnEi.js} +1 -1
- package/dist/assets/{index-CJO1bhSt.js → index-CdUum8m9.js} +2 -2
- package/dist/assets/{index-DM4yT559.js → index-CqsQnZaN.js} +1 -1
- package/dist/assets/{index-VwB1TFIZ.js → index-CrFsG-Kl.js} +1 -1
- package/dist/assets/{index-BvFLIInY.js → index-DFuZY6AH.js} +1 -1
- package/dist/assets/{index-HOeFcz85.js → index-DkEoBUP0.js} +1 -1
- package/dist/assets/{lexical-D_KbwLmW.js → lexical-M5lTJAid.js} +1 -1
- package/dist/assets/{liveblocks-CsaY8yYO.js → liveblocks-CIemOhG-.js} +1 -1
- package/dist/assets/{lottie-DbDVmnvZ.js → lottie-B2gqVn8r.js} +1 -1
- package/dist/assets/{mui-CblpH0Ha.js → mui-CDOihXSU.js} +1 -1
- package/dist/assets/{pathToGoBack-j1V7r3Mn.js → pathToGoBack-CtOd2xg3.js} +1 -1
- package/dist/assets/{pdf-D2egRSjc.js → pdf-NpxYPuZF.js} +3 -3
- package/dist/assets/{pdf-lib-DMbxzmyG.js → pdf-lib-DWrkZXLc.js} +1 -1
- package/dist/assets/{plaid-74upgTWR.js → plaid-DnBvUvOI.js} +1 -1
- package/dist/assets/{pusher-CjiDlk8e.js → pusher-BFMykl2k.js} +1 -1
- package/dist/assets/{react-sFkWW8vV.js → react-CLF6YQJD.js} +1 -1
- package/dist/assets/{react-Dvg14ilb.js → react-CLIVy0Jg.js} +1 -1
- package/dist/assets/{react-B9xrzEYj.js → react-D0hKuvBj.js} +1 -1
- package/dist/assets/{react-Bdgrv6d7.js → react-DkRh_xsn.js} +1 -1
- package/dist/assets/{react-otWFcO3Y.js → react-Dy_Hydyd.js} +1 -1
- package/dist/assets/{react-lDmXKsDH.js → react-I9iDEUuR.js} +1 -1
- package/dist/assets/{recharts-NoTYHO1X.js → recharts-D7dc1KPB.js} +1 -1
- package/dist/assets/{routePaths-DlT4djwo.js → routePaths-CJZlOu9G.js} +1 -1
- package/dist/assets/{sentry-BUYxAJ0R.js → sentry-238zX06J.js} +1 -1
- package/dist/assets/{url-SyvMap6d.js → url-BN4Uf0Cp.js} +1 -1
- package/dist/assets/{url-5YtRx5NC.js → url-Duo8Rf1y.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BOfvB1qP.js → useAiCfoDashboardSuggestedQuestionsChips-gnhg90Qv.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BNRHSSlT.js → useAskAiCfoHostNavButtonProps-CA827A-C.js} +1 -1
- package/dist/assets/{useCashManagementBanner-BqwuaRBx.js → useCashManagementBanner-CbZRYwCM.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-ek7O5vue.js → useChargeCardPusherEvents-DtgMIwul.js} +1 -1
- package/dist/assets/{useDeviceId-LzGT5z98.js → useDeviceId-CbBc59Iy.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-C_KtOMfR.js → useEmailConnectResultRefresh-x34nYEpp.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-tlPkIpCr.js → useInitialThreadRequest-BXR7CDER.js} +1 -1
- package/dist/assets/{utils-D-CJm-xs.js → utils-BaZQaz5F.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-D-rC67hx.js → withTransactionSidePanel-DYeV-pwu.js} +1 -1
- package/dist/assets/{zeni-epic-state-DcOrwCh7.js → zeni-epic-state-Xn27LBb6.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-DVAWy_gb.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-Bkbz75T7.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-CGaSQM6e.js +0 -30
- package/dist/assets/DashboardRoutes-Ckr_4PFZ.js +0 -20
- package/dist/assets/MobileAppDrawer-CmiSBVZw.js +0 -1
- package/dist/assets/NotFoundScreen-BTmOJXuO.js +0 -1
- package/dist/assets/SignOutScreen-CnFKE_oa.js +0 -9
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{j as d}from"./liveblocks-CIemOhG-.js";import{i as K,j as _,g as H,u as $,h as W,n as ee,k as ra,o as bt,p as O}from"./core-BXHWSH6o.js";import{eX as U,Nk as We,bE as ia,bo as De,Oy as Pn,j0 as On,Oz as Kt,OA as Fn,j3 as Ct,OB as Ze,OC as Rn,j8 as Bn,OD as qt,OE as jn,jc as kt,OF as Qe,OG as Mn,co as yt,OH as Ln,OI as Un,NE as Gn,k4 as Vn,OJ as Yn,bn as Xe,OK as ca,N8 as ce,bc as la,ki as da,oi as ua,k1 as ma,Na as le,N9 as J,eW as pa,fs as Nn,g4 as _t,OL as $n,OM as zn,ON as ha,OO as Oe,vR as Me,vS as Le,wd as xe,w7 as de,vW as Ue,OP as Kn,OQ as qn,OR as Zn,OS as fa,OT as Fe,OU as Qn,dK as Je,sb as ga,OV as Hn,OW as Wn,OX as Xn,OY as vt,Mq as At,ky as we,wl as It,sj as Jn,OZ as eo,vT as Zt,se as Ee,sa as ba,O_ as ge,O$ as to,P0 as Et,Mp as Tt,uj as Ca,P1 as ao,P2 as no,P3 as oo,P4 as Dt,uw as so,P5 as ro,vV as Qt,ui as ka,P6 as be,P7 as io,bs as _a,wp as Sa,P8 as co,P9 as lo,Pa as uo,Pb as xt,wk as mo,Pc as po,vU as Ht,wo as ya,Pd as Ce,Pe as ho,Pf as fo,Pg as va,kn as Aa,of as Ia,ks as Ea,od as Ta,oc as Da,ob as xa,tH as go,fW as bo,cS as Co,cT as ko,o8 as _o,fS as So,op as yo,GC as dt,Gu as vo,Gy as Ao,Ph as Io,Pi as Eo,Pj as To,b5 as et,fK as Do,hK as xo,gk as wo,oj as Po,jW as Oo,og as Fo,oe as Ro,fE as Bo,fC as jo}from"./zeni-epic-state-Xn27LBb6.js";import{z as M,a3 as te,v as x,f as T,a as q,aZ as Mo,$ as Ge,J as Ve,a_ as wa,h as Y,a$ as Lo,I as _e,b0 as Pa,Q as Se,e as B,m as Uo,b1 as Go,b2 as Vo,X as Oa,Z as Fa,c as Ra,_ as Yo,b3 as No,V as $o,aR as Ba,a0 as se,b4 as ja,b5 as Ma,a2 as La,b6 as zo,b7 as Ko,d as qo,aq as Zo,s as Qo,Y as Ho,b8 as Wo,b9 as Xo,ba as Jo,bb as es,bc as ke}from"./index-0msqddxr.js";import{n as wt}from"./mui-CDOihXSU.js";import{a as b}from"./sentry-238zX06J.js";import{w as Ua}from"./withTransactionSidePanel-DYeV-pwu.js";import{c as Ga,t as Pe,f as ue,a as Pt,v as ts}from"./routePaths-CJZlOu9G.js";import{u as ae}from"./useAskAiCfoHostNavButtonProps-CA827A-C.js";import je from"./NotFoundScreen-DUbgOxtV.js";import{u as Ot}from"./useInitialThreadRequest-BXR7CDER.js";import{t as Va}from"./analyticsHelper-CLUANO_-.js";import{C as as}from"./CompanyPassportScreen-Cou1LOBy.js";import{u as ns}from"./useAiCfoDashboardSuggestedQuestionsChips-gnhg90Qv.js";import{F as os}from"./FeaturePreviewScreen-Dwcfifiq.js";import{R as ss}from"./ReferralListScreen-Ducj4p6E.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";import"./TransactionDetailScreen-BWNXQ74m.js";import"./decodeURIComponentSafe-DEgBTC44.js";import"./MobileAppDrawer-BWlyoZ5H.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]="83c694dc-7023-4362-ae54-749e7b745a47",e._sentryDebugIdIdentifier="sentry-dbid-83c694dc-7023-4362-ae54-749e7b745a47")}catch{}})();const rs=Ua(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=M.getSignedInUser(),i=_(I=>I.tenantState.currentTenantId),c=_(I=>U(I)),{tenantEmailDomain:m}=K(),g=H(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${te}/agingDetailedReport`,timezone:We()}),[]),h=b.useMemo(()=>r!=null?ia(r):De(),[r]),p=$(),f=W(),S=_(I=>Pn(I,h,o)),E=b.useCallback(()=>{o!=null&&S.fetchState!=="In-Progress"&&S.fetchState!=="Completed"&&p(On(o,h))},[h]),v=b.useCallback(()=>{f("../../",{relative:"path"})},[]),k=b.useCallback((I,L)=>{p(Kt({sortKey:I,sortOrder:L}))},[]),D=b.useCallback(I=>{p(Kt({downloadState:I}))},[]),w=b.useCallback(I=>{if(e)e(I.transactionId,I.transactionType);else if(m!=null){const L=Ga({id:I.transactionId,type:I.transactionType},m);f(L);const ne=x(g.state?.pathnameStackToGoBack,g.pathname);f(L,{state:{pathnameStackToGoBack:ne}})}},[m,e]),y=b.useCallback(()=>{S.vendor!=null&&T.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),S.vendor.id,S.vendor.name)},[S.vendor,h]);return b.useEffect(()=>{E()},[]),b.useEffect(()=>{S.fetchState==="Completed"&&y()},[y,S.fetchState]),d.jsx(Mo,{apAgingDetail:S,downloadParams:l,reportDate:h,analytics:T,onTransactionClick:w,onReload:E,onBackClick:v,onColumnSortConfigChanged:k,updateDownloadStateHandler:D,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),is=()=>{const e=$(),a=W(),t=_(k=>Fn(k)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ae({mobileExploreReferrer:"AP Aging"});Ge({isDataReady:t.fetchState==="Completed"});const r=M.getSignedInUser(),s=_(k=>k.tenantState.currentTenantId),i=_(k=>U(k)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${te}/agingReport`,timezone:We()}),[]),C=t.apAgingUIState.selectedDate??De(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(Ct(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(k=>{e(Ze({searchString:k}))},[]),p=b.useCallback((k,D)=>{e(Ze({sortKey:D,sortOrder:k}))},[]),f=b.useCallback(k=>{a(`./${k}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),S=b.useCallback(k=>{e(Ze({downloadState:k}))},[]),E=b.useCallback((k,D)=>{},[]),v=b.useCallback((k,D)=>{e(Ze({selectedDate:k,agingDateSelectionType:D})),e(Ct(k))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ve,{analytics:T,onLoad:k=>k.trackPageLoaded(Y.Event.agingReport,"AP Aging")}):null,d.jsx(wa,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:T,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:S,onSelectedDateChanged:v,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},cs=Ua(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=M.getSignedInUser(),i=_(y=>U(y)),{tenantEmailDomain:c}=K(),m=H(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${te}/agingDetailedReport`,timezone:We()}),[]),l=b.useMemo(()=>r!=null?ia(r):De(),[r]),h=$(),p=W(),f=_(y=>Rn(y,l,o)),S=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(Bn(o,l))},[l]),E=b.useCallback(()=>{p("../../",{relative:"path"})},[]),v=b.useCallback((y,I)=>{h(qt({sortKey:y,sortOrder:I}))},[]),k=b.useCallback(y=>{h(qt({downloadState:y}))},[]),D=b.useCallback(y=>{if(e)e(y.transactionId,y.transactionType);else if(c!=null){const I=Ga({id:y.transactionId,type:y.transactionType},c);p(I);const L=x(m.state?.pathnameStackToGoBack,m.pathname);p(I,{state:{pathnameStackToGoBack:L}})}},[c,e]),w=b.useCallback(()=>{f.customer!=null&&T.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{S()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&w()},[f.fetchState,w]),d.jsx(Lo,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:T,onTransactionClick:D,onReload:S,onBackClick:E,onColumnSortConfigChanged:v,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ls=()=>{const e=$(),a=W(),t=_(v=>jn(v)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ae({mobileExploreReferrer:"AR Aging"});Ge({isDataReady:t.fetchState==="Completed"});const r=M.getSignedInUser(),s=_(v=>U(v)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${te}/agingReport`,timezone:We()}),[]),g=t.arAgingUIState.selectedDate??De(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(kt(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(v=>{e(Qe({searchString:v}))},[]),h=b.useCallback((v,k)=>{e(Qe({sortKey:k,sortOrder:v}))},[]),p=b.useCallback(v=>{a(`./${v}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(v=>{e(Qe({downloadState:v}))},[]),S=b.useCallback((v,k)=>{e(Qe({selectedDate:v,agingDateSelectionType:k})),e(kt(v))},[]),E=b.useCallback((v,k)=>{e(Mn({nodeId:v,isCollapsed:k}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ve,{analytics:T,onLoad:v=>v.trackPageLoaded(Y.Event.agingReport,"AR Aging")}):null,d.jsx(wa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:S,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ya=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=Gn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Pe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Vn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?T.trackZeniAccountsCashBalancePromoClicked("Move Money"):(T.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else T.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const ds=ee(function(e){const a=Ln(e).accountsInOrder.map((n,o)=>Ya(n,o)),t=Un(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:T}},Na)(Pa),us=ee(function(e){const a=Yn(e).accountsInOrder.map((o,r)=>Ya(o,r)),t=M.getSignedInUser(),n=Xe(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}},Na)(Pa);function ms(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=yt(n?.loggedInUserRoleMap);return _(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(je,{}):d.jsx(ds,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function ps(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=yt(n?.loggedInUserRoleMap),r=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return _(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(je,{}):d.jsx(us,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const hs=wt.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex: 1 1 auto;
|
|
4
|
+
min-height: 100%;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
+
`,fs=wt.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex: 1 1 auto;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
align-items: center;
|
|
12
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
13
|
+
`;function gs({title:e,reportId:a,entityAutoCompleteView:t,autoCompleteText:n,isAiCfoAccessEnabled:o,onAskAiCfoClick:r}){const s=W(),i=$(),c=H(),{tenantEmailDomain:m}=K(),g=Uo();return d.jsxs(hs,{children:[d.jsx(Go,{source:a==="cash_balance"?"CashBalanceDetailScreen":"CardBalanceDetailScreen",title:e,onBackClick:()=>{s("../")},hideSearchBtn:!0,backgroundColor:g.colors.grey4,searchAutoComplete:{autoCompleteData:{entityAutoCompleteView:t,autoCompleteText:n},autoCompleteActions:{onAutoCompleteInputChange:C=>{C.trim().length>=2?i(le({searchString:C,searchOrigin:"navbar"})):C.trim().length===0&&i(J("navbar"))},onAutoCompleteEntity:C=>{n!=null&&T?.trackSearch(Y.Event.search,bs(a),C.type,C.name,n);const u=ue(C,m),l=x(c.state?.pathnameStackToGoBack,c.pathname);s(u,{state:{pathnameStackToGoBack:l}})}}},rightSideComponent:d.jsx(Vo,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r})}),d.jsx(fs,{children:a==="cash_balance"?d.jsx(ms,{}):d.jsx(ps,{})})]})}function Wt(){const e=H(),a=$(),{useFeatureGate:t}=Se(),{isFeatureEnabled:n}=t(B.isDepositAccountsFeatureEnabled),o=_(p=>p.cashBalanceState.fetchState),r=_(p=>p.cardBalanceState.fetchState),s=M.getSignedInUser();if(s==null)throw Error("Can't access dashboard detail without signing in...");const i=ca((p=>{const f=la(p,"/").split("/");return f[f.length-1]})(e.pathname));let c="Not-Started",m="";const g=q.getLocalizedStrings();switch(i){case"cash_balance":c=o,m=g.reportTitleById.cash_balance;break;case"card_balance":c=r,m=g.reportTitleById.card_balance;break;default:console.error(`${i} is not supported!`)}const{isAiCfoAccessEnabled:C,onAskAiCfoClick:u}=ae({mobileExploreReferrer:i==="card_balance"?"Card Balance":"Cash Balance"});Ge({isDataReady:c==="Completed"});const l=_(p=>p.entityAutoCompleteState.autoCompleteText.navbar),h=_(p=>ce(p,"navbar"));return b.useEffect(()=>{c==="Not-Started"&&function(p,f,S){switch(f){case"card_balance":p(ma());break;case"cash_balance":p(da()),S===!0&&p(ua());break;default:throw new Error(`balance report type ${f} is not yet supported`)}}(a,i,n)},[s,a,c]),d.jsxs(d.Fragment,{children:[c==="Completed"?d.jsx(Ve,{analytics:T,onLoad:p=>((f,S)=>{switch(S){case"card_balance":f.trackPageLoaded(Y.Event.cardBalance);break;case"cash_balance":f.trackPageLoaded(Y.Event.cashBalance);break;default:console.error(`Analytics: Not tracking Page Loaded for ${S}!`)}})(p,i)}):null,d.jsx(gs,{title:m,reportId:i,autoCompleteText:l,entityAutoCompleteView:h,isAiCfoAccessEnabled:C,onAskAiCfoClick:u})]})}const bs=e=>{switch(e){case"cash_balance":return"Cash Balance";case"card_balance":return"Card Balance";default:return"Dashboard"}},Cs=[];function Ye(e){const{mobileExploreReferrer:a}=e,t=$(),n=W(),o=H(),{tenantEmailDomain:r}=K(),{setIsAiCfoOpen:s,setAiCfoSidePanelQuestionToSubmit:i}=Oa(),c=Fa(),m=La(c),g=ra(),C=_(F=>F.tenantState.fetchState==="Completed"||F.tenantState.activeTenantFetchState.fetchState==="Completed"?U(F):void 0),u=C?.masterTOSInfo?.isMasterTOSAccepted??!1,l=_(F=>pa(F)),h=l.uiState?.currentChatSessionId,p=l.allSessionsWithOrderedQuestionAnswers??Cs,f=M.getSignedInUser()?.userId,S=Ra(),E=Yo()&&S&&r!=null,v=No(),k=$o(!0),D=_(F=>v!=null?Nn(F,v):void 0),{useDynamicConfig:w}=Se(),{configValue:y}=w(Ba.aiCfoMessageDynamicConfig),I=b.useMemo(()=>Array.isArray(y.default_message_list)?y.default_message_list:[],[y.default_message_list]),L=b.useMemo(()=>I.slice(0,2),[I]),ne=v!=null&&D!=null&&D.fetchState!=="Completed"&&D.fetchState!=="Error"&&(k||D.fetchState==="In-Progress"),$e=b.useMemo(()=>{if(v==null||D?.fetchState==="Error")return L;if(ne)return[];const F=(D?.suggestedQuestions??[]).map(oe=>oe.trim()).filter(oe=>oe.length>0).slice(0,2);return F.length===0?L:F},[L,ne,v,D?.fetchState,D?.suggestedQuestions]),me=b.useCallback((F,oe)=>{if(f==null||F.trim()==="")return;if(!u)return void se({location:o,navigate:n,mergeState:{referrer:a}});const Ke=ja(g.getState());if(m){const qe=x(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:qe,referrer:a,aiCfoInitialQuestion:F,aiCfoShouldSubmit:!Ke}})}else{if(Ke)return t(_t(F)),void s(!0);i(F),s(!0),Ma(t,F,"insights_section",h,p,f,oe,void 0)}},[p,h,t,u,m,o,a,n,s,i,g,r,f]),ze=b.useCallback(()=>{if(u)if(m){const F=x(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:F,referrer:a}})}else s(!0);else se({location:o,navigate:n,mergeState:{referrer:a}})},[u,m,o,a,n,s,r]);return b.useMemo(()=>{if(E)return{isSuggestedQuestionsLoading:ne,onAskSomethingElseClick:ze,onSuggestedQuestionClick:me,suggestedQuestions:$e}},[E,ne,ze,me,$e])}const Ne=zo,ks=ee(function(e){const a=$n(e),t=zn(e),n=ha(e),{scrollPosition:o,...r}=n,s=q.getLocalizedStrings().reportTitleById.cash_in_cash_out,i=M.getSignedInUser(),c=e.tenantState.currentTenantId,m=U(e),g=m?.companyName??"",C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=e.entityAutoCompleteState.autoCompleteText.navbar,l=ce(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:g,statementEndPoint:`${te}/statement`,authParams:C},analytics:T,autoCompleteData:{autoCompleteText:u,entityAutoCompleteView:l}}},function(e,a){return{updateDownloadStateHandler:t=>{e(Kn(t))},onTimeframeSelectionChanged:()=>{},onCOABalancesRangeChanged:(t,n)=>{e(Ue(t,n)),e(Oe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(xe("month")),e(de(a.firstMonthOfFY,t)),e(Oe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Me(a.firstMonthOfFY,t,o,n)),n.length>0&&e(Le(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(Oe({resetLeftScroll:!0})),50)},onElementCollapseStateChanged:(t,n)=>{e(Oe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(Oe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(le({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(J("navbar"))},onAutoCompleteEntity:t=>{const n=ue(t,a.tenantEmailDomain),o=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(Ne),_s=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r}=ae({mobileExploreReferrer:"DashboardCashInCashOut"}),s=Ye({mobileExploreReferrer:"DashboardCashInCashOut"}),i=_(c=>ha(c)).mode==="compare_mode";return d.jsx(ks,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:i,navigate:n,insightsSectionAiCfoInfo:s,isAiCfoAccessEnabled:o,onAskAiCfoClick:r})},Ss=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Je(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},ys=ee(function(e){const a=qn(e),t=Zn(e),n=fa(e),{scrollPosition:o,...r}=n,s=q.getLocalizedStrings().reportTitleById.cash_position,i=M.getSignedInUser(),c=e.tenantState.currentTenantId,m=U(e),g=m?.companyName??"",C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=e.entityAutoCompleteState.autoCompleteText.navbar,l=ce(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:g,statementEndPoint:`${te}/statement`,authParams:C},analytics:T,autoCompleteData:{autoCompleteText:u,entityAutoCompleteView:l}}},function(e,a){return{updateDownloadStateHandler:t=>{e(Qn(t))},onTimeframeSelectionChanged:t=>{e(xe(t)),setTimeout(()=>e(Fe({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ue(t,n)),e(Fe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(de(a.firstMonthOfFY,t)),e(Fe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Me(a.firstMonthOfFY,t,o,n)),n.length>0&&e(Le(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(Fe({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Ss(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=Pe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),c=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:c,referrer:"Cash Position"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(le({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(J("navbar"))},onAutoCompleteEntity:t=>{const n=ue(t,a.tenantEmailDomain),o=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onTableScroll:t=>{e(Fe({scrollPosition:t}))},onBackClick:()=>{a.navigate("../")}}})(Ne),vs=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r}=ae({mobileExploreReferrer:"DashboardCashPosition"}),s=Ye({mobileExploreReferrer:"DashboardCashPosition"}),i=_(c=>fa(c)).mode==="compare_mode";return d.jsx(ys,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:i,navigate:n,insightsSectionAiCfoInfo:s,isAiCfoAccessEnabled:o,onAskAiCfoClick:r})},N=(e,a,t,n)=>{e===!1?a!=null&&n("../../",{relative:"path"}):a!=t&&(a!=null&&a.length>0?n(`../${t}`,{replace:!0}):n(`./forecast/${t}`,{replace:!0}))};function ut(){return d.jsxs(bt,{children:[d.jsx(O,{path:"/",element:d.jsx(re,{})}),d.jsx(O,{path:"/:forecastId",element:d.jsx(re,{})}),d.jsx(O,{path:"/:forecastId/*",element:d.jsx(je,{})})]})}const As=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Je(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Is=ee(function(e){const a=ga(e),t=Hn(e),n=Wn(e),o=Xn(e),r=vt(e),{scrollPosition:s,...i}=r,c=t.reportTitle,m=M.getSignedInUser(),g=e.tenantState.currentTenantId,C=U(e),u=C?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:g??""},h=e.entityAutoCompleteState.autoCompleteText.navbar,p=ce(e,"navbar"),f=At(C);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:c},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${te}/statement`,authParams:l},analytics:T,isZeniUser:Xe(m),autoCompleteData:{autoCompleteText:h,entityAutoCompleteView:p},isZeniCOAUsed:f,isAccountingClassesEnabled:we(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(to(t))},onTimeframeSelectionChanged:t=>{e(xe(t)),setTimeout(()=>e(ge({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ue(t,n)),e(ge({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(de(a.firstMonthOfFY,t)),e(ge({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Me(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Le(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&N(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(ge({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=As(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Pt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Pe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),c=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:c,referrer:"Burn Rate"}})}},onElementCollapseStateChanged:(t,n)=>{e(ge({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(ge({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(le({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(J("navbar"))},onAutoCompleteEntity:t=>{const n=ue(t,a.tenantEmailDomain),o=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(Ee(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?Te:Ft,n)),t==="forecast_mode"?(e(Zt({viewMode:"account_group"})),e(ba(!1,n?.id)),n!=null&&N(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):N(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(ge({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Burn Rate"),e(Zt({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(eo({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(Jn())},onResyncReports:()=>{e(It("net_burn_or_income_by_classes"))}}})(Ne),Es=e=>{const a=$(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,{isAiCfoAccessEnabled:s,onAskAiCfoClick:i}=ae({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),c=Ye({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),m=_(y=>vt(y)),g=m.isForecastModeOn,C=m.timeframe,u=m.selectedForecast?.id,l=_(y=>Et(y.forecastState,u??"")),h=_(y=>ga(y)),p=_(y=>Tt(y)),f=_(y=>we(y)),S=m.mode==="compare_mode",E=h.dataAvailable;b.useEffect(()=>{if(u!=null&&g===!0&&(N(g,r,u,o),l!=null)){const y=l?.forecastPeriod,I=E!=null&&y.endDate.isAfter(E?.endDate)===!0?E:y;a(de(e.firstMonthOfFY,{startDate:I.endDate.startOf(C),endDate:I?.endDate}))}},[u]);const v=_e(),{useFeatureGate:k}=Se(),{isFeatureEnabled:D}=k(B.isReportsCommentingEnabled),w=Ot(D?v?.currentTenant?.companyId:void 0,{clearParams:h.fetchState==="Completed"});return d.jsx(Is,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,forecastIdFromUrlPath:r,location:n,isAccountingClassesEnabled:f,isCompareModeOn:S,navigate:o,analytics:T,reportsResyncFetchState:p.reportsResyncFetchState,insightsSectionAiCfoInfo:c,isAiCfoAccessEnabled:s,onAskAiCfoClick:i,initialOpenThreadRequest:w,isReportsCommentingEnabled:D})},Ts=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Je(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Ds=ee(function(e){const a=Ca(e),t=ao(e),n=no(e),o=oo(e),r=Dt(e),{scrollPosition:s,...i}=r,c=q.getLocalizedStrings().reportTitleById.operating_expenses,m=M.getSignedInUser(),g=e.tenantState.currentTenantId,C=U(e),u=C?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:g??""},h=e.entityAutoCompleteState.autoCompleteText.navbar,p=ce(e,"navbar"),f=At(C);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:c},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${te}/statement`,authParams:l},analytics:T,isZeniUser:Xe(m),autoCompleteData:{autoCompleteText:h,entityAutoCompleteView:p},isZeniCOAUsed:f,isAccountingClassesEnabled:we(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(io(t))},onTimeframeSelectionChanged:t=>{e(xe(t)),setTimeout(()=>e(be({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ue(t,n)),e(be({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(de(a.firstMonthOfFY,t)),e(be({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Me(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Le(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&N(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(be({resetLeftScroll:!0})),50)},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(t,n)=>{const{timePeriod:o,timeframe:r}=Ts(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Pt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Pe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),c=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:c,referrer:"Operating Expenses"}})}},onElementCollapseStateChanged:(t,n)=>{e(be({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(be({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(le({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(J("navbar"))},onAutoCompleteEntity:t=>{const n=ue(t,a.tenantEmailDomain),o=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(Ee(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?Te:Ft,n)),t=="forecast_mode"?(e(Qt({viewMode:"account_group"})),e(ka(!1,n?.id)),n!=null&&N(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):N(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(be({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Operating Expenses"),e(Qt({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(ro({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(so())},onResyncReports:()=>{e(It("operating_expenses_by_classes"))}}})(Ne),xs=e=>{const a=$(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,{isAiCfoAccessEnabled:s,onAskAiCfoClick:i}=ae({mobileExploreReferrer:"DashboardOpEx"}),c=Ye({mobileExploreReferrer:"DashboardOpEx"}),m=_(I=>Dt(I)),g=m.isForecastModeOn,C=m.timeframe,u=m.selectedForecast?.id,l=_(I=>Et(I.forecastState,u??"")),h=_(I=>Ca(I)),p=_(I=>Tt(I)),f=_(I=>we(I)),S=m.mode==="compare_mode",E=h.dataAvailable;b.useEffect(()=>{if(u!=null&&g===!0&&(N(g,r,u,o),l!=null)){const I=l?.forecastPeriod,L=E!=null&&I.endDate.isAfter(E?.endDate)===!0?E:I;a(de(e.firstMonthOfFY,{startDate:L.endDate.startOf(C),endDate:L?.endDate}))}},[u]);const v=_e(),k=v?.loggedInUserRole!=null&&_a(v?.loggedInUserRole)!==!0,{useFeatureGate:D}=Se(),{isFeatureEnabled:w}=D(B.isReportsCommentingEnabled),y=Ot(w?v?.currentTenant?.companyId:void 0,{clearParams:h.fetchState==="Completed"});return d.jsx(Ds,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,location:n,isAccountingClassesEnabled:f,isCompareModeOn:S,navigate:o,forecastIdFromUrlPath:r,analytics:T,hasTransactionAccess:k,reportsResyncFetchState:p.reportsResyncFetchState,insightsSectionAiCfoInfo:c,isAiCfoAccessEnabled:s,onAskAiCfoClick:i,initialOpenThreadRequest:y,isReportsCommentingEnabled:w})},ws=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Je(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Ps=ee(function(e){const a=Sa(e),t=co(e),n=lo(e),o=uo(e),r=xt(e),{scrollPosition:s,...i}=r,c=q.getLocalizedStrings().reportTitleById.revenue,m=M.getSignedInUser(),g=e.tenantState.currentTenantId,C=U(e),u=C?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:g??""},h=e.entityAutoCompleteState.autoCompleteText.navbar,p=ce(e,"navbar"),f=At(C);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:c},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${te}/statement`,authParams:l},analytics:T,isZeniUser:Xe(m),autoCompleteData:{autoCompleteText:h,entityAutoCompleteView:p},isZeniCOAUsed:f,isAccountingClassesEnabled:we(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(ho(t))},onTimeframeSelectionChanged:t=>{e(xe(t)),setTimeout(()=>e(Ce({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ue(t,n)),e(Ce({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(de(a.firstMonthOfFY,t)),e(Ce({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Me(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Le(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&N(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(Ce({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=ws(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Pt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Pe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),c=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:c,referrer:"Revenues"}})}},onElementCollapseStateChanged:(t,n)=>{e(Ce({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(Ce({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(le({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(J("navbar"))},onAutoCompleteEntity:t=>{const n=ue(t,a.tenantEmailDomain),o=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(Ee(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?Te:Ft,n)),t==="forecast_mode"?(e(Ht({viewMode:"account_group"})),e(ya(!1,n?.id)),n!=null&&N(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):N(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(Ce({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Revenues"),e(Ht({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(po({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(mo())},onResyncReports:()=>{e(It("revenue_by_classes"))}}})(Ne),Os=e=>{const a=$(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,{isAiCfoAccessEnabled:s,onAskAiCfoClick:i}=ae({mobileExploreReferrer:"DashboardRevenue"}),c=Ye({mobileExploreReferrer:"DashboardRevenue"}),m=_(y=>xt(y)),g=m.isForecastModeOn,C=m.timeframe,u=m.selectedForecast?.id,l=_(y=>Et(y.forecastState,u??"")),h=_(y=>Sa(y)),p=h.dataAvailable,f=m.mode==="compare_mode",S=_(y=>we(y)),E=_(y=>Tt(y));b.useEffect(()=>{if(u!=null&&g===!0&&(N(g,r,u,o),l!=null)){const y=l?.forecastPeriod,I=p!=null&&y.endDate.isAfter(p?.endDate)===!0?p:y;a(de(e.firstMonthOfFY,{startDate:I.endDate.startOf(C),endDate:I?.endDate}))}},[u]);const v=_e(),{useFeatureGate:k}=Se(),{isFeatureEnabled:D}=k(B.isReportsCommentingEnabled),w=Ot(D?v?.currentTenant?.companyId:void 0,{clearParams:h.fetchState==="Completed"});return d.jsx(Ps,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,isAccountingClassesEnabled:S,isCompareModeOn:f,location:n,navigate:o,forecastIdFromUrlPath:r,analytics:T,reportsResyncFetchState:E.reportsResyncFetchState,insightsSectionAiCfoInfo:c,isAiCfoAccessEnabled:s,onAskAiCfoClick:i,initialOpenThreadRequest:w,isReportsCommentingEnabled:D})},Fs=e=>{let a,t;if(e.endDate!=null)switch(e.timePeriod){case"this_month_to_date":case"last_month":case"this_week_to_date":case"last_week":a="month",t={startDate:e.endDate.startOf("month"),endDate:e.endDate};break;case"last_3_months":case"last_6_months":case"last_12_months":case"this_year_to_date":case"last_year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;default:console.error(`this timeperiod ${e.timePeriod} is not supported!`)}return{timeframe:a,timePeriod:t}},Rs=ee(function(e){const a=fo(e),t=e.entityAutoCompleteState.autoCompleteText.navbar,n=ce(e,"navbar");return{report:a,analytics:T,autoCompleteData:{autoCompleteText:t,entityAutoCompleteView:n}}},function(e,a){return{onTimeframeSelectionChanged:t=>{T.trackTimeframeSwitch(Va(t),"Top Expenses"),e(va(t))},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Fs(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=Pe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),c=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:c,referrer:"Top Expenses"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(le({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(J("navbar"))},onAutoCompleteEntity:t=>{const n=ue(t,a.tenantEmailDomain),o=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(Ko),Bs=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e;return d.jsx(Rs,{tenantEmailDomain:a,location:t,navigate:n})},js=wt.div`
|
|
14
|
+
display: flex;
|
|
15
|
+
flex: 1 1 auto;
|
|
16
|
+
min-height: 100%;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
19
|
+
align-items: center;
|
|
20
|
+
`,Te=3,Ft=1;function Ms({fetchState:e,firstMonthOfFY:a,reportId:t,forecastId:n}){const o=W(),r=H(),{tenantEmailDomain:s}=K();let i;Ge({isDataReady:!0});const c={firstMonthOfFY:a,tenantEmailDomain:s,location:r,navigate:o,forecastIdFromUrlPath:n,fetchState:e};switch(t){case"operating_expenses":i=d.jsx(xs,{...c});break;case"revenue":i=d.jsx(Os,{...c});break;case"net_burn_or_income":i=d.jsx(Es,{...c});break;case"cash_position":i=d.jsx(vs,{...c});break;case"top_expenses":i=d.jsx(Bs,{...c});break;case"cash_in_cash_out":i=d.jsx(_s,{...c});break;default:console.error(`${t} is not supported!`),i=null}return i!=null?d.jsx(js,{children:i}):null}function re(){const e=H(),a=$(),{forecastId:t}=K();let n="Not-Started";const o=_(l=>Dt(l).fetchState),r=_(l=>xt(l).fetchState),s=_(l=>vt(l).fetchState),i=_(l=>l.cashPositionState.fetchState),c=_(l=>l.topExState.fetchState),m=_(l=>l.cashInCashOutState.fetchState);if(M.getSignedInUser()==null)throw Error("Can't access dashboard detail without signing in...");const g=_(l=>U(l)),C=g?.company?.companyInfo?.firstMonthOfFY??1,u=ca((l=>{const h=la(l,"/").split("/");return t!=null?h[h.length-3]:h[h.length-1]})(e.pathname));switch(u){case"operating_expenses":n=o;break;case"revenue":n=r;break;case"net_burn_or_income":n=s;break;case"cash_position":n=i;break;case"top_expenses":n=c;break;case"cash_in_cash_out":n=m;break;default:console.error(`${u} is not supported!`)}return b.useEffect(()=>{n==="Not-Started"&&function(l,h,p,f){switch(h){case"operating_expenses":l(xa(!0)),f!=null&&(l(Ee(p,!0,Te,{id:f,index:0})),l(ka(!1,f)));break;case"revenue":l(Da(!0)),f!=null&&(l(Ee(p,!0,Te,{id:f,index:0})),l(ya(!1,f)));break;case"net_burn_or_income":l(Ta(!0)),f!=null&&(l(Ee(p,!0,Te,{id:f,index:0})),l(ba(!1,f)));break;case"cash_position":l(Ea(!0));break;case"top_expenses":l(Ia());break;case"cash_in_cash_out":l(Aa());break;default:throw new Error(`report type ${h} is not yet supported`)}}(a,u,C,t)},[t]),d.jsxs(d.Fragment,{children:[n==="Completed"?d.jsx(Ve,{analytics:T,onLoad:l=>((h,p)=>{const f=e.state?.referrer;switch(p){case"operating_expenses":h.trackPageLoaded(Y.Event.operatingExpenses,f);break;case"revenue":h.trackPageLoaded(Y.Event.revenues,f);break;case"net_burn_or_income":h.trackPageLoaded(Y.Event.burnRate,f);break;case"cash_position":h.trackPageLoaded(Y.Event.cashPosition,f);break;case"top_expenses":h.trackPageLoaded(Y.Event.topExpenses,f);break;case"cash_in_cash_out":h.trackPageLoaded(Y.Event.cashInCashOut,f);break;default:console.error(`Analytics: Not tracking Page Loaded for ${p}!`)}})(l,u)}):null,d.jsx(Ms,{firstMonthOfFY:C,fetchState:n,reportId:u,forecastId:t})]})}var mt=typeof navigator<"u"&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function pt(e,a,t,n){e.addEventListener?e.addEventListener(a,t,n):e.attachEvent&&e.attachEvent("on".concat(a),function(){t(window.event)})}function $a(e,a){for(var t=a.slice(0,a.length-1),n=0;n<t.length;n++)t[n]=e[t[n].toLowerCase()];return t}function za(e){typeof e!="string"&&(e="");for(var a=(e=e.replace(/\s/g,"")).split(","),t=a.lastIndexOf("");t>=0;)a[t-1]+=",",a.splice(t,1),t=a.lastIndexOf("");return a}for(var Rt={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":mt?173:189,"=":mt?61:187,";":mt?59:186,"'":222,"[":219,"]":221,"\\":220},ie={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},St={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},j={16:!1,18:!1,17:!1,91:!1},R={},He=1;He<20;He++)Rt["f".concat(He)]=111+He;var P=[],Xt=!1,Ka="all",Jt=[],tt=function(e){return Rt[e.toLowerCase()]||ie[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function ea(e){Ka=e||"all"}function Be(){return Ka||"all"}var ht=function(e){var a=e.key,t=e.scope,n=e.method,o=e.splitKey,r=o===void 0?"+":o;za(a).forEach(function(s){var i=s.split(r),c=i.length,m=i[c-1],g=m==="*"?"*":tt(m);if(R[g]){t||(t=Be());var C=c>1?$a(ie,i):[];R[g]=R[g].filter(function(u){return!((!n||u.method===n)&&u.scope===t&&function(l,h){for(var p=l.length>=h.length?l:h,f=l.length>=h.length?h:l,S=!0,E=0;E<p.length;E++)f.indexOf(p[E])===-1&&(S=!1);return S}(u.mods,C))})}})};function ta(e,a,t,n){var o;if(a.element===n&&(a.scope===t||a.scope==="all")){for(var r in o=a.mods.length>0,j)Object.prototype.hasOwnProperty.call(j,r)&&(!j[r]&&a.mods.indexOf(+r)>-1||j[r]&&a.mods.indexOf(+r)===-1)&&(o=!1);(a.mods.length!==0||j[16]||j[18]||j[17]||j[91])&&!o&&a.shortcut!=="*"||a.method(e,a)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function aa(e,a){var t=R["*"],n=e.keyCode||e.which||e.charCode;if(G.filter.call(this,e)){if(n!==93&&n!==224||(n=91),P.indexOf(n)===-1&&n!==229&&P.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(h){var p=St[h];e[h]&&P.indexOf(p)===-1?P.push(p):!e[h]&&P.indexOf(p)>-1?P.splice(P.indexOf(p),1):h==="metaKey"&&e[h]&&P.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(P=P.slice(P.indexOf(p))))}),n in j){for(var o in j[n]=!0,ie)ie[o]===n&&(G[o]=!0);if(!t)return}for(var r in j)Object.prototype.hasOwnProperty.call(j,r)&&(j[r]=e[St[r]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(P.indexOf(17)===-1&&P.push(17),P.indexOf(18)===-1&&P.push(18),j[17]=!0,j[18]=!0);var s=Be();if(t)for(var i=0;i<t.length;i++)t[i].scope===s&&(e.type==="keydown"&&t[i].keydown||e.type==="keyup"&&t[i].keyup)&&ta(e,t[i],s,a);if(n in R){for(var c=0;c<R[n].length;c++)if((e.type==="keydown"&&R[n][c].keydown||e.type==="keyup"&&R[n][c].keyup)&&R[n][c].key){for(var m=R[n][c],g=m.splitKey,C=m.key.split(g),u=[],l=0;l<C.length;l++)u.push(tt(C[l]));u.sort().join("")===P.sort().join("")&&ta(e,m,s,a)}}}}function G(e,a,t){P=[];var n=za(e),o=[],r="all",s=document,i=0,c=!1,m=!0,g="+",C=!1;for(t===void 0&&typeof a=="function"&&(t=a),Object.prototype.toString.call(a)==="[object Object]"&&(a.scope&&(r=a.scope),a.element&&(s=a.element),a.keyup&&(c=a.keyup),a.keydown!==void 0&&(m=a.keydown),a.capture!==void 0&&(C=a.capture),typeof a.splitKey=="string"&&(g=a.splitKey)),typeof a=="string"&&(r=a);i<n.length;i++)o=[],(e=n[i].split(g)).length>1&&(o=$a(ie,e)),(e=(e=e[e.length-1])==="*"?"*":tt(e))in R||(R[e]=[]),R[e].push({keyup:c,keydown:m,scope:r,mods:o,shortcut:n[i],method:t,key:n[i],splitKey:g,element:s});s!==void 0&&!function(u){return Jt.indexOf(u)>-1}(s)&&window&&(Jt.push(s),pt(s,"keydown",function(u){aa(u,s)},C),Xt||(Xt=!0,pt(window,"focus",function(){P=[]},C)),pt(s,"keyup",function(u){aa(u,s),function(l){var h=l.keyCode||l.which||l.charCode,p=P.indexOf(h);if(p>=0&&P.splice(p,1),l.key&&l.key.toLowerCase()==="meta"&&P.splice(0,P.length),h!==93&&h!==224||(h=91),h in j)for(var f in j[h]=!1,ie)ie[f]===h&&(G[f]=!1)}(u)},C))}var ft={setScope:ea,getScope:Be,deleteScope:function(e,a){var t,n;for(var o in e||(e=Be()),R)if(Object.prototype.hasOwnProperty.call(R,o))for(t=R[o],n=0;n<t.length;)t[n].scope===e?t.splice(n,1):n++;Be()===e&&ea(a||"all")},getPressedKeyCodes:function(){return P.slice(0)},isPressed:function(e){return typeof e=="string"&&(e=tt(e)),P.indexOf(e)!==-1},filter:function(e){var a=e.target||e.srcElement,t=a.tagName,n=!0;return!a.isContentEditable&&(t!=="INPUT"&&t!=="TEXTAREA"&&t!=="SELECT"||a.readOnly)||(n=!1),n},trigger:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(R).forEach(function(t){var n=R[t].find(function(o){return o.scope===a&&o.shortcut===e});n&&n.method&&n.method()})},unbind:function(e){if(e===void 0)Object.keys(R).forEach(function(s){return delete R[s]});else if(Array.isArray(e))e.forEach(function(s){s.key&&ht(s)});else if(typeof e=="object")e.key&&ht(e);else if(typeof e=="string"){for(var a=arguments.length,t=new Array(a>1?a-1:0),n=1;n<a;n++)t[n-1]=arguments[n];var o=t[0],r=t[1];typeof o=="function"&&(r=o,o=""),ht({key:e,scope:o,method:r,splitKey:"+"})}},keyMap:Rt,modifier:ie,modifierMap:St};for(var gt in ft)Object.prototype.hasOwnProperty.call(ft,gt)&&(G[gt]=ft[gt]);if(typeof window<"u"){var Ls=window.hotkeys;G.noConflict=function(e){return e&&window.hotkeys===G&&(window.hotkeys=Ls),G},window.hotkeys=G}G.filter=function(){return!0};var na=function(e,a){var t=e.target,n=t&&t.tagName;return!!(n&&a&&a.includes(n))};function Us(e,a,t,n){t instanceof Array&&(n=t,t=void 0);var o=t||{},r=o.enableOnTags,s=o.filter,i=o.keyup,c=o.keydown,m=o.filterPreventDefault,g=m===void 0||m,C=o.enabled,u=C===void 0||C,l=o.enableOnContentEditable,h=l!==void 0&&l,p=b.useRef(null),f=b.useCallback(function(S,E){var v,k;return s&&!s(S)?!g:!!(na(S,["INPUT","TEXTAREA","SELECT"])&&!na(S,r)||(v=S.target)!=null&&v.isContentEditable&&!h)||!!(p.current===null||document.activeElement===p.current||(k=p.current)!=null&&k.contains(document.activeElement))&&(a(S,E),!0)},n?[p,r,s].concat(n):[p,r,s]);return b.useEffect(function(){if(u)return i&&c!==!0&&(t.keydown=!1),G(e,t||{},f),function(){return G.unbind(e,f)};G.unbind(e,f)},[f,e,u]),p}G.isPressed;const Gs=[],oa="dashboard_card",X="ai_cfo_dashboard_card";function sa(e,a){return a?e.some(t=>String(t)===X)?e.slice():[X,...e]:e.filter(t=>String(t)!==X)}const Vs=["net_burn_or_income_story_card","cash_balance","task_card","card_balance","zeni_promo_card","insights_dashboard","information_card","company_details","bill_pay_promo_card","bill_pay_card","reimbursement_card","reimbursement_promo_card","zeni_accounts_promo_card","rewards_card","treasury_promo_card"],Ys=(e,a,t,n,o)=>({card:{dimension:et(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1,spansFullDashboardWidth:!1},data:e.status!=null?{balanceAmount:e.balance?.available,lastUpdatedTime:e.status.lastRefreshSuccessTime,changePercent:e.balance?.change?.percent,changeComparedToDate:e.balance?.change?.since}:void 0}),Re=(e,a,t,n,o)=>({card:{dimension:et(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1,spansFullDashboardWidth:!1},data:e}),Ns=(e,a,t,n)=>Re(void 0,e,ke,a,t),$s=(e,a,t,n,o)=>({card:{dimension:et(ke),cardType:a,cardIndex:t,fetchState:e,disableAnimations:!1,spansFullDashboardWidth:!1},data:{funds:n,shouldShowTreasuryPromoIntroVideo:o,videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),zs=e=>{const a=et(ke);return a.height=ke.height+10,{card:{dimension:a,cardType:X,cardIndex:e,fetchState:"Completed",disableAnimations:!1,spansFullDashboardWidth:!0}}},Ks=ee(function(e,a){const t=Qs(a.dashboardReport),n=a.passedCardsOrdered,o=a.dashboardReport.reportsInOrder,{isInterestedInChargeCard:r,cardsCreditLimit:s,cashbackRate:i,treasuryFundDetails:c,shouldShowTreasuryPromoIntroVideo:m,treasuryFetchState:g}=a;let C=n.map((u,l)=>{if(u==="reimbursement_promo_card"||u==="bill_pay_promo_card")return Ns(t,u,l);if(u==="zeni_promo_card")return Re({isExpressedInterest:r,creditLimit:s,cashbackRate:i,fetchState:"Completed"},a.cardBalanceFetchState,ke,u,l);if(u==="treasury_promo_card")return $s(g,u,l,c,m);if(u==="information_card")return Re(void 0,"Completed",ke,u,l);if(u===X)return zs(l);{const h=o.find(p=>p?.reportId===u);return h?function(p,f,S,E){const v=p.reportId;switch(v){case"card_balance":case"cash_balance":return[Ys(p,f,S,v,E)];case"expense_automation_card":case"operating_expenses":case"revenue":case"top_expenses":case"cash_position":case"cash_in_cash_out":case"insights_dashboard":case"company_details":case"task_card":case"bill_pay_card":case"reimbursement_card":case"net_burn_or_income":case"accounts_payable_aging":case"accounts_receivable_aging":case"zeni_accounts_promo_card":case"rewards_card":return[Re(p,f,S,v,E)];case"net_burn_or_income_story_card":return[Re(p,f,S,"net_burn_or_income_story_card",E)];default:return console.error(`card type ${v} not yet supported!`),[]}}(h,h.fetchState,ke,l):[]}}).flat();return a.isSummaryCardsFiltered===!0&&(C=C.filter(u=>Vs.includes(u.card.cardType)==0).filter(u=>{const l=u.data?.availableNumberOfPeriods;return l!=null?l>0:u.card.cardType!="top_expenses"||u.data==null||function(h){if(h==null||h.length===0)return!0;let p=!0;for(const f of h)if(f.balance.available.amount!==0){p=!1;break}return p}(u.data.topExpenses.accountsOrdered)===!1})),{cardDataArray:C,autoCompleteData:{autoCompleteText:e.entityAutoCompleteState.autoCompleteText.navbar,entityAutoCompleteView:ce(e,"navbar")},analytics:T,isReimbursementEnabled:a.isReimbursementEnabled,isBillPayEnabled:a.isBillPayEnabled}},function(e,a){const t=a.tenantId,n=M.getSignedInUser();return{cardActions:{onCardClick:(o,r,s,i)=>{if(console.warn(`onCardClick at ${o} for the type ${r}`),r==="zeni_promo_card"&&i!=null)T.trackDashboardCardClicked("cards promo",2),T.trackZeniCardsPromoCardClicked(a.isChargeCardFeatureEnabled,i,2,`${n?.firstName??""} ${n?.lastName??""}`,a.isChargeCardFeatureEnabled?a.cardsCreditLimit:void 0),i==="Learn More"?window.open("https://www.zeni.ai/product/business-credit-card","_blank"):a.navigate("../cards/promo",{relative:"path"});else if(a.isForecastOn)switch(r){case"net_burn_or_income":case"operating_expenses":case"revenue":a.navigate(`${r}/forecast/${a.selectedForecastOnDashboard}`,{state:{referrer:s}});break;default:a.navigate(`${r}`,{state:{referrer:s}})}else r==="rewards_card"?(n!=null&&T.trackDashboardCardClicked("rewards promo",o+1),a.navigate("../../rewards/refer",{state:{referrer:s}})):r==="expense_automation_card"?(T.trackMonthEndCloseClicked(a.selectedPeriod.month,a.selectedPeriod.year,"Dashboard"),a.navigate("../../month_end_close_checks/review",{state:{referrer:"Dashboard"}})):a.navigate(`${r}`,{state:{referrer:s}})},onReloadData:(o,r)=>{const s=[];a.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),a.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),a.isZeniAccountEnabled===!1&&s.push("zeni_accounts_promo_card"),a.isRewardsFeatureEnabled===!1&&s.push("rewards_card"),function(i,c,m,g){if(c!==X)switch(c){case"card_balance":i(ma());break;case"cash_balance":i(da());break;case"operating_expenses":i(xa(!0));break;case"revenue":i(Da(!0));break;case"net_burn_or_income":i(Ta(!0));break;case"net_burn_or_income_story_card":i(Ro(!0));break;case"cash_position":i(Ea(!0));break;case"top_expenses":i(Ia());break;case"cash_in_cash_out":i(Aa());break;case"insights_dashboard":i(Fo());break;case"bill_pay_card":i(Oo());break;case"reimbursement_card":i(Po());break;case"company_details":i(wo(m));break;case"task_card":i(xo());break;case"accounts_payable_aging":g.includes("accounts_payable_aging")===!1&&i(Ct(De()));break;case"accounts_receivable_aging":i(kt(De()));break;case"zeni_accounts_promo_card":g.includes("zeni_accounts_promo_card")===!1&&i(ua());break;case"rewards_card":g.includes("rewards_card")===!1&&i(Do(!0));break;default:throw new Error(`report type ${c} is not yet supported`)}}(e,r,a.companyId,s)},onTimeframeChange:(o,r)=>{T.trackTimeframeSwitch(Va(r),Zs(o),"Dashboard"),function(s,i,c){switch(i){case"operating_expenses":case"revenue":case"net_burn_or_income":case"cash_position":s(xe(c));break;case"top_expenses":s(va(c));break;default:throw new Error(`report type ${i} doesn't support changeTimeframe`)}}(e,o,r)},onUpdateSelectedInsightIndex:o=>{e(To(o))},onCategoryClick:(o,r,s)=>{o==="bill-pay"?a.navigate("../bills",{state:{tab:r,subTab:s},relative:"path"}):o==="reimbursement"?a.navigate("../reimbursements",{state:{tab:r,subTab:s},relative:"path"}):o==="uncategorized-account-mapping"?a.navigate("../settings/accounting",{relative:"path"}):o==="show-all-tasks"?a.navigate("../tasks",{relative:"path"}):a.navigate(`../../transactions/${o}`)},onCardBtnClick:(o,r)=>{if(o==="bill_pay_promo_card"){const s="../bills",i=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else if(o==="reimbursement_promo_card"){const s="../reimbursements",i=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else if(o==="zeni_accounts_promo_card")if(a.hasZeniAccountsAdminAccess){let s="../checking/promo";r!=null&&(s=`../checking/${r}`);const i=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else window.open("https://www.zeni.ai/product/business-checking-accounts","_blank");else if(o==="treasury_promo_card")if(a.isUserHasTreasuryAccess){M.saveTreasuryPopupSeen(a.tenantEmailDomain,!0);const s="../treasury",i=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else window.open("https://www.zeni.ai/product/treasury","_blank")},onSaveClick:(o,r,s)=>{o==="net_burn_or_income_story_card"&&(T.trackUpdateBurnRateCalculatorSettings(r,s,Io(s)),e(Eo(t,r,s)))},onVideoPlay:()=>{e(dt())},onRemindMeLaterClick:()=>{e(Ao())},onDontShowAgainClick:()=>{e(dt())},onIntroOutsideClick:()=>{a.isTreasuryPromoIntroClosedByOutsideClick===!0&&a.isTreasuryPromoVideoPlayed!==!0?e(dt()):e(vo())}},autoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(le({searchString:o,searchOrigin:"navbar"})):o.trim().length===0&&e(J("navbar"))},onCancelAutoComplete:()=>{e(J("navbar"))},onAutoCompleteEntity:o=>{let r="";r=o.type!=="vendor"||o.detailType!=="bank_merchant"&&o.detailType!=="card_merchant"?ue(o,a.tenantEmailDomain):ts(o.zeniId,o.qboId,a.tenantEmailDomain);const s=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s,referrer:"Search"}})}}}})(es);function qs(){const e=ra(),a=Fa(),t=La(a),{isAiCfoOpen:n,setIsAiCfoOpen:o,setAiCfoSidePanelQuestionToSubmit:r}=Oa(),s=W(),i=$(),c=H(),m=M.getSignedInUser(),{useFeatureGate:g,useDynamicConfig:C}=Se(),[u,l]=b.useState(!1),[h,p]=b.useState(!1),f=Ra(),{tenantEmailDomain:S}=K(),{isAiCfoAccessEnabled:E,onAskAiCfoClick:v}=ae({mobileExploreReferrer:"Dashboard"}),k=_(A=>A.tenantState.fetchState==="Completed"||A.tenantState.activeTenantFetchState.fetchState==="Completed"?U(A):void 0),D=k??M.getSignedInUserTenant(S),w=k?.masterTOSInfo?.isMasterTOSAccepted??!1,y=D.tenantId,I=D.companyId;b.useEffect(()=>{u===!1&&c.state?.message==="activation"&&(i(go(I)),l(!0))},[c.state,u,I,i]),b.useEffect(()=>{f&&!h&&c.state?.message==="open_ai_cfo_drawer"&&(p(!0),w?(o(!0),s({pathname:c.pathname,search:c.search,hash:c.hash},{replace:!0,state:{...c.state,message:void 0}})):se({location:c,navigate:s,mergeState:{referrer:"Dashboard",message:void 0}}))},[c,h,f,w,o,s]);const{isFeatureEnabled:L}=g(B.isApAgingFeatureEnabled),{isFeatureEnabled:ne}=g(B.isExpenseAutomationEnabled),{isFeatureEnabled:$e}=g(B.isExpenseAutomationEnabledV2),me=qo(),{isFeatureEnabled:ze}=g(B.isTreasuryEnabled),F=Zo(me),{isFeatureEnabled:oe}=g(B.isArAgingFeatureEnabled),{isFeatureEnabled:Ke}=g(B.isDepositAccountsFeatureEnabled),{isFeatureEnabled:qe}=g(B.isReferralFeatureEnabled),{isFeatureEnabled:qa}=g(B.isChargeCardFeatureEnabled),{isFeatureEnabled:Za}=g(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Qa}=g(B.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Ha}=g(B.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Wa}=g(B.aiAuditScorePercentage),{configValue:Bt}=C(Ba.zeniCardsConfig),Xa=Bt.charge_card_cashback_rate_per_transaction==null?.0175:Bt.charge_card_cashback_rate_per_transaction;if(c.state?.message==="activation"){const A=Qo(c.state?.pathnameStackToGoBack);s(c.pathname,{state:{...c.state,message:void 0,pathnameStackToGoBack:A.newStack}})}const[jt,Ja]=b.useState(!1),[at,en]=b.useState(!1);Us("command+p, Control+p",A=>{en(!at),A.preventDefault()},{enableOnContentEditable:!0,enableOnTags:["INPUT","SELECT","TEXTAREA"]},[at]);const Mt=k?.externalConnections?.accounting[0]?.isValid;if(m==null)throw Error("Can't access dashboard without signing in...");const pe=_(A=>U(A)?.excludedResources),tn=_(A=>A.expenseAutomationViewState.selectedPeriodByTenantId),an=!!k?.companyReimbursementInfo?.info?.isReimbursementEnabled,nn=!!k?.companyBillPayInfo?.info?.isBillPayEnabled,on=_(A=>A.treasurySetupViewState.treasuryFundsDetails).fetchStatus.fetchState,sn=k?.company!=null&&bo(k.company),rn=ze&&sn,nt=_e(),cn=yt(nt?.loggedInUserRoleMap),z=[],Lt=pe?.resources?.find(A=>A.resource==="/reports/top_expenses")==null,ln=pe?.resources?.find(A=>A.resource==="/reports/task_card")==null,ot=k?.userRole!=null&&_a(k?.userRole),dn=pe?.resources?.find(A=>A.resource==="/bills")==null&&!ot,un=pe?.resources?.find(A=>A.resource==="/reimbursements")==null,mn=Co(nt?.loggedInUserRoleMap),pn=ko(nt?.loggedInUserRoleMap),hn=k?.company?.companyChargeCardInfo?.chargeCardsCreditAccountLimit??0,fn=k?.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,gn=_(A=>A.treasurySetupViewState.treasuryFundsDetails).fundsDetails;Lt===!1&&z.push("top_expenses"),ln===!1&&z.push("task_card"),dn===!1&&z.push("bill_pay_card","bill_pay_promo_card"),L===!1&&z.push("accounts_payable_aging"),oe===!1&&z.push("accounts_receivable_aging"),(me===!1||ot)&&z.push("expense_automation_card"),un===!1&&z.push("reimbursement_card","reimbursement_promo_card"),z.push("zeni_accounts_promo_card","treasury_promo_card"),qe===!1&&z.push("rewards_card");const{areTenantIdsInSync:Ut}=Ho();b.useLayoutEffect(()=>{jt&&F===me||Mt!==!0||!Ut||pe?.fetchState!=="Completed"&&pe?.fetchState!=="Error"||(Ja(!0),i(_o(m.userId,I,y,!0,!1,z)))},[jt,m,y,i,Lt,Mt,pe?.fetchState,Ut]);const bn=_(A=>A.reportUIOptionsState.forecastOnDashboard.isForecastModeOn),Cn=_(A=>A.revenueState.uiState.selectedForecast?.id),kn=_(A=>A.cardBalanceState.fetchState),he=_(A=>So(A,z,m,$e,ne)),_n=he.fetchState,Sn=b.useMemo(()=>sa(he.cardsOrdered,E),[he.cardsOrdered,E]),yn=b.useMemo(()=>sa(he.cardsForDashboardUI,E),[he.cardsForDashboardUI,E]);Ge({isDataReady:!0});const{isSuggestedQuestionsLoading:vn,suggestedPromptQuestions:An}=ns(),st=k?.isTreasuryPromoVideoPlayed===!0,Gt=k?.isTreasuryPromoVideoRemindMeLaterClicked===!0,Vt=k?.loginCounterForTreasuryPromoVideo??0,In=k?.isTreasuryPromoIntroClosedByOutsideClick===!0,Yt=_(A=>A.dashboardState.isTreasuryVideoClosed),Nt=b.useMemo(()=>Wo({isTreasuryPromoVideoRemindMeLaterClicked:Gt,isTreasuryPromoVideoPlayed:st,loginCounterForTreasuryPromoVideo:Vt,isTreasuryVideoClosed:Yt}),[Gt,st,Vt,Yt]),$t=_(A=>pa(A)),ye=$t.uiState?.currentChatSessionId,rt=$t.allSessionsWithOrderedQuestionAnswers??Gs,{currentSessionQuestionAnswers:En}=Xo(rt,ye),zt=En.length===0,Tn=b.useCallback((A,Z,fe)=>{const ve=m?.userId;if(ve==null)return;const V=A.trim();if(V.length===0&&Z.length===0)return;if(!w)return void se({location:c,navigate:s,mergeState:{referrer:"Dashboard"}});const Q=ja(e.getState()),Ae=()=>{const Ie=x(c.state?.pathnameStackToGoBack,c.pathname);s(`/${S}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:Ie,referrer:"Dashboard",aiCfoInitialQuestion:V,aiCfoShouldSubmit:!Q&&V.length>0,aiCfoInitialSubmissionSource:oa,...typeof fe=="number"?{aiCfoSuggestionIndex:fe}:{}}})};return t?Z.length>0?void o(!0):void Ae():Z.length>0?Q?(i(_t(V)),void o(!0)):(r(V.length>0?V:null),o(!0),void(V.length>0&&Ma(i,V,oa,ye,rt,ve,fe,Z.length>0?Z:void 0))):(Q&&i(_t(V)),void Ae())},[rt,ye,i,w,t,c,s,r,o,m?.userId,e,S]),Dn=b.useCallback(()=>{w?o(!0):se({location:c,navigate:s,mergeState:{referrer:"Dashboard"}})},[w,c,s,o]),xn=b.useCallback(()=>{if(!w)return void se({location:c,navigate:s,mergeState:{referrer:"Dashboard"}});if(S==null)return;const A=x(c.state?.pathnameStackToGoBack,c.pathname);s(`/${S}/ai-cfo/explore`,{state:{pathnameStackToGoBack:A,referrer:"Dashboard"}})},[w,c,s,S]),wn=b.useCallback(()=>{if(w)if(t){if(S==null||k==null)return;const A=ye==null||zt?`/${S}/ai-cfo/explore`:`/${S}/ai-cfo/${ye}`,Z=c.state?.pathnameStackToGoBack??[],fe=x(Z,c.pathname);s(A,{state:{...c.state,pathnameStackToGoBack:fe,[Jo]:!0}})}else se({location:c,navigate:s,mergeState:{referrer:"Dashboard"}});else se({location:c,navigate:s,mergeState:{referrer:"Dashboard"}})},[w,t,c,s,S,k,ye,zt]);return d.jsxs(d.Fragment,{children:[_n==="Completed"?d.jsx(Ve,{analytics:T,onLoad:A=>{A.trackPageLoaded(Y.Event.dashboard),rn&&Nt===!0&&A.trackTreasuryPromoView("Dashboard Promo Video")}}):null,d.jsx(Ks,{maxColumns:n?2:void 0,isAiCfoAccessEnabled:E,onAskAiCfoClick:v,onAiCfoDashboardOpenPanel:Dn,onAiCfoDashboardOpenScopePage:wn,isAiCfoFileUploadEnabled:Za===!0&&t===!1,onAiCfoDashboardPromptSubmit:Tn,onAiCfoDashboardExpandToFullPage:xn,aiCfoDashboardSuggestedPromptQuestions:An,aiCfoDashboardSuggestedPromptQuestionsLoading:vn,onDragAndDropCard:(A,Z)=>{if(A===X||Z===X)return;const fe=function(Q,Ae,Ie){const it=Ie.indexOf(Q),ct=Ie.indexOf(Ae);if(it===-1||ct===-1||it===ct)return Ie;const lt=[...Ie];return lt.splice(it,1),lt.splice(ct,0,Q),lt}(A,Z,Sn),ve=fe.filter(Q=>Q!==X),V=he.cardsOrdered;(ve.length!==V.length||ve.some((Q,Ae)=>Q!==V[Ae]))&&i(yo(ve))},dashboardReport:he,passedCardsOrdered:yn,tenantId:y,companyId:I,tenantEmailDomain:S,location:c,navigate:s,isApAgingFeatureEnabled:L,isArAgingFeatureEnabled:oe,isBillPayEnabled:nn,isReimbursementEnabled:an,isSummaryCardsFiltered:at,isForecastOn:bn,selectedForecastOnDashboard:Cn,isVisitingFirstTime:u,isZeniAccountEnabled:Ke,isRewardsFeatureEnabled:qe,hasZeniAccountsAdminAccess:cn,isExpenseAutomationEnabledForUser:me&&ot===!1,selectedPeriod:tn[y],isChargeCardFeatureEnabled:qa,isUserHasCardsAccess:mn,isUserHasTreasuryAccess:pn,cardsCreditLimit:hn,cashbackRate:Xa,isInterestedInChargeCard:fn,cardBalanceFetchState:kn,christmasAnimationEnabled:Qa,newYearAnimationEnabled:Ha,treasuryFundDetails:gn,shouldShowTreasuryPromoIntroVideo:Nt,isTreasuryPromoVideoPlayed:st,isTreasuryPromoIntroClosedByOutsideClick:In,treasuryFetchState:on,aiAuditScorePercentageEnabled:Wa})]})}const Zs=e=>{switch(e){case"operating_expenses":return"Operating Expenses";case"revenue":return"Revenues";case"top_expenses":return"Top Expenses";case"net_burn_or_income":return"Burn Rate";case"cash_in_cash_out":return"Cash In, Cash Out";case"cash_position":return"Cash Position"}return"Dashboard"},Qs=e=>e.fetchState!=="Error"?e.fetchState:e.reportsInOrder.map(a=>a.fetchState).reduce((a,t)=>a==="In-Progress"||a==="Not-Started"?a:t);function Ar(){const e=_e(),a=e?.excludedResources?.find(m=>m.resource==="/reports/top_expenses")==null,{useFeatureGate:t}=Se(),{isFeatureEnabled:n}=t(B.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(B.isArAgingFeatureEnabled),r=_(m=>U(m)),{isFeatureEnabled:s}=t(B.isDebitCardFeatureEnabled),i=Bo(s,r),c=jo(r);return i===!0||c===!0?d.jsx(bt,{children:d.jsx(O,{path:"/*",element:d.jsx(os,{})})}):d.jsxs(bt,{children:[d.jsx(O,{path:"/",element:d.jsx(qs,{})}),d.jsx(O,{path:"cash_balance/*",element:d.jsx(Wt,{})}),d.jsx(O,{path:"card_balance/*",element:d.jsx(Wt,{})}),d.jsx(O,{path:"operating_expenses/*",element:d.jsx(re,{})}),d.jsx(O,{path:"operating_expenses/forecast/*",element:d.jsx(ut,{})}),d.jsx(O,{path:"revenue/forecast/*",element:d.jsx(ut,{})}),d.jsx(O,{path:"revenue/*",element:d.jsx(re,{})}),d.jsx(O,{path:"net_burn_or_income/forecast/*",element:d.jsx(ut,{})}),d.jsx(O,{path:"net_burn_or_income/*",element:d.jsx(re,{})}),n===!0&&d.jsxs(d.Fragment,{children:[d.jsx(O,{path:"accounts_payable_aging/*",element:d.jsx(is,{})}),d.jsx(O,{path:"accounts_payable_aging/:vendorId/:reportDate/*",element:d.jsx(rs,{})})]}),o&&d.jsxs(d.Fragment,{children:[d.jsx(O,{path:"accounts_receivable_aging/:customerId/:reportDate/*",element:d.jsx(cs,{})}),d.jsx(O,{path:"accounts_receivable_aging/*",element:d.jsx(ls,{})})]}),d.jsx(O,{path:"cash_position/*",element:d.jsx(re,{})}),d.jsx(O,{path:"top_expenses/*",element:a===!0?d.jsx(re,{}):d.jsx(je,{})}),d.jsx(O,{path:"cash_in_cash_out/*",element:d.jsx(re,{})}),d.jsx(O,{path:"company_details",element:d.jsx(as,{})}),d.jsx(O,{path:"referrals/*",element:d.jsx(ss,{})}),d.jsx(O,{path:"*",element:d.jsx(je,{})})]})}export{Ar as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-
|
|
1
|
+
import{j as v}from"./liveblocks-CIemOhG-.js";import{a as u}from"./sentry-238zX06J.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-BXHWSH6o.js";import{LU as U,eX as _,g2 as N,LV as k,oa as R,LW as z}from"./zeni-epic-state-Xn27LBb6.js";import{u as j,z as f,L as T,t as I,a as O,b as $}from"./index-0msqddxr.js";import"./mui-CDOihXSU.js";import{t as P}from"./getLocaleForTenant-CxY698t_.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="d8287f04-58d7-42de-8b3b-f108d052d52f",t._sentryDebugIdIdentifier="sentry-dbid-d8287f04-58d7-42de-8b3b-f108d052d52f")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(L,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>U(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(N(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!k(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const V=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of V)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-DZ8naknM.js → DomesticWireDetailScreen-MDrXSwzc.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-CIemOhG-.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-BXHWSH6o.js";import{Q1 as k,Q8 as _,gi as W,gh as X,gg as q,jv as J,N9 as K,ru as L,eX as V,Pz as D,jt as T,Q2 as v,Qb as j,jr as F,jO as G}from"./zeni-epic-state-Xn27LBb6.js";import{bA as M,Z as N,Q as R,z as U,m as O,s as p,e as S,y as Q,bB as Y,o as Z,bC as ee,v as te}from"./index-0msqddxr.js";import{n as z}from"./mui-CDOihXSU.js";import"./sentry-238zX06J.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]="ff8172f9-0804-42ef-8548-d053807f7e41",e._sentryDebugIdIdentifier="sentry-dbid-ff8172f9-0804-42ef-8548-d053807f7e41")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(q(n,"BillPayVendor"))},onResendOtp:n=>{e(X(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(i=>k(i,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-CIemOhG-.js";import{Z as l,D as c,m as f}from"./index-0msqddxr.js";import{D as b}from"./mui-CDOihXSU.js";import"./sentry-238zX06J.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="54bd5477-c54f-45bb-8837-15885c458818",e._sentryDebugIdIdentifier="sentry-dbid-54bd5477-c54f-45bb-8837-15885c458818")}catch{}})();const p={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=l(),a=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),d=f();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{m as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-CIemOhG-.js";import{a as d}from"./sentry-238zX06J.js";import{h as A,u as B,g as G,i as q,j as l,N as F,n as O,o as K,p as W}from"./core-BXHWSH6o.js";import{Oh as _,eX as M,NF as R,ly as Y,Ka as k,Om as $,N8 as z,ky as L,Kb as S,NK as V,NL as X,Na as H,N9 as J}from"./zeni-epic-state-Xn27LBb6.js";import{aW as Q,f as U,s as Z,v as tt}from"./index-0msqddxr.js";import"./mui-CDOihXSU.js";import{d as b}from"./decodeURIComponentSafe-DEgBTC44.js";import{w as et}from"./withTransactionSidePanel-DYeV-pwu.js";import{f as at,c as nt}from"./routePaths-CJZlOu9G.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";import"./useAskAiCfoHostNavButtonProps-CA827A-C.js";import"./TransactionDetailScreen-BWNXQ74m.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="0a0ee038-50d2-4c63-9d23-fbca78d21b77",a._sentryDebugIdIdentifier="sentry-dbid-0a0ee038-50d2-4c63-9d23-fbca78d21b77")}catch{}})();const ot=O(function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:L(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(J("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=G(),[m,h]=d.useState(!1),[T,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:v,entityNameEncoded:x}=q(),r=b(v??""),p=b(x??""),u=rt(r,p),N=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),j=l(n=>M(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(h(!0),o(Y(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,w=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&T===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,T,E]),u?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{h(!1),D(!1)},...t}):s.jsx(F,{to:I(N.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function vt({entityType:a}){return s.jsx(K,{children:s.jsx(W,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-CCWIfo0Y.js → ExpenseAutomationRoutes-CpFh0FNS.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-CIemOhG-.js";import oa from"./NotFoundScreen-DUbgOxtV.js";import{a as o,b as Jt}from"./sentry-238zX06J.js";import{n as Ue,S as sa}from"./mui-CDOihXSU.js";import{u as pe,h as Yt,g as Ke,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-BXHWSH6o.js";import{eX as Re,T0 as la,ok as ke,fZ as ra,s5 as da,oC as Kt,oX as Zt,T1 as Qt,p5 as ua,T2 as Ht,ov as ma,rD as pa,fJ as Ie,T3 as De,uc as Wt,Ev as Xt,T4 as en,T5 as ha,rb as Ze,Oi as Pt,Ok as ga,kB as Ca,Ol as Sa,kI as fa,c_ as Ia,vp as Qe,oI as tn,pa as Fe,oA as de,T6 as ka,Na as Rt,N9 as we,T7 as Dt,kZ as Ea,T8 as Ta,T9 as ya,Ta as ba,Tb as va,oP as Aa,pd as xe,Tc as wa,Td as xa,Te as Pa,pk as Ra,kM as Da,kD as Fa,Tf as Ua,kL as Ft,Os as Ba,Tg as Oa,Th as _a,r7 as Va,qL as za,pb as me,qK as Ne,Ti as Ma,Tj as La,Tk as ja,mg as $a,bo as qa,mb as Ut,lZ as Ga,Tl as Na,fz as Bt,gy as Ja,m8 as Ya,xi as Ka,Tm as Za,pL as Qa,pG as Ha,pK as Wa,pv as Xa,Tn as eo,fM as nn,o_ as to,oL as no,f_ as Ot,pf as ao,To as oo,Tp as so,pc as an,Tq as co,Tr as io,Ts as lo,Tt as ro,Tu as _t,rj as uo,qC as mo,N8 as po,Tv as ho,Tw as go,kK as Co,Tx as So,Jb as fo,kJ as Io,ky as ko,fL as Eo,q8 as on,qu as To,p9 as Vt,pe as yo,bE as bo,m5 as vo,m2 as Ao,Ty as wo,pu as zt,qq as Mt,qo as xo,Tz as Po,qd as Ro,pV as Do,qr as Fo,TA as Uo,TB as Bo,pZ as Oo,TC as _o,pQ as Vo,pY as zo,pW as Mo,qx as Lo}from"./zeni-epic-state-Xn27LBb6.js";import{Q as sn,e as X,f as q,v as ae,Y as cn,$ as ln,cZ as jo,z as Be,c_ as $o,at as Pe,c$ as qo,aY as Lt,y as rn,d0 as Go,aq as Je,a as No,a8 as Jo,d1 as Yo,a3 as Ko,d2 as Zo,X as Qo,d3 as Ho,d4 as Wo,A as Xo,I as es,aR as ts,d5 as ns,d6 as as,bd as os,D as ss,aU as cs}from"./index-0msqddxr.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-CA827A-C.js";import{f as jt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-BWNXQ74m.js";import{w as us}from"./withTransactionSidePanel-DYeV-pwu.js";import{h as ms,v as ps}from"./routePaths-CJZlOu9G.js";import{g as Ye}from"./accountMappingHelper-xxDKbgY6.js";import{D as hs}from"./DrawerScreen-h-FlEl5-.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";import"./decodeURIComponentSafe-DEgBTC44.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="08d8f7b5-95fc-40a0-8026-7755af60f2b7",t._sentryDebugIdIdentifier="sentry-dbid-08d8f7b5-95fc-40a0-8026-7755af60f2b7")}catch{}})();const gs=()=>{const t=pe(),l=Yt(),B=Ke(),f=x(d=>Re(d)),{useFeatureGate:b}=sn(),{isFeatureEnabled:S}=b(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=b(X.aiAuditScorePercentage),I=x(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=x(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),E=o.useCallback((d,G,ee=!1)=>{t(ke({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),v=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),E(g,f.tenantId,!0)},[E,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ae(B.state?.pathnameStackToGoBack,B.pathname),k=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:T}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&T&&E(g,f.tenantId)},[E,g,s.fetchState,f.tenantId,T]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&T&&t(da(g))},[g,s.monthClosePerformanceTrendFetchStatus.fetchState,T]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(Cs,{children:h.jsx(jo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:k,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},Cs=Ue.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-CIemOhG-.js";import{a as r}from"./sentry-238zX06J.js";import{a4 as c,a5 as i,a6 as l,s as p}from"./index-0msqddxr.js";import"./mui-CDOihXSU.js";import m from"./NotFoundScreen-DUbgOxtV.js";import{h as u,g as b}from"./core-BXHWSH6o.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]="a2964cad-ffb6-4879-bf68-1ae32dc5af2c",a._sentryDebugIdIdentifier="sentry-dbid-a2964cad-ffb6-4879-bf68-1ae32dc5af2c")}catch{}})();const _=()=>{const a=u(),e=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),f=r.useCallback(()=>{(()=>{const n=p(e.state?.pathnameStackToGoBack),d=n.poppedPathname??k();a(d,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(e.pathname);return o!=null?s.jsx(i,{menuItem:l(o),onDemoClick:t,onGoBack:f}):s.jsx(m,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-
|
|
1
|
+
import{a as r}from"./sentry-238zX06J.js";import{u as f,h as l,g as m}from"./core-BXHWSH6o.js";import{hu as p,Mg as b,Mh as g}from"./zeni-epic-state-Xn27LBb6.js";import{u as _,L as h,z as y}from"./index-0msqddxr.js";import"./liveblocks-CIemOhG-.js";import"./recharts-D7dc1KPB.js";import"./mui-CDOihXSU.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.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]="439a9e01-1be9-4040-b4fd-6323bf2b5bd7",e._sentryDebugIdIdentifier="sentry-dbid-439a9e01-1be9-4040-b4fd-6323bf2b5bd7")}catch{}})();function R(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:c}=_(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&u!=null){const t=JSON.parse(u);e(p(t.tenant_id,t.connection_id,b("revenue"),g("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const d=y.getActiveTenantForUser();n(d?.tenantEmailDomain!=null?`/${d.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-CIemOhG-.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-BXHWSH6o.js";import{M9 as k,Ma as v,Mb as M,Bd as B,A$ as T,Mc as A,Md as oe,Me as se,B3 as ie,fA as $,Ba as le,B7 as re}from"./zeni-epic-state-Xn27LBb6.js";import{Z as g,o as r,B as de,f as j,n as G,r as ce,s as me,E as pe,v as V,Q as ue,e as he,w as xe,A as ge,m as fe,x as we,y as be,J as Se,F as ye,S as ke,C as ve,D as je,R as $e}from"./index-0msqddxr.js";import{n as m}from"./mui-CDOihXSU.js";import f from"./NotFoundScreen-DUbgOxtV.js";import{a as I}from"./sentry-238zX06J.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.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]="13bc7c4d-c33c-4b99-9988-82a028dc1664",e._sentryDebugIdIdentifier="sentry-dbid-13bc7c4d-c33c-4b99-9988-82a028dc1664")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-CIemOhG-.js";import{a as g}from"./sentry-238zX06J.js";import{u as j,g as O,h as _,t as w,j as l,N as T}from"./core-BXHWSH6o.js";import{z as r,m as A,a as P,g as V,f as N,h as W,p as X,F as R,k as Y}from"./index-0msqddxr.js";import{eX as $,LW as q,M4 as B,LX as G,fA as H,g1 as J,M0 as K,gp as Q,cY as Z,M5 as ee,M6 as te}from"./zeni-epic-state-Xn27LBb6.js";import{n as ne}from"./mui-CDOihXSU.js";import{u as se}from"./useDeviceId-CbBc59Iy.js";import{f as ae}from"./analyticsHelper-CLUANO_-.js";import{t as ie}from"./getLocaleForTenant-CxY698t_.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.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]="3e856db9-d227-4187-9e19-4b186a8ab325",t._sentryDebugIdIdentifier="sentry-dbid-3e856db9-d227-4187-9e19-4b186a8ab325")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=j(),a=O(),f=_(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>$(e)),b=l(e=>q(e)),E=r.getSignedInUser(),v=A().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,m)))},[n,p,t,i,m,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(b.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Q().then(()=>{const e=Y();e!=null&&V(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,y,s,o,b,v,a.state,t]);const F=g.useCallback(()=>{f("/signin/auth")},[f]),M=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),U=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(X,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:M,onVerifyOtp:U,onCancelVerifyDevice:F});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||m==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as N}from"./liveblocks-CIemOhG-.js";import{a as c}from"./sentry-238zX06J.js";import{u as fe,j as n,i as Ze,g as qe,h as Ke,l as M}from"./core-BXHWSH6o.js";import{eX as me,fF as Xe,fG as be,fr as Je,bn as ea,eW as aa,fH as ta,fI as na,fK as sa,fN as oa,fW as ia,fO as g,fQ as ra,fR as de,fU as da,fS as la,fT as ca,fV as ua,cN as fa,fY as ma,cT as ba,fq as pa,g1 as ha,g2 as Sa,g0 as ga}from"./zeni-epic-state-Xn27LBb6.js";import{a8 as Ea,a9 as ka,A as Ca,Q as ya,z as k,x as Ia,u as Ta,e as r,i as wa,d as _a,aa as Aa,I as Fa,c as Da,ab as va,a4 as $a,ac as Ba,ad as Ga,ae as le,af as ce,L as Ma,ag as Pa,ah as ue,f as P,a0 as Ra,v as w,ai as R,aj as Na}from"./index-0msqddxr.js";import{D as Ua}from"./mui-CDOihXSU.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="4763da21-1bbd-4b14-94c8-e72d7c5f4eca",f._sentryDebugIdIdentifier="sentry-dbid-4763da21-1bbd-4b14-94c8-e72d7c5f4eca")}catch{}})();const Va=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ze(),a=qe(),C=Ca(),o=Ke(),U=Je(),m=fe(),{useFeatureGate:i}=ya(),V=k.getSignedInUser(),x=ea(V),s=n(e=>me(e)),pe=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>aa(e)),j=O.uiState.currentChatSessionId,y=Ia(),{setLoading:he}=Ta(),[_,L]=c.useState(void 0),A=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Se}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Y}=i(r.isDebitCardFeatureEnabled),Ee=wa(s,ge,Y),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n(e=>na(e));c.useEffect(()=>{y&&T&&!I&&F.fetchState==="Not-Started"&&m(sa(!0))},[y,T,F.fetchState,I]);const h=k.getSignedInUser(),D=n(e=>e.tenantState),Ce=n(e=>D.fetchState==="Completed"?oa(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabledV2),W=_a(),{isFeatureEnabled:_e}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=x||!x&&$e,Ge=s.company!=null&&ia(s.company),v=ve&&Ge,Me=n(e=>g(e).totalUnreadCount),Pe=n(e=>g(e).reducedFetchCountState),Q=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Z=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:q,isLoading:K,isFetchingMore:X,hasFetchedAll:J,fetchMore:Ne}=Aa();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(K===!1&&X===!1&&J===!0)if(s?.companyId!=null&&q!=null){const e=`dashboard_${s.companyId}`;L(q.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[K,X,J]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&U.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:_},"comments")))},[_,$.fetchState]);const Ue={fetchStatus:Pe,count:Me},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n(e=>ee?.tenantId!=null?da(e,ee.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Ve=Fa(),te=n(e=>la(e,S,h,we,Te).fetchState),ne=n(e=>ca(e).fetchState),xe=A&&(te==="Completed"||te==="Error")||z&&(ne==="Completed"||ne==="Error")||!A&&!z?void 0:"disabled",Oe=c.useMemo(()=>ua(s.userRole),[s.userRole]),je=fa(Oe),Le=s?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&H.fetchState==="Completed"&&ma(H.notificationSettings,h.userEmail,Y,s),se=Da(),Ye=se&&va(a),oe=ba(Ve?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,B=c.useCallback(()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&$a(a.pathname)!=="treasury",[v,oe,ie,a.pathname,t]),[He,re]=c.useState(B);c.useEffect(()=>{re(B())},[B]);const We=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Qe=Ba(We);return N.jsx(Ua,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:N.jsx(Ga,{signedInUser:V,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:xe,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:je,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:Qe,isTreasuryPopupVisible:He,isNotificationsTabVisible:ze,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:W,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=Q===0&&Z>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=Q===0&&Z>0?"../../notifications/comments":"../../notifications/tasks");const u=w(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(P.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!pe)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=w(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=w(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&P.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const G=Na(e.type);ue(e.type)?(j!=null&&m(ga()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${G}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he(Ma.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let b=`/${encodeURIComponent(u)}/`;const G=R(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Pa(l)?b+="settings/my_profile":ue(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":G?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;P.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:O,isOnDashboard:A,updateCurrentChatSessionId:e=>{m(pa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:_e,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),Ha=f=>{const d=fe(),t=n(C=>me(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Xe(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return N.jsx(Va,{...f,...a})};export{Ha as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./liveblocks-CIemOhG-.js";import{h as n,n as i}from"./core-BXHWSH6o.js";import{O as e}from"./index-0msqddxr.js";import"./mui-CDOihXSU.js";import"./sentry-238zX06J.js";import"./zeni-epic-state-Xn27LBb6.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="d7666c0b-2a75-4baf-97d7-b828025403bf",o._sentryDebugIdIdentifier="sentry-dbid-d7666c0b-2a75-4baf-97d7-b828025403bf")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-CIemOhG-.js";import lt from"./NotFoundScreen-DUbgOxtV.js";import{a as k}from"./sentry-238zX06J.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as O}from"./core-BXHWSH6o.js";import{cu as St,fH as q,eX as H,fV as bt,fO as b,SX as Z,fR as d,fG as y,sp as M,xV as It,SY as Ct,fF as Tt,fY as yt,su as _t,SZ as F,bo as $,fz as w,sy as Q,S_ as At,cG as Et,cz as Nt}from"./zeni-epic-state-Xn27LBb6.js";import{Y as xt,z as Bt,Q as wt,e as Rt,$ as Gt,cW as vt,v as N,a8 as Dt,cX as Ut,a9 as Pt,s as Ft}from"./index-0msqddxr.js";import"./mui-CDOihXSU.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CA827A-C.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="3b632b7c-d6e5-493a-935c-42db67a0b7e8",t._sentryDebugIdIdentifier="sentry-dbid-3b632b7c-d6e5-493a-935c-42db67a0b7e8")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(Q("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Z(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(Q("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>q(e)),o=S(e=>H(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Gt({isDataReady:!0});const J=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),G=S(e=>b(e).currentSubTab),K=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),v=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=vt().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:z,isLoading:W,fetchMore:Y,isFetchingMore:L,hasFetchedAll:X}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Z(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{K.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const U=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{U&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,v]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&W===!1&&B!=null&&z!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=z.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||X===!0||Y==null||Y(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,L,C,X,W,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];G==="all"?A.push("read","unread"):G!=="mentions"&&A.push(G),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:J,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(O,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(O,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-CIemOhG-.js";import{a as r}from"./sentry-238zX06J.js";import{u as T,g as j,j as o,N as A}from"./core-BXHWSH6o.js";import{Mj as C,eX as P,fN as x,Mk as z,Ml as D,Mm as L,Mn as N,oa as R,Lg as k}from"./zeni-epic-state-Xn27LBb6.js";import{z as h,T as I}from"./index-0msqddxr.js";import"./mui-CDOihXSU.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="fd08d74e-16a6-466d-b944-1bdccbf9d28b",n._sentryDebugIdIdentifier="sentry-dbid-fd08d74e-16a6-466d-b944-1bdccbf9d28b")}catch{}})();function ee(){const n=T(),s=j(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),w=o(z),y=o(D),c=o(L),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(N())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const M=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(U=>U.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),u=v??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(k(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(A,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-CQW3cuEJ.js → PandLWithForecastRoutes-tm_-vcHI.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-CIemOhG-.js";import{h as z,u as J,g as Q,i as K,j as d,n as X,o as Z,p as I}from"./core-BXHWSH6o.js";import{eX as v,sd as M,rN as H,MQ as O,rI as S,bs as ee,bn as ae,bY as te,rJ as se,MR as oe,MD as C,dK as re,vS as ne,MS as ie,wd as ce,fE as le,fC as de}from"./zeni-epic-state-Xn27LBb6.js";import{z as me,Y as fe,$ as pe,I as ue,Q as U,e as $,J as he,f as w,ao as ge,v as Fe}from"./index-0msqddxr.js";import"./mui-CDOihXSU.js";import be from"./NotFoundScreen-DUbgOxtV.js";import{F as Ie}from"./FeaturePreviewScreen-Dwcfifiq.js";import{a as g}from"./sentry-238zX06J.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CA827A-C.js";import{u as Se}from"./useInitialThreadRequest-BXR7CDER.js";import{t as Te}from"./routePaths-CJZlOu9G.js";import{M as ye}from"./MobileAppDrawer-BWlyoZ5H.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="dfccd7e7-e424-480e-8283-dba52162da64",s._sentryDebugIdIdentifier="sentry-dbid-dfccd7e7-e424-480e-8283-dba52162da64")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=X(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function P(){const s=z(),e=J(),a=Q(),{forecastId:o,tenantEmailDomain:r}=K(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),N=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>M(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),D=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:W}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(H());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(O(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!D(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,M,S,F]);const x=ue(),Y=x?.loggedInUserRole!=null&&ee(x.loggedInUserRole),{useFeatureGate:_}=U(),{isFeatureEnabled:E}=_($.isReportsCommentingEnabled),q=Se(E?y?.companyId:void 0,{clearParams:l&&m}),[G,V]=g.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:N,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:D,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:Y,isAiCfoAccessEnabled:B,onAskAiCfoClick:W,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:q,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d(i=>v(i)),{useFeatureGate:e}=U(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Z,{children:[n.jsx(I,{path:"/",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-CIemOhG-.js";import{MM as te,eX as Q,ky as z,fE as q,fC as ne,Ke as J,Mq as oe,uP as Ee,MN as N,uE as ke,uZ as Ie,uT as ie,uI as re,uX as Pe,uU as je,MO as le,wE as Le,fo as Te,gf as ve,MP as M,uM as de,uL as ce,v0 as Fe,c6 as Ae}from"./zeni-epic-state-Xn27LBb6.js";import{Z as pe,Q as Y,e as E,z as G,i as ue,H as me,ak as ge,al as Oe,D as he,o as O,K as fe,a as Ce,am as Re,Y as Ve,$ as Ue,J as Ze,f as be,h as Be,v as $e,an as Me,I as Ke}from"./index-0msqddxr.js";import{D as ye,n as H,S as we}from"./mui-CDOihXSU.js";import ae from"./NotFoundScreen-DUbgOxtV.js";import{a as r}from"./sentry-238zX06J.js";import{u as ee,i as _e,j as m,h as ze,g as Ge,n as He,o as se,p as $}from"./core-BXHWSH6o.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-CA827A-C.js";import{M as Xe}from"./MobileAppDrawer-BWlyoZ5H.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="4e435f71-b062-4c35-8ca9-cf1258edea6d",a._sentryDebugIdIdentifier="sentry-dbid-4e435f71-b062-4c35-8ca9-cf1258edea6d")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},K=Ce.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=_e(),d=m(e=>te(e)),u=m(e=>Q(e)),D=m(e=>z(e)),{useFeatureGate:f}=Y(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=q(k,u),T=ne(u),v=J(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{R===!0?w(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),L=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:K.discardTitle}),descriptionComponent:s.jsx(De,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:i,isEditPopup:!0}):null,s.jsx(Oe,{...b})]})})},qe=H(we)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-CIemOhG-.js";import E from"./NotFoundScreen-DUbgOxtV.js";import{a as r}from"./sentry-238zX06J.js";import{h as _,g as v,j as p,i as M,u as U,N as z,n as P,o as $,p as h}from"./core-BXHWSH6o.js";import{eX as B,S$ as b,bq as F,bn as N,ig as O,fz as V}from"./zeni-epic-state-Xn27LBb6.js";import{A as q,z as I,$ as X,cY as Y}from"./index-0msqddxr.js";import"./mui-CDOihXSU.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-CA827A-C.js";import{M as H}from"./MobileAppDrawer-BWlyoZ5H.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.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]="698021ed-0a81-405d-b273-c392548dad7d",e._sentryDebugIdIdentifier="sentry-dbid-698021ed-0a81-405d-b273-c392548dad7d")}catch{}})();const J=P(function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(Y),K=()=>{const e=_(),t=v(),d=q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),g=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,c=r.useCallback((a,i,T)=>{g(O({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(g(V({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0},[n?.fetchState,c]),j=r.useCallback((a,i)=>{c(a,i,!1)},[c]),f=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return X({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:S,handleDrawerToggle:f}),s.jsx(J,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:f,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(z,{to:`/${u}/dashboard`,replace:!0})};function fe(){return s.jsxs($,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{fe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-238zX06J.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|