@zeniai/web-app-ui 5.4.14-dev → 5.4.14-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/assets/{AccountMappingScreen-BZk8jrAP.js → AccountMappingScreen-C10r8FT4.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-DdqC6TYo.js → ActualMatchingMatchDetailScreen-DmpwVVlK.js} +1 -1
  3. package/dist/assets/{AddressRoutes-DZnn8xs0.js → AddressRoutes-BDOBooPT.js} +1 -1
  4. package/dist/assets/{AddressScreen-DpzckL13.js → AddressScreen-DNA1AoN1.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-BuC0DF7-.js → AiCfoScreen-DnjoSm7p.js} +1 -1
  6. package/dist/assets/{AppDrawer-BnkAekbe.js → AppDrawer-BCLUj3se.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-2Q-AgKCr.js → BillPayApprovalRoutes-C6bRRPwn.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-CV19o_tt.js → BillPayRoutes-Bt2WWtCK.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-NPjj2cPM.js → BusinessVerificationPageScreen-Bfd5tr2J.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-CadRu1yE.js → CardsAiCfoScreen-CDRimZMa.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-BRNnHx29.js → ChargeCardRoutes-CQ3YhqOL.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-d_xThxF-.js → CompanyPassportScreen-Bfc4Y68n.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-B-GQ_uXR.js → ConnectionAuthScreen-CMlReMJa.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-Dv-djr6z.js → CustomerOnboardingAuthScreen-DBUn_LFI.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-KQwdDIjg.js → CustomerOnboardingRoutes-6-pJPoxK.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-VCRBM_Lo.js → DashboardRoutes-DJSbRVCa.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-Bnjp4uin.js → DefaultTenantHome-NUU8WaVG.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-FhF-Oy51.js → DomesticWireDetailScreen-DWmkYeuk.js} +1 -1
  19. package/dist/assets/{DrawerScreen-DOVfIfbY.js → DrawerScreen-A-8KPbEP.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-BKu8bIme.js → EntityDetailRoutes-BmBeh8BN.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-C-dPVJak.js → ExpenseAutomationRoutes-CS0uneJ0.js} +1 -1
  22. package/dist/assets/{FallBackRoute-BsefzYi4.js → FallBackRoute-jaHJLYeL.js} +2 -2
  23. package/dist/assets/{FeaturePreviewScreen-CEvvSUOY.js → FeaturePreviewScreen-5EZY4ymu.js} +1 -1
  24. package/dist/assets/{HubSpotOAuthCallbackScreen-BRLjqcM8.js → HubSpotOAuthCallbackScreen-CBmVs8ym.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-Cn0ho2Ac.js → InvoicingRoutes-hwg79esy.js} +1 -1
  26. package/dist/assets/{MagicLinkRoutes-DETheAv8.js → MagicLinkRoutes-EigZsZN-.js} +1 -1
  27. package/dist/assets/{MagicLinkSignInScreen-hwNEJu9D.js → MagicLinkSignInScreen-BcBLnsBu.js} +1 -1
  28. package/dist/assets/{MobileAppDrawer-YElMwyTk.js → MobileAppDrawer-BBfUxZ3Z.js} +1 -1
  29. package/dist/assets/{NotFoundScreen-DD1ftXbM.js → NotFoundScreen-DghvMtNI.js} +1 -1
  30. package/dist/assets/{NotificationRoutes-j31qfFA3.js → NotificationRoutes-dIn5lLFo.js} +1 -1
  31. package/dist/assets/{OAuthConsentScreen-CQV1J_Nj.js → OAuthConsentScreen-BK9COtW9.js} +1 -1
  32. package/dist/assets/{PandLWithForecastRoutes-CUitXoy8.js → PandLWithForecastRoutes-Dl1UJVvN.js} +1 -1
  33. package/dist/assets/{PaymentLinkScreen-B77tcNGP.js → PaymentLinkScreen-BLMCnNfo.js} +1 -1
  34. package/dist/assets/{PeopleRoutes-BbZuMgKW.js → PeopleRoutes-DUMXIx_K.js} +1 -1
  35. package/dist/assets/{PerformanceRoutes-D6iGCdx1.js → PerformanceRoutes-DCK_siQo.js} +1 -1
  36. package/dist/assets/{QBOConnectionScreen-DdhMvyre.js → QBOConnectionScreen-DZ38il0m.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRoutes-lGHZV1sd.js → ReimbursementApprovalRoutes-BNnHI223.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CtdOG2XT.js → ReimbursementApprovalRuleDetailScreen-B4jqTz0j.js} +1 -1
  39. package/dist/assets/{ReimbursementRoutes-DjGiFO3h.js → ReimbursementRoutes-DuTeQGc-.js} +1 -1
  40. package/dist/assets/{ReportsRoutes-DNhWXb3T.js → ReportsRoutes-BdGXf5ZW.js} +1 -1
  41. package/dist/assets/{RewardsRoutes-C0czxWPN.js → RewardsRoutes-BvWFhZRc.js} +1 -1
  42. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-CkM33AZC.js → ScheduleDetailsPrepaidExpensesScreen-gxx2-EFd.js} +1 -1
  43. package/dist/assets/{ScreenRoutes-DYGYxgwA.js → ScreenRoutes-DsU2m2B_.js} +2 -2
  44. package/dist/assets/{SettingsRoutes-DRSU5I7g.js → SettingsRoutes-rivgMg4F.js} +1 -1
  45. package/dist/assets/{SetupPagesScreen-CfUfKDWM.js → SetupPagesScreen-D34F2few.js} +1 -1
  46. package/dist/assets/{SignInScreen-DDQ1e38Q.js → SignInScreen-JCm-eqte.js} +1 -1
  47. package/dist/assets/{SignOutScreen-CmYRhks4.js → SignOutScreen-CRiK0OGZ.js} +1 -1
  48. package/dist/assets/{TaskListScreen-D8jqZbNF.js → TaskListScreen-bLM4yBPa.js} +1 -1
  49. package/dist/assets/{TaskRoutes-Cu7kReic.js → TaskRoutes-wI7rPjq5.js} +1 -1
  50. package/dist/assets/{TransactionDetailRoutes-B7AzD4hg.js → TransactionDetailRoutes-zKd3AnPd.js} +1 -1
  51. package/dist/assets/{TransactionDetailScreen-CpvJY1a3.js → TransactionDetailScreen-CzMYbtKa.js} +1 -1
  52. package/dist/assets/{TransactionListRoutes-BejbKDzL.js → TransactionListRoutes-DuGhQU2Q.js} +1 -1
  53. package/dist/assets/{TreasuryRoutes-DTax48Tc.js → TreasuryRoutes-I94VefD1.js} +1 -1
  54. package/dist/assets/{VendorsRoutes-DWNg-EPe.js → VendorsRoutes-CogcroEr.js} +1 -1
  55. package/dist/assets/{WiseConfirmationScreen-C4KbEpAc.js → WiseConfirmationScreen-DHFsDzmW.js} +1 -1
  56. package/dist/assets/{ZeniAccountRoutes-BI00gqox.js → ZeniAccountRoutes-Bt30AIgn.js} +1 -1
  57. package/dist/assets/{ZeniAccountStatementScreen-BUg2sDXI.js → ZeniAccountStatementScreen-DPCVgpTe.js} +1 -1
  58. package/dist/assets/{analyticsHelper-DcUdLdtd.js → analyticsHelper-DXk7k3Sg.js} +1 -1
  59. package/dist/assets/{getLocaleForTenant-CSUvt8Gt.js → getLocaleForTenant-Bdg31N9b.js} +1 -1
  60. package/dist/assets/{index-zmOdoQIt.js → index-C9gDoiPZ.js} +6 -6
  61. package/dist/assets/{routePaths-RxstHRDw.js → routePaths-Qo9PrkRx.js} +1 -1
  62. package/dist/assets/{useActualMatchingMatchDetail-Dr6cKA7B.js → useActualMatchingMatchDetail-D3PMymJ7.js} +1 -1
  63. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CC8PIy8S.js → useAiCfoDashboardSuggestedQuestionsChips-DsRKu7db.js} +1 -1
  64. package/dist/assets/{useAskAiCfoHostNavButtonProps-Bl76c5H-.js → useAskAiCfoHostNavButtonProps-Dn-NLDsa.js} +1 -1
  65. package/dist/assets/{useChargeCardPusherEvents-C6oeFa4_.js → useChargeCardPusherEvents-HTI-Gpv-.js} +1 -1
  66. package/dist/assets/{useEmailConnectResultRefresh-nv6tTKw5.js → useEmailConnectResultRefresh-C9tQTK1g.js} +1 -1
  67. package/dist/assets/{useInitialThreadRequest-DqCJRXyQ.js → useInitialThreadRequest-UNqcV9yZ.js} +1 -1
  68. package/dist/assets/{useTaskManagerAccess-DhT542co.js → useTaskManagerAccess-CiHwVHGW.js} +1 -1
  69. package/dist/assets/{useTaskManagerPusherEvents-B9F1i19u.js → useTaskManagerPusherEvents-B7K0XRHM.js} +1 -1
  70. package/dist/assets/{withTransactionSidePanel-BaaDGWl5.js → withTransactionSidePanel-BclYopZI.js} +1 -1
  71. package/dist/index.html +1 -1
  72. package/package.json +1 -1
@@ -1 +1 @@
1
- import{j as m}from"./liveblocks-CM1vcHN_.js";import{a as g}from"./sentry-Bh68thgn.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-Cc1CwF93.js";import{z as C,aZ as F,a9 as P,e as V,U as j,D as N,bf as L,af as A,bg as U,v as B}from"./index-zmOdoQIt.js";import{fI as v,gL as M,C8 as _,gG as G,c7 as R,YE as Y,bm as z,vc as Z,v0 as H,mK as K,oj as S,YF as $,bE as q,cv as D,ou as J,oE as Q}from"./zeni-epic-state-DFhlE0W3.js";import"./mui-ehyt9jca.js";import{d as W}from"./routePaths-RxstHRDw.js";import{M as X}from"./MobileAppDrawer-YElMwyTk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="ec12d7ef-67f2-411c-803d-0a23d9ca73f5",t._sentryDebugIdIdentifier="sentry-dbid-ec12d7ef-67f2-411c-803d-0a23d9ca73f5")}catch{}})();const ee=E((function(t){const a=G(t),i=C.getSignedInUser(),l=v(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(l?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Y(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(t,a){const{companyId:i,currentTenant:l,navigate:c,location:p}=a,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{t(Q())},onAddressClick:e=>{const n=W(f,e),o=B(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,b={companyInfo:{...n,website:u!=""&&u!=null?D(u):void 0,meetingLink:y!=""&&y!=null?D(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?q(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};t(S({companyDetails:b}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{t($(e))},onCompanyOfficerUpdated:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{t(K({files:e}))},onDeleteFile:e=>{t(H(e))},onEditFileName:(e,n)=>{t(Z(e,n.split(".")[0]))}}}))(L);function de(){const t=w(),a=x(),i=T(),{tenantEmailDomain:l}=k(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),n=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>v(s))),d=r.companyId??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(p(!0),a(M(d)))}),[c,n,d,a]),g.useEffect((()=>{o==="Not-Started"&&a(_())}),[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,N(i)?"Settings":"Company Passport")}),N(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:N(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
1
+ import{j as m}from"./liveblocks-CM1vcHN_.js";import{a as g}from"./sentry-Bh68thgn.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-Cc1CwF93.js";import{z as C,aZ as F,a9 as P,e as V,U as j,D as N,bf as L,af as A,bg as U,v as B}from"./index-C9gDoiPZ.js";import{fI as v,gL as M,C8 as _,gG as G,c7 as R,YE as Y,bm as z,vc as Z,v0 as H,mK as K,oj as S,YF as $,bE as q,cv as D,ou as J,oE as Q}from"./zeni-epic-state-DFhlE0W3.js";import"./mui-ehyt9jca.js";import{d as W}from"./routePaths-Qo9PrkRx.js";import{M as X}from"./MobileAppDrawer-BBfUxZ3Z.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="ec12d7ef-67f2-411c-803d-0a23d9ca73f5",t._sentryDebugIdIdentifier="sentry-dbid-ec12d7ef-67f2-411c-803d-0a23d9ca73f5")}catch{}})();const ee=E((function(t){const a=G(t),i=C.getSignedInUser(),l=v(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(l?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Y(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(t,a){const{companyId:i,currentTenant:l,navigate:c,location:p}=a,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{t(Q())},onAddressClick:e=>{const n=W(f,e),o=B(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,b={companyInfo:{...n,website:u!=""&&u!=null?D(u):void 0,meetingLink:y!=""&&y!=null?D(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?q(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};t(S({companyDetails:b}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{t($(e))},onCompanyOfficerUpdated:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{t(K({files:e}))},onDeleteFile:e=>{t(H(e))},onEditFileName:(e,n)=>{t(Z(e,n.split(".")[0]))}}}))(L);function de(){const t=w(),a=x(),i=T(),{tenantEmailDomain:l}=k(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),n=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>v(s))),d=r.companyId??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(p(!0),a(M(d)))}),[c,n,d,a]),g.useEffect((()=>{o==="Not-Started"&&a(_())}),[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,N(i)?"Settings":"Company Passport")}),N(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:N(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-CM1vcHN_.js";import{a as o}from"./sentry-Bh68thgn.js";import{u as F,h as L,g as H,j as C,N as w}from"./core-Cc1CwF93.js";import{UN as q,fI as z,go as G,hd as V,gP as A,gn as Q,gl as B,V6 as J,gk as O}from"./zeni-epic-state-DFhlE0W3.js";import{u as K,z as E,c as T,G as M,R as W}from"./index-zmOdoQIt.js";import{n as X}from"./mui-ehyt9jca.js";import{P as h,a as _}from"./AccountMappingScreen-BZk8jrAP.js";import{t as Y}from"./getLocaleForTenant-CSUvt8Gt.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-DdhMvyre.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./MobileAppDrawer-YElMwyTk.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-DhT542co.js";import"./accountMappingHelper-DPBaxZAX.js";import"./empty-DhAh77JM.js";import"./pdf-lib-kwPPw7gn.js";import"./index-BJ8vYoNR.js";import"./url-DqRIAQ9M.js";import"./index-foi_vl2g.js";import"./decodeURIComponentSafe-BhSMetwg.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="3896c829-54d6-4583-9ede-fc4aa93b4aca",t._sentryDebugIdIdentifier="sentry-dbid-3896c829-54d6-4583-9ede-fc4aa93b4aca")}catch{}})();const te=X.div`
1
+ import{j as I}from"./liveblocks-CM1vcHN_.js";import{a as o}from"./sentry-Bh68thgn.js";import{u as F,h as L,g as H,j as C,N as w}from"./core-Cc1CwF93.js";import{UN as q,fI as z,go as G,hd as V,gP as A,gn as Q,gl as B,V6 as J,gk as O}from"./zeni-epic-state-DFhlE0W3.js";import{u as K,z as E,c as T,G as M,R as W}from"./index-C9gDoiPZ.js";import{n as X}from"./mui-ehyt9jca.js";import{P as h,a as _}from"./AccountMappingScreen-C10r8FT4.js";import{t as Y}from"./getLocaleForTenant-Bdg31N9b.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-DZ38il0m.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./MobileAppDrawer-BBfUxZ3Z.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-CiHwVHGW.js";import"./accountMappingHelper-DPBaxZAX.js";import"./empty-DhAh77JM.js";import"./pdf-lib-kwPPw7gn.js";import"./index-BJ8vYoNR.js";import"./url-DqRIAQ9M.js";import"./index-foi_vl2g.js";import"./decodeURIComponentSafe-BhSMetwg.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="3896c829-54d6-4583-9ede-fc4aa93b4aca",t._sentryDebugIdIdentifier="sentry-dbid-3896c829-54d6-4583-9ede-fc4aa93b4aca")}catch{}})();const te=X.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  flex-direction: row;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-CM1vcHN_.js";import{z as m}from"./index-zmOdoQIt.js";import{g as n}from"./QBOConnectionScreen-DdhMvyre.js";import"./sentry-Bh68thgn.js";import{g as p,N as a}from"./core-Cc1CwF93.js";import"./zeni-epic-state-DFhlE0W3.js";import"./recharts-tLFME7sM.js";import"./mui-ehyt9jca.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./empty-DhAh77JM.js";import"./pdf-lib-kwPPw7gn.js";import"./index-BJ8vYoNR.js";import"./url-DqRIAQ9M.js";import"./index-foi_vl2g.js";import"./decodeURIComponentSafe-BhSMetwg.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]="ebd28598-e6ad-49c0-9fdb-a537e411a6fc",t._sentryDebugIdIdentifier="sentry-dbid-ebd28598-e6ad-49c0-9fdb-a537e411a6fc")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
1
+ import{j as i}from"./liveblocks-CM1vcHN_.js";import{z as m}from"./index-C9gDoiPZ.js";import{g as n}from"./QBOConnectionScreen-DZ38il0m.js";import"./sentry-Bh68thgn.js";import{g as p,N as a}from"./core-Cc1CwF93.js";import"./zeni-epic-state-DFhlE0W3.js";import"./recharts-tLFME7sM.js";import"./mui-ehyt9jca.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./empty-DhAh77JM.js";import"./pdf-lib-kwPPw7gn.js";import"./index-BJ8vYoNR.js";import"./url-DqRIAQ9M.js";import"./index-foi_vl2g.js";import"./decodeURIComponentSafe-BhSMetwg.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]="ebd28598-e6ad-49c0-9fdb-a537e411a6fc",t._sentryDebugIdIdentifier="sentry-dbid-ebd28598-e6ad-49c0-9fdb-a537e411a6fc")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-CM1vcHN_.js";import{t as wn,A as $e}from"./AddressScreen-DpzckL13.js";import An from"./NotFoundScreen-DD1ftXbM.js";import{a as d,x as Me}from"./sentry-Bh68thgn.js";import{h as _e,g as Te,u as se,i as xe,j as E,N as Q,q as Pn,l as cn,n as Dn,o as Y}from"./core-Cc1CwF93.js";import{fI as X,eq as Ee,ep as we,bp as jn,V2 as Fn,bR as Bn,q3 as Vn,BU as Un,BX as Rn,a1Y as Ln,a1Z as Nn,lF as Oe,lI as dn,a1h as Gn,d$ as $n,c7 as fe,Cm as Ae,C7 as Mn,a1_ as me,Cn as un,Tc as Qn,mS as ln,d2 as pn,Yd as Kn,Ye as zn,uV as qn,Vm as he,i4 as Yn,Vl as be,i1 as Hn,GT as Zn,uZ as Jn,hV as Wn,hY as Qe,a1$ as mn,a1b as Xn,MJ as et,a1c as nt,MN as tt,B_ as at,Ya as ot,Yb as st,lD as rt,lG as it,Cz as ct,C9 as gn,Cl as dt,bE as Ke,cv as ut,Cy as ze,vc as lt,v0 as pt,mK as mt,gJ as gt,gI as ft,gH as yt,a20 as Ct,C1 as ht,CA as bt,CD as St,CG as It,CM as kt,d3 as Ot}from"./zeni-epic-state-DFhlE0W3.js";import{z,p as Pe,b as J,f as vt,v as q,a9 as re,e as g,dm as _t,az as fn,a2 as Tt,k as yn,V as Cn,s as W,_ as ge,U as ve,dn as xt,R as qe,I as Ye,af as Et,bg as He,dp as wt,dq as At}from"./index-zmOdoQIt.js";import{n as De}from"./mui-ehyt9jca.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-DdhMvyre.js";import{u as jt,a as Ft}from"./useEmailConnectResultRefresh-nv6tTKw5.js";import{u as Bt}from"./useChargeCardPusherEvents-C6oeFa4_.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./empty-DhAh77JM.js";import"./pdf-lib-kwPPw7gn.js";import"./index-BJ8vYoNR.js";import"./url-DqRIAQ9M.js";import"./index-foi_vl2g.js";import"./decodeURIComponentSafe-BhSMetwg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="d2ab4910-bb01-4188-95c4-fec66393833a",e._sentryDebugIdIdentifier="sentry-dbid-d2ab4910-bb01-4188-95c4-fec66393833a")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vt=()=>{const e=_e(),l=Te(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:h}=t(J.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(J.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(J.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(J.isDebitCardFeatureEnabled),k=vt(),O=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,B=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,C=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),T=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),C===!1&&D.push("task_card"),T===!1&&D.push("bill_pay_card","bill_pay_promo_card"),x===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=E((S=>{const V=[];h===!1&&V.push("accounts_payable_aging"),a===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const H=Fn(S,V);return Bn(H.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Vn(n.userId,B,O.tenantId,!0,!1,D)))}),[o,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),G=d.useCallback((()=>{j.current||(j.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout(G,6e3);return()=>clearTimeout(S)}),[G]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||G()}),[u,f,m,b,G]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Ze(L?.businessVerified?.status),isKycDone:Ze(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],Je=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},We=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((o=>[o.key,o])));return l.every((o=>i.get(o)?.status==="ready"))},Xe=De.div`
1
+ import{j as s}from"./liveblocks-CM1vcHN_.js";import{t as wn,A as $e}from"./AddressScreen-DNA1AoN1.js";import An from"./NotFoundScreen-DghvMtNI.js";import{a as d,x as Me}from"./sentry-Bh68thgn.js";import{h as _e,g as Te,u as se,i as xe,j as E,N as Q,q as Pn,l as cn,n as Dn,o as Y}from"./core-Cc1CwF93.js";import{fI as X,eq as Ee,ep as we,bp as jn,V2 as Fn,bR as Bn,q3 as Vn,BU as Un,BX as Rn,a1Y as Ln,a1Z as Nn,lF as Oe,lI as dn,a1h as Gn,d$ as $n,c7 as fe,Cm as Ae,C7 as Mn,a1_ as me,Cn as un,Tc as Qn,mS as ln,d2 as pn,Yd as Kn,Ye as zn,uV as qn,Vm as he,i4 as Yn,Vl as be,i1 as Hn,GT as Zn,uZ as Jn,hV as Wn,hY as Qe,a1$ as mn,a1b as Xn,MJ as et,a1c as nt,MN as tt,B_ as at,Ya as ot,Yb as st,lD as rt,lG as it,Cz as ct,C9 as gn,Cl as dt,bE as Ke,cv as ut,Cy as ze,vc as lt,v0 as pt,mK as mt,gJ as gt,gI as ft,gH as yt,a20 as Ct,C1 as ht,CA as bt,CD as St,CG as It,CM as kt,d3 as Ot}from"./zeni-epic-state-DFhlE0W3.js";import{z,p as Pe,b as J,f as vt,v as q,a9 as re,e as g,dm as _t,az as fn,a2 as Tt,k as yn,V as Cn,s as W,_ as ge,U as ve,dn as xt,R as qe,I as Ye,af as Et,bg as He,dp as wt,dq as At}from"./index-C9gDoiPZ.js";import{n as De}from"./mui-ehyt9jca.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-DZ38il0m.js";import{u as jt,a as Ft}from"./useEmailConnectResultRefresh-C9tQTK1g.js";import{u as Bt}from"./useChargeCardPusherEvents-HTI-Gpv-.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./empty-DhAh77JM.js";import"./pdf-lib-kwPPw7gn.js";import"./index-BJ8vYoNR.js";import"./url-DqRIAQ9M.js";import"./index-foi_vl2g.js";import"./decodeURIComponentSafe-BhSMetwg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="d2ab4910-bb01-4188-95c4-fec66393833a",e._sentryDebugIdIdentifier="sentry-dbid-d2ab4910-bb01-4188-95c4-fec66393833a")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vt=()=>{const e=_e(),l=Te(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:h}=t(J.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(J.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(J.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(J.isDebitCardFeatureEnabled),k=vt(),O=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,B=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,C=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),T=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),C===!1&&D.push("task_card"),T===!1&&D.push("bill_pay_card","bill_pay_promo_card"),x===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=E((S=>{const V=[];h===!1&&V.push("accounts_payable_aging"),a===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const H=Fn(S,V);return Bn(H.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Vn(n.userId,B,O.tenantId,!0,!1,D)))}),[o,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),G=d.useCallback((()=>{j.current||(j.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout(G,6e3);return()=>clearTimeout(S)}),[G]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||G()}),[u,f,m,b,G]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Ze(L?.businessVerified?.status),isKycDone:Ze(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],Je=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},We=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((o=>[o.key,o])));return l.every((o=>i.get(o)?.status==="ready"))},Xe=De.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  background-color: ${e=>e.theme.colors.grey4};
@@ -1,4 +1,4 @@
1
- import{j as d}from"./liveblocks-CM1vcHN_.js";import{i as Q,j as S,g as J,u as K,h as ee,l as se,k as fa,n as _t,o as F,N as On}from"./core-Cc1CwF93.js";import{fI as L,Vt as at,bE as q,bv as xe,Vu as Tn,kl as wn,Vv as Zt,Vw as xn,ko as kt,Vx as Je,Vy as Pn,kt as Fn,Vz as Xt,VA as Rn,kx as yt,VB as et,VC as Bn,VD as jn,VE as Mn,lz as Vn,VF as Ln,bm as nt,VG as ha,VH as he,bc as ga,lN as Ca,lw as ba,VI as ge,VJ as oe,fH as Sa,gd as Un,gt as At,VK as Yn,VL as Gn,VM as _a,l$ as Et,VN as Le,d0 as Ue,EH as Nn,VO as De,EA as Ye,EB as Ge,E_ as Pe,EU as Ce,EF as Ne,VP as Wn,d$ as We,VQ as zn,VR as qn,VS as ka,m4 as It,EI as Kn,VT as Oe,VU as $n,ei as ot,AH as ya,VV as Qn,VW as Aa,VX as Hn,VY as Zn,VZ as Xn,V_ as Dt,V$ as Ot,ur as Fe,ma as Re,q7 as Tt,EL as Jn,W0 as le,F8 as wt,AO as eo,AV as to,W1 as ao,W2 as no,EC as Jt,W3 as oo,AK as Te,AF as va,W4 as ea,W5 as so,W6 as xt,W7 as Pt,CR as Ea,W8 as ro,W9 as Ia,Wa as io,Wb as co,Wc as lo,Wd as Ft,q5 as Rt,EK as uo,We as de,D4 as mo,Db as po,Wf as fo,Wg as ho,EE as ta,Wh as go,CP as Da,Wi as aa,Wj as Co,bp as Oa,Fd as Ta,Wk as bo,Wl as wa,Wm as So,Wn as _o,Wo as ko,Wp as Bt,q6 as jt,EJ as yo,Wq as ue,F5 as Ao,F7 as vo,Wr as Eo,Ws as Io,ED as na,Wt as Do,Fb as xa,Wu as oa,Wv as Oo,Ww as To,Wx as Pa,q9 as Fa,Cc as wo,ed as xo,q3 as Po,V2 as Fo,qj as Ro,Wy as Bo,Wz as jo,WA as Mo,b5 as Mt,qd as Vo,ip as Lo,gL as Uo,qc as Yo,lp as Go,qa as No,q8 as Wo,eq as zo,ep as qo}from"./zeni-epic-state-DFhlE0W3.js";import{z as U,aj as re,v as R,e as O,G as H,ak as Ko,al as ze,a9 as qe,am as Ra,U as W,an as $o,ao as Ba,ap as Qo,aq as Ho,j as ja,a2 as Ma,a as Va,ar as Zo,as as Xo,at as Jo,p as be,au as La,J as me,av as Ua,aw as Ya,ax as Ga,ay as es,az as Ke,b as M,V as $e,aA as ts,L as as,aB as ns,f as os,s as ss,a5 as rs,aC as is,aD as cs,aE as ls,aF as ds,aG as we}from"./index-zmOdoQIt.js";import{u as us,n as Vt}from"./mui-ehyt9jca.js";import{a as C}from"./sentry-Bh68thgn.js";import{w as Na}from"./withTransactionSidePanel-BaaDGWl5.js";import{t as Wa,a as Be,e as Se,b as Lt,c as Ut,v as ms}from"./routePaths-RxstHRDw.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-Bl76c5H-.js";import Ve from"./NotFoundScreen-DD1ftXbM.js";import{t as st}from"./reportTimeframe-DX5pHUc_.js";import{u as Yt}from"./useInitialThreadRequest-DqCJRXyQ.js";import{t as za}from"./analyticsHelper-DcUdLdtd.js";import{C as ps}from"./CompanyPassportScreen-d_xThxF-.js";import{u as fs}from"./useAiCfoDashboardSuggestedQuestionsChips-CC8PIy8S.js";import{F as hs}from"./FeaturePreviewScreen-CEvvSUOY.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./TransactionDetailScreen-CpvJY1a3.js";import"./decodeURIComponentSafe-BhSMetwg.js";import"./expenseAutomationHelper-CCv2kRkH.js";import"./stripSplatSuffix-B0jus2nC.js";import"./MobileAppDrawer-YElMwyTk.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-DhT542co.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]="327cf87f-3abd-433b-9699-49020b4084f2",e._sentryDebugIdIdentifier="sentry-dbid-327cf87f-3abd-433b-9699-49020b4084f2")}catch{}})();const gs=Na((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=Q(),s=U.getSignedInUser(),i=S((D=>D.tenantState.currentTenantId)),c=S((D=>L(D))),{tenantEmailDomain:m}=Q(),u=J(),p=c?.companyName??"",h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=C.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),f=C.useMemo((()=>r!=null?q(r):xe()),[r]),b=K(),g=ee(),k=S((D=>Tn(D,f,o))),E=C.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&b(wn(o,f))}),[f]),A=C.useCallback((()=>{g("../../",{relative:"path"})}),[]),_=C.useCallback(((D,w)=>{b(Zt({sortKey:D,sortOrder:w}))}),[]),x=C.useCallback((D=>{b(Zt({downloadState:D}))}),[]),Y=C.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(m!=null){const w=Wa({id:D.transactionId,type:D.transactionType},m);g(w);const y=R(u.state?.pathnameStackToGoBack,u.pathname);g(w,{state:{pathnameStackToGoBack:y}})}}),[m,e]),I=C.useCallback((()=>{k.vendor!=null&&O.trackApAgingDetail("AP Aging",f.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,f]);return C.useEffect((()=>{E()}),[]),C.useEffect((()=>{k.fetchState==="Completed"&&I()}),[I,k.fetchState]),d.jsx(Ko,{apAgingDetail:k,downloadParams:l,reportDate:f,analytics:O,onTransactionClick:Y,onReload:E,onBackClick:A,onColumnSortConfigChanged:_,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Cs=()=>{const e=K(),a=ee(),t=S((_=>xn(_))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AP Aging"});ze({isDataReady:t.fetchState==="Completed"});const r=U.getSignedInUser(),s=S((_=>_.tenantState.currentTenantId)),i=S((_=>L(_))),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},u=C.useMemo((()=>({authParams:m,companyName:c,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),p=t.apAgingUIState.selectedDate??xe(),h=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(kt(p))}),[]);C.useEffect((()=>{h()}),[]);const l=C.useCallback((()=>{a("../",{relative:"path"})}),[]),f=C.useCallback((_=>{e(Je({searchString:_}))}),[]),b=C.useCallback(((_,x)=>{e(Je({sortKey:x,sortOrder:_}))}),[]),g=C.useCallback((_=>{a(`./${_}/${p.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),k=C.useCallback((_=>{e(Je({downloadState:_}))}),[]),E=C.useCallback(((_,x)=>{}),[]),A=C.useCallback(((_,x)=>{e(Je({selectedDate:_,agingDateSelectionType:x})),e(kt(_))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(qe,{analytics:O,onLoad:_=>_.trackPageLoaded(W.Event.agingReport,"AP Aging")}):null,d.jsx(Ra,{uiState:t.apAgingUIState,report:t,downloadParams:u,analytics:O,onReloadReport:h,onBackClick:l,onSearchTextChange:f,onSortOrderChange:b,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},bs=Na((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=Q(),s=U.getSignedInUser(),i=S((I=>L(I))),{tenantEmailDomain:c}=Q(),m=J(),u=i.companyName,p={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},h=C.useMemo((()=>({authParams:p,companyName:u,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),l=C.useMemo((()=>r!=null?q(r):xe()),[r]),f=K(),b=ee(),g=S((I=>Pn(I,l,o))),k=C.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&f(Fn(o,l))}),[l]),E=C.useCallback((()=>{b("../../",{relative:"path"})}),[]),A=C.useCallback(((I,D)=>{f(Xt({sortKey:I,sortOrder:D}))}),[]),_=C.useCallback((I=>{f(Xt({downloadState:I}))}),[]),x=C.useCallback((I=>{if(e)e(I.transactionId,I.transactionType);else if(c!=null){const D=Wa({id:I.transactionId,type:I.transactionType},c);b(D);const w=R(m.state?.pathnameStackToGoBack,m.pathname);b(D,{state:{pathnameStackToGoBack:w}})}}),[c,e]),Y=C.useCallback((()=>{g.customer!=null&&O.trackArAgingDetail("AR Aging",l.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,l]);return C.useEffect((()=>{k()}),[]),C.useEffect((()=>{g.fetchState==="Completed"&&Y()}),[g.fetchState,Y]),d.jsx($o,{arAgingDetail:g,downloadParams:h,reportDate:l,analytics:O,onTransactionClick:x,onReload:k,onBackClick:E,onColumnSortConfigChanged:A,updateDownloadStateHandler:_,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Ss=()=>{const e=K(),a=ee(),t=S((A=>Rn(A))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AR Aging"});ze({isDataReady:t.fetchState==="Completed"});const r=U.getSignedInUser(),s=S((A=>L(A))),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=C.useMemo((()=>({authParams:c,companyName:i,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),u=t.arAgingUIState.selectedDate??xe(),p=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(yt(u))}),[]);C.useEffect((()=>{p()}),[]);const h=C.useCallback((()=>{a("../",{relative:"path"})}),[]),l=C.useCallback((A=>{e(et({searchString:A}))}),[]),f=C.useCallback(((A,_)=>{e(et({sortKey:_,sortOrder:A}))}),[]),b=C.useCallback((A=>{a(`./${A}/${u.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[u]),g=C.useCallback((A=>{e(et({downloadState:A}))}),[]),k=C.useCallback(((A,_)=>{e(et({selectedDate:A,agingDateSelectionType:_})),e(yt(A))}),[]),E=C.useCallback(((A,_)=>{e(Bn({nodeId:A,isCollapsed:_}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(qe,{analytics:O,onLoad:A=>A.trackPageLoaded(W.Event.agingReport,"AR Aging")}):null,d.jsx(Ra,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:O,onReloadReport:p,onBackClick:h,onSearchTextChange:l,onSortOrderChange:f,onEntityNameClick:b,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},qa=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ka(e,a){const t=Mn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Be(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=R(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Vn(n,o))}}}const _s=se((function(e){const a=jn(e).accountsInOrder.map(((t,n)=>qa(t,n)));return{sectionTitle:H.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:O}}),Ka)(Ba),ks=se((function(e){const a=Ln(e).accountsInOrder.map(((o,r)=>qa(o,r))),t=U.getSignedInUser(),n=nt(t);return{sectionTitle:H.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:O}}),Ka)(Ba);function ys(){const e=ee(),a=J(),{tenantEmailDomain:t}=Q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Ve,{}):d.jsx(_s,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function As(){const e=ee(),a=J(),{tenantEmailDomain:t}=Q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Ve,{}):d.jsx(ks,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const vs=Vt.div`
1
+ import{j as d}from"./liveblocks-CM1vcHN_.js";import{i as Q,j as S,g as J,u as K,h as ee,l as se,k as fa,n as _t,o as F,N as On}from"./core-Cc1CwF93.js";import{fI as L,Vt as at,bE as q,bv as xe,Vu as Tn,kl as wn,Vv as Zt,Vw as xn,ko as kt,Vx as Je,Vy as Pn,kt as Fn,Vz as Xt,VA as Rn,kx as yt,VB as et,VC as Bn,VD as jn,VE as Mn,lz as Vn,VF as Ln,bm as nt,VG as ha,VH as he,bc as ga,lN as Ca,lw as ba,VI as ge,VJ as oe,fH as Sa,gd as Un,gt as At,VK as Yn,VL as Gn,VM as _a,l$ as Et,VN as Le,d0 as Ue,EH as Nn,VO as De,EA as Ye,EB as Ge,E_ as Pe,EU as Ce,EF as Ne,VP as Wn,d$ as We,VQ as zn,VR as qn,VS as ka,m4 as It,EI as Kn,VT as Oe,VU as $n,ei as ot,AH as ya,VV as Qn,VW as Aa,VX as Hn,VY as Zn,VZ as Xn,V_ as Dt,V$ as Ot,ur as Fe,ma as Re,q7 as Tt,EL as Jn,W0 as le,F8 as wt,AO as eo,AV as to,W1 as ao,W2 as no,EC as Jt,W3 as oo,AK as Te,AF as va,W4 as ea,W5 as so,W6 as xt,W7 as Pt,CR as Ea,W8 as ro,W9 as Ia,Wa as io,Wb as co,Wc as lo,Wd as Ft,q5 as Rt,EK as uo,We as de,D4 as mo,Db as po,Wf as fo,Wg as ho,EE as ta,Wh as go,CP as Da,Wi as aa,Wj as Co,bp as Oa,Fd as Ta,Wk as bo,Wl as wa,Wm as So,Wn as _o,Wo as ko,Wp as Bt,q6 as jt,EJ as yo,Wq as ue,F5 as Ao,F7 as vo,Wr as Eo,Ws as Io,ED as na,Wt as Do,Fb as xa,Wu as oa,Wv as Oo,Ww as To,Wx as Pa,q9 as Fa,Cc as wo,ed as xo,q3 as Po,V2 as Fo,qj as Ro,Wy as Bo,Wz as jo,WA as Mo,b5 as Mt,qd as Vo,ip as Lo,gL as Uo,qc as Yo,lp as Go,qa as No,q8 as Wo,eq as zo,ep as qo}from"./zeni-epic-state-DFhlE0W3.js";import{z as U,aj as re,v as R,e as O,G as H,ak as Ko,al as ze,a9 as qe,am as Ra,U as W,an as $o,ao as Ba,ap as Qo,aq as Ho,j as ja,a2 as Ma,a as Va,ar as Zo,as as Xo,at as Jo,p as be,au as La,J as me,av as Ua,aw as Ya,ax as Ga,ay as es,az as Ke,b as M,V as $e,aA as ts,L as as,aB as ns,f as os,s as ss,a5 as rs,aC as is,aD as cs,aE as ls,aF as ds,aG as we}from"./index-C9gDoiPZ.js";import{u as us,n as Vt}from"./mui-ehyt9jca.js";import{a as C}from"./sentry-Bh68thgn.js";import{w as Na}from"./withTransactionSidePanel-BclYopZI.js";import{t as Wa,a as Be,e as Se,b as Lt,c as Ut,v as ms}from"./routePaths-Qo9PrkRx.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-Dn-NLDsa.js";import Ve from"./NotFoundScreen-DghvMtNI.js";import{t as st}from"./reportTimeframe-DX5pHUc_.js";import{u as Yt}from"./useInitialThreadRequest-UNqcV9yZ.js";import{t as za}from"./analyticsHelper-DXk7k3Sg.js";import{C as ps}from"./CompanyPassportScreen-Bfc4Y68n.js";import{u as fs}from"./useAiCfoDashboardSuggestedQuestionsChips-DsRKu7db.js";import{F as hs}from"./FeaturePreviewScreen-5EZY4ymu.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./TransactionDetailScreen-CzMYbtKa.js";import"./decodeURIComponentSafe-BhSMetwg.js";import"./expenseAutomationHelper-CCv2kRkH.js";import"./stripSplatSuffix-B0jus2nC.js";import"./MobileAppDrawer-BBfUxZ3Z.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-CiHwVHGW.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]="327cf87f-3abd-433b-9699-49020b4084f2",e._sentryDebugIdIdentifier="sentry-dbid-327cf87f-3abd-433b-9699-49020b4084f2")}catch{}})();const gs=Na((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=Q(),s=U.getSignedInUser(),i=S((D=>D.tenantState.currentTenantId)),c=S((D=>L(D))),{tenantEmailDomain:m}=Q(),u=J(),p=c?.companyName??"",h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=C.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),f=C.useMemo((()=>r!=null?q(r):xe()),[r]),b=K(),g=ee(),k=S((D=>Tn(D,f,o))),E=C.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&b(wn(o,f))}),[f]),A=C.useCallback((()=>{g("../../",{relative:"path"})}),[]),_=C.useCallback(((D,w)=>{b(Zt({sortKey:D,sortOrder:w}))}),[]),x=C.useCallback((D=>{b(Zt({downloadState:D}))}),[]),Y=C.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(m!=null){const w=Wa({id:D.transactionId,type:D.transactionType},m);g(w);const y=R(u.state?.pathnameStackToGoBack,u.pathname);g(w,{state:{pathnameStackToGoBack:y}})}}),[m,e]),I=C.useCallback((()=>{k.vendor!=null&&O.trackApAgingDetail("AP Aging",f.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,f]);return C.useEffect((()=>{E()}),[]),C.useEffect((()=>{k.fetchState==="Completed"&&I()}),[I,k.fetchState]),d.jsx(Ko,{apAgingDetail:k,downloadParams:l,reportDate:f,analytics:O,onTransactionClick:Y,onReload:E,onBackClick:A,onColumnSortConfigChanged:_,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Cs=()=>{const e=K(),a=ee(),t=S((_=>xn(_))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AP Aging"});ze({isDataReady:t.fetchState==="Completed"});const r=U.getSignedInUser(),s=S((_=>_.tenantState.currentTenantId)),i=S((_=>L(_))),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},u=C.useMemo((()=>({authParams:m,companyName:c,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),p=t.apAgingUIState.selectedDate??xe(),h=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(kt(p))}),[]);C.useEffect((()=>{h()}),[]);const l=C.useCallback((()=>{a("../",{relative:"path"})}),[]),f=C.useCallback((_=>{e(Je({searchString:_}))}),[]),b=C.useCallback(((_,x)=>{e(Je({sortKey:x,sortOrder:_}))}),[]),g=C.useCallback((_=>{a(`./${_}/${p.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),k=C.useCallback((_=>{e(Je({downloadState:_}))}),[]),E=C.useCallback(((_,x)=>{}),[]),A=C.useCallback(((_,x)=>{e(Je({selectedDate:_,agingDateSelectionType:x})),e(kt(_))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(qe,{analytics:O,onLoad:_=>_.trackPageLoaded(W.Event.agingReport,"AP Aging")}):null,d.jsx(Ra,{uiState:t.apAgingUIState,report:t,downloadParams:u,analytics:O,onReloadReport:h,onBackClick:l,onSearchTextChange:f,onSortOrderChange:b,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},bs=Na((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=Q(),s=U.getSignedInUser(),i=S((I=>L(I))),{tenantEmailDomain:c}=Q(),m=J(),u=i.companyName,p={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},h=C.useMemo((()=>({authParams:p,companyName:u,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),l=C.useMemo((()=>r!=null?q(r):xe()),[r]),f=K(),b=ee(),g=S((I=>Pn(I,l,o))),k=C.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&f(Fn(o,l))}),[l]),E=C.useCallback((()=>{b("../../",{relative:"path"})}),[]),A=C.useCallback(((I,D)=>{f(Xt({sortKey:I,sortOrder:D}))}),[]),_=C.useCallback((I=>{f(Xt({downloadState:I}))}),[]),x=C.useCallback((I=>{if(e)e(I.transactionId,I.transactionType);else if(c!=null){const D=Wa({id:I.transactionId,type:I.transactionType},c);b(D);const w=R(m.state?.pathnameStackToGoBack,m.pathname);b(D,{state:{pathnameStackToGoBack:w}})}}),[c,e]),Y=C.useCallback((()=>{g.customer!=null&&O.trackArAgingDetail("AR Aging",l.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,l]);return C.useEffect((()=>{k()}),[]),C.useEffect((()=>{g.fetchState==="Completed"&&Y()}),[g.fetchState,Y]),d.jsx($o,{arAgingDetail:g,downloadParams:h,reportDate:l,analytics:O,onTransactionClick:x,onReload:k,onBackClick:E,onColumnSortConfigChanged:A,updateDownloadStateHandler:_,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Ss=()=>{const e=K(),a=ee(),t=S((A=>Rn(A))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AR Aging"});ze({isDataReady:t.fetchState==="Completed"});const r=U.getSignedInUser(),s=S((A=>L(A))),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=C.useMemo((()=>({authParams:c,companyName:i,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),u=t.arAgingUIState.selectedDate??xe(),p=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(yt(u))}),[]);C.useEffect((()=>{p()}),[]);const h=C.useCallback((()=>{a("../",{relative:"path"})}),[]),l=C.useCallback((A=>{e(et({searchString:A}))}),[]),f=C.useCallback(((A,_)=>{e(et({sortKey:_,sortOrder:A}))}),[]),b=C.useCallback((A=>{a(`./${A}/${u.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[u]),g=C.useCallback((A=>{e(et({downloadState:A}))}),[]),k=C.useCallback(((A,_)=>{e(et({selectedDate:A,agingDateSelectionType:_})),e(yt(A))}),[]),E=C.useCallback(((A,_)=>{e(Bn({nodeId:A,isCollapsed:_}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(qe,{analytics:O,onLoad:A=>A.trackPageLoaded(W.Event.agingReport,"AR Aging")}):null,d.jsx(Ra,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:O,onReloadReport:p,onBackClick:h,onSearchTextChange:l,onSortOrderChange:f,onEntityNameClick:b,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},qa=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ka(e,a){const t=Mn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Be(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=R(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Vn(n,o))}}}const _s=se((function(e){const a=jn(e).accountsInOrder.map(((t,n)=>qa(t,n)));return{sectionTitle:H.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:O}}),Ka)(Ba),ks=se((function(e){const a=Ln(e).accountsInOrder.map(((o,r)=>qa(o,r))),t=U.getSignedInUser(),n=nt(t);return{sectionTitle:H.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:O}}),Ka)(Ba);function ys(){const e=ee(),a=J(),{tenantEmailDomain:t}=Q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Ve,{}):d.jsx(_s,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function As(){const e=ee(),a=J(),{tenantEmailDomain:t}=Q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Ve,{}):d.jsx(ks,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const vs=Vt.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -1 +1 @@
1
- import{j as v}from"./liveblocks-CM1vcHN_.js";import{a as u}from"./sentry-Bh68thgn.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-Cc1CwF93.js";import{UN as N,fI as _,go as k,UO as R,hd as z,UP as L}from"./zeni-epic-state-DFhlE0W3.js";import{u as O,z as f,c as T,t as I,G as j,g as $}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";import{t as P}from"./getLocaleForTenant-CSUvt8Gt.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.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]="006a52c8-d404-4a63-a3ef-26b29a14f620",t._sentryDebugIdIdentifier="sentry-dbid-006a52c8-d404-4a63-a3ef-26b29a14f620")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:L(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=O(),h=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=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!R(i))&&t(z(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}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"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-CM1vcHN_.js";import{a as u}from"./sentry-Bh68thgn.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-Cc1CwF93.js";import{UN as N,fI as _,go as k,UO as R,hd as z,UP as L}from"./zeni-epic-state-DFhlE0W3.js";import{u as O,z as f,c as T,t as I,G as j,g as $}from"./index-C9gDoiPZ.js";import"./mui-ehyt9jca.js";import{t as P}from"./getLocaleForTenant-Bdg31N9b.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.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]="006a52c8-d404-4a63-a3ef-26b29a14f620",t._sentryDebugIdIdentifier="sentry-dbid-006a52c8-d404-4a63-a3ef-26b29a14f620")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:L(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=O(),h=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=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!R(i))&&t(z(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}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"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-CM1vcHN_.js";import{h as w,g as C,j as f,l as E,i as P}from"./core-Cc1CwF93.js";import{Xc as k,Xj as Z,gJ as z,gI as J,gH as L,k_ as Y,VJ as q,v3 as K,fI as B,WL as D,kY as T,Xd as v,Xu as F,kW as G,lh as j}from"./zeni-epic-state-DFhlE0W3.js";import{cV as M,a2 as R,p as N,z as U,a5 as p,b as S,a8 as X,cW as Q,R as _,cX as ee,v as te}from"./index-zmOdoQIt.js";import{u as H,n as O}from"./mui-ehyt9jca.js";import"./sentry-Bh68thgn.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]="ceb05938-c306-4b58-a4d8-e4e064d7bc60",e._sentryDebugIdIdentifier="sentry-dbid-ceb05938-c306-4b58-a4d8-e4e064d7bc60")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(L(a,"BillPayVendor"))},onResendOtp:a=>{e(J(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(z(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(Z(a,n,o))}}}))(M);function W({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=f((d=>k(d,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=O.div`
1
+ import{j as l}from"./liveblocks-CM1vcHN_.js";import{h as w,g as C,j as f,l as E,i as P}from"./core-Cc1CwF93.js";import{Xc as k,Xj as Z,gJ as z,gI as J,gH as L,k_ as Y,VJ as q,v3 as K,fI as B,WL as D,kY as T,Xd as v,Xu as F,kW as G,lh as j}from"./zeni-epic-state-DFhlE0W3.js";import{cV as M,a2 as R,p as N,z as U,a5 as p,b as S,a8 as X,cW as Q,R as _,cX as ee,v as te}from"./index-C9gDoiPZ.js";import{u as H,n as O}from"./mui-ehyt9jca.js";import"./sentry-Bh68thgn.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]="ceb05938-c306-4b58-a4d8-e4e064d7bc60",e._sentryDebugIdIdentifier="sentry-dbid-ceb05938-c306-4b58-a4d8-e4e064d7bc60")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(L(a,"BillPayVendor"))},onResendOtp:a=>{e(J(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(z(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(Z(a,n,o))}}}))(M);function W({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=f((d=>k(d,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=O.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as c}from"./liveblocks-CM1vcHN_.js";import{a2 as i,ac as l}from"./index-zmOdoQIt.js";import{u as f,D as p}from"./mui-ehyt9jca.js";import"./sentry-Bh68thgn.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]="cd7757c9-311c-4b96-86e7-ddf3c130c0ba",e._sentryDebugIdIdentifier="sentry-dbid-cd7757c9-311c-4b96-86e7-ddf3c130c0ba")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=i(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=f();return c.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
1
+ import{j as c}from"./liveblocks-CM1vcHN_.js";import{a2 as i,ac as l}from"./index-C9gDoiPZ.js";import{u as f,D as p}from"./mui-ehyt9jca.js";import"./sentry-Bh68thgn.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]="cd7757c9-311c-4b96-86e7-ddf3c130c0ba",e._sentryDebugIdIdentifier="sentry-dbid-cd7757c9-311c-4b96-86e7-ddf3c130c0ba")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=i(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=f();return c.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CM1vcHN_.js";import{a as d}from"./sentry-Bh68thgn.js";import{h as B,u as G,g as q,i as F,j as l,N,l as V,n as _,o as O}from"./core-Cc1CwF93.js";import{a1j as z,fI as H,a03 as M,na as R,T4 as b,a1l as W,VH as Y,ma as $,T5 as S,a07 as J,a08 as K,VI as L,VJ as Q}from"./zeni-epic-state-DFhlE0W3.js";import{dt as U,e as X,a5 as Z,v as tt}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";import{d as I}from"./decodeURIComponentSafe-BhSMetwg.js";import{w as et}from"./withTransactionSidePanel-BaaDGWl5.js";import{e as at,t as nt}from"./routePaths-RxstHRDw.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./useAskAiCfoHostNavButtonProps-Bl76c5H-.js";import"./TransactionDetailScreen-CpvJY1a3.js";import"./useInitialThreadRequest-DqCJRXyQ.js";import"./expenseAutomationHelper-CCv2kRkH.js";import"./stripSplatSuffix-B0jus2nC.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]="13f7fd21-7ab3-42f5-8839-e76a71fb6e4d",a._sentryDebugIdIdentifier="sentry-dbid-13f7fd21-7ab3-42f5-8839-e76a71fb6e4d")}catch{}})();const ot=V((function(a,t){const e=t.entity,o=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:$(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(J()),a(K()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??k();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(b(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(U),it=et((function({entityType:a,...t}){const e=B(),o=G(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=F(),r=I(j??""),f=I(x??""),p=rt(r,f),v=[r,f].filter((n=>n!=null)),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),w=l((n=>H(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&p===!0&&(T(!0),o(R(i)))}),[m,p,i]);const E=l((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,A=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(b(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{to:k(v.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,k=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(_,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
1
+ import{j as s}from"./liveblocks-CM1vcHN_.js";import{a as d}from"./sentry-Bh68thgn.js";import{h as B,u as G,g as q,i as F,j as l,N,l as V,n as _,o as O}from"./core-Cc1CwF93.js";import{a1j as z,fI as H,a03 as M,na as R,T4 as b,a1l as W,VH as Y,ma as $,T5 as S,a07 as J,a08 as K,VI as L,VJ as Q}from"./zeni-epic-state-DFhlE0W3.js";import{dt as U,e as X,a5 as Z,v as tt}from"./index-C9gDoiPZ.js";import"./mui-ehyt9jca.js";import{d as I}from"./decodeURIComponentSafe-BhSMetwg.js";import{w as et}from"./withTransactionSidePanel-BclYopZI.js";import{e as at,t as nt}from"./routePaths-Qo9PrkRx.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./useAskAiCfoHostNavButtonProps-Dn-NLDsa.js";import"./TransactionDetailScreen-CzMYbtKa.js";import"./useInitialThreadRequest-UNqcV9yZ.js";import"./expenseAutomationHelper-CCv2kRkH.js";import"./stripSplatSuffix-B0jus2nC.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]="13f7fd21-7ab3-42f5-8839-e76a71fb6e4d",a._sentryDebugIdIdentifier="sentry-dbid-13f7fd21-7ab3-42f5-8839-e76a71fb6e4d")}catch{}})();const ot=V((function(a,t){const e=t.entity,o=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:$(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(J()),a(K()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??k();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(b(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(U),it=et((function({entityType:a,...t}){const e=B(),o=G(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=F(),r=I(j??""),f=I(x??""),p=rt(r,f),v=[r,f].filter((n=>n!=null)),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),w=l((n=>H(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&p===!0&&(T(!0),o(R(i)))}),[m,p,i]);const E=l((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,A=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(b(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{to:k(v.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,k=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(_,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
@@ -1,4 +1,4 @@
1
- import{j as k}from"./liveblocks-CM1vcHN_.js";import{u as Ie,h as Me,g as ge,j as M,i as Ae,s as po,t as Hn,l as ho,n as So,o as Je,N as fo}from"./core-Cc1CwF93.js";import{fI as xe,_p as Kn,qe as Be,h8 as Rt,AA as Io,_q as go,_r as Co,_s as ko,_t as yt,_u as ct,gk as wt,_v as bn,eH as bo,g3 as To,_w as Tn,_x as it,r5 as yo,v6 as Po,gW as vo,gU as Eo,_y as Ao,ri as xo,rr as Ro,qp as wo,qD as Wn,gT as me,gV as Do,_z as _o,qZ as Zn,rs as Fo,qA as Bo,qv as Mo,vc as Oo,gS as Ee,_A as dt,CJ as Qn,Nd as Xn,_B as ea,_C as Uo,G8 as ta,_D as $o,e$ as Vo,f1 as jo,t7 as Dt,_E as yn,_F as zo,md as Lo,_G as Go,mk as No,d5 as qo,E0 as _t,_H as Jo,_I as Yo,_J as Ho,_K as Ko,fp as Ft,sX as Pn,_L as Wo,VH as Zo,_M as Qo,_N as Xo,mm as es,_O as ts,RV as ns,ml as as,ma as os,qS as na,rx as ut,tK as aa,u4 as ss,UW as oa,rw as vn,rz as sa,rB as cs,bE as is,nJ as ls,nG as rs,rA as lt,ry as ve,_P as ds,rS as En,_Q as us,_R as ms,s$ as ps,t0 as hs,_S as Ss,Vt as ca,ZT as fs,_T as Is,VI as An,VJ as st,_U as xn,mB as gs,_V as Cs,_W as ks,_X as bs,_Y as Ts,qN as ys,_Z as Ps,__ as vs,_$ as Es,rI as As,mo as xs,mf as Rs,$0 as ws,mn as Rn,$1 as Ds,$2 as _s,$3 as Fs,uJ as Bs,uk as Ms,uj as Pt,$4 as Os,$5 as Us,$6 as $s,$7 as Vs,nU as js,bv as ia,nP as wn,nB as zs,$8 as Ls,h3 as Gs,nM as Ns,t9 as qs,tb as Js,sU as Ys,$9 as Hs,$a as Ks,FC as Ws,FB as Zs,FS as Qs,$b as Dn,s_ as Xs,sv as ec,$c as tc,sb as nc,sg as ac,sr as oc,se as sc,$d as cc,s7 as ic,sq as lc,t4 as rc,$e as dc,th as uc,sO as mc,tn as pc,sT as hc,rT as Sc,$f as fc,r9 as Ic,qJ as gc,qQ as _n,rD as Cc,$g as kc,$h as bc,$i as Tc,$j as yc,$k as Pc,$l as vc,$m as Ec,tr as Ac,$n as xc,$o as Rc,$p as Fn,uU as wc,ub as Dc,u0 as Bn,t_ as _c,$q as Fc,tP as Bc,tu as Mc,u1 as Oc,$r as Uc,$s as $c,tA as Vc,$t as jc,tv as zc,tz as Lc,tx as Gc,u7 as Nc,$u as Mn,qi as vt,$v as qc,Ec as On,cp as Jc,qE as Yc,$w as Hc}from"./zeni-epic-state-DFhlE0W3.js";import Ut from"./NotFoundScreen-DD1ftXbM.js";import{a as o,R as la}from"./sentry-Bh68thgn.js";import{n as Oe,S as Kc}from"./mui-ehyt9jca.js";import{p as mt,b as X,e as te,v as ee,aC as ra,al as da,c0 as Wc,c1 as Zc,z as He,c2 as Bt,c3 as Qc,c4 as Xc,af as Ye,c5 as ei,c6 as Un,c7 as $n,c8 as ti,c9 as ni,a8 as ua,ca as ai,s as rt,j as oi,cb as si,cc as ci,k as ii,V as li,cd as ri,ce as di,cf as ui,cg as mi,aZ as pi,ac as hi,ch as Si,ci as fi,cj as Ii,G as ma,w as gi,ck as Ci,aj as Mt,cl as ki,a5 as bi,cm as Ti,cn as yi}from"./index-zmOdoQIt.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-Bl76c5H-.js";import{u as Vn,a as Pi,b as vi,d as Ei,c as Ai,e as xi,r as Ri,C as wi}from"./TransactionDetailScreen-CpvJY1a3.js";import{u as Di,a as _i,b as Fi}from"./useActualMatchingMatchDetail-Dr6cKA7B.js";import{d as Bi}from"./decodeURIComponentSafe-BhSMetwg.js";import{m as Vt,a as pa,b as ha,i as Ot}from"./expenseAutomationHelper-CCv2kRkH.js";import{u as Sa,a as fa,w as Mi}from"./withTransactionSidePanel-BaaDGWl5.js";import{S as Oi,a as Ui,b as $i,J as Vi}from"./ScheduleDetailsPrepaidExpensesScreen-CkM33AZC.js";import{s as jn,i as Ia,h as ji,f as zi,v as Li,t as Gi}from"./routePaths-RxstHRDw.js";import{a as Et}from"./accountMappingHelper-DPBaxZAX.js";import{D as Ni}from"./DrawerScreen-DOVfIfbY.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./useInitialThreadRequest-DqCJRXyQ.js";import"./stripSplatSuffix-B0jus2nC.js";import"./pathToGoBack-jAeSfAQ9.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="d82f56d8-203b-4018-bf8f-7c30f888b1b1",t._sentryDebugIdIdentifier="sentry-dbid-d82f56d8-203b-4018-bf8f-7c30f888b1b1")}catch{}})();const qi=()=>{const t=Ie(),n=Me(),h=ge(),p=M((m=>xe(m))),{useFeatureGate:S}=mt(),{isFeatureEnabled:i}=S(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=S(X.aiAuditScorePercentage),R=M((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=M((m=>Kn(m,p.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:f}=$t({mobileExploreReferrer:"Month-End Close Overview"}),v=o.useCallback(((m,d,g=!1)=>{t(Be({tenantId:d,period:{month:m.month,year:m.year},refreshViewInBackground:g}))}),[]),E=o.useCallback((m=>{const d=h.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&te.trackMonthCloseAuditPage(m.month,m.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null),t(Rt(p.tenantId,m))}),[p.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),C=R[p.tenantId],O=o.useCallback((()=>{const m=h.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&te.trackMonthCloseAuditPage(C.month,C.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),v(C,p.tenantId,!0)}),[v,C,p.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=ee(h.state?.pathnameStackToGoBack,h.pathname),Y=o.useCallback((()=>{if(l.monthEndCloseChecks!=null&&C!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((d=>d.progress<100));if(m!=null)return void n(`./${m.id}/${C.month}-${C.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${C.month}-${C.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,C]),{areTenantIdsInSync:w}=ra();return da({isDataReady:l.fetchState==="Completed"}),o.useEffect((()=>{C!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&w&&v(C,p.tenantId)}),[v,C,l.fetchState,p.tenantId,w]),o.useEffect((()=>{C!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&w&&t(Io(C))}),[C,l.monthClosePerformanceTrendFetchStatus.fetchState,w]),o.useEffect((()=>{const m=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&O()}),3e5);return()=>clearInterval(m)}),[l.fetchState]),o.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const m=h.state?.referrer;te.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,m??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ji,{children:k.jsx(Wc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{n(`./${m}/${C.month}-${C.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:E,handleReviewButtonClick:Y,onBackClick:()=>{n("../../dashboard")},onReload:O,isAiCfoAccessEnabled:b,onAskAiCfoClick:f,aiAuditScorePercentageEnabled:r})})},Ji=Oe.div`
1
+ import{j as k}from"./liveblocks-CM1vcHN_.js";import{u as Ie,h as Me,g as ge,j as M,i as Ae,s as po,t as Hn,l as ho,n as So,o as Je,N as fo}from"./core-Cc1CwF93.js";import{fI as xe,_p as Kn,qe as Be,h8 as Rt,AA as Io,_q as go,_r as Co,_s as ko,_t as yt,_u as ct,gk as wt,_v as bn,eH as bo,g3 as To,_w as Tn,_x as it,r5 as yo,v6 as Po,gW as vo,gU as Eo,_y as Ao,ri as xo,rr as Ro,qp as wo,qD as Wn,gT as me,gV as Do,_z as _o,qZ as Zn,rs as Fo,qA as Bo,qv as Mo,vc as Oo,gS as Ee,_A as dt,CJ as Qn,Nd as Xn,_B as ea,_C as Uo,G8 as ta,_D as $o,e$ as Vo,f1 as jo,t7 as Dt,_E as yn,_F as zo,md as Lo,_G as Go,mk as No,d5 as qo,E0 as _t,_H as Jo,_I as Yo,_J as Ho,_K as Ko,fp as Ft,sX as Pn,_L as Wo,VH as Zo,_M as Qo,_N as Xo,mm as es,_O as ts,RV as ns,ml as as,ma as os,qS as na,rx as ut,tK as aa,u4 as ss,UW as oa,rw as vn,rz as sa,rB as cs,bE as is,nJ as ls,nG as rs,rA as lt,ry as ve,_P as ds,rS as En,_Q as us,_R as ms,s$ as ps,t0 as hs,_S as Ss,Vt as ca,ZT as fs,_T as Is,VI as An,VJ as st,_U as xn,mB as gs,_V as Cs,_W as ks,_X as bs,_Y as Ts,qN as ys,_Z as Ps,__ as vs,_$ as Es,rI as As,mo as xs,mf as Rs,$0 as ws,mn as Rn,$1 as Ds,$2 as _s,$3 as Fs,uJ as Bs,uk as Ms,uj as Pt,$4 as Os,$5 as Us,$6 as $s,$7 as Vs,nU as js,bv as ia,nP as wn,nB as zs,$8 as Ls,h3 as Gs,nM as Ns,t9 as qs,tb as Js,sU as Ys,$9 as Hs,$a as Ks,FC as Ws,FB as Zs,FS as Qs,$b as Dn,s_ as Xs,sv as ec,$c as tc,sb as nc,sg as ac,sr as oc,se as sc,$d as cc,s7 as ic,sq as lc,t4 as rc,$e as dc,th as uc,sO as mc,tn as pc,sT as hc,rT as Sc,$f as fc,r9 as Ic,qJ as gc,qQ as _n,rD as Cc,$g as kc,$h as bc,$i as Tc,$j as yc,$k as Pc,$l as vc,$m as Ec,tr as Ac,$n as xc,$o as Rc,$p as Fn,uU as wc,ub as Dc,u0 as Bn,t_ as _c,$q as Fc,tP as Bc,tu as Mc,u1 as Oc,$r as Uc,$s as $c,tA as Vc,$t as jc,tv as zc,tz as Lc,tx as Gc,u7 as Nc,$u as Mn,qi as vt,$v as qc,Ec as On,cp as Jc,qE as Yc,$w as Hc}from"./zeni-epic-state-DFhlE0W3.js";import Ut from"./NotFoundScreen-DghvMtNI.js";import{a as o,R as la}from"./sentry-Bh68thgn.js";import{n as Oe,S as Kc}from"./mui-ehyt9jca.js";import{p as mt,b as X,e as te,v as ee,aC as ra,al as da,c0 as Wc,c1 as Zc,z as He,c2 as Bt,c3 as Qc,c4 as Xc,af as Ye,c5 as ei,c6 as Un,c7 as $n,c8 as ti,c9 as ni,a8 as ua,ca as ai,s as rt,j as oi,cb as si,cc as ci,k as ii,V as li,cd as ri,ce as di,cf as ui,cg as mi,aZ as pi,ac as hi,ch as Si,ci as fi,cj as Ii,G as ma,w as gi,ck as Ci,aj as Mt,cl as ki,a5 as bi,cm as Ti,cn as yi}from"./index-C9gDoiPZ.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-Dn-NLDsa.js";import{u as Vn,a as Pi,b as vi,d as Ei,c as Ai,e as xi,r as Ri,C as wi}from"./TransactionDetailScreen-CzMYbtKa.js";import{u as Di,a as _i,b as Fi}from"./useActualMatchingMatchDetail-D3PMymJ7.js";import{d as Bi}from"./decodeURIComponentSafe-BhSMetwg.js";import{m as Vt,a as pa,b as ha,i as Ot}from"./expenseAutomationHelper-CCv2kRkH.js";import{u as Sa,a as fa,w as Mi}from"./withTransactionSidePanel-BclYopZI.js";import{S as Oi,a as Ui,b as $i,J as Vi}from"./ScheduleDetailsPrepaidExpensesScreen-gxx2-EFd.js";import{s as jn,i as Ia,h as ji,f as zi,v as Li,t as Gi}from"./routePaths-Qo9PrkRx.js";import{a as Et}from"./accountMappingHelper-DPBaxZAX.js";import{D as Ni}from"./DrawerScreen-A-8KPbEP.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./useInitialThreadRequest-UNqcV9yZ.js";import"./stripSplatSuffix-B0jus2nC.js";import"./pathToGoBack-jAeSfAQ9.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="d82f56d8-203b-4018-bf8f-7c30f888b1b1",t._sentryDebugIdIdentifier="sentry-dbid-d82f56d8-203b-4018-bf8f-7c30f888b1b1")}catch{}})();const qi=()=>{const t=Ie(),n=Me(),h=ge(),p=M((m=>xe(m))),{useFeatureGate:S}=mt(),{isFeatureEnabled:i}=S(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=S(X.aiAuditScorePercentage),R=M((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=M((m=>Kn(m,p.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:f}=$t({mobileExploreReferrer:"Month-End Close Overview"}),v=o.useCallback(((m,d,g=!1)=>{t(Be({tenantId:d,period:{month:m.month,year:m.year},refreshViewInBackground:g}))}),[]),E=o.useCallback((m=>{const d=h.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&te.trackMonthCloseAuditPage(m.month,m.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null),t(Rt(p.tenantId,m))}),[p.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),C=R[p.tenantId],O=o.useCallback((()=>{const m=h.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&te.trackMonthCloseAuditPage(C.month,C.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),v(C,p.tenantId,!0)}),[v,C,p.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=ee(h.state?.pathnameStackToGoBack,h.pathname),Y=o.useCallback((()=>{if(l.monthEndCloseChecks!=null&&C!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((d=>d.progress<100));if(m!=null)return void n(`./${m.id}/${C.month}-${C.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${C.month}-${C.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,C]),{areTenantIdsInSync:w}=ra();return da({isDataReady:l.fetchState==="Completed"}),o.useEffect((()=>{C!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&w&&v(C,p.tenantId)}),[v,C,l.fetchState,p.tenantId,w]),o.useEffect((()=>{C!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&w&&t(Io(C))}),[C,l.monthClosePerformanceTrendFetchStatus.fetchState,w]),o.useEffect((()=>{const m=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&O()}),3e5);return()=>clearInterval(m)}),[l.fetchState]),o.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const m=h.state?.referrer;te.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,m??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ji,{children:k.jsx(Wc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{n(`./${m}/${C.month}-${C.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:E,handleReviewButtonClick:Y,onBackClick:()=>{n("../../dashboard")},onReload:O,isAiCfoAccessEnabled:b,onAskAiCfoClick:f,aiAuditScorePercentageEnabled:r})})},Ji=Oe.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-DD1ftXbM.js","assets/sentry-Bh68thgn.js","assets/core-Cc1CwF93.js","assets/zeni-epic-state-DFhlE0W3.js","assets/index-zmOdoQIt.js","assets/mui-ehyt9jca.js","assets/analytics-D_VVN36A.js","assets/utils-CjDqL2uk.js","assets/index-BQ3cXEYt.css"])))=>i.map(i=>d[i]);
2
- import{_ as u}from"./zeni-epic-state-DFhlE0W3.js";import{j as a}from"./liveblocks-CM1vcHN_.js";import{l as c}from"./index-zmOdoQIt.js";import"./sentry-Bh68thgn.js";import{N as e}from"./core-Cc1CwF93.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new n.Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="664578a5-3bc1-4f45-ae26-42636c83b65d",n._sentryDebugIdIdentifier="sentry-dbid-664578a5-3bc1-4f45-ae26-42636c83b65d")}catch{}})();const E=c((()=>u((()=>import("./NotFoundScreen-DD1ftXbM.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),b=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/reimbursements`}),j=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/bills`}),m=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/treasury`}),l=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/checking`}),d=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/cards`}),_=({showZeniAccountRoute:n,isUserHasBillPayAccess:i,isUserHasReimbursementAccess:s,showTreasuryRoute:o,isTenantBankingOnly:f,showChargeCardRoute:r,tenantEmailDomain:t})=>{if(f===!0){if(n)return a.jsx(l,{tenantEmailDomain:t});if(o)return a.jsx(m,{tenantEmailDomain:t});if(r)return a.jsx(d,{tenantEmailDomain:t})}return n?a.jsx(l,{tenantEmailDomain:t}):o?a.jsx(m,{tenantEmailDomain:t}):r?a.jsx(d,{tenantEmailDomain:t}):i?a.jsx(j,{tenantEmailDomain:t}):s?a.jsx(b,{tenantEmailDomain:t}):a.jsx(E,{})};export{_ as F};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-DghvMtNI.js","assets/sentry-Bh68thgn.js","assets/core-Cc1CwF93.js","assets/zeni-epic-state-DFhlE0W3.js","assets/index-C9gDoiPZ.js","assets/mui-ehyt9jca.js","assets/analytics-D_VVN36A.js","assets/utils-CjDqL2uk.js","assets/index-BQ3cXEYt.css"])))=>i.map(i=>d[i]);
2
+ import{_ as u}from"./zeni-epic-state-DFhlE0W3.js";import{j as a}from"./liveblocks-CM1vcHN_.js";import{l as c}from"./index-C9gDoiPZ.js";import"./sentry-Bh68thgn.js";import{N as e}from"./core-Cc1CwF93.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new n.Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="664578a5-3bc1-4f45-ae26-42636c83b65d",n._sentryDebugIdIdentifier="sentry-dbid-664578a5-3bc1-4f45-ae26-42636c83b65d")}catch{}})();const E=c((()=>u((()=>import("./NotFoundScreen-DghvMtNI.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),b=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/reimbursements`}),j=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/bills`}),m=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/treasury`}),l=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/checking`}),d=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/cards`}),_=({showZeniAccountRoute:n,isUserHasBillPayAccess:i,isUserHasReimbursementAccess:s,showTreasuryRoute:o,isTenantBankingOnly:f,showChargeCardRoute:r,tenantEmailDomain:t})=>{if(f===!0){if(n)return a.jsx(l,{tenantEmailDomain:t});if(o)return a.jsx(m,{tenantEmailDomain:t});if(r)return a.jsx(d,{tenantEmailDomain:t})}return n?a.jsx(l,{tenantEmailDomain:t}):o?a.jsx(m,{tenantEmailDomain:t}):r?a.jsx(d,{tenantEmailDomain:t}):i?a.jsx(j,{tenantEmailDomain:t}):s?a.jsx(b,{tenantEmailDomain:t}):a.jsx(E,{})};export{_ as F};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CM1vcHN_.js";import{a as r}from"./sentry-Bh68thgn.js";import{d7 as l,d8 as p,E as f,a5 as m}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";import c from"./NotFoundScreen-DD1ftXbM.js";import{h as u,g as b}from"./core-Cc1CwF93.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]="29a2d667-058f-4840-9eae-30d46e50e9b4",e._sentryDebugIdIdentifier="sentry-dbid-29a2d667-058f-4840-9eae-30d46e50e9b4")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:f(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
1
+ import{j as s}from"./liveblocks-CM1vcHN_.js";import{a as r}from"./sentry-Bh68thgn.js";import{d7 as l,d8 as p,E as f,a5 as m}from"./index-C9gDoiPZ.js";import"./mui-ehyt9jca.js";import c from"./NotFoundScreen-DghvMtNI.js";import{h as u,g as b}from"./core-Cc1CwF93.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]="29a2d667-058f-4840-9eae-30d46e50e9b4",e._sentryDebugIdIdentifier="sentry-dbid-29a2d667-058f-4840-9eae-30d46e50e9b4")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:f(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1 +1 @@
1
- import{a as i}from"./sentry-Bh68thgn.js";import{u as f,h as l,g as m}from"./core-Cc1CwF93.js";import{i7 as p,Vl as g,Vm as _}from"./zeni-epic-state-DFhlE0W3.js";import{u as b,c as h,z as y}from"./index-zmOdoQIt.js";import"./liveblocks-CM1vcHN_.js";import"./recharts-tLFME7sM.js";import"./mui-ehyt9jca.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4d054a2-b7ab-40f6-920e-2844cfdead4f",e._sentryDebugIdIdentifier="sentry-dbid-a4d054a2-b7ab-40f6-920e-2844cfdead4f")}catch{}})();function V(){const e=f(),n=l(),r=m(),{setLoading:o,clearAllLoading:c}=b(),a=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{V as default};
1
+ import{a as i}from"./sentry-Bh68thgn.js";import{u as f,h as l,g as m}from"./core-Cc1CwF93.js";import{i7 as p,Vl as g,Vm as _}from"./zeni-epic-state-DFhlE0W3.js";import{u as b,c as h,z as y}from"./index-C9gDoiPZ.js";import"./liveblocks-CM1vcHN_.js";import"./recharts-tLFME7sM.js";import"./mui-ehyt9jca.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4d054a2-b7ab-40f6-920e-2844cfdead4f",e._sentryDebugIdIdentifier="sentry-dbid-a4d054a2-b7ab-40f6-920e-2844cfdead4f")}catch{}})();function V(){const e=f(),n=l(),r=m(),{setLoading:o,clearAllLoading:c}=b(),a=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{V as default};