@zeniai/web-app-ui 5.0.20-qa → 5.0.22-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-BJrRevGa.js +1 -0
- package/dist/assets/{AddressScreen-Cb_9EmBQ.js → AddressScreen-BQPPe7pR.js} +2 -2
- package/dist/assets/AiCfoScreen-C5DOIEt_.js +11 -0
- package/dist/assets/{BillPayApprovalRoutes-y7moBK-h.js → BillPayApprovalRoutes-Qtg1Jo5l.js} +1 -1
- package/dist/assets/{BillPayRoutes-BWxnSvNr.js → BillPayRoutes-DkAPd68y.js} +8 -8
- package/dist/assets/{BusinessVerificationPageScreen-BLm71CWm.js → BusinessVerificationPageScreen-CktedTYt.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-BzNwraqW.js → ChargeCardRoutes-B8s0w6So.js} +8 -8
- package/dist/assets/CompanyPassportScreen-C8EcswEA.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-Djma4Bm8.js → ConnectionAuthScreen-Zh5E4_CJ.js} +2 -2
- package/dist/assets/CustomerOnboardingAuthScreen-HXUuepjr.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CbHAqwxG.js → CustomerOnboardingRoutes-RiQ255x9.js} +4 -4
- package/dist/assets/{DashboardRoutes-BtQI7NbJ.js → DashboardRoutes-DD6E0pG7.js} +3 -3
- package/dist/assets/{DefaultTenantHome-B81akhAm.js → DefaultTenantHome-feQeI0F_.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-eW-I-lqX.js +18 -0
- package/dist/assets/DrawerScreen-HBFMcVvk.js +1 -0
- package/dist/assets/{EntityDetailRoutes-CYe5GW55.js → EntityDetailRoutes-Bh44Er44.js} +1 -1
- package/dist/assets/ExpenseAutomationRoutes-CgCGvHQG.js +25 -0
- package/dist/assets/FeaturePreviewScreen-Bd18oGQj.js +1 -0
- package/dist/assets/MagicLinkRoutes-DFA8OahA.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-CLhGIPxm.js +12 -0
- package/dist/assets/MobileAppDrawer-CwjUL5yD.js +1 -0
- package/dist/assets/NotFoundScreen-DZbU-KCv.js +1 -0
- package/dist/assets/{NotificationRoutes-CRynelUf.js → NotificationRoutes-BOGZiZZG.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-DZ6jC1bX.js +1 -0
- package/dist/assets/{PeopleRoutes-Bo95azg1.js → PeopleRoutes-DD_GpPXZ.js} +9 -9
- package/dist/assets/PerformanceRoutes-BEO8LXrv.js +1 -0
- package/dist/assets/{Preview-BXohszpd.js → Preview-DQaLRQjm.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-B_Iv-Jup.js → QBOConnectionScreen-ZhIN2-uP.js} +1 -1
- package/dist/assets/{ReferralListScreen-CT8COHO0.js → ReferralListScreen-CWHCaSQw.js} +2 -2
- package/dist/assets/ReimbursementApprovalRoutes-DLby1pC7.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BSJvMfmy.js → ReimbursementApprovalRuleDetailScreen-roSj06Ji.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Crxj9U5j.js → ReimbursementRoutes-BQAXwJX9.js} +6 -6
- package/dist/assets/{ReportsRoutes-Brd5m0YA.js → ReportsRoutes-COAdHt4D.js} +1 -1
- package/dist/assets/RewardsRoutes-Dw-aqOm5.js +1 -0
- package/dist/assets/{ScreenRoutes-BgcK48e3.js → ScreenRoutes-DV65D9fc.js} +2 -2
- package/dist/assets/{SettingsRoutes-CogpjDxD.js → SettingsRoutes-XQ9e9KID.js} +5 -5
- package/dist/assets/{SetupPagesScreen-C5z2OQ3X.js → SetupPagesScreen-BcfdYSeZ.js} +1 -1
- package/dist/assets/{SignInScreen-BrGMsoQX.js → SignInScreen-Cc84lO8c.js} +1 -1
- package/dist/assets/SignOutScreen-DzSDmVnc.js +9 -0
- package/dist/assets/{TaskListScreen-DT8MICZp.js → TaskListScreen-B_Yspya7.js} +2 -2
- package/dist/assets/TaskRoutes-DkUNX7ep.js +9 -0
- package/dist/assets/TransactionDetailRoutes-C5W6mPZ3.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DRrJTiHG.js → TransactionDetailScreen-CbyG0n1m.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DVfBJ6Ob.js → TransactionListRoutes-Uz8iUZDH.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CNL9l3-q.js → TreasuryRoutes-DMgnld7f.js} +6 -6
- package/dist/assets/{VendorsRoutes-DL99Yq-y.js → VendorsRoutes-JX67ErLJ.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-B_bo1Cpn.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BzgEiwqj.js → ZeniAccountRoutes-Cy1TFPrS.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-Dvs4m1EF.js +9 -0
- package/dist/assets/{accountMappingHelper-BR6VxhSD.js → accountMappingHelper-DpblOBXy.js} +1 -1
- package/dist/assets/{analytics-CgaqSFat.js → analytics-BSnG8C1z.js} +1 -1
- package/dist/assets/{analyticsHelper-Co0biJvM.js → analyticsHelper-BlP3gsal.js} +1 -1
- package/dist/assets/{core-AMZJGpoV.js → core-BF8mCLAO.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DNGRwvKs.js → decodeURIComponentSafe-BogCAdat.js} +1 -1
- package/dist/assets/{dnd-C4u70dJH.js → dnd-BwvUecBQ.js} +1 -1
- package/dist/assets/{empty-AgaGyBlm.js → empty-CH1gmPwH.js} +1 -1
- package/dist/assets/{empty-DmTCdHiz.js → empty-DhgRx5Ms.js} +1 -1
- package/dist/assets/{emptyVideoElement-DgTh6sDI.js → emptyVideoElement-CIPD7QoK.js} +1 -1
- package/dist/assets/{epic-Bz0gIByF.js → epic-CBSMbAdJ.js} +1 -1
- package/dist/assets/getLocaleForTenant-BZ9xLliJ.js +1 -0
- package/dist/assets/index-Bc34frN_.css +1 -0
- package/dist/assets/{index-Bwb8m5V-.js → index-BjHWZg4v.js} +1 -1
- package/dist/assets/{index-CjJS6JvG.js → index-Bv4UcPLE.js} +2 -2
- package/dist/assets/{index-DClxQldp.js → index-C-wmbsLK.js} +1 -1
- package/dist/assets/{index-iatPGBna.js → index-Cuo-3WZY.js} +1 -1
- package/dist/assets/{index-N5K3qQkU.js → index-Drj6C88E.js} +22813 -22319
- package/dist/assets/{index-BglIPIvl.js → index-DxU2jKyi.js} +1 -1
- package/dist/assets/{index-Swai7U66.js → index-DzmJ6hZq.js} +1 -1
- package/dist/assets/{lexical-hn7WhrHW.js → lexical-BHRXj1_E.js} +1 -1
- package/dist/assets/{liveblocks-Cm6P1Xg9.js → liveblocks-it_Rhm8-.js} +1 -1
- package/dist/assets/{lottie-CEe6fZ1i.js → lottie-CJdx3HBv.js} +1 -1
- package/dist/assets/{mui-5LlzyiP2.js → mui-B87RTrAV.js} +1 -1
- package/dist/assets/{pathToGoBack-De67_VBD.js → pathToGoBack-_pwiC6EH.js} +1 -1
- package/dist/assets/{pdf-lib-BXQxUj4c.js → pdf-lib-BX9OJ6Nl.js} +1 -1
- package/dist/assets/{pdf-DzINawGT.js → pdf-oE7nS36B.js} +4 -4
- package/dist/assets/{plaid-nK_3ZvzH.js → plaid-lXH1vlKo.js} +1 -1
- package/dist/assets/{pusher-CjEZkdOe.js → pusher-BuqNN16A.js} +1 -1
- package/dist/assets/{react-DCJKQzil.js → react-BPb4kZZA.js} +1 -1
- package/dist/assets/{react-D9RPLCn-.js → react-BqI_r-ls.js} +1 -1
- package/dist/assets/{react-T4GM5RLO.js → react-DcdwnIrk.js} +1 -1
- package/dist/assets/{react-BIiJHpnP.js → react-K11bZKBw.js} +1 -1
- package/dist/assets/{react-DgmtF1S_.js → react-Z36nuoKZ.js} +1 -1
- package/dist/assets/{react-DOoN7l3d.js → react-fYlmVc1c.js} +1 -1
- package/dist/assets/{recharts-LaAu_fL4.js → recharts-BBMAmq_A.js} +1 -1
- package/dist/assets/{routePaths-meDm6KLz.js → routePaths-Cqx2U__X.js} +1 -1
- package/dist/assets/{sentry-CH1ai1xG.js → sentry-C-hGmJ4T.js} +1 -1
- package/dist/assets/{url-CoAFnj2p.js → url-0lwNJByp.js} +1 -1
- package/dist/assets/{url-jOgcU75X.js → url-DTsNJhPz.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-wDzGPcQn.js +1 -0
- package/dist/assets/{useDeviceId-C9Bh2Mvx.js → useDeviceId-CGZ6TLY7.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js +1 -0
- package/dist/assets/{useInitialThreadRequest-vKKjrofy.js → useInitialThreadRequest-sUCtW719.js} +1 -1
- package/dist/assets/{utils-DRDD4XTN.js → utils-C4NhxqJn.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Bf8LYRg6.js → withTransactionSidePanel-DTDtCDdY.js} +3 -3
- package/dist/assets/{zeni-epic-state-CaufR46d.js → zeni-epic-state-Ds1G4QGX.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-B6j12uTF.js +0 -1
- package/dist/assets/AiCfoScreen-CLp8S2lW.js +0 -11
- package/dist/assets/CompanyPassportScreen-BUkmQF51.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DJn2pUgu.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-D_8szANI.js +0 -18
- package/dist/assets/DrawerScreen-hOKdmqaY.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-U-buIEG3.js +0 -20
- package/dist/assets/FeaturePreviewScreen-XRpSmfAA.js +0 -1
- package/dist/assets/MagicLinkRoutes-z2OnGDhR.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BzZa4ZxZ.js +0 -12
- package/dist/assets/MobileAppDrawer-CAbg3Q-N.js +0 -1
- package/dist/assets/NotFoundScreen-DCVl9MiG.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BZgxjZvQ.js +0 -1
- package/dist/assets/PerformanceRoutes-SK18oh8d.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-D_X7Se2H.js +0 -1
- package/dist/assets/RewardsRoutes-CpyGkHSD.js +0 -1
- package/dist/assets/SignOutScreen-kYocp39P.js +0 -9
- package/dist/assets/TaskRoutes-n4RYkvEl.js +0 -9
- package/dist/assets/TransactionDetailRoutes-yTZfc_Av.js +0 -1
- package/dist/assets/WiseConfirmationScreen-DSPUSzLW.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BP58chZP.js +0 -9
- package/dist/assets/getLocaleForTenant-Cuk0zyAy.js +0 -1
- package/dist/assets/index-D-vub4_t.css +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Du0DR5Lw.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-ChhFydzB.js +0 -1
package/dist/assets/{CustomerOnboardingRoutes-CbHAqwxG.js → CustomerOnboardingRoutes-RiQ255x9.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-it_Rhm8-.js";import{t as $e,A as Ce}from"./AddressScreen-BQPPe7pR.js";import ze from"./NotFoundScreen-DZbU-KCv.js";import{a as g}from"./sentry-C-hGmJ4T.js";import{j as oe,u as se,h as ie,l as re,g as D,N as E,k as ce,i as Me,n as Qe,o as M}from"./core-BF8mCLAO.js";import{q as de,S as le,z as B,s as ue,h as qe,d as _,n as V,v as H,e as N,r as je,g as X,ak as Ke,K as Je,al as Ie,j as te,am as Ze,an as ke,o as He,ao as We,ap as Ee,aq as Xe}from"./index-Drj6C88E.js";import{bm as Ye,eM as ee,fa as et,eS as pe,eQ as me,bu as tt,mf as at,f6 as nt,bL as ot,i_ as ae,j1 as ve,IX as st,bQ as it,b$ as ge,rG as he,rr as rt,J7 as Y,rH as _e,GD as ct,k2 as Ue,J8 as Ve,J9 as dt,Ja as lt,Jb as ut,iY as pt,i$ as mt,rt as Be,rF as gt,bB as Te,cr as ht,rT as xe,pA as ft,po as yt,jW as bt,fz as St,fy as Ct,fx as It,Jc as kt,rl as Et,rU as Tt,rX as xt,r_ as Ot,s4 as Pt,cR as At}from"./zeni-epic-state-Ds1G4QGX.js";import{n as fe}from"./mui-B87RTrAV.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-ZhIN2-uP.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";import"./empty-CH1gmPwH.js";import"./pdf-lib-BX9OJ6Nl.js";import"./index-Cuo-3WZY.js";import"./url-0lwNJByp.js";import"./index-DzmJ6hZq.js";import"./decodeURIComponentSafe-BogCAdat.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="14ed362e-9c33-41da-9b0a-0dac5dcbb476",t._sentryDebugIdIdentifier="sentry-dbid-14ed362e-9c33-41da-9b0a-0dac5dcbb476")}catch{}})();const wt=ce(function(t,o){const s=[];o.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),o.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),o.shouldFetchZeniAccountsPromoCard===!1&&s.push("zeni_accounts_promo_card"),o.shouldFetchRewardsPlanCard===!1&&s.push("rewards_card"),o.isExpenseAutomationEnabledForUser===!1&&s.push("expense_automation_card");const u=nt(t,s,o.signedInUser,o.isExpenseAutomationFeatureEnabledV2,o.isExpenseAutomationEnabledForUser,o.isTreasuryEnabled);return{dashboardFetchState:ot(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,o){const{themeState:s,navigate:u,location:d}=o;return{onZeniLogoClick:()=>{s.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Ke),jt=()=>{const t=oe(),o=se(),s=ie(),u=de(),[d,r]=g.useState(!1),[p,b]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),h=Ye(i),{useFeatureGate:m}=ue(),k=qe(),{isFeatureEnabled:T}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:x}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:I}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),$=C||U&&h,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),w=c.company!=null&&et(c.company),G=L&&w,O=D(l=>l.onboardingCustomerViewState.fetchState),S=c.excludedResources,R=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const j=pe(F,c),P=me(c),A=[],K=S?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,z=S?.resources?.find(l=>l.resource==="/reports/task_card")==null,Q=c?.userRole!=null&&tt(c?.userRole),v=S?.resources?.find(l=>l.resource==="/bills")==null&&!Q,q=S?.resources?.find(l=>l.resource==="/reimbursements")==null;if(K===!1&&A.push("top_expenses"),z===!1&&A.push("task_card"),v===!1&&A.push("bill_pay_card","bill_pay_promo_card"),q===!1&&A.push("reimbursement_card","reimbursement_promo_card"),I===!1&&A.push("zeni_accounts_promo_card"),f===!1&&A.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||j||P||(r(!0),s(at(i.userId,R,c.tenantId,!0,!1,A)))},[d,O,j,P,i,c.tenantId,s]),g.useEffect(()=>{(j||P)&&setTimeout(()=>{b(!0)},5e3)},[j,P]),O!=="Completed")return a.jsx(E,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(j)return a.jsx(E,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(P)return a.jsx(E,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(H,{analytics:N,onLoad:l=>(J=>J.trackPageLoaded(X.Event.onboardingDashboardActivation))(l)}),a.jsx(wt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:T,isArAgingFeatureEnabled:x,shouldFetchZeniAccountsPromoCard:I,shouldFetchRewardsPlanCard:f,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:G,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(je,{fetchState:"In-Progress",style:{backgroundColor:k.colors.grey5}})},Oe=fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
background-color: ${t=>t.theme.colors.grey4};
|
|
@@ -12,12 +12,12 @@ import{j as a}from"./liveblocks-Cm6P1Xg9.js";import{t as $e,A as Ce}from"./Addre
|
|
|
12
12
|
|
|
13
13
|
${t=>t.theme.breakpoints.down("md")} {
|
|
14
14
|
width: 100%;
|
|
15
|
-
padding-left: ${
|
|
15
|
+
padding-left: ${He.sp0};
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
${t=>t.windowSize!=="small"?"overflow: auto;":""}
|
|
19
|
-
`,Ae=ce(function(t,o){const{companyId:s,isAdmin:u,currentTenant:d,isOnAddressPage:r}=o,p=B.getSignedInUser(),
|
|
19
|
+
`,Ae=ce(function(t,o){const{companyId:s,isAdmin:u,currentTenant:d,isOnAddressPage:r}=o,p=B.getSignedInUser(),b=d.tenantId,e={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:b??""},n=ee(t),i=he(t,s),h=Ve(t),m=ge(d?.userRole??[])&&i.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",k=dt(t.userRoleConfigState);return{onboardingCustomerView:i,analytics:N,isRefreshingViewInBackground:!1,isDisabled:m,companyTitles:k.companyTitles,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:We.fileMicroServiceBaseUrl,authParams:e},signedInUser:B.getSignedInUser(),currentTenant:d,isAdmin:u,isOnAddressPage:r,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",cardPaymentView:h,isCardPaymentPopupOpen:!1,stripeKey:te.stripeKey}},function(t,o){const{companyId:s,currentTenant:u,themeState:d,navigate:r,location:p}=o,{tenantEmailDomain:b}=u;return{onFetchLinkTokenClick:(e,n)=>{t(Pt(e,n))},onEstablishConnectionClick:(e,n)=>{t(Ot(e,n))},onUpdatePaymentAccountStatus:(e,n,i)=>{t(xt(e,n,i))},onUpdatePaymentAccountLoginStatus:(e,n)=>{t(Tt(!1,e,n))},onEstablishConnectionSuccess:()=>{t(Et(s,!0,!1))},handleOnConnectClick:()=>{N.trackOnboardingConnectQBO(),ne.handleClick()},updateQBOPopupState:e=>{t(Y({isQBOPopupOpen:e}))},onCompanyOfficerUpdated:e=>{const n=e.map(i=>{const{officerType:h,userId:m,name:k,email:T,ssn:x,nationalityCountryCode:I,dob:f,phone:U,syncToken:C,selectDocument:F,role:$,ownership:c,isSelectedForVerification:L,userVerificationStatus:w,fileIds:G,isPhoneVerified:O}=i;let S;return F.selectDocumentType==="driverLicense"?S="driving_license":F.selectDocumentType==="passport"?S="passport":F.selectDocumentType==="stateId"?S="id_document":F.selectDocumentType==="ssnCard"&&(S="social_security_card"),{officerType:h,userId:m,firstName:k.firstName,lastName:k.lastName,email:T,ssn:x,nationalityCountryCode:I?.selectedOption!=null?Ee(I.selectedOption):void 0,phone:U,birthday:f!=null?Te(f?.toString()):f,syncToken:C,titleAtCompany:$.selectedOption,ownershipInCompany:c,documentTypeSelectedForVerification:S,isSelectedForVerification:L,userVerificationStatus:w,fileIds:G,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:O}});t(xe({officers:n}))},onGetOtp:(e,n)=>{t(It(e,"CustomerOnboarding")),n!=null&&t(kt({officerType:n,phone:e}))},onResendOtp:e=>{t(Ct(e,"CustomerOnboarding"))},onVerifyOtp:(e,n)=>{t(St(e,n,"CustomerOnboarding"))},updateFilesEntity:e=>{t(bt({files:e}))},onDeleteFile:e=>{t(yt(e))},onEditFileName:(e,n)=>{t(ft(e,n.split(".")[0]))},onCompanyDetailsChanged:e=>{const{companyDescription:n,companyIndustry:i,companyIndustryType:h,companyLegalName:m,companyTaxId:k,companyWebsite:T,companyPhone:x,primaryContactEmail:I,primaryContactName:f,primaryContactUserId:U,primaryContactSyncToken:C,syncToken:F,fileIds:$,typeOfIncorporation:c,stateOfIncorporation:L,incDate:w,companySourceOfFunds:G,companySourceOfFundsDescription:O,companySubIndustry:S,countriesOfOperations:R,purposeOfAccount:j,purposeOfAccountDescription:P,regulatedStatus:A,regulatedStatusDescription:K,transactionVolume:z,transactionVolumeDescription:Q,usNexus:v,usNexusTypes:q}=e,l={companyId:s,companyDescription:n,companyIndustry:i.selectedOption,companyIndustryType:h?.selectedOption??"",companyLegalName:m,taxIdOrEIN:k,website:T!=""&&T!=null?ht(T):void 0,phone:x,syncToken:F,fileIds:$,incDate:w!=null?Te(w?.toString()):w,typeOfIncorporation:c?.selectedOption??"",stateOfIncorporation:L?.selectedOption??"",companySourceOfFunds:G?.selectedOption??"",companySourceOfFundsDescription:O,companySubIndustry:S?.selectedOption??"",countriesOfOperations:R?.selectedOptions.map(Z=>Z.length===2?Z:Ee(Z))??[],purposeOfAccount:j?.selectedOption??"",purposeOfAccountDescription:P,regulatedStatus:A??"",regulatedStatusDescription:K,transactionVolume:z?.selectedOption??"",transactionVolumeDescription:Q,usNexus:v,usNexusTypes:q?.selectedOptions??[]},J={userId:U,firstName:f.firstName,lastName:f.lastName,email:I,syncToken:C};t(xe({companyDetails:l,primaryContactDetails:J}))},onAddressClick:(e,n)=>{const i=De(b,e,n),h=V(p.state?.pathnameStackToGoBack,p.pathname);r(i,{state:{pathnameStackToGoBack:h}})},onRegisteredAddressClick:(e,n)=>{const i=De(b,e,n),h=V(p.state?.pathnameStackToGoBack,p.pathname);r(i,{state:{pathnameStackToGoBack:h}})},onUpdateCustomerView:(e,n,i)=>{t(gt(s,!1,n,i,e))},onAddressEditHandler:e=>{if(e!=null){const n=$e(e);t(Ue({addressType:"subscription_billing_address",addressToCreate:n}))}},onSkipSetupClick:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);t(Be(s,!1,!1)),r("./activation",{state:{pathnameStackToGoBack:e}})},onUpdateStep:e=>{t(_e({step:e}))},onZeniLogoClick:()=>{d.toggle()},handleLogOutClick:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleCreateCardSetupIntent:e=>{t(ve(e))},handleConfirmCardSetupIntent:e=>{t(mt(e))},updateCardPaymentModalState:e=>{t(Y({isCardPaymentPopupOpen:e}))},handleAddCardPaymentSource:(e,n,i)=>{t(pt(e,n,i))},handleFetchPaymentSources:()=>{t(ae())},resetCardPaymentViewState:()=>{t(ut())},handleResetCardPaymentErrorStatuses:()=>{t(lt())},redirectToProductSuitePage:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);r(`/${b}/onboarding/thankyou`,{state:{pathnameStackToGoBack:e,message:"OnboardingThankyou"},replace:!0})}}})(Ze),W=({taxCFOCustomer:t=!1,isOnAddressPage:o=!1,appContent:s})=>{const u=oe(),d=se(),r=ie(),p=Je(),b=de(),[e,n]=g.useState(!1),[i,h]=g.useState(!1),[m,k]=g.useState(!1),{tenantEmailDomain:T}=re(),x=le(),{useFeatureGate:I}=ue(),{isFeatureEnabled:f}=I(_.isDebitCardFeatureEnabled),U=Me("/:tenantEmailDomain/onboarding")!==null&&d.search?.includes("code"),C=D(y=>y.onboardingCustomerViewState.fetchState),F=D(y=>y.onboardingCustomerViewState.currentStep),$=D(y=>y.onboardingCustomerViewState.uiState),c=D(y=>ee(y)),L=D(y=>y.userRoleConfigState.fetchState),w=D(y=>y.cardPaymentViewState),G=Ie(w.addCardPaymentSourceStatus.fetchState),O=w.addCardPaymentSourceStatus.fetchState,{code:S,realmId:R,state:j}=Dt(d.search),P=c.externalConnections?.accounting[0],A=P?.connectionType,K=P?.connectionName,z=P?.connectionId??"",Q=B.getSignedInUser()?.userId??"";g.useEffect(()=>{i||(h(!0),r(ae()))},[i,r]),g.useEffect(()=>{m||(ve(["card"]),k(!0))},[m]),g.useEffect(()=>{G==="In-Progress"&&O==="Completed"&&r(ae())},[G,O]),g.useEffect(()=>{Ft(S,R,j,z,Q)===!0&&c.externalConnections?.saveConnectionState!=="In-Progress"&&C==="Completed"&&(r(st(c.tenantId,{connection_type:A??"accounting",connection_name:K??"quickbooks_online",authorization_code:S,realm_id:R,connection_id:z,user_id:Q},it(window.location.origin+"/onboarding/auth"))),N.trackOnboardingSaveQBOConnection(R,z),u(d.pathname))},[S,R,j,d.pathname,C]),g.useEffect(()=>{ne.isInitiated===!1&&C==="Completed"&&ne.init("/onboarding/auth",c.tenantEmailDomain)},[C]);const v=c.companyId??B.getSignedInUserTenant(T)?.companyId,q=ge(c?.userRole??[]),l=D(y=>he(y,v));g.useEffect(()=>{e||C!=="Not-Started"||v==null||(n(!0),r(rt(v,!0,!U)))},[e,C,v]),g.useEffect(()=>{c.externalConnections?.saveConnectionState!=="Completed"&&c.externalConnections?.saveConnectionState!=="Error"||!$.isQBOPopupOpen||F!=="qbo_connection"||r(Y({isQBOPopupOpen:!1}))},[c.externalConnections?.saveConnectionState]),g.useEffect(()=>{C==="Completed"&&U&&(r(_e({step:"qbo_connection"})),r(Y({isQBOPopupOpen:!0})))},[U,C]),g.useEffect(()=>{L==="Not-Started"&&r(ct(!0))},[L,r]);const J=Ie(l.companyDetailsLocalData?.addressStatus);g.useEffect(()=>{l.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&l.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&J==null&&r(Ue({addressType:"company_registered_address",addressToCreate:l.companyDetailsLocalData?.addressStatus?.addressToCreate}))},[l.companyDetailsLocalData?.addressStatus?.addressToCreate,l.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const Z=l.isInterimEmailSent;if(B.getSignedInUser()==null)throw Error("Can't access onboarding flow without signing in...");const Le=pe(f,c),Ge=me(c),ye=c.company?.companyOnboardingInfo.isOnboardingCompleted,be=y=>y.trackPageLoaded(X.Event.onboardingPage),Se=c.productSettings.isOtherProductsEnabled,Re=c.productSettings.isTreasuryEnabled;if(ye===!0){if(!Se)return Re?a.jsx(E,{to:"../../treasury"}):Le?a.jsx(E,{to:"../../checking"}):Ge?a.jsx(E,{to:"../../cards"}):a.jsx(E,{to:"../../dashboard"});const y=l.updateStatus.fetchState==="In-Progress";if(Se&&!y)return t?a.jsxs(Oe,{children:[a.jsx(H,{analytics:N,onLoad:Ne=>be(Ne)}),a.jsx(Ae,{navigate:u,location:d,companyId:v,currentTenant:c,isAdmin:q,isOnAddressPage:o,themeState:b,googleAPIKey:te.googleMapsAPIKey}),s!=null?a.jsx(Pe,{windowSize:p,children:s}):null]}):a.jsx(E,{to:"../../onboarding/thankyou"})}else if(ye===!1&&x?.loggedInUserRoleMap!=null)return Z===!0?a.jsx(E,{to:"../../onboarding/thankyou"}):a.jsxs(Oe,{children:[a.jsx(H,{analytics:N,onLoad:y=>be(y)}),a.jsx(Ae,{navigate:u,location:d,companyId:v,currentTenant:c,isAdmin:q,isOnAddressPage:o,themeState:b,googleAPIKey:te.googleMapsAPIKey}),s!=null?a.jsx(Pe,{windowSize:p,children:s}):null]});return null};function De(t,o,s){let u=`/${t}/onboarding/address`;return u=s!=null?u.concat(`/edit/${o}/${encodeURIComponent(s)}`):u.concat(`/new/${o}`),u}const Fe=fe.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
height: 100vh;
|
|
22
22
|
background-color: ${t=>t.theme.colors.grey4};
|
|
23
|
-
`,we=ce(function(t,o){const{companyId:s,currentTenant:u}=o,d=he(t,s),r=Ve(t);return{hasVerifiedBankAccount:(d.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(r.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:ge(u?.userRole??[])&&d.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:B.getSignedInUser(),currentTenant:u,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(t,o){const{currentTenant:s,themeState:u,navigate:d,location:r}=o,{tenantEmailDomain:p}=s;return{onZeniLogoClick:()=>{u.toggle()},handleLogOutClick:()=>{const
|
|
23
|
+
`,we=ce(function(t,o){const{companyId:s,currentTenant:u}=o,d=he(t,s),r=Ve(t);return{hasVerifiedBankAccount:(d.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(r.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:ge(u?.userRole??[])&&d.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:B.getSignedInUser(),currentTenant:u,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(t,o){const{currentTenant:s,themeState:u,navigate:d,location:r}=o,{tenantEmailDomain:p}=s;return{onZeniLogoClick:()=>{u.toggle()},handleLogOutClick:()=>{const b=V(r.state?.pathnameStackToGoBack,r.pathname);d("/signout",{replace:!0,state:{pathnameStackToGoBack:b,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleUpdatePaymentAddressDetailClick:()=>{const b=V(r.state?.pathnameStackToGoBack,r.pathname);d(`/${p}/onboarding/billing/edit`,{state:{pathnameStackToGoBack:b,message:"UpdatePaymentAddressDetail"}})}}})(Xe),vt=()=>{const t=oe(),o=ie(),s=se(),u=de(),{useFeatureGate:d}=ue(),{isFeatureEnabled:r}=d(_.isDebitCardFeatureEnabled),{tenantEmailDomain:p}=re(),b=le(),[e,n]=g.useState(!1);g.useEffect(()=>{e===!1&&s.state?.message==="OnboardingThankyou"&&n(!0)},[s.state]);const i=D(f=>ee(f)),h=i.productSettings.isOtherProductsEnabled;g.useEffect(()=>{o(Be(m,!1,!h))},[]);const m=i.companyId??B.getSignedInUserTenant(p)?.companyId;if(b.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const k=pe(r,i),T=me(i),x=D(f=>f.onboardingCustomerViewState.updateStatus.fetchState),I=i.company?.companyOnboardingInfo.isOnboardingCompleted;return I!==!0||h?x==="Completed"&&I===!0&&h&&b?.loggedInUserRoleMap!=null?a.jsxs(Fe,{children:[a.jsx(H,{analytics:N,onLoad:f=>{f.trackPageLoaded(X.Event.onboardingLandingPage,"Onboarding",At(i.productSettings))}}),a.jsx(we,{navigate:t,showUpdatePaymentDetailButton:h,location:s,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):x==="Completed"&&I===!1&&b?.loggedInUserRoleMap!=null?a.jsxs(Fe,{children:[a.jsx(H,{analytics:N,onLoad:f=>{f.trackPageLoaded(X.Event.onboardingInterimPage)}}),a.jsx(we,{navigate:t,showUpdatePaymentDetailButton:h,location:s,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):a.jsx(je,{fetchState:x}):k?a.jsx(E,{to:"../../checking"}):T?a.jsx(E,{to:"../../cards"}):a.jsx(E,{to:"../../dashboard"})};function oa(){return a.jsxs(Qe,{children:[a.jsx(M,{path:"/",element:a.jsx(W,{})}),a.jsx(M,{path:"/billing/edit",element:a.jsx(W,{taxCFOCustomer:!0})}),a.jsx(M,{path:"/thankyou",element:a.jsx(vt,{})}),a.jsx(M,{path:"/activation",element:a.jsx(jt,{})}),a.jsx(M,{path:"/address/edit/:addressType/:addressId",element:a.jsx(W,{isOnAddressPage:!0,appContent:a.jsx(Ce,{})})}),a.jsx(M,{path:"/address/new/:addressType",element:a.jsx(W,{isOnAddressPage:!0,appContent:a.jsx(Ce,{})})}),a.jsx(M,{path:"*",element:a.jsx(ze,{})})]})}export{oa as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-Cm6P1Xg9.js";import{l as G,g as k,u as $,h as V,j as q,k as Z,n as We,o as D}from"./core-AMZJGpoV.js";import{eM as j,Js as Fe,bB as Ut,bp as de,KF as Va,hO as Na,KG as Et,KH as Ga,hR as Qe,KI as Te,KJ as za,hW as $a,KK as Tt,KL as qa,h_ as et,KM as xe,KN as Za,cN as at,KO as Ha,KP as Ja,JM as Xa,iU as Wa,KQ as Qa,bm as _e,KR as Yt,Jg as Q,bc as Kt,j6 as Vt,mp as Nt,iR as Gt,Ji as ee,Jh as z,KS as en,KT as tn,KU as zt,KV as pe,tw as ke,tx as ye,tU as ue,tO as te,tB as Se,KW as an,KX as nn,KY as on,KZ as $t,K_ as he,K$ as sn,dF as Oe,q8 as qt,L0 as rn,L1 as cn,L2 as ln,L3 as nt,ID as ot,jm as st,u0 as rt,qg as dn,L4 as un,ty as xt,qb as ie,q7 as Zt,L5 as oe,L6 as mn,L7 as ct,IC as it,s8 as Ht,L8 as pn,L9 as hn,La as fn,Lb as lt,sl as gn,Lc as bn,tA as Dt,s7 as Jt,Ld as se,Le as Cn,bu as Xt,u4 as Wt,Lf as _n,Lg as kn,Lh as yn,Li as dt,t$ as Sn,Lj as vn,tz as Ft,u3 as Qt,Lk as re,Ll as In,Lm as An,Ln as ea,jb as ta,mm as aa,jg as na,mk as oa,mj as sa,mi as ra,rw as wn,fa as En,cK as Tn,cL as xn,mf as Dn,f6 as Fn,mv as On,Lo as Pn,D8 as Bn,Lp as Rn,Lq as jn,Lr as Ln,b5 as ut,eY as Mn,gw as Un,fB as Yn,mq as Kn,iK as Vn,mn as Nn,ml as Gn,eS as zn,eQ as $n}from"./zeni-epic-state-CaufR46d.js";import{z as B,T as H,y as F,e as S,D as N,aP as qn,N as Pe,E as ve,aQ as ca,i as Y,aR as Zn,C as Ie,aS as ia,c as mt,d as L,h as Hn,aT as Jn,aU as Xn,aV as Ae,aW as Wn,a as Qn,al as eo,aI as to,w as ao,O as no,aX as oo,aY as ge}from"./index-N5K3qQkU.js";import{n as pt}from"./mui-5LlzyiP2.js";import{a as _}from"./sentry-CH1ai1xG.js";import{w as la}from"./withTransactionSidePanel-Bf8LYRg6.js";import{b as da,t as me,e as ae,a as ht,v as so}from"./routePaths-meDm6KLz.js";import{u as Be}from"./useAskAiCfoHostNavButtonProps-Du0DR5Lw.js";import{c as Re}from"./useFetchSuggestedQuestionsWhenReady-ChhFydzB.js";import Ce from"./NotFoundScreen-DCVl9MiG.js";import{t as ua}from"./analyticsHelper-Co0biJvM.js";import{C as ro}from"./CompanyPassportScreen-BUkmQF51.js";import{F as co}from"./FeaturePreviewScreen-XRpSmfAA.js";import{R as io}from"./ReferralListScreen-CT8COHO0.js";import"./recharts-LaAu_fL4.js";import"./analytics-CgaqSFat.js";import"./plaid-nK_3ZvzH.js";import"./dnd-C4u70dJH.js";import"./stripe-DMRn4zHo.js";import"./lottie-CEe6fZ1i.js";import"./lexical-hn7WhrHW.js";import"./pdf-DzINawGT.js";import"./utils-DRDD4XTN.js";import"./TransactionDetailScreen-DRrJTiHG.js";import"./decodeURIComponentSafe-DNGRwvKs.js";import"./MobileAppDrawer-CAbg3Q-N.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]="b5f59ccb-0f82-40d4-8465-7b602dec5f4a",e._sentryDebugIdIdentifier="sentry-dbid-b5f59ccb-0f82-40d4-8465-7b602dec5f4a")}catch{}})();const lo=la(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=G(),s=B.getSignedInUser(),c=k(E=>E.tenantState.currentTenantId),u=k(E=>j(E)),{tenantEmailDomain:m}=G(),C=$(),b=u?.companyName??"",h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:c??""},l=_.useMemo(()=>({authParams:h,companyName:b,downloadEndPoint:`${H}/agingDetailedReport`,timezone:Fe()}),[]),d=_.useMemo(()=>r!=null?Ut(r):de(),[r]),p=V(),g=q(),f=k(E=>Va(E,d,o)),v=_.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&p(Na(o,d))},[d]),w=_.useCallback(()=>{g("../../",{relative:"path"})},[]),R=_.useCallback((E,J)=>{p(Et({sortKey:E,sortOrder:J}))},[]),A=_.useCallback(E=>{p(Et({downloadState:E}))},[]),I=_.useCallback(E=>{if(e)e(E.transactionId,E.transactionType);else if(m!=null){const J=da({id:E.transactionId,type:E.transactionType},m);g(J);const Le=F(C.state?.pathnameStackToGoBack,C.pathname);g(J,{state:{pathnameStackToGoBack:Le}})}},[m,e]),x=_.useCallback(()=>{f.vendor!=null&&S.trackApAgingDetail("AP Aging",d.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.vendor.id,f.vendor.name)},[f.vendor,d]);return _.useEffect(()=>{v()},[]),_.useEffect(()=>{f.fetchState==="Completed"&&x()},[x,f.fetchState]),i.jsx(qn,{apAgingDetail:f,downloadParams:l,reportDate:d,analytics:S,onTransactionClick:I,onReload:v,onBackClick:w,onColumnSortConfigChanged:R,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),uo=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=V(),n=q(),o=k(I=>Ga(I)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AP Aging"});Re({isDataReady:o.fetchState==="Completed"});const c=B.getSignedInUser(),u=k(I=>I.tenantState.currentTenantId),m=k(I=>j(I)),C=m?.companyName??"",b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u??""},h=_.useMemo(()=>({authParams:b,companyName:C,downloadEndPoint:`${H}/agingReport`,timezone:Fe()}),[]),l=o.apAgingUIState.selectedDate??de(),d=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(Qe(l))},[]);_.useEffect(()=>{d()},[]);const p=_.useCallback(()=>{n("../",{relative:"path"})},[]),g=_.useCallback(I=>{t(Te({searchString:I}))},[]),f=_.useCallback((I,x)=>{t(Te({sortKey:x,sortOrder:I}))},[]),v=_.useCallback(I=>{n(`./${I}/${l.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[l]),w=_.useCallback(I=>{t(Te({downloadState:I}))},[]),R=_.useCallback((I,x)=>{},[]),A=_.useCallback((I,x)=>{t(Te({selectedDate:I,agingDateSelectionType:x})),t(Qe(I))},[]);return i.jsxs(i.Fragment,{children:[o.fetchState==="Completed"?i.jsx(ve,{analytics:S,onLoad:I=>I.trackPageLoaded(Y.Event.agingReport,"AP Aging")}):null,i.jsx(ca,{uiState:o.apAgingUIState,report:o,downloadParams:h,analytics:S,onReloadReport:d,onBackClick:p,onSearchTextChange:g,onSortOrderChange:f,onEntityNameClick:v,updateDownloadStateHandler:w,onSelectedDateChanged:A,onNodeCollapseToggled:R,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},mo=la(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=G(),s=B.getSignedInUser(),c=k(x=>j(x)),{tenantEmailDomain:u}=G(),m=$(),C=c.companyName,b={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:c.tenantId},h=_.useMemo(()=>({authParams:b,companyName:C,downloadEndPoint:`${H}/agingDetailedReport`,timezone:Fe()}),[]),l=_.useMemo(()=>r!=null?Ut(r):de(),[r]),d=V(),p=q(),g=k(x=>za(x,l,o)),f=_.useCallback(()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&d($a(o,l))},[l]),v=_.useCallback(()=>{p("../../",{relative:"path"})},[]),w=_.useCallback((x,E)=>{d(Tt({sortKey:x,sortOrder:E}))},[]),R=_.useCallback(x=>{d(Tt({downloadState:x}))},[]),A=_.useCallback(x=>{if(e)e(x.transactionId,x.transactionType);else if(u!=null){const E=da({id:x.transactionId,type:x.transactionType},u);p(E);const J=F(m.state?.pathnameStackToGoBack,m.pathname);p(E,{state:{pathnameStackToGoBack:J}})}},[u,e]),I=_.useCallback(()=>{g.customer!=null&&S.trackArAgingDetail("AR Aging",l.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)},[g.customer,l]);return _.useEffect(()=>{f()},[]),_.useEffect(()=>{g.fetchState==="Completed"&&I()},[g.fetchState,I]),i.jsx(Zn,{arAgingDetail:g,downloadParams:h,reportDate:l,analytics:S,onTransactionClick:A,onReload:f,onBackClick:v,onColumnSortConfigChanged:w,updateDownloadStateHandler:R,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),po=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=V(),n=q(),o=k(A=>qa(A)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AR Aging"});Re({isDataReady:o.fetchState==="Completed"});const c=B.getSignedInUser(),u=k(A=>j(A)),m=u.companyName,C={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u.tenantId},b=_.useMemo(()=>({authParams:C,companyName:m,downloadEndPoint:`${H}/agingReport`,timezone:Fe()}),[]),h=o.arAgingUIState.selectedDate??de(),l=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(et(h))},[]);_.useEffect(()=>{l()},[]);const d=_.useCallback(()=>{n("../",{relative:"path"})},[]),p=_.useCallback(A=>{t(xe({searchString:A}))},[]),g=_.useCallback((A,I)=>{t(xe({sortKey:I,sortOrder:A}))},[]),f=_.useCallback(A=>{n(`./${A}/${h.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[h]),v=_.useCallback(A=>{t(xe({downloadState:A}))},[]),w=_.useCallback((A,I)=>{t(xe({selectedDate:A,agingDateSelectionType:I})),t(et(A))},[]),R=_.useCallback((A,I)=>{t(Za({nodeId:A,isCollapsed:I}))},[]);return i.jsxs(i.Fragment,{children:[o.fetchState==="Completed"?i.jsx(ve,{analytics:S,onLoad:A=>A.trackPageLoaded(Y.Event.agingReport,"AR Aging")}):null,i.jsx(ca,{uiState:o.arAgingUIState,report:o,downloadParams:b,analytics:S,onReloadReport:l,onBackClick:d,onSearchTextChange:p,onSortOrderChange:g,onEntityNameClick:f,updateDownloadStateHandler:v,onSelectedDateChanged:w,onNodeCollapseToggled:R,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},ma=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function pa(e,a){const t=Xa(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=me(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),c=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Wa(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?S.trackZeniAccountsCashBalancePromoClicked("Move Money"):(S.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else S.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const ho=Z(function(e){const a=Ha(e).accountsInOrder.map((n,o)=>ma(n,o)),t=Ja(e);return{sectionTitle:N.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:S}},pa)(ia),fo=Z(function(e){const a=Qa(e).accountsInOrder.map((o,r)=>ma(o,r)),t=B.getSignedInUser(),n=_e(t);return{sectionTitle:N.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:S}},pa)(ia);function go(){const e=q(),a=$(),{tenantEmailDomain:t}=G(),n=Ie(),o=k(s=>j(s).company?.companyInfo.firstMonthOfFY??1),r=at(n?.loggedInUserRoleMap);return k(s=>s.cashBalanceState.fetchState)==="Error"?i.jsx(Ce,{}):i.jsx(ho,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function bo(){const e=q(),a=$(),{tenantEmailDomain:t}=G(),n=Ie(),o=at(n?.loggedInUserRoleMap),r=k(s=>j(s).company?.companyInfo.firstMonthOfFY??1);return k(s=>s.cardBalanceState.fetchState)==="Error"?i.jsx(Ce,{}):i.jsx(fo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Co=pt.div`
|
|
1
|
+
import{j as i}from"./liveblocks-it_Rhm8-.js";import{l as G,g as k,u as $,h as V,j as q,k as Z,n as Qe,o as D}from"./core-BF8mCLAO.js";import{eM as j,Js as Oe,bB as Ut,bp as de,KF as Va,hO as Na,KG as Et,KH as Ga,hR as Xe,KI as Te,KJ as za,hW as $a,KK as Tt,KL as qa,h_ as et,KM as xe,KN as Za,cN as at,KO as Ha,KP as Ja,JM as Wa,iU as Qa,KQ as Xa,bm as _e,KR as Yt,Jg as X,bc as Kt,j6 as Vt,mp as Nt,iR as Gt,Ji as ee,Jh as z,KS as en,KT as tn,KU as zt,KV as pe,tw as ke,tx as ye,tU as ue,tO as te,tB as Se,KW as an,KX as nn,KY as on,KZ as $t,K_ as he,K$ as sn,dA as Fe,q8 as qt,L0 as rn,L1 as cn,L2 as ln,L3 as nt,ID as ot,jm as st,u0 as rt,qg as dn,L4 as un,ty as xt,qb as ie,q7 as Zt,L5 as oe,L6 as mn,L7 as ct,IC as it,s8 as Ht,L8 as pn,L9 as hn,La as fn,Lb as lt,sl as gn,Lc as bn,tA as Dt,s7 as Jt,Ld as se,Le as Cn,bu as Wt,u4 as Qt,Lf as _n,Lg as kn,Lh as yn,Li as dt,t$ as Sn,Lj as vn,tz as Ot,u3 as Xt,Lk as re,Ll as In,Lm as An,Ln as ea,jb as ta,mm as aa,jg as na,mk as oa,mj as sa,mi as ra,rw as wn,fa as En,cK as Tn,cL as xn,mf as Dn,f6 as On,mv as Fn,Lo as Pn,D8 as Bn,Lp as Rn,Lq as jn,Lr as Ln,b5 as ut,eY as Mn,gw as Un,fB as Yn,mq as Kn,iK as Vn,mn as Nn,ml as Gn,eS as zn,eQ as $n}from"./zeni-epic-state-Ds1G4QGX.js";import{z as B,Q as H,n as O,e as S,O as N,aP as qn,H as Pe,v as ve,aQ as ca,g as Y,aR as Zn,S as Ie,aS as ia,s as mt,d as L,h as Hn,aT as Jn,aU as Wn,aV as Ae,aW as Qn,a as Xn,al as eo,aI as to,p as ao,I as no,aX as oo,aY as ge}from"./index-Drj6C88E.js";import{n as pt}from"./mui-B87RTrAV.js";import{a as _}from"./sentry-C-hGmJ4T.js";import{w as la}from"./withTransactionSidePanel-DTDtCDdY.js";import{b as da,t as me,e as ae,a as ht,v as so}from"./routePaths-Cqx2U__X.js";import{u as Be}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as Re}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import Ce from"./NotFoundScreen-DZbU-KCv.js";import{t as ua}from"./analyticsHelper-BlP3gsal.js";import{C as ro}from"./CompanyPassportScreen-C8EcswEA.js";import{F as co}from"./FeaturePreviewScreen-Bd18oGQj.js";import{R as io}from"./ReferralListScreen-CWHCaSQw.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";import"./TransactionDetailScreen-CbyG0n1m.js";import"./decodeURIComponentSafe-BogCAdat.js";import"./MobileAppDrawer-CwjUL5yD.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]="48424f5b-7195-47d4-8bb0-0f0897eee38b",e._sentryDebugIdIdentifier="sentry-dbid-48424f5b-7195-47d4-8bb0-0f0897eee38b")}catch{}})();const lo=la(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=G(),s=B.getSignedInUser(),c=k(E=>E.tenantState.currentTenantId),u=k(E=>j(E)),{tenantEmailDomain:m}=G(),C=$(),b=u?.companyName??"",h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:c??""},l=_.useMemo(()=>({authParams:h,companyName:b,downloadEndPoint:`${H}/agingDetailedReport`,timezone:Oe()}),[]),d=_.useMemo(()=>r!=null?Ut(r):de(),[r]),p=V(),g=q(),f=k(E=>Va(E,d,o)),v=_.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&p(Na(o,d))},[d]),w=_.useCallback(()=>{g("../../",{relative:"path"})},[]),R=_.useCallback((E,J)=>{p(Et({sortKey:E,sortOrder:J}))},[]),A=_.useCallback(E=>{p(Et({downloadState:E}))},[]),I=_.useCallback(E=>{if(e)e(E.transactionId,E.transactionType);else if(m!=null){const J=da({id:E.transactionId,type:E.transactionType},m);g(J);const Le=O(C.state?.pathnameStackToGoBack,C.pathname);g(J,{state:{pathnameStackToGoBack:Le}})}},[m,e]),x=_.useCallback(()=>{f.vendor!=null&&S.trackApAgingDetail("AP Aging",d.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.vendor.id,f.vendor.name)},[f.vendor,d]);return _.useEffect(()=>{v()},[]),_.useEffect(()=>{f.fetchState==="Completed"&&x()},[x,f.fetchState]),i.jsx(qn,{apAgingDetail:f,downloadParams:l,reportDate:d,analytics:S,onTransactionClick:I,onReload:v,onBackClick:w,onColumnSortConfigChanged:R,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),uo=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=V(),n=q(),o=k(I=>Ga(I)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AP Aging"});Re({isDataReady:o.fetchState==="Completed"});const c=B.getSignedInUser(),u=k(I=>I.tenantState.currentTenantId),m=k(I=>j(I)),C=m?.companyName??"",b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u??""},h=_.useMemo(()=>({authParams:b,companyName:C,downloadEndPoint:`${H}/agingReport`,timezone:Oe()}),[]),l=o.apAgingUIState.selectedDate??de(),d=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(Xe(l))},[]);_.useEffect(()=>{d()},[]);const p=_.useCallback(()=>{n("../",{relative:"path"})},[]),g=_.useCallback(I=>{t(Te({searchString:I}))},[]),f=_.useCallback((I,x)=>{t(Te({sortKey:x,sortOrder:I}))},[]),v=_.useCallback(I=>{n(`./${I}/${l.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[l]),w=_.useCallback(I=>{t(Te({downloadState:I}))},[]),R=_.useCallback((I,x)=>{},[]),A=_.useCallback((I,x)=>{t(Te({selectedDate:I,agingDateSelectionType:x})),t(Xe(I))},[]);return i.jsxs(i.Fragment,{children:[o.fetchState==="Completed"?i.jsx(ve,{analytics:S,onLoad:I=>I.trackPageLoaded(Y.Event.agingReport,"AP Aging")}):null,i.jsx(ca,{uiState:o.apAgingUIState,report:o,downloadParams:h,analytics:S,onReloadReport:d,onBackClick:p,onSearchTextChange:g,onSortOrderChange:f,onEntityNameClick:v,updateDownloadStateHandler:w,onSelectedDateChanged:A,onNodeCollapseToggled:R,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},mo=la(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=G(),s=B.getSignedInUser(),c=k(x=>j(x)),{tenantEmailDomain:u}=G(),m=$(),C=c.companyName,b={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:c.tenantId},h=_.useMemo(()=>({authParams:b,companyName:C,downloadEndPoint:`${H}/agingDetailedReport`,timezone:Oe()}),[]),l=_.useMemo(()=>r!=null?Ut(r):de(),[r]),d=V(),p=q(),g=k(x=>za(x,l,o)),f=_.useCallback(()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&d($a(o,l))},[l]),v=_.useCallback(()=>{p("../../",{relative:"path"})},[]),w=_.useCallback((x,E)=>{d(Tt({sortKey:x,sortOrder:E}))},[]),R=_.useCallback(x=>{d(Tt({downloadState:x}))},[]),A=_.useCallback(x=>{if(e)e(x.transactionId,x.transactionType);else if(u!=null){const E=da({id:x.transactionId,type:x.transactionType},u);p(E);const J=O(m.state?.pathnameStackToGoBack,m.pathname);p(E,{state:{pathnameStackToGoBack:J}})}},[u,e]),I=_.useCallback(()=>{g.customer!=null&&S.trackArAgingDetail("AR Aging",l.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)},[g.customer,l]);return _.useEffect(()=>{f()},[]),_.useEffect(()=>{g.fetchState==="Completed"&&I()},[g.fetchState,I]),i.jsx(Zn,{arAgingDetail:g,downloadParams:h,reportDate:l,analytics:S,onTransactionClick:A,onReload:f,onBackClick:v,onColumnSortConfigChanged:w,updateDownloadStateHandler:R,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),po=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=V(),n=q(),o=k(A=>qa(A)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AR Aging"});Re({isDataReady:o.fetchState==="Completed"});const c=B.getSignedInUser(),u=k(A=>j(A)),m=u.companyName,C={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u.tenantId},b=_.useMemo(()=>({authParams:C,companyName:m,downloadEndPoint:`${H}/agingReport`,timezone:Oe()}),[]),h=o.arAgingUIState.selectedDate??de(),l=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(et(h))},[]);_.useEffect(()=>{l()},[]);const d=_.useCallback(()=>{n("../",{relative:"path"})},[]),p=_.useCallback(A=>{t(xe({searchString:A}))},[]),g=_.useCallback((A,I)=>{t(xe({sortKey:I,sortOrder:A}))},[]),f=_.useCallback(A=>{n(`./${A}/${h.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[h]),v=_.useCallback(A=>{t(xe({downloadState:A}))},[]),w=_.useCallback((A,I)=>{t(xe({selectedDate:A,agingDateSelectionType:I})),t(et(A))},[]),R=_.useCallback((A,I)=>{t(Za({nodeId:A,isCollapsed:I}))},[]);return i.jsxs(i.Fragment,{children:[o.fetchState==="Completed"?i.jsx(ve,{analytics:S,onLoad:A=>A.trackPageLoaded(Y.Event.agingReport,"AR Aging")}):null,i.jsx(ca,{uiState:o.arAgingUIState,report:o,downloadParams:b,analytics:S,onReloadReport:l,onBackClick:d,onSearchTextChange:p,onSortOrderChange:g,onEntityNameClick:f,updateDownloadStateHandler:v,onSelectedDateChanged:w,onNodeCollapseToggled:R,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},ma=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function pa(e,a){const t=Wa(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=me(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),c=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Qa(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?S.trackZeniAccountsCashBalancePromoClicked("Move Money"):(S.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else S.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const ho=Z(function(e){const a=Ha(e).accountsInOrder.map((n,o)=>ma(n,o)),t=Ja(e);return{sectionTitle:N.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:S}},pa)(ia),fo=Z(function(e){const a=Xa(e).accountsInOrder.map((o,r)=>ma(o,r)),t=B.getSignedInUser(),n=_e(t);return{sectionTitle:N.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:S}},pa)(ia);function go(){const e=q(),a=$(),{tenantEmailDomain:t}=G(),n=Ie(),o=k(s=>j(s).company?.companyInfo.firstMonthOfFY??1),r=at(n?.loggedInUserRoleMap);return k(s=>s.cashBalanceState.fetchState)==="Error"?i.jsx(Ce,{}):i.jsx(ho,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function bo(){const e=q(),a=$(),{tenantEmailDomain:t}=G(),n=Ie(),o=at(n?.loggedInUserRoleMap),r=k(s=>j(s).company?.companyInfo.firstMonthOfFY??1);return k(s=>s.cardBalanceState.fetchState)==="Error"?i.jsx(Ce,{}):i.jsx(fo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Co=pt.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
min-height: 100%;
|
|
@@ -10,11 +10,11 @@ import{j as i}from"./liveblocks-Cm6P1Xg9.js";import{l as G,g as k,u as $,h as V,
|
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: center;
|
|
12
12
|
background-color: ${e=>e.theme.colors.grey4};
|
|
13
|
-
`;function ko({title:e,reportId:a,entityAutoCompleteView:t,autoCompleteText:n,isAiCfoAccessEnabled:o,onAskAiCfoClick:r}){const s=q(),c=V(),u=$(),{tenantEmailDomain:m}=G(),C=Hn();return i.jsxs(Co,{children:[i.jsx(Jn,{source:a==="cash_balance"?"CashBalanceDetailScreen":"CardBalanceDetailScreen",title:e,onBackClick:()=>{s("../")},backgroundColor:C.colors.grey4,searchAutoComplete:{autoCompleteData:{entityAutoCompleteView:t,autoCompleteText:n},autoCompleteActions:{onAutoCompleteInputChange:b=>{b.trim().length>=2?c(ee({searchString:b,searchOrigin:"navbar"})):b.trim().length===0&&c(z("navbar"))},onAutoCompleteEntity:b=>{n!=null&&S?.trackSearch(Y.Event.search,yo(a),b.type,b.name,n);const h=ae(b,m),l=F(u.state?.pathnameStackToGoBack,u.pathname);s(h,{state:{pathnameStackToGoBack:l}})}}},rightSideComponent:o===!0&&r!=null?i.jsx(Xn,{onClick:r}):null}),i.jsx(_o,{children:a==="cash_balance"?i.jsx(go,{}):i.jsx(bo,{})})]})}function Ot(){const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=$(),n=V(),{useFeatureGate:o}=mt(),{isFeatureEnabled:r}=o(L.isDepositAccountsFeatureEnabled),s=k(f=>f.cashBalanceState.fetchState),c=k(f=>f.cardBalanceState.fetchState),u=B.getSignedInUser();if(u==null)throw Error("Can't access dashboard detail without signing in...");const m=Yt((f=>{const v=Kt(f,"/").split("/");return v[v.length-1]})(t.pathname));let C="Not-Started",b="";const h=N.getLocalizedStrings();switch(m){case"cash_balance":C=s,b=h.reportTitleById.cash_balance;break;case"card_balance":C=c,b=h.reportTitleById.card_balance;break;default:console.error(`${m} is not supported!`)}const{isAiCfoAccessEnabled:l,onAskAiCfoClick:d}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:m==="card_balance"?"Card Balance":"Cash Balance"});Re({isDataReady:C==="Completed"});const p=k(f=>f.entityAutoCompleteState.autoCompleteText.navbar),g=k(f=>Q(f,"navbar"));return _.useEffect(()=>{C==="Not-Started"&&function(f,v,w){switch(v){case"card_balance":f(Gt());break;case"cash_balance":f(Vt()),w===!0&&f(Nt());break;default:throw new Error(`balance report type ${v} is not yet supported`)}}(n,m,r)},[u,n,C]),i.jsxs(i.Fragment,{children:[C==="Completed"?i.jsx(ve,{analytics:S,onLoad:f=>((v,w)=>{switch(w){case"card_balance":v.trackPageLoaded(Y.Event.cardBalance);break;case"cash_balance":v.trackPageLoaded(Y.Event.cashBalance);break;default:console.error(`Analytics: Not tracking Page Loaded for ${w}!`)}})(f,m)}):null,i.jsx(ko,{title:b,reportId:m,autoCompleteText:p,entityAutoCompleteView:g,isAiCfoAccessEnabled:l,onAskAiCfoClick:d})]})}const yo=e=>{switch(e){case"cash_balance":return"Cash Balance";case"card_balance":return"Card Balance";default:return"Dashboard"}},So=Z(function(e){const a=en(e),t=tn(e),n=zt(e),{scrollPosition:o,...r}=n,s=N.getLocalizedStrings().reportTitleById.cash_in_cash_out,c=B.getSignedInUser(),u=e.tenantState.currentTenantId,m=j(e),C=m?.companyName??"",b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u??""},h=e.entityAutoCompleteState.autoCompleteText.navbar,l=Q(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:C,statementEndPoint:`${H}/statement`,authParams:b},analytics:S,autoCompleteData:{autoCompleteText:h,entityAutoCompleteView:l}}},function(e,a){return{updateDownloadStateHandler:t=>{e(an(t))},onTimeframeSelectionChanged:()=>{},onCOABalancesRangeChanged:(t,n)=>{e(Se(t,n)),e(pe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ue("month")),e(te(a.firstMonthOfFY,t)),e(pe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ke(a.firstMonthOfFY,t,o,n)),n.length>0&&e(ye(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(pe({resetLeftScroll:!0})),50)},onElementCollapseStateChanged:(t,n)=>{e(pe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(pe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(Ae),vo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=k(r=>zt(r)).mode==="compare_mode";return i.jsx(So,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:o,navigate:n})},Io=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Oe(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}},Ao=Z(function(e){const a=nn(e),t=on(e),n=$t(e),{scrollPosition:o,...r}=n,s=N.getLocalizedStrings().reportTitleById.cash_position,c=B.getSignedInUser(),u=e.tenantState.currentTenantId,m=j(e),C=m?.companyName??"",b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u??""},h=e.entityAutoCompleteState.autoCompleteText.navbar,l=Q(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:C,statementEndPoint:`${H}/statement`,authParams:b},analytics:S,autoCompleteData:{autoCompleteText:h,entityAutoCompleteView:l}}},function(e,a){return{updateDownloadStateHandler:t=>{e(sn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(he({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Se(t,n)),e(he({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(he({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ke(a.firstMonthOfFY,t,o,n)),n.length>0&&e(ye(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(he({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Io(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const c=me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(c,{state:{pathnameStackToGoBack:u,referrer:"Cash Position"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onTableScroll:t=>{e(he({scrollPosition:t}))},onBackClick:()=>{a.navigate("../")}}})(Ae),wo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=k(r=>$t(r)).mode==="compare_mode";return i.jsx(Ao,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:o,navigate:n})},K=(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 $e(){return i.jsxs(We,{children:[i.jsx(D,{path:"/",element:i.jsx(X,{})}),i.jsx(D,{path:"/:forecastId",element:i.jsx(X,{})}),i.jsx(D,{path:"/:forecastId/*",element:i.jsx(Ce,{})})]})}const Eo=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Oe(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}},To=Z(function(e){const a=qt(e),t=rn(e),n=cn(e),o=ln(e),r=nt(e),{scrollPosition:s,...c}=r,u=t.reportTitle,m=B.getSignedInUser(),C=e.tenantState.currentTenantId,b=j(e),h=b?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:C??""},d=e.entityAutoCompleteState.autoCompleteText.navbar,p=Q(e,"navbar"),g=ot(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:u},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:c,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:h,statementEndPoint:`${H}/statement`,authParams:l},analytics:S,isZeniUser:_e(m),autoCompleteData:{autoCompleteText:d,entityAutoCompleteView:p},isZeniCOAUsed:g,isAccountingClassesEnabled:st(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(mn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(oe({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Se(t,n)),e(oe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(oe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ke(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(ye(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&K(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(oe({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Eo(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,c=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?ht(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(c,{state:{pathnameStackToGoBack:u,referrer:"Burn Rate"}})}},onElementCollapseStateChanged:(t,n)=>{e(oe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(oe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=F(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(ie(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:ft,n)),t==="forecast_mode"?(e(xt({viewMode:"account_group"})),e(Zt(!1,n?.id)),n!=null&&K(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):K(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(oe({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Burn Rate"),e(xt({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(un({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{e(dn())},onResyncReports:()=>{e(rt("net_burn_or_income_by_classes"))}}})(Ae),xo=e=>{const a=V(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=k(p=>nt(p)),c=s.isForecastModeOn,u=s.timeframe,m=s.selectedForecast?.id,C=k(p=>ct(p.forecastState,m??"")),b=k(p=>qt(p)),h=k(p=>it(p)),l=s.mode==="compare_mode",d=b.dataAvailable;return _.useEffect(()=>{if(m!=null&&c===!0&&(K(c,r,m,o),C!=null)){const p=C?.forecastPeriod,g=d!=null&&p.endDate.isAfter(d?.endDate)===!0?d:p;a(te(e.firstMonthOfFY,{startDate:g.endDate.startOf(u),endDate:g?.endDate}))}},[m]),i.jsx(To,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,forecastIdFromUrlPath:r,location:n,isCompareModeOn:l,navigate:o,analytics:S,reportsResyncFetchState:h.reportsResyncFetchState})},Do=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Oe(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}},Fo=Z(function(e){const a=Ht(e),t=pn(e),n=hn(e),o=fn(e),r=lt(e),{scrollPosition:s,...c}=r,u=N.getLocalizedStrings().reportTitleById.operating_expenses,m=B.getSignedInUser(),C=e.tenantState.currentTenantId,b=j(e),h=b?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:C??""},d=e.entityAutoCompleteState.autoCompleteText.navbar,p=Q(e,"navbar"),g=ot(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:u},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:c,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:h,statementEndPoint:`${H}/statement`,authParams:l},analytics:S,isZeniUser:_e(m),autoCompleteData:{autoCompleteText:d,entityAutoCompleteView:p},isZeniCOAUsed:g,isAccountingClassesEnabled:st(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(Cn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(se({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Se(t,n)),e(se({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(se({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ke(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(ye(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&K(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(se({resetLeftScroll:!0})),50)},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(t,n)=>{const{timePeriod:o,timeframe:r}=Do(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,c=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?ht(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(c,{state:{pathnameStackToGoBack:u,referrer:"Operating Expenses"}})}},onElementCollapseStateChanged:(t,n)=>{e(se({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(se({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=F(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(ie(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:ft,n)),t=="forecast_mode"?(e(Dt({viewMode:"account_group"})),e(Jt(!1,n?.id)),n!=null&&K(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):K(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(se({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Operating Expenses"),e(Dt({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(bn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{e(gn())},onResyncReports:()=>{e(rt("operating_expenses_by_classes"))}}})(Ae),Oo=e=>{const a=V(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=k(f=>lt(f)),c=s.isForecastModeOn,u=s.timeframe,m=s.selectedForecast?.id,C=k(f=>ct(f.forecastState,m??"")),b=k(f=>Ht(f)),h=k(f=>it(f)),l=s.mode==="compare_mode",d=b.dataAvailable;_.useEffect(()=>{if(m!=null&&c===!0&&(K(c,r,m,o),C!=null)){const f=C?.forecastPeriod,v=d!=null&&f.endDate.isAfter(d?.endDate)===!0?d:f;a(te(e.firstMonthOfFY,{startDate:v.endDate.startOf(u),endDate:v?.endDate}))}},[m]);const p=Ie(),g=p?.loggedInUserRole!=null&&Xt(p?.loggedInUserRole)!==!0;return i.jsx(Fo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,location:n,isCompareModeOn:l,navigate:o,forecastIdFromUrlPath:r,analytics:S,hasTransactionAccess:g,reportsResyncFetchState:h.reportsResyncFetchState})},Po=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Oe(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}},Bo=Z(function(e){const a=Wt(e),t=_n(e),n=kn(e),o=yn(e),r=dt(e),{scrollPosition:s,...c}=r,u=N.getLocalizedStrings().reportTitleById.revenue,m=B.getSignedInUser(),C=e.tenantState.currentTenantId,b=j(e),h=b?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:C??""},d=e.entityAutoCompleteState.autoCompleteText.navbar,p=Q(e,"navbar"),g=ot(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:u},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:c,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:h,statementEndPoint:`${H}/statement`,authParams:l},analytics:S,isZeniUser:_e(m),autoCompleteData:{autoCompleteText:d,entityAutoCompleteView:p},isZeniCOAUsed:g,isAccountingClassesEnabled:st(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(In(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(re({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Se(t,n)),e(re({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(re({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ke(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(ye(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&K(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(re({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Po(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,c=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?ht(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(c,{state:{pathnameStackToGoBack:u,referrer:"Revenues"}})}},onElementCollapseStateChanged:(t,n)=>{e(re({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(re({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=F(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(ie(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:ft,n)),t==="forecast_mode"?(e(Ft({viewMode:"account_group"})),e(Qt(!1,n?.id)),n!=null&&K(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):K(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(re({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Revenues"),e(Ft({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(vn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{e(Sn())},onResyncReports:()=>{e(rt("revenue_by_classes"))}}})(Ae),Ro=e=>{const a=V(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=k(d=>dt(d)),c=s.isForecastModeOn,u=s.timeframe,m=s.selectedForecast?.id,C=k(d=>ct(d.forecastState,m??"")),b=k(d=>Wt(d)).dataAvailable,h=s.mode==="compare_mode",l=k(d=>it(d));return _.useEffect(()=>{if(m!=null&&c===!0&&(K(c,r,m,o),C!=null)){const d=C?.forecastPeriod,p=b!=null&&d.endDate.isAfter(b?.endDate)===!0?b:d;a(te(e.firstMonthOfFY,{startDate:p.endDate.startOf(u),endDate:p?.endDate}))}},[m]),i.jsx(Bo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,isCompareModeOn:h,location:n,navigate:o,forecastIdFromUrlPath:r,analytics:S,reportsResyncFetchState:l.reportsResyncFetchState})},jo=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}},Lo=Z(function(e){const a=An(e),t=e.entityAutoCompleteState.autoCompleteText.navbar,n=Q(e,"navbar");return{report:a,analytics:S,autoCompleteData:{autoCompleteText:t,entityAutoCompleteView:n}}},function(e,a){return{onTimeframeSelectionChanged:t=>{S.trackTimeframeSwitch(ua(t),"Top Expenses"),e(ea(t))},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=jo(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const c=me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(c,{state:{pathnameStackToGoBack:u,referrer:"Top Expenses"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(Wn),Mo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e;return i.jsx(Lo,{tenantEmailDomain:a,location:t,navigate:n})},Uo=pt.div`
|
|
13
|
+
`;function ko({title:e,reportId:a,entityAutoCompleteView:t,autoCompleteText:n,isAiCfoAccessEnabled:o,onAskAiCfoClick:r}){const s=q(),c=V(),u=$(),{tenantEmailDomain:m}=G(),C=Hn();return i.jsxs(Co,{children:[i.jsx(Jn,{source:a==="cash_balance"?"CashBalanceDetailScreen":"CardBalanceDetailScreen",title:e,onBackClick:()=>{s("../")},backgroundColor:C.colors.grey4,searchAutoComplete:{autoCompleteData:{entityAutoCompleteView:t,autoCompleteText:n},autoCompleteActions:{onAutoCompleteInputChange:b=>{b.trim().length>=2?c(ee({searchString:b,searchOrigin:"navbar"})):b.trim().length===0&&c(z("navbar"))},onAutoCompleteEntity:b=>{n!=null&&S?.trackSearch(Y.Event.search,yo(a),b.type,b.name,n);const h=ae(b,m),l=O(u.state?.pathnameStackToGoBack,u.pathname);s(h,{state:{pathnameStackToGoBack:l}})}}},rightSideComponent:o===!0&&r!=null?i.jsx(Wn,{onClick:r}):null}),i.jsx(_o,{children:a==="cash_balance"?i.jsx(go,{}):i.jsx(bo,{})})]})}function Ft(){const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=$(),n=V(),{useFeatureGate:o}=mt(),{isFeatureEnabled:r}=o(L.isDepositAccountsFeatureEnabled),s=k(f=>f.cashBalanceState.fetchState),c=k(f=>f.cardBalanceState.fetchState),u=B.getSignedInUser();if(u==null)throw Error("Can't access dashboard detail without signing in...");const m=Yt((f=>{const v=Kt(f,"/").split("/");return v[v.length-1]})(t.pathname));let C="Not-Started",b="";const h=N.getLocalizedStrings();switch(m){case"cash_balance":C=s,b=h.reportTitleById.cash_balance;break;case"card_balance":C=c,b=h.reportTitleById.card_balance;break;default:console.error(`${m} is not supported!`)}const{isAiCfoAccessEnabled:l,onAskAiCfoClick:d}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:m==="card_balance"?"Card Balance":"Cash Balance"});Re({isDataReady:C==="Completed"});const p=k(f=>f.entityAutoCompleteState.autoCompleteText.navbar),g=k(f=>X(f,"navbar"));return _.useEffect(()=>{C==="Not-Started"&&function(f,v,w){switch(v){case"card_balance":f(Gt());break;case"cash_balance":f(Vt()),w===!0&&f(Nt());break;default:throw new Error(`balance report type ${v} is not yet supported`)}}(n,m,r)},[u,n,C]),i.jsxs(i.Fragment,{children:[C==="Completed"?i.jsx(ve,{analytics:S,onLoad:f=>((v,w)=>{switch(w){case"card_balance":v.trackPageLoaded(Y.Event.cardBalance);break;case"cash_balance":v.trackPageLoaded(Y.Event.cashBalance);break;default:console.error(`Analytics: Not tracking Page Loaded for ${w}!`)}})(f,m)}):null,i.jsx(ko,{title:b,reportId:m,autoCompleteText:p,entityAutoCompleteView:g,isAiCfoAccessEnabled:l,onAskAiCfoClick:d})]})}const yo=e=>{switch(e){case"cash_balance":return"Cash Balance";case"card_balance":return"Card Balance";default:return"Dashboard"}},So=Z(function(e){const a=en(e),t=tn(e),n=zt(e),{scrollPosition:o,...r}=n,s=N.getLocalizedStrings().reportTitleById.cash_in_cash_out,c=B.getSignedInUser(),u=e.tenantState.currentTenantId,m=j(e),C=m?.companyName??"",b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u??""},h=e.entityAutoCompleteState.autoCompleteText.navbar,l=X(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:C,statementEndPoint:`${H}/statement`,authParams:b},analytics:S,autoCompleteData:{autoCompleteText:h,entityAutoCompleteView:l}}},function(e,a){return{updateDownloadStateHandler:t=>{e(an(t))},onTimeframeSelectionChanged:()=>{},onCOABalancesRangeChanged:(t,n)=>{e(Se(t,n)),e(pe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ue("month")),e(te(a.firstMonthOfFY,t)),e(pe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ke(a.firstMonthOfFY,t,o,n)),n.length>0&&e(ye(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(pe({resetLeftScroll:!0})),50)},onElementCollapseStateChanged:(t,n)=>{e(pe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(pe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(Ae),vo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=k(r=>zt(r)).mode==="compare_mode";return i.jsx(So,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:o,navigate:n})},Io=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Fe(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}},Ao=Z(function(e){const a=nn(e),t=on(e),n=$t(e),{scrollPosition:o,...r}=n,s=N.getLocalizedStrings().reportTitleById.cash_position,c=B.getSignedInUser(),u=e.tenantState.currentTenantId,m=j(e),C=m?.companyName??"",b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u??""},h=e.entityAutoCompleteState.autoCompleteText.navbar,l=X(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:C,statementEndPoint:`${H}/statement`,authParams:b},analytics:S,autoCompleteData:{autoCompleteText:h,entityAutoCompleteView:l}}},function(e,a){return{updateDownloadStateHandler:t=>{e(sn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(he({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Se(t,n)),e(he({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(he({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ke(a.firstMonthOfFY,t,o,n)),n.length>0&&e(ye(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(he({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Io(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const c=me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(c,{state:{pathnameStackToGoBack:u,referrer:"Cash Position"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onTableScroll:t=>{e(he({scrollPosition:t}))},onBackClick:()=>{a.navigate("../")}}})(Ae),wo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=k(r=>$t(r)).mode==="compare_mode";return i.jsx(Ao,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:o,navigate:n})},K=(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 $e(){return i.jsxs(Qe,{children:[i.jsx(D,{path:"/",element:i.jsx(W,{})}),i.jsx(D,{path:"/:forecastId",element:i.jsx(W,{})}),i.jsx(D,{path:"/:forecastId/*",element:i.jsx(Ce,{})})]})}const Eo=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Fe(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}},To=Z(function(e){const a=qt(e),t=rn(e),n=cn(e),o=ln(e),r=nt(e),{scrollPosition:s,...c}=r,u=t.reportTitle,m=B.getSignedInUser(),C=e.tenantState.currentTenantId,b=j(e),h=b?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:C??""},d=e.entityAutoCompleteState.autoCompleteText.navbar,p=X(e,"navbar"),g=ot(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:u},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:c,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:h,statementEndPoint:`${H}/statement`,authParams:l},analytics:S,isZeniUser:_e(m),autoCompleteData:{autoCompleteText:d,entityAutoCompleteView:p},isZeniCOAUsed:g,isAccountingClassesEnabled:st(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(mn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(oe({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Se(t,n)),e(oe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(oe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ke(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(ye(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&K(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(oe({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Eo(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,c=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?ht(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(c,{state:{pathnameStackToGoBack:u,referrer:"Burn Rate"}})}},onElementCollapseStateChanged:(t,n)=>{e(oe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(oe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(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(ie(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:ft,n)),t==="forecast_mode"?(e(xt({viewMode:"account_group"})),e(Zt(!1,n?.id)),n!=null&&K(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):K(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(oe({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Burn Rate"),e(xt({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(un({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{e(dn())},onResyncReports:()=>{e(rt("net_burn_or_income_by_classes"))}}})(Ae),xo=e=>{const a=V(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=k(p=>nt(p)),c=s.isForecastModeOn,u=s.timeframe,m=s.selectedForecast?.id,C=k(p=>ct(p.forecastState,m??"")),b=k(p=>qt(p)),h=k(p=>it(p)),l=s.mode==="compare_mode",d=b.dataAvailable;return _.useEffect(()=>{if(m!=null&&c===!0&&(K(c,r,m,o),C!=null)){const p=C?.forecastPeriod,g=d!=null&&p.endDate.isAfter(d?.endDate)===!0?d:p;a(te(e.firstMonthOfFY,{startDate:g.endDate.startOf(u),endDate:g?.endDate}))}},[m]),i.jsx(To,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,forecastIdFromUrlPath:r,location:n,isCompareModeOn:l,navigate:o,analytics:S,reportsResyncFetchState:h.reportsResyncFetchState})},Do=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Fe(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}},Oo=Z(function(e){const a=Ht(e),t=pn(e),n=hn(e),o=fn(e),r=lt(e),{scrollPosition:s,...c}=r,u=N.getLocalizedStrings().reportTitleById.operating_expenses,m=B.getSignedInUser(),C=e.tenantState.currentTenantId,b=j(e),h=b?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:C??""},d=e.entityAutoCompleteState.autoCompleteText.navbar,p=X(e,"navbar"),g=ot(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:u},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:c,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:h,statementEndPoint:`${H}/statement`,authParams:l},analytics:S,isZeniUser:_e(m),autoCompleteData:{autoCompleteText:d,entityAutoCompleteView:p},isZeniCOAUsed:g,isAccountingClassesEnabled:st(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(Cn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(se({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Se(t,n)),e(se({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(se({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ke(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(ye(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&K(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(se({resetLeftScroll:!0})),50)},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(t,n)=>{const{timePeriod:o,timeframe:r}=Do(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,c=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?ht(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(c,{state:{pathnameStackToGoBack:u,referrer:"Operating Expenses"}})}},onElementCollapseStateChanged:(t,n)=>{e(se({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(se({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(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(ie(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:ft,n)),t=="forecast_mode"?(e(Dt({viewMode:"account_group"})),e(Jt(!1,n?.id)),n!=null&&K(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):K(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(se({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Operating Expenses"),e(Dt({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(bn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{e(gn())},onResyncReports:()=>{e(rt("operating_expenses_by_classes"))}}})(Ae),Fo=e=>{const a=V(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=k(f=>lt(f)),c=s.isForecastModeOn,u=s.timeframe,m=s.selectedForecast?.id,C=k(f=>ct(f.forecastState,m??"")),b=k(f=>Ht(f)),h=k(f=>it(f)),l=s.mode==="compare_mode",d=b.dataAvailable;_.useEffect(()=>{if(m!=null&&c===!0&&(K(c,r,m,o),C!=null)){const f=C?.forecastPeriod,v=d!=null&&f.endDate.isAfter(d?.endDate)===!0?d:f;a(te(e.firstMonthOfFY,{startDate:v.endDate.startOf(u),endDate:v?.endDate}))}},[m]);const p=Ie(),g=p?.loggedInUserRole!=null&&Wt(p?.loggedInUserRole)!==!0;return i.jsx(Oo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,location:n,isCompareModeOn:l,navigate:o,forecastIdFromUrlPath:r,analytics:S,hasTransactionAccess:g,reportsResyncFetchState:h.reportsResyncFetchState})},Po=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Fe(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}},Bo=Z(function(e){const a=Qt(e),t=_n(e),n=kn(e),o=yn(e),r=dt(e),{scrollPosition:s,...c}=r,u=N.getLocalizedStrings().reportTitleById.revenue,m=B.getSignedInUser(),C=e.tenantState.currentTenantId,b=j(e),h=b?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:C??""},d=e.entityAutoCompleteState.autoCompleteText.navbar,p=X(e,"navbar"),g=ot(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:u},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:c,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:h,statementEndPoint:`${H}/statement`,authParams:l},analytics:S,isZeniUser:_e(m),autoCompleteData:{autoCompleteText:d,entityAutoCompleteView:p},isZeniCOAUsed:g,isAccountingClassesEnabled:st(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(In(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(re({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Se(t,n)),e(re({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(re({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ke(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(ye(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&K(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(re({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Po(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,c=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?ht(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(c,{state:{pathnameStackToGoBack:u,referrer:"Revenues"}})}},onElementCollapseStateChanged:(t,n)=>{e(re({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(re({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(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(ie(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:ft,n)),t==="forecast_mode"?(e(Ot({viewMode:"account_group"})),e(Xt(!1,n?.id)),n!=null&&K(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):K(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(re({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Revenues"),e(Ot({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(vn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{e(Sn())},onResyncReports:()=>{e(rt("revenue_by_classes"))}}})(Ae),Ro=e=>{const a=V(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=k(d=>dt(d)),c=s.isForecastModeOn,u=s.timeframe,m=s.selectedForecast?.id,C=k(d=>ct(d.forecastState,m??"")),b=k(d=>Qt(d)).dataAvailable,h=s.mode==="compare_mode",l=k(d=>it(d));return _.useEffect(()=>{if(m!=null&&c===!0&&(K(c,r,m,o),C!=null)){const d=C?.forecastPeriod,p=b!=null&&d.endDate.isAfter(b?.endDate)===!0?b:d;a(te(e.firstMonthOfFY,{startDate:p.endDate.startOf(u),endDate:p?.endDate}))}},[m]),i.jsx(Bo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,isCompareModeOn:h,location:n,navigate:o,forecastIdFromUrlPath:r,analytics:S,reportsResyncFetchState:l.reportsResyncFetchState})},jo=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}},Lo=Z(function(e){const a=An(e),t=e.entityAutoCompleteState.autoCompleteText.navbar,n=X(e,"navbar");return{report:a,analytics:S,autoCompleteData:{autoCompleteText:t,entityAutoCompleteView:n}}},function(e,a){return{onTimeframeSelectionChanged:t=>{S.trackTimeframeSwitch(ua(t),"Top Expenses"),e(ea(t))},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=jo(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const c=me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(c,{state:{pathnameStackToGoBack:u,referrer:"Top Expenses"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(Qn),Mo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e;return i.jsx(Lo,{tenantEmailDomain:a,location:t,navigate:n})},Uo=pt.div`
|
|
14
14
|
display: flex;
|
|
15
15
|
flex: 1 1 auto;
|
|
16
16
|
min-height: 100%;
|
|
17
17
|
flex-direction: column;
|
|
18
18
|
background-color: ${e=>e.theme.colors.grey5};
|
|
19
19
|
align-items: center;
|
|
20
|
-
`,le=3,ft=1;function Yo({fetchState:e,firstMonthOfFY:a,reportId:t,forecastId:n}){const o=q(),r=$(),{tenantEmailDomain:s}=G();let c;const u={firstMonthOfFY:a,tenantEmailDomain:s,location:r,navigate:o,forecastIdFromUrlPath:n,fetchState:e};switch(t){case"operating_expenses":c=i.jsx(Oo,{...u});break;case"revenue":c=i.jsx(Ro,{...u});break;case"net_burn_or_income":c=i.jsx(xo,{...u});break;case"cash_position":c=i.jsx(wo,{...u});break;case"top_expenses":c=i.jsx(Mo,{...u});break;case"cash_in_cash_out":c=i.jsx(vo,{...u});break;default:console.error(`${t} is not supported!`),c=null}return c!=null?i.jsx(Uo,{children:c}):null}function X(){const e=$(),a=V(),{forecastId:t}=G();let n="Not-Started";const o=k(l=>lt(l).fetchState),r=k(l=>dt(l).fetchState),s=k(l=>nt(l).fetchState),c=k(l=>l.cashPositionState.fetchState),u=k(l=>l.topExState.fetchState),m=k(l=>l.cashInCashOutState.fetchState);if(B.getSignedInUser()==null)throw Error("Can't access dashboard detail without signing in...");const C=k(l=>j(l)),b=C?.company?.companyInfo?.firstMonthOfFY??1,h=Yt((l=>{const d=Kt(l,"/").split("/");return t!=null?d[d.length-3]:d[d.length-1]})(e.pathname));switch(h){case"operating_expenses":n=o;break;case"revenue":n=r;break;case"net_burn_or_income":n=s;break;case"cash_position":n=c;break;case"top_expenses":n=u;break;case"cash_in_cash_out":n=m;break;default:console.error(`${h} is not supported!`)}return _.useEffect(()=>{n==="Not-Started"&&function(l,d,p,g){switch(d){case"operating_expenses":l(ra(!0)),g!=null&&(l(ie(p,!0,le,{id:g,index:0})),l(Jt(!1,g)));break;case"revenue":l(sa(!0)),g!=null&&(l(ie(p,!0,le,{id:g,index:0})),l(Qt(!1,g)));break;case"net_burn_or_income":l(oa(!0)),g!=null&&(l(ie(p,!0,le,{id:g,index:0})),l(Zt(!1,g)));break;case"cash_position":l(na(!0));break;case"top_expenses":l(aa());break;case"cash_in_cash_out":l(ta());break;default:throw new Error(`report type ${d} is not yet supported`)}}(a,h,b,t)},[t]),i.jsxs(i.Fragment,{children:[n==="Completed"?i.jsx(ve,{analytics:S,onLoad:l=>((d,p)=>{const g=e.state?.referrer;switch(p){case"operating_expenses":d.trackPageLoaded(Y.Event.operatingExpenses,g);break;case"revenue":d.trackPageLoaded(Y.Event.revenues,g);break;case"net_burn_or_income":d.trackPageLoaded(Y.Event.burnRate,g);break;case"cash_position":d.trackPageLoaded(Y.Event.cashPosition,g);break;case"top_expenses":d.trackPageLoaded(Y.Event.topExpenses,g);break;case"cash_in_cash_out":d.trackPageLoaded(Y.Event.cashInCashOut,g);break;default:console.error(`Analytics: Not tracking Page Loaded for ${p}!`)}})(l,h)}):null,i.jsx(Yo,{firstMonthOfFY:b,fetchState:n,reportId:h,forecastId:t})]})}var qe=typeof navigator<"u"&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function Ze(e,a,t,n){e.addEventListener?e.addEventListener(a,t,n):e.attachEvent&&e.attachEvent("on".concat(a),function(){t(window.event)})}function ha(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 fa(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 gt={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,"-":qe?173:189,"=":qe?61:187,";":qe?59:186,"'":222,"[":219,"]":221,"\\":220},W={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},tt={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},P={16:!1,18:!1,17:!1,91:!1},O={},De=1;De<20;De++)gt["f".concat(De)]=111+De;var T=[],Pt=!1,ga="all",Bt=[],je=function(e){return gt[e.toLowerCase()]||W[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function Rt(e){ga=e||"all"}function be(){return ga||"all"}var He=function(e){var a=e.key,t=e.scope,n=e.method,o=e.splitKey,r=o===void 0?"+":o;fa(a).forEach(function(s){var c=s.split(r),u=c.length,m=c[u-1],C=m==="*"?"*":je(m);if(O[C]){t||(t=be());var b=u>1?ha(W,c):[];O[C]=O[C].filter(function(h){return!((!n||h.method===n)&&h.scope===t&&function(l,d){for(var p=l.length>=d.length?l:d,g=l.length>=d.length?d:l,f=!0,v=0;v<p.length;v++)g.indexOf(p[v])===-1&&(f=!1);return f}(h.mods,b))})}})};function jt(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,P)Object.prototype.hasOwnProperty.call(P,r)&&(!P[r]&&a.mods.indexOf(+r)>-1||P[r]&&a.mods.indexOf(+r)===-1)&&(o=!1);(a.mods.length!==0||P[16]||P[18]||P[17]||P[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 Lt(e,a){var t=O["*"],n=e.keyCode||e.which||e.charCode;if(M.filter.call(this,e)){if(n!==93&&n!==224||(n=91),T.indexOf(n)===-1&&n!==229&&T.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(d){var p=tt[d];e[d]&&T.indexOf(p)===-1?T.push(p):!e[d]&&T.indexOf(p)>-1?T.splice(T.indexOf(p),1):d==="metaKey"&&e[d]&&T.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(T=T.slice(T.indexOf(p))))}),n in P){for(var o in P[n]=!0,W)W[o]===n&&(M[o]=!0);if(!t)return}for(var r in P)Object.prototype.hasOwnProperty.call(P,r)&&(P[r]=e[tt[r]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(T.indexOf(17)===-1&&T.push(17),T.indexOf(18)===-1&&T.push(18),P[17]=!0,P[18]=!0);var s=be();if(t)for(var c=0;c<t.length;c++)t[c].scope===s&&(e.type==="keydown"&&t[c].keydown||e.type==="keyup"&&t[c].keyup)&&jt(e,t[c],s,a);if(n in O){for(var u=0;u<O[n].length;u++)if((e.type==="keydown"&&O[n][u].keydown||e.type==="keyup"&&O[n][u].keyup)&&O[n][u].key){for(var m=O[n][u],C=m.splitKey,b=m.key.split(C),h=[],l=0;l<b.length;l++)h.push(je(b[l]));h.sort().join("")===T.sort().join("")&&jt(e,m,s,a)}}}}function M(e,a,t){T=[];var n=fa(e),o=[],r="all",s=document,c=0,u=!1,m=!0,C="+",b=!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&&(u=a.keyup),a.keydown!==void 0&&(m=a.keydown),a.capture!==void 0&&(b=a.capture),typeof a.splitKey=="string"&&(C=a.splitKey)),typeof a=="string"&&(r=a);c<n.length;c++)o=[],(e=n[c].split(C)).length>1&&(o=ha(W,e)),(e=(e=e[e.length-1])==="*"?"*":je(e))in O||(O[e]=[]),O[e].push({keyup:u,keydown:m,scope:r,mods:o,shortcut:n[c],method:t,key:n[c],splitKey:C,element:s});s!==void 0&&!function(h){return Bt.indexOf(h)>-1}(s)&&window&&(Bt.push(s),Ze(s,"keydown",function(h){Lt(h,s)},b),Pt||(Pt=!0,Ze(window,"focus",function(){T=[]},b)),Ze(s,"keyup",function(h){Lt(h,s),function(l){var d=l.keyCode||l.which||l.charCode,p=T.indexOf(d);if(p>=0&&T.splice(p,1),l.key&&l.key.toLowerCase()==="meta"&&T.splice(0,T.length),d!==93&&d!==224||(d=91),d in P)for(var g in P[d]=!1,W)W[g]===d&&(M[g]=!1)}(h)},b))}var Je={setScope:Rt,getScope:be,deleteScope:function(e,a){var t,n;for(var o in e||(e=be()),O)if(Object.prototype.hasOwnProperty.call(O,o))for(t=O[o],n=0;n<t.length;)t[n].scope===e?t.splice(n,1):n++;be()===e&&Rt(a||"all")},getPressedKeyCodes:function(){return T.slice(0)},isPressed:function(e){return typeof e=="string"&&(e=je(e)),T.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(O).forEach(function(t){var n=O[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(O).forEach(function(s){return delete O[s]});else if(Array.isArray(e))e.forEach(function(s){s.key&&He(s)});else if(typeof e=="object")e.key&&He(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=""),He({key:e,scope:o,method:r,splitKey:"+"})}},keyMap:gt,modifier:W,modifierMap:tt};for(var Xe in Je)Object.prototype.hasOwnProperty.call(Je,Xe)&&(M[Xe]=Je[Xe]);if(typeof window<"u"){var Ko=window.hotkeys;M.noConflict=function(e){return e&&window.hotkeys===M&&(window.hotkeys=Ko),M},window.hotkeys=M}M.filter=function(){return!0};var Mt=function(e,a){var t=e.target,n=t&&t.tagName;return!!(n&&a&&a.includes(n))};function Vo(e,a,t,n){t instanceof Array&&(n=t,t=void 0);var o=t||{},r=o.enableOnTags,s=o.filter,c=o.keyup,u=o.keydown,m=o.filterPreventDefault,C=m===void 0||m,b=o.enabled,h=b===void 0||b,l=o.enableOnContentEditable,d=l!==void 0&&l,p=_.useRef(null),g=_.useCallback(function(f,v){var w,R;return s&&!s(f)?!C:!!(Mt(f,["INPUT","TEXTAREA","SELECT"])&&!Mt(f,r)||(w=f.target)!=null&&w.isContentEditable&&!d)||!!(p.current===null||document.activeElement===p.current||(R=p.current)!=null&&R.contains(document.activeElement))&&(a(f,v),!0)},n?[p,r,s].concat(n):[p,r,s]);return _.useEffect(function(){if(h)return c&&u!==!0&&(t.keydown=!1),M(e,t||{},g),function(){return M.unbind(e,g)};M.unbind(e,g)},[g,e,h]),p}M.isPressed;const No=["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"],Go=(e,a,t,n,o)=>({card:{dimension:ut(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!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}),fe=(e,a,t,n,o)=>({card:{dimension:ut(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1},data:e}),zo=(e,a,t,n)=>fe(void 0,e,ge,a,t),$o=(e,a,t,n,o)=>({card:{dimension:ut(ge),cardType:a,cardIndex:t,fetchState:e,disableAnimations:!1},data:{funds:n,hasUserSeenVideo:o,videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),qo=Z(function(e,a){const t=Jo(a.dashboardReport),n=a.passedCardsOrdered,o=a.dashboardReport.reportsInOrder,{isInterestedInChargeCard:r,cardsCreditLimit:s,cashbackRate:c,treasuryFundDetails:u,hasUserSeenTreasuryVideo:m,treasuryFetchState:C}=a;let b=n.map((h,l)=>{if(h==="reimbursement_promo_card"||h==="bill_pay_promo_card")return zo(t,h,l);if(h==="zeni_promo_card")return fe({isExpressedInterest:r,creditLimit:s,cashbackRate:c,fetchState:"Completed"},a.cardBalanceFetchState,ge,h,l);if(h==="treasury_promo_card")return $o(C,h,l,u,m);if(h==="information_card")return fe(void 0,"Completed",ge,h,l);{const d=o.find(p=>p?.reportId===h);return d?function(p,g,f,v){const w=p.reportId;switch(w){case"card_balance":case"cash_balance":return[Go(p,g,f,w,v)];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[fe(p,g,f,w,v)];case"net_burn_or_income_story_card":return[fe(p,g,f,"net_burn_or_income_story_card",v)];default:return console.error(`card type ${w} not yet supported!`),[]}}(d,d.fetchState,ge,l):[]}}).flat();return a.isSummaryCardsFiltered===!0&&(b=b.filter(h=>No.includes(h.card.cardType)==0).filter(h=>{const l=h.data?.availableNumberOfPeriods;return l!=null?l>0:h.card.cardType!="top_expenses"||h.data==null||function(d){if(d==null||d.length===0)return!0;let p=!0;for(const g of d)if(g.balance.available.amount!==0){p=!1;break}return p}(h.data.topExpenses.accountsOrdered)===!1})),{cardDataArray:b,autoCompleteData:{autoCompleteText:e.entityAutoCompleteState.autoCompleteText.navbar,entityAutoCompleteView:Q(e,"navbar")},analytics:S,isReimbursementEnabled:a.isReimbursementEnabled,isBillPayEnabled:a.isBillPayEnabled}},function(e,a){const t=a.tenantId,n=B.getSignedInUser();return{cardActions:{onCardClick:(o,r,s,c)=>{if(console.warn(`onCardClick at ${o} for the type ${r}`),r==="zeni_promo_card"&&c!=null)S.trackDashboardCardClicked("cards promo",2),S.trackZeniCardsPromoCardClicked(a.isChargeCardFeatureEnabled,c,2,`${n?.firstName??""} ${n?.lastName??""}`,a.isChargeCardFeatureEnabled?a.cardsCreditLimit:void 0),c==="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&&S.trackDashboardCardClicked("rewards promo",o+1),a.navigate("../../rewards/refer",{state:{referrer:s}})):r==="expense_automation_card"?(S.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(c,u,m,C){switch(u){case"card_balance":c(Gt());break;case"cash_balance":c(Vt());break;case"operating_expenses":c(ra(!0));break;case"revenue":c(sa(!0));break;case"net_burn_or_income":c(oa(!0));break;case"net_burn_or_income_story_card":c(Gn(!0));break;case"cash_position":c(na(!0));break;case"top_expenses":c(aa());break;case"cash_in_cash_out":c(ta());break;case"insights_dashboard":c(Nn());break;case"bill_pay_card":c(Vn());break;case"reimbursement_card":c(Kn());break;case"company_details":c(Yn(m));break;case"task_card":c(Un());break;case"accounts_payable_aging":C.includes("accounts_payable_aging")===!1&&c(Qe(de()));break;case"accounts_receivable_aging":c(et(de()));break;case"zeni_accounts_promo_card":C.includes("zeni_accounts_promo_card")===!1&&c(Nt());break;case"rewards_card":C.includes("rewards_card")===!1&&c(Mn(!0));break;default:throw new Error(`report type ${u} is not yet supported`)}}(e,r,a.companyId,s)},onTimeframeChange:(o,r)=>{S.trackTimeframeSwitch(ua(r),Ho(o),"Dashboard"),function(s,c,u){switch(c){case"operating_expenses":case"revenue":case"net_burn_or_income":case"cash_position":s(ue(u));break;case"top_expenses":s(ea(u));break;default:throw new Error(`report type ${c} doesn't support changeTimeframe`)}}(e,o,r)},onUpdateSelectedInsightIndex:o=>{e(Ln(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",c=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c},relative:"path"})}else if(o==="reimbursement_promo_card"){const s="../reimbursements",c=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c},relative:"path"})}else if(o==="zeni_accounts_promo_card")if(a.hasZeniAccountsAdminAccess){let s="../checking/promo";r!=null&&(s=`../checking/${r}`);const c=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c},relative:"path"})}else window.open("https://www.zeni.ai/product/business-checking-accounts","_blank");else if(o==="treasury_promo_card")if(a.isUserHasTreasuryAccess){B.saveTreasuryPopupSeen(a.tenantEmailDomain,!0);const s="../treasury",c=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c},relative:"path"})}else window.open("https://www.zeni.ai/product/treasury","_blank")},onSaveClick:(o,r,s)=>{o==="net_burn_or_income_story_card"&&(S.trackUpdateBurnRateCalculatorSettings(r,s,Rn(s)),e(jn(t,r,s)))},onVideoPlay:()=>{e(Bn())},onVideoClose:()=>{e(Pn())}},autoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(ee({searchString:o,searchOrigin:"navbar"})):o.trim().length===0&&e(z("navbar"))},onCancelAutoComplete:()=>{e(z("navbar"))},onAutoCompleteEntity:o=>{let r="";r=o.type!=="vendor"||o.detailType!=="bank_merchant"&&o.detailType!=="card_merchant"?ae(o,a.tenantEmailDomain):so(o.zeniId,o.qboId,a.tenantEmailDomain);const s=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s,referrer:"Search"}})}}}})(oo);function Zo(){const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=q(),n=V(),o=$(),r=B.getSignedInUser(),{useFeatureGate:s,useDynamicConfig:c}=mt(),u=_e(r),[m,C]=_.useState(!1),[b,h]=_.useState(!1),l=Qn(),{tenantEmailDomain:d}=G(),{isAiCfoAccessEnabled:p,onAskAiCfoClick:g}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"Dashboard"}),f=k(y=>y.tenantState.fetchState==="Completed"||y.tenantState.activeTenantFetchState.fetchState==="Completed"?j(y):void 0),v=f??B.getSignedInUserTenant(d),w=v.tenantId,R=v.companyId;_.useEffect(()=>{m===!1&&o.state?.message==="activation"&&(n(wn(R)),C(!0))},[o.state,m,R,n]),_.useEffect(()=>{l&&!b&&o.state?.message==="open_ai_cfo_drawer"&&(a(!0),h(!0),t(o.pathname,{replace:!0,state:{...o.state,message:void 0}}))},[o.state,b,l,a,t,o.pathname]);const{isFeatureEnabled:A}=s(L.isApAgingFeatureEnabled),{isFeatureEnabled:I}=s(L.isExpenseAutomationEnabled),{isFeatureEnabled:x}=s(L.isExpenseAutomationEnabledV2),E=x||I&&u,{isFeatureEnabled:J}=s(L.isTreasuryEnabled),Le=eo(E),{isFeatureEnabled:bt}=s(L.isArAgingFeatureEnabled),{isFeatureEnabled:Ct}=s(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:_t}=s(L.isReferralFeatureEnabled),{isFeatureEnabled:ba}=s(L.isChargeCardFeatureEnabled),{isFeatureEnabled:Ca}=s(L.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_a}=s(L.isDashboardSidebarNewYearAnimationEnabled),{configValue:kt}=c(to.zeniCardsConfig),ka=kt.charge_card_cashback_rate_per_transaction==null?.0175:kt.charge_card_cashback_rate_per_transaction;if(o.state?.message==="activation"){const y=ao(o.state?.pathnameStackToGoBack);t(o.pathname,{state:{...o.state,message:void 0,pathnameStackToGoBack:y.newStack}})}const[yt,ya]=_.useState(!1),[Me,Sa]=_.useState(!1);Vo("command+p, Control+p",y=>{Sa(!Me),y.preventDefault()},{enableOnContentEditable:!0,enableOnTags:["INPUT","SELECT","TEXTAREA"]},[Me]);const St=f?.externalConnections?.accounting[0]?.isValid;if(r==null)throw Error("Can't access dashboard without signing in...");const ne=k(y=>j(y)?.excludedResources),va=k(y=>y.expenseAutomationViewState.selectedPeriodByTenantId),Ia=!!f?.companyReimbursementInfo?.info?.isReimbursementEnabled,Aa=!!f?.companyBillPayInfo?.info?.isBillPayEnabled,wa=k(y=>y.treasurySetupViewState.treasuryFundsDetails).fetchStatus.fetchState,Ea=f?.company!=null&&En(f.company),Ue=J&&Ea,Ye=Ie(),Ta=at(Ye?.loggedInUserRoleMap),U=[],vt=ne?.resources?.find(y=>y.resource==="/reports/top_expenses")==null,xa=ne?.resources?.find(y=>y.resource==="/reports/task_card")==null,Ke=f?.userRole!=null&&Xt(f?.userRole),Da=ne?.resources?.find(y=>y.resource==="/bills")==null&&!Ke,Fa=ne?.resources?.find(y=>y.resource==="/reimbursements")==null,Oa=Tn(Ye?.loggedInUserRoleMap),Pa=xn(Ye?.loggedInUserRoleMap),Ba=f?.company?.companyChargeCardInfo?.chargeCardsCreditAccountLimit??0,Ra=f?.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,ja=k(y=>y.treasurySetupViewState.treasuryFundsDetails).fundsDetails;vt===!1&&U.push("top_expenses"),xa===!1&&U.push("task_card"),Da===!1&&U.push("bill_pay_card","bill_pay_promo_card"),A===!1&&U.push("accounts_payable_aging"),bt===!1&&U.push("accounts_receivable_aging"),(E===!1||Ke)&&U.push("expense_automation_card"),Fa===!1&&U.push("reimbursement_card","reimbursement_promo_card"),Ct===!1&&U.push("zeni_accounts_promo_card"),_t===!1&&U.push("rewards_card"),Ue===!1&&U.push("treasury_promo_card");const{areTenantIdsInSync:It}=no();_.useLayoutEffect(()=>{yt&&Le===E||St!==!0||!It||ne?.fetchState!=="Completed"&&ne?.fetchState!=="Error"||(ya(!0),n(Dn(r.userId,R,w,!0,!1,U)))},[yt,r,w,n,vt,St,ne?.fetchState,It]);const La=k(y=>y.reportUIOptionsState.forecastOnDashboard.isForecastModeOn),Ma=k(y=>y.revenueState.uiState.selectedForecast?.id),Ua=k(y=>y.cardBalanceState.fetchState),ce=k(y=>Fn(y,U,r,x,I,Ue)),Ya=ce.fetchState;Re({isDataReady:!0});const At=f?.isTreasuryVideoViewed===!0||ce.isTreasuryVideoClosed===!0;return i.jsxs(i.Fragment,{children:[Ya==="Completed"?i.jsx(ve,{analytics:S,onLoad:y=>{y.trackPageLoaded(Y.Event.dashboard),Ue&&!At&&y.trackTreasuryPromoView("Dashboard Promo Video")}}):null,i.jsx(qo,{maxColumns:e?2:void 0,isAiCfoAccessEnabled:p,onAskAiCfoClick:g,onDragAndDropCard:(y,Ka)=>{const wt=function(we,Ve,Ee){const Ne=Ee.indexOf(we),Ge=Ee.indexOf(Ve);if(Ne===-1||Ge===-1||Ne===Ge)return Ee;const ze=[...Ee];return ze.splice(Ne,1),ze.splice(Ge,0,we),ze}(y,Ka,ce.cardsOrdered);wt.some((we,Ve)=>we!==ce.cardsOrdered[Ve])&&n(On(wt))},dashboardReport:ce,passedCardsOrdered:ce.cardsForDashboardUI,tenantId:w,companyId:R,tenantEmailDomain:d,location:o,navigate:t,isApAgingFeatureEnabled:A,isArAgingFeatureEnabled:bt,isBillPayEnabled:Aa,isReimbursementEnabled:Ia,isSummaryCardsFiltered:Me,isForecastOn:La,selectedForecastOnDashboard:Ma,isVisitingFirstTime:m,isZeniAccountEnabled:Ct,isRewardsFeatureEnabled:_t,hasZeniAccountsAdminAccess:Ta,isExpenseAutomationEnabledForUser:E&&Ke===!1,selectedPeriod:va[w],isChargeCardFeatureEnabled:ba,isUserHasCardsAccess:Oa,isUserHasTreasuryAccess:Pa,cardsCreditLimit:Ba,cashbackRate:ka,isInterestedInChargeCard:Ra,cardBalanceFetchState:Ua,christmasAnimationEnabled:Ca,newYearAnimationEnabled:_a,treasuryFundDetails:ja,hasUserSeenTreasuryVideo:At,treasuryFetchState:wa})]})}const Ho=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"},Jo=e=>e.fetchState!=="Error"?e.fetchState:e.reportsInOrder.map(a=>a.fetchState).reduce((a,t)=>a==="In-Progress"||a==="Not-Started"?a:t);function Is(){const e=Ie(),a=e?.excludedResources?.find(m=>m.resource==="/reports/top_expenses")==null,{useFeatureGate:t}=mt(),{isFeatureEnabled:n}=t(L.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(L.isArAgingFeatureEnabled),r=k(m=>j(m)),{isFeatureEnabled:s}=t(L.isDebitCardFeatureEnabled),c=zn(s,r),u=$n(r);return c===!0||u===!0?i.jsx(We,{children:i.jsx(D,{path:"/*",element:i.jsx(co,{})})}):i.jsxs(We,{children:[i.jsx(D,{path:"/",element:i.jsx(Zo,{})}),i.jsx(D,{path:"cash_balance/*",element:i.jsx(Ot,{})}),i.jsx(D,{path:"card_balance/*",element:i.jsx(Ot,{})}),i.jsx(D,{path:"operating_expenses/*",element:i.jsx(X,{})}),i.jsx(D,{path:"operating_expenses/forecast/*",element:i.jsx($e,{})}),i.jsx(D,{path:"revenue/forecast/*",element:i.jsx($e,{})}),i.jsx(D,{path:"revenue/*",element:i.jsx(X,{})}),i.jsx(D,{path:"net_burn_or_income/forecast/*",element:i.jsx($e,{})}),i.jsx(D,{path:"net_burn_or_income/*",element:i.jsx(X,{})}),n===!0&&i.jsxs(i.Fragment,{children:[i.jsx(D,{path:"accounts_payable_aging/*",element:i.jsx(uo,{})}),i.jsx(D,{path:"accounts_payable_aging/:vendorId/:reportDate/*",element:i.jsx(lo,{})})]}),o&&i.jsxs(i.Fragment,{children:[i.jsx(D,{path:"accounts_receivable_aging/:customerId/:reportDate/*",element:i.jsx(mo,{})}),i.jsx(D,{path:"accounts_receivable_aging/*",element:i.jsx(po,{})})]}),i.jsx(D,{path:"cash_position/*",element:i.jsx(X,{})}),i.jsx(D,{path:"top_expenses/*",element:a===!0?i.jsx(X,{}):i.jsx(Ce,{})}),i.jsx(D,{path:"cash_in_cash_out/*",element:i.jsx(X,{})}),i.jsx(D,{path:"company_details",element:i.jsx(ro,{})}),i.jsx(D,{path:"referrals/*",element:i.jsx(io,{})}),i.jsx(D,{path:"*",element:i.jsx(Ce,{})})]})}export{Is as default};
|
|
20
|
+
`,le=3,ft=1;function Yo({fetchState:e,firstMonthOfFY:a,reportId:t,forecastId:n}){const o=q(),r=$(),{tenantEmailDomain:s}=G();let c;const u={firstMonthOfFY:a,tenantEmailDomain:s,location:r,navigate:o,forecastIdFromUrlPath:n,fetchState:e};switch(t){case"operating_expenses":c=i.jsx(Fo,{...u});break;case"revenue":c=i.jsx(Ro,{...u});break;case"net_burn_or_income":c=i.jsx(xo,{...u});break;case"cash_position":c=i.jsx(wo,{...u});break;case"top_expenses":c=i.jsx(Mo,{...u});break;case"cash_in_cash_out":c=i.jsx(vo,{...u});break;default:console.error(`${t} is not supported!`),c=null}return c!=null?i.jsx(Uo,{children:c}):null}function W(){const e=$(),a=V(),{forecastId:t}=G();let n="Not-Started";const o=k(l=>lt(l).fetchState),r=k(l=>dt(l).fetchState),s=k(l=>nt(l).fetchState),c=k(l=>l.cashPositionState.fetchState),u=k(l=>l.topExState.fetchState),m=k(l=>l.cashInCashOutState.fetchState);if(B.getSignedInUser()==null)throw Error("Can't access dashboard detail without signing in...");const C=k(l=>j(l)),b=C?.company?.companyInfo?.firstMonthOfFY??1,h=Yt((l=>{const d=Kt(l,"/").split("/");return t!=null?d[d.length-3]:d[d.length-1]})(e.pathname));switch(h){case"operating_expenses":n=o;break;case"revenue":n=r;break;case"net_burn_or_income":n=s;break;case"cash_position":n=c;break;case"top_expenses":n=u;break;case"cash_in_cash_out":n=m;break;default:console.error(`${h} is not supported!`)}return _.useEffect(()=>{n==="Not-Started"&&function(l,d,p,g){switch(d){case"operating_expenses":l(ra(!0)),g!=null&&(l(ie(p,!0,le,{id:g,index:0})),l(Jt(!1,g)));break;case"revenue":l(sa(!0)),g!=null&&(l(ie(p,!0,le,{id:g,index:0})),l(Xt(!1,g)));break;case"net_burn_or_income":l(oa(!0)),g!=null&&(l(ie(p,!0,le,{id:g,index:0})),l(Zt(!1,g)));break;case"cash_position":l(na(!0));break;case"top_expenses":l(aa());break;case"cash_in_cash_out":l(ta());break;default:throw new Error(`report type ${d} is not yet supported`)}}(a,h,b,t)},[t]),i.jsxs(i.Fragment,{children:[n==="Completed"?i.jsx(ve,{analytics:S,onLoad:l=>((d,p)=>{const g=e.state?.referrer;switch(p){case"operating_expenses":d.trackPageLoaded(Y.Event.operatingExpenses,g);break;case"revenue":d.trackPageLoaded(Y.Event.revenues,g);break;case"net_burn_or_income":d.trackPageLoaded(Y.Event.burnRate,g);break;case"cash_position":d.trackPageLoaded(Y.Event.cashPosition,g);break;case"top_expenses":d.trackPageLoaded(Y.Event.topExpenses,g);break;case"cash_in_cash_out":d.trackPageLoaded(Y.Event.cashInCashOut,g);break;default:console.error(`Analytics: Not tracking Page Loaded for ${p}!`)}})(l,h)}):null,i.jsx(Yo,{firstMonthOfFY:b,fetchState:n,reportId:h,forecastId:t})]})}var qe=typeof navigator<"u"&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function Ze(e,a,t,n){e.addEventListener?e.addEventListener(a,t,n):e.attachEvent&&e.attachEvent("on".concat(a),function(){t(window.event)})}function ha(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 fa(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 gt={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,"-":qe?173:189,"=":qe?61:187,";":qe?59:186,"'":222,"[":219,"]":221,"\\":220},Q={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},tt={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},P={16:!1,18:!1,17:!1,91:!1},F={},De=1;De<20;De++)gt["f".concat(De)]=111+De;var T=[],Pt=!1,ga="all",Bt=[],je=function(e){return gt[e.toLowerCase()]||Q[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function Rt(e){ga=e||"all"}function be(){return ga||"all"}var He=function(e){var a=e.key,t=e.scope,n=e.method,o=e.splitKey,r=o===void 0?"+":o;fa(a).forEach(function(s){var c=s.split(r),u=c.length,m=c[u-1],C=m==="*"?"*":je(m);if(F[C]){t||(t=be());var b=u>1?ha(Q,c):[];F[C]=F[C].filter(function(h){return!((!n||h.method===n)&&h.scope===t&&function(l,d){for(var p=l.length>=d.length?l:d,g=l.length>=d.length?d:l,f=!0,v=0;v<p.length;v++)g.indexOf(p[v])===-1&&(f=!1);return f}(h.mods,b))})}})};function jt(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,P)Object.prototype.hasOwnProperty.call(P,r)&&(!P[r]&&a.mods.indexOf(+r)>-1||P[r]&&a.mods.indexOf(+r)===-1)&&(o=!1);(a.mods.length!==0||P[16]||P[18]||P[17]||P[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 Lt(e,a){var t=F["*"],n=e.keyCode||e.which||e.charCode;if(M.filter.call(this,e)){if(n!==93&&n!==224||(n=91),T.indexOf(n)===-1&&n!==229&&T.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(d){var p=tt[d];e[d]&&T.indexOf(p)===-1?T.push(p):!e[d]&&T.indexOf(p)>-1?T.splice(T.indexOf(p),1):d==="metaKey"&&e[d]&&T.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(T=T.slice(T.indexOf(p))))}),n in P){for(var o in P[n]=!0,Q)Q[o]===n&&(M[o]=!0);if(!t)return}for(var r in P)Object.prototype.hasOwnProperty.call(P,r)&&(P[r]=e[tt[r]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(T.indexOf(17)===-1&&T.push(17),T.indexOf(18)===-1&&T.push(18),P[17]=!0,P[18]=!0);var s=be();if(t)for(var c=0;c<t.length;c++)t[c].scope===s&&(e.type==="keydown"&&t[c].keydown||e.type==="keyup"&&t[c].keyup)&&jt(e,t[c],s,a);if(n in F){for(var u=0;u<F[n].length;u++)if((e.type==="keydown"&&F[n][u].keydown||e.type==="keyup"&&F[n][u].keyup)&&F[n][u].key){for(var m=F[n][u],C=m.splitKey,b=m.key.split(C),h=[],l=0;l<b.length;l++)h.push(je(b[l]));h.sort().join("")===T.sort().join("")&&jt(e,m,s,a)}}}}function M(e,a,t){T=[];var n=fa(e),o=[],r="all",s=document,c=0,u=!1,m=!0,C="+",b=!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&&(u=a.keyup),a.keydown!==void 0&&(m=a.keydown),a.capture!==void 0&&(b=a.capture),typeof a.splitKey=="string"&&(C=a.splitKey)),typeof a=="string"&&(r=a);c<n.length;c++)o=[],(e=n[c].split(C)).length>1&&(o=ha(Q,e)),(e=(e=e[e.length-1])==="*"?"*":je(e))in F||(F[e]=[]),F[e].push({keyup:u,keydown:m,scope:r,mods:o,shortcut:n[c],method:t,key:n[c],splitKey:C,element:s});s!==void 0&&!function(h){return Bt.indexOf(h)>-1}(s)&&window&&(Bt.push(s),Ze(s,"keydown",function(h){Lt(h,s)},b),Pt||(Pt=!0,Ze(window,"focus",function(){T=[]},b)),Ze(s,"keyup",function(h){Lt(h,s),function(l){var d=l.keyCode||l.which||l.charCode,p=T.indexOf(d);if(p>=0&&T.splice(p,1),l.key&&l.key.toLowerCase()==="meta"&&T.splice(0,T.length),d!==93&&d!==224||(d=91),d in P)for(var g in P[d]=!1,Q)Q[g]===d&&(M[g]=!1)}(h)},b))}var Je={setScope:Rt,getScope:be,deleteScope:function(e,a){var t,n;for(var o in e||(e=be()),F)if(Object.prototype.hasOwnProperty.call(F,o))for(t=F[o],n=0;n<t.length;)t[n].scope===e?t.splice(n,1):n++;be()===e&&Rt(a||"all")},getPressedKeyCodes:function(){return T.slice(0)},isPressed:function(e){return typeof e=="string"&&(e=je(e)),T.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(F).forEach(function(t){var n=F[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(F).forEach(function(s){return delete F[s]});else if(Array.isArray(e))e.forEach(function(s){s.key&&He(s)});else if(typeof e=="object")e.key&&He(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=""),He({key:e,scope:o,method:r,splitKey:"+"})}},keyMap:gt,modifier:Q,modifierMap:tt};for(var We in Je)Object.prototype.hasOwnProperty.call(Je,We)&&(M[We]=Je[We]);if(typeof window<"u"){var Ko=window.hotkeys;M.noConflict=function(e){return e&&window.hotkeys===M&&(window.hotkeys=Ko),M},window.hotkeys=M}M.filter=function(){return!0};var Mt=function(e,a){var t=e.target,n=t&&t.tagName;return!!(n&&a&&a.includes(n))};function Vo(e,a,t,n){t instanceof Array&&(n=t,t=void 0);var o=t||{},r=o.enableOnTags,s=o.filter,c=o.keyup,u=o.keydown,m=o.filterPreventDefault,C=m===void 0||m,b=o.enabled,h=b===void 0||b,l=o.enableOnContentEditable,d=l!==void 0&&l,p=_.useRef(null),g=_.useCallback(function(f,v){var w,R;return s&&!s(f)?!C:!!(Mt(f,["INPUT","TEXTAREA","SELECT"])&&!Mt(f,r)||(w=f.target)!=null&&w.isContentEditable&&!d)||!!(p.current===null||document.activeElement===p.current||(R=p.current)!=null&&R.contains(document.activeElement))&&(a(f,v),!0)},n?[p,r,s].concat(n):[p,r,s]);return _.useEffect(function(){if(h)return c&&u!==!0&&(t.keydown=!1),M(e,t||{},g),function(){return M.unbind(e,g)};M.unbind(e,g)},[g,e,h]),p}M.isPressed;const No=["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"],Go=(e,a,t,n,o)=>({card:{dimension:ut(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!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}),fe=(e,a,t,n,o)=>({card:{dimension:ut(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1},data:e}),zo=(e,a,t,n)=>fe(void 0,e,ge,a,t),$o=(e,a,t,n,o)=>({card:{dimension:ut(ge),cardType:a,cardIndex:t,fetchState:e,disableAnimations:!1},data:{funds:n,hasUserSeenVideo:o,videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),qo=Z(function(e,a){const t=Jo(a.dashboardReport),n=a.passedCardsOrdered,o=a.dashboardReport.reportsInOrder,{isInterestedInChargeCard:r,cardsCreditLimit:s,cashbackRate:c,treasuryFundDetails:u,hasUserSeenTreasuryVideo:m,treasuryFetchState:C}=a;let b=n.map((h,l)=>{if(h==="reimbursement_promo_card"||h==="bill_pay_promo_card")return zo(t,h,l);if(h==="zeni_promo_card")return fe({isExpressedInterest:r,creditLimit:s,cashbackRate:c,fetchState:"Completed"},a.cardBalanceFetchState,ge,h,l);if(h==="treasury_promo_card")return $o(C,h,l,u,m);if(h==="information_card")return fe(void 0,"Completed",ge,h,l);{const d=o.find(p=>p?.reportId===h);return d?function(p,g,f,v){const w=p.reportId;switch(w){case"card_balance":case"cash_balance":return[Go(p,g,f,w,v)];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[fe(p,g,f,w,v)];case"net_burn_or_income_story_card":return[fe(p,g,f,"net_burn_or_income_story_card",v)];default:return console.error(`card type ${w} not yet supported!`),[]}}(d,d.fetchState,ge,l):[]}}).flat();return a.isSummaryCardsFiltered===!0&&(b=b.filter(h=>No.includes(h.card.cardType)==0).filter(h=>{const l=h.data?.availableNumberOfPeriods;return l!=null?l>0:h.card.cardType!="top_expenses"||h.data==null||function(d){if(d==null||d.length===0)return!0;let p=!0;for(const g of d)if(g.balance.available.amount!==0){p=!1;break}return p}(h.data.topExpenses.accountsOrdered)===!1})),{cardDataArray:b,autoCompleteData:{autoCompleteText:e.entityAutoCompleteState.autoCompleteText.navbar,entityAutoCompleteView:X(e,"navbar")},analytics:S,isReimbursementEnabled:a.isReimbursementEnabled,isBillPayEnabled:a.isBillPayEnabled}},function(e,a){const t=a.tenantId,n=B.getSignedInUser();return{cardActions:{onCardClick:(o,r,s,c)=>{if(console.warn(`onCardClick at ${o} for the type ${r}`),r==="zeni_promo_card"&&c!=null)S.trackDashboardCardClicked("cards promo",2),S.trackZeniCardsPromoCardClicked(a.isChargeCardFeatureEnabled,c,2,`${n?.firstName??""} ${n?.lastName??""}`,a.isChargeCardFeatureEnabled?a.cardsCreditLimit:void 0),c==="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&&S.trackDashboardCardClicked("rewards promo",o+1),a.navigate("../../rewards/refer",{state:{referrer:s}})):r==="expense_automation_card"?(S.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(c,u,m,C){switch(u){case"card_balance":c(Gt());break;case"cash_balance":c(Vt());break;case"operating_expenses":c(ra(!0));break;case"revenue":c(sa(!0));break;case"net_burn_or_income":c(oa(!0));break;case"net_burn_or_income_story_card":c(Gn(!0));break;case"cash_position":c(na(!0));break;case"top_expenses":c(aa());break;case"cash_in_cash_out":c(ta());break;case"insights_dashboard":c(Nn());break;case"bill_pay_card":c(Vn());break;case"reimbursement_card":c(Kn());break;case"company_details":c(Yn(m));break;case"task_card":c(Un());break;case"accounts_payable_aging":C.includes("accounts_payable_aging")===!1&&c(Xe(de()));break;case"accounts_receivable_aging":c(et(de()));break;case"zeni_accounts_promo_card":C.includes("zeni_accounts_promo_card")===!1&&c(Nt());break;case"rewards_card":C.includes("rewards_card")===!1&&c(Mn(!0));break;default:throw new Error(`report type ${u} is not yet supported`)}}(e,r,a.companyId,s)},onTimeframeChange:(o,r)=>{S.trackTimeframeSwitch(ua(r),Ho(o),"Dashboard"),function(s,c,u){switch(c){case"operating_expenses":case"revenue":case"net_burn_or_income":case"cash_position":s(ue(u));break;case"top_expenses":s(ea(u));break;default:throw new Error(`report type ${c} doesn't support changeTimeframe`)}}(e,o,r)},onUpdateSelectedInsightIndex:o=>{e(Ln(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",c=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c},relative:"path"})}else if(o==="reimbursement_promo_card"){const s="../reimbursements",c=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c},relative:"path"})}else if(o==="zeni_accounts_promo_card")if(a.hasZeniAccountsAdminAccess){let s="../checking/promo";r!=null&&(s=`../checking/${r}`);const c=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c},relative:"path"})}else window.open("https://www.zeni.ai/product/business-checking-accounts","_blank");else if(o==="treasury_promo_card")if(a.isUserHasTreasuryAccess){B.saveTreasuryPopupSeen(a.tenantEmailDomain,!0);const s="../treasury",c=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c},relative:"path"})}else window.open("https://www.zeni.ai/product/treasury","_blank")},onSaveClick:(o,r,s)=>{o==="net_burn_or_income_story_card"&&(S.trackUpdateBurnRateCalculatorSettings(r,s,Rn(s)),e(jn(t,r,s)))},onVideoPlay:()=>{e(Bn())},onVideoClose:()=>{e(Pn())}},autoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(ee({searchString:o,searchOrigin:"navbar"})):o.trim().length===0&&e(z("navbar"))},onCancelAutoComplete:()=>{e(z("navbar"))},onAutoCompleteEntity:o=>{let r="";r=o.type!=="vendor"||o.detailType!=="bank_merchant"&&o.detailType!=="card_merchant"?ae(o,a.tenantEmailDomain):so(o.zeniId,o.qboId,a.tenantEmailDomain);const s=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s,referrer:"Search"}})}}}})(oo);function Zo(){const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=q(),n=V(),o=$(),r=B.getSignedInUser(),{useFeatureGate:s,useDynamicConfig:c}=mt(),u=_e(r),[m,C]=_.useState(!1),[b,h]=_.useState(!1),l=Xn(),{tenantEmailDomain:d}=G(),{isAiCfoAccessEnabled:p,onAskAiCfoClick:g}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"Dashboard"}),f=k(y=>y.tenantState.fetchState==="Completed"||y.tenantState.activeTenantFetchState.fetchState==="Completed"?j(y):void 0),v=f??B.getSignedInUserTenant(d),w=v.tenantId,R=v.companyId;_.useEffect(()=>{m===!1&&o.state?.message==="activation"&&(n(wn(R)),C(!0))},[o.state,m,R,n]),_.useEffect(()=>{l&&!b&&o.state?.message==="open_ai_cfo_drawer"&&(a(!0),h(!0),t(o.pathname,{replace:!0,state:{...o.state,message:void 0}}))},[o.state,b,l,a,t,o.pathname]);const{isFeatureEnabled:A}=s(L.isApAgingFeatureEnabled),{isFeatureEnabled:I}=s(L.isExpenseAutomationEnabled),{isFeatureEnabled:x}=s(L.isExpenseAutomationEnabledV2),E=x||I&&u,{isFeatureEnabled:J}=s(L.isTreasuryEnabled),Le=eo(E),{isFeatureEnabled:bt}=s(L.isArAgingFeatureEnabled),{isFeatureEnabled:Ct}=s(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:_t}=s(L.isReferralFeatureEnabled),{isFeatureEnabled:ba}=s(L.isChargeCardFeatureEnabled),{isFeatureEnabled:Ca}=s(L.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_a}=s(L.isDashboardSidebarNewYearAnimationEnabled),{configValue:kt}=c(to.zeniCardsConfig),ka=kt.charge_card_cashback_rate_per_transaction==null?.0175:kt.charge_card_cashback_rate_per_transaction;if(o.state?.message==="activation"){const y=ao(o.state?.pathnameStackToGoBack);t(o.pathname,{state:{...o.state,message:void 0,pathnameStackToGoBack:y.newStack}})}const[yt,ya]=_.useState(!1),[Me,Sa]=_.useState(!1);Vo("command+p, Control+p",y=>{Sa(!Me),y.preventDefault()},{enableOnContentEditable:!0,enableOnTags:["INPUT","SELECT","TEXTAREA"]},[Me]);const St=f?.externalConnections?.accounting[0]?.isValid;if(r==null)throw Error("Can't access dashboard without signing in...");const ne=k(y=>j(y)?.excludedResources),va=k(y=>y.expenseAutomationViewState.selectedPeriodByTenantId),Ia=!!f?.companyReimbursementInfo?.info?.isReimbursementEnabled,Aa=!!f?.companyBillPayInfo?.info?.isBillPayEnabled,wa=k(y=>y.treasurySetupViewState.treasuryFundsDetails).fetchStatus.fetchState,Ea=f?.company!=null&&En(f.company),Ue=J&&Ea,Ye=Ie(),Ta=at(Ye?.loggedInUserRoleMap),U=[],vt=ne?.resources?.find(y=>y.resource==="/reports/top_expenses")==null,xa=ne?.resources?.find(y=>y.resource==="/reports/task_card")==null,Ke=f?.userRole!=null&&Wt(f?.userRole),Da=ne?.resources?.find(y=>y.resource==="/bills")==null&&!Ke,Oa=ne?.resources?.find(y=>y.resource==="/reimbursements")==null,Fa=Tn(Ye?.loggedInUserRoleMap),Pa=xn(Ye?.loggedInUserRoleMap),Ba=f?.company?.companyChargeCardInfo?.chargeCardsCreditAccountLimit??0,Ra=f?.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,ja=k(y=>y.treasurySetupViewState.treasuryFundsDetails).fundsDetails;vt===!1&&U.push("top_expenses"),xa===!1&&U.push("task_card"),Da===!1&&U.push("bill_pay_card","bill_pay_promo_card"),A===!1&&U.push("accounts_payable_aging"),bt===!1&&U.push("accounts_receivable_aging"),(E===!1||Ke)&&U.push("expense_automation_card"),Oa===!1&&U.push("reimbursement_card","reimbursement_promo_card"),Ct===!1&&U.push("zeni_accounts_promo_card"),_t===!1&&U.push("rewards_card"),Ue===!1&&U.push("treasury_promo_card");const{areTenantIdsInSync:It}=no();_.useLayoutEffect(()=>{yt&&Le===E||St!==!0||!It||ne?.fetchState!=="Completed"&&ne?.fetchState!=="Error"||(ya(!0),n(Dn(r.userId,R,w,!0,!1,U)))},[yt,r,w,n,vt,St,ne?.fetchState,It]);const La=k(y=>y.reportUIOptionsState.forecastOnDashboard.isForecastModeOn),Ma=k(y=>y.revenueState.uiState.selectedForecast?.id),Ua=k(y=>y.cardBalanceState.fetchState),ce=k(y=>On(y,U,r,x,I,Ue)),Ya=ce.fetchState;Re({isDataReady:!0});const At=f?.isTreasuryVideoViewed===!0||ce.isTreasuryVideoClosed===!0;return i.jsxs(i.Fragment,{children:[Ya==="Completed"?i.jsx(ve,{analytics:S,onLoad:y=>{y.trackPageLoaded(Y.Event.dashboard),Ue&&!At&&y.trackTreasuryPromoView("Dashboard Promo Video")}}):null,i.jsx(qo,{maxColumns:e?2:void 0,isAiCfoAccessEnabled:p,onAskAiCfoClick:g,onDragAndDropCard:(y,Ka)=>{const wt=function(we,Ve,Ee){const Ne=Ee.indexOf(we),Ge=Ee.indexOf(Ve);if(Ne===-1||Ge===-1||Ne===Ge)return Ee;const ze=[...Ee];return ze.splice(Ne,1),ze.splice(Ge,0,we),ze}(y,Ka,ce.cardsOrdered);wt.some((we,Ve)=>we!==ce.cardsOrdered[Ve])&&n(Fn(wt))},dashboardReport:ce,passedCardsOrdered:ce.cardsForDashboardUI,tenantId:w,companyId:R,tenantEmailDomain:d,location:o,navigate:t,isApAgingFeatureEnabled:A,isArAgingFeatureEnabled:bt,isBillPayEnabled:Aa,isReimbursementEnabled:Ia,isSummaryCardsFiltered:Me,isForecastOn:La,selectedForecastOnDashboard:Ma,isVisitingFirstTime:m,isZeniAccountEnabled:Ct,isRewardsFeatureEnabled:_t,hasZeniAccountsAdminAccess:Ta,isExpenseAutomationEnabledForUser:E&&Ke===!1,selectedPeriod:va[w],isChargeCardFeatureEnabled:ba,isUserHasCardsAccess:Fa,isUserHasTreasuryAccess:Pa,cardsCreditLimit:Ba,cashbackRate:ka,isInterestedInChargeCard:Ra,cardBalanceFetchState:Ua,christmasAnimationEnabled:Ca,newYearAnimationEnabled:_a,treasuryFundDetails:ja,hasUserSeenTreasuryVideo:At,treasuryFetchState:wa})]})}const Ho=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"},Jo=e=>e.fetchState!=="Error"?e.fetchState:e.reportsInOrder.map(a=>a.fetchState).reduce((a,t)=>a==="In-Progress"||a==="Not-Started"?a:t);function Is(){const e=Ie(),a=e?.excludedResources?.find(m=>m.resource==="/reports/top_expenses")==null,{useFeatureGate:t}=mt(),{isFeatureEnabled:n}=t(L.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(L.isArAgingFeatureEnabled),r=k(m=>j(m)),{isFeatureEnabled:s}=t(L.isDebitCardFeatureEnabled),c=zn(s,r),u=$n(r);return c===!0||u===!0?i.jsx(Qe,{children:i.jsx(D,{path:"/*",element:i.jsx(co,{})})}):i.jsxs(Qe,{children:[i.jsx(D,{path:"/",element:i.jsx(Zo,{})}),i.jsx(D,{path:"cash_balance/*",element:i.jsx(Ft,{})}),i.jsx(D,{path:"card_balance/*",element:i.jsx(Ft,{})}),i.jsx(D,{path:"operating_expenses/*",element:i.jsx(W,{})}),i.jsx(D,{path:"operating_expenses/forecast/*",element:i.jsx($e,{})}),i.jsx(D,{path:"revenue/forecast/*",element:i.jsx($e,{})}),i.jsx(D,{path:"revenue/*",element:i.jsx(W,{})}),i.jsx(D,{path:"net_burn_or_income/forecast/*",element:i.jsx($e,{})}),i.jsx(D,{path:"net_burn_or_income/*",element:i.jsx(W,{})}),n===!0&&i.jsxs(i.Fragment,{children:[i.jsx(D,{path:"accounts_payable_aging/*",element:i.jsx(uo,{})}),i.jsx(D,{path:"accounts_payable_aging/:vendorId/:reportDate/*",element:i.jsx(lo,{})})]}),o&&i.jsxs(i.Fragment,{children:[i.jsx(D,{path:"accounts_receivable_aging/:customerId/:reportDate/*",element:i.jsx(mo,{})}),i.jsx(D,{path:"accounts_receivable_aging/*",element:i.jsx(po,{})})]}),i.jsx(D,{path:"cash_position/*",element:i.jsx(W,{})}),i.jsx(D,{path:"top_expenses/*",element:a===!0?i.jsx(W,{}):i.jsx(Ce,{})}),i.jsx(D,{path:"cash_in_cash_out/*",element:i.jsx(W,{})}),i.jsx(D,{path:"company_details",element:i.jsx(ro,{})}),i.jsx(D,{path:"referrals/*",element:i.jsx(io,{})}),i.jsx(D,{path:"*",element:i.jsx(Ce,{})})]})}export{Is as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-
|
|
1
|
+
import{j as v}from"./liveblocks-it_Rhm8-.js";import{a as u}from"./sentry-C-hGmJ4T.js";import{h as y,g as b,k as w,u as A,N as k}from"./core-BF8mCLAO.js";import{Ib as N,eM as _,fi as U,Ic as L,mh as R,Id as z}from"./zeni-epic-state-Ds1G4QGX.js";import{u as O,z as h,L as T,t as S,O as $,b as j}from"./index-Drj6C88E.js";import"./mui-B87RTrAV.js";import{t as P}from"./getLocaleForTenant-BZ9xLliJ.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.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]="20ea8c61-1a72-44ea-8ece-a88d3bca98ac",t._sentryDebugIdIdentifier="sentry-dbid-20ea8c61-1a72-44ea-8ece-a88d3bca98ac")}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:f}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=f.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,I=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,I=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=j(c,p);return v.jsx(k,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:I}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=O(),f=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(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=h.getSignedInUser();return u.useLayoutEffect(()=>{const e=h.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,f.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!f.current||a!=="Completed"&&a!=="Error"||(f.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=h.getActiveTenantForUser()?.tenantId;f.current===!1&&d!=null&&e!=null&&S.shouldFetchActiveTenant(e)&&(f.current=!0,S.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=h.getSignedInUser(),g=h.getActiveTenantForUser()?.tenantId,I=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&I&&S.shouldFetchAllTenants()&&(r.current=!0,S.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{h.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(h.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!h.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||($.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const q=["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"],G={"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 q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{j as l}from"./liveblocks-it_Rhm8-.js";import{j as w,u as C,g as h,k as A,l as V}from"./core-BF8mCLAO.js";import{M9 as k,Mg as _,fz as J,fy as K,fx as L,ii as W,Jh as q,pr as Q,eM as B,LH as D,ig as T,Ma as S,Mj as F,id as G,iC as j}from"./zeni-epic-state-Ds1G4QGX.js";import{bj as X,K as R,s as N,z as U,h as M,p,d as v,r as z,bk as Y,o as H,bl as ee,n as te}from"./index-Drj6C88E.js";import{n as O}from"./mui-B87RTrAV.js";import"./sentry-C-hGmJ4T.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]="0b6810dd-89a9-4e24-9ac8-a95116402453",e._sentryDebugIdIdentifier="sentry-dbid-0b6810dd-89a9-4e24-9ac8-a95116402453")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(L(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(X);function Z({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(d=>k(d,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100vh;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
`,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),d=s.poppedPathname??P();n(d,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(F({data:d}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),d=s.poppedPathname??P(0);t.navigate(d,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:d}=V(),c=e??s,{useFeatureGate:r}=N(),i=U.getSignedInUser(),b=h(u=>B(u)),g=M(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(Z,{vendorId:c,billId:d}),l.jsx(oe,{location:a,navigate:n,billId:d,vendorId:c,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},E=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return E(e,"ach",t,n)}function ve(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=O.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
height: 100vh;
|
|
12
|
+
width: 100%;
|
|
13
|
+
flex: 1 1 auto;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: center;
|
|
16
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
+
box-shadow: ${e=>`0px 2px ${H.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
+
`,de=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:d}=t,{tenantEmailDomain:c}=d;return{onFetchBankName:r=>{e(j(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(F({data:i}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),i=r.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(c,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:d}=V(),c=e??s,r=U.getSignedInUser(),{useFeatureGate:i}=N(),b=M(),g=h(u=>B(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${H.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(Z,{vendorId:c,billId:d}),l.jsx(de,{location:a,navigate:n,billId:d,vendorId:c,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,Z as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as d}from"./liveblocks-it_Rhm8-.js";import{K as c,A as l,h as f}from"./index-Drj6C88E.js";import{D as p}from"./mui-B87RTrAV.js";import"./sentry-C-hGmJ4T.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]="2fa64745-7920-402f-ba89-c26a2e8cc932",e._sentryDebugIdIdentifier="sentry-dbid-2fa64745-7920-402f-ba89-c26a2e8cc932")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=c(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),i=f();return d.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-it_Rhm8-.js";import{a as d}from"./sentry-C-hGmJ4T.js";import{j as A,h as B,u as J,l as N,g as l,N as q,k as F,n as M,o as O}from"./core-BF8mCLAO.js";import{Ko as _,eM as K,JN as R,km as W,Gv as k,Kt as Y,Jg as $,jm as z,Gw as P,JS as V,JT as H,Ji as L,Jh as Q}from"./zeni-epic-state-Ds1G4QGX.js";import{aM as U,e as X,p as Z,n as tt}from"./index-Drj6C88E.js";import"./mui-B87RTrAV.js";import{d as S}from"./decodeURIComponentSafe-BogCAdat.js";import{w as et}from"./withTransactionSidePanel-DTDtCDdY.js";import{e as at,b as nt}from"./routePaths-Cqx2U__X.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";import"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import"./TransactionDetailScreen-CbyG0n1m.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]="b6eb3dcb-12a8-42d1-b40b-27e795e7302f",a._sentryDebugIdIdentifier="sentry-dbid-b6eb3dcb-12a8-42d1-b40b-27e795e7302f")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:z(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(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(H()),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(P(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(P(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=J(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:w}=N(),r=S(j??""),p=S(w??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),G=l(n=>K(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(W(i)))},[m,u,i]);const b=l(n=>n.trendState.fetchState),E=f?.selectedPeriod?.timePeriod??D,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,D);return d.useEffect(()=>{m===!0&&h===!1&&b==="Completed"&&(g(!0),E!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))},[m,h,b]),u?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:I(x.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 wt({entityType:a}){return s.jsx(M,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
|